Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
One-time setup that gathers your project's design context and saves it to CLAUDE.md for future sessions.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
scripts/live-completion.mjs
1export function completionTypeForAcceptResult(eventType, acceptResult) {2if (eventType === 'discard') return acceptResult?.handled === true ? 'discarded' : 'error';3if (acceptResult?.handled === true && acceptResult?.carbonize === true) return 'agent_done';4if (acceptResult?.handled === true) return 'complete';5if (acceptResult?.mode === 'error') return 'error';6return 'agent_done';7}89export function completionAckForAcceptResult(eventId, completionType, acceptResult) {10const ack = { ok: true, type: completionType };11if (acceptResult?.handled === true && acceptResult?.carbonize === true) {12ack.final = false;13ack.requiresComplete = true;14ack.nextCommand = `live-complete.mjs --id ${eventId}`;15ack.message = 'Carbonize cleanup must be verified, then the session must be completed explicitly before polling again.';16}17return ack;18}19