The DP Code server exposes a single WebSocket endpoint that powers all real-time communication between clients and the server. The protocol is a JSON-RPC-like design built on top of Effect RPC, carrying two distinct interaction patterns: request/response calls and streaming subscriptions. All messages are JSON.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Emanuele-web04/dpcode/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
server.welcome push event containing the server’s working directory, home directory, project name, and optional bootstrap identifiers.
Authentication
Authentication is optional and depends on whether the server was started with--auth-token.
| Server mode | How to authenticate |
|---|---|
| No auth token configured | Connect without credentials — all connections are accepted. |
| Auth token configured | Pass the auth token as ?token=<auth-token> in the connection URL. |
<auth-token> is the same token you set with --auth-token (or T3CODE_AUTH_TOKEN) when starting the server. If the token is missing or does not match, the WebSocket handshake is rejected before the connection opens.
For session-based auth flows (cookie or Bearer), the server also accepts a short-lived WebSocket token obtained from POST /api/auth/ws-token via the ?wsToken=<ws-token> query parameter.
Message format
Client → server requests
Every request carries a uniqueid and a body. The body contains a _tag field that selects the RPC method, plus the method’s input fields.
Server → client responses
Responses echo the sameid. Exactly one of result or error will be present.
Server → client push messages
The server proactively pushes events on named channels. Push messages carry a monotonically increasingsequence number that clients can use to detect gaps and replay missed events.
Error type
All RPC errors use theWsRpcError structure:
Human-readable description of what went wrong.
Optional root cause, present when the failure originated from an underlying system error.
Push channels
These channels emit events without an explicit subscription call. Clients receive them automatically for the lifetime of the connection.| Channel | Description |
|---|---|
server.welcome | Emitted once on connect with server identity and bootstrap hints. |
server.maintenanceUpdated | Server lifecycle and maintenance task updates (e.g. thread retention). |
server.configUpdated | Provider statuses and config issues changed. |
server.providerStatusesUpdated | Provider health statuses refreshed. |
server.settingsUpdated | Server settings changed. |
git.actionProgress | Real-time progress events for stacked git actions (commit/push/PR). |
terminal.event | Terminal session I/O and lifecycle events. |
orchestration.domainEvent | Orchestration domain events (project/thread state changes). |
orchestration.shellEvent | Shell-only project/thread list updates. |
orchestration.threadEvent | Detailed events for a subscribed thread. |
Method groups
The full set of RPC methods is organized into four groups:Orchestration
Manage projects, threads, turns, subscriptions, and diffs. The core API for driving AI coding sessions.
Git
Status, branches, worktrees, stash, pull requests, and streaming commit/push/PR workflows.
Terminal
Open, write to, resize, clear, restart, and close terminal sessions inside the server.
Server
Configuration, settings, provider management, diagnostics, voice transcription, and keybindings.