import type { QuestionAnswer, QuestionAnswerEntry, QuestionInput, QuestionRecord, QuestionRendererState, QuestionStatus } from './types.js'; export type InjectQuestionAnswersToPane = (paneId: string, answers: QuestionAnswerEntry[]) => boolean; export type QuestionSubmitFailureCode = 'question_unknown' | 'question_not_open' | 'question_invalid_answer'; export declare class QuestionSubmitError extends Error { readonly code: QuestionSubmitFailureCode; constructor(code: QuestionSubmitFailureCode, message: string); } export declare function getQuestionStateDir(cwd: string, sessionId?: string): string; export declare function getQuestionRecordPath(cwd: string, questionId: string, sessionId?: string): string; export declare function writeQuestionRecord(recordPath: string, record: QuestionRecord): Promise; export declare function readQuestionRecord(recordPath: string): Promise; export declare function createQuestionRecord(cwd: string, input: QuestionInput, sessionId?: string, now?: Date, options?: { emitEvent?: boolean; timeoutMs?: number; runId?: string; }): Promise<{ recordPath: string; record: QuestionRecord; }>; export declare function updateQuestionRecord(recordPath: string, updater: (record: QuestionRecord) => QuestionRecord): Promise; export declare function markQuestionPrompting(recordPath: string, renderer: QuestionRendererState): Promise; export declare function markQuestionAnswered(recordPath: string, answerOrAnswers: QuestionAnswer | QuestionAnswerEntry[], options?: { injectAnswersToPane?: InjectQuestionAnswersToPane; }): Promise; export declare function listQuestionRecords(cwd: string, options?: { sessionId?: string; status?: QuestionStatus | 'open'; limit?: number; }): Promise>; export declare function submitQuestionAnswerById(cwd: string, questionId: string, answerPayload: unknown, options?: { sessionId?: string; runId?: string; injectAnswersToPane?: InjectQuestionAnswersToPane; }): Promise<{ recordPath: string; record: QuestionRecord; }>; export declare function markQuestionTerminalError(recordPath: string, status: Extract, code: string, message: string): Promise; export declare function isTerminalQuestionStatus(status: QuestionStatus): boolean; export declare function waitForQuestionTerminalState(recordPath: string, options?: { pollIntervalMs?: number; timeoutMs?: number; rendererAlive?: (record: QuestionRecord) => boolean; rendererDeathMessage?: (record: QuestionRecord) => string; }): Promise; //# sourceMappingURL=state.d.ts.map