zcode-acp-server 0.91.0 → 0.93.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/backend/client.d.ts +9 -0
- package/dist/backend/client.d.ts.map +1 -1
- package/dist/backend/client.js +31 -0
- package/dist/backend/client.js.map +1 -1
- package/dist/backend/listener.d.ts +26 -0
- package/dist/backend/listener.d.ts.map +1 -1
- package/dist/backend/listener.js +61 -0
- package/dist/backend/listener.js.map +1 -1
- package/dist/code-fingerprint.json +2 -2
- package/dist/config/account-provider.d.ts +64 -2
- package/dist/config/account-provider.d.ts.map +1 -1
- package/dist/config/account-provider.js +10 -4
- package/dist/config/account-provider.js.map +1 -1
- package/dist/config/model-cache.d.ts.map +1 -1
- package/dist/config/model-cache.js +5 -6
- package/dist/config/model-cache.js.map +1 -1
- package/dist/config/options.d.ts +25 -5
- package/dist/config/options.d.ts.map +1 -1
- package/dist/config/options.js +36 -8
- package/dist/config/options.js.map +1 -1
- package/dist/config/registry-context-window.d.ts +53 -0
- package/dist/config/registry-context-window.d.ts.map +1 -0
- package/dist/config/registry-context-window.js +305 -0
- package/dist/config/registry-context-window.js.map +1 -0
- package/dist/config/reply-language.d.ts +18 -0
- package/dist/config/reply-language.d.ts.map +1 -0
- package/dist/config/reply-language.js +35 -0
- package/dist/config/reply-language.js.map +1 -0
- package/dist/config/user-config.d.ts +13 -0
- package/dist/config/user-config.d.ts.map +1 -1
- package/dist/config/user-config.js +11 -0
- package/dist/config/user-config.js.map +1 -1
- package/dist/config/workflow-gate.d.ts +39 -21
- package/dist/config/workflow-gate.d.ts.map +1 -1
- package/dist/config/workflow-gate.js +45 -29
- package/dist/config/workflow-gate.js.map +1 -1
- package/dist/handlers/background-tasks.d.ts +36 -0
- package/dist/handlers/background-tasks.d.ts.map +1 -1
- package/dist/handlers/background-tasks.js +125 -12
- package/dist/handlers/background-tasks.js.map +1 -1
- package/dist/handlers/dispatch.js +9 -10
- package/dist/handlers/dispatch.js.map +1 -1
- package/dist/handlers/extensions.d.ts.map +1 -1
- package/dist/handlers/extensions.js +8 -2
- package/dist/handlers/extensions.js.map +1 -1
- package/dist/handlers/session.d.ts +12 -0
- package/dist/handlers/session.d.ts.map +1 -1
- package/dist/handlers/session.js +316 -65
- package/dist/handlers/session.js.map +1 -1
- package/dist/i18n.d.ts +3 -0
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +2 -0
- package/dist/i18n.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/remote/settings-endpoint.d.ts.map +1 -1
- package/dist/remote/settings-endpoint.js +64 -11
- package/dist/remote/settings-endpoint.js.map +1 -1
- package/dist/server.d.ts +18 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +29 -14
- package/dist/server.js.map +1 -1
- package/dist/settings/workflow.d.ts +5 -4
- package/dist/settings/workflow.d.ts.map +1 -1
- package/dist/settings/workflow.js +5 -4
- package/dist/settings/workflow.js.map +1 -1
- package/dist/translators/event-translator.d.ts +25 -0
- package/dist/translators/event-translator.d.ts.map +1 -1
- package/dist/translators/event-translator.js +95 -4
- package/dist/translators/event-translator.js.map +1 -1
- package/dist/workflow/quota-resume.d.ts.map +1 -1
- package/dist/workflow/quota-resume.js +6 -5
- package/dist/workflow/quota-resume.js.map +1 -1
- package/docs/BACKLOG.md +100 -0
- package/package.json +1 -1
package/docs/BACKLOG.md
CHANGED
|
@@ -282,6 +282,106 @@ ladder is unaffected; at most a model-list divergence on
|
|
|
282
282
|
CN-unlinked-Start machines (host lists Start models the bridge's snapshot
|
|
283
283
|
does not). The CLI still self-reports `0.17.1` (apps/zcode-cli/package.json).
|
|
284
284
|
|
|
285
|
+
**4.0.0 audit (2026-11-24, commit `a4b44451` — source root 4.0.0, CLI 0.18.0;
|
|
286
|
+
checkout synced, protocol purely additive, ONE default behavior change; three
|
|
287
|
+
small bridge items shipped; the desktop on this machine is still 3.18.2)**:
|
|
288
|
+
2,209 files, mostly desktop/UI, MCP and tool-search work. The shared protocol
|
|
289
|
+
schema (`packages/shared/src/zcode-protocol/index.ts`) is +76/−1 — purely
|
|
290
|
+
additive: (1) a new server→client ask `session/readReplyLanguage` (params
|
|
291
|
+
`{sessionId}`, strict result `{language: string | null}`, 2s CLI-side cap,
|
|
292
|
+
index.ts:2175-2183); (2) two defaulted keys on the
|
|
293
|
+
`session/requestRuntimePreferences` RESULT — `totalTokensReminderEnabled`
|
|
294
|
+
(default `false`) and `agentAlwaysBackgroundEnabled` (default `true`,
|
|
295
|
+
index.ts:2206-2226); (3) an optional `turn.started` payload field
|
|
296
|
+
`isFirstMessage` (the mapper strips it for legacy clients,
|
|
297
|
+
`session-mapper.ts:396-402`); (4) the workspace-hook trust reason code
|
|
298
|
+
`workspace_hook_script_unavailable`; (5) `ZCODE_PROVIDER_PROJECT_TOKEN_NETWORK_ERROR`
|
|
299
|
+
= -32033 (a host answer code for the interactive-account token refresh); (6)
|
|
300
|
+
plugin `workspaceTrust` + the `plugins/workspaceTrust` method; (7) the plugin
|
|
301
|
+
store listing's `regions`. No method or field was removed.
|
|
302
|
+
|
|
303
|
+
The ONE behavior change: **Agent calls default to the background**
|
|
304
|
+
(`AgentRuntimeConfig.subagents.alwaysBackground`, `07-subagent.md:638-639`).
|
|
305
|
+
Every Agent call returns `async_launched` at once, the parent turn ends, and
|
|
306
|
+
the result comes back through a backend-owned follow-up turn
|
|
307
|
+
(`inputSource:"background_task"`). The bridge's follow-up turns are text-only
|
|
308
|
+
today (the BackgroundTaskListener forwards deltas; no tool cards, permission
|
|
309
|
+
or sandbox asks, and nothing for `session/cancel` to find), so `ensureBackend`
|
|
310
|
+
pins `agentAlwaysBackgroundEnabled:false` on >= 4.0.0 desktop bundles and omits
|
|
311
|
+
the key on <= 3.18.2 (strict schema there — "Unrecognized key"). Running
|
|
312
|
+
follow-up turns inside the still-open prompt is the agreed next step. Related
|
|
313
|
+
wire fact: a background subagent's own tool calls are mirrored onto the parent
|
|
314
|
+
session's stream with `source:"subagent"`
|
|
315
|
+
(`core/src/subagent/tool-event-mirror.ts:38-83`); the bridge does not
|
|
316
|
+
distinguish them yet, so they render as ordinary tool cards — decide after
|
|
317
|
+
live testing whether to fold them.
|
|
318
|
+
|
|
319
|
+
Bridge items shipped with this audit:
|
|
320
|
+
|
|
321
|
+
1. **ALIGNED — `session/readReplyLanguage` is answered at frame arrival.** The
|
|
322
|
+
CLI reads the Agent reply-language setting from its host before EVERY
|
|
323
|
+
input-attachment collection on a main turn and never caches it
|
|
324
|
+
(`core/src/runtime/methods/context-refresh.ts:140-165`); unanswered it only
|
|
325
|
+
skipped that announcement, but the bridge warned on every ask.
|
|
326
|
+
`readReplyLanguage` (src/config/reply-language.ts) reads `replyLanguage`
|
|
327
|
+
from `~/.zcode/v2/setting.json` live — the same setting the desktop host
|
|
328
|
+
answers from (`desktop/src/main/index.ts:1323,2368`) — pass-through, `null`
|
|
329
|
+
when unset. No bridge-side validation.
|
|
330
|
+
2. **ALIGNED — the runtime-preferences reply carries
|
|
331
|
+
`agentAlwaysBackgroundEnabled` on >= 4.0.0 bundles only, following the
|
|
332
|
+
upstream default (true) with a user-config opt-out**
|
|
333
|
+
(`ZcodeBackend.agentAlwaysBackgroundEnabled`, set in `ensureBackend` through
|
|
334
|
+
`desktopBundleAtLeast("4.0.0")`; `subagents.alwaysBackground` in the user
|
|
335
|
+
config overrides — an explicit value on an older bundle warns once and is
|
|
336
|
+
ignored, its strict schema cannot carry the key). The follow-up turns this
|
|
337
|
+
posture produces are covered by the held-prompt chain shipped with this
|
|
338
|
+
audit (`runEventTurn` holds the open prompt for outstanding subagent work
|
|
339
|
+
and adopts each follow-up turn into it — ADR-0034); without a readable
|
|
340
|
+
desktop bundle the key is omitted and a 4.0 backend there runs
|
|
341
|
+
always-background.
|
|
342
|
+
3. **ALIGNED — a failed client-config fetch reads
|
|
343
|
+
`{mode:"onDemand", enabled:true, source:"default"}`.** Upstream's own fold
|
|
344
|
+
(`zcodeAgentService.ts:4466-4492`: "读取抛错说明不了服务端意图", latched for
|
|
345
|
+
the host process; `alwaysOn` is rejected there because it registers ten
|
|
346
|
+
workflow tools in every new session's first turn). The bridge used to read
|
|
347
|
+
that failure `{mode:"unknown", enabled:false}`, which closed the workflow
|
|
348
|
+
entry points on every offline boot. A 200 without the key still reads
|
|
349
|
+
disabled; `mode:"unknown"` remains only the no-verdict face. ADR-0029
|
|
350
|
+
revised.
|
|
351
|
+
|
|
352
|
+
Verified unchanged against the bridge's dependencies (zero diff):
|
|
353
|
+
`provider-runtime-env.ts`, `runtime-paths.ts`,
|
|
354
|
+
`zcode-builtin-provider-config-source.ts`, `registry-service.ts`,
|
|
355
|
+
`model-catalog-port.ts`, `session-mode-port.ts`, `execution-state.ts`,
|
|
356
|
+
`verification-policy.ts`, `session-flow.ts` (the v4/command stop), and
|
|
357
|
+
`credential-security/bridge.ts` + `credentialCipherReplySchema`
|
|
358
|
+
(`validation.ts:51-55` — the host-delegation reply the bridge answers).
|
|
359
|
+
Small diffs with no hunk on a bridge wire: `server-operations.ts` (+48/−12 —
|
|
360
|
+
the two new preference keys threaded to `createRecord`, the `session/read`
|
|
361
|
+
`contentProfile` pass-through, `listSessionSubagents includeAllEnded`, an async
|
|
362
|
+
bash-shell resolver; stop's `activeAbortController`, compact, setModel and the
|
|
363
|
+
-32010 send-busy path are untouched), `turn-stop.ts` (+3/−1),
|
|
364
|
+
`session-mapper.ts` (+7), `cli/src/run.ts` (+80/−4 — new launch-only flags
|
|
365
|
+
`--agent-always-background` / `--total-tokens-reminder`; `toolDisallowlist`
|
|
366
|
+
still reaches only prompt/target/tui, never the app-server command),
|
|
367
|
+
`skills/roots.ts` (+2/−1, an `export`), the Edit/Write/Read/Bash handlers
|
|
368
|
+
(failure wording, read-state freshness, input validation order — the success
|
|
369
|
+
output shapes the bridge renders are untouched), and the `enc:v2:os` seal/open
|
|
370
|
+
path of `systemCredentialCipher.ts` (its +230/−78 is the Desktop auto-reset
|
|
371
|
+
and failure diagnostics — Gotcha in AGENTS.md). Two model-facing texts changed
|
|
372
|
+
and the bridge matches neither: the denylist denial in `permission/service.ts`
|
|
373
|
+
("Tool X is explicitly disallowed" → "Permission to use X has been denied.")
|
|
374
|
+
and the no-client denial reason in `permission/broker.ts`. Deferred: the
|
|
375
|
+
preinstalled document-tools PATH mirror (waits until that directory exists on
|
|
376
|
+
a real install), reading `enc:v2:env` credentials, and the v4 additive fields.
|
|
377
|
+
|
|
378
|
+
Live verification on a 4.0.0 bundle is PENDING (desktop not upgraded yet):
|
|
379
|
+
the catalog-probe pin (an `AUDITED` row from the installed `zcode.cjs`
|
|
380
|
+
sha256), no `session/readReplyLanguage` warn in the bridge log, one guarded
|
|
381
|
+
turn with a tool call, `/compact`, a `/model` switch, one TUI and one App
|
|
382
|
+
attach, and the always-background pin holding (Agent calls still return their
|
|
383
|
+
result inline).
|
|
384
|
+
|
|
285
385
|
**3.17.2 + 3.18.0 audit (2026-11-11, commits `a9fe401e`/`b95ebaff` — checkout
|
|
286
386
|
synced, purely additive protocol, ONE follow-up = #371)**: the machine's
|
|
287
387
|
desktop auto-updated 3.17.1 → 3.17.2 (runtime provider sync already ran; its
|