@kodax-ai/kodax 0.7.71 → 0.7.72

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 (86) hide show
  1. package/CHANGELOG.md +602 -487
  2. package/README.md +46 -27
  3. package/README_CN.md +30 -13
  4. package/dist/chunks/agent-YKGU4USA.js +2 -0
  5. package/dist/chunks/argument-completer-QZETLNAB.js +2 -0
  6. package/dist/chunks/{chunk-SX2WFHIS.js → chunk-2RI252RN.js} +1 -1
  7. package/dist/chunks/chunk-CLFP6UGU.js +71 -0
  8. package/dist/chunks/chunk-E27LHEIP.js +37 -0
  9. package/dist/chunks/chunk-EDZ5KJFT.js +5 -0
  10. package/dist/chunks/chunk-GIK4SGAT.js +364 -0
  11. package/dist/chunks/chunk-GVWPHE23.js +310 -0
  12. package/dist/chunks/{chunk-A2TFSV5M.js → chunk-IR5KIK7E.js} +1 -1
  13. package/dist/chunks/chunk-JSDLBXME.js +755 -0
  14. package/dist/chunks/chunk-MVARIMQV.js +22 -0
  15. package/dist/chunks/chunk-PKQOEDHJ.js +628 -0
  16. package/dist/chunks/{chunk-64NQBOSN.js → chunk-SQODXBLX.js} +1 -1
  17. package/dist/chunks/chunk-VDGCGOQH.js +328 -0
  18. package/dist/chunks/chunk-VVE3UM4F.js +410 -0
  19. package/dist/chunks/chunk-WIBLZK4G.js +151 -0
  20. package/dist/chunks/{compaction-config-5KKKXYFT.js → compaction-config-TWCDFLX6.js} +1 -1
  21. package/dist/chunks/{construction-bootstrap-OXDDDW6O.js → construction-bootstrap-ZJPXUPXQ.js} +1 -1
  22. package/dist/chunks/dist-JT4ATXVM.js +2 -0
  23. package/dist/chunks/host-SVEDZUC5.js +2 -0
  24. package/dist/chunks/{run-manager-Z3W6MDO7.js → run-manager-RX42UNEM.js} +1 -1
  25. package/dist/chunks/{utils-CFOXDCB5.js → utils-OTT5CG5J.js} +1 -1
  26. package/dist/index.d.ts +13 -13
  27. package/dist/index.js +4 -4
  28. package/dist/kodax_bootstrap.js +28 -0
  29. package/dist/kodax_cli.js +1325 -1333
  30. package/dist/kodax_resume.js +44 -0
  31. package/dist/provider-capabilities.json +50 -48
  32. package/dist/runtime-worker.js +1322 -1330
  33. package/dist/sdk-a2a.d.ts +10 -9
  34. package/dist/sdk-a2a.js +1 -1
  35. package/dist/sdk-agent.d.ts +382 -206
  36. package/dist/sdk-agent.js +1 -1
  37. package/dist/sdk-coding.d.ts +80 -128
  38. package/dist/sdk-coding.js +1 -1
  39. package/dist/sdk-experimental-memory.js +1 -1
  40. package/dist/sdk-mcp.js +1 -1
  41. package/dist/sdk-media.d.ts +3 -0
  42. package/dist/sdk-media.js +1 -1
  43. package/dist/sdk-repl.d.ts +71 -23
  44. package/dist/sdk-repl.js +2 -2
  45. package/dist/sdk-runtime.d.ts +143 -31
  46. package/dist/sdk-runtime.js +1 -1
  47. package/dist/sdk-session.d.ts +6 -5
  48. package/dist/sdk-session.js +1 -1
  49. package/dist/sdk-skills.d.ts +5 -5
  50. package/dist/sdk-skills.js +1 -1
  51. package/dist/semantic-worker.js +14 -14
  52. package/dist/types-chunks/{bash-prefix-extractor.d-YoiZl5yt.d.ts → bash-prefix-extractor.d-CHJO5y94.d.ts} +107 -248
  53. package/dist/types-chunks/{capsule.d-CK5Pfz1k.d.ts → capsule.d-DxtdE-GD.d.ts} +24 -95
  54. package/dist/types-chunks/center-types.d-BBT122uJ.d.ts +91 -0
  55. package/dist/types-chunks/{commands.d-D6g2jq8V.d.ts → commands.d-DZxHzH5-.d.ts} +6 -4
  56. package/dist/types-chunks/{guardrail.d-DilYC1dh.d.ts → guardrail.d-DlpMnd-Y.d.ts} +1 -1
  57. package/dist/types-chunks/{guardrail.d-DdeDWnVu.d.ts → guardrail.d-auV61_h5.d.ts} +83 -10
  58. package/dist/types-chunks/public-api.d--IDNJsu1.d.ts +1342 -0
  59. package/dist/types-chunks/{run-manager.d-DxU3SSGR.d.ts → run-manager.d-Bh50OdVl.d.ts} +1 -1
  60. package/dist/types-chunks/sdk-session-Cfw6NFu-.d.ts +82 -0
  61. package/dist/types-chunks/{types.d-CEZZSY9s.d.ts → types.d-CNZgY52F.d.ts} +2 -2
  62. package/dist/types-chunks/{types.d-vJExiRje.d.ts → types.d-DCQVBqVn.d.ts} +10 -5
  63. package/dist/types-chunks/{types.d-CRCaLt_s.d.ts → types.d-DH1mvdcl.d.ts} +284 -164
  64. package/dist/types-chunks/{types.d-CzsLFqmf.d.ts → types.d-EqQmHztg.d.ts} +9 -10
  65. package/dist/types-chunks/{utils.d-Cb6vdvFM.d.ts → utils.d-gmn3c5U4.d.ts} +9 -12
  66. package/docs/SDK_EMBEDDER_GUIDE.md +171 -26
  67. package/package.json +4 -4
  68. package/scripts/kodax-bin.cjs +4 -2
  69. package/scripts/production-env.cjs +9 -0
  70. package/dist/chunks/agent-X2EWQADL.js +0 -2
  71. package/dist/chunks/argument-completer-BLNXDO2F.js +0 -2
  72. package/dist/chunks/chunk-4DY756KL.js +0 -70
  73. package/dist/chunks/chunk-52JSZ77P.js +0 -37
  74. package/dist/chunks/chunk-A574DBTV.js +0 -422
  75. package/dist/chunks/chunk-F7KGYHJ3.js +0 -624
  76. package/dist/chunks/chunk-GVTM4Z6O.js +0 -151
  77. package/dist/chunks/chunk-PHH4TRGF.js +0 -22
  78. package/dist/chunks/chunk-PVUXONQB.js +0 -366
  79. package/dist/chunks/chunk-T7LYK53M.js +0 -329
  80. package/dist/chunks/chunk-VRSVNU2Y.js +0 -7
  81. package/dist/chunks/chunk-Y5XKAN7C.js +0 -755
  82. package/dist/chunks/chunk-Z535BARK.js +0 -306
  83. package/dist/chunks/dist-IXJRJ27U.js +0 -2
  84. package/dist/chunks/host-VRKDAN26.js +0 -2
  85. package/dist/types-chunks/public-api.d-BvCp5VkW.d.ts +0 -601
  86. package/dist/types-chunks/sdk-session-wGpa7X_U.d.ts +0 -796
