Interactive terminal session manager with tmux substrate, supporting local, Docker, and sandbox execution environments. Exposes a unified tool surface for agent-driven terminal control with human takeover capability.
termbridge demonstrates strong naming conventions (verb_noun pattern: open_session, send_text, read_screen) and comprehensive parameter schemas with type definitions and descriptions. All 13 tools have descriptions ranging 50 - 250 chars, meeting the 10 - 1024 baseline. Parameters are well-typed (string, enum, number, boolean, array) with clear intent. However, output schemas are not explicitly documented in the source, tool descriptions state what they return (e.g., 'returns { ok:false, error:"human_driving" }') but formal JSON Schema output definitions are absent. Error handling is present (e.g., 'human_driving' error in send_text) but lacks recovery guidance. No tool annotations (readOnlyHint, destructiveHint, idempotentHint) are visible. Risk labels (READ_ONLY, WRITE, DESTRUCTIVE) are metadata but not MCP-standard annotations.
Close and deregister a session, tearing down its tmux substrate.
List all registered sessions and their state.
Open a new interactive terminal session (tmux substrate) and return its id. env selects the execution backend (local, docker, or sandbox). Set autoApprove:true to have termbridge auto-answer the session's routine permission prompts in-session (so a driving agent that polls only occasionally never leaves Claude stuck); login is never auto-answered and a human takeover pauses it. env:'sandbox' requires a configured sandboxProvider on the server (it throws sandbox_not_configured if none is set).
Collect newly-recognized interactive events (prompts, takeovers) since sinceOffset.
Read bytes appended to the rolling output buffer since sinceOffset; returns { data, nextOffset }.
Output schemas not formally documented. Tool descriptions mention return types (e.g., '{ ok:false, error:"human_driving" }') but no JSON Schema definitions are visible in source. LLMs cannot reliably parse unstructured return descriptions.
Tool annotations missing. Risk labels (READ_ONLY, WRITE, DESTRUCTIVE) are metadata but not MCP-standard readOnlyHint/destructiveHint/idempotentHint annotations. Agents cannot infer safety/idempotency from tool definitions alone.
Error recovery guidance incomplete. send_text returns 'human_driving' error but does not guide the agent on next steps (e.g., 'Wait for human to finish, then retry'). Other tools lack explicit error classification (retryable vs. fatal).
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | B | 71 | 2026-07-28+ | v2 |
One-shot progress poll for a driving loop: returns { delta, nextOffset, events, phase, awaitingInput, idle, lastActivityAt }. delta/nextOffset are the new bytes since sinceOffset (like read_new_output); events are the recognized events (like read_events). `phase` is the claude-activity phase of the CURRENT screen (tool|editing|thinking|awaiting_input|idle|null). `idle` is true only when there is no new output AND no active phase — so a pre-painted permission prompt or a running spinner correctly reads as NOT idle. `awaitingInput` flags a blocking approval. For authoritative round-complete prefer wait_for_idle; use this to stream.
Capture the current visible pane of the session (optionally including scrollback lines).
Resize the session's tmux window to cols x rows.
Send a control/named key (e.g. 'C-c', 'Up', 'Enter') to the session.
Type text into the session as the agent (optionally pressing Enter). Returns the SendResult; { ok:false, error:'human_driving' } when a human is driving.
Block until a recognizer event (optionally of given kinds) appears, or timeout.
Resolve once the session has been quiet for quietMs, or report not-idle at timeoutMs.
Poll the captured screen until pattern matches or timeoutMs elapses; returns { matched, screen }.
Parameter constraints not fully specified. 'key' parameter in send_control accepts 'C-c', 'Up', 'Enter' but no enum or pattern constraint is visible. LLMs may hallucinate invalid key names.
Pagination not implemented for list_sessions. If many sessions exist, returning all at once risks context window exhaustion. No limit or offset parameters visible.