open-multi-agent-kit 0.79.3 → 0.80.2

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 (128) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/MATURITY.md +2 -2
  3. package/README.md +86 -39
  4. package/ROADMAP.md +20 -17
  5. package/dist/brand/night-city.theme.json +122 -24
  6. package/dist/brand/rust-forge.theme.json +1 -1
  7. package/dist/commands/chat/native-root-loop.d.ts +27 -3
  8. package/dist/commands/chat/native-root-loop.js +370 -49
  9. package/dist/commands/dag.js +45 -0
  10. package/dist/commands/init/content.d.ts +1 -1
  11. package/dist/commands/init/content.js +3 -3
  12. package/dist/commands/init.js +3 -3
  13. package/dist/commands/verify.js +59 -1
  14. package/dist/contracts/dag.d.ts +9 -1
  15. package/dist/evidence/graph-ontology-relation-gate.d.ts +10 -0
  16. package/dist/evidence/graph-ontology-relation-gate.js +46 -0
  17. package/dist/evidence/headroom-replay-verifier.d.ts +19 -0
  18. package/dist/evidence/headroom-replay-verifier.js +86 -0
  19. package/dist/memory/local-graph-memory-store.d.ts +75 -0
  20. package/dist/memory/local-graph-memory-store.js +570 -0
  21. package/dist/orchestration/dag.d.ts +22 -1
  22. package/dist/orchestration/evidence-gate.js +12 -0
  23. package/dist/orchestration/executor.js +111 -15
  24. package/dist/orchestration/loop-controller-headroom.d.ts +6 -0
  25. package/dist/orchestration/loop-controller-headroom.js +33 -0
  26. package/dist/orchestration/scheduler.d.ts +2 -0
  27. package/dist/orchestration/scheduler.js +3 -0
  28. package/dist/orchestration/task-graph.d.ts +17 -0
  29. package/dist/orchestration/task-graph.js +38 -0
  30. package/dist/providers/codex-cli-runner.js +17 -2
  31. package/dist/runtime/agent-runtime.d.ts +32 -3
  32. package/dist/runtime/agent-runtime.js +20 -7
  33. package/dist/runtime/authority-matrix.d.ts +23 -0
  34. package/dist/runtime/authority-matrix.js +171 -0
  35. package/dist/runtime/chat-advisory-runtime.js +3 -0
  36. package/dist/runtime/codex-cli-runtime.js +2 -0
  37. package/dist/runtime/codex-runtime.d.ts +4 -1
  38. package/dist/runtime/codex-runtime.js +34 -12
  39. package/dist/runtime/context-broker-converter.js +32 -2
  40. package/dist/runtime/context-broker.js +18 -0
  41. package/dist/runtime/contracts/evidence.d.ts +52 -0
  42. package/dist/runtime/contracts/evidence.js +138 -1
  43. package/dist/runtime/contracts/shared.d.ts +27 -0
  44. package/dist/runtime/data-retention-gate.d.ts +42 -0
  45. package/dist/runtime/data-retention-gate.js +123 -0
  46. package/dist/runtime/deepseek-runtime.d.ts +5 -1
  47. package/dist/runtime/deepseek-runtime.js +13 -7
  48. package/dist/runtime/external-cli-adapter.js +20 -7
  49. package/dist/runtime/freedomd-evidence-envelope.d.ts +57 -0
  50. package/dist/runtime/freedomd-evidence-envelope.js +110 -0
  51. package/dist/runtime/freedomd-exception.d.ts +32 -0
  52. package/dist/runtime/freedomd-exception.js +95 -0
  53. package/dist/runtime/freedomd-incidents.d.ts +23 -0
  54. package/dist/runtime/freedomd-incidents.js +103 -0
  55. package/dist/runtime/freedomd-policy.d.ts +35 -0
  56. package/dist/runtime/freedomd-policy.js +114 -0
  57. package/dist/runtime/freedomd-router.d.ts +66 -0
  58. package/dist/runtime/freedomd-router.js +433 -0
  59. package/dist/runtime/headroom-aware-loop-decision.d.ts +21 -0
  60. package/dist/runtime/headroom-aware-loop-decision.js +67 -0
  61. package/dist/runtime/headroom-loop-risk.d.ts +19 -0
  62. package/dist/runtime/headroom-loop-risk.js +43 -0
  63. package/dist/runtime/headroom-policy.d.ts +14 -1
  64. package/dist/runtime/headroom-policy.js +74 -12
  65. package/dist/runtime/kimi-api-runtime.d.ts +4 -1
  66. package/dist/runtime/kimi-api-runtime.js +35 -11
  67. package/dist/runtime/kimi-print-runtime.js +21 -0
  68. package/dist/runtime/kimi-wire-protocol-runtime.js +17 -1
  69. package/dist/runtime/local-llm-runtime.d.ts +5 -1
  70. package/dist/runtime/local-llm-runtime.js +14 -23
  71. package/dist/runtime/private-stderr.d.ts +13 -0
  72. package/dist/runtime/private-stderr.js +69 -0
  73. package/dist/runtime/prompt-envelope.d.ts +1 -1
  74. package/dist/runtime/provider-sovereignty.d.ts +81 -0
  75. package/dist/runtime/provider-sovereignty.js +285 -0
  76. package/dist/runtime/runtime-backed-task-runner.d.ts +1 -0
  77. package/dist/runtime/runtime-backed-task-runner.js +282 -10
  78. package/dist/runtime/runtime-bootstrap.d.ts +12 -0
  79. package/dist/runtime/runtime-bootstrap.js +54 -11
  80. package/dist/runtime/runtime-failure-classifier.d.ts +15 -0
  81. package/dist/runtime/runtime-failure-classifier.js +107 -0
  82. package/dist/runtime/runtime-health-probes.d.ts +30 -0
  83. package/dist/runtime/runtime-health-probes.js +102 -0
  84. package/dist/runtime/runtime-router.d.ts +6 -2
  85. package/dist/runtime/runtime-router.js +575 -53
  86. package/dist/runtime/structured-compaction.d.ts +107 -0
  87. package/dist/runtime/structured-compaction.js +414 -0
  88. package/dist/runtime/tool-dispatch-contracts.d.ts +7 -5
  89. package/dist/runtime/tool-dispatch-contracts.js +15 -4
  90. package/dist/runtime/tool-plane.d.ts +1 -1
  91. package/dist/runtime/tool-plane.js +49 -1
  92. package/dist/runtime/worker-manifest.js +1 -1
  93. package/dist/schema/evidence-bundle.schema.d.ts +8 -8
  94. package/dist/schema/proof-bundle.schema.d.ts +2 -2
  95. package/dist/util/hash.d.ts +2 -0
  96. package/dist/util/hash.js +13 -0
  97. package/dist/util/session.js +5 -4
  98. package/docs/2026-06-16/critical-issues.md +19 -0
  99. package/docs/2026-06-16/improvements.md +15 -0
  100. package/docs/2026-06-16/init-checklist.md +25 -0
  101. package/docs/2026-06-16/plan.md +20 -0
  102. package/docs/2026-06-17/critical-issues.md +19 -0
  103. package/docs/2026-06-17/improvements.md +15 -0
  104. package/docs/2026-06-17/init-checklist.md +25 -0
  105. package/docs/2026-06-17/plan.md +20 -0
  106. package/docs/ARCHITECTURE_ANALYSIS_CODEGRAPH.md +2 -1
  107. package/docs/GSTACK_MIGRATION.md +1 -1
  108. package/docs/algorithm-hardening-playbook.md +219 -0
  109. package/docs/claims.md +1 -1
  110. package/docs/getting-started.md +1 -1
  111. package/docs/native-root-runtime-hardening.md +42 -32
  112. package/docs/post-0793-hardening-roadmap.md +123 -0
  113. package/docs/provider-maturity.md +18 -16
  114. package/docs/versioning.md +3 -3
  115. package/docs/what-is-omk.md +1 -1
  116. package/package.json +8 -4
  117. package/readmeasset/.npmignore +2 -0
  118. package/readmeasset/ASSET_INDEX.md +2 -0
  119. package/readmeasset/ASSET_PROVENANCE.md +40 -20
  120. package/readmeasset/omk-adaptorch-ouroboros-supermemory.svg +1 -1
  121. package/readmeasset/omk-control-surfaces.svg +1 -1
  122. package/readmeasset/omk-core-loop.svg +1 -1
  123. package/readmeasset/omk-freedomd-control-plane.svg +59 -0
  124. package/readmeasset/omk-freedomd-control-plane.webp +0 -0
  125. package/readmeasset/omk-init-control-loop.svg +1 -1
  126. package/readmeasset/omk-logo-mark.svg +1 -1
  127. package/readmeasset/omk-parallel-subagents.svg +1 -1
  128. package/readmeasset/omk-release-assertions.svg +1 -1