package/README.md CHANGED
@@ -94,7 +94,7 @@ That's it. You're in the REPL — ask anything in natural language.
94
94
  <h3>🤖 Multi-agent by default</h3>
95
95
  <sub>V2 Worker single-loop + Sidecar Verifier + async children</sub>
96
96
  <br><br>
97
- <code>dispatch_child_task</code>, <code>send_message</code>, <code>task_stop</code>, multi-instance auto-coordination with content-hash safety net.
97
+ <code>spawn_agent</code>, <code>send_message</code>, <code>followup_task</code>, <code>interrupt_agent</code>, multi-instance auto-coordination with content-hash safety net.
98
98
  </td>
99
99
  <td align="center" valign="top">
100
100
  <h3>🧩 Skills + self-construction</h3>
@@ -386,6 +386,13 @@ context diagnostics, and daemon protocol schemas, see
386
386
  The Space/IDE shared-daemon contract is documented in
387
387
  [SDK Embedder Guide section 23](docs/SDK_EMBEDDER_GUIDE.md#23-shared-coder-daemon-for-space-and-ide-hosts-feature_269-v0769).
388
388
 
389
+ **v0.7.72 Runtime correction:** Auto Mode is now owned by the Runtime session,
390
+ not by a UI hook. It reuses its LLM/rules guardrail across turns, classifies
391
+ before the shared permission bridge, and persists an automatic fallback to
392
+ rules. The same session settings can select a classifier model and bounded
393
+ timeout. Host plan exit is exposed only when the host supplies an approval
394
+ callback. See the [Runtime Auto Mode integration guide](docs/SDK_EMBEDDER_GUIDE.md#24-runtime-owned-auto-mode-and-plan-approval-bridges-v072).
395
+
389
396
  ## Repo Intelligence
390
397
 
391
398
  KodaX ships with built-in repo intelligence (`repo_overview`, `module_context`, `symbol_context`, `process_context`, `impact_estimate`, and related tools) that helps the coding agent understand large codebases without ad-hoc grep/glob exploration.
@@ -408,7 +415,7 @@ KodaX/
408
415
  │ │ └── providers/ # Anthropic, OpenAI, DeepSeek, Kimi, MiMo, MiniMax, Zhipu, Ark, …
409
416
  │ │
410
417
  │ ├── agent/ # @kodax-ai/agent - Generic Agent framework
411
- │ │ ├── orchestration/ # Runner, runFanOut, runWithIdleYield, ChildTaskRegistry
418
+ │ │ ├── actors/ # Runtime-owned Actor tree, scheduler, mailbox, events
412
419
  │ │ ├── session-lineage/ # branchable session tree (inline v0.7.43)
413
420
  │ │ ├── capabilities/
414
421
  │ │ │ ├── mcp/ # MCP integration (inline v0.7.43)
@@ -417,7 +424,7 @@ KodaX/
417
424
  │ │
418
425
  │ ├── coding/ # @kodax-ai/coding - Coding Agent (tools + prompts)
419
426
  │ │ ├── tools/ # 50+ tools: read, write, edit, bash, glob, grep, undo,
420
- │ │ │ # dispatch_child_task, send_message, task_stop,
427
+ │ │ │ # spawn_agent, send_message, followup_task, wait_agent,
421
428
  │ │ │ # ask_user_question, repo-intelligence, …
422
429
  │ │ └── repo-intelligence/ # incl. protocol.ts (inline v0.7.43)
423
430
  │ │
@@ -466,7 +473,7 @@ Source-side workspace package names (`@kodax-ai/*`). npm consumers install the s
466
473
  |---------|---------|------------------|
467
474
  | `@kodax-ai/llm` | LLM abstraction (15 built-in provider aliases + custom registration) | @anthropic-ai/sdk, openai |
468
475
  | `@kodax-ai/agent` | Generic Agent framework — Runner, fan-out, idle-yield, media/input artifacts, session-lineage, capabilities (mcp + skills), tracing (ADR-036 v0.7.43 consolidation; subpaths: `/media`, `/session-lineage`, `/capabilities/mcp`, `/capabilities/skills`, `/tracing`) | @kodax-ai/llm, js-tiktoken, fflate, jimp, yaml |
469
- | `@kodax-ai/coding` | Coding Agent — 50+ tools (incl. `dispatch_child_task` / `send_message` / `task_stop`) + role prompts + auto-continue + repo-intelligence protocol | @kodax-ai/llm, @kodax-ai/agent |
476
+ | `@kodax-ai/coding` | Coding Agent — 50+ tools (incl. canonical Actor collaboration tools) + role prompts + auto-continue + repo-intelligence protocol | @kodax-ai/llm, @kodax-ai/agent |
470
477
  | `@kodax-ai/repl` | Complete interactive terminal UI (Ink/React, permission modes, commands, streaming) | @kodax-ai/coding, ink, react |
471
478
 
472
479
  ### Source-side vs npm-published surface
@@ -500,11 +507,11 @@ KodaX has two layers that consumers should understand separately:
500
507
 
501
508
  **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).
502
509
 
503
- **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.
510
+ **Inline Workflow Authoring (FEATURE_246, v0.7.58; F270 update in v0.7.72)**: the Worker can author and run a workflow inline via the model-callable `run_workflow` tool when Workflow intent is explicit. It scouts the codebase first, bakes concrete findings into child prompts, and runs the script through the sandbox, static-validation, and postcondition-verification pipeline. F270 retires AMAW and complexity-driven activation; AMA keeps explicit `/workflow`, named/SDK, and natural-language Workflow requests. Workflow child Agents now run on the unified Actor control plane. See [docs/features/v0.7.58.md](docs/features/v0.7.58.md), [docs/features/v0.7.72.md](docs/features/v0.7.72.md), and ADR-044/046/047/048/049/055.
504
511
 
505
- **Workflow Activation Tiers (FEATURE_248 + FEATURE_249, v0.7.59)**: the three agent modes now have a coherent workflow posture. **AMAW** carries a mode-level `ORCHESTRATION DEFAULT` standing directive (mirroring the reference "ultracode" posture): substantive work a multi-file investigation, a design decision, anything costly to get wrong — defaults to orchestrating multiple cross-checking agents, with a PLAN-TIME COMMITMENT flow-fix that front-loads the orchestrate-vs-solo call to turn 0. **AMA** hosts the same `run_workflow` tool but with no standing directive — it activates a workflow when you ask for orchestration in natural language, never on complexity alone. **SA** stays solo. The directive is leak-closed via `amawOrchestrationAvailable`, so AMA and SA prompts stay byte-identical. See [docs/features/v0.7.59.md](docs/features/v0.7.59.md).
512
+ **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).
506
513
 
