import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
import type { Component } from "@oh-my-pi/pi-tui";
import type { RenderResultOptions } from "../extensibility/custom-tools/types.js";
import type { Theme } from "../modes/theme/theme.js";
import type { ToolSession } from "./index.js";
declare const jobSchema: import("arktype/internal/variants/object.ts").ObjectType<{
    poll?: string[] | undefined;
    cancel?: string[] | undefined;
    list?: boolean | undefined;
}, {}>;
type JobParams = typeof jobSchema.infer;
interface JobSnapshot {
    id: string;
    type: "bash" | "task";
    status: "running" | "completed" | "failed" | "cancelled";
    label: string;
    durationMs: number;
    resultText?: string;
    errorText?: string;
}
type CancelStatus = "cancelled" | "not_found" | "already_completed";
export interface JobToolDetails {
    jobs: JobSnapshot[];
    cancelled?: {
        id: string;
        status: CancelStatus;
    }[];
}
/**
 * A poll snapshot where every watched job is still running and nothing was
 * cancelled — pure "still waiting" noise once a newer poll exists. The TUI
 * keeps such a block un-finalized (displaceable) so a follow-up `job` call
 * replaces it instead of stacking another waiting frame in the transcript.
 */
export declare function isWaitingPollDetails(details: unknown): boolean;
export declare class JobTool implements AgentTool<typeof jobSchema, JobToolDetails> {
    #private;
    private readonly session;
    readonly name = "job";
    readonly approval: "read";
    readonly label = "Job";
    readonly summary = "Manage long-running background jobs (async bash/python)";
    readonly description: string;
    readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
        poll?: string[] | undefined;
        cancel?: string[] | undefined;
        list?: boolean | undefined;
    }, {}>;
    readonly strict = true;
    readonly interruptible = true;
    readonly loadMode = "discoverable";
    constructor(session: ToolSession);
    execute(_toolCallId: string, params: JobParams, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<JobToolDetails>, _context?: AgentToolContext): Promise<AgentToolResult<JobToolDetails>>;
}
interface JobRenderArgs {
    poll?: string[];
    cancel?: string[];
    list?: boolean;
}
export declare const jobToolRenderer: {
    inline: boolean;
    renderCall(args: JobRenderArgs, _options: RenderResultOptions, uiTheme: Theme): Component;
    renderResult(result: {
        content: Array<{
            type: string;
            text?: string;
        }>;
        details?: JobToolDetails;
        isError?: boolean;
    }, options: RenderResultOptions, uiTheme: Theme, args?: JobRenderArgs): Component;
    mergeCallAndResult: boolean;
};
export {};
