zcode-acp-server 0.88.1 → 0.89.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.
Files changed (45) hide show
  1. package/README.md +1 -1
  2. package/dist/code-fingerprint.json +2 -2
  3. package/dist/config/account-provider.d.ts.map +1 -1
  4. package/dist/config/account-provider.js +66 -18
  5. package/dist/config/account-provider.js.map +1 -1
  6. package/dist/config/deferred-probe-capability.d.ts +10 -1
  7. package/dist/config/deferred-probe-capability.d.ts.map +1 -1
  8. package/dist/config/deferred-probe-capability.js +41 -1
  9. package/dist/config/deferred-probe-capability.js.map +1 -1
  10. package/dist/config/start-plan-verdict.d.ts +45 -0
  11. package/dist/config/start-plan-verdict.d.ts.map +1 -0
  12. package/dist/config/start-plan-verdict.js +44 -0
  13. package/dist/config/start-plan-verdict.js.map +1 -0
  14. package/dist/handlers/account.d.ts +3 -1
  15. package/dist/handlers/account.d.ts.map +1 -1
  16. package/dist/handlers/account.js +7 -6
  17. package/dist/handlers/account.js.map +1 -1
  18. package/dist/handlers/background-tasks.d.ts +29 -0
  19. package/dist/handlers/background-tasks.d.ts.map +1 -1
  20. package/dist/handlers/background-tasks.js +97 -0
  21. package/dist/handlers/background-tasks.js.map +1 -1
  22. package/dist/handlers/replay.d.ts.map +1 -1
  23. package/dist/handlers/replay.js +22 -4
  24. package/dist/handlers/replay.js.map +1 -1
  25. package/dist/handlers/rewind.d.ts +55 -0
  26. package/dist/handlers/rewind.d.ts.map +1 -0
  27. package/dist/handlers/rewind.js +284 -0
  28. package/dist/handlers/rewind.js.map +1 -0
  29. package/dist/handlers/session.d.ts.map +1 -1
  30. package/dist/handlers/session.js +8 -0
  31. package/dist/handlers/session.js.map +1 -1
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +7 -1
  34. package/dist/index.js.map +1 -1
  35. package/dist/quota/startplan.d.ts +24 -1
  36. package/dist/quota/startplan.d.ts.map +1 -1
  37. package/dist/quota/startplan.js +40 -2
  38. package/dist/quota/startplan.js.map +1 -1
  39. package/dist/server.d.ts.map +1 -1
  40. package/dist/server.js +23 -1
  41. package/dist/server.js.map +1 -1
  42. package/docs/PROTOCOL.md +61 -10
  43. package/docs/REMOTE-CLIENTS.md +27 -0
  44. package/docs/TROUBLESHOOTING.md +20 -11
  45. package/package.json +1 -1
@@ -116,14 +116,20 @@ the desktop's Settings → Model Provider ("Use API key") counts too (#344): it
116
116
  lands in `~/.zcode/v2/provider_config.json` as a
117
117
  `zhipu-coding-plan-api-key` rule and the bridge reads it as an entitlement +
118
118
  request-key source. On 3.15+ / 3.17.x OAuth installs, Start Plan
119
- (`account:<family>-start-plan`) is entitled ONLY when `~/.zcode/v2/setting.json`
120
- records that family's connection as `kind: "start-plan"` AND the store holds
121
- `zcodejwttoken` (0.17.x backends answer Start Plan without interaction — the
122
- request-security edition disables per-request verification outright); a plain
123
- OAuth login leaves `zcodejwttoken` in the store but is NOT a Start Plan
124
- holding — upstream decides entitlement from the billing/balance plans
125
- (observed 2026-11-10: a Coding Plan login lit up Start Plan models
126
- GLM-5.2/GLM-5-Turbo for an account that never activated it). Keyless Start
119
+ (`account:<family>-start-plan`) entitlement is BILLING-AUTHORITATIVE
120
+ (#406): the bridge queries `billing/balance` with the store's
121
+ `zcodejwttoken` (warmed at session create, bounded 2s) — an active plan
122
+ entitles the family's Start Plan even though the desktop's
123
+ `providerFamilyConnectionSelections` never flips past
124
+ `individual-coding-plan` (3.17+ serves Start Plan as an overlay; do NOT
125
+ hand-edit that flag — the desktop's own credential resolution reads it and
126
+ breaks). The grant's capability list also filters the advertised models
127
+ (e.g. only `GLM-5.3-Flash` under a glm-5.3-flash-only grant). When the
128
+ billing query cannot run (offline, no `zcodejwttoken`, rate-limited), the
129
+ legacy gate decides: entitled ONLY when `setting.json` records the family's
130
+ connection as `kind: "start-plan"` (a plain OAuth login is not a holding —
131
+ observed 2026-11-10: a Coding Plan login lit up GLM-5.2/GLM-5-Turbo for an
132
+ account that never activated Start Plan). Keyless Start
127
133
  Plan requests stay declined (issue #123).
128
134
 
129
135
  **Desktop 3.15+ after an OAuth sign-in:** the store holds no plan key at all,
@@ -561,9 +567,12 @@ edition level; the interactive branch is unreachable), the bridge
561
567
  serves `zcodejwttoken` over `interaction/requestProviderRuntimeHeaders`
562
568
  (`startPlanRequestAuthFor`) and injects `ZCODE_APP_VERSION` from the desktop
563
569
  bundle (`builtinProviderEnv`), matching the desktop host's own
564
- `AccountProviderRequestAuthService`. A plain OAuth login (Coding Plan) is not
565
- enough — it leaves the JWT in the store but no start-plan selection, and the
566
- bridge correctly keeps Start Plan unentitled. If no Start Plan credential is
570
+ `AccountProviderRequestAuthService`. Entitlement no longer requires that
571
+ selection: the billing verdict (see above, #406) entitles the family while
572
+ billing reports an active plan, and a plain OAuth login (Coding Plan) only
573
+ counts when billing says so — when the billing query cannot run, the
574
+ `kind: "start-plan"` selection is the fallback gate. If no Start Plan
575
+ credential is
567
576
  present on
568
577
  disk (or if a future edition re-enables browser captcha), switch the session's
569
578
  provider to a GLM Coding Plan one; the bridge answers with
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zcode-acp-server",
3
- "version": "0.88.1",
3
+ "version": "0.89.0",
4
4
  "description": "Agent Client Protocol (ACP) server bridging headless ZCode to editors like Zed and JetBrains.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",