507
- **Progressive Disclosure on the Managed Tool Path (FEATURE_250, v0.7.60)**: the deferred-tool progressive-disclosure mechanism — previously SA-path-only — now applies to the AMA/AMAW **managed** path too. 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. Transparent to users; validated by two 5-alias eval panels (DEFER_SAFE 5/5, 0% read/grep fallback). See [docs/features/v0.7.60.md](docs/features/v0.7.60.md).
514
+ **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).
508
515
 
509
516
  **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).
510
517
 
@@ -621,7 +628,7 @@ one-time provisioning).
621
628
  - **Modular Architecture** - Use as CLI, as a library, or as a Node-free single binary
622
629
  - **15 Built-in Provider Aliases** - Anthropic, OpenAI, DeepSeek, Kimi, Kimi Code, Qwen, Zhipu, Zhipu Coding, Zai Coding, MiniMax Coding, MiMo Coding, MiMo, Ark Coding, Gemini CLI, Codex CLI - plus user-defined OpenAI/Anthropic-compatible providers
623
630
  - **Dynamic Workflows + SDK Process Surface** - Generate/reuse capability-routed workflows, observe live progress through `WorkflowProcessSnapshot`, and control workflow lifecycle from SDK hosts without parsing REPL output
624
- - **V2 Worker single-loop + Sidecar Verifier (default)** - Single-agent main loop with an out-of-band Sidecar Verifier as Stop-hook (claudecode-shape; FEATURE_184 v0.7.42, ADR-030). Verifier returns accept/revise/blocked verdict on Worker text-only termination. The pre-v0.7.43 V1 chain is retired, `emit_handoff` is deleted, accept-verdict UI silently passes through, and content-aware gating skips trivial-chat sidecar calls. Async child steering uses `dispatch_child_task` + `send_message` + `task_stop` with idle-yield wait; specialist routing uses `subagent_type`.
631
+ - **V2 Worker single-loop + Sidecar Verifier (default)** - Single-agent main loop with an out-of-band Sidecar Verifier as Stop-hook (claudecode-shape; FEATURE_184 v0.7.42, ADR-030). Verifier returns accept/revise/blocked verdict on Worker text-only termination. The pre-v0.7.43 V1 chain is retired, `emit_handoff` is deleted, accept-verdict UI silently passes through, and content-aware gating skips trivial-chat sidecar calls. Adaptive child steering uses the canonical Actor collaboration tools with idle-yield waiting; specialist routing uses `spawn_agent(agent_id=...)`.
625
632
  - **Reasoning Effort** - Effort-first control (`off/auto/low/medium/high` plus model-supported extras) across providers
626
633
  - **Streaming Output** - Real-time response display
627
634
  - **Session Management** - JSONL format with branchable session lineage tree
@@ -806,7 +813,12 @@ Bare `-r` opens an interactive picker with incremental search, arrow/PageUp/Page
806
813
  navigation, Tab completion, full selected-session ID display, and Enter-to-resume.
807
814
  An explicit value checks the complete session ID first, then an exact
808
815
  case-insensitive title; duplicate titles open a narrowed picker instead of
809
- silently choosing one. Cleanup is preview-only unless
816
+ silently choosing one. The picker loads before the full CLI, so session listing
817
+ remains responsive. After selection it hands terminal input to the resumed
818
+ REPL; Esc releases the picker's stdin ownership and immediately returns to the
819
+ invoking shell. Session replay preserves each recorded message/event timestamp.
820
+
821
+ Cleanup is preview-only unless
810
822
  `--apply-session-cleanup` is also provided; matching sessions are archived rather
811
823
  than permanently deleted.
