@h-rig/cli 0.0.6-alpha.27 → 0.0.6-alpha.280

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 (52) hide show
  1. package/README.md +6 -28
  2. package/package.json +11 -28
  3. package/dist/bin/build-rig-binaries.js +0 -107
  4. package/dist/bin/rig.js +0 -11321
  5. package/dist/src/commands/_authority-runs.js +0 -111
  6. package/dist/src/commands/_cli-format.js +0 -164
  7. package/dist/src/commands/_connection-state.js +0 -123
  8. package/dist/src/commands/_doctor-checks.js +0 -507
  9. package/dist/src/commands/_help-catalog.js +0 -203
  10. package/dist/src/commands/_operator-surface.js +0 -204
  11. package/dist/src/commands/_operator-view.js +0 -1147
  12. package/dist/src/commands/_parsers.js +0 -107
  13. package/dist/src/commands/_paths.js +0 -50
  14. package/dist/src/commands/_pi-frontend.js +0 -843
  15. package/dist/src/commands/_pi-install.js +0 -185
  16. package/dist/src/commands/_pi-worker-bridge-extension.js +0 -761
  17. package/dist/src/commands/_policy.js +0 -79
  18. package/dist/src/commands/_preflight.js +0 -403
  19. package/dist/src/commands/_probes.js +0 -13
  20. package/dist/src/commands/_run-driver-helpers.js +0 -289
  21. package/dist/src/commands/_server-client.js +0 -514
  22. package/dist/src/commands/_snapshot-upload.js +0 -318
  23. package/dist/src/commands/_task-picker.js +0 -76
  24. package/dist/src/commands/agent.js +0 -499
  25. package/dist/src/commands/browser.js +0 -890
  26. package/dist/src/commands/connect.js +0 -288
  27. package/dist/src/commands/dist.js +0 -402
  28. package/dist/src/commands/doctor.js +0 -517
  29. package/dist/src/commands/github.js +0 -281
  30. package/dist/src/commands/inbox.js +0 -160
  31. package/dist/src/commands/init.js +0 -1563
  32. package/dist/src/commands/inspect.js +0 -174
  33. package/dist/src/commands/inspector.js +0 -256
  34. package/dist/src/commands/plugin.js +0 -167
  35. package/dist/src/commands/profile-and-review.js +0 -178
  36. package/dist/src/commands/queue.js +0 -198
  37. package/dist/src/commands/remote.js +0 -507
  38. package/dist/src/commands/repo-git-harness.js +0 -221
  39. package/dist/src/commands/run.js +0 -1688
  40. package/dist/src/commands/server.js +0 -571
  41. package/dist/src/commands/setup.js +0 -687
  42. package/dist/src/commands/task-report-bug.js +0 -1083
  43. package/dist/src/commands/task-run-driver.js +0 -2600
  44. package/dist/src/commands/task.js +0 -2200
  45. package/dist/src/commands/test.js +0 -39
  46. package/dist/src/commands/workspace.js +0 -123
  47. package/dist/src/commands.js +0 -11000
  48. package/dist/src/index.js +0 -11339
  49. package/dist/src/launcher.js +0 -133
  50. package/dist/src/report-bug.js +0 -260
  51. package/dist/src/runner.js +0 -273
  52. package/dist/src/withMutedConsole.js +0 -42
package/README.md CHANGED
@@ -1,30 +1,8 @@
1
- # CLI Package
1
+ # @h-rig/cli
2
2
 
3
- `@rig/cli` exposes the `rig` command.
3
+ Version anchor for the prebuilt, self-contained `rig` binaries, published per platform as `@h-rig/cli-<os>-<arch>`. There is no JS entrypoint; the installer links `rig` and `rig-run` directly to the platform binary.
4
4
 
