Files
PaperClipAI/tests/runner-e2e/runtime-question-readiness.ts
T
DottaandPaperclip 8fb291310d Exercise installed legacy skills and grade real continuation outputs
Initialize the operational skill for legacy continuation fixtures, verify task attachment bytes, allow Claude’s optional custom-answer field, and distinguish unstarted dependency-blocked wakes from failed provider executions.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-18 22:05:48 -05:00

15 lines
953 B
TypeScript

/** Provider-native questions pause inside a turn; they need an answer, not a
* terminal run. Plain semantic questions instead wake a subsequent run. */
export function answerableRuntimeRunIds(interactions: ReadonlyArray<Record<string, any>>): Set<string> {
return new Set(interactions.filter((i) => i.kind === "ask_user_questions" && i.status === "pending" &&
typeof i.sourceRunId === "string" && typeof i.payload?.runtimeRequestId === "string")
.map((i) => i.sourceRunId));
}
/** Claude's one question includes the ACP adapter's optional custom-answer
* companion field. It is not a second user question. */
export function isSingleClaudeQuestion(questions: ReadonlyArray<Record<string, any>>) {
return questions.length >= 1 && questions.length <= 2 && questions[0]?.answerMode === "single_select" &&
questions.slice(1).every(q => q.answerMode === "text" && q.required === false && q.header === "Other" && /_custom-/.test(q.id));
}