export type PolicyMode = "strict" | "lab" | "readonly"; export interface PolicyRule { tool: string; when?: Record; confirm: boolean; } export interface Policy { mode: PolicyMode; rules: PolicyRule[]; } export type Decision = "allow" | "confirm" | "hidden"; export declare const DEFAULT_POLICY_FILE: string; /** * Resolution: file (opts.file → $CROSSPAD_MCP_POLICY_FILE → ~/.config/crosspad-mcp/policy.json) * gives mode + rules; $CROSSPAD_MCP_POLICY and --read-only can only make the * mode stricter (lab < strict < readonly). */ export declare function loadPolicy(opts?: { file?: string; env?: NodeJS.ProcessEnv; readOnlyFlag?: boolean; }): Policy; /** Every key in `when` must deep-equal the corresponding call argument. */ export declare function ruleMatches(rule: PolicyRule, tool: string, args: Record): boolean; export declare function decide(policy: Policy, tool: string, args: Record): Decision;