import type { Policy } from "./policy.js"; /** Split a flag's effect list on commas and/or whitespace, so * `--approve "std::read, std::ls"`, `--approve std::read,std::ls`, and * `--approve "std::read std::ls"` all work. */ export declare function splitEffects(list: string | undefined): string[]; /** Joins the values of a flag given more than once, so * `--approve std::read --approve std::write` means the same as * `--approve std::read,std::write`. Commander calls this with each value * and what the earlier ones joined to. Without it, commander keeps only * the last value, and the effects named before it are dropped silently. */ export declare function joinEffectFlags(value: string, previous: string | undefined): string; /** A set name this one probably meant: a case-only mismatch, or one edit * (insert, delete, or replace) away. Also used by `agency effects` for * its unknown-name error. */ export declare function nearMissSetName(name: string, setNames: string[]): string | null; /** Overlay blanket rules from `--approve` / `--reject` flag values onto a * base policy. Returns a new policy; `base` is not mutated. A flag value * holds effect names and effect-set names; sets expand to their * member effects (see expandSetNames). * * Each affected effect's rule list is built in one construction so * precedence is visible in the literal, not implied by statement order: * reject rule, then approve rule, then the base's own rules. * Reject-ahead-of-approve is how overlap resolves to reject under * checkPolicy's first-match-wins — and you cannot break it by reordering * statements. * * Shared by `agency run` (via `resolveRunPolicy`) and the agent's flags. */ export declare function policyOverlayFromFlags(approve: string | undefined, reject: string | undefined, base: Policy): Policy;