@sagentlab/navarch-runtime 0.1.103 → 0.1.106
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/session.cjs +7 -5
- package/package.json +1 -1
package/dist/session.cjs
CHANGED
|
@@ -631,6 +631,10 @@ async function runClaimedSession(deps, claimed, sessionId, lifecycle) {
|
|
|
631
631
|
...result,
|
|
632
632
|
killedByLeaseLoss: leaseLost || result.killedByLeaseLoss,
|
|
633
633
|
});
|
|
634
|
+
// Correction turns reuse the previous turn's findings. The completion
|
|
635
|
+
// summary is collapsed to one 500-character line, so hand them the final
|
|
636
|
+
// prose instead, including from adapters that only return stdout.
|
|
637
|
+
const previousTurnReport = () => (0, redact_cjs_1.redactText)(result.reportText ?? (0, exit_conditions_cjs_1.parseClaudeJsonResult)(result.stdout)?.result ?? result.stdout, registry.list());
|
|
634
638
|
let headBranch = gitWorktree.branch;
|
|
635
639
|
let headSha;
|
|
636
640
|
try {
|
|
@@ -706,11 +710,9 @@ async function runClaimedSession(deps, claimed, sessionId, lifecycle) {
|
|
|
706
710
|
log.warn(`session ${leaseId} finished without delivering (${delivery.reason}); ` +
|
|
707
711
|
`restarting agent turn ${deliveryCorrectionRetries}/${DELIVERY_CORRECTION_RETRIES} in the same worktree.`);
|
|
708
712
|
nextPrompt = (0, delivery_cjs_1.renderDeliveryCorrectionPrompt)({
|
|
709
|
-
originalPrompt:
|
|
713
|
+
originalPrompt: briefPrompt,
|
|
710
714
|
taskType: task.task_type,
|
|
711
|
-
|
|
712
|
-
// the final prose from adapters that only return stdout as well.
|
|
713
|
-
previousReport: (0, redact_cjs_1.redactText)(result.reportText ?? (0, exit_conditions_cjs_1.parseClaudeJsonResult)(result.stdout)?.result ?? result.stdout, registry.list()),
|
|
715
|
+
previousReport: previousTurnReport(),
|
|
714
716
|
reason: delivery.reason,
|
|
715
717
|
attempt: deliveryCorrectionRetries,
|
|
716
718
|
maxAttempts: DELIVERY_CORRECTION_RETRIES,
|
|
@@ -808,7 +810,7 @@ async function runClaimedSession(deps, claimed, sessionId, lifecycle) {
|
|
|
808
810
|
nextPrompt = (0, prompt_cjs_1.renderCompletionRemediationPrompt)({
|
|
809
811
|
originalPrompt: briefPrompt,
|
|
810
812
|
rejection: redactedRejection,
|
|
811
|
-
previousReport:
|
|
813
|
+
previousReport: previousTurnReport(),
|
|
812
814
|
attempt: completionRemediationRetries,
|
|
813
815
|
maxAttempts: COMPLETION_REMEDIATION_RETRIES,
|
|
814
816
|
});
|
package/package.json
CHANGED