repoburg 1.3.291 → 1.3.293
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/agent-pane/backend/dist/index.js +20 -3
- package/agent-pane/backend/dist/server.js +20 -3
- package/package.json +1 -1
- package/tabtape/extension/dist/build-info.json +4 -4
- package/tabtape/extension/dist/manifest.json +1 -1
- package/tabtape/extension/dist/recorder.js +39 -39
- package/tabtape/extension/dist/recorder.js.map +1 -1
- package/tabtape/ui/dist/build-info.json +4 -4
|
@@ -42281,6 +42281,7 @@ async function registerSessionRoutes(fastify) {
|
|
|
42281
42281
|
|
|
42282
42282
|
// src/resume/interruptions.ts
|
|
42283
42283
|
var HOST_RESTART_ERROR = "Backend restarted while turn was running";
|
|
42284
|
+
var ATTEMPTS_RESET_LIMIT = 10;
|
|
42284
42285
|
var listeners = /* @__PURE__ */ new Set();
|
|
42285
42286
|
function onTurnInterrupted(listener) {
|
|
42286
42287
|
listeners.add(listener);
|
|
@@ -42333,6 +42334,20 @@ function updateLatestInterruptionItem(db2, sessionId, turnId, patch) {
|
|
|
42333
42334
|
};
|
|
42334
42335
|
broadcast("item:completed", { sessionId, turnId, item });
|
|
42335
42336
|
}
|
|
42337
|
+
function resumeMadeProgress(db2, turn) {
|
|
42338
|
+
if (turn.resume_state !== "resumed" || turn.resume_attempts === 0) return false;
|
|
42339
|
+
const markers = db2.prepare(
|
|
42340
|
+
`SELECT data, COUNT(*) OVER () AS total FROM items WHERE turn_id = ? AND type = 'interruption'
|
|
42341
|
+
ORDER BY created_at DESC, rowid DESC LIMIT 1`
|
|
42342
|
+
).get(turn.id);
|
|
42343
|
+
if (!markers || markers.total >= ATTEMPTS_RESET_LIMIT) return false;
|
|
42344
|
+
const resumedAt = markers.data ? JSON.parse(markers.data).resumed_at : null;
|
|
42345
|
+
if (!resumedAt) return false;
|
|
42346
|
+
return !!db2.prepare(
|
|
42347
|
+
`SELECT 1 FROM items WHERE turn_id = ? AND status = 'completed' AND type NOT IN ('interruption', 'error')
|
|
42348
|
+
AND created_at >= ? LIMIT 1`
|
|
42349
|
+
).get(turn.id, resumedAt);
|
|
42350
|
+
}
|
|
42336
42351
|
function markTurnInterrupted(db2, turnId, reason, opts = {}) {
|
|
42337
42352
|
const turn = getTurn(db2, turnId);
|
|
42338
42353
|
if (!turn || !isLive(turn.status)) return false;
|
|
@@ -42342,10 +42357,12 @@ function markTurnInterrupted(db2, turnId, reason, opts = {}) {
|
|
|
42342
42357
|
const resumeAt = opts.resumeAt ?? null;
|
|
42343
42358
|
const retry = turn.resume_state === "resuming";
|
|
42344
42359
|
const at = retry ? turn.interrupted_at ?? now : opts.at ?? now;
|
|
42360
|
+
const attempts = resumeMadeProgress(db2, turn) ? 0 : turn.resume_attempts;
|
|
42345
42361
|
db2.prepare(
|
|
42346
|
-
`UPDATE turns SET status = 'pending', resume_state = 'waiting', interrupt_reason = ?, interrupted_at = ?, resume_at = ?,
|
|
42362
|
+
`UPDATE turns SET status = 'pending', resume_state = 'waiting', interrupt_reason = ?, interrupted_at = ?, resume_at = ?, resume_attempts = ?,
|
|
42363
|
+
error = NULL, updated_at = ?
|
|
42347
42364
|
WHERE id = ?`
|
|
42348
|
-
).run(reason, at, resumeAt, now, turnId);
|
|
42365
|
+
).run(reason, at, resumeAt, attempts, now, turnId);
|
|
42349
42366
|
if (retry) {
|
|
42350
42367
|
updateLatestInterruptionItem(db2, turn.session_id, turnId, { reason, outcome: "waiting", detail });
|
|
42351
42368
|
} else {
|
|
@@ -42363,7 +42380,7 @@ function markTurnInterrupted(db2, turnId, reason, opts = {}) {
|
|
|
42363
42380
|
turnId,
|
|
42364
42381
|
reason,
|
|
42365
42382
|
interruptedAt: at,
|
|
42366
|
-
attempts
|
|
42383
|
+
attempts,
|
|
42367
42384
|
detail,
|
|
42368
42385
|
resumeAt
|
|
42369
42386
|
});
|
|
@@ -42264,6 +42264,7 @@ async function registerSessionRoutes(fastify) {
|
|
|
42264
42264
|
|
|
42265
42265
|
// src/resume/interruptions.ts
|
|
42266
42266
|
var HOST_RESTART_ERROR = "Backend restarted while turn was running";
|
|
42267
|
+
var ATTEMPTS_RESET_LIMIT = 10;
|
|
42267
42268
|
var listeners = /* @__PURE__ */ new Set();
|
|
42268
42269
|
function onTurnInterrupted(listener) {
|
|
42269
42270
|
listeners.add(listener);
|
|
@@ -42316,6 +42317,20 @@ function updateLatestInterruptionItem(db2, sessionId, turnId, patch) {
|
|
|
42316
42317
|
};
|
|
42317
42318
|
broadcast("item:completed", { sessionId, turnId, item });
|
|
42318
42319
|
}
|
|
42320
|
+
function resumeMadeProgress(db2, turn) {
|
|
42321
|
+
if (turn.resume_state !== "resumed" || turn.resume_attempts === 0) return false;
|
|
42322
|
+
const markers = db2.prepare(
|
|
42323
|
+
`SELECT data, COUNT(*) OVER () AS total FROM items WHERE turn_id = ? AND type = 'interruption'
|
|
42324
|
+
ORDER BY created_at DESC, rowid DESC LIMIT 1`
|
|
42325
|
+
).get(turn.id);
|
|
42326
|
+
if (!markers || markers.total >= ATTEMPTS_RESET_LIMIT) return false;
|
|
42327
|
+
const resumedAt = markers.data ? JSON.parse(markers.data).resumed_at : null;
|
|
42328
|
+
if (!resumedAt) return false;
|
|
42329
|
+
return !!db2.prepare(
|
|
42330
|
+
`SELECT 1 FROM items WHERE turn_id = ? AND status = 'completed' AND type NOT IN ('interruption', 'error')
|
|
42331
|
+
AND created_at >= ? LIMIT 1`
|
|
42332
|
+
).get(turn.id, resumedAt);
|
|
42333
|
+
}
|
|
42319
42334
|
function markTurnInterrupted(db2, turnId, reason, opts = {}) {
|
|
42320
42335
|
const turn = getTurn(db2, turnId);
|
|
42321
42336
|
if (!turn || !isLive(turn.status)) return false;
|
|
@@ -42325,10 +42340,12 @@ function markTurnInterrupted(db2, turnId, reason, opts = {}) {
|
|
|
42325
42340
|
const resumeAt = opts.resumeAt ?? null;
|
|
42326
42341
|
const retry = turn.resume_state === "resuming";
|
|
42327
42342
|
const at = retry ? turn.interrupted_at ?? now : opts.at ?? now;
|
|
42343
|
+
const attempts = resumeMadeProgress(db2, turn) ? 0 : turn.resume_attempts;
|
|
42328
42344
|
db2.prepare(
|
|
42329
|
-
`UPDATE turns SET status = 'pending', resume_state = 'waiting', interrupt_reason = ?, interrupted_at = ?, resume_at = ?,
|
|
42345
|
+
`UPDATE turns SET status = 'pending', resume_state = 'waiting', interrupt_reason = ?, interrupted_at = ?, resume_at = ?, resume_attempts = ?,
|
|
42346
|
+
error = NULL, updated_at = ?
|
|
42330
42347
|
WHERE id = ?`
|
|
42331
|
-
).run(reason, at, resumeAt, now, turnId);
|
|
42348
|
+
).run(reason, at, resumeAt, attempts, now, turnId);
|
|
42332
42349
|
if (retry) {
|
|
42333
42350
|
updateLatestInterruptionItem(db2, turn.session_id, turnId, { reason, outcome: "waiting", detail });
|
|
42334
42351
|
} else {
|
|
@@ -42346,7 +42363,7 @@ function markTurnInterrupted(db2, turnId, reason, opts = {}) {
|
|
|
42346
42363
|
turnId,
|
|
42347
42364
|
reason,
|
|
42348
42365
|
interruptedAt: at,
|
|
42349
|
-
attempts
|
|
42366
|
+
attempts,
|
|
42350
42367
|
detail,
|
|
42351
42368
|
resumeAt
|
|
42352
42369
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"tree": "
|
|
3
|
-
"commit": "
|
|
2
|
+
"tree": "e126e6dc57b66cb8a2c42da1c9599b18786209a4",
|
|
3
|
+
"commit": "924ceeda02b2e4b94f10182e08b9d3cafaa25cb2",
|
|
4
4
|
"dirty": false,
|
|
5
|
-
"repoburgVersion": "1.3.
|
|
6
|
-
"builtAt": "2026-11-
|
|
5
|
+
"repoburgVersion": "1.3.293",
|
|
6
|
+
"builtAt": "2026-11-02T07:29:23.078Z"
|
|
7
7
|
}
|