@h-rig/cli 0.0.6-alpha.90 → 0.0.6-alpha.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/README.md +18 -19
  2. package/dist/bin/build-rig-binaries.js +22 -10
  3. package/dist/bin/rig.d.ts +71 -1
  4. package/dist/bin/rig.js +15078 -11169
  5. package/dist/config/rig-default-config.yml +5 -0
  6. package/dist/src/app/drone-ui.d.ts +11 -14
  7. package/dist/src/app/drone-ui.js +70 -86
  8. package/dist/src/commands/_async-ui.d.ts +1 -4
  9. package/dist/src/commands/_async-ui.js +9 -111
  10. package/dist/src/commands/_cli-format.d.ts +16 -9
  11. package/dist/src/commands/_cli-format.js +167 -295
  12. package/dist/src/commands/_connection-state.d.ts +11 -1
  13. package/dist/src/commands/_connection-state.js +50 -5
  14. package/dist/src/commands/_doctor-checks.d.ts +0 -6
  15. package/dist/src/commands/_doctor-checks.js +79 -382
  16. package/dist/src/commands/_help-catalog.d.ts +1 -1
  17. package/dist/src/commands/_help-catalog.js +217 -157
  18. package/dist/src/commands/_inprocess-services.d.ts +33 -0
  19. package/dist/src/commands/_inprocess-services.js +102 -0
  20. package/dist/src/commands/_json-output.js +4 -0
  21. package/dist/src/commands/_lazy-reconcile.d.ts +34 -0
  22. package/dist/src/commands/_lazy-reconcile.js +102 -0
  23. package/dist/src/commands/_paths.js +1 -1
  24. package/dist/src/commands/_pi-frontend.d.ts +18 -10
  25. package/dist/src/commands/_pi-frontend.js +37 -715
  26. package/dist/src/commands/_pi-install.js +18 -36
  27. package/dist/src/commands/_policy.d.ts +1 -1
  28. package/dist/src/commands/_policy.js +56 -15
  29. package/dist/src/commands/_run-bridge.d.ts +114 -0
  30. package/dist/src/commands/_run-bridge.js +387 -0
  31. package/dist/src/commands/_run-diagnostics.d.ts +9 -0
  32. package/dist/src/commands/_run-diagnostics.js +51 -0
  33. package/dist/src/commands/_run-driver-helpers.d.ts +8 -81
  34. package/dist/src/commands/_run-driver-helpers.js +79 -283
  35. package/dist/src/commands/_run-projection.d.ts +50 -0
  36. package/dist/src/commands/_run-projection.js +349 -0
  37. package/dist/src/commands/_run-subcommands.d.ts +3 -0
  38. package/dist/src/commands/_run-subcommands.js +31 -0
  39. package/dist/src/commands/_spinner.js +1 -1
  40. package/dist/src/commands/agent.d.ts +1 -1
  41. package/dist/src/commands/agent.js +8559 -239
  42. package/dist/src/commands/dist.d.ts +1 -1
  43. package/dist/src/commands/dist.js +27 -19
  44. package/dist/src/commands/doctor.d.ts +1 -1
  45. package/dist/src/commands/doctor.js +93 -475
  46. package/dist/src/commands/github.d.ts +1 -1
  47. package/dist/src/commands/github.js +113 -387
  48. package/dist/src/commands/inbox.d.ts +22 -24
  49. package/dist/src/commands/inbox.js +420 -691
  50. package/dist/src/commands/init.d.ts +6 -16
  51. package/dist/src/commands/init.js +334 -971
  52. package/dist/src/commands/inspect.d.ts +19 -2
  53. package/dist/src/commands/inspect.js +644 -610
  54. package/dist/src/commands/pi.d.ts +1 -1
  55. package/dist/src/commands/plugin.d.ts +1 -1
  56. package/dist/src/commands/plugin.js +486 -7
  57. package/dist/src/commands/profile-and-review.d.ts +1 -1
  58. package/dist/src/commands/profile-and-review.js +94 -56
  59. package/dist/src/commands/queue.js +1 -21
  60. package/dist/src/commands/remote.d.ts +1 -1
  61. package/dist/src/commands/remote.js +837 -14
  62. package/dist/src/commands/repo-git-harness.d.ts +1 -1
  63. package/dist/src/commands/repo-git-harness.js +57 -14
  64. package/dist/src/commands/run.d.ts +20 -2
  65. package/dist/src/commands/run.js +17579 -1759
  66. package/dist/src/commands/server.d.ts +2 -6
  67. package/dist/src/commands/server.js +141 -723
  68. package/dist/src/commands/setup.d.ts +1 -1
  69. package/dist/src/commands/setup.js +102 -484
  70. package/dist/src/commands/stats.d.ts +13 -10
  71. package/dist/src/commands/stats.js +689 -761
  72. package/dist/src/commands/task-run-driver.d.ts +50 -88
  73. package/dist/src/commands/task-run-driver.js +116 -2717
  74. package/dist/src/commands/task.d.ts +34 -13
  75. package/dist/src/commands/task.js +668 -2523
  76. package/dist/src/commands/test.d.ts +1 -1
  77. package/dist/src/commands/triage.d.ts +11 -0
  78. package/dist/src/commands/triage.js +227 -0
  79. package/dist/src/commands/workspace.d.ts +1 -1
  80. package/dist/src/commands.d.ts +0 -16
  81. package/dist/src/commands.js +16657 -12250
  82. package/dist/src/index.js +16528 -12497
  83. package/dist/src/launcher.js +4 -0
  84. package/dist/src/operator-cli.d.ts +2 -0
  85. package/dist/src/operator-cli.js +17837 -0
  86. package/dist/src/operator-entry.d.ts +1 -0
  87. package/dist/src/operator-entry.js +3 -0
  88. package/package.json +18 -12
  89. package/dist/src/app/board.d.ts +0 -23
  90. package/dist/src/app/board.js +0 -1786
  91. package/dist/src/app/theme.d.ts +0 -47
  92. package/dist/src/app/theme.js +0 -150
  93. package/dist/src/commands/_authority-runs.d.ts +0 -22
  94. package/dist/src/commands/_authority-runs.js +0 -110
  95. package/dist/src/commands/_operator-surface.d.ts +0 -34
  96. package/dist/src/commands/_operator-surface.js +0 -220
  97. package/dist/src/commands/_operator-view.d.ts +0 -30
  98. package/dist/src/commands/_operator-view.js +0 -1070
  99. package/dist/src/commands/_preflight.d.ts +0 -22
  100. package/dist/src/commands/_preflight.js +0 -540
  101. package/dist/src/commands/_run-replay.d.ts +0 -24
  102. package/dist/src/commands/_run-replay.js +0 -142
  103. package/dist/src/commands/_server-client.d.ts +0 -186
  104. package/dist/src/commands/_server-client.js +0 -681
  105. package/dist/src/commands/_snapshot-upload.d.ts +0 -39
  106. package/dist/src/commands/_snapshot-upload.js +0 -455
  107. package/dist/src/commands/_task-picker.d.ts +0 -9
  108. package/dist/src/commands/_task-picker.js +0 -201
  109. package/dist/src/commands/browser.d.ts +0 -65
  110. package/dist/src/commands/browser.js +0 -1173
  111. package/dist/src/commands/connect.d.ts +0 -7
  112. package/dist/src/commands/connect.js +0 -419
  113. package/dist/src/commands/inspector.d.ts +0 -3
  114. package/dist/src/commands/inspector.js +0 -263
  115. package/dist/src/commands/task-report-bug.d.ts +0 -19
  116. package/dist/src/commands/task-report-bug.js +0 -1281
  117. package/dist/src/report-bug.d.ts +0 -44
  118. package/dist/src/report-bug.js +0 -260
