/** Minimal logger contract so the store does not depend on a concrete logger. */ interface LoggerLike { warn(...args: unknown[]): void; } /** File name inside the plugin state dir (volume-backed in prod). */ export declare const TOOL_APPROVALS_STATE_FILE = "tool-approvals.json"; /** * Persistent per-tool "always allow" decisions for the MCP tool approval gate. * * OpenClaw does not persist `allow-always` for plugin approvals (unlike the exec * tool's allowlist file) — the decision arrives once via the `onResolution` * callback and is otherwise one-shot. This store is that missing persistence: * a JSON file in the plugin state dir, so decisions survive gateway restarts, * redeploys, and plugin auto-updates. * * To make a tool prompt again, delete its entry from `tool-approvals.json` * (or the whole file) in the state dir. * * Load is synchronous (once, at plugin register()); writes are synchronous * atomic temp → rename, and only happen on an explicit user decision. */ export declare class ToolApprovalStore { private readonly logger?; private readonly filePath; private readonly allowAlways; constructor(stateDir: string, logger?: LoggerLike | undefined); private load; isAllowedAlways(tool: string): boolean; get size(): number; /** Record a user's allow-always decision and persist it immediately. */ rememberAllowAlways(tool: string): void; private persist; } export {}; //# sourceMappingURL=approval-store.d.ts.map