@h-rig/cli 0.0.6-alpha.86 → 0.0.6-alpha.88
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 +287 -578
- package/dist/src/app-opentui/adapters/common.d.ts +3 -0
- package/dist/src/app-opentui/adapters/common.js +4 -0
- package/dist/src/app-opentui/adapters/family.js +31 -4
- package/dist/src/app-opentui/adapters/pi-attach.d.ts +7 -0
- package/dist/src/app-opentui/adapters/pi-attach.js +527 -473
- package/dist/src/app-opentui/adapters/tasks.js +82 -468
- package/dist/src/app-opentui/bootstrap.js +287 -578
- package/dist/src/app-opentui/command-palette.js +1 -0
- package/dist/src/app-opentui/drone.js +1 -0
- package/dist/src/app-opentui/index.js +127 -446
- package/dist/src/app-opentui/keymap.js +2 -387
- package/dist/src/app-opentui/list-search.d.ts +5 -1
- package/dist/src/app-opentui/list-search.js +2 -2
- package/dist/src/app-opentui/pi-host-child.js +31 -4
- package/dist/src/app-opentui/pi-pty-host.d.ts +14 -64
- package/dist/src/app-opentui/pi-pty-host.js +3 -397
- package/dist/src/app-opentui/react/App.js +107 -433
- package/dist/src/app-opentui/react/Backdrop.js +1 -0
- package/dist/src/app-opentui/react/ChromeHost.js +34 -410
- package/dist/src/app-opentui/react/SceneFrameView.js +55 -5
- package/dist/src/app-opentui/react/launch.js +171 -472
- package/dist/src/app-opentui/react/syntax.js +1 -0
- package/dist/src/app-opentui/registry.js +99 -487
- package/dist/src/app-opentui/render/graphics.js +1 -0
- package/dist/src/app-opentui/render/hover.d.ts +11 -0
- package/dist/src/app-opentui/render/hover.js +34 -0
- package/dist/src/app-opentui/render/native-host.js +1 -0
- package/dist/src/app-opentui/render/panels.js +50 -3
- package/dist/src/app-opentui/render/preloader.js +1 -0
- package/dist/src/app-opentui/render/scene.js +1 -0
- package/dist/src/app-opentui/render/terminal-handoff.d.ts +16 -0
- package/dist/src/app-opentui/render/terminal-handoff.js +14 -0
- package/dist/src/app-opentui/render/text.d.ts +13 -0
- package/dist/src/app-opentui/render/text.js +54 -5
- package/dist/src/app-opentui/render/type-bar.js +1 -0
- package/dist/src/app-opentui/runtime.js +127 -446
- package/dist/src/app-opentui/scenes/command.js +1 -0
- package/dist/src/app-opentui/scenes/doctor.js +1 -0
- package/dist/src/app-opentui/scenes/error.js +1 -0
- package/dist/src/app-opentui/scenes/family-domains/agent.js +1 -0
- package/dist/src/app-opentui/scenes/family-domains/browser.js +1 -0
- package/dist/src/app-opentui/scenes/family-domains/dist.js +1 -0
- package/dist/src/app-opentui/scenes/family-domains/git.js +1 -0
- package/dist/src/app-opentui/scenes/family-domains/github.js +1 -0
- package/dist/src/app-opentui/scenes/family-domains/harness.js +1 -0
- package/dist/src/app-opentui/scenes/family-domains/index.js +1 -0
- package/dist/src/app-opentui/scenes/family-domains/kit.js +1 -0
- package/dist/src/app-opentui/scenes/family-domains/profile.js +1 -0
- package/dist/src/app-opentui/scenes/family-domains/queue.js +1 -0
- package/dist/src/app-opentui/scenes/family-domains/remote.js +1 -0
- package/dist/src/app-opentui/scenes/family-domains/review.js +1 -0
- package/dist/src/app-opentui/scenes/family-domains/setup.js +1 -0
- package/dist/src/app-opentui/scenes/family-domains/stats.js +1 -0
- package/dist/src/app-opentui/scenes/family.js +1 -0
- package/dist/src/app-opentui/scenes/fleet.js +3 -5
- package/dist/src/app-opentui/scenes/handoff.js +1 -0
- package/dist/src/app-opentui/scenes/help.js +1 -0
- package/dist/src/app-opentui/scenes/inbox.js +1 -0
- package/dist/src/app-opentui/scenes/init.js +1 -0
- package/dist/src/app-opentui/scenes/inspect.js +1 -0
- package/dist/src/app-opentui/scenes/main.js +1 -0
- package/dist/src/app-opentui/scenes/pi.js +1 -0
- package/dist/src/app-opentui/scenes/plugin.js +1 -0
- package/dist/src/app-opentui/scenes/repo.js +1 -0
- package/dist/src/app-opentui/scenes/run-detail.js +1 -0
- package/dist/src/app-opentui/scenes/server.js +1 -0
- package/dist/src/app-opentui/scenes/tasks.js +3 -5
- package/dist/src/app-opentui/scenes/workspace.js +1 -0
- package/dist/src/app-opentui/selectable.js +1 -0
- package/dist/src/app-opentui/theme.d.ts +1 -0
- package/dist/src/app-opentui/theme.js +1 -0
- package/dist/src/commands/_operator-view.js +31 -4
- package/dist/src/commands/_pi-frontend.d.ts +25 -0
- package/dist/src/commands/_pi-frontend.js +32 -4
- package/dist/src/commands/run.js +31 -4
- package/dist/src/commands/task.js +31 -4
- package/dist/src/commands.js +31 -4
- package/dist/src/index.js +31 -4
- package/package.json +8 -8
package/dist/src/commands.js
CHANGED
|
@@ -2691,6 +2691,29 @@ function installRigPiTheme() {
|
|
|
2691
2691
|
}
|
|
2692
2692
|
} catch {}
|
|
2693
2693
|
}
|
|
2694
|
+
async function runWithProcessExitGuard(body) {
|
|
2695
|
+
const realExit = process.exit;
|
|
2696
|
+
let exitCode = 0;
|
|
2697
|
+
let signalQuit = () => {};
|
|
2698
|
+
const quit = new Promise((resolve22) => {
|
|
2699
|
+
signalQuit = resolve22;
|
|
2700
|
+
});
|
|
2701
|
+
const guardedExit = (code) => {
|
|
2702
|
+
exitCode = typeof code === "number" ? code : 0;
|
|
2703
|
+
signalQuit();
|
|
2704
|
+
return;
|
|
2705
|
+
};
|
|
2706
|
+
process.exit = guardedExit;
|
|
2707
|
+
try {
|
|
2708
|
+
await Promise.race([Promise.resolve().then(body), quit]);
|
|
2709
|
+
} finally {
|
|
2710
|
+
process.exit = realExit;
|
|
2711
|
+
}
|
|
2712
|
+
return exitCode;
|
|
2713
|
+
}
|
|
2714
|
+
function runPiMainReturningOnQuit(args, options) {
|
|
2715
|
+
return runWithProcessExitGuard(() => runPiMain(args, options));
|
|
2716
|
+
}
|
|
2694
2717
|
async function attachRunBundledPiFrontend(context, input) {
|
|
2695
2718
|
const tempSessionDir = mkdtempSync(join3(tmpdir(), "rig-pi-frontend-sessions-"));
|
|
2696
2719
|
const { server, sessionFileArg } = await withSpinner(`Opening Pi console for run ${input.runId}\u2026`, () => prepareOperatorConsole(context, input.runId, tempSessionDir), { outputMode: context.outputMode });
|
|
@@ -2706,16 +2729,20 @@ async function attachRunBundledPiFrontend(context, input) {
|
|
|
2706
2729
|
};
|
|
2707
2730
|
let detached = false;
|
|
2708
2731
|
try {
|
|
2709
|
-
|
|
2732
|
+
const piArgs = [
|
|
2710
2733
|
"--offline",
|
|
2711
2734
|
"--no-extensions",
|
|
2712
2735
|
"--no-skills",
|
|
2713
2736
|
"--no-prompt-templates",
|
|
2714
2737
|
"--no-context-files",
|
|
2715
2738
|
...sessionFileArg
|
|
2716
|
-
]
|
|
2717
|
-
|
|
2718
|
-
|
|
2739
|
+
];
|
|
2740
|
+
const piOptions = { extensionFactories: [piRigExtensionFactory] };
|
|
2741
|
+
if (input.returnOnQuit) {
|
|
2742
|
+
await runPiMainReturningOnQuit(piArgs, piOptions);
|
|
2743
|
+
} else {
|
|
2744
|
+
await runPiMain(piArgs, piOptions);
|
|
2745
|
+
}
|
|
2719
2746
|
detached = true;
|
|
2720
2747
|
} finally {
|
|
2721
2748
|
restoreEnv();
|
package/dist/src/index.js
CHANGED
|
@@ -2880,6 +2880,29 @@ function installRigPiTheme() {
|
|
|
2880
2880
|
}
|
|
2881
2881
|
} catch {}
|
|
2882
2882
|
}
|
|
2883
|
+
async function runWithProcessExitGuard(body) {
|
|
2884
|
+
const realExit = process.exit;
|
|
2885
|
+
let exitCode = 0;
|
|
2886
|
+
let signalQuit = () => {};
|
|
2887
|
+
const quit = new Promise((resolve23) => {
|
|
2888
|
+
signalQuit = resolve23;
|
|
2889
|
+
});
|
|
2890
|
+
const guardedExit = (code) => {
|
|
2891
|
+
exitCode = typeof code === "number" ? code : 0;
|
|
2892
|
+
signalQuit();
|
|
2893
|
+
return;
|
|
2894
|
+
};
|
|
2895
|
+
process.exit = guardedExit;
|
|
2896
|
+
try {
|
|
2897
|
+
await Promise.race([Promise.resolve().then(body), quit]);
|
|
2898
|
+
} finally {
|
|
2899
|
+
process.exit = realExit;
|
|
2900
|
+
}
|
|
2901
|
+
return exitCode;
|
|
2902
|
+
}
|
|
2903
|
+
function runPiMainReturningOnQuit(args, options) {
|
|
2904
|
+
return runWithProcessExitGuard(() => runPiMain(args, options));
|
|
2905
|
+
}
|
|
2883
2906
|
async function attachRunBundledPiFrontend(context, input) {
|
|
2884
2907
|
const tempSessionDir = mkdtempSync(join3(tmpdir(), "rig-pi-frontend-sessions-"));
|
|
2885
2908
|
const { server, sessionFileArg } = await withSpinner(`Opening Pi console for run ${input.runId}\u2026`, () => prepareOperatorConsole(context, input.runId, tempSessionDir), { outputMode: context.outputMode });
|
|
@@ -2895,16 +2918,20 @@ async function attachRunBundledPiFrontend(context, input) {
|
|
|
2895
2918
|
};
|
|
2896
2919
|
let detached = false;
|
|
2897
2920
|
try {
|
|
2898
|
-
|
|
2921
|
+
const piArgs = [
|
|
2899
2922
|
"--offline",
|
|
2900
2923
|
"--no-extensions",
|
|
2901
2924
|
"--no-skills",
|
|
2902
2925
|
"--no-prompt-templates",
|
|
2903
2926
|
"--no-context-files",
|
|
2904
2927
|
...sessionFileArg
|
|
2905
|
-
]
|
|
2906
|
-
|
|
2907
|
-
|
|
2928
|
+
];
|
|
2929
|
+
const piOptions = { extensionFactories: [piRigExtensionFactory] };
|
|
2930
|
+
if (input.returnOnQuit) {
|
|
2931
|
+
await runPiMainReturningOnQuit(piArgs, piOptions);
|
|
2932
|
+
} else {
|
|
2933
|
+
await runPiMain(piArgs, piOptions);
|
|
2934
|
+
}
|
|
2908
2935
|
detached = true;
|
|
2909
2936
|
} finally {
|
|
2910
2937
|
restoreEnv();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h-rig/cli",
|
|
3
|
-
"version": "0.0.6-alpha.
|
|
3
|
+
"version": "0.0.6-alpha.88",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Rig package",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"@earendil-works/pi-tui": "^0.79.0",
|
|
29
29
|
"@opentui/core": "^0.4.1",
|
|
30
30
|
"@opentui/react": "0.4.1",
|
|
31
|
-
"@rig/client": "npm:@h-rig/client@0.0.6-alpha.
|
|
32
|
-
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.
|
|
33
|
-
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.
|
|
34
|
-
"@rig/pi-rig": "npm:@h-rig/pi-rig@0.0.6-alpha.
|
|
35
|
-
"@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.
|
|
36
|
-
"@rig/server": "npm:@h-rig/server@0.0.6-alpha.
|
|
37
|
-
"@rig/standard-plugin": "npm:@h-rig/standard-plugin@0.0.6-alpha.
|
|
31
|
+
"@rig/client": "npm:@h-rig/client@0.0.6-alpha.88",
|
|
32
|
+
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.88",
|
|
33
|
+
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.88",
|
|
34
|
+
"@rig/pi-rig": "npm:@h-rig/pi-rig@0.0.6-alpha.88",
|
|
35
|
+
"@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.88",
|
|
36
|
+
"@rig/server": "npm:@h-rig/server@0.0.6-alpha.88",
|
|
37
|
+
"@rig/standard-plugin": "npm:@h-rig/standard-plugin@0.0.6-alpha.88",
|
|
38
38
|
"@xterm/headless": "^6.0.0",
|
|
39
39
|
"effect": "4.0.0-beta.78",
|
|
40
40
|
"picocolors": "^1.1.1",
|