@kodax-ai/kodax 0.7.76 → 0.7.77

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 (115) hide show
  1. package/CHANGELOG.md +595 -380
  2. package/LICENSE +158 -158
  3. package/README.md +1608 -1550
  4. package/README_CN.md +942 -896
  5. package/config-templates/config.example.jsonc +33 -33
  6. package/config-templates/integrations/a2a.example.jsonc +98 -98
  7. package/config-templates/integrations/extensions.example.jsonc +7 -7
  8. package/config-templates/integrations/mcp.example.jsonc +16 -16
  9. package/dist/builtin/code-review/SKILL.md +22 -22
  10. package/dist/builtin/skill-creator/scripts/aggregate-benchmark.d.ts +46 -46
  11. package/dist/builtin/skill-creator/scripts/analyze-benchmark.d.ts +46 -46
  12. package/dist/builtin/skill-creator/scripts/compare-runs.d.ts +62 -62
  13. package/dist/builtin/skill-creator/scripts/generate-review.d.ts +33 -33
  14. package/dist/builtin/skill-creator/scripts/grade-evals.d.ts +73 -73
  15. package/dist/builtin/skill-creator/scripts/improve-description.d.ts +23 -23
  16. package/dist/builtin/skill-creator/scripts/init-skill.d.ts +14 -14
  17. package/dist/builtin/skill-creator/scripts/install-skill.d.ts +29 -29
  18. package/dist/builtin/skill-creator/scripts/package-skill.d.ts +38 -38
  19. package/dist/builtin/skill-creator/scripts/quick-validate.d.ts +8 -8
  20. package/dist/builtin/skill-creator/scripts/run-eval.d.ts +66 -66
  21. package/dist/builtin/skill-creator/scripts/run-loop.d.ts +49 -49
  22. package/dist/builtin/skill-creator/scripts/run-trigger-eval.d.ts +58 -58
  23. package/dist/chunks/agent-NGSWFE73.js +2 -0
  24. package/dist/chunks/argument-completer-WGGZPEEO.js +2 -0
  25. package/dist/chunks/chunk-27QLRH3D.js +5 -0
  26. package/dist/chunks/chunk-2MQPVY6P.js +770 -0
  27. package/dist/chunks/chunk-3DD4QEBH.js +22 -0
  28. package/dist/chunks/chunk-6WAPVAGQ.js +74 -0
  29. package/dist/chunks/chunk-AOENDSVN.js +448 -0
  30. package/dist/chunks/{chunk-PXKSE54E.js → chunk-EH7AOMJ7.js} +1 -1
  31. package/dist/chunks/{chunk-SMT2JSM3.js → chunk-FNW2XUL5.js} +9 -9
  32. package/dist/chunks/chunk-FSXI4MAV.js +78 -0
  33. package/dist/chunks/{chunk-RDXRM3UI.js → chunk-HORNWBYR.js} +1 -1
  34. package/dist/chunks/chunk-HV2GMZUZ.js +343 -0
  35. package/dist/chunks/chunk-IQT4RPCE.js +46 -0
  36. package/dist/chunks/{chunk-4PWPNCNK.js → chunk-JS2BHGJP.js} +2 -2
  37. package/dist/chunks/chunk-OAMKECRG.js +381 -0
  38. package/dist/chunks/{chunk-HS3XHF3R.js → chunk-ON2WG2LG.js} +2 -2
  39. package/dist/chunks/{chunk-HGT6WQ24.js → chunk-RUGAAHTF.js} +17 -17
  40. package/dist/chunks/chunk-TGCG7U2W.js +37 -0
  41. package/dist/chunks/chunk-XSA37BVM.js +5 -0
  42. package/dist/chunks/compaction-config-BE7VYWH6.js +2 -0
  43. package/dist/chunks/{construction-bootstrap-5F5KF2BZ.js → construction-bootstrap-RPRL3L7R.js} +1 -1
  44. package/dist/chunks/dist-FDSOIR35.js +2 -0
  45. package/dist/chunks/dist-ZZBNVTKU.js +2 -0
  46. package/dist/chunks/host-QAKQVC4A.js +2 -0
  47. package/dist/chunks/run-manager-N4UFWA2D.js +2 -0
  48. package/dist/chunks/{utils-X3TEH6IO.js → utils-AUHCI4D5.js} +1 -1
  49. package/dist/index.d.ts +17 -16
  50. package/dist/index.js +2 -2
  51. package/dist/kodax_bootstrap.js +25 -25
  52. package/dist/kodax_cli.js +1276 -1229
  53. package/dist/provider-capabilities.json +392 -362
  54. package/dist/runtime-worker.js +1162 -1115
  55. package/dist/sdk-a2a.d.ts +12 -11
  56. package/dist/sdk-a2a.js +1 -1
  57. package/dist/sdk-agent.d.ts +56 -21
  58. package/dist/sdk-agent.js +1 -1
  59. package/dist/sdk-coding.d.ts +120 -21
  60. package/dist/sdk-coding.js +1 -1
  61. package/dist/sdk-experimental-memory.d.ts +14 -597
  62. package/dist/sdk-experimental-memory.js +1 -1
  63. package/dist/sdk-llm.d.ts +218 -6
  64. package/dist/sdk-llm.js +1 -1
  65. package/dist/sdk-mcp.js +1 -1
  66. package/dist/sdk-media.d.ts +1 -1
  67. package/dist/sdk-media.js +1 -1
  68. package/dist/sdk-repl.d.ts +15 -14
  69. package/dist/sdk-repl.js +1 -1
  70. package/dist/sdk-runtime.d.ts +34 -18
  71. package/dist/sdk-runtime.js +1 -1
  72. package/dist/sdk-session.d.ts +7 -6
  73. package/dist/sdk-session.js +1 -1
  74. package/dist/sdk-skills.js +1 -1
  75. package/dist/semantic-worker.js +14 -14
  76. package/dist/types-chunks/{base.d-ChvpaKjZ.d.ts → base.d-4e74xDdy.d.ts} +13 -1
  77. package/dist/types-chunks/{bash-prefix-extractor.d-r1beOESM.d.ts → bash-prefix-extractor.d-pZdu6qt7.d.ts} +197 -5
  78. package/dist/types-chunks/{capability-learning.d-DPrYxRjF.d.ts → capability-learning.d-CVsdHw4j.d.ts} +1 -1
  79. package/dist/types-chunks/{capsule.d-zeqV4IQX.d.ts → capsule.d-CxCm1KZz.d.ts} +2 -2
  80. package/dist/types-chunks/{commands.d-DUxnK2TU.d.ts → commands.d-BccESAMV.d.ts} +5 -5
  81. package/dist/types-chunks/{guardrail.d-qjuKJZ31.d.ts → guardrail.d-B0PwAZVR.d.ts} +3 -3
  82. package/dist/types-chunks/{guardrail.d-CWYD1bdL.d.ts → guardrail.d-CJx9RRd3.d.ts} +1 -1
  83. package/dist/types-chunks/{history-retrieval.d-BKTJIrVd.d.ts → history-retrieval.d-B__aEN62.d.ts} +2 -2
  84. package/dist/types-chunks/{public-api.d-CX4B11qY.d.ts → public-api.d--fF88JrC.d.ts} +3 -3
  85. package/dist/types-chunks/{run-manager.d-B9fEIjZk.d.ts → run-manager.d-B47hIqnI.d.ts} +1 -1
  86. package/dist/types-chunks/{sdk-session-B0fhAOPa.d.ts → sdk-session-CLWf8Adb.d.ts} +3 -3
  87. package/dist/types-chunks/{side-query.d-DWTMsndP.d.ts → side-query.d-5JvXhuOZ.d.ts} +22 -10
  88. package/dist/types-chunks/types-LanCEDj8.d.ts +623 -0
  89. package/dist/types-chunks/{types.d-DEctY20M.d.ts → types.d-CODuyyqy.d.ts} +2 -2
  90. package/dist/types-chunks/{types.d-Bm_y6YuM.d.ts → types.d-DCsKM8aT.d.ts} +4 -4
  91. package/dist/types-chunks/{types.d-CSmF0t0n.d.ts → types.d-DIpZJKUl.d.ts} +15 -0
  92. package/dist/types-chunks/{types.d-sRLugmjy.d.ts → types.d-RdWRfUEs.d.ts} +47 -4
  93. package/dist/types-chunks/{utils.d-D0wPxz8y.d.ts → utils.d-CDduqbFw.d.ts} +5 -5
  94. package/docs/SDK_EMBEDDER_GUIDE.md +197 -68
  95. package/package.json +2 -1
  96. package/scripts/kodax-bin.cjs +28 -28
  97. package/scripts/production-env.cjs +25 -25
  98. package/dist/chunks/agent-7X5CFET2.js +0 -2
  99. package/dist/chunks/argument-completer-3NHIKB4N.js +0 -2
  100. package/dist/chunks/chunk-7FJNLJLF.js +0 -369
  101. package/dist/chunks/chunk-COQYLD4U.js +0 -5
  102. package/dist/chunks/chunk-D3T24FJW.js +0 -78
  103. package/dist/chunks/chunk-EI4JBQKL.js +0 -46
  104. package/dist/chunks/chunk-IDCGNQ4H.js +0 -5
  105. package/dist/chunks/chunk-KAY2XLCP.js +0 -74
  106. package/dist/chunks/chunk-OD6LVXU6.js +0 -329
  107. package/dist/chunks/chunk-OSF3H4RR.js +0 -22
  108. package/dist/chunks/chunk-TGMBHGZO.js +0 -427
  109. package/dist/chunks/chunk-VWSLC2WO.js +0 -770
  110. package/dist/chunks/chunk-Y3AMP22L.js +0 -37
  111. package/dist/chunks/compaction-config-7J2XE35D.js +0 -2
  112. package/dist/chunks/dist-2RA7LSH3.js +0 -2
  113. package/dist/chunks/dist-URKXBOC6.js +0 -2
  114. package/dist/chunks/host-RKZ2OGFT.js +0 -2
  115. package/dist/chunks/run-manager-7RM4HEH6.js +0 -2
