crates/protocol. If a method, event, or payload is not exported there, treat it as an implementation detail.
Transport
The default gateway listener is:Authentication
The WebSocket handshake must include a bearer token:401.
The superuser JWT signing material is stored in the gateway keystore. Rotate it with pioneer secrets rotate-jwt-token superuser; existing superuser bearer tokens become invalid and must be reissued.
Request Envelope
Every request uses JSON-RPC2.0. Request ids are strings with exactly 21 characters.
| Code | Meaning |
|---|---|
-32700 | Parse error |
-32600 | Invalid request |
-32601 | Method not found |
-32602 | Invalid params |
error.data with a machine-readable code and details.
Notifications
Notifications are server-to-client JSON-RPC messages without an id. They are how clients observe long-running turns, tool output, task events, MCP status, and skill catalog changes.turn/start returns after the gateway accepts the turn; the assistant response arrives through turn/* and item/* notifications.
Naming Conventions
Method names use slash-separated groups:Schemas
JSON Schemas are generated fromcrates/protocol and written to /schemas. The schema file names use snake_case type names, for example:
/schemas/turn_start_params.json/schemas/thread_tree_response.json/schemas/mcp_install_params.json/schemas/task_create_params.json
Reference Sections
Workspace & Threads
Workspace listing, creation, selection, renaming, thread creation, folders, history, and subscription cleanup.
AGENTS.md
Thread-tree instruction file read, save, archive, resolve, and notification methods.
Turns
Turn submission, cancellation, item events, timeline composition, and streaming notifications.
Providers
Provider listing, model listing, and API key management.
Settings
Gateway-scoped general and memory settings read/update methods.
Skills
Skill upload, install, update, uninstall, policy, health, and catalog notifications.
Memory
Durable memory search, remember, forget, candidate review methods, and memory notifications.
MCP Servers
MCP install config, policy, restart, uninstall, details, runtime status, and catalog notifications.
Tasks
Durable task creation, scheduling, subagents, task trees, waiting, deliveries, and task events.
Artifacts
Workspace file upload, listing, preview reads, downloads, bindings, and artifact notifications.