@kodax-ai/kodax 0.7.59 → 0.7.60

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 (61) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1232 -1228
  3. package/README_CN.md +651 -647
  4. package/dist/chunks/{agent-QQCRBU4C.js → agent-L5FC3YOY.js} +1 -1
  5. package/dist/chunks/argument-completer-BQDAYT7W.js +2 -0
  6. package/dist/chunks/chunk-2RLIKZOZ.js +18 -0
  7. package/dist/chunks/{chunk-PRIBJN5E.js → chunk-4K5BDO7S.js} +112 -74
  8. package/dist/chunks/{chunk-TBXP7FEG.js → chunk-5TRQBMPR.js} +1 -1
  9. package/dist/chunks/{chunk-UXQILGRX.js → chunk-6DWXUZMO.js} +62 -62
  10. package/dist/chunks/{chunk-YADBB5GN.js → chunk-6OZ5KWG3.js} +1 -1
  11. package/dist/chunks/chunk-IJN6ZJVI.js +310 -0
  12. package/dist/chunks/{chunk-SVEJFERZ.js → chunk-QFCF3GNT.js} +153 -153
  13. package/dist/chunks/{chunk-2UUOFT3Z.js → chunk-SGNM3UP6.js} +1 -1
  14. package/dist/chunks/chunk-U6BNMGSK.js +17 -0
  15. package/dist/chunks/{chunk-5GPJ6MB5.js → chunk-XULI4U7I.js} +120 -120
  16. package/dist/chunks/{chunk-BEXLPFFB.js → chunk-ZL5CEANW.js} +3 -3
  17. package/dist/chunks/chunk-ZPD7IUKW.js +322 -0
  18. package/dist/chunks/compaction-config-E4LN3M53.js +2 -0
  19. package/dist/chunks/{construction-bootstrap-YON4ZEMO.js → construction-bootstrap-GIFDM4L5.js} +1 -1
  20. package/dist/chunks/{dist-EZXBR6NW.js → dist-7PXDYX2R.js} +1 -1
  21. package/dist/chunks/host-FLG7FJZT.js +2 -0
  22. package/dist/chunks/{paste-4THGP5XW.js → paste-FDYM7SZX.js} +1 -1
  23. package/dist/chunks/run-manager-IU5COC6X.js +2 -0
  24. package/dist/chunks/{utils-5XVW33SY.js → utils-NP42DKL3.js} +1 -1
  25. package/dist/index.d.ts +11 -11
  26. package/dist/index.js +1 -1
  27. package/dist/kodax_cli.js +1008 -970
  28. package/dist/sdk-agent.d.ts +24 -13
  29. package/dist/sdk-agent.js +1 -1
  30. package/dist/sdk-coding.d.ts +15 -13
  31. package/dist/sdk-coding.js +1 -1
  32. package/dist/sdk-llm.d.ts +6 -6
  33. package/dist/sdk-mcp.js +1 -1
  34. package/dist/sdk-media.d.ts +1 -1
  35. package/dist/sdk-media.js +1 -1
  36. package/dist/sdk-repl.d.ts +12 -11
  37. package/dist/sdk-repl.js +2 -2
  38. package/dist/sdk-session.d.ts +6 -6
  39. package/dist/sdk-session.js +1 -1
  40. package/dist/sdk-skills.js +1 -1
  41. package/dist/types-chunks/{base.d-BA9Doaj_.d.ts → base.d-DalIRhbb.d.ts} +1 -1
  42. package/dist/types-chunks/{bash-prefix-extractor.d-BNdpV4Cf.d.ts → bash-prefix-extractor.d-Ds1THKeH.d.ts} +63 -27
  43. package/dist/types-chunks/{capability-learning.d-DRV80ISB.d.ts → capability-learning.d-BQB0M70w.d.ts} +1 -1
  44. package/dist/types-chunks/{guardrail.d-CNdKuSD_.d.ts → guardrail.d-CdqJwwN7.d.ts} +3 -3
  45. package/dist/types-chunks/{process.d-BOrAxjvM.d.ts → process.d-C93UMgPK.d.ts} +20 -5
  46. package/dist/types-chunks/{resolver.d-DFAKKUvt.d.ts → resolver.d-CGkfRULj.d.ts} +2 -2
  47. package/dist/types-chunks/{run-manager.d-CsJC9zYf.d.ts → run-manager.d-DLK3ed-T.d.ts} +4 -4
  48. package/dist/types-chunks/{sdk-session-ByZlwgdM.d.ts → sdk-session-CtwN7iBO.d.ts} +47 -10
  49. package/dist/types-chunks/{storage.d-DHL3XpAL.d.ts → storage.d-DlZS0g8w.d.ts} +2 -2
  50. package/dist/types-chunks/{types.d-Ci5YPFEh.d.ts → types.d-Bp4Lm1jv.d.ts} +37 -3
  51. package/dist/types-chunks/{types.d-CE_Ter29.d.ts → types.d-CSZAMmU-.d.ts} +4 -1
  52. package/dist/types-chunks/{utils.d-D9FHU4wB.d.ts → utils.d-Boz9k2HB.d.ts} +5 -5
  53. package/package.json +1 -1
  54. package/dist/chunks/argument-completer-7Q2T4YWA.js +0 -2
  55. package/dist/chunks/chunk-D7RENPQQ.js +0 -322
  56. package/dist/chunks/chunk-SDSLWDAZ.js +0 -17
  57. package/dist/chunks/chunk-Z23LK3IV.js +0 -310
  58. package/dist/chunks/chunk-Z3ZXV3DZ.js +0 -18
  59. package/dist/chunks/compaction-config-GQIPCVFD.js +0 -2
  60. package/dist/chunks/host-LO6ZNTMV.js +0 -2
  61. package/dist/chunks/run-manager-HTLXKU66.js +0 -2
