@kal-elsam/kairo-runtime 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kal-elsam/kairo-runtime",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Kairo Runtime — local agent operating system for Codex, Cursor, Claude, Pi, Engram, and Graphify.",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/Kal-elSam/harness#readme",
@@ -26,7 +26,9 @@
26
26
  "repo-template",
27
27
  "global-template",
28
28
  "prompts",
29
- "README.md"
29
+ "README.md",
30
+ "LICENSE",
31
+ "CHANGELOG.md"
30
32
  ],
31
33
  "scripts": {
32
34
  "test": "node --test",
@@ -53,13 +55,17 @@
53
55
  "sdd",
54
56
  "tdd"
55
57
  ],
56
- "license": "UNLICENSED",
58
+ "license": "MIT",
57
59
  "publishConfig": {
58
60
  "access": "public"
59
61
  },
60
62
  "engines": {
61
63
  "node": ">=20.12.0"
62
64
  },
65
+ "packageManager": "pnpm@10.34.5",
66
+ "pnpm": {
67
+ "onlyBuiltDependencies": []
68
+ },
63
69
  "dependencies": {
64
70
  "@clack/prompts": "^1.7.0",
65
71
  "@modelcontextprotocol/server": "2.0.0",
@@ -86,7 +86,7 @@ const asciiNav = buildNavModel({
86
86
  assert.equal(asciiNav.items[1].marker, ">");
87
87
  assert.equal(asciiNav.items[0].current, true);
88
88
  assert.equal(asciiNav.items[1].selected, true);
89
- assert.match(asciiNav.explanation, /Repair|Govern|Activity|Usage|Settings|Overview/i);
89
+ assert.match(asciiNav.explanation, /agents|Obsidian|integrations/i);
90
90
 
91
91
  function applyKey(state, keyAction) {
92
92
  const routed = routeCockpitKey(state, keyAction);
@@ -99,25 +99,29 @@ function smokeNavigation(layoutMode) {
99
99
  layoutMode,
100
100
  region: layoutMode === LAYOUT_MODES.MINIMAL ? COCKPIT_REGIONS.CONTENT : COCKPIT_REGIONS.NAV
101
101
  });
102
- const diagnosticsIndex = COCKPIT_NAV.findIndex((item) => item.id === "governance");
103
- while (state.navIndex < diagnosticsIndex) {
102
+ const settingsIndex = COCKPIT_NAV.findIndex((item) => item.id === "settings");
103
+ while (state.navIndex < settingsIndex) {
104
104
  state = applyKey(state, { type: "arrow", direction: "down" });
105
105
  }
106
106
  state = applyKey(state, { type: "enter" });
107
- assert.equal(state.view, ORCHESTRATOR_VIEWS.CHANGES);
108
- assert.equal(state.region, COCKPIT_REGIONS.NAV);
107
+ assert.equal(state.view, ORCHESTRATOR_VIEWS.PROFILE);
108
+ assert.equal(state.region, COCKPIT_REGIONS.CONTENT);
109
109
 
110
- state = applyKey(state, { type: "arrow", direction: "up" });
110
+ state = applyKey(state, { type: "tab" });
111
+ assert.equal(state.region, COCKPIT_REGIONS.NAV);
112
+ while (state.navIndex > 0) {
113
+ state = applyKey(state, { type: "arrow", direction: "up" });
114
+ }
111
115
  state = applyKey(state, { type: "enter" });
112
116
  assert.equal(state.view, ORCHESTRATOR_VIEWS.HOME);
113
- assert.equal(state.region, COCKPIT_REGIONS.NAV);
117
+ assert.equal(state.region, COCKPIT_REGIONS.CONTENT);
114
118
 
115
119
  const footer = buildFooterModel({
116
- view: ORCHESTRATOR_VIEWS.CHANGES,
117
- region: COCKPIT_REGIONS.NAV,
120
+ view: ORCHESTRATOR_VIEWS.HOME,
121
+ region: COCKPIT_REGIONS.CONTENT,
118
122
  unicode: false
119
123
  });
120
- assert.doesNotMatch(footer.text, /Tab/);
124
+ assert.match(footer.text, /Tab/);
121
125
 
122
126
  state = applyKey(state, { type: "escape" });
123
127
  assert.equal(state.view, ORCHESTRATOR_VIEWS.HOME);
package/src/cli.js CHANGED
@@ -1,9 +1,6 @@
1
1
  import { fileURLToPath } from "node:url";
2
2
  import { readFile } from "node:fs/promises";
3
3
  import { basename, dirname, resolve } from "node:path";
4
- import { ADAPTERS } from "./harness-files.js";
5
- import { GLOBAL_AGENT_IDS } from "./global/registry.js";
6
- import { COMPONENT_IDS, DEFAULT_COMPONENT_IDS } from "./global/component-registry.js";
7
4
  import {
8
5
  runComponentsConfigure,
9
6
  runComponentsRollback,
@@ -33,6 +30,7 @@ import {
33
30
  runGlobalReport
34
31
  } from "./global/global-cli.js";
35
32
  import { runEcosystemUpdatesCheck } from "./global/updates-cli.js";
33
+ import { runSelfUpdate } from "./global/self-update.js";
36
34
  import { applyPolicyToOptions, loadPolicyFile } from "./global/policy.js";
37
35
  import { resolveHomeDir } from "./global/paths.js";
38
36
  import { runWorkspaceDetect, runWorkspaceDoctor, runWorkspaceInit, runWorkspaceUpdate } from "./workspace-cli.js";
@@ -43,22 +41,18 @@ import { runGlobalReview, runGlobalReviews } from "./global/runtime/review/revie
43
41
  import { runGlobalMonitor } from "./global/runtime/monitor/monitor-cli.js";
44
42
  import { runGlobalAlerts } from "./global/runtime/alerts/alert-cli.js";
45
43
  import { runGraphifyCli } from "./global/observability/graphify-ops.js";
46
- import { runKairoMcp } from "./global/mcp/kairo-mcp.js";
47
44
  import { normalizeRunStrategy } from "./global/runtime/run-strategy.js";
48
45
  import {
49
- LEGACY_PACKAGE_NAME,
50
- PACKAGE_NAME,
51
- PREFERRED_CLI,
52
46
  formatCliCommand,
53
47
  maybeWarnLegacyCli,
54
48
  resolveSuggestedInvocation
55
49
  } from "./global/brand/cli.js";
56
- import { BRAND } from "./global/brand/index.js";
57
50
  import {
58
51
  INITIAL_EXPERIENCE,
59
52
  hasConfiguredGlobalState,
60
53
  resolveInitialExperience
61
54
  } from "./global/initial-experience.js";
55
+ import { printHelp } from "./global/cli-help.js";
62
56
 
63
57
  export { resolveSuggestedInvocation };
64
58
 
@@ -71,7 +65,7 @@ export async function runCli(argv) {
71
65
  maybeWarnLegacyCli(process.argv, { json: options.json });
72
66
 
73
67
  if (options.help || command === "help") {
74
- printHelp();
68
+ printHelp({ all: options.helpAll === true });
75
69
  return;
76
70
  }
77
71
 
@@ -133,7 +127,9 @@ export async function runCli(argv) {
133
127
  case "graphify":
134
128
  await runGraphifyCli(optionsWithPolicy, packageManifest);
135
129
  return;
136
- case "mcp":
130
+ case "mcp": {
131
+ // Lazy-load: MCP SDK is heavy and optional for day-to-day CLI (help/status/sync).
132
+ const { runKairoMcp } = await import("./global/mcp/kairo-mcp.js");
137
133
  // stdout reserved for MCP protocol — no banners/logs here
138
134
  await runKairoMcp({
139
135
  cwd: optionsWithPolicy.cwd,
@@ -142,6 +138,7 @@ export async function runCli(argv) {
142
138
  version: packageManifest.version
143
139
  });
144
140
  return;
141
+ }
145
142
  case "intelligence":
146
143
  await runIntelligenceCli(optionsWithPolicy, packageManifest);
147
144
  return;
@@ -177,9 +174,15 @@ export async function runCli(argv) {
177
174
  });
178
175
  return;
179
176
  case "update":
180
- await dispatchByScope(options, "agent-global", {
181
- "agent-global": () => runGlobalInstall(options, packageManifest, packageRoot, { update: true }),
182
- workspace: () => runWorkspaceUpdate(options, packageManifest, packageRoot)
177
+ if (options.scope === "workspace") {
178
+ await runWorkspaceUpdate(options, packageManifest, packageRoot);
179
+ return;
180
+ }
181
+ await runSelfUpdate({
182
+ packageName: packageManifest.name,
183
+ cliVersion: packageManifest.version,
184
+ yes: optionsWithPolicy.yes === true,
185
+ json: optionsWithPolicy.json === true
183
186
  });
184
187
  return;
185
188
  case "doctor":
@@ -397,6 +400,7 @@ export function parseArgs(argv) {
397
400
  limit: null,
398
401
  simple: false,
399
402
  help: false,
403
+ helpAll: false,
400
404
  version: false,
401
405
  interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY),
402
406
  intelligenceAction: null,
@@ -470,6 +474,13 @@ export function parseArgs(argv) {
470
474
  if (command === "graphify") parseGraphifyAction(args, options);
471
475
  if (command === "updates") parseUpdatesAction(args, options);
472
476
 
477
+ if (command === "help") {
478
+ while (args[0] === "all" || args[0] === "--all") {
479
+ options.helpAll = true;
480
+ args.shift();
481
+ }
482
+ }
483
+
473
484
  for (let index = 0; index < args.length; index += 1) {
474
485
  const arg = args[index];
475
486
 
@@ -588,6 +599,7 @@ export function parseArgs(argv) {
588
599
  options.failOn = requireFlagValue("--fail-on", arg.slice("--fail-on=".length));
589
600
  }
590
601
  else if (arg === "--help" || arg === "-h") options.help = true;
602
+ else if (arg === "--all") options.helpAll = true;
591
603
  else if (arg === "--version" || arg === "-v") options.version = true;
592
604
  else throw new Error(`Unknown option "${arg}".`);
593
605
  }
@@ -931,132 +943,3 @@ function parsePersona(value) {
931
943
  }
932
944
  return persona;
933
945
  }
934
-
935
- function printHelp() {
936
- const cli = PREFERRED_CLI;
937
- console.log(`${BRAND.displayName} (${PACKAGE_NAME})
938
-
939
- ${BRAND.tagline}. ${BRAND.displayName} does not install AI apps — it powers and
940
- coordinates agents you already have (Cursor, Codex, OpenCode, Claude, Pi) with managed
941
- sections, components, backups, and drift repair under ~/.harness.
942
-
943
- Bootstrap: see README.md (curl install.sh or npx ${PACKAGE_NAME}).
944
-
945
- Usage:
946
- ${cli} First run: onboarding → setup → cockpit (TTY).
947
- Later: full-screen cockpit (wide/compact/minimal).
948
- ${cli} --dry-run Setup dry-run (scriptable)
949
- ${cli} --version
950
- ${cli} shell Operations cockpit (TTY)
951
- ${cli} run --agent <id> --task "..." [--strategy direct|orchestrated] [--model <name>] [--cwd <dir>] [--permissions force|yolo|read-only] [--allow-unsafe-permissions] [--capture-transcript] [--follow] [--no-wait] [--json]
952
- ${cli} runs list [--json] [--limit <n>] [--active-only]
953
- ${cli} runs show <runId> [--json] [--limit <n>] [--follow]
954
- ${cli} runs stop <runId> [--json]
955
- ${cli} alerts resolve|dismiss <alertId> --confirm-resolve|--confirm-dismiss [--json]
956
- ${cli} review --agent codex|pi [--base <ref>|--commit <sha>|--staged] [--model <name>] [--include-private] [--yes|--confirm] [--fail-on high|medium|low] [--json]
957
- ${cli} reviews list [--limit <n>] [--json]
958
- ${cli} reviews show <reviewId> [--json]
959
- ${cli} reviews verify <reviewId> --staged [--json]
960
- ${cli} reviews export <lineage> --out <path> [--json]
961
- ${cli} reviews import --bundle <path> --confirm-import [--cwd <dir>] [--json]
962
- ${cli} graphify query|path|explain ... --graph <path> [--budget N] [--json]
963
- ${cli} orchestrator [--json] Read-only agent capability diagnostics
964
- ${cli} intelligence [status|models|context|route|ask] [--json]
965
- ${cli} intelligence models --backend opencode-go|opencode-zen|opencode
966
- ${cli} intelligence route --backend opencode-go --model <id> [--cloud-consent]
967
- ${cli} intelligence ask --prompt "..." [--backend <id>] [--model <id>] [--cloud-consent] [--yes] [--paths a,b]
968
- ${cli} setup [--dry-run] [--yes] [--confirm] [--simple] [--no-preflight] [--agents <list|all>] [--components <list>]
969
- ${cli} status [--json]
970
- ${cli} sync [--dry-run] [--yes] [--confirm] [--json] [--no-preflight]
971
- ${cli} upgrade [--dry-run] [--yes] [--confirm] [--no-preflight]
972
- ${cli} updates check [--json] [--force]
973
- ${cli} install [--agents <list|all>] [--components <list>] [--dry-run]
974
- ${cli} install --no-default-components
975
- ${cli} doctor [--json]
976
- ${cli} adapters [--json]
977
- ${cli} explain [--json]
978
- ${cli} diff [--json]
979
- ${cli} update [--dry-run]
980
- ${cli} install --scope=workspace [--mode minimal|standard|enterprise] (opt-in/legacy)
981
- ${cli} init [--mode minimal|standard|enterprise] (workspace alias)
982
- ${cli} detect
983
- ${cli} backups
984
- ${cli} history [--json] [--limit <n>] [--command <name>] [--action <name>]
985
- ${cli} history last [--json] [--command <name>] [--action <name>]
986
- ${cli} rollback --to <snapshot> [--apply]
987
- ${cli} policy [--json]
988
- ${cli} policy set <key> <value>
989
- ${cli} policy reset
990
- ${cli} report [--json] [--out <file>] [--limit <n>]
991
- ${cli} components
992
- ${cli} components validate|init|pack|import ...
993
- ${cli} components configure engram-memory [--agents <list>] [--dry-run|--yes] [--json]
994
- ${cli} components configure sdd-core [--agents <list>] [--persona off|teaching] [--dry-run|--yes] [--json]
995
- ${cli} components verify sdd-core [--agents <list>] [--json]
996
- ${cli} components rollback engram-memory|sdd-core --receipt <id> [--dry-run|--yes] [--json]
997
- ${cli} uninstall [--dry-run]
998
-
999
- Scopes:
1000
- agent-global (default) Configure local agent roots and managed sections.
1001
- Primary product path. Writes ~/.harness state.
1002
- workspace (opt-in) Legacy repo scaffolding into the current project.
1003
- Explicit --scope=workspace only.
1004
-
1005
- Commands:
1006
- shell Operations cockpit (TTY). Bare ${cli} opens onboarding when ~/.harness/state.json
1007
- is missing, otherwise the cockpit. Explicit ${cli} shell always opens the cockpit.
1008
- Keys: ↑↓ · Enter · Esc back/exit · R refresh · C cancel · ? help.
1009
- Tab switches region only when content is interactive (runs/launch).
1010
- run Launch a managed agent run with local audit trail.
1011
- runs List, inspect, or cancel agent runs under ~/.harness/runs/.
1012
- alerts Consent-gated alert resolve/dismiss (Permission Authority).
1013
- review Bounded read-only review via Codex or Pi; receipts under ~/.harness/reviews/.
1014
- reviews List/show/verify receipts, or Gentle portable export/import.
1015
- monitor Opt-in anomaly monitor (enable|disable|status|tick). macOS LaunchAgent; notify shell:false.
1016
- orchestrator Read-only capability registry diagnostics (--json supported).
1017
- intelligence Harness Engineering layer: backends, context packs, routing, budgets.
1018
- Local-first (Ollama). Cloud only with --cloud-consent.
1019
- Ephemeral --backend/--model override preferredBackend/preferredModel.
1020
- Credentials via env only (OPENROUTER_API_KEY, OPENCODE_API_KEY, OLLAMA_HOST). Never stored.
1021
- setup Managed ecosystem setup. Interactive Ink UI (TTY). Use --simple for Clack prompts.
1022
- status Control panel: agents, components, drift, backups, next action.
1023
- sync Converge managed content (repair drift), then show status.
1024
- upgrade Preview or apply ecosystem updates (apply requires --yes).
1025
- updates Read-only ecosystem update check (kairo/hermes/gentle/skills). Never applies.
1026
- install Non-interactive configure (agent-global) or legacy workspace scaffold.
1027
- doctor Detailed health checks for managed state and configs.
1028
- update Technical repair alias (prefer sync for day-to-day use).
1029
- detect Inspect global agents and the current project. Read-only.
1030
- adapters Official adapter matrix: roots, config files, detected/managed.
1031
- explain Read-only audit of managed adapters, configs, markers, and backups.
1032
- diff Read-only preview of managed content changes (sync/setup plan).
1033
- backups List config snapshots under ~/.harness/backups.
1034
- history Local audit log of managed operations under ~/.harness/history.jsonl.
1035
- Use "history last" for the most recent event. Read-only.
1036
- rollback Preview or restore a prior config snapshot (--apply to write).
1037
- policy View or edit local operation preferences under ~/.harness/policy.json.
1038
- report Read-only diagnostics bundle: status, policy, adapters, diff, history.
1039
- components List, validate, scaffold, pack, import, or configure integrations (Engram, SDD).
1040
- uninstall Remove managed sections and global state. Backups are preserved.
1041
- init Alias for install --scope=workspace (legacy).
1042
-
1043
- JSON output (--json on supported commands):
1044
- status, sync, doctor, adapters, explain, diff, history, history last,
1045
- policy (show/set/reset), report, monitor
1046
- Human text remains the default. See README.md for examples and field notes.
1047
-
1048
- Version:
1049
- ${cli} --version Installed CLI version
1050
- npm view ${PACKAGE_NAME} version Latest published version
1051
- npx ${PACKAGE_NAME}@latest sync Converge with latest package
1052
-
1053
- More examples: README.md
1054
-
1055
- Preferred CLI: kairo, kairo-runtime
1056
- Legacy aliases: harness, agentic-harness, sgs-harness, harness-sgs (prefer kairo)
1057
- Legacy package: ${LEGACY_PACKAGE_NAME}
1058
- Global agents: ${GLOBAL_AGENT_IDS.join(", ")}
1059
- Global components: ${COMPONENT_IDS.join(", ")} (default: ${DEFAULT_COMPONENT_IDS.join(", ")})
1060
- Workspace adapters: ${[...ADAPTERS].join(", ")}
1061
- `);
1062
- }
@@ -0,0 +1,182 @@
1
+ /**
2
+ * Tiered CLI help — short by default, full with --all.
3
+ */
4
+ import { BRAND } from "./brand/index.js";
5
+ import {
6
+ LEGACY_PACKAGE_NAME,
7
+ PACKAGE_NAME,
8
+ PREFERRED_CLI
9
+ } from "./brand/cli.js";
10
+ import { GLOBAL_AGENT_IDS } from "./registry.js";
11
+ import { COMPONENT_IDS, DEFAULT_COMPONENT_IDS } from "./component-registry.js";
12
+ import { ADAPTERS } from "../harness-files.js";
13
+
14
+ export function printHelp({ all = false } = {}) {
15
+ if (all) {
16
+ console.log(formatHelpAll());
17
+ return;
18
+ }
19
+ console.log(formatHelpShort());
20
+ }
21
+
22
+ export function formatHelpShort() {
23
+ const cli = PREFERRED_CLI;
24
+ return `${BRAND.displayName} (${PACKAGE_NAME})
25
+
26
+ ${BRAND.tagline}. Coordinates agents you already have — never installs AI apps.
27
+
28
+ Usage:
29
+ ${cli} Open the cockpit (setup on first run)
30
+ ${cli} status See how your setup is doing
31
+ ${cli} sync Repair what drifted
32
+ ${cli} update Update Kairo itself (npm)
33
+ ${cli} doctor Deeper health checks
34
+
35
+ ${cli} help --all Every command and flag
36
+ ${cli} --version
37
+
38
+ Docs: README.md · docs/cli-reference.md
39
+ Preferred CLI: kairo, kairo-runtime
40
+ Legacy aliases: harness, agentic-harness, sgs-harness, harness-sgs (prefer kairo)
41
+ `;
42
+ }
43
+
44
+ export function formatHelpAll() {
45
+ const cli = PREFERRED_CLI;
46
+ return `${BRAND.displayName} (${PACKAGE_NAME}) — full command list
47
+
48
+ ${BRAND.tagline}. ${BRAND.displayName} does not install AI apps — it powers and
49
+ coordinates agents you already have (Cursor, Codex, OpenCode, Claude, Pi) with managed
50
+ sections, components, backups, and drift repair under ~/.harness.
51
+
52
+ Bootstrap: see README.md and docs/install.md (curl install.sh or npx ${PACKAGE_NAME}).
53
+
54
+ ## Configuration & health
55
+ ${cli} First run: onboarding → setup → cockpit (TTY).
56
+ Later: full-screen cockpit (wide/compact/minimal).
57
+ ${cli} --dry-run Setup dry-run (scriptable)
58
+ ${cli} --version
59
+ ${cli} setup [--dry-run] [--yes] [--confirm] [--simple] [--no-preflight] [--agents <list|all>] [--components <list>]
60
+ ${cli} status [--json]
61
+ ${cli} sync [--dry-run] [--yes] [--confirm] [--json] [--no-preflight]
62
+ ${cli} doctor [--json]
63
+ ${cli} upgrade [--dry-run] [--yes] [--confirm] [--no-preflight]
64
+ ${cli} updates check [--json] [--force]
65
+ ${cli} install [--agents <list|all>] [--components <list>] [--dry-run]
66
+ ${cli} install --no-default-components
67
+ ${cli} update [--yes] [--json] Update the Kairo CLI from npm
68
+ ${cli} update --scope=workspace [--dry-run] Refresh workspace template files
69
+ ${cli} uninstall [--dry-run]
70
+
71
+ ## Agents & runs
72
+ ${cli} shell Operations cockpit (TTY)
73
+ ${cli} run --agent <id> --task "..." [--strategy direct|orchestrated] [--model <name>] [--cwd <dir>] [--permissions force|yolo|read-only] [--allow-unsafe-permissions] [--capture-transcript] [--follow] [--no-wait] [--json]
74
+ ${cli} runs list [--json] [--limit <n>] [--active-only]
75
+ ${cli} runs show <runId> [--json] [--limit <n>] [--follow]
76
+ ${cli} runs stop <runId> [--json]
77
+ ${cli} review --agent codex|pi [--base <ref>|--commit <sha>|--staged] [--model <name>] [--include-private] [--yes|--confirm] [--fail-on high|medium|low] [--json]
78
+ ${cli} reviews list [--limit <n>] [--json]
79
+ ${cli} reviews show <reviewId> [--json]
80
+ ${cli} reviews verify <reviewId> --staged [--json]
81
+ ${cli} reviews export <lineage> --out <path> [--json]
82
+ ${cli} reviews import --bundle <path> --confirm-import [--cwd <dir>] [--json]
83
+ ${cli} alerts resolve|dismiss <alertId> --confirm-resolve|--confirm-dismiss [--json]
84
+ ${cli} monitor enable|disable|status|tick
85
+ ${cli} orchestrator [--json] Read-only agent capability diagnostics
86
+ ${cli} adapters [--json]
87
+ ${cli} detect
88
+
89
+ ## Governance & audit
90
+ ${cli} explain [--json]
91
+ ${cli} diff [--json]
92
+ ${cli} backups
93
+ ${cli} history [--json] [--limit <n>] [--command <name>] [--action <name>]
94
+ ${cli} history last [--json] [--command <name>] [--action <name>]
95
+ ${cli} rollback --to <snapshot> [--apply]
96
+ ${cli} policy [--json]
97
+ ${cli} policy set <key> <value>
98
+ ${cli} policy reset
99
+ ${cli} report [--json] [--out <file>] [--limit <n>]
100
+
101
+ ## Advanced
102
+ ${cli} intelligence [status|models|context|route|ask] [--json]
103
+ ${cli} intelligence models --backend opencode-go|opencode-zen|opencode
104
+ ${cli} intelligence route --backend opencode-go --model <id> [--cloud-consent]
105
+ ${cli} intelligence ask --prompt "..." [--backend <id>] [--model <id>] [--cloud-consent] [--yes] [--paths a,b]
106
+ Credentials via env only (OPENROUTER_API_KEY, OPENCODE_API_KEY, OLLAMA_HOST). Never stored.
107
+ Local-first (Ollama). Cloud only with --cloud-consent.
108
+ ${cli} graphify query|path|explain ... --graph <path> [--budget N] [--json]
109
+ ${cli} components
110
+ ${cli} components validate|init|pack|import ...
111
+ ${cli} components configure engram-memory [--agents <list>] [--dry-run|--yes] [--json]
112
+ ${cli} components configure sdd-core [--agents <list>] [--persona off|teaching] [--dry-run|--yes] [--json]
113
+ ${cli} components verify sdd-core [--agents <list>] [--json]
114
+ ${cli} components rollback engram-memory|sdd-core --receipt <id> [--dry-run|--yes] [--json]
115
+ ${cli} mcp
116
+ ${cli} install --scope=workspace [--mode minimal|standard|enterprise] (opt-in/legacy)
117
+ ${cli} init [--mode minimal|standard|enterprise] (workspace alias)
118
+
119
+ Scopes:
120
+ agent-global (default) Configure local agent roots and managed sections.
121
+ Primary product path. Writes ~/.harness state.
122
+ workspace (opt-in) Legacy repo scaffolding into the current project.
123
+ Explicit --scope=workspace only.
124
+
125
+ Commands:
126
+ shell Operations cockpit (TTY). Bare ${cli} opens onboarding when ~/.harness/state.json
127
+ is missing, otherwise the cockpit. Explicit ${cli} shell always opens the cockpit.
128
+ Keys: ↑↓ · Enter · Esc back/exit · R refresh · C cancel · ? help.
129
+ Tab switches region only when content is interactive (runs/launch).
130
+ run Launch a managed agent run with local audit trail.
131
+ runs List, inspect, or cancel agent runs under ~/.harness/runs/.
132
+ alerts Consent-gated alert resolve/dismiss (Permission Authority).
133
+ review Bounded read-only review via Codex or Pi; receipts under ~/.harness/reviews/.
134
+ reviews List/show/verify receipts, or Gentle portable export/import.
135
+ monitor Opt-in anomaly monitor (enable|disable|status|tick). macOS LaunchAgent; notify shell:false.
136
+ orchestrator Read-only agent capability diagnostics (--json supported).
137
+ intelligence Harness Engineering layer: backends, context packs, routing, budgets.
138
+ Local-first (Ollama). Cloud only with --cloud-consent.
139
+ Ephemeral --backend/--model override preferredBackend/preferredModel.
140
+ Credentials via env only (OPENROUTER_API_KEY, OPENCODE_API_KEY, OLLAMA_HOST). Never stored.
141
+ setup Managed ecosystem setup. Interactive Ink UI (TTY). Use --simple for Clack prompts.
142
+ status Control panel: agents, components, drift, backups, next action.
143
+ sync Converge managed content (repair drift), then show status.
144
+ upgrade Preview or apply ecosystem updates (apply requires --yes).
145
+ updates Read-only ecosystem update check (kairo/hermes/gentle/skills). Never applies.
146
+ install Non-interactive configure (agent-global) or legacy workspace scaffold.
147
+ doctor Detailed health checks for managed state and configs.
148
+ update Update the Kairo CLI from npm (--yes applies). Workspace templates: --scope=workspace.
149
+ detect Inspect global agents and the current project. Read-only.
150
+ adapters Official adapter matrix: roots, config files, detected/managed.
151
+ explain Read-only audit of managed adapters, configs, markers, and backups.
152
+ diff Read-only preview of managed content changes (sync/setup plan).
153
+ backups List config snapshots under ~/.harness/backups.
154
+ history Local audit log of managed operations under ~/.harness/history.jsonl.
155
+ Use "history last" for the most recent event. Read-only.
156
+ rollback Preview or restore a prior config snapshot (--apply to write).
157
+ policy View or edit local operation preferences under ~/.harness/policy.json.
158
+ report Read-only diagnostics bundle: status, policy, adapters, diff, history.
159
+ components List, validate, scaffold, pack, import, or configure integrations (Engram, SDD).
160
+ uninstall Remove managed sections and global state. Backups are preserved.
161
+ init Alias for install --scope=workspace (legacy).
162
+
163
+ JSON output (--json on supported commands):
164
+ status, sync, doctor, adapters, explain, diff, history, history last,
165
+ policy (show/set/reset), report, monitor
166
+ Human text remains the default. See docs/cli-reference.md for examples and field notes.
167
+
168
+ Version:
169
+ ${cli} --version Installed CLI version
170
+ npm view ${PACKAGE_NAME} version Latest published version
171
+ npx ${PACKAGE_NAME}@latest sync Converge with latest package
172
+
173
+ More examples: README.md · docs/cli-reference.md
174
+
175
+ Preferred CLI: kairo, kairo-runtime
176
+ Legacy aliases: harness, agentic-harness, sgs-harness, harness-sgs (prefer kairo)
177
+ Legacy package: ${LEGACY_PACKAGE_NAME}
178
+ Global agents: ${GLOBAL_AGENT_IDS.join(", ")}
179
+ Global components: ${COMPONENT_IDS.join(", ")} (default: ${DEFAULT_COMPONENT_IDS.join(", ")})
180
+ Workspace adapters: ${[...ADAPTERS].join(", ")}
181
+ `;
182
+ }
@@ -122,9 +122,7 @@ export function reduceCockpitUi(state, action) {
122
122
  if (state.region === COCKPIT_REGIONS.SYSTEM) return state;
123
123
 
124
124
  const navigatesNav = state.region === COCKPIT_REGIONS.NAV
125
- || isNavFocusedView(state.view)
126
- || (state.view === ORCHESTRATOR_VIEWS.HOME
127
- && state.layoutMode === LAYOUT_MODES.MINIMAL);
125
+ || isNavFocusedView(state.view);
128
126
 
129
127
  if (navigatesNav) {
130
128
  const delta = action.direction === "up" ? -1 : 1;
@@ -11,7 +11,9 @@ export function resolveEnterNavIntent({
11
11
  } = {}) {
12
12
  if (!navItem) return { kind: "noop" };
13
13
 
14
- const isOverview = navItem.id === "overview" || navItem.view === ORCHESTRATOR_VIEWS.HOME;
14
+ const isOverview = navItem.id === "home"
15
+ || navItem.id === "overview"
16
+ || navItem.view === ORCHESTRATOR_VIEWS.HOME;
15
17
  if (isOverview) {
16
18
  if (currentView === ORCHESTRATOR_VIEWS.HOME && ctaDestination) {
17
19
  if (ctaDestination === "setup") return { kind: "activate-setup" };
@@ -3,7 +3,6 @@ import { ORCHESTRATOR_VIEWS } from "./orchestrator-state.js";
3
3
  import { LAYOUT_MODES } from "./layout.js";
4
4
 
5
5
  const NAV_FOCUSED_VIEWS = new Set([
6
- ORCHESTRATOR_VIEWS.HOME,
7
6
  ORCHESTRATOR_VIEWS.IDES,
8
7
  ORCHESTRATOR_VIEWS.MODULES,
9
8
  ORCHESTRATOR_VIEWS.CHANGES,
@@ -14,6 +13,7 @@ const NAV_FOCUSED_VIEWS = new Set([
14
13
  ]);
15
14
 
16
15
  const CONTENT_INTERACTIVE_VIEWS = new Set([
16
+ ORCHESTRATOR_VIEWS.HOME,
17
17
  ORCHESTRATOR_VIEWS.RUNS,
18
18
  ORCHESTRATOR_VIEWS.ACTIVE_RUNS,
19
19
  ORCHESTRATOR_VIEWS.RECENT_RUNS,
@@ -102,6 +102,12 @@ export function routeCockpitKey(state, keyAction) {
102
102
  if (state.region === COCKPIT_REGIONS.NAV || isNavFocusedView(state.view)) {
103
103
  return { type: "enter-nav" };
104
104
  }
105
+ if (
106
+ state.region === COCKPIT_REGIONS.CONTENT
107
+ && state.view === ORCHESTRATOR_VIEWS.HOME
108
+ ) {
109
+ return { type: "enter-home-button" };
110
+ }
105
111
  return null;
106
112
  default:
107
113
  return null;