open-multi-agent-kit 0.78.5 → 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.
Files changed (176) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +64 -0
  3. package/MATURITY.md +2 -2
  4. package/README.md +20 -5
  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 +23 -11
  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/init/content.d.ts +1 -1
  51. package/dist/commands/init/content.js +3 -11
  52. package/dist/commands/init.js +2 -2
  53. package/dist/commands/mcp/config.d.ts +32 -0
  54. package/dist/commands/mcp/config.js +264 -0
  55. package/dist/commands/mcp/doctor-fix.d.ts +12 -0
  56. package/dist/commands/mcp/doctor-fix.js +261 -0
  57. package/dist/commands/mcp/doctor.d.ts +55 -0
  58. package/dist/commands/mcp/doctor.js +401 -0
  59. package/dist/commands/mcp/list.d.ts +1 -0
  60. package/dist/commands/mcp/list.js +56 -0
  61. package/dist/commands/mcp/shared.d.ts +47 -0
  62. package/dist/commands/mcp/shared.js +192 -0
  63. package/dist/commands/mcp/test.d.ts +5 -0
  64. package/dist/commands/mcp/test.js +457 -0
  65. package/dist/commands/mcp.d.ts +8 -104
  66. package/dist/commands/mcp.js +5 -1603
  67. package/dist/contracts/proof.d.ts +1 -1
  68. package/dist/goal/control-loop.d.ts +15 -0
  69. package/dist/goal/control-loop.js +39 -5
  70. package/dist/hud/render.d.ts +2 -0
  71. package/dist/hud/render.js +7 -1
  72. package/dist/mcp/secret-scanner.d.ts +6 -0
  73. package/dist/mcp/secret-scanner.js +44 -11
  74. package/dist/memory/graph-delta-log.d.ts +137 -0
  75. package/dist/memory/graph-delta-log.js +650 -0
  76. package/dist/memory/graph-viewer.js +13 -32
  77. package/dist/memory/local-graph-memory-store.d.ts +36 -3
  78. package/dist/memory/local-graph-memory-store.js +255 -10
  79. package/dist/orchestration/log-streamer.js +13 -8
  80. package/dist/orchestration/routing.d.ts +4 -0
  81. package/dist/orchestration/routing.js +28 -3
  82. package/dist/orchestration/state-persister.js +8 -1
  83. package/dist/providers/anthropic-messages-runner.d.ts +17 -0
  84. package/dist/providers/anthropic-messages-runner.js +197 -0
  85. package/dist/providers/model-registry.d.ts +1 -1
  86. package/dist/providers/model-registry.js +37 -3
  87. package/dist/providers/provider-runtime.js +27 -11
  88. package/dist/providers/thinking-levels.js +4 -1
  89. package/dist/providers/types.d.ts +3 -3
  90. package/dist/runtime/contracts/weakness-remediation.d.ts +11 -1
  91. package/dist/runtime/contracts/weakness-remediation.js +9 -1
  92. package/dist/runtime/router-v2-scoring.d.ts +8 -3
  93. package/dist/runtime/router-v2-scoring.js +27 -22
  94. package/dist/runtime/runtime-router.d.ts +5 -0
  95. package/dist/runtime/runtime-router.js +40 -8
  96. package/dist/runtime/sandbox-profile.d.ts +29 -0
  97. package/dist/runtime/sandbox-profile.js +101 -0
  98. package/dist/runtime/slash-commands.js +300 -2
  99. package/dist/runtime/tool-dispatch-contracts.d.ts +15 -0
  100. package/dist/runtime/tool-dispatch-contracts.js +12 -0
  101. package/dist/runtime/weights-config.d.ts +90 -0
  102. package/dist/runtime/weights-config.js +249 -0
  103. package/dist/schema/envelope.schema.d.ts +18 -18
  104. package/dist/schema/evidence.schema.d.ts +2 -2
  105. package/dist/schema/proof-bundle.schema.d.ts +6 -6
  106. package/dist/schema/proof-bundle.schema.js +0 -1
  107. package/dist/schema/provider.schema.d.ts +2 -2
  108. package/dist/schema/run-manifest.schema.d.ts +16 -16
  109. package/dist/theme/ansi.js +9 -2
  110. package/dist/theme/extended-palette.d.ts +85 -0
  111. package/dist/theme/extended-palette.js +108 -0
  112. package/dist/theme/layout.js +29 -8
  113. package/dist/theme/metrics.js +5 -5
  114. package/dist/theme/parallel.js +25 -15
  115. package/dist/ui/omk-sigil.js +5 -14
  116. package/dist/ui/omk-working-sweep.js +5 -15
  117. package/dist/util/chat-agent-mode.d.ts +11 -0
  118. package/dist/util/chat-agent-mode.js +41 -8
  119. package/dist/util/chat-cockpit.d.ts +9 -0
  120. package/dist/util/chat-cockpit.js +77 -20
  121. package/dist/util/fs/core.d.ts +5 -0
  122. package/dist/util/fs/core.js +35 -0
  123. package/dist/util/fs/internal.d.ts +14 -0
  124. package/dist/util/fs/internal.js +169 -0
  125. package/dist/util/fs/kimi-sync.d.ts +41 -0
  126. package/dist/util/fs/kimi-sync.js +495 -0
  127. package/dist/util/fs/logo.d.ts +2 -0
  128. package/dist/util/fs/logo.js +78 -0
  129. package/dist/util/fs/manifest.d.ts +6 -0
  130. package/dist/util/fs/manifest.js +40 -0
  131. package/dist/util/fs/mcp-diagnose.d.ts +15 -0
  132. package/dist/util/fs/mcp-diagnose.js +204 -0
  133. package/dist/util/fs/mcp-runtime-config.d.ts +23 -0
  134. package/dist/util/fs/mcp-runtime-config.js +412 -0
  135. package/dist/util/fs/paths.d.ts +13 -0
  136. package/dist/util/fs/paths.js +82 -0
  137. package/dist/util/fs/preflight.d.ts +27 -0
  138. package/dist/util/fs/preflight.js +271 -0
  139. package/dist/util/fs.d.ts +8 -128
  140. package/dist/util/fs.js +8 -1757
  141. package/dist/util/terminal-layout.js +5 -1
  142. package/dist/util/version.js +2 -1
  143. package/docs/2026-06-10/critical-issues.md +20 -0
  144. package/docs/2026-06-10/improvements.md +14 -0
  145. package/docs/2026-06-10/init-checklist.md +25 -0
  146. package/docs/2026-06-10/plan.md +20 -0
  147. package/docs/2026-06-11/critical-issues.md +20 -0
  148. package/docs/2026-06-11/improvements.md +14 -0
  149. package/docs/2026-06-11/init-checklist.md +25 -0
  150. package/docs/2026-06-11/plan.md +20 -0
  151. package/docs/ARCHITECTURE_ANALYSIS_CODEGRAPH.md +223 -0
  152. package/docs/adr/0001-no-native-rust-lane.md +52 -0
  153. package/docs/codex-oauth-setup.md +14 -0
  154. package/docs/decisions/2026-06-10-git-history-bloat.md +61 -0
  155. package/docs/decisions/ADR-theme-dark-only-assets.md +43 -0
  156. package/docs/getting-started.md +1 -1
  157. package/docs/headroom-omk-final-summary.md +188 -0
  158. package/docs/headroom-omk-integration.md +394 -0
  159. package/docs/headroom-omk-setup-guide.md +422 -0
  160. package/docs/headroom-omk-usage-examples.md +371 -0
  161. package/docs/provider-maturity.md +1 -1
  162. package/docs/versioning.md +3 -3
  163. package/package.json +10 -10
  164. package/readmeasset/.npmignore +2 -0
  165. package/readmeasset/ASSET_INDEX.md +7 -5
  166. package/readmeasset/ASSET_PROVENANCE.md +21 -5
  167. package/readmeasset/omk-control-surfaces.svg +55 -0
  168. package/readmeasset/omk-core-loop.svg +1 -0
  169. package/readmeasset/omk-logo-mark.svg +1 -0
  170. package/readmeasset/omk-release-assertions.svg +51 -0
  171. package/dist/native/linux-x64/omk-safety +0 -0
  172. package/dist/util/native-safety.d.ts +0 -28
  173. package/dist/util/native-safety.js +0 -118
  174. package/templates/skills/agents/omk-adaptorch-orchestration-review/SKILL.md +0 -52
  175. package/templates/skills/kimi/mcp-install/SKILL.md +0 -66
  176. package/templates/skills/kimi/omk-adaptorch-orchestration-review/SKILL.md +0 -52
