open-multi-agent-kit 0.78.6 → 0.78.8

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 (170) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +38 -0
  3. package/MATURITY.md +2 -2
  4. package/README.md +19 -4
  5. package/dist/brand/night-city.theme.json +80 -0
  6. package/dist/brand/palette.d.ts +73 -177
  7. package/dist/brand/palette.js +115 -39
  8. package/dist/brand/rust-forge.theme.json +216 -0
  9. package/dist/brand/theme-compiled.d.ts +61 -0
  10. package/dist/brand/theme-compiled.js +241 -0
  11. package/dist/brand/theme.js +50 -37
  12. package/dist/cli/release-promotion-gate.d.ts +8 -1
  13. package/dist/cli/release-promotion-gate.js +20 -9
  14. package/dist/cli/root.d.ts +1 -0
  15. package/dist/cli/root.js +2 -1
  16. package/dist/cli/theme/index.d.ts +11 -2
  17. package/dist/cli/theme/index.js +6 -1
  18. package/dist/cli/theme/oklab-quantize.d.ts +29 -0
  19. package/dist/cli/theme/oklab-quantize.js +105 -0
  20. package/dist/cli/theme/render-table.d.ts +59 -0
  21. package/dist/cli/theme/render-table.js +112 -0
  22. package/dist/cli/theme/status-frame.d.ts +10 -0
  23. package/dist/cli/theme/status-frame.js +22 -0
  24. package/dist/cli/theme/terminal-capability.d.ts +6 -1
  25. package/dist/cli/theme/terminal-capability.js +20 -4
  26. package/dist/cli/theme/theme-doc.d.ts +22 -0
  27. package/dist/cli/theme/theme-doc.js +97 -0
  28. package/dist/cli/theme/theme-registry.js +39 -18
  29. package/dist/cli/theme/tier-explain.d.ts +21 -0
  30. package/dist/cli/theme/tier-explain.js +60 -0
  31. package/dist/cli/ui/green-rain-renderer.js +3 -2
  32. package/dist/cli/ui/neon-grid-renderer.js +4 -3
  33. package/dist/cli/ui/rust-forge-renderer.js +17 -3
  34. package/dist/cli/ui/system24-renderer.d.ts +18 -1
  35. package/dist/cli/ui/system24-renderer.js +39 -16
  36. package/dist/cli/v2/chat-repl.js +3 -1
  37. package/dist/cli/v2/cli-v2-skeleton.d.ts +6 -0
  38. package/dist/cli/v2/cli-v2-skeleton.js +121 -9
  39. package/dist/cli/v2/interactive-prompt.d.ts +1 -0
  40. package/dist/cli/v2/interactive-prompt.js +6 -2
  41. package/dist/commands/chat/core.js +2 -2
  42. package/dist/commands/chat/runtime.js +2 -0
  43. package/dist/commands/chat/utils.js +12 -4
  44. package/dist/commands/cockpit/render.js +102 -64
  45. package/dist/commands/cockpit/utils.d.ts +2 -0
  46. package/dist/commands/design.js +18 -16
  47. package/dist/commands/doctor/checks.d.ts +0 -1
  48. package/dist/commands/doctor/checks.js +1 -36
  49. package/dist/commands/doctor/report.js +0 -11
  50. package/dist/commands/doctor/utils.js +2 -2
  51. package/dist/commands/init/content.d.ts +1 -1
  52. package/dist/commands/init/content.js +3 -11
  53. package/dist/commands/init.js +2 -2
  54. package/dist/commands/mcp/config.d.ts +32 -0
  55. package/dist/commands/mcp/config.js +264 -0
  56. package/dist/commands/mcp/doctor-fix.d.ts +12 -0
  57. package/dist/commands/mcp/doctor-fix.js +261 -0
  58. package/dist/commands/mcp/doctor.d.ts +55 -0
  59. package/dist/commands/mcp/doctor.js +401 -0
  60. package/dist/commands/mcp/list.d.ts +1 -0
  61. package/dist/commands/mcp/list.js +56 -0
  62. package/dist/commands/mcp/shared.d.ts +47 -0
  63. package/dist/commands/mcp/shared.js +192 -0
  64. package/dist/commands/mcp/test.d.ts +5 -0
  65. package/dist/commands/mcp/test.js +457 -0
  66. package/dist/commands/mcp.d.ts +8 -104
  67. package/dist/commands/mcp.js +5 -1603
  68. package/dist/contracts/proof.d.ts +1 -1
  69. package/dist/goal/control-loop.d.ts +15 -0
  70. package/dist/goal/control-loop.js +39 -5
  71. package/dist/hud/render.d.ts +2 -0
  72. package/dist/hud/render.js +7 -1
  73. package/dist/mcp/secret-scanner.d.ts +6 -0
  74. package/dist/mcp/secret-scanner.js +44 -11
  75. package/dist/memory/graph-delta-log.d.ts +137 -0
  76. package/dist/memory/graph-delta-log.js +650 -0
  77. package/dist/memory/graph-viewer.js +13 -32
  78. package/dist/memory/local-graph-memory-store.d.ts +36 -3
  79. package/dist/memory/local-graph-memory-store.js +255 -10
  80. package/dist/orchestration/log-streamer.js +13 -8
  81. package/dist/orchestration/routing.d.ts +4 -0
  82. package/dist/orchestration/routing.js +28 -3
  83. package/dist/orchestration/state-persister.js +8 -1
  84. package/dist/providers/anthropic-messages-runner.d.ts +17 -0
  85. package/dist/providers/anthropic-messages-runner.js +197 -0
  86. package/dist/providers/model-registry.d.ts +1 -1
  87. package/dist/providers/model-registry.js +37 -3
  88. package/dist/providers/provider-runtime.js +27 -11
  89. package/dist/providers/thinking-levels.js +4 -1
  90. package/dist/providers/types.d.ts +3 -3
  91. package/dist/runtime/contracts/weakness-remediation.d.ts +9 -1
  92. package/dist/runtime/contracts/weakness-remediation.js +9 -1
  93. package/dist/runtime/router-v2-scoring.d.ts +8 -3
  94. package/dist/runtime/router-v2-scoring.js +27 -22
  95. package/dist/runtime/runtime-router.d.ts +5 -0
  96. package/dist/runtime/runtime-router.js +40 -8
  97. package/dist/runtime/sandbox-profile.d.ts +29 -0
  98. package/dist/runtime/sandbox-profile.js +101 -0
  99. package/dist/runtime/slash-commands.js +300 -2
  100. package/dist/runtime/tool-dispatch-contracts.d.ts +15 -0
  101. package/dist/runtime/tool-dispatch-contracts.js +12 -0
  102. package/dist/runtime/weights-config.d.ts +90 -0
  103. package/dist/runtime/weights-config.js +249 -0
  104. package/dist/schema/envelope.schema.d.ts +18 -18
  105. package/dist/schema/evidence.schema.d.ts +2 -2
  106. package/dist/schema/proof-bundle.schema.d.ts +6 -6
  107. package/dist/schema/proof-bundle.schema.js +0 -1
  108. package/dist/schema/provider.schema.d.ts +2 -2
  109. package/dist/schema/run-manifest.schema.d.ts +16 -16
  110. package/dist/theme/ansi.js +9 -2
  111. package/dist/theme/extended-palette.d.ts +85 -0
  112. package/dist/theme/extended-palette.js +108 -0
  113. package/dist/theme/layout.js +29 -8
  114. package/dist/theme/metrics.js +5 -5
  115. package/dist/theme/parallel.js +25 -15
  116. package/dist/ui/omk-sigil.js +5 -14
  117. package/dist/ui/omk-working-sweep.js +5 -15
  118. package/dist/util/chat-agent-mode.d.ts +11 -0
  119. package/dist/util/chat-agent-mode.js +41 -8
  120. package/dist/util/chat-cockpit.d.ts +9 -0
  121. package/dist/util/chat-cockpit.js +77 -20
  122. package/dist/util/fs/core.d.ts +5 -0
  123. package/dist/util/fs/core.js +35 -0
  124. package/dist/util/fs/internal.d.ts +14 -0
  125. package/dist/util/fs/internal.js +169 -0
  126. package/dist/util/fs/kimi-sync.d.ts +41 -0
  127. package/dist/util/fs/kimi-sync.js +495 -0
  128. package/dist/util/fs/logo.d.ts +2 -0
  129. package/dist/util/fs/logo.js +78 -0
  130. package/dist/util/fs/manifest.d.ts +6 -0
  131. package/dist/util/fs/manifest.js +40 -0
  132. package/dist/util/fs/mcp-diagnose.d.ts +15 -0
  133. package/dist/util/fs/mcp-diagnose.js +204 -0
  134. package/dist/util/fs/mcp-runtime-config.d.ts +23 -0
  135. package/dist/util/fs/mcp-runtime-config.js +412 -0
  136. package/dist/util/fs/paths.d.ts +13 -0
  137. package/dist/util/fs/paths.js +82 -0
  138. package/dist/util/fs/preflight.d.ts +27 -0
  139. package/dist/util/fs/preflight.js +271 -0
  140. package/dist/util/fs.d.ts +8 -128
  141. package/dist/util/fs.js +8 -1757
  142. package/dist/util/terminal-layout.js +5 -1
  143. package/dist/util/version.js +2 -1
  144. package/docs/2026-06-11/critical-issues.md +20 -0
  145. package/docs/2026-06-11/improvements.md +14 -0
  146. package/docs/2026-06-11/init-checklist.md +25 -0
  147. package/docs/2026-06-11/plan.md +20 -0
  148. package/docs/ARCHITECTURE_ANALYSIS_CODEGRAPH.md +223 -0
  149. package/docs/adr/0001-no-native-rust-lane.md +52 -0
  150. package/docs/codex-oauth-setup.md +14 -0
  151. package/docs/decisions/2026-06-10-git-history-bloat.md +61 -0
  152. package/docs/decisions/ADR-theme-dark-only-assets.md +43 -0
  153. package/docs/getting-started.md +1 -1
  154. package/docs/headroom-omk-final-summary.md +188 -0
  155. package/docs/headroom-omk-integration.md +394 -0
  156. package/docs/headroom-omk-setup-guide.md +422 -0
  157. package/docs/headroom-omk-usage-examples.md +371 -0
  158. package/docs/provider-maturity.md +1 -1
  159. package/docs/versioning.md +3 -3
  160. package/package.json +10 -10
  161. package/readmeasset/.npmignore +2 -0
  162. package/readmeasset/ASSET_INDEX.md +7 -5
  163. package/readmeasset/ASSET_PROVENANCE.md +21 -5
  164. package/readmeasset/omk-control-surfaces.svg +55 -0
  165. package/readmeasset/omk-core-loop.svg +1 -0
  166. package/readmeasset/omk-logo-mark.svg +1 -0
  167. package/readmeasset/omk-release-assertions.svg +51 -0
  168. package/dist/native/linux-x64/omk-safety +0 -0
  169. package/dist/util/native-safety.d.ts +0 -28
  170. package/dist/util/native-safety.js +0 -118
