@h-rig/cli 0.0.6-alpha.40 → 0.0.6-alpha.41
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 +506 -551
- package/dist/src/commands/_operator-view.js +504 -530
- package/dist/src/commands/_pi-frontend.js +508 -534
- package/dist/src/commands/_pi-remote-session.js +665 -0
- package/dist/src/commands/_pi-worker-bridge-extension.js +352 -502
- package/dist/src/commands/_run-driver-helpers.js +2 -21
- package/dist/src/commands/run.js +504 -530
- package/dist/src/commands/task-run-driver.js +2 -21
- package/dist/src/commands/task.js +504 -530
- package/dist/src/commands.js +506 -551
- package/dist/src/index.js +506 -551
- package/package.json +6 -6
|
@@ -58,6 +58,7 @@ import {
|
|
|
58
58
|
writeJsonFile as writeJsonFile2
|
|
59
59
|
} from "@rig/runtime/control-plane/authority-files";
|
|
60
60
|
import { taskLookup } from "@rig/runtime/control-plane/native/task-ops";
|
|
61
|
+
import { readPriorPrProgressPromptSection } from "@rig/runtime/control-plane/prompt-context";
|
|
61
62
|
import { buildProviderTaskRunInstructionLines } from "@rig/runtime/control-plane/provider/runtime-instructions";
|
|
62
63
|
import { loadRigTaskRunSkillBody } from "@rig/runtime/control-plane/provider/rig-task-run-skill";
|
|
63
64
|
|
|
@@ -315,7 +316,7 @@ ${acceptance}` : null,
|
|
|
315
316
|
${sourceContractLines.join(`
|
|
316
317
|
`)}` : null,
|
|
317
318
|
scopeText || renderSourceScopeValidation(sourceTask, sourceValidation) || null,
|
|
318
|
-
|
|
319
|
+
readPriorPrProgressPromptSection(input.projectRoot, input.taskId),
|
|
319
320
|
initialPrompt ? `Additional operator guidance:
|
|
320
321
|
${initialPrompt}` : null,
|
|
321
322
|
providerLines.length > 0 ? `Provider-specific runtime tooling:
|
|
@@ -325,26 +326,6 @@ ${providerLines.join(" ")}` : null,
|
|
|
325
326
|
|
|
326
327
|
`);
|
|
327
328
|
}
|
|
328
|
-
function readPriorPrProgressForPrompt(projectRoot, taskId) {
|
|
329
|
-
for (const candidate of [
|
|
330
|
-
resolve3(projectRoot, ".worktrees", taskId, "artifacts", taskId, "pr-state.json"),
|
|
331
|
-
resolve3(projectRoot, "artifacts", taskId, "pr-state.json")
|
|
332
|
-
]) {
|
|
333
|
-
try {
|
|
334
|
-
const raw = JSON.parse(readFileSync(candidate, "utf8"));
|
|
335
|
-
const entries = Array.isArray(raw) ? raw : [raw];
|
|
336
|
-
const first = entries.find((entry) => entry && typeof entry === "object" && typeof entry.url === "string");
|
|
337
|
-
if (!first)
|
|
338
|
-
continue;
|
|
339
|
-
return [
|
|
340
|
-
`Prior progress exists for this task: PR ${first.url}${first.branch ? ` (branch ${first.branch})` : ""} was opened by an earlier run.`,
|
|
341
|
-
"Check its current state first (diff, checks, review). If the work is already complete and checks are green,",
|
|
342
|
-
"run `rig-agent completion-verification` to merge and close instead of re-implementing anything."
|
|
343
|
-
].join(" ");
|
|
344
|
-
} catch {}
|
|
345
|
-
}
|
|
346
|
-
return null;
|
|
347
|
-
}
|
|
348
329
|
function firstPromptString(...values) {
|
|
349
330
|
for (const value of values) {
|
|
350
331
|
const trimmed = typeof value === "string" ? value.trim() : "";
|