@h-rig/cli 0.0.6-alpha.4 → 0.0.6-alpha.6
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 +15 -3
- package/dist/src/commands/server.js +2 -2
- package/dist/src/commands/task-run-driver.js +13 -1
- package/dist/src/commands.js +15 -3
- package/dist/src/index.js +15 -3
- package/package.json +5 -4
package/dist/bin/rig.js
CHANGED
|
@@ -6629,7 +6629,7 @@ async function executeServer(context, args, options) {
|
|
|
6629
6629
|
const authTokenResult = takeOption(pending, "--auth-token");
|
|
6630
6630
|
pending = authTokenResult.rest;
|
|
6631
6631
|
requireNoExtraArgs(pending, "bun run rig server start [--host <host>] [--port <n>] [--poll-ms <n>] [--auth-token <token>]");
|
|
6632
|
-
const commandParts = ["
|
|
6632
|
+
const commandParts = ["rig-server", "start"];
|
|
6633
6633
|
if (hostResult.value) {
|
|
6634
6634
|
commandParts.push("--host", hostResult.value);
|
|
6635
6635
|
}
|
|
@@ -6652,7 +6652,7 @@ async function executeServer(context, args, options) {
|
|
|
6652
6652
|
const eventResult = takeOption(pending, "--event");
|
|
6653
6653
|
pending = eventResult.rest;
|
|
6654
6654
|
requireNoExtraArgs(pending, "bun run rig server notify-test [--event <type>]");
|
|
6655
|
-
const commandParts = ["
|
|
6655
|
+
const commandParts = ["rig-server", "notify-test"];
|
|
6656
6656
|
if (eventResult.value) {
|
|
6657
6657
|
commandParts.push("--event", eventResult.value);
|
|
6658
6658
|
}
|
|
@@ -7974,6 +7974,7 @@ async function executeRigOwnedTaskRun(context, input) {
|
|
|
7974
7974
|
const runtimeTaskId = input.taskId?.trim() || `adhoc-${input.runId}`;
|
|
7975
7975
|
const existingRunRecord = readAuthorityRun5(context.projectRoot, input.runId);
|
|
7976
7976
|
const resumeMode = process.env.RIG_RUN_RESUME === "1";
|
|
7977
|
+
const resumePreviousStatus = String(existingRunRecord?.status ?? "").toLowerCase();
|
|
7977
7978
|
const sourceTask = readRunSourceTaskContract(context.projectRoot, input.runId, input.taskId);
|
|
7978
7979
|
let prompt = buildRunPrompt({
|
|
7979
7980
|
projectRoot: context.projectRoot,
|
|
@@ -8464,7 +8465,18 @@ ${planningClassification.planningRequired ? `Before implementing, write a concis
|
|
|
8464
8465
|
let reviewFailureDetail = null;
|
|
8465
8466
|
const stderrLines = [];
|
|
8466
8467
|
const piAcceptedArtifactExitGraceMs = resolvePiAcceptedArtifactExitGraceMs(childEnv);
|
|
8467
|
-
if (resumeMode &&
|
|
8468
|
+
if (resumeMode && ["validating", "reviewing"].includes(resumePreviousStatus)) {
|
|
8469
|
+
appendRunLog(context.projectRoot, input.runId, {
|
|
8470
|
+
id: `log:${input.runId}:resume-closeout-phase`,
|
|
8471
|
+
title: "Resume continuing from closeout phase",
|
|
8472
|
+
detail: `Previous run status was ${resumePreviousStatus}; skipping agent relaunch and continuing validation/PR/merge closeout for the same run.`,
|
|
8473
|
+
tone: "info",
|
|
8474
|
+
status: resumePreviousStatus,
|
|
8475
|
+
createdAt: new Date().toISOString()
|
|
8476
|
+
});
|
|
8477
|
+
emitServerRunEvent({ type: "log", runId: input.runId, title: "Resume continuing from closeout phase" });
|
|
8478
|
+
exit = { code: 0, signal: null };
|
|
8479
|
+
} else if (resumeMode && latestRuntimeWorkspace) {
|
|
8468
8480
|
const acceptedArtifactState = readTaskRunAcceptedArtifactState({
|
|
8469
8481
|
taskId: input.taskId ?? runtimeTaskId,
|
|
8470
8482
|
workspaceDir: latestRuntimeWorkspace
|
|
@@ -299,7 +299,7 @@ async function executeServer(context, args, options) {
|
|
|
299
299
|
const authTokenResult = takeOption(pending, "--auth-token");
|
|
300
300
|
pending = authTokenResult.rest;
|
|
301
301
|
requireNoExtraArgs(pending, "bun run rig server start [--host <host>] [--port <n>] [--poll-ms <n>] [--auth-token <token>]");
|
|
302
|
-
const commandParts = ["
|
|
302
|
+
const commandParts = ["rig-server", "start"];
|
|
303
303
|
if (hostResult.value) {
|
|
304
304
|
commandParts.push("--host", hostResult.value);
|
|
305
305
|
}
|
|
@@ -322,7 +322,7 @@ async function executeServer(context, args, options) {
|
|
|
322
322
|
const eventResult = takeOption(pending, "--event");
|
|
323
323
|
pending = eventResult.rest;
|
|
324
324
|
requireNoExtraArgs(pending, "bun run rig server notify-test [--event <type>]");
|
|
325
|
-
const commandParts = ["
|
|
325
|
+
const commandParts = ["rig-server", "notify-test"];
|
|
326
326
|
if (eventResult.value) {
|
|
327
327
|
commandParts.push("--event", eventResult.value);
|
|
328
328
|
}
|
|
@@ -1084,6 +1084,7 @@ async function executeRigOwnedTaskRun(context, input) {
|
|
|
1084
1084
|
const runtimeTaskId = input.taskId?.trim() || `adhoc-${input.runId}`;
|
|
1085
1085
|
const existingRunRecord = readAuthorityRun3(context.projectRoot, input.runId);
|
|
1086
1086
|
const resumeMode = process.env.RIG_RUN_RESUME === "1";
|
|
1087
|
+
const resumePreviousStatus = String(existingRunRecord?.status ?? "").toLowerCase();
|
|
1087
1088
|
const sourceTask = readRunSourceTaskContract(context.projectRoot, input.runId, input.taskId);
|
|
1088
1089
|
let prompt = buildRunPrompt({
|
|
1089
1090
|
projectRoot: context.projectRoot,
|
|
@@ -1574,7 +1575,18 @@ ${planningClassification.planningRequired ? `Before implementing, write a concis
|
|
|
1574
1575
|
let reviewFailureDetail = null;
|
|
1575
1576
|
const stderrLines = [];
|
|
1576
1577
|
const piAcceptedArtifactExitGraceMs = resolvePiAcceptedArtifactExitGraceMs(childEnv);
|
|
1577
|
-
if (resumeMode &&
|
|
1578
|
+
if (resumeMode && ["validating", "reviewing"].includes(resumePreviousStatus)) {
|
|
1579
|
+
appendRunLog(context.projectRoot, input.runId, {
|
|
1580
|
+
id: `log:${input.runId}:resume-closeout-phase`,
|
|
1581
|
+
title: "Resume continuing from closeout phase",
|
|
1582
|
+
detail: `Previous run status was ${resumePreviousStatus}; skipping agent relaunch and continuing validation/PR/merge closeout for the same run.`,
|
|
1583
|
+
tone: "info",
|
|
1584
|
+
status: resumePreviousStatus,
|
|
1585
|
+
createdAt: new Date().toISOString()
|
|
1586
|
+
});
|
|
1587
|
+
emitServerRunEvent({ type: "log", runId: input.runId, title: "Resume continuing from closeout phase" });
|
|
1588
|
+
exit = { code: 0, signal: null };
|
|
1589
|
+
} else if (resumeMode && latestRuntimeWorkspace) {
|
|
1578
1590
|
const acceptedArtifactState = readTaskRunAcceptedArtifactState({
|
|
1579
1591
|
taskId: input.taskId ?? runtimeTaskId,
|
|
1580
1592
|
workspaceDir: latestRuntimeWorkspace
|
package/dist/src/commands.js
CHANGED
|
@@ -6423,7 +6423,7 @@ async function executeServer(context, args, options) {
|
|
|
6423
6423
|
const authTokenResult = takeOption(pending, "--auth-token");
|
|
6424
6424
|
pending = authTokenResult.rest;
|
|
6425
6425
|
requireNoExtraArgs(pending, "bun run rig server start [--host <host>] [--port <n>] [--poll-ms <n>] [--auth-token <token>]");
|
|
6426
|
-
const commandParts = ["
|
|
6426
|
+
const commandParts = ["rig-server", "start"];
|
|
6427
6427
|
if (hostResult.value) {
|
|
6428
6428
|
commandParts.push("--host", hostResult.value);
|
|
6429
6429
|
}
|
|
@@ -6446,7 +6446,7 @@ async function executeServer(context, args, options) {
|
|
|
6446
6446
|
const eventResult = takeOption(pending, "--event");
|
|
6447
6447
|
pending = eventResult.rest;
|
|
6448
6448
|
requireNoExtraArgs(pending, "bun run rig server notify-test [--event <type>]");
|
|
6449
|
-
const commandParts = ["
|
|
6449
|
+
const commandParts = ["rig-server", "notify-test"];
|
|
6450
6450
|
if (eventResult.value) {
|
|
6451
6451
|
commandParts.push("--event", eventResult.value);
|
|
6452
6452
|
}
|
|
@@ -7768,6 +7768,7 @@ async function executeRigOwnedTaskRun(context, input) {
|
|
|
7768
7768
|
const runtimeTaskId = input.taskId?.trim() || `adhoc-${input.runId}`;
|
|
7769
7769
|
const existingRunRecord = readAuthorityRun5(context.projectRoot, input.runId);
|
|
7770
7770
|
const resumeMode = process.env.RIG_RUN_RESUME === "1";
|
|
7771
|
+
const resumePreviousStatus = String(existingRunRecord?.status ?? "").toLowerCase();
|
|
7771
7772
|
const sourceTask = readRunSourceTaskContract(context.projectRoot, input.runId, input.taskId);
|
|
7772
7773
|
let prompt = buildRunPrompt({
|
|
7773
7774
|
projectRoot: context.projectRoot,
|
|
@@ -8258,7 +8259,18 @@ ${planningClassification.planningRequired ? `Before implementing, write a concis
|
|
|
8258
8259
|
let reviewFailureDetail = null;
|
|
8259
8260
|
const stderrLines = [];
|
|
8260
8261
|
const piAcceptedArtifactExitGraceMs = resolvePiAcceptedArtifactExitGraceMs(childEnv);
|
|
8261
|
-
if (resumeMode &&
|
|
8262
|
+
if (resumeMode && ["validating", "reviewing"].includes(resumePreviousStatus)) {
|
|
8263
|
+
appendRunLog(context.projectRoot, input.runId, {
|
|
8264
|
+
id: `log:${input.runId}:resume-closeout-phase`,
|
|
8265
|
+
title: "Resume continuing from closeout phase",
|
|
8266
|
+
detail: `Previous run status was ${resumePreviousStatus}; skipping agent relaunch and continuing validation/PR/merge closeout for the same run.`,
|
|
8267
|
+
tone: "info",
|
|
8268
|
+
status: resumePreviousStatus,
|
|
8269
|
+
createdAt: new Date().toISOString()
|
|
8270
|
+
});
|
|
8271
|
+
emitServerRunEvent({ type: "log", runId: input.runId, title: "Resume continuing from closeout phase" });
|
|
8272
|
+
exit = { code: 0, signal: null };
|
|
8273
|
+
} else if (resumeMode && latestRuntimeWorkspace) {
|
|
8262
8274
|
const acceptedArtifactState = readTaskRunAcceptedArtifactState({
|
|
8263
8275
|
taskId: input.taskId ?? runtimeTaskId,
|
|
8264
8276
|
workspaceDir: latestRuntimeWorkspace
|
package/dist/src/index.js
CHANGED
|
@@ -6625,7 +6625,7 @@ async function executeServer(context, args, options) {
|
|
|
6625
6625
|
const authTokenResult = takeOption(pending, "--auth-token");
|
|
6626
6626
|
pending = authTokenResult.rest;
|
|
6627
6627
|
requireNoExtraArgs(pending, "bun run rig server start [--host <host>] [--port <n>] [--poll-ms <n>] [--auth-token <token>]");
|
|
6628
|
-
const commandParts = ["
|
|
6628
|
+
const commandParts = ["rig-server", "start"];
|
|
6629
6629
|
if (hostResult.value) {
|
|
6630
6630
|
commandParts.push("--host", hostResult.value);
|
|
6631
6631
|
}
|
|
@@ -6648,7 +6648,7 @@ async function executeServer(context, args, options) {
|
|
|
6648
6648
|
const eventResult = takeOption(pending, "--event");
|
|
6649
6649
|
pending = eventResult.rest;
|
|
6650
6650
|
requireNoExtraArgs(pending, "bun run rig server notify-test [--event <type>]");
|
|
6651
|
-
const commandParts = ["
|
|
6651
|
+
const commandParts = ["rig-server", "notify-test"];
|
|
6652
6652
|
if (eventResult.value) {
|
|
6653
6653
|
commandParts.push("--event", eventResult.value);
|
|
6654
6654
|
}
|
|
@@ -7970,6 +7970,7 @@ async function executeRigOwnedTaskRun(context, input) {
|
|
|
7970
7970
|
const runtimeTaskId = input.taskId?.trim() || `adhoc-${input.runId}`;
|
|
7971
7971
|
const existingRunRecord = readAuthorityRun5(context.projectRoot, input.runId);
|
|
7972
7972
|
const resumeMode = process.env.RIG_RUN_RESUME === "1";
|
|
7973
|
+
const resumePreviousStatus = String(existingRunRecord?.status ?? "").toLowerCase();
|
|
7973
7974
|
const sourceTask = readRunSourceTaskContract(context.projectRoot, input.runId, input.taskId);
|
|
7974
7975
|
let prompt = buildRunPrompt({
|
|
7975
7976
|
projectRoot: context.projectRoot,
|
|
@@ -8460,7 +8461,18 @@ ${planningClassification.planningRequired ? `Before implementing, write a concis
|
|
|
8460
8461
|
let reviewFailureDetail = null;
|
|
8461
8462
|
const stderrLines = [];
|
|
8462
8463
|
const piAcceptedArtifactExitGraceMs = resolvePiAcceptedArtifactExitGraceMs(childEnv);
|
|
8463
|
-
if (resumeMode &&
|
|
8464
|
+
if (resumeMode && ["validating", "reviewing"].includes(resumePreviousStatus)) {
|
|
8465
|
+
appendRunLog(context.projectRoot, input.runId, {
|
|
8466
|
+
id: `log:${input.runId}:resume-closeout-phase`,
|
|
8467
|
+
title: "Resume continuing from closeout phase",
|
|
8468
|
+
detail: `Previous run status was ${resumePreviousStatus}; skipping agent relaunch and continuing validation/PR/merge closeout for the same run.`,
|
|
8469
|
+
tone: "info",
|
|
8470
|
+
status: resumePreviousStatus,
|
|
8471
|
+
createdAt: new Date().toISOString()
|
|
8472
|
+
});
|
|
8473
|
+
emitServerRunEvent({ type: "log", runId: input.runId, title: "Resume continuing from closeout phase" });
|
|
8474
|
+
exit = { code: 0, signal: null };
|
|
8475
|
+
} else if (resumeMode && latestRuntimeWorkspace) {
|
|
8464
8476
|
const acceptedArtifactState = readTaskRunAcceptedArtifactState({
|
|
8465
8477
|
taskId: input.taskId ?? runtimeTaskId,
|
|
8466
8478
|
workspaceDir: latestRuntimeWorkspace
|
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.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Rig package",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@clack/prompts": "^1.2.0",
|
|
26
|
-
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.
|
|
27
|
-
"@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.
|
|
28
|
-
"@rig/client": "npm:@h-rig/client@0.0.6-alpha.
|
|
26
|
+
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.6",
|
|
27
|
+
"@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.6",
|
|
28
|
+
"@rig/client": "npm:@h-rig/client@0.0.6-alpha.6",
|
|
29
|
+
"@rig/server": "npm:@h-rig/server@0.0.6-alpha.6",
|
|
29
30
|
"picocolors": "^1.1.1"
|
|
30
31
|
}
|
|
31
32
|
}
|