feat: add rule dispatch, cross-plugin API, and Docker integration test
Wire rule registry and authenticated callbacks into both client and server runtimes; expose __yonexusClient / __yonexusServer on globalThis for cross-plugin communication. Add Docker-based integration test with server-test-plugin (test_ping echo) and client-test-plugin (test_pong receiver), plus docker-compose setup. Fix transport race condition where a stale _connections entry caused promoteToAuthenticated to silently fail. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
37
tests/docker/client/Dockerfile
Normal file
37
tests/docker/client/Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
||||
# Build context: repo root (Yonexus/)
|
||||
# ── Stage 1: compile ──────────────────────────────────────────────────────────
|
||||
FROM node:22-alpine AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# Client imports Yonexus.Protocol only
|
||||
COPY Yonexus.Protocol/src ./Yonexus.Protocol/src
|
||||
|
||||
COPY Yonexus.Client/package.json ./Yonexus.Client/
|
||||
COPY Yonexus.Client/package-lock.json ./Yonexus.Client/
|
||||
COPY Yonexus.Client/tsconfig.json ./Yonexus.Client/
|
||||
COPY Yonexus.Client/plugin ./Yonexus.Client/plugin
|
||||
|
||||
WORKDIR /build/Yonexus.Client
|
||||
RUN npm ci
|
||||
RUN npm run build
|
||||
|
||||
# ── Stage 2: runtime ─────────────────────────────────────────────────────────
|
||||
FROM node:22-alpine AS runtime
|
||||
|
||||
RUN npm install -g openclaw@2026.4.9
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Layout expected by install.mjs: repoRoot = /app, sourceDist = /app/dist
|
||||
COPY --from=builder /build/Yonexus.Client/dist ./dist
|
||||
COPY --from=builder /build/Yonexus.Client/node_modules ./node_modules
|
||||
COPY Yonexus.Client/package.json ./package.json
|
||||
COPY Yonexus.Client/plugin/openclaw.plugin.json ./plugin/openclaw.plugin.json
|
||||
COPY Yonexus.Client/scripts/install.mjs ./scripts/install.mjs
|
||||
|
||||
COPY tests/docker/client-test-plugin /app/client-test-plugin
|
||||
COPY tests/docker/client/entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user