@@ -6,183 +6,177 @@ function helpCatalog() {
6
6
  }
7
7
  var TOP_LEVEL_SECTIONS = [
8
8
  {
9
- title: "Pi console",
10
- subtitle: "the operator surface \u2014 every attach opens the run's FULL Pi session",
9
+ title: "Open Rig",
10
+ subtitle: "normal UX \u2014 bare rig opens the bundled Rig Cockpit inside OMP",
11
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." }
12
+ { command: "rig", description: "Open Rig Cockpit with OMP collaboration substrate for the current workspace." },
13
+ { command: "rig --workspace <path>", description: "Open Rig Cockpit for another workspace." },
14
+ { command: "/rig", description: "Inside OMP, reopen the Rig Cockpit." },
15
+ { command: "rig join <link>", description: "Join an encrypted OMP collaborative session from another operator." }
18
16
  ]
19
17
  },
20
18
  {
21
- title: "Start here",
22
- subtitle: "one-time setup, pick a server",
19
+ title: "Server",
20
+ subtitle: "select execution placement before reading or dispatching work",
23
21
  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." }
22
+ { command: "Cockpit Server", description: "Select/configure local or remote execution placement and the project-root link." },
23
+ { command: "Server target \u2192 Local", description: "Use local execution placement for the selected project." },
24
+ { command: "Server target \u2192 Remote", description: "Use remote execution placement with the server-host project root preserved." }
27
25
  ]
28
26
  },
