/**
 * Pattern-based Permissions
 *
 * Provides fine-grained permission control for tool executions using
 * glob-pattern matching. Rules are evaluated in order; first match wins.
 *
 * Tool specifier format:
 *   Bash(npm run *)     → matches Bash tool with commands starting "npm run "
 *   Edit(./src/**)      → matches Edit tool with paths under ./src/
 *   Read(./.env)        → matches Read tool on exactly ./.env
 *   WebFetch(domain:example.com) → matches WebFetch for a specific domain
 *   Bash                → matches all Bash invocations (no pattern)
 *
 * Pattern rules:
 *   *  → matches any characters except /
 *   ** → matches anything including /
 */
export type PermissionAction = 'allow' | 'ask' | 'deny';
export interface PermissionRule {
    tool: string;
    pattern?: string;
    action: PermissionAction;
}
export interface ParsedToolSpecifier {
    tool: string;
    pattern?: string;
}
export declare class PermissionPatternMatcher {
    private rules;
    /**
     * Add a permission rule.
     */
    addRule(rule: PermissionRule): void;
    /**
     * Check permission for a tool call. Evaluates rules in order; first match wins.
     * If no rule matches, returns 'ask' as default.
     */
    checkPermission(tool: string, input: string): PermissionAction;
    /**
     * Parse a tool specifier string like "Bash(npm run *)" into components.
     */
    parseToolSpecifier(spec: string): ParsedToolSpecifier;
    /**
     * Load rules from an array of strings like "allow:Bash(npm run *)".
     */
    loadRules(ruleStrings: string[]): void;
    /**
     * Get all current rules.
     */
    getRules(): PermissionRule[];
    /**
     * Clear all rules.
     */
    clearRules(): void;
    /**
     * Remove a rule by index.
     */
    removeRule(index: number): void;
}
export declare function getPermissionMatcher(): PermissionPatternMatcher;
export declare function resetPermissionMatcher(): void;
