@h-rig/cli 0.0.6-alpha.88 → 0.0.6-alpha.89
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/dist/bin/rig.js +1159 -292
- package/dist/src/app/board.js +462 -48
- package/dist/src/app-opentui/adapters/doctor.js +458 -46
- package/dist/src/app-opentui/adapters/family.js +670 -147
- package/dist/src/app-opentui/adapters/fleet.js +477 -46
- package/dist/src/app-opentui/adapters/inbox.js +477 -46
- package/dist/src/app-opentui/adapters/init.js +497 -74
- package/dist/src/app-opentui/adapters/inspect.js +477 -46
- package/dist/src/app-opentui/adapters/pi-attach.js +484 -53
- package/dist/src/app-opentui/adapters/run-detail.js +477 -46
- package/dist/src/app-opentui/adapters/server.d.ts +26 -0
- package/dist/src/app-opentui/adapters/server.js +676 -59
- package/dist/src/app-opentui/adapters/tasks.js +539 -81
- package/dist/src/app-opentui/autocomplete.js +4 -2
- package/dist/src/app-opentui/bootstrap.js +1155 -288
- package/dist/src/app-opentui/command-palette.js +37 -10
- package/dist/src/app-opentui/index.js +566 -89
- package/dist/src/app-opentui/intent.js +33 -8
- package/dist/src/app-opentui/keymap.js +43 -29
- package/dist/src/app-opentui/pi-host-child.js +465 -53
- package/dist/src/app-opentui/react/App.js +104 -44
- package/dist/src/app-opentui/react/ChromeHost.js +16 -4
- package/dist/src/app-opentui/react/launch.js +555 -88
- package/dist/src/app-opentui/react/nav.js +1 -1
- package/dist/src/app-opentui/registry.js +1062 -237
- package/dist/src/app-opentui/remote-link.d.ts +10 -0
- package/dist/src/app-opentui/remote-link.js +47 -0
- package/dist/src/app-opentui/runtime.js +566 -89
- package/dist/src/app-opentui/scenes/doctor.js +1 -1
- package/dist/src/app-opentui/scenes/error.js +50 -4
- package/dist/src/app-opentui/scenes/family.js +60 -6
- package/dist/src/app-opentui/scenes/fleet.js +65 -13
- package/dist/src/app-opentui/scenes/help.js +4 -2
- package/dist/src/app-opentui/scenes/init.js +12 -12
- package/dist/src/app-opentui/scenes/main.js +7 -7
- package/dist/src/app-opentui/scenes/server.js +83 -11
- package/dist/src/app-opentui/scenes/tasks.js +79 -16
- package/dist/src/app-opentui/state.js +25 -5
- package/dist/src/app-opentui/surface-catalog.js +4 -2
- package/dist/src/app-opentui/types.d.ts +1 -1
- package/dist/src/commands/_cli-format.d.ts +10 -1
- package/dist/src/commands/_cli-format.js +5 -2
- 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.js +458 -46
- package/dist/src/commands/_help-catalog.js +4 -2
- package/dist/src/commands/_json-output.js +4 -0
- package/dist/src/commands/_operator-view.js +465 -53
- package/dist/src/commands/_pi-frontend.js +465 -53
- package/dist/src/commands/_preflight.js +509 -72
- package/dist/src/commands/_server-client.d.ts +33 -0
- package/dist/src/commands/_server-client.js +477 -46
- package/dist/src/commands/_server-events.js +446 -41
- package/dist/src/commands/_snapshot-upload.js +460 -48
- package/dist/src/commands/connect.js +620 -15
- package/dist/src/commands/doctor.js +458 -46
- package/dist/src/commands/github.js +462 -50
- package/dist/src/commands/inbox.js +458 -46
- package/dist/src/commands/init.js +497 -74
- package/dist/src/commands/inspect.js +458 -46
- package/dist/src/commands/run.js +465 -53
- package/dist/src/commands/server.js +647 -163
- package/dist/src/commands/setup.js +463 -51
- package/dist/src/commands/stats.js +462 -48
- package/dist/src/commands/task-run-driver.js +464 -52
- package/dist/src/commands/task.js +520 -81
- package/dist/src/commands.js +670 -147
- package/dist/src/index.js +674 -147
- package/dist/src/launcher.js +4 -0
- package/package.json +8 -8
|
@@ -67,12 +67,13 @@ var PRIMARY_GROUPS = [
|
|
|
67
67
|
{
|
|
68
68
|
name: "server",
|
|
69
69
|
summary: "Choose, inspect, and start the Rig server that owns tasks and runs.",
|
|
70
|
-
usage: ["rig server <status|list|add|use|start> [options]"],
|
|
70
|
+
usage: ["rig server <status|list|add|use|repair-link|start> [options]"],
|
|
71
71
|
commands: [
|
|
72
|
-
{ command: "status", description: "Show the selected server for this repo.", primary: true },
|
|
72
|
+
{ command: "status", description: "Show the selected server and remote project-root link for this repo.", primary: true },
|
|
73
73
|
{ command: "use local", description: "Switch this repo to the local Rig server.", primary: true },
|
|
74
74
|
{ command: "add <alias> <url>", description: "Save a remote Rig server URL.", primary: true },
|
|
75
75
|
{ command: "use <alias>", description: "Select a saved remote server alias.", primary: true },
|
|
76
|
+
{ command: "repair-link [--prepare|--backfill-only] [--repo owner/repo]", description: "Backfill or prepare the selected remote's server-host checkout link.", primary: true },
|
|
76
77
|
{ command: "list", description: "List saved local/remote server aliases.", primary: true },
|
|
77
78
|
{ command: "start [--host <host>] [--port <n>]", description: "Start a local rig-server process." }
|
|
78
79
|
],
|
|
@@ -80,6 +81,7 @@ var PRIMARY_GROUPS = [
|
|
|
80
81
|
"rig server status",
|
|
81
82
|
"rig server add prod https://where.rig-does.work",
|
|
82
83
|
"rig server use prod",
|
|
84
|
+
"rig server repair-link --repo owner/repo",
|
|
83
85
|
"rig server use local",
|
|
84
86
|
"rig server start --port 3773"
|
|
85
87
|
],
|
|
@@ -748,16 +750,31 @@ function taskViewIntent(argv, command = "", rest = [], raw) {
|
|
|
748
750
|
const { payload, label } = taskViewPayload(command, rest);
|
|
749
751
|
return intent("tasks", argv, "refresh", payload, label, raw);
|
|
750
752
|
}
|
|
751
|
-
function routeServer(argv, command, raw, checkingLabel) {
|
|
752
|
-
if (!command || command === "status") {
|
|
753
|
+
function routeServer(argv, command, rest, raw, checkingLabel) {
|
|
754
|
+
if (!command || command === "status" || command === "list") {
|
|
753
755
|
return intent("server", argv, "refresh", undefined, command ? checkingLabel : "Loading server", raw);
|
|
754
756
|
}
|
|
757
|
+
if (command === "use") {
|
|
758
|
+
const alias = firstNonOption(rest);
|
|
759
|
+
if (alias === "local")
|
|
760
|
+
return intent("server", argv, "server-use-local", undefined, "Use local server", raw);
|
|
761
|
+
if (alias)
|
|
762
|
+
return intent("server", argv, "server-use-remote", { alias }, `Use ${alias}`, raw);
|
|
763
|
+
return intent("server", argv, "refresh", undefined, "Select a remote alias in Server", raw);
|
|
764
|
+
}
|
|
765
|
+
if (command === "add")
|
|
766
|
+
return intent("server", argv, "server-add-remote", { argv: [...argv] }, "Add remote server", raw);
|
|
767
|
+
if (command === "repair-link")
|
|
768
|
+
return intent("server", argv, "remote-link-repair", undefined, "Repair remote link", raw);
|
|
755
769
|
return commandRunIntent(argv, raw);
|
|
756
770
|
}
|
|
757
771
|
function routeGithub(argv, command, rest, raw) {
|
|
758
772
|
if (command === "auth" && (rest[0]?.toLowerCase() ?? "status") === "status" && rest.length <= 1) {
|
|
759
773
|
return intent("server", argv, "refresh", undefined, "Checking GitHub auth", raw);
|
|
760
774
|
}
|
|
775
|
+
if (command === "auth" && rest[0]?.toLowerCase() === "import-gh" && rest.length <= 1) {
|
|
776
|
+
return intent("server", argv, "github-auth-import", undefined, "Import GitHub auth", raw);
|
|
777
|
+
}
|
|
761
778
|
return commandRunIntent(argv, raw);
|
|
762
779
|
}
|
|
763
780
|
function routeDoctor(argv, command, raw) {
|
|
@@ -806,11 +823,16 @@ function intentFromArgv(argv) {
|
|
|
806
823
|
return commandRunIntent(argv);
|
|
807
824
|
}
|
|
808
825
|
if (normalizedGroup === "server")
|
|
809
|
-
return routeServer(argv, normalizedCommand, undefined, "Checking server");
|
|
826
|
+
return routeServer(argv, normalizedCommand, rest, undefined, "Checking server");
|
|
810
827
|
if (normalizedGroup === "github")
|
|
811
828
|
return routeGithub(argv, normalizedCommand, rest);
|
|
812
|
-
if (normalizedGroup === "init")
|
|
813
|
-
|
|
829
|
+
if (normalizedGroup === "init") {
|
|
830
|
+
if (!normalizedCommand)
|
|
831
|
+
return intent("init", argv, "refresh", undefined, "Open init");
|
|
832
|
+
if (rest.includes("--yes") || normalizedCommand === "--yes")
|
|
833
|
+
return intent("init", argv, "init-start", undefined, "Run init");
|
|
834
|
+
return intent("init", argv, "refresh", undefined, "Open init");
|
|
835
|
+
}
|
|
814
836
|
if (normalizedGroup === "doctor")
|
|
815
837
|
return routeDoctor(argv, normalizedCommand);
|
|
816
838
|
if (normalizedGroup === "inbox")
|
|
@@ -873,12 +895,17 @@ function intentFromTypeBar(value) {
|
|
|
873
895
|
return commandRunIntent(parts, value);
|
|
874
896
|
return intent("tasks", parts, "refresh", undefined, "Select a task, then press Enter; or use run next", value);
|
|
875
897
|
}
|
|
876
|
-
if (first === "init")
|
|
877
|
-
|
|
898
|
+
if (first === "init") {
|
|
899
|
+
if (!second)
|
|
900
|
+
return intent("init", parts, "refresh", undefined, "Open init", value);
|
|
901
|
+
if (parts.includes("--yes"))
|
|
902
|
+
return intent("init", parts, "init-start", undefined, "Run init", value);
|
|
903
|
+
return intent("init", parts, "refresh", undefined, "Open init", value);
|
|
904
|
+
}
|
|
878
905
|
if (first === "doctor")
|
|
879
906
|
return routeDoctor(parts, second, value);
|
|
880
907
|
if (first === "server")
|
|
881
|
-
return routeServer(parts, second, value, "Loading server");
|
|
908
|
+
return routeServer(parts, second, rest, value, "Loading server");
|
|
882
909
|
if (first === "github")
|
|
883
910
|
return routeGithub(parts, second, rest, value);
|
|
884
911
|
if (first === "inbox")
|