teapot-coding-agent 0.19.6 → 0.19.8
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/agent/agent.js +19 -1
- package/package.json +1 -1
- package/public/assets/index-BAosryif.js +30 -0
- package/public/assets/index-BAosryif.js.map +1 -0
- package/public/assets/{index-BZDRhaTM.css → index-BM9nVufQ.css} +1 -1
- package/public/assets/{shiki-DbdbHcOD.js → shiki-fBtMMlxc.js} +2 -2
- package/public/assets/{shiki-DbdbHcOD.js.map → shiki-fBtMMlxc.js.map} +1 -1
- package/public/index.html +2 -2
- package/public/assets/index-Ck2SeYdT.js +0 -30
- package/public/assets/index-Ck2SeYdT.js.map +0 -1
package/dist/agent/agent.js
CHANGED
|
@@ -882,6 +882,19 @@ export class Agent {
|
|
|
882
882
|
async loop() {
|
|
883
883
|
while (!this.stopRequested) {
|
|
884
884
|
try {
|
|
885
|
+
// stop() aborted the tool signal and nothing re-armed it (only the
|
|
886
|
+
// parkedByTool path ever did), so EVERY tool after a stop returned
|
|
887
|
+
// "aborted (harness shutdown)" until process restart. A new round is
|
|
888
|
+
// new work: give it a live signal (re-arm AND republish — toolCtx
|
|
889
|
+
// holds a copy of the reference).
|
|
890
|
+
if (this.toolAbort.signal.aborted) {
|
|
891
|
+
this.toolAbort = new AbortController();
|
|
892
|
+
this.toolCtx.signal = this.toolAbort.signal;
|
|
893
|
+
}
|
|
894
|
+
// failures from the previous round must not poison this one — the
|
|
895
|
+
// counter only ever reset on success, so a tripped limit re-tripped
|
|
896
|
+
// on the first failure after restart ("6 consecutive" right after start)
|
|
897
|
+
this.consecutiveToolErrors = 0;
|
|
885
898
|
const turnsAtStart = this.stats.turns;
|
|
886
899
|
let finished = await this.runTurnsUntilIdle();
|
|
887
900
|
// the round ended on the per-round turn cap (not finish/stop): tell
|
|
@@ -910,7 +923,12 @@ export class Agent {
|
|
|
910
923
|
});
|
|
911
924
|
// the wrap-up nudge IS this round's continuation prompt — starting
|
|
912
925
|
// another round on top of it would stack a generic auto-continue
|
|
913
|
-
// nudge too
|
|
926
|
+
// nudge too. BUT this must respect autoContinue: with the toggle
|
|
927
|
+
// off the round simply ENDS here (the old code continued
|
|
928
|
+
// unconditionally and spun an infinite loop on models that never
|
|
929
|
+
// call finish() — turns=16000+ in a mock test).
|
|
930
|
+
if (!this.opts.autoContinue || this.goal.status !== "active" || !this.goal.text.trim())
|
|
931
|
+
break;
|
|
914
932
|
continue;
|
|
915
933
|
}
|
|
916
934
|
if (this.stopRequested)
|