package/CHANGELOG.md CHANGED
@@ -6,398 +6,613 @@ All notable changes to this project will be documented in this file.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- ## [0.7.76] - 2026-07-25
10
-
11
- > Git tag and GitHub Release are published by the release workflow. npm
12
- > publication remains the operator's final manual step.
13
-
14
- ### Changed
15
-
16
- - **Kimi Code defaults to the official K3 256K route.** The `kimi-code`
17
- provider now defaults to `k3-256k` and sends that exact upstream model ID.
18
- `kimi-for-coding` remains selectable for K2.7 Code, alongside
19
- `kimi-for-coding-highspeed` and the 1M `k3` tier. K3 now exposes the
20
- documented `low` / `high` / `max` reasoning levels with `high` as default;
21
- media metadata marks `k3-256k` as image-capable but not video-capable, and
22
- nominal subscription accounting reflects the 1M `k3` route's roughly 2x
23
- quota consumption.
24
-
25
- ### Verification
26
-
27
- - Added direct live-wire smoke coverage for all four Kimi Code subscription
28
- routes: `k3-256k`, `k3`, `kimi-for-coding`, and
29
- `kimi-for-coding-highspeed`.
30
-
31
- ## [0.7.75] - 2026-07-24
32
-
33
- > The npm package was published manually. The `v0.7.75` Git tag and GitHub
34
- > Release were skipped; the binary-release changes roll into `v0.7.76`.
35
-
36
- ### Changed
37
-
38
- - **Exact audited npm candidate bytes.** The release script now packs first,
39
- audits the generated Sidecar prompt and budget bridge, and publishes that
40
- exact tarball so SDK validation and registry publication cannot drift.
41
- - **Windows GUI background-process hardening.** Runtime
42
- Worker-reachable non-interactive child processes now request hidden Windows
43
- consoles across memory/Git metadata, provider CLI and ACP, LSP, clipboard,
44
- worktree, review, extension-command, checkpoint, and sandbox paths. Explicit
45
- editor, terminal, and PTY interaction remains unchanged.
46
- - **Published Runtime Worker audit and packaged-host regression.** The bundle
47
- build now audits statically identifiable child-process calls in the published
48
- Runtime Worker, and the packaged Electron daemon smoke runs 20 ordinary
49
- queries with a Win32 console-visibility probe. Packaged KodaX Space validation
50
- on Windows 10 and Windows 11 remains a non-blocking product follow-up; it does
51
- not gate the tag, package build, or npm publication.
9
+ ## [0.7.77] - 2026-07-27
52
10
 
53
- ### Fixed
54
-
55
- - **Sidecar completion and Runtime terminal semantics.** Optional work offered
56
- after the current request is complete is accepted rather than reported as
57
- blocked; only clarification required to finish the current request remains
58
- blocked. Budget-approval state is emitted only for an eligible `revise`, and
59
- structured blocked codes and reasons survive live events, persistence,
60
- daemon round trips, and restart recovery.
61
-
62
- ### Documentation
63
-
64
- - Updated the release guide, current architecture/design baselines, SDK
65
- embedder guidance, feature index, roadmap, issue tracker, English/Chinese
66
- READMEs, and the v0.7.75 regression guide for the SDK validation candidate.
67
- - Rescheduled FEATURE_263 from v0.7.75 to v0.7.77 and then to v0.7.78; moved
68
- FEATURE_274 from v0.7.76 to v0.7.77. v0.7.75 and v0.7.76 remain feature-free
69
- stabilization releases.
70
-
71
- ## [0.7.74] - 2026-07-23
72
-
73
- > Git tag and GitHub Release are published by the release workflow. npm
74
- > publication remains a separate manual operator step.
11
+ > Release-ready candidate prepared at `@kodax-ai/kodax@0.7.77`. The Git tag,
12
+ > GitHub Release, and npm publication are not created yet. Frozen F274/F275
13
+ > paid evaluation completed with a joint owner `SHIP` decision; no unmeasured
14
+ > task-effect, token, or latency improvement is claimed.
75
15
 
76
16
  ### Added
77
17
 
78
- - **Absolute automatic-compaction threshold (FEATURE_272).** SDK, Runtime
79
- Session settings, daemon protocol, REPL, and KodaX Space now expose an
80
- optional token threshold. Missing/zero is inactive; otherwise the smaller of
81
- the absolute limit, bounded percentage policy, and physical provider capacity
82
- triggers compaction. Percentage defaults to 75% and clamps to 15-90%, while
83
- automatic large compaction remains always enabled.
84
- - **Context-owned compaction telemetry and transcript paging.** Root and child
85
- turns now carry stable `contextId`/revision ownership. The canonical
86
- `context.compaction.finished` event reports committed before/after and
87
- component metrics. Runtime observations use bounded transcript slices,
88
- revision-bound pages, and lossless chunks for oversized entries; clients can
89
- require `contextCompaction:3`, `transcriptPaging:1`, and
90
- `transcriptSearch:1`.
91
- - **Durable exact-history recovery.** The root host now persists and flushes
92
- exact pre-compaction lineage before evicting raw bodies. Island sidecars are
93
- committed before the slim main Session, stable entry IDs deduplicate overlap,
94
- and failures preserve the last exact live or persisted copy. Root Agents gain
95
- bounded `session_history_search` / `session_history_read`; SDK and daemon
96
- clients gain revision-bound `sessions.transcriptSearch()`.
97
- - **Runtime active-run interrupt input.** Embedded Runtime and the shared daemon
98
- now advertise `interruptInput:1`. `runtime.runs.submitInput()` queues cloned,
99
- ordered input for the current active Actor Run, delivers one FIFO batch as
100
- separate user messages at the next safe Runner boundary, and exposes durable
101
- queued/delivered lifecycle facts without creating a continuation Run or
102
- leaking terminalized input into a later Run.
103
-
104
- ### Changed
105
-
106
- - **Mailbox-driven Agent coordination (FEATURE_273).** Model-visible
107
- `wait_agent` now accepts only a bounded timeout and yields on the caller's
108
- mailbox, root user input, interruption, or expiry. Progress remains available
109
- through Actor snapshots, event replay, and SDK long-poll without waking and
110
- resampling the parent model. The tool returns only a wake acknowledgement;
111
- authenticated Agent messages and structured completion metadata enter the
112
- transcript once at the next safe boundary. `list_agents` owns tree-state
113
- inspection and `agent_output` owns targeted result reads.
114
- - **Resident Goal lifecycle contracts.** `get_goal`, `create_goal`, and
115
- `update_goal` keep their complete descriptions on both SA and managed AMA
116
- paths. This removes an avoidable discovery round trip while preserving the
117
- explicit-create and three-turn blocked-state rules. The remaining deferred
118
- set stays at exactly 11 tools; schemas, handlers, permissions, Goal state, and
119
- compaction-protected receipts are unchanged.
18
+ - **Host-configurable Shell Execution Contract.** Runtime callers can persist a
19
+ JSON-only `shellExecution` policy per Session or override it per Run,
20
+ selecting pwsh, Windows PowerShell, cmd, bash, zsh, or an explicit Git Bash
21
+ path. Configured runs resolve a credential-filtered environment through the
22
+ selected shell in the effective cwd, cache it by contract/cwd with strict
23
+ TTL or `refreshToken` invalidation, and execute through that same explicit
24
+ interpreter. Native child Agents and AMA deterministic evaluators inherit
25
+ the policy, command grants bind to its hash, and unconfigured callers retain
26
+ legacy shell behavior.
27
+ - **Pattern-aware adaptive AMA (FEATURE_274).** Ordinary AMA now shares one
28
+ six-pattern problem-solving catalog with Workflow semantics while continuing
29
+ to execute through the existing Runtime-owned Actor/Turn tree. Optional
30
+ `quality_strategy` metadata distinguishes coverage, replication, opposition,
31
+ filtering, judging, and challenge intent; Runtime derives a bounded,
32
+ fact-only `PatternTrace`, and the existing Sidecar remains the sole
33
+ terminal-answer quality adjudicator. Pattern presence does not activate a
34
+ Workflow, force a child, create a fixed topology, or add another verifier.
35
+ - **Governed event-triggered memory intervention (FEATURE_275).** Tool failure,
36
+ verification failure, and durably committed compaction can rebuild a closed,
37
+ prompt-safe candidate set before the next Action-LLM request.
38
+ `MemorySession.intervene()` performs deterministic exact selection by
39
+ default; an in-process host may opt into the bounded `memoryRecallRunner` or
40
+ `createCodingMemoryInterventionRunner()`. F228 remains the only durable
41
+ memory authority, daemon DTOs reject the function binding, and malformed,
42
+ unknown, stale, timed-out, or cancelled selector output fails silent.
43
+ - **Public Kimi K3 route.** The `kimi` provider now exposes `kimi-k3` with a
44
+ 1,048,576-token context and the same K3 reasoning profile used by Kimi Code,
45
+ while preserving `kimi-k2.7-code` as the public default.
120
46
 