package/CHANGELOG.md CHANGED
@@ -6,6 +6,39 @@ All notable changes to this project will be documented in this file.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.7.60] - 2026-07-04
10
+
11
+ > Scope note: an F250 refactor + Space SDK rollup. **FEATURE_250** brings the deferred-tool
12
+ > progressive-disclosure mechanism — previously SA-path-only — to the AMA/AMAW **managed** tool
13
+ > path, so cache-cold managed turns carry one-line search hints instead of full descriptions for
14
+ > the repo-intelligence + web/code/goal tools. Tool `input_schema` is unchanged, so every deferred
15
+ > tool stays directly callable; the full description is fetched on demand via `tool_search`.
16
+ > Transparent (no user-facing behavior change) and prompt-additive only (a two-line
17
+ > `code_search`/`semantic_lookup` teaching block). The release also lands **CAP-099 (Space SDK):
18
+ > live turn attribution + structured transcript** — streamed activity events carry session/turn
19
+ > identity, explicit turn-boundary events share one per-session sequence, and client-only
20
+ > transcript notices are persisted without ever entering the model context. All additive and
21
+ > profile/host-gated; the default path stays unchanged when a host does not read the new metadata.
22
+ > No public runtime type is removed.
23
+
24
+ ### Added
25
+
26
+ - **`code_search` / `semantic_lookup` teaching in the Worker REPO INTELLIGENCE prompt (FEATURE_250).** A two-line, eval-justified teaching block: the floor-tier alias under-adopted the hint-only tools on ambiguous tasks (75%), and the teaching recovered adoption to 100% while being strictly non-negative on every other alias.
27
+ - **CAP-099 live turn attribution — session/turn identity on streamed events (Space SDK).** A shared live-turn scope (`createLiveTurnScope` / `withLiveTurnAttribution`, `event-emitter.ts`) stamps `KodaXActivityEventMeta` (`sessionId` / `seq` / `turnId` / `deliveryId` / `timestamp`) onto every streamed activity callback, and explicit turn-boundary events (`emitTurnStarted` / `emitTurnCompleted` / `emitTurnFailed`) share one monotonic per-session sequence — so an SDK host can route streamed assistant events to the owning turn's UI bubble by turn ownership instead of fragile ordering-by-observation. Threaded through messaging (queue/drain), orchestration (idle-yield), run-substrate, runner-driven, run-workflow, and dispatch-child-tasks; a host that ignores the metadata sees unchanged behavior. New `cap-099-live-turn-attribution` contract test; existing `cap-005/006/007/041/046/054/086` event-contract tests updated for the added meta parameter.
28
+ - **Client-only transcript notices + structured transcript entries (CAP-099, Space SDK).** The persisted transcript gains structured entry types (`message` / `compaction` / `branch_summary` / `client_notice` / `task_result`) with `source` + `turnId`. A `client_notice` is persisted as a lineage entry, NOT a model message: `loadSession()` (active model context) omits it while `loadFullTranscript()` returns it with `type: 'client_notice'`, `source: 'client'`, and `payload.entersModelContext === false` — so a host can render client-side scrollback notices without polluting the model's context. SDK embedder guide updated (`docs/SDK_EMBEDDER_GUIDE.md`).
29
+ - **Transcript clone provenance for SDK hosts (CAP-099, Space SDK).** Lineage entries now carry optional `logicalId` / `sourceEntryId`, and `loadFullTranscript().transcriptEntries[]` always exposes a stable `logicalId` (falling back to `entryId` for old sessions). Forked/cloned entries keep the source `logicalId` and point `sourceEntryId` at the root physical source entry, so hosts can fold cloned history precisely without guessing from role/content/timestamp or `[compacted]` placeholders. `loadFullTranscript()` remains raw append-order scrollback; it does not silently merge branches or hide compaction notices.
30
+
31
+ ### Changed
32
+
33
+ - **Progressive disclosure on the AMA/AMAW managed tool path (FEATURE_250).** `buildAgentToolsFromRegistry` (`agent-chain.ts`) now hint-swaps the 13 non-mcp deferred tools — repo-intel (`repo_overview`, `changed_scope`, `module_context`, `symbol_context`, `process_context`, `impact_estimate`), web/code (`web_search`, `web_fetch`, `code_search`, `semantic_lookup`), and goal (`get_goal`, `create_goal`, `update_goal`) — to their `DEFERRED_TOOL_HINTS` one-liner. The swap is a one-time build-time change (the managed `Agent.tools` is a static array), so the tools[] prefix is cache-stable turn-to-turn. `mcp_*` (5) stay resident (remote-mutation risk + not covered by the reachability eval; conservative hold gated on a future MCP-runtime eval); `run_workflow` is untouched (host-conditional per FEATURE_246/249). Two eval panels (5-alias coding-plan) confirm no reachability harm: DEFER_SAFE 5/5, 0% read/grep fallback, and V_teach 100% adoption on ambiguous tasks. KodaX's hint-swap keeps the tool in `tools[]` with `input_schema` intact — safer than the reference agents (Claude Code / Codex) which remove deferred tools from the wire and therefore gate deferral off for weak models.
34
+ - **Inline workflow preflight hardening (FEATURE_246).** The inline `run_workflow` restricted-smoke preflight now rejects two more classes of weak-model authoring bug before a workflow starts: (1) an unawaited `wf.runAgent` / `wf.synthesize` result that leaks into a property read, JSON serialization, or assignment — a Proxy trap throws `wf.<method> result must be awaited before …` instead of silently coercing a pending command; and (2) a `manifest.readOnly=true` workflow that spawns a write-capable child (`readOnly:false`) — it now throws at preflight instead of running. This is the deterministic-structural groundwork for the planned FEATURE_252 workflow-quality lints (v0.7.61).
35
+
36
+ ### Fixed
37
+
38
+ - **`tool_search` result protected from microcompaction pruning (FEATURE_250).** `tool_search` is added to `PRUNE_PROTECTED_TOOLS` (`compaction.ts`). On the managed path a deferred tool's full description lives only in the `tool_search` result message (the static `Agent.tools` array cannot make a description resident mid-session), so the unconditional 20-turn prune would otherwise silently stub the only teaching surface for any non-prompt-taught deferral.
39
+ - **Headless SDK resume recovers `<task-completed>` results + per-message timestamps (Space SDK).** Two resume/persistence fixes for headless SDK embedders; the KodaX TUI is byte-unchanged. (1) `dispatch_child_task` / `run_workflow` `<task-completed>` result banners are spliced into the transcript as synthetic user messages that the reconstruction helper drops, so a headless host with no `uiHistory` lost them on resume — they are now tagged `_source: 'task-completed'` (only when a task-notification actually drained) and restored as a distinct `task_completed` event seed at their transcript position; when `uiHistory` is present the derived seed is discarded, so the CLI does not double-render. (2) `KodaXMessage` carried no time, so `createSessionLineage` stamped a whole managed task's messages with one accounting-millisecond and per-message "N ago" footers collapsed — an additive `KodaXMessage.timestamp?` is now stamped at each message-finalization site and preferred by `createSessionLineage`. The dedup fingerprint ignores timestamp (resume dedup unaffected); old sessions fall back to accounting-time.
40
+ - **Goal-state tool results protected from microcompaction pruning.** `get_goal` / `create_goal` / `update_goal` are added to `PRUNE_PROTECTED_TOOLS` (`compaction.ts`) alongside `tool_search`. The canonical goal state persists as session-lineage entries, but these tool results are the model-visible status snapshots and lifecycle-transition receipts (short, low-frequency, control-plane-like), so microcompaction's 20-turn prune no longer stubs the model's view of `/goal` state. (v0.7.60 review follow-up.)
41
+
9
42
  ## [0.7.59] - 2026-07-03
10
43
 
11
44
  > Scope note: a rollup release on top of v0.7.58. **FEATURE_248** and **FEATURE_249** extend