@h-rig/cli 0.0.6-alpha.24 → 0.0.6-alpha.241

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 (51) hide show
  1. package/README.md +6 -28
  2. package/package.json +13 -28
  3. package/dist/bin/build-rig-binaries.js +0 -107
  4. package/dist/bin/rig.js +0 -11112
  5. package/dist/src/commands/_authority-runs.js +0 -111
  6. package/dist/src/commands/_cli-format.js +0 -106
  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/_operator-surface.js +0 -204
  10. package/dist/src/commands/_operator-view.js +0 -1147
  11. package/dist/src/commands/_parsers.js +0 -107
  12. package/dist/src/commands/_paths.js +0 -50
  13. package/dist/src/commands/_pi-frontend.js +0 -843
  14. package/dist/src/commands/_pi-install.js +0 -185
  15. package/dist/src/commands/_pi-worker-bridge-extension.js +0 -761
  16. package/dist/src/commands/_policy.js +0 -79
  17. package/dist/src/commands/_preflight.js +0 -403
  18. package/dist/src/commands/_probes.js +0 -13
  19. package/dist/src/commands/_run-driver-helpers.js +0 -289
  20. package/dist/src/commands/_server-client.js +0 -514
  21. package/dist/src/commands/_snapshot-upload.js +0 -318
  22. package/dist/src/commands/_task-picker.js +0 -76
  23. package/dist/src/commands/agent.js +0 -499
  24. package/dist/src/commands/browser.js +0 -890
  25. package/dist/src/commands/connect.js +0 -180
  26. package/dist/src/commands/dist.js +0 -402
  27. package/dist/src/commands/doctor.js +0 -517
  28. package/dist/src/commands/github.js +0 -281
  29. package/dist/src/commands/inbox.js +0 -160
  30. package/dist/src/commands/init.js +0 -1563
  31. package/dist/src/commands/inspect.js +0 -174
  32. package/dist/src/commands/inspector.js +0 -256
  33. package/dist/src/commands/plugin.js +0 -167
  34. package/dist/src/commands/profile-and-review.js +0 -178
  35. package/dist/src/commands/queue.js +0 -198
  36. package/dist/src/commands/remote.js +0 -507
  37. package/dist/src/commands/repo-git-harness.js +0 -221
  38. package/dist/src/commands/run.js +0 -1674
  39. package/dist/src/commands/server.js +0 -373
  40. package/dist/src/commands/setup.js +0 -687
  41. package/dist/src/commands/task-report-bug.js +0 -1083
  42. package/dist/src/commands/task-run-driver.js +0 -2600
  43. package/dist/src/commands/task.js +0 -2178
  44. package/dist/src/commands/test.js +0 -39
  45. package/dist/src/commands/workspace.js +0 -123
  46. package/dist/src/commands.js +0 -10791
  47. package/dist/src/index.js +0 -11130
  48. package/dist/src/launcher.js +0 -133
  49. package/dist/src/report-bug.js +0 -260
  50. package/dist/src/runner.js +0 -273
  51. package/dist/src/withMutedConsole.js +0 -42
