tabminal 2.0.15 → 2.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ACP_PLANING.md +249 -162
- package/AGENTS.md +356 -205
- package/README.md +2 -2
- package/package.json +1 -1
package/ACP_PLANING.md
CHANGED
|
@@ -1,184 +1,271 @@
|
|
|
1
|
-
# ACP
|
|
1
|
+
# ACP Planning
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Last updated: 2026-03-27
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
The web UI adds an Agent panel integrated into the existing workspace/editor
|
|
8
|
-
area and supports multiple concurrent agent tabs per host.
|
|
5
|
+
This file is no longer a pure implementation plan.
|
|
6
|
+
It is now the ACP status ledger for Tabminal:
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
- what shipped
|
|
9
|
+
- what is stable
|
|
10
|
+
- what remains open
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
practical.
|
|
15
|
-
- Keep lifecycle bounded: lazy start, reusable while tabs are open, and
|
|
16
|
-
cleaned up after inactivity.
|
|
17
|
-
- Host isolation remains strict: each agent runtime and tab belongs to one
|
|
18
|
-
host.
|
|
19
|
-
- MVP should be usable before advanced ACP capabilities are added.
|
|
12
|
+
Use `/Users/leask/Documents/Tabminal/AGENTS.md` as the broader engineering
|
|
13
|
+
handoff document. Use this file as the ACP-specific roadmap/status snapshot.
|
|
20
14
|
|
|
21
|
-
##
|
|
15
|
+
## 1) Goal
|
|
16
|
+
|
|
17
|
+
Integrate ACP-based coding agents into Tabminal without building custom agents
|
|
18
|
+
in-repo. Agents should run on the Tabminal host, be managed by the Tabminal
|
|
19
|
+
backend, and feel native inside the existing workspace/editor UI.
|
|
20
|
+
|
|
21
|
+
## 2) Current Architecture
|
|
22
22
|
|
|
23
23
|
### Backend
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Implemented:
|
|
26
|
+
|
|
27
|
+
- ACP supervisor in `/Users/leask/Documents/Tabminal/src/acp-manager.mjs`
|
|
28
|
+
- Built-in host-local agent definitions:
|
|
29
|
+
- Gemini CLI
|
|
30
|
+
- Codex CLI
|
|
31
|
+
- Claude Agent
|
|
32
|
+
- GitHub Copilot
|
|
33
|
+
- ACP Test Agent when `TABMINAL_ENABLE_TEST_AGENT=1`
|
|
34
|
+
- Lazy runtime startup
|
|
35
|
+
- Runtime reuse while tabs are active
|
|
36
|
+
- Idle cleanup
|
|
37
|
+
- ACP websocket fan-out to browser clients
|
|
38
|
+
- Session restore for ACP runtimes that support `loadSession`
|
|
39
|
+
- Per-agent saved config/env persistence
|
|
26
40
|
|
|
27
|
-
|
|
28
|
-
- List supported agent definitions available on the host.
|
|
29
|
-
- Start ACP runtimes on demand.
|
|
30
|
-
- Reuse ACP runtime processes while tabs/sessions are active.
|
|
31
|
-
- Create ACP sessions within a runtime.
|
|
32
|
-
- Bridge ACP events to browser clients over a dedicated WebSocket.
|
|
33
|
-
- Expose minimal approval surfaces later; MVP focuses on prompt/stream/cancel.
|
|
41
|
+
### Frontend
|
|
34
42
|
|
|
35
|
-
|
|
36
|
-
- Primary: stdio-launched ACP agents.
|
|
37
|
-
- Future: attach to TCP ACP servers for tools like GitHub Copilot CLI.
|
|
43
|
+
Implemented:
|
|
38
44
|
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
|
|
45
|
+
- Host-scoped agent dropdown from the sidebar
|
|
46
|
+
- Agent tabs inside the shared workspace tab strip
|
|
47
|
+
- Transcript rendering with message/tool/permission/plan history
|
|
48
|
+
- Composer with send/stop, slash-command suggestions, attachments, and keyboard
|
|
49
|
+
shortcuts
|
|
50
|
+
- Mode/model/thought-level/permission selectors
|
|
51
|
+
- Managed terminal summaries and `Jump in`
|
|
52
|
+
- Usage HUD
|
|
53
|
+
- Plan panel that archives into transcript history once complete
|
|
54
|
+
- Agent-specific workspace restore and focus behavior
|
|
44
55
|
|
|
45
|
-
|
|
56
|
+
## 3) Completed Scope
|
|
46
57
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
- Each agent tab streams conversation updates and supports prompt send/cancel.
|
|
55
|
-
|
|
56
|
-
MVP UI:
|
|
57
|
-
- Agent tabs render in the editor workspace.
|
|
58
|
-
- Transcript area with coalesced message stream.
|
|
59
|
-
- Prompt textarea + single send/stop button.
|
|
60
|
-
- Mode picker, new chat action, and slash-command chips when available.
|
|
61
|
-
- Status row with host, cwd, mode, and runtime/session status.
|
|
62
|
-
|
|
63
|
-
## Reuse Strategy
|
|
64
|
-
|
|
65
|
-
Use:
|
|
66
|
-
- `@agentclientprotocol/sdk` for protocol/client implementation.
|
|
67
|
-
- ACP Registry later for agent metadata discovery.
|
|
68
|
-
|
|
69
|
-
Do not directly embed:
|
|
70
|
-
- Chrome ACP web client.
|
|
71
|
-
- ACP UI desktop frontend.
|
|
72
|
-
|
|
73
|
-
Reason:
|
|
74
|
-
- They are standalone apps, not embeddable widgets.
|
|
75
|
-
- Tabminal needs native integration with existing host/session/workspace state.
|
|
76
|
-
|
|
77
|
-
## MVP Scope
|
|
78
|
-
|
|
79
|
-
### Phase 1
|
|
80
|
-
|
|
81
|
-
Status:
|
|
82
|
-
- Implemented on `acp` branch and usable with real browser smoke.
|
|
83
|
-
- Backend ACP supervisor, API, and WS fan-out are live.
|
|
84
|
-
- Frontend agent tabs, transcript rendering, prompt send/cancel, and
|
|
85
|
-
permission resolution are live.
|
|
86
|
-
- Agent tab metadata now persists on the backend and restores across backend
|
|
87
|
-
restart for ACP runtimes that support `loadSession`.
|
|
88
|
-
- Agent panel interaction polish is live:
|
|
89
|
-
- duplicate agent tabs auto-number as `#1`, `#2`, ...
|
|
90
|
-
- `Enter` sends
|
|
91
|
-
- `Esc` stops active runs
|
|
92
|
-
- `Ctrl+J` and `Shift+Enter` insert newlines
|
|
93
|
-
- mode switching and new-chat flows are available in-panel
|
|
94
|
-
- tool calls and permission requests render as structured cards
|
|
95
|
-
- Verified with:
|
|
96
|
-
- `npm run lint`
|
|
97
|
-
- `npm test`
|
|
98
|
-
- browser smoke against isolated local ACP test agent
|
|
99
|
-
- browser restart-restore validation against backend-persisted ACP tabs
|
|
100
|
-
- Current polish fixes already applied:
|
|
101
|
-
- Codex token stream is coalesced into a single assistant message instead of
|
|
102
|
-
one message per chunk.
|
|
103
|
-
- User prompts are no longer duplicated when an ACP runtime echoes
|
|
104
|
-
`user_message_chunk` updates after local optimistic insertion.
|
|
105
|
-
- Gemini definition availability is disabled with reason
|
|
106
|
-
`API key missing` when no key is configured.
|
|
107
|
-
- Agent panel typography has been reduced to align with the existing
|
|
108
|
-
workspace/editor density.
|
|
109
|
-
|
|
110
|
-
Backend:
|
|
111
|
-
- ACP supervisor module.
|
|
112
|
-
- Built-in agent definitions for Gemini CLI, Codex CLI adapter, Claude adapter,
|
|
113
|
-
and Copilot CLI ACP server descriptor.
|
|
114
|
-
- REST endpoints:
|
|
58
|
+
The following items are effectively shipped and usable.
|
|
59
|
+
|
|
60
|
+
### 3.1 Core ACP plumbing
|
|
61
|
+
|
|
62
|
+
- ACP dependency integrated
|
|
63
|
+
- Backend ACP supervisor live
|
|
64
|
+
- REST endpoints live:
|
|
115
65
|
- `GET /api/agents`
|
|
66
|
+
- `GET /api/agents/config`
|
|
67
|
+
- `PUT /api/agents/config/:agentId`
|
|
68
|
+
- `DELETE /api/agents/config/:agentId`
|
|
116
69
|
- `POST /api/agents/tabs`
|
|
117
70
|
- `POST /api/agents/tabs/:tabId/prompt`
|
|
118
71
|
- `POST /api/agents/tabs/:tabId/cancel`
|
|
119
72
|
- `POST /api/agents/tabs/:tabId/mode`
|
|
73
|
+
- `POST /api/agents/tabs/:tabId/config`
|
|
120
74
|
- `POST /api/agents/tabs/:tabId/permissions/:permissionId`
|
|
121
75
|
- `DELETE /api/agents/tabs/:tabId`
|
|
122
|
-
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- Agent
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
|
|
135
|
-
###
|
|
136
|
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
76
|
+
- ACP websocket endpoint live
|
|
77
|
+
|
|
78
|
+
### 3.2 Agent tab UX
|
|
79
|
+
|
|
80
|
+
- Agent tabs coexist with file tabs and pinned terminal tabs
|
|
81
|
+
- Duplicate agent tabs auto-number
|
|
82
|
+
- `Enter` sends
|
|
83
|
+
- `Shift+Enter` and `Ctrl+J` insert newline
|
|
84
|
+
- `Esc` stops active runs
|
|
85
|
+
- `Ctrl+Shift+A` opens the agent menu
|
|
86
|
+
- Slash-command menu opens upward as floating overlay
|
|
87
|
+
- Keyboard navigation inside slash-command menu is implemented
|
|
88
|
+
|
|
89
|
+
### 3.3 Transcript and tool rendering
|
|
90
|
+
|
|
91
|
+
- Coalesced assistant message streaming
|
|
92
|
+
- Optimistic user message insertion
|
|
93
|
+
- De-duplication when runtime echoes user chunks
|
|
94
|
+
- Structured tool-call cards
|
|
95
|
+
- Structured permission cards
|
|
96
|
+
- Diff rendering
|
|
97
|
+
- Code/resource rendering
|
|
98
|
+
- Terminal output rendering inside tool cards
|
|
99
|
+
- Path link rendering
|
|
100
|
+
- Running-terminal activity summary
|
|
101
|
+
|
|
102
|
+
### 3.4 Managed terminal flow
|
|
103
|
+
|
|
104
|
+
- ACP tool calls can create managed terminal sessions
|
|
105
|
+
- `Jump in` switches to the real terminal session when still alive
|
|
106
|
+
- Focus-stealing bug after `Jump in` has been fixed
|
|
107
|
+
- Hidden pinned terminals no longer report bogus tiny sizes to the backend
|
|
108
|
+
|
|
109
|
+
### 3.5 Persistence and restore
|
|
110
|
+
|
|
111
|
+
- Agent tab metadata persists on backend
|
|
112
|
+
- Agent config persists on backend
|
|
113
|
+
- Transcript/tool/permission/plan state persists
|
|
114
|
+
- Restore works across backend restart for runtimes that support `loadSession`
|
|
115
|
+
- Restore no longer wrongly penalizes built-in agent availability on startup
|
|
116
|
+
|
|
117
|
+
### 3.6 Usage / status UI
|
|
118
|
+
|
|
119
|
+
- Usage HUD implemented
|
|
120
|
+
- CSS-only expanded HUD layout stabilized
|
|
121
|
+
- Plan panel implemented
|
|
122
|
+
- Completed plan moves into transcript history instead of permanently occupying
|
|
123
|
+
composer-adjacent UI
|
|
124
|
+
- Transcript auto-scroll logic now follows the correct “only pin if already at
|
|
125
|
+
bottom” rule
|
|
126
|
+
|
|
127
|
+
### 3.7 Test tooling
|
|
128
|
+
|
|
129
|
+
- ACP Test Agent supports real slash-command scenarios:
|
|
130
|
+
- `/demo`
|
|
131
|
+
- `/plan`
|
|
132
|
+
- `/diff`
|
|
133
|
+
- `/permission`
|
|
134
|
+
- `/cancel`
|
|
135
|
+
- `/stale`
|
|
136
|
+
- `/order`
|
|
137
|
+
- `/fail`
|
|
138
|
+
- ACP browser smoke covers current UI shape
|
|
139
|
+
- ACP manager tests cover restore, prompt attachments, config, availability, and
|
|
140
|
+
slash commands
|
|
141
|
+
|
|
142
|
+
## 4) Stable Contracts
|
|
143
|
+
|
|
144
|
+
These should now be treated as product contracts, not experiments.
|
|
145
|
+
|
|
146
|
+
- ACP agents are host-scoped.
|
|
147
|
+
- Agent tabs do not require the file tree to be open.
|
|
148
|
+
- Workspace tabs should remain visible if there is any file tab, agent tab, or
|
|
149
|
+
pinned terminal tab.
|
|
150
|
+
- `Jump in` is a management path, not a read-only preview, while the terminal is
|
|
151
|
+
still alive.
|
|
152
|
+
- Internal shell bootstrap commands such as `TABMINAL_SHELL_READY=1` must never
|
|
153
|
+
surface as user notifications.
|
|
154
|
+
- ACP availability should reflect the backend runtime environment, not only the
|
|
155
|
+
developer's interactive shell.
|
|
156
|
+
- On small screens, agent config selectors collapse to icon-only affordances.
|
|
157
|
+
|
|
158
|
+
## 5) Remaining Work
|
|
159
|
+
|
|
160
|
+
This is the actual remaining ACP backlog.
|
|
161
|
+
|
|
162
|
+
### 5.1 Still open
|
|
163
|
+
|
|
164
|
+
#### A) Registry-driven install/setup UX
|
|
165
|
+
|
|
166
|
+
Status: not done
|
|
167
|
+
|
|
168
|
+
Missing:
|
|
169
|
+
|
|
170
|
+
- guided install flow for agents that are unavailable
|
|
171
|
+
- first-class setup UX for installing required CLIs
|
|
172
|
+
- richer host diagnostics for why a definition is unavailable
|
|
173
|
+
|
|
174
|
+
Current state:
|
|
175
|
+
|
|
176
|
+
- availability reasons are shown
|
|
177
|
+
- some config/setup flows exist
|
|
178
|
+
- but this is not yet a complete install-onboarding UX
|
|
179
|
+
|
|
180
|
+
#### B) Explicit TCP ACP runtime support in the UI
|
|
181
|
+
|
|
182
|
+
Status: not done
|
|
183
|
+
|
|
184
|
+
Missing:
|
|
185
|
+
|
|
186
|
+
- user-visible workflow for attaching to TCP ACP servers
|
|
187
|
+
- transport selection UX
|
|
188
|
+
- connection lifecycle UX for non-stdio ACP runtimes
|
|
189
|
+
|
|
190
|
+
Current state:
|
|
191
|
+
|
|
192
|
+
- architecture originally allowed for this direction
|
|
193
|
+
- product currently operates around stdio-launched/local CLI definitions
|
|
194
|
+
|
|
195
|
+
#### C) Dedicated conversation history browser
|
|
196
|
+
|
|
197
|
+
Status: not done
|
|
198
|
+
|
|
199
|
+
Missing:
|
|
200
|
+
|
|
201
|
+
- independent history browser for ACP conversations
|
|
202
|
+
- browsing/searching old conversations outside the current terminal/workspace
|
|
203
|
+
session context
|
|
204
|
+
|
|
205
|
+
Current state:
|
|
206
|
+
|
|
207
|
+
- transcript restores with the tab
|
|
208
|
+
- completed plans archive into the transcript
|
|
209
|
+
- but there is no standalone conversation history surface
|
|
210
|
+
|
|
211
|
+
### 5.2 Nice-to-have follow-up work
|
|
212
|
+
|
|
213
|
+
These are not blockers, but they are logical next ACP improvements.
|
|
214
|
+
|
|
215
|
+
- stronger browser smoke coverage for touch/mobile-only ACP interactions
|
|
216
|
+
- clearer visual distinction between running, attention, and completed agent
|
|
217
|
+
states at scale
|
|
218
|
+
- broader multi-host ACP smoke scenarios
|
|
219
|
+
- richer availability/setup diagnostics in the UI
|
|
220
|
+
|
|
221
|
+
## 6) What Was Originally Deferred But Is Now Done
|
|
222
|
+
|
|
223
|
+
These items were previously listed as deferred and should no longer be treated
|
|
224
|
+
as open backlog:
|
|
225
|
+
|
|
226
|
+
- prompt/file attachments
|
|
227
|
+
- diff rendering in tool outputs
|
|
228
|
+
- code/resource rendering in tool outputs
|
|
229
|
+
- terminal execution transcript UI for ACP tool calls
|
|
230
|
+
|
|
231
|
+
## 7) Test and Verification Status
|
|
232
|
+
|
|
233
|
+
Current ACP verification surface:
|
|
234
|
+
|
|
171
235
|
- `npm run lint`
|
|
172
236
|
- `npm test`
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
237
|
+
- `npm run build`
|
|
238
|
+
- browser smoke via
|
|
239
|
+
`/Users/leask/Documents/Tabminal/scripts/acp-browser-smoke.mjs`
|
|
240
|
+
|
|
241
|
+
Recommended ACP manual spot-checks when behavior changes:
|
|
242
|
+
|
|
243
|
+
1. Start with `TABMINAL_ENABLE_TEST_AGENT=1`
|
|
244
|
+
2. Run `/demo`
|
|
245
|
+
3. Verify:
|
|
246
|
+
- agent menu
|
|
247
|
+
- slash-command menu
|
|
248
|
+
- plan panel
|
|
249
|
+
- usage HUD
|
|
250
|
+
- tool call cards
|
|
251
|
+
- managed terminal
|
|
252
|
+
- `Jump in`
|
|
253
|
+
- transcript scroll behavior
|
|
254
|
+
4. Run `/permission`
|
|
255
|
+
5. Run `/cancel`
|
|
256
|
+
6. Reload and verify restore
|
|
257
|
+
|
|
258
|
+
## 8) Recommendation
|
|
259
|
+
|
|
260
|
+
ACP is no longer in “MVP not landed” status.
|
|
261
|
+
It is in “shipped, actively polished, with a short remaining backlog” status.
|
|
262
|
+
|
|
263
|
+
Practical summary:
|
|
264
|
+
|
|
265
|
+
- Core ACP product: done
|
|
266
|
+
- ACP UI polish: largely done
|
|
267
|
+
- ACP infra/test surface: done
|
|
268
|
+
- Remaining strategic work: 3 real items
|
|
269
|
+
|
|
270
|
+
That remaining scope is small enough that this file should stay as a status
|
|
271
|
+
ledger, not a large speculative design doc.
|
package/AGENTS.md
CHANGED
|
@@ -1,320 +1,471 @@
|
|
|
1
1
|
# Tabminal Agent Notes
|
|
2
2
|
|
|
3
|
-
Last updated: 2026-03-
|
|
3
|
+
Last updated: 2026-03-27
|
|
4
4
|
|
|
5
|
-
This file is for future
|
|
6
|
-
|
|
7
|
-
contracts
|
|
5
|
+
This file is for future coding agents working in this repo.
|
|
6
|
+
Keep it current, specific, and operational. The main goal is to preserve the
|
|
7
|
+
current product contracts so later work does not regress multi-host behavior,
|
|
8
|
+
ACP agent UX, or mobile ergonomics.
|
|
8
9
|
|
|
9
10
|
## 1) Project Snapshot
|
|
10
11
|
|
|
11
|
-
- Runtime: Node.js
|
|
12
|
-
- Backend entry: `src/server.mjs
|
|
13
|
-
- Frontend entry: `public/app.js`
|
|
14
|
-
- PWA shell:
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
-
|
|
12
|
+
- Runtime: Node.js `>= 22`, ESM project.
|
|
13
|
+
- Backend entry: `src/server.mjs`
|
|
14
|
+
- Frontend entry: `public/app.js`
|
|
15
|
+
- PWA shell:
|
|
16
|
+
- `public/index.html`
|
|
17
|
+
- `public/sw.js`
|
|
18
|
+
- Native app workspace:
|
|
19
|
+
- `apps/Apple`
|
|
20
|
+
- `apps/ghostty-vendor`
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
- One web app can connect to multiple Tabminal backends.
|
|
22
|
-
- Main host controls page-level auth modal/state.
|
|
23
|
-
- Sub-hosts are independent connection/auth units and can reconnect separately.
|
|
22
|
+
Current product shape:
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
- Persistent terminal sessions remain the core product.
|
|
25
|
+
- There are now two AI surfaces:
|
|
26
|
+
- terminal-native assistant in `src/terminal-session.mjs`
|
|
27
|
+
- ACP agent workspace in `src/acp-manager.mjs` + `public/app.js`
|
|
28
|
+
- One web UI can connect to multiple Tabminal hosts.
|
|
29
|
+
- The workspace bar now mixes file tabs, agent tabs, and pinned terminal tabs.
|
|
30
|
+
|
|
31
|
+
Important persistence files under `~/.tabminal`:
|
|
32
|
+
|
|
33
|
+
- `config.json`
|
|
34
|
+
- `cluster.json`
|
|
35
|
+
- `agent-tabs.json`
|
|
36
|
+
- `agent-config.json`
|
|
37
|
+
|
|
38
|
+
## 2) Non-Negotiable Contracts
|
|
26
39
|
|
|
27
40
|
### 2.1 Host model and state isolation
|
|
28
41
|
|
|
29
|
-
- UI term is `Host
|
|
42
|
+
- UI term is `Host`, not `Server`, for user-facing labels.
|
|
30
43
|
- Every session belongs to exactly one host.
|
|
31
|
-
- Session
|
|
44
|
+
- Session state, editor state, file tree state, ACP agent tabs, and workspace
|
|
45
|
+
tabs are host-isolated.
|
|
32
46
|
- Do not merge runtime state across hosts.
|
|
33
47
|
|
|
34
48
|
Relevant code:
|
|
35
|
-
- `public/app.js`
|
|
49
|
+
- `public/app.js`
|
|
36
50
|
- `public/modules/session-meta.js`
|
|
37
51
|
|
|
38
52
|
### 2.2 Auth model
|
|
39
53
|
|
|
40
|
-
- Main host (`id = 'main'`)
|
|
41
|
-
- Only main
|
|
42
|
-
- Sub-host
|
|
43
|
-
- Sub-
|
|
54
|
+
- Main host (`id = 'main'`) controls the global login modal.
|
|
55
|
+
- Only main-host `401/403` should trigger app-wide login UI.
|
|
56
|
+
- Sub-host auth failures must stay local to that host.
|
|
57
|
+
- Sub-hosts may require Cloudflare Access login without password change.
|
|
44
58
|
|
|
45
59
|
Relevant code:
|
|
46
|
-
- `public/app.js`
|
|
47
|
-
- `
|
|
60
|
+
- `public/app.js`
|
|
61
|
+
- `ServerClient.handleUnauthorized`
|
|
62
|
+
- `ServerClient.handleAccessRedirect`
|
|
48
63
|
|
|
49
|
-
### 2.3 Token storage
|
|
64
|
+
### 2.3 Token storage
|
|
50
65
|
|
|
51
66
|
- Main host token:
|
|
52
|
-
-
|
|
67
|
+
- browser `localStorage`
|
|
68
|
+
- key: `tabminal_auth_token:main`
|
|
53
69
|
- Sub-host tokens:
|
|
54
|
-
- persisted in backend
|
|
55
|
-
-
|
|
56
|
-
- Removing a host should remove any stale local token
|
|
70
|
+
- persisted in backend `cluster.json`
|
|
71
|
+
- do not persist in browser `localStorage`
|
|
72
|
+
- Removing a host should also remove any stale local token keyed to that host.
|
|
57
73
|
|
|
58
74
|
Relevant code:
|
|
59
|
-
- `public/app.js`
|
|
60
|
-
- `src/persistence.mjs`
|
|
75
|
+
- `public/app.js`
|
|
76
|
+
- `src/persistence.mjs`
|
|
61
77
|
|
|
62
|
-
### 2.4 Host registry persistence
|
|
78
|
+
### 2.4 Host registry persistence
|
|
63
79
|
|
|
64
|
-
- Frontend
|
|
65
|
-
- Source of truth
|
|
66
|
-
- File format
|
|
80
|
+
- Frontend is not the source of truth for host list persistence.
|
|
81
|
+
- Source of truth is backend `GET/PUT /api/cluster`.
|
|
82
|
+
- File format:
|
|
67
83
|
- `{ "servers": [{ id, baseUrl, host, token }, ...] }`
|
|
68
|
-
- On page load, host list
|
|
84
|
+
- On page load, host list restores only after main-host auth succeeds.
|
|
69
85
|
|
|
70
86
|
Relevant code:
|
|
71
|
-
- `public/app.js`
|
|
72
|
-
- `src/server.mjs`
|
|
73
|
-
- `src/persistence.mjs`
|
|
87
|
+
- `public/app.js`
|
|
88
|
+
- `src/server.mjs`
|
|
89
|
+
- `src/persistence.mjs`
|
|
74
90
|
|
|
75
91
|
### 2.5 Deduplication and self-host skip
|
|
76
92
|
|
|
77
93
|
- Host uniqueness key is normalized `hostname[:port]` in lowercase.
|
|
78
|
-
- Path is not part of dedupe key.
|
|
79
|
-
-
|
|
80
|
-
|
|
81
|
-
-
|
|
94
|
+
- Path is intentionally not part of the dedupe key.
|
|
95
|
+
- Hydration skips entries that resolve to the current main node to avoid
|
|
96
|
+
self-loop duplicates.
|
|
97
|
+
- Path-based multi-host routing such as `/a/*` and `/b/*` is not supported by
|
|
98
|
+
the current client assumptions.
|
|
82
99
|
|
|
83
100
|
Relevant code:
|
|
84
|
-
- `public/modules/url-auth.js`
|
|
85
|
-
- `public/app.js`
|
|
86
|
-
|
|
87
|
-
Important implication:
|
|
88
|
-
- Path-based multi-host on one domain (like `/a/*`, `/b/*`) is not supported by current
|
|
89
|
-
client routing assumptions.
|
|
101
|
+
- `public/modules/url-auth.js`
|
|
102
|
+
- `public/app.js`
|
|
90
103
|
|
|
91
104
|
### 2.6 Session creation ownership
|
|
92
105
|
|
|
93
|
-
- Backend
|
|
94
|
-
- Frontend
|
|
95
|
-
-
|
|
96
|
-
- if user closes last session
|
|
106
|
+
- Backend does not auto-create a default session anymore.
|
|
107
|
+
- Frontend is responsible for usability:
|
|
108
|
+
- create one main-host session if init returns none
|
|
109
|
+
- recreate one main-host session if user closes the last session
|
|
97
110
|
|
|
98
111
|
Relevant code:
|
|
99
|
-
- `public/app.js`
|
|
100
|
-
- `src/server.mjs`
|
|
112
|
+
- `public/app.js`
|
|
113
|
+
- `src/server.mjs`
|
|
101
114
|
|
|
102
|
-
### 2.7 Polling
|
|
115
|
+
### 2.7 Polling and heartbeat
|
|
103
116
|
|
|
104
|
-
-
|
|
105
|
-
- Reconnect retry
|
|
106
|
-
- Do not
|
|
117
|
+
- Frontend heartbeat cadence: `1000ms`
|
|
118
|
+
- Reconnect retry throttle per host: `5000ms`
|
|
119
|
+
- Do not weaken these without measuring UX fallout.
|
|
107
120
|
|
|
108
121
|
Relevant code:
|
|
109
122
|
- `public/app.js`
|
|
110
|
-
- `HEARTBEAT_INTERVAL_MS = 1000`
|
|
111
|
-
- `RECONNECT_RETRY_MS = 5000`
|
|
112
|
-
- `syncServer`, `ServerClient.startHeartbeat`
|
|
113
123
|
|
|
114
124
|
### 2.8 Cloudflare Access handling
|
|
115
125
|
|
|
116
|
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
|
|
120
|
-
-
|
|
126
|
+
- Non-main host requests use `credentials: 'include'`.
|
|
127
|
+
- Non-main host fetches default to `redirect: 'manual'`.
|
|
128
|
+
- Access redirects should show reconnect/login state, not generic password
|
|
129
|
+
failure.
|
|
130
|
+
- Reconnect UI may open the host root in a new tab for Access login.
|
|
121
131
|
|
|
122
132
|
Relevant code:
|
|
123
133
|
- `public/app.js`
|
|
124
|
-
- `ServerClient.fetch`
|
|
125
|
-
- `probeAccessLoginUrl`
|
|
126
|
-
- `openAccessLoginPage`
|
|
127
134
|
- `public/modules/url-auth.js`
|
|
128
|
-
- `isAccessRedirectResponse`
|
|
129
|
-
- `buildAccessLoginUrl` (root origin)
|
|
130
135
|
|
|
131
|
-
### 2.9
|
|
136
|
+
### 2.9 Runtime version and PWA coherence
|
|
132
137
|
|
|
133
|
-
- Backend
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
138
|
+
- Backend heartbeat returns runtime boot id.
|
|
139
|
+
- Frontend appends `?rt=<bootId>` and reloads on runtime change.
|
|
140
|
+
- `index.html` versions `styles.css` and `app.js` with runtime key.
|
|
141
|
+
- Service worker is versioned the same way.
|
|
137
142
|
|
|
138
143
|
Relevant code:
|
|
139
|
-
- `src/server.mjs`
|
|
144
|
+
- `src/server.mjs`
|
|
145
|
+
- `public/app.js`
|
|
146
|
+
- `public/index.html`
|
|
147
|
+
- `public/sw.js`
|
|
140
148
|
|
|
141
|
-
|
|
149
|
+
## 3) ACP Design Contracts
|
|
142
150
|
|
|
143
|
-
|
|
144
|
-
- Frontend appends `?rt=<bootId>` to URL and reloads on server restart/version change.
|
|
145
|
-
- `index.html` loads `styles.css` and `app.js` using runtime key.
|
|
146
|
-
- SW is registered with `?rt=<bootId>`, cache key includes that runtime id.
|
|
147
|
-
- App shell (`/`, `/index.html`, `/app.js`, `/styles.css`, `/modules/*`) uses
|
|
148
|
-
network-first.
|
|
151
|
+
### 3.1 ACP architecture shape
|
|
149
152
|
|
|
150
|
-
|
|
151
|
-
-
|
|
152
|
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
153
|
+
- Tabminal embeds an ACP supervisor in the backend.
|
|
154
|
+
- ACP agents are not implemented in-repo; Tabminal launches or attaches to
|
|
155
|
+
external ACP runtimes.
|
|
156
|
+
- Built-in definitions currently include:
|
|
157
|
+
- Gemini CLI
|
|
158
|
+
- Codex CLI
|
|
159
|
+
- Claude Agent
|
|
160
|
+
- GitHub Copilot
|
|
161
|
+
- ACP Test Agent when `TABMINAL_ENABLE_TEST_AGENT=1`
|
|
155
162
|
|
|
156
|
-
|
|
163
|
+
Relevant code:
|
|
164
|
+
- `src/acp-manager.mjs`
|
|
165
|
+
- `src/acp-test-agent.mjs`
|
|
157
166
|
|
|
158
|
-
### 3.
|
|
167
|
+
### 3.2 ACP workspace model
|
|
159
168
|
|
|
160
|
-
-
|
|
161
|
-
|
|
162
|
-
-
|
|
163
|
-
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
- access flow: `Cloudflare Login <Host>`
|
|
167
|
-
- Second line includes latency text + heartbeat dot + mini heartbeat canvas.
|
|
169
|
+
- Agent tabs share the same workspace strip as file tabs and pinned terminal
|
|
170
|
+
tabs.
|
|
171
|
+
- Showing the agent workspace must not force-open the file tree.
|
|
172
|
+
- Showing the file tree must not be required for agent tabs to exist.
|
|
173
|
+
- Workspace bar should stay visible whenever there is any open file tab, agent
|
|
174
|
+
tab, or pinned terminal tab.
|
|
168
175
|
|
|
169
176
|
Relevant code:
|
|
170
|
-
- `public/app.js`
|
|
171
|
-
- `public/styles.css`
|
|
177
|
+
- `public/app.js`
|
|
178
|
+
- `public/styles.css`
|
|
172
179
|
|
|
173
|
-
### 3.
|
|
180
|
+
### 3.3 Agent dropdown and toggle behavior
|
|
174
181
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
182
|
+
- Left sidebar robot button is a toggle.
|
|
183
|
+
- First click opens the host-scoped agent dropdown.
|
|
184
|
+
- Clicking the same button again closes it.
|
|
185
|
+
- If either file tree or agent toggle is active, the opposite control remains
|
|
186
|
+
visible; do not let one disappear while the other is lit.
|
|
180
187
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
-
|
|
188
|
+
### 3.4 Jump in semantics
|
|
189
|
+
|
|
190
|
+
- `Jump in` is not a read-only preview.
|
|
191
|
+
- While the managed terminal is still alive, it should switch into a real
|
|
192
|
+
controllable terminal session.
|
|
193
|
+
- If the terminal has already exited, the restored session is effectively
|
|
194
|
+
history-only.
|
|
195
|
+
- Agent sync must never steal focus back from a session the user jumped into.
|
|
184
196
|
|
|
185
197
|
Relevant code:
|
|
186
|
-
- `public/
|
|
198
|
+
- `public/app.js`
|
|
187
199
|
|
|
188
|
-
### 3.
|
|
200
|
+
### 3.5 Hidden terminal resize contract
|
|
189
201
|
|
|
190
|
-
-
|
|
191
|
-
|
|
202
|
+
- If a main terminal is hidden because it is pinned into a workspace tab and is
|
|
203
|
+
not the active visible tab, do not report resized dimensions from that hidden
|
|
204
|
+
state back to the backend.
|
|
205
|
+
- Keep the previous valid size instead.
|
|
206
|
+
- This prevents broken sidebar previews caused by tiny hidden-layout sizes.
|
|
192
207
|
|
|
193
208
|
Relevant code:
|
|
194
|
-
- `public/
|
|
209
|
+
- `public/app.js`
|
|
195
210
|
|
|
196
|
-
### 3.
|
|
211
|
+
### 3.6 Shell ready noise filtering
|
|
197
212
|
|
|
198
|
-
- `
|
|
199
|
-
-
|
|
213
|
+
- `TABMINAL_SHELL_READY=1` and related shell bootstrap commands are internal.
|
|
214
|
+
- They must not produce user notifications or visible execution-completed noise.
|
|
200
215
|
|
|
201
216
|
Relevant code:
|
|
202
|
-
- `
|
|
217
|
+
- `shell/tabminal-bashrc`
|
|
218
|
+
- `src/terminal-session.mjs`
|
|
219
|
+
- `public/app.js`
|
|
203
220
|
|
|
204
|
-
|
|
221
|
+
### 3.7 Agent plan behavior
|
|
205
222
|
|
|
206
|
-
|
|
223
|
+
- In-progress plan lives in the fixed area between activity strip and composer.
|
|
224
|
+
- Once fully completed, it should archive into transcript history and stop
|
|
225
|
+
occupying the fixed panel slot.
|
|
226
|
+
- Completed plans are historical transcript content, not permanent composer UI.
|
|
207
227
|
|
|
208
|
-
|
|
209
|
-
- trying `ws://` from HTTPS page.
|
|
210
|
-
Current mitigation:
|
|
211
|
-
- WS URL builder chooses `wss://` if page is HTTPS or host URL is HTTPS.
|
|
228
|
+
### 3.8 Transcript auto-scroll contract
|
|
212
229
|
|
|
213
|
-
|
|
214
|
-
-
|
|
215
|
-
-
|
|
230
|
+
- If the user was already at the bottom, keep them pinned to bottom when:
|
|
231
|
+
- new transcript messages arrive
|
|
232
|
+
- tool-call terminal blocks grow
|
|
233
|
+
- plan/activity/queue panels change height
|
|
234
|
+
- transcript container height changes
|
|
235
|
+
- If the user was not at the bottom, preserve position and do not yank them
|
|
236
|
+
back down.
|
|
216
237
|
|
|
217
|
-
|
|
238
|
+
Relevant code:
|
|
239
|
+
- `public/app.js`
|
|
218
240
|
|
|
219
|
-
|
|
220
|
-
- host down, DNS issue, TLS failure, CORS block, or network unreachable.
|
|
221
|
-
Expected behavior:
|
|
222
|
-
- warning-level reconnect messaging, not noisy crash behavior.
|
|
241
|
+
### 3.9 Slash command menu contract
|
|
223
242
|
|
|
224
|
-
|
|
225
|
-
-
|
|
226
|
-
-
|
|
227
|
-
|
|
243
|
+
- Slash-command menu opens upward, as a floating overlay above the composer.
|
|
244
|
+
- It must not push the composer or nearby controls.
|
|
245
|
+
- Keyboard navigation must keep the active item scrolled into view with some
|
|
246
|
+
padding from the edges.
|
|
247
|
+
- Current shortcut to open agent menu is `Ctrl+Shift+A`.
|
|
228
248
|
|
|
229
|
-
|
|
249
|
+
Relevant code:
|
|
250
|
+
- `public/app.js`
|
|
251
|
+
- `public/styles.css`
|
|
252
|
+
- `public/index.html`
|
|
230
253
|
|
|
231
|
-
|
|
232
|
-
- CORS headers alone do not fix Access redirect login requirements.
|
|
233
|
-
- Main issue is Access auth challenge during API request.
|
|
234
|
-
- Current design handles this by detecting redirect and opening host root login page.
|
|
254
|
+
### 3.10 Usage HUD contract
|
|
235
255
|
|
|
236
|
-
|
|
256
|
+
- Expanded usage HUD is now a CSS-driven fixed layout.
|
|
257
|
+
- Do not reintroduce JS-measured width growth or time-based width drift.
|
|
258
|
+
- Context line uses right-side usage text.
|
|
259
|
+
- Limit rows use `% left` plus reset text.
|
|
260
|
+
- The HUD should expand predictably and not resize every second as reset text
|
|
261
|
+
updates.
|
|
237
262
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
3. entries include valid `id` and `baseUrl`?
|
|
242
|
-
4. entry skipped as self-host by dedupe/hostname rule?
|
|
263
|
+
Relevant code:
|
|
264
|
+
- `public/styles.css`
|
|
265
|
+
- `public/app.js`
|
|
243
266
|
|
|
244
|
-
|
|
267
|
+
## 4) ACP Status and Remaining Gaps
|
|
245
268
|
|
|
246
|
-
|
|
247
|
-
Do not assume path-prefix multiplexing works without deeper routing redesign.
|
|
269
|
+
`ACP_PLANING.md` is partly stale.
|
|
248
270
|
|
|
249
|
-
|
|
271
|
+
Implemented from that plan:
|
|
250
272
|
|
|
251
|
-
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
-
|
|
255
|
-
-
|
|
256
|
-
-
|
|
257
|
-
-
|
|
273
|
+
- ACP supervisor and backend APIs
|
|
274
|
+
- ACP websocket fan-out
|
|
275
|
+
- agent tab restore and `loadSession` restore where supported
|
|
276
|
+
- slash commands
|
|
277
|
+
- prompt attachments
|
|
278
|
+
- structured tool cards
|
|
279
|
+
- diff and code/resource rendering
|
|
280
|
+
- managed terminal transcript UI
|
|
281
|
+
- permission handling
|
|
282
|
+
- usage HUD
|
|
283
|
+
- browser smoke and ACP test agent support
|
|
258
284
|
|
|
259
|
-
|
|
260
|
-
- `public/app.js`: host/session state, sync loop, UI orchestration.
|
|
261
|
-
- `public/modules/url-auth.js`: URL normalization, dedupe key, auth helpers.
|
|
262
|
-
- `public/modules/session-meta.js`: host display and path shortening.
|
|
263
|
-
- `public/styles.css`: sidebar/tab/host control styling and responsive rules.
|
|
264
|
-
- `public/index.html`: shell DOM, runtime versioned loader, SW register.
|
|
265
|
-
- `public/sw.js`: runtime-versioned caching strategy.
|
|
285
|
+
Still not clearly done end-to-end:
|
|
266
286
|
|
|
267
|
-
|
|
268
|
-
-
|
|
269
|
-
-
|
|
270
|
-
- `apps/ghostty-vendor`: Ghostty xcframework build and verification helpers.
|
|
287
|
+
- registry-driven install UX
|
|
288
|
+
- explicit TCP ACP runtime support in the UI
|
|
289
|
+
- dedicated conversation history browser independent of terminal sessions
|
|
271
290
|
|
|
272
|
-
|
|
291
|
+
Implication:
|
|
273
292
|
|
|
274
|
-
|
|
275
|
-
-
|
|
276
|
-
|
|
293
|
+
- Do not delete `ACP_PLANING.md` just because most of the MVP shipped.
|
|
294
|
+
- If it is removed later, first copy the still-open deferred items into a new
|
|
295
|
+
canonical roadmap document.
|
|
277
296
|
|
|
278
|
-
|
|
279
|
-
- spamming full stack traces for normal offline scenarios.
|
|
280
|
-
- debug-only console noise left enabled by default.
|
|
297
|
+
## 5) File Map for Fast Onboarding
|
|
281
298
|
|
|
282
|
-
|
|
283
|
-
-
|
|
284
|
-
|
|
299
|
+
Backend:
|
|
300
|
+
- `src/server.mjs`
|
|
301
|
+
- API routes, WS upgrade, auth, runtime boot id
|
|
302
|
+
- `src/config.mjs`
|
|
303
|
+
- merged config parser and validation
|
|
304
|
+
- `src/auth.mjs`
|
|
305
|
+
- password hashing and auth checks
|
|
306
|
+
- `src/persistence.mjs`
|
|
307
|
+
- sessions, cluster registry, ACP tab/config persistence
|
|
308
|
+
- `src/terminal-manager.mjs`
|
|
309
|
+
- PTY lifecycle and persistence
|
|
310
|
+
- `src/terminal-session.mjs`
|
|
311
|
+
- terminal stream parsing, shell AI path, execution model
|
|
312
|
+
- `src/acp-manager.mjs`
|
|
313
|
+
- ACP definitions, runtime supervision, ACP tab lifecycle
|
|
314
|
+
- `src/acp-test-agent.mjs`
|
|
315
|
+
- local ACP smoke agent with slash-command fixtures
|
|
285
316
|
|
|
286
|
-
|
|
317
|
+
Frontend:
|
|
318
|
+
- `public/app.js`
|
|
319
|
+
- nearly all UI orchestration lives here
|
|
320
|
+
- `public/modules/url-auth.js`
|
|
321
|
+
- URL normalization and auth helpers
|
|
322
|
+
- `public/modules/session-meta.js`
|
|
323
|
+
- host display and compact path formatting
|
|
324
|
+
- `public/styles.css`
|
|
325
|
+
- all current UI contracts and responsive rules
|
|
326
|
+
- `public/index.html`
|
|
327
|
+
- shell DOM, layout bootstrapping, shortcuts modal
|
|
287
328
|
|
|
288
|
-
|
|
289
|
-
-
|
|
290
|
-
-
|
|
291
|
-
-
|
|
329
|
+
Tests and smoke:
|
|
330
|
+
- `test/acp-manager.mjs`
|
|
331
|
+
- richest ACP coverage
|
|
332
|
+
- `scripts/acp-browser-smoke.mjs`
|
|
333
|
+
- browser ACP smoke against a real running app and real Chrome remote debug
|
|
292
334
|
|
|
293
|
-
##
|
|
335
|
+
## 6) Debug and Testing Guidance
|
|
294
336
|
|
|
295
|
-
|
|
296
|
-
- It restarts one macOS launchctl node + several Linux pm2 nodes via SSH.
|
|
297
|
-
- Script contains aggressive cleanup on Linux nodes (reset/clean fallback);
|
|
298
|
-
use carefully in shared environments.
|
|
337
|
+
### 6.1 Basic quality gates
|
|
299
338
|
|
|
300
|
-
|
|
339
|
+
Run these before release or after meaningful ACP/UI changes:
|
|
301
340
|
|
|
302
|
-
Recommended checks:
|
|
303
341
|
1. `npm run lint`
|
|
304
342
|
2. `npm test`
|
|
305
343
|
3. `npm run build`
|
|
306
|
-
4. quick manual smoke:
|
|
307
|
-
- main host login
|
|
308
|
-
- add host (with and without password, inheritance path)
|
|
309
|
-
- reconnect flow (normal + Access login path)
|
|
310
|
-
- delete host
|
|
311
|
-
- restart backend and confirm runtime cache refresh (`rt` flow)
|
|
312
344
|
|
|
313
|
-
|
|
345
|
+
### 6.2 ACP test agent
|
|
346
|
+
|
|
347
|
+
Enable it with:
|
|
348
|
+
|
|
349
|
+
```bash
|
|
350
|
+
TABMINAL_ENABLE_TEST_AGENT=1 npm start -- --accept-terms
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
Useful slash commands in ACP Test Agent:
|
|
354
|
+
|
|
355
|
+
- `/demo`: richest happy-path demo
|
|
356
|
+
- `/plan`: plan and usage only
|
|
357
|
+
- `/diff`: terminal, diff, code/resource payloads
|
|
358
|
+
- `/permission`: permission flow
|
|
359
|
+
- `/cancel`: long-running cancel flow
|
|
360
|
+
- `/stale`: stale tool settlement path
|
|
361
|
+
- `/order`: message ordering around tools
|
|
362
|
+
- `/fail`: prompt error path
|
|
363
|
+
|
|
364
|
+
Use these instead of inventing ad-hoc prompts when validating ACP UI.
|
|
365
|
+
|
|
366
|
+
### 6.3 Browser smoke
|
|
367
|
+
|
|
368
|
+
Preferred browser smoke:
|
|
369
|
+
|
|
370
|
+
- `scripts/acp-browser-smoke.mjs`
|
|
371
|
+
|
|
372
|
+
It supports:
|
|
373
|
+
|
|
374
|
+
- Chrome remote debugging target
|
|
375
|
+
- ACP Test Agent slash-command flows
|
|
376
|
+
- attachment coverage
|
|
377
|
+
- tool/diff/code/terminal assertions
|
|
378
|
+
- restore-tail validation
|
|
379
|
+
|
|
380
|
+
Typical setup:
|
|
381
|
+
|
|
382
|
+
1. Start a local Tabminal instance with `TABMINAL_ENABLE_TEST_AGENT=1`
|
|
383
|
+
2. Run Chrome with remote debugging
|
|
384
|
+
3. Point smoke at that Chrome target and Tabminal URL
|
|
385
|
+
|
|
386
|
+
### 6.4 Availability/debug tips
|
|
387
|
+
|
|
388
|
+
If an ACP agent appears inconsistently available:
|
|
389
|
+
|
|
390
|
+
- Compare the backend runtime `PATH` with your interactive shell `PATH`.
|
|
391
|
+
- Do not assume your login shell and the running `npm start` environment match.
|
|
392
|
+
- Copilot and other CLIs may live in `~/.local/bin`; ACP discovery now augments
|
|
393
|
+
common user-local bin paths.
|
|
394
|
+
- Restore failures should not temporarily mark built-in definitions unavailable.
|
|
395
|
+
|
|
396
|
+
Relevant code:
|
|
397
|
+
- `src/acp-manager.mjs`
|
|
398
|
+
|
|
399
|
+
### 6.5 Focus and session-debug tips
|
|
400
|
+
|
|
401
|
+
If `Jump in` appears to bounce back to the original agent workspace:
|
|
402
|
+
|
|
403
|
+
- inspect agent-sync code first
|
|
404
|
+
- the previous bug was backend updates restoring preferred workspace on the
|
|
405
|
+
wrong session and stealing focus
|
|
406
|
+
|
|
407
|
+
If terminal preview proportions become huge:
|
|
408
|
+
|
|
409
|
+
- check whether a hidden terminal is still reporting resized dimensions
|
|
410
|
+
|
|
411
|
+
If you get noisy shell-ready notifications:
|
|
412
|
+
|
|
413
|
+
- check for internal execution events being surfaced to the frontend
|
|
414
|
+
|
|
415
|
+
## 7) Known Pitfalls
|
|
416
|
+
|
|
417
|
+
### 7.1 `SecurityError: insecure WebSocket from HTTPS page`
|
|
418
|
+
|
|
419
|
+
Cause:
|
|
420
|
+
- trying `ws://` from an HTTPS page
|
|
421
|
+
|
|
422
|
+
Mitigation:
|
|
423
|
+
- websocket URL must switch to `wss://` when page or host URL is HTTPS
|
|
424
|
+
|
|
425
|
+
### 7.2 `TypeError: Failed to fetch` during heartbeat
|
|
426
|
+
|
|
427
|
+
Typical causes:
|
|
428
|
+
- host down
|
|
429
|
+
- DNS/TLS failure
|
|
430
|
+
- CORS block
|
|
431
|
+
- network unreachable
|
|
432
|
+
- Cloudflare Access auth needed
|
|
433
|
+
|
|
434
|
+
Expected behavior:
|
|
435
|
+
- reconnect warning state, not noisy crash behavior
|
|
436
|
+
|
|
437
|
+
### 7.3 Cloudflare Access loops
|
|
438
|
+
|
|
439
|
+
- CORS headers alone do not solve auth redirects.
|
|
440
|
+
- The problem is usually Access challenge during API fetch.
|
|
441
|
+
- Current model is to detect redirect and open host root login page.
|
|
442
|
+
|
|
443
|
+
### 7.4 Same domain with different path as multiple hosts
|
|
444
|
+
|
|
445
|
+
- Not supported by current assumptions.
|
|
446
|
+
- Do not patch around this casually; it needs a deeper routing redesign.
|
|
447
|
+
|
|
448
|
+
## 8) Security and Risk Notes
|
|
449
|
+
|
|
450
|
+
- Product is high-privilege by design.
|
|
451
|
+
- AI features may send terminal or agent context to external providers.
|
|
452
|
+
- `--accept-terms` is the explicit risk-ack mechanism.
|
|
453
|
+
- Prefer least-privilege credentials and trusted providers.
|
|
454
|
+
|
|
455
|
+
## 9) Deployment and Ops Notes
|
|
456
|
+
|
|
457
|
+
- Local helper script:
|
|
458
|
+
- `reploy.sh`
|
|
459
|
+
- It restarts one macOS launchctl node plus several Linux `pm2` nodes via SSH.
|
|
460
|
+
- It includes aggressive cleanup behavior on Linux nodes; use carefully.
|
|
461
|
+
|
|
462
|
+
## 10) Change Safety Rules
|
|
314
463
|
|
|
315
|
-
- Do not move host
|
|
464
|
+
- Do not move host registry persistence back into browser-owned local state.
|
|
316
465
|
- Do not make sub-host auth failures trigger global logout.
|
|
317
466
|
- Do not remove `credentials: 'include'` from host fetch wrapper.
|
|
318
|
-
- Do not remove
|
|
467
|
+
- Do not remove the `1s` heartbeat or `5s` reconnect throttle without evidence.
|
|
319
468
|
- Do not reintroduce backend auto-create-session fallback.
|
|
320
|
-
- Do not
|
|
469
|
+
- Do not bring back JS-driven usage HUD width measurement.
|
|
470
|
+
- Do not let agent sync steal focus from a user-selected terminal session.
|
|
471
|
+
- Do not let hidden terminal tabs report bogus tiny sizes to the backend.
|
package/README.md
CHANGED
|
@@ -267,8 +267,8 @@ reliable.
|
|
|
267
267
|
|
|
268
268
|
## Architecture Snapshot
|
|
269
269
|
|
|
270
|
-
- Backend: Node.js, Koa, `node-pty
|
|
271
|
-
- Frontend:
|
|
270
|
+
- Backend: [`Node.js`](https://nodejs.org/), [`utilitas`](https://github.com/leask/utilitas), [`Koa`](https://github.com/koajs/koa), [`node-pty`](https://github.com/Tyriar/node-pty), [`WebSocket`](https://github.com/websockets/ws), [`ACP SDK`](https://github.com/acp-kit/acp-sdk)
|
|
271
|
+
- Frontend: [`Vanilla JS 😝`](http://vanilla-js.com/), [`xterm.js`](https://github.com/xtermjs/xterm.js), [`Monaco Editor`](https://github.com/microsoft/monaco-editor)
|
|
272
272
|
- Persistence: host-local files under `~/.tabminal`
|
|
273
273
|
- Native clients and packaging work live under:
|
|
274
274
|
- `apps/Apple`
|