zcode-acp-server 0.92.0 → 0.93.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/README.md +5 -5
- package/README.zh-CN.md +2 -2
- 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/backend/resolve.d.ts +2 -0
- package/dist/backend/resolve.d.ts.map +1 -1
- package/dist/backend/resolve.js +18 -12
- package/dist/backend/resolve.js.map +1 -1
- package/dist/code-fingerprint.json +2 -2
- package/dist/config/deferred-probe-capability.d.ts.map +1 -1
- package/dist/config/deferred-probe-capability.js +1 -0
- package/dist/config/deferred-probe-capability.js.map +1 -1
- 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/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 +311 -63
- 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/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 +124 -0
- package/package.json +1 -1
package/docs/BACKLOG.md
CHANGED
|
@@ -282,6 +282,130 @@ 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 the 4.0.0 bundle (desktop auto-upgraded 2026-11-24
|
|
379
|
+
same day; `zcode.cjs` sha256 `0de95ddd…` — the `AUDITED` row is added,
|
|
380
|
+
deferred-probe-capability.ts): VERIFIED LIVE over one stdio-ACP probe
|
|
381
|
+
session — the catalog-probe pin holds (no mismatch warn; the
|
|
382
|
+
`deferredProbeCapabilityVerified` tests pass against the installed bundle),
|
|
383
|
+
`session/readReplyLanguage` answered at arrival on every input gather (no
|
|
384
|
+
unsupported-request warn), one guarded turn with a Bash tool call ran
|
|
385
|
+
end-to-end (tool card, output in the reply, end_turn), `/compact`
|
|
386
|
+
succeeded ("✓ compacted conversation context"), the provider registry
|
|
387
|
+
built its 6 providers, the runtime-preferences host-less default engaged
|
|
388
|
+
(always-background ON), and the Agent call demonstrably went BACKGROUND
|
|
389
|
+
(`async_launched` → `bg_*` task card → task completed). PARTIALLY verified:
|
|
390
|
+
the full held-prompt chain — the probe run's prompt was stopped from the
|
|
391
|
+
App (the probe inherited the remote env and a remote-desktop client
|
|
392
|
+
attached mid-run), the cancel correctly ended the PROMPT while the
|
|
393
|
+
subagent kept running and its follow-up fell back to the no-prompt
|
|
394
|
+
notification path (ADR-0034 rule 5 exercised live), but the
|
|
395
|
+
adopt-into-held-prompt path itself did not get its end-to-end pass. Still
|
|
396
|
+
open for a manual run: the held chain end-to-end, a `/model` switch, and
|
|
397
|
+
one TUI + one App attach. The bun-boot observation was followed up the
|
|
398
|
+
same day: retested after the bun upgrade (1.4.5) — still deterministic,
|
|
399
|
+
root cause pinned. The 4.0 core STATICALLY imports `node:sea`
|
|
400
|
+
(`apps/zcode-cli/packages/core/src/environment.ts:1`; every other
|
|
401
|
+
node:sea use upstream is the guarded `process.getBuiltinModule` form) and
|
|
402
|
+
bun implements `node:sqlite` but not `node:sea` ("No such built-in
|
|
403
|
+
module", exit 1). The interpreter ladder's module probe now requires BOTH
|
|
404
|
+
modules (`nodeSupportsBackendRuntime`, resolve.ts), so bun's node shim —
|
|
405
|
+
first on PATH under mise — is skipped upfront instead of costing one dead
|
|
406
|
+
spawn per boot; a future bun that implements node:sea passes the probe
|
|
407
|
+
again.
|
|
408
|
+
|
|
285
409
|
**3.17.2 + 3.18.0 audit (2026-11-11, commits `a9fe401e`/`b95ebaff` — checkout
|
|
286
410
|
synced, purely additive protocol, ONE follow-up = #371)**: the machine's
|
|
287
411
|
desktop auto-updated 3.17.1 → 3.17.2 (runtime provider sync already ran; its
|