@kodax-ai/kodax 0.7.75 → 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 -358
  2. package/LICENSE +158 -158
  3. package/README.md +1613 -1549
  4. package/README_CN.md +946 -895
  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-G5VW55T4.js → chunk-EH7AOMJ7.js} +1 -1
  31. package/dist/chunks/{chunk-N6M2LYEP.js → chunk-FNW2XUL5.js} +9 -9
  32. package/dist/chunks/chunk-FSXI4MAV.js +78 -0
  33. package/dist/chunks/{chunk-4PVSDE5L.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-SB75RNNR.js → chunk-JS2BHGJP.js} +2 -2
  37. package/dist/chunks/chunk-OAMKECRG.js +381 -0
  38. package/dist/chunks/{chunk-OJQQRLZJ.js → chunk-ON2WG2LG.js} +2 -2
  39. package/dist/chunks/{chunk-QRBWNYFV.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-3TQWTHSQ.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-HMVP6XPH.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 -334
  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-LVZJB2GQ.js +0 -2
  99. package/dist/chunks/argument-completer-GHWEWPVQ.js +0 -2
  100. package/dist/chunks/chunk-5WSOB34U.js +0 -329
  101. package/dist/chunks/chunk-6YUDR7WN.js +0 -5
  102. package/dist/chunks/chunk-6ZMKX3XF.js +0 -74
  103. package/dist/chunks/chunk-737LI7OS.js +0 -369
  104. package/dist/chunks/chunk-BN3W2DQY.js +0 -5
  105. package/dist/chunks/chunk-DEHOFNQA.js +0 -427
  106. package/dist/chunks/chunk-F7AIEHSS.js +0 -46
  107. package/dist/chunks/chunk-OGL227XV.js +0 -37
  108. package/dist/chunks/chunk-Q65EAOX6.js +0 -78
  109. package/dist/chunks/chunk-QSMXI4MH.js +0 -770
  110. package/dist/chunks/chunk-UJRRZINL.js +0 -22
  111. package/dist/chunks/compaction-config-L2YZK7Q3.js +0 -2
  112. package/dist/chunks/dist-D3EPVAOZ.js +0 -2
  113. package/dist/chunks/dist-ZJFTZJ55.js +0 -2
  114. package/dist/chunks/host-KHDXYFVG.js +0 -2
  115. package/dist/chunks/run-manager-CD24OO4V.js +0 -2
package/CHANGELOG.md CHANGED
@@ -6,376 +6,613 @@ All notable changes to this project will be documented in this file.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- ## [0.7.75] - 2026-07-24
9
+ ## [0.7.77] - 2026-07-27
10
10
 
11
- > Package, code, tests, and documentation are prepared for SDK/Space validation.
12
- > The `v0.7.75` tag, GitHub Release, and npm publication are intentionally not
13
- > created yet.
14
-
15
- ### Changed
16
-
17
- - **Exact audited npm candidate bytes.** The release script now packs first,
18
- audits the generated Sidecar prompt and budget bridge, and publishes that
19
- exact tarball so SDK validation and registry publication cannot drift.
20
- - **Windows GUI background-process hardening.** Runtime
21
- Worker-reachable non-interactive child processes now request hidden Windows
22
- consoles across memory/Git metadata, provider CLI and ACP, LSP, clipboard,
23
- worktree, review, extension-command, checkpoint, and sandbox paths. Explicit
24
- editor, terminal, and PTY interaction remains unchanged.
25
- - **Published Runtime Worker audit and packaged-host regression.** The bundle
26
- build now audits statically identifiable child-process calls in the published
27
- Runtime Worker, and the packaged Electron daemon smoke runs 20 ordinary
28
- queries with a Win32 console-visibility probe. Packaged KodaX Space validation
29
- on Windows 10 and Windows 11 remains a non-blocking product follow-up; it does
30
- not gate the tag, package build, or npm publication.
31
-
32
- ### Fixed
33
-
34
- - **Sidecar completion and Runtime terminal semantics.** Optional work offered
35
- after the current request is complete is accepted rather than reported as
36
- blocked; only clarification required to finish the current request remains
37
- blocked. Budget-approval state is emitted only for an eligible `revise`, and
38
- structured blocked codes and reasons survive live events, persistence,
39
- daemon round trips, and restart recovery.
40
-
41
- ### Documentation
42
-
43
- - Updated the release guide, current architecture/design baselines, SDK
44
- embedder guidance, feature index, roadmap, issue tracker, English/Chinese
45
- READMEs, and the v0.7.75 regression guide for the SDK validation candidate.
46
- - Rescheduled FEATURE_263 from v0.7.75 to v0.7.77 and retained v0.7.75 as a
47
- feature-free stabilization release.
48
-
49
- ## [0.7.74] - 2026-07-23
50
-
51
- > Git tag and GitHub Release are published by the release workflow. npm
52
- > 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.
53
15
 
54
16
  ### Added
55
17
 
56
- - **Absolute automatic-compaction threshold (FEATURE_272).** SDK, Runtime
57
- Session settings, daemon protocol, REPL, and KodaX Space now expose an
58
- optional token threshold. Missing/zero is inactive; otherwise the smaller of
59
- the absolute limit, bounded percentage policy, and physical provider capacity
60
- triggers compaction. Percentage defaults to 75% and clamps to 15-90%, while
61
- automatic large compaction remains always enabled.
62
- - **Context-owned compaction telemetry and transcript paging.** Root and child
63
- turns now carry stable `contextId`/revision ownership. The canonical
64
- `context.compaction.finished` event reports committed before/after and
65
- component metrics. Runtime observations use bounded transcript slices,
66
- revision-bound pages, and lossless chunks for oversized entries; clients can
67
- require `contextCompaction:3`, `transcriptPaging:1`, and
68
- `transcriptSearch:1`.
69
- - **Durable exact-history recovery.** The root host now persists and flushes
70
- exact pre-compaction lineage before evicting raw bodies. Island sidecars are
71
- committed before the slim main Session, stable entry IDs deduplicate overlap,
72
- and failures preserve the last exact live or persisted copy. Root Agents gain
73
- bounded `session_history_search` / `session_history_read`; SDK and daemon
74
- clients gain revision-bound `sessions.transcriptSearch()`.
75
- - **Runtime active-run interrupt input.** Embedded Runtime and the shared daemon
76
- now advertise `interruptInput:1`. `runtime.runs.submitInput()` queues cloned,
77
- ordered input for the current active Actor Run, delivers one FIFO batch as
78
- separate user messages at the next safe Runner boundary, and exposes durable
79
- queued/delivered lifecycle facts without creating a continuation Run or
80
- leaking terminalized input into a later Run.
81
-
82
- ### Changed
83
-
84
- - **Mailbox-driven Agent coordination (FEATURE_273).** Model-visible
85
- `wait_agent` now accepts only a bounded timeout and yields on the caller's
86
- mailbox, root user input, interruption, or expiry. Progress remains available
87
- through Actor snapshots, event replay, and SDK long-poll without waking and
88
- resampling the parent model. The tool returns only a wake acknowledgement;
89
- authenticated Agent messages and structured completion metadata enter the
90
- transcript once at the next safe boundary. `list_agents` owns tree-state
91
- inspection and `agent_output` owns targeted result reads.
92
- - **Resident Goal lifecycle contracts.** `get_goal`, `create_goal`, and
93
- `update_goal` keep their complete descriptions on both SA and managed AMA
94
- paths. This removes an avoidable discovery round trip while preserving the
95
- explicit-create and three-turn blocked-state rules. The remaining deferred
96
- set stays at exactly 11 tools; schemas, handlers, permissions, Goal state, and
97
- 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.
98
46
 
99
47
  ### Fixed
100
48
 
101
- - **Large compaction coverage and protected-tail basis.** Major compaction now
102
- protects 20% of the effective trigger rather than 20% of the model maximum,
103
- summarizes the complete eligible prefix in one transaction, and uses
104
- map-once/reduce-once only for physical overflow. Exact main-request prefix
105
- reuse preserves prompt/KV cache on both ordinary and managed-task paths while
106
- explicitly excluding the protected raw tail from the summary.
107
- - **User intent retention across repeated and degraded compaction.** Genuine
108
- user queries are mechanically retained in a stable JSONL checkpoint ledger,
109
- including text carried beside tool results. A query is represented exactly
110
- once: raw while it remains in the protected tail, then in the ledger when its
111
- prefix is compacted. The explicit emergency-pruning fallback installs query
112
- recovery before removing old raw evidence.
113
- - **SDK/UI accounting and daemon frame safety.** The legacy compact callback now
114
- reports post-compact tokens on both execution paths, and automatic managed
115
- compaction emits the same post-commit canonical event/report as the standard
116
- agent path. Persisted anchors include admitted post-compact attachments.
117
- Space ignores child context metrics for the root gauge/activity/cost display,
118
- displays the last root transition, labels active model input separately from
119
- complete visible history, and reads transcripts directly through bounded
120
- page/chunk calls. The legacy full-transcript daemon method rejects responses
121
- above 512 KiB instead of risking the 8 MiB frame.
122
- - **Compacted-history loss and maintenance replay.** Full-lineage loads now
123
- merge exact sidecar entries over slim placeholders, compaction writes use a
124
- durable-before-evict boundary, child compaction cannot overwrite root
125
- lineage, and maintenance preserves its append watermark instead of archiving
126
- the same island entries again.
127
- - **Agent completion delivery and resumed transcripts.** Unacknowledged root
128
- completions persist an explicit pending-delivery set and are republished after
129
- a hard restart; same-process Runtime reconstruction deduplicates the projected
130
- queue by child turn ID, while acknowledged and legacy historical completions
131
- are not replayed. Completion acknowledgement remains after authoritative
132
- transcript persistence. Session restore also deduplicates and canonically
133
- repositions tool groups by tool-use ID and binds repeated text to the latest
134
- persisted suffix.
135
- - **Deterministic reads, bounded tool attention, and compaction round exits.**
136
- Auto Mode now handles complete risk-free static reads deterministically while
137
- sensitive paths, credential stores, process environments, and named secret
138
- variables require confirmation. Grep clips pathological lines and exposes
139
- bounded offset continuation; one batch-admission owner separates physical
140
- capacity from tool-attention spill. Current user-shaped and legacy compaction
141
- checkpoints no longer cause a compacted query/final pair to be appended twice.
142
- - **Release-review boundary fixes.** Emergency compaction fallback accounts for
143
- system/tool overhead and response reserve before pruning and reports no
144
- success for unchanged or still-oversized candidates. Runtime-backed REPL paths
145
- use one Session writer, first-run headless compaction seeds Session metadata,
146
- persistence failure rolls back tentative context revision, and history search
147
- consistently excludes system/hidden/checkpoint/placeholder content. Auto
148
- permission analysis samples the middle of long operation lists, POSIX paths
149
- are not mistaken for Windows switches, and continuation errors identify
150
- `runtime.runs.submitInput` accurately.
151
- - **Release-candidate checkpoint and PowerShell boundary closure.** Session
152
- lineage now consumes and re-renders the exact compaction checkpoint bytes,
153
- including recovery guidance, so the compaction entry, first-kept pointer, and
154
- post-compact attachments remain on the active path; legacy suffix-free
155
- checkpoints still resume. Auto Mode treats bracket wildcards on PowerShell
156
- path parameters as incomplete and escalates them, while exact `LiteralPath`
157
- filenames containing brackets remain supported.
158
- - **Reliable continue-most-recent selection.** `kodax -c`, classic/Ink startup,
159
- one-shot CLI execution, and coding-runtime auto-resume now scan beyond the
160
- legacy ten-session window, skip zero-message ACP/bootstrap placeholders, and
161
- preserve an explicit session ID. Interactive resume restores the saved
162
- workspace runtime together with messages, UI history, lineage, artifacts,
163
- extensions, title, tag, and session identity before the next turn.
164
- - **Deterministic Auto mode switching.** Entering Auto now displays the resolved
165
- configured engine immediately instead of a transient bare `Auto`, and Runtime
166
- setting writes are serialized per Session so rapid shortcut cycling is
167
- last-action-wins. Persisted or automatic `Auto[RULES]` fallback remains sticky
168
- by design and can be changed explicitly with `/auto-engine llm`.
169
- - **Release-review debt closure.** Imperative manual compaction now reconciles
170
- the exact flat Session history into lineage before creating the compaction
171
- island. A failed durable interrupt-delivery event leaves the input queued,
172
- rethrows the persistence error, and emits a bounded `runtime.warning` without
173
- 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.
174
196
 
175
197
  ### Documentation
176
198
 
177
- - Root and generated JSONC templates, both READMEs, architecture/design docs,
178
- the SDK embedder guide, feature/issue trackers, release verification guide,
179
- package READMEs, and `kodax_manual` now describe the complete v0.7.74
180
- compaction, mailbox-wait, active-run input, Goal-tool, resume, Auto-switch,
181
- and recovery contracts.
182
-
183
- ## [0.7.73] - 2026-07-20
184
-
185
- ### Added
186
-
187
- - **Qwen Token Plan provider.** The new `qwen-token-plan` alias uses the
188
- Anthropic-compatible Alibaba Cloud Token Plan endpoint and
189
- `QWEN_TOKEN_API_KEY`. It defaults to `qwen3.8-max-preview`, exposes the
190
- supported Qwen 3.7/3.6, GLM-5.2, and DeepSeek V4 Pro routes with one-million-
191
- token context metadata, and declares verified reasoning, image-input, and
192
- nominal subscription-cost capabilities without changing the existing `qwen`
193
- provider.
194
- - **First-run provider setup (FEATURE_271).** A bare interactive `kodax`
195
- launch with no selected provider and no supported local credential now opens
196
- a focused provider/model setup flow before Runtime, daemon, session, or REPL
197
- startup. `kodax setup` reruns the same flow explicitly. It stores only
198
- non-secret metadata, preserves unrelated config through a revision-checked
199
- atomic write, refuses malformed existing custom providers and credential-
200
- bearing endpoint URLs, and then names the required environment variable and
201
- terminal restart steps.
202
- - **Typed Auto Mode SDK contract (FEATURE_271).** The root and REPL SDK
203
- entries now export one pure `resolveAutoModeSettings()` plus the authoritative
204
- loader and related types; `loadConfig().autoMode` is declared, Runtime Session
205
- settings persist `autoModeSpeculativeWindowMs` (including `0`), and side
206
- queries return prompt-free provider/model/timing/retry/phase diagnostics.
207
- - **Runtime-owned concrete permission grants.** Embedded and daemon SDK clients
208
- can submit concrete `toolInput` and `executionCwd`, receive only opaque
209
- Runtime-issued Session/persistent grant suggestions, and select a suggestion
210
- without constructing or widening its hidden matcher. Exact command, known
211
- file-tool path, and generic exact-call matchers remain revisioned and audited;
212
- dynamic or dangerous shell calls never receive a persistent suggestion.
213
-
214
- ### Fixed
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.
215
204
 
216
- - **Reasoning, Auto Mode, and confirmation regressions.** Native
217
- disabled-thinking requests now send the provider's explicit disabled form
218
- only for models that declare support (including verified Qwen Token Plan 3.7
219
- routes); always-thinking variants retain their declared behavior. Sidecar
220
- queries preserve a supported `none` effort, persisted Runtime Auto engines
221
- are not overwritten by a fresh REPL, `/mode` synchronizes before reporting
222
- success, and concurrent confirmation prompts are serialized instead of
223
- replacing one another.
224
- - **Legacy permission-grant upgrade safety.** Matcherless grants persisted by
225
- older releases remain visible and revocable but can no longer authorize a
226
- concrete tool call. The next invocation requires a fresh Runtime-issued
227
- matcher, so old coarse Bash grants cannot bypass exact-command, dynamic-shell,
228
- or absolute-deny protections.
229
- - **Classifier credential boundary.** Auto[LLM] now redacts explicitly named
230
- credential values inside shell-escaped JSON before sending an action to its
231
- side provider, while retaining adjacent operational fields. Redaction is
232
- documented as defense in depth; arbitrary Base64/hex values are not treated
233
- as secrets without a credential signal.
234
- - **Todo/Actor semantic progress checkpoint (FEATURE_270 follow-up).** Worker
235
- guidance now treats Todo rows as user-visible milestones rather than Actor
236
- instances and requires timely updates at milestone boundaries. Structured
237
- terminal child results arm one deduplicated, warn-only reconciliation
238
- reminder; transcript scans are append-incremental with safe compaction
239
- fallback, and Sidecar accept-time residual reconciliation emits a diagnostic
240
- without changing its existing bridge contract.
241
- - **Auto LLM classifier timeout and missing-model escalation.** Runtime now
242
- treats omitted Auto engine as the documented LLM default and still owns the
243
- guardrail, while a missing/blank/malformed effective classifier model fails
244
- as a typed recoverable Runtime error or a local block in the shared
245
- `createAutoModeToolGuardrail` boundary. The final guardrail check runs before
246
- provider lookup and cannot invoke `askUser`, record a circuit-breaker error,
247
- or downgrade to rules. Classifier requests strip assistant prose/thinking,
248
- cap normalized transcript/tool-result/action/prompt bytes, remove image
249
- paths, and cap the structured response at 256 tokens. The 20-second deadline remains bounded:
250
- a four-call `zai-coding/glm-5.2` probe completed representative Windows
251
- permission verdicts in 1.9–2.8 seconds, while the matching production session
252
- revealed a 1.625 MB tool result that had bypassed the existing sanitizer.
253
- - **Auto guardrail daemon and tracing semantics.** Auto-started Runtime clients
254
- now require `runtimeAutoModeGuardrail:3`. It retains v2's effective
255
- timeout/window defaults, bounded classifier input, and diagnostics metadata,
256
- and adds opaque concrete-grant semantics. Capability negotiation is monotonic
257
- (v3 satisfies v2/v1); idle older daemons use the existing fenced upgrade path,
258
- while busy daemons are left untouched with a recoverable error. Guardrail
259
- spans now cover the awaited callback instead of timing only final verdict
260
- emission.
261
- - **Concurrent daemon startup publication race.** A cleanly exiting loser now
262
- gives the elected owner a bounded publication grace period, preventing an
263
- SDK starter from reporting failure during the short lock/state handoff gap.
264
- - **Guardrail/permission execution parity.** Both Runner paths now commit each
265
- guardrail rewrite before permission policy and execution, reject correlation-
266
- id rewrites, propagate blocks as visible audited tool results, and preserve
267
- embedded host policy hooks while rejecting non-transportable daemon hooks.
268
- Calls rewritten into Bash retain serialized shell ordering.
269
- - **Managed-run capacity and tool-dispatch accounting.** A complete system
270
- prompt override no longer double-counts Skills, missing provider usage rebases
271
- from the final request envelope, and authoritative provider usage remains
272
- intact. Non-Bash tool calls keep parallel dispatch, Bash remains sequential,
273
- and aggregate tool-result spill decisions use the complete batch budget.
205
+ ### Verification
274
206
 
275
- ## [0.7.72] - 2026-07-19
276
-
277
- ### Added
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.
278
223
 
279
- - **Learning Center and learned-capability Runtime control plane
280
- (FEATURE_266).** KodaX now owns learned capability lifecycle, notification
281
- cursors, lower-precedence learned Skill discovery, F224 proposal projection,
282
- promotion/rollback actions, and inline/Worker/daemon SDK parity through one
283
- agent-layer service. `/learn`, status summaries, and the Ink learning segment
284
- expose the same durable state without creating a second runtime engine.
285
- - **Unified adaptive Actor/Turn control plane (FEATURE_270).** AMA collaboration
286
- now uses one Runtime-owned actor tree and scheduler across native, recursive,
287
- Workflow-owned, constructed, and external Agent work. The canonical
288
- `spawn_agent`, `send_message`, `followup_task`, `wait_agent`,
289
- `interrupt_agent`, `list_agents`, and `agent_output` surface supports reusable
290
- Actor identities, durable Turn history, direct-parent completion, recursive
291
- delegation, shared capacity, and SDK/daemon recovery. A manifest-first,
292
- fail-closed behavioral eval driver freezes the released/current production
293
- prompt and tool bytes, call graphs, budgets, raw evidence, and blind review
294
- mapping before any separately authorized provider call.
295
-
296
- ### Changed
297
-
298
- - **Current coding-eval aliases and MiniMax default model.** Newly authored or
299
- revised evals now route Zhipu through `zhipu/glm52` (`glm-5.2`) and MiniMax
300
- through `mmx/m3` (`MiniMax-M3`). `minimax-coding` now defaults to M3 while
301
- the old `zhipu/glm51` and `mmx/m27` aliases remain explicitly selectable for
302
- historical replay; existing raw evidence and reports keep their original
303
- route labels.
304
- - **AMA and Workflow orchestration cutover.** AMAW and the old model-visible
305
- child-task vocabulary are retired. Persisted `amaw`/`ama-workflow` settings
306
- migrate once to AMA, while new inputs fail with a migration hint. Workflow
307
- remains available for explicit natural-language, command, named-pattern, and
308
- SDK requests, but its child Agents now use the unified Actor scheduler and
309
- task complexity alone no longer activates Workflow.
310
-
311
- ### Fixed
312
-
313
- - **Remote Runtime subscription readiness.** Daemon event/workflow
314
- subscriptions now expose an awaitable `RuntimeSubscription.ready` handshake,
315
- so hosts can establish cross-client ordering before starting work whose first
316
- event must not be missed. Handshake failures remain observable to new callers
317
- without creating unhandled rejections in legacy callers that ignore `ready`.
318
-
319
- - **Detached daemon lifecycle cleanup.** CLI and SDK startup now retain the
320
- exact candidate process until its PID is healthy and reclaim only that process
321
- tree on early exit, timeout, identity mismatch, owner-race loss, or startup
322
- cancellation. Vitest-owned daemons also shut down when a forcibly terminated
323
- worker cannot run normal teardown; production daemons remain persistent after
324
- ordinary client detach and have no idle reaper. A source daemon child now
325
- carries only KodaX's production preload, explicit `tsx` support, and safe
326
- Node engine flags instead of inheriting arbitrary parent loaders, preventing
327
- test-runner hooks from parsing daemon CLI arguments.
328
-
329
- - **Windows memory lifecycle lock contention.** Concurrent forget/archive
330
- operations now retry short-lived Windows sharing denials within the existing
331
- bounded lock deadline instead of failing immediately with `EPERM`; unrelated
332
- filesystem errors remain fail-fast.
333
-
334
- - **MiniMax M3 default media regression.** The media capability suite now
335
- expects the current `minimax-coding` default, MiniMax M3, to support image
336
- input while retaining fail-closed checks for unverified nearby routes.
337
-
338
- - **Bare resume cancellation terminal release.** Pressing Esc in `kodax -r`
339
- now pauses and unreferences the picker-owned stdin path before the bootstrap
340
- exits, so Windows PowerShell regains its prompt immediately without requiring
341
- an extra keypress. The full CLI remains unloaded while listing sessions,
342
- successful selection hands input to the REPL, and replay retains each
343
- persisted event timestamp.
344
- - **Auto[LLM] approval reliability.** The default classifier budget is now 20
345
- seconds, pure readonly invocations bypass classification by invariant, and
346
- SDK/daemon session settings can select the classifier model and timeout without
347
- stale guardrail-cache reuse. Runtime advertises and requires
348
- `runtimeAutoModeGuardrail:1` for auto-started daemon clients, owns the Session
349
- guardrail ahead of the generic permission hook, persists LLM-to-rules
350
- fallback, and creates a shared pending request only for an explicit
351
- escalation. An older daemon is replaced only after a revision/owner-policy
352
- fenced preflight proves that active/queued work and pending interactions are
353
- absent; busy or unfenceable daemons return a typed recoverable error. The one
354
- conditional readonly exception, `semantic_lookup(refresh:true)`, remains
355
- classified because it rebuilds the on-disk derived index.
356
- - **Runtime permission boundary correctness.** Relative operands resolve from
357
- the validated execution directory while `gitRoot` remains a safety boundary;
358
- Windows containment is case-insensitive, deterministic direct/nested-shell
359
- writes to the user `.kodax` credential zone are Tier-0 denied, and quoted
360
- Python/regexp source is not treated as a path. Permission previews use a
361
- scan-bounded field whitelist, omit write/edit bodies, redact JSON/YAML/PEM
362
- and command-line credentials, and remain valid size-limited JSON with that
363
- directory. `exit_plan_mode` is absent without a real host approval bridge.
364
- - **0.7.x SDK source compatibility.** Deprecated `amaw` input is accepted and
365
- normalized to AMA without restoring retired behavior; formal `SkillSource`
366
- remains exhaustive while `ResolvedSkillSource` adds `learned`; daemon
367
- preflight normalizes canonical `activeAgentTurns` and deprecated
368
- `activeAgentTasks` to the same required array across old and current wire
369
- shapes.
370
- - **Queued follow-up responsiveness.** REPL, AMA, and SA now share the same
371
- Actor queue routing contract while SA retains its legacy unscoped queue. User
372
- input wakes `wait_agent` and idle-yield through lossless subscriptions and
373
- resumes at a safe turn boundary without canceling unrelated parallel tools.
374
- SDK media follow-ups accept an explicit `sessionId`, preserve old single-Actor
375
- calls through lifecycle-bound auto-routing, and reject ambiguous concurrent
376
- calls instead of crossing sessions.
377
-
378
- ## [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
379
616
 
380
617
  ### Fixed
381
618
 
@@ -2995,7 +3232,7 @@ repl → coding, skills
2995
3232
  ### Tests
2996
3233
  - Added / expanded tests for `task-engine`, `reasoning`, `tool-display`, `live-streaming`, `StatusBar`, `invocation-runtime`, `types-legacy`, and `InkREPL.interrupted`
2997
3234
 
2998
- <!-- last-sync: a8c9c283 -->
3235
+ <!-- last-sync: dfce6cd5 -->
2999
3236
 
3000
3237
  ### Added
3001
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++)