29
27
  {
30
- title: "Work",
31
- subtitle: "find a task, put an agent on it, answer what it asks",
28
+ title: "Tasks",
29
+ subtitle: "configured task source on the selected target feeds task detail",
32
30
  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`)." }
31
+ { command: "Cockpit Tasks", description: "List tasks from the selected server target's configured task source." },
32
+ { command: "Task detail", description: "Review task id, title, body, source status, labels, and issue URL before dispatch." },
33
+ { command: "Task detail \u2192 Dispatch", description: "Submit the selected task run through the selected target, then attach the collaborative OMP session." },
34
+ { command: "rig triage", description: "Run the configured issueAnalysis pass once; use cron/launchd/CI to schedule continuous triage." }
38
35
  ]
39
36
  },
40
37
  {
41
- title: "Watch",
42
- subtitle: "fleet metrics and per-task forensics",
38
+ title: "Runs",
39
+ subtitle: "dispatched Rig runs attach through collaborative OMP sessions",
43
40
  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." }
41
+ { command: "OMP Runs screen", description: "Open dispatched runs, collaboration links, cwd, identity, status, and inbox counts." },
42
+ { command: "rig join <link>", description: "Join a shared OMP session without changing execution placement." },
43
+ { command: "OMP collab guest view", description: "Watch the shared transcript live; write links can prompt the originating session." }
47
44
  ]
48
45
  },
49
46
  {
50
- title: "Unblock",
51
- subtitle: "diagnose wiring, fix auth",
47
+ title: "Inbox + Doctor",
48
+ subtitle: "approvals, user prompts, and health checks live inside Rig/OMP",
52
49
  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." }
50
+ { command: "OMP Inbox screen", description: "Review and answer pending approval/user-input workflow entries." },
51
+ { command: "/rig inbox", description: "Open the inbox screen from inside OMP." },
52
+ { command: "OMP Doctor screen", description: "Probe session discovery, collaboration registry, selected target, and workflow-entry health." }
55
53
  ]
56
54
  },
57
55
  {
58
56
  title: "Extend",
59
- subtitle: "plugins contribute validators, hooks, task sources, commands",
57
+ subtitle: "plugins and OMP extensions shape the worker environment",
60
58
  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." }
59
+ { command: "rig.config.ts plugins", description: "Register task sources, validators, hooks, skills, roles, and workflow metadata." },
60
+ { command: "runtime.pi.packages", description: "Declare team-wide OMP/Pi extension packages for sessions and workers." }
63
61
  ]
64
62
  }
65
63
  ];
66
64
  var PRIMARY_GROUPS = [
67
65
  {
68
66
  name: "server",
69
- summary: "Choose, inspect, and start the Rig server that owns tasks and runs.",
70
- usage: ["rig server <status|list|add|use|start> [options]"],
67
+ summary: "Select and configure local vs remote execution placement.",
68
+ usage: ["rig server <status|list|use|add|remove> [options]"],
71
69
  commands: [
72
- { command: "status", description: "Show the selected server 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: "list", description: "List saved local/remote server aliases.", primary: true },
77
- { command: "start [--host <host>] [--port <n>]", description: "Start a local rig-server process." }
70
+ { command: "status", description: "Show the selected placement (local or remote alias) and task source.", primary: true },
71
+ { command: "list", description: "List local plus configured remote endpoints; marks the selected one.", primary: true },
72
+ { command: "use local|<alias>", description: "Select where runs execute \u2014 local, or a configured remote alias.", primary: true },
73
+ { command: "add --alias <a> --host <h> [--port <n>] [--token <t>]", description: "Add a remote SSH endpoint (the same store run dispatch resolves).", primary: true },
74
+ { command: "remove <alias>", description: "Remove a configured remote endpoint." }
78
75
  ],
79
76
  examples: [
80
77
  "rig server status",
81
- "rig server add prod https://where.rig-does.work",
82
- "rig server use prod",
83
- "rig server use local",
84
- "rig server start --port 3773"
78
+ "rig server add --alias prod --host prod.example.com --port 22",
79
+ "rig server use prod"
85
80
  ],
86
- next: ["Use `rig task list` to see server-owned work.", "Use `rig run list` or `rig run attach <id> --follow` to monitor runs."]
81
+ next: [
82
+ "Placement is read by run dispatch (`rig task run` / `rig run <task>`).",
83
+ "The same selection is available in-session on the bare `rig` board."
84
+ ]
87
85
  },
88
86
  {
89
87
  name: "task",
90
- summary: "Find work, start Pi-backed runs, and validate task results.",
91
- usage: ["rig task <list|next|show|run> [options]"],
88
+ summary: "Find work, dispatch task runs, and validate task results.",
89
+ usage: ["rig task <list|next|show|run|ready|validate> [options]"],
92
90
  commands: [
93
- { command: "list [--assignee <login|me|@me>] [--state open|closed]", description: "List tasks from the selected server/source.", primary: true },
94
- { command: "next [filters]", description: "Render the next matching task as a selected-task card.", primary: true },
95
- { command: "show <id>|--task <id> [--raw]", description: "Show a human task summary; --raw prints the full payload.", primary: true },
96
- { command: "run [#<issue>|<task-id>|--next|--task <id>]", description: "Submit a task run; interactive follows with bundled Pi.", primary: true },
91
+ { command: "list [--assignee <login|me|@me>] [--state open|closed]", description: "List tasks from the configured task source.", primary: true },
92
+ { command: "next [filters]", description: "Render the next ready task as a selected-task card.", primary: true },
93
+ { command: "show <id>|--task <id> [--raw]", description: "Show a task summary; --raw prints the full payload.", primary: true },
94
+ { command: "run [#<issue>|<task-id>|--task <id>]", description: "Dispatch the task as a detached run; attach with `rig run attach <run-id>`.", primary: true },
97
95
  { command: "ready", description: "List task IDs that are runnable now." },
98
- { command: "validate|verify [--task <id>]", description: "Run configured task checks/review gates." },
96
+ { command: "validate|verify [--task <id>]", description: "Run the task's configured checks / review gates." },
99
97
  { command: "details --task <id>", description: "Show full task info from the configured source." },
100
98
  { command: "reopen [--task <id> | --all] [--reason <text>]", description: "Reopen closed task(s) in the configured source." },
101
99
  { command: "artifacts|artifact-dir|artifact-write", description: "Inspect or write task artifacts." },
102
- { command: "report-bug", description: "Create a structured bug report/task." }
100
+ { command: "info [--task <id>]", description: "Show the active/selected task's full runtime info." },
101
+ { command: "scope [--files] [--task <id>]", description: "Show the task's scope (and changed files with --files)." },
102
+ { command: "deps [--task <id>]", description: "Show the task's dependency graph." },
103
+ { command: "status", description: "Show project task-tracker progress." },
104
+ { command: "lookup <id>", description: "Resolve a task id to its canonical record path." },
105
+ { command: "record <decision|failure> <text> [--task <id>]", description: "Append a decision or failure note to the task." }
103
106
  ],
104
107
  examples: [
105
108
  "rig task list --assignee @me --limit 20",
106
- "rig task next",
107
109
  "rig task show 123 --raw",
108
- "rig task run --next",
109
- "rig task run #123 --runtime-adapter pi",
110
- "rig task run --title 'Investigate deploy drift' --initial-prompt 'Check server health'"
110
+ "rig task run #123"
111
111
  ],
112
- next: ["Use `--detach` to submit without attaching.", "Use `rig run attach <run-id> --follow` to rejoin a live run."]
112
+ next: ["The same flow is available in-session: run bare `rig`, then Cockpit Tasks \u2192 Task detail \u2192 Dispatch."]
113
113
  },
114
114
  {
115
115
  name: "run",
116
- summary: "Observe, attach to, and control Rig runs. `attach` opens the Pi console \u2014 the full worker session, live.",
117
- usage: ["rig run <list|status|show|attach|steer|stop|resume|restart> [options]"],
116
+ summary: "Observe, attach to, and control runs over the OMP collab substrate.",
117
+ usage: ["rig run <list|status|start|start-serial|start-parallel|show|attach|steer|stop|resume|restart> [options]"],
118
118
  commands: [
119
- { command: "list", description: "List recent runs from the selected server or local state.", primary: true },
120
- { command: "status", description: "Render active and recent run groups.", primary: true },
121
- { command: "show <id>|--run <id> [--raw]", description: "Show a human run summary; --raw prints the full payload.", primary: true },
122
- { 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 },
123
- { 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 },
124
- { command: "stop [<run-id>|--run <id>]", description: "Request stop for one run or local active runs.", primary: true },
125
- { command: "resume [<run-id>]", description: "Resume an interrupted run on the selected server (defaults to the most recent resumable)." },
126
- { command: "restart [<run-id>]", description: "Re-dispatch a run from a clean runtime, reopening its Pi session where possible." },
127
- { command: "timeline --run <id> [--follow]", description: "Stream raw run timeline events (scripts; humans should attach)." },
128
- { 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." },
129
- { command: "delete|cleanup", description: "Remove completed run records/artifacts." }
119
+ { command: "list", description: "List discoverable runs (relay-registry + on-disk OMP run journals).", primary: true },
120
+ { command: "status", description: "Render active vs recent runs from the run journals.", primary: true },
121
+ { command: "start [#<issue>|<task-id>|--next|--task <id>] [--title <t>]", description: "Dispatch one task as a detached run; attach with the printed run id.", primary: true },
122
+ { command: "start-parallel [--limit <n>]", description: "Dispatch all currently-ready tasks as detached runs (limited when requested).", primary: true },
123
+ { command: "start-serial", description: "Dispatch the next ready task only; run again after it finishes to continue serially.", primary: true },
124
+ { command: "show <id>|--run <id> [--raw]", description: "Show a run's folded journal projection; --raw prints JSON.", primary: true },
125
+ { command: "attach <run-id>|--run <id>", description: "Attach to a live run's collab session (resolves the join link).", primary: true },
126
+ { command: "resume [<run-id>]", description: "Re-dispatch the run's task as a fresh detached run." },
127
+ { command: "steer <run-id> --message <text>", description: "Steer a live run via its journal (local runs headless; remote runs attach to steer).", primary: true },
128
+ { command: "stop [<run-id>|--run <id>] [--reason <text>]", description: "Request graceful stop of a live run (local headless; remote attach to stop).", primary: true },
129
+ { command: "replay <run-id>|--run <id> [--with-session]", description: "Print the run's consolidated journal timeline." },
130
+ { command: "delete|cleanup", description: "Remove a finished run's live registry entry." }
130
131
  ],
131
132
  examples: [
132
- "rig run attach <run-id> # full session console \u2014 live mirror, steering, worker shell",
133
- "rig run steer <run-id> --message 'focus on the failing test first'",
134
- "rig run list",
135
- "rig run show <run-id>",
136
- "rig run stop <run-id>"
133
+ "rig run start --next",
134
+ "rig run start-parallel --limit 3",
135
+ "rig run attach <run-id>"
137
136
  ],
138
137
  next: [
139
- "Inside the console: the run's COMPLETE transcript loads on open (finished runs too), and new worker turns stream in live.",
140
- "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.",
141
- "The console is read-write but remote-only: nothing runs on your machine; the worker keeps running when you exit.",
142
- "Use `rig task run --next` to create a new run; interactive mode drops you straight into its console.",
143
- "Use `--json` when scripts need the full structured record."
138
+ "Attach to steer or stop a live run: rig run attach <run-id>.",
139
+ "The same runs appear in-session on the bare `rig` board."
144
140
  ]
145
141
  },
146
142
  {
147
143
  name: "inbox",
148
144
  summary: "Review approval and user-input requests that block worker runs.",
149
- usage: ["rig inbox <approvals|approve|inputs|respond> [options]"],
145
+ usage: ["rig inbox <approvals|inputs|approve|respond> [options]"],
150
146
  commands: [
151
- { command: "approvals [--run <id>] [--task <id>]", description: "List pending approvals.", primary: true },
152
- { command: "inputs [--run <id>] [--task <id>]", description: "List pending user-input requests.", primary: true },
153
- { command: "approve --run <id> --request <id> --decision approve|reject", description: "Resolve an approval request." },
154
- { command: "respond --run <id> --request <id> --answer key=value", description: "Answer a user-input request." }
147
+ { command: "approvals [--run <id>] [--task <id>]", description: "List pending approval requests across runs.", primary: true },
148
+ { command: "inputs [--run <id>] [--task <id>]", description: "List pending user-input requests across runs.", primary: true },
149
+ { command: "approve --run <id> --request <id> --decision approve|reject", description: "Resolve an approval \u2014 delivered over collab, so attach to resolve." },
150
+ { command: "respond --run <id> --request <id> --answer key=value", description: "Answer a user-input request \u2014 attach to resolve." }
155
151
  ],
156
152
  examples: [
157
153
  "rig inbox approvals",
158
- "rig inbox inputs --run <run-id>",
159
- "rig inbox approve --run <run-id> --request <request-id> --decision approve"
154
+ "rig inbox inputs --run <run-id>"
160
155
  ],
161
- next: ["Rejoin the run after resolving a block: `rig run attach <run-id> --follow`."]
156
+ next: ["Resolve a request by attaching to its run: rig run attach <run-id>."]
162
157
  },
163
158
  {
164
159
  name: "stats",
165
160
  summary: "Fleet metrics computed from on-disk run journals (no server required).",
166
161
  usage: ["rig stats [show] [--since <7d|30d|ISO date>]"],
167
162
  commands: [
168
- { command: "show [--since <window>]", description: "Total runs, completion/failure/needs-attention rates, median run time, steering, stalls, approvals.", primary: true }
163
+ { command: "show [--since <window>]", description: "Totals, completion/failure/needs-attention rates, run time, steering, stalls, approvals.", primary: true }
169
164
  ],
170
165
  examples: [
171
- "rig stats",
172
166
  "rig stats --since 7d",
173
- "rig stats --since 2026-06-01 --json"
167
+ "rig stats --json"
174
168
  ],
175
- 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)."]
169
+ next: ["Inspect outliers with `rig run list` and `rig run show <run-id>`."]
176
170
  },
177
171
  {
178
172
  name: "inspect",
179
- summary: "Inspect logs, artifacts, graphs, failures for a task.",
173
+ summary: "Inspect logs, artifacts, failures, graph, and diffs for a task.",
180
174
  usage: ["rig inspect <logs|artifacts|failures|graph|audit|diff> --task <id>"],
181
175
  commands: [
182
- { command: "logs --task <id>", description: "Latest run log for a task (local or selected server).", primary: true },
176
+ { command: "logs --task <id>", description: "Latest run log for a task.", primary: true },
183
177
  { command: "artifacts --task <id>", description: "List the task's completion artifacts.", primary: true },
178
+ { command: "diff --task <id>", description: "List files changed by a task.", primary: true },
184
179
  { command: "failures --task <id>", description: "Recorded failures for a task.", primary: true },
185
- { command: "diff --task <id>", description: "Changed files for a task.", primary: true },
186
180
  { command: "graph", description: "Task dependency graph." },
187
181
  { command: "audit", description: "Controlled-command audit trail." }
188
182
  ],
@@ -212,72 +206,75 @@ var PRIMARY_GROUPS = [
212
206
  },
213
207
  {
214
208
  name: "init",
215
- summary: "Set up Rig for this repo: server, GitHub auth, checkout strategy, task source, and Pi wiring.",
209
+ summary: "Legacy automation-only config bootstrap/repair helper; not root onboarding.",
216
210
  usage: ["rig init [--yes] [--server local|remote] [--repo owner/repo] [--remote-url <url>]"],
217
211
  commands: [
218
- { command: "init", description: "Interactive setup wizard for a new or existing Rig repo.", primary: true },
219
- { command: "init --demo", description: "Offline demo project: files task source + 3 sample tasks, zero GitHub.", primary: true },
220
- { command: "init --yes", description: "Non-interactive setup using detected/default settings.", primary: true },
221
- { command: "init --server remote --remote-url <url>", description: "Link this repo to a remote Rig server.", primary: true },
222
- { command: "init --repair", description: "Repair missing private state without replacing project config." }
212
+ { command: "init", description: "Legacy/fenced setup wizard for compatibility projects; not onboarding.", primary: true },
213
+ { command: "init --demo", description: "Legacy/fenced offline demo project for compatibility tests.", primary: true },
214
+ { command: "init --yes", description: "Legacy/fenced non-interactive setup for old automation.", primary: true },
215
+ { command: "init --server remote --remote-url <url>", description: "Legacy/fenced remote server link setup.", primary: true },
216
+ { command: "init --repair", description: "Legacy/fenced repair of missing private compatibility state." }
223
217
  ],
224
218
  examples: [
225
- "rig init",
226
- "rig init --demo",
227
- "rig init --yes --repo humanity-org/humanwork",
228
- "rig init --server remote --remote-url https://where.rig-does.work --repo owner/repo"
219
+ "rig init --demo # legacy compatibility only",
220
+ "rig init --repair # legacy compatibility only"
229
221
  ],
230
- next: ["After init, run `rig server status`.", "Then use `rig task list` and `rig task run --next` for day-to-day work."]
222
+ next: ["For onboarding and normal UX, run bare `rig`, then use Cockpit Server/Tasks and dispatch from Task detail."]
231
223
  },
232
224
  {
233
225
  name: "doctor",
234
- summary: "Diagnostics for project/server/GitHub/Pi state.",
226
+ summary: "Diagnostic-only compatibility checks; normal health lives in the OMP Doctor screen.",
235
227
  usage: ["rig doctor"],
236
228
  commands: [
237
- { command: "doctor", description: "Run setup and runtime diagnostics.", primary: true },
238
- { command: "check", description: "Compatibility spelling for diagnostics." }
229
+ { command: "doctor", description: "Diagnostic/legacy-only: check compatibility setup/runtime state; not onboarding.", primary: true },
230
+ { command: "check", description: "Diagnostic/legacy-only spelling for compatibility checks." }
239
231
  ],
240
- examples: ["rig doctor", "rig doctor --json"],
241
- next: ["Use `rig server status` and `rig github auth status` to inspect common failure points."]
232
+ examples: ["rig doctor --json # legacy diagnostic automation only"],
233
+ next: ["For normal UX, use the OMP Doctor screen."]
242
234
  },
243
235
  {
244
236
  name: "github",
245
- summary: "GitHub auth helpers for the selected Rig server.",
237
+ summary: "Legacy automation-only GitHub auth helpers for selected compatibility servers.",
246
238
  usage: ["rig github auth <status|import-gh|token>"],
247
239
  commands: [
248
- { command: "auth status", description: "Show GitHub auth state.", primary: true },
249
- { command: "auth import-gh", description: "Import the current `gh` token into the selected server." },
250
- { command: "auth token --token <token>", description: "Store a token on the selected server." }
240
+ { command: "auth status", description: "Legacy automation-only: show GitHub auth state.", primary: true },
241
+ { command: "auth import-gh", description: "Legacy automation-only: import the current `gh` token into the selected server." },
242
+ { command: "auth token --token <token>", description: "Legacy automation-only: store a token on the selected server." }
251
243
  ],
252
- examples: ["rig github auth status", "rig github auth import-gh"],
253
- next: ["After auth is valid, use `rig task run --next`."]
244
+ examples: ["rig github auth status # legacy automation only"],
245
+ next: ["For normal UX, use bare `rig` and the OMP extension cockpit."]
254
246
  }
255
247
  ];
256
248
  var ADVANCED_GROUPS = [
257
- { name: "setup", summary: "Bootstrap/check local setup.", usage: ["rig setup <bootstrap|check|preflight>"], commands: [{ command: "bootstrap|check|preflight", description: "Setup helpers." }] },
258
- { name: "profile", summary: "Runtime profile/model defaults.", usage: ["rig profile <show|set>"], commands: [{ command: "show", description: "Show active profile." }] },
249
+ {
250
+ name: "setup",
251
+ summary: "Legacy automation-only setup bootstrap/check helpers.",
252
+ usage: ["rig setup <bootstrap|check|preflight>"],
253
+ commands: [
254
+ { command: "bootstrap", description: "Legacy automation-only: bootstrap local setup dependencies.", primary: true },
255
+ { command: "check", description: "Legacy automation-only: check local setup state (toolchain, deps, config).", primary: true },
256
+ { command: "preflight", description: "Legacy automation-only: run preflight checks before an old run.", primary: true }
257
+ ]
258
+ },
259
+ {
260
+ name: "profile",
261
+ summary: "Runtime profile/model defaults.",
262
+ usage: ["rig profile <show|set>"],
263
+ commands: [
264
+ { command: "show", description: "Show the active execution profile.", primary: true },
265
+ { command: "set [--model <model>] [--runtime <runtime>] [--plugin <plugin>]", description: "Set model/runtime/plugin profile defaults.", primary: true }
266
+ ]
267
+ },
259
268
  {
260
269
  name: "review",
261
270
  summary: "Inspect or change completion review gate policy.",
262
271
  usage: ["rig review <show|set>"],
263
272
  commands: [
264
273
  { command: "show", description: "Show current review gate settings." },
265
- { command: "set <off|advisory|required> [--provider greptile]", description: "Change review strictness/provider." }
274
+ { command: "set <off|advisory|required> [--provider <provider>]", description: "Change review strictness/provider (e.g. --provider greptile)." }
266
275
  ],
267
276
  examples: ["rig review show", "rig review set required --provider greptile"],
268
- next: ["Use `rig inbox approvals` for blocked run handoffs."]
269
- },
270
- {
271
- name: "browser",
272
- summary: "Browser/app diagnostics for browser-required tasks.",
273
- usage: ["rig browser <help|explain|demo|app|hp-next> [options]"],
274
- commands: [
275
- { command: "help", description: "Rich browser command help (canonical: `rig browser help`)." },
276
- { command: "explain", description: "Explain the browser-required task contract." },
277
- { command: "demo", description: "Run browser demo flows against a local page." },
278
- { command: "app", description: "Launch the Rig Browser workstation app." },
279
- { command: "hp-next <dev|check|e2e|reset>", description: "Drive the hp-next browser test harness." }
280
- ]
277
+ next: ["For normal workflow handoffs, use the OMP Inbox screen."]
281
278
  },
282
279
  {
283
280
  name: "pi",
@@ -292,21 +289,79 @@ var ADVANCED_GROUPS = [
292
289
  examples: ["rig pi search subagents", "rig pi add pi-subagents", "rig pi list"],
293
290
  next: ["Config-managed extensions: declare `runtime: { pi: { packages: [...] } }` in rig.config.ts \u2014 workers pick them up automatically."]
294
291
  },
295
- { name: "queue", summary: "Run task queues locally.", usage: ["rig queue run [options]"], commands: [{ command: "run", description: "Process queue work." }] },
296
- { name: "agent", summary: "Runtime agent workspace helpers.", usage: ["rig agent <list|prepare|run|cleanup>"], commands: [{ command: "list", description: "List prepared agents." }] },
292
+ {
293
+ name: "queue",
294
+ summary: "Run task queues locally.",
295
+ usage: ["rig queue run [--workers <n>] [--max-tasks <n>] [--action validate|verify|pipeline] [--isolation off|worktree] [--no-runtime-reuse] [--fail-fast] [--skip-project-sync]"],
296
+ commands: [
297
+ { 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 }
298
+ ]
299
+ },
300
+ {
301
+ name: "agent",
302
+ summary: "Runtime agent workspace helpers.",
303
+ usage: ["rig agent <list|prepare|run|cleanup>"],
304
+ commands: [
305
+ { command: "list", description: "List prepared agent runtimes.", primary: true },
306
+ { command: "prepare [--id <id>] [--mode <mode>] [--task <task>]", description: "Prepare an isolated agent runtime workspace.", primary: true },
307
+ { command: "run [--id <id>] [--mode <mode>] [--task <task>] [--skip-project-sync]", description: "Prepare (if needed) and run an agent in its workspace.", primary: true },
308
+ { command: "cleanup [--all] [--id <id>]", description: "Remove prepared agent workspaces.", primary: true }
309
+ ]
310
+ },
297
311
  { name: "inspector", summary: "Event stream and drift scanners.", usage: ["rig inspector <stream|scan-upstream-drift>"], commands: [{ command: "stream", description: "Stream events." }] },
298
- { name: "dist", summary: "Build/install packaged Rig CLI.", usage: ["rig dist <build|install|doctor>"], commands: [{ command: "build", description: "Build distribution." }] },
299
- { name: "workspace", summary: "Workspace topology/service helpers.", usage: ["rig workspace <summary|topology|remote-hosts>"], commands: [{ command: "summary", description: "Show workspace summary." }] },
300
- { name: "remote", summary: "Compatibility remote orchestration controls.", usage: ["rig remote <status|watch|pause|resume|...>"], commands: [{ command: "status", description: "Show remote state." }] },
312
+ {
313
+ name: "dist",
314
+ summary: "Build/install packaged Rig CLI.",
315
+ usage: ["rig dist <build|install|doctor|rebuild-agent>"],
316
+ commands: [
317
+ { command: "build [--output-dir <dir>]", description: "Build the distributable Rig CLI.", primary: true },
318
+ { command: "install [--scope <scope>] [--path <path>]", description: "Install the built CLI to a scope/path.", primary: true },
319
+ { command: "doctor", description: "Diagnose the dist toolchain and install state.", primary: true },
320
+ { command: "rebuild-agent", description: "Rebuild the agent runtime image, pruning stale images.", primary: true }
321
+ ]
322
+ },
323
+ {
324
+ name: "workspace",
325
+ summary: "Workspace topology/service helpers.",
326
+ usage: ["rig workspace <summary|topology|remote-hosts|service-fabric>"],
327
+ commands: [
328
+ { command: "summary", description: "Show workspace summary.", primary: true },
329
+ { command: "topology", description: "List discovered workspace services.", primary: true },
330
+ { command: "remote-hosts", description: "List configured remote workspace hosts.", primary: true },
331
+ { command: "service-fabric <status|up|verify|down> [--service <name>]", description: "Inspect or mutate the workspace service fabric.", primary: true }
332
+ ]
333
+ },
334
+ {
335
+ name: "remote",
336
+ summary: "Legacy automation-only remote orchestration controls.",
337
+ usage: ["rig remote <status|tasks|watch|pause|resume|continue|stop|refresh|add-iterations|remove-iterations|endpoint ...>"],
338
+ commands: [
339
+ { command: "status [--remote <alias>]", description: "Legacy automation-only: show old remote orchestration state.", primary: true },
340
+ { command: "tasks [--remote <alias>]", description: "Legacy automation-only: list the old remote's tracked tasks.", primary: true },
341
+ { command: "watch [--remote <alias>] [--seconds <n>] [--event <type>]", description: "Legacy automation-only: stream old remote orchestration events.", primary: true },
342
+ { command: "pause [--remote <alias>]", description: "Legacy automation-only: pause old remote orchestration.", primary: true },
343
+ { command: "resume [--remote <alias>] [--max-workers <n>] [--max-iterations <n>] [--direct-merge]", description: "Legacy automation-only: resume old remote orchestration with optional tuning.", primary: true },
344
+ { command: "continue [--remote <alias>]", description: "Legacy automation-only: continue a paused old remote.", primary: true },
345
+ { command: "stop [--remote <alias>]", description: "Legacy automation-only: stop old remote orchestration.", primary: true },
346
+ { command: "refresh [--remote <alias>]", description: "Legacy automation-only: refresh old remote state.", primary: true },
347
+ { command: "add-iterations [--count <n>] [--remote <alias>]", description: "Legacy automation-only: grant an old remote more iterations.", primary: true },
348
+ { command: "remove-iterations [--count <n>] [--remote <alias>]", description: "Legacy automation-only: reduce an old remote's iteration budget.", primary: true },
349
+ { command: "endpoint list", description: "Legacy automation-only: list configured remote endpoints.", primary: true },
350
+ { command: "endpoint add --alias <alias> --host <host> --port <n> [--token <token>]", description: "Legacy automation-only: register a remote endpoint.", primary: true },
351
+ { command: "endpoint remove --alias <alias>", description: "Legacy automation-only: remove a remote endpoint.", primary: true },
352
+ { command: "endpoint test [--alias <alias>]", description: "Legacy diagnostic-only: test connectivity to a remote endpoint.", primary: true },
353
+ { command: "endpoint doctor", description: "Legacy diagnostic-only: diagnose remote endpoint configuration.", primary: true }
354
+ ]
355
+ },
301
356
  { name: "git", summary: "Pass through to Rig git-flow helper.", usage: ["rig git <args...>"], commands: [{ command: "<args...>", description: "Advanced git flow operations." }] },
302
357
  { name: "harness", summary: "Pass through to runtime harness CLI.", usage: ["rig harness <args...>"], commands: [{ command: "<args...>", description: "Advanced harness operations." }] },
303
358
  { name: "test", summary: "Project test wrappers.", usage: ["rig test <unit|e2e|all>"], commands: [{ command: "all", description: "Run configured project tests." }] }
304
359
  ];
305
360
  var ADVANCED_COMMANDS = [
306
- { command: "rig server task-run ...", description: "Internal server-owned task execution entry point." },
307
- { command: "rig server notify-test [--event <type>]", description: "Internal event notification smoke command." },
308
- { command: "rig run start|start-serial|start-parallel", description: "Local epic queue starters (server-owned tasks use `rig task run ...`)." },
309
- { command: "rig remote orchestrate-*", description: "Compatibility remote orchestration commands." }
361
+ { command: "rig server task-run ...", description: "Internal legacy server-owned task execution entry point." },
362
+ { command: "rig server notify-test [--event <type>]", description: "Internal diagnostic event notification smoke command." },
363
+ { command: "rig run start|start-serial|start-parallel", description: "Dispatch task runs over the current local/remote run substrate." },
364
+ { command: "rig remote orchestrate-*", description: "Legacy automation-only remote orchestration commands." }
310
365
  ];
311
366
  var ALL_GROUPS = [...PRIMARY_GROUPS, ...ADVANCED_GROUPS];
312
367
  function heading(title) {
@@ -325,8 +380,8 @@ function renderRigBanner(version) {
325
380
  y(" \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D") + d(" \u2592\u2591"),
326
381
  y(" \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D "),
327
382
  "",
328
- ` ${c("\u25E2\u25E4")} ${pc.bold("the control rig for autonomous coding agents")} ${m("//")} ${d("you are the operator")}`,
329
- version ? ` ${d(`v${version} \xB7 jack in: rig task run --next`)}` : ` ${d("jack in: rig task run --next")}`
383
+ ` ${c("\u25E2\u25E4")} ${pc.bold("OMP extension cockpit for autonomous coding agents")} ${m("//")} ${d("you are the operator")}`,
384
+ version ? ` ${d(`v${version} \xB7 jack in: rig`)}` : ` ${d("jack in: rig")}`
330
385
  ];
331
386
  return lines.join(`
332
387
  `);
@@ -363,29 +418,32 @@ function renderGroup(group) {
363
418
  }
364
419
  function renderTopLevelHelp() {
365
420
  return [
366
- `${heading("rig")} ${pc.dim("\u2014 server-owned task/run control plane for Pi-backed engineering work")}`,
367
- pc.dim("The loop: pick a task, dispatch an agent, open its Pi console (`rig run attach <id>`) to watch and steer it live, clear inbox gates, merge."),
421
+ `${heading("rig")} ${pc.dim("\u2014 Rig Cockpit for autonomous coding agents")}`,
422
+ pc.dim("The loop: bare `rig` \u2192 Cockpit \u2192 Server target \u2192 Tasks \u2192 Task detail \u2192 Dispatch/Attach; every run uses OMP collaboration as the session substrate."),
368
423
  "",
369
424
  ...TOP_LEVEL_SECTIONS.flatMap((section) => [
370
425
  `${pc.bold(pc.magenta(`\u25C7 ${section.title}`))} \u2014 ${pc.dim(section.subtitle)}`,
371
426
  renderCommandBlock(section.commands),
372
427
  ""
373
428
  ]),
374
- pc.dim("More: `rig help --advanced` for dev/compatibility commands; `rig <group> --help` for rich per-group help; `rig --version` for the installed version."),
429
+ pc.dim("More: `rig help --advanced` for fenced legacy/diagnostic commands; `rig <group> --help` for per-group compatibility help; `rig --version` for the installed version."),
375
430
  "",
376
- pc.bold("Global options"),
377
- commandLine("--project <path>", "Use a project root instead of auto-discovery."),
378
- commandLine("--json", "Emit structured output for scripts/agents."),
379
- commandLine("--dry-run", "Print the command plan without mutating state.")
431
+ pc.bold("Root options"),
432
+ commandLine("--workspace <path>", "Open Rig Cockpit for a workspace instead of the current directory."),
433
+ commandLine("--json", "Compatibility flag for fenced legacy/diagnostic subcommands."),
434
+ commandLine("--dry-run", "Compatibility flag for fenced legacy/diagnostic subcommands.")
380
435
  ].join(`
381
436
  `).trimEnd();
382
437
  }
383
438
  function renderAdvancedHelp() {
384
439
  return [
385
- `${heading("rig advanced")} \u2014 compatibility, diagnostics, and internal surfaces`,
440
+ `${heading("rig advanced")} \u2014 fenced legacy compatibility, diagnostics, and internal surfaces`,
441
+ "",
442
+ pc.bold("Normal public UX"),
443
+ " rig, rig --workspace <path>, rig join <collab-link>, and /rig inside OMP",
386
444
  "",
387
- pc.bold("Primary groups"),
388
- " init, server, task, run, inbox, repo, plugin, inspect, stats, doctor, github",
445
+ pc.bold("Legacy/diagnostic groups"),
446
+ " init, server, task, run, inbox, inspect, stats, doctor, github, setup, remote",
389
447
  "",
390
448
  pc.bold("Advanced commands"),
391
449
  ...ADVANCED_COMMANDS.map((entry) => commandLine(entry.command, entry.description)),
@@ -393,7 +451,7 @@ function renderAdvancedHelp() {
393
451
  pc.bold("Advanced groups"),
394
452
  ...ADVANCED_GROUPS.map((group) => commandLine(group.name, group.summary)),
395
453
  "",
396
- pc.dim("All groups remain callable. Prefer `rig server`, `rig task`, `rig run`, and `rig inbox` for day-to-day work.")
454
+ pc.dim("Legacy groups remain callable for old automation and diagnostics. Prefer bare `rig` and the OMP cockpit for day-to-day work.")
397
455
  ].join(`
398
456
  `);
399
457
  }
@@ -404,11 +462,13 @@ function renderGroupHelp(groupName) {
404
462
  function listHelpGroups() {
405
463
  return ALL_GROUPS.map((group) => group.name);
406
464
  }
407
- function suggestGroupCommandForWord(word) {
465
+ function suggestGroupCommandForWord(word, liveGroups) {
408
466
  const normalized = word.trim().toLowerCase();
409
467
  if (!normalized)
410
468
  return null;
411
469
  for (const group of ALL_GROUPS) {
470
+ if (liveGroups && !liveGroups.has(group.name))
471
+ continue;
412
472
  for (const entry of group.commands) {
413
473
  const firstToken = entry.command.split(/\s+/)[0] ?? "";
414
474
  const names = firstToken.split("|").map((name) => name.trim().toLowerCase());