import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@pk-nerdsaver-ai/pi-agent-core";
import type { ToolExample } from "@pk-nerdsaver-ai/pi-ai";
import type { ToolSession } from "../tools";
import { type EditMode } from "../utils/edit-mode";
import { hashlineEditParamsSchema } from "./hashline";
import { type ApplyPatchParams, applyPatchSchema } from "./modes/apply-patch";
import { type PatchParams, patchEditSchema } from "./modes/patch";
import { type ReplaceParams, replaceEditSchema } from "./modes/replace";
import { type EditToolDetails } from "./renderer";
export * from "@pk-nerdsaver-ai/hashline";
export { DEFAULT_EDIT_MODE, type EditMode, normalizeEditMode } from "../utils/edit-mode";
export * from "./apply-patch";
export * from "./diff";
export * from "./file-snapshot-store";
export * from "./hashline";
export * from "./modes/apply-patch";
export * from "./modes/patch";
export * from "./modes/replace";
export * from "./normalize";
export * from "./renderer";
export * from "./streaming";
type TInput = typeof replaceEditSchema | typeof patchEditSchema | typeof hashlineEditParamsSchema | typeof applyPatchSchema;
type HashlineParams = typeof hashlineEditParamsSchema.infer;
type EditParams = ReplaceParams | PatchParams | HashlineParams | ApplyPatchParams;
export declare class EditTool implements AgentTool<TInput> {
    #private;
    private readonly session;
    readonly approval: (args: unknown) => "read" | "write";
    readonly formatApprovalDetails: (args: unknown) => string[];
    readonly name = "edit";
    readonly label = "Edit";
    readonly loadMode = "essential";
    readonly concurrency = "exclusive";
    readonly strict = true;
    constructor(session: ToolSession);
    get mode(): EditMode;
    get description(): string;
    get parameters(): TInput;
    get examples(): readonly ToolExample[] | undefined;
    /**
     * When in `apply_patch` mode, expose the Codex Lark grammar so providers
     * that support OpenAI-style custom tools can emit a grammar-constrained
     * variant. Providers that don't support custom tools ignore this field
     * and fall back to emitting a JSON function tool from `parameters`.
     */
    get customFormat(): {
        syntax: "lark";
        definition: string;
    } | undefined;
    /**
     * Wire-level tool name used when the custom-tool variant is active. GPT-5+
     * is trained on the literal name `apply_patch`; internally this is just a
     * mode of the `edit` tool. The agent-loop dispatcher matches both the
     * internal `name` and `customWireName`, so returned calls route correctly.
     */
    get customWireName(): string | undefined;
    /**
     * Normalize streamed args into the source text this edit introduces, so
     * stream matchers (TTSR rules) run against real file content instead of the
     * mode-specific patch grammar.
     */
    matcherDigest(args: unknown): string | undefined;
    execute(_toolCallId: string, params: EditParams, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<EditToolDetails, TInput>, context?: AgentToolContext): Promise<AgentToolResult<EditToolDetails, TInput>>;
}
