import type { OrgDaemon } from './daemon.js'; export declare function questionsPath(root: string, org: string): string; export declare function readQuestions(root: string, org: string): { questions: Array<{ questionId: string; role: string; question: string; ts: number; answer: string | null; answeredAt: number | null; }>; }; export declare function writeQuestions(root: string, org: string, data: ReturnType): void; /** Agent-initiated human question (ask_human tool). Persists to questions.json (survives * process/dashboard restarts) and emits a 'question' BusEvent so the dashboard's SSE * stream and global inbox pick it up in real time. Returns a receipt string for the tool call. * Serialized per-org via withQuestionsLock() (same TOCTOU pattern as approvals). */ export declare function askHuman(daemon: OrgDaemon, org: string, role: string, question: string): Promise; /** Delivers a human's answer to a pending ask_human question. If the org is still * running, pushes straight into the role's live mailbox (picked up on its very next * generator tick — see Mailbox.stream()). If the org has since stopped, queues the * answer via the same offline fallback deliver()/receiveRemote() already use * (inbox.ts + autoWake) and it's delivered when the org next starts. * * PERSIST-AFTER-DELIVERY: questions.json is only marked answered once delivery has * actually happened (mailbox push, or the message landing in inbox.jsonl). Marking it * first meant a rejected delivery — unknown role, mailbox closed mid-shutdown, a * queueMessage that threw on a full/read-only disk — left the question recorded as * answered while nobody ever received the answer, and the `already answered` guard * then refused every retry. The answer was simply gone. The inverse failure (crash * between delivery and the write) merely re-shows the question as pending, which a * human can act on; a silently swallowed answer is not recoverable. */ export declare function answerQuestion(daemon: OrgDaemon, org: string, role: string, questionId: string, answer: string): Promise<{ ok: true; } | { ok: false; error: string; }>; //# sourceMappingURL=questions.d.ts.map