xworkmate-app/docs/architecture/bridge-runtime-routing-map.md
Cowork 3P 7573780956 docs(architecture): fix critical accuracy errors, stale refs, paths
Accuracy fixes:
- app-orchestration.md: remove non-existent constructor params
- models-and-config.md: remove wrong multiAgent field from SettingsSnapshot
- runtime-contracts.md: add missing multiAgent/collaborationMode/routingHint fields

Stale multi-agent refs:
- unified-routing-architecture.md: agent/multi-agent → agent (含 bridge 转发)
- bridge-runtime-routing-map.md: multi-agent tasks → multi-agent forwarding tasks
- cross-repo-task-state-workflow.md: remove multi-agent orchestration from mermaid
- runtime-contracts.md, feature-surfaces.md: 多 agent → agent

Organization:
- Move cloud-session-service and stage4-helper to archive/
- Fix 22 xworkmate/ → xworkmate-app/ paths in archive doc
- Fix XWorkmate.svc.plus repo name in simple-theme-default.md
- Update README.md index and public-api/README.md coverage stats (132/590)
2026-06-04 06:53:38 +00:00

2.2 KiB
Raw Permalink Blame History

Bridge Runtime Routing Map

Last Updated: 2026-04-21

本文记录 xworkmate-app 当前对 xworkmate-bridge 的运行时路由合同。UI 不直接承载这些路径Assistant UI 仍由 acp.capabilities 返回的 providerCataloggatewayProvidersavailableExecutionTargets 驱动。

App 侧任务发送统一调用 bridge 主入口 /acp/rpc,不再拼接 provider-specific 或 gateway-specific 直连 URL。OpenClaw session.start 和同一任务的 session.message 也走 /acp/rpc,通过 routing.explicitExecutionTarget=gatewayrouting.preferredGatewayProviderId=openclaw 表达目标。

App Runtime Flow

flowchart TD
  A["Assistant send"] --> B["acp.capabilities"]
  B --> C["providerCatalog"]
  B --> D["gatewayProviders"]
  B --> E["availableExecutionTargets"]

  C --> F["Hermes"]
  C --> G["Codex"]
  C --> H["OpenCode"]
  C --> I["Gemini"]
  D --> J["OpenClaw"]

  A --> P["POST https://xworkmate-bridge.svc.plus/acp/rpc"]
  P --> Q["Authorization: Bearer token"]
  P --> R["provider / routing / requestedExecutionTarget params"]
  R --> S["bridge-owned routing"]

  S --> K["Hermes internal runtime"]
  S --> L["Codex internal runtime"]
  S --> M["OpenCode internal runtime"]
  S --> N["Gemini internal runtime"]
  S --> O["OpenClaw internal runtime"]

Routing Rules

  • App runtime control-plane requests, agent tasks, multi-agent forwarding tasks, OpenClaw gateway tasks, session.cancel, and session.close use https://xworkmate-bridge.svc.plus/acp/rpc.
  • OpenClaw gateway session.start and follow-up session.message are identified by routing metadata, not by a separate public path.
  • Provider and gateway selection are passed as request params, including provider, routing, and requestedExecutionTarget.
  • Bridge-owned internal routing is opaque to the App; it is not represented as public provider paths.
  • The app must not route managed bridge tasks to local or LAN endpoints such as 127.0.0.1:* or 192.168.*:*.
  • The app must not route managed bridge tasks by directly constructing /acp-server/* URLs.
  • /gateway/openclaw must not participate in app runtime routing; it is neither a task submit path nor an ACP base endpoint.