@@ -4,7 +4,7 @@ export declare const ROLE_YAMLS: Record<string, string>;
4
4
  export declare function getDesignMd(version: string): string;
5
5
  export declare const GEMINI_MD = "# GEMINI.md\n\n@./AGENTS.md\n@./DESIGN.md\n\nUse AGENTS.md as the canonical project instruction source, including current OMK skills, MCP, agents, and harness policy.\nUse DESIGN.md as the canonical visual identity source.\nDo not duplicate runtime inventories; follow AGENTS.md and `chat-agent-harness.json` when present.\n";
6
6
  export declare const CLAUDE_MD = "# CLAUDE.md\n\n@./AGENTS.md\n@./DESIGN.md\n\nUse AGENTS.md as the canonical project instruction source, including current OMK skills, MCP, agents, and harness policy.\nUse DESIGN.md for UI/frontend work.\nDo not duplicate runtime inventories; follow AGENTS.md and `chat-agent-harness.json` when present.\n";
7
- export declare const ROADMAP_MD = "# Roadmap\n\nCurrent source version: v1.1.18\nLast updated: 2026-05-24\n\n## Current runtime stance\n\nOMK is the root orchestrator. Kimi is an authority-capable compatibility provider adapter, not the whole runtime or implicit default. Codex, DeepSeek, OpenCode, CommandCode, OpenRouter, Qwen, Gemini, and Claude run as adapter lanes only when provider health, capability, approval, sandbox, and harness policy match the task.\n\n- `omk run`, `omk parallel`, chat harnesses, and DAG replay expose provider routing and evidence-gated lanes.\n- `omk provider` / `omk deepseek` manage provider enablement, key setup, availability checks, and fallback readiness.\n- DeepSeek is read/review/advisory by default; it must not receive write/shell authority from native chat defaults.\n- The resolved authority provider remains the writer, merger, and final synthesis lane for write/shell/merge work.\n- `omk graph view` generates an HTML view from local graph memory.\n- `omk goal` has a persisted lifecycle, continue loop, generated plan/evidence criteria, and verification flow.\n\n## v1.2 \u2014 Hardening the current surface\n\n### P0: release and contract gates\n\n- Done: YAML validation now runs in local `verify` plus CI/smoke workflows.\n- Done: package dry-pack, package audit, tarball smoke, and release matrix gates were re-verified against v1.1.17 artifacts.\n- Done: provider/deepseek and screenshot JSON command contracts gained hermetic regression tests.\n- 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.\n- Remaining: lock broader provider fallback metadata with tests for rate limit, timeout, and authority fallback variants.\n- Remaining: define minimum machine-readable CLI envelopes for the rest of the automation-critical commands.\n- Remaining: release/tag only after local gates, package audit, smoke-pack, tarball install smoke, GitHub Smoke Test, and GitHub CI pass on the exact target commit.\n\n### P1: observability and diagnostics\n\n- Done: provider route/fallback counts are now emitted in run summaries/reports and summary terminal output.\n- Done: invalid MCP JSON is reported as a visible diagnostic without leaking secret-like config values.\n- Done: `omk mcp doctor --json` exposes structured server status, command resolution, timeout, permission, and config-source fields.\n- Expand JSON output for graph, DAG, summary, and workflow commands where CI or agents consume results.\n- Link graph nodes back to runs, goals, providers, and evidence so `omk graph view` becomes audit evidence, not only visualization.\n\n### P2: execution depth and planner quality\n\n- Deepen `omk team` runtime reporting: worker state, pane/session health, artifacts, and verification handoff.\n- Done: replace the `omk goal plan` stub with a planner that emits steps, acceptance criteria, risks, and evidence gates.\n- Add provider-quality gates before broader non-primary-provider worker pools.\n- Keep primary-provider execution as the safe fallback path for every run.\n\n## Later tracks\n\n### Provider routing maturity\n\n- Keep the resolved authority provider as the writer, merger, and final synthesis runtime.\n- Use provider hints for explorer, reviewer, QA, planner, and documentation roles only when preflight is healthy and task risk is low.\n- Record provider attempts, route confidence, fallback reason, and final authority in run evidence.\n\n### Graph and memory maturity\n\n- Materialize provider routes, fallback events, goals, evidence gates, and run artifacts in the local graph/Kuzu ontology.\n- Keep `omk graph view` local-first and safe for private repositories.\n\n### Historical milestones\n\n| Version | Focus |\n|---------|-------|\n| v0.1 | init / doctor / chat, P0 skills, AGENTS.md / DESIGN.md generation, quality gate hooks |\n| v0.2 | wire controller, HUD, run state, worker logs |\n| v0.3 | worktree team, merge queue, reviewer / QA / integrator agents |\n| v0.4 | Google DESIGN.md integration, Stitch skills installer, screenshot UI review, Spec Kit planning + DAG execution, agent registry, project index, run summary |\n| v0.5 | MCP project server, plugin pack, CI agent mode |\n| v1.1.6 | provider/deepseek commands, provider policy flags, graph view, goal lifecycle, expanded run history and update JSON |\n| v1.1.9 | chat harness manifest, capability DAG lanes, Windows clipboard screenshot bridge, release matrix |\n| v1.1.12 | Replay system, skill assigner, decision trace coverage, evidence gates, and repair policy |\n| v1.1.13 | Bundled MCP server entrypoints, ACP/host transport groundwork, deployment-ready package metadata |\n| v1.1.14 | Current harness docs, external-inspired workflow skills, and release-safe public wording |\n| v1.1.15 | Isolated HOME MCP shell-profile hotfix and persistent fetch MCP entrypoint |\n| v1.1.16 | Deterministic IntentFrame/ActionAtom orchestration, chat schema preflight, MCP duplicate policy, agent capability propagation, and doctor/init/pack smoke fixes |\n| v1.1.17 | Full generated-agent MCP/skills/hooks enablement, parallel subagent orchestration emphasis, and v1.1.17 release docs |\n";
7
+ export declare const ROADMAP_MD = "# Roadmap\n\nCurrent source version: `open-multi-agent-kit@0.80.2` (`pre-1.0`; runtime contract family `v1.2`)\nLast updated: 2026-06-15\n\n## Current runtime stance\n\nOMK is the root orchestrator. Kimi is an authority-capable compatibility provider adapter, not the whole runtime or implicit default. Codex, DeepSeek, OpenCode, CommandCode, OpenRouter, Qwen, Gemini, and Claude run as adapter lanes only when provider health, capability, approval, sandbox, and harness policy match the task.\n\n- `omk run`, `omk parallel`, chat harnesses, and DAG replay expose provider routing and evidence-gated lanes.\n- `omk provider` / `omk deepseek` manage provider enablement, key setup, availability checks, and fallback readiness.\n- DeepSeek is read/review/advisory by default; it must not receive write/shell authority from native chat defaults.\n- The resolved authority provider remains the writer, merger, and final synthesis lane for write/shell/merge work.\n- `omk graph view` generates an HTML view from local graph memory.\n- `omk goal` has a persisted lifecycle, continue loop, generated plan/evidence criteria, and verification flow.\n\n## v1.2 \u2014 Hardening the current surface\n\n### P0: release and contract gates\n\n- Done: YAML validation now runs in local `verify` plus CI/smoke workflows.\n- Done: package dry-pack, package audit, tarball smoke, release matrix gates, GitHub Release, and npm registry verification were re-verified for `0.80.0`.\n- Done: provider/deepseek and screenshot JSON command contracts gained hermetic regression tests.\n- 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.\n- Remaining: lock broader provider fallback metadata with tests for rate limit, timeout, and authority fallback variants.\n- Remaining: define minimum machine-readable CLI envelopes for the rest of the automation-critical commands.\n- Remaining: release/tag only after local gates, package audit, smoke-pack, tarball install smoke, GitHub Smoke Test, and GitHub CI pass on the exact target commit.\n\n### P1: observability and diagnostics\n\n- Done: provider route/fallback counts are now emitted in run summaries/reports and summary terminal output.\n- Done: invalid MCP JSON is reported as a visible diagnostic without leaking secret-like config values.\n- Done: `omk mcp doctor --json` exposes structured server status, command resolution, timeout, permission, and config-source fields.\n- Expand JSON output for graph, DAG, summary, and workflow commands where CI or agents consume results.\n- Link graph nodes back to runs, goals, providers, and evidence so `omk graph view` becomes audit evidence, not only visualization.\n\n### P2: execution depth and planner quality\n\n- Deepen `omk team` runtime reporting: worker state, pane/session health, artifacts, and verification handoff.\n- Done: replace the `omk goal plan` stub with a planner that emits steps, acceptance criteria, risks, and evidence gates.\n- Add provider-quality gates before broader non-primary-provider worker pools.\n- Keep primary-provider execution as the safe fallback path for every run.\n\n## Later tracks\n\n### Provider routing maturity\n\n- Keep the resolved authority provider as the writer, merger, and final synthesis runtime.\n- Use provider hints for explorer, reviewer, QA, planner, and documentation roles only when preflight is healthy and task risk is low.\n- Record provider attempts, route confidence, fallback reason, and final authority in run evidence.\n\n### Graph and memory maturity\n\n- Materialize provider routes, fallback events, goals, evidence gates, and run artifacts in the local graph/Kuzu ontology.\n- Keep `omk graph view` local-first and safe for private repositories.\n\n### Historical milestones\n\n| Version | Focus |\n|---------|-------|\n| v0.1 | init / doctor / chat, P0 skills, AGENTS.md / DESIGN.md generation, quality gate hooks |\n| v0.2 | wire controller, HUD, run state, worker logs |\n| v0.3 | worktree team, merge queue, reviewer / QA / integrator agents |\n| v0.4 | Google DESIGN.md integration, Stitch skills installer, screenshot UI review, Spec Kit planning + DAG execution, agent registry, project index, run summary |\n| v0.5 | MCP project server, plugin pack, CI agent mode |\n| v1.1.6 | provider/deepseek commands, provider policy flags, graph view, goal lifecycle, expanded run history and update JSON |\n| v1.1.9 | chat harness manifest, capability DAG lanes, Windows clipboard screenshot bridge, release matrix |\n| v1.1.12 | Replay system, skill assigner, decision trace coverage, evidence gates, and repair policy |\n| v1.1.13 | Bundled MCP server entrypoints, ACP/host transport groundwork, deployment-ready package metadata |\n| v1.1.14 | Current harness docs, external-inspired workflow skills, and release-safe public wording |\n| v1.1.15 | Isolated HOME MCP shell-profile hotfix and persistent fetch MCP entrypoint |\n| v1.1.16 | Deterministic IntentFrame/ActionAtom orchestration, chat schema preflight, MCP duplicate policy, agent capability propagation, and doctor/init/pack smoke fixes |\n| v1.1.17 | Full generated-agent MCP/skills/hooks enablement, parallel subagent orchestration emphasis, and v1.1.17 release docs |\n";
8
8
  export declare const SECURITY_MD = "# Security Policy\n\n## Reporting Vulnerabilities\n\nPlease report security issues via GitHub Issues with the `security` label.\n\n## Built-in Protections\n\nopen-multi-agent-kit includes scoped default hooks to block destructive commands and secret leakage when the active runtime/harness enables them.\n\n## Native Runtime Safety Gates\n\n- Native chat turns should be read-only by default; write, shell, and merge capabilities must be requested only when task intent requires them.\n- `--execution ask|auto|never` and sandbox policy must propagate through routing into runtime adapters.\n- `authority`, `primary`, and `omk` provider policies must resolve to a concrete provider before execution.\n- DeepSeek and other advisory providers are read/review/advisory by default and must not silently receive write/shell authority.\n- Provider bootstrap must distinguish binary/runtime availability from auth, model, and quota readiness.\n- Provider failure previews must be gated behind debug mode and redacted before terminal or artifact output.\n- MCP, skills, hooks, and tool-plane parse/resolution failures must surface as diagnostics; runtime-required MCP failures should block execution.\n\n## MCP and Harness Secret Handling\n\n- Fresh init writes project-local `omk-project` MCP only; user/global MCP and skills are runtime-only unless explicitly imported by a trusted local user.\n- Never print, commit, or summarize MCP `env`, headers, tokens, or provider keys.\n- Treat `chat-agent-harness.json` as private run metadata: use it for inventory/gates, but do not paste large inventories or secret-like values into prompts, memory, or reports.\n- Prefer sanitized `omk mcp doctor --json`, `omk verify --json`, test summaries, and secret scans as shareable evidence.\n\n## Child Runtime Isolation\n\nOMK currently provides environment hardening for child runtimes.\n\nBy default, child runtimes do not inherit the full parent process environment.\nOMK passes an allowlisted environment and drops common secret-bearing variables\nsuch as cloud provider credentials, GitHub/NPM tokens, SSH agent sockets,\nKubernetes config, and dotenv/env-file references.\n\nThis is not a full OS-level sandbox. Filesystem, process, and network isolation\nare future hardening work and must not be assumed unless explicitly provided by\nthe selected runtime or host environment.\n\nCurrent security claims:\n\n- OMK prevents ambient secret leakage into child runtimes by default.\n- OMK sanitizes child runtime environments.\n- OMK routes tasks according to declared runtime capabilities.\n- OMK forces approval for write-capable Codex workspace runs.\n- OMK exposes sandbox intent/profile metadata for future enforcement.\n\nNon-claims:\n\n- OMK does not fully sandbox child CLIs.\n- OMK does not prevent all filesystem access outside the workspace.\n- OMK does not prevent network exfiltration.\n- OMK does not enforce OS-level process isolation.\n\n## Best Practices\n\n- Review hooks before running in production repositories.\n- Use `--print` mode only in disposable worktrees.\n- Never commit secrets into agent memory files.\n";
