import type { Lens } from "../types.js"; import type { CriticalFlowManifest } from "audit-tools/shared"; /** * Select the reviewable lenses from a flow's declared concerns — the single * membership draw shared by planning, coverage, and requeue. A concern that is * not a canonical lens is SKIPPED rather than thrown on, consistent with the * filter-based guards elsewhere in the orchestrator: one stray non-canonical * concern must not abort a whole flow's planning or requeue. */ export declare function selectFlowLenses(concerns: readonly unknown[]): Lens[]; /** * Task-ordering priority for a claimed flow block — lower sorts earlier. * Derived from {@link LENS_REGISTRY}'s `order_weight` so no second hand-copied * lens list backs the ordering. A non-canonical lens (which the membership draw * above already excludes) sorts last. */ export declare function flowLensPriority(lens: string): number; export interface FlowReviewBlock { flow_id: string; lens: string; file_paths: string[]; } /** * `artifact:flow-claim-contract` — what a claim RETURNS beyond the blocks. * * `claimFlowReviewBlocks` reports the post-claim state alongside the claimed * blocks: `assigned` is the caller's assigned set plus every newly claimed * `lens:path` key, and `pending` is the caller's pending map with every claimed * path removed. These are the ONLY channel — the call writes nothing back * through its arguments (see {@link claimFlowReviewBlocks}), so a caller cannot * read claim state it never asked for and the two channels cannot drift. * * The contract rides ON the returned array as non-enumerable properties, so * every consumer that iterates the result as `FlowReviewBlock[]` is unchanged. */ export interface FlowClaimContract { readonly blocks: readonly FlowReviewBlock[]; readonly pending: ReadonlyMap>; readonly assigned: ReadonlySet; } export type FlowClaimResult = FlowReviewBlock[] & FlowClaimContract; /** * Claim the highest-priority critical-flow review blocks out of the pending * work set. * * PRECONDITION (seam audit-coverage-path-keyspace → here, caller to callee): * every path in `criticalFlows`, in `pendingByLens`, and in the `lens:path` * keys of `assigned` is already normalized into ONE key space by the caller. * This module does no normalizing of its own — an unnormalized path simply * fails to intersect and the flow is silently under-claimed. The sole caller, * `buildChunkedAuditTasks`, now SATISFIES that precondition by normalizing every * repo path once at its own boundary, rather than assuming it upstream. * * NO WRITE-BACK: the post-claim state is reported ONLY on the returned * {@link FlowClaimContract}. The parameters are `Readonly` collections so * reintroducing an in-place mutation is a compile error, not a convention — * the by-reference channel this used to ALSO write through was a second, * invisible return value that a caller had to know to look for. */ export declare function claimFlowReviewBlocks(criticalFlows: CriticalFlowManifest, pendingByLens: ReadonlyMap>, assigned: ReadonlySet): FlowClaimResult; //# sourceMappingURL=flowPlanning.d.ts.map