@kodax-ai/kodax 0.7.73 → 0.7.75

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 (77) hide show
  1. package/CHANGELOG.md +174 -0
  2. package/README.md +40 -6
  3. package/README_CN.md +34 -5
  4. package/config-templates/config.example.jsonc +7 -0
  5. package/dist/chunks/{agent-T6PGT6AU.js → agent-LVZJB2GQ.js} +1 -1
  6. package/dist/chunks/argument-completer-GHWEWPVQ.js +2 -0
  7. package/dist/chunks/chunk-4PVSDE5L.js +2 -0
  8. package/dist/chunks/chunk-5WSOB34U.js +329 -0
  9. package/dist/chunks/chunk-6YUDR7WN.js +5 -0
  10. package/dist/chunks/chunk-6ZMKX3XF.js +74 -0
  11. package/dist/chunks/chunk-737LI7OS.js +369 -0
  12. package/dist/chunks/{chunk-64M5HOCA.js → chunk-BN3W2DQY.js} +1 -1
  13. package/dist/chunks/chunk-DEHOFNQA.js +427 -0
  14. package/dist/chunks/{chunk-MBAPT2R5.js → chunk-G5VW55T4.js} +1 -1
  15. package/dist/chunks/{chunk-6RI2RBTF.js → chunk-N6M2LYEP.js} +1 -1
  16. package/dist/chunks/{chunk-GAFFYJU3.js → chunk-OGL227XV.js} +11 -11
  17. package/dist/chunks/{chunk-6JTWXGVU.js → chunk-OJQQRLZJ.js} +225 -225
  18. package/dist/chunks/{chunk-XXQLPTAN.js → chunk-Q65EAOX6.js} +7 -7
  19. package/dist/chunks/chunk-QRBWNYFV.js +321 -0
  20. package/dist/chunks/chunk-QSMXI4MH.js +770 -0
  21. package/dist/chunks/{chunk-MLEAQTCD.js → chunk-SB75RNNR.js} +11 -4
  22. package/dist/chunks/{chunk-M7FXNPWV.js → chunk-UJRRZINL.js} +6 -6
  23. package/dist/chunks/{compaction-config-IHJBP4GO.js → compaction-config-L2YZK7Q3.js} +1 -1
  24. package/dist/chunks/{construction-bootstrap-EGRUHKLP.js → construction-bootstrap-3TQWTHSQ.js} +1 -1
  25. package/dist/chunks/{dist-EVEJAII2.js → dist-D3EPVAOZ.js} +1 -1
  26. package/dist/chunks/dist-ZJFTZJ55.js +2 -0
  27. package/dist/chunks/host-KHDXYFVG.js +2 -0
  28. package/dist/chunks/{run-manager-AY7RQOWM.js → run-manager-CD24OO4V.js} +1 -1
  29. package/dist/chunks/{utils-2GAE4XIM.js → utils-HMVP6XPH.js} +1 -1
  30. package/dist/index.d.ts +12 -11
  31. package/dist/index.js +5 -5
  32. package/dist/kodax_cli.js +1300 -1258
  33. package/dist/runtime-worker.js +1209 -1167
  34. package/dist/sdk-a2a.d.ts +9 -8
  35. package/dist/sdk-a2a.js +1 -1
  36. package/dist/sdk-agent.d.ts +107 -59
  37. package/dist/sdk-agent.js +1 -1
  38. package/dist/sdk-coding.d.ts +32 -16
  39. package/dist/sdk-coding.js +1 -1
  40. package/dist/sdk-experimental-memory.js +1 -1
  41. package/dist/sdk-llm.js +1 -1
  42. package/dist/sdk-mcp.js +1 -1
  43. package/dist/sdk-media.js +1 -1
  44. package/dist/sdk-repl.d.ts +27 -20
  45. package/dist/sdk-repl.js +2 -2
  46. package/dist/sdk-runtime.d.ts +153 -15
  47. package/dist/sdk-runtime.js +1 -1
  48. package/dist/sdk-session.d.ts +4 -4
  49. package/dist/sdk-session.js +1 -1
  50. package/dist/sdk-skills.js +1 -1
  51. package/dist/semantic-worker.js +16 -14
  52. package/dist/types-chunks/{bash-prefix-extractor.d-bApf5nGw.d.ts → bash-prefix-extractor.d-r1beOESM.d.ts} +48 -12
  53. package/dist/types-chunks/{capsule.d-CGWltwno.d.ts → capsule.d-zeqV4IQX.d.ts} +10 -2
  54. package/dist/types-chunks/{commands.d-CEHGwRok.d.ts → commands.d-DUxnK2TU.d.ts} +10 -7
  55. package/dist/types-chunks/{guardrail.d-CC4vAQl7.d.ts → guardrail.d-CWYD1bdL.d.ts} +1 -1
  56. package/dist/types-chunks/{guardrail.d-CXIPlWP3.d.ts → guardrail.d-qjuKJZ31.d.ts} +72 -11
  57. package/dist/types-chunks/history-retrieval.d-BKTJIrVd.d.ts +57 -0
  58. package/dist/types-chunks/{public-api.d-FBmX0kxo.d.ts → public-api.d-CX4B11qY.d.ts} +17 -4
  59. package/dist/types-chunks/{run-manager.d-DUNnJcpE.d.ts → run-manager.d-B9fEIjZk.d.ts} +1 -1
  60. package/dist/types-chunks/{sdk-session-XqacVOs8.d.ts → sdk-session-B0fhAOPa.d.ts} +2 -2
  61. package/dist/types-chunks/{types.d-DKr6TCXL.d.ts → types.d-Bm_y6YuM.d.ts} +2 -2
  62. package/dist/types-chunks/{types.d-DgciGHoG.d.ts → types.d-DEctY20M.d.ts} +9 -2
  63. package/dist/types-chunks/{types.d-BnPhGmar.d.ts → types.d-sRLugmjy.d.ts} +61 -14
  64. package/dist/types-chunks/{utils.d-BPYX7-KN.d.ts → utils.d-D0wPxz8y.d.ts} +5 -5
  65. package/docs/SDK_EMBEDDER_GUIDE.md +1995 -1689
  66. package/package.json +8 -1
  67. package/dist/chunks/argument-completer-QGMWA2C3.js +0 -2
  68. package/dist/chunks/chunk-AGDDM5AW.js +0 -329
  69. package/dist/chunks/chunk-BUPJGG3C.js +0 -5
  70. package/dist/chunks/chunk-EAD4SF3Z.js +0 -413
  71. package/dist/chunks/chunk-HVCNAZ52.js +0 -365
  72. package/dist/chunks/chunk-OG6DRNKV.js +0 -755
  73. package/dist/chunks/chunk-PFH53O4M.js +0 -2
  74. package/dist/chunks/chunk-V4F6IYNK.js +0 -73
  75. package/dist/chunks/chunk-WQ6PWGK5.js +0 -320
  76. package/dist/chunks/dist-5N3I2RTW.js +0 -2
  77. package/dist/chunks/host-MECITNE3.js +0 -2
