NODEDC_PLATFORM/docs/AI_WORKSPACE_CONFIG_CONTRAC...

55 lines
2.3 KiB
Markdown

# AI Workspace Config Contract
This contract keeps topology differences in env/config instead of product-code branches.
## URL Classes
- Worker-facing URL: returned to or used by the Codex worker. It must be reachable from the machine that executes Codex.
- Backend-internal URL: used by app backends, Platform Assistant, Hub, Gateway, and service-to-service calls.
- Browser URL: used by user-facing UI.
- Downstream app URL: used by an adapter service to mutate/read its owned app backend.
Do not mix these classes. A URL reachable from the Mac browser is not automatically reachable from a remote Codex worker.
## Current Profiles
`local/hybrid-prod-bridge`:
- Tasker UI: `http://task.local.nodedc`
- Platform Assistant: `http://127.0.0.1:18082`
- Local Hub process: `http://127.0.0.1:18081`
- Default worker-facing Hub: `wss://ai-hub.nodedc.ru/api/ai-workspace/hub`
- Ops entitlement adapter: `http://host.docker.internal:4100/api/internal/v1/ai-workspace/entitlements` when deliberately enabled
- Ops Gateway downstream Tasker: `http://task.local.nodedc`
- This profile is valid for contract smoke and local Ops vertical smoke, not proof of live local Codex worker e2e.
`synology/prod-public`:
- Browser Launcher: `https://hub.nodedc.ru`
- Browser Ops: `https://ops.nodedc.ru`
- Worker-facing Hub: `wss://ai-hub.nodedc.ru/api/ai-workspace/hub`
- Platform Assistant internal: `http://ai-workspace-assistant:18082`
- Platform to Ops entitlement: `http://172.22.0.222:18190/api/internal/v1/ai-workspace/entitlements`
- Ops Gateway worker-facing MCP: `https://ops-agents.nodedc.ru/mcp`
- Ops Gateway downstream Tasker: `http://172.22.0.222:18090`
- This is the preferred controlled runtime e2e target.
`tailscale/tunnel-local-e2e`:
- Allowed only as an explicit profile.
- All worker-facing URLs must be reachable from the executing Codex worker through Tailscale or a named tunnel.
- No product code should auto-fallback from localhost to Tailscale to public domains.
## Required Rule
New apps must join AI Workspace through app manifests/config/adapters:
- app id and surface id;
- context schema;
- entitlement adapter URL/token;
- MCP/tool pack URL and worker-facing public URL;
- smoke test contract;
- owner repo/service.
Do not add app-specific address logic to the agent installer, Engine, Ops, or Platform Assistant runtime flow.