@h-rig/cli 0.0.6-alpha.10 → 0.0.6-alpha.100
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/README.md +18 -19
- package/dist/bin/build-rig-binaries.d.ts +2 -0
- package/dist/bin/build-rig-binaries.js +22 -10
- package/dist/bin/rig.d.ts +72 -0
- package/dist/bin/rig.js +15683 -7361
- package/dist/config/rig-default-config.yml +5 -0
- package/dist/src/app/drone-ui.d.ts +34 -0
- package/dist/src/app/drone-ui.js +278 -0
- package/dist/src/commands/_async-ui.d.ts +10 -0
- package/dist/src/commands/_async-ui.js +121 -0
- package/dist/src/commands/_cli-format.d.ts +56 -0
- package/dist/src/commands/_cli-format.js +319 -0
- package/dist/src/commands/_config-env.d.ts +18 -0
- package/dist/src/commands/_config-env.js +22 -0
- package/dist/src/commands/_connection-state.d.ts +54 -0
- package/dist/src/commands/_connection-state.js +75 -11
- package/dist/src/commands/_doctor-checks.d.ts +46 -0
- package/dist/src/commands/_doctor-checks.js +100 -267
- package/dist/src/commands/_help-catalog.d.ts +29 -0
- package/dist/src/commands/_help-catalog.js +146 -0
- package/dist/src/commands/_inprocess-services.d.ts +33 -0
- package/dist/src/commands/_inprocess-services.js +102 -0
- package/dist/src/commands/_json-output.d.ts +11 -0
- package/dist/src/commands/_json-output.js +60 -0
- package/dist/src/commands/_lazy-reconcile.d.ts +34 -0
- package/dist/src/commands/_lazy-reconcile.js +102 -0
- package/dist/src/commands/_parsers.d.ts +15 -0
- package/dist/src/commands/_parsers.js +18 -11
- package/dist/src/commands/_paths.d.ts +11 -0
- package/dist/src/commands/_paths.js +1 -1
- package/dist/src/commands/_pi-frontend.d.ts +35 -0
- package/dist/src/commands/_pi-frontend.js +64 -0
- package/dist/src/commands/_pi-install.d.ts +42 -0
- package/dist/src/commands/_pi-install.js +19 -36
- package/dist/src/commands/_policy.d.ts +8 -0
- package/dist/src/commands/_policy.js +67 -19
- package/dist/src/commands/_probes.d.ts +1 -0
- package/dist/src/commands/_run-bridge.d.ts +114 -0
- package/dist/src/commands/_run-bridge.js +387 -0
- package/dist/src/commands/_run-diagnostics.d.ts +9 -0
- package/dist/src/commands/_run-diagnostics.js +51 -0
- package/dist/src/commands/_run-driver-helpers.d.ts +26 -0
- package/dist/src/commands/_run-driver-helpers.js +79 -230
- package/dist/src/commands/_run-projection.d.ts +50 -0
- package/dist/src/commands/_run-projection.js +349 -0
- package/dist/src/commands/_run-subcommands.d.ts +3 -0
- package/dist/src/commands/_run-subcommands.js +31 -0
- package/dist/src/commands/_spinner.d.ts +25 -0
- package/dist/src/commands/_spinner.js +65 -0
- package/dist/src/commands/agent.d.ts +3 -0
- package/dist/src/commands/agent.js +8690 -236
- package/dist/src/commands/config.d.ts +3 -0
- package/dist/src/commands/config.js +181 -0
- package/dist/src/commands/dist.d.ts +28 -0
- package/dist/src/commands/dist.js +44 -29
- package/dist/src/commands/doctor.d.ts +3 -0
- package/dist/src/commands/doctor.js +219 -268
- package/dist/src/commands/github.d.ts +3 -0
- package/dist/src/commands/github.js +236 -188
- package/dist/src/commands/inbox.d.ts +28 -0
- package/dist/src/commands/inbox.js +530 -111
- package/dist/src/commands/init.d.ts +64 -0
- package/dist/src/commands/init.js +912 -705
- package/dist/src/commands/inspect.d.ts +20 -0
- package/dist/src/commands/inspect.js +709 -119
- package/dist/src/commands/pi.d.ts +3 -0
- package/dist/src/commands/pi.js +177 -0
- package/dist/src/commands/plugin.d.ts +16 -0
- package/dist/src/commands/plugin.js +576 -29
- package/dist/src/commands/profile-and-review.d.ts +4 -0
- package/dist/src/commands/profile-and-review.js +112 -67
- package/dist/src/commands/queue.d.ts +3 -0
- package/dist/src/commands/queue.js +20 -20
- package/dist/src/commands/remote.d.ts +3 -0
- package/dist/src/commands/remote.js +883 -50
- package/dist/src/commands/repo-git-harness.d.ts +5 -0
- package/dist/src/commands/repo-git-harness.js +78 -28
- package/dist/src/commands/run.d.ts +21 -0
- package/dist/src/commands/run.js +17731 -661
- package/dist/src/commands/server.d.ts +3 -0
- package/dist/src/commands/server.js +166 -303
- package/dist/src/commands/setup.d.ts +16 -0
- package/dist/src/commands/setup.js +244 -299
- package/dist/src/commands/stats.d.ts +15 -0
- package/dist/src/commands/stats.js +632 -0
- package/dist/src/commands/task-run-driver.d.ts +94 -0
- package/dist/src/commands/task-run-driver.js +116 -1961
- package/dist/src/commands/task.d.ts +35 -0
- package/dist/src/commands/task.js +676 -1201
- package/dist/src/commands/test.d.ts +3 -0
- package/dist/src/commands/test.js +15 -8
- package/dist/src/commands/triage.d.ts +11 -0
- package/dist/src/commands/triage.js +227 -0
- package/dist/src/commands/workspace.d.ts +3 -0
- package/dist/src/commands/workspace.js +18 -11
- package/dist/src/commands.d.ts +13 -0
- package/dist/src/commands.js +16812 -8045
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +16817 -8377
- package/dist/src/launcher.d.ts +61 -0
- package/dist/src/launcher.js +77 -11
- package/dist/src/operator-cli.d.ts +2 -0
- package/dist/src/operator-cli.js +17867 -0
- package/dist/src/operator-entry.d.ts +1 -0
- package/dist/src/operator-entry.js +3 -0
- package/dist/src/runner.d.ts +47 -0
- package/dist/src/runner.js +16 -22
- package/dist/src/withMutedConsole.d.ts +2 -0
- package/package.json +21 -8
- package/dist/src/commands/_authority-runs.js +0 -111
- package/dist/src/commands/_operator-view.js +0 -340
- package/dist/src/commands/_preflight.js +0 -478
- package/dist/src/commands/_server-client.js +0 -382
- package/dist/src/commands/_snapshot-upload.js +0 -331
- package/dist/src/commands/_task-picker.js +0 -48
- package/dist/src/commands/browser.js +0 -890
- package/dist/src/commands/connect.js +0 -180
- package/dist/src/commands/inspector.js +0 -256
- package/dist/src/commands/task-report-bug.js +0 -1083
- package/dist/src/report-bug.js +0 -260
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/cli/src/commands/_help-catalog.ts
|
|
3
|
+
import pc from "picocolors";
|
|
4
|
+
import {
|
|
5
|
+
ADVANCED_COMMANDS,
|
|
6
|
+
ADVANCED_GROUPS,
|
|
7
|
+
ALL_GROUPS,
|
|
8
|
+
helpCatalog,
|
|
9
|
+
TOP_LEVEL_SECTIONS
|
|
10
|
+
} from "@rig/contracts";
|
|
11
|
+
function heading(title) {
|
|
12
|
+
return pc.bold(pc.cyan(title));
|
|
13
|
+
}
|
|
14
|
+
function renderRigBanner(version) {
|
|
15
|
+
const m = (s) => pc.bold(pc.magenta(s));
|
|
16
|
+
const c = (s) => pc.bold(pc.cyan(s));
|
|
17
|
+
const y = (s) => pc.yellow(s);
|
|
18
|
+
const d = (s) => pc.dim(s);
|
|
19
|
+
const lines = [
|
|
20
|
+
m(" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 ") + d(" \u2591\u2592\u2593\u2588 "),
|
|
21
|
+
m(" \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D ") + d("\u2593\u2592\u2591"),
|
|
22
|
+
c(" \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2588\u2557") + d(" \u2591\u2592"),
|
|
23
|
+
c(" \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551") + d(" \u2588\u2593\u2591"),
|
|
24
|
+
y(" \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D") + d(" \u2592\u2591"),
|
|
25
|
+
y(" \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D "),
|
|
26
|
+
"",
|
|
27
|
+
` ${c("\u25E2\u25E4")} ${pc.bold("OMP extension cockpit for autonomous coding agents")} ${m("//")} ${d("you are the operator")}`,
|
|
28
|
+
version ? ` ${d(`v${version} \xB7 jack in: rig`)}` : ` ${d("jack in: rig")}`
|
|
29
|
+
];
|
|
30
|
+
return lines.join(`
|
|
31
|
+
`);
|
|
32
|
+
}
|
|
33
|
+
function commandLine(command, description) {
|
|
34
|
+
const commandColumn = command.length >= 38 ? `${command} ` : command.padEnd(38);
|
|
35
|
+
return `${pc.dim("\u2502")} ${pc.bold(commandColumn)} ${description}`;
|
|
36
|
+
}
|
|
37
|
+
function renderCommandBlock(commands) {
|
|
38
|
+
return commands.map((entry) => commandLine(entry.command, entry.description)).join(`
|
|
39
|
+
`);
|
|
40
|
+
}
|
|
41
|
+
function renderGroup(group) {
|
|
42
|
+
const lines = [
|
|
43
|
+
`${heading(`rig ${group.name}`)} \u2014 ${group.summary}`,
|
|
44
|
+
"",
|
|
45
|
+
pc.bold("Usage"),
|
|
46
|
+
...group.usage.map((line) => ` ${line}`),
|
|
47
|
+
"",
|
|
48
|
+
pc.bold("Commands"),
|
|
49
|
+
...group.commands.map((entry) => commandLine(entry.command, entry.description))
|
|
50
|
+
];
|
|
51
|
+
if (group.examples?.length) {
|
|
52
|
+
lines.push("", pc.bold("Examples"), ...group.examples.map((line) => ` ${pc.dim("$")} ${line}`));
|
|
53
|
+
}
|
|
54
|
+
if (group.next?.length) {
|
|
55
|
+
lines.push("", pc.bold("Next steps"), ...group.next.map((line) => ` ${pc.dim("\u203A")} ${line}`));
|
|
56
|
+
}
|
|
57
|
+
if (group.advanced?.length) {
|
|
58
|
+
lines.push("", pc.bold("Compatibility / advanced"), ...group.advanced.map((line) => ` ${pc.dim("\u203A")} ${line}`));
|
|
59
|
+
}
|
|
60
|
+
return lines.join(`
|
|
61
|
+
`);
|
|
62
|
+
}
|
|
63
|
+
function renderTopLevelHelp() {
|
|
64
|
+
return [
|
|
65
|
+
`${heading("rig")} ${pc.dim("\u2014 Rig Cockpit for autonomous coding agents")}`,
|
|
66
|
+
pc.dim("The loop: bare `rig` \u2192 Cockpit \u2192 Server target \u2192 Tasks \u2192 Task detail \u2192 Dispatch/Attach; every run uses OMP collaboration as the session substrate."),
|
|
67
|
+
"",
|
|
68
|
+
...TOP_LEVEL_SECTIONS.flatMap((section) => [
|
|
69
|
+
`${pc.bold(pc.magenta(`\u25C7 ${section.title}`))} \u2014 ${pc.dim(section.subtitle)}`,
|
|
70
|
+
renderCommandBlock(section.commands),
|
|
71
|
+
""
|
|
72
|
+
]),
|
|
73
|
+
pc.dim("More: `rig help --advanced` for fenced legacy/diagnostic commands; `rig <group> --help` for per-group compatibility help; `rig --version` for the installed version."),
|
|
74
|
+
"",
|
|
75
|
+
pc.bold("Root options"),
|
|
76
|
+
commandLine("--workspace <path>", "Open Rig Cockpit for a workspace instead of the current directory."),
|
|
77
|
+
commandLine("--json", "Compatibility flag for fenced legacy/diagnostic subcommands."),
|
|
78
|
+
commandLine("--dry-run", "Compatibility flag for fenced legacy/diagnostic subcommands.")
|
|
79
|
+
].join(`
|
|
80
|
+
`).trimEnd();
|
|
81
|
+
}
|
|
82
|
+
function renderAdvancedHelp() {
|
|
83
|
+
return [
|
|
84
|
+
`${heading("rig advanced")} \u2014 fenced legacy compatibility, diagnostics, and internal surfaces`,
|
|
85
|
+
"",
|
|
86
|
+
pc.bold("Normal public UX"),
|
|
87
|
+
" rig, rig --workspace <path>, rig join <collab-link>, and /rig inside OMP",
|
|
88
|
+
"",
|
|
89
|
+
pc.bold("Legacy/diagnostic groups"),
|
|
90
|
+
" init, server, task, run, inbox, inspect, stats, doctor, github, setup, remote",
|
|
91
|
+
"",
|
|
92
|
+
pc.bold("Advanced commands"),
|
|
93
|
+
...ADVANCED_COMMANDS.map((entry) => commandLine(entry.command, entry.description)),
|
|
94
|
+
"",
|
|
95
|
+
pc.bold("Advanced groups"),
|
|
96
|
+
...ADVANCED_GROUPS.map((group) => commandLine(group.name, group.summary)),
|
|
97
|
+
"",
|
|
98
|
+
pc.dim("Legacy groups remain callable for old automation and diagnostics. Prefer bare `rig` and the OMP cockpit for day-to-day work.")
|
|
99
|
+
].join(`
|
|
100
|
+
`);
|
|
101
|
+
}
|
|
102
|
+
function renderGroupHelp(groupName) {
|
|
103
|
+
const group = ALL_GROUPS.find((candidate) => candidate.name === groupName);
|
|
104
|
+
return group ? renderGroup(group) : null;
|
|
105
|
+
}
|
|
106
|
+
function listHelpGroups() {
|
|
107
|
+
return ALL_GROUPS.map((group) => group.name);
|
|
108
|
+
}
|
|
109
|
+
function suggestGroupCommandForWord(word, liveGroups) {
|
|
110
|
+
const normalized = word.trim().toLowerCase();
|
|
111
|
+
if (!normalized)
|
|
112
|
+
return null;
|
|
113
|
+
for (const group of ALL_GROUPS) {
|
|
114
|
+
if (liveGroups && !liveGroups.has(group.name))
|
|
115
|
+
continue;
|
|
116
|
+
for (const entry of group.commands) {
|
|
117
|
+
const firstToken = entry.command.split(/\s+/)[0] ?? "";
|
|
118
|
+
const names = firstToken.split("|").map((name) => name.trim().toLowerCase());
|
|
119
|
+
if (names.includes(normalized)) {
|
|
120
|
+
return `rig ${group.name} ${normalized}`;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
function printTopLevelHelp(state = {}) {
|
|
127
|
+
console.log(renderTopLevelHelp());
|
|
128
|
+
}
|
|
129
|
+
function printAdvancedHelp() {
|
|
130
|
+
console.log(renderAdvancedHelp());
|
|
131
|
+
}
|
|
132
|
+
function printGroupHelpDocument(groupName) {
|
|
133
|
+
console.log(renderGroupHelp(groupName) ?? renderTopLevelHelp());
|
|
134
|
+
}
|
|
135
|
+
export {
|
|
136
|
+
suggestGroupCommandForWord,
|
|
137
|
+
renderTopLevelHelp,
|
|
138
|
+
renderRigBanner,
|
|
139
|
+
renderGroupHelp,
|
|
140
|
+
renderAdvancedHelp,
|
|
141
|
+
printTopLevelHelp,
|
|
142
|
+
printGroupHelpDocument,
|
|
143
|
+
printAdvancedHelp,
|
|
144
|
+
listHelpGroups,
|
|
145
|
+
helpCatalog
|
|
146
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { saveGitHubTokenForProject, type GitHubAuthStatus } from "@rig/runtime/control-plane/github/index";
|
|
2
|
+
export type GitHubAuthStatusResponse = {
|
|
3
|
+
readonly ok: true;
|
|
4
|
+
} & GitHubAuthStatus;
|
|
5
|
+
export type GitHubTokenPostResponse = Awaited<ReturnType<typeof saveGitHubTokenForProject>> & {
|
|
6
|
+
readonly authenticated: boolean;
|
|
7
|
+
readonly apiSessionToken: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function setGitHubBearerTokenForCurrentProcess(token: string | null, projectRoot?: string): void;
|
|
10
|
+
export declare function getGitHubAuthStatusInProcess(context: {
|
|
11
|
+
projectRoot: string;
|
|
12
|
+
}): Promise<GitHubAuthStatusResponse>;
|
|
13
|
+
export declare function postGitHubTokenInProcess(context: {
|
|
14
|
+
projectRoot: string;
|
|
15
|
+
}, token: string, options?: {
|
|
16
|
+
readonly selectedRepo?: string;
|
|
17
|
+
readonly projectRoot?: string;
|
|
18
|
+
}): Promise<GitHubTokenPostResponse>;
|
|
19
|
+
export declare function listGitHubProjectsInProcess(context: {
|
|
20
|
+
projectRoot: string;
|
|
21
|
+
}, owner: string, options?: {
|
|
22
|
+
readonly authToken?: string | null;
|
|
23
|
+
readonly baseUrl?: string | null;
|
|
24
|
+
}): Promise<Record<string, unknown>>;
|
|
25
|
+
export declare function getGitHubProjectStatusFieldInProcess(context: {
|
|
26
|
+
projectRoot: string;
|
|
27
|
+
}, projectId: string, options?: {
|
|
28
|
+
readonly authToken?: string | null;
|
|
29
|
+
readonly baseUrl?: string | null;
|
|
30
|
+
}): Promise<Record<string, unknown>>;
|
|
31
|
+
export declare function requestGitHubAuthJsonInProcess(context: {
|
|
32
|
+
projectRoot: string;
|
|
33
|
+
}, pathname: string, init?: RequestInit): Promise<unknown>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/cli/src/commands/_inprocess-services.ts
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import {
|
|
5
|
+
beginGitHubDeviceFlow,
|
|
6
|
+
checkGitHubRepoPermissions,
|
|
7
|
+
createGitHubAuthStore,
|
|
8
|
+
listGitHubProjects,
|
|
9
|
+
pollGitHubDeviceFlow,
|
|
10
|
+
resolveGitHubAuthStatus,
|
|
11
|
+
resolveProjectStatusField,
|
|
12
|
+
saveGitHubTokenForProject
|
|
13
|
+
} from "@rig/runtime/control-plane/github/index";
|
|
14
|
+
var scopedGitHubBearerTokens = new Map;
|
|
15
|
+
function cleanToken(value) {
|
|
16
|
+
const trimmed = value?.trim();
|
|
17
|
+
return trimmed ? trimmed : null;
|
|
18
|
+
}
|
|
19
|
+
function cleanString(value) {
|
|
20
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
21
|
+
}
|
|
22
|
+
function oauthClientId() {
|
|
23
|
+
return cleanToken(process.env.RIG_GITHUB_OAUTH_CLIENT_ID);
|
|
24
|
+
}
|
|
25
|
+
function tokenForProject(projectRoot, override) {
|
|
26
|
+
const scoped = scopedGitHubBearerTokens.get(resolve(projectRoot));
|
|
27
|
+
return cleanToken(override) ?? scoped ?? createGitHubAuthStore(projectRoot).readToken() ?? cleanToken(process.env.RIG_GITHUB_TOKEN);
|
|
28
|
+
}
|
|
29
|
+
function setGitHubBearerTokenForCurrentProcess(token, projectRoot) {
|
|
30
|
+
scopedGitHubBearerTokens.set(resolve(projectRoot ?? process.cwd()), cleanToken(token));
|
|
31
|
+
}
|
|
32
|
+
async function getGitHubAuthStatusInProcess(context) {
|
|
33
|
+
return { ok: true, ...resolveGitHubAuthStatus({ projectRoot: context.projectRoot, oauthConfigured: Boolean(oauthClientId()) }) };
|
|
34
|
+
}
|
|
35
|
+
async function postGitHubTokenInProcess(context, token, options = {}) {
|
|
36
|
+
const targetRoot = options.projectRoot?.trim() || context.projectRoot;
|
|
37
|
+
const result = await saveGitHubTokenForProject({
|
|
38
|
+
projectRoot: targetRoot,
|
|
39
|
+
token,
|
|
40
|
+
tokenSource: "manual-token",
|
|
41
|
+
selectedRepo: options.selectedRepo ?? null
|
|
42
|
+
});
|
|
43
|
+
const store = createGitHubAuthStore(targetRoot);
|
|
44
|
+
const session = store.createApiSession();
|
|
45
|
+
if (targetRoot !== context.projectRoot) {
|
|
46
|
+
store.copyToLocalProjectRoot(context.projectRoot);
|
|
47
|
+
}
|
|
48
|
+
return { ...result, authenticated: result.signedIn, apiSessionToken: session.token };
|
|
49
|
+
}
|
|
50
|
+
async function listGitHubProjectsInProcess(context, owner, options = {}) {
|
|
51
|
+
const token = tokenForProject(context.projectRoot, options.authToken);
|
|
52
|
+
if (!token)
|
|
53
|
+
return { ok: false, error: "missing-token", projects: [] };
|
|
54
|
+
const projects = await listGitHubProjects({ owner, token });
|
|
55
|
+
return { ok: true, projects };
|
|
56
|
+
}
|
|
57
|
+
async function getGitHubProjectStatusFieldInProcess(context, projectId, options = {}) {
|
|
58
|
+
const token = tokenForProject(context.projectRoot, options.authToken);
|
|
59
|
+
if (!token)
|
|
60
|
+
return { ok: false, error: "missing-token" };
|
|
61
|
+
const field = await resolveProjectStatusField({ projectId, token });
|
|
62
|
+
return { ok: true, field };
|
|
63
|
+
}
|
|
64
|
+
async function requestGitHubAuthJsonInProcess(context, pathname, init = {}) {
|
|
65
|
+
const method = (init.method ?? "GET").toUpperCase();
|
|
66
|
+
if (pathname === "/api/github/auth/status")
|
|
67
|
+
return getGitHubAuthStatusInProcess(context);
|
|
68
|
+
if (pathname === "/api/github/repo/permissions") {
|
|
69
|
+
return checkGitHubRepoPermissions({ projectRoot: context.projectRoot, oauthConfigured: Boolean(oauthClientId()) });
|
|
70
|
+
}
|
|
71
|
+
if (pathname === "/api/github/auth/device/start" && method === "POST") {
|
|
72
|
+
const clientId = oauthClientId();
|
|
73
|
+
if (!clientId)
|
|
74
|
+
return { ok: false, oauthConfigured: false, error: "RIG_GITHUB_OAUTH_CLIENT_ID is not configured." };
|
|
75
|
+
const body = init.body ? JSON.parse(String(init.body)) : {};
|
|
76
|
+
return beginGitHubDeviceFlow({
|
|
77
|
+
projectRoot: context.projectRoot,
|
|
78
|
+
clientId,
|
|
79
|
+
scope: cleanString(body.scope) ?? undefined,
|
|
80
|
+
selectedRepo: cleanString(body.repoSlug)
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
if (pathname === "/api/github/auth/device/poll" && method === "POST") {
|
|
84
|
+
const clientId = oauthClientId();
|
|
85
|
+
if (!clientId)
|
|
86
|
+
return { ok: false, oauthConfigured: false, error: "RIG_GITHUB_OAUTH_CLIENT_ID is not configured." };
|
|
87
|
+
const body = init.body ? JSON.parse(String(init.body)) : {};
|
|
88
|
+
const pollId = cleanString(body.pollId);
|
|
89
|
+
if (!pollId)
|
|
90
|
+
return { ok: false, status: "error", error: "pollId is required" };
|
|
91
|
+
return pollGitHubDeviceFlow({ projectRoot: context.projectRoot, clientId, pollId, selectedRepo: cleanString(body.repoSlug) });
|
|
92
|
+
}
|
|
93
|
+
throw new Error(`No in-process GitHub auth API for ${method} ${pathname}`);
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
setGitHubBearerTokenForCurrentProcess,
|
|
97
|
+
requestGitHubAuthJsonInProcess,
|
|
98
|
+
postGitHubTokenInProcess,
|
|
99
|
+
listGitHubProjectsInProcess,
|
|
100
|
+
getGitHubProjectStatusFieldInProcess,
|
|
101
|
+
getGitHubAuthStatusInProcess
|
|
102
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type RigCliOutputEnvelope } from "@rig/contracts";
|
|
2
|
+
/**
|
|
3
|
+
* Build the versioned `{ v: 1, command, data }` envelope for a command
|
|
4
|
+
* outcome, or null when the command has no output schema (legacy payload)
|
|
5
|
+
* or the details fail validation (warned on stderr, legacy payload).
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildCliJsonEnvelope(outcome: unknown, options?: {
|
|
8
|
+
warn?: (message: string) => void;
|
|
9
|
+
}): RigCliOutputEnvelope | null;
|
|
10
|
+
/** Commands with a versioned --json envelope (for help/docs/tests). */
|
|
11
|
+
export declare function listSchematizedCliCommands(): string[];
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/cli/src/commands/_json-output.ts
|
|
3
|
+
import { Schema } from "effect";
|
|
4
|
+
import {
|
|
5
|
+
RigDoctorCheckOutput,
|
|
6
|
+
RigInboxApprovalsOutput,
|
|
7
|
+
RigInboxInputsOutput,
|
|
8
|
+
RigRunListOutput,
|
|
9
|
+
RigRunShowOutput,
|
|
10
|
+
RigServerRepairLinkOutput,
|
|
11
|
+
RigServerStatusOutput,
|
|
12
|
+
RigServerUseOutput,
|
|
13
|
+
RigStatsOutput,
|
|
14
|
+
RigTaskListOutput,
|
|
15
|
+
RigTaskShowOutput
|
|
16
|
+
} from "@rig/contracts";
|
|
17
|
+
var CLI_OUTPUT_SCHEMAS = {
|
|
18
|
+
"task list": RigTaskListOutput,
|
|
19
|
+
"task show": RigTaskShowOutput,
|
|
20
|
+
"run list": RigRunListOutput,
|
|
21
|
+
"run show": RigRunShowOutput,
|
|
22
|
+
"server use": RigServerUseOutput,
|
|
23
|
+
"server status": RigServerStatusOutput,
|
|
24
|
+
"server repair-link": RigServerRepairLinkOutput,
|
|
25
|
+
"inbox approvals": RigInboxApprovalsOutput,
|
|
26
|
+
"inbox inputs": RigInboxInputsOutput,
|
|
27
|
+
"doctor check": RigDoctorCheckOutput,
|
|
28
|
+
"stats show": RigStatsOutput
|
|
29
|
+
};
|
|
30
|
+
function isCommandOutcomeLike(value) {
|
|
31
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
32
|
+
return false;
|
|
33
|
+
const record = value;
|
|
34
|
+
return typeof record.group === "string" && typeof record.command === "string";
|
|
35
|
+
}
|
|
36
|
+
function buildCliJsonEnvelope(outcome, options = {}) {
|
|
37
|
+
if (!isCommandOutcomeLike(outcome))
|
|
38
|
+
return null;
|
|
39
|
+
const commandKey = `${outcome.group} ${outcome.command}`;
|
|
40
|
+
const schema = CLI_OUTPUT_SCHEMAS[commandKey];
|
|
41
|
+
if (!schema)
|
|
42
|
+
return null;
|
|
43
|
+
const warn = options.warn ?? ((message) => console.error(message));
|
|
44
|
+
const envelope = { v: 1, command: commandKey, data: outcome.details ?? {} };
|
|
45
|
+
try {
|
|
46
|
+
Schema.decodeUnknownSync(schema)(JSON.parse(JSON.stringify(envelope)));
|
|
47
|
+
return envelope;
|
|
48
|
+
} catch (error) {
|
|
49
|
+
warn(`[rig] --json output for "${commandKey}" failed schema validation; printing legacy payload. ` + `(${error instanceof Error ? error.message.split(`
|
|
50
|
+
`)[0] : String(error)})`);
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function listSchematizedCliCommands() {
|
|
55
|
+
return Object.keys(CLI_OUTPUT_SCHEMAS).sort();
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
listSchematizedCliCommands,
|
|
59
|
+
buildCliJsonEnvelope
|
|
60
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SessionManager } from "@oh-my-pi/pi-coding-agent";
|
|
2
|
+
import { type CollabRegistryFilter, type CollabSessionProjection } from "@oh-my-pi/pi-coding-agent/collab/api";
|
|
3
|
+
import { type RunJournalProjection, type RunSessionCustomEntry } from "@rig/contracts";
|
|
4
|
+
type SessionWriter = {
|
|
5
|
+
appendCustomEntry(customType: string, data: unknown): void;
|
|
6
|
+
};
|
|
7
|
+
export type CollabSessionProjectionLike = Pick<CollabSessionProjection, "collab" | "customEntries" | "source"> & {
|
|
8
|
+
readonly runId?: string;
|
|
9
|
+
readonly session: Pick<CollabSessionProjection["session"], "path" | "id">;
|
|
10
|
+
};
|
|
11
|
+
export type ProjectRunProjection = Pick<RunJournalProjection, "status">;
|
|
12
|
+
export type ProjectRunFromSession = (source: Pick<SessionManager, "getEntries"> | ReadonlyArray<RunSessionCustomEntry> | readonly unknown[], runId: string) => ProjectRunProjection;
|
|
13
|
+
export type LazyReconcileFlippedRun = {
|
|
14
|
+
readonly runId: string;
|
|
15
|
+
readonly sessionPath: string;
|
|
16
|
+
readonly reason: "lazy-reconcile:dead-pid";
|
|
17
|
+
};
|
|
18
|
+
export type LazyReconcileResult = {
|
|
19
|
+
readonly flipped: readonly LazyReconcileFlippedRun[];
|
|
20
|
+
readonly resumable: readonly LazyReconcileFlippedRun[];
|
|
21
|
+
};
|
|
22
|
+
type LazyReconcileDeps = {
|
|
23
|
+
readonly listCollabSessionProjections?: (filter: CollabRegistryFilter) => Promise<readonly CollabSessionProjectionLike[]>;
|
|
24
|
+
readonly projectRunFromSession?: ProjectRunFromSession;
|
|
25
|
+
readonly processExists?: (pid: number) => boolean;
|
|
26
|
+
readonly openSession?: (sessionPath: string) => Promise<SessionWriter>;
|
|
27
|
+
readonly nowIso?: () => string;
|
|
28
|
+
};
|
|
29
|
+
export type LazyReconcileInput = {
|
|
30
|
+
readonly workspaceRoot: string;
|
|
31
|
+
readonly identityFilter: CollabRegistryFilter;
|
|
32
|
+
};
|
|
33
|
+
export declare function runLazyReconcile(input: LazyReconcileInput, deps?: LazyReconcileDeps): Promise<LazyReconcileResult>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __require = import.meta.require;
|
|
3
|
+
|
|
4
|
+
// packages/cli/src/commands/_lazy-reconcile.ts
|
|
5
|
+
import { SessionManager } from "@oh-my-pi/pi-coding-agent";
|
|
6
|
+
import {
|
|
7
|
+
listCollabSessionProjections as ompListCollabSessionProjections
|
|
8
|
+
} from "@oh-my-pi/pi-coding-agent/collab/api";
|
|
9
|
+
import {
|
|
10
|
+
CUSTOM_TYPE_FOR,
|
|
11
|
+
isTerminalRunStatus
|
|
12
|
+
} from "@rig/contracts";
|
|
13
|
+
var ACTIVE_LOCAL_RUN_STATUSES = new Set([
|
|
14
|
+
"created",
|
|
15
|
+
"preparing",
|
|
16
|
+
"running",
|
|
17
|
+
"validating",
|
|
18
|
+
"reviewing",
|
|
19
|
+
"closing-out"
|
|
20
|
+
]);
|
|
21
|
+
function processExists(pid) {
|
|
22
|
+
if (!Number.isInteger(pid) || pid <= 0)
|
|
23
|
+
return false;
|
|
24
|
+
try {
|
|
25
|
+
process.kill(pid, 0);
|
|
26
|
+
return true;
|
|
27
|
+
} catch {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async function defaultProjectRunFromSession(source, runId) {
|
|
32
|
+
const mod = await import("@rig/runtime/control-plane/run-session-projection");
|
|
33
|
+
const candidate = Reflect.get(mod, "projectRunFromSession");
|
|
34
|
+
if (typeof candidate !== "function") {
|
|
35
|
+
throw new Error("@rig/runtime/control-plane/run-session-projection does not export projectRunFromSession yet; inject projectRunFromSession until RunState lands it.");
|
|
36
|
+
}
|
|
37
|
+
return candidate(source, runId);
|
|
38
|
+
}
|
|
39
|
+
async function defaultOpenSession(sessionPath) {
|
|
40
|
+
return await SessionManager.open(sessionPath, undefined, undefined, { suppressBreadcrumb: true });
|
|
41
|
+
}
|
|
42
|
+
function projectionRunId(item) {
|
|
43
|
+
if (item.runId?.trim())
|
|
44
|
+
return item.runId.trim();
|
|
45
|
+
if (item.collab?.sessionId?.trim())
|
|
46
|
+
return item.collab.sessionId.trim();
|
|
47
|
+
if (item.session.id?.trim())
|
|
48
|
+
return item.session.id.trim();
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
function isLocallyDiscovered(item) {
|
|
52
|
+
return item.source === "session-list";
|
|
53
|
+
}
|
|
54
|
+
function isActiveStatus(status) {
|
|
55
|
+
if (status === null)
|
|
56
|
+
return false;
|
|
57
|
+
return !isTerminalRunStatus(status);
|
|
58
|
+
}
|
|
59
|
+
function shouldFlip(item, status, exists) {
|
|
60
|
+
if (!isActiveStatus(status))
|
|
61
|
+
return false;
|
|
62
|
+
if (item.collab?.stale === true)
|
|
63
|
+
return true;
|
|
64
|
+
const pid = item.collab?.pid;
|
|
65
|
+
return isLocallyDiscovered(item) && pid !== undefined && ACTIVE_LOCAL_RUN_STATUSES.has(status) && !exists(pid);
|
|
66
|
+
}
|
|
67
|
+
function failedStatusData(status, at) {
|
|
68
|
+
return {
|
|
69
|
+
type: "status-changed",
|
|
70
|
+
from: status,
|
|
71
|
+
to: "failed",
|
|
72
|
+
reason: "lazy-reconcile:dead-pid",
|
|
73
|
+
actor: { kind: "agent" },
|
|
74
|
+
at
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
async function runLazyReconcile(input, deps = {}) {
|
|
78
|
+
const listProjections = deps.listCollabSessionProjections ?? ompListCollabSessionProjections;
|
|
79
|
+
const projectRun = deps.projectRunFromSession ?? defaultProjectRunFromSession;
|
|
80
|
+
const exists = deps.processExists ?? processExists;
|
|
81
|
+
const openSession = deps.openSession ?? defaultOpenSession;
|
|
82
|
+
const nowIso = deps.nowIso ?? (() => new Date().toISOString());
|
|
83
|
+
const projections = await listProjections(input.identityFilter);
|
|
84
|
+
const flipped = [];
|
|
85
|
+
for (const item of projections) {
|
|
86
|
+
const runId = projectionRunId(item);
|
|
87
|
+
const sessionPath = item.session.path || item.collab?.sessionPath || "";
|
|
88
|
+
if (!runId || !sessionPath)
|
|
89
|
+
continue;
|
|
90
|
+
const projection = await projectRun(item.customEntries, runId);
|
|
91
|
+
const status = projection.status;
|
|
92
|
+
if (status === null || !shouldFlip(item, status, exists))
|
|
93
|
+
continue;
|
|
94
|
+
const session = await openSession(sessionPath);
|
|
95
|
+
session.appendCustomEntry(CUSTOM_TYPE_FOR["status-changed"], failedStatusData(status, nowIso()));
|
|
96
|
+
flipped.push({ runId, sessionPath, reason: "lazy-reconcile:dead-pid" });
|
|
97
|
+
}
|
|
98
|
+
return { flipped, resumable: flipped };
|
|
99
|
+
}
|
|
100
|
+
export {
|
|
101
|
+
runLazyReconcile
|
|
102
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TaskSourceConfig } from "@rig/contracts";
|
|
2
|
+
import type { RigPluginWithRuntime } from "@rig/core";
|
|
3
|
+
export declare function parsePositiveInt(value: string | undefined, option: string, fallback: number): number;
|
|
4
|
+
export declare function parseOptionalPositiveInt(value: string | undefined, option: string): number | undefined;
|
|
5
|
+
export declare function parseRequiredPositiveInt(value: string | undefined, option: string): number;
|
|
6
|
+
export declare function parseAction(value: string | undefined): "validate" | "verify" | "pipeline";
|
|
7
|
+
export declare function parseIsolationMode(value: string | undefined, allowOff: true): "off" | "worktree";
|
|
8
|
+
export declare function parseIsolationMode(value: string | undefined, allowOff: false): "worktree";
|
|
9
|
+
export declare function parseInstallScope(value: string | undefined): "user" | "system";
|
|
10
|
+
export declare function resolveInstallDir(scope: "user" | "system", explicitPath: string | undefined): string;
|
|
11
|
+
export type CliRigConfig = {
|
|
12
|
+
plugins?: readonly RigPluginWithRuntime[];
|
|
13
|
+
taskSource?: TaskSourceConfig;
|
|
14
|
+
};
|
|
15
|
+
export declare function loadRigConfigOrNull(projectRoot: string): Promise<CliRigConfig | null>;
|
|
@@ -7,12 +7,19 @@ import { resolve } from "path";
|
|
|
7
7
|
|
|
8
8
|
// packages/cli/src/runner.ts
|
|
9
9
|
import { EventBus } from "@rig/runtime/control-plane/runtime/events";
|
|
10
|
-
import { CliError } from "@rig/runtime/control-plane/errors";
|
|
10
|
+
import { CliError as RuntimeCliError } from "@rig/runtime/control-plane/errors";
|
|
11
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
12
|
import { buildBinary } from "@rig/runtime/control-plane/runtime/isolation";
|
|
15
|
-
|
|
13
|
+
|
|
14
|
+
class CliError extends RuntimeCliError {
|
|
15
|
+
hint;
|
|
16
|
+
constructor(message, exitCode = 1, options = {}) {
|
|
17
|
+
super(message, exitCode);
|
|
18
|
+
if (options.hint?.trim()) {
|
|
19
|
+
this.hint = options.hint.trim();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
16
23
|
|
|
17
24
|
// packages/cli/src/commands/_parsers.ts
|
|
18
25
|
function parsePositiveInt(value, option, fallback) {
|
|
@@ -21,7 +28,7 @@ function parsePositiveInt(value, option, fallback) {
|
|
|
21
28
|
}
|
|
22
29
|
const parsed = Number.parseInt(value, 10);
|
|
23
30
|
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
24
|
-
throw new
|
|
31
|
+
throw new CliError(`Invalid ${option} value: ${value}`, 1, { hint: `Pass a positive integer, e.g. \`${option} 10\`.` });
|
|
25
32
|
}
|
|
26
33
|
return parsed;
|
|
27
34
|
}
|
|
@@ -31,17 +38,17 @@ function parseOptionalPositiveInt(value, option) {
|
|
|
31
38
|
}
|
|
32
39
|
const parsed = Number.parseInt(value, 10);
|
|
33
40
|
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
34
|
-
throw new
|
|
41
|
+
throw new CliError(`Invalid ${option} value: ${value}`, 1, { hint: `Pass a positive integer, e.g. \`${option} 10\`.` });
|
|
35
42
|
}
|
|
36
43
|
return parsed;
|
|
37
44
|
}
|
|
38
45
|
function parseRequiredPositiveInt(value, option) {
|
|
39
46
|
if (!value) {
|
|
40
|
-
throw new
|
|
47
|
+
throw new CliError(`Missing value for ${option}.`, 1, { hint: `Provide a value after ${option}, e.g. \`${option} 10\`.` });
|
|
41
48
|
}
|
|
42
49
|
const parsed = Number.parseInt(value, 10);
|
|
43
50
|
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
44
|
-
throw new
|
|
51
|
+
throw new CliError(`Invalid ${option} value: ${value}`, 1, { hint: `Pass a positive integer, e.g. \`${option} 10\`.` });
|
|
45
52
|
}
|
|
46
53
|
return parsed;
|
|
47
54
|
}
|
|
@@ -55,7 +62,7 @@ function parseAction(value) {
|
|
|
55
62
|
if (value === "pipeline") {
|
|
56
63
|
return "pipeline";
|
|
57
64
|
}
|
|
58
|
-
throw new
|
|
65
|
+
throw new CliError(`Invalid --action value: ${value}. Use validate, verify, or pipeline.`);
|
|
59
66
|
}
|
|
60
67
|
function parseIsolationMode(value, allowOff) {
|
|
61
68
|
if (!value) {
|
|
@@ -67,7 +74,7 @@ function parseIsolationMode(value, allowOff) {
|
|
|
67
74
|
if (allowOff && value === "off") {
|
|
68
75
|
return value;
|
|
69
76
|
}
|
|
70
|
-
throw new
|
|
77
|
+
throw new CliError(`Invalid isolation mode: ${value}. Use ${allowOff ? "off|" : ""}worktree.`);
|
|
71
78
|
}
|
|
72
79
|
function parseInstallScope(value) {
|
|
73
80
|
if (!value || value === "user") {
|
|
@@ -76,7 +83,7 @@ function parseInstallScope(value) {
|
|
|
76
83
|
if (value === "system") {
|
|
77
84
|
return "system";
|
|
78
85
|
}
|
|
79
|
-
throw new
|
|
86
|
+
throw new CliError(`Invalid --scope value: ${value}. Use user|system.`);
|
|
80
87
|
}
|
|
81
88
|
function resolveInstallDir(scope, explicitPath) {
|
|
82
89
|
if (explicitPath) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function resolveControlPlaneMonorepoRoot(projectRoot: string): string;
|
|
2
|
+
export declare function resolveControlPlaneTaskConfigPath(projectRoot: string): string;
|
|
3
|
+
export declare function resolveControlPlaneHostStateRoot(projectRoot: string): string;
|
|
4
|
+
export declare function resolveControlPlaneHostStateDir(projectRoot: string): string;
|
|
5
|
+
export declare function resolveControlPlaneHostLogsDir(projectRoot: string): string;
|
|
6
|
+
export declare function resolveControlPlaneHostBinDir(projectRoot: string): string;
|
|
7
|
+
export declare function resolveControlPlaneHostDistDir(projectRoot: string): string;
|
|
8
|
+
export declare function resolveControlPlaneMonorepoStateRoot(projectRoot: string): string;
|
|
9
|
+
export declare function resolveControlPlaneMonorepoRuntimeDir(projectRoot: string): string;
|
|
10
|
+
export declare function resolveControlPlaneArtifactsDir(projectRoot: string): string;
|
|
11
|
+
export declare function resolveControlPlaneDefinitionRoot(projectRoot: string): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// packages/cli/src/commands/_paths.ts
|
|
3
3
|
import { resolve } from "path";
|
|
4
|
-
import { resolveMonorepoRoot } from "@rig/runtime/
|
|
4
|
+
import { resolveMonorepoRoot } from "@rig/runtime/layout";
|
|
5
5
|
function resolveControlPlaneMonorepoRoot(projectRoot) {
|
|
6
6
|
return resolveMonorepoRoot(projectRoot);
|
|
7
7
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { RunnerContext } from "../runner";
|
|
2
|
+
type AttachResult = {
|
|
3
|
+
readonly run: Record<string, unknown>;
|
|
4
|
+
readonly logs: Record<string, unknown>[];
|
|
5
|
+
readonly timeline: Record<string, unknown>[];
|
|
6
|
+
readonly timelineCursor: string | null;
|
|
7
|
+
readonly steered: boolean;
|
|
8
|
+
readonly rendered: string;
|
|
9
|
+
readonly detached?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function resolveOperatorDroneCwd(runId: string, homeDir?: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Compose the operator-session environment used by the legacy interactive
|
|
14
|
+
* attach shim. Exported for tests that pin the env contract.
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildOperatorPiEnv(input: {
|
|
17
|
+
readonly runId: string;
|
|
18
|
+
readonly serverUrl: string;
|
|
19
|
+
readonly authToken?: string | null;
|
|
20
|
+
readonly serverProjectRoot?: string | null;
|
|
21
|
+
readonly sessionDir: string;
|
|
22
|
+
}): Record<string, string>;
|
|
23
|
+
export declare function shouldRequireOperatorTranscript(status: unknown): boolean;
|
|
24
|
+
export declare function missingOperatorTranscriptMessage(runId: string, status: unknown): string;
|
|
25
|
+
/**
|
|
26
|
+
* Run `body` in-process while RETURNING (instead of terminating) when it calls
|
|
27
|
+
* `process.exit`. Exported for unit tests that pin the guard semantics.
|
|
28
|
+
*/
|
|
29
|
+
export declare function runWithProcessExitGuard(body: () => Promise<unknown>): Promise<number>;
|
|
30
|
+
export declare function attachRunBundledPiFrontend(context: Pick<RunnerContext, "projectRoot" | "outputMode">, input: {
|
|
31
|
+
readonly runId: string;
|
|
32
|
+
readonly steered?: boolean;
|
|
33
|
+
readonly returnOnQuit?: boolean;
|
|
34
|
+
}): Promise<AttachResult>;
|
|
35
|
+
export {};
|