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/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
- spawns `zcode-acp serve` — a headless bridge — in the project's cwd; it
73
- registers back within seconds and is reachable like any other instance. A
74
- live serve instance for the same workspace is reused instead of re-spawned
75
- (`reused:true`). The serve bridge lives for remote interest only: it exits
76
- ~10 minutes after the last client detaches and the last turn finishes, and
77
- its `session/new` always uses the project cwd regardless of what a client
78
- sends.
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zcode-acp-server",
3
- "version": "0.18.3",
3
+ "version": "0.19.1",
4
4
  "description": "Agent Client Protocol (ACP) server bridging headless ZCode to editors like Zed and JetBrains.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",