|
1 | 1 | # devo-protocol |
2 | 2 |
|
3 | | -This crate keep the types utilized between client and server. |
| 3 | +This crate defines the protocol types shared by Devo clients and the Devo |
| 4 | +server. |
| 5 | + |
| 6 | +## ACP and Devo extension methods |
| 7 | + |
| 8 | +Devo uses ACP JSON-RPC methods for the portable protocol surface. The current |
| 9 | +client-to-server ACP methods are: |
| 10 | + |
| 11 | +- `initialize`: negotiate protocol version, client capabilities, and server |
| 12 | + metadata. |
| 13 | +- `session/new`: create a new session for a working directory. |
| 14 | +- `session/list`: list persisted sessions. |
| 15 | +- `session/resume`: load a persisted session. |
| 16 | +- `session/prompt`: submit a prompt to an active session. |
| 17 | +- `session/cancel`: cancel the active session turn. |
| 18 | + |
| 19 | +The current server-to-client ACP notification method is: |
| 20 | + |
| 21 | +- `session/update`: stream session lifecycle, item, plan, usage, and turn-status |
| 22 | + updates to subscribed clients. The payload is an `AcpSessionNotification` |
| 23 | + whose `update.sessionUpdate` discriminator can include: |
| 24 | + - `session_info_update`: session title and update timestamp changes. |
| 25 | + - `user_message_chunk`: streamed user message content. |
| 26 | + - `agent_message_chunk`: streamed assistant message content. |
| 27 | + - `agent_thought_chunk`: streamed assistant reasoning or reasoning-summary |
| 28 | + content. |
| 29 | + - `tool_call`: initial tool or command-execution call metadata, including |
| 30 | + tool call id, title, kind, status, raw input, content, and locations. |
| 31 | + - `tool_call_update`: status, output, content, terminal, diff, or location |
| 32 | + updates for an existing tool call. |
| 33 | + - `plan`: current plan entries and their statuses. |
| 34 | + - `available_commands_update`: slash commands currently available to the |
| 35 | + client, including command descriptions and optional input hints. |
| 36 | + - `current_mode_update`: the current ACP session mode id. |
| 37 | + - `config_option_update`: configurable ACP session options currently exposed |
| 38 | + by the server. |
| 39 | + - `usage_update`: context-window usage and optional cost information. |
| 40 | + |
| 41 | +The current server-to-client ACP request methods are: |
| 42 | + |
| 43 | +- `session/request_permission`: ask the client to approve or reject a tool or |
| 44 | + runtime action. |
| 45 | +- `fs/read_text_file`: ask the client to read an absolute text-file path. |
| 46 | +- `fs/write_text_file`: ask the client to write text to an absolute file path. |
| 47 | +- `terminal/create`: ask the client to create a terminal-backed process. |
| 48 | +- `terminal/output`: ask the client for a terminal output snapshot. |
| 49 | +- `terminal/wait_for_exit`: ask the client to wait for a terminal process to |
| 50 | + exit. |
| 51 | +- `terminal/kill`: ask the client to kill a terminal process. |
| 52 | +- `terminal/release`: ask the client to release a terminal process and clean up |
| 53 | + associated state. |
| 54 | + |
| 55 | +Devo-specific client-to-server APIs are sent with the `_devo/` method prefix. |
| 56 | +The prefix is applied by the client transport, then removed by the server before |
| 57 | +dispatching to `ClientMethod`. These methods remain non-standard ACP extension |
| 58 | +points because they expose Devo-specific TUI, runtime, or local workflow |
| 59 | +behavior that is not represented by the portable ACP method set. |
| 60 | + |
| 61 | +### Session extensions |
| 62 | + |
| 63 | +- `_devo/session/title/update`: rename a session from the client. |
| 64 | +- `_devo/session/metadata/update`: update session metadata such as the active |
| 65 | + model or reasoning-effort selection. |
| 66 | +- `_devo/session/permissions/update`: update the current permission preset. |
| 67 | +- `_devo/session/compact`: proactively compact a session context. |
| 68 | +- `_devo/session/fork`: fork a new session from an existing turn. |
| 69 | +- `_devo/session/rollback`: roll back a session to a selected user turn. |
| 70 | + |
| 71 | +### Turn extensions |
| 72 | + |
| 73 | +- `_devo/turn/start`: start a Devo turn with the full Devo turn request shape. |
| 74 | + If an older server does not support it, the client falls back to ACP |
| 75 | + `session/prompt`. |
| 76 | +- `_devo/turn/shell_command`: run a user shell command through the server |
| 77 | + runtime. |
| 78 | +- `_devo/turn/interrupt`: interrupt the active Devo turn. |
| 79 | +- `_devo/turn/steer`: send steering input into a running turn. |
| 80 | + |
| 81 | +### Provider and model extensions |
| 82 | + |
| 83 | +- `_devo/provider/list`: list configured provider vendors. |
| 84 | +- `_devo/provider/upsert`: add or update a provider vendor and optional model |
| 85 | + binding. |
| 86 | +- `_devo/provider/validate`: validate provider credentials and model settings. |
| 87 | +- `_devo/model/catalog`: read the effective model catalog. |
| 88 | +- `_devo/model/saved`: notify the server that model configuration was saved. |
| 89 | + |
| 90 | +### Skills extensions |
| 91 | + |
| 92 | +- `_devo/skills/list`: list available skills for a working directory. |
| 93 | +- `_devo/skills/changed`: notify the server that skill files changed. |
| 94 | +- `_devo/skills/set_enabled`: persistently enable or disable a skill. |
| 95 | + |
| 96 | +### Command execution extensions |
| 97 | + |
| 98 | +- `_devo/command/exec`: launch a command execution request. |
| 99 | +- `_devo/command/exec/write`: write input to a running command. |
| 100 | +- `_devo/command/exec/resize`: resize a running command terminal. |
| 101 | +- `_devo/command/exec/terminate`: terminate a running command. |
| 102 | + |
| 103 | +### Goal extensions |
| 104 | + |
| 105 | +- `_devo/goal/create`: create a goal for the active thread. |
| 106 | +- `_devo/goal/set`: update the current goal objective. |
| 107 | +- `_devo/goal/status`: read the current goal state. |
| 108 | +- `_devo/goal/pause`: pause goal continuation. |
| 109 | +- `_devo/goal/resume`: resume goal continuation. |
| 110 | +- `_devo/goal/complete`: mark the goal complete. |
| 111 | +- `_devo/goal/clear`: clear the current goal. |
| 112 | + |
| 113 | +### Agent extensions |
| 114 | + |
| 115 | +- `_devo/agent/list`: list subagents associated with a session. |
| 116 | +- `_devo/agent/spawn`: spawn a subagent. |
| 117 | +- `_devo/agent/close`: close a subagent. |
| 118 | + |
| 119 | +### Reference search and user-input extensions |
| 120 | + |
| 121 | +- `_devo/search/start`: start a server-backed composer reference search. |
| 122 | +- `_devo/search/update`: update the active reference-search query. |
| 123 | +- `_devo/search/cancel`: cancel the active reference search. |
| 124 | +- `_devo/request_user_input/respond`: answer a pending structured user-input |
| 125 | + request. |
0 commit comments