@kodax-ai/kodax 0.7.97-alpha.3 → 0.7.97-alpha.5

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 (100) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +47 -28
  3. package/README_CN.md +28 -19
  4. package/config-templates/config.example.jsonc +0 -1
  5. package/dist/builtin/visual-review/SKILL.md +80 -0
  6. package/dist/chunks/agent-LWDHPWKV.js +2 -0
  7. package/dist/chunks/argument-completer-LMS266JQ.js +2 -0
  8. package/dist/chunks/{chunk-OYU3BRC2.js → chunk-2AM3FRQ7.js} +1 -1
  9. package/dist/chunks/{chunk-6UQU55ZY.js → chunk-2E3TJ7KO.js} +1 -1
  10. package/dist/chunks/{chunk-5MBERIKC.js → chunk-3XIY3OYT.js} +1 -1
  11. package/dist/chunks/{chunk-ZCVG76DC.js → chunk-5W2ZCXOG.js} +1 -1
  12. package/dist/chunks/{chunk-66EIFYTX.js → chunk-62V3CQH4.js} +136 -136
  13. package/dist/chunks/{chunk-UC336RNT.js → chunk-6ERRCDWZ.js} +1 -1
  14. package/dist/chunks/{chunk-INRXUD6O.js → chunk-7RLU6XIU.js} +1 -1
  15. package/dist/chunks/{chunk-GKL7MKUX.js → chunk-A5KR5LCP.js} +1 -1
  16. package/dist/chunks/{chunk-A2TOLAR6.js → chunk-CF4B36EZ.js} +3 -4
  17. package/dist/chunks/{chunk-SLB7XV2H.js → chunk-F7TCQL2L.js} +325 -331
  18. package/dist/chunks/chunk-FHWRUQE3.js +351 -0
  19. package/dist/chunks/chunk-ICCDQVLL.js +69 -0
  20. package/dist/chunks/chunk-IUTBOGEK.js +350 -0
  21. package/dist/chunks/{chunk-RQDYGACC.js → chunk-KDQREOAJ.js} +1 -1
  22. package/dist/chunks/chunk-PTESSP67.js +497 -0
  23. package/dist/chunks/{chunk-FIAGK2PJ.js → chunk-QDNDPIDD.js} +1 -1
  24. package/dist/chunks/chunk-STB66YFC.js +12 -0
  25. package/dist/chunks/{chunk-QHA33NDV.js → chunk-SYDTD36A.js} +1 -1
  26. package/dist/chunks/{chunk-ULASD2MC.js → chunk-TZ2NQZE2.js} +1 -1
  27. package/dist/chunks/{chunk-2GFHQXSQ.js → chunk-U34QKQNI.js} +1 -1
  28. package/dist/chunks/{chunk-U6PGP3J7.js → chunk-V26LAWJY.js} +1 -1
  29. package/dist/chunks/{chunk-OESZ6SMM.js → chunk-WTX6GRSV.js} +2 -2
  30. package/dist/chunks/chunk-WZWVU5LK.js +431 -0
  31. package/dist/chunks/chunk-XPH33F3A.js +394 -0
  32. package/dist/chunks/{chunk-TELWDWO7.js → chunk-YVBBU6K5.js} +1 -1
  33. package/dist/chunks/{client-RVYGDO5B.js → client-YND6BJUV.js} +1 -1
  34. package/dist/chunks/{compaction-config-Y7TZIEHY.js → compaction-config-6VJ7HZOV.js} +1 -1
  35. package/dist/chunks/{construction-bootstrap-SVI32SNN.js → construction-bootstrap-UCWFQ5OM.js} +1 -1
  36. package/dist/chunks/dist-THC5GMJ2.js +2 -0
  37. package/dist/chunks/{dist-PNUWH5UP.js → dist-ZLR4OTDD.js} +1 -1
  38. package/dist/chunks/host-BN6ZVWFJ.js +2 -0
  39. package/dist/chunks/readline-helpers-OR6WAS7M.js +2 -0
  40. package/dist/chunks/run-manager-FPX6KT6U.js +2 -0
  41. package/dist/chunks/tool-dispatch-PB5MOVLY.js +2 -0
  42. package/dist/chunks/utils-Z6ZXMX6X.js +2 -0
  43. package/dist/index.d.ts +12 -12
  44. package/dist/index.js +2 -2
  45. package/dist/kodax_bootstrap.js +2 -2
  46. package/dist/kodax_cli.js +1456 -1478
  47. package/dist/kodax_resume.js +27 -27
  48. package/dist/native/win32-x64/kodax-windows-sandbox.exe +0 -0
  49. package/dist/native/win32-x64/kodax-windows-text-transaction.node +0 -0
  50. package/dist/native/win32-x64/manifest.json +2 -2
  51. package/dist/sandbox-network-broker.js +28 -28
  52. package/dist/sdk-a2a.d.ts +7 -7
  53. package/dist/sdk-a2a.js +1 -1
  54. package/dist/sdk-agent.js +1 -1
  55. package/dist/sdk-client.d.ts +7 -5
  56. package/dist/sdk-client.js +1 -1
  57. package/dist/sdk-coding.d.ts +38 -414
  58. package/dist/sdk-coding.js +1 -1
  59. package/dist/sdk-experimental-memory.js +1 -1
  60. package/dist/sdk-llm.js +1 -1
  61. package/dist/sdk-mcp.js +1 -1
  62. package/dist/sdk-media.js +1 -1
  63. package/dist/sdk-repl.d.ts +13 -13
  64. package/dist/sdk-repl.js +1 -1
  65. package/dist/sdk-runtime.d.ts +13 -11
  66. package/dist/sdk-runtime.js +1 -1
  67. package/dist/sdk-sandbox.js +1 -1
  68. package/dist/sdk-session.d.ts +4 -4
  69. package/dist/sdk-session.js +1 -1
  70. package/dist/sdk-skills.js +1 -1
  71. package/dist/semantic-worker.js +39 -39
  72. package/dist/types-chunks/{bash-prefix-extractor.d-DGDUe9GE.d.ts → bash-prefix-extractor.d-CEy7z-Zn.d.ts} +23 -185
  73. package/dist/types-chunks/{client-contract-CLFoIF6e.d.ts → client-contract-C6EMeiD-.d.ts} +25 -34
  74. package/dist/types-chunks/{public-api.d-2Z-lKGae.d.ts → public-api.d-BIbLLBhl.d.ts} +2 -9
  75. package/dist/types-chunks/{review-packet.d-BvUTRcvS.d.ts → review-packet.d-Cili3QF2.d.ts} +1 -1
  76. package/dist/types-chunks/{run-manager.d-BT-uMJfl.d.ts → run-manager.d-MHxLmLqw.d.ts} +1 -1
  77. package/dist/types-chunks/{runtime-client-info-CQUGs6HW.d.ts → runtime-client-info-DkjsCCbS.d.ts} +1 -1
  78. package/dist/types-chunks/{sdk-session-DEup-bg5.d.ts → sdk-session-CPHF0o9h.d.ts} +1 -9
  79. package/dist/types-chunks/{trusted-repl-entry-BBtWnXHM.d.ts → trusted-repl-entry-w_5uQSZq.d.ts} +9 -5
  80. package/dist/types-chunks/{types.d-DnbwVOHk.d.ts → types.d--WO3A2u5.d.ts} +1 -25
  81. package/dist/types-chunks/{utils.d-CBhRmKC4.d.ts → utils.d-gX4cGt04.d.ts} +4 -15
  82. package/docs/CLIENT_CONTRACT.md +16 -3
  83. package/docs/SDK_MIGRATION.md +28 -1
  84. package/docs/SPACE_SDK_SEAMS.md +20 -2
  85. package/package.json +3 -3
  86. package/public_docs/README.md +5 -2
  87. package/public_docs/getting-started/overview.md +1 -1
  88. package/public_docs/sdk/embedder-guide.md +98 -44
  89. package/dist/chunks/agent-645TFOIP.js +0 -2
  90. package/dist/chunks/argument-completer-E2WXYASE.js +0 -2
  91. package/dist/chunks/chunk-BCHQN42D.js +0 -372
  92. package/dist/chunks/chunk-ES5NVJ5Q.js +0 -417
  93. package/dist/chunks/chunk-HCIPPFUP.js +0 -473
  94. package/dist/chunks/chunk-MVDUORC4.js +0 -355
  95. package/dist/chunks/chunk-N5QCWFPS.js +0 -498
  96. package/dist/chunks/dist-CTC24FIH.js +0 -2
  97. package/dist/chunks/host-52BFKSCW.js +0 -2
  98. package/dist/chunks/readline-helpers-CD7PBK5V.js +0 -2
  99. package/dist/chunks/run-manager-DRGBGQAN.js +0 -2
  100. package/dist/chunks/utils-5VLWSY6K.js +0 -2
