@h-rig/cli 0.0.6-alpha.63 → 0.0.6-alpha.65
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 +1349 -1599
- package/dist/src/commands/_connection-state.js +14 -5
- package/dist/src/commands/_doctor-checks.js +71 -11
- package/dist/src/commands/_help-catalog.js +99 -60
- package/dist/src/commands/_json-output.js +56 -0
- package/dist/src/commands/_operator-view.js +97 -784
- package/dist/src/commands/_parsers.js +18 -9
- package/dist/src/commands/_pi-frontend.js +96 -788
- package/dist/src/commands/_policy.js +12 -3
- package/dist/src/commands/_preflight.js +73 -13
- package/dist/src/commands/_run-driver-helpers.js +31 -5
- package/dist/src/commands/_run-replay.js +2 -2
- package/dist/src/commands/_server-client.js +76 -16
- package/dist/src/commands/_snapshot-upload.js +70 -10
- package/dist/src/commands/agent.js +21 -11
- package/dist/src/commands/browser.js +24 -15
- package/dist/src/commands/connect.js +22 -17
- package/dist/src/commands/dist.js +15 -6
- package/dist/src/commands/doctor.js +70 -10
- package/dist/src/commands/github.js +79 -19
- package/dist/src/commands/inbox.js +215 -131
- package/dist/src/commands/init.js +202 -35
- package/dist/src/commands/inspect.js +77 -17
- package/dist/src/commands/inspector.js +18 -9
- package/dist/src/commands/pi.js +18 -9
- package/dist/src/commands/plugin.js +19 -10
- package/dist/src/commands/profile-and-review.js +22 -13
- package/dist/src/commands/queue.js +19 -9
- package/dist/src/commands/remote.js +25 -16
- package/dist/src/commands/repo-git-harness.js +18 -9
- package/dist/src/commands/run.js +158 -805
- package/dist/src/commands/server.js +85 -25
- package/dist/src/commands/setup.js +73 -13
- package/dist/src/commands/stats.js +681 -0
- package/dist/src/commands/task-report-bug.js +24 -15
- package/dist/src/commands/task-run-driver.js +121 -49
- package/dist/src/commands/task.js +254 -893
- package/dist/src/commands/test.js +12 -3
- package/dist/src/commands/workspace.js +14 -5
- package/dist/src/commands.js +1339 -1650
- package/dist/src/index.js +1349 -1599
- package/dist/src/launcher.js +72 -10
- package/dist/src/runner.js +14 -5
- package/package.json +10 -7
- package/dist/src/commands/_pi-remote-session.js +0 -771
- package/dist/src/commands/_pi-worker-bridge-extension.js +0 -834
|
@@ -1,10 +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
6
|
import { buildBinary } from "@rig/runtime/control-plane/runtime/isolation";
|
|
7
|
-
|
|
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
|
+
}
|
|
8
17
|
function requireNoExtraArgs(args, usage) {
|
|
9
18
|
if (args.length > 0) {
|
|
10
19
|
throw new CliError(`Unexpected arguments: ${args.join(" ")}
|
|
@@ -29,7 +38,7 @@ async function executeTest(context, args) {
|
|
|
29
38
|
await context.runCommand(["bun", "test", "tests/harness/"]);
|
|
30
39
|
return { ok: true, group: "test", command };
|
|
31
40
|
default:
|
|
32
|
-
throw new
|
|
41
|
+
throw new CliError(`Unknown test command: ${command}`, 1, { hint: "Run `rig test --help` \u2014 commands are unit|e2e|all." });
|
|
33
42
|
}
|
|
34
43
|
}
|
|
35
44
|
export {
|
|
@@ -1,10 +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
6
|
import { buildBinary } from "@rig/runtime/control-plane/runtime/isolation";
|
|
7
|
-
|
|
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
|
+
}
|
|
8
17
|
function takeOption(args, option) {
|
|
9
18
|
const rest = [];
|
|
10
19
|
let value;
|
|
@@ -13,7 +22,7 @@ function takeOption(args, option) {
|
|
|
13
22
|
if (current === option) {
|
|
14
23
|
const next = args[index + 1];
|
|
15
24
|
if (!next || next.startsWith("-")) {
|
|
16
|
-
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>\`.` });
|
|
17
26
|
}
|
|
18
27
|
value = next;
|
|
19
28
|
index += 1;
|
|
@@ -98,7 +107,7 @@ Warnings:`);
|
|
|
98
107
|
pending = services.rest;
|
|
99
108
|
requireNoExtraArgs(pending, "rig workspace service-fabric <status|up|verify|down> [--service <name>]");
|
|
100
109
|
if (action !== "status" && action !== "up" && action !== "verify" && action !== "down") {
|
|
101
|
-
throw new
|
|
110
|
+
throw new CliError(`Unknown workspace service-fabric action: ${action}`, 1, { hint: "Use one of: `rig workspace service-fabric status|up|verify|down`." });
|
|
102
111
|
}
|
|
103
112
|
const selectedServices = services.value ? services.value.split(",").map((entry) => entry.trim()).filter(Boolean) : [];
|
|
104
113
|
const summary = action === "status" ? await mutateWorkspaceServiceFabric(context.projectRoot, "verify", selectedServices) : await mutateWorkspaceServiceFabric(context.projectRoot, action, selectedServices);
|
|
@@ -113,7 +122,7 @@ Warnings:`);
|
|
|
113
122
|
};
|
|
114
123
|
}
|
|
115
124
|
default:
|
|
116
|
-
throw new
|
|
125
|
+
throw new CliError(`Unknown workspace command: ${command}`, 1, { hint: "Run `rig workspace --help` \u2014 commands are summary|topology|remote-hosts|service-fabric." });
|
|
117
126
|
}
|
|
118
127
|
}
|
|
119
128
|
export {
|