@h-rig/cli 0.0.6-alpha.9 → 0.0.6-alpha.91

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 (116) hide show
  1. package/README.md +18 -19
  2. package/dist/bin/build-rig-binaries.d.ts +2 -0
  3. package/dist/bin/build-rig-binaries.js +22 -10
  4. package/dist/bin/rig.d.ts +72 -0
  5. package/dist/bin/rig.js +15637 -7344
  6. package/dist/config/rig-default-config.yml +5 -0
  7. package/dist/src/app/drone-ui.d.ts +34 -0
  8. package/dist/src/app/drone-ui.js +278 -0
  9. package/dist/src/commands/_async-ui.d.ts +10 -0
  10. package/dist/src/commands/_async-ui.js +121 -0
  11. package/dist/src/commands/_cli-format.d.ts +56 -0
  12. package/dist/src/commands/_cli-format.js +319 -0
  13. package/dist/src/commands/_connection-state.d.ts +54 -0
  14. package/dist/src/commands/_connection-state.js +75 -11
  15. package/dist/src/commands/_doctor-checks.d.ts +46 -0
  16. package/dist/src/commands/_doctor-checks.js +100 -267
  17. package/dist/src/commands/_help-catalog.d.ts +51 -0
  18. package/dist/src/commands/_help-catalog.js +502 -0
  19. package/dist/src/commands/_inprocess-services.d.ts +33 -0
  20. package/dist/src/commands/_inprocess-services.js +102 -0
  21. package/dist/src/commands/_json-output.d.ts +11 -0
  22. package/dist/src/commands/_json-output.js +60 -0
  23. package/dist/src/commands/_lazy-reconcile.d.ts +34 -0
  24. package/dist/src/commands/_lazy-reconcile.js +102 -0
  25. package/dist/src/commands/_parsers.d.ts +15 -0
  26. package/dist/src/commands/_parsers.js +18 -11
  27. package/dist/src/commands/_paths.d.ts +11 -0
  28. package/dist/src/commands/_paths.js +1 -1
  29. package/dist/src/commands/_pi-frontend.d.ts +35 -0
  30. package/dist/src/commands/_pi-frontend.js +64 -0
  31. package/dist/src/commands/_pi-install.d.ts +42 -0
  32. package/dist/src/commands/_pi-install.js +19 -36
  33. package/dist/src/commands/_policy.d.ts +8 -0
  34. package/dist/src/commands/_policy.js +67 -19
  35. package/dist/src/commands/_probes.d.ts +1 -0
  36. package/dist/src/commands/_run-bridge.d.ts +114 -0
  37. package/dist/src/commands/_run-bridge.js +387 -0
  38. package/dist/src/commands/_run-diagnostics.d.ts +9 -0
  39. package/dist/src/commands/_run-diagnostics.js +51 -0
  40. package/dist/src/commands/_run-driver-helpers.d.ts +26 -0
  41. package/dist/src/commands/_run-driver-helpers.js +79 -230
  42. package/dist/src/commands/_run-projection.d.ts +50 -0
  43. package/dist/src/commands/_run-projection.js +349 -0
  44. package/dist/src/commands/_run-subcommands.d.ts +3 -0
  45. package/dist/src/commands/_run-subcommands.js +31 -0
  46. package/dist/src/commands/_spinner.d.ts +25 -0
  47. package/dist/src/commands/_spinner.js +65 -0
  48. package/dist/src/commands/agent.d.ts +3 -0
  49. package/dist/src/commands/agent.js +8575 -236
  50. package/dist/src/commands/dist.d.ts +28 -0
  51. package/dist/src/commands/dist.js +44 -29
  52. package/dist/src/commands/doctor.d.ts +3 -0
  53. package/dist/src/commands/doctor.js +219 -268
  54. package/dist/src/commands/github.d.ts +3 -0
  55. package/dist/src/commands/github.js +236 -188
  56. package/dist/src/commands/inbox.d.ts +28 -0
  57. package/dist/src/commands/inbox.js +530 -111
  58. package/dist/src/commands/init.d.ts +64 -0
  59. package/dist/src/commands/init.js +912 -705
  60. package/dist/src/commands/inspect.d.ts +20 -0
  61. package/dist/src/commands/inspect.js +709 -119
  62. package/dist/src/commands/pi.d.ts +3 -0
  63. package/dist/src/commands/pi.js +177 -0
  64. package/dist/src/commands/plugin.d.ts +16 -0
  65. package/dist/src/commands/plugin.js +576 -29
  66. package/dist/src/commands/profile-and-review.d.ts +4 -0
  67. package/dist/src/commands/profile-and-review.js +112 -67
  68. package/dist/src/commands/queue.d.ts +3 -0
  69. package/dist/src/commands/queue.js +20 -20
  70. package/dist/src/commands/remote.d.ts +3 -0
  71. package/dist/src/commands/remote.js +880 -50
  72. package/dist/src/commands/repo-git-harness.d.ts +5 -0
  73. package/dist/src/commands/repo-git-harness.js +78 -28
  74. package/dist/src/commands/run.d.ts +21 -0
  75. package/dist/src/commands/run.js +17701 -661
  76. package/dist/src/commands/server.d.ts +3 -0
  77. package/dist/src/commands/server.js +166 -303
  78. package/dist/src/commands/setup.d.ts +16 -0
  79. package/dist/src/commands/setup.js +244 -299
  80. package/dist/src/commands/stats.d.ts +15 -0
  81. package/dist/src/commands/stats.js +979 -0
  82. package/dist/src/commands/task-run-driver.d.ts +94 -0
  83. package/dist/src/commands/task-run-driver.js +116 -1961
  84. package/dist/src/commands/task.d.ts +35 -0
  85. package/dist/src/commands/task.js +676 -1201
  86. package/dist/src/commands/test.d.ts +3 -0
  87. package/dist/src/commands/test.js +15 -8
  88. package/dist/src/commands/triage.d.ts +11 -0
  89. package/dist/src/commands/triage.js +227 -0
  90. package/dist/src/commands/workspace.d.ts +3 -0
  91. package/dist/src/commands/workspace.js +18 -11
  92. package/dist/src/commands.d.ts +13 -0
  93. package/dist/src/commands.js +16792 -8055
  94. package/dist/src/index.d.ts +4 -0
  95. package/dist/src/index.js +16862 -8450
  96. package/dist/src/launcher.d.ts +61 -0
  97. package/dist/src/launcher.js +81 -13
  98. package/dist/src/operator-cli.d.ts +2 -0
  99. package/dist/src/operator-cli.js +17837 -0
  100. package/dist/src/operator-entry.d.ts +1 -0
  101. package/dist/src/operator-entry.js +3 -0
  102. package/dist/src/runner.d.ts +47 -0
  103. package/dist/src/runner.js +16 -22
  104. package/dist/src/withMutedConsole.d.ts +2 -0
  105. package/package.json +21 -8
  106. package/dist/src/commands/_authority-runs.js +0 -111
  107. package/dist/src/commands/_operator-view.js +0 -340
  108. package/dist/src/commands/_preflight.js +0 -478
  109. package/dist/src/commands/_server-client.js +0 -382
  110. package/dist/src/commands/_snapshot-upload.js +0 -331
  111. package/dist/src/commands/_task-picker.js +0 -48
  112. package/dist/src/commands/browser.js +0 -890
  113. package/dist/src/commands/connect.js +0 -180
  114. package/dist/src/commands/inspector.js +0 -256
  115. package/dist/src/commands/task-report-bug.js +0 -1083
  116. package/dist/src/report-bug.js +0 -260
