/** * @fileoverview Static safety guards for user-supplied `nameRegex` filters. * JavaScript's RegExp engine has no native execution timeout, so we statically * reject the textbook catastrophic-backtracking shapes before calling * `new RegExp(...)`. Shared by every tool that compiles a user-supplied regex: * the name filters on `obsidian_list_tags` / `obsidian_list_commands` / * `obsidian_list_notes`, and the `useRegex` search patterns on * `obsidian_replace_in_note` (which raises the length cap for note-body input). * @module mcp-server/tools/definitions/_shared/regex-safety */ /** Maximum allowed pattern length — bounds compile cost and AST surface. */ export declare const NAME_REGEX_MAX_LENGTH = 256; /** * Returns a human-readable reason string when the pattern is unsafe, or * `undefined` when it passes the static guards. `maxLength` defaults to * {@link NAME_REGEX_MAX_LENGTH}; callers running patterns over larger input * (e.g. a full note body) may raise it. The nested-quantifier check is applied * unchanged regardless of the cap. Callers compile with `new RegExp(pattern)` * after this returns `undefined` and surface the returned reason via the * tool's `regex_unsafe` error. */ export declare function nameRegexSafetyIssue(pattern: string, maxLength?: number): string | undefined; //# sourceMappingURL=regex-safety.d.ts.map