import { ToolCall, ToolCallContent, ToolCallLocation, ToolCallUpdate } from '@agentclientprotocol/sdk';
import { ToolUseBlock, ToolResultBlockParam, WebSearchToolResultBlockParam } from '@anthropic-ai/sdk/resources';
import { BetaWebSearchToolResultBlockParam, BetaWebFetchToolResultBlockParam, BetaCodeExecutionToolResultBlockParam, BetaBashCodeExecutionToolResultBlockParam, BetaTextEditorCodeExecutionToolResultBlockParam, BetaRequestMCPToolResultBlockParam, BetaToolSearchToolResultBlockParam } from '@anthropic-ai/sdk/resources/beta.mjs';

/**
 * Per-toolUseId handoff from the PostToolUse hook to `toolUpdateFromToolResult`.
 * Can't emit a standalone `tool_call_update` because the SDK emits its own
 * when it processes the tool_result, and the renderer applies it via
 * `Object.assign` — our earlier update would be overwritten.
 */
type EnrichedReadCache = Map<string, string>;

type ToolInfo = Pick<ToolCall, "title" | "kind" | "content" | "locations">;
/**
 * Convert an absolute file path to a project-relative path for display.
 * Returns the original path if it's outside the project directory or if no cwd is provided.
 */
declare function toDisplayPath(filePath: string, cwd?: string): string;
declare function toolInfoFromToolUse(toolUse: Pick<ToolUseBlock, "name" | "input">, options?: {
    supportsTerminalOutput?: boolean;
    toolUseId?: string;
    cachedFileContent?: Record<string, string>;
    cwd?: string;
}): ToolInfo;
declare function toolUpdateFromEditToolResponse(toolResponse: unknown): {
    content: ToolCallContent[];
    locations: ToolCallLocation[];
} | null;
declare function toolUpdateFromToolResult(toolResult: ToolResultBlockParam | BetaWebSearchToolResultBlockParam | BetaWebFetchToolResultBlockParam | WebSearchToolResultBlockParam | BetaCodeExecutionToolResultBlockParam | BetaBashCodeExecutionToolResultBlockParam | BetaTextEditorCodeExecutionToolResultBlockParam | BetaRequestMCPToolResultBlockParam | BetaToolSearchToolResultBlockParam, toolUse: Pick<ToolUseBlock, "name" | "input"> | undefined, options?: {
    supportsTerminalOutput?: boolean;
    toolUseId?: string;
    cachedFileContent?: Record<string, string>;
    enrichedReadCache?: EnrichedReadCache;
}): Pick<ToolCallUpdate, "title" | "content" | "locations" | "_meta">;

export { toDisplayPath, toolInfoFromToolUse, toolUpdateFromEditToolResponse, toolUpdateFromToolResult };
