import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
import type { ToolExample } from "@oh-my-pi/pi-ai";
import type { Component } from "@oh-my-pi/pi-tui";
import type { SSHHost } from "../capability/ssh.js";
import type { RenderResultOptions } from "../extensibility/custom-tools/types.js";
import type { Theme } from "../modes/theme/theme.js";
import type { ToolSession } from "./index.js";
import { type OutputMeta } from "./output-meta.js";
declare const sshSchema: import("arktype/internal/variants/object.ts").ObjectType<{
    host: string;
    command: string;
    cwd?: string | undefined;
    timeout?: number | undefined;
}, {}>;
export interface SSHToolDetails {
    meta?: OutputMeta;
}
type SshToolParams = typeof sshSchema.infer;
export declare class SshTool implements AgentTool<typeof sshSchema, SSHToolDetails> {
    #private;
    private readonly session;
    private readonly hostNames;
    private readonly hostsByName;
    readonly description: string;
    readonly name = "ssh";
    readonly approval: "exec";
    readonly formatApprovalDetails: (args: unknown) => string[];
    readonly summary = "Execute a command on a remote host over SSH";
    readonly loadMode = "discoverable";
    readonly label = "SSH";
    readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
        host: string;
        command: string;
        cwd?: string | undefined;
        timeout?: number | undefined;
    }, {}>;
    readonly concurrency = "exclusive";
    readonly strict = true;
    readonly examples: readonly ToolExample<SshToolParams>[];
    constructor(session: ToolSession, hostNames: string[], hostsByName: Map<string, SSHHost>, description: string);
    execute(_toolCallId: string, { host, command, cwd, timeout: rawTimeout }: SshToolParams, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<SSHToolDetails>, _ctx?: AgentToolContext): Promise<AgentToolResult<SSHToolDetails>>;
}
export declare function loadSshTool(session: ToolSession): Promise<SshTool | null>;
interface SshRenderArgs {
    host?: string;
    command?: string;
    timeout?: number;
}
/** Whether the painted call args still carry the streamed raw-JSON buffer —
 *  the shape that renders the `⏳ SSH: […]` / `$ …` placeholder. */
declare function hasStreamedRenderArgs(args: unknown): boolean;
interface SshRenderContext {
    /** Visual lines for truncated output (pre-computed by tool-execution) */
    visualLines?: string[];
    /** Number of lines skipped */
    skippedCount?: number;
    /** Total visual lines */
    totalVisualLines?: number;
}
export declare const sshToolRenderer: {
    animatedPendingPreview: boolean;
    renderCall(args: SshRenderArgs, options: RenderResultOptions, uiTheme: Theme): Component;
    renderResult(result: {
        content: Array<{
            type: string;
            text?: string;
        }>;
        details?: SSHToolDetails;
        isError?: boolean;
    }, options: RenderResultOptions & {
        renderContext?: SshRenderContext;
    }, uiTheme: Theme, args?: SshRenderArgs): Component;
    mergeCallAndResult: boolean;
    forceFirstResultViewportRepaint: typeof hasStreamedRenderArgs;
    forceResultViewportRepaintOnSettle: boolean;
};
export {};
