import type { PermissionMode, ToolPolicy } from "@hmbown/kytchen-protocol"; import type { ToolRegistry } from "./registry.js"; export interface PolicyDecision { tool: string; mode: PermissionMode; /** If mode is "deny", the reason for denial. */ reason?: string; /** Timestamp of the decision. */ decidedAt: string; } export interface ApprovalRequest { tool: string; args: Record; reason: string; } /** * Callback for requesting user approval. * Returns true if approved, false if denied. */ export type ApprovalCallback = (request: ApprovalRequest) => Promise; export declare class PolicyEngine { private readonly policy; private readonly registry; private readonly onApproval?; private readonly decisions; constructor(policy: ToolPolicy, registry: ToolRegistry, onApproval?: ApprovalCallback | undefined); /** * Evaluate whether a tool call is permitted. * Returns the decision and records it for audit. */ evaluate(toolName: string, args: Record): Promise; /** Get the audit log of all decisions. */ getAuditLog(): readonly PolicyDecision[]; /** Clear the audit log. */ clearAuditLog(): void; /** * Preview the policy mode that will be evaluated for the given tool. * Useful for emitting status events before asynchronous approval flows. */ getRequestedMode(toolName: string): PermissionMode; private resolveMode; } //# sourceMappingURL=policy.d.ts.map