sync: auto-sync from DESKTOP-0O8A1RL at 2026-05-22 11:07:55
Author: Mike Swanson Machine: DESKTOP-0O8A1RL Timestamp: 2026-05-22 11:07:55
This commit is contained in:
18
.agents/skills/impeccable/scripts/live-completion.mjs
Normal file
18
.agents/skills/impeccable/scripts/live-completion.mjs
Normal file
@@ -0,0 +1,18 @@
|
||||
export function completionTypeForAcceptResult(eventType, acceptResult) {
|
||||
if (eventType === 'discard') return acceptResult?.handled === true ? 'discarded' : 'error';
|
||||
if (acceptResult?.handled === true && acceptResult?.carbonize === true) return 'agent_done';
|
||||
if (acceptResult?.handled === true) return 'complete';
|
||||
if (acceptResult?.mode === 'error') return 'error';
|
||||
return 'agent_done';
|
||||
}
|
||||
|
||||
export function completionAckForAcceptResult(eventId, completionType, acceptResult) {
|
||||
const ack = { ok: true, type: completionType };
|
||||
if (acceptResult?.handled === true && acceptResult?.carbonize === true) {
|
||||
ack.final = false;
|
||||
ack.requiresComplete = true;
|
||||
ack.nextCommand = `live-complete.mjs --id ${eventId}`;
|
||||
ack.message = 'Carbonize cleanup must be verified, then the session must be completed explicitly before polling again.';
|
||||
}
|
||||
return ack;
|
||||
}
|
||||
Reference in New Issue
Block a user