import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@pk-nerdsaver-ai/pi-agent-core";
import type { ToolExample } from "@pk-nerdsaver-ai/pi-ai";
import type { EvalToolDetails } from "../eval/types";
import type { ToolSession } from ".";
export { EVAL_DEFAULT_PREVIEW_LINES, evalToolRenderer } from "./eval-render";
/**
 * Per-cell input. Each cell runs in order; state persists within a language
 * across cells and across tool calls.
 */
declare const evalCellSchema: import("arktype/internal/variants/object.ts").ObjectType<{
    language: "js" | "py";
    code: string;
    title?: string | undefined;
    timeout?: number | undefined;
    reset?: boolean | undefined;
}, {}>;
export type EvalCellInput = typeof evalCellSchema.infer;
export declare const evalSchema: import("arktype/internal/variants/object.ts").ObjectType<{
    cells: {
        language: "js" | "py";
        code: string;
        title?: string | undefined;
        timeout?: number | undefined;
        reset?: boolean | undefined;
    }[];
}, {}>;
export type EvalToolParams = typeof evalSchema.infer;
export type EvalToolResult = {
    content: Array<{
        type: "text";
        text: string;
    }>;
    details: EvalToolDetails | undefined;
};
export type EvalProxyExecutor = (params: EvalToolParams, signal?: AbortSignal) => Promise<EvalToolResult>;
export interface EvalToolDescriptionOptions {
    py?: boolean;
    js?: boolean;
    /**
     * Whether `agent()` is allowed in this session. Driven by the parent's
     * spawn policy (`getSessionSpawns`). Defaults to `true` for backward
     * compatibility — when the session forbids spawning, the prelude doc
     * omits the `agent()` entry so the model does not promise itself a
     * helper that will only ever throw "spawns disabled".
     */
    spawns?: boolean;
}
export declare function getEvalToolDescription(options?: EvalToolDescriptionOptions): string;
export interface EvalToolOptions {
    proxyExecutor?: EvalProxyExecutor;
}
export declare class EvalTool implements AgentTool<typeof evalSchema> {
    #private;
    private readonly session;
    readonly name = "eval";
    readonly approval: "exec";
    readonly formatApprovalDetails: (args: unknown) => string[];
    readonly summary = "Execute Python or JavaScript code in an in-process eval backend";
    readonly loadMode = "discoverable";
    readonly label = "Eval";
    get description(): string;
    readonly examples: readonly ToolExample<typeof evalSchema.infer>[];
    readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
        cells: {
            language: "js" | "py";
            code: string;
            title?: string | undefined;
            timeout?: number | undefined;
            reset?: boolean | undefined;
        }[];
    }, {}>;
    readonly concurrency = "exclusive";
    readonly strict = true;
    readonly intent: (args: Partial<typeof evalSchema.infer>) => string | undefined;
    constructor(session: ToolSession | null, options?: EvalToolOptions);
    execute(_toolCallId: string, params: typeof evalSchema.infer, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback, _ctx?: AgentToolContext): Promise<AgentToolResult<EvalToolDetails | undefined>>;
}
