Skip to content

Commit 3d99390

Browse files
committed
docs: describe generic terminal connector
1 parent 5b028af commit 3d99390

7 files changed

Lines changed: 31 additions & 27 deletions

File tree

‎docs/architecture.md‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ platform/
4747
+-- packages/
4848
| +-- sdk/ Browser/client SDK and shared UI/voice helpers
4949
| +-- cli/ pags CLI: init, publish, login, mcp, runner
50-
| +-- browser-runner/ Local Playwright/tmux runtime served by `pags up`
50+
| +-- browser-runner/ Local Playwright/terminal runtime served by `pags up`
5151
| +-- compliance/ Policy/check tooling
5252
+-- agents/ First-party catalog agents
5353
+-- templates/ Agent scaffolds for worker, cron, api templates
@@ -81,7 +81,7 @@ workers/mcp --------------- OAuth + tool surface, calls workers/api
8181
Local machine
8282
|
8383
v
84-
packages/browser-runner ---- Playwright browser, tmux CLIs, local files
84+
packages/browser-runner ---- Playwright browser, terminal CLIs, local files
8585
^
8686
|
8787
RelayDO WebSocket relay ---- outbound runner connection, no inbound tunnel
@@ -129,14 +129,14 @@ Current runtime-backed surfaces:
129129

130130
- Job Application Assistant: Cloudflare Workflow brain drives Playwright browser
131131
actions.
132-
- Coder: Cloudflare Workflow brain drives local CLI sessions in tmux. Multiple
132+
- Coder: Cloudflare Workflow brain drives local CLI sessions through the generic Terminal connector. Multiple
133133
machines can connect to the same Coder instance through node-scoped relay
134134
connections; see [Coder Multi-Machine Runtime](../platform-docs/coder-multi-machine.md).
135135

136136
The key architectural pattern is "brain in cloud, hands local":
137137

138138
```text
139-
Workflow brain -> callRunner() -> RelayDO -> WebSocket -> local runner -> browser/tmux
139+
Workflow brain -> callRunner() -> RelayDO -> WebSocket -> local runner -> browser/terminal
140140
```
141141

142142
## API Worker
@@ -159,7 +159,7 @@ The API worker is a Hono app. It mounts route modules for:
159159
- Instance storage: documents, files, collections, search, activity, summaries
160160
- Runtime: `/v1/relay`, runtime registration/status/task mirrors
161161
- Coding: `/v1/instances/:id/coding/...`
162-
- Connectors: `/v1/github` (GitHub App), `/v1/drive` (Google Drive), `/v1/workdrive` (Zoho WorkDrive), `/v1/email` (Gmail, apply-flow reads); registry connectors (github, http, meta, web-search, tmux, browser) are dispatched through the tool loop, not per-connector routes
162+
- Connectors: `/v1/github` (GitHub App), `/v1/drive` (Google Drive), `/v1/workdrive` (Zoho WorkDrive), `/v1/email` (Gmail, apply-flow reads); registry connectors (github, http, meta, web-search, terminal, tmux, browser) are dispatched through the tool loop, not per-connector routes
163163
- Keys: BYOK key vault and key proxy
164164
- Billing, notifications, push, dashboard, errors
165165

@@ -331,7 +331,7 @@ The browser runner provides:
331331
- Runtime task endpoints.
332332
- CAPTCHA/handoff support.
333333
- File upload support.
334-
- tmux-backed coding sessions.
334+
- terminal-backed coding sessions.
335335
- Terminal capture and action execution.
336336

337337
### Assessment
@@ -393,7 +393,7 @@ source-of-truth rule.
393393
Recommended source-of-truth rule:
394394

