import type { Message } from './codebuff-message';
/**
 * Union type of all available tool names
 */
export type ToolName = 'add_message' | 'code_search' | 'end_turn' | 'find_files' | 'read_docs' | 'read_files' | 'run_file_change_hooks' | 'run_terminal_command' | 'set_messages' | 'set_output' | 'spawn_agents' | 'str_replace' | 'think_deeply' | 'web_search' | 'write_file';
/**
 * Map of tool names to their parameter types
 */
export interface ToolParamsMap {
    add_message: AddMessageParams;
    code_search: CodeSearchParams;
    end_turn: EndTurnParams;
    find_files: FindFilesParams;
    read_docs: ReadDocsParams;
    read_files: ReadFilesParams;
    run_file_change_hooks: RunFileChangeHooksParams;
    run_terminal_command: RunTerminalCommandParams;
    set_messages: SetMessagesParams;
    set_output: SetOutputParams;
    spawn_agents: SpawnAgentsParams;
    str_replace: StrReplaceParams;
    think_deeply: ThinkDeeplyParams;
    web_search: WebSearchParams;
    write_file: WriteFileParams;
}
/**
 * Add a new message to the conversation history. To be used for complex requests that can't be solved in a single step, as you may forget what happened!
 */
export interface AddMessageParams {
    role: 'user' | 'assistant';
    content: string;
}
/**
 * Search for string patterns in the project's files. This tool uses ripgrep (rg), a fast line-oriented search tool. Use this tool only when read_files is not sufficient to find the files you need.
 */
export interface CodeSearchParams {
    /** The pattern to search for. */
    pattern: string;
    /** Optional ripgrep flags to customize the search (e.g., "-i" for case-insensitive, "-t ts" for TypeScript files only, "-A 3" for 3 lines after match, "-B 2" for 2 lines before match, "--type-not test" to exclude test files). */
    flags?: string;
    /** Optional working directory to search within, relative to the project root. Defaults to searching the entire project. */
    cwd?: string;
}
/**
 * End your turn, regardless of any new tool results that might be coming. This will allow the user to type another prompt.
 */
export interface EndTurnParams {
}
/**
 * Find several files related to a brief natural language description of the files or the name of a function or class you are looking for.
 */
export interface FindFilesParams {
    /** A brief natural language description of the files or the name of a function or class you are looking for. It's also helpful to mention a directory or two to look within. */
    prompt: string;
}
/**
 * Fetch up-to-date documentation for libraries and frameworks using Context7 API.
 */
export interface ReadDocsParams {
    /** The exact library or framework name (e.g., "Next.js", "MongoDB", "React"). Use the official name as it appears in documentation, not a search query. */
    libraryTitle: string;
    /** Optional specific topic to focus on (e.g., "routing", "hooks", "authentication") */
    topic?: string;
    /** Optional maximum number of tokens to return. Defaults to 10000. Values less than 10000 are automatically increased to 10000. */
    max_tokens?: number;
}
/**
 * Read the multiple files from disk and return their contents. Use this tool to read as many files as would be helpful to answer the user's request.
 */
export interface ReadFilesParams {
    /** List of file paths to read. */
    paths: string[];
}
/**
 * Parameters for run_file_change_hooks tool
 */
export interface RunFileChangeHooksParams {
    /** List of file paths that were changed and should trigger file change hooks */
    files: string[];
}
/**
 * Execute a CLI command from the **project root** (different from the user's cwd).
 */
export interface RunTerminalCommandParams {
    /** CLI command valid for user's OS. */
    command: string;
    /** Either SYNC (waits, returns output) or BACKGROUND (runs in background). Default SYNC */
    process_type?: 'SYNC' | 'BACKGROUND';
    /** The working directory to run the command in. Default is the project root. */
    cwd?: string;
    /** Set to -1 for no timeout. Does not apply for BACKGROUND commands. Default 30 */
    timeout_seconds?: number;
}
/**
 * Set the conversation history to the provided messages.
 */
export interface SetMessagesParams {
    messages: Message[];
}
/**
 * JSON object to set as the agent output. This completely replaces any previous output. If the agent was spawned, this value will be passed back to its parent. If the agent has an outputSchema defined, the output will be validated against it.
 */
export interface SetOutputParams {
}
/**
 * Spawn multiple agents and send a prompt to each of them.
 */
export interface SpawnAgentsParams {
    agents: {
        /** Agent to spawn */
        agent_type: string;
        /** Prompt to send to the agent */
        prompt?: string;
        /** Parameters object for the agent (if any) */
        params?: Record<string, any>;
    }[];
}
/**
 * Replace strings in a file with new strings.
 */
export interface StrReplaceParams {
    /** The path to the file to edit. */
    path: string;
    /** Array of replacements to make. */
    replacements: {
        /** The string to replace. This must be an *exact match* of the string you want to replace, including whitespace and punctuation. */
        old: string;
        /** The string to replace the corresponding old string with. Can be empty to delete. */
        new: string;
        /** Whether to allow multiple replacements of old string. */
        allowMultiple?: boolean;
    }[];
}
/**
 * Deeply consider complex tasks by brainstorming approaches and tradeoffs step-by-step.
 */
export interface ThinkDeeplyParams {
    /** Detailed step-by-step analysis. Initially keep each step concise (max ~5-7 words per step). */
    thought: string;
}
/**
 * Search the web for current information using Linkup API.
 */
export interface WebSearchParams {
    /** The search query to find relevant web content */
    query: string;
    /** Search depth - 'standard' for quick results, 'deep' for more comprehensive search. Default is 'standard'. */
    depth?: 'standard' | 'deep';
}
/**
 * Create or edit a file with the given content.
 */
export interface WriteFileParams {
    /** Path to the file relative to the **project root** */
    path: string;
    /** What the change is intended to do in only one sentence. */
    instructions: string;
    /** Edit snippet to apply to the file. */
    content: string;
}
/**
 * Get parameters type for a specific tool
 */
export type GetToolParams<T extends ToolName> = ToolParamsMap[T];
//# sourceMappingURL=tools.d.ts.map