[codex] Make realtime delivery node-only
Merged
WI
5mo ago+23022+23022+01234567890123456789012345678901234567890123456789-2380-2380-0123456789012345678901234567890123456789
Summary
- make node-scoped delivery unconditional: agents use REST tokens for HTTP APIs and receive realtime only through bound nodes
- keep workspace
/v1/wsobserver-only while agent SDKs mint direct node tokens and connect to/v1/node/ws - collapse direct/broker WebSocket delivery onto
ws.node.v1, withkindas transport androleas ownership/capacity semantics - route spawn/release and handler-agent actions as node
action.invokeframes; deliver action completion/denial, reactions, and receipts as nodedeliverframes - update OpenAPI, README, MCP tools, and TypeScript/Python/Rust/Swift SDK surfaces and tests for the new node-first contract
Why
Direct agent sockets and broker node sockets were separate delivery paths even though they should share the same node delivery contract. That split caused double-delivery risks, missing node context, and action lifecycle gaps once nodes became first-class. This PR makes every agent have exactly one node route, makes the workspace stream an observer capability, and keeps SDK ergonomics by normalizing node frames into the existing app callbacks.
Validation
npx turbo build && npx turbo test && npx turbo lintcargo test --manifest-path packages/sdk-rust/Cargo.tomlswift test --package-path packages/sdk-swiftnpm --workspace @relaycast/engine test -- invocationCompletion.test.ts sdk-contract.test.ts node.test.tsnpm --workspace @relaycast/types test -- fleet-wire-fixtures.test.ts sdk-openapi-sync.test.tspython3 -m pytest packages/sdk-python/tests/test_ws.pycould not run locally because this environment does not havepytestinstalled (No module named pytest)