121
47
  ### Fixed
122
48
 
123
- - **Large compaction coverage and protected-tail basis.** Major compaction now
124
- protects 20% of the effective trigger rather than 20% of the model maximum,
125
- summarizes the complete eligible prefix in one transaction, and uses
126
- map-once/reduce-once only for physical overflow. Exact main-request prefix
127
- reuse preserves prompt/KV cache on both ordinary and managed-task paths while
128
- explicitly excluding the protected raw tail from the summary.
129
- - **User intent retention across repeated and degraded compaction.** Genuine
130
- user queries are mechanically retained in a stable JSONL checkpoint ledger,
131
- including text carried beside tool results. A query is represented exactly
132
- once: raw while it remains in the protected tail, then in the ledger when its
133
- prefix is compacted. The explicit emergency-pruning fallback installs query
134
- recovery before removing old raw evidence.
135
- - **SDK/UI accounting and daemon frame safety.** The legacy compact callback now
136
- reports post-compact tokens on both execution paths, and automatic managed
137
- compaction emits the same post-commit canonical event/report as the standard
138
- agent path. Persisted anchors include admitted post-compact attachments.
139
- Space ignores child context metrics for the root gauge/activity/cost display,
140
- displays the last root transition, labels active model input separately from
141
- complete visible history, and reads transcripts directly through bounded
142
- page/chunk calls. The legacy full-transcript daemon method rejects responses
143
- above 512 KiB instead of risking the 8 MiB frame.
144
- - **Compacted-history loss and maintenance replay.** Full-lineage loads now
145
- merge exact sidecar entries over slim placeholders, compaction writes use a
146
- durable-before-evict boundary, child compaction cannot overwrite root
147
- lineage, and maintenance preserves its append watermark instead of archiving
148
- the same island entries again.
149
- - **Agent completion delivery and resumed transcripts.** Unacknowledged root
150
- completions persist an explicit pending-delivery set and are republished after
151
- a hard restart; same-process Runtime reconstruction deduplicates the projected
152
- queue by child turn ID, while acknowledged and legacy historical completions
153
- are not replayed. Completion acknowledgement remains after authoritative
154
- transcript persistence. Session restore also deduplicates and canonically
155
- repositions tool groups by tool-use ID and binds repeated text to the latest
156
- persisted suffix.
157
- - **Deterministic reads, bounded tool attention, and compaction round exits.**
158
- Auto Mode now handles complete risk-free static reads deterministically while
159
- sensitive paths, credential stores, process environments, and named secret
160
- variables require confirmation. Grep clips pathological lines and exposes
161
- bounded offset continuation; one batch-admission owner separates physical
162
- capacity from tool-attention spill. Current user-shaped and legacy compaction
163
- checkpoints no longer cause a compacted query/final pair to be appended twice.
164
- - **Release-review boundary fixes.** Emergency compaction fallback accounts for
165
- system/tool overhead and response reserve before pruning and reports no
166
- success for unchanged or still-oversized candidates. Runtime-backed REPL paths
167
- use one Session writer, first-run headless compaction seeds Session metadata,
168
- persistence failure rolls back tentative context revision, and history search
169
- consistently excludes system/hidden/checkpoint/placeholder content. Auto
170
- permission analysis samples the middle of long operation lists, POSIX paths
171
- are not mistaken for Windows switches, and continuation errors identify
172
- `runtime.runs.submitInput` accurately.
173
- - **Release-candidate checkpoint and PowerShell boundary closure.** Session
174
- lineage now consumes and re-renders the exact compaction checkpoint bytes,
175
- including recovery guidance, so the compaction entry, first-kept pointer, and
176
- post-compact attachments remain on the active path; legacy suffix-free
177
- checkpoints still resume. Auto Mode treats bracket wildcards on PowerShell
178
- path parameters as incomplete and escalates them, while exact `LiteralPath`
179
- filenames containing brackets remain supported.
180
- - **Reliable continue-most-recent selection.** `kodax -c`, classic/Ink startup,
181
- one-shot CLI execution, and coding-runtime auto-resume now scan beyond the
182
- legacy ten-session window, skip zero-message ACP/bootstrap placeholders, and
183
- preserve an explicit session ID. Interactive resume restores the saved
184
- workspace runtime together with messages, UI history, lineage, artifacts,
185
- extensions, title, tag, and session identity before the next turn.
186
- - **Deterministic Auto mode switching.** Entering Auto now displays the resolved
187
- configured engine immediately instead of a transient bare `Auto`, and Runtime
188
- setting writes are serialized per Session so rapid shortcut cycling is
189
- last-action-wins. Persisted or automatic `Auto[RULES]` fallback remains sticky
190
- by design and can be changed explicitly with `/auto-engine llm`.
191
- - **Release-review debt closure.** Imperative manual compaction now reconciles
192
- the exact flat Session history into lineage before creating the compaction
193
- island. A failed durable interrupt-delivery event leaves the input queued,
194
- rethrows the persistence error, and emits a bounded `runtime.warning` without
195
- copying user input content into diagnostics.
49
+ - Daemon startup now waits for the matching healthy owner state to publish
50
+ `status: ready` before returning, unrefing its child, or attaching a
51
+ concurrent CLI/SDK starter. Owned, competing, and pre-existing-owner paths
52
+ share the same bounded, cancellable identity fence, preventing successful
53
+ starts or SDK connections from observing a stale `starting` state.
54
+ - Missing local files referenced by historical image blocks no longer poison every later
55
+ Provider request. Anthropic-compatible user/tool-result images and OpenAI-compatible user
56
+ images now degrade only `ENOENT`/`ENOTDIR` to a path-free text marker; unrelated filesystem
57
+ errors remain visible. OpenAI-compatible tool-result image blocks also use path-free
58
+ missing/unsupported markers instead of serializing absolute local paths.
59
+ - Added stable, opaque Provider prompt-cache affinity for Kimi Code and other
60
+ verified endpoints. AMA/SA root requests reuse one logical-context key across
61
+ runs, retries, fallback, resume, and compaction; child Agents use stable
62
+ canonical-path keys isolated from their parent and physical worker Sessions.
63
+ Kimi Code lowers it to Anthropic-compatible `metadata.user_id`, public Kimi
64
+ and official OpenAI use `prompt_cache_key`, strict compatible gateways remain
65
+ opt-in, and the effective SDK/run-scoped/env `disablePromptCache` policy
66
+ removes all cache-routing metadata. Cache diagnostics expose only a separate
67
+ hash of an affinity key actually supported by the configured wire, never the
68
+ key or logical identity itself.
69
+ - Preserved official CLI cache usage end to end. Codex CLI
70
+ `cached_input_tokens` / `cache_write_input_tokens` and Gemini CLI
71
+ `stats.cached` now survive the JSONL parser, pseudo-ACP, normalized Provider
72
+ usage, and Runtime diagnostics. Explicit Provider zero remains `0`; missing
73
+ or invalid fields remain absent, and input totals are never recomputed by
74
+ adding cache breakdowns. The bridge now also keeps generated ACP IDs separate
75
+ from native Codex/Gemini session IDs: first prompts start fresh, only
76
+ CLI-reported native IDs may be resumed, stateless calls cannot share a
77
+ process-global session, failed/disconnected pseudo transports are recreated,
78
+ pending handshakes and later transport deaths are invalidated for reconnect,
79
+ and missing or non-zero-exit CLI completion fails visibly even when a
80
+ successful completion event was reported earlier. Default aborts remain
81
+ user cancellation, while hard/idle timeout abort reasons propagate into the
82
+ normal retry and failure path instead of becoming an empty success. The
83
+ configured CLI executor timeout is now enforced through process-tree
84
+ termination, including after a CLI reports success but never exits; native
85
+ ACP prompts also stop waiting at the caller deadline even if a server ignores
86
+ the best-effort cancel request.
87
+ - Hardened the Shell Execution Contract after adversarial review: configured
88
+ commands now deny credentials for every registered Provider, preserve a
89
+ Session contract when a Run context contains explicit `undefined`, rebuild
90
+ Windows Registry environments without stale `%PATH%` or tool-manager
91
+ variables, reject unsupported PowerShell profile/command switches, remove
92
+ `NODE_OPTIONS` before probing, honor explicit environment denies, and avoid
93
+ cmd-only hints under PowerShell or Git Bash. Last-waiter cancellation now
94
+ terminates an in-flight profile probe without interrupting shared waiters.
95
+ A targeted Windows CI gate covers the cross-platform shell paths.
96
+ - Rebuilt the supplied v0.7.77 package from the cache-stability fix and added
97
+ an end-to-end AMA automatic-compaction regression. Before and after
98
+ compaction, native and legacy Providers now prove the Skills addendum and
99
+ selected Skill are injected exactly once per Worker request, remain visible
100
+ to context-budget diagnostics, and never persist in compactable history.
101
+ - Repaired nested `agent-turn:` evidence fence sanitization so downstream child
102
+ briefings use invisible zero-width separators instead of visible mojibake.
103
+ - Made queued Runtime interrupt validation atomic at the batch boundary:
104
+ invalid artifacts now leave every accepted prompt queued and append no
105
+ partial user-message batch.
106
+ - Extended governed-memory prompt safety to qualified credential sentences and
107
+ advanced its frozen evidence fingerprint to cover the policy identity and
108
+ renderer limits.
109
+ - Aligned terminal contracts by emitting `onComplete` on iteration exhaustion
110
+ and deriving live-turn status from the final result; pattern-disposition
111
+ output Schema now enforces the parser's exclusive target forms.
112
+ - Taught the workflow structured-output validator to honor `oneOf`
113
+ (exactly-one-variant), so Schemas using it—including the
114
+ pattern-disposition envelope—are genuinely validated instead of silently
115
+ passing, and remain legal for workflow `outputSchema` declarations.
116
+ - Completed the Runtime diagnostics query contract for reconnecting hosts.
117
+ Budget, tool-exposure, compaction-skip, and provider-cache diagnostics now
118
+ carry stable logical `contextId` / `parentContextId` identity while retaining
119
+ isolated child transcript Sessions. Inline and daemon Runtime services expose
120
+ `latestProviderCacheDiagnostic(filter?)`; root defaults and child
121
+ Session/Agent isolation share the same strict matching semantics. Existing
122
+ hash-only request-envelope, ephemeral-suffix, retry/fallback/repair, and
123
+ compaction diagnostics remain intact.
124
+ - Extended prompt-cache and context-budget diagnostics to the SA substrate used
125
+ by Runtime child Agents, including retries, non-streaming fallback, workflow
126
+ digest, structured-output repair, and compaction summary requests. Diagnostics
127
+ now hash the Provider-visible projection, endpoint query, ephemeral suffix,
128
+ and complete request envelope while reporting only Provider-supplied cache
129
+ usage. Child cache controls preserve explicit `true` and `false` end to end.
130
+ - Kept the default child leading System prefix stable while restoring the
131
+ documented full specialist System override and write-child project mutation
132
+ rules. Runtime Actor children retain recursive AMA collaboration semantics on
133
+ the direct Runner substrate; actorless and protocol-owned Workflow leaves
134
+ remain SA with collaboration tools and guidance hidden.
135
+ - Separated Runtime Actor mailbox routing and logical context identity from
136
+ each child's isolated transcript session so child-to-grandchild wait/output
137
+ delivery completes reliably, follow-up diagnostics keep stable identities,
138
+ and synthetic digest/repair calls cannot advance canonical history revisions.
139
+ - Enforced specialist tool ceilings across descendants, Actor provider ceilings
140
+ across final routing and fallback, and model-visible collaboration guidance
141
+ against the final tool table. Direct children no longer see an unbound
142
+ `run_workflow`; actorless Workflow leaves execute under their admitted Actor
143
+ capability snapshot and use collision-free Actor paths for diagnostics.
144
+ - Kept canonical context revisions aligned with core-owned compaction storage:
145
+ a post-commit observer failure is diagnosed but can no longer roll back an
146
+ already persisted history replacement.
147
+ - Added root/child diagnostic identity and filtering so child physical requests
148
+ remain observable without replacing the default root result returned by
149
+ `context.budget.get`; diagnostics remain fully fail-open and never expose
150
+ prompt text.
151
+ - Corrected the paid prompt-cache lifetime probe to send the canonical
152
+ `input_schema` tool field.
153
+ - Closed the Runtime interrupt finalization race in both managed and ordinary
154
+ coding runs. A terminal candidate now closes active-run input admission
155
+ atomically, drains every interrupt accepted before that boundary into the
156
+ same Run, reserves a continuation model turn even at the configured iteration
157
+ limit, and reopens admission only when another model turn is guaranteed.
158
+ A fixed internal continuation allowance now preserves an absolute Run bound
159
+ when a client keeps submitting input without exceeding an admitted manifest's
160
+ `maxIterations` governance cap.
161
+ Idle-yield waiting reopens admission, while failure, cancellation, and
162
+ terminal cleanup close it before asynchronous teardown. Ordinary coding also
163
+ rotates live-turn attribution for each queued prompt and commits a COMPLETE
164
+ assistant response before any accepted continuation input. REPL follow-ups
165
+ retain their existing fresh-round ownership.
166
+ - Deduplicated built-in default models across `/model` completion, provider
167
+ metadata, and SDK capability listings while preserving default-first order
168
+ and per-model capability overrides.
169
+ - Resolved provider-only Auto LLM admission before preflight by materializing
170
+ the provider's static default model when one is available; custom providers
171
+ without a resolvable default retain the existing actionable error.
172
+ - Stabilized Anthropic-compatible prompt-cache prefixes across managed role
173
+ turns, exported cache diagnostic events, and added a focused
174
+ `probe:prompt-cache` operator command. Marking the latest user turn seeds the
175
+ next request but can add cache-write overhead to isolated one-shot requests;
176
+ those callers can set `disablePromptCache:true` or
177
+ `KODAX_DISABLE_PROMPT_CACHE=1`.
178
+ - Removed the Session-specific scratch path from AMA's stable System prompt.
179
+ Repository, memory, routing, Session, and live Actor facts now travel in the
180
+ request-only tail after Provider cache breakpoints, so equivalent first
181
+ requests from fresh Sessions share the same System/tools/messages prefix and
182
+ emit an `ephemeralSuffixHash`. Qwen Anthropic-compatible usage continues to
183
+ count uncached input plus cache creation/read input as total input. OpenAI-
184
+ compatible Providers merge the suffix into the final wire user turn to avoid
185
+ rejected `user,user` adjacency; runtime-registered Providers that do not
186
+ declare native suffix support receive a request-only message fallback.
187
+ - Expanded the governed-memory prompt-safety gate for common override/reset
188
+ variants, role-mode claims, self-closing role tags, and sentence-shaped
189
+ credentials. Checks now run against Unicode-normalized,
190
+ formatting-separated, and formatting-joined text; ordinary credential status
191
+ statements remain usable, and persistence shares the same secret predicate;
192
+ prompt-cache diagnostics now document their existing `contextDiagnostics`
193
+ gate.
194
+ - Made abort completion emission exactly-once and kept governed memory
195
+ intervention delivery ordered with terminal cleanup.
196
196
 
