spacecode 2.14.0 → 2.14.1
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/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/repl.mjs +5 -1
- package/package.json +1 -1
package/dist/repl.mjs
CHANGED
|
@@ -104845,6 +104845,10 @@ function agentFailure(run) {
|
|
|
104845
104845
|
const tail = (run.stderr.trim() || run.stdout.trim()).slice(-300).replace(/\s+/g, " ");
|
|
104846
104846
|
return clip(`agent exited ${run.exitCode}${tail ? `; last output: ${redactSecrets(tail)}` : "; no output"}`, 400);
|
|
104847
104847
|
}
|
|
104848
|
+
function noDigestReason(text) {
|
|
104849
|
+
const tail = (text ?? "").trim().slice(-300).replace(/\s+/g, " ");
|
|
104850
|
+
return clip(`agent finished without the digest${tail ? `; its last words: ${redactSecrets(tail)}` : " and said nothing"}`, 400);
|
|
104851
|
+
}
|
|
104848
104852
|
async function runWorkerJob(deps, job) {
|
|
104849
104853
|
const ids = { runId: job.runId, taskId: job.taskId, attempt: job.attempt };
|
|
104850
104854
|
try {
|
|
@@ -104937,7 +104941,7 @@ async function runWorkerJob(deps, job) {
|
|
|
104937
104941
|
digest,
|
|
104938
104942
|
...patch.stdout !== "" && !tooBig ? { patch: patch.stdout } : {},
|
|
104939
104943
|
...tooBig ? { reason: "patch exceeds the size limit" } : {},
|
|
104940
|
-
...
|
|
104944
|
+
...digest === "" ? { reason: run.exitCode !== 0 ? agentFailure(run) : noDigestReason(result?.text) } : {},
|
|
104941
104945
|
verify: { checks, changedFiles, diffLines }
|
|
104942
104946
|
});
|
|
104943
104947
|
deps.log("worker reported", { ...ids, files: changedFiles.length, diffLines });
|