package/CHANGELOG.md CHANGED
@@ -8,6 +8,102 @@ All notable changes to this project will be documented in this file.
8
8
 
9
9
  ---
10
10
 
11
+ ## [0.7.97-alpha.5] - 2026-10-13
12
+
13
+ Fifth alpha of the v0.7.97 line: FEATURE_301's unified Artifact SDK and
14
+ format backends ship — the `ArtifactExecutionPort` seam grows to nine
15
+ public operations with native PDF, exact PNG/JPEG/WebP/SVG, candidate DOCX
16
+ pagination, and local HTML/SMIL evidence over one execution port serving
17
+ independent Node and shared-Host clients — and busy daemon preflights are
18
+ bounded before redundant full state scans (Issue 367). Every v0.7.96
19
+ stable and v0.7.97-alpha.1 through alpha.4 contract is retained. npm
20
+ publication remains a manual maintainer action.
21
+
22
+ ### Added
23
+
24
+ - Unified optional Artifact SDK (developed in `27d08788`): public
25
+ `prepare` and `readEvidence`, native PDF, exact PNG and JPEG/WebP/SVG evidence,
26
+ candidate DOCX pagination, local HTML loaded-view capture and SVG SMIL samples.
27
+ The same execution port serves independent Node and existing shared-Host clients.
28
+
29
+ ### Changed
30
+
31
+ - Artifact contracts use content formats, structured capabilities, file/surface
32
+ provenance, kind-matched capture locators, PNG dimensions and paginated layout.
33
+ These pre-release changes have no legacy aliases. Shared-Host image bytes use
34
+ existing attachment reads; core startup does not load optional renderers.
35
+ - SDK, Client/Space integration, migration, architecture and feature documents
36
+ distinguish source support from released packages and evidence readiness from
37
+ visual approval. See [support and limits](docs/ARTIFACT_SDK.md).
38
+
39
+ ### Fixed
40
+
41
+ - Mixed-size PDF viewport cropping, DOCX rendering without optional settings,
42
+ cross-bundle admitted fixed-argv authority and Host tool image attachment delivery.
43
+ - Daemon preflight rejects known in-flight mutations before redundant full state
44
+ scans, and reports the actual method/count using the existing shutdown fence
45
+ (Issue 367). A mutation beginning during a read also stops further scans;
46
+ busy work is never treated as safe to stop.
47
+
48
+ Validation: 16,589 tests passed, with package/bundle/native/type checks recorded
49
+ in the [regression guide](docs/test-guides/FEATURE_301_v0.7.97_TEST_GUIDE.md).
50
+ Natural-task GLM/DeepSeek smoke observed automatic image review, but full
51
+ repair/re-review/delivery has not passed all checks. Native DOCX fidelity and
52
+ model-facing schema gaps remain open; see [E2E evidence](docs/research/automatic-visual-review-e2e-2026-10-13.md).
53
+
54
+ ---
55
+
56
+ ## [0.7.97-alpha.4] - 2026-10-12
57
+
58
+ Fourth alpha of the v0.7.97 line: FEATURE_301 adds the independent
59
+ `@kodax-ai/artifacts` package — PPTX authoring, bounded editing, and
60
+ current-file visual evidence through lightweight rendering (optional
61
+ LibreOffice/PDF conversion) — with an
62
+ optional managed KodaX adapter, and retires the out-of-band Sidecar
63
+ Verifier in favor of evidence-based in-run result review with the
64
+ `visual-review` builtin skill. Every v0.7.96 stable and
65
+ v0.7.97-alpha.1/alpha.2/alpha.3 contract is retained. npm publication
66
+ remains a manual maintainer action.
67
+
68
+ ### Added
69
+
70
+ - `@kodax-ai/artifacts`: independent optional package for PPTX authoring,
71
+ bounded editing, and current-file visual evidence; its optional KodaX
72
+ bridge uses managed permissions, sandbox, and cancellation (FEATURE_301).
73
+ - Managed PPT review loop: native Office and autonomous non-Office PPT
74
+ validation with rendered-page evidence and bounded edit cycles.
75
+ - `visual-review` builtin skill covering static images/charts, paginated
76
+ documents/slides/sheets, interactive web/app/terminal/canvas/3D surfaces,
77
+ and temporal video/animation results; missing capabilities and unchecked
78
+ scope are reported honestly as unverified.
79
+
80
+ ### Changed
81
+
82
+ - Main-agent result verification replaces the Sidecar Verifier (ADR
83
+ 2026-10-11): the main agent verifies each requested requirement with
84
+ actual tool and rendered evidence before delivery, and an ordinary
85
+ read-only child reviewer may contribute findings within the same Run.
86
+ Retired: verifier execution, config, live callbacks, the synthetic
87
+ revision producer, `/verifier-log`, and `KODAX_VERIFIER_*` diagnostics;
88
+ persisted verifier history readers remain. Stall sidecar, Auto
89
+ permission reviewer, Bash/sandbox policy, Actor waits, and Stop hooks
90
+ are unchanged.
91
+ - Bundled skill discovery resolves the packaged `builtin` layout, and
92
+ provider capability profiles carry the capability snapshot into managed
93
+ task admission; the release audit now walks the runtime tarball
94
+ (`audit-runtime-tarball.mjs`).
95
+ - Unified client startup progress: `connectKodaXClient` /
96
+ `ensureKodaXClient` accept an `onStartupProgress` observer over the
97
+ pure-data `ClientStartupProgress` contract (checking / starting /
98
+ upgrading / connecting / ready, with waiting reasons
99
+ `connected_clients`, `host_starting`, `host_stopping`). Observation is
100
+ local, never awaited, and observer failures never change the startup
101
+ result; the CLI drives its loading animation from the same notifications
102
+ and stays responsive, and the REPL gains an optional `onBeforeRender` to
103
+ clear the loading display before restoring prompts.
104
+
105
+ ---
106
+
11
107
  ## [0.7.97-alpha.3] - 2026-10-10
