/** * Ask-enforce classifier: does an ended turn ask the owner something in prose? * * Pure and deterministic, run by the `cleo hook ask-enforce` Stop hook on every * turn end, so it is regex-only with no I/O and no model call. It is tuned * against false positives: anything that is not the agent's own closing prose * (code, quotes, headings, tables, URLs, a research report's open-questions * list) is removed first, only the reply's tail is read, and a question * attributed to someone else or answered on the spot does not count. Every * doubt resolves to `allow`; a corpus test pins the false-positive rate at 0. * * Design: `cleo docs fetch t13420-ask-enforce-stop-hook-design`. * * @task T13420 * @epic T13418 */ import type { AskEnforceInput, AskEnforceVerdict } from '@cleocode/contracts'; /** * Classify one ended turn. * * @param input - The final reply, the turn's tool calls and the ask-tool names. * @returns `block` when the reply's tail asks the owner something in prose and * the turn made no ask-tool call; `allow` otherwise, including on any doubt. * * @example * ```typescript * classifyOwnerAsk({ * lastAssistantText: 'Tests pass. Should I merge it?', * turnToolCalls: [], * askToolNames: ['AskUserQuestion'], * }).verdict; // "block" * ``` */ export declare function classifyOwnerAsk(input: AskEnforceInput): AskEnforceVerdict; /** * The block reason the agent reads: re-ask with the harness ask tool. * * @param verdict - A `block` verdict from {@link classifyOwnerAsk}. * @param askToolName - The provider's ask tool, or `null` for the `hitl.request` fallback. * @returns One paragraph telling the agent how to re-ask. */ export declare function askEnforceReason(verdict: AskEnforceVerdict, askToolName: string | null): string; //# sourceMappingURL=ask-enforce.d.ts.map