package/CHANGELOG.md CHANGED
@@ -6,6 +6,180 @@ 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
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.
53
+
54
+ ### Added
55
+
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.
98
+
99
+ ### Fixed
100
+
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.
174
+
175
+ ### Documentation
176
+
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
+
9
183
  ## [0.7.73] - 2026-07-20
10
184
 
11
185
  ### Added
package/README.md CHANGED
@@ -385,6 +385,20 @@ hosts that disable it must start the daemon through ordinary Node/KodaX CLI and
385
385
  connect in attach-only mode. For SDK calls, `homeDir` is the CLI-style base
386
386
  directory that owns `.kodax`, not the `.kodax` path itself.
387
387
 
388
+ **v0.7.75 Windows GUI stabilization candidate:** Runtime Worker-reachable
389
+ non-interactive subprocesses request hidden Windows consoles across memory/Git,
390
+ provider CLI/ACP, LSP, clipboard, worktree, review, extension-command,
391
+ checkpoint, and sandbox paths. Explicit editor, terminal, and PTY behavior is
392
+ unchanged. The SDK bundle includes a static child-process audit and a packaged
393
+ Electron 20-query console-visibility regression. Product-level packaged KodaX
394
+ Space verification remains useful but does not gate SDK packaging or
395
+ publication.
396
+
397
+ The same candidate distinguishes optional post-completion offers from
398
+ clarification required to finish the current request, emits budget-approval
399
+ state only for eligible Sidecar revisions, and preserves structured blocked
400
+ reasons across embedded and daemon Runtime boundaries.
401
+
388
402
  One daemon owns many sessions. Different sessions may run concurrently; starts
389
403
  within the same session are queued so that only one run is active for that
390
404
  session. Multiple `kodax` processes can attach to the same daemon and open or
@@ -417,7 +431,7 @@ configuration error when no effective classifier model exists, rather than
417
431
  silently falling back. Runtime permission prompts now offer opaque, exact
418
432
  allow-once/session/persistent grant suggestions; persistent grants are
419
433
  daemon-owned and revisioned. Host plan exit is exposed only when the host
420
- supplies an approval callback. See the [Runtime Auto Mode integration guide](docs/SDK_EMBEDDER_GUIDE.md#24-runtime-owned-auto-mode-and-plan-approval-bridges-v072).
434
+ supplies an approval callback. See the [Runtime Auto Mode integration guide](docs/SDK_EMBEDDER_GUIDE.md#24-runtime-owned-auto-mode-and-plan-approval-bridges-v0772v0773).
421
435
 
422
436
  ## Repo Intelligence
423
437
 
@@ -537,9 +551,15 @@ KodaX has two layers that consumers should understand separately:
537
551
 
538
552
  **Historical Workflow Activation Tiers (FEATURE_248 + FEATURE_249, v0.7.59; superseded by F270 in v0.7.72)**: v0.7.59 introduced AMAW and explicit-request AMA behavior. F270 retires AMAW and its complexity-driven directive. SA remains solo; AMA is the single adaptive multi-Agent mode and activates Workflow only from explicit Workflow intent. See [docs/features/v0.7.59.md](docs/features/v0.7.59.md) and [docs/features/v0.7.72.md](docs/features/v0.7.72.md).
539
553
 
540
- **Progressive Disclosure on the Managed Tool Path (FEATURE_250, v0.7.60; F270 mode update in v0.7.72)**: the deferred-tool progressive-disclosure mechanism applies to the managed AMA path. Cache-cold managed turns carry one-line search hints instead of full descriptions for the 13 non-mcp deferred tools (repo-intelligence + web/code + goal); each tool's `input_schema` is unchanged, so it stays directly callable and the full description is fetched on demand via `tool_search`. `mcp_*` stay resident and `run_workflow` is untouched. F270 retires the former AMAW mode without changing this disclosure behavior. See [docs/features/v0.7.60.md](docs/features/v0.7.60.md).
554
+ **Progressive Disclosure on the Managed Tool Path (FEATURE_250, v0.7.60; current policy corrected in v0.7.74)**: the deferred-tool mechanism applies to the managed AMA path as well as SA. The current deferred set contains exactly 11 tools: six repo-intelligence tools, four web/code discovery tools, and `run_workflow`. Their `input_schema` remains directly callable while `tool_search` provides the full description on demand. The five fixed `mcp_*` facades and the `get_goal` / `create_goal` / `update_goal` lifecycle tools stay resident with their complete contracts. The v0.7.74 goal correction adds only about 109 estimated schema tokens versus the former hints (`get_goal` is actually 12 tokens smaller when resident), removes a discovery round trip, and changes no tool schema, handler, permission, goal state, or compaction-protection behavior. See [docs/features/v0.7.60.md](docs/features/v0.7.60.md) and [docs/features/v0.7.74.md](docs/features/v0.7.74.md#feature_250-v0774-correction-resident-goal-lifecycle-tools).
555
+
556
+ **Context-Efficient Tool Results + Workflow Quality Preflight (FEATURE_251 + FEATURE_252, v0.7.61; corrected 2026-07-14)**: local tools collect complete output and apply only contract-equivalent normalization that is strictly shorter; command-specific lossy Bash filters are off by default, and compound Bash uses no semantic adapter. One owner evaluates the complete parallel-result batch against the final provider request: it solves the largest final input `Pmax` for which `Pmax + output reserve + max(2048, 3% of Pmax) <= context window`, then admits only the remaining physical capacity. Results stay verbatim whenever they fit; only real overflow persists the complete value and emits `KODAX_RESULT_INCOMPLETE`. History keeps the same physical-capacity safety rule: no default lossy microcompaction below capacity, summary-first at pressure, and typed failure without silent deletion when a recoverable request cannot be formed. FEATURE_272 supersedes FEATURE_251 only for the default major-compaction trigger. FEATURE_252's deterministic pre-start workflow contract lint is unchanged. See [docs/features/v0.7.61.md](docs/features/v0.7.61.md) and [docs/ADR.md ADR-050](docs/ADR.md).
557
+
558
+ **Reliable Always-On Context Compaction (FEATURE_272, v0.7.74)**: automatic major compaction cannot be disabled. Its percentage trigger defaults to 75% and clamps to 15-90%; optional `triggerTokens` is inactive when omitted/zero, otherwise the smaller percentage, absolute, and physical-capacity threshold wins. The protected raw tail is 20% of that effective trigger. One transaction summarizes the complete eligible prefix, preserves every genuine user request through an exact ledger, and emits success only after a physically valid token reduction and awaited durable commit. Before raw bodies are evicted, the Session owner durably flushes their exact lineage; stable entry IDs merge the sidecar and slim Session without duplicates. Root and persistent child Agents can recover omitted user/assistant/tool details through bounded `session_history_search` → `session_history_read`, with children isolated to hidden worker Sessions and never granted root-history access. SDK/Runtime clients use revision-bound `transcriptSearch`, pages, and lossless chunks. Hidden reasoning, system instructions, and synthetic checkpoints are excluded from model search. See [the feature design](docs/features/v0.7.74.md), [SDK guide §25](docs/SDK_EMBEDDER_GUIDE.md#25-always-on-context-compaction-and-bounded-transcript-recovery-v0774), and [ADR-057](docs/ADR.md#adr-057-large-compaction-is-an-always-on-context-scoped-full-coverage-transaction).
541
559
 
542
- **Context-Efficient Tool Results + Workflow Quality Preflight (FEATURE_251 + FEATURE_252, v0.7.61; corrected 2026-07-14)**: local tools collect complete output and apply only contract-equivalent normalization that is strictly shorter; command-specific lossy Bash filters are off by default, and compound Bash uses no semantic adapter. One owner evaluates the complete parallel-result batch against the final provider request: it solves the largest final input `Pmax` for which `Pmax + output reserve + max(2048, 3% of Pmax) <= context window`, then admits only the remaining physical capacity. Results stay verbatim whenever they fit; only real overflow persists the complete value and emits `KODAX_RESULT_INCOMPLETE`. History follows the same physical-capacity rule: no default lossy microcompaction below capacity, summary-first at actual pressure, and typed failure without silent message deletion when a recoverable request cannot be formed. Static early percentages are explicit opt-ins. FEATURE_252's deterministic pre-start workflow contract lint is unchanged. See [docs/features/v0.7.61.md](docs/features/v0.7.61.md) and [docs/ADR.md ADR-050](docs/ADR.md).
560
+ **Mailbox-Driven Agent Coordination (FEATURE_273, v0.7.74)**: `wait_agent` is now a true model-facing mailbox yield with one bounded `timeout_ms`, not an Actor progress/event reader. It wakes for scoped Agent messages or completions, root user input, interruption, or timeout; progress remains available to UI/SDK snapshot, replay, and long-poll consumers without resampling the parent model. The tool returns only a wake acknowledgement, while authenticated Agent evidence and structured task metadata enter the next safe model boundary once. Unacknowledged root completions survive a hard restart, same-process Runtime rebuilds deduplicate by child turn ID, and acknowledged or legacy historical completions are not replayed. Use `list_agents` for tree state and `agent_output` for a targeted known result. See [the feature design](docs/features/v0.7.74.md#feature_273-mailbox-driven-agent-wait-and-telemetrycontrol-separation), [SDK guide §26](docs/SDK_EMBEDDER_GUIDE.md#26-agent-mailbox-control-versus-sdk-event-telemetry-v0774), and [ADR-058](docs/ADR.md#adr-058-model-agent-wait-is-mailbox-control-not-event-telemetry).
561
+
562
+ **Active-Run Interrupt Input (v0.7.74)**: embedded Runtime and the shared daemon advertise `interruptInput:1`. `runtime.runs.submitInput()` queues an immutable, ordered input for the current active Actor Run; all inputs admitted before one safe Runner boundary are delivered FIFO as separate user messages in the next LLM request, without creating continuation Runs. Queued/delivered state is visible in typed Run snapshots/events, delivery is acknowledged against the exact consumed IDs, and terminal cleanup prevents undelivered input from leaking into later Runs.
543
563
 
544
564
  **External Agent SDK Plane (FEATURE_258, v0.7.67)**: `/agent` exports the protocol-neutral executor, registration, policy, credential-broker, artifact-policy, catalog, and durable task contracts. `/runtime` exposes the installed plane through `admin.agentRegistrations`, `agents`, and `agentTasks`, with the same DTO service methods over embedded and daemon clients. Executor factories are host functions: install them in an inline owner or while creating a new in-process daemon owner; they cannot be injected through an existing daemon connection or across a Runtime Worker boundary. Plane shutdown is terminal: pending waits and all later service calls reject. Restricted Workflow scripts preserve validated `phase` and external `target` routing. See the [complete owner/consumer recipes and safety contract](docs/SDK_EMBEDDER_GUIDE.md#18-external-agent-executor-plane-feature_258-v0767).
545
565
 
@@ -881,7 +901,7 @@ kodax --session todo-app "Write tests"
881
901
  kodax Start the interactive REPL
882
902
  -h, --help [topic] Show help or topic help
883
903
  -p, --print <text> Run a single task and exit
884
- -c, --continue Continue the most recent conversation in this directory
904
+ -c, --continue Continue the most recent non-empty conversation in this directory
885
905
  -r, --resume [value] Resume by ID/exact title, or open the searchable picker
886
906
  -m, --provider Provider to use
887
907
  --model <name> Override the model
@@ -922,6 +942,10 @@ KodaX provides 3 permission modes for fine-grained control:
922
942
  - Auto Mode runs guardrail classification before the permission UI; a safe
923
943
  allow verdict does not create a pending approval request. The session records
924
944
  an automatic LLM-to-rules fallback for later turns.
945
+ - Shift-Tab cycles `Plan -> Edits -> Auto`; Shift+Enter inserts a newline. Auto
946
+ immediately displays `Auto[LLM]` or `Auto[RULES]`, and rapid mode changes are
947
+ persisted in input order. `Auto[RULES]` is a valid sticky fallback/manual
948
+ state; use `/auto-engine llm` to opt back into LLM classification.
925
949
  - Runtime-backed prompts can offer exact `allow once`, `allow this session`,
926
950
  and `always allow` choices. Return the Runtime-issued opaque suggestion;
927
951
  never derive or widen a permission rule from the displayed command or path.
@@ -929,6 +953,12 @@ KodaX provides 3 permission modes for fine-grained control:
929
953
  through `runtime.permissions` by an authorized SDK host. Dynamic shell
930
954
  commands deliberately receive no persistent-grant suggestion.
931
955
 
956
+ `kodax -c` skips zero-message ACP/bootstrap placeholders even when they are
957
+ newer than the last real conversation. The same newest non-empty rule applies
958
+ to Ink, classic, one-shot CLI, and coding-runtime auto-resume; an explicit
959
+ session ID always wins. Interactive resume also restores the saved workspace
960
+ runtime before relative shell commands or the next model turn.
961
+
932
962
  ### CLI Help Topics
933
963
 
934
964
  Get detailed help for specific topics:
@@ -1156,6 +1186,10 @@ const tree = actors.list('/root');
1156
1186
  const policy = new DefaultSummaryCompaction({ thresholdRatio: 0.8, keepRecent: 10 });
1157
1187
  ```
1158
1188
 
1189
+ `DefaultSummaryCompaction` is a standalone agent-layer primitive for custom
1190
+ loops. It does not replace or disable KodaX's always-on coding-runtime policy
1191
+ described under FEATURE_272 above.
1192
+
1159
1193
  **Key Features**: `Runner` + per-step lifecycle · `runFanOut` (bounded-concurrency + abort + progress events) · `runWithIdleYield` (chat-while-waiting) · `AgentActorController` / `AgentTurnScheduler` · session-id generation · tiktoken-based token estimation · `CompactionPolicy` interface.
1160
1194
 
1161
1195
  ### `@kodax-ai/kodax/skills` — Skills System
@@ -1355,7 +1389,7 @@ KodaX ships 50+ built-in tools, grouped below. They are registered as a single f
1355
1389
  | `spawn_agent` | Create a named child Actor and start its first Turn under inherited capabilities, session capacity, and root work budget. |
1356
1390
  | `send_message` | Commit bounded information to an Actor mailbox without starting a new Turn. |
1357
1391
  | `followup_task` | Join a running Actor at a safe boundary or atomically start a new Turn for an idle Actor. |
1358
- | `wait_agent` | Wait for one or more Actor state changes without polling a second task registry. |
1392
+ | `wait_agent` | Yield on scoped mailbox/user/interruption/timeout activity; returns a wake acknowledgement and never uses Actor progress as a model wake source. |
1359
1393
  | `interrupt_agent` | Request interruption of an active Turn while preserving Actor identity. |
1360
1394
  | `list_agents` | Inspect the caller-visible Actor subtree and Turn states. |
1361
1395
  | `agent_output` | Read bounded durable output for an authorized Actor/Turn. |
@@ -1498,7 +1532,7 @@ KodaX uses an **English-first** comment style with selective Chinese brief notes
1498
1532
  ## Documentation
1499
1533
 
1500
1534
  - [README_CN.md](README_CN.md) - Chinese Documentation
1501
- - [docs/SDK_EMBEDDER_GUIDE.md](docs/SDK_EMBEDDER_GUIDE.md) - SDK hosting, shared Runtime daemon, Auto Mode, and permission-grant contracts
1535
+ - [docs/SDK_EMBEDDER_GUIDE.md](docs/SDK_EMBEDDER_GUIDE.md) - SDK hosting, shared Runtime daemon, Auto Mode, v0.7.74 compaction/history recovery, Agent telemetry, and active-run input contracts
1502
1536
  - [docs/release.md](docs/release.md) - Standalone binary build & release pipeline
1503
1537
  - [docs/PRD.md](docs/PRD.md) - Product Requirements
1504
1538
  - [docs/ADR.md](docs/ADR.md) - Architecture Decisions
package/README_CN.md CHANGED
@@ -91,6 +91,17 @@ daemon,不会再次打开 GUI。`ELECTRON_RUN_AS_NODE` 只存在于子进程
91
91
  再使用 attach-only 模式连接。SDK 的 `homeDir` 是拥有 `.kodax` 的 CLI 风格基础目录,
92
92
  不是 `.kodax` 目录本身。
93
93
 
94
+ **v0.7.75 Windows GUI 稳定性候选版**:Runtime Worker 可达的非交互后台子进程
95
+ 在 Windows 上统一请求隐藏控制台,覆盖 memory/Git、provider CLI/ACP、LSP、
96
+ clipboard、worktree、review、extension command、checkpoint 与 sandbox 路径;
97
+ 显式 editor、terminal 和 PTY 行为保持不变。SDK bundle 增加静态子进程审计,
98
+ packaged Electron 回归连续执行 20 次普通查询并检查控制台可见性。KodaX Space
99
+ 产品级验证仍然有价值,但不阻塞 SDK 打包、tag 或 npm 发布。
100
+
101
+ 同一候选版还会区分“当前请求完成后的可选后续工作”和“完成当前请求所必需的
102
+ 澄清”,只为符合资格的 Sidecar `revise` 发布预算审批状态,并在 embedded 与
103
+ daemon Runtime 边界保留结构化 blocked 原因。
104
+
94
105
  **v0.7.72–v0.7.73 Runtime 权限契约:**Auto Mode 的权限决策由 Runtime Session 持有,
95
106
  不再由 UI hook 抢先决定。Runtime 会跨 turn 复用 LLM/rules guardrail,先分类、
96
107
  仅在 `escalate` 时创建共享 permission 请求,并把自动降级到 rules 的结果持久化到
@@ -102,6 +113,12 @@ session。Session 也可设置 classifier model 和有界 timeout;`auto` 默
102
113
  不会向模型暴露 `exit_plan_mode`。完整 SDK 接入见
103
114
  [Runtime Auto Mode 指引](docs/SDK_EMBEDDER_GUIDE.md#24-runtime-owned-auto-mode-and-plan-approval-bridges-v072)。
104
115
 
116
+ **v0.7.74 Auto 切换可靠性:**默认用 `Shift+Tab` 在 `Plan -> Edits -> Auto`
117
+ 之间循环,`Shift+Enter` 仍用于换行。进入 Auto 时状态栏会立即显示已解析的
118
+ `Auto[LLM]` 或 `Auto[RULES]`,同一 Session 的 Runtime 设置按键入顺序串行提交,
119
+ 快速循环不会让较早的异步结果覆盖最后一次选择。`Auto[RULES]` 可能是自动降级或
120
+ 手动选择后的合法粘性状态;使用 `/auto-engine llm` 可显式恢复 LLM 分类。
121
+
105
122
  ## 为什么用 KodaX
106
123
 
107
124
  <table>
@@ -566,7 +583,7 @@ KodaX 有 50+ 个内置工具,按类别分组如下(实际暴露给 LLM 是
566
583
  | `spawn_agent` | 创建命名子 Actor,并在继承权限、会话并发和根工作预算约束下启动首个 Turn。 |
567
584
  | `send_message` | 向 Actor 的持久 mailbox 提交有界信息,不启动新 Turn。 |
568
585
  | `followup_task` | 在安全边界加入运行中的 Actor,或为 idle Actor 原子启动新 Turn。 |
569
- | `wait_agent` | 等待一个或多个 Actor 状态变化,不轮询第二套任务注册表。 |
586
+ | `wait_agent` | 等待当前作用域的 mailbox / 用户输入 / 中断 / 超时,只返回唤醒确认,Actor progress 不会唤醒模型。 |
570
587
  | `interrupt_agent` | 请求中断 active Turn,同时保留 Actor 身份。 |
571
588
  | `list_agents` | 查看调用方有权访问的 Actor 子树与 Turn 状态。 |
572
589
  | `agent_output` | 读取有权限的 Actor/Turn 有界持久输出。 |
@@ -592,7 +609,7 @@ KodaX 是基于 npm workspaces 的 TypeScript monorepo,**源码层 4 个 works
592
609
  | Workspace 包 | 作用 | 主要依赖 |
593
610
  |----|------|---------|
594
611
  | `@kodax-ai/llm` | LLM 抽象层(16 个内置 provider alias + 自定义 provider 注册),可独立使用 | `@anthropic-ai/sdk`, `openai` |
595
- | `@kodax-ai/agent` | 通用 Agent 框架 —— Runner / runFanOut / runWithIdleYield / AgentActorController / AgentTurnScheduler + media/input artifacts + 会话管理 + tokenization + 可插拔 compaction + **inline 后**:session-lineage 子树 + capabilities (mcp + skills + builtin) + tracing(subpaths: `/media`、`/session-lineage`、`/capabilities/mcp`、`/capabilities/skills`、`/tracing`) | `@kodax-ai/llm`, `js-tiktoken`, `fflate`, `jimp`, `yaml` |
612
+ | `@kodax-ai/agent` | 通用 Agent 框架 —— Runner / runFanOut / runWithIdleYield / AgentActorController / AgentTurnScheduler + media/input artifacts + 会话管理 + tokenization + 面向自定义 loop 的可插拔 compaction primitive(不关闭 KodaX coding runtime 的始终开启策略)+ **inline 后**:session-lineage 子树 + capabilities (mcp + skills + builtin) + tracing(subpaths: `/media`、`/session-lineage`、`/capabilities/mcp`、`/capabilities/skills`、`/tracing`) | `@kodax-ai/llm`, `js-tiktoken`, `fflate`, `jimp`, `yaml` |
596
613
  | `@kodax-ai/coding` | Coding Agent:50+ 工具(含 canonical Actor 协作工具)、role prompts、agent loop、auto-continue + repo-intelligence protocol(v0.7.43 inline) | `@kodax-ai/llm`, `@kodax-ai/agent` |
597
614
  | `@kodax-ai/repl` | 完整交互式终端 UI(Ink / React、权限模式、命令系统、流式渲染) | `@kodax-ai/coding`, `ink`, `react` |
598
615
 
@@ -629,6 +646,12 @@ KodaX 有两层结构,SDK 用户需要分开理解:
629
646
 
630
647
  **会话恢复与 ACP 污染修复(FEATURE_261,v0.7.67)**:直接运行 `kodax -r` 会进入可搜索、上下选择、Tab 补全和翻页的交互式会话选择器,并显示当前选中项的完整 session ID;`kodax -r <值>` 优先按完整 ID 恢复,ID 不存在时再按忽略大小写的完整标题匹配。标题唯一则直接恢复,同名标题则进入只包含候选项的选择器,绝不静默选第一条。`listSessions()` / Runtime / daemon 会话列表新增 `surface` 精确过滤和不透明 `cursor` 分页。ACP session 改为收到首个有效 prompt 后才持久化,ACP 测试强制使用临时 runtime home,避免测试记录写入真实 `~/.kodax/sessions`。`kodax -s cleanup-acp` 只预览严格匹配的空 ACP 污染记录;仅显式追加 `--apply-session-cleanup` 时才归档,不做永久删除。
631
648
 
649
+ **v0.7.74 最近会话恢复闭环:**`kodax -c`、Ink/Classic 启动、单次 CLI 与 coding
650
+ runtime auto-resume 都会扫描最多 1000 条最新摘要并跳过 `msgCount=0` 的 ACP/bootstrap
651
+ 占位会话;显式 session ID 始终优先。交互式恢复会在下一轮前恢复保存的 workspace
652
+ runtime、消息、UI 历史、lineage、artifact、extension 状态、标题、tag 与 session ID,
653
+ 因此相对 shell 命令不会错误地落回启动目录。
654
+
632
655
  **实验性 Memory Agent SDK(FEATURE_260,v0.7.68)**:`/experimental-memory` 暴露基于既有 F228 治理平面的薄 `MemoryAgent` 与 scoped `MemorySession`。被动 recall 零等待,`query()` 只读且由主 Action LLM 主动选择;持久化仍必须经过 proposal/preview/fingerprint/apply。召回内容保持低权限,安全与 scope 边界仍由确定性代码门禁承担。直接 session 示例与宿主边界见 [SDK Embedder Guide §21](docs/SDK_EMBEDDER_GUIDE.md#21-experimental-governed-memory--experimental-memory-feature_260-v0768)。
633
656
 
634
657
  **双向 A2A 1.0(FEATURE_267,v0.7.69)**:`/a2a` 可发现 allowlist 内的 Agent Card,并通过既有 F258 plane 安装 JSON-RPC/SSE executor。配置中的出站 Agent 还会作为 `external:<name>` 自动注册到 embedded CLI 与用户 daemon Runtime,因此主 Agent 无需宿主代码即可编排。一个 `a2a.json` 可保存多个出站注册,但最多只有一个入站 server;入站可发布 Runtime 默认 Agent,或发布一个经过验证的 `~/.kodax/agents/*.md` Agent。内置 listener 仅允许 loopback;公网部署必须由宿主用 TLS、鉴权和授权包住 `handle()`。不宣称支持 A2A 0.3、gRPC、HTTP+JSON、push notification,也不会自动把本地 Agent 暴露到网络。详见 [SDK Embedder Guide §22](docs/SDK_EMBEDDER_GUIDE.md#22-bidirectional-a2a-10--a2a-feature_267-v0769)。
@@ -725,9 +748,15 @@ REPL 显示、唤醒或消费。
725
748
 
726
749
  **历史工作流激活分层(FEATURE_248 + FEATURE_249,v0.7.59;F270 于 v0.7.72 取代)**:v0.7.59 引入 AMAW 和 AMA 的显式请求行为。F270 退役 AMAW 及其复杂度驱动指令;SA 保持单独作业,AMA 成为唯一自适应多 Agent 模式,并且只在明确 Workflow 意图下激活 Workflow。详见 [docs/features/v0.7.59.md](docs/features/v0.7.59.md) 与 [docs/features/v0.7.72.md](docs/features/v0.7.72.md)。
727
750
 
728
- **managed 工具路径的渐进披露(FEATURE_250,v0.7.60;F270 模式更新于 v0.7.72)**:deferred-tool 渐进披露机制应用于 AMA managed path。缓存冷启轮次以一行 search hint 替代 13non-mcp 延迟工具的完整描述;F270 退役原 AMAW 模式,但不改变这项披露行为。详见 [docs/features/v0.7.60.md](docs/features/v0.7.60.md)。
751
+ **managed 工具路径的渐进披露(FEATURE_250,v0.7.60;当前策略于 v0.7.74 纠偏)**:deferred-tool 机制同时应用于 AMA managed path SA。当前延迟集合精确包含 11 个工具:6repo-intelligence、4 web/code discovery,以及 `run_workflow`;其 `input_schema` 仍可直接调用,完整描述按需由 `tool_search` 返回。5 个固定 `mcp_*` facade 与 `get_goal` / `create_goal` / `update_goal` 生命周期工具常驻完整契约。v0.7.74 的 Goal 纠偏相对旧 hint 仅增加约 109 个估算 schema token(其中常驻的 `get_goal` 反而少 12 token),消除一次发现往返,并且不改变工具 schema、handler、权限、Goal 状态或压缩保护。详见 [docs/features/v0.7.60.md](docs/features/v0.7.60.md) 与 [docs/features/v0.7.74.md](docs/features/v0.7.74.md#feature_250-v0774-correction-resident-goal-lifecycle-tools)
752
+
753
+ **上下文高效的工具结果 + Workflow 质量预检(FEATURE_251 + FEATURE_252,v0.7.61;2026-07-14 纠偏)**:本地工具先完整采集,只采用契约等价且严格更短的无损规范化;命令专用 Bash 有损过滤默认关闭,compound Bash 不使用语义 adapter。并行结果由唯一 owner 按最终 provider 请求统一判容:先求满足 `Pmax + 输出预留 + max(2048, Pmax 的 3%) <= 上下文窗口` 的最大最终输入,再只使用剩余物理容量。能放下就逐字交付,只有真实溢出才持久化完整结果并返回 `KODAX_RESULT_INCOMPLETE`。历史仍遵守相同的物理容量安全规则:容量内不做默认有损 microcompaction,压力下 summary-first,无法形成可恢复请求时 typed failure,禁止静默删除。FEATURE_272 仅取代 FEATURE_251 的大型压缩默认触发策略;FEATURE_252 的确定性 workflow 启动前合约 lint 保持不变。详见 [docs/features/v0.7.61.md](docs/features/v0.7.61.md) 与 [docs/ADR.md ADR-050](docs/ADR.md)。
754
+
755
+ **可靠且始终开启的上下文压缩(FEATURE_272,v0.7.74)**:自动大型压缩不允许关闭。百分比阈值默认 75%,并限制在 15-90%;可选 `triggerTokens` 未设置或为 0 时不生效,否则百分比、绝对值和物理容量三者取最小。最近原始尾部保护量为有效阈值的 20%。一次事务压缩保护尾部之外的完整 eligible prefix,并用精确 query ledger 保留所有真实用户请求;只有实际减少 token、恢复物理可用且等待持久化提交成功后才发出成功事件。原始正文从内存驱逐前,Session owner 会先持久化并刷盘精确 lineage;sidecar 与精简 Session 通过稳定 entry ID 合并去重。根 Agent 与持久化子 Agent 都可用有界的 `session_history_search` → `session_history_read` 回溯自己的被省略细节;子 Agent 只绑定独立隐藏的 worker Session,永远不能读取根历史。SDK/Runtime 则使用 revision-bound `transcriptSearch`、分页和无损 chunk;隐藏思考、system 指令与合成 checkpoint 不进入模型检索。详见 [功能设计](docs/features/v0.7.74.md)、[SDK 指南第 25 节](docs/SDK_EMBEDDER_GUIDE.md#25-always-on-context-compaction-and-bounded-transcript-recovery-v0774) 与 [ADR-057](docs/ADR.md#adr-057-large-compaction-is-an-always-on-context-scoped-full-coverage-transaction)。
756
+
757
+ **邮箱驱动的 Agent 协作(FEATURE_273,v0.7.74)**:`wait_agent` 现在是真正的模型侧 mailbox yield,只接受一个有界 `timeout_ms`,不再读取 Actor progress/event。它只因当前作用域的 Agent 消息或完成通知、根用户输入、中断或超时而唤醒;progress 仍通过 UI/SDK snapshot、replay 和 long-poll 提供,但不会触发父模型重采样。工具只返回 wake acknowledgement,可信 Agent evidence 与结构化 task metadata 在下一安全边界只注入一次。未确认的根 completion 可在硬重启后恢复,同进程 Runtime 重建按子 `turnId` 去重,已确认或旧版历史 completion 不重放。树状态用 `list_agents`,已知结果用 `agent_output`。详见 [功能设计](docs/features/v0.7.74.md#feature_273-mailbox-driven-agent-wait-and-telemetrycontrol-separation)、[SDK 指南第 26 节](docs/SDK_EMBEDDER_GUIDE.md#26-agent-mailbox-control-versus-sdk-event-telemetry-v0774) 与 [ADR-058](docs/ADR.md#adr-058-model-agent-wait-is-mailbox-control-not-event-telemetry)。
729
758
 
730
- **上下文高效的工具结果 + Workflow 质量预检(FEATURE_251 + FEATURE_252,v0.7.61;2026-07-14 纠偏)**:本地工具先完整采集,只采用契约等价且严格更短的无损规范化;命令专用 Bash 有损过滤默认关闭,compound Bash 不使用语义 adapter。并行结果由唯一 owner 按最终 provider 请求统一判容:先求满足 `Pmax + 输出预留 + max(2048, Pmax 3%) <= 上下文窗口` 的最大最终输入,再只使用剩余物理容量。能放下就逐字交付,只有真实溢出才持久化完整结果并返回 `KODAX_RESULT_INCOMPLETE`。历史压缩使用同一物理容量规则:容量内不做默认有损 microcompaction,真实压力下 summary-first,无法形成可恢复请求时 typed failure,禁止静默删消息;静态提前百分比仅为显式 opt-inFEATURE_252 的确定性 workflow 启动前合约 lint 保持不变。详见 [docs/features/v0.7.61.md](docs/features/v0.7.61.md) [docs/ADR.md ADR-050](docs/ADR.md)
759
+ **活跃 Run 中断输入(v0.7.74)**:embedded Runtime shared daemon 声明 `interruptInput:1`。`runtime.runs.submitInput()` 把不可变、有序的输入排入当前 active Actor Run;同一安全 Runner 边界前接纳的输入按 FIFO 作为独立 user message 一次性交给下一次 LLM 请求,不创建 continuation RunRun snapshot/event 暴露 queued/delivered 状态,确认只匹配实际消费的 ID,终态清理保证未交付输入不会泄漏到后续 Run
731
760
 
732
761
  ```
733
762
  KodaX/ # 4 workspace packages(FEATURE_194 v0.7.43)
@@ -840,7 +869,7 @@ KodaX 现在会把 Repo Intelligence 的本地缓存分成内置引擎 profile
840
869
  ## 文档
841
870
 
842
871
  - [README.md](README.md) - 英文版 README
843
- - [docs/SDK_EMBEDDER_GUIDE.md](docs/SDK_EMBEDDER_GUIDE.md) - SDK 宿主集成、shared Runtime、v0.7.73 Auto Mode 与精确授权契约
872
+ - [docs/SDK_EMBEDDER_GUIDE.md](docs/SDK_EMBEDDER_GUIDE.md) - SDK 宿主集成、shared Runtime、v0.7.74 压缩/历史恢复、Agent 遥测与活跃 Run 输入契约
844
873
  - [docs/release.md](docs/release.md) - 单文件二进制构建与发布流程
845
874
  - [docs/PRD.md](docs/PRD.md) - 产品需求
846
875
  - [docs/ADR.md](docs/ADR.md) - 架构决策
@@ -21,6 +21,13 @@
21
21
  // }
22
22
  // ],
23
23
  // "repoIntelligenceMode": "auto",
24
+ // Automatic large compaction is always enabled. Percentage defaults to 75
25
+ // and is clamped to 15..90. A missing/zero absolute threshold is inactive;
26
+ // otherwise the smaller percentage, absolute, and physical limit wins.
27
+ // "compaction": {
28
+ // "triggerPercent": 75,
29
+ // "triggerTokens": 0
30
+ // },
24
31
  // "sessionRetentionDays": 0,
25
32
  // "workflow": { "maxConcurrency": 8 }
26
33
  }
@@ -1,2 +1,2 @@
1
1
  // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{Ga as i,Ma as j,da as d,ea as e,fa as f,j as c,ua as g,va as h}from"./chunk-AGDDM5AW.js";import"./chunk-64M5HOCA.js";import"./chunk-MBAPT2R5.js";import"./chunk-HVCNAZ52.js";import"./chunk-XXQLPTAN.js";import{sb as a,tb as b}from"./chunk-OG6DRNKV.js";import"./chunk-GAFFYJU3.js";import"./chunk-BUPJGG3C.js";import"./chunk-F7AIEHSS.js";import"./chunk-ONUPGMER.js";export{e as bucketProviderPayloadSize,g as buildAutoRepoIntelligenceContext,f as checkPromiseSignal,b as cleanupIncompleteToolCalls,h as describeTransientProviderRetry,c as emitResilienceDebug,d as estimateProviderPayloadBytes,j as runKodaX,i as saveSessionSnapshot,a as validateAndFixToolHistory};
2
+ import{Ea as i,Ka as j,da as d,ea as e,fa as f,j as c,ua as g,wa as h}from"./chunk-5WSOB34U.js";import"./chunk-BN3W2DQY.js";import"./chunk-G5VW55T4.js";import"./chunk-737LI7OS.js";import"./chunk-Q65EAOX6.js";import{sb as a,tb as b}from"./chunk-QSMXI4MH.js";import"./chunk-OGL227XV.js";import"./chunk-6YUDR7WN.js";import"./chunk-F7AIEHSS.js";import"./chunk-ONUPGMER.js";export{e as bucketProviderPayloadSize,g as buildAutoRepoIntelligenceContext,f as checkPromiseSignal,b as cleanupIncompleteToolCalls,h as describeTransientProviderRetry,c as emitResilienceDebug,d as estimateProviderPayloadBytes,j as runKodaX,i as saveSessionSnapshot,a as validateAndFixToolHistory};
@@ -0,0 +1,2 @@
1
+ // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
+ import{Ja as a,Ka as b}from"./chunk-OJQQRLZJ.js";import"./chunk-SB75RNNR.js";import"./chunk-4PVSDE5L.js";import"./chunk-DEHOFNQA.js";import"./chunk-N6M2LYEP.js";import"./chunk-UJRRZINL.js";import"./chunk-5WSOB34U.js";import"./chunk-BN3W2DQY.js";import"./chunk-G5VW55T4.js";import"./chunk-737LI7OS.js";import"./chunk-Q65EAOX6.js";import"./chunk-QSMXI4MH.js";import"./chunk-OGL227XV.js";import"./chunk-6YUDR7WN.js";import"./chunk-F7AIEHSS.js";import"./chunk-ONUPGMER.js";export{a as ArgumentCompleter,b as createArgumentCompleter};
@@ -0,0 +1,2 @@
1
+ // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
+ import{Uc as o}from"./chunk-QSMXI4MH.js";import{f as c}from"./chunk-OGL227XV.js";import{a as n}from"./chunk-ONUPGMER.js";import{readFile as a}from"fs/promises";var i={enabled:!0,triggerPercent:75};async function s(r){let t=c("config.json");try{let e=await f(t);if(e?.compaction)return o({...i,...e.compaction})}catch{}return o(i)}n(s,"loadCompactionConfig");async function f(r){try{let t=await a(r,"utf-8");return JSON.parse(t)}catch{return null}}n(f,"readConfigFile");export{s as a};