12
108
 
13
109
  Third alpha of the v0.7.97 line: trusted Main can now bound Product
package/README.md CHANGED
@@ -111,7 +111,7 @@ does not break ordinary permission handling.
111
111
  <tr>
112
112
  <td align="center" valign="top">
113
113
  <h3>🤖 Multi-agent by default</h3>
114
- <sub>V2 Worker single-loop + Sidecar Verifier + async children</sub>
114
+ <sub>V2 Worker single-loop + evidence-based result review + async children</sub>
115
115
  <br><br>
116
116
  <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.
117
117
  </td>
@@ -346,7 +346,6 @@ receive `prompt_cache_key`. The default is `false` because some strict
346
346
  compatible gateways reject unknown request fields. Do not enable it solely
347
347
  because an endpoint claims protocol compatibility.
348
348
 
349
- Sidecar verifier judge calls use provider-level forced tool choice when supported. If a compatible endpoint rejects the `tool_choice` parameter, KodaX retries that verifier request once without forced tool choice and still fails open rather than blocking the main Worker.
350
349
 
351
350
  #### Opting a custom provider into image / vision input (FEATURE_134 v0.7.40)
352
351
 
@@ -448,6 +447,11 @@ connector does not provide browser HTTP/WebSocket transport. The retained
448
447
  Worker-hosted embedded Runtime is removed. The following structured-failure
449
448
  reference is scoped to that low-level API, not fields promised by Product Client.
450
449
 
