Repair startup FK recovery and paired turn runtime fixes

This commit is contained in:
ejclaw
2026-04-10 14:06:41 +09:00
parent 72a83d1ab8
commit 126ca85bdf
10 changed files with 203 additions and 52 deletions

View File

@@ -1,10 +1,9 @@
import { SERVICE_SESSION_SCOPE } from './config.js';
import { getErrorMessage } from './utils.js';
import {
claimServiceHandoff,
completeServiceHandoffAndAdvanceTargetCursor,
failServiceHandoff,
getPendingServiceHandoffs,
getAllPendingServiceHandoffs,
type ServiceHandoff,
} from './db.js';
import { findChannel, findChannelByName } from './router.js';
@@ -29,7 +28,7 @@ export function enqueuePendingHandoffs(args: {
) => void;
processClaimedHandoff: (handoff: ServiceHandoff) => Promise<void>;
}): void {
for (const handoff of getPendingServiceHandoffs(SERVICE_SESSION_SCOPE)) {
for (const handoff of getAllPendingServiceHandoffs()) {
if (!claimServiceHandoff(handoff.id)) {
continue;
}