/** A single pattern entry in the permission registry. */ interface PermissionPattern { /** Regex tested against the tool input string. */ pattern: RegExp; /** * Human-readable rule string — kept for audit-log display only. * NOT persisted: pi has no PermissionRequest event. */ rule: string; } /** Bash command patterns that are auto-allowed. */ export declare const BASH_PATTERNS: PermissionPattern[]; /** Write tool path patterns that are auto-allowed. */ export declare const WRITE_PATTERNS: PermissionPattern[]; /** Edit tool path patterns that are auto-allowed. */ export declare const EDIT_PATTERNS: PermissionPattern[]; /** * Check whether a pi tool_call matches a known Forge auto-allow pattern. * * @param toolName The pi tool name ("bash", "write", "edit", etc.) * @param toolInput The tool's input object (toolCallEvent.input) * @returns The matched rule string for audit logging, or null if no match. * A non-null return is the "silently allow" signal — the caller * should return undefined from the tool_call handler (no block). * * Input fields tested per tool type (mirrors plugin matchTool): * bash → toolInput.command (string) * write → toolInput.path (string; pi uses `path`, not `file_path`) * edit → toolInput.path (string) */ export declare function matchForgePermission(toolName: string, toolInput: Record): string | null; export {};