5
- ## Purpose
6
-
7
- - route operator commands into the runtime control plane
8
- - provide setup, server, task, review, queue, and profile entry points
9
-
10
- ## Common command
11
-
12
- - `bun run rig -- <subcommand>`
13
- - `bun run rig report-bug`
14
- - `bun run rig report-bug --no-prompt --browser --title "OTP submit fails" --url "https://dev.rig.hptestingsite.com/login?next=%2F" --environment shared-dev --asset ./path/to/screenshot.png --video ./path/to/recording.webm`
15
- - `bun run rig report-bug --no-prompt --no-browser --title "OTP API fails" --url "https://dev.rig.hptestingsite.com/api/auth/email/otp/verify" --asset ./path/to/api-response.txt`
16
- - `bun run rig browser --help`
17
- - `bun run rig browser explain`
18
- - `bun run rig browser hp-next dev`
19
-
20
- ## Notes
21
-
22
- - CLI behavior should stay thin and delegate business logic into `@rig/runtime`.
23
- - `report-bug` uses `@clack/prompts` for its interactive wizard and asks whether Rig Browser is required.
24
- - `report-bug` creates a runnable beads `task` by default, writes committable evidence under `repos/spliter-monorepo/artifacts/<task-id>/bug-report/`, and upserts task-config wiring.
25
- - `report-bug --no-beads` keeps the old draft-only behavior under `docs/bug-reports/`.
26
- - `report-bug --no-browser` skips `browser.json`, the `browser-required` label, browser validation, and browser helper commands while preserving task assets.
27
- - `report-bug` accepts drag-and-drop asset values through `--asset` and `--video`; copied files are stored under `bug-report/assets/` and indexed in `manifest.json`.
28
- - Browser bug-report evidence must be tracked by git before validation/handoff; untracked assets fail `integration:browser-bug-report-task`.
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.
5
+ ```
6
+ curl -fsSL https://where.rig-does.work/install | bash
7
+ rig --help
8
+ ```
package/package.json CHANGED
@@ -1,33 +1,16 @@
1
1
  {
2
2
  "name": "@h-rig/cli",
3
- "version": "0.0.6-alpha.27",
4
- "type": "module",
5
- "description": "Rig package",
6
- "license": "UNLICENSED",
7
- "files": [
8
- "dist",
9
- "README.md"
10
- ],
11
- "exports": {
12
- ".": {
13
- "import": "./dist/src/index.js"
14
- }
3
+ "version": "0.0.6-alpha.280",
4
+ "description": "Rig — version anchor for the prebuilt single-file rig binaries (@h-rig/cli-<os>-<arch>). Install: curl -fsSL https://where.rig-does.work/install | bash",
5
+ "license": "MIT",
6
+ "optionalDependencies": {
7
+ "@h-rig/cli-darwin-arm64": "0.0.6-alpha.280",
8
+ "@h-rig/cli-darwin-x64": "0.0.6-alpha.280",
9
+ "@h-rig/cli-linux-x64": "0.0.6-alpha.280",
10
+ "@h-rig/cli-linux-arm64": "0.0.6-alpha.280",
11
+ "@h-rig/cli-win32-x64": "0.0.6-alpha.280"
15
12
  },
16
- "engines": {
17
- "bun": ">=1.3.11"
18
- },
19
- "main": "./dist/src/index.js",
20
- "module": "./dist/src/index.js",
21
- "bin": {
22
- "rig": "./dist/bin/rig.js"
23
- },
24
- "dependencies": {
25
- "@clack/prompts": "^1.2.0",
26
- "@earendil-works/pi-coding-agent": "npm:@h-rig/pi-coding-agent@0.0.6-alpha.27",
27
- "@rig/core": "npm:@h-rig/core@0.0.6-alpha.27",
28
- "@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.27",
29
- "@rig/client": "npm:@h-rig/client@0.0.6-alpha.27",
30
- "@rig/server": "npm:@h-rig/server@0.0.6-alpha.27",
31
- "picocolors": "^1.1.1"
13
+ "rigRelease": {
14
+ "gitSha": "7c059da2da309272b17843dab696067c78edae96"
32
15
  }
33
16
  }
@@ -1,107 +0,0 @@
1
- #!/usr/bin/env bun
2
- // @bun
3
-
4
- // packages/cli/bin/build-rig-binaries.ts
5
- import { cpSync, existsSync, mkdirSync, readFileSync } from "fs";
6
- import { resolve } from "path";
7
- import { runCapture } from "@rig/runtime/control-plane/native/utils";
8
- import { buildRuntimeBinary } from "@rig/runtime/binary-run";
9
- function readCliVersion(rootDir) {
10
- try {
11
- const pkg = JSON.parse(readFileSync(resolve(rootDir, "packages/cli/package.json"), "utf-8"));
12
- return pkg.version || "0.0.0-dev";
13
- } catch {
14
- return "0.0.0-dev";
15
- }
16
- }
17
- async function main() {
18
- const rootDir = resolve(import.meta.dir, "..", "..", "..");
19
- process.chdir(rootDir);
20
- const args = parseArgs(process.argv.slice(2));
21
- const stamp = timestamp();
22
- const outputDir = args.outputDir || resolve(rootDir, ".rig/dist", `rig-${stamp}`);
23
- const binDir = resolve(outputDir, "bin");
24
- const runtimeDir = resolve(outputDir, "runtime", "rig");
25
- mkdirSync(binDir, { recursive: true });
26
- mkdirSync(runtimeDir, { recursive: true });
27
- const cliVersion = readCliVersion(rootDir);
28
- await buildBinary("packages/cli/bin/rig.ts", resolve(binDir, "rig"), rootDir, {
29
- "process.env.RIG_CLI_VERSION": JSON.stringify(cliVersion)
30
- });
31
- await buildBinary("packages/runtime/bin/rig-agent-dispatch.ts", resolve(binDir, "rig-agent"), rootDir);
32
- for (const entry of [
33
- "hooks",
34
- "lib",
35
- "tools",
36
- "templates",
37
- "policy",
38
- "plugins",
39
- "config.sh",
40
- "task-config.json"
41
- ]) {
42
- const source = resolve(rootDir, "rig", entry);
43
- if (existsSync(source)) {
44
- cpSync(source, resolve(runtimeDir, entry), { recursive: true });
45
- }
46
- }
47
- const manifest = {
48
- name: "project-rig-harness",
49
- version: cliVersion,
50
- builtAt: new Date().toISOString(),
51
- gitHead: runCapture(["git", "rev-parse", "HEAD"], rootDir).stdout.trim() || "unknown",
52
- bunVersion: Bun.version,
53
- binaries: {
54
- rig: "bin/rig",
55
- rigAgent: "bin/rig-agent"
56
- }
57
- };
58
- await Bun.write(resolve(outputDir, "manifest.json"), `${JSON.stringify(manifest, null, 2)}
59
- `);
60
- const archive = `${outputDir}.tar.gz`;
61
- const tar = await Bun.$`tar -czf ${archive} -C ${outputDir} .`.cwd(rootDir).quiet().nothrow();
62
- if (tar.exitCode !== 0) {
63
- throw new Error(`Failed to create archive: ${tar.stderr.toString() || tar.stdout.toString()}`);
64
- }
65
- console.log("Build complete");
66
- console.log(`- directory: ${outputDir}`);
67
- console.log(`- archive: ${archive}`);
68
- }
69
- function parseArgs(argv) {
70
- const args = {};
71
- for (let i = 0;i < argv.length; i += 1) {
72
- const current = argv[i];
73
- if (current === "--output-dir") {
74
- const value = argv[i + 1];
75
- if (!value) {
76
- throw new Error("Missing value for --output-dir");
77
- }
78
- args.outputDir = resolve(process.cwd(), value);
79
- i += 1;
80
- continue;
81
- }
82
- throw new Error(`Unknown option: ${current}`);
83
- }
84
- return args;
85
- }
86
- async function buildBinary(source, output, cwd, define) {
87
- await buildRuntimeBinary({
88
- sourcePath: source,
89
- outputPath: output,
90
- cwd,
91
- ...define ? { define } : {}
92
- });
93
- }
94
- function timestamp() {
95
- const date = new Date;
96
- const yyyy = date.getFullYear();
97
- const mm = `${date.getMonth() + 1}`.padStart(2, "0");
98
- const dd = `${date.getDate()}`.padStart(2, "0");
99
- const hh = `${date.getHours()}`.padStart(2, "0");
100
- const min = `${date.getMinutes()}`.padStart(2, "0");
101
- const sec = `${date.getSeconds()}`.padStart(2, "0");
102
- return `${yyyy}${mm}${dd}-${hh}${min}${sec}`;
103
- }
104
- main().catch((error) => {
105
- console.error(error instanceof Error ? error.message : error);
106
- process.exit(1);
107
- });