open-multi-agent-kit 0.78.0 → 0.78.1

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 (70) hide show
  1. package/CHANGELOG.md +44 -15
  2. package/MATURITY.md +2 -2
  3. package/README.md +56 -26
  4. package/ROADMAP.md +36 -28
  5. package/dist/cli/register-basic-commands.js +3 -2
  6. package/dist/cli/register-mcp-dag-cron-screenshot-commands.js +2 -0
  7. package/dist/cli/register-tool-commands.js +11 -0
  8. package/dist/cli/register-workflow-commands.js +1 -0
  9. package/dist/cli/registry/tooling.js +3 -2
  10. package/dist/commands/chat/core.js +5 -0
  11. package/dist/commands/chat/native-root-loop.js +60 -0
  12. package/dist/commands/dag-from-spec.d.ts +1 -0
  13. package/dist/commands/dag-from-spec.js +61 -1
  14. package/dist/commands/graph.d.ts +62 -0
  15. package/dist/commands/graph.js +182 -0
  16. package/dist/commands/merge.d.ts +1 -0
  17. package/dist/commands/merge.js +88 -0
  18. package/dist/commands/parallel/core.js +3 -3
  19. package/dist/commands/provider.js +5 -3
  20. package/dist/commands/star.js +6 -1
  21. package/dist/commands/summary.d.ts +4 -1
  22. package/dist/commands/summary.js +103 -1
  23. package/dist/commands/team.d.ts +1 -0
  24. package/dist/commands/team.js +38 -0
  25. package/dist/contracts/provider-health.d.ts +42 -0
  26. package/dist/contracts/provider-health.js +9 -0
  27. package/dist/goal/intent-frame.d.ts +24 -0
  28. package/dist/goal/intent-frame.js +18 -0
  29. package/dist/memory/local-graph-memory-store.d.ts +15 -0
  30. package/dist/memory/local-graph-memory-store.js +176 -0
  31. package/dist/memory/memory-store.d.ts +18 -0
  32. package/dist/memory/memory-store.js +18 -0
  33. package/dist/orchestration/adaptorch-topology.d.ts +59 -0
  34. package/dist/orchestration/adaptorch-topology.js +194 -0
  35. package/dist/orchestration/capability-routing.d.ts +23 -0
  36. package/dist/orchestration/capability-routing.js +56 -0
  37. package/dist/orchestration/dag-compiler-types.d.ts +3 -0
  38. package/dist/orchestration/dag-compiler.js +14 -1
  39. package/dist/orchestration/parallel-orchestrator.d.ts +6 -0
  40. package/dist/orchestration/parallel-orchestrator.js +31 -0
  41. package/dist/providers/provider-health.d.ts +39 -0
  42. package/dist/providers/provider-health.js +161 -0
  43. package/dist/runtime/context-broker.d.ts +13 -4
  44. package/dist/runtime/context-broker.js +14 -1
  45. package/dist/runtime/headroom-policy.d.ts +37 -0
  46. package/dist/runtime/headroom-policy.js +122 -0
  47. package/dist/runtime/ouroboros-policy.d.ts +57 -0
  48. package/dist/runtime/ouroboros-policy.js +134 -0
  49. package/dist/runtime/runtime-backed-task-runner.js +9 -1
  50. package/dist/runtime/tool-dispatch-contracts.d.ts +57 -1
  51. package/dist/runtime/tool-dispatch-contracts.js +79 -3
  52. package/dist/safety/tool-authority-gate.d.ts +62 -0
  53. package/dist/safety/tool-authority-gate.js +108 -0
  54. package/dist/schema/provider.schema.d.ts +4 -4
  55. package/dist/util/first-run-star.d.ts +9 -0
  56. package/dist/util/first-run-star.js +42 -1
  57. package/dist/util/terminal-input.d.ts +20 -0
  58. package/dist/util/terminal-input.js +32 -0
  59. package/dist/util/update-check.d.ts +6 -1
  60. package/dist/util/update-check.js +35 -1
  61. package/docs/2026-06-08/critical-issues.md +20 -0
  62. package/docs/2026-06-08/improvements.md +14 -0
  63. package/docs/2026-06-08/init-checklist.md +25 -0
  64. package/docs/2026-06-08/plan.md +20 -0
  65. package/docs/getting-started.md +31 -3
  66. package/docs/integrations/ouroboros.md +96 -0
  67. package/docs/provider-maturity.md +1 -1
  68. package/docs/versioning.md +3 -3
  69. package/package.json +1 -1
  70. package/dist/native/linux-x64/omk-safety +0 -0
package/CHANGELOG.md CHANGED
@@ -1,35 +1,64 @@
1
1
  # Changelog
2
2
 
3
- ## v0.78.0@omk/cli release (2026-06-07)
3
+ ## v0.78.1package alignment, JSON contract envelopes, and adaptive runtime algorithms (2026-06-07)
4
4
 
5
5
  ### Overview
6
6
 