450
+ Both product entries accept optional `onStartupProgress` with the shared
451
+ `ClientStartupProgress` type. Launcher `ready` means the Client is usable;
452
+ Session loading and UI rendering have separate boundaries. See the
453
+ [startup progress example](public_docs/sdk/embedder-guide.md#show-local-startup-progress).
454
+
451
455
  ### Structured Runtime failures
452
456
 
453
457
  Since v0.7.96, when Runtime has a structured failure fact, failed/cancelled runs
@@ -769,6 +773,36 @@ provider's model, REPL `/compact` clears the UI only after a durable save, and
769
773
  successful reports carry bounded `summaryRequests` plus `commitMs` per
770
774
  physical summary call.
771
775
 
776
+ **v0.7.97-alpha.4 release:** Adds the independent `@kodax-ai/artifacts`
777
+ package — PPTX authoring, bounded editing, and current-file visual
778
+ evidence through lightweight rendering (optional LibreOffice/PDF conversion) — with an optional managed
779
+ KodaX adapter (FEATURE_301), and retires the out-of-band Sidecar
780
+ Verifier: the main agent now verifies requested requirements with actual
781
+ tool and rendered evidence before delivery, guided by the `visual-review`
782
+ builtin skill across static, paginated, interactive, and temporal
783
+ surfaces, with read-only child reviewers inside the same Run and
784
+ unverified scope reported honestly. Client and CLI startup share one
785
+ `onStartupProgress` contract, keeping the CLI responsive while the Host
786
+ starts, upgrades, or waits. See
787
+ [docs/SPACE_SDK_SEAMS.md](docs/SPACE_SDK_SEAMS.md) and the
788
+ [v0.7.97-alpha.4 release notes](docs/release.md#v0797-alpha4-release-preparation).
789
+ Every v0.7.96 stable and v0.7.97-alpha.1/alpha.2/alpha.3 contract is
790
+ retained.
791
+
792
+ **v0.7.97-alpha.5 release:** Ships FEATURE_301's unified Artifact SDK and
793
+ format backends — nine SDK operations (`prepare`, `readEvidence`,
794
+ capabilities/diagnostics), native PDF, exact PNG/JPEG/WebP/SVG, candidate
795
+ DOCX pagination and local HTML/SMIL capture through the same
796
+ Node/shared-Host contract — plus a bounded busy daemon preflight (Issue
797
+ 367) that stops redundant scans when a mutation begins mid-read. Rendering
798
+ works headlessly; automatic review needs available tools and an
799
+ image-capable provider, without a slash command. Native DOCX fidelity and
800
+ full natural-task repair/re-review/delivery remain unverified. See
801
+ [SDK support, setup and migration](docs/ARTIFACT_SDK.md) and the
802
+ [v0.7.97-alpha.5 release notes](docs/release.md#v0797-alpha5-release-preparation).
803
+ Every v0.7.96 stable and v0.7.97-alpha.1 through alpha.4 contract is
804
+ retained.
805
+
772
806
  **v0.7.97-alpha.3 release:** Lets trusted Main bound Product Workflows.
773
807
  `authorizeExecution` may return a `workflowHostPolicy` (`maxAgents`,
774
808
  `tokenBudget`) without registering credential or hostTools leases, and the
@@ -1338,11 +1372,12 @@ kodax --repo-intelligence full --repo-intelligence-trace
1338
1372
 
1339
1373
  ## Architecture
1340
1374
 
1341
- KodaX uses a **monorepo architecture** with npm workspaces. Source layout currently has 4 workspace packages; the current source packages them as a single bundled npm package `@kodax-ai/kodax` with 13 SDK subpath exports (`/agent`, `/llm`, `/coding`, `/media`, `/repl`, `/skills`, `/mcp`, `/session`, `/client`, `/runtime`, `/sandbox`, `/a2a`, `/experimental-memory`; ADR-024 + ADR-032 + ADR-038, with ADR-036 consolidation):
1375
+ KodaX uses a **monorepo architecture** with npm workspaces. Four core packages ship in `@kodax-ai/kodax` with 13 SDK subpath exports (`/agent`, `/llm`, `/coding`, `/media`, `/repl`, `/skills`, `/mcp`, `/session`, `/client`, `/runtime`, `/sandbox`, `/a2a`, `/experimental-memory`; ADR-024 + ADR-032 + ADR-038, with ADR-036 consolidation). The independent optional `@kodax-ai/artifacts` package adds PPTX authoring/limited edits, PDF/image/SVG evidence, candidate DOCX preview, local HTML/SMIL capture, preparation and binary evidence reading. Core startup does not load renderers; the KodaX bridge uses managed permissions, sandbox and cancellation. [SDK support and limits](docs/ARTIFACT_SDK.md).
1342
1376
 
1343
1377
  ```
1344
1378
  KodaX/
1345
- ├── packages/ # 4 workspace packages (FEATURE_194 v0.7.43)
1379
+ ├── packages/ # 4 core packages + optional artifacts
1380
+ │ ├── artifacts/ # Independent Artifact SDK + optional managed KodaX adapter
1346
1381
  │ ├── llm/ # @kodax-ai/llm - LLM abstraction (16 built-in provider aliases)
1347
1382
  │ │ └── providers/ # Anthropic, OpenAI, DeepSeek, Kimi, MiMo, MiniMax, Zhipu, Ark, …
1348
1383
  │ │
@@ -1583,7 +1618,7 @@ per-command `denyRead`, which the Windows `WRITE_RESTRICTED` backend rejects as
1583
1618
  - **Modular Architecture** - Use as CLI, as a library, or as a Node-free single binary
1584
1619
  - **16 Built-in Provider Aliases** - Anthropic, OpenAI, DeepSeek, Kimi, Kimi Code, Qwen, Qwen Token Plan, Zhipu, Zhipu Coding, Zai Coding, MiniMax Coding, MiMo Coding, MiMo, Ark Coding, Gemini CLI, Codex CLI - plus user-defined OpenAI/Anthropic-compatible providers
1585
1620
  - **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
1586
- - **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=...)`.
1621
+ - **V2 Worker single-loop + result review (default)** — The main agent verifies actual results and may use ordinary read-only child Actors for independent review.
1587
1622
  - **Reasoning Effort** - Effort-first control (`off/auto/low/medium/high` plus model-supported extras) across providers
1588
1623
  - **Streaming Output** - Real-time response display
1589
1624
  - **Session Management** - JSONL format with branchable session lineage tree
@@ -1930,24 +1965,9 @@ Related variables: `KODAX_MAX_TOKENS` (global fallback when no provider/model ca
1930
1965
 
1931
1966
  > **Retired in v0.7.42**: `KODAX_RST_PRONE_PROVIDERS` and `KODAX_WRITE_TURN_MAX_TOKENS` (the v0.7.28 P2b write-turn cap mechanism) are no longer recognized. The 2026-04 bench measured RST as time-based (zhipu-coding 308s server kill window), not payload-size-based, so the cap was retired in favor of the per-provider `streamMaxDurationMs` watchdog + non-streaming fallback chain (configured in `registry.ts`). Existing env exports become silent no-ops; remove them from shell profiles when convenient.
1932
1967
 
1933
- #### Sidecar verifier diagnostics
1934
-
1935
- Use these when diagnosing Worker text-only completion stalls or custom provider verifier behavior:
1936
-
1937
- ```bash
1938
- export KODAX_VERIFIER_LOG=1
1939
- export KODAX_VERIFIER_PROVIDER=anthropic
1940
- export KODAX_VERIFIER_MODEL=claude-haiku-4-5-20251001
1941
- ```
1942
-
1943
- - `KODAX_VERIFIER_LOG=1` shows verifier gate/elapsed/trace information and is equivalent to `"verifierLog": true` in `~/.kodax/config.json`.
1944
- - `KODAX_VERIFIER_PROVIDER` + `KODAX_VERIFIER_MODEL` route the verifier to a separate provider/model instead of inheriting the main Worker model. Set both together.
1945
- - `KODAX_VERIFIER_ALWAYS=1` forces the verifier to fire on every text-only completion for debugging/regression sweeps.
1968
+ #### Result verification
1946
1969
 
1947
- SDK/headless hosts can observe actionable Sidecar Verifier messages via
1948
- `KodaXEvents.onSidecarMessage`; JSONL output emits the same payload as
1949
- `sidecar.message`. Only `revise` and `blocked` verdicts are surfaced; `accept`
1950
- stays silent.
1970
+ The main agent verifies each requested requirement with actual tool and rendered evidence before delivery. The built-in `visual-review` skill covers static images/charts, paginated documents/slides/sheets, interactive web/app/terminal/canvas/3D surfaces, and temporal video/animation results. Missing capabilities and unchecked scope are reported as unverified. An ordinary read-only child reviewer may contribute findings within the same Run; the main agent owns repairs and the final answer.
1951
1971
 
1952
1972
  ## Advanced Library Usage
1953
1973
 
@@ -1964,7 +1984,6 @@ const events: KodaXEvents = {
1964
1984
  onTextDelta: (text) => process.stdout.write(text),
1965
1985
  onThinkingDelta: (text) => console.log(`Thinking delta: ${text.length} chars`),
1966
1986
  onToolResult: (result) => console.log(`Tool ${result.name}: ${result.content.slice(0, 100)}`),
1967
- onSidecarMessage: (event) => console.log(`[sidecar:${event.verdict}] ${event.content}`),
1968
1987
  onComplete: () => console.log('\nDone!'),
1969
1988
  onError: (e) => console.error(e.message),
1970
1989
  };
@@ -2041,8 +2060,9 @@ await runKodaX({
2041
2060
  This development tree exposes 13 SDK subpaths plus the root. Shared product
2042
2061
  applications use `@kodax-ai/kodax/client`; independent libraries and trusted Host
2043
2062
  APIs remain available through the other subpaths. See the [Client contract](docs/CLIENT_CONTRACT.md)
2044
- and [SDK migration guide](docs/SDK_MIGRATION.md). The package version is still
2045
- `0.7.96-rc.11`; npm publication is separate from the `v0.7.97` design target.
2063
+ and [SDK migration guide](docs/SDK_MIGRATION.md). This documentation was checked
2064
+ against package version `0.7.97-alpha.5`; npm publication is separate from
2065
+ the current development-tree contract.
2046
2066
 
2047
2067
  ```bash
2048
2068
  npm install @kodax-ai/kodax
@@ -2156,7 +2176,7 @@ cannot elevate a `disable-model-invocation` Skill.
2156
2176
 
2157
2177
  ### `@kodax-ai/kodax/coding` — Coding Agent
2158
2178
 
2159
- 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.
2179
+ 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 + evidence-based result review (out-of-band Stop-hook) + agent loop + auto-continue + session management.
2160
2180
 
2161
2181
  ```typescript
2162
2182
  import { runKodaX, KodaXClient, KODAX_TOOLS } from '@kodax-ai/kodax/coding';
@@ -2178,7 +2198,7 @@ await client.send('Create a new file');
2178
2198
  await client.send('Add a function to it'); // Has context from previous message
2179
2199
  ```
2180
2200
 
2181
- **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.
2201
+ **Key Features**: 50+ built-in tools (see [Tools](#tools)) · V2 Worker single-loop + evidence-based result review (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.
2182
2202
 
2183
2203
  ### `@kodax-ai/kodax/repl` — Interactive Terminal UI
2184
2204
 
@@ -2334,7 +2354,6 @@ KodaX ships 50+ built-in tools, grouped below. They are registered as a single f
2334
2354
  | `ask_user_question` | Single/multi-select or free-text prompt back to the user |
2335
2355
  | `exit_plan_mode` | Present a finalized plan only when the active REPL/host supplied an approval callback |
2336
2356
  | `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) |
2337
- | `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). |
2338
2357
 
2339
2358
  ---
2340
2359
 
package/README_CN.md CHANGED
@@ -98,6 +98,8 @@ try {
98
98
 
99
99
  `connectKodaXClient` 只连接已有兼容 Host;`ensureKodaXClient` 通过统一启动器启动或正常更新空闲 Host。Node 连接器不提供浏览器 HTTP/WebSocket transport。
100
100
 
101
+ 两个产品入口均支持可选 `onStartupProgress` 和共享 `ClientStartupProgress` 类型。启动 `ready` 表示 Client 接口可用;Session 加载与 UI 渲染仍有独立完成边界。详见[启动进度示例](public_docs/sdk/embedder-guide.md#show-local-startup-progress)。
102
+
101
103
  底层 `/runtime` 仍支持显式 inline embedded 与 daemon,供受信任宿主处理凭据桥、Host Tools、启动和诊断;Worker-hosted embedded、通用 operation receipt/journal 已移除。不能在产品连接失败时退回私有 Runtime。下方结构化 Runtime 错误说明仅属于底层接口,不能假定 Product Client 暴露相同字段。
102
104
 
103
105
  ### 结构化且凭据安全的 Runtime 错误
@@ -301,6 +303,28 @@ SDK 系统代码契约更新,但没有放宽 shell/sandbox 的 fail-closed 边
301
303
  `handleRuntimePermissionRequest()` 管理 SDK 权限 UI,并在 prepared Session 尾部遇到
302
304
  `data_changed` 时通过权威 delta 合并恢复;后台持久化失败会显示为诊断,不再静默丢失。
303
305
 
306
+ **v0.7.97-alpha.4 发布**:新增独立的 `@kodax-ai/artifacts` 包——PPTX 创作、
307
+ 有界编辑与当前文件视觉证据(轻量渲染,可选 LibreOffice/PDF 转换),并带可选的受管 KodaX
308
+ 适配器(FEATURE_301);同时退役旁路 Sidecar Verifier:主 Agent 在交付前用
309
+ 真实工具与渲染证据核验每条需求,由内置 `visual-review` 技能覆盖静态、分页、
310
+ 交互与时间性表面,允许只读子评审者在同一 Run 内参与,未核验范围如实报告。
311
+ 客户端与 CLI 启动共享同一 `onStartupProgress` 契约,在 Host 启动、升级或
312
+ 等待期间保持 CLI 可响应。
313
+ 详见 [docs/SPACE_SDK_SEAMS.md](docs/SPACE_SDK_SEAMS.md) 与
314
+ [v0.7.97-alpha.4 发布清单](docs/release.md#v0797-alpha4-release-preparation)。
315
+ 所有 v0.7.96 稳定与 v0.7.97-alpha.1/alpha.2/alpha.3 契约全部保留。
316
+
317
+ **v0.7.97-alpha.5 发布**:交付 FEATURE_301 统一 Artifact SDK 与格式后端——
318
+ 九项 SDK 操作(`prepare`、`readEvidence`、能力/诊断)、原生 PDF、精确
319
+ PNG/JPEG/WebP/SVG、DOCX 候选分页及本地 HTML/SMIL 捕获,独立 Node 与共享
320
+ Host 使用同一契约;同时为繁忙 daemon 预检加上边界(Issue 367),读取途中
321
+ 出现变更即停止冗余扫描。文件渲染可无界面运行;自动审查需要可用取证工具及
322
+ 支持图片输入的模型,不要求 slash。DOCX 原生保真和自然任务的完整
323
+ 修复/复查/交付仍未全部验证。
324
+ 详见 [SDK 支持、接入与迁移](docs/ARTIFACT_SDK.md) 与
325
+ [v0.7.97-alpha.5 发布清单](docs/release.md#v0797-alpha5-release-preparation)。
326
+ 所有 v0.7.96 稳定与 v0.7.97-alpha.1 至 alpha.4 契约全部保留。
327
+
304
328
  **v0.7.97-alpha.3 发布**:让可信 Main 为产品 Workflow 设定上限。
305
329
  `authorizeExecution` 可以只返回 `workflowHostPolicy`(`maxAgents`、
306
330
  `tokenBudget`),无需注册 credential 或 hostTools lease;宿主能力升级为
@@ -744,7 +768,7 @@ Reviewer 首次 90 秒,只有 timeout/provider/无效输出会再试一次 180
744
768
  <tr>
745
769
  <td align="center" valign="top">
746
770
  <h3>🤖 默认多 agent</h3>
747
- <sub>V2 Worker 单循环 + Sidecar Verifier + 异步子 agent</sub>
771
+ <sub>V2 Worker 单循环 + 实际结果评审 + 异步子 agent</sub>
748
772
  <br><br>
749
773
  <code>spawn_agent</code>、<code>send_message</code>、<code>followup_task</code>、<code>interrupt_agent</code>,多实例自动协调(content-hash safety net)。
750
774
  </td>
@@ -1032,21 +1056,7 @@ key 写入 `metadata.user_id`,OpenAI-compatible 请求写入 `prompt_cache_key
1032
1056
  默认值为 `false`,因为部分严格兼容网关会拒绝未知请求字段;不要只因端点宣称协议
1033
1057
  兼容就开启。
1034
1058
 
1035
- Sidecar verifier 的结构化裁决请求会优先使用 provider 级 `tool_choice` 强制工具调用;如果某个兼容端点明确拒绝 `tool_choice` 参数,KodaX 会对该 verifier 请求自动重试一次“不强制但仍带 tools”的兼容模式,并保持 fail-open,不会阻塞主 Worker。
1036
-
1037
- 调试 Worker 结束后的 verifier 行为时可设置:
1038
-
1039
- ```bash
1040
- export KODAX_VERIFIER_LOG=1
1041
- export KODAX_VERIFIER_PROVIDER=anthropic
1042
- export KODAX_VERIFIER_MODEL=claude-haiku-4-5-20251001
1043
- ```
1044
-
1045
- `KODAX_VERIFIER_LOG=1` 等价于在 `~/.kodax/config.json` 写 `"verifierLog": true`,会显示 verifier gate、elapsedMs 和 trace;`KODAX_VERIFIER_PROVIDER` / `KODAX_VERIFIER_MODEL` 需要成对设置,用独立模型执行 verifier;`KODAX_VERIFIER_ALWAYS=1` 仅建议调试和回归测试时使用。
1046
-
1047
- SDK / headless 宿主可以通过 `KodaXEvents.onSidecarMessage` 观察 Sidecar
1048
- Verifier 的 `revise` / `blocked` 可执行消息;JSONL 输出使用同形
1049
- `sidecar.message` 事件。`accept` 仍保持静默。
1059
+ 结果由主 Agent 按需求逐项验证。内置 `visual-review` 技能覆盖图像/图表、文档/幻灯片/表格、Web/应用/终端/Canvas/3D、视频/动画,检查真实渲染证据;缺少能力或未覆盖部分明确标为未验证。必要时使用当前 Run 内普通只读子 Agent 做独立评审,主 Agent 负责修复和最终交付。
1050
1060
 
1051
1061
  #### 给自定义 provider 开图片 / vision 输入(FEATURE_134 v0.7.40)
1052
1062
 
@@ -1227,7 +1237,6 @@ KodaX 有 50+ 个内置工具,按类别分组如下(实际暴露给 LLM 是
1227
1237
  | `agent_output` | 读取有权限的 Actor/Turn 有界持久输出。 |
1228
1238
  | `ask_user_question` | 向用户发起单选 / 多选 / 自由文本提问 |
1229
1239
  | `exit_plan_mode` | 仅在当前 REPL/宿主提供审批回调时提交最终方案 |
1230
- | `emit_managed_protocol` | managed-task 协议侧信道(verdict role payload)。v0.7.42 FEATURE_184 起默认走 V2 Worker 单循环 + Sidecar Verifier;v0.7.43 FEATURE_193 退役 V1 chain。 |
1231
1240
 
1232
1241
  ## Repo Intelligence(内置 full/light 引擎)
1233
1242
 
@@ -1242,7 +1251,7 @@ kodax --repo-intelligence full --repo-intelligence-trace
1242
1251
 
1243
1252
  ## 仓库结构
1244
1253
 
1245
- KodaX 是基于 npm workspaces 的 TypeScript monorepo,**源码层 4 个 workspace 包**(FEATURE_194 v0.7.43 包合并 — 9 → 4,ADR-036),npm 上以单 bundle 包 `@kodax-ai/kodax` 发布 + 13 个 SDK subpath exports(`/agent`、`/llm`、`/coding`、`/media`、`/repl`、`/skills`、`/mcp`、`/session`、`/client`、`/runtime`、`/sandbox`、`/a2a`、`/experimental-memory`;ADR-024 + ADR-032 + ADR-038)。核心包:
1254
+ KodaX 是基于 npm workspaces 的 TypeScript monorepo,**4 个核心 workspace 包与独立可选 Artifact SDK**(FEATURE_194 v0.7.43 包合并 — 9 → 4,ADR-036),npm 上以单 bundle 包 `@kodax-ai/kodax` 发布 + 13 个 SDK subpath exports(`/agent`、`/llm`、`/coding`、`/media`、`/repl`、`/skills`、`/mcp`、`/session`、`/client`、`/runtime`、`/sandbox`、`/a2a`、`/experimental-memory`;ADR-024 + ADR-032 + ADR-038)。核心包:
1246
1255
 
1247
1256
  | Workspace 包 | 作用 | 主要依赖 |
1248
1257
  |----|------|---------|
@@ -1257,7 +1266,7 @@ KodaX 是基于 npm workspaces 的 TypeScript monorepo,**源码层 4 个 works
1257
1266
 
1258
1267
  KodaX 有两层结构,SDK 用户需要分开理解:
1259
1268
 
1260
- - **源码层**:上面 4 个 workspace 包(开发者读代码时看到的物理结构)。
1269
+ - **源码层**:4 个核心 workspace 包,另有独立可选 `@kodax-ai/artifacts`:PPTX 创作/限定编辑,PDF/图片/SVG 取证、DOCX 轻量预览、本地网页与 SMIL 捕获,公共准备和真实图片读取。核心启动不加载渲染依赖;桥接沿用受管权限、沙箱和取消。[SDK 支持与限制](docs/ARTIFACT_SDK.md)。
1261
1270
  - **当前源码打包导出**(不表示已发布到 npm):单个 bundled 包 `@kodax-ai/kodax`,对外暴露 13 个 SDK subpath(SDK 消费者 `import` 时看到的接口)。subpath 分两种角色:
1262
1271
  - **完整包 subpath**(`/agent`、`/llm`、`/coding`、`/repl`)—— 每个 1:1 对应一个源码包,暴露完整公开 API。
1263
1272
  - **集成与窄子集 subpath**(`/media`、`/skills`、`/mcp`、`/session`、`/client`、`/runtime`、`/sandbox`、`/a2a`、`/experimental-memory`)—— 聚焦能力或宿主集成边界;`/experimental-memory` 明确为 opt-in 不稳定接口。
@@ -82,7 +82,6 @@
82
82
 
83
83
  // Runtime/provider diagnostics and timeouts.
84
84
  // "streamIdleTimeoutMs": 120000,
85
- // "verifierLog": false,
86
85
  // "stallLog": false,
87
86
 
88
87
  // Ordered provider fallback for child tasks and optional model tiers used by
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: visual-review
3
+ description: Verify visible results when creating, changing or reviewing images, diagrams, charts, documents, spreadsheets, websites, application or terminal interfaces, canvas/3D scenes, videos or animations. Use actual rendered evidence and relevant states; source inspection alone does not establish visual correctness. Not needed for work without a visual acceptance requirement.
4
+ user-invocable: true
5
+ argument-hint: "[artifact, surface, or requested visual result]"
6
+ compatibility: Uses the current session's image input and available rendering, capture or frame extraction tools. Missing capabilities are reported explicitly.
7
+ ---
8
+
9
+ # Visual review
10
+
11
+ Use the same workflow for creation, modification, and review. The user's
12
+ requirements determine the scope, not the file extension or change size.
13
+ Respect review-only requests: report findings without modifying the subject.
14
+
15
+ ## Obtain evidence
16
+
17
+ Identify the current result and the visual requirements to check. Discover
18
+ available session tools and relevant format skills before choosing a renderer
19
+ or capture method. Use the existing permission, sandbox, working-directory,
20
+ tool and provider boundaries. Do not enable broader access, install software,
21
+ or call an external model just to make a check appear successful.
22
+
23
+ - **Static** images, icons, posters, diagrams, maps, plots and charts: inspect
24
+ the actual final image. Render SVG or drawing code to pixels; use a full
25
+ view and detailed crops when necessary. Include the intended background for
26
+ transparent assets. Compare reference images when fidelity was requested.
27
+ - **Paginated** documents, slides, PDFs, reports and spreadsheets: render the
28
+ actual deliverable. Track page/slide/sheet/range, font and page size. Inspect
29
+ pagination, overflow, clipping, legibility and consistency. A PDF text
30
+ extraction or Office file listing does not replace rendered page evidence.
31
+ - **Interactive** web, desktop, mobile, terminal, canvas and 3D surfaces:
32
+ capture the actual running result at the relevant viewport, terminal size,
33
+ state or camera. Perform requested interactions and inspect the resulting
34
+ states; use DOM, accessibility tree, terminal state or event evidence with
35
+ screenshots. Include relevant loading/error states and responsive sizes.
36
+ A static picture does not prove interaction or invisible 3D geometry.
37
+ - **Temporal** video, GIF, animation, transitions and changing visualizations:
38
+ decode or capture the final output with timestamps/frame numbers. Inspect
39
+ the required start/end states, motion, transitions and captions, using
40
+ consecutive frames where continuity matters. A GIF read may expose only its
41
+ first frame. A thumbnail or sparse sampling does not prove the whole clip.
42
+
43
+ Use the available image-reading tool to deliver actual image content to the
44
+ model. A saved screenshot path, UI preview, successful render exit code or
45
+ tool-call receipt does not mean the model received or inspected the image.
46
+ If image input, rendering or capture is unavailable, identify the affected
47
+ requirement as **unverified** and state the reason. Continue other useful work.
48
+
49
+ ## Check and repair
50
+
51
+ Check against the brief: missing or wrong content, illegible text, unintended
52
+ cropping/distortion, overlaps, overflow, poor contrast and requested visual
53
+ fidelity. Cite a concrete page, region, state, camera or timestamp with each
54
+ finding. Do not invent pixels, constraints or aesthetic preferences.
55
+
56
+ Visual evidence supplements content and behavior checks. Verify chart source
57
+ values and spreadsheet calculations separately; use functional checks for
58
+ backend behavior and audio/timing checks for sound or synchronization.
59
+
60
+ Self-review in single-agent mode. When an independent view is useful and
61
+ collaboration is available, the main agent captures evidence and spawns an
62
+ ordinary read-only child within the current task. Give it the brief, current
63
+ artifact identity, evidence references and exact scope, with fresh history.
64
+ It reports findings and gaps; the main agent owns repairs and final delivery.
65
+ Do not create independent background work or repeat the same full review.
66
+
67
+ After a repair, obtain new evidence for the affected scope. Associate findings
68
+ with the artifact version and capture settings actually inspected; an old
69
+ screenshot cannot certify a changed result. Use existing task/actor results
70
+ and artifact metadata, not a separate verification database or completion API.
71
+
72
+ ## Report honestly
73
+
74
+ Record the checked requirements, current artifact/version, evidence references,
75
+ pages/regions/states/viewports/cameras/time ranges inspected, concrete findings
76
+ and unverified scope. Distinguish **passed**, **issues** and **unverified** for
77
+ each requirement. State sampling limits. Missing evidence never means passed.
78
+ Respect current cancellation and budgets; do not restart an interrupted action
79
+ or repeatedly spawn reviewers without new evidence. Final delivery follows
80
+ the required checks and repairs; lifecycle completion is not a quality verdict.
@@ -0,0 +1,2 @@
1
+ // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
+ import{Aa as e,Ba as f,Ra as g,Ta as h,mb as i,nb as j,wb as k,za as d}from"./chunk-XPH33F3A.js";import{a as c}from"./chunk-STB66YFC.js";import"./chunk-V26LAWJY.js";import"./chunk-ICCDQVLL.js";import"./chunk-IUTBOGEK.js";import"./chunk-6ERRCDWZ.js";import"./chunk-3XIY3OYT.js";import{Rb as a,Sb as b}from"./chunk-62V3CQH4.js";import"./chunk-YVBBU6K5.js";import"./chunk-2AM3FRQ7.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,k as runKodaX,j as saveRequiredSessionSnapshot,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{$a as a,ab as b}from"./chunk-F7TCQL2L.js";import"./chunk-ZQYWDI4O.js";import"./chunk-CF4B36EZ.js";import"./chunk-2E3TJ7KO.js";import"./chunk-WZWVU5LK.js";import"./chunk-XPH33F3A.js";import"./chunk-STB66YFC.js";import"./chunk-QDNDPIDD.js";import"./chunk-V26LAWJY.js";import"./chunk-WTX6GRSV.js";import"./chunk-ICCDQVLL.js";import"./chunk-IUTBOGEK.js";import"./chunk-6ERRCDWZ.js";import"./chunk-3XIY3OYT.js";import"./chunk-62V3CQH4.js";import"./chunk-YVBBU6K5.js";import"./chunk-2AM3FRQ7.js";import"./chunk-ONUPGMER.js";export{a as ArgumentCompleter,b as createArgumentCompleter};