@kal-elsam/kairo-runtime 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1179 -0
- package/LICENSE +21 -0
- package/README.md +63 -1193
- package/package.json +5 -3
- package/scripts/cockpit-smoke.mjs +2 -1
- package/src/cli.js +15 -139
- package/src/global/cli-help.js +180 -0
- package/src/global/ink/cockpit-control-center.js +4 -1
- package/src/global/ink/obsidian-vault-display.js +37 -0
- package/src/global/ink/ux/live-overview.js +72 -57
- package/src/global/ink/ux/overview-needs.js +160 -0
- package/src/global/observability/build-companion-snapshot.js +23 -2
- package/src/global/observability/index.js +39 -0
- package/src/global/observability/obsidian-knowledge-preview.js +214 -0
- package/src/global/observability/obsidian-knowledge-views.js +227 -0
- package/src/global/observability/obsidian-publisher.js +181 -0
- package/src/global/observability/obsidian-status.js +76 -0
- package/src/global/observability/obsidian-vault.js +259 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kal-elsam/kairo-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
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,7 +55,7 @@
|
|
|
53
55
|
"sdd",
|
|
54
56
|
"tdd"
|
|
55
57
|
],
|
|
56
|
-
"license": "
|
|
58
|
+
"license": "MIT",
|
|
57
59
|
"publishConfig": {
|
|
58
60
|
"access": "public"
|
|
59
61
|
},
|
|
@@ -26,7 +26,8 @@ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
|
26
26
|
const require = createRequire(import.meta.url);
|
|
27
27
|
const pkg = require(join(root, "package.json"));
|
|
28
28
|
|
|
29
|
-
assert.
|
|
29
|
+
assert.match(pkg.version, /^\d+\.\d+\.\d+$/);
|
|
30
|
+
assert.equal(pkg.name, "@kal-elsam/kairo-runtime");
|
|
30
31
|
assert.ok(pkg.dependencies["ansi-escapes"]);
|
|
31
32
|
|
|
32
33
|
assert.equal(resolveLayoutMode({ columns: 120, rows: 40 }), LAYOUT_MODES.WIDE);
|
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,
|
|
@@ -43,22 +40,18 @@ import { runGlobalReview, runGlobalReviews } from "./global/runtime/review/revie
|
|
|
43
40
|
import { runGlobalMonitor } from "./global/runtime/monitor/monitor-cli.js";
|
|
44
41
|
import { runGlobalAlerts } from "./global/runtime/alerts/alert-cli.js";
|
|
45
42
|
import { runGraphifyCli } from "./global/observability/graphify-ops.js";
|
|
46
|
-
import { runKairoMcp } from "./global/mcp/kairo-mcp.js";
|
|
47
43
|
import { normalizeRunStrategy } from "./global/runtime/run-strategy.js";
|
|
48
44
|
import {
|
|
49
|
-
LEGACY_PACKAGE_NAME,
|
|
50
|
-
PACKAGE_NAME,
|
|
51
|
-
PREFERRED_CLI,
|
|
52
45
|
formatCliCommand,
|
|
53
46
|
maybeWarnLegacyCli,
|
|
54
47
|
resolveSuggestedInvocation
|
|
55
48
|
} from "./global/brand/cli.js";
|
|
56
|
-
import { BRAND } from "./global/brand/index.js";
|
|
57
49
|
import {
|
|
58
50
|
INITIAL_EXPERIENCE,
|
|
59
51
|
hasConfiguredGlobalState,
|
|
60
52
|
resolveInitialExperience
|
|
61
53
|
} from "./global/initial-experience.js";
|
|
54
|
+
import { printHelp } from "./global/cli-help.js";
|
|
62
55
|
|
|
63
56
|
export { resolveSuggestedInvocation };
|
|
64
57
|
|
|
@@ -71,7 +64,7 @@ export async function runCli(argv) {
|
|
|
71
64
|
maybeWarnLegacyCli(process.argv, { json: options.json });
|
|
72
65
|
|
|
73
66
|
if (options.help || command === "help") {
|
|
74
|
-
printHelp();
|
|
67
|
+
printHelp({ all: options.helpAll === true });
|
|
75
68
|
return;
|
|
76
69
|
}
|
|
77
70
|
|
|
@@ -133,7 +126,9 @@ export async function runCli(argv) {
|
|
|
133
126
|
case "graphify":
|
|
134
127
|
await runGraphifyCli(optionsWithPolicy, packageManifest);
|
|
135
128
|
return;
|
|
136
|
-
case "mcp":
|
|
129
|
+
case "mcp": {
|
|
130
|
+
// Lazy-load: MCP SDK is heavy and optional for day-to-day CLI (help/status/sync).
|
|
131
|
+
const { runKairoMcp } = await import("./global/mcp/kairo-mcp.js");
|
|
137
132
|
// stdout reserved for MCP protocol — no banners/logs here
|
|
138
133
|
await runKairoMcp({
|
|
139
134
|
cwd: optionsWithPolicy.cwd,
|
|
@@ -142,6 +137,7 @@ export async function runCli(argv) {
|
|
|
142
137
|
version: packageManifest.version
|
|
143
138
|
});
|
|
144
139
|
return;
|
|
140
|
+
}
|
|
145
141
|
case "intelligence":
|
|
146
142
|
await runIntelligenceCli(optionsWithPolicy, packageManifest);
|
|
147
143
|
return;
|
|
@@ -397,6 +393,7 @@ export function parseArgs(argv) {
|
|
|
397
393
|
limit: null,
|
|
398
394
|
simple: false,
|
|
399
395
|
help: false,
|
|
396
|
+
helpAll: false,
|
|
400
397
|
version: false,
|
|
401
398
|
interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY),
|
|
402
399
|
intelligenceAction: null,
|
|
@@ -470,6 +467,13 @@ export function parseArgs(argv) {
|
|
|
470
467
|
if (command === "graphify") parseGraphifyAction(args, options);
|
|
471
468
|
if (command === "updates") parseUpdatesAction(args, options);
|
|
472
469
|
|
|
470
|
+
if (command === "help") {
|
|
471
|
+
while (args[0] === "all" || args[0] === "--all") {
|
|
472
|
+
options.helpAll = true;
|
|
473
|
+
args.shift();
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
473
477
|
for (let index = 0; index < args.length; index += 1) {
|
|
474
478
|
const arg = args[index];
|
|
475
479
|
|
|
@@ -588,6 +592,7 @@ export function parseArgs(argv) {
|
|
|
588
592
|
options.failOn = requireFlagValue("--fail-on", arg.slice("--fail-on=".length));
|
|
589
593
|
}
|
|
590
594
|
else if (arg === "--help" || arg === "-h") options.help = true;
|
|
595
|
+
else if (arg === "--all") options.helpAll = true;
|
|
591
596
|
else if (arg === "--version" || arg === "-v") options.version = true;
|
|
592
597
|
else throw new Error(`Unknown option "${arg}".`);
|
|
593
598
|
}
|
|
@@ -931,132 +936,3 @@ function parsePersona(value) {
|
|
|
931
936
|
}
|
|
932
937
|
return persona;
|
|
933
938
|
}
|
|
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,180 @@
|
|
|
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} doctor Deeper health checks
|
|
33
|
+
|
|
34
|
+
${cli} help --all Every command and flag
|
|
35
|
+
${cli} --version
|
|
36
|
+
|
|
37
|
+
Docs: README.md · docs/cli-reference.md
|
|
38
|
+
Preferred CLI: kairo, kairo-runtime
|
|
39
|
+
Legacy aliases: harness, agentic-harness, sgs-harness, harness-sgs (prefer kairo)
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function formatHelpAll() {
|
|
44
|
+
const cli = PREFERRED_CLI;
|
|
45
|
+
return `${BRAND.displayName} (${PACKAGE_NAME}) — full command list
|
|
46
|
+
|
|
47
|
+
${BRAND.tagline}. ${BRAND.displayName} does not install AI apps — it powers and
|
|
48
|
+
coordinates agents you already have (Cursor, Codex, OpenCode, Claude, Pi) with managed
|
|
49
|
+
sections, components, backups, and drift repair under ~/.harness.
|
|
50
|
+
|
|
51
|
+
Bootstrap: see README.md and docs/install.md (curl install.sh or npx ${PACKAGE_NAME}).
|
|
52
|
+
|
|
53
|
+
## Configuration & health
|
|
54
|
+
${cli} First run: onboarding → setup → cockpit (TTY).
|
|
55
|
+
Later: full-screen cockpit (wide/compact/minimal).
|
|
56
|
+
${cli} --dry-run Setup dry-run (scriptable)
|
|
57
|
+
${cli} --version
|
|
58
|
+
${cli} setup [--dry-run] [--yes] [--confirm] [--simple] [--no-preflight] [--agents <list|all>] [--components <list>]
|
|
59
|
+
${cli} status [--json]
|
|
60
|
+
${cli} sync [--dry-run] [--yes] [--confirm] [--json] [--no-preflight]
|
|
61
|
+
${cli} doctor [--json]
|
|
62
|
+
${cli} upgrade [--dry-run] [--yes] [--confirm] [--no-preflight]
|
|
63
|
+
${cli} updates check [--json] [--force]
|
|
64
|
+
${cli} install [--agents <list|all>] [--components <list>] [--dry-run]
|
|
65
|
+
${cli} install --no-default-components
|
|
66
|
+
${cli} update [--dry-run] Technical repair alias (prefer sync)
|
|
67
|
+
${cli} uninstall [--dry-run]
|
|
68
|
+
|
|
69
|
+
## Agents & runs
|
|
70
|
+
${cli} shell Operations cockpit (TTY)
|
|
71
|
+
${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]
|
|
72
|
+
${cli} runs list [--json] [--limit <n>] [--active-only]
|
|
73
|
+
${cli} runs show <runId> [--json] [--limit <n>] [--follow]
|
|
74
|
+
${cli} runs stop <runId> [--json]
|
|
75
|
+
${cli} review --agent codex|pi [--base <ref>|--commit <sha>|--staged] [--model <name>] [--include-private] [--yes|--confirm] [--fail-on high|medium|low] [--json]
|
|
76
|
+
${cli} reviews list [--limit <n>] [--json]
|
|
77
|
+
${cli} reviews show <reviewId> [--json]
|
|
78
|
+
${cli} reviews verify <reviewId> --staged [--json]
|
|
79
|
+
${cli} reviews export <lineage> --out <path> [--json]
|
|
80
|
+
${cli} reviews import --bundle <path> --confirm-import [--cwd <dir>] [--json]
|
|
81
|
+
${cli} alerts resolve|dismiss <alertId> --confirm-resolve|--confirm-dismiss [--json]
|
|
82
|
+
${cli} monitor enable|disable|status|tick
|
|
83
|
+
${cli} orchestrator [--json] Read-only agent capability diagnostics
|
|
84
|
+
${cli} adapters [--json]
|
|
85
|
+
${cli} detect
|
|
86
|
+
|
|
87
|
+
## Governance & audit
|
|
88
|
+
${cli} explain [--json]
|
|
89
|
+
${cli} diff [--json]
|
|
90
|
+
${cli} backups
|
|
91
|
+
${cli} history [--json] [--limit <n>] [--command <name>] [--action <name>]
|
|
92
|
+
${cli} history last [--json] [--command <name>] [--action <name>]
|
|
93
|
+
${cli} rollback --to <snapshot> [--apply]
|
|
94
|
+
${cli} policy [--json]
|
|
95
|
+
${cli} policy set <key> <value>
|
|
96
|
+
${cli} policy reset
|
|
97
|
+
${cli} report [--json] [--out <file>] [--limit <n>]
|
|
98
|
+
|
|
99
|
+
## Advanced
|
|
100
|
+
${cli} intelligence [status|models|context|route|ask] [--json]
|
|
101
|
+
${cli} intelligence models --backend opencode-go|opencode-zen|opencode
|
|
102
|
+
${cli} intelligence route --backend opencode-go --model <id> [--cloud-consent]
|
|
103
|
+
${cli} intelligence ask --prompt "..." [--backend <id>] [--model <id>] [--cloud-consent] [--yes] [--paths a,b]
|
|
104
|
+
Credentials via env only (OPENROUTER_API_KEY, OPENCODE_API_KEY, OLLAMA_HOST). Never stored.
|
|
105
|
+
Local-first (Ollama). Cloud only with --cloud-consent.
|
|
106
|
+
${cli} graphify query|path|explain ... --graph <path> [--budget N] [--json]
|
|
107
|
+
${cli} components
|
|
108
|
+
${cli} components validate|init|pack|import ...
|
|
109
|
+
${cli} components configure engram-memory [--agents <list>] [--dry-run|--yes] [--json]
|
|
110
|
+
${cli} components configure sdd-core [--agents <list>] [--persona off|teaching] [--dry-run|--yes] [--json]
|
|
111
|
+
${cli} components verify sdd-core [--agents <list>] [--json]
|
|
112
|
+
${cli} components rollback engram-memory|sdd-core --receipt <id> [--dry-run|--yes] [--json]
|
|
113
|
+
${cli} mcp
|
|
114
|
+
${cli} install --scope=workspace [--mode minimal|standard|enterprise] (opt-in/legacy)
|
|
115
|
+
${cli} init [--mode minimal|standard|enterprise] (workspace alias)
|
|
116
|
+
|
|
117
|
+
Scopes:
|
|
118
|
+
agent-global (default) Configure local agent roots and managed sections.
|
|
119
|
+
Primary product path. Writes ~/.harness state.
|
|
120
|
+
workspace (opt-in) Legacy repo scaffolding into the current project.
|
|
121
|
+
Explicit --scope=workspace only.
|
|
122
|
+
|
|
123
|
+
Commands:
|
|
124
|
+
shell Operations cockpit (TTY). Bare ${cli} opens onboarding when ~/.harness/state.json
|
|
125
|
+
is missing, otherwise the cockpit. Explicit ${cli} shell always opens the cockpit.
|
|
126
|
+
Keys: ↑↓ · Enter · Esc back/exit · R refresh · C cancel · ? help.
|
|
127
|
+
Tab switches region only when content is interactive (runs/launch).
|
|
128
|
+
run Launch a managed agent run with local audit trail.
|
|
129
|
+
runs List, inspect, or cancel agent runs under ~/.harness/runs/.
|
|
130
|
+
alerts Consent-gated alert resolve/dismiss (Permission Authority).
|
|
131
|
+
review Bounded read-only review via Codex or Pi; receipts under ~/.harness/reviews/.
|
|
132
|
+
reviews List/show/verify receipts, or Gentle portable export/import.
|
|
133
|
+
monitor Opt-in anomaly monitor (enable|disable|status|tick). macOS LaunchAgent; notify shell:false.
|
|
134
|
+
orchestrator Read-only agent capability diagnostics (--json supported).
|
|
135
|
+
intelligence Harness Engineering layer: backends, context packs, routing, budgets.
|
|
136
|
+
Local-first (Ollama). Cloud only with --cloud-consent.
|
|
137
|
+
Ephemeral --backend/--model override preferredBackend/preferredModel.
|
|
138
|
+
Credentials via env only (OPENROUTER_API_KEY, OPENCODE_API_KEY, OLLAMA_HOST). Never stored.
|
|
139
|
+
setup Managed ecosystem setup. Interactive Ink UI (TTY). Use --simple for Clack prompts.
|
|
140
|
+
status Control panel: agents, components, drift, backups, next action.
|
|
141
|
+
sync Converge managed content (repair drift), then show status.
|
|
142
|
+
upgrade Preview or apply ecosystem updates (apply requires --yes).
|
|
143
|
+
updates Read-only ecosystem update check (kairo/hermes/gentle/skills). Never applies.
|
|
144
|
+
install Non-interactive configure (agent-global) or legacy workspace scaffold.
|
|
145
|
+
doctor Detailed health checks for managed state and configs.
|
|
146
|
+
update Technical repair alias (prefer sync for day-to-day use).
|
|
147
|
+
detect Inspect global agents and the current project. Read-only.
|
|
148
|
+
adapters Official adapter matrix: roots, config files, detected/managed.
|
|
149
|
+
explain Read-only audit of managed adapters, configs, markers, and backups.
|
|
150
|
+
diff Read-only preview of managed content changes (sync/setup plan).
|
|
151
|
+
backups List config snapshots under ~/.harness/backups.
|
|
152
|
+
history Local audit log of managed operations under ~/.harness/history.jsonl.
|
|
153
|
+
Use "history last" for the most recent event. Read-only.
|
|
154
|
+
rollback Preview or restore a prior config snapshot (--apply to write).
|
|
155
|
+
policy View or edit local operation preferences under ~/.harness/policy.json.
|
|
156
|
+
report Read-only diagnostics bundle: status, policy, adapters, diff, history.
|
|
157
|
+
components List, validate, scaffold, pack, import, or configure integrations (Engram, SDD).
|
|
158
|
+
uninstall Remove managed sections and global state. Backups are preserved.
|
|
159
|
+
init Alias for install --scope=workspace (legacy).
|
|
160
|
+
|
|
161
|
+
JSON output (--json on supported commands):
|
|
162
|
+
status, sync, doctor, adapters, explain, diff, history, history last,
|
|
163
|
+
policy (show/set/reset), report, monitor
|
|
164
|
+
Human text remains the default. See docs/cli-reference.md for examples and field notes.
|
|
165
|
+
|
|
166
|
+
Version:
|
|
167
|
+
${cli} --version Installed CLI version
|
|
168
|
+
npm view ${PACKAGE_NAME} version Latest published version
|
|
169
|
+
npx ${PACKAGE_NAME}@latest sync Converge with latest package
|
|
170
|
+
|
|
171
|
+
More examples: README.md · docs/cli-reference.md
|
|
172
|
+
|
|
173
|
+
Preferred CLI: kairo, kairo-runtime
|
|
174
|
+
Legacy aliases: harness, agentic-harness, sgs-harness, harness-sgs (prefer kairo)
|
|
175
|
+
Legacy package: ${LEGACY_PACKAGE_NAME}
|
|
176
|
+
Global agents: ${GLOBAL_AGENT_IDS.join(", ")}
|
|
177
|
+
Global components: ${COMPONENT_IDS.join(", ")} (default: ${DEFAULT_COMPONENT_IDS.join(", ")})
|
|
178
|
+
Workspace adapters: ${[...ADAPTERS].join(", ")}
|
|
179
|
+
`;
|
|
180
|
+
}
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
formatResourceAdviceLines
|
|
12
12
|
} from "./system-resources-display.js";
|
|
13
13
|
import { formatEcosystemUpdateLines } from "./ecosystem-updates-display.js";
|
|
14
|
+
import { formatObsidianVaultLines } from "./obsidian-vault-display.js";
|
|
14
15
|
|
|
15
16
|
const HERMES_WIDE_SESSION_LIMIT = 3;
|
|
16
17
|
const HERMES_TITLE_MAX = 48;
|
|
@@ -21,6 +22,7 @@ export {
|
|
|
21
22
|
formatResourceAdviceLines
|
|
22
23
|
} from "./system-resources-display.js";
|
|
23
24
|
export { formatEcosystemUpdateLines } from "./ecosystem-updates-display.js";
|
|
25
|
+
export { formatObsidianVaultLines } from "./obsidian-vault-display.js";
|
|
24
26
|
|
|
25
27
|
export function buildControlCenterModel({
|
|
26
28
|
projectName = "project",
|
|
@@ -192,7 +194,8 @@ function formatCompanionOverlay(companion, layoutMode = LAYOUT_MODES.COMPACT) {
|
|
|
192
194
|
...formatHermesActivityLines(companion.signals?.hermes?.activity, layoutMode),
|
|
193
195
|
...formatSystemResourcesLines(companion.signals?.system?.resources, layoutMode),
|
|
194
196
|
...formatResourceAdviceLines(companion.signals?.system?.advice, layoutMode),
|
|
195
|
-
...formatEcosystemUpdateLines(companion.signals?.ecosystem?.updates, layoutMode)
|
|
197
|
+
...formatEcosystemUpdateLines(companion.signals?.ecosystem?.updates, layoutMode),
|
|
198
|
+
...formatObsidianVaultLines(companion.signals?.obsidian?.vault, layoutMode)
|
|
196
199
|
],
|
|
197
200
|
links: companion.links ?? [],
|
|
198
201
|
error: companion.error ?? null
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LAYOUT_MODES } from "./layout.js";
|
|
2
|
+
|
|
3
|
+
/** Display-only Obsidian vault lines — never shows paths, write CTAs, or sync controls. */
|
|
4
|
+
export function formatObsidianVaultLines(status, layoutMode = LAYOUT_MODES.COMPACT) {
|
|
5
|
+
if (status == null || typeof status !== "object") return ["Obsidian · unavailable"];
|
|
6
|
+
const state = typeof status.state === "string" && status.state ? status.state : "error";
|
|
7
|
+
const notes = typeof status.noteCount === "number" && Number.isFinite(status.noteCount)
|
|
8
|
+
? status.noteCount
|
|
9
|
+
: 0;
|
|
10
|
+
const pending = typeof status.pendingProposals === "number" && status.pendingProposals > 0
|
|
11
|
+
? status.pendingProposals
|
|
12
|
+
: 0;
|
|
13
|
+
|
|
14
|
+
if (state === "unconfigured") return ["Obsidian · unconfigured"];
|
|
15
|
+
if (state === "missing") return ["Obsidian · missing"];
|
|
16
|
+
if (state !== "available" && state !== "partial") {
|
|
17
|
+
return [`Obsidian · ${state}`];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const head = state === "partial"
|
|
21
|
+
? `Obsidian · partial · ${notes} notes`
|
|
22
|
+
: `Obsidian · ${notes} notes`;
|
|
23
|
+
const lines = [head];
|
|
24
|
+
if (layoutMode === LAYOUT_MODES.MINIMAL) return lines;
|
|
25
|
+
|
|
26
|
+
if (pending > 0) lines.push(` · pending · ${pending}`);
|
|
27
|
+
else if (layoutMode === LAYOUT_MODES.COMPACT) lines.push(" · no auto-sync");
|
|
28
|
+
|
|
29
|
+
if (layoutMode === LAYOUT_MODES.WIDE) {
|
|
30
|
+
const pub = typeof status.lastPublishAt === "string" && status.lastPublishAt
|
|
31
|
+
? status.lastPublishAt.slice(0, 19)
|
|
32
|
+
: "never";
|
|
33
|
+
lines.push(` · last publish · ${pub}`);
|
|
34
|
+
if (pending === 0) lines.push(" · no auto-sync");
|
|
35
|
+
}
|
|
36
|
+
return lines;
|
|
37
|
+
}
|