7
- Stable `0.78.0` npm release for `@omk/cli` as the provider-neutral multi-agent control plane for coding workflows. OMK routes, verifies, measures, and controls agent execution with DAG orchestration, evidence gates, and scoped MCP/skills/hooks injection while the package remains on the pre-1.0 channel.
7
+ Pre-1.0 source release target for `open-multi-agent-kit`. This entry aligns the public docs with the actual npm package name, makes the `v1.2` runtime label explicit as a contract family, and avoids implying that every provider lane has the same write/merge authority. It also records the runtime, CI, and orchestration work that ships between the prior release commit and this release: machine-readable `omk.contract.v1` JSON envelopes, real-run graph/proof linkage, an opt-in tool-authority gate, opt-in self-update and first-run star, and adaptorch/headroom/ouroboros adaptive runtime algorithms.
8
+
9
+ ### Added
10
+
11
+ - Fast-gate CI job and a unified release-truthfulness check that ties publish/tag claims to the exact target commit and gate state.
12
+ - Standard `ProviderHealth` shape embedded additively in `omk provider doctor --json`.
13
+ - `omk.contract.v1` JSON envelope for `omk summary --json`.
14
+ - `omk.contract.v1` JSON envelopes for the `omk dag`, `omk team`, and `omk merge` machine-readable surfaces.
15
+ - Real-run linkage into graph memory plus `omk graph audit`, which validates links across run manifest, evidence JSONL, decision JSONL, and provider-route nodes.
16
+ - Pure tool-authority decision-gate primitive that classifies tool calls against per-lane write authority.
17
+ - `OMK_AUTO_UPDATE` opt-in for non-interactive startup self-update.
18
+ - First-run GitHub star with a browser-open fallback when the `gh` CLI is unavailable.
19
+ - Adaptive runtime algorithms in the package: adaptorch-style topology routing on first DAG composition (`OMK_ADAPTORCH_ROUTING`), headroom context-guard compaction before the 90% context window (`OMK_HEADROOM` / `OMK_HEADROOM_THRESHOLD`), and embedded-ouroboros preference for goal/spec intents with native fallback (`OMK_OUROBOROS`).
20
+ - Ouroboros integration documentation covering the MCP server, bridge, and skills surface.
21
+
22
+ ### Changed
23
+
24
+ - README install, badge, package contract, and npm links now use `open-multi-agent-kit` instead of the unavailable `@omk/cli` scope.
25
+ - ROADMAP now separates public `0.78.x` package releases from historical v1.1.x/v1.2 source milestones.
26
+ - Provider-lane wording now points readers to the provider-maturity contract before treating non-Kimi lanes as authority paths.
27
+ - Release wording now treats npm publish/tag claims as gated by the exact target commit, CI/smoke status, package audit, and dist-tag state.
28
+ - The tool-authority gate is wired into dispatch in shadow/opt-in mode; enforcement stays off by default and is enabled only by `OMK_TOOL_AUTHORITY_ENFORCE`.
29
+ - Chat startup now resumes paused stdin before the native loop so first-run chat stays interactive.
30
+
31
+ ### Notes
32
+
33
+ - Default MCP configuration excludes the adaptorch MCP server; adaptorch is not auto-injected and is opt-in only.
34
+ - The new runtime behaviors are opt-in through environment flags and default to off, so existing default runs are unchanged.
35
+
36
+ ### Verification
37
+
38
+ Release readiness requires `npm run release:check` or the documented CI equivalent, native safety build, package audit, and tarball install smoke before npm publish or git tag.
39
+
40
+ ## v0.78.0 — initial public npm release (2026-06-07)
41
+
42
+ ### Overview
43
+
44
+ Initial `0.78.0` npm publication for `open-multi-agent-kit` as a pre-1.0 provider-neutral multi-agent control plane for coding workflows. OMK routes, verifies, measures, and controls agent execution with DAG orchestration, evidence gates, and scoped MCP/skills/hooks injection.
8
45
 
9
46
  ### Core
10
47
 
11
48
  - **OMK//CONTROL** brand system with operator TUI, runtime-flow diagrams, and telemetry.
12
- - **Provider-neutral architecture** Codex, MiMo, Kimi API, DeepSeek, Qwen, OpenRouter, and local adapters share the same control plane.
49
+ - **Provider-neutral architecture** with provider-specific maturity limits; Kimi remains the most mature authority path.
13
50
  - **DAG orchestration**: Goal → DAG plan → parallel lanes → evidence bundle → verify gate → merge / replay / inspect.
14
- - **Evidence gates** Command output, diff, artifact, metric, and review proof required before completion claims.
15
- - **Scoped capability injection** Project MCP, skills, hooks, and graph memory scoped per-run; global secrets not imported silently.
16
- - **Worktree isolation** Parallel lanes stay bounded, reviewable, and recoverable.
17
-
18
- ### CLI surface
19
-
20
- `omk init`, `omk doctor`, `omk chat`, `omk plan`, `omk run`, `omk parallel`, `omk review`, `omk verify`, `omk goal`, `omk provider`, `omk mcp`, `omk skill`, `omk agent`, `omk graph`, `omk replay`, `omk inspect`, `omk codex auth`, `omk image`.
51
+ - **Evidence gates**: command output, diff, artifact, metric, and review proof before completion claims.
52
+ - **Scoped capability injection**: project MCP, skills, hooks, and graph memory scoped per-run; global secrets not imported silently.
53
+ - **Worktree isolation**: parallel lanes stay bounded, reviewable, and recoverable.
21
54
 
22
55
  ### Package contract
23
56
 
24
- - Package: `@omk/cli`
57
+ - Package: `open-multi-agent-kit`
25
58
  - Bins: `omk`, `omk-project-mcp`, `omk-acp`, `omk-mcp-host`
26
59
  - Engine: Node.js >=20, npm >=10
27
60
  - License: MIT
28
61
 
29
- ### Verification
30
-
31
- Release readiness requires `npm run release:check`, native safety build, package audit, and tarball install smoke before npm publish or git tag.
32
-
33
62
  ## v1.2.0-rc.0 — Version and provider documentation alignment (2026-05-31)
34
63
 
35
64
  ### Added
package/MATURITY.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # OMK Command Maturity Matrix
2
2
 
3
3
  Last updated: 2026-06-07
4
- Current source version: v0.78.0 (`v1.2` runtime contract family)
4
+ Current source version: v0.78.1 (`v1.2` runtime contract family)
5
5
 
6
6
  | Level | Meaning |
7
7
  |-------|---------|
