teapot-coding-agent 0.37.145 → 0.37.146
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
CHANGED
|
@@ -1391,11 +1391,16 @@ export class Agent {
|
|
|
1391
1391
|
*
|
|
1392
1392
|
* So only an IDLE agent is woken, and the `enqueue` re-check stays because a round can start in between.
|
|
1393
1393
|
*/
|
|
1394
|
-
|
|
1394
|
+
/**
|
|
1395
|
+
* `waiting` is the PARKED state — a tool is blocked on this very job (`parkForTool`), so that agent must be woken.
|
|
1396
|
+
* Only `running` is excluded, because a round in flight drains the exit itself at its next turn.
|
|
1397
|
+
*/
|
|
1398
|
+
const canWake = this.status === "idle" || this.status === "waiting";
|
|
1399
|
+
if (!this.stopRequested && !workIsDone && canWake) {
|
|
1395
1400
|
void this.enqueue(async () => {
|
|
1396
1401
|
if (this.stopRequested)
|
|
1397
1402
|
return;
|
|
1398
|
-
if (this.status === "idle")
|
|
1403
|
+
if (this.status === "idle" || this.status === "waiting")
|
|
1399
1404
|
this.start(`background job ${info.id} finished`);
|
|
1400
1405
|
});
|
|
1401
1406
|
}
|