import type { AuthorizationGateConfig, AuthorizationRule, GateEvaluationResult } from '../types/authorization/index.js'; import type { ToolDefinition } from '../types/tool/index.js'; import type { Logger } from '../utils/logger.js'; export interface ToolCallContext { readonly toolName: string; readonly toolInput: unknown; readonly toolDef: ToolDefinition | undefined; } /** * What the rule actually said, in words a model can act on. * * This used to be the rule TYPE and nothing else, so a denial reached the * model as "Blocked by the authorization gate: Matched rule: deny_by_name" — * naming the kind of rule and nothing about it. Not which tool, not which * pattern, not whether a different input would fare better. * * The difference is behavioural rather than cosmetic. Told only that it was * denied, a model rewords the same call and tries again, because nothing in * the message says a retry is pointless. Told that a pattern rule denies * `git push*`, it can stop, say so, and do something else. A refusal that * cannot be reasoned about produces thrashing; one that can produces a route * around it. */ export declare function describeRule(rule: AuthorizationRule): string; export declare class AuthorizationGate { private readonly rules; private readonly compiledPatterns; private readonly nameSets; private readonly log; private readonly logDecisions; private readonly enabled; constructor(config: AuthorizationGateConfig, log: Logger); evaluate(ctx: ToolCallContext): GateEvaluationResult; } //# sourceMappingURL=gate.d.ts.map