import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@pk-nerdsaver-ai/pi-agent-core";
import type { Component } from "@pk-nerdsaver-ai/pi-tui";
import type { RenderResultOptions } from "../extensibility/custom-tools/types";
import { type FileDiagnosticsResult } from "../lsp";
import { type Theme } from "../modes/theme/theme";
import type { ToolSession } from "../sdk";
import { type OutputMeta } from "./output-meta";
declare const writeSchema: import("arktype/internal/variants/object.ts").ObjectType<{
    path: string;
    content: string;
}, {}>;
export type WriteToolInput = typeof writeSchema.infer;
/** Details returned by the write tool for TUI rendering */
export interface WriteToolDetails {
    diagnostics?: FileDiagnosticsResult;
    meta?: OutputMeta;
    /** Set when the file was auto-chmod'd because content begins with a `#!` shebang. */
    madeExecutable?: boolean;
    /** Absolute filesystem path the write resolved to. Used by the renderer to wrap
     * the (possibly cwd-relative) header path in an OSC 8 `file://` hyperlink. */
    resolvedPath?: string;
}
type WriteParams = WriteToolInput;
/**
 * Write tool implementation.
 *
 * Creates or overwrites files with optional LSP formatting and diagnostics.
 */
export declare class WriteTool implements AgentTool<typeof writeSchema, WriteToolDetails> {
    #private;
    private readonly session;
    readonly name = "write";
    readonly approval: (args: unknown) => "read" | "write";
    readonly formatApprovalDetails: (args: unknown) => string[];
    readonly label = "Write";
    readonly description: string;
    readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
        path: string;
        content: string;
    }, {}>;
    readonly strict = true;
    readonly concurrency = "exclusive";
    readonly loadMode = "discoverable";
    readonly summary = "Write content to a file (creates or overwrites)";
    /** Stream matchers should see the real file content, not its JSON-escaped argument encoding. */
    matcherDigest(args: unknown): string | undefined;
    constructor(session: ToolSession);
    execute(_toolCallId: string, { path: rawPath, content }: WriteParams, signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback<WriteToolDetails>, context?: AgentToolContext): Promise<AgentToolResult<WriteToolDetails>>;
}
interface WriteRenderArgs {
    path?: string;
    file_path?: string;
    content?: string;
}
export declare const writeToolRenderer: {
    renderCall(args: WriteRenderArgs, options: RenderResultOptions, uiTheme: Theme): Component;
    renderResult(result: {
        content: Array<{
            type: string;
            text?: string;
        }>;
        details?: WriteToolDetails;
        isError?: boolean;
    }, options: RenderResultOptions, uiTheme: Theme, args?: WriteRenderArgs): Component;
    mergeCallAndResult: boolean;
};
export {};
