zcode-acp-server 0.18.3 → 0.19.1
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/dist/bin/hub.d.ts +7 -0
- package/dist/bin/hub.d.ts.map +1 -1
- package/dist/bin/hub.js +21 -0
- package/dist/bin/hub.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/remote/config.d.ts +18 -0
- package/dist/remote/config.d.ts.map +1 -1
- package/dist/remote/config.js +13 -1
- package/dist/remote/config.js.map +1 -1
- package/dist/remote/endpoint.d.ts.map +1 -1
- package/dist/remote/endpoint.js +4 -0
- package/dist/remote/endpoint.js.map +1 -1
- package/dist/remote/hub-sandbox.d.ts +60 -0
- package/dist/remote/hub-sandbox.d.ts.map +1 -0
- package/dist/remote/hub-sandbox.js +155 -0
- package/dist/remote/hub-sandbox.js.map +1 -0
- package/dist/remote/hub-server.d.ts +49 -3
- package/dist/remote/hub-server.d.ts.map +1 -1
- package/dist/remote/hub-server.js +381 -44
- package/dist/remote/hub-server.js.map +1 -1
- package/dist/remote/session-list-endpoint.d.ts +51 -0
- package/dist/remote/session-list-endpoint.d.ts.map +1 -0
- package/dist/remote/session-list-endpoint.js +153 -0
- package/dist/remote/session-list-endpoint.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +8 -0
- package/dist/server.js.map +1 -1
- package/docs/REMOTE-CLIENTS.md +88 -26
- package/docs/REMOTE.md +35 -9
- package/package.json +1 -1
package/docs/REMOTE.md
CHANGED
|
@@ -39,7 +39,11 @@ manually). It does three things only: token auth, instance discovery, and
|
|
|
39
39
|
byte-level proxying (ACP WebSocket plus read-only session files) — no session
|
|
40
40
|
state, no path semantics. It exits after ~10 idle minutes and is re-spawned
|
|
41
41
|
on demand. Each bridge registers every 10s as a heartbeat and drops out of
|
|
42
|
-
discovery ~30s after it stops.
|
|
42
|
+
discovery ~30s after it stops. **Sandbox inheritance is self-healed:** a hub
|
|
43
|
+
born inside the Seatbelt wrap (a sandboxed backend spawned it — marked via
|
|
44
|
+
`ZCODE_ACP_SANDBOX_ACTIVE`) relaunches itself through launchd, outside the
|
|
45
|
+
sandbox, before binding; inside the sandbox macOS would refuse its opening of
|
|
46
|
+
the visible session terminal (TCC), breaking remote session-create.
|
|
43
47
|
|
|
44
48
|
**Discovery API** (for client authors; fields are additive-only):
|
|
45
49
|
|
|
@@ -68,14 +72,36 @@ ran a session (system temp trees, `~/.zcode` itself, and vanished
|
|
|
68
72
|
directories filtered out), newest activity first. The list gates the POST —
|
|
69
73
|
paths outside it get 403 (a convenience bound, not a security boundary: a
|
|
70
74
|
token holder can already drive an editor-bridge session in any cwd; the
|
|
71
|
-
trust boundary is the token). On create the hub
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
trust boundary is the token). On create the hub incubates a VISIBLE
|
|
76
|
+
interactive REPL in the machine's terminal (ADR-0016, macOS; headless/SSH or
|
|
77
|
+
`ZCODE_ACP_HUB_TERMINAL=0` falls back to the detached headless
|
|
78
|
+
`zcode-acp serve`); its bridge registers back within seconds (budget ~20s)
|
|
79
|
+
and is reachable like any other instance. The hub itself is a background
|
|
80
|
+
process with no terminal, so nothing is auto-detected: the target terminal
|
|
81
|
+
resolves as `ZCODE_ACP_HUB_TERMINAL_COMMAND` → `ZCODE_ACP_HUB_TERMINAL_APP`
|
|
82
|
+
(built-in launch recipes for Terminal, iTerm, WezTerm, kitty, Alacritty,
|
|
83
|
+
Ghostty; other names pass through to `open -a`) → plain Terminal.app. Warp
|
|
84
|
+
cannot execute scripts or commands programmatically (warpdotdev/warp#1917,
|
|
85
|
+
#3959) and is deliberately unsupported — it degrades to the headless bridge.
|
|
86
|
+
A live serve-origin instance for
|
|
87
|
+
the same workspace is reused instead of re-spawned (`reused:true`). A
|
|
88
|
+
terminal-REPL instance lives while its window lives; the headless fallback
|
|
89
|
+
exits ~10 minutes after the last client detaches and the last turn
|
|
90
|
+
finishes. Session roots are pinned to the project cwd in both surfaces
|
|
91
|
+
regardless of what a client sends.
|
|
92
|
+
|
|
93
|
+
**Remote session-resume** (ADR-0015). Remote clients can also reopen a
|
|
94
|
+
PREVIOUS conversation of a project — including closed ones no bridge
|
|
95
|
+
currently advertises (discovery lists only running conversations):
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
GET /api/projects/sessions?workspacePath=… → {workspacePath, instance, sessions}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The listing is the project's full backend session store; the hub incubates
|
|
102
|
+
the project's serve bridge on first listing and reuses it after. Resume is
|
|
103
|
+
the normal attach flow with `session/load` on a listed backend id. See
|
|
104
|
+
`docs/REMOTE-CLIENTS.md` ("Resuming a closed session") for the client contract.
|
|
79
105
|
|
|
80
106
|
`sessions` lists the project's **currently running** conversations (live
|
|
81
107
|
editor tabs and remote attachments) under the same ACP session ids the
|