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

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 (38) hide show
  1. package/dist/bin/rig.js +1038 -620
  2. package/dist/src/commands/_cli-format.js +211 -6
  3. package/dist/src/commands/_connection-state.js +1 -1
  4. package/dist/src/commands/_doctor-checks.js +3 -3
  5. package/dist/src/commands/_help-catalog.js +225 -64
  6. package/dist/src/commands/_operator-view.js +1 -1
  7. package/dist/src/commands/_pi-frontend.js +1 -1
  8. package/dist/src/commands/_pi-worker-bridge-extension.js +1 -1
  9. package/dist/src/commands/_preflight.js +2 -2
  10. package/dist/src/commands/_server-client.js +1 -1
  11. package/dist/src/commands/_snapshot-upload.js +1 -1
  12. package/dist/src/commands/agent.js +7 -7
  13. package/dist/src/commands/browser.js +4 -4
  14. package/dist/src/commands/connect.js +5 -4
  15. package/dist/src/commands/dist.js +4 -4
  16. package/dist/src/commands/doctor.js +3 -3
  17. package/dist/src/commands/github.js +1 -1
  18. package/dist/src/commands/inbox.js +351 -29
  19. package/dist/src/commands/init.js +3 -3
  20. package/dist/src/commands/inspect.js +10 -10
  21. package/dist/src/commands/inspector.js +2 -2
  22. package/dist/src/commands/plugin.js +3 -3
  23. package/dist/src/commands/profile-and-review.js +8 -8
  24. package/dist/src/commands/queue.js +1 -1
  25. package/dist/src/commands/remote.js +18 -18
  26. package/dist/src/commands/repo-git-harness.js +4 -4
  27. package/dist/src/commands/run.js +157 -37
  28. package/dist/src/commands/server.js +6 -5
  29. package/dist/src/commands/setup.js +8 -8
  30. package/dist/src/commands/task-report-bug.js +5 -5
  31. package/dist/src/commands/task-run-driver.js +1 -1
  32. package/dist/src/commands/task.js +451 -45
  33. package/dist/src/commands/test.js +3 -3
  34. package/dist/src/commands/workspace.js +4 -4
  35. package/dist/src/commands.js +1038 -620
  36. package/dist/src/index.js +1038 -620
  37. package/dist/src/report-bug.js +3 -3
  38. package/package.json +6 -6
@@ -253,7 +253,7 @@ function resolveSelectedConnection(projectRoot, options = {}) {
253
253
  const global = readGlobalConnections(options);
254
254
  const connection = global.connections[repo.selected];
255
255
  if (!connection) {
256
- throw new CliError2(`Selected Rig connection "${repo.selected}" was not found. Run \`rig connect list\` or \`rig connect use local\`.`, 1);
256
+ throw new CliError2(`Selected Rig server "${repo.selected}" was not found. Run \`rig server list\` or \`rig server use local\`.`, 1);
257
257
  }
258
258
  return { alias: repo.selected, connection };
259
259
  }
