/**
 * Semantic codebase search tool.
 *
 * Uses embeddings + FTS5 to support natural language queries over the codebase.
 * Feature-gated on `node:sqlite` availability (Node 22+).
 */
import type { AgentTool } from "@dreb/agent-core";
import { type Static } from "@sinclair/typebox";
import type { ToolDefinition, ToolRenderResultOptions } from "../extensions/types.js";
declare const searchSchema: import("@sinclair/typebox").TObject<{
    query: import("@sinclair/typebox").TString;
    restrictToDir: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
    limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
    searchDir: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
    rebuild: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
}>;
export type SearchToolInput = Static<typeof searchSchema>;
export interface SearchToolDetails {
    resultCount: number;
    indexBuilt: boolean;
    indexStats?: {
        files: number;
        chunks: number;
    };
}
/** @internal Exported for testing. */
export declare function formatSearchCall(args: {
    query?: string;
    restrictToDir?: string;
    limit?: number;
    searchDir?: string;
    rebuild?: boolean;
} | undefined, theme: typeof import("../../modes/interactive/theme/theme.js").theme): string;
/** @internal Exported for testing. */
export declare function formatSearchResult(result: {
    content: Array<{
        type: string;
        text?: string;
    }>;
    details?: SearchToolDetails;
}, options: ToolRenderResultOptions, theme: typeof import("../../modes/interactive/theme/theme.js").theme): string;
/** Check if the search tool is available (requires node:sqlite). */
export declare function isSearchAvailable(): boolean;
export declare function createSearchToolDefinition(cwd: string): ToolDefinition<typeof searchSchema, SearchToolDetails>;
export declare function createSearchTool(cwd: string): AgentTool<typeof searchSchema>;
export {};
//# sourceMappingURL=search.d.ts.map