@@ -72,6 +72,6 @@ Current source version: v0.78.0 (`v1.2` runtime contract family)
72
72
  | Native runtime safety | OMK owns the root-orchestrator direction, but native chat must still lock turn-risk inference, approval/sandbox propagation, authority resolution, provider health probes, and DeepSeek read-only enforcement before stable provider-neutral claims. | Treat `docs/native-root-runtime-hardening.md` and `.omk/specs/native-orchestrator-phase1/` as the active hardening contract. |
73
73
  | MCP diagnostics | `mcp list/doctor/test` exist; invalid project/global MCP JSON now fails visibly through diagnostics without exposing config contents. | Add machine-readable MCP JSON and structured failure categories for command resolution, timeout, permission, and server health. |
74
74
  | Skills and harness templates | `omk skill` exposes current core/TypeScript/review packs, while init templates document project MCP scope, runtime skills, portable `.agents/skills`, and run-scoped harness manifests. | Keep external-inspired skills compact, source-linked, and non-vendored; verify install/sync through `skill-command` tests and package audit. |
75
- | Release docs and site | README, CHANGELOG, MATURITY, ROADMAP, versioning docs, provider-maturity docs, package audit, and release-gate commands distinguish the `0.78.0` package release from the `v1.2` runtime contract family while documenting alpha/experimental surfaces, current harness templates, provider limits, and the public project repository at `https://github.com/dmae97/open-multi-agent-kit`. | Treat `npm run release:check`, native safety packaging, tarball install smoke, and CI evidence on the exact commit as the publish/deploy gate before claiming `0.78.0` published or release-ready. |
75
+ | Release docs and site | README, CHANGELOG, MATURITY, ROADMAP, versioning docs, provider-maturity docs, package audit, and release-gate commands distinguish the `0.78.x` public package line from the `v1.2` runtime contract family while documenting alpha/experimental surfaces, current harness templates, provider limits, and the public project repository at `https://github.com/dmae97/open-multi-agent-kit`. | Treat `npm run release:check`, native safety packaging, tarball install smoke, and CI evidence on the exact commit as the publish/deploy gate before claiming `0.78.1` published or release-ready. |
76
76
  | Public proof bundles | `omk.proof-bundle.v1`, `npm run proof:check`, `npm run proof:index`, and ten scoped RC hardening bundles now cover no-Kimi, provider/doctor, fallback routing, native safety, contract/version, evidence-block, replay/inspect, and graph-audit axes. Proof integrity includes runId/commit/evidence/decision linkage and per-bundle `sha256sums.txt` artifact hashes. | Keep strengthening proof authenticity with sanitized repo-relative artifacts, non-empty known limitations, and broader provider fallback variants. |
77
77
  | Goal planner | Goal lifecycle exists, including continue, generated plan/evidence criteria, and verification. | Expand planner quality scoring and release evidence. |
package/README.md CHANGED
@@ -13,10 +13,10 @@
13
13
  </p>
14
14
 
15
15
  <p align="center">
16
- <a href="https://www.npmjs.com/package/@omk/cli"><img alt="npm version" src="https://img.shields.io/npm/v/%40omk%2Fcli?color=00D6FF"></a>
17
- <a href="https://www.npmjs.com/package/@omk/cli"><img alt="npm package" src="https://img.shields.io/badge/package-%40omk%2Fcli-FF47B2"></a>
18
- <a href="docs/versioning.md"><img alt="runtime" src="https://img.shields.io/badge/runtime-v1.2-9D4EDD"></a>
19
- <a href="https://github.com/dmae97/open-multi-agent-kit/blob/main/proof/PROOF_INDEX.md"><img alt="proof gate" src="https://img.shields.io/badge/proof--gate-passing-00FFC2"></a>
16
+ <a href="https://www.npmjs.com/package/open-multi-agent-kit"><img alt="npm version" src="https://img.shields.io/npm/v/open-multi-agent-kit?color=00D6FF"></a>
17
+ <a href="https://www.npmjs.com/package/open-multi-agent-kit"><img alt="npm package" src="https://img.shields.io/badge/package-open--multi--agent--kit-FF47B2"></a>
18
+ <a href="docs/versioning.md"><img alt="runtime contract" src="https://img.shields.io/badge/contract-v1.2_pre--1.0-9D4EDD"></a>
19
+ <a href="https://github.com/dmae97/open-multi-agent-kit/blob/main/proof/PROOF_INDEX.md"><img alt="proof check" src="https://img.shields.io/badge/proof--check-source-00FFC2"></a>
20
20
  <a href="LICENSE"><img alt="license" src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
21
21
  </p>
22
22
 
@@ -30,11 +30,35 @@
30
30
 
31
31
  `OMK` (`omk`) turns a coding goal into a bounded, evidence-gated agent run.
32
32
 
33
- > Current package source version: `@omk/cli@0.78.0`.
34
- > Runtime contract family: `v1.2`.
33
+ > Current package source target: `open-multi-agent-kit@0.78.1`.
34
+ > Public package name: `open-multi-agent-kit` (`@omk/cli` is not the active npm package).
35
+ > Runtime contract family: `v1.2` (contract family, not a stable npm `1.x` release).
35
36
  > Release channel: `pre-1.0`.
36
37
  > See [versioning](docs/versioning.md) and [provider maturity](docs/provider-maturity.md).
37
38
 
39
+ ## Quickstart (3 minutes)
40
+
41
+ A beginner reads this, runs four commands, and succeeds.
42
+
43
+ ```bash
44
+ npm i -g open-multi-agent-kit
45
+ omk init
46
+ omk doctor
47
+ omk chat
48
+ ```
49
+
50
+ ## Current release reality
51
+
52
+ - The public npm line is `open-multi-agent-kit@0.78.x`. Published npm `latest` is `0.78.0`;
53
+ source/target is `0.78.1` and is published only after the release workflow passes on the tagged commit.
54
+ - The `v1.2` label in docs is a runtime contract family for the source tree, not a claim that
55
+ an npm `1.2.x` stable release exists.
56
+ - Provider support is intentionally uneven: Kimi remains the most mature authority path;
57
+ Codex/OpenCode/CommandCode depend on local CLIs; MiMo/DeepSeek/Qwen/OpenRouter/local LLM
58
+ lanes are scoped by the provider-maturity contract.
59
+ - Safety and evidence claims apply to the exact adapter, command, and verification gate that
60
+ produced them.
61
+
38
62
  ## Why OMK