197
197
  ### Documentation
198
198
 
199
- - Root and generated JSONC templates, both READMEs, architecture/design docs,
200
- the SDK embedder guide, feature/issue trackers, release verification guide,
201
- package READMEs, and `kodax_manual` now describe the complete v0.7.74
202
- compaction, mailbox-wait, active-run input, Goal-tool, resume, Auto-switch,
203
- and recovery contracts.
204
-
205
- ## [0.7.73] - 2026-07-20
206
-
207
- ### Added
208
-
209
- - **Qwen Token Plan provider.** The new `qwen-token-plan` alias uses the
210
- Anthropic-compatible Alibaba Cloud Token Plan endpoint and
211
- `QWEN_TOKEN_API_KEY`. It defaults to `qwen3.8-max-preview`, exposes the
212
- supported Qwen 3.7/3.6, GLM-5.2, and DeepSeek V4 Pro routes with one-million-
213
- token context metadata, and declares verified reasoning, image-input, and
214
- nominal subscription-cost capabilities without changing the existing `qwen`
215
- provider.
216
- - **First-run provider setup (FEATURE_271).** A bare interactive `kodax`
217
- launch with no selected provider and no supported local credential now opens
218
- a focused provider/model setup flow before Runtime, daemon, session, or REPL
219
- startup. `kodax setup` reruns the same flow explicitly. It stores only
220
- non-secret metadata, preserves unrelated config through a revision-checked
221
- atomic write, refuses malformed existing custom providers and credential-
222
- bearing endpoint URLs, and then names the required environment variable and
223
- terminal restart steps.
224
- - **Typed Auto Mode SDK contract (FEATURE_271).** The root and REPL SDK
225
- entries now export one pure `resolveAutoModeSettings()` plus the authoritative
226
- loader and related types; `loadConfig().autoMode` is declared, Runtime Session
227
- settings persist `autoModeSpeculativeWindowMs` (including `0`), and side
228
- queries return prompt-free provider/model/timing/retry/phase diagnostics.
229
- - **Runtime-owned concrete permission grants.** Embedded and daemon SDK clients
230
- can submit concrete `toolInput` and `executionCwd`, receive only opaque
231
- Runtime-issued Session/persistent grant suggestions, and select a suggestion
232
- without constructing or widening its hidden matcher. Exact command, known
233
- file-tool path, and generic exact-call matchers remain revisioned and audited;
234
- dynamic or dangerous shell calls never receive a persistent suggestion.
235
-
236
- ### Fixed
237
-
238
- - **Reasoning, Auto Mode, and confirmation regressions.** Native
239
- disabled-thinking requests now send the provider's explicit disabled form
240
- only for models that declare support (including verified Qwen Token Plan 3.7
241
- routes); always-thinking variants retain their declared behavior. Sidecar
242
- queries preserve a supported `none` effort, persisted Runtime Auto engines
243
- are not overwritten by a fresh REPL, `/mode` synchronizes before reporting
244
- success, and concurrent confirmation prompts are serialized instead of
245
- replacing one another.
246
- - **Legacy permission-grant upgrade safety.** Matcherless grants persisted by
247
- older releases remain visible and revocable but can no longer authorize a
248
- concrete tool call. The next invocation requires a fresh Runtime-issued
249
- matcher, so old coarse Bash grants cannot bypass exact-command, dynamic-shell,
250
- or absolute-deny protections.
251
- - **Classifier credential boundary.** Auto[LLM] now redacts explicitly named
252
- credential values inside shell-escaped JSON before sending an action to its
253
- side provider, while retaining adjacent operational fields. Redaction is
254
- documented as defense in depth; arbitrary Base64/hex values are not treated
255
- as secrets without a credential signal.
256
- - **Todo/Actor semantic progress checkpoint (FEATURE_270 follow-up).** Worker
257
- guidance now treats Todo rows as user-visible milestones rather than Actor
258
- instances and requires timely updates at milestone boundaries. Structured
259
- terminal child results arm one deduplicated, warn-only reconciliation
260
- reminder; transcript scans are append-incremental with safe compaction
261
- fallback, and Sidecar accept-time residual reconciliation emits a diagnostic
262
- without changing its existing bridge contract.
263
- - **Auto LLM classifier timeout and missing-model escalation.** Runtime now
264
- treats omitted Auto engine as the documented LLM default and still owns the
265
- guardrail, while a missing/blank/malformed effective classifier model fails
266
- as a typed recoverable Runtime error or a local block in the shared
267
- `createAutoModeToolGuardrail` boundary. The final guardrail check runs before
268
- provider lookup and cannot invoke `askUser`, record a circuit-breaker error,
269
- or downgrade to rules. Classifier requests strip assistant prose/thinking,
270
- cap normalized transcript/tool-result/action/prompt bytes, remove image
271
- paths, and cap the structured response at 256 tokens. The 20-second deadline remains bounded:
272
- a four-call `zai-coding/glm-5.2` probe completed representative Windows
273
- permission verdicts in 1.9–2.8 seconds, while the matching production session
274
- revealed a 1.625 MB tool result that had bypassed the existing sanitizer.
275
- - **Auto guardrail daemon and tracing semantics.** Auto-started Runtime clients
276
- now require `runtimeAutoModeGuardrail:3`. It retains v2's effective
277
- timeout/window defaults, bounded classifier input, and diagnostics metadata,
278
- and adds opaque concrete-grant semantics. Capability negotiation is monotonic
279
- (v3 satisfies v2/v1); idle older daemons use the existing fenced upgrade path,
280
- while busy daemons are left untouched with a recoverable error. Guardrail
281
- spans now cover the awaited callback instead of timing only final verdict
282
- emission.
283
- - **Concurrent daemon startup publication race.** A cleanly exiting loser now
284
- gives the elected owner a bounded publication grace period, preventing an
285
- SDK starter from reporting failure during the short lock/state handoff gap.
286
- - **Guardrail/permission execution parity.** Both Runner paths now commit each
287
- guardrail rewrite before permission policy and execution, reject correlation-
288
- id rewrites, propagate blocks as visible audited tool results, and preserve
289
- embedded host policy hooks while rejecting non-transportable daemon hooks.
290
- Calls rewritten into Bash retain serialized shell ordering.
291
- - **Managed-run capacity and tool-dispatch accounting.** A complete system
292
- prompt override no longer double-counts Skills, missing provider usage rebases
293
- from the final request envelope, and authoritative provider usage remains
294
- intact. Non-Bash tool calls keep parallel dispatch, Bash remains sequential,
295
- and aggregate tool-result spill decisions use the complete batch budget.
296
-
297
- ## [0.7.72] - 2026-07-19
298
-
299
- ### Added
300
-
301
- - **Learning Center and learned-capability Runtime control plane
302
- (FEATURE_266).** KodaX now owns learned capability lifecycle, notification
303
- cursors, lower-precedence learned Skill discovery, F224 proposal projection,
304
- promotion/rollback actions, and inline/Worker/daemon SDK parity through one
305
- agent-layer service. `/learn`, status summaries, and the Ink learning segment
306
- expose the same durable state without creating a second runtime engine.
307
- - **Unified adaptive Actor/Turn control plane (FEATURE_270).** AMA collaboration
308
- now uses one Runtime-owned actor tree and scheduler across native, recursive,
309
- Workflow-owned, constructed, and external Agent work. The canonical
310
- `spawn_agent`, `send_message`, `followup_task`, `wait_agent`,
311
- `interrupt_agent`, `list_agents`, and `agent_output` surface supports reusable
312
- Actor identities, durable Turn history, direct-parent completion, recursive
313
- delegation, shared capacity, and SDK/daemon recovery. A manifest-first,
314
- fail-closed behavioral eval driver freezes the released/current production
315
- prompt and tool bytes, call graphs, budgets, raw evidence, and blind review
316
- mapping before any separately authorized provider call.
317
-
318
- ### Changed
319
-
320
- - **Current coding-eval aliases and MiniMax default model.** Newly authored or
321
- revised evals now route Zhipu through `zhipu/glm52` (`glm-5.2`) and MiniMax
322
- through `mmx/m3` (`MiniMax-M3`). `minimax-coding` now defaults to M3 while
323
- the old `zhipu/glm51` and `mmx/m27` aliases remain explicitly selectable for
324
- historical replay; existing raw evidence and reports keep their original
325
- route labels.
326
- - **AMA and Workflow orchestration cutover.** AMAW and the old model-visible
327
- child-task vocabulary are retired. Persisted `amaw`/`ama-workflow` settings
328
- migrate once to AMA, while new inputs fail with a migration hint. Workflow
329
- remains available for explicit natural-language, command, named-pattern, and
330
- SDK requests, but its child Agents now use the unified Actor scheduler and
331
- task complexity alone no longer activates Workflow.
199
+ - Updated the English/Chinese READMEs, current PRD/HLD/DD baselines, ADR
200
+ addendum, SDK embedder guide, feature and issue trackers, release guide,
201
+ package READMEs, and `kodax_manual` for the v0.7.77 candidate. Added focused
202
+ Issues 212–214 regression guides for terminal/schema/memory hardening,
203
+ compaction-safe managed context, and the Shell Execution Contract.
332
204
 