@@ -0,0 +1,108 @@
1
+ /**
2
+ * OMK Theme — Extended palette (data-only color module).
3
+ *
4
+ * Single declared home for color VALUES that have no matching night-city
5
+ * primitive and therefore cannot derive from `src/brand` theme tokens:
6
+ * - sigil/working-sweep neon ramps (bespoke UI animation colors),
7
+ * - the ontology graph-viewer web/SVG palette (HTML document colors),
8
+ * - the `omk design init` DESIGN.md scaffold defaults (generated-project
9
+ * content written into a user repo, not OMK render debt).
10
+ *
11
+ * Every other module imports these tokens instead of inlining hex literals, so
12
+ * the literals live here exactly ONCE. `BRAND_HEX` is imported as the
13
+ * theme-derived base: any extended token that coincides with a night-city
14
+ * value (sparkle white/gold) is re-derived from BRAND_HEX rather than
15
+ * re-declared, keeping the night-city document the single source of truth.
16
+ *
17
+ * This file is intentionally data-only and is the sole `permanent` color
18
+ * allowlist entry outside `src/cli/theme/**` (see scripts/color-allowlist.json).
19
+ * Do NOT add render logic here, and do NOT widen BRAND_HEX (frozen elsewhere).
20
+ */
21
+ import { BRAND_HEX } from "../brand/palette.js";
22
+ /**
23
+ * Neon ramp shared by src/ui/omk-sigil.ts and src/ui/omk-working-sweep.ts.
24
+ * These hues are deliberately brighter/saturated than the night-city console
25
+ * primitives (e.g. cyan #00FFD1 ≠ night-city cyan #00D6FF) and must stay byte
26
+ * stable for the deterministic sweep animation. `amber`/`white` coincide with
27
+ * the night-city sparkle ramp and are re-derived from BRAND_HEX.
28
+ */
29
+ export const SIGIL_NEON = {
30
+ red: "#ff1b1b",
31
+ hot: "#ff315d",
32
+ orange: "#ff7a18",
33
+ amber: BRAND_HEX.sparkleGold, // #FFD166 — night-city sparkle gold
34
+ cyan: "#00ffd1",
35
+ cyan2: "#00aaff",
36
+ green: "#00ff88",
37
+ magenta: "#ff2bd6",
38
+ white: BRAND_HEX.sparkleWhite, // #F4FFFF — night-city sparkle white
39
+ dim: "#2b6f6a",
40
+ dim2: "#13403d",
41
+ darkRed: "#6d1717",
42
+ };
43
+ /**
44
+ * Ontology graph-viewer (src/memory/graph-viewer.ts) palette. These are HTML
45
+ * document / cytoscape stylesheet colors (web design system, not terminal
46
+ * brand), emitted verbatim into the generated .html file.
47
+ */
48
+ export const GRAPH_VIEWER = {
49
+ /** Node fill keyed by ontology node type. */
50
+ typeColors: {
51
+ Project: "#7c3aed",
52
+ Session: "#2563eb",
53
+ Memory: "#059669",
54
+ MemoryVersion: "#6b7280",
55
+ Run: "#14b8a6",
56
+ Goal: "#f59e0b",
57
+ Topic: "#64748b",
58
+ Decision: "#dc2626",
59
+ Task: "#ea580c",
60
+ Risk: "#be123c",
61
+ Command: "#0f766e",
62
+ File: "#0891b2",
63
+ Evidence: "#16a34a",
64
+ Provider: "#a855f7",
65
+ ProviderRoute: "#8b5cf6",
66
+ ProviderFallback: "#f97316",
67
+ AuditLink: "#eab308",
68
+ Constraint: "#9333ea",
69
+ Question: "#0284c7",
70
+ Answer: "#22c55e",
71
+ Concept: "#4f46e5",
72
+ },
73
+ /** Fallback node fill for unknown types. */
74
+ defaultNode: "#94a3b8",
75
+ /** HTML/cytoscape chrome colors. */
76
+ ui: {
77
+ bodyBg: "#0f172a",
78
+ bodyFg: "#e5e7eb",
79
+ topBg: "#111827",
80
+ topBorder: "#334155",
81
+ inputBg: "#020617",
82
+ inputBorder: "#475569",
83
+ statText: "#94a3b8",
84
+ pillText: "#c4b5fd",
85
+ pillBg: "#312e81",
86
+ pillBorder: "#4c1d95",
87
+ nodeLabel: "#e5e7eb",
88
+ nodeBorder: "#f8fafc",
89
+ edgeLine: "#64748b",
90
+ edgeLabel: "#94a3b8",
91
+ selected: "#facc15",
92
+ },
93
+ };
94
+ /**
95
+ * Default color tokens written into a freshly scaffolded DESIGN.md by
96
+ * `omk design init`. Generated-project content (a neutral starter palette for
97
+ * the USER's project), not OMK's own render surface.
98
+ */
99
+ export const DESIGN_SCAFFOLD = {
100
+ primary: "#111827",
101
+ secondary: "#4B5563",
102
+ accent: "#7C3AED",
103
+ success: "#059669",
104
+ warning: "#D97706",
105
+ danger: "#DC2626",
106
+ background: "#F9FAFB",
107
+ surface: "#FFFFFF",
108
+ };
@@ -2,8 +2,9 @@
2
2
  * OMK Theme — Layout primitives (headers, panels, boxes, gauges)
