@h-rig/cli 0.0.6-alpha.74 → 0.0.6-alpha.76
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/rig.js +4657 -4206
- package/dist/src/commands/_help-catalog.js +32 -14
- package/dist/src/commands/_operator-board.js +730 -0
- package/dist/src/commands/_operator-view.js +98 -92
- package/dist/src/commands/_pi-frontend.js +134 -4
- package/dist/src/commands/_server-client.js +14 -0
- package/dist/src/commands/_tui-theme.js +135 -0
- package/dist/src/commands/run.js +98 -92
- package/dist/src/commands/stats.js +32 -14
- package/dist/src/commands/task.js +40 -18
- package/dist/src/commands.js +4667 -4216
- package/dist/src/index.js +4667 -4216
- package/package.json +9 -8
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
import { intro, log, note, outro } from "@clack/prompts";
|
|
4
4
|
import pc from "picocolors";
|
|
5
5
|
var TOP_LEVEL_SECTIONS = [
|
|
6
|
+
{
|
|
7
|
+
title: "Pi console",
|
|
8
|
+
subtitle: "the operator surface \u2014 every attach opens the run's FULL Pi session",
|
|
9
|
+
commands: [
|
|
10
|
+
{ command: "rig run attach <run-id>", description: "Open the run's Pi console: complete transcript (live AND finished runs), worker turns streaming in live." },
|
|
11
|
+
{ 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." },
|
|
12
|
+
{ command: "!<command>", description: "Inside the console, runs shell in the WORKER's workspace; output streams back into the transcript." },
|
|
13
|
+
{ command: "/<command>", description: "The palette includes the WORKER session's slash commands ([worker]-tagged) next to /rig." },
|
|
14
|
+
{ command: "/rig abort | /rig stop", description: "Abort the worker's current turn, or stop the whole run, from inside the console." },
|
|
15
|
+
{ command: "rig run steer <id> --message <text>", description: "Steer without attaching \u2014 queue a message; the worker picks it up within seconds." }
|
|
16
|
+
]
|
|
17
|
+
},
|
|
6
18
|
{
|
|
7
19
|
title: "Start here",
|
|
8
20
|
subtitle: "one-time setup, pick a server",
|
|
@@ -17,9 +29,9 @@ var TOP_LEVEL_SECTIONS = [
|
|
|
17
29
|
subtitle: "find a task, put an agent on it, answer what it asks",
|
|
18
30
|
commands: [
|
|
19
31
|
{ command: "rig task list", description: "What's on the board (from the selected source/server)." },
|
|
20
|
-
{ command: "rig task run --next", description: "Dispatch an agent; interactive mode
|
|
32
|
+
{ command: "rig task run --next", description: "Dispatch an agent on the next ready task; interactive mode drops you into its Pi console." },
|
|
21
33
|
{ command: "rig run status", description: "Active and recent runs at a glance." },
|
|
22
|
-
{ command: "rig run attach <id> --follow", description: "
|
|
34
|
+
{ command: "rig run attach <id> --follow", description: "Same as plain attach \u2014 the Pi console is always the interactive surface." },
|
|
23
35
|
{ command: "rig inbox approvals", description: "Approvals workers are waiting on (then `rig inbox approve \u2026`)." }
|
|
24
36
|
]
|
|
25
37
|
},
|
|
@@ -98,29 +110,35 @@ var PRIMARY_GROUPS = [
|
|
|
98
110
|
},
|
|
99
111
|
{
|
|
100
112
|
name: "run",
|
|
101
|
-
summary: "Observe, attach to, and control Rig runs.",
|
|
102
|
-
usage: ["rig run <list|status|show|attach|stop> [options]"],
|
|
113
|
+
summary: "Observe, attach to, and control Rig runs. `attach` opens the Pi console \u2014 the full worker session, live.",
|
|
114
|
+
usage: ["rig run <list|status|show|attach|steer|stop|resume|restart> [options]"],
|
|
103
115
|
commands: [
|
|
104
116
|
{ command: "list", description: "List recent runs from the selected server or local state.", primary: true },
|
|
105
117
|
{ command: "status", description: "Render active and recent run groups.", primary: true },
|
|
106
118
|
{ command: "show <id>|--run <id> [--raw]", description: "Show a human run summary; --raw prints the full payload.", primary: true },
|
|
107
|
-
{ command: "attach <run-id>|--run <id>
|
|
119
|
+
{ 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 },
|
|
120
|
+
{ 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 },
|
|
108
121
|
{ command: "stop [<run-id>|--run <id>]", description: "Request stop for one run or local active runs.", primary: true },
|
|
109
|
-
{ command: "
|
|
110
|
-
{ command: "
|
|
122
|
+
{ command: "resume [<run-id>]", description: "Resume an interrupted run on the selected server (defaults to the most recent resumable)." },
|
|
123
|
+
{ command: "restart [<run-id>]", description: "Re-dispatch a run from a clean runtime, reopening its Pi session where possible." },
|
|
124
|
+
{ command: "timeline --run <id> [--follow]", description: "Stream raw run timeline events (scripts; humans should attach)." },
|
|
111
125
|
{ 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." },
|
|
112
|
-
{ command: "resume", description: "Resume the most recent interrupted local run." },
|
|
113
|
-
{ command: "restart", description: "Restart the most recent local run from a clean runtime." },
|
|
114
126
|
{ command: "delete|cleanup", description: "Remove completed run records/artifacts." }
|
|
115
127
|
],
|
|
116
128
|
examples: [
|
|
129
|
+
"rig run attach <run-id> # full session console \u2014 live mirror, steering, worker shell",
|
|
130
|
+
"rig run steer <run-id> --message 'focus on the failing test first'",
|
|
117
131
|
"rig run list",
|
|
118
|
-
"rig run status",
|
|
119
132
|
"rig run show <run-id>",
|
|
120
|
-
"rig run attach <run-id> --follow",
|
|
121
133
|
"rig run stop <run-id>"
|
|
122
134
|
],
|
|
123
|
-
next: [
|
|
135
|
+
next: [
|
|
136
|
+
"Inside the console: the run's COMPLETE transcript loads on open (finished runs too), and new worker turns stream in live.",
|
|
137
|
+
"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.",
|
|
138
|
+
"The console is read-write but remote-only: nothing runs on your machine; the worker keeps running when you exit.",
|
|
139
|
+
"Use `rig task run --next` to create a new run; interactive mode drops you straight into its console.",
|
|
140
|
+
"Use `--json` when scripts need the full structured record."
|
|
141
|
+
]
|
|
124
142
|
},
|
|
125
143
|
{
|
|
126
144
|
name: "inbox",
|
|
@@ -343,7 +361,7 @@ function renderGroup(group) {
|
|
|
343
361
|
function renderTopLevelHelp() {
|
|
344
362
|
return [
|
|
345
363
|
`${heading("rig")} ${pc.dim("\u2014 server-owned task/run control plane for Pi-backed engineering work")}`,
|
|
346
|
-
pc.dim("
|
|
364
|
+
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."),
|
|
347
365
|
"",
|
|
348
366
|
...TOP_LEVEL_SECTIONS.flatMap((section) => [
|
|
349
367
|
`${pc.bold(pc.magenta(`\u25C7 ${section.title}`))} \u2014 ${pc.dim(section.subtitle)}`,
|
|
@@ -430,7 +448,7 @@ function printTopLevelHelp(state = {}) {
|
|
|
430
448
|
commandLine("--dry-run", "Print the command plan without mutating state.")
|
|
431
449
|
].join(`
|
|
432
450
|
`), "Global options");
|
|
433
|
-
outro("init \u2192 task run \u2192 watch \u2192 inbox \u2192 merged.");
|
|
451
|
+
outro("init \u2192 task run \u2192 attach (Pi console: watch + steer live) \u2192 inbox \u2192 merged.");
|
|
434
452
|
}
|
|
435
453
|
function printAdvancedHelp() {
|
|
436
454
|
if (!shouldUseClackOutput()) {
|