@@ -1,107 +0,0 @@
1
- // @bun
2
- var __require = import.meta.require;
3
-
4
- // packages/cli/src/commands/_parsers.ts
5
- import { homedir } from "os";
6
- import { resolve } from "path";
7
-
8
- // packages/cli/src/runner.ts
9
- import { EventBus } from "@rig/runtime/control-plane/runtime/events";
10
- import { CliError } from "@rig/runtime/control-plane/errors";
11
- import { evaluate, loadPolicy, resolveAction } from "@rig/runtime/control-plane/runtime/guard";
12
- import { PluginManager } from "@rig/runtime/control-plane/runtime/plugins";
13
- import { loadRuntimeContextFromEnv } from "@rig/runtime/control-plane/runtime/context";
14
- import { buildBinary } from "@rig/runtime/control-plane/runtime/isolation";
15
- import { CliError as CliError2 } from "@rig/runtime/control-plane/errors";
16
-
17
- // packages/cli/src/commands/_parsers.ts
18
- function parsePositiveInt(value, option, fallback) {
19
- if (!value) {
20
- return fallback;
21
- }
22
- const parsed = Number.parseInt(value, 10);
23
- if (!Number.isFinite(parsed) || parsed <= 0) {
24
- throw new CliError2(`Invalid ${option} value: ${value}`);
25
- }
26
- return parsed;
27
- }
28
- function parseOptionalPositiveInt(value, option) {
29
- if (!value) {
30
- return;
31
- }
32
- const parsed = Number.parseInt(value, 10);
33
- if (!Number.isFinite(parsed) || parsed <= 0) {
34
- throw new CliError2(`Invalid ${option} value: ${value}`);
35
- }
36
- return parsed;
37
- }
38
- function parseRequiredPositiveInt(value, option) {
39
- if (!value) {
40
- throw new CliError2(`Missing value for ${option}.`);
41
- }
42
- const parsed = Number.parseInt(value, 10);
43
- if (!Number.isFinite(parsed) || parsed <= 0) {
44
- throw new CliError2(`Invalid ${option} value: ${value}`);
45
- }
46
- return parsed;
47
- }
48
- function parseAction(value) {
49
- if (!value || value === "validate") {
50
- return "validate";
51
- }
52
- if (value === "verify") {
53
- return "verify";
54
- }
55
- if (value === "pipeline") {
56
- return "pipeline";
57
- }
58
- throw new CliError2(`Invalid --action value: ${value}. Use validate, verify, or pipeline.`);
59
- }
60
- function parseIsolationMode(value, allowOff) {
61
- if (!value) {
62
- return "worktree";
63
- }
64
- if (value === "worktree") {
65
- return value;
66
- }
67
- if (allowOff && value === "off") {
68
- return value;
69
- }
70
- throw new CliError2(`Invalid isolation mode: ${value}. Use ${allowOff ? "off|" : ""}worktree.`);
71
- }
72
- function parseInstallScope(value) {
73
- if (!value || value === "user") {
74
- return "user";
75
- }
76
- if (value === "system") {
77
- return "system";
78
- }
79
- throw new CliError2(`Invalid --scope value: ${value}. Use user|system.`);
80
- }
81
- function resolveInstallDir(scope, explicitPath) {
82
- if (explicitPath) {
83
- return resolve(explicitPath);
84
- }
85
- if (scope === "system") {
86
- return "/usr/local/bin";
87
- }
88
- return resolve(homedir(), ".local/bin");
89
- }
90
- async function loadRigConfigOrNull(projectRoot) {
91
- try {
92
- const { loadConfig } = await import("@rig/core/load-config");
93
- return await loadConfig(projectRoot);
94
- } catch {
95
- return null;
96
- }
97
- }
98
- export {
99
- resolveInstallDir,
100
- parseRequiredPositiveInt,
101
- parsePositiveInt,
102
- parseOptionalPositiveInt,
103
- parseIsolationMode,
104
- parseInstallScope,
105
- parseAction,
106
- loadRigConfigOrNull
107
- };
@@ -1,50 +0,0 @@
1
- // @bun
2
- // packages/cli/src/commands/_paths.ts
3
- import { resolve } from "path";
4
- import { resolveMonorepoRoot } from "@rig/runtime/control-plane/native/utils";
5
- function resolveControlPlaneMonorepoRoot(projectRoot) {
6
- return resolveMonorepoRoot(projectRoot);
7
- }
8
- function resolveControlPlaneTaskConfigPath(projectRoot) {
9
- return resolve(resolveControlPlaneMonorepoRoot(projectRoot), ".rig", "task-config.json");
10
- }
11
- function resolveControlPlaneHostStateRoot(projectRoot) {
12
- return resolve(projectRoot, ".rig");
13
- }
14
- function resolveControlPlaneHostStateDir(projectRoot) {
15
- return resolve(resolveControlPlaneHostStateRoot(projectRoot), "state");
16
- }
17
- function resolveControlPlaneHostLogsDir(projectRoot) {
18
- return resolve(resolveControlPlaneHostStateRoot(projectRoot), "logs");
19
- }
20
- function resolveControlPlaneHostBinDir(projectRoot) {
21
- return resolve(resolveControlPlaneHostStateRoot(projectRoot), "bin");
22
- }
23
- function resolveControlPlaneHostDistDir(projectRoot) {
24
- return resolve(resolveControlPlaneHostStateRoot(projectRoot), "dist");
25
- }
26
- function resolveControlPlaneMonorepoStateRoot(projectRoot) {
27
- return resolve(resolveControlPlaneMonorepoRoot(projectRoot), ".rig");
28
- }
29
- function resolveControlPlaneMonorepoRuntimeDir(projectRoot) {
30
- return resolve(resolveControlPlaneMonorepoStateRoot(projectRoot), "runtime");
31
- }
32
- function resolveControlPlaneArtifactsDir(projectRoot) {
33
- return resolve(resolveControlPlaneMonorepoRoot(projectRoot), "artifacts");
34
- }
35
- function resolveControlPlaneDefinitionRoot(projectRoot) {
36
- return resolve(projectRoot, "rig");
37
- }
38
- export {
39
- resolveControlPlaneTaskConfigPath,
40
- resolveControlPlaneMonorepoStateRoot,
41
- resolveControlPlaneMonorepoRuntimeDir,
42
- resolveControlPlaneMonorepoRoot,
43
- resolveControlPlaneHostStateRoot,
44
- resolveControlPlaneHostStateDir,
45
- resolveControlPlaneHostLogsDir,
46
- resolveControlPlaneHostDistDir,
47
- resolveControlPlaneHostBinDir,
48
- resolveControlPlaneDefinitionRoot,
49
- resolveControlPlaneArtifactsDir
50
- };