# Protobuf reference

Every table on this page is generated directly from `proto/sessionpipe/v1/*.proto` by `tools/doors` and checked in CI (`npm run schemas -- --check`), so it cannot drift from the implementation.

## Event vocabulary

<!-- GENERATED from proto/sessionpipe/v1/*.proto by tools/doors; do not edit. Run `npm run schemas`. -->

| Event | Tier | Fields | Description |
| --- | ---: | --- | --- |
| `session.started` | 0 | `source` | `session.started`: a session began. |
| `session.heartbeat` | 0 | _none_ | `session.heartbeat`: the session is still there. |
| `session.ended` | 0 | `reason` | `session.ended`: the session is over. |
| `session.backfill` | 0 | `started_at`, `last_at`, `turns` | `session.backfill`: a session from before the hooks were installed, read from the harness's files. |
| `session.forgotten` | 0 | _none_ | `session.forgotten`: the person asked every receiver to forget the session. |
| `turn.started` | 0 | `turn_id`, `submitted_by`, `injected`, `prompt_chars` (T1) | `turn.started`: a prompt was submitted. |
| `turn.ended` | 0 | `turn_id`, `reason`, `ms`, `background`, `error` (T1) | `turn.ended`: the model stopped, was interrupted, or failed. |
| `turn.transcript` | 2 | `turn`, `user`, `assistant`, `at`, `injected` | `turn.transcript`: what the person asked and what the assistant answered (tier 2). |
| `turn.progress` | 2 | `turn`, `user`, `assistant`, `at`, `injected` | `turn.progress`: the turn still running: its prompt and what the assistant has said so far. |
| `tool.started` | 1 | `tool`, `call_id`, `turn_id`, `agent_id`, `input` (T3) | `tool.started`: a tool call began (tier 1; its input at tier 3). |
| `tool.ended` | 1 | `tool`, `call_id`, `turn_id`, `agent_id`, `ms`, `ok`, `error`, `input` (T3), `output` (T3) | `tool.ended`: a tool call finished (tier 1; its input and output at tier 3). |
| `files.changed` | 1 | `paths` | `files.changed`: files a turn wrote. |
| `attention.needed` | 0 | `attention_id`, `kind`, `tool` (T1), `message` (T1), `agent_id` (T1) | `attention.needed`: the session waits on the person. |
| `attention.cleared` | 0 | `attention_id`, `how` | `attention.cleared`: the session no longer waits. |
| `subagent.started` | 1 | `agent_id`, `agent_type` | `subagent.started`: the session started a subagent. |
| `subagent.ended` | 1 | `agent_id`, `agent_type`, `background` | `subagent.ended`: a subagent finished. |
| `context.compacted` | 1 | `trigger` | `context.compacted`: the harness compacted the context. |
| `limits.observed` | 1 | `windows`, `plan`, `account_id` | `limits.observed`: the account's usage limits as the harness last reported them: one per window. |
| `delegation.started` | 0 | `ask_id`, `via`, `harness`, `to`, `text` (T1) | `delegation.started`: the daemon on this machine took an ask from this session (CONTROL.md §13), or a command with `reply_to` naming it (§6). |
| `delegation.ended` | 0 | `ask_id`, `to`, `ok`, `ms`, `error`, `relayed`, `reply` (T2) | `delegation.ended`: the asked agent's turn ended, or the ask failed before one. |
| `native` | 3 | _unfiltered (whole payload)_ | `native`: a harness's raw hook line, tier 3 only. |

## Privacy tiers

<!-- GENERATED from proto/sessionpipe/v1/*.proto by tools/doors; do not edit. Run `npm run schemas`. -->

| Tier | Added event types and fields |
| ---: | --- |
| 0 | `session.started`, `session.heartbeat`, `session.ended`, `session.backfill`, `session.forgotten`, `turn.started`, `turn.ended`, `attention.needed`, `attention.cleared`, `delegation.started`, `delegation.ended` |
| 1 | `turn.started` (+`prompt_chars`), `turn.ended` (+`error`), `tool.started`, `tool.ended`, `files.changed`, `attention.needed` (+`tool`, `message`, `agent_id`), `subagent.started`, `subagent.ended`, `context.compacted`, `limits.observed`, `delegation.started` (+`text`) |
| 2 | `turn.transcript`, `turn.progress`, `delegation.ended` (+`reply`) |
| 3 | `tool.started` (+`input`), `tool.ended` (+`input`, `output`), `native` |

## Harness registry

<!-- GENERATED from proto/sessionpipe/v1/*.proto by tools/doors; do not edit. Run `npm run schemas`. -->

| Name | Harness | Observation | Config | Description |
| --- | --- | --- | --- | --- |
| `claude-code` | Claude Code | hooks + jsonl | `~/.claude/settings.json` | Claude Code. |
| `codex` | Codex | hooks + jsonl | `~/.codex/hooks.json` | Codex CLI and Codex Desktop. |
| `gemini-cli` | Gemini CLI | hooks + json | `~/.gemini/settings.json` | Gemini CLI. |
| `antigravity` | Antigravity | hooks + sqlite | `~/.gemini/antigravity/hooks.json` | Antigravity. |
| `devin` | Devin CLI | hooks + sqlite | `~/.config/devin/hooks.json` | Devin CLI. |
| `cursor` | Grok Build Agents Window (formerly Cursor) | hooks | `~/.cursor/hooks.json` | Grok Build Agents Window (formerly Cursor). |
| `copilot-cli` | Copilot CLI | hooks | `~/.copilot/hooks/sessionpipe.json` | Copilot CLI. |
| `droid` | Droid | planned | `~/.factory/settings.json` | Droid. |
| `kiro` | Kiro | planned | `~/.kiro/hooks.json` | Kiro. |
| `opencode` | OpenCode | plugin + sqlite | `~/.config/opencode/plugins/sessionpipe.js` | OpenCode. |
| `grok-build` | Grok Build | hooks + jsonl | `~/.grok/settings.json` | Grok Build. |
| `autopilot` | Autopilot | hooks | `~/.autopilot/hooks.json` | Autopilot (Directionally Local). |

## CLI & MCP doors

<!-- GENERATED from proto/sessionpipe/v1/*.proto by tools/doors; do not edit. Run `npm run schemas`. -->

### CLI commands

| Command | Group | Doors | `--json` | Summary |
| --- | --- | --- | :---: | --- |
| `sessionpipe connect` | Set up | cli |  | Pair with a receiver, install hooks, configure a sink, and backfill recent sessions in one step. |
| `sessionpipe install` | Set up | cli |  | Install sessionpipe hooks for detected or named harnesses without configuring a sink. |
| `sessionpipe uninstall` | Set up | cli |  | Remove sessionpipe hook entries from harness configurations, leaving other settings untouched. |
| `sessionpipe status` | Check | cli, mcp | yes | Show a concise summary of installed harnesses, sinks, outbox, control daemon, and updates. |
| `sessionpipe doctor` | Check | cli, mcp | yes | Run full machine diagnostics across hooks, sinks, secrets, control daemon, and installed copies. |
| `sessionpipe top` | Check | cli | yes | Show a live local terminal dashboard of coding-agent sessions across every harness. |
| `sessionpipe tail` | Check | cli, mcp | yes | Stream or inspect local events from the machine's outbox as they happen. |
| `sessionpipe backfill` | Where events go | cli |  | Queue recent historical sessions from installed harnesses into the local outbox. |
| `sessionpipe forget` | Where events go | cli |  | Delete one session from the local outbox and send a delete notice to every sink. |
| `sessionpipe replay` | Where events go | cli |  | Drain or replay queued events from the local outbox to configured sinks. |
| `sessionpipe update` | Set up | cli |  | Bring this whole computer up to date now, or toggle the background service's daily update. |
| `sessionpipe update off` | Set up | cli |  | Disable automatic daily updates in the background control daemon. |
| `sessionpipe update on` | Set up | cli |  | Enable automatic daily updates in the background control daemon. |
| `sessionpipe reinstall` | Set up | cli |  | Repair installation by replacing every local copy with one clean latest release. |
| `sessionpipe titles` | Where events go | cli |  | Show or manage remote Claude Code session title fetching. |
| `sessionpipe titles on` | Where events go | cli |  | Enable remote session title fetching and refresh recent sessions. |
| `sessionpipe titles off` | Where events go | cli |  | Disable remote session title fetching. |
| `sessionpipe titles refresh` | Where events go | cli |  | Refresh remote session titles for recent Claude Code sessions. |
| `sessionpipe mcp` | Agents asking agents | cli |  | Serve sessionpipe's MCP-enabled tools over stdio using JSON-RPC 2.0. |
| `sessionpipe version` |  | cli, mcp |  | Print the installed sessionpipe version. |
| `sessionpipe sink add` | Where events go | cli |  | Add an HTTP receiver, OTLP collector, file, or stdout sink to config.json. |
| `sessionpipe sink list` | Where events go | cli, mcp | yes | List every configured event sink and its privacy tier. |
| `sessionpipe sink remove` | Where events go | cli |  | Remove a named sink from config.json and delete its stored credentials. |
| `sessionpipe sink test` | Where events go | cli |  | Send one test heartbeat event to a named sink and report whether it succeeded. |
| `sessionpipe secrets` | Where events go | cli |  | Show which secret store currently holds each sink's credentials. |
| `sessionpipe secrets move` | Where events go | cli |  | Move stored sink tokens and signing secrets to keychain, secret-service, or config.json. |
| `sessionpipe control pair` | Messages from your devices | cli |  | Pair with a receiver at this terminal and enroll a trusted device key. |
| `sessionpipe control mode` | Messages from your devices | cli |  | Set the machine's control permission mode (`auto`, `safe`, or `inherit`). |
| `sessionpipe control status` | Messages from your devices | cli, mcp, socket | yes | Show the background control daemon's live status, paired receivers, and held sessions. |
| `sessionpipe control keys` | Messages from your devices | cli |  | List the device public keys trusted by this machine. |
| `sessionpipe control keys remove` | Messages from your devices | cli |  | Revoke a trusted device key by its identifier. |
| `sessionpipe control off` | Messages from your devices | cli |  | Stop taking remote control messages from one or all paired receivers. |
| `sessionpipe control run` | Messages from your devices | cli |  | Run the control daemon in the foreground (used by launchd, systemd, or manual runs). |
| `sessionpipe pool` | Several Claude accounts | cli, mcp, socket | yes | Show the account pool in priority order and the quota room each account has left. |
| `sessionpipe pool on` | Several Claude accounts | cli, socket |  | Point every Claude Code on this machine at the pool and install the daemon service if missing. |
| `sessionpipe pool off` | Several Claude accounts | cli, socket |  | Remove pool routing from Claude Code settings while keeping configured accounts intact. |
| `sessionpipe pool add` | Several Claude accounts | cli, socket |  | Add an account to the pool by importing local logins or completing a browser login. |
| `sessionpipe pool remove` | Several Claude accounts | cli, socket |  | Remove an account from the pool by id or email. |
| `sessionpipe pool enable` | Several Claude accounts | cli, socket |  | Enable a disabled pool account so requests can route to it. |
| `sessionpipe pool disable` | Several Claude accounts | cli, socket |  | Disable a pool account without removing its credentials. |
| `sessionpipe pool order` | Several Claude accounts | cli, socket |  | Set the complete priority order for accounts in the pool. |
| `sessionpipe pool refresh` | Several Claude accounts | cli, socket |  | Read fresh quota usage from the vendor for one or all pool accounts now. |
| `sessionpipe ask` | Agents asking agents | cli, mcp, socket | yes | Hand a task to another coding agent on this machine and return its answer. |
| `sessionpipe ask on` | Agents asking agents | cli |  | Allow local coding sessions to ask another agent on this machine. |
| `sessionpipe ask off` | Agents asking agents | cli |  | Disallow local coding sessions from asking another agent on this machine. |
| `sessionpipe ask status` | Agents asking agents | cli, mcp | yes | Show whether agent-to-agent `ask` is enabled, which agents are reachable, and allowed folders. |
| `sessionpipe ask setup` | Agents asking agents | cli |  | Write or remove agent instructions for `sessionpipe ask` in ~/.claude/CLAUDE.md and ~/.codex/AGENTS.md. |
| `sessionpipe wait` | Agents asking agents | cli, socket |  | Block until a remote message arrives for this session, then print it to stdout. |
| `sessionpipe channel` | Agents asking agents | cli, socket |  | Run the Claude Code channel bridge (`--channels`) pushing incoming messages into a live session. |

### MCP tools (`sessionpipe mcp`)

| Tool | Method | Read-only | Summary |
| --- | --- | :---: | --- |
| `status` | `ClientService.Status` | yes | Show a concise summary of installed harnesses, sinks, outbox, control daemon, and updates. |
| `doctor` | `ClientService.Doctor` | yes | Run full machine diagnostics across hooks, sinks, secrets, control daemon, and installed copies. |
| `tail` | `ClientService.Tail` | yes | Stream or inspect local events from the machine's outbox as they happen. |
| `version` | `ClientService.Version` | yes | Print the installed sessionpipe version. |
| `sink_list` | `SinkService.List` | yes | List every configured event sink and its privacy tier. |
| `control_status` | `ControlService.Status` | yes | Show the background control daemon's live status, paired receivers, and held sessions. |
| `pool` | `PoolService.Status` | yes | Show the account pool in priority order and the quota room each account has left. |
| `ask` | `AgentService.Ask` | no | Hand a task to another coding agent on this machine and return its answer. |
| `ask_status` | `AgentService.AskStatus` | yes | Show whether agent-to-agent `ask` is enabled, which agents are reachable, and allowed folders. |