812
824
 
@@ -862,14 +874,14 @@ KodaX provides 3 permission modes for fine-grained control:
862
874
  |------|-------------|------------------------|
863
875
  | `plan` | Read-only planning mode | All modification tools blocked |
864
876
  | `accept-edits` | Auto-accept file edits | bash only |
865
- | `auto-in-project` | Full auto within project | None (project-scoped) |
877
+ | `auto` | Runtime-owned LLM/rules classification within the project boundary | Only explicit classifier escalation |
866
878
 
867
879
  ```bash
868
880
  # In REPL, use /mode command
869
881
  /mode plan # Switch to plan mode (read-only)
870
882
  /mode accept-edits # Switch to accept-edits mode
871
- /mode auto-in-project # Switch to auto-in-project mode
872
- /auto # Alias for auto-in-project
883
+ /mode auto # Switch to Runtime-owned Auto Mode
884
+ /auto # Alias for auto
873
885
 
874
886
  # Check current mode
875
887
  /mode
@@ -881,6 +893,9 @@ KodaX provides 3 permission modes for fine-grained control:
881
893
  - Permanent protection zones: `.kodax/`, `~/.kodax/`, paths outside project
882
894
  - Pattern-based permission: Allow specific Bash commands (e.g., `Bash(npm install)`)
883
895
  - Unified diff display for write/edit operations
896
+ - Auto Mode runs guardrail classification before the permission UI; a safe
897
+ allow verdict does not create a pending approval request. The session records
898
+ an automatic LLM-to-rules fallback for later turns.
884
899
 
885
900
  ### CLI Help Topics
886
901
 
@@ -1088,8 +1103,7 @@ import {
1088
1103
  Runner,
1089
1104
  runFanOut,
1090
1105
  runWithIdleYield,
1091
- registerChildTask,
1092
- type ChildTaskRegistry,
1106
+ createAgentActorController,
1093
1107
  generateSessionId,
1094
1108
  estimateTokens,
1095
1109
  DefaultSummaryCompaction,
@@ -1102,14 +1116,15 @@ const result = await runFanOut({
1102
1116
  run: async (bundle) => doWork(bundle),
1103
1117
  });
1104
1118
 
1105
- // Idle-yield wait pause when out of useful work, resume when a wake event arrives
1106
- await runWithIdleYield({ runOnce, computeSnapshot, registry, messageQueue, agentId });
1119
+ // Runtime-owned Actor identity tree (inject an executor before starting Turns)
1120
+ const actors = await createAgentActorController();
1121
+ const tree = actors.list('/root');
1107
1122
 
1108
1123
  // Pluggable compaction policy (FEATURE_081)
1109
1124
  const policy = new DefaultSummaryCompaction({ thresholdRatio: 0.8, keepRecent: 10 });
1110
1125
  ```
1111
1126
 
1112
- **Key Features**: `Runner` + per-step lifecycle · `runFanOut` (bounded-concurrency + abort + progress events) · `runWithIdleYield` (chat-while-waiting) · `ChildTaskRegistry` / `TaskAbortRegistry` · session-id generation · tiktoken-based token estimation · `CompactionPolicy` interface.
1127
+ **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.
1113
1128
 
1114
1129
  ### `@kodax-ai/kodax/skills` — Skills System
1115
1130
 