9
9
  export declare const ROOT_PROMPT_MD = "# open-multi-agent-kit Root Agent\n\nYou are the OMK root orchestrator for open-multi-agent-kit \u2014 a provider-neutral orchestration control plane that turns a goal into a bounded coding team.\n\nModels execute. OMK routes, verifies, measures, and controls.\n\nYou must operate with OMK identity as the authority layer: summon parallel subagents when scopes are independent, assign each lane scoped MCP, skills, and hooks, and keep the root context focused on goal management, integration, evidence, and verification. The active runtime scope, selected provider adapter, and harness policy decide which resources are actually available.\n\n## Loaded Project Instructions\n\n${KIMI_AGENTS_MD}\n\n## Loaded Skills\n\n${KIMI_SKILLS}\n\n## Global Rules\n\n- Apply AGENTS.md silently.\n- Do not repeat boilerplate.\n- Use SetTodoList for multi-step tasks.\n- Use Agent tool for non-trivial tasks. All 15 role agents (explorer, planner, router, architect, coder, reviewer, security, qa, tester, researcher, integrator, aggregator, interviewer, ontology, vision-debugger) are available with MCP, skills, and hooks capability flags.\n- Use skills when relevant.\n- Use MCP tools when configured and useful. All subagents inherit scoped MCP server inventory, skills, and hooks when enabled by runtime scope. Do not hesitate to invoke available capabilities.\n- Treat project-local ontology graph memory as mandatory when the omk-project MCP exposes memory tools.\n- Recall relevant project memory before work, write durable findings through omk_write_memory, and use omk_memory_mindmap/omk_graph_query for graph recall.\n- Prefer plan-first execution.\n- Prefer small, reviewable diffs.\n- Verify before completion.\n- Never claim tests passed unless they were run.\n\n## Active Harness and Resource Inventory\n\n- If a run contains chat-agent-harness.json, read it for the full MCP/skills/hooks inventory, virtual DAG, authority boundaries, worker limits, and gate list.\n- Treat compact prompt resource counts as summaries only.\n- Default runtime scope is project MCP/skills; all-scope may read user ~/.kimi resources at runtime without copying personal files.\n- Do not paste huge global MCP/skill inventories or secret-bearing env/header values into prompts, memory, or final reports.\n\n## OMK Context Tools\n\n- Root and generated role agents inherit an Okabe-compatible base while OMK scopes MCP, skills, and hooks per active runtime/harness policy.\n- Use D-Mail before risky refactors, compaction, or long-running branch points: send a concise future-facing recovery note to the relevant checkpoint.\n- Use OMK-managed subagents for isolated context and parallel work; keep the root context focused on decisions, integration, and verification.\n- Prefer /compact or a D-Mail recovery note over dumping large history back into the prompt.\n\n## Required Workflow\n\nFor non-trivial tasks:\n\n1. Read project instructions.\n2. Create todos.\n3. Launch appropriate subagents in parallel when their scopes are independent:\n - explorer for repository discovery\n - planner for architecture/refactor/risky work\n - coder for implementation\n - reviewer or qa for review and gate analysis\n - security for secret/permission/trust-boundary review\n - ontology for graph memory and project knowledge curation\n4. Read relevant skills.\n5. Use MCP if useful.\n6. Implement minimal changes.\n7. Run quality gates.\n8. Review final diff.\n9. Return factual final report.\n\n## Final Report Format\n\n```txt\nChanged:\nFiles:\nCommands:\nResult:\nRisk:\n```\n";
