zcode-acp-server 0.34.0 → 0.35.0
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/README.md +1 -1
- package/dist/code-fingerprint.json +2 -2
- package/dist/handlers/session.d.ts +14 -0
- package/dist/handlers/session.d.ts.map +1 -1
- package/dist/handlers/session.js +122 -17
- package/dist/handlers/session.js.map +1 -1
- package/dist/remote/hub-server.d.ts.map +1 -1
- package/dist/remote/hub-server.js +7 -6
- package/dist/remote/hub-server.js.map +1 -1
- package/dist/remote/session-rename-endpoint.d.ts.map +1 -1
- package/dist/remote/session-rename-endpoint.js +2 -0
- package/dist/remote/session-rename-endpoint.js.map +1 -1
- package/dist/server.d.ts +12 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +12 -0
- package/dist/server.js.map +1 -1
- package/dist/terminal-title.d.ts +55 -0
- package/dist/terminal-title.d.ts.map +1 -0
- package/dist/terminal-title.js +114 -0
- package/dist/terminal-title.js.map +1 -0
- package/docs/TROUBLESHOOTING.md +59 -7
- package/package.json +1 -1
package/docs/TROUBLESHOOTING.md
CHANGED
|
@@ -67,13 +67,13 @@ a hardcoded version string — read the message text to identify the root cause.
|
|
|
67
67
|
|
|
68
68
|
**Common causes:**
|
|
69
69
|
|
|
70
|
-
| Message fragment | Cause
|
|
71
|
-
| -------------------------------- |
|
|
72
|
-
| `reader exited (backend dead)` | The zcode subprocess crashed/exited. Restart the editor session.
|
|
73
|
-
| `timeout` | The per-attempt 5s subscribe deadline elapsed. The bridge retries transient timeouts once (2 attempts total, ~10.5s worst case); if both fail, the backend was unresponsive for that window.
|
|
74
|
-
| `pipe broken` | The stdin pipe to the zcode subprocess broke (process died mid-write).
|
|
75
|
-
| `method not found (code -32601)` | The CLI genuinely is too old (< 0.14.8). Upgrade.
|
|
76
|
-
| `Session is not active` (-32004) | The backend evicted the session's resident runtime (idle ~10min, or its LRU cap). The bridge self-heals via `session/resume` (see below).
|
|
70
|
+
| Message fragment | Cause |
|
|
71
|
+
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
72
|
+
| `reader exited (backend dead)` | The zcode subprocess crashed/exited. Restart the editor session. |
|
|
73
|
+
| `timeout` | The per-attempt 5s subscribe deadline elapsed. The bridge retries transient timeouts once (2 attempts total, ~10.5s worst case); if both fail, the backend was unresponsive for that window. |
|
|
74
|
+
| `pipe broken` | The stdin pipe to the zcode subprocess broke (process died mid-write). |
|
|
75
|
+
| `method not found (code -32601)` | The CLI genuinely is too old (< 0.14.8). Upgrade. |
|
|
76
|
+
| `Session is not active` (-32004) | The backend evicted the session's resident runtime (idle ~10min, or its LRU cap). The bridge self-heals via `session/resume` (see below). |
|
|
77
77
|
|
|
78
78
|
**`Session is not active` (code -32004) in detail:**
|
|
79
79
|
|
|
@@ -382,6 +382,26 @@ re-registered from the durable store without a resume (or left behind by a
|
|
|
382
382
|
failed one) therefore replayed nothing. Fixed by explicit backend-loaded
|
|
383
383
|
tracking; the backend also logs a warning now when `session/messages` errors.
|
|
384
384
|
|
|
385
|
+
### Remote access: a conversation replays only PARTLY on first entry
|
|
386
|
+
|
|
387
|
+
**Symptom:** entering a resumed conversation the FIRST time shows history
|
|
388
|
+
that ends in the middle; leaving and re-entering shows the full conversation.
|
|
389
|
+
Happens often (but not always) with large sessions.
|
|
390
|
+
|
|
391
|
+
**Cause:** the hub answers the resume request as soon as the incubated
|
|
392
|
+
terminal bridge registers — before the terminal's boot-resume finishes — so
|
|
393
|
+
the App's `session/load` raced the boot-resume for the SAME backend session.
|
|
394
|
+
Both sent `session/resume` concurrently, and `session/messages` reflects only
|
|
395
|
+
what the backend has hydrated so far: a query landing mid-restore returns a
|
|
396
|
+
PREFIX, which was replayed as if it were the whole conversation. Fixed by
|
|
397
|
+
single-flighting `session/resume` TOGETHER WITH its hydration settle per
|
|
398
|
+
backend session id (a concurrent load joins the in-flight flight and shares
|
|
399
|
+
its settled history snapshot; the settle requires two consecutive
|
|
400
|
+
non-growing reads, capped). The bridge log line
|
|
401
|
+
`session/load: replayed N messages (total M)` now prints the total
|
|
402
|
+
unconditionally — a first-entry total below the session's real size was the
|
|
403
|
+
signature of this bug.
|
|
404
|
+
|
|
385
405
|
### Start Plan (zcode-plan) providers fail headless — 1113 / signing errors
|
|
386
406
|
|
|
387
407
|
**Symptom:** every turn fails with HTTP 429 error `1113` ("Insufficient
|
|
@@ -433,6 +453,38 @@ tool output contains `Operation not permitted` — that warning is your signal
|
|
|
433
453
|
to suspect the sandbox. Path grants for legitimate writes go in
|
|
434
454
|
`.zcode/acp/sandbox.json`.
|
|
435
455
|
|
|
456
|
+
### UNRESOLVED: CLI (martty) freezes at an old state while the mobile app keeps updating
|
|
457
|
+
|
|
458
|
+
**Symptom (observed once, 2026-09, no live instance preserved):** a CLI window
|
|
459
|
+
attached to a conversation stops receiving everything — messages, model
|
|
460
|
+
dropdown, thought-level updates — while the mobile app on the same
|
|
461
|
+
conversation keeps receiving and interacting normally. The CLI stays frozen at
|
|
462
|
+
a state noticeably older than the conversation.
|
|
463
|
+
|
|
464
|
+
**Working hypotheses (in rough likelihood order), none confirmed:**
|
|
465
|
+
|
|
466
|
+
1. **Session-alias divergence** — the interaction moved to an ACP session id
|
|
467
|
+
the martty connection never adopted (e.g. a phone-side `session/new` racing
|
|
468
|
+
the window's binding). martty drops every update addressed to a session id
|
|
469
|
+
it does not know (same failure shape as the 2026-09-06 boot-create
|
|
470
|
+
diagnosis in AGENTS.md). Everything stalling at once — config updates
|
|
471
|
+
included — fits a sessionId mismatch, since all of them are session-scoped.
|
|
472
|
+
2. **Two different bridge processes** — the phone attached to the hub's serve
|
|
473
|
+
bridge while the CLI runs its own bridge: live events do not cross
|
|
474
|
+
processes by design (only session listings do). The CLI then only ever
|
|
475
|
+
updates for its own turns.
|
|
476
|
+
3. **martty stdio wedge** — the TUI's own input thread stalls; the bridge's
|
|
477
|
+
notifies buffer into the pipe and the mobile (WS path) is unaffected.
|
|
478
|
+
Bridge-side nothing is wrong; typing in the frozen CLI would also be dead.
|
|
479
|
+
|
|
480
|
+
**If it recurs, capture before closing anything:** whether typing still works
|
|
481
|
+
in the frozen CLI (separates hypothesis 3 from 1/2); the bridge's stderr with
|
|
482
|
+
`ZCODE_ACP_DEBUG=1` (do `session/update` notifies still leave?); the hub's
|
|
483
|
+
instance listing (`GET /api/instances`) — which bridge id the phone's
|
|
484
|
+
conversation is on vs the CLI's; and both ends' session ids (CLI transcript vs
|
|
485
|
+
phone). See also the resume-race diagnosis in the same period: a partial
|
|
486
|
+
first-entry replay is a different bug (history prefix), do not conflate.
|
|
487
|
+
|
|
436
488
|
## Log Debugging
|
|
437
489
|
|
|
438
490
|
### Enable verbose logging
|