@@ -0,0 +1,3 @@
1
+ import { type RunnerContext } from "../runner";
2
+ import type { CommandOutcome } from "@rig/runtime";
3
+ export declare function executeTest(context: RunnerContext, args: string[]): Promise<CommandOutcome>;
@@ -1,12 +1,19 @@
1
1
  // @bun
2
2
  // packages/cli/src/runner.ts
3
3
  import { EventBus } from "@rig/runtime/control-plane/runtime/events";
4
- import { CliError } from "@rig/runtime/control-plane/errors";
4
+ import { CliError as RuntimeCliError } from "@rig/runtime/control-plane/errors";
5
5
  import { evaluate, loadPolicy, resolveAction } from "@rig/runtime/control-plane/runtime/guard";
6
- import { PluginManager } from "@rig/runtime/control-plane/runtime/plugins";
7
- import { loadRuntimeContextFromEnv } from "@rig/runtime/control-plane/runtime/context";
8
6
  import { buildBinary } from "@rig/runtime/control-plane/runtime/isolation";
9
- import { CliError as CliError2 } from "@rig/runtime/control-plane/errors";
7
+
8
+ class CliError extends RuntimeCliError {
9
+ hint;
10
+ constructor(message, exitCode = 1, options = {}) {
11
+ super(message, exitCode);
12
+ if (options.hint?.trim()) {
13
+ this.hint = options.hint.trim();
14
+ }
15
+ }
16
+ }
10
17
  function requireNoExtraArgs(args, usage) {
11
18
  if (args.length > 0) {
12
19
  throw new CliError(`Unexpected arguments: ${args.join(" ")}
@@ -19,19 +26,19 @@ async function executeTest(context, args) {
19
26
  const [command = "unit", ...rest] = args;
20
27
  switch (command) {
21
28
  case "unit":
22
- requireNoExtraArgs(rest, "bun run rig test unit");
29
+ requireNoExtraArgs(rest, "rig test unit");
23
30
  await context.runCommand(["bun", "test", "tests/harness/", "--ignore", "tests/harness/e2e/**"]);
24
31
  return { ok: true, group: "test", command };
25
32
  case "e2e":
26
- requireNoExtraArgs(rest, "bun run rig test e2e");
33
+ requireNoExtraArgs(rest, "rig test e2e");
27
34
  await context.runCommand(["bun", "test", "tests/harness/e2e/"]);
28
35
  return { ok: true, group: "test", command };
29
36
  case "all":
30
- requireNoExtraArgs(rest, "bun run rig test all");
37
+ requireNoExtraArgs(rest, "rig test all");
31
38
  await context.runCommand(["bun", "test", "tests/harness/"]);
32
39
  return { ok: true, group: "test", command };
33
40
  default:
34
- throw new CliError2(`Unknown test command: ${command}`);
41
+ throw new CliError(`Unknown test command: ${command}`, 1, { hint: "Run `rig test --help` \u2014 commands are unit|e2e|all." });
35
42
  }
36
43
  }
37
44
  export {
@@ -0,0 +1,11 @@
1
+ import { type IssueAnalysisTriageRunResult, type RunIssueAnalysisTriageOptions } from "@rig/runtime/control-plane/github";
2
+ import type { CommandOutcome } from "@rig/runtime/control-plane/runtime/types";
3
+ import { type RunnerContext } from "../runner";
4
+ type TriageCommandDeps = {
5
+ runTriage?: (options: RunIssueAnalysisTriageOptions) => Promise<IssueAnalysisTriageRunResult>;
6
+ spinner?: <T>(label: string, work: (update: (label: string) => void) => Promise<T>, options: {
7
+ outputMode: RunnerContext["outputMode"];
8
+ }) => Promise<T>;
9
+ };
10
+ export declare function executeTriage(context: RunnerContext, args: string[], deps?: TriageCommandDeps): Promise<CommandOutcome>;
11
+ export {};
@@ -0,0 +1,227 @@
1
+ // @bun
2
+ // packages/cli/src/commands/triage.ts
3
+ import { runIssueAnalysisTriage } from "@rig/runtime/control-plane/github";
4
+
5
+ // packages/cli/src/runner.ts
6
+ import { EventBus } from "@rig/runtime/control-plane/runtime/events";
7
+ import { CliError as RuntimeCliError } from "@rig/runtime/control-plane/errors";
8
+ import { evaluate, loadPolicy, resolveAction } from "@rig/runtime/control-plane/runtime/guard";
9
+ import { buildBinary } from "@rig/runtime/control-plane/runtime/isolation";
10
+
11
+ class CliError extends RuntimeCliError {
12
+ hint;
13
+ constructor(message, exitCode = 1, options = {}) {
14
+ super(message, exitCode);
15
+ if (options.hint?.trim()) {
16
+ this.hint = options.hint.trim();
17
+ }
18
+ }
19
+ }
20
+ function takeOption(args, option) {
21
+ const rest = [];
22
+ let value;
23
+ for (let index = 0;index < args.length; index += 1) {
24
+ const current = args[index];
25
+ if (current === option) {
26
+ const next = args[index + 1];
27
+ if (!next || next.startsWith("-")) {
28
+ throw new CliError(`Missing value for ${option}`, 1, { hint: `Provide a value after ${option}, e.g. \`${option} <value>\`.` });
29
+ }
30
+ value = next;
31
+ index += 1;
32
+ continue;
33
+ }
34
+ if (current !== undefined) {
35
+ rest.push(current);
36
+ }
37
+ }
38
+ return { value, rest };
39
+ }
40
+ function requireNoExtraArgs(args, usage) {
41
+ if (args.length > 0) {
42
+ throw new CliError(`Unexpected arguments: ${args.join(" ")}
43
+ Usage: ${usage}`);
44
+ }
45
+ }
46
+
47
+ // packages/cli/src/commands/_async-ui.ts
48
+ import pc from "picocolors";
49
+
50
+ // packages/cli/src/commands/_spinner.ts
51
+ var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
52
+ function createTtySpinner(input) {
53
+ const output = input.output ?? process.stdout;
54
+ const isTty = output.isTTY === true;
55
+ const frames = input.frames && input.frames.length > 0 ? input.frames : SPINNER_FRAMES;
56
+ let label = input.label;
57
+ let frame = 0;
58
+ let paused = false;
59
+ let stopped = false;
60
+ let lastPrintedLabel = "";
61
+ const render = () => {
62
+ if (stopped || paused)
63
+ return;
64
+ if (!isTty) {
65
+ if (label !== lastPrintedLabel) {
66
+ output.write(`${label}
67
+ `);
68
+ lastPrintedLabel = label;
69
+ }
70
+ return;
71
+ }
72
+ frame = (frame + 1) % frames.length;
73
+ const glyph = frames[frame] ?? frames[0] ?? "";
74
+ output.write(`\r\x1B[2K${input.styleFrame ? input.styleFrame(glyph) : glyph} ${label}`);
75
+ };
76
+ const clearLine = () => {
77
+ if (isTty)
78
+ output.write("\r\x1B[2K");
79
+ };
80
+ render();
81
+ const timer = isTty ? setInterval(render, input.intervalMs ?? 16) : null;
82
+ return {
83
+ setLabel(next) {
84
+ label = next;
85
+ render();
86
+ },
87
+ pause() {
88
+ paused = true;
89
+ clearLine();
90
+ },
91
+ resume() {
92
+ if (stopped)
93
+ return;
94
+ paused = false;
95
+ render();
96
+ },
97
+ stop(finalLine) {
98
+ if (stopped)
99
+ return;
100
+ stopped = true;
101
+ if (timer)
102
+ clearInterval(timer);
103
+ clearLine();
104
+ if (finalLine)
105
+ output.write(`${finalLine}
106
+ `);
107
+ }
108
+ };
109
+ }
110
+
111
+ // packages/cli/src/commands/_async-ui.ts
112
+ var FRAMES = ["\u25D0", "\u25D3", "\u25D1", "\u25D2"];
113
+ var DONE_SYMBOL = pc.green("\u25C7");
114
+ var FAIL_SYMBOL = pc.red("\u25A0");
115
+ var activeUpdate = null;
116
+ async function withSpinner(label, work, options = {}) {
117
+ if (options.outputMode === "json") {
118
+ return work(() => {
119
+ return;
120
+ });
121
+ }
122
+ if (activeUpdate) {
123
+ activeUpdate(label);
124
+ return work(activeUpdate);
125
+ }
126
+ const output = options.output ?? process.stderr;
127
+ const isTty = output.isTTY === true;
128
+ let lastLabel = label;
129
+ if (!isTty) {
130
+ output.write(`${label}
131
+ `);
132
+ const update2 = (next) => {
133
+ lastLabel = next;
134
+ };
135
+ activeUpdate = update2;
136
+ try {
137
+ return await work(update2);
138
+ } finally {
139
+ activeUpdate = null;
140
+ }
141
+ }
142
+ const spinner = createTtySpinner({
143
+ label,
144
+ output,
145
+ frames: FRAMES,
146
+ styleFrame: (frame) => pc.cyan(frame)
147
+ });
148
+ const update = (next) => {
149
+ lastLabel = next;
150
+ spinner.setLabel(next);
151
+ };
152
+ activeUpdate = update;
153
+ try {
154
+ const result = await work(update);
155
+ spinner.stop(options.doneLabel ? `${DONE_SYMBOL} ${options.doneLabel}` : undefined);
156
+ return result;
157
+ } catch (error) {
158
+ spinner.stop(`${FAIL_SYMBOL} ${lastLabel}`);
159
+ throw error;
160
+ } finally {
161
+ activeUpdate = null;
162
+ }
163
+ }
164
+
165
+ // packages/cli/src/commands/triage.ts
166
+ function printTriageResult(context, result) {
167
+ if (context.outputMode === "json") {
168
+ console.log(JSON.stringify(result, null, 2));
169
+ return;
170
+ }
171
+ if (!result.enabled) {
172
+ const suffix = result.skippedReason === "no-config" ? "no rig.config task source was found" : "config.issueAnalysis is not enabled for continuous Pi analysis";
173
+ console.log(`Rig triage skipped: ${suffix}.`);
174
+ return;
175
+ }
176
+ console.log([
177
+ `Rig triage analyzed ${result.analyzedIssues} issue${result.analyzedIssues === 1 ? "" : "s"}.`,
178
+ `metadata patches: ${result.metadataPatches}`,
179
+ `labels added: ${result.labelsAdded}`,
180
+ `labels removed: ${result.labelsRemoved}`,
181
+ `generated issues: ${result.generatedIssues}`,
182
+ `snapshot refreshes: ${result.writeBackRefreshes}`
183
+ ].join(`
184
+ `));
185
+ }
186
+ async function executeTriage(context, args, deps = {}) {
187
+ if (args[0] === "--help" || args[0] === "-h" || args[0] === "help") {
188
+ console.log(`Usage: rig triage [--reason <text>]
189
+
190
+ Runs the configured issueAnalysis pass once. Schedule this command externally for continuous triage.`);
191
+ return { ok: true, group: "triage", command: "help" };
192
+ }
193
+ const parsedReason = takeOption(args, "--reason");
194
+ requireNoExtraArgs(parsedReason.rest, "rig triage [--reason <text>]");
195
+ if (context.dryRun) {
196
+ const result2 = {
197
+ ok: true,
198
+ enabled: false,
199
+ reason: parsedReason.value?.trim() || "triage",
200
+ sourceId: null,
201
+ sourceKind: null,
202
+ analyzedIssues: 0,
203
+ metadataPatches: 0,
204
+ labelsAdded: 0,
205
+ labelsRemoved: 0,
206
+ generatedIssues: 0,
207
+ writeBackRefreshes: 0,
208
+ refreshedIssueCount: null,
209
+ skippedReason: "disabled",
210
+ dryRun: true
211
+ };
212
+ if (context.outputMode === "json")
213
+ console.log(JSON.stringify(result2, null, 2));
214
+ else
215
+ console.log("[dry-run] rig triage would run the configured issueAnalysis pass once.");
216
+ return { ok: true, group: "triage", command: "run", details: result2 };
217
+ }
218
+ const result = await (deps.spinner ?? withSpinner)("Running Rig issue-analysis triage\u2026", () => (deps.runTriage ?? runIssueAnalysisTriage)({
219
+ projectRoot: context.projectRoot,
220
+ reason: parsedReason.value?.trim() || "triage"
221
+ }), { outputMode: context.outputMode });
222
+ printTriageResult(context, result);
223
+ return { ok: true, group: "triage", command: "run", details: result };
224
+ }
225
+ export {
226
+ executeTriage
227
+ };
@@ -0,0 +1,3 @@
1
+ import { type RunnerContext } from "../runner";
2
+ import type { CommandOutcome } from "@rig/runtime";
3
+ export declare function executeWorkspace(context: RunnerContext, args: string[]): Promise<CommandOutcome>;
@@ -1,12 +1,19 @@
1
1
  // @bun
