zcode-acp-server 0.11.0 → 0.11.3
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 +3 -0
- package/dist/handlers/dispatch.js +13 -4
- package/dist/handlers/dispatch.js.map +1 -1
- package/dist/handlers/extensions.d.ts +7 -1
- package/dist/handlers/extensions.d.ts.map +1 -1
- package/dist/handlers/extensions.js +15 -1
- package/dist/handlers/extensions.js.map +1 -1
- package/dist/handlers/server-requests.d.ts.map +1 -1
- package/dist/handlers/server-requests.js +15 -4
- package/dist/handlers/server-requests.js.map +1 -1
- package/dist/handlers/session.d.ts +4 -2
- package/dist/handlers/session.d.ts.map +1 -1
- package/dist/handlers/session.js +111 -17
- package/dist/handlers/session.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/remote/hub-server.d.ts.map +1 -1
- package/dist/remote/hub-server.js +16 -0
- package/dist/remote/hub-server.js.map +1 -1
- package/dist/server.d.ts +33 -11
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +37 -10
- package/dist/server.js.map +1 -1
- package/docs/TROUBLESHOOTING.md +26 -3
- package/package.json +1 -1
package/docs/TROUBLESHOOTING.md
CHANGED
|
@@ -68,12 +68,35 @@ a hardcoded version string — read the message text to identify the root cause.
|
|
|
68
68
|
**Common causes:**
|
|
69
69
|
|
|
70
70
|
| Message fragment | Cause |
|
|
71
|
-
| -------------------------------- |
|
|
71
|
+
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
72
72
|
| `reader exited (backend dead)` | The zcode subprocess crashed/exited. Restart the editor session. |
|
|
73
|
-
| `timeout` | The per-attempt
|
|
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
74
|
| `pipe broken` | The stdin pipe to the zcode subprocess broke (process died mid-write). |
|
|
75
75
|
| `method not found (code -32601)` | The CLI genuinely is too old (< 0.14.8). Upgrade. |
|
|
76
|
-
|
|
|
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
|
+
|
|
78
|
+
**`Session is not active` (code -32004) in detail:**
|
|
79
|
+
|
|
80
|
+
The zcode backend keeps session runtimes ("residents") in memory and evicts
|
|
81
|
+
them after ~10 minutes idle (log event `session.resident_deactivated`,
|
|
82
|
+
`reason: "idle_timeout"`) or under its resident LRU cap. An evicted session
|
|
83
|
+
fails every session-scoped RPC with `-32004` while the session file stays
|
|
84
|
+
intact — the editor still shows its local copy of the conversation, but
|
|
85
|
+
sending a message errors and remote clients replay an empty session.
|
|
86
|
+
|
|
87
|
+
The bridge self-heals on every entry point:
|
|
88
|
+
|
|
89
|
+
- `session/prompt` reloads the session via `session/resume` and retries the
|
|
90
|
+
subscribe once when it sees this error;
|
|
91
|
+
- the "loaded in backend" verification carries a 5-minute TTL
|
|
92
|
+
(`BACKEND_RESIDENT_TTL_MS`), so `session/load` / `session/resume` re-issue
|
|
93
|
+
the backend resume RPC instead of trusting a stale in-memory flag;
|
|
94
|
+
- `ensureRealSession` (config/slash/extension entry points) reloads a stale
|
|
95
|
+
mapping before use, unless a turn is in flight.
|
|
96
|
+
|
|
97
|
+
If the error still surfaces, the resume itself is failing — check the backend
|
|
98
|
+
log (`~/.zcode/cli/log/zcode-YYYY-MM-DD.jsonl`) for the underlying cause
|
|
99
|
+
(corrupt session file, lock contention from another zcode process).
|
|
77
100
|
|
|
78
101
|
**Troubleshooting steps:**
|
|
79
102
|
|