@@ -0,0 +1,241 @@
1
+ /**
2
+ * OMK brand -- theme-compiled color source (theme contract T5b).
3
+ *
4
+ * Single bridge between canonical omk.theme.v1 documents and the brand
5
+ * palette/UI layers. Brand chrome defaults to night-city for byte parity, and
6
+ * can be switched at process edges to rust-forge without changing import shapes.
7
+ *
8
+ * Imports target the concrete src/cli/theme modules (render-table,
9
+ * terminal-capability, oklab-quantize) rather than the barrel to avoid a
10
+ * module cycle through theme-registry -> theme/colors -> brand/palette.
11
+ */
12
+ import { compileTheme } from "../cli/theme/render-table.js";
13
+ import { detectColorTier } from "../cli/theme/terminal-capability.js";
14
+ import { hexToRgb255, normalizeHex } from "../cli/theme/oklab-quantize.js";
15
+ import nightCityThemeJson from "./night-city.theme.json" with { type: "json" };
16
+ import rustForgeThemeJson from "./rust-forge.theme.json" with { type: "json" };
17
+ const REQUIRED_NIGHT_CITY_PRIMITIVES = [
18
+ "dark",
19
+ "surface",
20
+ "cyan",
21
+ "mint",
22
+ "magenta",
23
+ "purple",
24
+ "amber",
25
+ "red",
26
+ "cream",
27
+ "muted",
28
+ "gray",
29
+ ];
30
+ const REQUIRED_RUST_FORGE_PRIMITIVES = [
31
+ "iron",
32
+ "coal",
33
+ "forge",
34
+ "anvil",
35
+ "rust",
36
+ "molten",
37
+ "copper",
38
+ "ember",
39
+ "oxide",
40
+ "quench",
41
+ "verdigris",
42
+ "crimson",
43
+ "steel",
44
+ "scale",
45
+ "ash",
46
+ "slag",
47
+ "bone",
48
+ ];
49
+ function assertThemeDocument(doc, expectedName, requiredPrimitives) {
50
+ if (typeof doc !== "object" || doc === null) {
51
+ throw new Error(`brand theme-compiled: ${expectedName} theme snapshot is not an object`);
52
+ }
53
+ const candidate = doc;
54
+ if (candidate.schemaVersion !== "omk.theme.v1") {
55
+ throw new Error(`brand theme-compiled: expected schemaVersion "omk.theme.v1", got "${String(candidate.schemaVersion)}"`);
56
+ }
57
+ if (candidate.name !== expectedName) {
58
+ throw new Error(`brand theme-compiled: expected theme name "${expectedName}", got "${String(candidate.name)}"`);
59
+ }
60
+ if (typeof candidate.primitives !== "object" || candidate.primitives === null) {
61
+ throw new Error(`brand theme-compiled: ${expectedName} theme snapshot has no primitives map`);
62
+ }
63
+ if (typeof candidate.semantics !== "object" || candidate.semantics === null) {
64
+ throw new Error(`brand theme-compiled: ${expectedName} theme snapshot has no semantics map`);
65
+ }
66
+ if (typeof candidate.fallback16 !== "object" || candidate.fallback16 === null) {
67
+ throw new Error(`brand theme-compiled: ${expectedName} theme snapshot has no fallback16 map`);
68
+ }
69
+ const primitives = candidate.primitives;
70
+ for (const name of requiredPrimitives) {
71
+ if (typeof primitives[name] !== "string") {
72
+ throw new Error(`brand theme-compiled: ${expectedName} theme snapshot is missing primitive "${name}"`);
73
+ }
74
+ }
75
+ return doc;
76
+ }
77
+ /** Validated night-city theme document (build-time snapshot of themes/). */
78
+ export const NIGHT_CITY_THEME = assertThemeDocument(nightCityThemeJson, "night-city", REQUIRED_NIGHT_CITY_PRIMITIVES);
79
+ /** Validated rust-forge theme document (build-time snapshot of themes/). */
80
+ export const RUST_FORGE_THEME = assertThemeDocument(rustForgeThemeJson, "rust-forge", REQUIRED_RUST_FORGE_PRIMITIVES);
81
+ const BRAND_THEME_BY_NAME = {
82
+ "night-city": NIGHT_CITY_THEME,
83
+ "rust-forge": RUST_FORGE_THEME,
84
+ };
85
+ let activeBrandThemeName = "night-city";
86
+ export function resolveBrandThemeName(name) {
87
+ const normalized = name?.trim().toLowerCase();
88
+ if (normalized === "rust-forge" ||
89
+ normalized === "rust" ||
90
+ normalized === "cargo" ||
91
+ normalized === "oxide" ||
92
+ normalized === "forge" ||
93
+ normalized === "oxidized-forge" ||
94
+ normalized === "oxidized" ||
95
+ normalized === "rust-native") {
96
+ return "rust-forge";
97
+ }
98
+ return "night-city";
99
+ }
100
+ export function setActiveBrandTheme(name) {
101
+ activeBrandThemeName = resolveBrandThemeName(name);
102
+ return activeBrandThemeName;
103
+ }
104
+ export function getActiveBrandThemeName() {
105
+ return activeBrandThemeName;
106
+ }
107
+ export function getActiveBrandTheme() {
108
+ return BRAND_THEME_BY_NAME[activeBrandThemeName];
109
+ }
110
+ function hexByRole(theme, role) {
111
+ const semantic = theme.semantics[role];
112
+ if (semantic === undefined) {
113
+ throw new Error(`brand theme-compiled: theme "${theme.name}" has no semantic role "${role}"`);
114
+ }
115
+ const raw = theme.primitives[semantic.color];
116
+ if (raw === undefined) {
117
+ throw new Error(`brand theme-compiled: theme "${theme.name}" semantic "${role}" references missing primitive "${semantic.color}"`);
118
+ }
119
+ return normalizeHex(raw);
120
+ }
121
+ export function activeThemeHexByRole(role) {
122
+ return hexByRole(getActiveBrandTheme(), role);
123
+ }
124
+ export function brandThemeHexByRole(name, role) {
125
+ return hexByRole(BRAND_THEME_BY_NAME[name], role);
126
+ }
127
+ export function brandThemeRgbByRole(name, role) {
128
+ const [r, g, b] = hexToRgb255(brandThemeHexByRole(name, role));
129
+ return { r, g, b };
130
+ }
131
+ export function activeThemeRgbByRole(role) {
132
+ const [r, g, b] = hexToRgb255(activeThemeHexByRole(role));
133
+ return { r, g, b };
134
+ }
135
+ const PRIMITIVE_ROLE_ALIASES = {
136
+ cyan: "route.active",
137
+ mint: "evidence.pass",
138
+ magenta: "control.accent",
139
+ purple: "control.accent",
140
+ amber: "route.fallback",
141
+ red: "telemetry.error",
142
+ cream: "control.fg",
143
+ muted: "dag.lane.queued",
144
+ gray: "control.dim",
145
+ dark: "control.bg",
146
+ };
147
+ export function activeThemeHexByPrimitive(primitive) {
148
+ const theme = getActiveBrandTheme();
149
+ const raw = theme.primitives[primitive];
150
+ if (raw !== undefined)
151
+ return normalizeHex(raw);
152
+ if (primitive === "surface") {
153
+ const surfacePrimitive = theme.backgrounds[1] ?? theme.backgrounds[0];
154
+ const surface = surfacePrimitive ? theme.primitives[surfacePrimitive] : undefined;
155
+ return surface === undefined ? activeThemeHexByRole("control.bg") : normalizeHex(surface);
156
+ }
157
+ const role = PRIMITIVE_ROLE_ALIASES[primitive];
158
+ if (role !== undefined)
159
+ return activeThemeHexByRole(role);
160
+ throw new Error(`brand theme-compiled: theme "${theme.name}" has no primitive "${primitive}"`);
161
+ }
162
+ /** Canonical normalized uppercase hex string for a night-city primitive. */
163
+ export function nightCityHex(primitive) {
164
+ const raw = NIGHT_CITY_THEME.primitives[primitive];
165
+ if (raw === undefined) {
166
+ throw new Error(`brand theme-compiled: unknown night-city primitive "${primitive}"`);
167
+ }
168
+ return normalizeHex(raw);
169
+ }
170
+ /** 0-255 RGB triple for a night-city primitive. */
171
+ export function nightCityRgb(primitive) {
172
+ const [r, g, b] = hexToRgb255(nightCityHex(primitive));
173
+ return { r, g, b };
174
+ }
175
+ function channelHex(value) {
176
+ const clamped = Math.max(0, Math.min(255, Math.round(value)));
177
+ return clamped.toString(16).padStart(2, "0").toUpperCase();
178
+ }
179
+ /** Convert an RGB triple to canonical uppercase hex (no literal hex in source). */
180
+ export function rgbToHex(color) {
181
+ return `#${channelHex(color.r)}${channelHex(color.g)}${channelHex(color.b)}`;
182
+ }
183
+ const compiledByThemeAndTier = new Map();
184
+ /**
185
+ * Compiled active brand render table for the requested (default: detected)
186
+ * degradation tier. The cache key includes both theme name and tier.
187
+ */
188
+ export function getCompiledBrandTheme(tier = detectColorTier()) {
189
+ const theme = getActiveBrandTheme();
190
+ const cacheKey = `${theme.name}:${tier}`;
191
+ const cached = compiledByThemeAndTier.get(cacheKey);
192
+ if (cached !== undefined)
193
+ return cached;
194
+ const compiled = compileTheme(theme, tier);
195
+ compiledByThemeAndTier.set(cacheKey, compiled);
196
+ return compiled;
197
+ }
198
+ /** Paint text with an active-brand semantic token at the detected color tier. */
199
+ export function brandPaint(role, text) {
200
+ return getCompiledBrandTheme().paint(role, text);
201
+ }
202
+ export function getActiveBrandChromeLabel() {
203
+ return activeBrandThemeName === "rust-forge" ? "Oxidized Forge" : "Night City";
204
+ }
205
+ export function getActiveBrandCockpitSubtitle() {
206
+ return activeBrandThemeName === "rust-forge"
207
+ ? "OXIDIZED FORGE · ROUTE · VERIFY · CONTROL"
208
+ : "NEON GRID · GREEN RAIN · METRICS WALL";
209
+ }
210
+ export function getActiveBrandCockpitDetail() {
211
+ return activeBrandThemeName === "rust-forge"
212
+ ? "forge heat · anvil evidence · quench safety · OMK control"
213
+ : "route · verify · loop · control · evidence gated";
214
+ }
215
+ export function getActiveBrandHudStatus() {
216
+ return activeBrandThemeName === "rust-forge" ? "OXIDIZED FORGE ONLINE" : "NEON GRID ONLINE";
217
+ }
218
+ export function getActiveBrandConsoleLine() {
219
+ return activeBrandThemeName === "rust-forge"
220
+ ? "Oxidized Forge Console // OMK independent control // heat anvil quench"
221
+ : "Night City Ops Console // cyberpunk metrics wall";
222
+ }
223
+ /**
224
+ * Unconditional truecolor SGR open sequence for a brand RGB value, produced
225
+ * through the theme compiler (single SGR factory -- no escape literals here).
226
+ * Brand theme constants intentionally stay truecolor for byte parity with the
227
+ * legacy palette; tier-aware rendering should use `getCompiledBrandTheme()`.
228
+ */
229
+ export function brandTruecolorSgr(color) {
230
+ const inlineTheme = {
231
+ schemaVersion: "omk.theme.v1",
232
+ name: "omk-brand-inline",
233
+ mode: "dark",
234
+ primitives: { brand: rgbToHex(color) },
235
+ backgrounds: [],
236
+ semantics: { "brand.tone": { color: "brand", usage: "text" } },
237
+ components: {},
238
+ fallback16: { "brand.tone": "white" },
239
+ };
240
+ return compileTheme(inlineTheme, "truecolor").tokens["brand.tone"].sgr;
241
+ }
@@ -1,6 +1,19 @@
1
- const ESC = "\x1b[";
1
+ import { P } from "./palette.js";
2
+ import { brandThemeRgbByRole, brandTruecolorSgr } from "./theme-compiled.js";
3
+ /**
4
+ * Truecolor SGR open sequence for a brand color, produced via the theme
5
+ * compiler (compileTheme) — no raw escape literals in this file. Brand theme
6
+ * constants stay truecolor on purpose for byte parity; tier-aware rendering
7
+ * lives in src/brand/theme-compiled.ts (getCompiledBrandTheme).
8
+ */
9
+ function fg(color) {
10
+ return brandTruecolorSgr(color);
11
+ }
2
12
  function rgb(r, g, b) {
3
- return `${ESC}38;2;${r};${g};${b}m`;
13
+ return fg({ r, g, b });
14
+ }
15
+ function rustFg(role) {
16
+ return brandTruecolorSgr(brandThemeRgbByRole("rust-forge", role));
4
17
  }
