@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
package/README.md
CHANGED
|
@@ -4,27 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
## Purpose
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
7
|
+
- launch upstream OMP with the Rig extension cockpit loaded
|
|
8
|
+
- keep the public root UX centered on bare `rig`, `rig --workspace <path>`, and
|
|
9
|
+
OMP collab joins
|
|
10
|
+
- fence legacy control-plane subcommands so retained automation paths are not
|
|
11
|
+
advertised as the current product flow
|
|
9
12
|
|
|
10
|
-
## Common
|
|
13
|
+
## Common commands
|
|
11
14
|
|
|
12
|
-
- `bun run rig
|
|
13
|
-
- `bun run rig
|
|
14
|
-
|
|
15
|
-
- `bun run rig
|
|
16
|
-
- `bun run rig
|
|
17
|
-
- `bun run rig browser explain`
|
|
18
|
-
- `bun run rig browser hp-next dev`
|
|
15
|
+
- `bun run rig` — open OMP with the Rig cockpit for the current workspace
|
|
16
|
+
- `bun run rig -- --workspace /path/to/repo` — open the cockpit scoped to a
|
|
17
|
+
specific workspace
|
|
18
|
+
- `bun run rig -- join <collab-link>` — join an encrypted OMP collab session
|
|
19
|
+
- `bun run rig -- --help` — show the root OMP/cockpit help
|
|
19
20
|
|
|
20
21
|
## Notes
|
|
21
22
|
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
- Key `report-bug` flags: `--browser`, `--no-browser`, `--summary`, `--steps`, `--expected`, `--actual`, `--evidence`, `--asset`, `--video`, `--screenshot`, `--priority`, `--labels`, `--parent`, `--assignee`, `--owner`, `--preset`, `--profile`, `--attach-url`, `--state-dir`, `--mode`, `--viewport`, `--output-dir`, `--slug`, and `--overwrite`.
|
|
30
|
-
- `rig browser` is the operator-friendly command family for Rig Browser help, hp-next launch/check/e2e/reset, and package-level CDP/profile diagnostics.
|
|
23
|
+
- Root command routing lives in `bin/rig.ts`; it forwards OMP launch/join/acp
|
|
24
|
+
arguments with `@rig/rig-extension` injected.
|
|
25
|
+
- Legacy groups such as `init`, `task`, `doctor`, `run`, `inspect`, `stats`,
|
|
26
|
+
and `inbox` must stay rejected or clearly compatibility-routed at the public
|
|
27
|
+
root.
|
|
28
|
+
- CLI behavior should stay thin and delegate product behavior to OMP extension
|
|
29
|
+
surfaces or narrow compatibility modules.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { cpSync, existsSync, mkdirSync, readFileSync } from "fs";
|
|
6
6
|
import { resolve } from "path";
|
|
7
7
|
import { runCapture } from "@rig/runtime/control-plane/native/utils";
|
|
8
|
-
import { buildRuntimeBinary } from "@rig/runtime/binary-run";
|
|
8
|
+
import { buildRuntimeBinary, runtimeRigCliBinaryExternals } from "@rig/runtime/binary-run";
|
|
9
9
|
function readCliVersion(rootDir) {
|
|
10
10
|
try {
|
|
11
11
|
const pkg = JSON.parse(readFileSync(resolve(rootDir, "packages/cli/package.json"), "utf-8"));
|
|
@@ -21,14 +21,17 @@ async function main() {
|
|
|
21
21
|
const stamp = timestamp();
|
|
22
22
|
const outputDir = args.outputDir || resolve(rootDir, ".rig/dist", `rig-${stamp}`);
|
|
23
23
|
const binDir = resolve(outputDir, "bin");
|
|
24
|
+
const configDir = resolve(outputDir, "config");
|
|
24
25
|
const runtimeDir = resolve(outputDir, "runtime", "rig");
|
|
25
26
|
mkdirSync(binDir, { recursive: true });
|
|
27
|
+
mkdirSync(configDir, { recursive: true });
|
|
26
28
|
mkdirSync(runtimeDir, { recursive: true });
|
|
27
29
|
const cliVersion = readCliVersion(rootDir);
|
|
28
30
|
await buildBinary("packages/cli/bin/rig.ts", resolve(binDir, "rig"), rootDir, {
|
|
29
31
|
"process.env.RIG_CLI_VERSION": JSON.stringify(cliVersion)
|
|
30
|
-
});
|
|
32
|
+
}, runtimeRigCliBinaryExternals);
|
|
31
33
|
await buildBinary("packages/runtime/bin/rig-agent-dispatch.ts", resolve(binDir, "rig-agent"), rootDir);
|
|
34
|
+
cpSync(resolve(rootDir, "packages/cli/config/rig-default-config.yml"), resolve(configDir, "rig-default-config.yml"));
|
|
32
35
|
for (const entry of [
|
|
33
36
|
"hooks",
|
|
34
37
|
"lib",
|
|
@@ -57,17 +60,21 @@ async function main() {
|
|
|
57
60
|
};
|
|
58
61
|
await Bun.write(resolve(outputDir, "manifest.json"), `${JSON.stringify(manifest, null, 2)}
|
|
59
62
|
`);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
let archive = null;
|
|
64
|
+
if (args.archive) {
|
|
65
|
+
archive = `${outputDir}.tar.gz`;
|
|
66
|
+
const tar = await Bun.$`tar -czf ${archive} -C ${outputDir} .`.cwd(rootDir).quiet().nothrow();
|
|
67
|
+
if (tar.exitCode !== 0) {
|
|
68
|
+
throw new Error(`Failed to create archive: ${tar.stderr.toString() || tar.stdout.toString()}`);
|
|
69
|
+
}
|
|
64
70
|
}
|
|
65
71
|
console.log("Build complete");
|
|
66
72
|
console.log(`- directory: ${outputDir}`);
|
|
67
|
-
|
|
73
|
+
if (archive)
|
|
74
|
+
console.log(`- archive: ${archive}`);
|
|
68
75
|
}
|
|
69
76
|
function parseArgs(argv) {
|
|
70
|
-
const args = {};
|
|
77
|
+
const args = { archive: true };
|
|
71
78
|
for (let i = 0;i < argv.length; i += 1) {
|
|
72
79
|
const current = argv[i];
|
|
73
80
|
if (current === "--output-dir") {
|
|
@@ -79,16 +86,21 @@ function parseArgs(argv) {
|
|
|
79
86
|
i += 1;
|
|
80
87
|
continue;
|
|
81
88
|
}
|
|
89
|
+
if (current === "--no-archive") {
|
|
90
|
+
args.archive = false;
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
82
93
|
throw new Error(`Unknown option: ${current}`);
|
|
83
94
|
}
|
|
84
95
|
return args;
|
|
85
96
|
}
|
|
86
|
-
async function buildBinary(source, output, cwd, define) {
|
|
97
|
+
async function buildBinary(source, output, cwd, define, external) {
|
|
87
98
|
await buildRuntimeBinary({
|
|
88
99
|
sourcePath: source,
|
|
89
100
|
outputPath: output,
|
|
90
101
|
cwd,
|
|
91
|
-
...define ? { define } : {}
|
|
102
|
+
...define ? { define } : {},
|
|
103
|
+
...external ? { external } : {}
|
|
92
104
|
});
|
|
93
105
|
}
|
|
94
106
|
function timestamp() {
|
package/dist/bin/rig.d.ts
CHANGED
|
@@ -1,2 +1,72 @@
|
|
|
1
|
-
|
|
1
|
+
export declare function resolveRigServerEntrypointArgv(argv: readonly string[]): string[] | null;
|
|
2
|
+
export declare function stripRigServerEntrypointArg(argv: readonly string[]): string[];
|
|
3
|
+
export declare function runRigServerEntrypoint(argv?: readonly string[]): Promise<boolean>;
|
|
4
|
+
export type RigRootRoute = {
|
|
5
|
+
readonly kind: "omp";
|
|
6
|
+
readonly argv: readonly string[];
|
|
7
|
+
readonly workspaceRoot?: string;
|
|
8
|
+
} | {
|
|
9
|
+
readonly kind: "run";
|
|
10
|
+
readonly taskRef: string;
|
|
11
|
+
readonly title?: string;
|
|
12
|
+
readonly model?: string;
|
|
13
|
+
readonly prompt?: string;
|
|
14
|
+
readonly workspaceRoot?: string;
|
|
15
|
+
} | {
|
|
16
|
+
readonly kind: "help";
|
|
17
|
+
readonly argv: readonly string[];
|
|
18
|
+
} | {
|
|
19
|
+
readonly kind: "version";
|
|
20
|
+
} | {
|
|
21
|
+
readonly kind: "operator";
|
|
22
|
+
readonly argv: readonly string[];
|
|
23
|
+
readonly workspaceRoot?: string;
|
|
24
|
+
} | {
|
|
25
|
+
readonly kind: "unsupported";
|
|
26
|
+
readonly argv: readonly string[];
|
|
27
|
+
readonly message: string;
|
|
28
|
+
};
|
|
29
|
+
export declare function resolveRigDefaultConfigPath(): string;
|
|
30
|
+
export declare function resolveRigRootRoute(argv: readonly string[]): RigRootRoute;
|
|
31
|
+
type RigExtensionTask = {
|
|
32
|
+
readonly id: string;
|
|
33
|
+
readonly title?: string | null;
|
|
34
|
+
readonly status?: string | null;
|
|
35
|
+
readonly source?: string | null;
|
|
36
|
+
readonly url?: string | null;
|
|
37
|
+
readonly body?: string | null;
|
|
38
|
+
};
|
|
39
|
+
type RigExtensionServerState = {
|
|
40
|
+
readonly alias: string;
|
|
41
|
+
readonly kind: "local" | "remote";
|
|
42
|
+
readonly baseUrl?: string | null;
|
|
43
|
+
readonly projectRoot?: string | null;
|
|
44
|
+
readonly status?: string | null;
|
|
45
|
+
readonly taskSource?: string | null;
|
|
46
|
+
};
|
|
47
|
+
type RigExtensionAttachResult = {
|
|
48
|
+
readonly sessionPath?: string | null;
|
|
49
|
+
readonly joinLink?: string | null;
|
|
50
|
+
readonly collabSessionId?: string | null;
|
|
51
|
+
};
|
|
52
|
+
type RigExtensionServerBridge = {
|
|
53
|
+
readonly selectedServer: {
|
|
54
|
+
readServerState(): Promise<RigExtensionServerState>;
|
|
55
|
+
listTasks(): Promise<readonly RigExtensionTask[]>;
|
|
56
|
+
getTask(taskId: string): Promise<RigExtensionTask | null>;
|
|
57
|
+
dispatchTask(input: {
|
|
58
|
+
readonly taskId: string;
|
|
59
|
+
readonly title?: string | null;
|
|
60
|
+
}): Promise<{
|
|
61
|
+
runId: string;
|
|
62
|
+
}>;
|
|
63
|
+
attachRun(input: {
|
|
64
|
+
readonly runId: string;
|
|
65
|
+
readonly taskId?: string;
|
|
66
|
+
}): Promise<RigExtensionAttachResult | null>;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export declare function createRigExtensionBridge(projectRoot: string): RigExtensionServerBridge;
|
|
70
|
+
export declare function installRigExtensionBridge(projectRoot: string, bridge?: RigExtensionServerBridge): RigExtensionServerBridge;
|
|
71
|
+
export declare function runRigRootCli(argv?: readonly string[]): Promise<void>;
|
|
2
72
|
export {};
|