open-multi-agent-kit 0.78.6 → 0.78.7
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/AGENTS.md +1 -1
- package/CHANGELOG.md +26 -0
- package/MATURITY.md +2 -2
- package/README.md +19 -4
- package/dist/brand/night-city.theme.json +80 -0
- package/dist/brand/palette.d.ts +73 -177
- package/dist/brand/palette.js +115 -39
- package/dist/brand/rust-forge.theme.json +216 -0
- package/dist/brand/theme-compiled.d.ts +61 -0
- package/dist/brand/theme-compiled.js +241 -0
- package/dist/brand/theme.js +50 -37
- package/dist/cli/release-promotion-gate.d.ts +8 -1
- package/dist/cli/release-promotion-gate.js +20 -9
- package/dist/cli/root.d.ts +1 -0
- package/dist/cli/root.js +2 -1
- package/dist/cli/theme/index.d.ts +11 -2
- package/dist/cli/theme/index.js +6 -1
- package/dist/cli/theme/oklab-quantize.d.ts +29 -0
- package/dist/cli/theme/oklab-quantize.js +105 -0
- package/dist/cli/theme/render-table.d.ts +59 -0
- package/dist/cli/theme/render-table.js +112 -0
- package/dist/cli/theme/status-frame.d.ts +10 -0
- package/dist/cli/theme/status-frame.js +22 -0
- package/dist/cli/theme/terminal-capability.d.ts +6 -1
- package/dist/cli/theme/terminal-capability.js +20 -4
- package/dist/cli/theme/theme-doc.d.ts +22 -0
- package/dist/cli/theme/theme-doc.js +97 -0
- package/dist/cli/theme/theme-registry.js +39 -18
- package/dist/cli/theme/tier-explain.d.ts +21 -0
- package/dist/cli/theme/tier-explain.js +60 -0
- package/dist/cli/ui/green-rain-renderer.js +3 -2
- package/dist/cli/ui/neon-grid-renderer.js +4 -3
- package/dist/cli/ui/rust-forge-renderer.js +17 -3
- package/dist/cli/ui/system24-renderer.d.ts +18 -1
- package/dist/cli/ui/system24-renderer.js +39 -16
- package/dist/cli/v2/chat-repl.js +3 -1
- package/dist/cli/v2/cli-v2-skeleton.d.ts +6 -0
- package/dist/cli/v2/cli-v2-skeleton.js +121 -9
- package/dist/cli/v2/interactive-prompt.d.ts +1 -0
- package/dist/cli/v2/interactive-prompt.js +6 -2
- package/dist/commands/chat/core.js +2 -2
- package/dist/commands/chat/runtime.js +2 -0
- package/dist/commands/chat/utils.js +12 -4
- package/dist/commands/cockpit/render.js +102 -64
- package/dist/commands/cockpit/utils.d.ts +2 -0
- package/dist/commands/design.js +18 -16
- package/dist/commands/doctor/checks.d.ts +0 -1
- package/dist/commands/doctor/checks.js +1 -36
- package/dist/commands/doctor/report.js +0 -11
- package/dist/commands/init/content.d.ts +1 -1
- package/dist/commands/init/content.js +3 -11
- package/dist/commands/init.js +2 -2
- package/dist/commands/mcp/config.d.ts +32 -0
- package/dist/commands/mcp/config.js +264 -0
- package/dist/commands/mcp/doctor-fix.d.ts +12 -0
- package/dist/commands/mcp/doctor-fix.js +261 -0
- package/dist/commands/mcp/doctor.d.ts +55 -0
- package/dist/commands/mcp/doctor.js +401 -0
- package/dist/commands/mcp/list.d.ts +1 -0
- package/dist/commands/mcp/list.js +56 -0
- package/dist/commands/mcp/shared.d.ts +47 -0
- package/dist/commands/mcp/shared.js +192 -0
- package/dist/commands/mcp/test.d.ts +5 -0
- package/dist/commands/mcp/test.js +457 -0
- package/dist/commands/mcp.d.ts +8 -104
- package/dist/commands/mcp.js +5 -1603
- package/dist/contracts/proof.d.ts +1 -1
- package/dist/goal/control-loop.d.ts +15 -0
- package/dist/goal/control-loop.js +39 -5
- package/dist/hud/render.d.ts +2 -0
- package/dist/hud/render.js +7 -1
- package/dist/mcp/secret-scanner.d.ts +6 -0
- package/dist/mcp/secret-scanner.js +44 -11
- package/dist/memory/graph-delta-log.d.ts +137 -0
- package/dist/memory/graph-delta-log.js +650 -0
- package/dist/memory/graph-viewer.js +13 -32
- package/dist/memory/local-graph-memory-store.d.ts +36 -3
- package/dist/memory/local-graph-memory-store.js +255 -10
- package/dist/orchestration/log-streamer.js +13 -8
- package/dist/orchestration/routing.d.ts +4 -0
- package/dist/orchestration/routing.js +28 -3
- package/dist/orchestration/state-persister.js +8 -1
- package/dist/providers/anthropic-messages-runner.d.ts +17 -0
- package/dist/providers/anthropic-messages-runner.js +197 -0
- package/dist/providers/model-registry.d.ts +1 -1
- package/dist/providers/model-registry.js +37 -3
- package/dist/providers/provider-runtime.js +27 -11
- package/dist/providers/thinking-levels.js +4 -1
- package/dist/providers/types.d.ts +3 -3
- package/dist/runtime/contracts/weakness-remediation.d.ts +9 -1
- package/dist/runtime/contracts/weakness-remediation.js +9 -1
- package/dist/runtime/router-v2-scoring.d.ts +8 -3
- package/dist/runtime/router-v2-scoring.js +27 -22
- package/dist/runtime/runtime-router.d.ts +5 -0
- package/dist/runtime/runtime-router.js +40 -8
- package/dist/runtime/sandbox-profile.d.ts +29 -0
- package/dist/runtime/sandbox-profile.js +101 -0
- package/dist/runtime/slash-commands.js +300 -2
- package/dist/runtime/tool-dispatch-contracts.d.ts +15 -0
- package/dist/runtime/tool-dispatch-contracts.js +12 -0
- package/dist/runtime/weights-config.d.ts +90 -0
- package/dist/runtime/weights-config.js +249 -0
- package/dist/schema/envelope.schema.d.ts +18 -18
- package/dist/schema/evidence.schema.d.ts +2 -2
- package/dist/schema/proof-bundle.schema.d.ts +6 -6
- package/dist/schema/proof-bundle.schema.js +0 -1
- package/dist/schema/provider.schema.d.ts +2 -2
- package/dist/schema/run-manifest.schema.d.ts +16 -16
- package/dist/theme/ansi.js +9 -2
- package/dist/theme/extended-palette.d.ts +85 -0
- package/dist/theme/extended-palette.js +108 -0
- package/dist/theme/layout.js +29 -8
- package/dist/theme/metrics.js +5 -5
- package/dist/theme/parallel.js +25 -15
- package/dist/ui/omk-sigil.js +5 -14
- package/dist/ui/omk-working-sweep.js +5 -15
- package/dist/util/chat-agent-mode.d.ts +11 -0
- package/dist/util/chat-agent-mode.js +41 -8
- package/dist/util/chat-cockpit.d.ts +9 -0
- package/dist/util/chat-cockpit.js +77 -20
- package/dist/util/fs/core.d.ts +5 -0
- package/dist/util/fs/core.js +35 -0
- package/dist/util/fs/internal.d.ts +14 -0
- package/dist/util/fs/internal.js +169 -0
- package/dist/util/fs/kimi-sync.d.ts +41 -0
- package/dist/util/fs/kimi-sync.js +495 -0
- package/dist/util/fs/logo.d.ts +2 -0
- package/dist/util/fs/logo.js +78 -0
- package/dist/util/fs/manifest.d.ts +6 -0
- package/dist/util/fs/manifest.js +40 -0
- package/dist/util/fs/mcp-diagnose.d.ts +15 -0
- package/dist/util/fs/mcp-diagnose.js +204 -0
- package/dist/util/fs/mcp-runtime-config.d.ts +23 -0
- package/dist/util/fs/mcp-runtime-config.js +412 -0
- package/dist/util/fs/paths.d.ts +13 -0
- package/dist/util/fs/paths.js +82 -0
- package/dist/util/fs/preflight.d.ts +27 -0
- package/dist/util/fs/preflight.js +271 -0
- package/dist/util/fs.d.ts +8 -128
- package/dist/util/fs.js +8 -1757
- package/dist/util/terminal-layout.js +5 -1
- package/dist/util/version.js +2 -1
- package/docs/2026-06-11/critical-issues.md +20 -0
- package/docs/2026-06-11/improvements.md +14 -0
- package/docs/2026-06-11/init-checklist.md +25 -0
- package/docs/2026-06-11/plan.md +20 -0
- package/docs/ARCHITECTURE_ANALYSIS_CODEGRAPH.md +223 -0
- package/docs/adr/0001-no-native-rust-lane.md +52 -0
- package/docs/codex-oauth-setup.md +14 -0
- package/docs/decisions/2026-06-10-git-history-bloat.md +61 -0
- package/docs/decisions/ADR-theme-dark-only-assets.md +43 -0
- package/docs/getting-started.md +1 -1
- package/docs/headroom-omk-final-summary.md +188 -0
- package/docs/headroom-omk-integration.md +394 -0
- package/docs/headroom-omk-setup-guide.md +422 -0
- package/docs/headroom-omk-usage-examples.md +371 -0
- package/docs/provider-maturity.md +1 -1
- package/docs/versioning.md +3 -3
- package/package.json +10 -10
- package/readmeasset/.npmignore +2 -0
- package/readmeasset/ASSET_INDEX.md +7 -5
- package/readmeasset/ASSET_PROVENANCE.md +21 -5
- package/readmeasset/omk-control-surfaces.svg +55 -0
- package/readmeasset/omk-core-loop.svg +1 -0
- package/readmeasset/omk-logo-mark.svg +1 -0
- package/readmeasset/omk-release-assertions.svg +51 -0
- package/dist/native/linux-x64/omk-safety +0 -0
- package/dist/util/native-safety.d.ts +0 -28
- package/dist/util/native-safety.js +0 -118
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* - Progress feedback during long operations
|
|
9
9
|
*/
|
|
10
10
|
import * as clack from "@clack/prompts";
|
|
11
|
+
import { OMK_RUNTIME_VERSION } from "../../version.js";
|
|
11
12
|
/**
|
|
12
13
|
* Interactive provider selection.
|
|
13
14
|
* Returns selected provider/model string.
|
|
@@ -49,7 +50,7 @@ export async function promptThemeSelection(currentTheme) {
|
|
|
49
50
|
{ value: "omk", label: "OMK", hint: "Default colorful theme" },
|
|
50
51
|
{ value: "night-city", label: "Night City", hint: "README control image palette" },
|
|
51
52
|
{ value: "green-rain", label: "Green Rain", hint: "Phosphor signal console" },
|
|
52
|
-
{ value: "rust-forge", label: "Rust Forge", hint: "
|
|
53
|
+
{ value: "rust-forge", label: "Rust Forge", hint: "Oxidized forge control console" },
|
|
53
54
|
{ value: "neon-circuit", label: "Neon Circuit", hint: "High-energy neon terminal" },
|
|
54
55
|
{ value: "matrix", label: "Matrix", hint: "Classic green-on-black phosphor" },
|
|
55
56
|
{ value: "minimal", label: "Minimal", hint: "Clean, few colors" },
|
|
@@ -167,8 +168,11 @@ export async function withSpinner(message, fn) {
|
|
|
167
168
|
/**
|
|
168
169
|
* Intro/outro for OMK session.
|
|
169
170
|
*/
|
|
171
|
+
export function formatOmkIntroTitle(version) {
|
|
172
|
+
return `OMK root orchestrator · package v${version} · runtime ${OMK_RUNTIME_VERSION}`;
|
|
173
|
+
}
|
|
170
174
|
export function omkIntro(version) {
|
|
171
|
-
clack.intro(
|
|
175
|
+
clack.intro(formatOmkIntroTitle(version));
|
|
172
176
|
}
|
|
173
177
|
export function omkOutro(message) {
|
|
174
178
|
clack.outro(message);
|
|
@@ -300,7 +300,7 @@ export async function chatCommand(options) {
|
|
|
300
300
|
}
|
|
301
301
|
// ── plain / inline: run OMK native chat loop ──
|
|
302
302
|
const isPlain = layout === "plain";
|
|
303
|
-
const
|
|
303
|
+
const isOmkRootEntry = process.env.OMK_ENTRY_SURFACE === "omk-root-orchestrator";
|
|
304
304
|
if (!isPlain && ui !== "green-rain" && ui !== "neon-grid" && ui !== "rust-forge") {
|
|
305
305
|
const trust = `${effectiveResources.mcpScope} MCP / ${effectiveResources.skillsScope} skills`;
|
|
306
306
|
const agentDisplay = relative(root, effectiveAgentFile);
|
|
@@ -316,7 +316,7 @@ export async function chatCommand(options) {
|
|
|
316
316
|
}) + "\n");
|
|
317
317
|
}
|
|
318
318
|
// ── Deferred HUD + history: fire-and-forget, let the agent loop start immediately ──
|
|
319
|
-
if (!isPlain && !
|
|
319
|
+
if (!isPlain && !isOmkRootEntry) {
|
|
320
320
|
// Show a minimal status line while we defer the full HUD
|
|
321
321
|
const providerLabel = providerPolicy === "auto" ? "auto-detect" : providerPolicy;
|
|
322
322
|
const modeLabel = currentMode;
|
|
@@ -18,6 +18,7 @@ import { GreenRainRenderer } from "../../cli/ui/green-rain-renderer.js";
|
|
|
18
18
|
import { NeonGridRenderer } from "../../cli/ui/neon-grid-renderer.js";
|
|
19
19
|
import { RustForgeRenderer } from "../../cli/ui/rust-forge-renderer.js";
|
|
20
20
|
import { sanitizeUserVisibleOutput } from "../../util/user-visible-output.js";
|
|
21
|
+
import { setBrandPaletteTheme } from "../../brand/palette.js";
|
|
21
22
|
export function shouldUseDirectKimiFallback() {
|
|
22
23
|
return false;
|
|
23
24
|
}
|
|
@@ -237,6 +238,7 @@ export async function runChatRuntime(options, input) {
|
|
|
237
238
|
process.stdout.write(sanitizeUserVisibleOutput(text));
|
|
238
239
|
},
|
|
239
240
|
});
|
|
241
|
+
setBrandPaletteTheme(ui === "rust-forge" ? "rust-forge" : process.env.OMK_THEME);
|
|
240
242
|
const renderer = ui === "neon-grid"
|
|
241
243
|
? new NeonGridRenderer()
|
|
242
244
|
: ui === "green-rain"
|
|
@@ -8,6 +8,9 @@ import { readFile, readdir } from "fs/promises";
|
|
|
8
8
|
import YAML from "yaml";
|
|
9
9
|
import { t } from "../../util/i18n.js";
|
|
10
10
|
import { getActiveRuntimePreset } from "../../util/resource-profile.js";
|
|
11
|
+
import { setBrandPaletteTheme } from "../../brand/palette.js";
|
|
12
|
+
import { getOmkVersionSync } from "../../util/version.js";
|
|
13
|
+
import { OMK_RUNTIME_VERSION } from "../../version.js";
|
|
11
14
|
export function mergeTodos(existing, incoming) {
|
|
12
15
|
const map = new Map();
|
|
13
16
|
for (const t of existing) {
|
|
@@ -79,6 +82,7 @@ export function resolveChatWorkerCount(requested, fallback) {
|
|
|
79
82
|
return trimmed;
|
|
80
83
|
}
|
|
81
84
|
export function renderChatIntro(brand, meta) {
|
|
85
|
+
setBrandPaletteTheme(brand === "rust-forge" ? "rust-forge" : process.env.OMK_THEME);
|
|
82
86
|
const titleKey = {
|
|
83
87
|
omk: "chat.intro.omk",
|
|
84
88
|
"green-rain": "chat.intro.greenRain",
|
|
@@ -102,20 +106,24 @@ export function renderChatIntro(brand, meta) {
|
|
|
102
106
|
lines.push("");
|
|
103
107
|
}
|
|
104
108
|
else if (brand === "rust-forge") {
|
|
105
|
-
lines.push(style.rustBold("▣ OMK//RUST-FORGE"));
|
|
106
|
-
lines.push(style.gray("
|
|
107
|
-
lines.push(style.gray("
|
|
109
|
+
lines.push(style.rustBold("▣ OMK//RUST-FORGE · ROOT ORCHESTRATOR"));
|
|
110
|
+
lines.push(style.gray(" OXIDIZED FORGE ONLINE"));
|
|
111
|
+
lines.push(style.gray(" OMK independent control: adapters are lanes, evidence is authority."));
|
|
112
|
+
lines.push(style.gray(" Heat: hot · Anvil: locked · Quench: ready · Loop: controlled."));
|
|
108
113
|
for (const artLine of OMK_SIMPLE_ASCII_ART.split("\n")) {
|
|
109
114
|
lines.push(style.rust(artLine));
|
|
110
115
|
}
|
|
111
116
|
lines.push("");
|
|
112
117
|
}
|
|
113
118
|
else if (brand !== "plain") {
|
|
114
|
-
lines.push(style.phosphorBold("◇ OMK//CONTROL"));
|
|
119
|
+
lines.push(style.phosphorBold("◇ OMK//CONTROL · ROOT ORCHESTRATOR"));
|
|
115
120
|
lines.push(style.gray(" OMK ONLINE"));
|
|
116
121
|
lines.push(style.gray(" Route: online · Verify: armed · Loop: controlled."));
|
|
117
122
|
lines.push("");
|
|
118
123
|
}
|
|
124
|
+
if (brand !== "plain") {
|
|
125
|
+
lines.push(style.gray(` package v${getOmkVersionSync()} · runtime ${OMK_RUNTIME_VERSION}`));
|
|
126
|
+
}
|
|
119
127
|
lines.push(style.phosphorBold(`▸ ${title}`));
|
|
120
128
|
if (brand !== "plain") {
|
|
121
129
|
lines.push(` ${style.gray(t("chat.intro.agent") + ":")} ${style.cream(meta.agent)}`);
|
|
@@ -9,6 +9,8 @@ import { getProjectRootAsync, pathExists, getRunPath, getRunsDir, } from "../../
|
|
|
9
9
|
import { buildRunViewModel, parseRunStateResult, sanitizeForDisplay, } from "../../util/run-view-model.js";
|
|
10
10
|
import { style, sanitizeTerminalText, getSystemUsage, } from "../../util/theme.js";
|
|
11
11
|
import { renderMatrixRain } from "../../brand/matrix-rain.js";
|
|
12
|
+
import { BRAND_HEX, setBrandPaletteTheme } from "../../brand/palette.js";
|
|
13
|
+
import { getActiveBrandCockpitDetail, getActiveBrandCockpitSubtitle, } from "../../brand/theme-compiled.js";
|
|
12
14
|
import { visibleTerminalWidth, truncateLine, padEndVisible, panel as layoutPanel, fitLines, sectionHeader, } from "../../util/terminal-layout.js";
|
|
13
15
|
import { getKimiUsage } from "../../kimi/usage.js";
|
|
14
16
|
import { listRunCandidates } from "../hud.js";
|
|
@@ -161,32 +163,58 @@ function looksLikeSecret(value) {
|
|
|
161
163
|
function redactResourceName(name) {
|
|
162
164
|
return looksLikeSecret(name) ? "***REDACTED***" : name;
|
|
163
165
|
}
|
|
164
|
-
function
|
|
165
|
-
if (!resources)
|
|
166
|
-
return `${style.gray("MCP")} ${style.gray("
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
...resources.hooks.slice(0, 2).map((r) => ({ ...r, name: redactResourceName(r.name) })),
|
|
181
|
-
], 3);
|
|
182
|
-
const base = `${style.gray("MCP")} ${statusBits.join(" · ")} ` +
|
|
183
|
-
`mcp:${style.mintBold(String(resources.mcpServers.length))} ` +
|
|
184
|
-
`skills:${style.mintBold(String(resources.skills.length))} ` +
|
|
185
|
-
`hooks:${style.mintBold(String(resources.hooks.length))} ` +
|
|
186
|
-
`${style.gray(`scope:${resources.scope}`)}`;
|
|
187
|
-
const result = sample ? `${base} ${style.gray(truncateText(sample, maxWidth - 32))}` : base;
|
|
166
|
+
function formatMcpHealth(resources, maxWidth) {
|
|
167
|
+
if (!resources || resources.mcpServers.length === 0) {
|
|
168
|
+
return `${style.gray("MCP")} ${style.gray("no servers")}`;
|
|
169
|
+
}
|
|
170
|
+
const ok = resources.mcpServers.filter((r) => r.status === "connected" || r.status == null).length;
|
|
171
|
+
const degraded = resources.mcpServers.filter((r) => r.status === "connecting").length;
|
|
172
|
+
const down = resources.mcpServers.filter((r) => r.status === "failed").length;
|
|
173
|
+
const total = resources.mcpServers.length;
|
|
174
|
+
const offenders = resources.mcpServers
|
|
175
|
+
.filter((r) => r.status === "failed")
|
|
176
|
+
.slice(0, 3)
|
|
177
|
+
.map((r) => redactResourceName(r.name))
|
|
178
|
+
.join(", ");
|
|
179
|
+
const summary = `${style.gray("MCP")} ${style.mint("●")}${style.mintBold(String(ok))} ${style.orange("◐")}${style.orangeBold(String(degraded))} ${style.red("✕")}${style.redBold(String(down))} ${style.gray(`/${total}`)}`;
|
|
180
|
+
const topOffenders = offenders ? ` ${style.gray("fail:")} ${style.red(offenders)}` : "";
|
|
181
|
+
const result = summary + topOffenders;
|
|
188
182
|
return visibleTerminalWidth(result) > maxWidth ? truncateLine(result, maxWidth) : result;
|
|
189
183
|
}
|
|
184
|
+
function formatEvidenceGate(vm, snapshot, maxWidth) {
|
|
185
|
+
const workers = vm.workers ?? [];
|
|
186
|
+
if (workers.length === 0)
|
|
187
|
+
return [];
|
|
188
|
+
const passed = workers.filter((w) => w.lastEvidence?.passed).length;
|
|
189
|
+
const failed = snapshot.evidence.failedGates;
|
|
190
|
+
const pending = workers.length - passed - failed;
|
|
191
|
+
const lines = [];
|
|
192
|
+
const tally = `${style.gray("evidence")} ${style.mint("✓")}${style.mintBold(String(passed))} ${style.red("✗")}${style.redBold(String(failed))} ${style.orange("◐")}${style.orangeBold(String(pending))} ${style.gray(`of ${workers.length}`)}`;
|
|
193
|
+
lines.push(visibleTerminalWidth(tally) > maxWidth ? truncateLine(tally, maxWidth) : tally);
|
|
194
|
+
if (snapshot.evidence.latestVerification) {
|
|
195
|
+
const latest = ` ${style.gray("latest")} ${truncateText(sanitizeForDisplay(snapshot.evidence.latestVerification), Math.max(8, maxWidth - 12))}`;
|
|
196
|
+
lines.push(latest);
|
|
197
|
+
}
|
|
198
|
+
return lines;
|
|
199
|
+
}
|
|
200
|
+
function buildTeamRuntimeLines(vm, maxWidth) {
|
|
201
|
+
if (!vm.teamRuntime)
|
|
202
|
+
return [];
|
|
203
|
+
const team = vm.teamRuntime;
|
|
204
|
+
const presentWindows = team.windows.filter((w) => w.status === "present").length;
|
|
205
|
+
const missingWindows = team.windows.filter((w) => w.status === "missing").length;
|
|
206
|
+
const lines = [];
|
|
207
|
+
lines.push(`${style.pinkBold("Team Runtime")}`);
|
|
208
|
+
lines.push(` ${style.gray("session")} ${style.cream(team.session)} ${style.gray("status")} ${healthColor(missingWindows > 0 ? "warn" : "ok")(team.status)}`);
|
|
209
|
+
lines.push(` ${style.gray("windows")} ${style.mintBold(`${presentWindows}/${team.windows.length}`)} ${style.gray(`present · workers ${team.workerCount} · reviewer ${team.reviewerCount}`)}`);
|
|
210
|
+
if (team.coordinatorPanes > 0) {
|
|
211
|
+
lines.push(` ${style.gray("coordinator panes")} ${style.mint(String(team.coordinatorPanes))}`);
|
|
212
|
+
}
|
|
213
|
+
if (missingWindows > 0) {
|
|
214
|
+
lines.push(` ${style.orange(`${missingWindows} expected window(s) missing`)}`);
|
|
215
|
+
}
|
|
216
|
+
return lines.map((l) => (visibleTerminalWidth(l) > maxWidth ? truncateLine(l, maxWidth) : l));
|
|
217
|
+
}
|
|
190
218
|
function formatRuntimeContract(contract, maxWidth) {
|
|
191
219
|
if (!contract)
|
|
192
220
|
return `${style.gray("contract")} ${style.gray("--")}`;
|
|
@@ -229,13 +257,6 @@ function formatDeepSeekSummary(deepSeek, usage, requests, maxWidth) {
|
|
|
229
257
|
return `${style.gray("DeepSeek")} ${state}${livePart} bal:${balance} use:${usage.attempts}${modelPart} ` +
|
|
230
258
|
`d:${usage.directCount} a:${usage.advisoryCount} f:${usage.fallbackCount}${reason}`;
|
|
231
259
|
}
|
|
232
|
-
function sampleNames(entries, limit) {
|
|
233
|
-
const names = [...new Set(entries.map((entry) => entry.name))].slice(0, limit);
|
|
234
|
-
return names.length > 0 ? `[${names.join(",")}]` : "";
|
|
235
|
-
}
|
|
236
|
-
function sampleNamesPlain(entries, limit) {
|
|
237
|
-
return [...new Set(entries.map((entry) => entry.name))].slice(0, limit).join(",");
|
|
238
|
-
}
|
|
239
260
|
function formatDeepSeekModelUsage(usage) {
|
|
240
261
|
const tiers = Object.entries(usage.byTier)
|
|
241
262
|
.sort(([a], [b]) => a.localeCompare(b))
|
|
@@ -258,6 +279,10 @@ function buildFooter(targetWidth, heightMode) {
|
|
|
258
279
|
return `[${style.gray("h")}]istory [${style.gray("+")}/${style.gray("-")}]height [${style.gray("a")}]auto [${style.gray("space")}]pause [${style.gray("q")}]uit ${style.gray(`height:${heightMode}`)}`;
|
|
259
280
|
}
|
|
260
281
|
export async function renderCockpit(options = {}) {
|
|
282
|
+
const requestedBrandTheme = options.theme ?? process.env.OMK_THEME;
|
|
283
|
+
if (requestedBrandTheme !== undefined) {
|
|
284
|
+
setBrandPaletteTheme(requestedBrandTheme);
|
|
285
|
+
}
|
|
261
286
|
const width = getTerminalWidth(options.terminalWidth);
|
|
262
287
|
const targetWidth = Math.max(1, width - PANEL_HORIZONTAL_OVERHEAD);
|
|
263
288
|
const fixedFrameHeight = normalizeCockpitFrameHeight(options.height);
|
|
@@ -447,12 +472,12 @@ export async function renderCockpit(options = {}) {
|
|
|
447
472
|
const headerLines = [
|
|
448
473
|
"",
|
|
449
474
|
...rainLines,
|
|
450
|
-
renderOmkSparkleText("◢█ OMK//CONTROL COCKPIT █◣", {
|
|
475
|
+
renderOmkSparkleText("◢█ OMK//CONTROL COCKPIT · ROOT ORCHESTRATOR █◣", {
|
|
451
476
|
frame: animFrame,
|
|
452
|
-
colors: [
|
|
477
|
+
colors: [BRAND_HEX.cyan, BRAND_HEX.sparkleWhite, BRAND_HEX.sparkleGold, BRAND_HEX.magenta, BRAND_HEX.mint],
|
|
453
478
|
}),
|
|
454
|
-
style.gray(
|
|
455
|
-
style.gray(
|
|
479
|
+
style.gray(getActiveBrandCockpitSubtitle()),
|
|
480
|
+
style.gray(getActiveBrandCockpitDetail()),
|
|
456
481
|
"",
|
|
457
482
|
];
|
|
458
483
|
// ── Sweep animation line ──
|
|
@@ -512,24 +537,12 @@ export async function renderCockpit(options = {}) {
|
|
|
512
537
|
infoLines.push(`${style.gray("primary")} ${style.gray("unavailable")} ${sysPart}`.trimEnd());
|
|
513
538
|
}
|
|
514
539
|
infoLines.push(formatDeepSeekSummary(deepSeek, deepSeekUsage, snapshot.deepSeekRequests, targetWidth));
|
|
515
|
-
const mcpLines = [
|
|
540
|
+
const mcpLines = [];
|
|
541
|
+
mcpLines.push(formatMcpHealth(resources, targetWidth));
|
|
516
542
|
if (snapshot.runtimeContract) {
|
|
517
543
|
mcpLines.push(formatRuntimeContract(snapshot.runtimeContract, targetWidth));
|
|
518
544
|
}
|
|
519
|
-
|
|
520
|
-
const gateParts = [];
|
|
521
|
-
if (snapshot.evidence.failedGates > 0)
|
|
522
|
-
gateParts.push(`${style.red(String(snapshot.evidence.failedGates))} failed`);
|
|
523
|
-
if (snapshot.evidence.skippedGates > 0)
|
|
524
|
-
gateParts.push(`${style.orange(String(snapshot.evidence.skippedGates))} skipped`);
|
|
525
|
-
const evidenceSample = (vm.workers ?? [])
|
|
526
|
-
.find((node) => (node.state === "failed" || node.state === "blocked") && node.lastEvidence)
|
|
527
|
-
?.lastEvidence;
|
|
528
|
-
const evidenceDetail = evidenceSample
|
|
529
|
-
? ` · ${truncateText(sanitizeForDisplay(evidenceSample.message || evidenceSample.gate), targetWidth - 24)}`
|
|
530
|
-
: "";
|
|
531
|
-
mcpLines.push(`${style.gray("evidence")} ${gateParts.join(" · ")}${evidenceDetail}`);
|
|
532
|
-
}
|
|
545
|
+
const evidenceLines = formatEvidenceGate(vm, snapshot, targetWidth);
|
|
533
546
|
const goalLineParts = [];
|
|
534
547
|
if (sessionMeta?.type === "chat") {
|
|
535
548
|
goalLineParts.push(`${style.gray("type")} ${style.purpleBold("💬 Chat")}`);
|
|
@@ -579,6 +592,10 @@ export async function renderCockpit(options = {}) {
|
|
|
579
592
|
}
|
|
580
593
|
// ── Worker / TODO section ──
|
|
581
594
|
const workerLines = [];
|
|
595
|
+
const teamRuntimeLines = buildTeamRuntimeLines(vm, targetWidth);
|
|
596
|
+
if (teamRuntimeLines.length > 0) {
|
|
597
|
+
workerLines.push(...teamRuntimeLines, "");
|
|
598
|
+
}
|
|
582
599
|
const sortedNodes = [...(vm.workers ?? [])].sort((a, b) => {
|
|
583
600
|
const rank = statusRank(a.state) - statusRank(b.state);
|
|
584
601
|
return rank !== 0 ? rank : a.id.localeCompare(b.id);
|
|
@@ -791,14 +808,17 @@ export async function renderCockpit(options = {}) {
|
|
|
791
808
|
const selectedMcpLines = section === "all" || section === "mcp"
|
|
792
809
|
? (resources ? mcpLines : mcpLines.slice(1))
|
|
793
810
|
: [];
|
|
811
|
+
const selectedEvidenceLines = section === "all" ? evidenceLines : [];
|
|
794
812
|
const selectedChangedLines = section === "all" ? changedLines : [];
|
|
795
813
|
const activePanels = [];
|
|
796
814
|
if (selectedInfoLines.length > 0)
|
|
797
815
|
activePanels.push({ title: "Run", lines: selectedInfoLines, key: "info" });
|
|
798
|
-
if (selectedWorkerLines.length > 0)
|
|
799
|
-
activePanels.push({ title: "Workers & TODO", lines: selectedWorkerLines, key: "worker" });
|
|
800
816
|
if (selectedMcpLines.length > 0)
|
|
801
817
|
activePanels.push({ title: "Resources", lines: selectedMcpLines, key: "mcp" });
|
|
818
|
+
if (selectedEvidenceLines.length > 0)
|
|
819
|
+
activePanels.push({ title: "Evidence", lines: selectedEvidenceLines, key: "evidence" });
|
|
820
|
+
if (selectedWorkerLines.length > 0)
|
|
821
|
+
activePanels.push({ title: "Workers & TODO", lines: selectedWorkerLines, key: "worker" });
|
|
802
822
|
if (selectedChangedLines.length > 0)
|
|
803
823
|
activePanels.push({ title: "Changes & History", lines: selectedChangedLines, key: "changed" });
|
|
804
824
|
const stickyHeaderLines = [...headerLines];
|
|
@@ -844,8 +864,14 @@ export async function renderCockpit(options = {}) {
|
|
|
844
864
|
}),
|
|
845
865
|
...stickyBottomLines,
|
|
846
866
|
];
|
|
847
|
-
|
|
848
|
-
|
|
867
|
+
// Pad the body to the target height in a single splice. The previous
|
|
868
|
+
// per-iteration `body.splice(h, 0, "")` loop was O(n^2): each insertion
|
|
869
|
+
// shifted the entire tail. Inserting N empty strings at the same index in
|
|
870
|
+
// one call yields a byte-identical array (same elements, same order).
|
|
871
|
+
if (body.length < bodyHeight) {
|
|
872
|
+
const padCount = bodyHeight - body.length;
|
|
873
|
+
body.splice(stickyHeaderLines.length, 0, ...Array(padCount).fill(""));
|
|
874
|
+
}
|
|
849
875
|
if (body.length > bodyHeight)
|
|
850
876
|
body.length = bodyHeight;
|
|
851
877
|
}
|
|
@@ -854,29 +880,35 @@ export async function renderCockpit(options = {}) {
|
|
|
854
880
|
const footerRows = 1;
|
|
855
881
|
const panelOverheadRows = activePanels.length * 2;
|
|
856
882
|
const available = Math.max(0, fixedBodyHeight - headerRows - footerRows - panelOverheadRows);
|
|
857
|
-
// Priority-based budget: critical info > active agents/TODO >
|
|
883
|
+
// Priority-based budget: critical info > resources > evidence > active agents/TODO > changed/history
|
|
858
884
|
const infoMin = Math.min(selectedInfoLines.length, 3);
|
|
859
885
|
const workerMin = Math.min(selectedWorkerLines.length, section === "all" ? 5 : 8);
|
|
860
886
|
const mcpMin = Math.min(selectedMcpLines.length, 1);
|
|
887
|
+
const evidenceMin = Math.min(selectedEvidenceLines.length, 1);
|
|
861
888
|
const changedMin = Math.min(selectedChangedLines.length, 1);
|
|
862
889
|
let infoBudget = infoMin;
|
|
863
890
|
let workerBudget = workerMin;
|
|
864
891
|
let mcpBudget = mcpMin;
|
|
892
|
+
let evidenceBudget = evidenceMin;
|
|
865
893
|
let changedBudget = changedMin;
|
|
866
|
-
let remaining = available - (infoBudget + workerBudget + mcpBudget + changedBudget);
|
|
894
|
+
let remaining = available - (infoBudget + workerBudget + mcpBudget + evidenceBudget + changedBudget);
|
|
867
895
|
if (remaining < 0) {
|
|
868
|
-
// Emergency shrink from lowest priority upward, preserving a compact
|
|
896
|
+
// Emergency shrink from lowest priority upward, preserving a compact row when possible.
|
|
869
897
|
changedBudget = Math.max(0, changedBudget + remaining);
|
|
870
|
-
remaining = available - (infoBudget + workerBudget + mcpBudget + changedBudget);
|
|
898
|
+
remaining = available - (infoBudget + workerBudget + mcpBudget + evidenceBudget + changedBudget);
|
|
871
899
|
if (remaining < 0) {
|
|
872
900
|
workerBudget = Math.max(0, workerBudget + remaining);
|
|
873
|
-
remaining = available - (infoBudget + workerBudget + mcpBudget + changedBudget);
|
|
901
|
+
remaining = available - (infoBudget + workerBudget + mcpBudget + evidenceBudget + changedBudget);
|
|
874
902
|
if (remaining < 0) {
|
|
875
|
-
|
|
876
|
-
remaining = available - (infoBudget + workerBudget + mcpBudget + changedBudget);
|
|
903
|
+
evidenceBudget = Math.max(0, evidenceBudget + remaining);
|
|
904
|
+
remaining = available - (infoBudget + workerBudget + mcpBudget + evidenceBudget + changedBudget);
|
|
877
905
|
if (remaining < 0) {
|
|
878
|
-
|
|
879
|
-
remaining =
|
|
906
|
+
infoBudget = Math.max(selectedInfoLines.length > 0 ? 1 : 0, infoBudget + remaining);
|
|
907
|
+
remaining = available - (infoBudget + workerBudget + mcpBudget + evidenceBudget + changedBudget);
|
|
908
|
+
if (remaining < 0) {
|
|
909
|
+
mcpBudget = Math.max(0, mcpBudget + remaining);
|
|
910
|
+
remaining = 0;
|
|
911
|
+
}
|
|
880
912
|
}
|
|
881
913
|
}
|
|
882
914
|
}
|
|
@@ -897,6 +929,11 @@ export async function renderCockpit(options = {}) {
|
|
|
897
929
|
mcpBudget += extraMcp;
|
|
898
930
|
remaining -= extraMcp;
|
|
899
931
|
}
|
|
932
|
+
if (remaining > 0) {
|
|
933
|
+
const extraEvidence = Math.min(remaining, selectedEvidenceLines.length - evidenceBudget);
|
|
934
|
+
evidenceBudget += extraEvidence;
|
|
935
|
+
remaining -= extraEvidence;
|
|
936
|
+
}
|
|
900
937
|
if (remaining > 0) {
|
|
901
938
|
changedBudget += remaining;
|
|
902
939
|
}
|
|
@@ -905,7 +942,8 @@ export async function renderCockpit(options = {}) {
|
|
|
905
942
|
const budget = p.key === "info" ? infoBudget
|
|
906
943
|
: p.key === "worker" ? workerBudget
|
|
907
944
|
: p.key === "mcp" ? mcpBudget
|
|
908
|
-
:
|
|
945
|
+
: p.key === "evidence" ? evidenceBudget
|
|
946
|
+
: changedBudget;
|
|
909
947
|
return { title: p.title, lines: fitLines(p.lines, budget) };
|
|
910
948
|
})
|
|
911
949
|
.filter((p) => p.lines.length > 0);
|
|
@@ -32,6 +32,8 @@ export interface CockpitRenderOptions {
|
|
|
32
32
|
section?: "agents" | "todos" | "mcp" | "all";
|
|
33
33
|
events?: "on" | "off";
|
|
34
34
|
view?: "panel" | "rail" | "compact" | "json";
|
|
35
|
+
/** Optional live brand theme override; OMK_THEME is used when this is absent. */
|
|
36
|
+
theme?: string;
|
|
35
37
|
/** CockpitRenderer for scroll state and left-pane viewport management */
|
|
36
38
|
renderer?: import("./update-loop.js").CockpitRenderer;
|
|
37
39
|
}
|
package/dist/commands/design.js
CHANGED
|
@@ -5,6 +5,8 @@ import { chmod, lstat, mkdir, readdir, rm } from "fs/promises";
|
|
|
5
5
|
import { existsSync, readFileSync, readdirSync } from "fs";
|
|
6
6
|
import { createServer } from "net";
|
|
7
7
|
import { style, header, status } from "../util/theme.js";
|
|
8
|
+
import { BRAND_HEX } from "../brand/palette.js";
|
|
9
|
+
import { DESIGN_SCAFFOLD } from "../theme/extended-palette.js";
|
|
8
10
|
import { t } from "../util/i18n.js";
|
|
9
11
|
const GITHUB_API_URL = "https://api.github.com/repos/voltagent/awesome-design-md/contents/design-md";
|
|
10
12
|
const DESIGN_MD_RAW_URL = (name) => `https://getdesign.md/design-md/${name}/DESIGN.md`;
|
|
@@ -194,22 +196,22 @@ const OPEN_DESIGN_OMK_VISUAL_MARKER = "OMK — Control-plane neon-grid bridge.";
|
|
|
194
196
|
const OPEN_DESIGN_OMK_VISUAL_BLOCK_RE = /[ ]{2}\/\/ OMK — (?:Control-plane neon-grid bridge\.|Kimicat purple\/mint bridge\.)\n[ ]{2}omk: \{\n[ ]{4}bg: '[^']+',\n[ ]{4}fg: '[^']+',\n[ ]{4}glyph: \(s\) => star4\(s, '[^']+'\),\n[ ]{2}\},\n/;
|
|
195
197
|
const OPEN_DESIGN_OMK_VISUAL = ` // ${OPEN_DESIGN_OMK_VISUAL_MARKER}
|
|
196
198
|
omk: {
|
|
197
|
-
bg: 'linear-gradient(135deg,
|
|
198
|
-
fg: '
|
|
199
|
-
glyph: (s) => star4(s, '
|
|
199
|
+
bg: 'linear-gradient(135deg, ${BRAND_HEX.dark} 0%, ${BRAND_HEX.cyan} 45%, ${BRAND_HEX.magenta} 100%)',
|
|
200
|
+
fg: '${BRAND_HEX.cream}',
|
|
201
|
+
glyph: (s) => star4(s, '${BRAND_HEX.cream}'),
|
|
200
202
|
},
|
|
201
203
|
`;
|
|
202
204
|
const OPEN_DESIGN_OMK_ICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="OMK">
|
|
203
205
|
<defs>
|
|
204
206
|
<linearGradient id="omk" x1="8" y1="8" x2="56" y2="56" gradientUnits="userSpaceOnUse">
|
|
205
|
-
<stop stop-color="
|
|
206
|
-
<stop offset=".45" stop-color="
|
|
207
|
-
<stop offset="1" stop-color="
|
|
207
|
+
<stop stop-color="${BRAND_HEX.dark}"/>
|
|
208
|
+
<stop offset=".45" stop-color="${BRAND_HEX.cyan}"/>
|
|
209
|
+
<stop offset="1" stop-color="${BRAND_HEX.magenta}"/>
|
|
208
210
|
</linearGradient>
|
|
209
211
|
</defs>
|
|
210
212
|
<rect width="64" height="64" rx="18" fill="url(#omk)"/>
|
|
211
|
-
<path d="M20 35c0-8 5-14 12-14s12 6 12 14v7h-6v-7c0-5-2-8-6-8s-6 3-6 8v7h-6v-7Z" fill="
|
|
212
|
-
<path d="M17 20l4 3 4-3-3 5 3 5-4-3-4 3 3-5-3-5Zm25 0 4 3 4-3-3 5 3 5-4-3-4 3 3-5-3-5Z" fill="
|
|
213
|
+
<path d="M20 35c0-8 5-14 12-14s12 6 12 14v7h-6v-7c0-5-2-8-6-8s-6 3-6 8v7h-6v-7Z" fill="${BRAND_HEX.cream}"/>
|
|
214
|
+
<path d="M17 20l4 3 4-3-3 5 3 5-4-3-4 3 3-5-3-5Zm25 0 4 3 4-3-3 5 3 5-4-3-4 3 3-5-3-5Z" fill="${BRAND_HEX.amber}"/>
|
|
213
215
|
</svg>
|
|
214
216
|
`;
|
|
215
217
|
function patchOpenDesignAgentsSource(source) {
|
|
@@ -1034,14 +1036,14 @@ version: "alpha"
|
|
|
1034
1036
|
name: "my-project"
|
|
1035
1037
|
description: "Project design system"
|
|
1036
1038
|
colors:
|
|
1037
|
-
primary: "
|
|
1038
|
-
secondary: "
|
|
1039
|
-
accent: "
|
|
1040
|
-
success: "
|
|
1041
|
-
warning: "
|
|
1042
|
-
danger: "
|
|
1043
|
-
background: "
|
|
1044
|
-
surface: "
|
|
1039
|
+
primary: "${DESIGN_SCAFFOLD.primary}"
|
|
1040
|
+
secondary: "${DESIGN_SCAFFOLD.secondary}"
|
|
1041
|
+
accent: "${DESIGN_SCAFFOLD.accent}"
|
|
1042
|
+
success: "${DESIGN_SCAFFOLD.success}"
|
|
1043
|
+
warning: "${DESIGN_SCAFFOLD.warning}"
|
|
1044
|
+
danger: "${DESIGN_SCAFFOLD.danger}"
|
|
1045
|
+
background: "${DESIGN_SCAFFOLD.background}"
|
|
1046
|
+
surface: "${DESIGN_SCAFFOLD.surface}"
|
|
1045
1047
|
typography:
|
|
1046
1048
|
h1:
|
|
1047
1049
|
fontFamily: "Inter"
|
|
@@ -9,7 +9,6 @@ export declare function rootChecks(resolution: import("../../util/fs.js").Projec
|
|
|
9
9
|
export declare function readAgentToolDeclarations(root: string): Promise<AgentToolDeclarations | null>;
|
|
10
10
|
export declare function runtimeChecks(resources: OmkResourceSettings): Promise<CheckResult[]>;
|
|
11
11
|
export declare function toolchainChecks(root: string): Promise<CheckResult[]>;
|
|
12
|
-
export declare function rustSafetyNativeCheck(root: string): Promise<CheckResult>;
|
|
13
12
|
export declare function kimiChecks(root: string, resources: OmkResourceSettings): Promise<CheckResult[]>;
|
|
14
13
|
export declare function projectChecks(root: string): Promise<CheckResult[]>;
|
|
15
14
|
export declare function omkChecks(root: string): Promise<CheckResult[]>;
|
|
@@ -2,7 +2,6 @@ import { join, resolve, isAbsolute, dirname } from "path";
|
|
|
2
2
|
import { execSync } from "child_process";
|
|
3
3
|
import YAML from "yaml";
|
|
4
4
|
import { checkCommand, runShell } from "../../util/shell.js";
|
|
5
|
-
import { runOmkSafetySelfTest } from "../../util/native-safety.js";
|
|
6
5
|
import { readdir } from "fs/promises";
|
|
7
6
|
import { pathExists, readTextFile, getUserHome } from "../../util/fs.js";
|
|
8
7
|
import { isGitAvailable, getCurrentBranch, getGitStatus } from "../../util/git.js";
|
|
@@ -211,13 +210,10 @@ export async function runtimeChecks(resources) {
|
|
|
211
210
|
}
|
|
212
211
|
// ── Toolchain ─────────────────────────────────────────────────
|
|
213
212
|
export async function toolchainChecks(root) {
|
|
214
|
-
const [gitAvailable, jqExists, tmuxExists
|
|
213
|
+
const [gitAvailable, jqExists, tmuxExists] = await Promise.all([
|
|
215
214
|
isGitAvailable(),
|
|
216
215
|
checkCommand("jq"),
|
|
217
216
|
checkCommand("tmux"),
|
|
218
|
-
checkCommand("cargo"),
|
|
219
|
-
checkCommand("rustc"),
|
|
220
|
-
pathExists(join(root, "crates", "omk-safety", "Cargo.toml")),
|
|
221
217
|
]);
|
|
222
218
|
const results = [];
|
|
223
219
|
// Git checks — semantically distinct for correct JSON output
|
|
@@ -299,22 +295,6 @@ export async function toolchainChecks(root) {
|
|
|
299
295
|
status: tmuxExists ? "ok" : "info",
|
|
300
296
|
message: tmuxExists ? t("doctor.tmuxInstalled") : t("doctor.tmuxRecommend"),
|
|
301
297
|
});
|
|
302
|
-
results.push({
|
|
303
|
-
name: "Rust Cargo",
|
|
304
|
-
status: cargoExists ? "ok" : "info",
|
|
305
|
-
message: cargoExists ? "cargo available" : "cargo not found — Rust safety harness checks will be skipped",
|
|
306
|
-
});
|
|
307
|
-
results.push({
|
|
308
|
-
name: "Rust Compiler",
|
|
309
|
-
status: rustcExists ? "ok" : "info",
|
|
310
|
-
message: rustcExists ? "rustc available" : "rustc not found — Rust safety harness checks will be skipped",
|
|
311
|
-
});
|
|
312
|
-
results.push({
|
|
313
|
-
name: "Rust Safety Crate",
|
|
314
|
-
status: rustSafetyCrateExists ? "ok" : "info",
|
|
315
|
-
message: rustSafetyCrateExists ? "crates/omk-safety configured" : "no Rust safety crate configured",
|
|
316
|
-
});
|
|
317
|
-
results.push(await rustSafetyNativeCheck(root));
|
|
318
298
|
const pkgMgr = detectPackageManager(root);
|
|
319
299
|
results.push({ name: "Pkg Manager", status: "ok", message: `${pkgMgr} detected` });
|
|
320
300
|
const tsconfigExists = await pathExists(join(root, "tsconfig.json"));
|
|
@@ -325,21 +305,6 @@ export async function toolchainChecks(root) {
|
|
|
325
305
|
});
|
|
326
306
|
return results;
|
|
327
307
|
}
|
|
328
|
-
export async function rustSafetyNativeCheck(root) {
|
|
329
|
-
const result = await runOmkSafetySelfTest({ root });
|
|
330
|
-
return {
|
|
331
|
-
name: "Rust Safety Native",
|
|
332
|
-
status: result.status,
|
|
333
|
-
message: result.message,
|
|
334
|
-
metadata: {
|
|
335
|
-
source: result.source,
|
|
336
|
-
platformArch: result.platformArch,
|
|
337
|
-
builtFromSource: result.builtFromSource,
|
|
338
|
-
path: result.path,
|
|
339
|
-
checks: result.checks,
|
|
340
|
-
},
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
308
|
// ── Primary Kimi API runtime ───────────────────────────────────────
|
|
344
309
|
async function hasConfiguredProviderApiKey(providerId) {
|
|
345
310
|
const configPath = join(getUserHome(), ".omk", "config.toml");
|
|
@@ -6,7 +6,6 @@ export function emitDoctorJsonReport(allResults, rootResolution, resources, fixe
|
|
|
6
6
|
const find = (name) => allResults.find((r) => r.name === name);
|
|
7
7
|
const findMsg = (name) => find(name)?.message ?? null;
|
|
8
8
|
const findOk = (name) => find(name)?.status === "ok";
|
|
9
|
-
const findMeta = (name, key) => find(name)?.metadata?.[key] ?? null;
|
|
10
9
|
const warnings = allResults
|
|
11
10
|
.filter((r) => r.status === "warn")
|
|
12
11
|
.map((r) => ({ name: r.name, message: r.message }));
|
|
@@ -80,16 +79,6 @@ export function emitDoctorJsonReport(allResults, rootResolution, resources, fixe
|
|
|
80
79
|
sandboxEnforcement: findMsg("Sandbox Enforcement"),
|
|
81
80
|
sandboxMetadata: find("Sandbox Enforcement")?.metadata ?? null,
|
|
82
81
|
},
|
|
83
|
-
rustSafety: {
|
|
84
|
-
cargo: findMsg("Rust Cargo"),
|
|
85
|
-
rustc: findMsg("Rust Compiler"),
|
|
86
|
-
crate: findMsg("Rust Safety Crate"),
|
|
87
|
-
native: findMsg("Rust Safety Native"),
|
|
88
|
-
nativeSource: findMeta("Rust Safety Native", "source"),
|
|
89
|
-
nativePlatformArch: findMeta("Rust Safety Native", "platformArch"),
|
|
90
|
-
nativeBuiltFromSource: findMeta("Rust Safety Native", "builtFromSource"),
|
|
91
|
-
nativePath: findMeta("Rust Safety Native", "path"),
|
|
92
|
-
},
|
|
93
82
|
};
|
|
94
83
|
const output = {
|
|
95
84
|
ok: errors.length === 0,
|
|
@@ -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:
|
|
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";
|
|
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>;
|