10
10
  export declare const HOOK_SCRIPTS: Record<string, string>;
@@ -347,8 +347,8 @@ Do not duplicate runtime inventories; follow AGENTS.md and \`chat-agent-harness.
347
347
  `;
348
348
  export const ROADMAP_MD = `# Roadmap
349
349
 
350
- Current source version: v1.1.18
351
- Last updated: 2026-05-24
350
+ Current source version: \`open-multi-agent-kit@0.80.2\` (\`pre-1.0\`; runtime contract family \`v1.2\`)
351
+ Last updated: 2026-06-15
352
352
 
353
353
  ## Current runtime stance
354
354
 
@@ -366,7 +366,7 @@ OMK is the root orchestrator. Kimi is an authority-capable compatibility provide
366
366
  ### P0: release and contract gates
367
367
 
368
368
  - Done: YAML validation now runs in local \`verify\` plus CI/smoke workflows.
369
- - Done: package dry-pack, package audit, tarball smoke, and release matrix gates were re-verified against v1.1.17 artifacts.
369
+ - Done: package dry-pack, package audit, tarball smoke, release matrix gates, GitHub Release, and npm registry verification were re-verified for \`0.80.0\`.
370
370
  - Done: provider/deepseek and screenshot JSON command contracts gained hermetic regression tests.
371
371
  - 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.
372
372
  - Remaining: lock broader provider fallback metadata with tests for rate limit, timeout, and authority fallback variants.
@@ -392,8 +392,8 @@ Do not duplicate runtime inventories; follow AGENTS.md and \`chat-agent-harness.
392
392
  `;