333
- ### Fixed
334
-
335
- - **Remote Runtime subscription readiness.** Daemon event/workflow
336
- subscriptions now expose an awaitable `RuntimeSubscription.ready` handshake,
337
- so hosts can establish cross-client ordering before starting work whose first
338
- event must not be missed. Handshake failures remain observable to new callers
339
- without creating unhandled rejections in legacy callers that ignore `ready`.
340
-
341
- - **Detached daemon lifecycle cleanup.** CLI and SDK startup now retain the
342
- exact candidate process until its PID is healthy and reclaim only that process
343
- tree on early exit, timeout, identity mismatch, owner-race loss, or startup
344
- cancellation. Vitest-owned daemons also shut down when a forcibly terminated
345
- worker cannot run normal teardown; production daemons remain persistent after
346
- ordinary client detach and have no idle reaper. A source daemon child now
347
- carries only KodaX's production preload, explicit `tsx` support, and safe
348
- Node engine flags instead of inheriting arbitrary parent loaders, preventing
349
- test-runner hooks from parsing daemon CLI arguments.
350
-
351
- - **Windows memory lifecycle lock contention.** Concurrent forget/archive
352
- operations now retry short-lived Windows sharing denials within the existing
353
- bounded lock deadline instead of failing immediately with `EPERM`; unrelated
354
- filesystem errors remain fail-fast.
355
-
356
- - **MiniMax M3 default media regression.** The media capability suite now
357
- expects the current `minimax-coding` default, MiniMax M3, to support image
358
- input while retaining fail-closed checks for unverified nearby routes.
205
+ ### Verification
359
206
 
360
- - **Bare resume cancellation terminal release.** Pressing Esc in `kodax -r`
361
- now pauses and unreferences the picker-owned stdin path before the bootstrap
362
- exits, so Windows PowerShell regains its prompt immediately without requiring
363
- an extra keypress. The full CLI remains unloaded while listing sessions,
364
- successful selection hands input to the REPL, and replay retains each
365
- persisted event timestamp.
366
- - **Auto[LLM] approval reliability.** The default classifier budget is now 20
367
- seconds, pure readonly invocations bypass classification by invariant, and
368
- SDK/daemon session settings can select the classifier model and timeout without
369
- stale guardrail-cache reuse. Runtime advertises and requires
370
- `runtimeAutoModeGuardrail:1` for auto-started daemon clients, owns the Session
371
- guardrail ahead of the generic permission hook, persists LLM-to-rules
372
- fallback, and creates a shared pending request only for an explicit
373
- escalation. An older daemon is replaced only after a revision/owner-policy
374
- fenced preflight proves that active/queued work and pending interactions are
375
- absent; busy or unfenceable daemons return a typed recoverable error. The one
376
- conditional readonly exception, `semantic_lookup(refresh:true)`, remains
377
- classified because it rebuilds the on-disk derived index.
378
- - **Runtime permission boundary correctness.** Relative operands resolve from
379
- the validated execution directory while `gitRoot` remains a safety boundary;
380
- Windows containment is case-insensitive, deterministic direct/nested-shell
381
- writes to the user `.kodax` credential zone are Tier-0 denied, and quoted
382
- Python/regexp source is not treated as a path. Permission previews use a
383
- scan-bounded field whitelist, omit write/edit bodies, redact JSON/YAML/PEM
384
- and command-line credentials, and remain valid size-limited JSON with that
385
- directory. `exit_plan_mode` is absent without a real host approval bridge.
386
- - **0.7.x SDK source compatibility.** Deprecated `amaw` input is accepted and
387
- normalized to AMA without restoring retired behavior; formal `SkillSource`
388
- remains exhaustive while `ResolvedSkillSource` adds `learned`; daemon
389
- preflight normalizes canonical `activeAgentTurns` and deprecated
390
- `activeAgentTasks` to the same required array across old and current wire
391
- shapes.
392
- - **Queued follow-up responsiveness.** REPL, AMA, and SA now share the same
393
- Actor queue routing contract while SA retains its legacy unscoped queue. User
394
- input wakes `wait_agent` and idle-yield through lossless subscriptions and
395
- resumes at a safe turn boundary without canceling unrelated parallel tools.
396
- SDK media follow-ups accept an explicit `sessionId`, preserve old single-Actor
397
- calls through lifecycle-bound auto-routing, and reject ambiguous concurrent
398
- calls instead of crossing sessions.
207
+ - Added deterministic F274/F275 experiment-contract, pattern/trace,
208
+ Sidecar-alignment, prompt-safety, candidate-admission, intervention-ordering,
209
+ Runtime interrupt, structured-output, real auto-compaction, and
210
+ cross-platform Shell Execution Contract regressions. A dedicated Windows CI
211
+ job exercises pwsh, Windows PowerShell, cmd, Registry environment refresh,
212
+ and Git Bash behavior.
213
+ - Completed the owner-authorized frozen paid gate against clean commit
214
+ `25d5521e`: F274 revision `f274-v0.7.77.6` used 96 Layer 2 calls plus 40
215
+ Layer 3 calls, kept candidate simple tasks solo in 6/6 cells, produced zero
216
+ accidental Workflow activation, and received blinded `recommend-ship`
217
+ reviews; F275 revision `f275-v0.7.77.3` completed its 16-call pilot with B/C
218
+ compatibility preservation at 4/4 versus control 1/2 and exact-empty
219
+ selector output in all 4/4 selector calls (including 2/2 negative controls).
220
+ The joint decision is `SHIP`. F275 semantic selection remains experimental
221
+ and host opt-in, and the 144-call task-effect/default-on validation was
222
+ intentionally not run.
399
223
 