3
3
  * Extracted from util/theme.ts to break God Module coupling
4
4
  */
5
- import { P } from "../brand/palette.js";
6
- import { esc, rgb, stripAnsi, padEndAnsi, sanitizeTerminalText, visibleTerminalWidth } from "./ansi.js";
5
+ import { P, BRAND_HEX, setBrandPaletteTheme } from "../brand/palette.js";
6
+ import { getActiveBrandHudStatus, getActiveBrandThemeName } from "../brand/theme-compiled.js";
7
+ import { esc, rgb, stripAnsi, sanitizeTerminalText, visibleTerminalWidth } from "./ansi.js";
7
8
  import { style } from "./colors.js";
8
9
  import { renderOmkSparkleText } from "../ui/omk-sigil.js";
9
10
  export function header(text) {
@@ -32,7 +33,12 @@ export function box(lines, title) {
32
33
  const termWidth = process.stdout.columns || 80;
33
34
  const rawTitle = title ? sanitizeTerminalText(title) : "";
34
35
  const rawTitleWidth = rawTitle ? visibleTerminalWidth(rawTitle) : 0;
35
- const rawInner = Math.max(...lines.map((l) => stripAnsi(l).length), rawTitle ? rawTitleWidth + 4 : 0);
36
+ // Strip each line once and reuse its visible width for both the inner-width
37
+ // calculation and right-padding. This removes the redundant second strip that
38
+ // padEndAnsi() performed internally. Output bytes are identical:
39
+ // padEndAnsi(l, innerWidth) === l + " ".repeat(max(0, innerWidth - strip(l))).
40
+ const measured = lines.map((l) => ({ line: l, width: stripAnsi(l).length }));
41
+ const rawInner = Math.max(...measured.map((m) => m.width), rawTitle ? rawTitleWidth + 4 : 0);
36
42
  const innerWidth = Math.min(rawInner, Math.max(termWidth - 4, 20));
37
43
  const width = innerWidth + 4;
38
44
  const titleText = rawTitle ? style.phosphorBold(rawTitle) : "";
@@ -40,7 +46,7 @@ export function box(lines, title) {
40
46
  ? style.phosphorDim("╔" + "═".repeat(2) + " ") + titleText + style.phosphorDim(" " + "═".repeat(Math.max(0, width - rawTitleWidth - 6)) + "╗")
41
47
  : style.phosphorDim("╔" + "═".repeat(width) + "╗");
42
48
  const bottom = style.phosphorDim("╚" + "═".repeat(width) + "╝");
43
- const body = lines.map((l) => style.phosphorDim("║ ") + padEndAnsi(l, innerWidth) + style.phosphorDim(" ║"));
49
+ const body = measured.map(({ line, width: w }) => style.phosphorDim("║ ") + line + " ".repeat(Math.max(0, innerWidth - w)) + style.phosphorDim(" ║"));
44
50
  return [top, ...body, bottom].join("\n");
45
51
  }
46
52
  /** Generate OMK neon gradient text */
@@ -82,7 +88,10 @@ export function panel(lines, title) {
82
88
  const termWidth = process.stdout.columns || 80;
83
89
  const rawTitle = title ? sanitizeTerminalText(title) : "";
84
90
  const rawTitleWidth = rawTitle ? visibleTerminalWidth(rawTitle) : 0;
85
- const rawInner = Math.max(...lines.map((l) => stripAnsi(l).length), rawTitle ? rawTitleWidth + 4 : 0);
91
+ // Same single-strip optimization as box(): measure each line once and reuse
92
+ // the visible width for inner-width + padding (byte-identical to padEndAnsi).
93
+ const measured = lines.map((l) => ({ line: l, width: stripAnsi(l).length }));
94
+ const rawInner = Math.max(...measured.map((m) => m.width), rawTitle ? rawTitleWidth + 4 : 0);
86
95
  const innerWidth = Math.min(rawInner, Math.max(termWidth - 4, 20));
87
96
  const width = innerWidth + 4;
88
97
  const titleText = rawTitle ? gradient(rawTitle) : "";
@@ -90,7 +99,7 @@ export function panel(lines, title) {
90
99
  ? style.phosphorDim("┏" + "━".repeat(2) + " ") + titleText + style.phosphorDim(" " + "━".repeat(Math.max(0, width - rawTitleWidth - 6)) + "┓")
91
100
  : style.phosphorDim("┏" + "━".repeat(width) + "┓");
92
101
  const bottom = style.phosphorDim("┗" + "━".repeat(width) + "┛");
93
- const body = lines.map((l) => style.phosphorDim("┃ ") + padEndAnsi(l, innerWidth) + style.phosphorDim(" ┃"));
102
+ const body = measured.map(({ line, width: w }) => style.phosphorDim("┃ ") + line + " ".repeat(Math.max(0, innerWidth - w)) + style.phosphorDim(" ┃"));
94
103
  return [top, ...body, bottom].join("\n");
95
104
  }
96
105
  /** Control-room header */
@@ -118,14 +127,26 @@ export function matrixHeader(text) {
118
127
  }
119
128
  /** Compact HUD masthead for root entry and non-interactive HUD command output. */
120
129
  export function omkHudHeader(runId) {
130
+ if (process.env.OMK_THEME !== undefined) {
131
+ setBrandPaletteTheme(process.env.OMK_THEME);
132
+ }
121
133
  const safeRun = runId ? sanitizeTerminalText(runId).slice(0, 28) : "latest run";
122
134
  const signalRule = gradient("═◇═".repeat(18).slice(0, 54));
135
+ const chromeLine = getActiveBrandThemeName() === "rust-forge"
136
+ ? style.phosphorBold(getActiveBrandHudStatus()) + style.gray(" · ") + style.mintBold("ROUTE VERIFY") + style.gray(" · ") + style.pinkBold("CONTROL LOOP")
137
+ : style.phosphorBold("NEON GRID ONLINE") + style.gray(" · ") + style.mintBold("GREEN RAIN SIGNAL") + style.gray(" · ") + style.pinkBold("METRICS WALL");
123
138
  return [
124
139
  "",
125
140
  renderOmkSparkleText("◢█ OMK//CONTROL █◣", {
126
- colors: ["#00D6FF", "#f4ffff", "#ffd166", "#FF47B2", "#00FFC2"],
141
+ colors: [
142
+ BRAND_HEX.cyan,
143
+ BRAND_HEX.sparkleWhite,
144
+ BRAND_HEX.sparkleGold,
145
+ BRAND_HEX.magenta,
146
+ BRAND_HEX.mint,
147
+ ],
127
148
  }),
128
- style.phosphorBold("NEON GRID ONLINE") + style.gray(" · ") + style.mintBold("GREEN RAIN SIGNAL") + style.gray(" · ") + style.pinkBold("METRICS WALL"),
149
+ chromeLine,
129
150
  style.gray("Models execute. OMK routes, verifies, measures, and controls."),
130
151
  style.gray("goal-scoped MCP · skills · hooks · evidence · worktrees · replay · memory"),
131
152
  style.gray(`run: ${safeRun}`),
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { totalmem, freemem, loadavg, cpus } from "os";
6
6
  import { P } from "../brand/palette.js";
7
- import { esc, stripAnsi, padEndAnsi, visibleTerminalWidth, sanitizeTerminalText } from "./ansi.js";
7
+ import { esc, rgb, stripAnsi, padEndAnsi, visibleTerminalWidth, sanitizeTerminalText } from "./ansi.js";
8
8
  import { style } from "./colors.js";
9
9
  export function metricsPanel(lines, title) {
10
10
  const rawTitle = title ? sanitizeTerminalText(title) : "";
@@ -21,11 +21,11 @@ export function metricsGauge(label, value, max, width = 24) {
21
21
  const ratio = Math.min(Math.max(value / max, 0), 1);
22
22
  const filled = Math.round(ratio * width);
23
23
  const empty = width - filled;
24
- let barColor = "38;2;34;197;94";
24
+ let barColor = rgb(P.metricsGreen.r, P.metricsGreen.g, P.metricsGreen.b);
25
25
  if (ratio > 0.7)
26
- barColor = "38;2;245;158;11";
26
+ barColor = rgb(P.metricsAmber.r, P.metricsAmber.g, P.metricsAmber.b);
27
27
  if (ratio > 0.9)
28
- barColor = "38;2;239;68;68";
28
+ barColor = rgb(P.metricsRed.r, P.metricsRed.g, P.metricsRed.b);
29
29
  const bar = esc(barColor) + "█".repeat(filled) + esc("0") + style.silver("░".repeat(empty));
30
30
  const pct = style.whiteBold(`${Math.round(ratio * 100)}%`.padStart(4));
31
31
  return ` ${style.silver(label.padStart(10))} ${bar} ${pct}`;
@@ -38,7 +38,7 @@ export function metricsGradient(text) {
38
38
  const r = Math.round(P.metricsCyan.r + (P.metricsViolet.r - P.metricsCyan.r) * t);
39
39
  const g = Math.round(P.metricsCyan.g + (P.metricsViolet.g - P.metricsCyan.g) * t);
40
40
  const b = Math.round(P.metricsCyan.b + (P.metricsViolet.b - P.metricsCyan.b) * t);
41
- result.push(esc("38;2;" + r + ";" + g + ";" + b) + chars[i] + esc("0"));
41
+ result.push(esc(rgb(r, g, b)) + chars[i] + esc("0"));
42
42
  }
43
43
  return result.join("");
44
44
  }
@@ -5,7 +5,8 @@
5
5
  import figlet from "figlet";
6
6
  import gradientString from "gradient-string";
7
7
  import { OMK_SIMPLE_ASCII_ART } from "../brand/omk-simple-art.js";
8
- import { P, colorFromHex } from "../brand/palette.js";
8
+ import { P, BRAND_HEX, colorFromHex, setBrandPaletteTheme } from "../brand/palette.js";
9
+ import { getActiveBrandConsoleLine, getActiveBrandThemeName } from "../brand/theme-compiled.js";
9
10
  import { esc, rgb, stripAnsi, padEndAnsi, sanitizeTerminalText, isColorEnabled } from "./ansi.js";
10
11
  import { style } from "./colors.js";
11
12
  import { box, gradient } from "./layout.js";
@@ -46,14 +47,14 @@ export function omkStatusChips() {
46
47
  }
47
48
  function renderDefaultHeroArt() {
48
49
  const palettes = [
49
- ["#00D6FF", "#9D4EDD"],
50
- ["#9D4EDD", "#FF47B2"],
51
- ["#00FFC2", "#00D6FF"],
52
- ["#FFB000", "#FF47B2"],
53
- ["#00D6FF", "#00FFC2"],
50
+ [BRAND_HEX.cyan, BRAND_HEX.purple],
51
+ [BRAND_HEX.purple, BRAND_HEX.magenta],
52
+ [BRAND_HEX.mint, BRAND_HEX.cyan],
53
+ [BRAND_HEX.amber, BRAND_HEX.magenta],
54
+ [BRAND_HEX.cyan, BRAND_HEX.mint],
54
55
  ];
55
56
  return OMK_SIMPLE_ASCII_ART.split("\n").map((line, index) => {
56
- const [start, end] = palettes[index % palettes.length] ?? ["#00D6FF", "#FF47B2"];
57
+ const [start, end] = palettes[index % palettes.length] ?? [BRAND_HEX.cyan, BRAND_HEX.magenta];
57
58
  return themedGradient(line, start, end);
58
59
  });
59
60
  }
@@ -101,11 +102,17 @@ function renderThemedHeroArt(art, primaryHex, accentHex, infoHex) {
101
102
  });
102
103
  }
103
104
  export function omkCliHero(footer) {
105
+ if (process.env.OMK_THEME !== undefined) {
106
+ setBrandPaletteTheme(process.env.OMK_THEME);
107
+ }
108
+ const controlLine = getActiveBrandThemeName() === "rust-forge"
109
+ ? "OMK//CONTROL · oxidized forge · evidence loop · telemetry bus"
110
+ : "OMK//CONTROL · neon grid · evidence loop · telemetry bus";
104
111
  const heroLines = [
105
- ...renderFigletTitleLines("OMK", ["#00D6FF", "#9D4EDD", "#FF47B2", "#00FFC2"]),
112
+ ...renderFigletTitleLines("OMK", [BRAND_HEX.cyan, BRAND_HEX.purple, BRAND_HEX.magenta, BRAND_HEX.mint]),
106
113
  style.creamBold("open-multi-agent-kit"),
107
- style.blueBold("Night City Ops Console // cyberpunk metrics wall"),
108
- style.phosphorDim("OMK//CONTROL · neon grid · evidence loop · telemetry bus"),
114
+ style.blueBold(getActiveBrandConsoleLine()),
115
+ style.phosphorDim(controlLine),
109
116
  style.phosphorDim("goal-scoped MCP · skills · hooks · worktrees · replay · memory"),
110
117
  "",
111
118
  ...renderDefaultHeroArt(),
@@ -193,6 +200,9 @@ function buildThemedMetaBox(meta, primary, text, muted) {
193
200
  return [top, ...body, bottom].join("\n") + "\n";
194
201
  }
195
202
  export function omkBanner(meta, footer, theme) {
203
+ if (process.env.OMK_THEME !== undefined) {
204
+ setBrandPaletteTheme(process.env.OMK_THEME);
205
+ }
196
206
  if (theme?.banner?.enabled === false)
197
207
  return "";
198
208
  if (!theme || (!theme.banner && !theme.colors)) {
@@ -230,16 +240,16 @@ export function omkBanner(meta, footer, theme) {
230
240
  }
231
241
  const heroTitleLines = title.length <= 8
232
242
  ? renderFigletTitleLines(title, [
233
- theme.colors?.primary ?? "#00D6FF",
234
- theme.colors?.accent ?? "#9D4EDD",
235
- theme.colors?.info ?? "#FF47B2",
236
- theme.colors?.primary ?? "#00FFC2",
243
+ theme.colors?.primary ?? BRAND_HEX.cyan,
244
+ theme.colors?.accent ?? BRAND_HEX.purple,
245
+ theme.colors?.info ?? BRAND_HEX.magenta,
246
+ theme.colors?.primary ?? BRAND_HEX.mint,
237
247
  ])
238
248
  : [themedGradient("◢█ " + title + " █◣", theme.colors?.primary, theme.colors?.accent)];
239
249
  const heroLines = [
240
250
  ...heroTitleLines,
241
251
  accentFn(subtitle),
242
- mutedFn("Night City Ops Console // cyberpunk metrics wall // provider-neutral orchestration."),
252
+ mutedFn(`${getActiveBrandConsoleLine()} // provider-neutral orchestration.`),
243
253
  mutedFn("goal-scoped MCP · skills · hooks · evidence · worktrees · replay · memory"),
244
254
  ];
245
255
  if (art) {
@@ -1,19 +1,9 @@
1
+ import { SIGIL_NEON } from "../theme/extended-palette.js";
1
2
  const CSI = "\x1b[";
2
3
  const RESET = `${CSI}0m`;
3
4
  const BOLD = `${CSI}1m`;
4
- const C = {
5
- red: "#ff1b1b",
6
- hot: "#ff315d",
7
- orange: "#ff7a18",
8
- amber: "#ffd166",
9
- cyan: "#00ffd1",
10
- cyan2: "#00aaff",
11
- green: "#00ff88",
12
- magenta: "#ff2bd6",
13
- white: "#f4ffff",
14
- dim: "#2b6f6a",
15
- darkRed: "#6d1717",
16
- };
5
+ // Bespoke sigil neon ramp — declared once in the extended palette data module.
6
+ const C = SIGIL_NEON;
17
7
  const SIGILS = {
18
8
  forge: [
19
9
  " ╭──────────────╮ ╭────────╮ ",
@@ -250,7 +240,8 @@ function hexToRgb(hex) {
250
240
  ];
251
241
  }
252
242
  function fg(rgb) {
253
- return `${CSI}38;2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
243
+ // Truecolor SGR assembled from numeric codes (no raw escape parameter literal).
244
+ return `${CSI}${[38, 2, rgb[0], rgb[1], rgb[2]].join(";")}m`;
254
245
  }
255
246
  function colorAt(colors, t) {
256
247
  if (colors.length === 0)
@@ -1,20 +1,9 @@
1
+ import { SIGIL_NEON } from "../theme/extended-palette.js";
1
2
  const CSI = "\x1b[";
2
3
  const RESET = `${CSI}0m`;
3
4
  const BOLD = `${CSI}1m`;
4
- const P = {
5
- red: "#ff1b1b",
6
- hot: "#ff315d",
7
- orange: "#ff7a18",
8
- amber: "#ffd166",
9
- cyan: "#00ffd1",
10
- cyan2: "#00aaff",
11
- green: "#00ff88",
12
- magenta: "#ff2bd6",
13
- white: "#f4ffff",
14
- dim: "#2b6f6a",
15
- dim2: "#13403d",
16
- darkRed: "#6d1717",
17
- };
5
+ // Bespoke working-sweep neon ramp — declared once in the extended palette module.
6
+ const P = SIGIL_NEON;
18
7
  export class WorkingTracker {
19
8
  current = {
20
9
  kind: "idle",
@@ -302,7 +291,8 @@ function formatElapsed(ms) {
302
291
  return `${minutes}m${seconds.toString().padStart(2, "0")}s`;
303
292
  }
304
293
  function fg(rgb) {
305
- return `${CSI}38;2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
294
+ // Truecolor SGR assembled from numeric codes (no raw escape parameter literal).
295
+ return `${CSI}${[38, 2, rgb[0], rgb[1], rgb[2]].join(";")}m`;
306
296
  }
307
297
  function hexToRgb(hex) {
308
298
  const cleanHex = hex.replace("#", "");
@@ -99,6 +99,13 @@ export interface ChatAgentHarnessManifest {
99
99
  promptChoices: ["parallel", "sequential", "plan-only"];
100
100
  chatModeExempt: boolean;
101
101
  };
102
+ orchestrationKernel: {
103
+ goalLifecycle: "enabled";
104
+ topologyRouting: "enabled";
105
+ synthesisRouting: "enabled";
106
+ durableMemory: "enabled";
107
+ perLaneGrantRequired: true;
108
+ };
102
109
  hardGateContract: {
103
110
  requiresPromptBeforeNonTrivialTTY: boolean;
104
111
  nonTTYAutoParallelForComplex: boolean;
@@ -142,6 +149,10 @@ export interface ChatAgentLaneCapabilityAssignment {
142
149
  skills: string[];
143
150
  hooks: string[];
144
151
  mcpServers: string[];
152
+ scope: string;
153
+ acceptance: string[];
154
+ evidenceOutput: string;
155
+ authority: "read-only" | "advisory" | "write";
145
156
  }
146
157
  export declare function parseChatAgentModelVariantProfiles(raw: string | undefined): ChatAgentModelVariantProfiles | undefined;
147
158
  export declare function readChatAgentModelVariantProfilesFromEnv(env?: Record<string, string | undefined>): ChatAgentModelVariantProfiles | undefined;
@@ -127,6 +127,8 @@ export function buildChatAgentModeContract(input) {
127
127
  `- Active skills (${harness.resources.active.skills.length}): ${formatInventoryList(harness.resources.active.skills)}`,
128
128
  `- Active hooks (${harness.resources.active.hooks.length}): ${formatInventoryList(harness.resources.active.hooks)}`,
129
129
  `- Initial memory recall: ${harness.memoryRecall.summaryPath}`,
130
+ `- Orchestration kernel: goal lifecycle, topology routing, synthesis routing, and durable memory are enabled internally`,
131
+ `- Per-lane grant contract: skills/hooks/MCP/scope/acceptance/evidenceOutput required for every subagent lane`,
130
132
  `- Harness manifest: ./chat-agent-harness.json`,
131
133
  "",
132
134
  "## Mode behavior",
@@ -190,6 +192,13 @@ export function buildChatAgentHarnessManifest(input) {
190
192
  promptChoices: ["parallel", "sequential", "plan-only"],
191
193
  chatModeExempt: input.mode === "chat",
192
194
  },
195
+ orchestrationKernel: {
196
+ goalLifecycle: "enabled",
197
+ topologyRouting: "enabled",
198
+ synthesisRouting: "enabled",
199
+ durableMemory: "enabled",
200
+ perLaneGrantRequired: true,
201
+ },
193
202
  hardGateContract: {
194
203
  requiresPromptBeforeNonTrivialTTY: executionGateApplies && executionPolicy === "ask",
195
204
  nonTTYAutoParallelForComplex: executionGateApplies && (executionPolicy === "ask" || executionPolicy === "auto"),
@@ -528,9 +537,31 @@ function buildLaneCapabilityAssignments(resources) {
528
537
  skills: assigned?.skills ?? [],
529
538
  hooks: assigned?.hooks ?? [],
530
539
  mcpServers: assigned?.mcp ?? [],
540
+ scope: laneScope(lane.role),
541
+ acceptance: laneAcceptance(lane.role),
542
+ evidenceOutput: `.omk/runs/${resources.workers === "auto" ? "<run-id>" : "<run-id>"}/lanes/${lane.laneId}/evidence.json`,
543
+ authority: lane.role === "coder" ? "write" : lane.role === "planner" ? "advisory" : "read-only",
531
544
  };
532
545
  });
533
546
  }
547
+ function laneScope(role) {
548
+ if (role === "coder")
549
+ return "assigned implementation files only";
550
+ if (role === "qa")
551
+ return "tests and verification artifacts only";
552
+ if (role === "security")
553
+ return "security-relevant changed scope only";
554
+ return "goal-scoped read-only analysis";
555
+ }
556
+ function laneAcceptance(role) {
557
+ if (role === "coder")
558
+ return ["scoped diff complete", "targeted check passes", "no out-of-scope edits"];
559
+ if (role === "qa")
560
+ return ["smallest proving check run", "failures and gaps recorded"];
561
+ if (role === "security")
562
+ return ["trust boundaries reviewed", "secret and permission risks reported"];
563
+ return ["findings cite evidence", "unknowns and next actions reported"];
564
+ }
534
565
  export function buildChatAgentRuntimeMcpAllowlist(input) {
535
566
  if (input.resources.mcpScope === "none")
536
567
  return undefined;
@@ -748,30 +779,32 @@ function parseWorkerBudget(value) {
748
779
  }
749
780
  const ROLE_ROUTE_KEYWORDS = {
750
781
  skill: {
782
+ coordinator: ["plan", "route", "synthesize", "memory", "goal", "orchestration"],
751
783
  explorer: ["explore", "repo", "context", "research"],
752
- researcher: ["research", "docs", "context", "repo"],
784
+ researcher: ["research", "docs", "context", "repo", "memory"],
753
785
  "vision-debugger": ["vision", "design", "screenshot", "browser", "web"],
754
- planner: ["plan", "context", "industrial", "control"],
786
+ planner: ["plan", "context", "industrial", "control", "route", "orchestration"],
755
787
  architect: ["plan", "architecture", "context", "industrial"],
756
788
  coder: ["typescript", "python", "frontend", "backend", "test", "implementation"],
757
- reviewer: ["review", "quality", "security", "secret"],
789
+ reviewer: ["review", "quality", "security", "secret", "synthesize"],
758
790
  security: ["security", "secret", "guard"],
759
791
  qa: ["quality", "test", "debug"],
760
792
  tester: ["test", "debug", "quality"],
761
- ontology: ["memory", "context", "graph"],
793
+ ontology: ["memory", "context", "graph", "supermemory"],
762
794
  },
763
795
  mcp: {
796
+ coordinator: ["omk", "memory", "adaptorch", "ouroboros", "supermemory", "sequential"],
764
797
  explorer: ["omk", "filesystem", "git", "github", "web", "bridge", "browser", "chrome"],
765
- researcher: ["context", "fetch", "firecrawl", "github", "web", "bridge", "browser", "chrome", "page"],
798
+ researcher: ["context", "fetch", "firecrawl", "github", "web", "bridge", "browser", "chrome", "page", "supermemory"],
766
799
  "vision-debugger": ["web", "bridge", "browser", "chrome", "screenshot", "playwright"],
767
- planner: ["omk", "memory", "sequential"],
800
+ planner: ["omk", "memory", "sequential", "adaptorch", "ouroboros"],
768
801
  architect: ["omk", "memory", "github"],
769
802
  coder: ["omk", "filesystem", "git"],
770
- reviewer: ["github", "git", "omk"],
803
+ reviewer: ["github", "git", "omk", "adaptorch"],
771
804
  security: ["omk", "git", "filesystem"],
772
805
  qa: ["omk", "playwright", "github", "web", "bridge", "browser", "chrome"],
773
806
  tester: ["omk", "playwright", "web", "bridge", "browser", "chrome"],
774
- ontology: ["omk", "memory"],
807
+ ontology: ["omk", "memory", "supermemory"],
775
808
  },
776
809
  hook: {
777
810
  coder: ["shell", "format", "typecheck", "eslint", "protect"],
@@ -19,6 +19,10 @@ export interface LaunchChatCockpitOptions {
19
19
  cockpitHeight?: string;
20
20
  }
21
21
  export declare function ensureChatRunState(root: string, runId: string): Promise<void>;
22
+ export declare function resolveCockpitChromeTheme(options: {
23
+ brand?: string;
24
+ env?: NodeJS.ProcessEnv;
25
+ }): "night-city" | "rust-forge" | undefined;
22
26
  export declare function buildRightPaneCommand(options: {
23
27
  nodeCmd: string;
24
28
  cliCmd: string;
@@ -26,7 +30,12 @@ export declare function buildRightPaneCommand(options: {
26
30
  refreshMs: number;
27
31
  redraw?: "diff" | "full" | "append";
28
32
  height?: number;
33
+ theme?: string;
29
34
  }): string;
35
+ export declare function buildTmuxBrandChromeOptions(brand?: string): {
36
+ sessionOptions: Array<readonly [string, string]>;
37
+ windowOptions: Array<readonly [string, string]>;
38
+ };
30
39
  export declare function launchChatCockpit(options?: LaunchChatCockpitOptions): Promise<void>;
31
40
  export declare function buildLeftPaneCommand(options: {
32
41
  nodeCmd: string;