39
63
 
40
64
  Most coding agents optimize for a single prompt/result loop. OMK wraps agent execution with a control-plane algorithm:
@@ -68,26 +92,28 @@ The GitHub visual set presents OMK as a Night City Ops Console: route status, DA
68
92
 
69
93
  ## Install
70
94
 
71
- Requires Node.js `>=20` and npm `>=10`.
95
+ Requires Node.js `>=20` and npm `>=10`. The [3-minute route](#quickstart-3-minutes) uses the global install; these are the alternatives:
96
+
97
+ Project/local install:
72
98
 
73
99
  ```bash
74
- npm install -g @omk/cli
75
- omk --help
100
+ npm i open-multi-agent-kit
101
+ npx omk --help
76
102
  ```
77
103
 
78
- No global install:
104
+ No install:
79
105
 
80
106
  ```bash
81
- npx -p @omk/cli omk doctor
107
+ npx -p open-multi-agent-kit omk doctor
82
108
  ```
83
109
 
84
110
  ## Quick start
85
111
 
112
+ The [3-minute route](#quickstart-3-minutes) is the canonical path. Beyond it, add provider auth and orchestration:
113
+
86
114
  ```bash
87
- omk init # scaffold AGENTS.md, DESIGN.md, .omk/
88
- omk doctor # check runtime, providers, MCP, skills, hooks
89
- omk codex auth --choice plus-pro # prefer official Codex app/CLI OAuth for Codex lanes
90
- omk chat --provider codex --mode agent
115
+ omk codex auth --choice plus-pro # optional; requires official Codex app/CLI login
116
+ omk chat --provider auto --mode agent
91
117
  omk orchestrate "ship feature" --workers 4 --dry-run
92
118
  ```
93
119
 
@@ -133,7 +159,7 @@ DAG node
133
159
  → TaskResult with selected runtime + fallback chain
134
160
  ```
135
161
 
136
- OMK converts DAG context into an adapter-neutral task so Codex, MiMo, Kimi API/print lanes, DeepSeek, Qwen, OpenRouter, local adapters, or future runtimes can participate through the same contract.
162
+ OMK converts DAG context into an adapter-neutral task so Codex, MiMo, Kimi API/print lanes, DeepSeek, Qwen, OpenRouter, local adapters, or future runtimes can participate through the same contract when configured. That contract does not imply equal write/merge authority for every adapter.
137
163
 
138
164
  ### 4. Intent-aware runtime routing and fallback
139
165
 
@@ -180,13 +206,16 @@ Goal → DAG plan → parallel lanes → evidence bundle → verify gate → mer
180
206
 
181
207
  ## Provider lanes
182
208
 
183
- OMK is provider-neutral. The configured runtime decides which adapters are available, but the control plane is the same:
209
+ OMK is provider-neutral, but providers are not equally mature or equally authorized:
210
+
211
+ - **Kimi API / print lanes**: most mature authority path and compatibility fallback when configured.
212
+ - **MiMo**: default/read-review-thinking path when configured; direct workspace-write authority is not claimed for the API runtime.
213
+ - **Codex app / CLI OAuth lanes**: compatibility path through the official Codex CLI/app login; local CLI availability and policy decide what can run.
214
+ - **OpenCode / CommandCode CLI lanes**: compatibility paths when the local CLI and auth are present.
215
+ - **DeepSeek, Qwen, OpenRouter, local LLM adapters**: advisory/read/review/QA/research lanes unless a tested contract grants more authority.
216
+ - **GPT Image 2 asset lane**: visual asset workflow only when explicitly selected and separately configured.
184
217
 
185
- - **Codex app / CLI OAuth lanes** for Codex-backed coding sessions;
186
- - **MiMo** as the default provider path when configured;
187
- - **Kimi API / print lanes** as explicit provider adapters, not the root identity;
188
- - **DeepSeek, Qwen, OpenRouter, local adapters** for advisory or execution lanes when capability contracts match;
189
- - **GPT Image 2 asset lane** for visual assets when the image workflow is explicitly selected.
218
+ See [provider maturity](docs/provider-maturity.md) before treating any non-Kimi lane as an authority/write/merge path.
190
219
 
191
220
  ## Codex app / OAuth first
192
221
 
@@ -206,9 +235,9 @@ The npm package is intentionally package-safe:
206
235
 
207
236
  | Contract | Value |
208
237
  | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
209
- | Package | [`@omk/cli`](https://www.npmjs.com/package/@omk/cli) |
210
- | Version | `0.78.0` |
211
- | Runtime family | `v1.2` |
238
+ | Package | [`open-multi-agent-kit`](https://www.npmjs.com/package/open-multi-agent-kit) |
239
+ | Version | `0.78.1` |
240
+ | Runtime contract family | `v1.2` |
212
241
  | Bins | `omk`, `omk-project-mcp`, `omk-acp`, `omk-mcp-host` |
213
242
  | Packaged docs | `README.md`, `docs/`, `SECURITY.md`, `ROADMAP.md`, `MATURITY.md`, `DESIGN.md` |
214
243
  | Packaged branding | Canonical hero/social/TUI/runtime images plus the curated derivative gallery documented in [`readmeasset/ASSET_INDEX.md`](readmeasset/ASSET_INDEX.md) and [`readmeasset/ASSET_PROVENANCE.md`](readmeasset/ASSET_PROVENANCE.md) |
@@ -262,6 +291,7 @@ Public copy stays OMK-owned: **OMK//CONTROL**, **NEON GRID ONLINE**, route/evide
262
291
  - [Provider maturity](docs/provider-maturity.md)
263
292
  - [Native root runtime algorithms](docs/native-root-runtime-algorithms.md)
264
293
  - [Codex OAuth setup](docs/codex-oauth-setup.md)
294
+ - [Ouroboros integration](docs/integrations/ouroboros.md)
265
295
  - [Security policy](SECURITY.md)
266
296
 
267
297
  ## Security
@@ -271,7 +301,7 @@ Safe by default: child env is sanitized, ambient secrets are dropped, and worksp
271
301
  ## Links
272
302
 
273
303
  - GitHub: <https://github.com/dmae97/open-multi-agent-kit>
274
- - NPM: <https://www.npmjs.com/package/@omk/cli>
304
+ - NPM: <https://www.npmjs.com/package/open-multi-agent-kit>
275
305
  - Releases: <https://github.com/dmae97/open-multi-agent-kit/releases>
276
306
 
277
307
  ## License
package/ROADMAP.md CHANGED
@@ -1,21 +1,27 @@
1
1
  # Roadmap
2
2
 
3
- Current source version: v0.78.0 (`v1.2` runtime contract family)
3
+ Current source version: v0.78.1 (`v1.2` runtime contract family)
4
4
  Last updated: 2026-06-07
5
5
 
6
- ## Historical 2026-05-31 v1.2 RC status
6
+ ## 2026-06-07 release reality
7
7
 
8
- At the 2026-05-31 RC checkpoint, the source tree was aligned to package version `1.2.0-rc.0`, runtime version `v1.2`, and release channel `rc`. The architecture direction is OMK-as-root with providers as adapters. Kimi remains the most mature authority path in this RC line; other providers have narrower or advisory maturity unless tests and contracts say otherwise.
8
+ The public npm package line is `open-multi-agent-kit@0.78.x`. The `v1.2` label below is the source-tree runtime contract family, not a claim that a stable npm `1.2.x` package has shipped.
9
+
10
+ The v1.1.x/v1.2 rows in this file are historical source checkpoints and architecture milestones unless a row explicitly says it was npm-published. Current public-release work should be judged against the exact target commit, CI/smoke status, package audit, and npm dist-tag state.
11
+
12
+ ## Historical 2026-05-31 v1.2 contract checkpoint
13
+
14
+ At the 2026-05-31 checkpoint, the source tree was being aligned toward a `v1.2` runtime contract and an internal RC packaging target. That checkpoint is useful architectural history, but it is not the current public npm package line. The architecture direction is OMK-as-root with providers as adapters. Kimi remains the most mature authority path; other providers have narrower or advisory maturity unless tests and contracts say otherwise.
9
15
 
10
16
  - Version contract details: `docs/versioning.md`.
11
17
  - Provider status and limitations: `docs/provider-maturity.md`.
12
18
  - Public proof index: `proof/PROOF_INDEX.md`.
13
19
  - Active native-runtime backlog: `docs/native-root-runtime-hardening.md`, `docs/native-root-runtime-algorithms.md`, and `.omk/specs/native-orchestrator-phase1/`.
14
- - Do not claim stable `v1.2` until release gates pass on the exact target commit and the stable package/tag is published.
20
+ - Do not claim stable npm `1.x` status until release gates pass on the exact target commit and the stable package/tag is published.
15
21
 
16
- ## Historical v1.1.9 reality
22
+ ## Historical v1.1.9 source reality
17
23
 
18
- Provider routing and graph viewing are no longer purely future work:
24
+ Provider routing and graph viewing are no longer purely future work in the source tree, but these notes are historical and provider-dependent:
19
25
 
20
26
  - `omk run`, `omk parallel`, and DAG replay expose `--provider auto|kimi`.
21
27
  - `omk provider` / `omk deepseek` manage DeepSeek enablement, key setup, availability checks, and default fallback to the most mature adapter.
@@ -23,7 +29,7 @@ Provider routing and graph viewing are no longer purely future work:
23
29
  - `omk graph view` generates an HTML view from `.omk/memory/graph-state.json`.
24
30
  - `omk goal` has a persisted lifecycle, continue loop, generated plan/evidence criteria, and verification flow.
25
31
 
26
- ## v1.2 RC — Native Orchestrator Decoupling
32
+ ## v1.2 contract hardening — Native Orchestrator Decoupling
27
33
 
28
34
  ### Phase 0: Foundation & Spec
29
35
 
@@ -64,35 +70,35 @@ Provider routing and graph viewing are no longer purely future work:
64
70
  - Deprecate Kimi-only subagent language where OMK `ParallelOrchestrator` is the actual spawn surface.
65
71
  - Mark v1.2.x stable only after provider fallback, evidence gates, DAG replay, version contracts, and provider-maturity docs are green across supported adapters.
66
72
 
67
- ## v1.3Hardening the current surface
73
+ ## Post-0.78 hardening — current surface
68
74
 
69
75
  ### P0: release and contract gates
70
76
 
71
- - Done: YAML validation now runs in local `verify` plus CI/smoke workflows.
72
- - Done: package dry-pack, package audit, tarball smoke, native safety build, and release matrix gates were re-verified during the v1.1.x release-prep line; v1.2 RC publish/tag claims now depend on `npm run release:check` on the exact target commit.
73
- - Required before stable v1.2 publish/tag: regenerate the native safety binary, pass package audit, pass smoke-pack/tarball install smoke, and pass `npm run release:check` on the exact intended release diff.
74
- - Required before stable v1.2 publish/tag: CI and smoke checks must pass on the exact intended commit.
75
- - Done: provider/deepseek and screenshot JSON command contracts gained hermetic regression tests.
76
- - Done: proof bundle schema/check/index scaffolding exists, with ten scoped RC hardening bundles covering no-Kimi smoke, doctor-provider, fallback-route, native-safety, contract-version, evidence-block, replay/inspect, graph-audit, deeper no-Kimi verification, and provider fallback-routing gates.
77
- - Done: proof integrity now enforces artifact linkage plus per-bundle `sha256sums.txt` hash validation.
78
- - Done: current AGENTS/init templates and packaged workflow skills were aligned with the active skills/MCP/agents/harness surface, including all generated agent MCP/skills/hooks flags and parallel subagent orchestration guidance.
79
- - Remaining: lock runtime safety gates for native turn risk, approval/sandbox propagation, authority-provider resolution, provider health probes, and DeepSeek read-only routing.
80
- - Remaining: lock broader provider fallback metadata with tests for rate limit, timeout, and default fallback variants.
81
- - Remaining: define minimum machine-readable CLI envelopes for the rest of the automation-critical commands.
82
- - Remaining: promote additional real proof bundles beyond the RC ten-bundle baseline, especially provider fallback variants for rate limit, timeout, and default route behavior.
77
+ - Source implemented: YAML validation runs in local `verify` plus CI/smoke workflows.
78
+ - Source verified in recent gates: package dry-pack, package audit, tarball smoke, native safety build, and release matrix coverage. Public publish/tag claims still depend on the exact target commit.
79
+ - Required before a public npm publish/tag: regenerate the native safety binary if the target platform artifacts changed, pass package audit, pass smoke-pack/tarball install smoke, and pass `npm run release:check` or the documented CI equivalent on the exact intended release diff.
80
+ - Required before a public npm publish/tag: CI and smoke checks must pass on the exact intended commit.
81
+ - Source implemented: provider/deepseek and screenshot JSON command contracts have hermetic regression tests.
82
+ - Source implemented: proof bundle schema/check/index scaffolding exists, with scoped hardening bundles covering no-Kimi smoke, doctor-provider, fallback-route, native-safety, contract-version, evidence-block, replay/inspect, graph-audit, deeper no-Kimi verification, and provider fallback-routing gates.
83
+ - Source implemented: proof integrity enforces artifact linkage plus per-bundle `sha256sums.txt` hash validation.
84
+ - Source implemented: current AGENTS/init templates and packaged workflow skills align with the active skills/MCP/agents/harness surface.
85
+ - Still required: lock runtime safety gates for native turn risk, approval/sandbox propagation, authority-provider resolution, provider health probes, and DeepSeek read-only routing.
86
+ - Still required: lock broader provider fallback metadata with tests for rate limit, timeout, and default fallback variants.
87
+ - Still required: define minimum machine-readable CLI envelopes for the rest of the automation-critical commands.
88
+ - Still required: promote additional proof bundles beyond the current baseline, especially provider fallback variants for rate limit, timeout, and default route behavior.
83
89
 
84
90
  ### P1: observability and diagnostics
85
91
 
86
- - Done: provider route/fallback counts are now emitted in run summaries/reports and summary terminal output.
87
- - Done: invalid MCP JSON is reported as a visible diagnostic without leaking secret-like config values.
88
- - Done: `omk mcp doctor --json` exposes structured server status, command resolution, timeout, permission, and config-source fields.
92
+ - Source implemented: provider route/fallback counts are emitted in run summaries/reports and summary terminal output.
93
+ - Source implemented: invalid MCP JSON is reported as a visible diagnostic without leaking secret-like config values.
94
+ - Source implemented: `omk mcp doctor --json` exposes structured server status, command resolution, timeout, permission, and config-source fields.
89
95
  - Expand JSON output for DAG, summary, and workflow commands where CI or agents consume results.
90
96
  - Link live graph nodes back to runs, goals, providers, and evidence so `omk graph audit` can validate real project graph memory, not only compact proof fixtures.
91
97
 
92
98
  ### P2: execution depth and planner quality
93
99
 
94
100
  - Deepen `omk team` runtime reporting: worker state, pane/session health, artifacts, and verification handoff.
95
- - Done: replace the `omk goal plan` stub with a planner that emits steps, acceptance criteria, risks, and evidence gates.
101
+ - Source implemented: replace the `omk goal plan` stub with a planner that emits steps, acceptance criteria, risks, and evidence gates.
96
102
  - Add provider-quality gates before broader non-Kimi worker pools.
97
103
  - Keep Kimi execution as the safe fallback path for every run.
98
104
 
@@ -109,10 +115,12 @@ Provider routing and graph viewing are no longer purely future work:
109
115
  - Materialize provider routes, fallback events, goals, evidence gates, and run artifacts in the local graph/Kuzu ontology.
110
116
  - Keep `omk graph view` local-first and safe for private repositories.
111
117
 
112
- ### Historical milestones
118
+ ### Historical source milestones
119
+
120
+ These are source/development checkpoints unless a release note explicitly says the version was npm-published.
113
121
 
114
- | Version | Focus |
115
- |---------|-------|
122
+ | Source checkpoint | Focus |
123
+ | --- | --- |
116
124
  | v0.1 | init / doctor / chat, P0 skills, AGENTS.md / DESIGN.md generation, quality gate hooks |
117
125
  | v0.2 | wire controller, HUD, run state, worker logs |
118
126
  | v0.3 | worktree team, merge queue, reviewer / QA / integrator agents |
@@ -127,4 +135,4 @@ Provider routing and graph viewing are no longer purely future work:
127
135
  | v1.1.16 | Deterministic IntentFrame/ActionAtom orchestration, chat schema preflight, MCP duplicate policy, agent capability propagation, and doctor/init/pack smoke fixes |
128
136
  | v1.1.17 | Full generated-agent MCP/skills/hooks enablement, parallel subagent orchestration emphasis, and v1.1.17 release docs |
129
137
  | v1.1.18 | Historical Kimi-wrapper dominant release-prep line: package source version alignment, native safety package gate, typed doctor repair plans, startup update prompt UX, and parallel subagent orchestration release-doc alignment |
130
- | v1.2.0-rc.0 | Package RC for the `v1.2` runtime contract family, provider-neutral docs alignment, version contract docs, and provider maturity limits |
138
+ | v1.2.0-rc.0 | Internal RC target for the `v1.2` runtime contract family, provider-neutral docs alignment, version contract docs, and provider maturity limits |
@@ -268,9 +268,10 @@ export function registerBasicCommands(program) {
268
268
  program
269
269
  .command("summary")
270
270
  .description(t("cmd.summaryDesc"))
271
- .action(async () => {
271
+ .option("--json", "Output the latest run summary as a JSON envelope")
272
+ .action(async (options) => {
272
273
  const { summaryLatestCommand } = await import("../commands/summary.js");
273
- await summaryLatestCommand();
274
+ await summaryLatestCommand(options);
274
275
  });
275
276
  program
276
277
  .command("summary-show [run-id]")
@@ -157,6 +157,7 @@ export function registerMcpDagCronScreenshotCommands(program) {
157
157
  .option("-o, --output <path>", "Output JSON file path")
158
158
  .option("-p, --parallel", "Enable intra-phase parallelism")
159
159
  .option("-r, --run <id>", "Use spec from run ID (latest)")
160
+ .option("--json", "Output the DAG artifact as a JSON envelope")
160
161
  .action(async (specDir, options) => {
161
162
  const { dagFromSpecCommand } = await import("../commands/dag-from-spec.js");
162
163
  const root = (await import("../util/fs.js")).getProjectRoot();
@@ -165,6 +166,7 @@ export function registerMcpDagCronScreenshotCommands(program) {
165
166
  output: options.output,
166
167
  parallel: Boolean(options.parallel),
167
168
  run: options.run,
169
+ json: Boolean(options.json),
168
170
  });
169
171
  });
170
172
  dag
@@ -14,6 +14,16 @@ export function registerToolCommands(program) {
14
14
  const { graphViewCommand } = await import("../commands/graph.js");
15
15
  await graphViewCommand(options);
16
16
  });
17
+ graph
18
+ .command("audit")
19
+ .description("Audit linked run subgraphs (run -> route/provider/evidence/decision/artifact)")
20
+ .option("--run <id>", "Audit a single run id (default: all runs under .omk/runs)")
21
+ .option("--input <path>", "Graph state JSON path (default: .omk/memory/graph-state.json)")
22
+ .option("--json", "Output machine-readable omk.contract.v1 JSON verdict")
23
+ .action(async (options) => {
24
+ const { graphAuditCommand } = await import("../commands/graph.js");
25
+ await graphAuditCommand({ run: options.run, input: options.input, json: Boolean(options.json) });
26
+ });
17
27
  program
18
28
  .command("hud")
19
29
  .description(t("cmd.hudDesc"))
@@ -47,6 +57,7 @@ export function registerToolCommands(program) {
47
57
  .option("--run <id>", "run ID", "latest")
48
58
  .option("--strategy <strategy>", "merge strategy (first | best)", "first")
49
59
  .option("--dry-run", "preview merge without applying")
60
+ .option("--json", "Output the merge preview as a JSON envelope")
50
61
  .action(async (runIdArg, options) => {
51
62
  const globalOpts = program.opts();
52
63
  const { mergeCommand } = await import("../commands/merge.js");
@@ -72,6 +72,7 @@ export function registerWorkflowCommands(program) {
72
72
  .command("team")
73
73
  .description(t("cmd.teamDesc"))
74
74
  .option("--workers <n>", t("cmd.teamWorkersOption"), "auto")
75
+ .option("--json", "Output the team layout as a JSON envelope")
75
76
  .action(async (options) => {
76
77
  const globalOpts = program.opts();
77
78
  const { teamCommand } = await import("../commands/team.js");
@@ -89,9 +89,10 @@ export function registerToolingCommands(program) {
89
89
  program
90
90
  .command("summary")
91
91
  .description(t("cmd.summaryDesc"))
92
- .action(async () => {
92
+ .option("--json", "Output the latest run summary as a JSON envelope")
93
+ .action(async (options) => {
93
94
  const { summaryLatestCommand } = await import("../../commands/summary.js");
94
- await summaryLatestCommand();
95
+ await summaryLatestCommand(options);
95
96
  });
96
97
  program
97
98
  .command("summary-show [run-id]")
@@ -245,6 +245,11 @@ export async function chatCommand(options) {
245
245
  catch {
246
246
  // Update prompts are advisory and must not block chat startup.
247
247
  }
248
+ // NOTE: the star/update prompts above use @inquirer/prompts (raw mode + their
249
+ // own readline) and can leave interactive stdin paused. The native root loop
250
+ // re-validates and resumes a paused TTY via resumeInteractiveInput() right
251
+ // before it builds its readline (see runNativeOmkRootLoop), so the first run
252
+ // after `omk init` does not exit immediately with "Session ended".
248
253
  }
249
254
  // ── tmux cockpit layout: keep prompt pane clean; move cockpit/HUD telemetry to the side pane ──
250
255
  const explicitTmux = layout === "tmux";
@@ -2,6 +2,9 @@ import { style } from "../../util/theme.js";
2
2
  import { runShell } from "../../util/shell.js";
3
3
  import { createDag } from "../../orchestration/dag.js";
4
4
  import { applyCapabilityInjectionToRouting, buildCapabilityInjection, } from "../../runtime/capability-injection.js";
5
+ import { capabilityScopesFromRouting } from "../../orchestration/capability-routing.js";
6
+ import { decideToolAuthority, } from "../../safety/tool-authority-gate.js";
7
+ import { resolveToolAuthorityEnforcement } from "../../runtime/tool-dispatch-contracts.js";
5
8
  import { compileBloatToNlp, } from "../../runtime/debloat-nlp.js";
6
9
  import { buildPromptEnvelope, renderPromptEnvelope, } from "../../runtime/prompt-envelope.js";
7
10
  import { buildTaskRunContext } from "../../runtime/worker-manifest.js";
@@ -10,6 +13,7 @@ import { persistInputEnvelope } from "../../input/input-artifacts.js";
10
13
  import { buildDagCompileResult } from "../../orchestration/dag-compiler.js";
11
14
  import { persistDagCompileArtifacts } from "../../orchestration/dag-artifacts.js";
12
15
  import { TerminalOwner } from "../../util/terminal-owner.js";
16
+ import { resumeInteractiveInput } from "../../util/terminal-input.js";
13
17
  import { executeHarnessRun } from "../../harness/execute-harness-run.js";
14
18
  import { normalizeProviderId, readProviderRegistry } from "../../providers/model-registry.js";
15
19
  import { renderProviderModelTable } from "../../providers/model-table.js";
@@ -192,6 +196,53 @@ function bootstrapProviderPolicy(bootstrap) {
192
196
  return "auto";
193
197
  }
194
198
  }
199
+ function nativeTurnRiskToToolOp(risk) {
200
+ switch (risk) {
201
+ case "merge":
202
+ return "merge";
203
+ case "shell":
204
+ return "shell";
205
+ case "write":
206
+ return "write";
207
+ default:
208
+ return "read";
209
+ }
210
+ }
211
+ /**
212
+ * Shadow-only tool-authority observability at the live turn dispatch
213
+ * checkpoint. The kimi runner executes tools inside a spawned CLI, so per-tool
214
+ * enforcement lives in dispatchToolCallsByContract; here we only compute and
215
+ * record the turn-level verdict for the trace. Default output is byte-identical
216
+ * (emitted only under OMK_DEBUG / OMK_TOOL_AUTHORITY_TRACE); this path never
217
+ * blocks dispatch.
218
+ */
219
+ function recordNativeTurnToolAuthority(input) {
220
+ const traceEnabled = input.env.OMK_DEBUG === "1" ||
221
+ /^(1|true|yes|on)$/i.test(input.env.OMK_TOOL_AUTHORITY_TRACE ?? "");
222
+ if (!traceEnabled)
223
+ return;
224
+ const routing = input.node.routing;
225
+ const scopes = capabilityScopesFromRouting(routing);
226
+ const op = nativeTurnRiskToToolOp(routing?.risk);
227
+ const enforce = resolveToolAuthorityEnforcement(input.env);
228
+ const decision = decideToolAuthority({
229
+ op,
230
+ writeAuthority: scopes.writeAuthority,
231
+ shellAuthority: scopes.shellAuthority,
232
+ approvalPolicy: nativeApprovalPolicy(routing?.approvalPolicy ?? routing?.executionPrompt),
233
+ sandboxMode: routing?.sandboxMode === "read-only" ? "read-only" : "workspace-write",
234
+ tty: Boolean(process.stdout.isTTY),
235
+ });
236
+ const line = ` tool-authority(${enforce ? "enforce" : "shadow"}): node=${input.node.id} ` +
237
+ `op=${op} decision=${decision} write=${scopes.writeAuthority} ` +
238
+ `shell=${scopes.shellAuthority} sandbox=${routing?.sandboxMode ?? "auto"}\n`;
239
+ if (input.renderer) {
240
+ input.renderer.emit({ type: "control:output", text: style.phosphorDim(line) });
241
+ }
242
+ else {
243
+ process.stderr.write(style.phosphorDim(line));
244
+ }
245
+ }
195
246
  function emitNativeTurnRoute(input) {
196
247
  if (!input.heartbeatEnabled)
197
248
  return;
@@ -463,6 +514,7 @@ async function executeNativeRootTurn(input) {
463
514
  const routing = input.node.routing;
464
515
  const activity = describeNativeTurnActivity(input.node);
465
516
  emitNativeTurnRoute(input);
517
+ recordNativeTurnToolAuthority({ node: input.node, env: input.env, renderer: input.renderer });
466
518
  let heartbeatPrinted = false;
467
519
  let heartbeatLineClosed = false;
468
520
  const heartbeat = input.heartbeatEnabled
@@ -598,6 +650,7 @@ async function executeNativeRootHarnessTurn(input) {
598
650
  skillNames: node.routing?.skills ?? input.skillNames,
599
651
  hookNames: node.routing?.hooks ?? input.hookNames,
600
652
  });
653
+ recordNativeTurnToolAuthority({ node, env: input.env, renderer: input.renderer });
601
654
  },
602
655
  onNodeComplete: (node, result) => {
603
656
  completed.push({ node, result });
@@ -666,6 +719,13 @@ export async function runNativeOmkRootLoop(input) {
666
719
  else
667
720
  process.stdout.write(`${text}\n`);
668
721
  };
722
+ // Defensive stdin re-validation before the chat readline takes ownership.
723
+ // The first-run GitHub-star / update prompts (@inquirer/prompts) can take
724
+ // over raw mode and leave the shared interactive stdin paused; a paused TTY
725
+ // makes the readline below see an immediate EOF/'close' and exit the loop
726
+ // with "Session ended". This only resumes an explicitly-paused TTY and never
727
+ // touches non-TTY stdin (its EOF/exit behavior must stay unchanged).
728
+ resumeInteractiveInput(process.stdin);
669
729
  const { createInterface } = await import("readline");
670
730
  const rl = createInterface({
671
731
  input: process.stdin,
@@ -27,4 +27,5 @@ export declare function dagFromSpecCommand(specDir: string, options?: {
27
27
  parallel?: boolean;
28
28
  runId?: string;
29
29
  run?: string;
30
+ json?: boolean;
30
31
  }): Promise<Dag>;