/**
 * Generates a pi-coding-agent extension that acts as a tool_call guard.
 *
 * The guard intercepts every tool invocation and enforces access policy:
 * - `allow` or already-granted tools pass through immediately
 * - `ask` tools block until the gateway grants permission (via REST long-poll)
 * - `never` tools are blocked immediately with a clear error message. (In
 *   principle `never` tools should not be registered at all, but some tool
 *   extensions register multiple tools from a single file — e.g.
 *   `defaults/tools/shell/extension.ts` registers both `bash` and `bash_bg`.
 *   When a role allows `bash` but denies `bash_bg`, the extension still
 *   registers both, so the guard has to hard-block the denied one.)
 */
/**
 * Policy info for a single tool, including which group it belongs to.
 */
export interface ToolPolicyEntry {
    policy: string;
    group: string;
}
/**
 * Generate the TypeScript source for a tool_call guard extension.
 *
 * @param sessionId - The session ID (used to POST grant requests to the gateway)
 * @param policies - Map of tool name → { policy, group } for all tools with 'ask' policy
 * @param grantedTools - Tools already granted (pre-populated grant set)
 * @returns TypeScript source string for the extension
 */
export declare function generateToolGuardExtension(sessionId: string, policies: Record<string, ToolPolicyEntry>, grantedTools: string[]): string;
//# sourceMappingURL=tool-guard-extension.d.ts.map