@h-rig/runtime 0.0.6-alpha.35 → 0.0.6-alpha.36
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/src/control-plane/harness-main.js +16 -5
- package/dist/src/control-plane/hooks/completion-verification.js +16 -5
- package/dist/src/control-plane/native/harness-cli.js +16 -5
- package/dist/src/control-plane/native/task-ops.js +16 -5
- package/dist/src/control-plane/native/verifier.js +16 -5
- package/dist/src/control-plane/pi-sessiond/bin.js +0 -7
- package/dist/src/control-plane/pi-sessiond/server.js +0 -7
- package/dist/src/control-plane/pi-sessiond/session-service.js +0 -3
- package/dist/src/index.js +16 -8
- package/dist/src/local-server.js +17 -8
- package/package.json +8 -8
|
@@ -6228,17 +6228,28 @@ function loadGithubPullRequestCheckRollup(projectRoot, repoName, prNumber) {
|
|
|
6228
6228
|
return response.statusCheckRollup || [];
|
|
6229
6229
|
}
|
|
6230
6230
|
function evaluatePullRequestCiChecks(checks, repoName, prNumber, options = {}) {
|
|
6231
|
-
const
|
|
6232
|
-
const label = (check.name || check.context || "").toLowerCase();
|
|
6233
|
-
return label.length > 0 && !label.includes("greptile");
|
|
6234
|
-
});
|
|
6235
|
-
const pending = nonGreptileChecks.filter((check) => {
|
|
6231
|
+
const isPendingCheck2 = (check) => {
|
|
6236
6232
|
if ((check.__typename || "") === "CheckRun") {
|
|
6237
6233
|
return (check.status || "").toUpperCase() !== "COMPLETED";
|
|
6238
6234
|
}
|
|
6239
6235
|
const state = (check.state || check.status || "").toUpperCase();
|
|
6240
6236
|
return state === "PENDING" || state === "EXPECTED" || state === "QUEUED" || state === "IN_PROGRESS";
|
|
6237
|
+
};
|
|
6238
|
+
const pendingGreptile = checks.filter((check) => {
|
|
6239
|
+
const label = (check.name || check.context || "").toLowerCase();
|
|
6240
|
+
return label.includes("greptile") && isPendingCheck2(check);
|
|
6241
|
+
});
|
|
6242
|
+
if (pendingGreptile.length > 0) {
|
|
6243
|
+
return {
|
|
6244
|
+
verdict: "SKIP",
|
|
6245
|
+
reasons: pendingGreptile.map((check) => `[CI] ${repoName}#${prNumber} mandatory Greptile check is still pending: ${check.name || check.context || "unknown"}.`)
|
|
6246
|
+
};
|
|
6247
|
+
}
|
|
6248
|
+
const nonGreptileChecks = checks.filter((check) => {
|
|
6249
|
+
const label = (check.name || check.context || "").toLowerCase();
|
|
6250
|
+
return label.length > 0 && !label.includes("greptile");
|
|
6241
6251
|
});
|
|
6252
|
+
const pending = nonGreptileChecks.filter(isPendingCheck2);
|
|
6242
6253
|
const mergeClean = (options.mergeStateStatus || "").toUpperCase() === "CLEAN";
|
|
6243
6254
|
if (pending.length > 0 && !mergeClean) {
|
|
6244
6255
|
return {
|
|
@@ -6661,17 +6661,28 @@ function loadGithubPullRequestCheckRollup(projectRoot, repoName, prNumber) {
|
|
|
6661
6661
|
return response.statusCheckRollup || [];
|
|
6662
6662
|
}
|
|
6663
6663
|
function evaluatePullRequestCiChecks(checks, repoName, prNumber, options = {}) {
|
|
6664
|
-
const
|
|
6665
|
-
const label = (check.name || check.context || "").toLowerCase();
|
|
6666
|
-
return label.length > 0 && !label.includes("greptile");
|
|
6667
|
-
});
|
|
6668
|
-
const pending = nonGreptileChecks.filter((check) => {
|
|
6664
|
+
const isPendingCheck2 = (check) => {
|
|
6669
6665
|
if ((check.__typename || "") === "CheckRun") {
|
|
6670
6666
|
return (check.status || "").toUpperCase() !== "COMPLETED";
|
|
6671
6667
|
}
|
|
6672
6668
|
const state = (check.state || check.status || "").toUpperCase();
|
|
6673
6669
|
return state === "PENDING" || state === "EXPECTED" || state === "QUEUED" || state === "IN_PROGRESS";
|
|
6670
|
+
};
|
|
6671
|
+
const pendingGreptile = checks.filter((check) => {
|
|
6672
|
+
const label = (check.name || check.context || "").toLowerCase();
|
|
6673
|
+
return label.includes("greptile") && isPendingCheck2(check);
|
|
6674
|
+
});
|
|
6675
|
+
if (pendingGreptile.length > 0) {
|
|
6676
|
+
return {
|
|
6677
|
+
verdict: "SKIP",
|
|
6678
|
+
reasons: pendingGreptile.map((check) => `[CI] ${repoName}#${prNumber} mandatory Greptile check is still pending: ${check.name || check.context || "unknown"}.`)
|
|
6679
|
+
};
|
|
6680
|
+
}
|
|
6681
|
+
const nonGreptileChecks = checks.filter((check) => {
|
|
6682
|
+
const label = (check.name || check.context || "").toLowerCase();
|
|
6683
|
+
return label.length > 0 && !label.includes("greptile");
|
|
6674
6684
|
});
|
|
6685
|
+
const pending = nonGreptileChecks.filter(isPendingCheck2);
|
|
6675
6686
|
const mergeClean = (options.mergeStateStatus || "").toUpperCase() === "CLEAN";
|
|
6676
6687
|
if (pending.length > 0 && !mergeClean) {
|
|
6677
6688
|
return {
|
|
@@ -6222,17 +6222,28 @@ function loadGithubPullRequestCheckRollup(projectRoot, repoName, prNumber) {
|
|
|
6222
6222
|
return response.statusCheckRollup || [];
|
|
6223
6223
|
}
|
|
6224
6224
|
function evaluatePullRequestCiChecks(checks, repoName, prNumber, options = {}) {
|
|
6225
|
-
const
|
|
6226
|
-
const label = (check.name || check.context || "").toLowerCase();
|
|
6227
|
-
return label.length > 0 && !label.includes("greptile");
|
|
6228
|
-
});
|
|
6229
|
-
const pending = nonGreptileChecks.filter((check) => {
|
|
6225
|
+
const isPendingCheck2 = (check) => {
|
|
6230
6226
|
if ((check.__typename || "") === "CheckRun") {
|
|
6231
6227
|
return (check.status || "").toUpperCase() !== "COMPLETED";
|
|
6232
6228
|
}
|
|
6233
6229
|
const state = (check.state || check.status || "").toUpperCase();
|
|
6234
6230
|
return state === "PENDING" || state === "EXPECTED" || state === "QUEUED" || state === "IN_PROGRESS";
|
|
6231
|
+
};
|
|
6232
|
+
const pendingGreptile = checks.filter((check) => {
|
|
6233
|
+
const label = (check.name || check.context || "").toLowerCase();
|
|
6234
|
+
return label.includes("greptile") && isPendingCheck2(check);
|
|
6235
|
+
});
|
|
6236
|
+
if (pendingGreptile.length > 0) {
|
|
6237
|
+
return {
|
|
6238
|
+
verdict: "SKIP",
|
|
6239
|
+
reasons: pendingGreptile.map((check) => `[CI] ${repoName}#${prNumber} mandatory Greptile check is still pending: ${check.name || check.context || "unknown"}.`)
|
|
6240
|
+
};
|
|
6241
|
+
}
|
|
6242
|
+
const nonGreptileChecks = checks.filter((check) => {
|
|
6243
|
+
const label = (check.name || check.context || "").toLowerCase();
|
|
6244
|
+
return label.length > 0 && !label.includes("greptile");
|
|
6235
6245
|
});
|
|
6246
|
+
const pending = nonGreptileChecks.filter(isPendingCheck2);
|
|
6236
6247
|
const mergeClean = (options.mergeStateStatus || "").toUpperCase() === "CLEAN";
|
|
6237
6248
|
if (pending.length > 0 && !mergeClean) {
|
|
6238
6249
|
return {
|
|
@@ -6402,17 +6402,28 @@ function loadGithubPullRequestCheckRollup(projectRoot, repoName, prNumber) {
|
|
|
6402
6402
|
return response.statusCheckRollup || [];
|
|
6403
6403
|
}
|
|
6404
6404
|
function evaluatePullRequestCiChecks(checks, repoName, prNumber, options = {}) {
|
|
6405
|
-
const
|
|
6406
|
-
const label = (check.name || check.context || "").toLowerCase();
|
|
6407
|
-
return label.length > 0 && !label.includes("greptile");
|
|
6408
|
-
});
|
|
6409
|
-
const pending = nonGreptileChecks.filter((check) => {
|
|
6405
|
+
const isPendingCheck2 = (check) => {
|
|
6410
6406
|
if ((check.__typename || "") === "CheckRun") {
|
|
6411
6407
|
return (check.status || "").toUpperCase() !== "COMPLETED";
|
|
6412
6408
|
}
|
|
6413
6409
|
const state = (check.state || check.status || "").toUpperCase();
|
|
6414
6410
|
return state === "PENDING" || state === "EXPECTED" || state === "QUEUED" || state === "IN_PROGRESS";
|
|
6411
|
+
};
|
|
6412
|
+
const pendingGreptile = checks.filter((check) => {
|
|
6413
|
+
const label = (check.name || check.context || "").toLowerCase();
|
|
6414
|
+
return label.includes("greptile") && isPendingCheck2(check);
|
|
6415
|
+
});
|
|
6416
|
+
if (pendingGreptile.length > 0) {
|
|
6417
|
+
return {
|
|
6418
|
+
verdict: "SKIP",
|
|
6419
|
+
reasons: pendingGreptile.map((check) => `[CI] ${repoName}#${prNumber} mandatory Greptile check is still pending: ${check.name || check.context || "unknown"}.`)
|
|
6420
|
+
};
|
|
6421
|
+
}
|
|
6422
|
+
const nonGreptileChecks = checks.filter((check) => {
|
|
6423
|
+
const label = (check.name || check.context || "").toLowerCase();
|
|
6424
|
+
return label.length > 0 && !label.includes("greptile");
|
|
6415
6425
|
});
|
|
6426
|
+
const pending = nonGreptileChecks.filter(isPendingCheck2);
|
|
6416
6427
|
const mergeClean = (options.mergeStateStatus || "").toUpperCase() === "CLEAN";
|
|
6417
6428
|
if (pending.length > 0 && !mergeClean) {
|
|
6418
6429
|
return {
|
|
@@ -4452,17 +4452,28 @@ function loadGithubPullRequestCheckRollup(projectRoot, repoName, prNumber) {
|
|
|
4452
4452
|
return response.statusCheckRollup || [];
|
|
4453
4453
|
}
|
|
4454
4454
|
function evaluatePullRequestCiChecks(checks, repoName, prNumber, options = {}) {
|
|
4455
|
-
const
|
|
4456
|
-
const label = (check.name || check.context || "").toLowerCase();
|
|
4457
|
-
return label.length > 0 && !label.includes("greptile");
|
|
4458
|
-
});
|
|
4459
|
-
const pending = nonGreptileChecks.filter((check) => {
|
|
4455
|
+
const isPendingCheck2 = (check) => {
|
|
4460
4456
|
if ((check.__typename || "") === "CheckRun") {
|
|
4461
4457
|
return (check.status || "").toUpperCase() !== "COMPLETED";
|
|
4462
4458
|
}
|
|
4463
4459
|
const state = (check.state || check.status || "").toUpperCase();
|
|
4464
4460
|
return state === "PENDING" || state === "EXPECTED" || state === "QUEUED" || state === "IN_PROGRESS";
|
|
4461
|
+
};
|
|
4462
|
+
const pendingGreptile = checks.filter((check) => {
|
|
4463
|
+
const label = (check.name || check.context || "").toLowerCase();
|
|
4464
|
+
return label.includes("greptile") && isPendingCheck2(check);
|
|
4465
|
+
});
|
|
4466
|
+
if (pendingGreptile.length > 0) {
|
|
4467
|
+
return {
|
|
4468
|
+
verdict: "SKIP",
|
|
4469
|
+
reasons: pendingGreptile.map((check) => `[CI] ${repoName}#${prNumber} mandatory Greptile check is still pending: ${check.name || check.context || "unknown"}.`)
|
|
4470
|
+
};
|
|
4471
|
+
}
|
|
4472
|
+
const nonGreptileChecks = checks.filter((check) => {
|
|
4473
|
+
const label = (check.name || check.context || "").toLowerCase();
|
|
4474
|
+
return label.length > 0 && !label.includes("greptile");
|
|
4465
4475
|
});
|
|
4476
|
+
const pending = nonGreptileChecks.filter(isPendingCheck2);
|
|
4466
4477
|
const mergeClean = (options.mergeStateStatus || "").toUpperCase() === "CLEAN";
|
|
4467
4478
|
if (pending.length > 0 && !mergeClean) {
|
|
4468
4479
|
return {
|
|
@@ -525,9 +525,6 @@ class RigPiSessionService {
|
|
|
525
525
|
await this.prompt(sessionId, trimmed, active.runtime.session.isStreaming ? "steer" : undefined);
|
|
526
526
|
return { type: "done", message: `Accepted ${trimmed}` };
|
|
527
527
|
}
|
|
528
|
-
respondToCommand(_sessionId, _requestId, _value) {
|
|
529
|
-
return { type: "unsupported", message: "No pending command selection is active." };
|
|
530
|
-
}
|
|
531
528
|
respondToExtensionUi(sessionId, input) {
|
|
532
529
|
const active = this.requireActive(sessionId);
|
|
533
530
|
return { accepted: active.ui.respond(input) };
|
|
@@ -737,10 +734,6 @@ async function runRigPiSessionDaemon(options = {}) {
|
|
|
737
734
|
const body = await readJson(req);
|
|
738
735
|
return json(await sessions.runCommand(sessionId, requireText(body, "text")));
|
|
739
736
|
}
|
|
740
|
-
if (action === "commands/respond" && req.method === "POST") {
|
|
741
|
-
const body = await readJson(req);
|
|
742
|
-
return json(sessions.respondToCommand(sessionId, requireText(body, "requestId"), body.value));
|
|
743
|
-
}
|
|
744
737
|
if (action === "extension-ui/respond" && req.method === "POST") {
|
|
745
738
|
const body = await readJson(req);
|
|
746
739
|
return json(sessions.respondToExtensionUi(sessionId, {
|
|
@@ -523,9 +523,6 @@ class RigPiSessionService {
|
|
|
523
523
|
await this.prompt(sessionId, trimmed, active.runtime.session.isStreaming ? "steer" : undefined);
|
|
524
524
|
return { type: "done", message: `Accepted ${trimmed}` };
|
|
525
525
|
}
|
|
526
|
-
respondToCommand(_sessionId, _requestId, _value) {
|
|
527
|
-
return { type: "unsupported", message: "No pending command selection is active." };
|
|
528
|
-
}
|
|
529
526
|
respondToExtensionUi(sessionId, input) {
|
|
530
527
|
const active = this.requireActive(sessionId);
|
|
531
528
|
return { accepted: active.ui.respond(input) };
|
|
@@ -735,10 +732,6 @@ async function runRigPiSessionDaemon(options = {}) {
|
|
|
735
732
|
const body = await readJson(req);
|
|
736
733
|
return json(await sessions.runCommand(sessionId, requireText(body, "text")));
|
|
737
734
|
}
|
|
738
|
-
if (action === "commands/respond" && req.method === "POST") {
|
|
739
|
-
const body = await readJson(req);
|
|
740
|
-
return json(sessions.respondToCommand(sessionId, requireText(body, "requestId"), body.value));
|
|
741
|
-
}
|
|
742
735
|
if (action === "extension-ui/respond" && req.method === "POST") {
|
|
743
736
|
const body = await readJson(req);
|
|
744
737
|
return json(sessions.respondToExtensionUi(sessionId, {
|
|
@@ -462,9 +462,6 @@ class RigPiSessionService {
|
|
|
462
462
|
await this.prompt(sessionId, trimmed, active.runtime.session.isStreaming ? "steer" : undefined);
|
|
463
463
|
return { type: "done", message: `Accepted ${trimmed}` };
|
|
464
464
|
}
|
|
465
|
-
respondToCommand(_sessionId, _requestId, _value) {
|
|
466
|
-
return { type: "unsupported", message: "No pending command selection is active." };
|
|
467
|
-
}
|
|
468
465
|
respondToExtensionUi(sessionId, input) {
|
|
469
466
|
const active = this.requireActive(sessionId);
|
|
470
467
|
return { accepted: active.ui.respond(input) };
|
package/dist/src/index.js
CHANGED
|
@@ -624,17 +624,25 @@ async function waitForServerHealthy(baseUrl, authToken, timeoutMs) {
|
|
|
624
624
|
}
|
|
625
625
|
return false;
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function resolveRigServerCommand(projectRoot, which = (command) => Bun.which(command)) {
|
|
628
628
|
const binary = process.env.RIG_SERVER_BIN?.trim() || which("rig-server")?.trim();
|
|
629
|
-
const args = ["start", "--host", host, "--port", "0", "--auth-token", authToken];
|
|
630
629
|
if (binary) {
|
|
631
|
-
return { command: binary,
|
|
630
|
+
return { command: binary, commandArgs: [], cwd: projectRoot };
|
|
632
631
|
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
632
|
+
const workspaceEntry = resolve5(import.meta.dir, "../../..", "packages/server/src/server.ts");
|
|
633
|
+
if (existsSync4(workspaceEntry)) {
|
|
634
|
+
return { command: "bun", commandArgs: ["run", workspaceEntry], cwd: resolve5(import.meta.dir, "../../..") };
|
|
635
|
+
}
|
|
636
|
+
try {
|
|
637
|
+
const installedEntry = Bun.resolveSync("@rig/server/src/server.ts", projectRoot);
|
|
638
|
+
return { command: "bun", commandArgs: ["run", installedEntry], cwd: projectRoot };
|
|
639
|
+
} catch {}
|
|
640
|
+
return { command: "bun", commandArgs: ["run", workspaceEntry], cwd: resolve5(import.meta.dir, "../../..") };
|
|
641
|
+
}
|
|
642
|
+
function resolveRigServerSpawnPlan(projectRoot, host, authToken, which = (command) => Bun.which(command)) {
|
|
643
|
+
const resolved = resolveRigServerCommand(projectRoot, which);
|
|
644
|
+
const args = ["start", "--host", host, "--port", "0", "--auth-token", authToken];
|
|
645
|
+
return { command: resolved.command, args: [...resolved.commandArgs, ...args], cwd: resolved.cwd };
|
|
638
646
|
}
|
|
639
647
|
async function waitForPublishedServer(projectRoot, authToken, timeoutMs) {
|
|
640
648
|
const deadline = Date.now() + timeoutMs;
|
package/dist/src/local-server.js
CHANGED
|
@@ -134,17 +134,25 @@ async function waitForServerHealthy(baseUrl, authToken, timeoutMs) {
|
|
|
134
134
|
}
|
|
135
135
|
return false;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function resolveRigServerCommand(projectRoot, which = (command) => Bun.which(command)) {
|
|
138
138
|
const binary = process.env.RIG_SERVER_BIN?.trim() || which("rig-server")?.trim();
|
|
139
|
-
const args = ["start", "--host", host, "--port", "0", "--auth-token", authToken];
|
|
140
139
|
if (binary) {
|
|
141
|
-
return { command: binary,
|
|
140
|
+
return { command: binary, commandArgs: [], cwd: projectRoot };
|
|
142
141
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
const workspaceEntry = resolve2(import.meta.dir, "../../..", "packages/server/src/server.ts");
|
|
143
|
+
if (existsSync2(workspaceEntry)) {
|
|
144
|
+
return { command: "bun", commandArgs: ["run", workspaceEntry], cwd: resolve2(import.meta.dir, "../../..") };
|
|
145
|
+
}
|
|
146
|
+
try {
|
|
147
|
+
const installedEntry = Bun.resolveSync("@rig/server/src/server.ts", projectRoot);
|
|
148
|
+
return { command: "bun", commandArgs: ["run", installedEntry], cwd: projectRoot };
|
|
149
|
+
} catch {}
|
|
150
|
+
return { command: "bun", commandArgs: ["run", workspaceEntry], cwd: resolve2(import.meta.dir, "../../..") };
|
|
151
|
+
}
|
|
152
|
+
function resolveRigServerSpawnPlan(projectRoot, host, authToken, which = (command) => Bun.which(command)) {
|
|
153
|
+
const resolved = resolveRigServerCommand(projectRoot, which);
|
|
154
|
+
const args = ["start", "--host", host, "--port", "0", "--auth-token", authToken];
|
|
155
|
+
return { command: resolved.command, args: [...resolved.commandArgs, ...args], cwd: resolved.cwd };
|
|
148
156
|
}
|
|
149
157
|
async function waitForPublishedServer(projectRoot, authToken, timeoutMs) {
|
|
150
158
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -201,6 +209,7 @@ var __testOnly = {
|
|
|
201
209
|
resolveRigServerSpawnPlan
|
|
202
210
|
};
|
|
203
211
|
export {
|
|
212
|
+
resolveRigServerCommand,
|
|
204
213
|
readPublishedRigServerStateSync,
|
|
205
214
|
readPublishedRigServerState,
|
|
206
215
|
ensureLocalRigServerConnection,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h-rig/runtime",
|
|
3
|
-
"version": "0.0.6-alpha.
|
|
3
|
+
"version": "0.0.6-alpha.36",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Rig package",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
"main": "./dist/src/index.js",
|
|
64
64
|
"module": "./dist/src/index.js",
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@earendil-works/pi-coding-agent": "npm:@h-rig/pi-coding-agent@0.0.6-alpha.
|
|
66
|
+
"@earendil-works/pi-coding-agent": "npm:@h-rig/pi-coding-agent@0.0.6-alpha.36",
|
|
67
67
|
"@libsql/client": "^0.17.2",
|
|
68
|
-
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.
|
|
69
|
-
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.
|
|
70
|
-
"@rig/hook-kit": "npm:@h-rig/hook-kit@0.0.6-alpha.
|
|
71
|
-
"@rig/shared": "npm:@h-rig/shared@0.0.6-alpha.
|
|
72
|
-
"@rig/skill-loader": "npm:@h-rig/skill-loader@0.0.6-alpha.
|
|
73
|
-
"@rig/validator-kit": "npm:@h-rig/validator-kit@0.0.6-alpha.
|
|
68
|
+
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.36",
|
|
69
|
+
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.36",
|
|
70
|
+
"@rig/hook-kit": "npm:@h-rig/hook-kit@0.0.6-alpha.36",
|
|
71
|
+
"@rig/shared": "npm:@h-rig/shared@0.0.6-alpha.36",
|
|
72
|
+
"@rig/skill-loader": "npm:@h-rig/skill-loader@0.0.6-alpha.36",
|
|
73
|
+
"@rig/validator-kit": "npm:@h-rig/validator-kit@0.0.6-alpha.36",
|
|
74
74
|
"effect": "4.0.0-beta.78",
|
|
75
75
|
"smol-toml": "^1.6.0"
|
|
76
76
|
}
|