import type { AgentDefinition, EffortLevel, HookCallbackMatcher, HookEvent, OnElicitation, PermissionMode, SdkPluginConfig, SettingSource, ThinkingConfig } from './sdk-types.js'; import type { HookRegistry } from '../hooks.js'; import type { ModelProvider } from '../provider.js'; import type { TraceSink } from '../trace/index.js'; import type { AgentModelInput } from './model-types.js'; import type { ModelSlots } from '../session/model-slots.js'; import type { CanUseTool, PermissionBubbler } from './permission-types.js'; import type { Surface } from '../awareness/types.js'; export interface ToolConfig { allowedTools?: string[]; disallowedTools?: string[]; } export interface ResumeHistoryTurn { user: string; assistant: string; inputTokens?: number; userContentBlocks?: import('@anthropic-ai/sdk/resources').ContentBlockParam[]; assistantContentBlocks?: import('@anthropic-ai/sdk/resources').ContentBlockParam[]; } export interface PlanExitControls { setPermissionMode(mode: PermissionMode): Promise; requestImplementSeed(message: string, mode: PermissionMode): void; getPrePlanMode(): PermissionMode | undefined; hasPendingUserMessage?: () => boolean; } export interface AgentConfig { model: AgentModelInput; models?: ModelSlots; apiKey?: string; baseUrl?: string; openaiBaseUrl?: string; forceChatgptOAuth?: boolean; forceXaiOAuth?: boolean; forceXaiApiKey?: boolean; xaiBaseUrl?: string; maxTurns?: number; maxToolUseIterations?: number; softDeadlineMs?: number; thinking?: ThinkingConfig; effort?: EffortLevel; temperature?: number; tools?: ToolConfig; permissionMode?: PermissionMode; hooks?: Partial>; canUseTool?: CanUseTool; permissionBubbler?: PermissionBubbler; settingSources?: SettingSource[]; plugins?: SdkPluginConfig[]; systemPrompt?: string | { type: 'preset'; preset: 'claude_code'; append?: string; }; systemPromptSource?: string; hotMemory?: string; goalPrompt?: string; mcpServers?: Record; mcpManager?: import('../mcp/index.js').McpManager; agents?: Record; agent?: string; cwd?: string; readRoots?: string[]; writeRoots?: string[]; extraReadRoots?: string[]; env?: Record; enableFileCheckpointing?: boolean; pathToClaudeCodeExecutable?: string; continue?: boolean; resume?: string; resumeHistory?: ResumeHistoryTurn[]; sessionId?: string; resumeSessionAt?: string; forkSession?: boolean; persistSession?: boolean; abortSignal?: AbortSignal; timeoutMs?: number; idleTimeoutMs?: number; hookRegistry?: HookRegistry; planExitControls?: PlanExitControls; traceWriter?: TraceSink; bashOutputTailReporter?: (toolUseId: string) => (tail: string | undefined) => void; drainSubagents?: (reason: string) => Promise; isSubagentFork?: true; provider?: ModelProvider; providerFactory?: (model: string | undefined) => ModelProvider; maxBudgetUsd?: number; taskBudget?: number; maxOutputTokens?: number; includePartialMessages?: boolean; includeHookEvents?: boolean; agentProgressSummaries?: boolean; onElicitation?: OnElicitation; autoResumeOnUsageLimit?: boolean; surface?: Surface; parentSessionId?: string; subagentId?: string; subagentToolOutputCapBytes?: number; depth?: number; maxDepth?: number; phaseRole?: 'read-only' | 'read-write'; isSkillDispatch?: boolean; skillDispatchName?: string; isNonInteractive?: boolean; autoCompact?: boolean | { threshold: number; }; telegramChatId?: number; telegramThreadId?: number; customTools?: import('../tools/custom-tool.js').CustomToolDef[]; }