import type { CommandContext, AdmissionRules } from '../types.ts'; /** * Whether a session can see one node of a program tree. * * A profile without an allow list hides nothing; a profile with one hides every * node no pattern of it reaches. Only a CLI's verbs can be narrowed this * way, and only because the walk canonicalizes them (an alias resolved, * the global options before the verb dropped) before any pattern is read. * A flag has no such normal form, so a pattern never means to speak about * one. */ export declare function nodeVisible(path: readonly string[], rules: AdmissionRules | null): boolean; /** * Whether a session can see a command at all. A profile without an allow * list hides nothing; a profile with one hides every name none of its * patterns start with, builtins included. Shell functions are the * caller's exemption, not this one's. The head-word case of * `nodeVisible`. */ export declare function headVisible(name: string, rules: AdmissionRules | null): boolean; /** * The tokens a pattern reads: the door's normalization when it set one, * else the name and the raw argv (a context built by hand). */ export declare function lineTokens(ctx: CommandContext): readonly string[]; /** * Whether the profile's allow list has a pattern for the whole line. A * word that is not a tool (`ctx.tool` cleared by the door: the agent's * own function, an executed path) is always allowed here; a deny rule * is the only thing that can refuse it. */ export declare function lineAllowed(ctx: CommandContext, rules: AdmissionRules | null): boolean; //# sourceMappingURL=allow.d.ts.map