395395
- Durable Workflow owns long-running brain progress.
396-
- Local runner owns immediate browser/tmux execution state.
396+
- Local runner owns immediate browser/terminal execution state.
397397
- D1 `instance_runtime_tasks` is the user-visible mirror and query index.
398398
- `agent_events` is the timeline/audit stream.
399399
- Board rows are presentation and operational workflow state.
@@ -438,7 +438,8 @@ Registered connectors (`CONNECTORS`):
438438
| `http` | token (vault key) | read+write | generic HTTP/REST — call any API as config |
439439
| `web-search` | token (vault key) | read | Google Custom Search |
440440
| `meta` | token (`META_ACCESS_TOKEN`) | write | `whatsapp_send_message`, `instagram_send_dm` |
441-
| `tmux` | none (runner relay) | read+write | drive shells/CLIs on the user's machine |
441+
| `terminal` | none (runner relay) | read+write | drive tmux, kitty, or iTerm2 targets on the user's machine |
442+
| `tmux` | none (runner relay) | read+write | legacy compatibility wrapper for tmux sessions |
442443
| `browser` | none (runner relay) | read+write | experimental (`BROWSER_TOOLS_ENABLED`); `browser_navigate`/`browser_snapshot`/`browser_act` |
443444

444445
Auth is minted through the single `connectorClient(env, provider, {userId, instanceId})`
@@ -650,7 +651,7 @@ Use these rules when adding new platform features:
650651
- R2 owns blobs.
651652
- Vectorize owns semantic retrieval indexes.
652653
- Workflows own long-running brain progress.
653-
- The local runner owns local browser/tmux execution.
654+
- The local runner owns local browser/terminal execution.
654655
- MCP should call platform APIs, not reimplement platform behavior.
655656
- User-facing LLM spend must be BYOK unless the billing model explicitly
656657
changes.

