fix: treat human-interrupted paired runs as preempted

This commit is contained in:
ejclaw
2026-05-26 03:25:38 +09:00
parent 5a43cc531a
commit e20cd2f1b0
11 changed files with 317 additions and 52 deletions

View File

@@ -92,7 +92,12 @@ async function enrichArbiterPromptWithMoa(args: {
export interface MessageAgentExecutorDeps {
assistantName: string;
queue: Pick<GroupQueue, 'registerProcess' | 'enqueueMessageCheck'> &
Partial<Pick<GroupQueue, 'getDirectTerminalDeliveryForRun'>>;
Partial<
Pick<
GroupQueue,
'getDirectTerminalDeliveryForRun' | 'getCloseReasonForRun'
>
>;
getRoomBindings: () => Record<string, RegisteredGroup>;
getSessions: () => Record<string, string>;
persistSession: (groupFolder: string, sessionId: string) => void;
@@ -180,6 +185,8 @@ export async function runAgentForGroup(
runId,
runtimePairedTurnIdentity?.role ?? activeRole,
) ?? null,
getCloseReason: () =>
deps.queue.getCloseReasonForRun?.(chatJid, runId) ?? null,
onOutput,
log,
});