import { I as IAgentService } from '../agent-CW9XbmG_.js';
import { a as ClaudeBackendOptions } from '../backends-BSrsBYFn.js';
import 'zod';
import '../errors-C-so0M4t.js';

/** @internal Claude SDK PermissionUpdate destination */
type PermissionUpdateDestination = "userSettings" | "projectSettings" | "localSettings" | "session" | "cliArg";
/** @internal Claude SDK PermissionUpdate */
interface SDKPermissionUpdate {
    type: "addRules" | "replaceRules" | "removeRules" | "setMode" | "addDirectories" | "removeDirectories";
    destination: PermissionUpdateDestination;
    [key: string]: unknown;
}
/** @internal Claude SDK PermissionResult */
type SDKPermissionResult = {
    behavior: "allow";
    updatedInput?: Record<string, unknown>;
    updatedPermissions?: SDKPermissionUpdate[];
    toolUseID?: string;
} | {
    behavior: "deny";
    message: string;
    interrupt?: boolean;
    toolUseID?: string;
};
/** @internal Claude SDK CanUseTool callback */
type SDKCanUseTool = (toolName: string, input: Record<string, unknown>, options: {
    signal: AbortSignal;
    suggestions?: SDKPermissionUpdate[];
    blockedPath?: string;
    decisionReason?: string;
    toolUseID: string;
    agentID?: string;
}) => Promise<SDKPermissionResult>;
/** @internal Claude SDK Options */
interface SDKOptions {
    abortController?: AbortController;
    allowedTools?: string[];
    canUseTool?: SDKCanUseTool;
    cwd?: string;
    disallowedTools?: string[];
    env?: {
        [envVar: string]: string | undefined;
    };
    includePartialMessages?: boolean;
    maxTurns?: number;
    model?: string;
    outputFormat?: {
        type: "json_schema";
        schema: Record<string, unknown>;
    };
    pathToClaudeCodeExecutable?: string;
    permissionMode?: string;
    persistSession?: boolean;
    resume?: string;
    sessionId?: string;
    systemPrompt?: string | {
        type: "preset";
        preset: "claude_code";
        append?: string;
    };
    tools?: string[];
    mcpServers?: Record<string, unknown>;
}
/** @internal Claude SDK ModelInfo */
interface SDKModelInfo {
    value: string;
    displayName: string;
    description: string;
}
/** @internal Claude SDK message union */
interface SDKMessage {
    type: string;
    subtype?: string;
    [key: string]: unknown;
}
/** @internal Claude SDK Query interface — AsyncGenerator<SDKMessage> with control methods */
interface SDKQuery extends AsyncGenerator<SDKMessage, void> {
    close(): void;
    interrupt(): Promise<void>;
    supportedModels(): Promise<SDKModelInfo[]>;
}
/** @internal SDK's MCP tool definition */
interface SDKMcpToolDefinition {
    name: string;
    description: string;
    inputSchema: Record<string, unknown>;
    handler: (args: Record<string, unknown>, extra: unknown) => Promise<{
        content: Array<{
            type: string;
            text: string;
        }>;
    }>;
}
/** @internal SDK server config */
interface SDKMcpServerConfigWithInstance {
    type: "sdk";
    name: string;
    instance: unknown;
}
/** @internal */
type SDKModule = {
    query: (params: {
        prompt: string;
        options?: SDKOptions;
    }) => SDKQuery;
    createSdkMcpServer: (options: {
        name: string;
        version?: string;
        tools?: SDKMcpToolDefinition[];
    }) => SDKMcpServerConfigWithInstance;
    tool: (name: string, description: string, inputSchema: Record<string, unknown>, handler: (args: Record<string, unknown>, extra: unknown) => Promise<{
        content: Array<{
            type: string;
            text: string;
        }>;
    }>) => SDKMcpToolDefinition;
};
/** @internal For testing: inject mock SDK module */
declare function _injectSDK(mock: SDKModule | null): void;
/** @internal For testing: reset injected SDK */
declare function _resetSDK(): void;
/** Create Claude CLI backend service. */
declare function createClaudeService(options: ClaudeBackendOptions): IAgentService;

export { ClaudeBackendOptions, _injectSDK, _resetSDK, createClaudeService };
