@h-rig/cli 0.0.6-alpha.89 → 0.0.6-alpha.90
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/dist/bin/build-rig-binaries.js +8 -40
- package/dist/bin/rig.js +12519 -26675
- package/dist/src/app/board.js +74 -693
- package/dist/src/app/drone-ui.js +1 -1
- package/dist/src/app/theme.js +0 -1
- package/dist/src/commands/_async-ui.js +1 -1
- package/dist/src/commands/_authority-runs.d.ts +1 -1
- package/dist/src/commands/_authority-runs.js +12 -2
- package/dist/src/commands/_cli-format.d.ts +1 -10
- package/dist/src/commands/_cli-format.js +2 -5
- package/dist/src/commands/_connection-state.d.ts +1 -11
- package/dist/src/commands/_connection-state.js +5 -50
- package/dist/src/commands/_doctor-checks.js +40 -501
- package/dist/src/commands/_help-catalog.js +17 -99
- package/dist/src/commands/_json-output.js +0 -4
- package/dist/src/commands/_operator-view.js +54 -575
- package/dist/src/commands/_pi-frontend.d.ts +0 -27
- package/dist/src/commands/_pi-frontend.js +52 -576
- package/dist/src/commands/_preflight.js +66 -553
- package/dist/src/commands/_server-client.d.ts +0 -33
- package/dist/src/commands/_server-client.js +46 -541
- package/dist/src/commands/_snapshot-upload.js +42 -503
- package/dist/src/commands/_spinner.js +1 -1
- package/dist/src/commands/agent.js +12 -2
- package/dist/src/commands/browser.js +1 -1
- package/dist/src/commands/connect.js +15 -626
- package/dist/src/commands/doctor.js +41 -502
- package/dist/src/commands/github.js +51 -584
- package/dist/src/commands/inbox.js +41 -502
- package/dist/src/commands/init.js +74 -561
- package/dist/src/commands/inspect.js +41 -502
- package/dist/src/commands/run.js +54 -578
- package/dist/src/commands/server.js +163 -692
- package/dist/src/commands/setup.js +46 -507
- package/dist/src/commands/stats.js +58 -601
- package/dist/src/commands/task-run-driver.js +58 -509
- package/dist/src/commands/task.js +110 -729
- package/dist/src/commands.js +237 -1112
- package/dist/src/index.js +244 -1123
- package/dist/src/launcher.js +0 -4
- package/package.json +9 -13
- package/dist/src/app-opentui/adapters/command.d.ts +0 -2
- package/dist/src/app-opentui/adapters/command.js +0 -329
- package/dist/src/app-opentui/adapters/common.d.ts +0 -56
- package/dist/src/app-opentui/adapters/common.js +0 -153
- package/dist/src/app-opentui/adapters/doctor.d.ts +0 -9
- package/dist/src/app-opentui/adapters/doctor.js +0 -1217
- package/dist/src/app-opentui/adapters/family.d.ts +0 -62
- package/dist/src/app-opentui/adapters/family.js +0 -14855
- package/dist/src/app-opentui/adapters/fleet.d.ts +0 -14
- package/dist/src/app-opentui/adapters/fleet.js +0 -1335
- package/dist/src/app-opentui/adapters/inbox.d.ts +0 -43
- package/dist/src/app-opentui/adapters/inbox.js +0 -1944
- package/dist/src/app-opentui/adapters/init.d.ts +0 -11
- package/dist/src/app-opentui/adapters/init.js +0 -2818
- package/dist/src/app-opentui/adapters/inspect.d.ts +0 -52
- package/dist/src/app-opentui/adapters/inspect.js +0 -1455
- package/dist/src/app-opentui/adapters/pi-attach.d.ts +0 -32
- package/dist/src/app-opentui/adapters/pi-attach.js +0 -2101
- package/dist/src/app-opentui/adapters/pi.d.ts +0 -23
- package/dist/src/app-opentui/adapters/pi.js +0 -363
- package/dist/src/app-opentui/adapters/plugin.d.ts +0 -84
- package/dist/src/app-opentui/adapters/plugin.js +0 -544
- package/dist/src/app-opentui/adapters/repo.d.ts +0 -37
- package/dist/src/app-opentui/adapters/repo.js +0 -186
- package/dist/src/app-opentui/adapters/run-detail.d.ts +0 -27
- package/dist/src/app-opentui/adapters/run-detail.js +0 -1441
- package/dist/src/app-opentui/adapters/server.d.ts +0 -48
- package/dist/src/app-opentui/adapters/server.js +0 -1561
- package/dist/src/app-opentui/adapters/tasks.d.ts +0 -64
- package/dist/src/app-opentui/adapters/tasks.js +0 -4524
- package/dist/src/app-opentui/adapters/workspace.d.ts +0 -49
- package/dist/src/app-opentui/adapters/workspace.js +0 -333
- package/dist/src/app-opentui/autocomplete.d.ts +0 -20
- package/dist/src/app-opentui/autocomplete.js +0 -578
- package/dist/src/app-opentui/bootstrap.d.ts +0 -11
- package/dist/src/app-opentui/bootstrap.js +0 -27833
- package/dist/src/app-opentui/command-palette.d.ts +0 -3
- package/dist/src/app-opentui/command-palette.js +0 -1038
- package/dist/src/app-opentui/command-pty-host.d.ts +0 -62
- package/dist/src/app-opentui/command-pty-host.js +0 -248
- package/dist/src/app-opentui/drone.d.ts +0 -12
- package/dist/src/app-opentui/drone.js +0 -230
- package/dist/src/app-opentui/events.d.ts +0 -7
- package/dist/src/app-opentui/events.js +0 -28
- package/dist/src/app-opentui/fleet-stats.d.ts +0 -32
- package/dist/src/app-opentui/fleet-stats.js +0 -114
- package/dist/src/app-opentui/focus-manager.d.ts +0 -14
- package/dist/src/app-opentui/focus-manager.js +0 -24
- package/dist/src/app-opentui/index.d.ts +0 -8
- package/dist/src/app-opentui/index.js +0 -5260
- package/dist/src/app-opentui/intent.d.ts +0 -3
- package/dist/src/app-opentui/intent.js +0 -365
- package/dist/src/app-opentui/keymap.d.ts +0 -21
- package/dist/src/app-opentui/keymap.js +0 -1377
- package/dist/src/app-opentui/launch-routing.d.ts +0 -16
- package/dist/src/app-opentui/launch-routing.js +0 -55
- package/dist/src/app-opentui/layout.d.ts +0 -22
- package/dist/src/app-opentui/layout.js +0 -51
- package/dist/src/app-opentui/list-search.d.ts +0 -36
- package/dist/src/app-opentui/list-search.js +0 -130
- package/dist/src/app-opentui/pi-host-child.d.ts +0 -2
- package/dist/src/app-opentui/pi-host-child.js +0 -1299
- package/dist/src/app-opentui/pi-pty-host.d.ts +0 -28
- package/dist/src/app-opentui/pi-pty-host.js +0 -10
- package/dist/src/app-opentui/react/App.d.ts +0 -9
- package/dist/src/app-opentui/react/App.js +0 -3866
- package/dist/src/app-opentui/react/Backdrop.d.ts +0 -5
- package/dist/src/app-opentui/react/Backdrop.js +0 -823
- package/dist/src/app-opentui/react/ChromeHost.d.ts +0 -5
- package/dist/src/app-opentui/react/ChromeHost.js +0 -1539
- package/dist/src/app-opentui/react/SceneFrameView.d.ts +0 -7
- package/dist/src/app-opentui/react/SceneFrameView.js +0 -579
- package/dist/src/app-opentui/react/context.d.ts +0 -17
- package/dist/src/app-opentui/react/context.js +0 -37
- package/dist/src/app-opentui/react/launch.d.ts +0 -2
- package/dist/src/app-opentui/react/launch.js +0 -4897
- package/dist/src/app-opentui/react/nav.d.ts +0 -18
- package/dist/src/app-opentui/react/nav.js +0 -54
- package/dist/src/app-opentui/react/scroll.d.ts +0 -12
- package/dist/src/app-opentui/react/scroll.js +0 -21
- package/dist/src/app-opentui/react/syntax.d.ts +0 -2
- package/dist/src/app-opentui/react/syntax.js +0 -65
- package/dist/src/app-opentui/registry.d.ts +0 -4
- package/dist/src/app-opentui/registry.js +0 -22876
- package/dist/src/app-opentui/remote-link.d.ts +0 -10
- package/dist/src/app-opentui/remote-link.js +0 -47
- package/dist/src/app-opentui/render/ascii-fleet.d.ts +0 -15
- package/dist/src/app-opentui/render/ascii-fleet.js +0 -82
- package/dist/src/app-opentui/render/constants.d.ts +0 -30
- package/dist/src/app-opentui/render/constants.js +0 -64
- package/dist/src/app-opentui/render/graphics.d.ts +0 -40
- package/dist/src/app-opentui/render/graphics.js +0 -713
- package/dist/src/app-opentui/render/hover.d.ts +0 -11
- package/dist/src/app-opentui/render/hover.js +0 -34
- package/dist/src/app-opentui/render/native-host.d.ts +0 -37
- package/dist/src/app-opentui/render/native-host.js +0 -180
- package/dist/src/app-opentui/render/panel-layout.d.ts +0 -38
- package/dist/src/app-opentui/render/panel-layout.js +0 -48
- package/dist/src/app-opentui/render/panels.d.ts +0 -12
- package/dist/src/app-opentui/render/panels.js +0 -288
- package/dist/src/app-opentui/render/preloader.d.ts +0 -10
- package/dist/src/app-opentui/render/preloader.js +0 -166
- package/dist/src/app-opentui/render/scene.d.ts +0 -68
- package/dist/src/app-opentui/render/scene.js +0 -300
- package/dist/src/app-opentui/render/terminal-handoff.d.ts +0 -16
- package/dist/src/app-opentui/render/terminal-handoff.js +0 -14
- package/dist/src/app-opentui/render/text.d.ts +0 -29
- package/dist/src/app-opentui/render/text.js +0 -177
- package/dist/src/app-opentui/render/type-bar.d.ts +0 -15
- package/dist/src/app-opentui/render/type-bar.js +0 -212
- package/dist/src/app-opentui/runtime-resources.d.ts +0 -16
- package/dist/src/app-opentui/runtime-resources.js +0 -62
- package/dist/src/app-opentui/runtime.d.ts +0 -45
- package/dist/src/app-opentui/runtime.js +0 -5232
- package/dist/src/app-opentui/scenes/command.d.ts +0 -3
- package/dist/src/app-opentui/scenes/command.js +0 -118
- package/dist/src/app-opentui/scenes/doctor.d.ts +0 -3
- package/dist/src/app-opentui/scenes/doctor.js +0 -296
- package/dist/src/app-opentui/scenes/error.d.ts +0 -2
- package/dist/src/app-opentui/scenes/error.js +0 -277
- package/dist/src/app-opentui/scenes/family-domains/agent.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/agent.js +0 -349
- package/dist/src/app-opentui/scenes/family-domains/browser.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/browser.js +0 -196
- package/dist/src/app-opentui/scenes/family-domains/dist.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/dist.js +0 -244
- package/dist/src/app-opentui/scenes/family-domains/git.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/git.js +0 -196
- package/dist/src/app-opentui/scenes/family-domains/github.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/github.js +0 -275
- package/dist/src/app-opentui/scenes/family-domains/harness.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/harness.js +0 -153
- package/dist/src/app-opentui/scenes/family-domains/index.d.ts +0 -4
- package/dist/src/app-opentui/scenes/family-domains/index.js +0 -1680
- package/dist/src/app-opentui/scenes/family-domains/kit.d.ts +0 -76
- package/dist/src/app-opentui/scenes/family-domains/kit.js +0 -306
- package/dist/src/app-opentui/scenes/family-domains/profile.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/profile.js +0 -213
- package/dist/src/app-opentui/scenes/family-domains/queue.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/queue.js +0 -147
- package/dist/src/app-opentui/scenes/family-domains/remote.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/remote.js +0 -519
- package/dist/src/app-opentui/scenes/family-domains/review.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/review.js +0 -281
- package/dist/src/app-opentui/scenes/family-domains/setup.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/setup.js +0 -268
- package/dist/src/app-opentui/scenes/family-domains/stats.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/stats.js +0 -371
- package/dist/src/app-opentui/scenes/family.d.ts +0 -3
- package/dist/src/app-opentui/scenes/family.js +0 -2199
- package/dist/src/app-opentui/scenes/fleet.d.ts +0 -3
- package/dist/src/app-opentui/scenes/fleet.js +0 -766
- package/dist/src/app-opentui/scenes/handoff.d.ts +0 -2
- package/dist/src/app-opentui/scenes/handoff.js +0 -455
- package/dist/src/app-opentui/scenes/help.d.ts +0 -3
- package/dist/src/app-opentui/scenes/help.js +0 -725
- package/dist/src/app-opentui/scenes/inbox.d.ts +0 -3
- package/dist/src/app-opentui/scenes/inbox.js +0 -427
- package/dist/src/app-opentui/scenes/init.d.ts +0 -3
- package/dist/src/app-opentui/scenes/init.js +0 -181
- package/dist/src/app-opentui/scenes/inspect.d.ts +0 -3
- package/dist/src/app-opentui/scenes/inspect.js +0 -794
- package/dist/src/app-opentui/scenes/main.d.ts +0 -3
- package/dist/src/app-opentui/scenes/main.js +0 -332
- package/dist/src/app-opentui/scenes/pi.d.ts +0 -3
- package/dist/src/app-opentui/scenes/pi.js +0 -509
- package/dist/src/app-opentui/scenes/plugin.d.ts +0 -3
- package/dist/src/app-opentui/scenes/plugin.js +0 -487
- package/dist/src/app-opentui/scenes/repo.d.ts +0 -3
- package/dist/src/app-opentui/scenes/repo.js +0 -425
- package/dist/src/app-opentui/scenes/run-detail.d.ts +0 -3
- package/dist/src/app-opentui/scenes/run-detail.js +0 -467
- package/dist/src/app-opentui/scenes/server.d.ts +0 -3
- package/dist/src/app-opentui/scenes/server.js +0 -378
- package/dist/src/app-opentui/scenes/tasks.d.ts +0 -3
- package/dist/src/app-opentui/scenes/tasks.js +0 -768
- package/dist/src/app-opentui/scenes/workspace.d.ts +0 -3
- package/dist/src/app-opentui/scenes/workspace.js +0 -427
- package/dist/src/app-opentui/selectable.d.ts +0 -19
- package/dist/src/app-opentui/selectable.js +0 -80
- package/dist/src/app-opentui/state.d.ts +0 -4
- package/dist/src/app-opentui/state.js +0 -399
- package/dist/src/app-opentui/surface-catalog.d.ts +0 -20
- package/dist/src/app-opentui/surface-catalog.js +0 -542
- package/dist/src/app-opentui/theme.d.ts +0 -59
- package/dist/src/app-opentui/theme.js +0 -142
- package/dist/src/app-opentui/types.d.ts +0 -313
- package/dist/src/app-opentui/types.js +0 -1
- package/dist/src/commands/_server-events.d.ts +0 -26
- package/dist/src/commands/_server-events.js +0 -715
|
@@ -1,542 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
// packages/cli/src/commands/_help-catalog.ts
|
|
3
|
-
import pc from "picocolors";
|
|
4
|
-
function helpCatalog() {
|
|
5
|
-
return { sections: TOP_LEVEL_SECTIONS, groups: ALL_GROUPS };
|
|
6
|
-
}
|
|
7
|
-
var TOP_LEVEL_SECTIONS = [
|
|
8
|
-
{
|
|
9
|
-
title: "Pi console",
|
|
10
|
-
subtitle: "the operator surface \u2014 every attach opens the run's FULL Pi session",
|
|
11
|
-
commands: [
|
|
12
|
-
{ command: "rig run attach <run-id>", description: "Open the run's Pi console: complete transcript (live AND finished runs), worker turns streaming in live." },
|
|
13
|
-
{ command: "type a message", description: "Inside the console, plain text steers the worker mid-turn \u2014 it lands in the agent's context, not a local model." },
|
|
14
|
-
{ command: "!<command>", description: "Inside the console, runs shell in the WORKER's workspace; output streams back into the transcript." },
|
|
15
|
-
{ command: "/<command>", description: "The palette includes the WORKER session's slash commands ([worker]-tagged) next to /rig." },
|
|
16
|
-
{ command: "/rig abort | /rig stop", description: "Abort the worker's current turn, or stop the whole run, from inside the console." },
|
|
17
|
-
{ command: "rig run steer <id> --message <text>", description: "Steer without attaching \u2014 queue a message; the worker picks it up within seconds." }
|
|
18
|
-
]
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
title: "Start here",
|
|
22
|
-
subtitle: "one-time setup, pick a server",
|
|
23
|
-
commands: [
|
|
24
|
-
{ command: "rig init", description: "Wizard: config, GitHub auth, task source, server, Pi wiring." },
|
|
25
|
-
{ command: "rig server use <alias|local>", description: "Pick which Rig server owns this repo (`rig server list` to see them)." },
|
|
26
|
-
{ command: "rig server status", description: "Show the selected server for this repo." }
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
title: "Work",
|
|
31
|
-
subtitle: "find a task, put an agent on it, answer what it asks",
|
|
32
|
-
commands: [
|
|
33
|
-
{ command: "rig task list", description: "What's on the board (from the selected source/server)." },
|
|
34
|
-
{ command: "rig task run --next", description: "Dispatch an agent on the next ready task; interactive mode drops you into its Pi console." },
|
|
35
|
-
{ command: "rig run status", description: "Active and recent runs at a glance." },
|
|
36
|
-
{ command: "rig run attach <id> --follow", description: "Same as plain attach \u2014 the Pi console is always the interactive surface." },
|
|
37
|
-
{ command: "rig inbox approvals", description: "Approvals workers are waiting on (then `rig inbox approve \u2026`)." }
|
|
38
|
-
]
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
title: "Watch",
|
|
42
|
-
subtitle: "fleet metrics and per-task forensics",
|
|
43
|
-
commands: [
|
|
44
|
-
{ command: "rig stats [--since 7d]", description: "Fleet metrics: completion/failure rates, median run time, steering, stalls." },
|
|
45
|
-
{ command: "rig inspect logs --task <id>", description: "Latest run log for a task." },
|
|
46
|
-
{ command: "rig inspect diff --task <id>", description: "Changed files for a task." }
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
title: "Unblock",
|
|
51
|
-
subtitle: "diagnose wiring, fix auth",
|
|
52
|
-
commands: [
|
|
53
|
-
{ command: "rig doctor", description: "Check every part of the wiring \u2014 run this when anything feels off." },
|
|
54
|
-
{ command: "rig github auth status", description: "GitHub auth state on the selected server." }
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
title: "Extend",
|
|
59
|
-
subtitle: "plugins contribute validators, hooks, task sources, commands",
|
|
60
|
-
commands: [
|
|
61
|
-
{ command: "rig plugin list", description: "What the rig.config.ts plugins contribute." },
|
|
62
|
-
{ command: "rig plugin run <command-id>", description: "Execute a plugin-contributed CLI command." }
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
];
|
|
66
|
-
var PRIMARY_GROUPS = [
|
|
67
|
-
{
|
|
68
|
-
name: "server",
|
|
69
|
-
summary: "Choose, inspect, and start the Rig server that owns tasks and runs.",
|
|
70
|
-
usage: ["rig server <status|list|add|use|repair-link|start> [options]"],
|
|
71
|
-
commands: [
|
|
72
|
-
{ command: "status", description: "Show the selected server and remote project-root link for this repo.", primary: true },
|
|
73
|
-
{ command: "use local", description: "Switch this repo to the local Rig server.", primary: true },
|
|
74
|
-
{ command: "add <alias> <url>", description: "Save a remote Rig server URL.", primary: true },
|
|
75
|
-
{ command: "use <alias>", description: "Select a saved remote server alias.", primary: true },
|
|
76
|
-
{ command: "repair-link [--prepare|--backfill-only] [--repo owner/repo]", description: "Backfill or prepare the selected remote's server-host checkout link.", primary: true },
|
|
77
|
-
{ command: "list", description: "List saved local/remote server aliases.", primary: true },
|
|
78
|
-
{ command: "start [--host <host>] [--port <n>]", description: "Start a local rig-server process." }
|
|
79
|
-
],
|
|
80
|
-
examples: [
|
|
81
|
-
"rig server status",
|
|
82
|
-
"rig server add prod https://where.rig-does.work",
|
|
83
|
-
"rig server use prod",
|
|
84
|
-
"rig server repair-link --repo owner/repo",
|
|
85
|
-
"rig server use local",
|
|
86
|
-
"rig server start --port 3773"
|
|
87
|
-
],
|
|
88
|
-
next: ["Use `rig task list` to see server-owned work.", "Use `rig run list` or `rig run attach <id> --follow` to monitor runs."]
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
name: "task",
|
|
92
|
-
summary: "Find work, start Pi-backed runs, and validate task results.",
|
|
93
|
-
usage: ["rig task <list|next|show|run> [options]"],
|
|
94
|
-
commands: [
|
|
95
|
-
{ command: "list [--assignee <login|me|@me>] [--state open|closed]", description: "List tasks from the selected server/source.", primary: true },
|
|
96
|
-
{ command: "next [filters]", description: "Render the next matching task as a selected-task card.", primary: true },
|
|
97
|
-
{ command: "show <id>|--task <id> [--raw]", description: "Show a human task summary; --raw prints the full payload.", primary: true },
|
|
98
|
-
{ command: "run [#<issue>|<task-id>|--next|--task <id>]", description: "Submit a task run; interactive follows with bundled Pi.", primary: true },
|
|
99
|
-
{ command: "ready", description: "List task IDs that are runnable now." },
|
|
100
|
-
{ command: "validate|verify [--task <id>]", description: "Run configured task checks/review gates." },
|
|
101
|
-
{ command: "details --task <id>", description: "Show full task info from the configured source." },
|
|
102
|
-
{ command: "reopen [--task <id> | --all] [--reason <text>]", description: "Reopen closed task(s) in the configured source." },
|
|
103
|
-
{ command: "artifacts|artifact-dir|artifact-write", description: "Inspect or write task artifacts." },
|
|
104
|
-
{ command: "report-bug", description: "Create a structured bug report/task." }
|
|
105
|
-
],
|
|
106
|
-
examples: [
|
|
107
|
-
"rig task list --assignee @me --limit 20",
|
|
108
|
-
"rig task next",
|
|
109
|
-
"rig task show 123 --raw",
|
|
110
|
-
"rig task run --next",
|
|
111
|
-
"rig task run #123 --runtime-adapter pi",
|
|
112
|
-
"rig task run --title 'Investigate deploy drift' --initial-prompt 'Check server health'"
|
|
113
|
-
],
|
|
114
|
-
next: ["Use `--detach` to submit without attaching.", "Use `rig run attach <run-id> --follow` to rejoin a live run."]
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
name: "run",
|
|
118
|
-
summary: "Observe, attach to, and control Rig runs. `attach` opens the Pi console \u2014 the full worker session, live.",
|
|
119
|
-
usage: ["rig run <list|status|show|attach|steer|stop|resume|restart> [options]"],
|
|
120
|
-
commands: [
|
|
121
|
-
{ command: "list", description: "List recent runs from the selected server or local state.", primary: true },
|
|
122
|
-
{ command: "status", description: "Render active and recent run groups.", primary: true },
|
|
123
|
-
{ command: "show <id>|--run <id> [--raw]", description: "Show a human run summary; --raw prints the full payload.", primary: true },
|
|
124
|
-
{ command: "attach <run-id>|--run <id>", description: "Open the run's Pi console \u2014 see 'Inside the console' below. Works on live AND finished runs.", primary: true },
|
|
125
|
-
{ command: "steer <run-id> --message <text>", description: "Queue a steering message into a live worker without attaching \u2014 delivered into the agent's context within seconds.", primary: true },
|
|
126
|
-
{ command: "stop [<run-id>|--run <id>]", description: "Request stop for one run or local active runs.", primary: true },
|
|
127
|
-
{ command: "resume [<run-id>]", description: "Resume an interrupted run on the selected server (defaults to the most recent resumable)." },
|
|
128
|
-
{ command: "restart [<run-id>]", description: "Re-dispatch a run from a clean runtime, reopening its Pi session where possible." },
|
|
129
|
-
{ command: "timeline --run <id> [--follow]", description: "Stream raw run timeline events (scripts; humans should attach)." },
|
|
130
|
-
{ command: "replay <run-id>|--run <id> [--with-session]", description: "Print the run's consolidated run.jsonl as a merged timeline; --with-session interleaves the Pi session log." },
|
|
131
|
-
{ command: "delete|cleanup", description: "Remove completed run records/artifacts." }
|
|
132
|
-
],
|
|
133
|
-
examples: [
|
|
134
|
-
"rig run attach <run-id> # full session console \u2014 live mirror, steering, worker shell",
|
|
135
|
-
"rig run steer <run-id> --message 'focus on the failing test first'",
|
|
136
|
-
"rig run list",
|
|
137
|
-
"rig run show <run-id>",
|
|
138
|
-
"rig run stop <run-id>"
|
|
139
|
-
],
|
|
140
|
-
next: [
|
|
141
|
-
"Inside the console: the run's COMPLETE transcript loads on open (finished runs too), and new worker turns stream in live.",
|
|
142
|
-
"Inside the console: plain text = steering into the worker's context \xB7 !<cmd> = shell in the WORKER workspace \xB7 /<cmd> includes the worker session's commands \xB7 /rig abort stops the current turn.",
|
|
143
|
-
"The console is read-write but remote-only: nothing runs on your machine; the worker keeps running when you exit.",
|
|
144
|
-
"Use `rig task run --next` to create a new run; interactive mode drops you straight into its console.",
|
|
145
|
-
"Use `--json` when scripts need the full structured record."
|
|
146
|
-
]
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
name: "inbox",
|
|
150
|
-
summary: "Review approval and user-input requests that block worker runs.",
|
|
151
|
-
usage: ["rig inbox <approvals|approve|inputs|respond> [options]"],
|
|
152
|
-
commands: [
|
|
153
|
-
{ command: "approvals [--run <id>] [--task <id>]", description: "List pending approvals.", primary: true },
|
|
154
|
-
{ command: "inputs [--run <id>] [--task <id>]", description: "List pending user-input requests.", primary: true },
|
|
155
|
-
{ command: "approve --run <id> --request <id> --decision approve|reject", description: "Resolve an approval request." },
|
|
156
|
-
{ command: "respond --run <id> --request <id> --answer key=value", description: "Answer a user-input request." }
|
|
157
|
-
],
|
|
158
|
-
examples: [
|
|
159
|
-
"rig inbox approvals",
|
|
160
|
-
"rig inbox inputs --run <run-id>",
|
|
161
|
-
"rig inbox approve --run <run-id> --request <request-id> --decision approve"
|
|
162
|
-
],
|
|
163
|
-
next: ["Rejoin the run after resolving a block: `rig run attach <run-id> --follow`."]
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
name: "stats",
|
|
167
|
-
summary: "Fleet metrics computed from on-disk run journals (no server required).",
|
|
168
|
-
usage: ["rig stats [show] [--since <7d|30d|ISO date>]"],
|
|
169
|
-
commands: [
|
|
170
|
-
{ command: "show [--since <window>]", description: "Total runs, completion/failure/needs-attention rates, median run time, steering, stalls, approvals.", primary: true }
|
|
171
|
-
],
|
|
172
|
-
examples: [
|
|
173
|
-
"rig stats",
|
|
174
|
-
"rig stats --since 7d",
|
|
175
|
-
"rig stats --since 2026-06-01 --json"
|
|
176
|
-
],
|
|
177
|
-
next: ["Inspect outliers with `rig run list` and `rig run show <run-id>`.", "Use `--json` for the schema'd envelope (see docs/cli-json.md)."]
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
name: "inspect",
|
|
181
|
-
summary: "Inspect logs, artifacts, graphs, failures for a task.",
|
|
182
|
-
usage: ["rig inspect <logs|artifacts|failures|graph|audit|diff> --task <id>"],
|
|
183
|
-
commands: [
|
|
184
|
-
{ command: "logs --task <id>", description: "Latest run log for a task (local or selected server).", primary: true },
|
|
185
|
-
{ command: "artifacts --task <id>", description: "List the task's completion artifacts.", primary: true },
|
|
186
|
-
{ command: "failures --task <id>", description: "Recorded failures for a task.", primary: true },
|
|
187
|
-
{ command: "diff --task <id>", description: "Changed files for a task.", primary: true },
|
|
188
|
-
{ command: "graph", description: "Task dependency graph." },
|
|
189
|
-
{ command: "audit", description: "Controlled-command audit trail." }
|
|
190
|
-
],
|
|
191
|
-
examples: ["rig inspect logs --task <id>", "rig inspect diff --task <id>"],
|
|
192
|
-
next: ["Use `rig stats` for fleet-level metrics across runs."]
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
name: "repo",
|
|
196
|
-
summary: "Repository sync/baseline helpers for the Rig-managed checkout.",
|
|
197
|
-
usage: ["rig repo <sync|reset-baseline>"],
|
|
198
|
-
commands: [
|
|
199
|
-
{ command: "sync", description: "Sync project repository state.", primary: true },
|
|
200
|
-
{ command: "reset-baseline", description: "Reset the managed baseline for the repo." }
|
|
201
|
-
],
|
|
202
|
-
examples: ["rig repo sync"]
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
name: "plugin",
|
|
206
|
-
summary: "Plugin listing, validation, and plugin-contributed commands.",
|
|
207
|
-
usage: ["rig plugin <list|validate|run> [options]"],
|
|
208
|
-
commands: [
|
|
209
|
-
{ command: "list", description: "List plugins declared in rig.config.ts and their contributions.", primary: true },
|
|
210
|
-
{ command: "validate --task <id>", description: "Run plugin-contributed validators for a task.", primary: true },
|
|
211
|
-
{ command: "run <command-id> [args...]", description: "Execute a plugin-contributed CLI command (also callable as `rig <command-id>`)." }
|
|
212
|
-
],
|
|
213
|
-
examples: ["rig plugin list", "rig plugin run <command-id>"]
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
name: "init",
|
|
217
|
-
summary: "Set up Rig for this repo: server, GitHub auth, checkout strategy, task source, and Pi wiring.",
|
|
218
|
-
usage: ["rig init [--yes] [--server local|remote] [--repo owner/repo] [--remote-url <url>]"],
|
|
219
|
-
commands: [
|
|
220
|
-
{ command: "init", description: "Interactive setup wizard for a new or existing Rig repo.", primary: true },
|
|
221
|
-
{ command: "init --demo", description: "Offline demo project: files task source + 3 sample tasks, zero GitHub.", primary: true },
|
|
222
|
-
{ command: "init --yes", description: "Non-interactive setup using detected/default settings.", primary: true },
|
|
223
|
-
{ command: "init --server remote --remote-url <url>", description: "Link this repo to a remote Rig server.", primary: true },
|
|
224
|
-
{ command: "init --repair", description: "Repair missing private state without replacing project config." }
|
|
225
|
-
],
|
|
226
|
-
examples: [
|
|
227
|
-
"rig init",
|
|
228
|
-
"rig init --demo",
|
|
229
|
-
"rig init --yes --repo humanity-org/humanwork",
|
|
230
|
-
"rig init --server remote --remote-url https://where.rig-does.work --repo owner/repo"
|
|
231
|
-
],
|
|
232
|
-
next: ["After init, run `rig server status`.", "Then use `rig task list` and `rig task run --next` for day-to-day work."]
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
name: "doctor",
|
|
236
|
-
summary: "Diagnostics for project/server/GitHub/Pi state.",
|
|
237
|
-
usage: ["rig doctor"],
|
|
238
|
-
commands: [
|
|
239
|
-
{ command: "doctor", description: "Run setup and runtime diagnostics.", primary: true },
|
|
240
|
-
{ command: "check", description: "Compatibility spelling for diagnostics." }
|
|
241
|
-
],
|
|
242
|
-
examples: ["rig doctor", "rig doctor --json"],
|
|
243
|
-
next: ["Use `rig server status` and `rig github auth status` to inspect common failure points."]
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
name: "github",
|
|
247
|
-
summary: "GitHub auth helpers for the selected Rig server.",
|
|
248
|
-
usage: ["rig github auth <status|import-gh|token>"],
|
|
249
|
-
commands: [
|
|
250
|
-
{ command: "auth status", description: "Show GitHub auth state.", primary: true },
|
|
251
|
-
{ command: "auth import-gh", description: "Import the current `gh` token into the selected server." },
|
|
252
|
-
{ command: "auth token --token <token>", description: "Store a token on the selected server." }
|
|
253
|
-
],
|
|
254
|
-
examples: ["rig github auth status", "rig github auth import-gh"],
|
|
255
|
-
next: ["After auth is valid, use `rig task run --next`."]
|
|
256
|
-
}
|
|
257
|
-
];
|
|
258
|
-
var ADVANCED_GROUPS = [
|
|
259
|
-
{
|
|
260
|
-
name: "setup",
|
|
261
|
-
summary: "Bootstrap/check local setup.",
|
|
262
|
-
usage: ["rig setup <bootstrap|check|preflight>"],
|
|
263
|
-
commands: [
|
|
264
|
-
{ command: "bootstrap", description: "Bootstrap local setup dependencies.", primary: true },
|
|
265
|
-
{ command: "check", description: "Check local setup state (toolchain, deps, config).", primary: true },
|
|
266
|
-
{ command: "preflight", description: "Run preflight checks before a run.", primary: true }
|
|
267
|
-
]
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
name: "profile",
|
|
271
|
-
summary: "Runtime profile/model defaults.",
|
|
272
|
-
usage: ["rig profile <show|set>"],
|
|
273
|
-
commands: [
|
|
274
|
-
{ command: "show", description: "Show the active execution profile.", primary: true },
|
|
275
|
-
{ command: "set [--model <model>] [--runtime <runtime>] [--plugin <plugin>]", description: "Set model/runtime/plugin profile defaults.", primary: true }
|
|
276
|
-
]
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
name: "review",
|
|
280
|
-
summary: "Inspect or change completion review gate policy.",
|
|
281
|
-
usage: ["rig review <show|set>"],
|
|
282
|
-
commands: [
|
|
283
|
-
{ command: "show", description: "Show current review gate settings." },
|
|
284
|
-
{ command: "set <off|advisory|required> [--provider <provider>]", description: "Change review strictness/provider (e.g. --provider greptile)." }
|
|
285
|
-
],
|
|
286
|
-
examples: ["rig review show", "rig review set required --provider greptile"],
|
|
287
|
-
next: ["Use `rig inbox approvals` for blocked run handoffs."]
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
name: "browser",
|
|
291
|
-
summary: "Browser workstation actions for browser-required tasks: launch, check, CDP probe, profile reset, and app-specific smokes.",
|
|
292
|
-
usage: ["rig browser <help|explain|demo|hp-next|cdp-probe|profile-persistence|profile-lock-check|smoke-test> [options]"],
|
|
293
|
-
commands: [
|
|
294
|
-
{ command: "help", description: "Rich browser command help (canonical: `rig browser help`).", primary: true },
|
|
295
|
-
{ command: "explain", description: "Explain the browser-required task contract and runtime helper commands.", primary: true },
|
|
296
|
-
{ command: "demo [--port <n>] [--profile <name>] [--state-dir <path>] [--target-url <url>] [--keep-open] [--no-build]", description: "Run a guided real browser/agent demo flow.", primary: true },
|
|
297
|
-
{ command: "hp-next dev", description: "Start hp-next Rig Browser in dev/watch mode.", primary: true },
|
|
298
|
-
{ command: "hp-next start", description: "Build/start the hp-next browser workstation without watch mode.", primary: true },
|
|
299
|
-
{ command: "hp-next check", description: "Validate the hp-next CDP endpoint on the configured port.", primary: true },
|
|
300
|
-
{ command: "hp-next e2e", description: "Run hp-next browser e2e smoke checks through Rig Browser.", primary: true },
|
|
301
|
-
{ command: "hp-next reset", description: "Reset the hp-next browser profile when stale browser state is suspected.", primary: true },
|
|
302
|
-
{ command: "cdp-probe", description: "Run an isolated CDP attach/evaluate/layout probe." },
|
|
303
|
-
{ command: "profile-persistence", description: "Verify a named browser profile persists browser state." },
|
|
304
|
-
{ command: "profile-lock-check", description: "Verify concurrent launches reject the same profile." },
|
|
305
|
-
{ command: "smoke-test", description: "Run the browser package smoke test." }
|
|
306
|
-
],
|
|
307
|
-
examples: [
|
|
308
|
-
"rig browser help",
|
|
309
|
-
"rig browser hp-next check",
|
|
310
|
-
"rig browser hp-next e2e",
|
|
311
|
-
"rig browser cdp-probe",
|
|
312
|
-
"rig browser profile-lock-check"
|
|
313
|
-
],
|
|
314
|
-
next: ["Inside a task run, use rig-browser-launch, rig-browser-check, and rig-browser-attach-info from the worker PATH."]
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
name: "pi",
|
|
318
|
-
summary: "Manage Pi extension packages for this project (community extensions from npm/git).",
|
|
319
|
-
usage: ["rig pi <list|add|remove|search> [args]"],
|
|
320
|
-
commands: [
|
|
321
|
-
{ command: "list", description: "Show project and user Pi extension packages." },
|
|
322
|
-
{ command: "add <source>", description: "Add an npm/git Pi extension to .pi/settings.json (auto-installs at next session)." },
|
|
323
|
-
{ command: "remove <source>", description: "Remove an operator-added Pi extension." },
|
|
324
|
-
{ command: "search [term]", description: "Discover Pi extension packages on the npm registry." }
|
|
325
|
-
],
|
|
326
|
-
examples: ["rig pi search subagents", "rig pi add pi-subagents", "rig pi list"],
|
|
327
|
-
next: ["Config-managed extensions: declare `runtime: { pi: { packages: [...] } }` in rig.config.ts \u2014 workers pick them up automatically."]
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
name: "queue",
|
|
331
|
-
summary: "Run task queues locally.",
|
|
332
|
-
usage: ["rig queue run [--workers <n>] [--max-tasks <n>] [--action validate|verify|pipeline] [--isolation off|worktree] [--no-runtime-reuse] [--fail-fast] [--skip-project-sync]"],
|
|
333
|
-
commands: [
|
|
334
|
-
{ command: "run [--workers <n>] [--max-tasks <n>] [--action validate|verify|pipeline] [--isolation off|worktree] [--no-runtime-reuse] [--fail-fast] [--skip-project-sync]", description: "Process queue work: drain matching tasks with N workers, optional per-task action and isolation.", primary: true }
|
|
335
|
-
]
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
name: "agent",
|
|
339
|
-
summary: "Runtime agent workspace helpers.",
|
|
340
|
-
usage: ["rig agent <list|prepare|run|cleanup>"],
|
|
341
|
-
commands: [
|
|
342
|
-
{ command: "list", description: "List prepared agent runtimes.", primary: true },
|
|
343
|
-
{ command: "prepare [--id <id>] [--mode <mode>] [--task <task>]", description: "Prepare an isolated agent runtime workspace.", primary: true },
|
|
344
|
-
{ command: "run [--id <id>] [--mode <mode>] [--task <task>] [--skip-project-sync]", description: "Prepare (if needed) and run an agent in its workspace.", primary: true },
|
|
345
|
-
{ command: "cleanup [--all] [--id <id>]", description: "Remove prepared agent workspaces.", primary: true }
|
|
346
|
-
]
|
|
347
|
-
},
|
|
348
|
-
{ name: "inspector", summary: "Event stream and drift scanners.", usage: ["rig inspector <stream|scan-upstream-drift>"], commands: [{ command: "stream", description: "Stream events." }] },
|
|
349
|
-
{
|
|
350
|
-
name: "dist",
|
|
351
|
-
summary: "Build/install packaged Rig CLI.",
|
|
352
|
-
usage: ["rig dist <build|install|doctor|rebuild-agent>"],
|
|
353
|
-
commands: [
|
|
354
|
-
{ command: "build [--output-dir <dir>]", description: "Build the distributable Rig CLI.", primary: true },
|
|
355
|
-
{ command: "install [--scope <scope>] [--path <path>]", description: "Install the built CLI to a scope/path.", primary: true },
|
|
356
|
-
{ command: "doctor", description: "Diagnose the dist toolchain and install state.", primary: true },
|
|
357
|
-
{ command: "rebuild-agent", description: "Rebuild the agent runtime image, pruning stale images.", primary: true }
|
|
358
|
-
]
|
|
359
|
-
},
|
|
360
|
-
{ name: "workspace", summary: "Workspace topology/service helpers.", usage: ["rig workspace <summary|topology|remote-hosts>"], commands: [{ command: "summary", description: "Show workspace summary." }] },
|
|
361
|
-
{
|
|
362
|
-
name: "remote",
|
|
363
|
-
summary: "Compatibility remote orchestration controls.",
|
|
364
|
-
usage: ["rig remote <status|tasks|watch|pause|resume|continue|stop|refresh|add-iterations|remove-iterations|endpoint ...>"],
|
|
365
|
-
commands: [
|
|
366
|
-
{ command: "status [--remote <alias>]", description: "Show the remote orchestration state.", primary: true },
|
|
367
|
-
{ command: "tasks [--remote <alias>]", description: "List the remote's tracked tasks.", primary: true },
|
|
368
|
-
{ command: "watch [--remote <alias>] [--seconds <n>] [--event <type>]", description: "Stream remote orchestration events.", primary: true },
|
|
369
|
-
{ command: "pause [--remote <alias>]", description: "Pause the running remote orchestration.", primary: true },
|
|
370
|
-
{ command: "resume [--remote <alias>] [--max-workers <n>] [--max-iterations <n>] [--direct-merge]", description: "Resume the remote with optional tuning.", primary: true },
|
|
371
|
-
{ command: "continue [--remote <alias>]", description: "Continue a paused remote orchestration.", primary: true },
|
|
372
|
-
{ command: "stop [--remote <alias>]", description: "Stop the remote orchestration.", primary: true },
|
|
373
|
-
{ command: "refresh [--remote <alias>]", description: "Refresh remote state.", primary: true },
|
|
374
|
-
{ command: "add-iterations [--count <n>] [--remote <alias>]", description: "Grant the remote more iterations.", primary: true },
|
|
375
|
-
{ command: "remove-iterations [--count <n>] [--remote <alias>]", description: "Reduce the remote's iteration budget.", primary: true },
|
|
376
|
-
{ command: "endpoint list", description: "List configured remote endpoints.", primary: true },
|
|
377
|
-
{ command: "endpoint add --alias <alias> --host <host> --port <n> [--token <token>]", description: "Register a remote endpoint.", primary: true },
|
|
378
|
-
{ command: "endpoint remove --alias <alias>", description: "Remove a remote endpoint.", primary: true },
|
|
379
|
-
{ command: "endpoint test [--alias <alias>]", description: "Test connectivity to a remote endpoint.", primary: true },
|
|
380
|
-
{ command: "endpoint doctor", description: "Diagnose remote endpoint configuration.", primary: true }
|
|
381
|
-
]
|
|
382
|
-
},
|
|
383
|
-
{ name: "git", summary: "Pass through to Rig git-flow helper.", usage: ["rig git <args...>"], commands: [{ command: "<args...>", description: "Advanced git flow operations." }] },
|
|
384
|
-
{ name: "harness", summary: "Pass through to runtime harness CLI.", usage: ["rig harness <args...>"], commands: [{ command: "<args...>", description: "Advanced harness operations." }] },
|
|
385
|
-
{ name: "test", summary: "Project test wrappers.", usage: ["rig test <unit|e2e|all>"], commands: [{ command: "all", description: "Run configured project tests." }] }
|
|
386
|
-
];
|
|
387
|
-
var ALL_GROUPS = [...PRIMARY_GROUPS, ...ADVANCED_GROUPS];
|
|
388
|
-
|
|
389
|
-
// packages/cli/src/app-opentui/surface-catalog.ts
|
|
390
|
-
var NATIVE_FAMILY_SCENES = {
|
|
391
|
-
run: { scene: "fleet", kind: "refresh", argv: ["run", "status"], label: "Open runs" },
|
|
392
|
-
task: { scene: "tasks", kind: "refresh", argv: ["task", "list"], label: "Open tasks" },
|
|
393
|
-
inbox: { scene: "inbox", kind: "refresh", argv: ["inbox", "approvals"], label: "Open inbox" },
|
|
394
|
-
server: { scene: "server", kind: "refresh", argv: ["server", "status"], label: "Open server" },
|
|
395
|
-
init: { scene: "init", kind: "refresh", argv: ["init"], label: "Open init" },
|
|
396
|
-
doctor: { scene: "doctor", kind: "doctor-run", argv: ["doctor"], label: "Run doctor" }
|
|
397
|
-
};
|
|
398
|
-
var BESPOKE_FAMILIES = new Set([
|
|
399
|
-
"run",
|
|
400
|
-
"task",
|
|
401
|
-
"inbox",
|
|
402
|
-
"server",
|
|
403
|
-
"init",
|
|
404
|
-
"doctor",
|
|
405
|
-
"pi",
|
|
406
|
-
"plugin",
|
|
407
|
-
"repo",
|
|
408
|
-
"workspace",
|
|
409
|
-
"inspect"
|
|
410
|
-
]);
|
|
411
|
-
var SAFE_DIRECT_COMMANDS = new Set([
|
|
412
|
-
"server status",
|
|
413
|
-
"server list",
|
|
414
|
-
"server use local",
|
|
415
|
-
"task list",
|
|
416
|
-
"task next",
|
|
417
|
-
"task ready",
|
|
418
|
-
"run list",
|
|
419
|
-
"run status",
|
|
420
|
-
"inbox approvals",
|
|
421
|
-
"inbox inputs",
|
|
422
|
-
"stats show",
|
|
423
|
-
"plugin list",
|
|
424
|
-
"doctor doctor",
|
|
425
|
-
"doctor check",
|
|
426
|
-
"github auth status",
|
|
427
|
-
"browser help",
|
|
428
|
-
"browser explain",
|
|
429
|
-
"pi list",
|
|
430
|
-
"pi search",
|
|
431
|
-
"setup check",
|
|
432
|
-
"profile show",
|
|
433
|
-
"review show",
|
|
434
|
-
"repo sync",
|
|
435
|
-
"agent list",
|
|
436
|
-
"dist doctor",
|
|
437
|
-
"workspace summary",
|
|
438
|
-
"remote status"
|
|
439
|
-
]);
|
|
440
|
-
function normalizeCommandTemplate(command) {
|
|
441
|
-
return command.replace(/\s+/g, " ").trim();
|
|
442
|
-
}
|
|
443
|
-
function firstAlternative(value) {
|
|
444
|
-
return value.split("|")[0]?.trim() ?? value.trim();
|
|
445
|
-
}
|
|
446
|
-
function stripOptionalSegments(value) {
|
|
447
|
-
return value.replace(/\[[^\]]*\]/g, "").replace(/\s+/g, " ").trim();
|
|
448
|
-
}
|
|
449
|
-
function commandNeedsArguments(template) {
|
|
450
|
-
return /<[^>]+>|\.\.\.|\|/.test(template);
|
|
451
|
-
}
|
|
452
|
-
function commandKey(family, command) {
|
|
453
|
-
return `${family} ${normalizeCommandTemplate(command)}`.replace(/\s+/g, " ").trim();
|
|
454
|
-
}
|
|
455
|
-
function commandArgvForTemplate(group, command) {
|
|
456
|
-
const family = group.name;
|
|
457
|
-
const template = normalizeCommandTemplate(command.command);
|
|
458
|
-
if (!template || template === family)
|
|
459
|
-
return [family, "--help"];
|
|
460
|
-
const key = commandKey(family, template);
|
|
461
|
-
if (SAFE_DIRECT_COMMANDS.has(key))
|
|
462
|
-
return [family, ...stripOptionalSegments(template).split(/\s+/).filter(Boolean)];
|
|
463
|
-
const base = firstAlternative(stripOptionalSegments(template));
|
|
464
|
-
const parts = base.split(/\s+/).filter(Boolean);
|
|
465
|
-
if (!commandNeedsArguments(template) && parts.length > 0)
|
|
466
|
-
return [family, ...parts];
|
|
467
|
-
return [family, "--help"];
|
|
468
|
-
}
|
|
469
|
-
function promptArgvForTemplate(group, command) {
|
|
470
|
-
const base = stripOptionalSegments(firstAlternative(normalizeCommandTemplate(command.command)));
|
|
471
|
-
const words = [];
|
|
472
|
-
for (const part of base.split(/\s+/).filter(Boolean)) {
|
|
473
|
-
if (/[<>]|\.\.\./.test(part))
|
|
474
|
-
break;
|
|
475
|
-
words.push(part);
|
|
476
|
-
}
|
|
477
|
-
return [group.name, ...words];
|
|
478
|
-
}
|
|
479
|
-
function sceneForGroup(group) {
|
|
480
|
-
const native = NATIVE_FAMILY_SCENES[group.name];
|
|
481
|
-
if (native)
|
|
482
|
-
return native;
|
|
483
|
-
if (!BESPOKE_FAMILIES.has(group.name)) {
|
|
484
|
-
return { scene: "family", kind: "refresh", argv: [group.name], label: `Open ${group.name}` };
|
|
485
|
-
}
|
|
486
|
-
return { scene: "command", kind: "command-run", argv: [group.name, "--help"], label: `Open ${group.name}` };
|
|
487
|
-
}
|
|
488
|
-
function tuiSurfaceActions() {
|
|
489
|
-
const { groups } = helpCatalog();
|
|
490
|
-
return groups.flatMap((group) => {
|
|
491
|
-
const family = sceneForGroup(group);
|
|
492
|
-
const groupAction = {
|
|
493
|
-
id: `family:${group.name}`,
|
|
494
|
-
family: group.name,
|
|
495
|
-
label: group.name,
|
|
496
|
-
detail: group.summary,
|
|
497
|
-
argv: family.argv,
|
|
498
|
-
scene: family.scene,
|
|
499
|
-
kind: family.kind,
|
|
500
|
-
primary: true
|
|
501
|
-
};
|
|
502
|
-
const commandActions = group.commands.map((command, index) => {
|
|
503
|
-
const argv = commandArgvForTemplate(group, command);
|
|
504
|
-
const direct = argv[0] === group.name && argv.slice(1).join(" ") === stripOptionalSegments(firstAlternative(command.command));
|
|
505
|
-
const template = normalizeCommandTemplate(command.command);
|
|
506
|
-
const needsArgs = commandNeedsArguments(template) && argv.length === 2 && argv[1] === "--help";
|
|
507
|
-
const promptArgv = needsArgs ? promptArgvForTemplate(group, command) : undefined;
|
|
508
|
-
return {
|
|
509
|
-
id: `command:${group.name}:${index}:${command.command}`,
|
|
510
|
-
family: group.name,
|
|
511
|
-
label: `${group.name} ${command.command}`,
|
|
512
|
-
detail: direct ? command.description : needsArgs ? `${command.description} \xB7 enter args to run` : `${command.description} \xB7 opens ${group.name} command workspace/help`,
|
|
513
|
-
argv,
|
|
514
|
-
scene: "command",
|
|
515
|
-
kind: "command-run",
|
|
516
|
-
primary: command.primary,
|
|
517
|
-
template: `rig ${group.name} ${command.command}`.replace(/\s+/g, " ").trim(),
|
|
518
|
-
...needsArgs ? { needsArgs: true, promptArgv } : {}
|
|
519
|
-
};
|
|
520
|
-
});
|
|
521
|
-
return [groupAction, ...commandActions];
|
|
522
|
-
});
|
|
523
|
-
}
|
|
524
|
-
function intentForSurfaceAction(action) {
|
|
525
|
-
return {
|
|
526
|
-
scene: action.scene,
|
|
527
|
-
argv: action.argv,
|
|
528
|
-
action: {
|
|
529
|
-
kind: action.kind,
|
|
530
|
-
label: action.kind === "command-run" ? `Open ${action.label}` : action.label,
|
|
531
|
-
payload: {
|
|
532
|
-
argv: [...action.argv],
|
|
533
|
-
family: action.family,
|
|
534
|
-
...action.template ? { template: action.template } : {}
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
export {
|
|
540
|
-
tuiSurfaceActions,
|
|
541
|
-
intentForSurfaceAction
|
|
542
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { bold as otuiBold, dim as otuiDim, fg as otuiFg, t, TextAttributes } from "@opentui/core";
|
|
2
|
-
export declare const RIG_UI: {
|
|
3
|
-
readonly bg: "#070809";
|
|
4
|
-
readonly bg2: "#0b0c0e";
|
|
5
|
-
readonly panel: "#101115";
|
|
6
|
-
readonly panel2: "#14161b";
|
|
7
|
-
readonly hover: "#181b24";
|
|
8
|
-
readonly glass: "#1e2230";
|
|
9
|
-
readonly border: "#2a2e3a";
|
|
10
|
-
readonly ink: "#f4f5f8";
|
|
11
|
-
readonly ink2: "#c7c9d3";
|
|
12
|
-
readonly ink3: "#9aa0ae";
|
|
13
|
-
readonly ink4: "#787b86";
|
|
14
|
-
readonly lime: "#ccff4d";
|
|
15
|
-
readonly limeDim: "#a9d63f";
|
|
16
|
-
readonly cyan: "#56d8ff";
|
|
17
|
-
readonly cyanDim: "#3f9fbd";
|
|
18
|
-
readonly red: "#ff5d5d";
|
|
19
|
-
readonly yellow: "#ffd24d";
|
|
20
|
-
readonly magenta: "#ff79b0";
|
|
21
|
-
};
|
|
22
|
-
/** The single selected-row / active-item marker. A solid left rule reads as a
|
|
23
|
-
* raised bar edge; pair with `RIG_UI.glass` as the row bg (see selectionLine in
|
|
24
|
-
* render/scene.ts). The trailing space gives the glyph breathing room. */
|
|
25
|
-
export declare const SELECTION_MARKER = "\u258C";
|
|
26
|
-
/** Marker for an unselected row in a markered list — same width as the selected
|
|
27
|
-
* marker so labels stay column-aligned whether or not a row is selected. */
|
|
28
|
-
export declare const SELECTION_MARKER_IDLE = " ";
|
|
29
|
-
/** Canonical key-column width for `LABEL value` definition rows (kv / deckRow).
|
|
30
|
-
* Wide enough for the longest first-class label, narrow enough to keep values
|
|
31
|
-
* left-anchored near the eye. */
|
|
32
|
-
export declare const LABEL_WIDTH = 14;
|
|
33
|
-
/** Inter-column gutter for dense tables — two spaces, matching the existing
|
|
34
|
-
* fleet/tasks/roster tables. */
|
|
35
|
-
export declare const COLUMN_GUTTER = " ";
|
|
36
|
-
export declare const RIG_SPINNER_FRAMES: readonly ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
|
|
37
|
-
export declare const styles: {
|
|
38
|
-
readonly ink: (input: import("@opentui/core").StylableInput) => import("@opentui/core").TextChunk;
|
|
39
|
-
readonly ink2: (input: import("@opentui/core").StylableInput) => import("@opentui/core").TextChunk;
|
|
40
|
-
readonly ink3: (input: import("@opentui/core").StylableInput) => import("@opentui/core").TextChunk;
|
|
41
|
-
readonly ink4: (input: import("@opentui/core").StylableInput) => import("@opentui/core").TextChunk;
|
|
42
|
-
readonly lime: (input: import("@opentui/core").StylableInput) => import("@opentui/core").TextChunk;
|
|
43
|
-
readonly limeDim: (input: import("@opentui/core").StylableInput) => import("@opentui/core").TextChunk;
|
|
44
|
-
readonly cyan: (input: import("@opentui/core").StylableInput) => import("@opentui/core").TextChunk;
|
|
45
|
-
readonly red: (input: import("@opentui/core").StylableInput) => import("@opentui/core").TextChunk;
|
|
46
|
-
readonly yellow: (input: import("@opentui/core").StylableInput) => import("@opentui/core").TextChunk;
|
|
47
|
-
readonly magenta: (input: import("@opentui/core").StylableInput) => import("@opentui/core").TextChunk;
|
|
48
|
-
};
|
|
49
|
-
export { otuiBold as bold, otuiDim as dim, otuiFg as fg, t, TextAttributes };
|
|
50
|
-
export declare function statusColor(status: string): string;
|
|
51
|
-
export declare function statusGlyph(status: string): string;
|
|
52
|
-
export declare function noColorActive(): boolean;
|
|
53
|
-
export declare function statusLabel(status: string): {
|
|
54
|
-
glyph: string;
|
|
55
|
-
color: string;
|
|
56
|
-
};
|
|
57
|
-
export declare function sceneTitle(title: string): import("@opentui/core").StyledText;
|
|
58
|
-
export declare function commandText(command: string): import("@opentui/core").StyledText;
|
|
59
|
-
export declare function faint(text: string): import("@opentui/core").TextChunk;
|