5
18
  export const SYSTEM24_THEME = {
6
19
  name: "system24",
@@ -45,15 +58,15 @@ export const GREEN_RAIN_THEME = {
45
58
  signal: "◆",
46
59
  },
47
60
  colors: {
48
- border: rgb(8, 39, 31),
49
- borderHot: rgb(0, 255, 194),
50
- text: rgb(232, 248, 255),
51
- muted: rgb(117, 143, 168),
52
- primary: rgb(0, 255, 194),
53
- success: rgb(0, 255, 194),
54
- warning: rgb(255, 176, 0),
55
- danger: rgb(255, 88, 116),
56
- info: rgb(0, 214, 255),
61
+ border: fg(P.matrixDark),
62
+ borderHot: fg(P.mint),
63
+ text: fg(P.cream),
64
+ muted: fg(P.gray),
65
+ primary: fg(P.mint),
66
+ success: fg(P.mint),
67
+ warning: fg(P.orange),
68
+ danger: fg(P.red),
69
+ info: fg(P.blue),
57
70
  },
58
71
  motion: {
59
72
  rain: true,
@@ -74,15 +87,15 @@ export const NEON_GRID_THEME = {
74
87
  signal: "◇",
75
88
  },
76
89
  colors: {
77
- border: rgb(34, 50, 74),
78
- borderHot: rgb(0, 214, 255),
79
- text: rgb(232, 248, 255),
80
- muted: rgb(117, 143, 168),
81
- primary: rgb(0, 214, 255),
82
- success: rgb(0, 255, 194),
83
- warning: rgb(255, 176, 0),
84
- danger: rgb(255, 88, 116),
85
- info: rgb(0, 214, 255),
90
+ border: fg(P.gridLine),
91
+ borderHot: fg(P.blue),
92
+ text: fg(P.cream),
93
+ muted: fg(P.gray),
94
+ primary: fg(P.blue),
95
+ success: fg(P.mint),
96
+ warning: fg(P.orange),
97
+ danger: fg(P.red),
98
+ info: fg(P.blue),
86
99
  },
87
100
  motion: {
88
101
  rain: false,
@@ -92,8 +105,8 @@ export const NEON_GRID_THEME = {
92
105
  export const RUST_FORGE_THEME = {
93
106
  name: "rust-forge",
94
107
  label: "OMK Rust Forge",
95
- tagline: "Rust-native safety console for OMK orchestration.",
96
- motto: "Forge native checks. Verify the evidence. Control the loop.",
108
+ tagline: "Oxidized forge console for standalone OMK control.",
109
+ motto: "Forge the route. Verify the evidence. OMK controls the loop.",
97
110
  symbols: {
98
111
  prompt: "›",
99
112
  active: "◉",
@@ -103,15 +116,15 @@ export const RUST_FORGE_THEME = {
103
116
  signal: "▣",
104
117
  },
105
118
  colors: {
106
- border: rgb(124, 45, 18),
107
- borderHot: rgb(249, 115, 22),
108
- text: rgb(232, 248, 255),
109
- muted: rgb(117, 143, 168),
110
- primary: rgb(249, 115, 22),
111
- success: rgb(0, 255, 194),
112
- warning: rgb(255, 176, 0),
113
- danger: rgb(255, 88, 116),
114
- info: rgb(0, 214, 255),
119
+ border: rustFg("route.fallback"),
120
+ borderHot: rustFg("control.accent"),
121
+ text: rustFg("control.fg"),
122
+ muted: rustFg("control.dim"),
123
+ primary: rustFg("control.accent"),
124
+ success: rustFg("evidence.pass"),
125
+ warning: rustFg("telemetry.warn"),
126
+ danger: rustFg("telemetry.error"),
127
+ info: rustFg("route.active"),
115
128
  },
116
129
  motion: {
117
130
  rain: false,
@@ -133,13 +146,13 @@ export const MATRIX_THEME = {
133
146
  },
134
147
  colors: {
135
148
  border: rgb(0, 20, 0),
136
- borderHot: rgb(0, 255, 65),
149
+ borderHot: fg(P.matrixRainGreen),
137
150
  text: rgb(200, 255, 200),
138
- muted: rgb(0, 95, 25),
139
- primary: rgb(0, 255, 65),
140
- success: rgb(0, 255, 65),
141
- warning: rgb(255, 176, 0),
142
- danger: rgb(255, 50, 50),
151
+ muted: fg(P.matrixRainDim),
152
+ primary: fg(P.matrixRainGreen),
153
+ success: fg(P.matrixRainGreen),
154
+ warning: fg(P.matrixWarningAmber),
155
+ danger: fg(P.matrixErrorRed),
143
156
  info: rgb(0, 200, 50),
144
157
  },
145
158
  motion: {
@@ -3,8 +3,15 @@
3
3
  *
4
4
  * Computes a release viability score R_v from ten normalized input
5
5
  * dimensions and derives a verdict: block, pre-release, or stable.
6
+ *
7
+ * Weights are sourced from the omk.weights.v1 contract (releaseGate vector,
8
+ * normalize:true). The historical raw weights summed to 1.05; normalization
9
+ * divides weights, the regression penalty, and the verdict thresholds by the
10
+ * SAME factor (1/1.05), a pure uniform scaling — verdicts are mathematically
11
+ * identical for every input. Effective thresholds: preRelease ≈ 0.714286,
12
+ * stable ≈ 0.857143 (printed dynamically in reason strings).
6
13
  */
7
- import { type ReleasePromotionInputs, type ReleasePromotionResult } from "../runtime/contracts/weakness-remediation.js";
14
+ import type { ReleasePromotionInputs, ReleasePromotionResult } from "../runtime/contracts/weakness-remediation.js";
8
15
  /** Gate engine contract. */
9
16
  export interface ReleasePromotionGate {
10
17
  /** Evaluate inputs and return scored result with verdict. */
@@ -3,18 +3,30 @@
3
3
  *
4
4
  * Computes a release viability score R_v from ten normalized input
5
5
  * dimensions and derives a verdict: block, pre-release, or stable.
6
+ *
7
+ * Weights are sourced from the omk.weights.v1 contract (releaseGate vector,
8
+ * normalize:true). The historical raw weights summed to 1.05; normalization
9
+ * divides weights, the regression penalty, and the verdict thresholds by the
10
+ * SAME factor (1/1.05), a pure uniform scaling — verdicts are mathematically
11
+ * identical for every input. Effective thresholds: preRelease ≈ 0.714286,
12
+ * stable ≈ 0.857143 (printed dynamically in reason strings).
6
13
  */
7
- import { RELEASE_GATE_WEIGHTS, } from "../runtime/contracts/weakness-remediation.js";
14
+ import { releaseGateEffective } from "../runtime/weights-config.js";
8
15
  /** Factory that creates the default release promotion gate. */
9
16
  export function createReleasePromotionGate() {
17
+ const effective = releaseGateEffective();
18
+ const w = effective.weights;
19
+ const penalties = effective.penalties;
20
+ const preReleaseThreshold = effective.thresholds.preRelease;
21
+ const stableThreshold = effective.thresholds.stable;
10
22
  return {
11
23
  evaluate(inputs) {
12
- const w = RELEASE_GATE_WEIGHTS;
13
24
  const demoRun = inputs.demoRun ?? false;
14
25
  const maturity = inputs.maturity ?? inputs.providerMinimum ?? 0;
15
26
  const versionConsistency = inputs.versionConsistency ?? inputs.semver ?? 1;
16
27
  const liveBenchmarkPass = inputs.liveBenchmarkPass ?? false;
17
28
  const sandboxViolationCount = inputs.sandboxViolationCount ?? Number.POSITIVE_INFINITY;
29
+ const exactTagCiPass = inputs.exactTagCiPass ?? false;
18
30
  const rawScore = w.ci * inputs.ci +
19
31
  w.build * (inputs.build ?? 0) +
20
32
  w.types * (inputs.types ?? 0) +
@@ -24,7 +36,7 @@ export function createReleasePromotionGate() {
24
36
  w.proof * inputs.proofMedian +
25
37
  w.maturity * maturity +
26
38
  w.docs * inputs.docs * versionConsistency -
27
- w.regression * inputs.regressionSeverity;
39
+ penalties.regression * inputs.regressionSeverity;
28
40
  const score = clamp01(rawScore);
29
41
  const reasons = [];
30
42
  const blocked = inputs.ci === 0 || inputs.freshInstallSmoke === 0 || versionConsistency === 0 || !demoRun;
@@ -42,25 +54,25 @@ export function createReleasePromotionGate() {
42
54
  reasons.push("Minimal verified demo run failed or missing (blocking)");
43
55
  }
44
56
  }
45
- const stableEligible = liveBenchmarkPass && sandboxViolationCount === 0;
57
+ const stableEligible = liveBenchmarkPass && sandboxViolationCount === 0 && exactTagCiPass;
46
58
  let verdict;
47
59
  if (blocked) {
48
60
  verdict = "block";
49
61
  }
50
- else if (score >= 0.90 && inputs.proofMedian >= 0.85 && maturity >= 0.80 && stableEligible) {
62
+ else if (score >= stableThreshold && inputs.proofMedian >= 0.85 && maturity >= 0.80 && stableEligible) {
51
63
  verdict = "stable";
52
- reasons.push(`Score ${formatScore(score)} meets stable threshold (≥0.90) with proof≥0.85, maturity≥0.80, live benchmark pass, and sandbox violations=0`);
64
+ reasons.push(`Score ${formatScore(score)} meets stable threshold (≥${stableThreshold.toFixed(2)}) with proof≥0.85, maturity≥0.80, live benchmark pass, sandbox violations=0, and exact-tag CI pass`);
53
65
  }
54
- else if (score >= 0.75 && inputs.proofMedian >= 0.75) {
66
+ else if (score >= preReleaseThreshold && inputs.proofMedian >= 0.75) {
55
67
  verdict = "pre-release";
56
- reasons.push(`Score ${formatScore(score)} meets pre-release threshold (≥0.75) with proof≥0.75`);
57
- if (score >= 0.90 && inputs.proofMedian >= 0.85 && maturity >= 0.80 && !stableEligible) {
58
- reasons.push("Stable verdict withheld until live benchmark passes and sandboxViolationCount is 0");
68
+ reasons.push(`Score ${formatScore(score)} meets pre-release threshold (≥${preReleaseThreshold.toFixed(2)}) with proof≥0.75`);
69
+ if (score >= stableThreshold && inputs.proofMedian >= 0.85 && maturity >= 0.80 && !stableEligible) {
70
+ reasons.push("Stable verdict withheld until live benchmark passes, sandboxViolationCount is 0, and exact-tag CI passes");
59
71
  }
60
72
  }
61
73
  else {
62
74
  verdict = "block";
63
- reasons.push(`Score ${formatScore(score)} below pre-release threshold (≥0.75) or proof below 0.75`);
75
+ reasons.push(`Score ${formatScore(score)} below pre-release threshold (≥${preReleaseThreshold.toFixed(2)}) or proof below 0.75`);
64
76
  }
65
77
  return {
66
78
  score,
@@ -1,4 +1,5 @@
1
1
  import type { Command } from "commander";
2
+ export declare const OMK_ROOT_ENTRY_SURFACE = "omk-root-orchestrator";
2
3
  interface RootChatLaunchArgsOptions {
3
4
  readonly cliPath: string;
4
5
  readonly runId?: string;
package/dist/cli/root.js CHANGED
@@ -3,6 +3,7 @@ import { t, initI18n } from "../util/i18n.js";
3
3
  import { buildCustomHelp } from "../util/help-text.js";
4
4
  const OMK_ENTRY_BRAND = "neon-grid";
5
5
  const OMK_ENTRY_UI = "neon-grid";
6
+ export const OMK_ROOT_ENTRY_SURFACE = "omk-root-orchestrator";
6
7
  export function buildRootChatLaunchArgs(options) {
7
8
  const chatArgs = [
8
9
  options.cliPath,
@@ -90,7 +91,7 @@ export function configureRootProgram(program, OMK_VERSION, OMK_VERSION_FOOTER) {
90
91
  });
91
92
  const childEnv = {
92
93
  ...process.env,
93
- OMK_ENTRY_SURFACE: "pi-omk",
94
+ OMK_ENTRY_SURFACE: OMK_ROOT_ENTRY_SURFACE,
94
95
  };
95
96
  const result = spawnSync(process.execPath, chatArgs, { stdio: "inherit", env: childEnv });
96
97
  if (result.status && result.status !== 0) {
@@ -1,9 +1,18 @@
1
1
  /**
2
2
  * CLI Theme — Barrel export for terminal capability, theme registry, and theme resolver.
3
3
  */
4
- export { getTerminalCapability, defaultThemeForCapability, } from "./terminal-capability.js";
5
- export type { TerminalCapability, ColorDepth, } from "./terminal-capability.js";
4
+ export { getTerminalCapability, defaultThemeForCapability, detectColorTier, colorTierForDepth, } from "./terminal-capability.js";
5
+ export type { TerminalCapability, ColorDepth, ColorTier, } from "./terminal-capability.js";
6
+ export { hexToOklab, hexToRgb255, normalizeHex, nearestXterm256, buildXterm256Lookup, } from "./oklab-quantize.js";
7
+ export type { OklabColor } from "./oklab-quantize.js";
8
+ export { compileTheme } from "./render-table.js";
9
+ export type { Ansi16Name, CompiledTheme, OmkThemeV1, RenderEntry, ThemeSemanticSpec, ThemeTokenKind, ThemeUsage, } from "./render-table.js";
6
10
  export { getBuiltinTheme, listBuiltinThemes, registerBuiltinTheme, __registry, } from "./theme-registry.js";
7
11
  export type { SemanticToken, ThemePalette, } from "./theme-registry.js";
8
12
  export { resolveTheme } from "./theme-resolver.js";
9
13
  export type { ResolveThemeOptions } from "./theme-resolver.js";
14
+ export { renderStatusFrame } from "./status-frame.js";
15
+ export { listThemeDocuments, loadThemeDocument, validateThemeDocument, } from "./theme-doc.js";
16
+ export type { ThemeDocumentRef } from "./theme-doc.js";
17
+ export { explainColorTier } from "./tier-explain.js";
18
+ export type { ColorTierExplanation } from "./tier-explain.js";
@@ -1,6 +1,11 @@
1
1
  /**
2
2
  * CLI Theme — Barrel export for terminal capability, theme registry, and theme resolver.
3
3
  */
4
- export { getTerminalCapability, defaultThemeForCapability, } from "./terminal-capability.js";
4
+ export { getTerminalCapability, defaultThemeForCapability, detectColorTier, colorTierForDepth, } from "./terminal-capability.js";
5
+ export { hexToOklab, hexToRgb255, normalizeHex, nearestXterm256, buildXterm256Lookup, } from "./oklab-quantize.js";
6
+ export { compileTheme } from "./render-table.js";
5
7
  export { getBuiltinTheme, listBuiltinThemes, registerBuiltinTheme, __registry, } from "./theme-registry.js";
6
8
  export { resolveTheme } from "./theme-resolver.js";
9
+ export { renderStatusFrame } from "./status-frame.js";
10
+ export { listThemeDocuments, loadThemeDocument, validateThemeDocument, } from "./theme-doc.js";
11
+ export { explainColorTier } from "./tier-explain.js";
@@ -0,0 +1,29 @@
1
+ /**
2
+ * CLI Theme — OKLab xterm-256 Quantizer
3
+ * Precomputes an OKLab nearest-neighbor lookup mapping 24-bit theme colors to
4
+ * xterm-256 indexes 16-255 ONLY. System colors 0-15 are never emitted because
5
+ * users commonly remap them, which would break theme contrast guarantees.
6
+ *
7
+ * Pure functions, no I/O. OKLab math is self-contained, ported from
8
+ * scripts/theme-check.mjs (Björn Ottosson sRGB → OKLab).
9
+ */
10
+ export interface OklabColor {
11
+ readonly L: number;
12
+ readonly a: number;
13
+ readonly b: number;
14
+ }
15
+ /** Normalize "#aabbcc" / "AABBCC" to canonical "#AABBCC". Throws on bad input. */
16
+ export declare function normalizeHex(hex: string): string;
17
+ /** Parse a normalized 6-digit hex color into 0-255 RGB channels. */
18
+ export declare function hexToRgb255(hex: string): readonly [number, number, number];
19
+ export declare function hexToOklab(hex: string): OklabColor;
20
+ /**
21
+ * Nearest xterm-256 index (16-255 only) for a 24-bit hex color, measured by
22
+ * Euclidean distance in OKLab.
23
+ */
24
+ export declare function nearestXterm256(hex: string): number;
25
+ /**
26
+ * Precompute a lookup table mapping each distinct theme color to its nearest
27
+ * xterm-256 index. Keys are normalized hex ("#AABBCC").
28
+ */
29
+ export declare function buildXterm256Lookup(hexes: readonly string[]): ReadonlyMap<string, number>;
@@ -0,0 +1,105 @@
1
+ /**
2
+ * CLI Theme — OKLab xterm-256 Quantizer
3
+ * Precomputes an OKLab nearest-neighbor lookup mapping 24-bit theme colors to
4
+ * xterm-256 indexes 16-255 ONLY. System colors 0-15 are never emitted because
5
+ * users commonly remap them, which would break theme contrast guarantees.
6
+ *
7
+ * Pure functions, no I/O. OKLab math is self-contained, ported from
8
+ * scripts/theme-check.mjs (Björn Ottosson sRGB → OKLab).
9
+ */
10
+ function linearize(c) {
11
+ return c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
12
+ }
13
+ function channelsToOklab(r255, g255, b255) {
14
+ const r = linearize(r255 / 255);
15
+ const g = linearize(g255 / 255);
16
+ const b = linearize(b255 / 255);
17
+ const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
18
+ const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
19
+ const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
20
+ return {
21
+ L: 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s,
22
+ a: 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s,
23
+ b: 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s,
24
+ };
25
+ }
26
+ const HEX6_RE = /^#?[0-9A-Fa-f]{6}$/;
27
+ /** Normalize "#aabbcc" / "AABBCC" to canonical "#AABBCC". Throws on bad input. */
28
+ export function normalizeHex(hex) {
29
+ if (!HEX6_RE.test(hex)) {
30
+ throw new Error(`oklab-quantize: invalid 24-bit hex color "${hex}"`);
31
+ }
32
+ const v = hex.startsWith("#") ? hex.slice(1) : hex;
33
+ return `#${v.toUpperCase()}`;
34
+ }
35
+ /** Parse a normalized 6-digit hex color into 0-255 RGB channels. */
36
+ export function hexToRgb255(hex) {
37
+ const v = normalizeHex(hex).slice(1);
38
+ return [
39
+ Number.parseInt(v.slice(0, 2), 16),
40
+ Number.parseInt(v.slice(2, 4), 16),
41
+ Number.parseInt(v.slice(4, 6), 16),
42
+ ];
43
+ }
44
+ export function hexToOklab(hex) {
45
+ const [r, g, b] = hexToRgb255(hex);
46
+ return channelsToOklab(r, g, b);
47
+ }
48
+ // xterm 6x6x6 color-cube channel levels (indexes 16-231).
49
+ const CUBE_LEVELS = [0, 95, 135, 175, 215, 255];
50
+ /** Build the OKLab palette for xterm indexes 16-255 (cube + grayscale ramp). */
51
+ function buildXtermPalette() {
52
+ const entries = [];
53
+ for (let r = 0; r < 6; r++) {
54
+ for (let g = 0; g < 6; g++) {
55
+ for (let b = 0; b < 6; b++) {
56
+ entries.push({
57
+ index: 16 + 36 * r + 6 * g + b,
58
+ lab: channelsToOklab(CUBE_LEVELS[r], CUBE_LEVELS[g], CUBE_LEVELS[b]),
59
+ });
60
+ }
61
+ }
62
+ }
63
+ // Grayscale ramp: indexes 232-255 map to gray levels 8, 18, ..., 238.
64
+ for (let i = 0; i < 24; i++) {
65
+ const v = 8 + 10 * i;
66
+ entries.push({ index: 232 + i, lab: channelsToOklab(v, v, v) });
67
+ }
68
+ return entries;
69
+ }
70
+ // Precomputed once at module load — this is the "theme build/load time" cost.
71
+ const XTERM_PALETTE = buildXtermPalette();
72
+ /**
73
+ * Nearest xterm-256 index (16-255 only) for a 24-bit hex color, measured by
74
+ * Euclidean distance in OKLab.
75
+ */
76
+ export function nearestXterm256(hex) {
77
+ const lab = hexToOklab(hex);
78
+ let bestIndex = 16;
79
+ let bestDist = Number.POSITIVE_INFINITY;
80
+ for (const entry of XTERM_PALETTE) {
81
+ const dL = lab.L - entry.lab.L;
82
+ const da = lab.a - entry.lab.a;
83
+ const db = lab.b - entry.lab.b;
84
+ const dist = dL * dL + da * da + db * db;
85
+ if (dist < bestDist) {
86
+ bestDist = dist;
87
+ bestIndex = entry.index;
88
+ }
89
+ }
90
+ return bestIndex;
91
+ }
92
+ /**
93
+ * Precompute a lookup table mapping each distinct theme color to its nearest
94
+ * xterm-256 index. Keys are normalized hex ("#AABBCC").
95
+ */
96
+ export function buildXterm256Lookup(hexes) {
97
+ const lookup = new Map();
98
+ for (const hex of hexes) {
99
+ const key = normalizeHex(hex);
100
+ if (!lookup.has(key)) {
101
+ lookup.set(key, nearestXterm256(key));
102
+ }
103
+ }
104
+ return lookup;
105
+ }