@@ -1138,7 +1153,7 @@ const result = await executeSkill({
1138
1153
 
1139
1154
  ### `@kodax-ai/kodax/coding` — Coding Agent
1140
1155
 
1141
- Complete coding agent: 50+ tools (`read`/`write`/`edit`/`bash`/`grep`/`glob`/`dispatch_child_task`/`send_message`/`task_stop`/...) + Worker role prompt + Sidecar Verifier (out-of-band Stop-hook) + agent loop + auto-continue + session management.
1156
+ Complete coding agent: 50+ tools (`read`/`write`/`edit`/`bash`/`grep`/`glob` plus `spawn_agent`/`send_message`/`followup_task`/`wait_agent`/`interrupt_agent`/`list_agents`/`agent_output`) + Worker role prompt + Sidecar Verifier (out-of-band Stop-hook) + agent loop + auto-continue + session management.
1142
1157
 
1143
1158
  ```typescript
1144
1159
  import { runKodaX, KodaXClient, KODAX_TOOLS } from '@kodax-ai/kodax/coding';
@@ -1160,7 +1175,7 @@ await client.send('Create a new file');
1160
1175
  await client.send('Add a function to it'); // Has context from previous message
1161
1176
  ```
1162
1177
 
1163
- **Key Features**: 50+ built-in tools (see [Tools](#tools)) · V2 Worker single-loop + Sidecar Verifier (FEATURE_184 v0.7.42 / V1 chain fully retired by FEATURE_193 v0.7.43) · async child steering via `send_message` / `task_stop` (FEATURE_120, v0.7.39) · idle-yield wait mechanic (FEATURE_155, v0.7.38) · specialist routing via `subagent_type` (FEATURE_191, v0.7.43) · auto-continue · session lineage.
1178
+ **Key Features**: 50+ built-in tools (see [Tools](#tools)) · V2 Worker single-loop + Sidecar Verifier (FEATURE_184 v0.7.42 / V1 chain fully retired by FEATURE_193 v0.7.43) · Runtime-owned Actor collaboration and safe-boundary steering (FEATURE_270, v0.7.72) · idle-yield waiting · specialist routing via `spawn_agent(agent_id=...)` · auto-continue · session lineage.
1164
1179
 
1165
1180
  ### `@kodax-ai/kodax/repl` — Interactive Terminal UI
1166
1181
 
@@ -1215,9 +1230,9 @@ await runInkInteractiveMode({ provider: 'zhipu-coding', effort: 'auto' });
1215
1230
  | kimi-code | `KIMI_CODE_API_KEY` | Native | kimi-for-coding (`k3-256k` for Moderato / `k3` 1M for Allegretto+ / `kimi-for-coding-highspeed` via `/model`; both K3 choices use upstream `k3`) |
1216
1231
  | qwen | `QWEN_API_KEY` | Native | qwen3.5-plus |
1217
1232
  | zhipu | `ZHIPU_API_KEY` | Native | glm-5 (`glm-5.2` 1M ctx / `glm-5.1` / `glm-5-turbo` via `/model`) |
1218
- | zhipu-coding | `ZHIPU_CODING_API_KEY` | Native | glm-5 (`glm-5.2` 1M ctx / `glm-5.1` / `glm-5-turbo` via `/model`) |
1233
+ | zhipu-coding | `ZHIPU_CODING_API_KEY` | Native | glm-5.2 (1M ctx; legacy `glm-5.1` and `glm-5-turbo` remain selectable via `/model`) |
1219
1234
  | zai-coding | `ZAI_CODING_API_KEY` | Native | glm-5.2 (Zhipu Coding Plan overseas mirror via `api.z.ai`, Anthropic-compat — same model lineup as `zhipu-coding`, served from outside CN) |
1220
- | minimax-coding | `MINIMAX_CODING_API_KEY` | Native | MiniMax-M2.7 (`MiniMax-M3` Frontier Coding, native multimodal + 1M ctx, plus `MiniMax-M2.7-highspeed` via `/model`) |
1235
+ | minimax-coding | `MINIMAX_CODING_API_KEY` | Native | MiniMax-M3 (Frontier Coding, native multimodal + 1M ctx; legacy `MiniMax-M2.7` / `MiniMax-M2.7-highspeed` remain selectable via `/model`) |
1221
1236
  | mimo | `MIMO_API_KEY` | Native | mimo-v2.5-pro (Xiaomi MiMo pay-per-token, Anthropic-compat) |
1222
1237
  | mimo-coding | `MIMO_CODING_API_KEY` | Native | mimo-v2.5-pro (Xiaomi Token Plan, Anthropic-compat) |
1223
1238
  | ark-coding | `ARK_CODING_API_KEY` | Native | glm-5.2 (Volcengine Ark Coding Plan — GLM-5.2 (alias: `glm-latest`) · Kimi K2.7 Code / K2.6 · MiniMax M3 / M2.7 · DeepSeek V4 Pro / V4 Flash · Doubao Seed 2.0 Code / Pro / Lite · Doubao Seed Code) |
@@ -1246,7 +1261,7 @@ kodax --session list
1246
1261
  # Parallel tool execution
1247
1262
  kodax --parallel "Read package.json and tsconfig.json"
1248
1263
 
1249
- # Adaptive multi-agent (AMA) mode — V2 Worker single-loop with `dispatch_child_task` fan-out
1264
+ # Adaptive multi-agent (AMA) mode — V2 Worker single-loop with Actor collaboration
1250
1265
  kodax --agent-mode ama "Analyze code structure, check test coverage, find bugs"
1251
1266
  ```
1252
1267
 
@@ -1304,12 +1319,16 @@ KodaX ships 50+ built-in tools, grouped below. They are registered as a single f
1304
1319
  ### Agent control & UX
1305
1320
  | Tool | Description |
1306
1321
  |------|-------------|
1307
- | `dispatch_child_task` | Spawn a sub-agent for an independent investigation/edit task. Optional `model_hint: 'fast' \| 'balanced' \| 'deep'` (advisory; routing no-op until FEATURE_102 v0.7.45). |
1308
- | `send_message` | Append an instruction to an in-flight child's queue surfaces as `<coordinator-instruction>` at the child's next turn boundary. Coordinator-only. (FEATURE_120, v0.7.39) |
1309
- | `task_stop` | Request graceful exit of a specific child. Current tool finishes atomically, then the child sees a `<coordinator-stop-request>` and emits a final summary. Coordinator-only. (FEATURE_120, v0.7.39) |
1322
+ | `spawn_agent` | Create a named child Actor and start its first Turn under inherited capabilities, session capacity, and root work budget. |
1323
+ | `send_message` | Commit bounded information to an Actor mailbox without starting a new Turn. |
1324
+ | `followup_task` | Join a running Actor at a safe boundary or atomically start a new Turn for an idle Actor. |
1325
+ | `wait_agent` | Wait for one or more Actor state changes without polling a second task registry. |
1326
+ | `interrupt_agent` | Request interruption of an active Turn while preserving Actor identity. |
1327
+ | `list_agents` | Inspect the caller-visible Actor subtree and Turn states. |
1328
+ | `agent_output` | Read bounded durable output for an authorized Actor/Turn. |
1310
1329
  | `ask_user_question` | Single/multi-select or free-text prompt back to the user |
1311
- | `exit_plan_mode` | Present a finalized plan for approval (REPL only) |
1312
- | `run_workflow` | Author and run a workflow script inline. Hosted in AMAW (self-activates on complexity via the ORCHESTRATION DEFAULT directive) and AMA (activates on an explicit natural-language request); not in SA. Scouts the codebase first, then bakes findings into child prompts; structured output via `outputSchema`, same-session `resumeFromRunId`, nested `wf.workflow(...)`. Async / idle-yield. (FEATURE_246 v0.7.58; FEATURE_248/249 v0.7.59) |
1330
+ | `exit_plan_mode` | Present a finalized plan only when the active REPL/host supplied an approval callback |
1331
+ | `run_workflow` | Author and run a deterministic Workflow protocol in AMA only when Workflow intent is explicit; complexity alone never activates it. Child Agents share the Actor control plane. Async / idle-yield. (FEATURE_246; FEATURE_270 v0.7.72) |
1313
1332
  | `emit_managed_protocol` | Internal managed-task protocol side-channel for role payloads (verdict). V2 Worker single-loop + Sidecar Verifier is the default since v0.7.42 (FEATURE_184); V1 chain retired in v0.7.43 (FEATURE_193). |
1314
1333
 
1315
1334
  ---
package/README_CN.md CHANGED
@@ -88,6 +88,13 @@ daemon,不会再次打开 GUI。`ELECTRON_RUN_AS_NODE` 只存在于子进程
88
88
  再使用 attach-only 模式连接。SDK 的 `homeDir` 是拥有 `.kodax` 的 CLI 风格基础目录,
89
89
  不是 `.kodax` 目录本身。
90
90
 
91
+ **v0.7.72 Runtime 修正:**Auto Mode 的权限决策由 Runtime Session 持有,
92
+ 不再由 UI hook 抢先决定。Runtime 会跨 turn 复用 LLM/rules guardrail,先分类、
93
+ 仅在 `escalate` 时创建共享 permission 请求,并把自动降级到 rules 的结果持久化到
94
+ session。Session 也可设置 classifier model 和有界 timeout;没有宿主审批回调时,
95
+ 不会向模型暴露 `exit_plan_mode`。完整 SDK 接入见
96
+ [Runtime Auto Mode 指引](docs/SDK_EMBEDDER_GUIDE.md#24-runtime-owned-auto-mode-and-plan-approval-bridges-v072)。
97
+
91
98
  ## 为什么用 KodaX
92
99
 
93
100
  <table>
@@ -116,7 +123,7 @@ daemon,不会再次打开 GUI。`ELECTRON_RUN_AS_NODE` 只存在于子进程
116
123
  <h3>🤖 默认多 agent</h3>
117
124
  <sub>V2 Worker 单循环 + Sidecar Verifier + 异步子 agent</sub>
118
125
  <br><br>
119
- <code>dispatch_child_task</code>、<code>send_message</code>、<code>task_stop</code>,多实例自动协调(content-hash safety net)。
126
+ <code>spawn_agent</code>、<code>send_message</code>、<code>followup_task</code>、<code>interrupt_agent</code>,多实例自动协调(content-hash safety net)。
120
127
  </td>
121
128
  <td align="center" valign="top">
122
129
  <h3>🧩 Skills + 自构造</h3>
@@ -466,9 +473,9 @@ dist/binary/linux-x64/
466
473
  | kimi-code | `KIMI_CODE_API_KEY` | Native | kimi-for-coding(可 `/model` 切换 `k3-256k`〔Moderato,256K〕/ `k3`〔Allegretto+,1M〕/ `kimi-for-coding-highspeed`;两个 K3 选项均请求上游 `k3`) |
467
474
  | qwen | `QWEN_API_KEY` | Native | qwen3.5-plus |
468
475
  | zhipu | `ZHIPU_API_KEY` | Native | glm-5(可 `/model` 切换 `glm-5.2` 1M ctx / `glm-5.1` / `glm-5-turbo`) |
469
- | zhipu-coding | `ZHIPU_CODING_API_KEY` | Native | glm-5(GLM Coding Plan;可 `/model` 切换 `glm-5.2` 1M ctx / `glm-5.1` / `glm-5-turbo`) |
476
+ | zhipu-coding | `ZHIPU_CODING_API_KEY` | Native | glm-5.21M ctx;仍可通过 `/model` 显式选择兼容模型 `glm-5.1` / `glm-5-turbo`) |
470
477
  | zai-coding | `ZAI_CODING_API_KEY` | Native | glm-5.2(GLM Coding Plan 海外站,通过 `api.z.ai` 接入,Anthropic 协议 — 模型清单和 `zhipu-coding` 完全一致) |
471
- | minimax-coding | `MINIMAX_CODING_API_KEY` | Native | MiniMax-M2.7(可 `/model` 切换 `MiniMax-M3` Frontier Coding,原生多模态 + 1M ctx;以及 `MiniMax-M2.7-highspeed`) |
478
+ | minimax-coding | `MINIMAX_CODING_API_KEY` | Native | MiniMax-M3Frontier Coding,原生多模态 + 1M ctx;仍可通过 `/model` 显式选择兼容模型 `MiniMax-M2.7` / `MiniMax-M2.7-highspeed`) |
472
479
  | mimo | `MIMO_API_KEY` | Native | mimo-v2.5-pro(小米 MiMo 按量计费,Anthropic 协议) |
473
480
  | mimo-coding | `MIMO_CODING_API_KEY` | Native | mimo-v2.5-pro(小米 MiMo Token Plan,Anthropic 协议) |
474
481
  | ark-coding | `ARK_CODING_API_KEY` | Native | glm-5.2(火山方舟 Coding Plan — GLM-5.2(别名 `glm-latest`) · Kimi K2.7 Code / K2.6 · MiniMax M3 / M2.7 · DeepSeek V4 Pro / V4 Flash · Doubao Seed 2.0 Code / Pro / Lite · Doubao Seed Code) |
@@ -533,11 +540,15 @@ KodaX 有 50+ 个内置工具,按类别分组如下(实际暴露给 LLM 是
533
540
 
534
541
  | 工具 | 说明 |
535
542
  |------|------|
536
- | `dispatch_child_task` | 派发子 agent 跑独立调研 / 改动任务。可选 `model_hint: 'fast' \| 'balanced' \| 'deep'`(advisory 标记,routing 在 FEATURE_102 v0.7.45 之前是 no-op) |
537
- | `send_message` | 给在跑 child 队列追加一条 `<coordinator-instruction>` 指令,child 下一个 turn 边界看到。仅 coordinator 可用。(FEATURE_120, v0.7.39) |
538
- | `task_stop` | 请求指定 child 优雅退出。当前 tool 原子结束后 child 看到 `<coordinator-stop-request>` 并 emit 最终摘要。仅 coordinator 可用。(FEATURE_120, v0.7.39) |
543
+ | `spawn_agent` | 创建命名子 Actor,并在继承权限、会话并发和根工作预算约束下启动首个 Turn。 |
544
+ | `send_message` | Actor 的持久 mailbox 提交有界信息,不启动新 Turn。 |
545
+ | `followup_task` | 在安全边界加入运行中的 Actor,或为 idle Actor 原子启动新 Turn。 |
546
+ | `wait_agent` | 等待一个或多个 Actor 状态变化,不轮询第二套任务注册表。 |
547
+ | `interrupt_agent` | 请求中断 active Turn,同时保留 Actor 身份。 |
548
+ | `list_agents` | 查看调用方有权访问的 Actor 子树与 Turn 状态。 |
549
+ | `agent_output` | 读取有权限的 Actor/Turn 有界持久输出。 |
539
550
  | `ask_user_question` | 向用户发起单选 / 多选 / 自由文本提问 |
540
- | `exit_plan_mode` | Plan 模式下提交最终方案给用户审批(仅 REPL |
551
+ | `exit_plan_mode` | 仅在当前 REPL/宿主提供审批回调时提交最终方案 |
541
552
  | `emit_managed_protocol` | managed-task 协议侧信道(verdict role payload)。v0.7.42 FEATURE_184 起默认走 V2 Worker 单循环 + Sidecar Verifier;v0.7.43 FEATURE_193 退役 V1 chain。 |
542
553
 
543
554
  ## Repo Intelligence(内置 full/light 引擎)
@@ -558,8 +569,8 @@ KodaX 是基于 npm workspaces 的 TypeScript monorepo,**源码层 4 个 works
558
569
  | Workspace 包 | 作用 | 主要依赖 |
559
570
  |----|------|---------|
560
571
  | `@kodax-ai/llm` | LLM 抽象层(15 个内置 provider alias + 自定义 provider 注册),可独立使用 | `@anthropic-ai/sdk`, `openai` |
561
- | `@kodax-ai/agent` | 通用 Agent 框架 —— Runner / runFanOut / runWithIdleYield / ChildTaskRegistry + 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` |
562
- | `@kodax-ai/coding` | Coding Agent:50+ 工具(含 `dispatch_child_task`/`send_message`/`task_stop`)、role prompts、agent loop、auto-continue + repo-intelligence protocol(v0.7.43 inline) | `@kodax-ai/llm`, `@kodax-ai/agent` |
572
+ | `@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` |
573
+ | `@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` |
563
574
  | `@kodax-ai/repl` | 完整交互式终端 UI(Ink / React、权限模式、命令系统、流式渲染) | `@kodax-ai/coding`, `ink`, `react` |
564
575
 
565
576
  根目录 `src/kodax_cli.ts` 是 CLI 入口;`src/sdk-{agent,llm,coding,media,repl,skills,mcp,session,runtime,a2a,experimental-memory}.ts` 是 SDK subpath 入口;构建产物在 `dist/`,单文件二进制在 `dist/binary/<target>/`。
@@ -677,15 +688,21 @@ A2A 配置迁移与历史任务 owner 迁移是两件事。如果升级 realm-aw
677
688
  精确授权的 Skill 脚本必须使用隔离策略,并通过 `kodax sandbox doctor`;
678
689
  Windows 的一次性显式初始化由 `kodax sandbox setup` 完成。
679
690
 
691
+ **v0.7.72 会话恢复与队列闭环:**裸 `kodax -r` 先加载可搜索选择器,不为列出
692
+ session 预加载完整 CLI;选中后才把 stdin 交给恢复后的 REPL,Esc 会释放选择器的
693
+ stdin 并立即回到原 shell。历史回放保留每条持久 event 的原始时间。用户 follow-up
694
+ 使用 session-root Actor queue scope,避免一个 session/child 的待处理输入被另一个
695
+ REPL 显示、唤醒或消费。
696
+
680
697
  **外部 Agent SDK plane(FEATURE_258,v0.7.67)**:`/agent` 导出协议中立的 executor、registration、policy、credential broker、artifact policy、catalog 和 durable task 契约;`/runtime` 通过 `admin.agentRegistrations`、`agents`、`agentTasks` 向 embedded 与 daemon client 提供同一组 DTO API。Executor factory 是宿主函数,只能装入 inline owner,或在创建新的 in-process daemon owner 时装入;不能通过既有 daemon 连接或 Runtime Worker 边界注入。Plane 关闭后是终态:未完成的 wait 和后续所有服务调用都会拒绝;受限 Workflow 脚本会完整校验并传递 `phase` 与外部 `target`。完整所有权、注册、preflight、启动/等待/继续/取消/对账和安全边界见 [SDK Embedder Guide §18](docs/SDK_EMBEDDER_GUIDE.md#18-external-agent-executor-plane-feature_258-v0767)。
681
698
 
682
699
  **成本受控 Workflow SDK(FEATURE_259,v0.7.67)**:SDK 调用方用 run-scoped `modelTiers` 与 `workflow.maxConcurrency` 配置路由和并发,workflow 作者只表达 `fast` / `balanced` / `deep` 语义意图。terminal workflow event 回显 tier/source/fallback/usage/duration,持久化 `run.json.efficiencyReport` 给出 token coverage、role/tier 启动数、packet-read 拓扑、review wave 和 quality gate 结果。完整配置与遥测读取方式见 [SDK Embedder Guide §20](docs/SDK_EMBEDDER_GUIDE.md#20-cost-disciplined-workflow-routing-and-telemetry-feature_259-v0767)。
683
700
 
684
- **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。
701
+ **Inline workflow authoring(FEATURE_246,v0.7.58;F270 v0.7.72 更新)**:Worker 在明确表达 Workflow 意图时,可通过 model-callable 的 `run_workflow` 工具在会话内编写并运行工作流。F270 退役 AMAW 与复杂度驱动激活;AMA 保留显式 `/workflow`、named/SDK 和自然语言 Workflow 请求。Workflow Agent 统一运行在 Actor 控制面。详见 [docs/features/v0.7.58.md](docs/features/v0.7.58.md)[docs/features/v0.7.72.md](docs/features/v0.7.72.md) ADR-044/046/047/048/049/055
685
702
 
686
- **工作流激活分层(FEATURE_248 + FEATURE_249,v0.7.59)**:三种 agent 模式现在有一致的工作流姿态。**AMAW** 携带 mode-level `ORCHESTRATION DEFAULT` 常驻指令(对齐参考实现的 "ultracode" 姿态):实质性工作——多文件调查、设计决策、任何做错代价高的任务——默认编排多个交叉验证的 agent,并有 PLAN-TIME COMMITMENT 流程修正把 orchestrate-vs-solo 决策前置到第 0 轮。**AMA** 同样 host `run_workflow` 工具但没有常驻指令——当你用自然语言请求编排时才激活,绝不因复杂度独自触发。**SA** 保持单独作业。该指令通过 `amawOrchestrationAvailable` 关闭泄漏,因此 AMA SA prompt 保持逐字节一致。详见 [docs/features/v0.7.59.md](docs/features/v0.7.59.md)。
703
+ **历史工作流激活分层(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)
687
704
 
688
- **managed 工具路径的渐进披露(FEATURE_250,v0.7.60)**:deferred-tool 渐进披露机制——此前仅 SA path 拥有——现在也应用于 AMA/AMAW**managed** path。缓存冷启的 managed 轮次对 13 个 non-mcp 延迟工具(repo-intelligence + web/code + goal)携带一行 search hint 而非完整描述;每个工具的 `input_schema` 不变,因此仍可直接调用,完整描述按需通过 `tool_search` 拉取。`mcp_*` 保持常驻,`run_workflow` 不动。对用户透明;由两个 5-alias eval panel 验证(DEFER_SAFE 5/5,0% read/grep 回退)。详见 [docs/features/v0.7.60.md](docs/features/v0.7.60.md)。
705
+ **managed 工具路径的渐进披露(FEATURE_250,v0.7.60;F270 模式更新于 v0.7.72)**:deferred-tool 渐进披露机制应用于 AMA 的 managed path。缓存冷启轮次以一行 search hint 替代 13 个 non-mcp 延迟工具的完整描述;F270 退役原 AMAW 模式,但不改变这项披露行为。详见 [docs/features/v0.7.60.md](docs/features/v0.7.60.md)。
689
706
 
690
707
  **上下文高效的工具结果 + 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-in。FEATURE_252 的确定性 workflow 启动前合约 lint 保持不变。详见 [docs/features/v0.7.61.md](docs/features/v0.7.61.md) 与 [docs/ADR.md ADR-050](docs/ADR.md)。
691
708
 
@@ -800,7 +817,7 @@ KodaX 现在会把 Repo Intelligence 的本地缓存分成内置引擎 profile
800
817
  ## 文档
801
818
 
802
819
  - [README.md](README.md) - 英文版 README
803
- - [docs/SDK_EMBEDDER_GUIDE.md](docs/SDK_EMBEDDER_GUIDE.md) - SDK 宿主集成与 v0.7.70 公共 API 契约
820
+ - [docs/SDK_EMBEDDER_GUIDE.md](docs/SDK_EMBEDDER_GUIDE.md) - SDK 宿主集成、shared Runtime 与 v0.7.72 Auto Mode 契约
804
821
  - [docs/release.md](docs/release.md) - 单文件二进制构建与发布流程
805
822
  - [docs/PRD.md](docs/PRD.md) - 产品需求
806
823
  - [docs/ADR.md](docs/ADR.md) - 架构决策
@@ -0,0 +1,2 @@
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-VDGCGOQH.js";import"./chunk-SQODXBLX.js";import"./chunk-44QXPEEE.js";import"./chunk-GIK4SGAT.js";import"./chunk-ZJIMT5I3.js";import{sb as a,tb as b}from"./chunk-JSDLBXME.js";import"./chunk-E27LHEIP.js";import"./chunk-EDZ5KJFT.js";import"./chunk-23X6REO4.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{Da as a,Ea as b}from"./chunk-PKQOEDHJ.js";import"./chunk-WIBLZK4G.js";import"./chunk-2RI252RN.js";import"./chunk-VVE3UM4F.js";import"./chunk-IR5KIK7E.js";import"./chunk-MVARIMQV.js";import"./chunk-VDGCGOQH.js";import"./chunk-SQODXBLX.js";import"./chunk-44QXPEEE.js";import"./chunk-GIK4SGAT.js";import"./chunk-ZJIMT5I3.js";import"./chunk-JSDLBXME.js";import"./chunk-E27LHEIP.js";import"./chunk-EDZ5KJFT.js";import"./chunk-23X6REO4.js";import"./chunk-ONUPGMER.js";export{a as ArgumentCompleter,b as createArgumentCompleter};
@@ -1,2 +1,2 @@
1
1
  // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{f as e}from"./chunk-52JSZ77P.js";import{a as n}from"./chunk-ONUPGMER.js";import{readFile as i}from"fs/promises";var c={enabled:!0,triggerPercent:75};async function g(o){let t=e("config.json");try{let r=await a(t);if(r?.compaction)return{...c,...r.compaction}}catch{}return c}n(g,"loadCompactionConfig");async function a(o){try{let t=await i(o,"utf-8");return JSON.parse(t)}catch{return null}}n(a,"readConfigFile");export{g as a};
2
+ import{f as e}from"./chunk-E27LHEIP.js";import{a as n}from"./chunk-ONUPGMER.js";import{readFile as i}from"fs/promises";var c={enabled:!0,triggerPercent:75};async function g(o){let t=e("config.json");try{let r=await a(t);if(r?.compaction)return{...c,...r.compaction}}catch{}return c}n(g,"loadCompactionConfig");async function a(o){try{let t=await i(o,"utf-8");return JSON.parse(t)}catch{return null}}n(a,"readConfigFile");export{g as a};