import type { AgentInput } from './schema.js'; type BatchTask = NonNullable[number]; /** * True when the text explicitly asks for a parallel / per-unit / separate-agent * fan-out. Exported for the TUI collapse guard so both guards honour the same * explicit-intent precedent. */ export declare function userRequestsParallelFanout(text: string | undefined): boolean; /** * True when a constraint's text describes the agent topology (parallelism / * spawn-count / separate-agent-per-unit) a fan-out collapse removes. Consulted by * the WRFC controller, only for chains created via a collapse, to mark such a * constraint system-unsatisfiable so it can never fail the review. */ export declare function isFanoutShapeConstraintText(text: string | undefined): boolean; export interface WrfcBatchPolicyDecision { readonly kind: 'independent' | 'collapse-to-wrfc'; readonly reason?: string | undefined; readonly ownerInput?: AgentInput | undefined; readonly roleTaskIndexes?: readonly number[] | undefined; readonly compoundTaskIndexes?: readonly number[] | undefined; readonly scopeMutation?: WrfcScopeMutation | undefined; } export interface WrfcScopeMutation { readonly detected: true; readonly action: 'used-authoritative-task' | 'normalized-narrowed-task'; readonly proposedTask: string; readonly authoritativeTask: string; readonly warnings: readonly string[]; } export interface WrfcToolContractResolution { readonly tools?: string[] | undefined; readonly restrictTools?: boolean | undefined; readonly scopeMutation?: WrfcScopeMutation | undefined; } export declare function isRootReviewRoleTemplate(template: string | undefined): boolean; /** * True when the CALLER already decided this spawn must not become a * write-review-fix-confirm chain. * * Consulted by the ROOT-SPAWN normalization in AgentManager.spawn, and only * against the prose test below, never against a declared role template, and * never inside a batch (see evaluateWrfcBatchPolicy, where a role-labelled * fan-out is exactly the model behaviour the collapse exists to correct). * * An explicit `reviewMode: 'wrfc'` is the opposite decision and wins over a * suppression flag on the same input. */ export declare function callerSuppressedWrfcChain(input: Pick): boolean; /** * True when the task PROSE reads like review/test/verification work. * * Separate from the template test on purpose. A template of `reviewer` is the * caller stating a role; this is a guess made from wording, and wording is not * always a task description. A continuation prompt carries the chat transcript * inside its task text, so one earlier assistant sentence, "I'll review the * route, timing, stops", made a whole conversation read as a root review task. * See the caller of this function for what that guess is and is not allowed to * override. */ export declare function taskProseReadsAsRootReviewRole(task: string): boolean; export declare function isRootReviewRoleTask(task: Pick): boolean; export declare function resolveAuthoritativeWrfcScope(input: Pick, proposedTask: string): { readonly task: string; readonly scopeMutation?: WrfcScopeMutation | undefined; }; export declare function resolveNarrowedRootSpawnScope(input: Pick, proposedTask: string): { readonly task: string; readonly scopeMutation?: WrfcScopeMutation | undefined; }; export declare function resolveImplementationToolContract(args: { readonly tools: string[] | undefined; readonly restrictTools: boolean | undefined; readonly authoritativeTask: string; readonly proposedTask: string; readonly scopeMutation?: WrfcScopeMutation | undefined; }): WrfcToolContractResolution; export declare function evaluateWrfcBatchPolicy(input: AgentInput): WrfcBatchPolicyDecision; export {}; //# sourceMappingURL=wrfc-batch-policy.d.ts.map