393
393
  const ROADMAP_MD = `# Roadmap
394
394
 
395
- Current source version: v1.1.17
396
- Last updated: 2026-05-18
395
+ Current source version: \`open-multi-agent-kit@0.80.2\` (\`pre-1.0\`; runtime contract family \`v1.2\`)
396
+ Last updated: 2026-06-15
397
397
 
398
398
  ## v1.1.9 reality
399
399
 
@@ -410,7 +410,7 @@ Provider routing and graph viewing are no longer purely future work:
410
410
  ### P0: release and contract gates
411
411
 
412
412
  - Done: YAML validation now runs in local \`verify\` plus CI/smoke workflows.
413
- - Done: package dry-pack, package audit, tarball smoke, and release matrix gates were re-verified against v1.1.17 artifacts.
413
+ - Done: package dry-pack, package audit, tarball smoke, release matrix gates, GitHub Release, and npm registry verification were re-verified for \`0.80.0\`.
414
414
  - Done: provider/deepseek and screenshot JSON command contracts gained hermetic regression tests.
415
415
  - 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.
416
416
  - Remaining: lock broader provider fallback metadata with tests for rate limit, timeout, and Kimi fallback variants.
@@ -5,6 +5,7 @@ import { getProjectRoot, pathExists, getRunsDir, getRunPath } from "../util/fs.j
5
5
  import { readFile, writeFile } from "fs/promises";
6
6
  import { createStatePersister } from "../orchestration/state-persister.js";
7
7
  import { checkEvidenceGates } from "../orchestration/evidence-gate.js";
8
+ import { checkEvidenceGate } from "../runtime/contracts/evidence.js";
8
9
  import { captureGitDiffArtifacts, ensureCompletionArtifactContract, getCompletionArtifactStatus, writeTestEvidenceLog, } from "../orchestration/completion-artifacts.js";
9
10
  const SCHEMA_VERSION = 1;
10
11
  export async function verifyCommand(options = {}) {
@@ -69,6 +70,27 @@ export async function verifyCommand(options = {}) {
69
70
  gates.push({ nodeId: node.id, type: "command-pass", ref: command });
70
71
  break;
71
72
  }
73
+ case "command-pass": {
74
+ const command = output.ref ?? "";
75
+ nodeGates.push({ type: "command-pass", command });
76
+ gates.push({ nodeId: node.id, type: "command-pass", ref: command });
77
+ break;
78
+ }
79
+ case "artifact": {
80
+ if (!output.ref) {
81
+ missing.push({ nodeId: node.id, gate: output.gate, message: `Node "${node.id}" artifact gate is missing a ref/path` });
82
+ }
83
+ else {
84
+ nodeGates.push({ type: "file-exists", path: output.ref });
85
+ gates.push({ nodeId: node.id, type: "file-exists", ref: output.ref });
86
+ }
87
+ break;
88
+ }
89
+ case "diff": {
90
+ nodeGates.push({ type: "diff-nonempty" });
91
+ gates.push({ nodeId: node.id, type: "diff-nonempty" });
92
+ break;
93
+ }
72
94
  case "review-pass":
73
95
  case "summary": {
74
96
  const marker = output.ref ?? "## Summary";
@@ -84,14 +106,50 @@ export async function verifyCommand(options = {}) {
84
106
  });
85
107
  }
86
108
  }
109
+ if (node.routing?.evidenceRequired === true && nodeGates.length === 0) {
110
+ missing.push({
111
+ nodeId: node.id,
112
+ message: `Node "${node.id}" requires evidence but has no replayable evidence gates`,
113
+ });
114
+ continue;
115
+ }
87
116
  if (nodeGates.length === 0) {
88
117
  continue;
89
118
  }
119
+ const stdout = await loadNodeStdout(root, runId, node.id);
90
120
  const result = await checkEvidenceGates(nodeGates, {
91
121
  cwd: root,
92
- stdout: await loadNodeStdout(root, runId, node.id),
122
+ stdout,
93
123
  nodeId: node.id,
94
124
  });
125
+ const evidenceGates = [];
126
+ const artifactPaths = [];
127
+ const metadata = {};
128
+ for (const ev of result.evidence) {
129
+ if (!ev.passed)
130
+ continue;
131
+ if (ev.gate === "command-pass")
132
+ evidenceGates.push("command-pass");
133
+ else if (ev.gate === "summary-present")
134
+ evidenceGates.push("summary");
135
+ else if (ev.gate === "file-exists") {
136
+ evidenceGates.push("artifact");
137
+ if (ev.ref)
138
+ artifactPaths.push(ev.ref);
139
+ }
140
+ else if (ev.gate === "diff-nonempty") {
141
+ evidenceGates.push("diff");
142
+ metadata.diff = true;
143
+ }
144
+ }
145
+ if (evidenceGates.length > 0)
146
+ metadata.evidenceGates = evidenceGates;
147
+ const v2 = checkEvidenceGate(true, node.outputs, metadata, stdout, artifactPaths);
148
+ if (!v2.satisfied) {
149
+ for (const gate of v2.missing) {
150
+ failed.push({ nodeId: node.id, gate, passed: false, message: v2.reason });
151
+ }
152
+ }
95
153
  for (const ev of result.evidence) {
96
154
  const item = {
97
155
  nodeId: node.id,
@@ -1,7 +1,7 @@
1
1
  import type { DeepSeekModelTier, DeepSeekParticipation, ProviderAuthority, ProviderId } from "../providers/types.js";
2
2
  export type TaskStatus = "pending" | "running" | "done" | "failed" | "blocked" | "skipped";
3
3
  export type DagContextBudget = "tiny" | "small" | "normal";
4
- export type DagOutputGate = "file-exists" | "test-pass" | "review-pass" | "command-pass" | "summary" | "none";
4
+ export type DagOutputGate = "file-exists" | "test-pass" | "review-pass" | "command-pass" | "summary" | "artifact" | "diff" | "none";
5
5
  export interface DagNodeInput {
6
6
  name: string;
7
7
  ref: string;
@@ -61,6 +61,14 @@ export interface DagNodeRouting {
61
61
  targetAtomId?: string;
62
62
  preserveEvidence?: boolean;
63
63
  };
64
+ /** Freedomd sovereignty metadata for provider-independent routing. */
65
+ freedomd?: {
66
+ dataBoundary?: "public" | "internal" | "customer" | "secret";
67
+ preferredProvider?: string;
68
+ allowProviderExceptions?: boolean;
69
+ degradedMode?: string;
70
+ sovereigntyReason?: string;
71
+ };
64
72
  rejected?: Array<{
65
73
  id: string;
66
74
  reason: string;
@@ -0,0 +1,10 @@
1
+ export interface GraphOntologyRelationGateIssue {
2
+ readonly relationType: string;
3
+ readonly file: string;
4
+ readonly line: number;
5
+ }
6
+ export interface GraphOntologyRelationGateResult {
7
+ readonly pass: boolean;
8
+ readonly missing: readonly GraphOntologyRelationGateIssue[];
9
+ }
10
+ export declare function checkGraphOntologyRelations(sourceFiles: readonly string[]): GraphOntologyRelationGateResult;
@@ -0,0 +1,46 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { ONTOLOGY } from "../memory/local-graph-memory-store.js";
3
+ const RELATION_TYPE_ARG_PATTERN = /upsertEdge\s*\([^)]*,\s*["']([^"']+)["']\s*[,)]/g;
4
+ const RELATION_LITERAL_PATTERN = /type\s*:\s*["']([A-Z_]+)["']/g;
5
+ export function checkGraphOntologyRelations(sourceFiles) {
6
+ const declared = new Set(ONTOLOGY.relationTypes);
7
+ const missing = [];
8
+ const seen = new Set();
9
+ for (const file of sourceFiles) {
10
+ let content;
11
+ try {
12
+ content = readFileSync(file, "utf-8");
13
+ }
14
+ catch {
15
+ continue;
16
+ }
17
+ const lines = content.split("\n");
18
+ for (const [lineIndex, line] of lines.entries()) {
19
+ const argMatches = Array.from(line.matchAll(RELATION_TYPE_ARG_PATTERN));
20
+ for (const match of argMatches) {
21
+ const relationType = match[1];
22
+ if (!relationType)
23
+ continue;
24
+ if (seen.has(relationType))
25
+ continue;
26
+ seen.add(relationType);
27
+ if (!declared.has(relationType)) {
28
+ missing.push({ relationType, file, line: lineIndex + 1 });
29
+ }
30
+ }
31
+ const literalMatches = Array.from(line.matchAll(RELATION_LITERAL_PATTERN));
32
+ for (const match of literalMatches) {
33
+ const relationType = match[1];
34
+ if (!relationType)
35
+ continue;
36
+ if (seen.has(relationType))
37
+ continue;
38
+ seen.add(relationType);
39
+ if (!declared.has(relationType)) {
40
+ missing.push({ relationType, file, line: lineIndex + 1 });
41
+ }
42
+ }
43
+ }
44
+ }
45
+ return { pass: missing.length === 0, missing };
46
+ }
@@ -0,0 +1,19 @@
1
+ import type { GraphState } from "../memory/local-graph-memory-store.js";
2
+ export interface HeadroomReplayVerificationIssue {
3
+ readonly kind: string;
4
+ readonly message: string;
5
+ readonly runId?: string;
6
+ readonly nodeId?: string;
7
+ readonly artifactRef?: string;
8
+ }
9
+ export interface HeadroomReplayVerificationResult {
10
+ readonly pass: boolean;
11
+ readonly issues: readonly HeadroomReplayVerificationIssue[];
12
+ }
13
+ export interface VerifyHeadroomReplayInput {
14
+ readonly runId: string;
15
+ readonly runDir: string;
16
+ readonly state: GraphState;
17
+ readonly qualityThreshold?: number;
18
+ }
19
+ export declare function verifyHeadroomReplay(input: VerifyHeadroomReplayInput): Promise<HeadroomReplayVerificationResult>;
@@ -0,0 +1,86 @@
1
+ import { readFileSync, existsSync } from "node:fs";
2
+ export async function verifyHeadroomReplay(input) {
3
+ const issues = [];
4
+ const decisionPath = `${input.runDir}/headroom-decisions.jsonl`;
5
+ if (!existsSync(decisionPath)) {
6
+ issues.push({ kind: "missing-decisions", message: `headroom decisions file not found: ${decisionPath}`, runId: input.runId });
7
+ return { pass: false, issues };
8
+ }
9
+ const lines = readFileSync(decisionPath, "utf-8")
10
+ .split("\n")
11
+ .filter((line) => line.trim().length > 0);
12
+ const decisions = [];
13
+ for (const [index, line] of lines.entries()) {
14
+ try {
15
+ const parsed = JSON.parse(line);
16
+ if (parsed.schemaVersion !== "omk.headroom-decision.v1") {
17
+ issues.push({ kind: "schema-version", message: `unexpected schemaVersion at line ${index + 1}`, runId: input.runId });
18
+ }
19
+ if (typeof parsed.nodeId !== "string") {
20
+ issues.push({ kind: "missing-node-id", message: `missing nodeId at line ${index + 1}`, runId: input.runId });
21
+ }
22
+ if (typeof parsed.attempted !== "boolean") {
23
+ issues.push({ kind: "missing-attempted", message: `missing attempted boolean at line ${index + 1}`, runId: input.runId });
24
+ }
25
+ decisions.push(parsed);
26
+ }
27
+ catch {
28
+ issues.push({ kind: "parse-error", message: `invalid JSON at line ${index + 1}`, runId: input.runId });
29
+ }
30
+ }
31
+ const state = input.state;
32
+ const graphDecisions = state.nodes.filter((node) => node.type === "HeadroomDecision" && node.properties.runId === input.runId);
33
+ if (graphDecisions.length < decisions.length) {
34
+ issues.push({
35
+ kind: "graph-count",
36
+ message: `graph HeadroomDecision count (${graphDecisions.length}) is lower than decision file lines (${decisions.length})`,
37
+ runId: input.runId,
38
+ });
39
+ }
40
+ for (const decision of decisions) {
41
+ const nodeId = String(decision.nodeId);
42
+ const graphDecision = graphDecisions.find((node) => node.properties.nodeId === nodeId);
43
+ if (!graphDecision) {
44
+ issues.push({ kind: "missing-graph-decision", message: `HeadroomDecision missing in graph for node ${nodeId}`, runId: input.runId, nodeId });
45
+ continue;
46
+ }
47
+ const artifactRef = typeof decision.artifactRef === "string" ? decision.artifactRef : undefined;
48
+ let artifactNode;
49
+ if (artifactRef) {
50
+ artifactNode = state.nodes.find((node) => node.type === "Artifact" && node.properties.runId === input.runId && node.properties.path === artifactRef);
51
+ if (!artifactNode) {
52
+ issues.push({ kind: "missing-artifact-node", message: `Artifact node missing for ${artifactRef}`, runId: input.runId, nodeId, artifactRef });
53
+ }
54
+ else if (artifactNode.properties.exists !== true) {
55
+ issues.push({ kind: "artifact-missing-on-disk", message: `Artifact declared but file does not exist: ${artifactRef}`, runId: input.runId, nodeId, artifactRef });
56
+ }
57
+ else {
58
+ const absolutePath = `${input.runDir}/${artifactRef.split("/").pop() ?? ""}`;
59
+ if (!existsSync(absolutePath)) {
60
+ issues.push({ kind: "artifact-file-missing", message: `artifact file not found: ${absolutePath}`, runId: input.runId, nodeId, artifactRef });
61
+ }
62
+ }
63
+ const hasStoredAt = state.edges.some((edge) => edge.type === "STORED_AT" && edge.from === graphDecision.id && edge.to === artifactNode?.id);
64
+ if (!hasStoredAt && artifactNode) {
65
+ issues.push({ kind: "missing-stored-at", message: `STORED_AT edge missing for artifact ${artifactRef}`, runId: input.runId, nodeId, artifactRef });
66
+ }
67
+ }
68
+ const attempted = decision.attempted === true;
69
+ const applied = decision.applied === true;
70
+ if (attempted && !applied) {
71
+ const riskNode = state.nodes.find((node) => node.type === "Risk" && node.properties.runId === input.runId && node.properties.nodeId === nodeId && node.properties.kind === "headroom-compaction-not-applied");
72
+ if (!riskNode) {
73
+ issues.push({ kind: "missing-risk", message: `Risk node missing for attempted-but-not-applied compaction on node ${nodeId}`, runId: input.runId, nodeId });
74
+ }
75
+ }
76
+ const qualityScore = typeof decision.qualityScore === "number" ? decision.qualityScore : undefined;
77
+ const threshold = input.qualityThreshold ?? 0.75;
78
+ if (qualityScore != null && qualityScore < threshold) {
79
+ const riskNode = state.nodes.find((node) => node.type === "Risk" && node.properties.runId === input.runId && node.properties.nodeId === nodeId);
80
+ if (!riskNode) {
81
+ issues.push({ kind: "missing-quality-risk", message: `quality score ${qualityScore.toFixed(2)} below threshold but no Risk node`, runId: input.runId, nodeId });
82
+ }
83
+ }
84
+ }
85
+ return { pass: issues.length === 0, issues };
86
+ }
@@ -117,6 +117,81 @@ export declare class LocalGraphMemoryStore {
117
117
  write(path: string, content: string): Promise<void>;
118
118
  private applyMemoryWrite;
119
119
  writeMirrorFiles(state: LocalGraphState): Promise<void>;
120
+ materializeTurnAudit(input: {
121
+ readonly runId: string;
122
+ readonly nodeId: string;
123
+ readonly provider?: string;
124
+ readonly selectedRuntime?: string;
125
+ readonly fallbackChain?: readonly string[];
126
+ readonly evidenceKind?: string;
127
+ readonly evidenceArtifactPath?: string;
128
+ readonly evidenceHash?: string;
129
+ readonly evidenceRequirements?: readonly {
130
+ readonly gate: string;
131
+ readonly ref?: string;
132
+ readonly required?: boolean;
133
+ }[];
134
+ readonly evidenceObservations?: readonly {
135
+ readonly kind: string;
136
+ readonly source: string;
137
+ readonly ref?: string;
138
+ readonly artifactPath?: string;
139
+ readonly confidence?: number;
140
+ readonly replayable?: boolean;
141
+ readonly redacted?: boolean;
142
+ }[];
143
+ }): Promise<void>;
144
+ materializeHeadroomDecision(input: {
145
+ readonly runId: string;
146
+ readonly nodeId: string;
147
+ readonly metadata: {
148
+ readonly attempted?: boolean;
149
+ readonly backend?: string;
150
+ readonly compacted?: boolean;
151
+ readonly compactedTextProduced?: boolean;
152
+ readonly validated?: boolean;
153
+ readonly applied?: boolean;
154
+ readonly beforeTokens?: number;
155
+ readonly afterTokens?: number | null;
156
+ readonly utilization?: number;
157
+ readonly threshold?: number;
158
+ readonly contract?: string;
159
+ readonly reason?: string;
160
+ readonly missingSections?: readonly string[];
161
+ readonly qualityScore?: number;
162
+ readonly compressionRatio?: number | null;
163
+ };
164
+ readonly artifactRef?: string;
165
+ }): Promise<void>;
166
+ materializeFreedomdSovereignty(input: {
167
+ readonly runId: string;
168
+ readonly nodeId: string;
169
+ readonly providerId: string;
170
+ readonly runtimeMode: string;
171
+ readonly sovereignty: {
172
+ readonly mode: "freedomd" | "standard";
173
+ readonly dataBoundary: string;
174
+ readonly retentionDecision: string;
175
+ readonly jurisdictionDecision: string;
176
+ readonly providerCutoffRisk: number;
177
+ readonly localFallbackAvailable: boolean;
178
+ readonly reason: string;
179
+ };
180
+ readonly degradedMode?: string;
181
+ readonly incident?: {
182
+ readonly kind: string;
183
+ readonly severity: string;
184
+ readonly reason: string;
185
+ };
186
+ }): Promise<void>;
187
+ materializeFreedomdEvidenceEnvelope(input: {
188
+ readonly runId: string;
189
+ readonly nodeId: string;
190
+ readonly envelopePath: string;
191
+ readonly sha256?: string;
192
+ readonly sizeBytes?: number;
193
+ readonly exists?: boolean;
194
+ }): Promise<void>;
120
195
  append(path: string, content: string): Promise<void>;
121
196
  search(query: string, limit?: number): Promise<MemorySearchResult[]>;
122
197
  /**