/** * ast_grep_search + ast_grep_replace — AST-aware pattern search/rewrite. * 11 languages: typescript, tsx, javascript, python, rust, go, CUDA, Metal, pascal, R, Objective-C. */ import type { AgentToolResult, ExtensionAPI, Theme } from "@earendil-works/pi-coding-agent"; import { type Static, Type } from "typebox"; import type { PluginContext } from "../types.js"; import { type RenderContextLike, type RenderResultOptionsLike } from "./render-helpers.js"; declare const SearchParams: Type.TObject<{ pattern: Type.TString; lang: Type.TUnsafe<"go" | "python" | "r" | "typescript" | "tsx" | "javascript" | "rust" | "cuda" | "metal" | "pascal" | "objc">; paths: Type.TOptional>; globs: Type.TOptional>; contextLines: Type.TOptional>; }>; declare const ReplaceParams: Type.TObject<{ pattern: Type.TString; rewrite: Type.TString; lang: Type.TUnsafe<"go" | "python" | "r" | "typescript" | "tsx" | "javascript" | "rust" | "cuda" | "metal" | "pascal" | "objc">; paths: Type.TOptional>; globs: Type.TOptional>; dryRun: Type.TOptional; }>; export interface AstSurface { astSearch: boolean; astReplace: boolean; } /** Exported for renderer unit tests. */ export declare function buildAstSearchSections(payload: unknown, theme: Theme): string[]; /** Exported for renderer unit tests. */ export declare function buildAstReplaceSections(payload: unknown, theme: Theme): string[]; /** Exported for renderer unit tests. */ export declare function renderAstCall(toolName: "ast_grep_search" | "ast_grep_replace", args: Static | Static, theme: Theme, context: RenderContextLike): import("@earendil-works/pi-tui").Text; /** Exported for renderer unit tests. */ export declare function renderAstResult(toolName: "ast_grep_search" | "ast_grep_replace", result: AgentToolResult, theme: Theme, context: RenderContextLike, options?: RenderResultOptionsLike): import("@earendil-works/pi-tui").Component | import("@earendil-works/pi-tui").Text; export declare function registerAstTools(pi: ExtensionAPI, ctx: PluginContext, surface: AstSurface): void; export {}; //# sourceMappingURL=ast.d.ts.map