/** * Permissions v2, Path scope restriction policy rule evaluator. * * PathScopeRule matches tool calls that operate on file paths, restricting * or allowing access based on whether the path argument matches any of the * specified path patterns. Supports glob-style `**` wildcards. * Independently testable. */ import type { PathScopeRule, EvaluationStep } from '../types.js'; /** Result returned by evaluatePathScopeRule. */ export interface PathScopeRuleResult { matched: boolean; step: EvaluationStep; } /** * extractPathArgs, Extracts EVERY path string from args. * Understands the edit tool's real shape (`edits: [{ path }, ...]`) as well * as flat `path`/`file`/`target` strings. */ export declare function extractPathArgs(args: Record): string[]; /** * evaluatePathScopeRule, Evaluates a single PathScopeRule against a tool call. * * Returns `matched: true` when: * 1. The tool name matches the rule's `toolPattern`, AND * 2. A path argument is found, AND * 3. The normalized absolute path matches at least one of the rule's `pathPatterns`. * * @param rule , The PathScopeRule to evaluate. * @param toolName, Name of the tool being called. * @param args , Arguments passed to the tool. */ export declare function evaluatePathScopeRule(rule: PathScopeRule, toolName: string, args: Record, projectRoot?: string): PathScopeRuleResult; //# sourceMappingURL=path-scope.d.ts.map