‎docs/connector-manifest.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ A connector manifest is JSON (built-in ones committed as data; later, creator-su
8686
| `api-key` | user's BYOK vault (`user_api_keys`), injected into header/query per the tool | http, web-search |
8787
| `oauth2` | refresh→access exchange; refresh token envelope-encrypted; `secretRef` server-side | Slack, Google Sheets, Notion, Linear |
8888
| `app` | installation token (GitHub-App style) | github |
89-
| `none` | reached over the runner relay (machine-owned) | tmux, browser |
89+
| `none` | reached over the runner relay (machine-owned) | terminal, tmux, browser |
9090

9191
The one new capability is a **generic OAuth2 handler** driven by `auth` config — today Drive/Gmail/
9292
GitHub each hand-roll their flow. Consolidating them into one manifest-driven `authorize` +

‎platform-docs/architecture.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ platform/
1717
packages/
1818
sdk/ Browser/client SDK and shared helpers
1919
cli/ pags CLI: init, publish, login, mcp, runner
20-
browser-runner/ Local Playwright/tmux runtime served by `pags up`
20+
browser-runner/ Local Playwright/terminal runtime served by `pags up`
2121
compliance/ Policy/check tooling
2222
agents/ First-party catalog agents
2323
templates/ Agent scaffolds
@@ -50,7 +50,7 @@ workers/mcp --------------- OAuth + tool surface, calls workers/api
5050
Local machine
5151
|
5252
v
53-
packages/browser-runner ---- Playwright browser, tmux CLIs, local files
53+
packages/browser-runner ---- Playwright browser, terminal CLIs, local files
5454
^
5555
|
5656
RelayDO WebSocket relay ---- outbound runner connection, no inbound tunnel
@@ -82,7 +82,7 @@ Runtime-backed agents use `pags up`, which runs a local browser/CLI runtime from
8282
Current runtime-backed surfaces:
8383

8484
- Job Application Assistant: Cloudflare Workflow brain drives Playwright browser actions.
85-
- Coder: Cloudflare Workflow brain drives local CLI sessions in tmux. Coder sessions can route to node-scoped runners when multiple machines are connected to the same instance.
85+
- Coder: Cloudflare Workflow brain drives local CLI sessions through the generic Terminal connector. Coder sessions can route to node-scoped runners when multiple machines are connected to the same instance.
8686

8787
## Docs Plane
8888

‎platform-docs/browser-runtime.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Runtime-backed agents use `pags up`, which runs local browser and CLI capabiliti
55
The current PAGS runtime pattern is:
66

77
```text
8-
Workflow brain -> callRunner() -> RelayDO -> WebSocket -> local runner -> browser/tmux
8+
Workflow brain -> callRunner() -> RelayDO -> WebSocket -> local runner -> browser/terminal
99
```
1010

1111
The cloud-hosted workflow is the brain. The local runner is the hands. This keeps account state, audit, and orchestration in ProAgentStore while browser sessions, local files, and CLI sessions stay on the user's machine.
@@ -19,7 +19,7 @@ ProAgentStore Workflow
1919
-> RelayDO
2020
-> outbound WebSocket
2121
-> local browser runner
22-
-> Playwright browser or tmux CLI
22+
-> Playwright browser or terminal CLI
2323
```
2424

2525
The outbound WebSocket relay is the only transport. The earlier Cloudflare Tunnel / cloudflared modes were removed — there is no tunnel fallback, no `--tunnel` flag, and no public inbound server. The runner mints a short-lived, instance-scoped relay token and opens `wss://…/v1/relay/:instanceId/connect`; the relay DO is keyed per (instance, node) and hibernates when idle.
@@ -32,7 +32,7 @@ The workflow brain runs in ProAgentStore. The hands run locally.
3232
| --- | --- | --- |
3333
| Brain | Cloudflare Workflow | Plans steps, manages durable task state, checks policy, requests approval |
3434
| Relay | RelayDO WebSocket relay | Carries scoped calls between the cloud workflow and local runner |
35-
| Hands | Local `pags up` runner | Drives Playwright browser actions or tmux CLI sessions |
35+
| Hands | Local `pags up` runner | Drives Playwright browser actions or terminal CLI sessions |
3636
| Browser/session | User machine | Keeps cookies, local files, active logins, and interactive handoff state |
3737

3838
## Browser-Capable Agents
@@ -50,10 +50,10 @@ The Job Application Assistant is the reference browser-capable agent. Its Cloudf
5050

5151
## Coder Agents
5252

53-
Coder agents use the same runtime idea, but the local capability is a tmux-backed CLI session rather than a browser.
53+
Coder agents use the same runtime idea, but the local capability is a terminal-backed CLI session rather than a browser. The default backend remains tmux; the generic terminal connector can also address kitty and iTerm2 targets when those apps expose local control APIs.
5454

5555
```text
56-
Workflow brain -> RelayDO -> local runner -> tmux CLI session
56+
Workflow brain -> RelayDO -> local runner -> terminal CLI session
5757
```
5858

5959
This allows long-running coding sessions while preserving the account-level control plane and audit model.

‎platform-docs/coder-multi-machine.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Each machine runs `pags up`. ProAgentStore records the machine as a runner node,
99
- Keep a desktop and laptop connected to the same Coder instance.
1010
- Run different repo sessions on different machines at the same time.
1111
- Preserve account-level authorization, audit, and workflow state in ProAgentStore.
12-
- Keep local files, browser profiles, CLI auth, and tmux sessions on the machine where they run.
12+
- Keep local files, browser profiles, CLI auth, and terminal sessions on the machine where they run.
1313

1414
One repo still has at most one active session. That prevents two coding CLIs from fighting over the same working tree and git index.
1515

@@ -21,7 +21,7 @@ Coder session
2121
-> node-scoped RelayDO
2222
-> outbound WebSocket
2323
-> local pags up runner
24-
-> tmux CLI session
24+
-> terminal CLI session
2525
```
2626

2727
The legacy instance runtime row remains the default runtime for browser/apply behavior and older clients. Coder adds node-level runtime rows for machine-specific routing.

‎platform-docs/connectors.md‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ ProAgentStore has two connector layers, for two different jobs.
88
integration used by the apply flow to read verification emails; it is not a knowledge-ingest
99
connector.)
1010
2. **Registry connectors** (the tool framework, issues #84–#90): a declared registry of
11-
integrations an agent drives as **tools** — GitHub, HTTP/REST, Web Search, Meta, tmux, and
12-
the experimental browser. See [Registry connectors](#registry-connectors) below.
11+
integrations an agent drives as **tools** — GitHub, HTTP/REST, Web Search, Meta, Terminal,
12+
legacy tmux, and the experimental browser. See [Registry connectors](#registry-connectors)
13+
below.
1314

1415
## Registry connectors
1516

@@ -24,14 +25,16 @@ An agent gets a connector's tools only when it declares them in `capabilities.to
2425
| `http` | vault API key | read + write | `http_request` (call any REST API as configuration) |
2526
| `web-search` | vault API key | read | `web_search` (Google Custom Search) |
2627
| `meta` | platform token (`META_ACCESS_TOKEN`) | write | `whatsapp_send_message`, `instagram_send_dm` |
27-
| `tmux` | none (runner relay) | read + write | `tmux_list_sessions`, `tmux_capture_pane`, `tmux_run_command` (write) |
28+
| `terminal` | none (runner relay) | read + write | `terminal_list_targets`, `terminal_capture`, `terminal_run_command` (write), `terminal_send_keys` (write) |
29+
| `tmux` | none (runner relay) | read + write | Legacy compatibility: `tmux_list_sessions`, `tmux_capture_pane`, `tmux_run_command` (write) |
2830
| `browser` | none (runner relay) | read + write | `browser_snapshot`, `browser_navigate` (write), `browser_act` (write) — experimental |
2931

3032
**Auth** is minted through one path — `connectorClient(env, provider, {userId, instanceId})`:
3133
a GitHub-App installation token, an OAuth refresh→access exchange, a key from the user's BYOK
32-
vault (`user_api_keys`), or none for local relay connectors (tmux/browser reach the user's
33-
machine over the WebSocket relay — machine ownership is already enforced by the relay-token
34-
handshake).
34+
vault (`user_api_keys`), or none for local relay connectors (terminal/tmux/browser reach the
35+
user's machine over the WebSocket relay — machine ownership is already enforced by the relay-token
36+
handshake). The generic Terminal connector targets `tmux:<session>`, `kitty:<window-id>`, or
37+
`iterm2:<window>:<tab>:<session>`.
3538

3639
**Write-consent gating (#90).** Every `scope:"write"` connector tool is refused unless the
3740
instance has explicit write-consent for that connector (`instance_connector_consent`, migration

‎platform-docs/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Creators publish agent templates. Users subscribe to private agent instances. Ea
66

77
## Start Here
88

9-
- [Connectors](connectors.md): two layers — *ingest* connectors (Google Drive, Google Docs, Zoho WorkDrive) imported into knowledge via per-folder grants, and *registry* connectors an agent drives as tools (GitHub, HTTP/REST, Web Search, Meta, tmux, and the experimental browser), with per-instance write-consent gating.
9+
- [Connectors](connectors.md): two layers — *ingest* connectors (Google Drive, Google Docs, Zoho WorkDrive) imported into knowledge via per-folder grants, and *registry* connectors an agent drives as tools (GitHub, HTTP/REST, Web Search, Meta, Terminal, legacy tmux, and the experimental browser), with per-instance write-consent gating.
1010
- [Triggers](triggers.md): configure webhooks and cron schedules for private agent instances.
1111
- [MCP](mcp.md): connect Codex, Claude Code, Cursor, and other MCP clients to the official ProAgentStore MCP server.
1212
- [Browser Runtime](browser-runtime.md): run local browser and CLI capabilities with `pags up`.

0 commit comments

Comments
 (0)