@@ -481,7 +481,7 @@ async function runRigDoctorChecks(options) {
481
481
  const taskSourceKind = config?.taskSource?.kind;
482
482
  checks.push(taskSourceKind ? check("task-source", "task source configured", "pass", taskSourceKind) : check("task-source", "task source configured", "fail", "missing taskSource", "Configure taskSource in rig.config.ts."));
483
483
  const repo = readRepoConnection(projectRoot);
484
- checks.push(repo ? check("project-link", "repo selected Rig connection", repo.project ? "pass" : "warn", `${repo.selected}${repo.project ? ` -> ${repo.project}` : ""}`, "Run `rig init --yes --repo owner/repo` to link this checkout to a GitHub repo slug.") : check("project-link", "repo selected Rig connection", "fail", "missing .rig/state/connection.json", "Run `rig init` or `rig connect use <alias|local>`."));
484
+ checks.push(repo ? check("project-link", "repo selected Rig server", repo.project ? "pass" : "warn", `${repo.selected}${repo.project ? ` -> ${repo.project}` : ""}`, "Run `rig init --yes --repo owner/repo` to link this checkout to a GitHub repo slug.") : check("project-link", "repo selected Rig server", "fail", "missing .rig/state/connection.json", "Run `rig init` or `rig server use <alias|local>`."));
485
485
  const selected = (() => {
486
486
  try {
487
487
  return resolveSelectedConnection(projectRoot);
@@ -489,7 +489,7 @@ async function runRigDoctorChecks(options) {
489
489
  return null;
490
490
  }
491
491
  })();
492
- checks.push(selected ? check("connection", "selected server connection", "pass", selected.connection.kind === "remote" ? selected.connection.baseUrl : "local auto") : check("connection", "selected server connection", repo ? "fail" : "warn", repo ? "selected alias is missing" : "will auto-start local server", repo ? "Run `rig connect list` and `rig connect use <alias|local>`." : undefined));
492
+ checks.push(selected ? check("connection", "selected server connection", "pass", selected.connection.kind === "remote" ? selected.connection.baseUrl : "local auto") : check("connection", "selected server", repo ? "fail" : "warn", repo ? "selected alias is missing" : "will auto-start local server", repo ? "Run `rig server list` and `rig server use <alias|local>`." : undefined));
493
493
  let server = null;
494
494
  try {
495
495
  server = await (options.resolveServer ?? ensureServerForCli)(projectRoot);
@@ -575,7 +575,7 @@ async function executeSetup(context, args) {
575
575
  const [command = "check", ...rest] = args;
576
576
  switch (command) {
577
577
  case "bootstrap":
578
- requireNoExtraArgs(rest, "bun run rig setup bootstrap");
578
+ requireNoExtraArgs(rest, "rig setup bootstrap");
579
579
  {
580
580
  const hostBash = Bun.which("bash") || "/bin/bash";
581
581
  const env = { ...process.env };
@@ -598,21 +598,21 @@ async function executeSetup(context, args) {
598
598
  }
599
599
  return { ok: true, group: "setup", command };
600
600
  case "check":
601
- requireNoExtraArgs(rest, `bun run rig setup ${command}`);
601
+ requireNoExtraArgs(rest, `rig setup ${command}`);
602
602
  {
603
603
  const checks = await withMutedConsole(context.outputMode === "json", () => runSetupCheck(context.projectRoot));
604
604
  return { ok: true, group: "setup", command, details: { checks, failures: countDoctorFailures(checks) } };
605
605
  }
606
606
  case "setup":
607
- requireNoExtraArgs(rest, "bun run rig setup setup");
607
+ requireNoExtraArgs(rest, "rig setup setup");
608
608
  withMutedConsole(context.outputMode === "json", () => runSetupInit(context.projectRoot));
609
609
  return { ok: true, group: "setup", command };
610
610
  case "preflight":
611
- requireNoExtraArgs(rest, "bun run rig setup preflight");
611
+ requireNoExtraArgs(rest, "rig setup preflight");
612
612
  await withMutedConsole(context.outputMode === "json", () => runSetupPreflight(context.projectRoot));
613
613
  return { ok: true, group: "setup", command };
614
614
  case "install-agent-shell":
615
- requireNoExtraArgs(rest, "bun run rig setup install-agent-shell");
615
+ requireNoExtraArgs(rest, "rig setup install-agent-shell");
616
616
  if (context.outputMode === "text") {
617
617
  console.log("install-agent-shell is deprecated. Runtime shells now use compiled rig-agent directly.");
618
618
  }
@@ -241,15 +241,15 @@ function buildBugReportMarkdown(input, browser, screenshots, assets) {
241
241
  ...input.issueId ? [
242
242
  `- Canonical task assets live under \`artifacts/${input.issueId}/bug-report/\`.`,
243
243
  `- Start with \`artifacts/${input.issueId}/bug-report/task.md\` and the files in \`artifacts/${input.issueId}/bug-report/assets/\`.`,
244
- browserRequired ? `- Run \`bun run rig task info --task ${input.issueId}\` to confirm browser wiring before debugging.` : `- Run \`bun run rig task info --task ${input.issueId}\` to confirm scope and artifact links before debugging.`
244
+ browserRequired ? `- Run \`rig task info --task ${input.issueId}\` to confirm browser wiring before debugging.` : `- Run \`rig task info --task ${input.issueId}\` to confirm scope and artifact links before debugging.`
245
245
  ] : [
246
- "- Draft-only report: convert this into a beads task before assigning it to an agent run."
246
+ "- Draft-only report: convert this into a Rig task before assigning it to an agent run."
247
247
  ],
248
248
  "",
249
249
  "## Validation",
250
250
  "",
251
251
  "```bash",
252
- ...input.issueId ? [`bun run rig task validate --task ${input.issueId}`] : [],
252
+ ...input.issueId ? [`rig task validate --task ${input.issueId}`] : [],
253
253
  ...browserRequired ? [
254
254
  "bun run app:check:browser:hp-next",
255
255
  "bun run app:e2e:browser:hp-next"
@@ -396,7 +396,7 @@ async function executeTaskReportBug(context, args) {
396
396
  pending = outputRootResult.rest;
397
397
  const slugResult = takeOption(pending, "--slug");
398
398
  pending = slugResult.rest;
399
- requireNoExtraArgs(pending, "bun run rig report-bug [--no-prompt] [--no-beads] [--browser|--no-browser] --title <text> --url <url> [--asset <dragged-file>]");
399
+ requireNoExtraArgs(pending, "rig report-bug [--no-prompt] [--no-beads] [--browser|--no-browser] --title <text> --url <url> [--asset <dragged-file>]");
400
400
  let draft = {
401
401
  outputRoot: outputRootResult.value || "",
402
402
  title: titleResult.value,
@@ -501,7 +501,7 @@ async function executeTaskReportBug(context, args) {
501
501
  console.log(`Evidence assets: ${result.assetDir}`);
502
502
  if (taskConfigPath) {
503
503
  console.log(`Task config: ${taskConfigPath}`);
504
- console.log(`Run: bun run rig task info --task ${issueId}`);
504
+ console.log(`Run: rig task info --task ${issueId}`);
505
505
  }
506
506
  }
507
507
  return {
@@ -469,7 +469,7 @@ function resolveSelectedConnection(projectRoot, options = {}) {
469
469
  const global = readGlobalConnections(options);
470
470
  const connection = global.connections[repo.selected];
471
471
  if (!connection) {
472
- throw new CliError2(`Selected Rig connection "${repo.selected}" was not found. Run \`rig connect list\` or \`rig connect use local\`.`, 1);
472
+ throw new CliError2(`Selected Rig server "${repo.selected}" was not found. Run \`rig server list\` or \`rig server use local\`.`, 1);
473
473
  }
474
474
  return { alias: repo.selected, connection };
475
475
  }