open-multi-agent-kit 0.79.3 → 0.80.0
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.
- package/CHANGELOG.md +22 -0
- package/MATURITY.md +2 -2
- package/README.md +86 -39
- package/ROADMAP.md +20 -17
- package/dist/brand/night-city.theme.json +122 -24
- package/dist/brand/rust-forge.theme.json +1 -1
- package/dist/commands/chat/native-root-loop.d.ts +27 -3
- package/dist/commands/chat/native-root-loop.js +375 -49
- package/dist/commands/dag.js +45 -0
- package/dist/commands/init/content.d.ts +1 -1
- package/dist/commands/init/content.js +3 -3
- package/dist/commands/init.js +3 -3
- package/dist/commands/verify.js +59 -1
- package/dist/contracts/dag.d.ts +9 -1
- package/dist/evidence/graph-ontology-relation-gate.d.ts +10 -0
- package/dist/evidence/graph-ontology-relation-gate.js +46 -0
- package/dist/evidence/headroom-replay-verifier.d.ts +19 -0
- package/dist/evidence/headroom-replay-verifier.js +86 -0
- package/dist/memory/local-graph-memory-store.d.ts +75 -0
- package/dist/memory/local-graph-memory-store.js +570 -0
- package/dist/orchestration/dag.d.ts +22 -1
- package/dist/orchestration/evidence-gate.js +12 -0
- package/dist/orchestration/executor.js +108 -15
- package/dist/orchestration/loop-controller-headroom.d.ts +6 -0
- package/dist/orchestration/loop-controller-headroom.js +33 -0
- package/dist/orchestration/scheduler.d.ts +2 -0
- package/dist/orchestration/scheduler.js +3 -0
- package/dist/orchestration/task-graph.d.ts +17 -0
- package/dist/orchestration/task-graph.js +38 -0
- package/dist/providers/codex-cli-runner.js +17 -2
- package/dist/runtime/agent-runtime.d.ts +32 -3
- package/dist/runtime/agent-runtime.js +20 -7
- package/dist/runtime/authority-matrix.d.ts +23 -0
- package/dist/runtime/authority-matrix.js +159 -0
- package/dist/runtime/chat-advisory-runtime.js +3 -0
- package/dist/runtime/codex-cli-runtime.js +2 -0
- package/dist/runtime/codex-runtime.d.ts +4 -1
- package/dist/runtime/codex-runtime.js +34 -12
- package/dist/runtime/context-broker-converter.js +32 -2
- package/dist/runtime/context-broker.js +18 -0
- package/dist/runtime/contracts/evidence.d.ts +52 -0
- package/dist/runtime/contracts/evidence.js +128 -1
- package/dist/runtime/contracts/shared.d.ts +27 -0
- package/dist/runtime/data-retention-gate.d.ts +42 -0
- package/dist/runtime/data-retention-gate.js +123 -0
- package/dist/runtime/deepseek-runtime.d.ts +5 -1
- package/dist/runtime/deepseek-runtime.js +13 -7
- package/dist/runtime/external-cli-adapter.js +20 -7
- package/dist/runtime/freedomd-evidence-envelope.d.ts +57 -0
- package/dist/runtime/freedomd-evidence-envelope.js +110 -0
- package/dist/runtime/freedomd-exception.d.ts +32 -0
- package/dist/runtime/freedomd-exception.js +95 -0
- package/dist/runtime/freedomd-incidents.d.ts +23 -0
- package/dist/runtime/freedomd-incidents.js +103 -0
- package/dist/runtime/freedomd-policy.d.ts +35 -0
- package/dist/runtime/freedomd-policy.js +114 -0
- package/dist/runtime/freedomd-router.d.ts +66 -0
- package/dist/runtime/freedomd-router.js +433 -0
- package/dist/runtime/headroom-aware-loop-decision.d.ts +21 -0
- package/dist/runtime/headroom-aware-loop-decision.js +67 -0
- package/dist/runtime/headroom-loop-risk.d.ts +19 -0
- package/dist/runtime/headroom-loop-risk.js +43 -0
- package/dist/runtime/headroom-policy.d.ts +14 -1
- package/dist/runtime/headroom-policy.js +74 -12
- package/dist/runtime/kimi-api-runtime.d.ts +4 -1
- package/dist/runtime/kimi-api-runtime.js +35 -11
- package/dist/runtime/kimi-print-runtime.js +21 -0
- package/dist/runtime/kimi-wire-protocol-runtime.js +17 -1
- package/dist/runtime/local-llm-runtime.d.ts +5 -1
- package/dist/runtime/local-llm-runtime.js +14 -23
- package/dist/runtime/private-stderr.d.ts +13 -0
- package/dist/runtime/private-stderr.js +69 -0
- package/dist/runtime/prompt-envelope.d.ts +1 -1
- package/dist/runtime/provider-sovereignty.d.ts +81 -0
- package/dist/runtime/provider-sovereignty.js +285 -0
- package/dist/runtime/runtime-backed-task-runner.d.ts +1 -0
- package/dist/runtime/runtime-backed-task-runner.js +282 -10
- package/dist/runtime/runtime-bootstrap.d.ts +12 -0
- package/dist/runtime/runtime-bootstrap.js +56 -3
- package/dist/runtime/runtime-failure-classifier.d.ts +15 -0
- package/dist/runtime/runtime-failure-classifier.js +107 -0
- package/dist/runtime/runtime-health-probes.d.ts +30 -0
- package/dist/runtime/runtime-health-probes.js +102 -0
- package/dist/runtime/runtime-router.d.ts +6 -2
- package/dist/runtime/runtime-router.js +575 -53
- package/dist/runtime/structured-compaction.d.ts +107 -0
- package/dist/runtime/structured-compaction.js +414 -0
- package/dist/runtime/tool-dispatch-contracts.d.ts +7 -5
- package/dist/runtime/tool-dispatch-contracts.js +15 -4
- package/dist/runtime/tool-plane.d.ts +1 -1
- package/dist/runtime/tool-plane.js +49 -1
- package/dist/runtime/worker-manifest.js +1 -1
- package/dist/schema/evidence-bundle.schema.d.ts +8 -8
- package/dist/schema/proof-bundle.schema.d.ts +2 -2
- package/dist/util/hash.d.ts +2 -0
- package/dist/util/hash.js +13 -0
- package/dist/util/session.js +6 -5
- package/docs/2026-06-16/critical-issues.md +19 -0
- package/docs/2026-06-16/improvements.md +15 -0
- package/docs/2026-06-16/init-checklist.md +25 -0
- package/docs/2026-06-16/plan.md +20 -0
- package/docs/ARCHITECTURE_ANALYSIS_CODEGRAPH.md +2 -1
- package/docs/GSTACK_MIGRATION.md +1 -1
- package/docs/algorithm-hardening-playbook.md +219 -0
- package/docs/claims.md +1 -1
- package/docs/getting-started.md +1 -1
- package/docs/native-root-runtime-hardening.md +42 -32
- package/docs/post-0793-hardening-roadmap.md +123 -0
- package/docs/provider-maturity.md +18 -16
- package/docs/versioning.md +3 -3
- package/docs/what-is-omk.md +1 -1
- package/package.json +8 -4
- package/readmeasset/.npmignore +2 -0
- package/readmeasset/ASSET_INDEX.md +2 -0
- package/readmeasset/ASSET_PROVENANCE.md +40 -20
- package/readmeasset/omk-adaptorch-ouroboros-supermemory.svg +1 -1
- package/readmeasset/omk-control-surfaces.svg +1 -1
- package/readmeasset/omk-core-loop.svg +1 -1
- package/readmeasset/omk-freedomd-control-plane.svg +59 -0
- package/readmeasset/omk-freedomd-control-plane.webp +0 -0
- package/readmeasset/omk-init-control-loop.svg +1 -1
- package/readmeasset/omk-logo-mark.svg +1 -1
- package/readmeasset/omk-parallel-subagents.svg +1 -1
- package/readmeasset/omk-release-assertions.svg +1 -1
|
@@ -7,12 +7,12 @@ export declare const EvidenceBundleArtifactSchema: z.ZodObject<{
|
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
8
|
sha256: string;
|
|
9
9
|
path: string;
|
|
10
|
-
kind?: "
|
|
10
|
+
kind?: "diff" | "review" | "file" | "log" | "custom" | "metric" | undefined;
|
|
11
11
|
required?: boolean | undefined;
|
|
12
12
|
}, {
|
|
13
13
|
sha256: string;
|
|
14
14
|
path: string;
|
|
15
|
-
kind?: "
|
|
15
|
+
kind?: "diff" | "review" | "file" | "log" | "custom" | "metric" | undefined;
|
|
16
16
|
required?: boolean | undefined;
|
|
17
17
|
}>;
|
|
18
18
|
export declare const EvidenceBundleSchema: z.ZodObject<{
|
|
@@ -43,12 +43,12 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
|
|
|
43
43
|
}, "strip", z.ZodTypeAny, {
|
|
44
44
|
sha256: string;
|
|
45
45
|
path: string;
|
|
46
|
-
kind?: "
|
|
46
|
+
kind?: "diff" | "review" | "file" | "log" | "custom" | "metric" | undefined;
|
|
47
47
|
required?: boolean | undefined;
|
|
48
48
|
}, {
|
|
49
49
|
sha256: string;
|
|
50
50
|
path: string;
|
|
51
|
-
kind?: "
|
|
51
|
+
kind?: "diff" | "review" | "file" | "log" | "custom" | "metric" | undefined;
|
|
52
52
|
required?: boolean | undefined;
|
|
53
53
|
}>, "many">;
|
|
54
54
|
verifier: z.ZodObject<{
|
|
@@ -120,7 +120,7 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
|
|
|
120
120
|
artifacts: {
|
|
121
121
|
sha256: string;
|
|
122
122
|
path: string;
|
|
123
|
-
kind?: "
|
|
123
|
+
kind?: "diff" | "review" | "file" | "log" | "custom" | "metric" | undefined;
|
|
124
124
|
required?: boolean | undefined;
|
|
125
125
|
}[];
|
|
126
126
|
verifier: {
|
|
@@ -129,12 +129,12 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
|
|
|
129
129
|
checkedAt?: string | undefined;
|
|
130
130
|
};
|
|
131
131
|
commit: string;
|
|
132
|
+
changedFiles: string[];
|
|
132
133
|
redaction: {
|
|
133
134
|
summary: string;
|
|
134
135
|
applied: boolean;
|
|
135
136
|
leakedSecretPatterns?: string[] | undefined;
|
|
136
137
|
};
|
|
137
|
-
changedFiles: string[];
|
|
138
138
|
runtimeVersion: string;
|
|
139
139
|
model?: string | undefined;
|
|
140
140
|
nodeId?: string | undefined;
|
|
@@ -162,7 +162,7 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
|
|
|
162
162
|
artifacts: {
|
|
163
163
|
sha256: string;
|
|
164
164
|
path: string;
|
|
165
|
-
kind?: "
|
|
165
|
+
kind?: "diff" | "review" | "file" | "log" | "custom" | "metric" | undefined;
|
|
166
166
|
required?: boolean | undefined;
|
|
167
167
|
}[];
|
|
168
168
|
verifier: {
|
|
@@ -171,12 +171,12 @@ export declare const EvidenceBundleSchema: z.ZodObject<{
|
|
|
171
171
|
checkedAt?: string | undefined;
|
|
172
172
|
};
|
|
173
173
|
commit: string;
|
|
174
|
+
changedFiles: string[];
|
|
174
175
|
redaction: {
|
|
175
176
|
summary: string;
|
|
176
177
|
applied: boolean;
|
|
177
178
|
leakedSecretPatterns?: string[] | undefined;
|
|
178
179
|
};
|
|
179
|
-
changedFiles: string[];
|
|
180
180
|
runtimeVersion: string;
|
|
181
181
|
model?: string | undefined;
|
|
182
182
|
nodeId?: string | undefined;
|
|
@@ -96,6 +96,7 @@ export declare const ProofBundleSchema: z.ZodObject<{
|
|
|
96
96
|
}, "strip", z.ZodTypeAny, {
|
|
97
97
|
runId: string;
|
|
98
98
|
schemaVersion: "omk.proof-bundle.v1";
|
|
99
|
+
providerPolicy: string;
|
|
99
100
|
commit: string;
|
|
100
101
|
title: string;
|
|
101
102
|
files: {
|
|
@@ -112,7 +113,6 @@ export declare const ProofBundleSchema: z.ZodObject<{
|
|
|
112
113
|
inspectJson?: string | undefined;
|
|
113
114
|
diffPatch?: string | undefined;
|
|
114
115
|
};
|
|
115
|
-
providerPolicy: string;
|
|
116
116
|
omkVersion: string;
|
|
117
117
|
verdict: "failed" | "partial" | "passed";
|
|
118
118
|
runtimeVersion: "v1.2";
|
|
@@ -123,6 +123,7 @@ export declare const ProofBundleSchema: z.ZodObject<{
|
|
|
123
123
|
}, {
|
|
124
124
|
runId: string;
|
|
125
125
|
schemaVersion: "omk.proof-bundle.v1";
|
|
126
|
+
providerPolicy: string;
|
|
126
127
|
commit: string;
|
|
127
128
|
title: string;
|
|
128
129
|
files: {
|
|
@@ -139,7 +140,6 @@ export declare const ProofBundleSchema: z.ZodObject<{
|
|
|
139
140
|
inspectJson?: string | undefined;
|
|
140
141
|
diffPatch?: string | undefined;
|
|
141
142
|
};
|
|
142
|
-
providerPolicy: string;
|
|
143
143
|
omkVersion: string;
|
|
144
144
|
verdict: "failed" | "partial" | "passed";
|
|
145
145
|
runtimeVersion: "v1.2";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
export function sha256Hex(value) {
|
|
4
|
+
return createHash("sha256").update(value, "utf-8").digest("hex");
|
|
5
|
+
}
|
|
6
|
+
export function sha256FileSync(path) {
|
|
7
|
+
try {
|
|
8
|
+
return createHash("sha256").update(readFileSync(path)).digest("hex");
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
}
|
package/dist/util/session.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { writeFile, readdir, readFile } from "fs/promises";
|
|
1
|
+
import { writeFile, readdir, readFile, mkdir } from "fs/promises";
|
|
2
2
|
import { join } from "path";
|
|
3
|
-
import {
|
|
3
|
+
import { getOmkPath, pathExists, validateRunId } from "./fs.js";
|
|
4
|
+
import { getRunArtifactPath } from "./run-store.js";
|
|
4
5
|
export function createOmkSessionId(prefix = "session") {
|
|
5
6
|
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
6
7
|
return `${prefix}-${timestamp}-${process.pid}`;
|
|
@@ -13,8 +14,8 @@ export function createOmkSessionEnv(projectRoot, sessionId) {
|
|
|
13
14
|
}
|
|
14
15
|
export async function ensureSessionDir(runId) {
|
|
15
16
|
const sanitized = validateRunId(runId);
|
|
16
|
-
const dir =
|
|
17
|
-
await
|
|
17
|
+
const dir = getRunArtifactPath(sanitized, ".");
|
|
18
|
+
await mkdir(dir, { recursive: true });
|
|
18
19
|
return dir;
|
|
19
20
|
}
|
|
20
21
|
export async function writeSessionMeta(runId, meta) {
|
|
@@ -30,7 +31,7 @@ export async function writeSessionMeta(runId, meta) {
|
|
|
30
31
|
}
|
|
31
32
|
export async function readSessionMeta(runId) {
|
|
32
33
|
const sanitized = validateRunId(runId);
|
|
33
|
-
const metaPath =
|
|
34
|
+
const metaPath = getRunArtifactPath(sanitized, "session.json");
|
|
34
35
|
if (!(await pathExists(metaPath)))
|
|
35
36
|
return null;
|
|
36
37
|
try {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# 2026-06-16 Critical Issues
|
|
2
|
+
|
|
3
|
+
## Critical Init Status
|
|
4
|
+
|
|
5
|
+
### Missing critical artifacts
|
|
6
|
+
- `.omk/hooks/pre-shell-guard.sh` — destructive shell guard
|
|
7
|
+
- `.omk/hooks/protect-secrets.sh` — secret write guard
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Critical Artifacts Present
|
|
11
|
+
- ✅ `AGENTS.md` — top-level operating contract
|
|
12
|
+
- ✅ `.kimi/AGENTS.md` — Kimi-specific operating rules
|
|
13
|
+
- ✅ `.omk/config.toml` — OMK project runtime settings
|
|
14
|
+
- ✅ `.omk/agents/root.yaml` — root coordinator agent
|
|
15
|
+
- ✅ `.kimi/mcp.json` — Kimi project MCP registry
|
|
16
|
+
- ✅ `.omk/memory/graph-state.json` — local ontology graph database
|
|
17
|
+
|
|
18
|
+
## Escalation Rule
|
|
19
|
+
- Treat missing shell/secret guards, root agent config, MCP registry, or ontology graph as critical until restored.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# 2026-06-16 Improvements
|
|
2
|
+
|
|
3
|
+
## Current Improvement Backlog
|
|
4
|
+
### Optional init/support artifacts to add or refresh
|
|
5
|
+
- None detected.
|
|
6
|
+
|
|
7
|
+
### Critical init artifacts currently blocking reliable chat startup
|
|
8
|
+
- `.omk/hooks/pre-shell-guard.sh` — destructive shell guard
|
|
9
|
+
- `.omk/hooks/protect-secrets.sh` — secret write guard
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Suggested Focus
|
|
13
|
+
- Keep `omk chat` startup idempotent and non-destructive.
|
|
14
|
+
- Prefer local graph memory for default ontology state.
|
|
15
|
+
- Keep generated daily docs small, dated, and safe to edit by hand.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# 2026-06-16 Required Init Checklist
|
|
2
|
+
|
|
3
|
+
**Run ID:** chat-2026-06-15T18-37-32-586Z-3029826
|
|
4
|
+
**Ontology graph:** `.omk/memory/graph-state.json`
|
|
5
|
+
|
|
6
|
+
## Required Artifacts
|
|
7
|
+
- ✅ `AGENTS.md` — critical; top-level operating contract
|
|
8
|
+
- ✅ `.kimi/AGENTS.md` — critical; Kimi-specific operating rules
|
|
9
|
+
- ✅ `DESIGN.md` — support; design/brand source of truth
|
|
10
|
+
- ✅ `.omk/config.toml` — critical; OMK project runtime settings
|
|
11
|
+
- ✅ `.omk/agents/root.yaml` — critical; root coordinator agent
|
|
12
|
+
- ✅ `.kimi/mcp.json` — critical; Kimi project MCP registry
|
|
13
|
+
- ✅ `.omk/mcp.json` — support; legacy OMK MCP fallback
|
|
14
|
+
- ✅ `.omk/lsp.json` — support; bundled TypeScript/Python LSP config
|
|
15
|
+
- 🚨 `.omk/hooks/pre-shell-guard.sh` — critical; destructive shell guard
|
|
16
|
+
- 🚨 `.omk/hooks/protect-secrets.sh` — critical; secret write guard
|
|
17
|
+
- ✅ `.omk/memory/graph-state.json` — critical; local ontology graph database
|
|
18
|
+
- ✅ `.kimi/skills` — support; Kimi skill directory
|
|
19
|
+
- ✅ `.agents/skills` — support; portable skill directory
|
|
20
|
+
|
|
21
|
+
## Recovery Command
|
|
22
|
+
```bash
|
|
23
|
+
omk init
|
|
24
|
+
omk doctor
|
|
25
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# 2026-06-16 OMK Chat Plan
|
|
2
|
+
|
|
3
|
+
**Run ID:** chat-2026-06-15T18-37-32-586Z-3029826
|
|
4
|
+
**Generated by:** omk chat bootstrap
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
- Start every chat with a dated workspace for planning, issue triage, and verification evidence.
|
|
8
|
+
- Keep ontology-backed memory available before the root coordinator starts.
|
|
9
|
+
- Make required init state visible without overwriting user-authored docs.
|
|
10
|
+
|
|
11
|
+
## Today Plan
|
|
12
|
+
1. Review `init-checklist.md` and resolve missing critical init artifacts first.
|
|
13
|
+
2. Use `improvements.md` as the active improvement backlog.
|
|
14
|
+
3. Use `critical-issues.md` for blocking defects, safety risks, and verification gaps.
|
|
15
|
+
4. Record command evidence before claiming work is complete.
|
|
16
|
+
|
|
17
|
+
## Stop Condition
|
|
18
|
+
- Critical init artifacts are present.
|
|
19
|
+
- Ontology graph exists at `.omk/memory/graph-state.json`.
|
|
20
|
+
- Any new code/docs changes have explicit verification evidence.
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> 분석일: 2026-05-25
|
|
4
4
|
> 도구: CodeGraph (SQLite 기반 코드 의존성 그래프)
|
|
5
|
-
> 대상: /home/yu/open_multi-agent_kit (open-multi-agent-kit v1.1.
|
|
5
|
+
> 대상: /home/yu/open_multi-agent_kit (open-multi-agent-kit@0.79.3, runtime contract family v1.2, pre-1.0)
|
|
6
|
+
> 최신화: 2026-06-15 — release truth, authority/evidence gates, health-aware routing, and spec-kit docs refreshed.
|
|
6
7
|
|
|
7
8
|
---
|
|
8
9
|
|
package/docs/GSTACK_MIGRATION.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# External Multi-Agent Stack → OMK Migration Guide
|
|
2
2
|
|
|
3
3
|
> Generic migration path from any external multi-agent orchestration stack (e.g., gstack, custom frameworks) to OMK.
|
|
4
|
-
> OMK v1.1.
|
|
4
|
+
> OMK `open-multi-agent-kit@0.79.3` (`v1.2` runtime contract family, `pre-1.0`) with externalized skill presets, scoped MCP/skills/hooks, evidence gates, and provider-neutral runtime routing.
|
|
5
5
|
|
|
6
6
|
## Why Migrate to OMK
|
|
7
7
|
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# OMK Algorithm Hardening Playbook
|
|
2
|
+
|
|
3
|
+
> How to evolve OMK's runtime algorithms safely, contract-first, and with evidence.
|
|
4
|
+
|
|
5
|
+
## 1. Principles
|
|
6
|
+
|
|
7
|
+
### 1.1 Change contracts before code
|
|
8
|
+
|
|
9
|
+
When hardening an algorithm, start with:
|
|
10
|
+
|
|
11
|
+
1. Type/interface changes (e.g., `AgentTask.safety`, `RuntimeHealthVectorV2`).
|
|
12
|
+
2. Unit tests that express the new contract in isolation.
|
|
13
|
+
3. Adapter updates to satisfy the compiler.
|
|
14
|
+
4. Integration tests.
|
|
15
|
+
5. Documentation updates.
|
|
16
|
+
|
|
17
|
+
This order catches contract violations at compile time rather than at runtime.
|
|
18
|
+
|
|
19
|
+
### 1.2 Declare, observe, then verify
|
|
20
|
+
|
|
21
|
+
For evidence gates:
|
|
22
|
+
|
|
23
|
+
- **Declare**: node/task says what evidence kinds are required.
|
|
24
|
+
- **Observe**: after execution, extract actual observations from stdout, metadata, artifacts.
|
|
25
|
+
- **Verify**: compare observations against declarations.
|
|
26
|
+
|
|
27
|
+
A declaration is never proof.
|
|
28
|
+
|
|
29
|
+
### 1.3 Runtime-mode authority
|
|
30
|
+
|
|
31
|
+
Authority is not provider identity. It is `(provider, runtimeMode)`:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
kimi:api → read, review (advisory)
|
|
35
|
+
kimi:cli → read, write, patch, shell, merge, review (authority)
|
|
36
|
+
deepseek:api → read, review (advisory)
|
|
37
|
+
codex:cli → read, plan, review (advisory unless explicit policy)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Any code path that selects a runtime must consult this matrix.
|
|
41
|
+
|
|
42
|
+
### 1.4 Fail-closed defaults
|
|
43
|
+
|
|
44
|
+
- Unknown health → route with penalty or block.
|
|
45
|
+
- Missing evidence → exit 78.
|
|
46
|
+
- Advisory runtime asked to write/shell/merge → exit 78.
|
|
47
|
+
- Low-confidence risk → downgrade to `ask`.
|
|
48
|
+
|
|
49
|
+
### 1.5 Preserve backward compatibility
|
|
50
|
+
|
|
51
|
+
- Do not remove old fields until the full phase is released.
|
|
52
|
+
- Use optional/new fields first, then deprecate.
|
|
53
|
+
- Keep existing smoke tests passing.
|
|
54
|
+
|
|
55
|
+
## 2. Step-by-step hardening loop
|
|
56
|
+
|
|
57
|
+
### Step 0 — Isolate the concern
|
|
58
|
+
|
|
59
|
+
Pick one algorithm concern per phase:
|
|
60
|
+
|
|
61
|
+
- evidence semantics
|
|
62
|
+
- health probes
|
|
63
|
+
- authority matrix
|
|
64
|
+
- prompt privacy
|
|
65
|
+
- audit graph
|
|
66
|
+
|
|
67
|
+
Do not mix two concerns in one diff.
|
|
68
|
+
|
|
69
|
+
### Step 1 — Specify the contract
|
|
70
|
+
|
|
71
|
+
Write the LaTeX/TypeScript contract first. Example:
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
// Before changing implementations, add the new contract.
|
|
75
|
+
export interface AgentTaskSafety {
|
|
76
|
+
readonly risk: string;
|
|
77
|
+
readonly approvalPolicy: string;
|
|
78
|
+
readonly sandboxMode: string;
|
|
79
|
+
readonly evidenceRequired: boolean;
|
|
80
|
+
readonly authorityMode: string;
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Step 2 — Add isolated tests
|
|
85
|
+
|
|
86
|
+
Create a new test file that fails before implementation:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
test/evidence-v2-declared-vs-observed.test.mjs
|
|
90
|
+
test/health-vector-tri-state.test.mjs
|
|
91
|
+
test/authority-matrix-kimi-api-advisory.test.mjs
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Step 3 — Implement behind a flag when possible
|
|
95
|
+
|
|
96
|
+
For large changes, use an environment flag:
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
const evidenceModelV2 = process.env.OMK_EVIDENCE_MODEL === "v2";
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
This lets you merge incrementally without breaking existing paths.
|
|
103
|
+
|
|
104
|
+
### Step 4 — Update adapters incrementally
|
|
105
|
+
|
|
106
|
+
For each runtime adapter:
|
|
107
|
+
|
|
108
|
+
1. Make it compile with the new contract.
|
|
109
|
+
2. Add a focused test for that adapter.
|
|
110
|
+
3. Move to the next adapter.
|
|
111
|
+
|
|
112
|
+
### Step 5 — Integrate and remove flag
|
|
113
|
+
|
|
114
|
+
Once all adapters and tests pass:
|
|
115
|
+
|
|
116
|
+
1. Default the flag to the new behavior.
|
|
117
|
+
2. Add a revert path.
|
|
118
|
+
3. Run full quality gates.
|
|
119
|
+
|
|
120
|
+
### Step 6 — Document and release-gate
|
|
121
|
+
|
|
122
|
+
- Update `docs/provider-maturity.md`, `docs/native-root-runtime-hardening.md`.
|
|
123
|
+
- Add the new behavior to `release:check` or a dedicated smoke script.
|
|
124
|
+
- Update `CHANGELOG.md`.
|
|
125
|
+
|
|
126
|
+
## 3. Parallel subagent orchestration
|
|
127
|
+
|
|
128
|
+
When spawning parallel workers (when the tool is available):
|
|
129
|
+
|
|
130
|
+
### 3.1 Decompose by concern, not by file
|
|
131
|
+
|
|
132
|
+
Each worker owns one concern end-to-end:
|
|
133
|
+
|
|
134
|
+
- evidence worker: contract + tests + runtime-backed + DAG executor
|
|
135
|
+
- health worker: vector v2 + adapters + scoring
|
|
136
|
+
- authority worker: matrix + resolver + docs + smoke
|
|
137
|
+
|
|
138
|
+
### 3.2 Grant least privilege
|
|
139
|
+
|
|
140
|
+
| Worker | Authority | Allowed paths | Blocked paths |
|
|
141
|
+
|--------|-----------|---------------|---------------|
|
|
142
|
+
| evidence | write-scoped | `src/runtime/contracts/evidence.ts`, `src/runtime/runtime-backed-task-runner.ts`, `src/orchestration/executor.ts`, `test/evidence-*.mjs` | secrets, env files |
|
|
143
|
+
| health | write-scoped | `src/runtime/contracts/shared.ts`, `src/runtime/runtime-router.ts`, `src/runtime/*-runtime.ts`, `test/health-*.mjs` | secrets, env files |
|
|
144
|
+
| authority | write-scoped | `src/runtime/authority-matrix.ts`, `src/runtime/runtime-bootstrap.ts`, `src/runtime/runtime-router.ts`, `docs/provider-maturity.md`, `test/authority-*.mjs` | secrets, env files |
|
|
145
|
+
|
|
146
|
+
### 3.3 Shared read-only reviewers
|
|
147
|
+
|
|
148
|
+
Run reviewer/QA/security lanes in parallel after implementation lanes:
|
|
149
|
+
|
|
150
|
+
- `omk-reviewer`: diff review, type safety
|
|
151
|
+
- `omk-tester`: test matrix, release gate
|
|
152
|
+
- `omk-security`: secret exposure, authority boundary
|
|
153
|
+
|
|
154
|
+
### 3.4 Synthesis gate
|
|
155
|
+
|
|
156
|
+
Do not merge until:
|
|
157
|
+
|
|
158
|
+
1. Every lane produced evidence.
|
|
159
|
+
2. `npm run check` passes.
|
|
160
|
+
3. `npm run release:check` passes.
|
|
161
|
+
4. New negative tests pass.
|
|
162
|
+
5. Documentation is updated.
|
|
163
|
+
|
|
164
|
+
## 4. Regression prevention
|
|
165
|
+
|
|
166
|
+
### 4.1 Test hierarchy
|
|
167
|
+
|
|
168
|
+
1. **Contract tests**: pure functions, no IO.
|
|
169
|
+
2. **Adapter tests**: runtime mocks, no live provider calls.
|
|
170
|
+
3. **Integration tests**: local CLI with `--dry-run`.
|
|
171
|
+
4. **Smoke tests**: real provider only in CI with ephemeral keys.
|
|
172
|
+
|
|
173
|
+
### 4.2 Required negative tests
|
|
174
|
+
|
|
175
|
+
For every new gate, add a negative test:
|
|
176
|
+
|
|
177
|
+
- Evidence declared but not observed → blocked.
|
|
178
|
+
- Health fail → runtime excluded or penalized.
|
|
179
|
+
- Advisory runtime asked for write → exit 78.
|
|
180
|
+
- Private prompt leaked to public node → redaction/failure.
|
|
181
|
+
|
|
182
|
+
### 4.3 Durable checkpoints
|
|
183
|
+
|
|
184
|
+
Before each phase:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
git branch phase-<N>-<concern>
|
|
188
|
+
npm run check
|
|
189
|
+
npm run test
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
After each phase:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
npm run check
|
|
196
|
+
npm run release:check
|
|
197
|
+
git commit -m "feat(<concern>): <phase N> hardening"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## 5. When to stop
|
|
201
|
+
|
|
202
|
+
Stop a phase and ask for guidance when:
|
|
203
|
+
|
|
204
|
+
- A contract change would break public CLI behavior.
|
|
205
|
+
- A runtime adapter cannot satisfy the new contract without a large refactor.
|
|
206
|
+
- `npm run check` fails and the fix is not local.
|
|
207
|
+
- A lane would need to write files outside its granted scope.
|
|
208
|
+
|
|
209
|
+
## 6. Checklist
|
|
210
|
+
|
|
211
|
+
- [ ] Contract specified in TypeScript/LaTeX
|
|
212
|
+
- [ ] Isolated failing tests added
|
|
213
|
+
- [ ] Implementation behind flag or in isolated file
|
|
214
|
+
- [ ] All adapters updated incrementally
|
|
215
|
+
- [ ] Negative tests added
|
|
216
|
+
- [ ] Documentation updated
|
|
217
|
+
- [ ] Quality gates pass
|
|
218
|
+
- [ ] Evidence artifacts recorded
|
|
219
|
+
- [ ] Result artifact written
|
package/docs/claims.md
CHANGED
|
@@ -66,7 +66,7 @@ Evidence:
|
|
|
66
66
|
|
|
67
67
|
## Claim: OMK is a stable 1.x release
|
|
68
68
|
|
|
69
|
-
Status: not claimed. Current source version is `0.
|
|
69
|
+
Status: not claimed. Current source version is `0.80.0` (`pre-1.0`); `v1.2` is a runtime contract family.
|
|
70
70
|
|
|
71
71
|
Evidence:
|
|
72
72
|
- [versioning](versioning.md)
|
package/docs/getting-started.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Getting Started
|
|
2
2
|
|
|
3
|
-
Source release target: `open-multi-agent-kit@0.
|
|
3
|
+
Source release target: `open-multi-agent-kit@0.80.0`. Treat npm latest claims as valid only after registry verification and release gates pass.
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
# Native Root Runtime Hardening
|
|
2
2
|
|
|
3
|
-
Last updated: 2026-
|
|
4
|
-
Current `
|
|
3
|
+
Last updated: 2026-06-15
|
|
4
|
+
Current package version: `open-multi-agent-kit@0.79.3`
|
|
5
|
+
Runtime contract family: `v1.2`
|
|
6
|
+
Release channel: `pre-1.0`
|
|
5
7
|
|
|
6
8
|
## Current State
|
|
7
9
|
|
|
8
|
-
OMK is
|
|
10
|
+
OMK is the root orchestrator. Kimi, Codex, DeepSeek, OpenCode, CommandCode, GLM, and future providers are runtime/provider lanes selected through OMK-owned contracts. API advisory runtimes remain read/review/advisory unless a runtime-mode contract grants write/shell/merge authority.
|
|
9
11
|
|
|
10
|
-
This is still a hardening milestone, not a stable
|
|
12
|
+
This is still a hardening milestone, not a stable 1.x or OS-level sandbox claim. The current release stop condition is:
|
|
11
13
|
|
|
12
14
|
- Local `npm run release:check` must pass on the exact release diff.
|
|
13
|
-
- GitHub Actions Smoke Test must pass on the exact commit.
|
|
14
|
-
- GitHub Actions CI must pass on the exact commit.
|
|
15
|
-
-
|
|
15
|
+
- GitHub Actions Smoke Test must pass on the exact commit/tag.
|
|
16
|
+
- GitHub Actions CI or Release workflow gates must pass on the exact commit/tag.
|
|
17
|
+
- npm registry `latest` must be verified when a release claim references a published version.
|
|
18
|
+
- Release evidence must be kept under `.omk/runs/<run-id>/`, `.omk/release-evidence/<short-sha>/`, or an equivalent run artifact path.
|
|
16
19
|
|
|
17
20
|
Fresh verification at the time of this update:
|
|
18
21
|
|
|
19
|
-
- `
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
+
- `open-multi-agent-kit@0.79.3` is published as npm `latest`.
|
|
23
|
+
- Main CI, main Smoke, tag Release, and tag Smoke passed for `v0.79.3` after rerunning transient failures.
|
|
24
|
+
- Local verification for the machine-checkable hardening slice passed: `npm run check`, `npm run build:clean`, `npm run lint`, `npm run secret:scan`, `npm run version:check`, targeted runtime tests, and `npm test`.
|
|
22
25
|
|
|
23
26
|
For the LaTeX/paper-ready algorithm appendix and acceptance criteria, see
|
|
24
27
|
[Native Root Runtime Algorithms](./native-root-runtime-algorithms.md). Treat
|
|
25
|
-
that appendix as hardening criteria
|
|
26
|
-
|
|
28
|
+
that appendix as hardening criteria; release claims still require exact-diff
|
|
29
|
+
local gates, CI/smoke, and registry evidence.
|
|
27
30
|
|
|
28
31
|
## Runtime Safety Contract
|
|
29
32
|
|
|
@@ -43,7 +46,7 @@ Native chat turns must be default-safe. A turn should request only the minimum c
|
|
|
43
46
|
|-----------|----------------|--------------|
|
|
44
47
|
| `read` | explain, review, summarize, inspect docs | `read` only |
|
|
45
48
|
| `write` | edit, fix, implement, refactor | `read`, `write`, `patch` |
|
|
46
|
-
| `shell` | run tests, build, execute commands | `read`, `write`, `shell` with approval policy |
|
|
49
|
+
| `shell` | run tests, build, execute commands | `read`, `write`, `shell` with approval policy and required command evidence |
|
|
47
50
|
| `merge` | publish, release, push, merge, destructive changes | authority provider plus release/security gates |
|
|
48
51
|
|
|
49
52
|
DeepSeek remains an advisory/read/review lane unless an explicit future contract grants safe write/shell execution. Write/shell tasks should route to Kimi, Codex, or a configured authority provider with the matching approval and sandbox policy.
|
|
@@ -75,9 +78,7 @@ Unknown or unresolved authority must fail with remediation instead of silently d
|
|
|
75
78
|
|
|
76
79
|
### Provider health probes
|
|
77
80
|
|
|
78
|
-
Related: Algorithm 5.
|
|
79
|
-
evidence metadata; uniform auth/model/quota health remains part of this
|
|
80
|
-
hardening backlog.
|
|
81
|
+
Related: Algorithm 5. Runtime routing now filters unavailable runtimes in async execution paths and includes health in normalized route scoring. The next hardening step is to expand every adapter to a uniform auth/model/quota/rate-limit/latency vector.
|
|
81
82
|
|
|
82
83
|
Provider bootstrap must distinguish:
|
|
83
84
|
|
|
@@ -94,31 +95,40 @@ Related: Algorithm 4 and Algorithm 7.
|
|
|
94
95
|
|
|
95
96
|
MCP, skills, and hooks must not disappear silently. Runtime manifests should include diagnostics for parse/read failures, unknown names, and scope drops. If a task requires runtime MCP, invalid MCP config is a hard failure.
|
|
96
97
|
|
|
98
|
+
## Current status after 0.79.3 hardening
|
|
99
|
+
|
|
100
|
+
Completed foundations:
|
|
101
|
+
|
|
102
|
+
- Runtime authority is resolved by `(provider, runtimeMode)` through `src/runtime/authority-matrix.ts`; native routing also consults this matrix instead of maintaining a separate advisory-provider list.
|
|
103
|
+
- `OMK_TOOL_AUTHORITY_MODE=enforce` coverage is release-gated through the shared `release:gate-core` script and includes a native-turn subprocess enforcement smoke.
|
|
104
|
+
- Native prompt payloads are private artifacts; public synthetic node labels carry prompt hashes, not raw prompts.
|
|
105
|
+
- `prompt:privacy:check` audits private prompt artifacts against public run artifacts, decision traces, and graph-memory snapshots, and is part of the release gate.
|
|
106
|
+
- Per-turn route/result artifacts are written best-effort and replay-indexed with SHA-256 hashes.
|
|
107
|
+
- Evidence declarations and produced observations are type-separated; command/test evidence requires high-confidence metadata or artifact observations, not stdout keywords alone, and DAG executor/verify/replay paths bridge through the same EvidenceGate v2 contract.
|
|
108
|
+
- Provider route/evidence audit nodes are materialized into local graph memory on native turns, with Provider/Artifact nodes, `EvidenceRequirement -> SATISFIED_BY -> EvidenceObservation` semantics, and route/evidence/artifact edges.
|
|
109
|
+
- Runtime health checks accept requested probe levels; API, local LLM, Codex CLI, and external CLI adapters perform static/cheap/live probes with latency and auth/model/quota/rate-limit dimensions where observable. Router health scoring is normalized and high-risk probes fail closed on unknown runtime/auth/model dimensions.
|
|
110
|
+
- Runtime failure stderr is redacted before public exposure and can be retained as a private redacted full artifact in debug mode, including direct `toTaskResult` conversion paths outside `RuntimeRouter`.
|
|
111
|
+
- Mixed-provider advisory reviewer + CLI coder/verifier routing has regression coverage.
|
|
112
|
+
- Native risk classification is negation-aware, so excluded scopes such as `릴리즈 제외`, `no release`, or `npm 체크 제외` do not trigger false merge/shell routing.
|
|
113
|
+
- Runtime routing now classifies failed attempts (`auth`, `quota`, `rate_limit`, `timeout`, `model`, `runtime`, `authority`, `transient`) and opens short-lived in-process circuit breakers so fallback runtimes are tried without repeatedly hitting known-bad adapters.
|
|
114
|
+
- Runtime scoring reads audit-graph `ProviderRoute -> EVIDENCED_BY -> Evidence` pass/fail observations, so local graph memory can influence future route ordering without exposing raw logs.
|
|
115
|
+
- The scheduler exposes critical-path runnable-plan metadata (`criticalPathDepth`, downstream fanout, score, evidence flags) for replay/debug panels.
|
|
116
|
+
- Headroom compaction uses an explicit `omk.structured-compaction.v1` contract for required task/routing/evidence/safety/capability sections.
|
|
117
|
+
|
|
97
118
|
## P0 Backlog
|
|
98
119
|
|
|
99
|
-
1.
|
|
100
|
-
2. Keep explicit DeepSeek routes read-only/advisory or block write/shell with a clear fallback message.
|
|
101
|
-
3. Propagate approval policy and sandbox mode into runtime adapters, especially Codex CLI.
|
|
102
|
-
4. Resolve `authority` to a concrete provider during runtime bootstrap.
|
|
103
|
-
5. Replace binary-only provider auth checks with structured provider health probes.
|
|
104
|
-
6. Keep release evidence current; do not tag/publish while CI is red.
|
|
120
|
+
1. Keep release evidence current; do not tag/publish while exact-diff CI/smoke or registry verification is missing.
|
|
105
121
|
|
|
106
122
|
## P1 Backlog
|
|
107
123
|
|
|
108
|
-
1.
|
|
109
|
-
2.
|
|
110
|
-
3. Remove `cmd` as a CommandCode fallback binary.
|
|
111
|
-
4. Emit tool-plane diagnostics for MCP config parse/read failures.
|
|
112
|
-
5. Gate Kimi failure stderr previews behind `OMK_DEBUG=1` and redaction.
|
|
113
|
-
6. Preserve routing metadata in external CLI adapter `execute(task)` paths.
|
|
124
|
+
1. Extend exact-diff CI status ingestion once a remote check surface is available in the current runtime.
|
|
125
|
+
2. Add provider-specific model-existence probes where vendors expose safe no-token model metadata or non-generating validation endpoints.
|
|
114
126
|
|
|
115
127
|
## P2 Backlog
|
|
116
128
|
|
|
117
129
|
1. Add configurable non-zero exit behavior for native root-loop turn failures.
|
|
118
|
-
2.
|
|
119
|
-
3.
|
|
120
|
-
4. Persist per-turn route artifacts under `.omk/runs/<run-id>/turns/<turn-id>.json`.
|
|
121
|
-
5. Link provider routes and evidence gates into graph memory for replay/audit.
|
|
130
|
+
2. Add experimental OS sandbox modes only behind explicit opt-in and without public stable claims.
|
|
131
|
+
3. Add broader pty/TTY regression coverage for scroll-safe rendering and interactive selectors.
|
|
122
132
|
|
|
123
133
|
## Spec-Kit Acceptance Gates
|
|
124
134
|
|