mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-18 13:04:05 +00:00
acp spec
This commit is contained in:
parent
a33b1323ff
commit
2ba630c180
264 changed files with 18559 additions and 51021 deletions
|
|
@ -157,6 +157,41 @@ The server can send JSON-RPC requests (with `id`) for approvals:
|
|||
|
||||
These require JSON-RPC responses with a decision payload.
|
||||
|
||||
## App Server WebSocket Transport (Experimental)
|
||||
|
||||
Codex app-server also supports an experimental WebSocket transport:
|
||||
|
||||
```bash
|
||||
codex app-server --listen ws://127.0.0.1:4500
|
||||
```
|
||||
|
||||
### Transport constraints
|
||||
|
||||
- Listen URL must be `ws://IP:PORT` (not `localhost`, not `http://...`)
|
||||
- One JSON-RPC message per WebSocket text frame
|
||||
- Incoming: text frame JSON is parsed as a JSON-RPC message
|
||||
- Outgoing: JSON-RPC messages are serialized and sent as text frames
|
||||
- Ping/Pong is handled; binary frames are ignored
|
||||
|
||||
### Connection lifecycle
|
||||
|
||||
- Each accepted socket becomes a distinct connection with its own session state
|
||||
- Every connection must send `initialize` first
|
||||
- Sending non-`initialize` requests before init returns `"Not initialized"`
|
||||
- Sending `initialize` twice on the same connection returns `"Already initialized"`
|
||||
- Broadcast notifications are only sent to initialized connections
|
||||
|
||||
### Operational notes
|
||||
|
||||
- WebSocket mode is currently marked experimental/unsupported upstream
|
||||
- It is a raw WS server (no built-in TLS/auth); keep it on loopback or place it behind your own secure proxy/tunnel
|
||||
|
||||
### Upstream implementation references (openai/codex `main`, commit `03adb5db`)
|
||||
|
||||
- `codex-rs/app-server/src/transport.rs`
|
||||
- `codex-rs/app-server/src/message_processor.rs`
|
||||
- `codex-rs/app-server/README.md`
|
||||
|
||||
## Response Schema
|
||||
|
||||
```typescript
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue