@kodax-ai/kodax 0.7.61 → 0.7.63

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 (50) hide show
  1. package/CHANGELOG.md +115 -1
  2. package/README.md +2 -2
  3. package/README_CN.md +2 -2
  4. package/dist/chunks/{agent-E74WVAFR.js → agent-SL444XLN.js} +1 -1
  5. package/dist/chunks/argument-completer-EN63ZVJK.js +2 -0
  6. package/dist/chunks/{chunk-XHOPSZVL.js → chunk-4MIHVNB7.js} +96 -96
  7. package/dist/chunks/chunk-7MPU7TP6.js +624 -0
  8. package/dist/chunks/{chunk-QCBKLNN5.js → chunk-HP4FXMEM.js} +2 -2
  9. package/dist/chunks/{chunk-CGGX3FXE.js → chunk-KCFVGXVK.js} +1 -1
  10. package/dist/chunks/chunk-KHICMJIR.js +310 -0
  11. package/dist/chunks/{chunk-KIVYMSRH.js → chunk-L3MF5V64.js} +1 -1
  12. package/dist/chunks/chunk-LGR7ACBQ.js +326 -0
  13. package/dist/chunks/{chunk-7COB3EKF.js → chunk-RR7W7UF6.js} +152 -152
  14. package/dist/chunks/chunk-UGTK2JIJ.js +731 -0
  15. package/dist/chunks/{chunk-2OEKUAV4.js → chunk-VSWROENP.js} +1 -1
  16. package/dist/chunks/{compaction-config-GESEZQVA.js → compaction-config-4VIONMFB.js} +1 -1
  17. package/dist/chunks/{construction-bootstrap-OSXHEIBB.js → construction-bootstrap-EFZBONTK.js} +3 -3
  18. package/dist/chunks/dist-EDF2YUF6.js +2 -0
  19. package/dist/chunks/host-J4HPDLFC.js +2 -0
  20. package/dist/chunks/{run-manager-FGCG7DFF.js → run-manager-ZVSW2OWM.js} +1 -1
  21. package/dist/chunks/{utils-47QI5MSP.js → utils-5HDLYTZJ.js} +1 -1
  22. package/dist/index.d.ts +8 -8
  23. package/dist/index.js +2 -2
  24. package/dist/kodax_cli.js +970 -937
  25. package/dist/sdk-agent.d.ts +67 -8
  26. package/dist/sdk-agent.js +1 -1
  27. package/dist/sdk-coding.d.ts +425 -464
  28. package/dist/sdk-coding.js +1 -1
  29. package/dist/sdk-mcp.js +1 -1
  30. package/dist/sdk-repl.d.ts +9 -9
  31. package/dist/sdk-repl.js +2 -2
  32. package/dist/sdk-session.d.ts +4 -4
  33. package/dist/sdk-session.js +1 -1
  34. package/dist/sdk-skills.js +1 -1
  35. package/dist/types-chunks/{bash-prefix-extractor.d-e1LD2IRl.d.ts → bash-prefix-extractor.d-CZW9fRoa.d.ts} +137 -11
  36. package/dist/types-chunks/{guardrail.d-CdqJwwN7.d.ts → guardrail.d-MR6LwMB2.d.ts} +2 -2
  37. package/dist/types-chunks/{process.d-C93UMgPK.d.ts → process.d-CY2g03Mb.d.ts} +274 -15
  38. package/dist/types-chunks/{run-manager.d-DHPlNYkK.d.ts → run-manager.d-CYTnWhZY.d.ts} +6 -17
  39. package/dist/types-chunks/{sdk-session-DINrM1pF.d.ts → sdk-session-RBSBBKol.d.ts} +8 -6
  40. package/dist/types-chunks/{storage.d-xiw7Vgx0.d.ts → storage.d-C6kkAEch.d.ts} +2 -2
  41. package/dist/types-chunks/{types.d-CSZAMmU-.d.ts → types.d-1CnTg7Sd.d.ts} +1 -1
  42. package/dist/types-chunks/{utils.d-Dy19-1XR.d.ts → utils.d-C14jZ9ZM.d.ts} +4 -4
  43. package/package.json +1 -1
  44. package/dist/chunks/argument-completer-BBFYCVTM.js +0 -2
  45. package/dist/chunks/chunk-4NSOBQCU.js +0 -322
  46. package/dist/chunks/chunk-D7CC6YZC.js +0 -600
  47. package/dist/chunks/chunk-NJW2LQOP.js +0 -722
  48. package/dist/chunks/chunk-PJXKBM3Y.js +0 -310
  49. package/dist/chunks/dist-W3OOJP66.js +0 -2
  50. package/dist/chunks/host-FRQXOEHH.js +0 -2
package/CHANGELOG.md CHANGED
@@ -6,6 +6,120 @@ All notable changes to this project will be documented in this file.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.7.63] - 2026-07-07
10
+
11
+ > Scope note: a patch/stability release for SDK session boundaries and release
12
+ > hygiene. No planned feature slot is consumed: `FEATURE_244` remains targeted
13
+ > at `v0.7.65`. This release hardens the public `/session` subpath, keeps
14
+ > rewind audit markers out of model context, makes `startKodaX()` wrapper
15
+ > session IDs safe around auto-resume, improves `/reload` extension rediscovery,
16
+ > and prunes superseded feature-design parking notes from the private feature-doc
17
+ > index.
18
+
19
+ ### Added
20
+
21
+ - **`@kodax-ai/kodax/session` now exports imperative compaction.**
22
+ `compactSession` and its public option/result types are re-exported from the
23
+ root session SDK subpath, with a package-level regression test proving the
24
+ bundled subpath exposes the same session facade hosts use in Space-style
25
+ integrations.
26
+ - **Typed rewind transcript entries.** Session lineage now has a dedicated
27
+ `rewind_marker` entry type. `loadFullTranscript()` surfaces it as a structured
28
+ system transcript entry for host scrollback, while `loadSession()` and the
29
+ returned transcript `messages` keep rewind audit markers out of model context.
30
+ Downstream consumers that exhaustively switch on `KodaXSessionEntry` or
31
+ `SessionTranscriptEntryType` should handle `rewind_marker`.
32
+ - **`/reload` rediscovers extensions.** The REPL reload command now re-scans
33
+ default and configured extension entrypoints from disk, creates the extension
34
+ runtime on demand, hot-reloads already loaded modules, loads newly discovered
35
+ modules, and reports separate "Extensions reloaded" / "Extensions loaded"
36
+ counts.
37
+
38
+ ### Changed
39
+
40
+ - **SDK session boundary hardening.** `startKodaX()` now threads wrapper-generated
41
+ session IDs into forwarded run options only when the caller did not provide an
42
+ explicit ID and did not request auto-resume/resume discovery. Generated handle
43
+ IDs are marked internally so the "session.id without storage" warning remains
44
+ useful for caller-provided IDs without warning on the wrapper's own handle ID.
45
+ - **Feature-design index cleanup.** Superseded/parked planning-only docs for old
46
+ `v0.7.67`, `v0.7.68`, `v0.7.71`, `v0.7.73`, and `v0.7.74` slots were pruned.
47
+ Active targets remain in the indexed docs: `FEATURE_228` is in `v0.7.62`,
48
+ `FEATURE_231` in `v0.7.70`, `FEATURE_235` in `v0.7.75`, `FEATURE_108` in
49
+ `v0.7.95`, and `FEATURE_225` in `v0.7.100`.
50
+
51
+ ### Fixed
52
+
53
+ - **Rewind selection skips synthetic/tool-result user entries.** `/rewind`
54
+ previous-turn selection now walks the active lineage path and ignores
55
+ tool-result-only user messages plus synthetic user notices, avoiding accidental
56
+ rewinds to tool protocol plumbing instead of the previous real user prompt.
57
+ - **Rewind helpers reject sidecar targets.** Direct lineage rewinds now reject
58
+ label/client/goal/archive/rewind-marker side-state entries and legacy rewind
59
+ compactions remain context-silent even if a damaged old session points
60
+ `activeEntryId` at one.
61
+ - **`/reload` reports successful extension reloads.** Failed hot-reload attempts
62
+ are reported only in the failure count instead of also inflating the
63
+ "Extensions reloaded" success count.
64
+ - **Transcript layout fixtures are deterministic.** Duration-sensitive transcript
65
+ layout tests now use fixed timestamps instead of `Date.now()`, removing a
66
+ release-gate flake without changing runtime behavior.
67
+
68
+ ## [0.7.62] - 2026-07-06
69
+
70
+ > Scope note: a memory-governance release plus interaction polish. **FEATURE_228**
71
+ > upgrades FEATURE_224's memory handoff lane into a governed memory control plane:
72
+ > one proposal store, typed memory refs, preview/fingerprint-guarded writes,
73
+ > deterministic task-aware memory hints, curator reports, and thin `/memory`
74
+ > commands. The release also completes the `ask_user_question` interaction gap
75
+ > tracked as issue 112 by adding free-text input, multi-select bounds, and
76
+ > host-side custom-input answers. No vector database, embeddings service, or
77
+ > second memory store is introduced.
78
+
79
+ ### Added
80
+
81
+ - **Unified Memory Control Plane + Memory Governance (FEATURE_228).** Added the
82
+ agent-layer `MemoryControlPlane` and typed memory contracts for refs,
83
+ snapshots, action proposals, approvals, apply results, governance findings,
84
+ memory packs, and review plans. F224 `memdir_handoff` / `reasoning_handoff`
85
+ proposals are projected through the memory controller instead of copied into a
86
+ second store, keeping `/learn` and `/memory` on one proposal lifecycle.
87
+ - **Memory command surface and deterministic prompt hints.** `/memory inbox`,
88
+ `/memory pending`, `/memory show`, `/memory approve`, `/memory reject`, and
89
+ `/memory curate` are thin REPL adapters over the agent-layer controller.
90
+ Coding prompt assembly now injects only a bounded memory index preview plus
91
+ small governed memory hints; topic bodies remain on-demand reads, and selected
92
+ memory refs are surfaced as trace metadata instead of prompt body noise.
93
+ - **Governance and feedback review hooks.** Memory governance can report duplicate,
94
+ conflict, stale, quarantined, orphaned, and no-op findings without mutating
95
+ memory. Automatic curator runs are maintenance-window based, write bounded JSON
96
+ audit reports, retain only the newest 200 reports, and never rewrite memory
97
+ files. Feedback-triggered review accepts bounded candidate refs and requires
98
+ the normal approval path before mutation.
99
+
100
+ ### Changed
101
+
102
+ - **`ask_user_question` now supports open-ended answers.** The tool schema and
103
+ host contracts accept `kind: "input"`, `multi_select`, selection bounds, and
104
+ default-on custom input options (`allow_custom_input: false` opts out). REPL
105
+ select dialogs use focus navigation, space toggles multi-select entries, Enter
106
+ submits focused/selected values, and custom answers are returned as normalized
107
+ `choice` / `choices` plus `custom_inputs` metadata.
108
+ - **Memory approval requires preview fingerprints.** `approveProposal` now
109
+ requires fingerprints from a shown preview and fails closed on stale target or
110
+ `MEMORY.md` changes. Already-applied target/index writes complete idempotently
111
+ with warnings instead of rewriting identical content.
112
+
113
+ ### Fixed
114
+
115
+ - **Resolved issue 112: `ask_user_question` interaction incompleteness.** The
116
+ model can now request free-text input, multi-select choices, and custom "Other"
117
+ answers without forcing fragile pre-combined option sets.
118
+ - **User-scroll residual-cell repaint guard.** Alt-screen scroll repaint now
119
+ erases and repaints the affected visible rows before the normal diff pass, so
120
+ stale wide-char or skipped-cell residue cannot remain after user-driven
121
+ transcript scrolling.
122
+
9
123
  ## [0.7.61] - 2026-07-06
10
124
 
11
125
  > Scope note: a token-efficiency + workflow-reliability release. **FEATURE_251** adds command-aware
@@ -1151,7 +1265,7 @@ Two features close out v0.7.32 and the Plan B roadmap. **FEATURE_090** is the ro
1151
1265
  ### Documentation
1152
1266
 
1153
1267
  - **EVAL_GUIDELINES rewrite** — `benchmark/EVAL_GUIDELINES.md` now documents the **single-turn probe methodology** as the official KodaX eval pattern and removes end-to-end loop comparisons from the recommended set. Loops conflate prompt quality with tool-availability artefacts (model tries to verify with `read`/`grep`/`bash`, harness can't provide tools, benchmark scores the format-fail). Single-turn probes test the prompt-only contract.
1154
- - **FEATURE_108 design** (`docs/features/v0.7.47.md`) — Session-Driven Reflective Prompt Patcher spec landed for v0.7.47 design preview.(注:版本重排后 FEATURE_108 先于 2026-06-05 迁至 v0.7.54,再于 2026-06-11 顺延至 [`docs/features/v0.7.72.md`](docs/features/v0.7.72.md);`v0.7.47.md` 现为 FEATURE_218 + FEATURE_132)
1268
+ - **FEATURE_108 design** (`docs/features/v0.7.47.md`) — Session-Driven Reflective Prompt Patcher spec landed for v0.7.47 design preview.(注:版本重排后 FEATURE_108 先于 2026-06-05 迁至 v0.7.54,再经后续节奏重排顺延至 [`docs/features/v0.7.95.md`](docs/features/v0.7.95.md);`v0.7.47.md` 现为 FEATURE_218 + FEATURE_132)
1155
1269
  - **FEATURE_109 design** (`docs/features/v0.7.48.md`) — Harness Observability Substrate (long-term memory + prediction contract + cross-family prose guard) spec landed for v0.7.48 design preview.
1156
1270
  - **`docs/features/v0.7.29.md` 1496-line expansion** — folds back the historical capability-inventory artifact (`v0.7.29-capability-inventory.md` deleted) and adds deeper FEATURE_103/104/107-related context to the v0.7.29 retrospective.
1157
1271
  - **`docs/CODING_AGENT_PROMPTS.md`** — cross-project prompt-system reference (4 open-source coding agents) for KodaX prompt design comparison. Research artefact, not a project doc.
package/README.md CHANGED
@@ -396,7 +396,7 @@ KodaX has two layers that consumers should understand separately:
396
396
  | `packages/agent` | `@kodax-ai/kodax/mcp` | **Narrow subset** | MCP only — `McpCapabilityProvider` / `createMcpTransport` / `searchMcpCatalog` / ... (11 exports = pre-v0.7.43 `@kodax-ai/mcp` complete API) | MCP server hosts |
397
397
  | `packages/coding` | `@kodax-ai/kodax/coding` | Full package | Coding agent + 50+ tools + repo-intelligence (342 exports) | Build a Claude Code-shape product |
398
398
  | `packages/repl` | `@kodax-ai/kodax/repl` | Full package | Ink TUI + permission modes + commands (193 exports) | Terminal-UI consumers |
399
- | `packages/repl` | `@kodax-ai/kodax/session` | **Narrow subset** | Session management only — `listSessions` / `loadFullTranscript` / `appendClientNotice` / `forkSession` / `watchSessions` / ... | IDE plugins and desktop hosts reading session history |
399
+ | `packages/repl` | `@kodax-ai/kodax/session` | **Narrow subset** | Session management only — `listSessions` / `loadFullTranscript` / `appendClientNotice` / `forkSession` / `compactSession` / `watchSessions` / ... | IDE plugins and desktop hosts reading session history |
400
400
 
401
401
  **Rule of thumb**: if you need Runner / Agent / fan-out, import from `/agent`. If you only need skills or mcp APIs, import from `/skills` or `/mcp` to get a smaller bundle. The narrow subsets are subsets of the full packages — they do **not** expose extra symbols.
402
402
 
@@ -404,7 +404,7 @@ KodaX has two layers that consumers should understand separately:
404
404
 
405
405
  **Workflow Process Surface (FEATURE_229, v0.7.50)**: workflow progress is now a reusable Agent-layer process contract rather than private REPL text. SDK hosts can subscribe to `WorkflowProcessEvent`/poll `WorkflowProcessSnapshot`, use `createWorkflowRunManager` and `createWorkflowLifecycleController` for stop/pause/resume/result/artifact/delete/prune/identity/preflight controls, and receive ANSI-free provenance fields (`source`, `sourceRunId`, `sourceWorkflowName`, `savedWorkflowName`, `revisionOf`) plus `resultSummary`. `/coding` owns the coding workflow backend and run graph, `/repl` renders the same snapshots, and the terminal UI is not the hidden source of truth. `KodaXEvents` callbacks also take an optional metadata arg (`KodaXToolEventMeta` / `KodaXActivityEventMeta` / `KodaXWorkflowEventMeta`) so a host can attribute every child-agent tool/thinking/progress event to its workflow run and child id without a second event protocol, and generated/saved workflow scripts pass `validateRestrictedWorkflowSource` (compile + source-policy check) plus a generator repair/smoke loop before they run. See [docs/ADR.md ADR-040](docs/ADR.md) for the layering rationale.
406
406
 
407
- **Host Reads Persisted History (FEATURE_230 + FEATURE_234, v0.7.51)**: additive closures for hosts that read persisted state. **Durable tool transcript replay** — a resumed session now replays the tool cards the assistant used instead of degrading to text-only. `messages` / `lineage` stay canonical; `SessionData.uiHistory` becomes a bounded, sanitized, terminal-only replay cache. The SDK transcript contract is explicit: `loadSession()` = active model context, `loadFullTranscript()` = append-order host scrollback with typed entries (`message` / `compaction` / `branch_summary` / `client_notice` / `task_result`) plus clone provenance (`logicalId` / `sourceEntryId`), `uiHistory` = optional replay cache, and tool cards can always be reconstructed from canonical messages. Hosts can persist local slash output with `appendClientNotice()` without entering model context, and workflow/child completions expose structured `taskResults[]` instead of requiring `<task-completed>` parsing. **Workflow run host attribution** — `WorkflowProcessTrackerOptions` / `WorkflowProcessSnapshot` gain a host-owned opaque `hostMetadata?: Record<string, string>` that the SDK stores, persists to `run.json`, and echoes back (including after a restart) without interpreting it, so a host can map a run to the session/surface that launched it with zero side table. Unstamped/legacy runs honestly echo `hostMetadata === undefined`. See [docs/features/v0.7.51.md](docs/features/v0.7.51.md).
407
+ **Host Reads Persisted History (FEATURE_230 + FEATURE_234, v0.7.51; v0.7.63 hardening)**: additive closures for hosts that read persisted state. **Durable tool transcript replay** — a resumed session now replays the tool cards the assistant used instead of degrading to text-only. `messages` / `lineage` stay canonical; `SessionData.uiHistory` becomes a bounded, sanitized, terminal-only replay cache. The SDK transcript contract is explicit: `loadSession()` = active model context, `loadFullTranscript()` = append-order host scrollback with typed entries (`message` / `compaction` / `branch_summary` / `rewind_marker` / `client_notice` / `task_result`) plus clone provenance (`logicalId` / `sourceEntryId`), `uiHistory` = optional replay cache, and tool cards can always be reconstructed from canonical messages. Hosts can persist local slash output with `appendClientNotice()` without entering model context, and workflow/child completions expose structured `taskResults[]` instead of requiring `<task-completed>` parsing. `rewind_marker` is an audit entry for host scrollback only and is excluded from model-context messages. **Workflow run host attribution** — `WorkflowProcessTrackerOptions` / `WorkflowProcessSnapshot` gain a host-owned opaque `hostMetadata?: Record<string, string>` that the SDK stores, persists to `run.json`, and echoes back (including after a restart) without interpreting it, so a host can map a run to the session/surface that launched it with zero side table. Unstamped/legacy runs honestly echo `hostMetadata === undefined`. See [docs/features/v0.7.51.md](docs/features/v0.7.51.md).
408
408
 
409
409
  **Inline Workflow Authoring (FEATURE_246, v0.7.58)**: in AMA/AMAW the Worker can now author and run a workflow inline via a model-callable `run_workflow` tool — it scouts the codebase with its own tools first, then bakes concrete findings into each child prompt, and runs the script through the **unchanged** sandbox + static-validation + postcondition-verification pipeline. This replaces the context-blind `sideQuery` generator as the primary interactive path (the generator survives only as a fallback for the explicit `/workflow create` command and non-interactive / CI hosts that have no investigating Worker). It adds structured child output (`outputSchema`), the no-barrier `wf.pipeline` staged primitive, same-session resume (`resumeFromRunId`), nested `wf.workflow(...)`, and a `/workflow create` redirect to Worker-authored scouting; `run_workflow` is async / idle-yield so the turn is not blocked. The neutral run-lifecycle manager (`createWorkflowRunManager` / `getDefaultWorkflowRunManager`) now lives in `@kodax-ai/kodax/agent` for non-coding SDK hosts. See [docs/features/v0.7.58.md](docs/features/v0.7.58.md) and [docs/ADR.md](docs/ADR.md) ADR-044/046/047/048/049.
410
410
 
package/README_CN.md CHANGED
@@ -500,13 +500,13 @@ KodaX 有两层结构,SDK 用户需要分开理解:
500
500
  | `packages/agent` | `@kodax-ai/kodax/mcp` | **窄子集** | 仅 MCP —— `McpCapabilityProvider` / `createMcpTransport` / `searchMcpCatalog` 等 (11 exports = v0.7.43 之前 `@kodax-ai/mcp` 完整 API) | MCP server 宿主 |
501
501
  | `packages/coding` | `@kodax-ai/kodax/coding` | 完整包 | Coding agent + 50+ 工具 + repo-intelligence (342 exports) | 构建 Claude Code 形态产品 |
502
502
  | `packages/repl` | `@kodax-ai/kodax/repl` | 完整包 | Ink TUI + 权限模式 + 命令系统 (193 exports) | 终端 UI 消费者 |
503
- | `packages/repl` | `@kodax-ai/kodax/session` | **窄子集** | 仅会话管理 —— `listSessions` / `loadFullTranscript` / `appendClientNotice` / `forkSession` / `watchSessions` 等 | 读取 session 历史的 IDE 插件和桌面宿主 |
503
+ | `packages/repl` | `@kodax-ai/kodax/session` | **窄子集** | 仅会话管理 —— `listSessions` / `loadFullTranscript` / `appendClientNotice` / `forkSession` / `compactSession` / `watchSessions` 等 | 读取 session 历史的 IDE 插件和桌面宿主 |
504
504
 
505
505
  **经验法则**:需要 Runner / Agent / fan-out 时从 `/agent` 引入;只需要 skills 或 mcp API 时从 `/skills` 或 `/mcp` 引入,bundle 更小。窄子集是完整包的真子集 —— **不会**有额外符号。
506
506
 
507
507
  **Workflow process surface(FEATURE_229,v0.7.50)**:动态工作流不再只是 REPL 私有文本,而是 Agent 层可复用的 process/event/snapshot 契约。SDK 宿主可以订阅 `WorkflowProcessEvent`、轮询 `WorkflowProcessSnapshot`,并通过 `createWorkflowRunManager` / `createWorkflowLifecycleController` 做 stop/pause/resume、读取 final result/artifact、删除/清理 terminal runs、管理 workflow identity/preflight。`/coding` 负责 coding workflow backend 与 run graph,`/repl` 只是消费同一份 snapshot 渲染 UI;SDK 不需要解析 slash-command 输出或 Ink view-model。`KodaXEvents` 回调新增可选 meta 尾参(`KodaXToolEventMeta` / `KodaXActivityEventMeta` / `KodaXWorkflowEventMeta`),宿主据此把每个子 Agent 的 tool/thinking/progress 事件归因到对应 workflow run 与 child id,无需第二套事件协议;生成/保存的工作流脚本在运行前过 `validateRestrictedWorkflowSource`(编译 + 源策略检查)与 generator 的 repair/smoke 循环。分层取舍见 [docs/ADR.md ADR-040](docs/ADR.md)。
508
508
 
509
- **宿主读持久化历史(FEATURE_230 + FEATURE_234,v0.7.51)**:面向「宿主读持久化状态」的 additive 闭环。**持久化工具记录回放**——resume 的会话现在会回放助手用过的工具卡片,而不是退化成纯文本。`messages` / `lineage` 仍是 canonical;`SessionData.uiHistory` 成为有界、脱敏、仅 terminal 状态的回放缓存。SDK transcript 契约明确化:`loadSession()` = 活动 model context,`loadFullTranscript()` = 带结构化条目的追加序 host scrollback(`message` / `compaction` / `branch_summary` / `client_notice` / `task_result`)并带 clone provenance(`logicalId` / `sourceEntryId`),`uiHistory` = 可选回放缓存,工具卡片始终可从 canonical messages 重建。宿主可用 `appendClientNotice()` 持久化本地 slash 输出且不进入模型上下文;workflow/child 完成结果通过结构化 `taskResults[]` 暴露,不再要求解析 `<task-completed>` 文本。**Workflow run 宿主归属**——`WorkflowProcessTrackerOptions` / `WorkflowProcessSnapshot` 新增 host-owned 不透明 `hostMetadata?: Record<string, string>`,SDK 存储、持久化进 `run.json`、回读回显(含进程重启后)但不解释其含义,让宿主零侧表把 run 归回发起它的 session/surface。未 stamp 的旧 run 诚实回显 `hostMetadata === undefined`。详见 [docs/features/v0.7.51.md](docs/features/v0.7.51.md)。
509
+ **宿主读持久化历史(FEATURE_230 + FEATURE_234,v0.7.51;v0.7.63 hardening)**:面向「宿主读持久化状态」的 additive 闭环。**持久化工具记录回放**——resume 的会话现在会回放助手用过的工具卡片,而不是退化成纯文本。`messages` / `lineage` 仍是 canonical;`SessionData.uiHistory` 成为有界、脱敏、仅 terminal 状态的回放缓存。SDK transcript 契约明确化:`loadSession()` = 活动 model context,`loadFullTranscript()` = 带结构化条目的追加序 host scrollback(`message` / `compaction` / `branch_summary` / `rewind_marker` / `client_notice` / `task_result`)并带 clone provenance(`logicalId` / `sourceEntryId`),`uiHistory` = 可选回放缓存,工具卡片始终可从 canonical messages 重建。宿主可用 `appendClientNotice()` 持久化本地 slash 输出且不进入模型上下文;workflow/child 完成结果通过结构化 `taskResults[]` 暴露,不再要求解析 `<task-completed>` 文本。`rewind_marker` 只用于 host scrollback 审计,不进入 model-context messages。**Workflow run 宿主归属**——`WorkflowProcessTrackerOptions` / `WorkflowProcessSnapshot` 新增 host-owned 不透明 `hostMetadata?: Record<string, string>`,SDK 存储、持久化进 `run.json`、回读回显(含进程重启后)但不解释其含义,让宿主零侧表把 run 归回发起它的 session/surface。未 stamp 的旧 run 诚实回显 `hostMetadata === undefined`。详见 [docs/features/v0.7.51.md](docs/features/v0.7.51.md)。
510
510
 
511
511
  **Inline workflow authoring(FEATURE_246,v0.7.58)**:AMA/AMAW 下 Worker 现在可通过 model-callable 的 `run_workflow` 工具在会话内直接编写并运行工作流——先用自己的工具 scout 代码库,再把具体发现烤进每个 child prompt,然后走**不变的** sandbox + 静态校验 + postcondition 验证流水线。它取代 context-blind 的 `sideQuery` generator 成为主交互路径(generator 仅作为显式 `/workflow create` 命令与无 investigating Worker 的 non-interactive/CI 主机的 fallback 保留);新增结构化 child 输出(`outputSchema`)、无 barrier 的 `wf.pipeline` 分阶段原语、同会话 resume(`resumeFromRunId`)、嵌套 `wf.workflow(...)`,`/workflow create` 重定向到 Worker 的 scout-then-author;`run_workflow` 为 async / idle-yield,不阻塞当前轮。中立的 run-lifecycle manager(`createWorkflowRunManager`)已移入 `@kodax-ai/kodax/agent` 供非 coding SDK 宿主使用。详见 [docs/features/v0.7.58.md](docs/features/v0.7.58.md) 与 [docs/ADR.md](docs/ADR.md) ADR-044/046/047/048/049。
512
512
 
@@ -1,2 +1,2 @@
1
1
  // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{I as c,J as d,K as e,L as f,Z as g,_ as h,ia as i,oa as j}from"./chunk-4NSOBQCU.js";import"./chunk-D6QVXQNI.js";import"./chunk-UA744TZM.js";import"./chunk-7COB3EKF.js";import"./chunk-S4GVQO3W.js";import{mb as a,nb as b}from"./chunk-NJW2LQOP.js";import"./chunk-ZL5CEANW.js";import"./chunk-V4WSBIXB.js";export{d as bucketProviderPayloadSize,g as buildAutoRepoIntelligenceContext,e as checkPromiseSignal,b as cleanupIncompleteToolCalls,h as describeTransientProviderRetry,f as emitResilienceDebug,c as estimateProviderPayloadBytes,j as runKodaX,i as saveSessionSnapshot,a as validateAndFixToolHistory};
2
+ import{I as c,J as d,K as e,L as f,Z as g,_ as h,ja as i,ra as j}from"./chunk-LGR7ACBQ.js";import"./chunk-D6QVXQNI.js";import"./chunk-UA744TZM.js";import"./chunk-RR7W7UF6.js";import"./chunk-S4GVQO3W.js";import{ob as a,pb as b}from"./chunk-UGTK2JIJ.js";import"./chunk-ZL5CEANW.js";import"./chunk-V4WSBIXB.js";export{d as bucketProviderPayloadSize,g as buildAutoRepoIntelligenceContext,e as checkPromiseSignal,b as cleanupIncompleteToolCalls,h as describeTransientProviderRetry,f as emitResilienceDebug,c 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{Aa as b,za as a}from"./chunk-7MPU7TP6.js";import"./chunk-L3MF5V64.js";import"./chunk-VSWROENP.js";import"./chunk-4MIHVNB7.js";import"./chunk-KCFVGXVK.js";import"./chunk-HP4FXMEM.js";import"./chunk-LGR7ACBQ.js";import"./chunk-D6QVXQNI.js";import"./chunk-UA744TZM.js";import"./chunk-RR7W7UF6.js";import"./chunk-S4GVQO3W.js";import"./chunk-UGTK2JIJ.js";import"./chunk-ZL5CEANW.js";import"./chunk-V4WSBIXB.js";export{a as ArgumentCompleter,b as createArgumentCompleter};