@h-rig/cli 0.0.6-alpha.90 → 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.
- package/README.md +18 -19
- package/dist/bin/build-rig-binaries.js +22 -10
- package/dist/bin/rig.d.ts +71 -1
- package/dist/bin/rig.js +15078 -11169
- package/dist/config/rig-default-config.yml +5 -0
- package/dist/src/app/drone-ui.d.ts +11 -14
- package/dist/src/app/drone-ui.js +70 -86
- package/dist/src/commands/_async-ui.d.ts +1 -4
- package/dist/src/commands/_async-ui.js +9 -111
- package/dist/src/commands/_cli-format.d.ts +16 -9
- package/dist/src/commands/_cli-format.js +167 -295
- package/dist/src/commands/_connection-state.d.ts +11 -1
- package/dist/src/commands/_connection-state.js +50 -5
- package/dist/src/commands/_doctor-checks.d.ts +0 -6
- package/dist/src/commands/_doctor-checks.js +79 -382
- package/dist/src/commands/_help-catalog.d.ts +1 -1
- package/dist/src/commands/_help-catalog.js +217 -157
- package/dist/src/commands/_inprocess-services.d.ts +33 -0
- package/dist/src/commands/_inprocess-services.js +102 -0
- package/dist/src/commands/_json-output.js +4 -0
- package/dist/src/commands/_lazy-reconcile.d.ts +34 -0
- package/dist/src/commands/_lazy-reconcile.js +102 -0
- package/dist/src/commands/_paths.js +1 -1
- package/dist/src/commands/_pi-frontend.d.ts +18 -10
- package/dist/src/commands/_pi-frontend.js +37 -715
- package/dist/src/commands/_pi-install.js +18 -36
- package/dist/src/commands/_policy.d.ts +1 -1
- package/dist/src/commands/_policy.js +56 -15
- package/dist/src/commands/_run-bridge.d.ts +114 -0
- package/dist/src/commands/_run-bridge.js +387 -0
- package/dist/src/commands/_run-diagnostics.d.ts +9 -0
- package/dist/src/commands/_run-diagnostics.js +51 -0
- package/dist/src/commands/_run-driver-helpers.d.ts +8 -81
- package/dist/src/commands/_run-driver-helpers.js +79 -283
- package/dist/src/commands/_run-projection.d.ts +50 -0
- package/dist/src/commands/_run-projection.js +349 -0
- package/dist/src/commands/_run-subcommands.d.ts +3 -0
- package/dist/src/commands/_run-subcommands.js +31 -0
- package/dist/src/commands/_spinner.js +1 -1
- package/dist/src/commands/agent.d.ts +1 -1
- package/dist/src/commands/agent.js +8559 -239
- package/dist/src/commands/dist.d.ts +1 -1
- package/dist/src/commands/dist.js +27 -19
- package/dist/src/commands/doctor.d.ts +1 -1
- package/dist/src/commands/doctor.js +93 -475
- package/dist/src/commands/github.d.ts +1 -1
- package/dist/src/commands/github.js +113 -387
- package/dist/src/commands/inbox.d.ts +22 -24
- package/dist/src/commands/inbox.js +420 -691
- package/dist/src/commands/init.d.ts +6 -16
- package/dist/src/commands/init.js +334 -971
- package/dist/src/commands/inspect.d.ts +19 -2
- package/dist/src/commands/inspect.js +644 -610
- package/dist/src/commands/pi.d.ts +1 -1
- package/dist/src/commands/plugin.d.ts +1 -1
- package/dist/src/commands/plugin.js +486 -7
- package/dist/src/commands/profile-and-review.d.ts +1 -1
- package/dist/src/commands/profile-and-review.js +94 -56
- package/dist/src/commands/queue.js +1 -21
- package/dist/src/commands/remote.d.ts +1 -1
- package/dist/src/commands/remote.js +837 -14
- package/dist/src/commands/repo-git-harness.d.ts +1 -1
- package/dist/src/commands/repo-git-harness.js +57 -14
- package/dist/src/commands/run.d.ts +20 -2
- package/dist/src/commands/run.js +17579 -1759
- package/dist/src/commands/server.d.ts +2 -6
- package/dist/src/commands/server.js +141 -723
- package/dist/src/commands/setup.d.ts +1 -1
- package/dist/src/commands/setup.js +102 -484
- package/dist/src/commands/stats.d.ts +13 -10
- package/dist/src/commands/stats.js +689 -761
- package/dist/src/commands/task-run-driver.d.ts +50 -88
- package/dist/src/commands/task-run-driver.js +116 -2717
- package/dist/src/commands/task.d.ts +34 -13
- package/dist/src/commands/task.js +668 -2523
- package/dist/src/commands/test.d.ts +1 -1
- package/dist/src/commands/triage.d.ts +11 -0
- package/dist/src/commands/triage.js +227 -0
- package/dist/src/commands/workspace.d.ts +1 -1
- package/dist/src/commands.d.ts +0 -16
- package/dist/src/commands.js +16657 -12250
- package/dist/src/index.js +16528 -12497
- package/dist/src/launcher.js +4 -0
- package/dist/src/operator-cli.d.ts +2 -0
- package/dist/src/operator-cli.js +17837 -0
- package/dist/src/operator-entry.d.ts +1 -0
- package/dist/src/operator-entry.js +3 -0
- package/package.json +18 -12
- package/dist/src/app/board.d.ts +0 -23
- package/dist/src/app/board.js +0 -1786
- package/dist/src/app/theme.d.ts +0 -47
- package/dist/src/app/theme.js +0 -150
- package/dist/src/commands/_authority-runs.d.ts +0 -22
- package/dist/src/commands/_authority-runs.js +0 -110
- package/dist/src/commands/_operator-surface.d.ts +0 -34
- package/dist/src/commands/_operator-surface.js +0 -220
- package/dist/src/commands/_operator-view.d.ts +0 -30
- package/dist/src/commands/_operator-view.js +0 -1070
- package/dist/src/commands/_preflight.d.ts +0 -22
- package/dist/src/commands/_preflight.js +0 -540
- package/dist/src/commands/_run-replay.d.ts +0 -24
- package/dist/src/commands/_run-replay.js +0 -142
- package/dist/src/commands/_server-client.d.ts +0 -186
- package/dist/src/commands/_server-client.js +0 -681
- package/dist/src/commands/_snapshot-upload.d.ts +0 -39
- package/dist/src/commands/_snapshot-upload.js +0 -455
- package/dist/src/commands/_task-picker.d.ts +0 -9
- package/dist/src/commands/_task-picker.js +0 -201
- package/dist/src/commands/browser.d.ts +0 -65
- package/dist/src/commands/browser.js +0 -1173
- package/dist/src/commands/connect.d.ts +0 -7
- package/dist/src/commands/connect.js +0 -419
- package/dist/src/commands/inspector.d.ts +0 -3
- package/dist/src/commands/inspector.js +0 -263
- package/dist/src/commands/task-report-bug.d.ts +0 -19
- package/dist/src/commands/task-report-bug.js +0 -1281
- package/dist/src/report-bug.d.ts +0 -44
- package/dist/src/report-bug.js +0 -260
|
@@ -58,11 +58,11 @@ Usage: ${usage}`);
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
// packages/cli/src/commands/dist.ts
|
|
61
|
-
import { buildBinary as buildBinary2 } from "@rig/runtime/control-plane/runtime/isolation";
|
|
62
61
|
import {
|
|
63
62
|
computeRuntimeImageFingerprint,
|
|
64
63
|
computeRuntimeImageId
|
|
65
64
|
} from "@rig/runtime/control-plane/runtime/image/index";
|
|
65
|
+
import { buildBinary as buildBinary2 } from "@rig/runtime/control-plane/runtime/isolation";
|
|
66
66
|
|
|
67
67
|
// packages/cli/src/commands/_parsers.ts
|
|
68
68
|
import { homedir } from "os";
|
|
@@ -88,7 +88,7 @@ function resolveInstallDir(scope, explicitPath) {
|
|
|
88
88
|
|
|
89
89
|
// packages/cli/src/commands/_paths.ts
|
|
90
90
|
import { resolve as resolve2 } from "path";
|
|
91
|
-
import { resolveMonorepoRoot } from "@rig/runtime/
|
|
91
|
+
import { resolveMonorepoRoot } from "@rig/runtime/layout";
|
|
92
92
|
function resolveControlPlaneMonorepoRoot(projectRoot) {
|
|
93
93
|
return resolveMonorepoRoot(projectRoot);
|
|
94
94
|
}
|
|
@@ -124,8 +124,9 @@ function collectRigValidatorBuildTargets(input) {
|
|
|
124
124
|
if (!existsSync(validatorsRoot))
|
|
125
125
|
return [];
|
|
126
126
|
const targets = [];
|
|
127
|
-
const
|
|
128
|
-
|
|
127
|
+
for (const category of readdirSync(validatorsRoot, { withFileTypes: true })) {
|
|
128
|
+
if (!category.isDirectory())
|
|
129
|
+
continue;
|
|
129
130
|
const categoryDir = resolve3(validatorsRoot, category.name);
|
|
130
131
|
for (const entry of readdirSync(categoryDir, { withFileTypes: true })) {
|
|
131
132
|
if (!entry.isFile() || !entry.name.endsWith(".ts"))
|
|
@@ -133,9 +134,10 @@ function collectRigValidatorBuildTargets(input) {
|
|
|
133
134
|
const check = entry.name.replace(/\.ts$/, "");
|
|
134
135
|
if (!check || check === "index" || check === "shared")
|
|
135
136
|
continue;
|
|
137
|
+
const validatorName = `${category.name}-${check}`;
|
|
136
138
|
targets.push({
|
|
137
139
|
source: `packages/runtime/src/control-plane/validators/${category.name}/${entry.name}`,
|
|
138
|
-
dest: resolve3(input.imageDir, `bin/validators/${
|
|
140
|
+
dest: resolve3(input.imageDir, `bin/validators/${validatorName}`),
|
|
139
141
|
cwd: input.hostProjectRoot
|
|
140
142
|
});
|
|
141
143
|
}
|
|
@@ -147,15 +149,22 @@ async function findLatestDistBinary(projectRoot) {
|
|
|
147
149
|
if (!existsSync(distRoot)) {
|
|
148
150
|
return null;
|
|
149
151
|
}
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
152
|
+
const candidates = [];
|
|
153
|
+
for (const entry of readdirSync(distRoot, { withFileTypes: true })) {
|
|
154
|
+
if (!entry.name.startsWith("rig-") && entry.name !== "rig")
|
|
155
|
+
continue;
|
|
156
|
+
const entryPath = resolve3(distRoot, entry.name);
|
|
157
|
+
const binary = entry.isDirectory() ? resolve3(entryPath, "bin", "rig") : entryPath;
|
|
158
|
+
try {
|
|
159
|
+
const stat = statSync(binary);
|
|
160
|
+
if (stat.isFile())
|
|
161
|
+
candidates.push({ path: binary, mtimeMs: stat.mtimeMs });
|
|
162
|
+
} catch {}
|
|
163
|
+
}
|
|
164
|
+
candidates.sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
165
|
+
for (const { path } of candidates) {
|
|
166
|
+
if (await isRunnableRigBinary(path, projectRoot))
|
|
167
|
+
return path;
|
|
159
168
|
}
|
|
160
169
|
return null;
|
|
161
170
|
}
|
|
@@ -194,9 +203,8 @@ async function executeDist(context, args) {
|
|
|
194
203
|
const { value: outputDir, rest: pending } = takeOption(rest, "--output-dir");
|
|
195
204
|
requireNoExtraArgs(pending, "rig dist build [--output-dir <dir>]");
|
|
196
205
|
const commandParts = ["bun", "run", "packages/cli/bin/build-rig-binaries.ts"];
|
|
197
|
-
if (outputDir)
|
|
206
|
+
if (outputDir)
|
|
198
207
|
commandParts.push("--output-dir", outputDir);
|
|
199
|
-
}
|
|
200
208
|
await context.runCommand(commandParts);
|
|
201
209
|
return { ok: true, group: "dist", command, details: { outputDir: outputDir || null } };
|
|
202
210
|
}
|
|
@@ -204,9 +212,9 @@ async function executeDist(context, args) {
|
|
|
204
212
|
let pending = rest;
|
|
205
213
|
const scopeResult = takeOption(pending, "--scope");
|
|
206
214
|
pending = scopeResult.rest;
|
|
207
|
-
const pathResult = takeOption(pending, "--
|
|
215
|
+
const pathResult = takeOption(pending, "--dir");
|
|
208
216
|
pending = pathResult.rest;
|
|
209
|
-
requireNoExtraArgs(pending, "rig dist install [--scope user|system] [--
|
|
217
|
+
requireNoExtraArgs(pending, "rig dist install [--scope user|system] [--dir <dir>]");
|
|
210
218
|
const scope = parseInstallScope(scopeResult.value);
|
|
211
219
|
const installDir = resolveInstallDir(scope, pathResult.value);
|
|
212
220
|
mkdirSync(installDir, { recursive: true });
|
|
@@ -400,7 +408,7 @@ async function executeDist(context, args) {
|
|
|
400
408
|
return { ok: true, group: "dist", command, details: { imageId: currentId, count: targets.length } };
|
|
401
409
|
}
|
|
402
410
|
default:
|
|
403
|
-
throw new CliError(`Unknown dist command: ${command}`, 1, { hint: "Run `rig dist --help` \u2014 commands are build|install|doctor." });
|
|
411
|
+
throw new CliError(`Unknown dist command: ${command}`, 1, { hint: "Run `rig dist --help` \u2014 commands are build|install|doctor|rebuild-agent." });
|
|
404
412
|
}
|
|
405
413
|
}
|
|
406
414
|
export {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { CommandOutcome } from "@rig/runtime
|
|
1
|
+
import type { CommandOutcome } from "@rig/runtime";
|
|
2
2
|
import { type RunnerContext } from "../runner";
|
|
3
3
|
export declare function executeDoctor(context: RunnerContext, args: string[]): Promise<CommandOutcome>;
|