import { Query } from '@anthropic-ai/claude-agent-sdk';
import { L as Logger } from '../../../logger-RC7sPv0S.js';
import '../../../types.js';
import '@posthog/git/handoff';

type McpToolApprovalState = "approved" | "needs_approval" | "do_not_use";
/** Maps MCP tool keys (e.g. `mcp__server__tool`) to their backend approval state. */
type McpToolApprovals = Record<string, McpToolApprovalState>;
interface McpToolMetadata {
    readOnly: boolean;
    name: string;
    description?: string;
    approvalState?: McpToolApprovalState;
}
declare function sanitizeMcpServerName(name: string): string;
declare function fetchMcpToolMetadata(q: Query, logger?: Logger): Promise<void>;
declare function getMcpToolMetadata(toolName: string): McpToolMetadata | undefined;
declare function isMcpToolReadOnly(toolName: string): boolean;
declare function getConnectedMcpServerNames(): string[];
declare function getMcpToolApprovalState(toolName: string): McpToolApprovalState | undefined;
declare function setMcpToolApprovalStates(approvals: McpToolApprovals): void;
declare function clearMcpToolMetadataCache(): void;

export { type McpToolApprovalState, type McpToolApprovals, type McpToolMetadata, clearMcpToolMetadataCache, fetchMcpToolMetadata, getConnectedMcpServerNames, getMcpToolApprovalState, getMcpToolMetadata, isMcpToolReadOnly, sanitizeMcpServerName, setMcpToolApprovalStates };
