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:
40
tests/docker/server/Dockerfile
Normal file
40
tests/docker/server/Dockerfile
Normal file
@@ -0,0 +1,40 @@
|
||||
# Build context: repo root (Yonexus/)
|
||||
# ── Stage 1: compile ──────────────────────────────────────────────────────────
|
||||
FROM node:22-alpine AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# Server imports Yonexus.Protocol and Yonexus.Client/crypto — all needed for tsc
|
||||
COPY Yonexus.Protocol/src ./Yonexus.Protocol/src
|
||||
COPY Yonexus.Client/plugin/crypto ./Yonexus.Client/plugin/crypto
|
||||
|
||||
COPY Yonexus.Server/package.json ./Yonexus.Server/
|
||||
COPY Yonexus.Server/package-lock.json ./Yonexus.Server/
|
||||
COPY Yonexus.Server/tsconfig.json ./Yonexus.Server/
|
||||
COPY Yonexus.Server/plugin ./Yonexus.Server/plugin
|
||||
|
||||
WORKDIR /build/Yonexus.Server
|
||||
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.Server/dist ./dist
|
||||
COPY --from=builder /build/Yonexus.Server/node_modules ./node_modules
|
||||
COPY Yonexus.Server/package.json ./package.json
|
||||
COPY Yonexus.Server/plugin/openclaw.plugin.json ./plugin/openclaw.plugin.json
|
||||
COPY Yonexus.Server/scripts/install.mjs ./scripts/install.mjs
|
||||
|
||||
COPY tests/docker/server-test-plugin /app/server-test-plugin
|
||||
COPY tests/docker/server/entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
EXPOSE 8787
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user