import { type QuestionAnswers, type QuestionAsker, type SessionId, type SessionQuestions, type TurnId } from '@moxxy/sdk'; import type { EventLog } from '../events/log.js'; /** * The session's Questions. Asking appends a `question_asked` record and waits * for the matching `question_resolved` one, so the open question is state every * attached surface reads from the log, and an answer from any of them is the * one answer. Asking needs at least one surface that can show it; with none * attached (a headless run) the asker is told nobody will answer. */ export declare class SessionQuestionsImpl implements SessionQuestions { private readonly deps; private surfaces; /** Questions an asker in this process still waits on; one left in the log by an earlier run is dead. */ private readonly waiting; constructor(deps: { readonly log: EventLog; readonly sessionId: SessionId; }); get surfaceCount(): number; attachSurface(): () => void; readonly ask: QuestionAsker; answer(questionId: string, answers: QuestionAnswers): Promise; /** * Close every question nobody in this process waits on: on a resumed log * those were left open by a run that stopped mid-question. Recording the * close keeps the log the one answer to "is a question open" for every client. */ closeLeftOver(): Promise; /** * The person sent a new message (turn `turnId`) instead of answering: close * the questions other turns in this process still wait on, so those turns * end and the new message is not left queued behind them. */ closeOnNewMessage(turnId: TurnId): Promise; private isOpen; private outcomeOf; private record; } //# sourceMappingURL=session-questions.d.ts.map