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.
Feature-specific errors may include
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.
CLI Runtime
Codex CLI runtime listing, model catalogs, thread bindings, approvals, login, review, compaction, fork, and turn steering.
Settings
Gateway-scoped general, memory, thread-context, CLI runtime, and remote-access 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, artifact notifications, and model-facing artifact read behavior.