@h-rig/cli 0.0.6-alpha.40 → 0.0.6-alpha.42
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 +512 -551
- package/dist/src/commands/_operator-view.js +510 -530
- package/dist/src/commands/_pi-frontend.js +514 -534
- package/dist/src/commands/_pi-remote-session.js +671 -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 +510 -530
- package/dist/src/commands/task-run-driver.js +2 -21
- package/dist/src/commands/task.js +510 -530
- package/dist/src/commands.js +512 -551
- package/dist/src/index.js +512 -551
- package/package.json +6 -6
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
writeJsonFile as writeJsonFile2
|
|
19
19
|
} from "@rig/runtime/control-plane/authority-files";
|
|
20
20
|
import { taskLookup } from "@rig/runtime/control-plane/native/task-ops";
|
|
21
|
+
import { readPriorPrProgressPromptSection } from "@rig/runtime/control-plane/prompt-context";
|
|
21
22
|
import { buildProviderTaskRunInstructionLines } from "@rig/runtime/control-plane/provider/runtime-instructions";
|
|
22
23
|
import { loadRigTaskRunSkillBody } from "@rig/runtime/control-plane/provider/rig-task-run-skill";
|
|
23
24
|
|
|
@@ -205,7 +206,7 @@ ${acceptance}` : null,
|
|
|
205
206
|
${sourceContractLines.join(`
|
|
206
207
|
`)}` : null,
|
|
207
208
|
scopeText || renderSourceScopeValidation(sourceTask, sourceValidation) || null,
|
|
208
|
-
|
|
209
|
+
readPriorPrProgressPromptSection(input.projectRoot, input.taskId),
|
|
209
210
|
initialPrompt ? `Additional operator guidance:
|
|
210
211
|
${initialPrompt}` : null,
|
|
211
212
|
providerLines.length > 0 ? `Provider-specific runtime tooling:
|
|
@@ -215,26 +216,6 @@ ${providerLines.join(" ")}` : null,
|
|
|
215
216
|
|
|
216
217
|
`);
|
|
217
218
|
}
|
|
218
|
-
function readPriorPrProgressForPrompt(projectRoot, taskId) {
|
|
219
|
-
for (const candidate of [
|
|
220
|
-
resolve3(projectRoot, ".worktrees", taskId, "artifacts", taskId, "pr-state.json"),
|
|
221
|
-
resolve3(projectRoot, "artifacts", taskId, "pr-state.json")
|
|
222
|
-
]) {
|
|
223
|
-
try {
|
|
224
|
-
const raw = JSON.parse(readFileSync(candidate, "utf8"));
|
|
225
|
-
const entries = Array.isArray(raw) ? raw : [raw];
|
|
226
|
-
const first = entries.find((entry) => entry && typeof entry === "object" && typeof entry.url === "string");
|
|
227
|
-
if (!first)
|
|
228
|
-
continue;
|
|
229
|
-
return [
|
|
230
|
-
`Prior progress exists for this task: PR ${first.url}${first.branch ? ` (branch ${first.branch})` : ""} was opened by an earlier run.`,
|
|
231
|
-
"Check its current state first (diff, checks, review). If the work is already complete and checks are green,",
|
|
232
|
-
"run `rig-agent completion-verification` to merge and close instead of re-implementing anything."
|
|
233
|
-
].join(" ");
|
|
234
|
-
} catch {}
|
|
235
|
-
}
|
|
236
|
-
return null;
|
|
237
|
-
}
|
|
238
219
|
function firstPromptString(...values) {
|
|
239
220
|
for (const value of values) {
|
|
240
221
|
const trimmed = typeof value === "string" ? value.trim() : "";
|