400
- ## [0.7.72-hotfix.0] - 2026-07-17
224
+ ## [0.7.76] - 2026-07-25
225
+
226
+ > Git tag and GitHub Release are published by the release workflow. npm
227
+ > publication remains the operator's final manual step.
228
+
229
+ ### Changed
230
+
231
+ - **Kimi Code defaults to the official K3 256K route.** The `kimi-code`
232
+ provider now defaults to `k3-256k` and sends that exact upstream model ID.
233
+ `kimi-for-coding` remains selectable for K2.7 Code, alongside
234
+ `kimi-for-coding-highspeed` and the 1M `k3` tier. K3 now exposes the
235
+ documented `low` / `high` / `max` reasoning levels with `high` as default;
236
+ media metadata marks `k3-256k` as image-capable but not video-capable, and
237
+ nominal subscription accounting reflects the 1M `k3` route's roughly 2x
238
+ quota consumption.
239
+
240
+ ### Verification
241
+
242
+ - Added direct live-wire smoke coverage for all four Kimi Code subscription
243
+ routes: `k3-256k`, `k3`, `kimi-for-coding`, and
244
+ `kimi-for-coding-highspeed`.
245
+
246
+ ## [0.7.75] - 2026-07-24
247
+
248
+ > The npm package was published manually. The `v0.7.75` Git tag and GitHub
249
+ > Release were skipped; the binary-release changes roll into `v0.7.76`.
250
+
251
+ ### Changed
252
+
253
+ - **Exact audited npm candidate bytes.** The release script now packs first,
254
+ audits the generated Sidecar prompt and budget bridge, and publishes that
255
+ exact tarball so SDK validation and registry publication cannot drift.
256
+ - **Windows GUI background-process hardening.** Runtime
257
+ Worker-reachable non-interactive child processes now request hidden Windows
258
+ consoles across memory/Git metadata, provider CLI and ACP, LSP, clipboard,
259
+ worktree, review, extension-command, checkpoint, and sandbox paths. Explicit
260
+ editor, terminal, and PTY interaction remains unchanged.
261
+ - **Published Runtime Worker audit and packaged-host regression.** The bundle
262
+ build now audits statically identifiable child-process calls in the published
263
+ Runtime Worker, and the packaged Electron daemon smoke runs 20 ordinary
264
+ queries with a Win32 console-visibility probe. Packaged KodaX Space validation
265
+ on Windows 10 and Windows 11 remains a non-blocking product follow-up; it does
266
+ not gate the tag, package build, or npm publication.
267
+
268
+ ### Fixed
269
+
270
+ - **Sidecar completion and Runtime terminal semantics.** Optional work offered
271
+ after the current request is complete is accepted rather than reported as
272
+ blocked; only clarification required to finish the current request remains
273
+ blocked. Budget-approval state is emitted only for an eligible `revise`, and
274
+ structured blocked codes and reasons survive live events, persistence,
275
+ daemon round trips, and restart recovery.
276
+
277
+ ### Documentation
278
+
279
+ - Updated the release guide, current architecture/design baselines, SDK
280
+ embedder guidance, feature index, roadmap, issue tracker, English/Chinese
281
+ READMEs, and the v0.7.75 regression guide for the SDK validation candidate.
282
+ - Rescheduled FEATURE_263 from v0.7.75 to v0.7.77 and then to v0.7.78; moved
283
+ FEATURE_274 from v0.7.76 to v0.7.77. v0.7.75 and v0.7.76 remain feature-free
284
+ stabilization releases.
285
+
286
+ ## [0.7.74] - 2026-07-23
287
+
288
+ > Git tag and GitHub Release are published by the release workflow. npm
289
+ > publication remains a separate manual operator step.
290
+
291
+ ### Added
292
+
293
+ - **Absolute automatic-compaction threshold (FEATURE_272).** SDK, Runtime
294
+ Session settings, daemon protocol, REPL, and KodaX Space now expose an
295
+ optional token threshold. Missing/zero is inactive; otherwise the smaller of
296
+ the absolute limit, bounded percentage policy, and physical provider capacity
297
+ triggers compaction. Percentage defaults to 75% and clamps to 15-90%, while
298
+ automatic large compaction remains always enabled.
299
+ - **Context-owned compaction telemetry and transcript paging.** Root and child
300
+ turns now carry stable `contextId`/revision ownership. The canonical
301
+ `context.compaction.finished` event reports committed before/after and
302
+ component metrics. Runtime observations use bounded transcript slices,
303
+ revision-bound pages, and lossless chunks for oversized entries; clients can
304
+ require `contextCompaction:3`, `transcriptPaging:1`, and
305
+ `transcriptSearch:1`.
306
+ - **Durable exact-history recovery.** The root host now persists and flushes
307
+ exact pre-compaction lineage before evicting raw bodies. Island sidecars are
308
+ committed before the slim main Session, stable entry IDs deduplicate overlap,
309
+ and failures preserve the last exact live or persisted copy. Root Agents gain
310
+ bounded `session_history_search` / `session_history_read`; SDK and daemon
311
+ clients gain revision-bound `sessions.transcriptSearch()`.
312
+ - **Runtime active-run interrupt input.** Embedded Runtime and the shared daemon
313
+ now advertise `interruptInput:1`. `runtime.runs.submitInput()` queues cloned,
314
+ ordered input for the current active Actor Run, delivers one FIFO batch as
315
+ separate user messages at the next safe Runner boundary, and exposes durable
316
+ queued/delivered lifecycle facts without creating a continuation Run or
317
+ leaking terminalized input into a later Run.
318
+
319
+ ### Changed
320
+
321
+ - **Mailbox-driven Agent coordination (FEATURE_273).** Model-visible
322
+ `wait_agent` now accepts only a bounded timeout and yields on the caller's
323
+ mailbox, root user input, interruption, or expiry. Progress remains available
324
+ through Actor snapshots, event replay, and SDK long-poll without waking and
325
+ resampling the parent model. The tool returns only a wake acknowledgement;
326
+ authenticated Agent messages and structured completion metadata enter the
327
+ transcript once at the next safe boundary. `list_agents` owns tree-state
328
+ inspection and `agent_output` owns targeted result reads.
329
+ - **Resident Goal lifecycle contracts.** `get_goal`, `create_goal`, and
330
+ `update_goal` keep their complete descriptions on both SA and managed AMA
331
+ paths. This removes an avoidable discovery round trip while preserving the
332
+ explicit-create and three-turn blocked-state rules. The remaining deferred
333
+ set stays at exactly 11 tools; schemas, handlers, permissions, Goal state, and
334
+ compaction-protected receipts are unchanged.
335
+
336
+ ### Fixed
337
+
338
+ - **Large compaction coverage and protected-tail basis.** Major compaction now
339
+ protects 20% of the effective trigger rather than 20% of the model maximum,
340
+ summarizes the complete eligible prefix in one transaction, and uses
341
+ map-once/reduce-once only for physical overflow. Exact main-request prefix
342
+ reuse preserves prompt/KV cache on both ordinary and managed-task paths while
343
+ explicitly excluding the protected raw tail from the summary.
344
+ - **User intent retention across repeated and degraded compaction.** Genuine
345
+ user queries are mechanically retained in a stable JSONL checkpoint ledger,
346
+ including text carried beside tool results. A query is represented exactly
347
+ once: raw while it remains in the protected tail, then in the ledger when its
348
+ prefix is compacted. The explicit emergency-pruning fallback installs query
349
+ recovery before removing old raw evidence.
350
+ - **SDK/UI accounting and daemon frame safety.** The legacy compact callback now
351
+ reports post-compact tokens on both execution paths, and automatic managed
352
+ compaction emits the same post-commit canonical event/report as the standard
353
+ agent path. Persisted anchors include admitted post-compact attachments.
354
+ Space ignores child context metrics for the root gauge/activity/cost display,
355
+ displays the last root transition, labels active model input separately from
356
+ complete visible history, and reads transcripts directly through bounded
357
+ page/chunk calls. The legacy full-transcript daemon method rejects responses
358
+ above 512 KiB instead of risking the 8 MiB frame.
359
+ - **Compacted-history loss and maintenance replay.** Full-lineage loads now
360
+ merge exact sidecar entries over slim placeholders, compaction writes use a
361
+ durable-before-evict boundary, child compaction cannot overwrite root
362
+ lineage, and maintenance preserves its append watermark instead of archiving
363
+ the same island entries again.
364
+ - **Agent completion delivery and resumed transcripts.** Unacknowledged root
365
+ completions persist an explicit pending-delivery set and are republished after
366
+ a hard restart; same-process Runtime reconstruction deduplicates the projected
367
+ queue by child turn ID, while acknowledged and legacy historical completions
368
+ are not replayed. Completion acknowledgement remains after authoritative
369
+ transcript persistence. Session restore also deduplicates and canonically
370
+ repositions tool groups by tool-use ID and binds repeated text to the latest
371
+ persisted suffix.
372
+ - **Deterministic reads, bounded tool attention, and compaction round exits.**
373
+ Auto Mode now handles complete risk-free static reads deterministically while
374
+ sensitive paths, credential stores, process environments, and named secret
375
+ variables require confirmation. Grep clips pathological lines and exposes
376
+ bounded offset continuation; one batch-admission owner separates physical
377
+ capacity from tool-attention spill. Current user-shaped and legacy compaction
378
+ checkpoints no longer cause a compacted query/final pair to be appended twice.
379
+ - **Release-review boundary fixes.** Emergency compaction fallback accounts for
380
+ system/tool overhead and response reserve before pruning and reports no
381
+ success for unchanged or still-oversized candidates. Runtime-backed REPL paths
382
+ use one Session writer, first-run headless compaction seeds Session metadata,
383
+ persistence failure rolls back tentative context revision, and history search
384
+ consistently excludes system/hidden/checkpoint/placeholder content. Auto
385
+ permission analysis samples the middle of long operation lists, POSIX paths
386
+ are not mistaken for Windows switches, and continuation errors identify
387
+ `runtime.runs.submitInput` accurately.
388
+ - **Release-candidate checkpoint and PowerShell boundary closure.** Session
389
+ lineage now consumes and re-renders the exact compaction checkpoint bytes,
390
+ including recovery guidance, so the compaction entry, first-kept pointer, and
391
+ post-compact attachments remain on the active path; legacy suffix-free
392
+ checkpoints still resume. Auto Mode treats bracket wildcards on PowerShell
393
+ path parameters as incomplete and escalates them, while exact `LiteralPath`
394
+ filenames containing brackets remain supported.
395
+ - **Reliable continue-most-recent selection.** `kodax -c`, classic/Ink startup,
396
+ one-shot CLI execution, and coding-runtime auto-resume now scan beyond the
397
+ legacy ten-session window, skip zero-message ACP/bootstrap placeholders, and
398
+ preserve an explicit session ID. Interactive resume restores the saved
399
+ workspace runtime together with messages, UI history, lineage, artifacts,
400
+ extensions, title, tag, and session identity before the next turn.
401
+ - **Deterministic Auto mode switching.** Entering Auto now displays the resolved
402
+ configured engine immediately instead of a transient bare `Auto`, and Runtime
403
+ setting writes are serialized per Session so rapid shortcut cycling is
404
+ last-action-wins. Persisted or automatic `Auto[RULES]` fallback remains sticky
405
+ by design and can be changed explicitly with `/auto-engine llm`.
406
+ - **Release-review debt closure.** Imperative manual compaction now reconciles
407
+ the exact flat Session history into lineage before creating the compaction
408
+ island. A failed durable interrupt-delivery event leaves the input queued,
409
+ rethrows the persistence error, and emits a bounded `runtime.warning` without
410
+ copying user input content into diagnostics.
411
+
412
+ ### Documentation
413
+
414
+ - Root and generated JSONC templates, both READMEs, architecture/design docs,
415
+ the SDK embedder guide, feature/issue trackers, release verification guide,
416
+ package READMEs, and `kodax_manual` now describe the complete v0.7.74
417
+ compaction, mailbox-wait, active-run input, Goal-tool, resume, Auto-switch,
418
+ and recovery contracts.
419
+
420
+ ## [0.7.73] - 2026-07-20
421
+
422
+ ### Added
423
+
424
+ - **Qwen Token Plan provider.** The new `qwen-token-plan` alias uses the
425
+ Anthropic-compatible Alibaba Cloud Token Plan endpoint and
426
+ `QWEN_TOKEN_API_KEY`. It defaults to `qwen3.8-max-preview`, exposes the
427
+ supported Qwen 3.7/3.6, GLM-5.2, and DeepSeek V4 Pro routes with one-million-
428
+ token context metadata, and declares verified reasoning, image-input, and
429
+ nominal subscription-cost capabilities without changing the existing `qwen`
430
+ provider.
431
+ - **First-run provider setup (FEATURE_271).** A bare interactive `kodax`
432
+ launch with no selected provider and no supported local credential now opens
433
+ a focused provider/model setup flow before Runtime, daemon, session, or REPL
434
+ startup. `kodax setup` reruns the same flow explicitly. It stores only
435
+ non-secret metadata, preserves unrelated config through a revision-checked
436
+ atomic write, refuses malformed existing custom providers and credential-
437
+ bearing endpoint URLs, and then names the required environment variable and
438
+ terminal restart steps.
439
+ - **Typed Auto Mode SDK contract (FEATURE_271).** The root and REPL SDK
440
+ entries now export one pure `resolveAutoModeSettings()` plus the authoritative
441
+ loader and related types; `loadConfig().autoMode` is declared, Runtime Session
442
+ settings persist `autoModeSpeculativeWindowMs` (including `0`), and side
443
+ queries return prompt-free provider/model/timing/retry/phase diagnostics.
444
+ - **Runtime-owned concrete permission grants.** Embedded and daemon SDK clients
445
+ can submit concrete `toolInput` and `executionCwd`, receive only opaque
446
+ Runtime-issued Session/persistent grant suggestions, and select a suggestion
447
+ without constructing or widening its hidden matcher. Exact command, known
448
+ file-tool path, and generic exact-call matchers remain revisioned and audited;
449
+ dynamic or dangerous shell calls never receive a persistent suggestion.
450
+
451
+ ### Fixed
452
+
453
+ - **Reasoning, Auto Mode, and confirmation regressions.** Native
454
+ disabled-thinking requests now send the provider's explicit disabled form
455
+ only for models that declare support (including verified Qwen Token Plan 3.7
456
+ routes); always-thinking variants retain their declared behavior. Sidecar
457
+ queries preserve a supported `none` effort, persisted Runtime Auto engines
458
+ are not overwritten by a fresh REPL, `/mode` synchronizes before reporting
459
+ success, and concurrent confirmation prompts are serialized instead of
460
+ replacing one another.
461
+ - **Legacy permission-grant upgrade safety.** Matcherless grants persisted by
462
+ older releases remain visible and revocable but can no longer authorize a
463
+ concrete tool call. The next invocation requires a fresh Runtime-issued
464
+ matcher, so old coarse Bash grants cannot bypass exact-command, dynamic-shell,
465
+ or absolute-deny protections.
466
+ - **Classifier credential boundary.** Auto[LLM] now redacts explicitly named
467
+ credential values inside shell-escaped JSON before sending an action to its
468
+ side provider, while retaining adjacent operational fields. Redaction is
469
+ documented as defense in depth; arbitrary Base64/hex values are not treated
470
+ as secrets without a credential signal.
471
+ - **Todo/Actor semantic progress checkpoint (FEATURE_270 follow-up).** Worker
472
+ guidance now treats Todo rows as user-visible milestones rather than Actor
473
+ instances and requires timely updates at milestone boundaries. Structured
474
+ terminal child results arm one deduplicated, warn-only reconciliation
475
+ reminder; transcript scans are append-incremental with safe compaction
476
+ fallback, and Sidecar accept-time residual reconciliation emits a diagnostic
477
+ without changing its existing bridge contract.
478
+ - **Auto LLM classifier timeout and missing-model escalation.** Runtime now
479
+ treats omitted Auto engine as the documented LLM default and still owns the
480
+ guardrail, while a missing/blank/malformed effective classifier model fails
481
+ as a typed recoverable Runtime error or a local block in the shared
482
+ `createAutoModeToolGuardrail` boundary. The final guardrail check runs before
483
+ provider lookup and cannot invoke `askUser`, record a circuit-breaker error,
484
+ or downgrade to rules. Classifier requests strip assistant prose/thinking,
485
+ cap normalized transcript/tool-result/action/prompt bytes, remove image
486
+ paths, and cap the structured response at 256 tokens. The 20-second deadline remains bounded:
487
+ a four-call `zai-coding/glm-5.2` probe completed representative Windows
488
+ permission verdicts in 1.9–2.8 seconds, while the matching production session
489
+ revealed a 1.625 MB tool result that had bypassed the existing sanitizer.
490
+ - **Auto guardrail daemon and tracing semantics.** Auto-started Runtime clients
491
+ now require `runtimeAutoModeGuardrail:3`. It retains v2's effective
492
+ timeout/window defaults, bounded classifier input, and diagnostics metadata,
493
+ and adds opaque concrete-grant semantics. Capability negotiation is monotonic
494
+ (v3 satisfies v2/v1); idle older daemons use the existing fenced upgrade path,
495
+ while busy daemons are left untouched with a recoverable error. Guardrail
496
+ spans now cover the awaited callback instead of timing only final verdict
497
+ emission.
498
+ - **Concurrent daemon startup publication race.** A cleanly exiting loser now
499
+ gives the elected owner a bounded publication grace period, preventing an
500
+ SDK starter from reporting failure during the short lock/state handoff gap.
501
+ - **Guardrail/permission execution parity.** Both Runner paths now commit each
502
+ guardrail rewrite before permission policy and execution, reject correlation-
503
+ id rewrites, propagate blocks as visible audited tool results, and preserve
504
+ embedded host policy hooks while rejecting non-transportable daemon hooks.
505
+ Calls rewritten into Bash retain serialized shell ordering.
506
+ - **Managed-run capacity and tool-dispatch accounting.** A complete system
507
+ prompt override no longer double-counts Skills, missing provider usage rebases
508
+ from the final request envelope, and authoritative provider usage remains
509
+ intact. Non-Bash tool calls keep parallel dispatch, Bash remains sequential,
510
+ and aggregate tool-result spill decisions use the complete batch budget.
511
+
512
+ ## [0.7.72] - 2026-07-19
513
+
514
+ ### Added
515
+
516
+ - **Learning Center and learned-capability Runtime control plane
517
+ (FEATURE_266).** KodaX now owns learned capability lifecycle, notification
518
+ cursors, lower-precedence learned Skill discovery, F224 proposal projection,
519
+ promotion/rollback actions, and inline/Worker/daemon SDK parity through one
520
+ agent-layer service. `/learn`, status summaries, and the Ink learning segment
521
+ expose the same durable state without creating a second runtime engine.
522
+ - **Unified adaptive Actor/Turn control plane (FEATURE_270).** AMA collaboration
523
+ now uses one Runtime-owned actor tree and scheduler across native, recursive,
524
+ Workflow-owned, constructed, and external Agent work. The canonical
525
+ `spawn_agent`, `send_message`, `followup_task`, `wait_agent`,
526
+ `interrupt_agent`, `list_agents`, and `agent_output` surface supports reusable
527
+ Actor identities, durable Turn history, direct-parent completion, recursive
528
+ delegation, shared capacity, and SDK/daemon recovery. A manifest-first,
529
+ fail-closed behavioral eval driver freezes the released/current production
530
+ prompt and tool bytes, call graphs, budgets, raw evidence, and blind review
531
+ mapping before any separately authorized provider call.
532
+
533
+ ### Changed
534
+
535
+ - **Current coding-eval aliases and MiniMax default model.** Newly authored or
536
+ revised evals now route Zhipu through `zhipu/glm52` (`glm-5.2`) and MiniMax
537
+ through `mmx/m3` (`MiniMax-M3`). `minimax-coding` now defaults to M3 while
538
+ the old `zhipu/glm51` and `mmx/m27` aliases remain explicitly selectable for
539
+ historical replay; existing raw evidence and reports keep their original
540
+ route labels.
541
+ - **AMA and Workflow orchestration cutover.** AMAW and the old model-visible
542
+ child-task vocabulary are retired. Persisted `amaw`/`ama-workflow` settings
543
+ migrate once to AMA, while new inputs fail with a migration hint. Workflow
544
+ remains available for explicit natural-language, command, named-pattern, and
545
+ SDK requests, but its child Agents now use the unified Actor scheduler and
546
+ task complexity alone no longer activates Workflow.
547
+
548
+ ### Fixed
549
+
550
+ - **Remote Runtime subscription readiness.** Daemon event/workflow
551
+ subscriptions now expose an awaitable `RuntimeSubscription.ready` handshake,
552
+ so hosts can establish cross-client ordering before starting work whose first
553
+ event must not be missed. Handshake failures remain observable to new callers
554
+ without creating unhandled rejections in legacy callers that ignore `ready`.
555
+
556
+ - **Detached daemon lifecycle cleanup.** CLI and SDK startup now retain the
557
+ exact candidate process until its PID is healthy and reclaim only that process
558
+ tree on early exit, timeout, identity mismatch, owner-race loss, or startup
559
+ cancellation. Vitest-owned daemons also shut down when a forcibly terminated
560
+ worker cannot run normal teardown; production daemons remain persistent after
561
+ ordinary client detach and have no idle reaper. A source daemon child now
562
+ carries only KodaX's production preload, explicit `tsx` support, and safe
563
+ Node engine flags instead of inheriting arbitrary parent loaders, preventing
564
+ test-runner hooks from parsing daemon CLI arguments.
565
+
566
+ - **Windows memory lifecycle lock contention.** Concurrent forget/archive
567
+ operations now retry short-lived Windows sharing denials within the existing
568
+ bounded lock deadline instead of failing immediately with `EPERM`; unrelated
569
+ filesystem errors remain fail-fast.
570
+
571
+ - **MiniMax M3 default media regression.** The media capability suite now
572
+ expects the current `minimax-coding` default, MiniMax M3, to support image
573
+ input while retaining fail-closed checks for unverified nearby routes.
574
+
575
+ - **Bare resume cancellation terminal release.** Pressing Esc in `kodax -r`
576
+ now pauses and unreferences the picker-owned stdin path before the bootstrap
577
+ exits, so Windows PowerShell regains its prompt immediately without requiring
578
+ an extra keypress. The full CLI remains unloaded while listing sessions,
579
+ successful selection hands input to the REPL, and replay retains each
580
+ persisted event timestamp.
581
+ - **Auto[LLM] approval reliability.** The default classifier budget is now 20
582
+ seconds, pure readonly invocations bypass classification by invariant, and
583
+ SDK/daemon session settings can select the classifier model and timeout without
584
+ stale guardrail-cache reuse. Runtime advertises and requires
585
+ `runtimeAutoModeGuardrail:1` for auto-started daemon clients, owns the Session
586
+ guardrail ahead of the generic permission hook, persists LLM-to-rules
587
+ fallback, and creates a shared pending request only for an explicit
588
+ escalation. An older daemon is replaced only after a revision/owner-policy
589
+ fenced preflight proves that active/queued work and pending interactions are
590
+ absent; busy or unfenceable daemons return a typed recoverable error. The one
591
+ conditional readonly exception, `semantic_lookup(refresh:true)`, remains
592
+ classified because it rebuilds the on-disk derived index.
593
+ - **Runtime permission boundary correctness.** Relative operands resolve from
594
+ the validated execution directory while `gitRoot` remains a safety boundary;
595
+ Windows containment is case-insensitive, deterministic direct/nested-shell
596
+ writes to the user `.kodax` credential zone are Tier-0 denied, and quoted
597
+ Python/regexp source is not treated as a path. Permission previews use a
598
+ scan-bounded field whitelist, omit write/edit bodies, redact JSON/YAML/PEM
599
+ and command-line credentials, and remain valid size-limited JSON with that
600
+ directory. `exit_plan_mode` is absent without a real host approval bridge.
601
+ - **0.7.x SDK source compatibility.** Deprecated `amaw` input is accepted and
602
+ normalized to AMA without restoring retired behavior; formal `SkillSource`
603
+ remains exhaustive while `ResolvedSkillSource` adds `learned`; daemon
604
+ preflight normalizes canonical `activeAgentTurns` and deprecated
605
+ `activeAgentTasks` to the same required array across old and current wire
606
+ shapes.
607
+ - **Queued follow-up responsiveness.** REPL, AMA, and SA now share the same
608
+ Actor queue routing contract while SA retains its legacy unscoped queue. User
609
+ input wakes `wait_agent` and idle-yield through lossless subscriptions and
610
+ resumes at a safe turn boundary without canceling unrelated parallel tools.
611
+ SDK media follow-ups accept an explicit `sessionId`, preserve old single-Actor
612
+ calls through lifecycle-bound auto-routing, and reject ambiguous concurrent
613
+ calls instead of crossing sessions.
614
+
615
+ ## [0.7.72-hotfix.0] - 2026-07-17
401
616
 
402
617
  ### Fixed
403
618
 
@@ -3017,7 +3232,7 @@ repl → coding, skills
3017
3232
  ### Tests
3018
3233
  - Added / expanded tests for `task-engine`, `reasoning`, `tool-display`, `live-streaming`, `StatusBar`, `invocation-runtime`, `types-legacy`, and `InkREPL.interrupted`
3019
3234
 
3020
- <!-- last-sync: a8c9c283 -->
3235
+ <!-- last-sync: dfce6cd5 -->
3021
3236
 
3022
3237
  ### Added
3023
3238
  - **Repository intelligence substrate (FEATURE_018)**: Task-aware repository intelligence layer under `.agent/repo-intelligence/` with durable artifacts — `repo-overview.json`, `changed-scope.json`, `module-index.json`, `symbol-index.json`, `process-index.json`, `repo-intelligence-manifest.json` — supporting incremental refresh, freshness metadata, and language-tiered extraction (TS/JS via AST, Python, Go, Rust, Java, C++)