@h-rig/cli 0.0.6-alpha.75 → 0.0.6-alpha.77

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.
@@ -513,6 +513,19 @@ async function resumeRunViaServer(context, runId, options) {
513
513
  }
514
514
  return { ok: true, runId: targetRunId, ...record };
515
515
  }
516
+ async function resolveServerConnectionLabel(projectRoot) {
517
+ try {
518
+ const selected = resolveSelectedConnection(projectRoot);
519
+ if (!selected)
520
+ return "no server selected";
521
+ if (selected.connection.kind === "remote") {
522
+ return selected.connection.baseUrl.replace(/^https?:\/\//, "");
523
+ }
524
+ return `local (${selected.alias})`;
525
+ } catch {
526
+ return "no server selected";
527
+ }
528
+ }
516
529
  async function stopRunViaServer(context, runId) {
517
530
  const payload = await requestServerJson(context, "/api/runs/stop", {
518
531
  method: "POST",
@@ -640,6 +653,7 @@ export {
640
653
  runRunPiCommandViaServer,
641
654
  resumeRunViaServer,
642
655
  respondRunPiExtensionUiViaServer,
656
+ resolveServerConnectionLabel,
643
657
  requestServerJson,
644
658
  registerProjectViaServer,
645
659
  prepareRemoteCheckoutViaServer,
@@ -0,0 +1,135 @@
1
+ // @bun
2
+ // packages/cli/src/commands/_tui-theme.ts
3
+ var RIG_PALETTE = {
4
+ ink: "#f2f3f6",
5
+ ink2: "#aeb0ba",
6
+ ink3: "#6c6e79",
7
+ ink4: "#44464f",
8
+ accent: "#ccff4d",
9
+ accentDim: "#a9d63f",
10
+ cyan: "#56d8ff",
11
+ red: "#ff5d5d",
12
+ yellow: "#ffd24d"
13
+ };
14
+ function hexToRgb(hex) {
15
+ const value = hex.replace("#", "");
16
+ return [
17
+ Number.parseInt(value.slice(0, 2), 16),
18
+ Number.parseInt(value.slice(2, 4), 16),
19
+ Number.parseInt(value.slice(4, 6), 16)
20
+ ];
21
+ }
22
+ function fg(hex) {
23
+ const [r, g, b] = hexToRgb(hex);
24
+ return (text) => `\x1B[38;2;${r};${g};${b}m${text}\x1B[39m`;
25
+ }
26
+ var ink = fg(RIG_PALETTE.ink);
27
+ var ink2 = fg(RIG_PALETTE.ink2);
28
+ var ink3 = fg(RIG_PALETTE.ink3);
29
+ var ink4 = fg(RIG_PALETTE.ink4);
30
+ var accent = fg(RIG_PALETTE.accent);
31
+ var accentDim = fg(RIG_PALETTE.accentDim);
32
+ var cyan = fg(RIG_PALETTE.cyan);
33
+ var red = fg(RIG_PALETTE.red);
34
+ var yellow = fg(RIG_PALETTE.yellow);
35
+ function bold(text) {
36
+ return `\x1B[1m${text}\x1B[22m`;
37
+ }
38
+ function statusColor(status) {
39
+ switch (status) {
40
+ case "running":
41
+ return accent;
42
+ case "preparing":
43
+ case "created":
44
+ case "validating":
45
+ case "reviewing":
46
+ case "closing-out":
47
+ return cyan;
48
+ case "needs-attention":
49
+ case "needs_attention":
50
+ return yellow;
51
+ case "failed":
52
+ return red;
53
+ default:
54
+ return ink3;
55
+ }
56
+ }
57
+ var RIG_SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
58
+ var DRONE_ART = [
59
+ " .-=-. .-=-. ",
60
+ " ( !!! ) ( !!! ) ",
61
+ " '-=-'._ _.'-=-' ",
62
+ " '._ _.' ",
63
+ " '=$$$$$$$=.' ",
64
+ " =$$$$$$$$$$$= ",
65
+ " $$$@@@@@@@@@@$$$ ",
66
+ " $$$@@ @@$$$ ",
67
+ " $$@ ? @$$$ ",
68
+ " $$$@ '-' @$$$ ",
69
+ " $$$@@ @@$$$ ",
70
+ " $$$@@@@@@@@@@$$$ ",
71
+ " =$$$$$$$$$$$= ",
72
+ " '=$$$$$$$=.' ",
73
+ " _.' '._ ",
74
+ " .-=-.' '.-=-. ",
75
+ " ( !!! ) ( !!! ) ",
76
+ " '-=-' '-=-' "
77
+ ];
78
+ var BLADE_FRAMES = ["---", "\\\\\\", "|||", "///"];
79
+ var EYE_FRAMES = ["@", "o", "."];
80
+ function droneCharColor(char) {
81
+ if (char === "$" || char === "@")
82
+ return accent;
83
+ if (char === "=" || char === "%")
84
+ return accentDim;
85
+ if (char === "\\" || char === "/")
86
+ return ink3;
87
+ return ink4;
88
+ }
89
+ function renderDroneFrame(tick) {
90
+ const blade = BLADE_FRAMES[Math.floor(tick / 4) % BLADE_FRAMES.length];
91
+ const pulse = Math.sin(tick * 0.07);
92
+ const eye = pulse > 0.45 ? EYE_FRAMES[0] : pulse > -0.1 ? EYE_FRAMES[1] : EYE_FRAMES[2];
93
+ return DRONE_ART.map((line) => {
94
+ let out = "";
95
+ let index = 0;
96
+ while (index < line.length) {
97
+ if (line.startsWith("!!!", index)) {
98
+ out += cyan(blade);
99
+ index += 3;
100
+ continue;
101
+ }
102
+ const char = line[index];
103
+ if (char === "?") {
104
+ out += bold(cyan(eye));
105
+ } else if (char !== " ") {
106
+ out += droneCharColor(char)(char);
107
+ } else {
108
+ out += " ";
109
+ }
110
+ index += 1;
111
+ }
112
+ return out;
113
+ });
114
+ }
115
+ var DRONE_WIDTH = DRONE_ART[0].length;
116
+ var DRONE_HEIGHT = DRONE_ART.length;
117
+ export {
118
+ yellow,
119
+ statusColor,
120
+ renderDroneFrame,
121
+ red,
122
+ ink4,
123
+ ink3,
124
+ ink2,
125
+ ink,
126
+ fg,
127
+ cyan,
128
+ bold,
129
+ accentDim,
130
+ accent,
131
+ RIG_SPINNER_FRAMES,
132
+ RIG_PALETTE,
133
+ DRONE_WIDTH,
134
+ DRONE_HEIGHT
135
+ };
@@ -117,6 +117,66 @@ function writeRepoConnection(projectRoot, state) {
117
117
  // packages/cli/src/commands/_cli-format.ts
118
118
  import { log, note } from "@clack/prompts";
119
119
  import pc from "picocolors";
120
+
121
+ // packages/cli/src/commands/_tui-theme.ts
122
+ var RIG_PALETTE = {
123
+ ink: "#f2f3f6",
124
+ ink2: "#aeb0ba",
125
+ ink3: "#6c6e79",
126
+ ink4: "#44464f",
127
+ accent: "#ccff4d",
128
+ accentDim: "#a9d63f",
129
+ cyan: "#56d8ff",
130
+ red: "#ff5d5d",
131
+ yellow: "#ffd24d"
132
+ };
133
+ function hexToRgb(hex) {
134
+ const value = hex.replace("#", "");
135
+ return [
136
+ Number.parseInt(value.slice(0, 2), 16),
137
+ Number.parseInt(value.slice(2, 4), 16),
138
+ Number.parseInt(value.slice(4, 6), 16)
139
+ ];
140
+ }
141
+ function fg(hex) {
142
+ const [r, g, b] = hexToRgb(hex);
143
+ return (text) => `\x1B[38;2;${r};${g};${b}m${text}\x1B[39m`;
144
+ }
145
+ var ink = fg(RIG_PALETTE.ink);
146
+ var ink2 = fg(RIG_PALETTE.ink2);
147
+ var ink3 = fg(RIG_PALETTE.ink3);
148
+ var ink4 = fg(RIG_PALETTE.ink4);
149
+ var accent = fg(RIG_PALETTE.accent);
150
+ var accentDim = fg(RIG_PALETTE.accentDim);
151
+ var cyan = fg(RIG_PALETTE.cyan);
152
+ var red = fg(RIG_PALETTE.red);
153
+ var yellow = fg(RIG_PALETTE.yellow);
154
+ var DRONE_ART = [
155
+ " .-=-. .-=-. ",
156
+ " ( !!! ) ( !!! ) ",
157
+ " '-=-'._ _.'-=-' ",
158
+ " '._ _.' ",
159
+ " '=$$$$$$$=.' ",
160
+ " =$$$$$$$$$$$= ",
161
+ " $$$@@@@@@@@@@$$$ ",
162
+ " $$$@@ @@$$$ ",
163
+ " $$@ ? @$$$ ",
164
+ " $$$@ '-' @$$$ ",
165
+ " $$$@@ @@$$$ ",
166
+ " $$$@@@@@@@@@@$$$ ",
167
+ " =$$$$$$$$$$$= ",
168
+ " '=$$$$$$$=.' ",
169
+ " _.' '._ ",
170
+ " .-=-.' '.-=-. ",
171
+ " ( !!! ) ( !!! ) ",
172
+ " '-=-' '-=-' "
173
+ ];
174
+ var DRONE_WIDTH = DRONE_ART[0].length;
175
+ var DRONE_HEIGHT = DRONE_ART.length;
176
+
177
+ // packages/cli/src/commands/_cli-format.ts
178
+ var themeDim = (value) => ink3(value);
179
+ var themeFaint = (value) => ink4(value);
120
180
  function truncate(value, width) {
121
181
  if (value.length <= width)
122
182
  return value;
@@ -129,32 +189,32 @@ function pad(value, width) {
129
189
  }
130
190
  function statusColor(status) {
131
191
  const normalized = status.toLowerCase();
132
- if (["completed", "merged", "closed", "done", "accepted", "pass", "selected", "approved"].includes(normalized))
133
- return pc.green;
192
+ if (["completed", "merged", "closed", "done", "accepted", "pass", "selected", "approved", "running"].includes(normalized))
193
+ return accent;
134
194
  if (["failed", "needs_attention", "needs-attention", "blocked", "error", "rejected"].includes(normalized))
135
- return pc.red;
136
- if (["running", "reviewing", "validating", "in_progress", "in-progress", "remote"].includes(normalized))
137
- return pc.cyan;
138
- if (["ready", "open", "queued", "created", "preparing", "local", "pending"].includes(normalized))
139
- return pc.yellow;
140
- return pc.dim;
195
+ return red;
196
+ if (["reviewing", "validating", "in_progress", "in-progress", "remote", "preparing", "closing-out"].includes(normalized))
197
+ return cyan;
198
+ if (["ready", "open", "queued", "created", "local", "pending"].includes(normalized))
199
+ return yellow;
200
+ return themeDim;
141
201
  }
142
202
  function formatStatusPill(status) {
143
203
  const label = status || "unknown";
144
204
  return statusColor(label)(`\u25CF ${label}`);
145
205
  }
146
206
  function formatSection(title, subtitle) {
147
- return `${pc.bold(pc.cyan("\u25C6"))} ${pc.bold(title)}${subtitle ? pc.dim(` \u2014 ${subtitle}`) : ""}`;
207
+ return `${pc.bold(accent("\u25C6"))} ${pc.bold(title)}${subtitle ? themeDim(` \u2014 ${subtitle}`) : ""}`;
148
208
  }
149
209
  function formatSuccessCard(title, rows = []) {
150
- const body = rows.filter(([, value]) => value !== undefined && value !== null && String(value).length > 0).map(([key, value]) => `${pc.dim("\u2502")} ${pc.dim(key.padEnd(12))} ${value}`);
210
+ const body = rows.filter(([, value]) => value !== undefined && value !== null && String(value).length > 0).map(([key, value]) => `${themeFaint("\u2502")} ${themeDim(key.padEnd(12))} ${value}`);
151
211
  return [formatSection(title), ...body].join(`
152
212
  `);
153
213
  }
154
214
  function formatNextSteps(steps) {
155
215
  if (steps.length === 0)
156
216
  return [];
157
- return [pc.bold("Next"), ...steps.map((step) => `${pc.dim("\u203A")} ${step}`)];
217
+ return [pc.bold("Next"), ...steps.map((step) => `${accent("\u203A")} ${step}`)];
158
218
  }
159
219
  function formatConnectionList(connections) {
160
220
  const rows = [["local", { kind: "local", mode: "auto" }], ...Object.entries(connections)];
@@ -172,9 +232,9 @@ function formatConnectionStatus(selected, connections) {
172
232
  const target = !connection ? "not configured" : connection.kind === "remote" ? connection.baseUrl : "local";
173
233
  return [
174
234
  formatSection("Rig server", "selected for this repo"),
175
- `${pc.dim("\u2502")} ${pc.dim("selected ")} ${pc.bold(selected)}`,
176
- `${pc.dim("\u2502")} ${pc.dim("kind ")} ${formatStatusPill(connection?.kind ?? "unknown")}`,
177
- `${pc.dim("\u2502")} ${pc.dim("target ")} ${target ?? "not configured"}`,
235
+ `${themeFaint("\u2502")} ${themeDim("selected ")} ${pc.bold(selected)}`,
236
+ `${themeFaint("\u2502")} ${themeDim("kind ")} ${formatStatusPill(connection?.kind ?? "unknown")}`,
237
+ `${themeFaint("\u2502")} ${themeDim("target ")} ${target ?? "not configured"}`,
178
238
  "",
179
239
  ...formatNextSteps(["Change: `rig server use <alias|local>`", "List saved servers: `rig server list`"])
180
240
  ].join(`
@@ -44,21 +44,81 @@ Usage: ${usage}`);
44
44
  // packages/cli/src/commands/_cli-format.ts
45
45
  import { log, note } from "@clack/prompts";
46
46
  import pc from "picocolors";
47
+
48
+ // packages/cli/src/commands/_tui-theme.ts
49
+ var RIG_PALETTE = {
50
+ ink: "#f2f3f6",
51
+ ink2: "#aeb0ba",
52
+ ink3: "#6c6e79",
53
+ ink4: "#44464f",
54
+ accent: "#ccff4d",
55
+ accentDim: "#a9d63f",
56
+ cyan: "#56d8ff",
57
+ red: "#ff5d5d",
58
+ yellow: "#ffd24d"
59
+ };
60
+ function hexToRgb(hex) {
61
+ const value = hex.replace("#", "");
62
+ return [
63
+ Number.parseInt(value.slice(0, 2), 16),
64
+ Number.parseInt(value.slice(2, 4), 16),
65
+ Number.parseInt(value.slice(4, 6), 16)
66
+ ];
67
+ }
68
+ function fg(hex) {
69
+ const [r, g, b] = hexToRgb(hex);
70
+ return (text) => `\x1B[38;2;${r};${g};${b}m${text}\x1B[39m`;
71
+ }
72
+ var ink = fg(RIG_PALETTE.ink);
73
+ var ink2 = fg(RIG_PALETTE.ink2);
74
+ var ink3 = fg(RIG_PALETTE.ink3);
75
+ var ink4 = fg(RIG_PALETTE.ink4);
76
+ var accent = fg(RIG_PALETTE.accent);
77
+ var accentDim = fg(RIG_PALETTE.accentDim);
78
+ var cyan = fg(RIG_PALETTE.cyan);
79
+ var red = fg(RIG_PALETTE.red);
80
+ var yellow = fg(RIG_PALETTE.yellow);
81
+ var DRONE_ART = [
82
+ " .-=-. .-=-. ",
83
+ " ( !!! ) ( !!! ) ",
84
+ " '-=-'._ _.'-=-' ",
85
+ " '._ _.' ",
86
+ " '=$$$$$$$=.' ",
87
+ " =$$$$$$$$$$$= ",
88
+ " $$$@@@@@@@@@@$$$ ",
89
+ " $$$@@ @@$$$ ",
90
+ " $$@ ? @$$$ ",
91
+ " $$$@ '-' @$$$ ",
92
+ " $$$@@ @@$$$ ",
93
+ " $$$@@@@@@@@@@$$$ ",
94
+ " =$$$$$$$$$$$= ",
95
+ " '=$$$$$$$=.' ",
96
+ " _.' '._ ",
97
+ " .-=-.' '.-=-. ",
98
+ " ( !!! ) ( !!! ) ",
99
+ " '-=-' '-=-' "
100
+ ];
101
+ var DRONE_WIDTH = DRONE_ART[0].length;
102
+ var DRONE_HEIGHT = DRONE_ART.length;
103
+
104
+ // packages/cli/src/commands/_cli-format.ts
105
+ var themeDim = (value) => ink3(value);
106
+ var themeFaint = (value) => ink4(value);
47
107
  function stringField(record, key, fallback = "") {
48
108
  const value = record[key];
49
109
  return typeof value === "string" && value.trim() ? value.trim() : fallback;
50
110
  }
51
111
  function statusColor(status) {
52
112
  const normalized = status.toLowerCase();
53
- if (["completed", "merged", "closed", "done", "accepted", "pass", "selected", "approved"].includes(normalized))
54
- return pc.green;
113
+ if (["completed", "merged", "closed", "done", "accepted", "pass", "selected", "approved", "running"].includes(normalized))
114
+ return accent;
55
115
  if (["failed", "needs_attention", "needs-attention", "blocked", "error", "rejected"].includes(normalized))
56
- return pc.red;
57
- if (["running", "reviewing", "validating", "in_progress", "in-progress", "remote"].includes(normalized))
58
- return pc.cyan;
59
- if (["ready", "open", "queued", "created", "preparing", "local", "pending"].includes(normalized))
60
- return pc.yellow;
61
- return pc.dim;
116
+ return red;
117
+ if (["reviewing", "validating", "in_progress", "in-progress", "remote", "preparing", "closing-out"].includes(normalized))
118
+ return cyan;
119
+ if (["ready", "open", "queued", "created", "local", "pending"].includes(normalized))
120
+ return yellow;
121
+ return themeDim;
62
122
  }
63
123
  function firstString(record, keys, fallback = "") {
64
124
  for (const key of keys) {
@@ -89,19 +149,19 @@ function formatStatusPill(status) {
89
149
  return statusColor(label)(`\u25CF ${label}`);
90
150
  }
91
151
  function formatSection(title, subtitle) {
92
- return `${pc.bold(pc.cyan("\u25C6"))} ${pc.bold(title)}${subtitle ? pc.dim(` \u2014 ${subtitle}`) : ""}`;
152
+ return `${pc.bold(accent("\u25C6"))} ${pc.bold(title)}${subtitle ? themeDim(` \u2014 ${subtitle}`) : ""}`;
93
153
  }
94
154
  function formatNextSteps(steps) {
95
155
  if (steps.length === 0)
96
156
  return [];
97
- return [pc.bold("Next"), ...steps.map((step) => `${pc.dim("\u203A")} ${step}`)];
157
+ return [pc.bold("Next"), ...steps.map((step) => `${accent("\u203A")} ${step}`)];
98
158
  }
99
159
  function formatInboxList(kind, entries) {
100
160
  const title = kind === "approvals" ? "Approval inbox" : "Input inbox";
101
161
  if (entries.length === 0) {
102
162
  return [
103
163
  formatSection(title, "empty"),
104
- pc.dim(kind === "approvals" ? "No pending approvals." : "No pending user-input requests."),
164
+ themeDim(kind === "approvals" ? "No pending approvals." : "No pending user-input requests."),
105
165
  "",
106
166
  ...formatNextSteps(["Check runs: `rig run status`", "Start work: `rig task run --next`"])
107
167
  ].join(`
@@ -115,8 +175,8 @@ function formatInboxList(kind, entries) {
115
175
  const requestId = requestIdOf(record);
116
176
  const status = firstString(record, ["status", "state"], "pending");
117
177
  const prompt = firstString(record, ["prompt", "message", "reason", "title", "summary"], kind === "approvals" ? "Approval requested" : "Input requested");
118
- lines.push(`${pc.dim("\u2502")} ${pc.bold(requestId)} ${formatStatusPill(status)} ${prompt}`);
119
- lines.push(`${pc.dim("\u2502")} ${pc.dim("run ")} ${runId || "(unknown-run)"}${taskId ? pc.dim(` task ${taskId}`) : ""}`);
178
+ lines.push(`${themeFaint("\u2502")} ${pc.bold(requestId)} ${formatStatusPill(status)} ${prompt}`);
179
+ lines.push(`${themeFaint("\u2502")} ${themeDim("run ")} ${runId || "(unknown-run)"}${taskId ? themeDim(` task ${taskId}`) : ""}`);
120
180
  }
121
181
  lines.push("", ...formatNextSteps(kind === "approvals" ? ["Resolve: `rig inbox approve --run <run-id> --request <request-id> --decision approve|reject`", "Rejoin: `rig run attach <run-id> --follow`"] : ["Respond: `rig inbox respond --run <run-id> --request <request-id> --answer key=value`", "Rejoin: `rig run attach <run-id> --follow`"]));
122
182
  return lines.join(`
@@ -1127,6 +1127,66 @@ async function attachRunOperatorView(context, input) {
1127
1127
  // packages/cli/src/commands/_cli-format.ts
1128
1128
  import { log, note } from "@clack/prompts";
1129
1129
  import pc2 from "picocolors";
1130
+
1131
+ // packages/cli/src/commands/_tui-theme.ts
1132
+ var RIG_PALETTE = {
1133
+ ink: "#f2f3f6",
1134
+ ink2: "#aeb0ba",
1135
+ ink3: "#6c6e79",
1136
+ ink4: "#44464f",
1137
+ accent: "#ccff4d",
1138
+ accentDim: "#a9d63f",
1139
+ cyan: "#56d8ff",
1140
+ red: "#ff5d5d",
1141
+ yellow: "#ffd24d"
1142
+ };
1143
+ function hexToRgb(hex) {
1144
+ const value = hex.replace("#", "");
1145
+ return [
1146
+ Number.parseInt(value.slice(0, 2), 16),
1147
+ Number.parseInt(value.slice(2, 4), 16),
1148
+ Number.parseInt(value.slice(4, 6), 16)
1149
+ ];
1150
+ }
1151
+ function fg(hex) {
1152
+ const [r, g, b] = hexToRgb(hex);
1153
+ return (text2) => `\x1B[38;2;${r};${g};${b}m${text2}\x1B[39m`;
1154
+ }
1155
+ var ink = fg(RIG_PALETTE.ink);
1156
+ var ink2 = fg(RIG_PALETTE.ink2);
1157
+ var ink3 = fg(RIG_PALETTE.ink3);
1158
+ var ink4 = fg(RIG_PALETTE.ink4);
1159
+ var accent = fg(RIG_PALETTE.accent);
1160
+ var accentDim = fg(RIG_PALETTE.accentDim);
1161
+ var cyan = fg(RIG_PALETTE.cyan);
1162
+ var red = fg(RIG_PALETTE.red);
1163
+ var yellow = fg(RIG_PALETTE.yellow);
1164
+ var DRONE_ART = [
1165
+ " .-=-. .-=-. ",
1166
+ " ( !!! ) ( !!! ) ",
1167
+ " '-=-'._ _.'-=-' ",
1168
+ " '._ _.' ",
1169
+ " '=$$$$$$$=.' ",
1170
+ " =$$$$$$$$$$$= ",
1171
+ " $$$@@@@@@@@@@$$$ ",
1172
+ " $$$@@ @@$$$ ",
1173
+ " $$@ ? @$$$ ",
1174
+ " $$$@ '-' @$$$ ",
1175
+ " $$$@@ @@$$$ ",
1176
+ " $$$@@@@@@@@@@$$$ ",
1177
+ " =$$$$$$$$$$$= ",
1178
+ " '=$$$$$$$=.' ",
1179
+ " _.' '._ ",
1180
+ " .-=-.' '.-=-. ",
1181
+ " ( !!! ) ( !!! ) ",
1182
+ " '-=-' '-=-' "
1183
+ ];
1184
+ var DRONE_WIDTH = DRONE_ART[0].length;
1185
+ var DRONE_HEIGHT = DRONE_ART.length;
1186
+
1187
+ // packages/cli/src/commands/_cli-format.ts
1188
+ var themeDim = (value) => ink3(value);
1189
+ var themeFaint = (value) => ink4(value);
1130
1190
  function stringField(record, key, fallback = "") {
1131
1191
  const value = record[key];
1132
1192
  return typeof value === "string" && value.trim() ? value.trim() : fallback;
@@ -1147,15 +1207,15 @@ function pad(value, width) {
1147
1207
  }
1148
1208
  function statusColor(status) {
1149
1209
  const normalized = status.toLowerCase();
1150
- if (["completed", "merged", "closed", "done", "accepted", "pass", "selected", "approved"].includes(normalized))
1151
- return pc2.green;
1210
+ if (["completed", "merged", "closed", "done", "accepted", "pass", "selected", "approved", "running"].includes(normalized))
1211
+ return accent;
1152
1212
  if (["failed", "needs_attention", "needs-attention", "blocked", "error", "rejected"].includes(normalized))
1153
- return pc2.red;
1154
- if (["running", "reviewing", "validating", "in_progress", "in-progress", "remote"].includes(normalized))
1155
- return pc2.cyan;
1156
- if (["ready", "open", "queued", "created", "preparing", "local", "pending"].includes(normalized))
1157
- return pc2.yellow;
1158
- return pc2.dim;
1213
+ return red;
1214
+ if (["reviewing", "validating", "in_progress", "in-progress", "remote", "preparing", "closing-out"].includes(normalized))
1215
+ return cyan;
1216
+ if (["ready", "open", "queued", "created", "local", "pending"].includes(normalized))
1217
+ return yellow;
1218
+ return themeDim;
1159
1219
  }
1160
1220
  function compactDate(value) {
1161
1221
  if (!value.trim())
@@ -1200,23 +1260,23 @@ function formatStatusPill(status) {
1200
1260
  return statusColor(label)(`\u25CF ${label}`);
1201
1261
  }
1202
1262
  function formatSection(title, subtitle) {
1203
- return `${pc2.bold(pc2.cyan("\u25C6"))} ${pc2.bold(title)}${subtitle ? pc2.dim(` \u2014 ${subtitle}`) : ""}`;
1263
+ return `${pc2.bold(accent("\u25C6"))} ${pc2.bold(title)}${subtitle ? themeDim(` \u2014 ${subtitle}`) : ""}`;
1204
1264
  }
1205
1265
  function formatSuccessCard(title, rows = []) {
1206
- const body = rows.filter(([, value]) => value !== undefined && value !== null && String(value).length > 0).map(([key, value]) => `${pc2.dim("\u2502")} ${pc2.dim(key.padEnd(12))} ${value}`);
1266
+ const body = rows.filter(([, value]) => value !== undefined && value !== null && String(value).length > 0).map(([key, value]) => `${themeFaint("\u2502")} ${themeDim(key.padEnd(12))} ${value}`);
1207
1267
  return [formatSection(title), ...body].join(`
1208
1268
  `);
1209
1269
  }
1210
1270
  function formatNextSteps(steps) {
1211
1271
  if (steps.length === 0)
1212
1272
  return [];
1213
- return [pc2.bold("Next"), ...steps.map((step) => `${pc2.dim("\u203A")} ${step}`)];
1273
+ return [pc2.bold("Next"), ...steps.map((step) => `${accent("\u203A")} ${step}`)];
1214
1274
  }
1215
1275
  function formatRunList(runs, options = {}) {
1216
1276
  if (runs.length === 0) {
1217
1277
  return [
1218
1278
  formatSection("Runs", "none recorded"),
1219
- options.source === "server" ? pc2.dim("No runs recorded on the selected Rig server.") : pc2.dim("No runs recorded in .rig/runs."),
1279
+ options.source === "server" ? themeDim("No runs recorded on the selected Rig server.") : themeDim("No runs recorded in .rig/runs."),
1220
1280
  "",
1221
1281
  ...formatNextSteps(["Start one: `rig task run --next`", "Check server: `rig server status`"])
1222
1282
  ].join(`
@@ -1236,7 +1296,7 @@ function formatRunList(runs, options = {}) {
1236
1296
  const body = rows.map((row) => [
1237
1297
  pc2.bold(pad(truncate(row.runId, idWidth), idWidth)),
1238
1298
  statusColor(row.status)(pad(truncate(row.status, statusWidth), statusWidth)),
1239
- `${row.title}${row.runtime ? pc2.dim(` ${row.runtime}`) : ""}`
1299
+ `${row.title}${row.runtime ? themeDim(` ${row.runtime}`) : ""}`
1240
1300
  ].join(" "));
1241
1301
  return [formatSection("Runs", options.source === "server" ? "selected server" : "local state"), header, ...body, "", ...formatNextSteps(["Follow live: `rig run attach <run-id> --follow`", "Details: `rig run show <run-id>`"])].join(`
1242
1302
  `);
@@ -1289,7 +1349,7 @@ function formatRunStatus(summary, options = {}) {
1289
1349
  const lines = [formatSection("Run status", options.source === "server" ? "selected server" : "local state")];
1290
1350
  lines.push("", pc2.bold(`Active runs (${activeRuns.length})`));
1291
1351
  if (activeRuns.length === 0) {
1292
- lines.push(pc2.dim("No active runs."));
1352
+ lines.push(themeDim("No active runs."));
1293
1353
  } else {
1294
1354
  for (const run of activeRuns) {
1295
1355
  lines.push(formatRunSummaryLine(run));
@@ -1297,7 +1357,7 @@ function formatRunStatus(summary, options = {}) {
1297
1357
  }
1298
1358
  lines.push("", pc2.bold(`Recent runs (${recentRuns.length})`));
1299
1359
  if (recentRuns.length === 0) {
1300
- lines.push(pc2.dim("No recent terminal runs."));
1360
+ lines.push(themeDim("No recent terminal runs."));
1301
1361
  } else {
1302
1362
  for (const run of recentRuns.slice(0, 10)) {
1303
1363
  lines.push(formatRunSummaryLine(run));
@@ -1315,7 +1375,7 @@ function formatRunSummaryLine(run) {
1315
1375
  const title = runTitleOf(record);
1316
1376
  const runtime = firstString(record, ["runtimeAdapter", "runtime", "adapter"]);
1317
1377
  const descriptor = [taskId, title].filter(Boolean).join(" \xB7 ");
1318
- return `${pc2.dim("\u2502")} ${pc2.bold(runId)} ${formatStatusPill(status)} ${descriptor}${runtime ? pc2.dim(` ${runtime}`) : ""}`;
1378
+ return `${themeFaint("\u2502")} ${pc2.bold(runId)} ${formatStatusPill(status)} ${descriptor}${runtime ? themeDim(` ${runtime}`) : ""}`;
1319
1379
  }
1320
1380
 
1321
1381
  // packages/cli/src/commands/inbox.ts