/** * A command pattern's tokens. Whitespace-split; trailing wildcards are * dropped because a pattern is a prefix and already matches any * continuation (`git *` and `git` are the same rule; a bare `*` is every * command). */ export declare function splitPattern(pattern: string): string[]; /** Whether a pattern is a prefix of a line's tokens (command name first). */ export declare function patternMatches(pattern: string, tokens: readonly string[]): boolean; /** * Whether a pattern can match some line running the node at a path. * * Neither side has to be the longer one, which is what separates this * from `patternMatches`: only the words the two share are read. A pattern * that runs past the path narrows what is reachable below it (`linear * issue list` reaches `linear issue`, because one line of that group is * allowed); a path that runs past the pattern is already covered (`linear * issue` reaches `linear issue list`). */ export declare function patternReaches(pattern: string, path: readonly string[]): boolean; /** * Whether a pattern can match some line of a command. Visibility asks * this: a name is installed for the session when a pattern of every * allow list starts with it (or with the wildcard), whatever the rest of * the pattern requires of the line. The one-word case of `patternReaches`. */ export declare function patternNames(pattern: string, name: string): boolean; /** * The allow list both lists grant: every pair unified token by token, * the longer prefix winning where one extends the other and a wildcard * yielding to the concrete token. */ export declare function intersectPatterns(a: readonly string[], b: readonly string[]): string[]; //# sourceMappingURL=pattern.d.ts.map