/**
 * Per-tool contract for `execute_code` — spreadsheet read/write surface.
 * Owns LLM argument validation, approval classification, and structured
 * result normalization; host adapters own the actual spreadsheet execution.
 */
import { ExecuteCodeSurface, type AgentExecuteCodeMode as AgentExecuteCodeModeValue } from '../../../contracts/agent-execute-code.js';
import { type HostToolRequest, type ToolContract, type ToolLlmOptionsBase } from '../../../contracts/host-tool.js';
import { ExecuteCodeAccess } from './classify.js';
export { ExecuteCodeAccess };
export declare const EXECUTE_CODE_KIND: "executeCode";
export type ExecuteCodeKind = typeof EXECUTE_CODE_KIND;
export interface ExecuteCodeParams {
    readonly access: ExecuteCodeAccess;
    readonly code: string;
    readonly description: string;
    readonly surface: ExecuteCodeSurface;
}
export interface ExecuteCodeDirtyCell {
    readonly address: string;
    readonly changeType?: 'direct' | 'indirect';
    readonly formula?: string;
    readonly numberFormat?: string;
    readonly oldValue: unknown;
    readonly sheet: string;
    readonly value: unknown;
}
/** Status values surfaced on `ExecuteCodeDetails.status`; consumed by the renderer. */
export declare const ExecuteCodeDetailStatus: {
    readonly Success: "success";
    readonly Error: "error";
    readonly Cancelled: "cancelled";
    /** Static analysis blocked the code (e.g. write op in read-only mode). */
    readonly Blocked: "blocked";
};
export type ExecuteCodeDetailStatus = (typeof ExecuteCodeDetailStatus)[keyof typeof ExecuteCodeDetailStatus];
export interface ExecuteCodeDetails {
    /** True iff `status === Blocked` — kept as a discriminator for renderers. */
    readonly blocked?: boolean;
    readonly change_count?: number;
    readonly dirtyCells?: readonly ExecuteCodeDirtyCell[];
    readonly direct_count?: number;
    /**
     * Optional success-path context prose surfaced as the LLM-facing content
     * when logs are empty. Failure-path prose rides on
     * `HostToolResult.userMessage`, not in details.
     */
    readonly detail?: string;
    /** Function names that violated read-only mode; only set when `blocked === true`. */
    readonly disallowedFunctions?: readonly string[];
    readonly edit_ranges?: readonly string[];
    /** Renderer reads `status` (snake_case) — do not rename. */
    readonly status?: ExecuteCodeDetailStatus;
    readonly indirect_count?: number;
    readonly logs?: readonly string[];
}
/** Narrowed request type for callers that need `params` autocomplete after a kind check. */
export type ExecuteCodeRequest = HostToolRequest & {
    readonly kind: ExecuteCodeKind;
    readonly params: ExecuteCodeParams;
};
export declare const EXECUTE_CODE_TOOL_DESCRIPTION = "Execute Typescript code";
export declare const EXECUTE_CODE_HUMAN_DESCRIPTION = "A short one-sentence description of what the code does, starting with a gerund (e.g., 'Adding...', 'Fetching...', 'Updating...', 'Calculating...').";
export declare const EXECUTE_CODE_CODE_DESCRIPTION: string;
export interface ExecuteCodeLlmOptions extends ToolLlmOptionsBase {
    readonly btw?: boolean;
    readonly mode?: AgentExecuteCodeModeValue;
    readonly surface: ExecuteCodeSurface;
}
export declare const executeCodeContract: ToolContract<ExecuteCodeParams, ExecuteCodeDetails, ExecuteCodeLlmOptions>;
//# sourceMappingURL=contract.d.ts.map