export type { ToolCall } from '../providers/anthropic-direct/types.js'; export type { ToolResult, RenderHints } from '../providers/shared/tool-result.js'; export type { AnthropicToolDef } from '../providers/anthropic-direct/types.js'; export type { ToolDispatcher } from '../providers/anthropic-direct/tool-dispatcher.js'; import type { ToolResult } from '../providers/shared/tool-result.js'; import type { TraceSink } from '../trace/index.js'; import type { SpawnedPidRegistry } from './handlers/pid-registry.js'; export interface ToolHandlerContext { cwd?: string; resolveBase?: string; readRoots?: string[]; writeRoots?: string[]; env?: Record; allowAll?: boolean; traceWriter?: TraceSink; toolUseId?: string; sessionId?: string; spawnedPidRegistry?: SpawnedPidRegistry; onBashOutputTail?: (tail: string | undefined) => void; } export type ToolHandler = (input: unknown, signal: AbortSignal, context?: ToolHandlerContext) => Promise; export type ConcurrencyClassifier = (toolName: string, input?: unknown) => boolean;