import type { Rule } from "./v2/types"; /** * Wildcard match, byte-faithful to `Wildcard.match(input, pattern)` * (`core/src/util/wildcard.ts:3-13`). * * Backslashes are normalized to `/` on both sides, regex specials are escaped, * then `*` becomes `.*` and `?` becomes `.`. The compiled pattern is anchored and * matched with the `s` flag (`si` on win32, so pattern matching is * case-insensitive there and case-sensitive everywhere else — dormant on darwin * but kept so the mirror does not diverge on Windows). * * SPECIAL CASE (`:11`): a pattern that compiles to a trailing `" .*"` becomes * `"( .*)?"`, which makes the trailing argument list optional. So the corpus * pattern `"ls *"` (`agent/code-explorer.md:13`) compiles to `ls( .*)?` and * matches both `ls src` and the bare `ls`; without the special case the bare * command would not match. */ export declare function matchWildcard(input: string, pattern: string): boolean; /** * Resolve `action` + `resource` against an ordered ruleset. * * LAST matching rule wins, mirroring the host's `findLast` * (`core/src/permission.ts:87-97`) — rule order is the whole precedence model, so * callers must preserve the order `toV2Permissions` produced. * * @returns the winning effect, or `undefined` when no rule matches (see the * fail-direction note in the module docblock). */ export declare function evaluateRules(rules: readonly Rule[], action: string, resource: string): Rule["effect"] | undefined; //# sourceMappingURL=evaluate-rules.d.ts.map