2
2
  // packages/cli/src/runner.ts
3
3
  import { EventBus } from "@rig/runtime/control-plane/runtime/events";
4
- import { CliError } from "@rig/runtime/control-plane/errors";
4
+ import { CliError as RuntimeCliError } from "@rig/runtime/control-plane/errors";
5
5
  import { evaluate, loadPolicy, resolveAction } from "@rig/runtime/control-plane/runtime/guard";
6
- import { PluginManager } from "@rig/runtime/control-plane/runtime/plugins";
7
- import { loadRuntimeContextFromEnv } from "@rig/runtime/control-plane/runtime/context";
8
6
  import { buildBinary } from "@rig/runtime/control-plane/runtime/isolation";
9
- import { CliError as CliError2 } from "@rig/runtime/control-plane/errors";
7
+
8
+ class CliError extends RuntimeCliError {
9
+ hint;
10
+ constructor(message, exitCode = 1, options = {}) {
11
+ super(message, exitCode);
12
+ if (options.hint?.trim()) {
13
+ this.hint = options.hint.trim();
14
+ }
15
+ }
16
+ }
10
17
  function takeOption(args, option) {
11
18
  const rest = [];
12
19
  let value;
@@ -15,7 +22,7 @@ function takeOption(args, option) {
15
22
  if (current === option) {
16
23
  const next = args[index + 1];
17
24
  if (!next || next.startsWith("-")) {
18
- throw new CliError(`Missing value for ${option}`);
25
+ throw new CliError(`Missing value for ${option}`, 1, { hint: `Provide a value after ${option}, e.g. \`${option} <value>\`.` });
19
26
  }
20
27
  value = next;
21
28
  index += 1;
@@ -45,7 +52,7 @@ async function executeWorkspace(context, args) {
45
52
  const [command = "summary", ...rest] = args;
46
53
  switch (command) {
47
54
  case "summary": {
48
- requireNoExtraArgs(rest, "bun run rig workspace summary");
55
+ requireNoExtraArgs(rest, "rig workspace summary");
49
56
  const summary = await readWorkspaceSummary(context.projectRoot);
50
57
  if (context.outputMode === "text") {
51
58
  console.log("Workspace Summary");
@@ -70,7 +77,7 @@ Warnings:`);
70
77
  return { ok: true, group: "workspace", command, details: summary };
71
78
  }
72
79
  case "topology": {
73
- requireNoExtraArgs(rest, "bun run rig workspace topology");
80
+ requireNoExtraArgs(rest, "rig workspace topology");
74
81
  const topology = readWorkspaceTopology(context.projectRoot);
75
82
  if (context.outputMode === "text") {
76
83
  console.log(`Topology: ${topology.status}`);
@@ -83,7 +90,7 @@ Warnings:`);
83
90
  return { ok: true, group: "workspace", command, details: topology };
84
91
  }
85
92
  case "remote-hosts": {
86
- requireNoExtraArgs(rest, "bun run rig workspace remote-hosts");
93
+ requireNoExtraArgs(rest, "rig workspace remote-hosts");
87
94
  const fleet = readWorkspaceRemoteFleet(context.projectRoot);
88
95
  if (context.outputMode === "text") {
89
96
  console.log(`Remote Hosts: ${fleet.status}`);
@@ -98,9 +105,9 @@ Warnings:`);
98
105
  let pending = serviceRest;
99
106
  const services = takeOption(pending, "--service");
100
107
  pending = services.rest;
101
- requireNoExtraArgs(pending, "bun run rig workspace service-fabric <status|up|verify|down> [--service <name>]");
108
+ requireNoExtraArgs(pending, "rig workspace service-fabric <status|up|verify|down> [--service <name>]");
102
109
  if (action !== "status" && action !== "up" && action !== "verify" && action !== "down") {
103
- throw new CliError2(`Unknown workspace service-fabric action: ${action}`);
110
+ throw new CliError(`Unknown workspace service-fabric action: ${action}`, 1, { hint: "Use one of: `rig workspace service-fabric status|up|verify|down`." });
104
111
  }
105
112
  const selectedServices = services.value ? services.value.split(",").map((entry) => entry.trim()).filter(Boolean) : [];
106
113
  const summary = action === "status" ? await mutateWorkspaceServiceFabric(context.projectRoot, "verify", selectedServices) : await mutateWorkspaceServiceFabric(context.projectRoot, action, selectedServices);
@@ -115,7 +122,7 @@ Warnings:`);
115
122
  };
116
123
  }
117
124
  default:
118
- throw new CliError2(`Unknown workspace command: ${command}`);
125
+ throw new CliError(`Unknown workspace command: ${command}`, 1, { hint: "Run `rig workspace --help` \u2014 commands are summary|topology|remote-hosts|service-fabric." });
119
126
  }
120
127
  }
121
128
  export {
@@ -0,0 +1,13 @@
1
+ import { type RunnerContext } from "./runner";
2
+ import type { CommandOutcome } from "@rig/runtime/control-plane/runtime/types";
3
+ import { buildRunPrompt } from "./commands/_run-driver-helpers";
4
+ export declare function printGroupHelp(group: string): void;
5
+ /** Returns true if args[0] requests group help (--help, -h, or "help"). */
6
+ export declare function isHelpArg(arg: string | undefined): boolean;
7
+ export declare function helpText(): string;
8
+ export declare function execute(context: RunnerContext, args: string[]): Promise<CommandOutcome>;
9
+ export { buildRigInitConfigSource } from "./commands/init";
10
+ export type { RigInitConfigInput } from "./commands/init";
11
+ export declare const __testOnly: {
12
+ buildRunPrompt: typeof buildRunPrompt;
13
+ };