/** Test hook: clear all in-memory Q&A state. */ export declare function _testResetManagerQa(): void; /** Minimal task shape the resolver needs (kept tiny so callers/tests can inject a reader). */ interface TaskLite { parent: string | null; origin_channel: string | null; } export interface ManagerQaDeps { /** Disk-fresh task lookup (defaults to scanAllTasks). Injected in tests to avoid disk. */ readTask?: (project: string | null, taskId: string) => TaskLite | null; /** Resume a waiting manager so it can answer (defaults to resumeManagerForQuestion). */ resume?: (managerThreadId: string) => void; /** Post the question to a human-escalation channel (defaults to the platform adapter). */ postToChannel?: (channel: string, text: string) => void | Promise; } /** Notice injected into the manager's pendingMessages — an AGENT-facing prompt (English, not i18n; * mirrors the directives, which are not localized). Mirrors buildChildResultNotice's shape: states * what is asked and how to respond. */ export declare function buildQuestionNotice(q: { questionId: string; fromTaskId: string | null; question: string; }): string; export type AskResult = { ok: true; questionId: string; target: 'manager'; managerThreadId: string; } | { ok: true; questionId: string; target: 'human'; channel: string; } | { ok: false; error: string; }; /** Register a subtask's question and route it: to its manager (woken to answer), or — at the top of * the tree — to a human via the origin channel. Returns a questionId the caller polls via getAnswer. */ export declare function askManager(threadId: string, question: string, deps?: ManagerQaDeps): Promise; /** Manager answers a subtask question. Records the answer and forces the manager back to waiting * (pendingControl='wait') so it re-suspends on its still-live children at the next step boundary. */ export declare function submitAnswer(questionId: string, answer: string): Promise<{ ok: boolean; error?: string; }>; /** Poll for an answer. Consumes the entry once an answer is present (one-shot read by the poller). */ export declare function getAnswer(questionId: string): { found: boolean; answered: boolean; answer: string | null; }; /** Interactive hook: if `channel` has a pending human-escalated question, consume this message as * its answer and return true (the caller should then short-circuit normal turn handling). */ export declare function tryAnswerFromHuman(channel: string, text: string): boolean; export {};