The first commit updated only tests/plugin-agent.test.ts, leaving four
/acp-cache forwarding assertions pinning the pre-#2072 body shape (no
nativeCaller field) in dsh-acp / opencode-acp-command / opencode-v2 —
CI's full suite caught them. Add nativeCaller: true to each expected
body (the new host-native contract), widen the ToolCall capture type in
opencode-acp-command.test.ts accordingly.
The three new /acp cases used optional-chaining invocation (`?.()`),
yielding Promise<void> | undefined — no assert.rejects overload matches
under tsconfig.json (the CI gate). Use the file's existing non-null
invocation (`!()`) instead. Type-only; runtime unchanged (12/12).
In plugin mode (opencode/pi/dsh) the proxy can't exit on its own, so a long-
lived host keeps running stale code after auto-update installs a newer version
on disk -- the 'restart bili' warnings go unseen (37x in one field log). This
makes staleness visible where the user/model actually looks: the interactive
/acp command now appends a one-line warning when /__bili/status reports stale
(running vs installed), pointing at restarting the host or enabling
--auto-restart-on-update. Display-only (ignored:true synthetic message), so it
never pollutes model context; probe soft-fails so an unreachable status endpoint
can't break /acp.
Docs (README en+zh): note that 'restart bili' means restarting the HOST for
plugin lanes, and document the new bounded-retry/backoff behavior for persistent
install failures (commit 1). No new config/env/CLI surface added.
Closes part of #1603 (Defect 1).
Closes#1970
- package.json: npm run typecheck now targets the root tsconfig.json
(include: src + tests) instead of tsconfig.build.json (src only);
all four CI workflows inherit the widened gate via the script.
- tsconfig.json: lib ES2022 -> ES2024 (type-only; tests use
Promise.withResolvers & co.; src stays clean under it; no effect on
tsup/esbuild output).
- 276 test files: type-level-only fixes (import sources, missing
fixture fields filled with src-default values, narrowing, explicit
annotations, single-expression casts). No assertion changes, no
runtime behavior changes.
- src/agent/dsh-acp.ts: export CommandOutcome / CommandsService types
(type-only; erased at build).
Register the human entry point to the acp_cache prompt-cache reconciliation report on every client that has a user-typable command surface, in both native mode and bili launcher mode:
- pi/omp: already covered via the shared factory (/acp-cache [full])
- opencode V1 (launcher + native): /acp-cache [full] in createAcpCommandHooks; report rendered as an ignored message wrapped in [acp-cache] markers, which the proxy strips from model context by content signature before it reaches the wire
- opencode V2: /acp-cache [full] via ctx.command.transform; rendered as a synthetic message (inert body, report in the visible description, 8 KB cap vs the 1 KB panel cap because the report tail is payload)
- dsh (launcher-injected + native profile): session-bound acp_cache forward (initiator session id, latest-conversation fallback); default detail only - the dsh command API passes no arguments
- legacy opencode-acp sessions (#920): explicit unavailable notice instead of a raw 404 (their traffic bypasses this proxy's compression state)
- Claude Code: no in-process command API; bili plugin install claude now also writes <configdir>/commands/acp-cache.md (model-mediated markdown command driving the acp_cache MCP tool), content-owned install/remove never clobbers foreign files
- codex/kimi/hermes: no user-typable command seam exists - documented, acp_cache remains reachable model-side via the bili MCP server