/** * Claude Agent SDK Integration * * Uses the official @anthropic-ai/claude-agent-sdk which runs through * your local Claude Code installation. No separate API key needed — * it uses whatever auth your `claude` binary is configured with * (Max subscription, API key, org key, etc.). */ import type { ClaudeCodeMode, ClaudeCodeResult } from "./types.js"; /** * Agent configuration */ export interface AgentConfig { /** Model to use (default: claude-sonnet-4-5-20250929) */ model?: string; /** Tool mode — maps to SDK permission modes */ mode?: ClaudeCodeMode; /** * Explicitly opt in to `bypassPermissions` mode (unrestricted filesystem * and shell access with no interactive prompts). * * When `true`, the agent runs with `permissionMode: "bypassPermissions"` * regardless of `mode`. This is a server-side-only flag — it cannot be * set from tool input schemas. * * @default false */ bypassPermissions?: boolean; /** Maximum conversation turns before stopping */ maxTurns?: number; /** Maximum budget in USD */ maxBudgetUsd?: number; /** System prompt override */ systemPrompt?: string; /** Working directory for file operations */ cwd?: string; /** Allowed tools (default: all Claude Code tools) */ allowedTools?: string[]; /** Additional directories Claude can access */ additionalDirectories?: string[]; /** Enable debug logging */ debug?: boolean; /** Callback when execution completes */ onComplete?: (result: ClaudeCodeResult) => void | Promise; } /** * Execute a task using the Claude Agent SDK. * * Uses your local Claude Code installation — no ANTHROPIC_API_KEY needed. * * @example * ```typescript * const result = await executeAgent("Fix the failing tests in src/utils", { * cwd: "/path/to/project", * mode: "code", * }); * ``` */ export declare function executeAgent(task: string, config?: AgentConfig): Promise; /** * Create a reusable agent function with preset configuration. * * **Security note:** `overrides` cannot set `bypassPermissions` — it is * stripped before execution. Only `defaults` can enable bypass mode, so keep * `defaults` server-controlled and never derived from untrusted input. * * @example * ```typescript * const reviewer = createAgent({ * mode: "analysis", * systemPrompt: "You are an expert code reviewer.", * }); * * const result = await reviewer("Review src/auth/ for security issues"); * ``` */ export declare function createAgent(defaults?: AgentConfig): (task: string, overrides?: AgentConfig) => Promise; //# sourceMappingURL=agent.d.ts.map