Files
tai/research/cap-protocol/acp-terminals.md
T
retoor cc1c130b51 CAP protocol both directions: agent speak plus orchestrator drivers (1.39.0)
- Agent side: --cap-manifest plus --cap-speak stream-json binding with
  transcript-diff frames, diff/transcript artifacts, session config
- Orchestrator: PTY driver (settle heuristics on PtyProc/TuiVtScreen),
  stream-json, ACP-stdio (permission/elicit/fs/terminal serving) and
  A2A drivers (dual draft/current spelling, SSE mapping)
- Sessions, fleets: worktrees, master plans, mediated routing,
  budget refusal, audit log, research auto-answerer, --cap CLI
- cap.md contract with drift tests; research/cap-protocol archive
- Suites 1119 + 16 green
2026-10-18 13:17:35 +02:00

49 lines
2.1 KiB
Markdown

# ACP terminal methods
## Metadata
| Field | Value |
|---|---|
| Institute | Molodetz Institute — Research & Retrieval Division |
| Subject | cap-protocol |
| Document type | Source Dossier |
| Tier | 1 |
| Source title | ACP Terminals |
| Source URL | https://agentclientprotocol.com/protocol/v1/terminals.md |
| Source type | specification |
| Source date (published) | Unknown, not stated (living docs) |
| Date researched | 2026-10-18 |
| Researched by | tai (agent), model: Muse Spark, on behalf of retoor |
| Research method | direct page fetch, read in full (284 lines) |
| Confidence | Medium |
| Status | Active |
## Summary
Client-hosted terminals: capability-gated in `initialize`, then `terminal/create` (command/args/env-list/cwd/outputByteLimit, truncation at char boundary), `terminal/output` (full output plus truncated flag plus exitStatus when exited, no offset param), `terminal/wait_for_exit`, `terminal/kill` (terminal stays valid), `terminal/release` (kills plus invalidates the id), mirroring the coding profile's terminal methods with `wait` vs `wait_for_exit` the only name difference.
## Key findings
- Near-perfect method correspondence with `cap.terminal.*` makes the ACP bridge for terminals a rename-only adapter.
- Capability gating in initialize matches CAP's `terminal.enabled` advertisement; a disabled terminal is a refused capability, not an error path.
- `session/update` notifications interleave with terminal management (per the method list), so output streaming shares the turn channel.
## Pros / strengths
- The 1:1 mapping de-risks the terminal half of the ACP bridge to near-zero design work.
## Cons / limitations / caveats
- No output paging: `terminal/output` returns the whole retained buffer every call, so tai must set outputByteLimit-aware retention itself.
- Buffer-retention semantics differ from CAP's 60s rule: release invalidates the ACP terminal id immediately.
## Relevance to tai
Terminal bridge is rename-only; full param shapes queued for Phase 5 reading.
## Changelog
| Date | Change |
|---|---|
| 2026-10-18 | Initial dossier created. |