import type { ShellCommandExecutionErrorCode, ShellExecutionBoundary, ShellExecutionContext, ShellToolContext, ShellToolResult } from "../shell.commandExecution/core.js";
export type ShellScriptLanguage = "sh" | "bash" | "zsh" | "fish" | "powershell" | "unknown";
export type ShellScriptExecutionProviderRequest = {
    script: string;
    language: ShellScriptLanguage;
    command: string;
    args: readonly string[];
    cwd?: string;
    timeoutMs: number;
    stdin?: string;
};
export type ShellScriptExecutionProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type ShellScriptExecutionProvider = (request: ShellScriptExecutionProviderRequest, context: ShellToolContext) => ShellScriptExecutionProviderResult | Promise<ShellScriptExecutionProviderResult>;
export type ShellScriptExecutionRequest = {
    context?: ShellExecutionContext;
    script?: string;
    language?: ShellScriptLanguage;
    cwd?: string;
    timeoutMs?: number;
    stdin?: string;
    provider?: ShellScriptExecutionProvider;
    metadata?: Readonly<Record<string, unknown>>;
};
export type ShellScriptExecutionErrorCode = "MISSING_RUNTIME_ID" | "MISSING_SCRIPT" | "INVALID_SCRIPT" | "INVALID_LANGUAGE" | "SCRIPT_TOO_LARGE" | "INVALID_CWD" | "INVALID_TIMEOUT" | "INVALID_STDIN" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "WORKSPACE_WRITE_REQUIRES_CODE_TOOL" | "REAL_SCRIPT_EXECUTION_NOT_ALLOWED" | ShellCommandExecutionErrorCode;
export type ShellScriptExecutionError = {
    code: ShellScriptExecutionErrorCode;
    message: string;
    boundary: ShellExecutionBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type ShellScriptExecutionPlan = {
    toolId: "shell.scriptExecution";
    capability: "execute-script";
    runtimeId: string;
    invocationId: string;
    language: ShellScriptLanguage;
    cwd?: string;
    timeoutMs: number;
    scriptPreview: string;
    scriptLineCount: number;
    scriptBytes: number;
    requiredPermissions: readonly ["shell:script:dry-run"];
    requiresTapApproval: true;
    dispatch: "dry-run";
    dryRun: true;
    wouldSpawnProcess: true;
    wouldWriteTempScript: false;
    unsafeSideEffects: false;
    acceptedScopes: readonly string[];
    outputEnvelope: {
        exitCode?: number;
        stdoutPreview: "";
        stderrPreview: "";
        started: false;
    };
    audit: {
        guard: "shell-script-dry-run-approval";
        event: "basicTool.shell.scriptExecution.planned";
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type ShellScriptExecutionResult = {
    ok: true;
    plan: ShellScriptExecutionPlan;
    events: readonly string[];
} | {
    ok: false;
    error: ShellScriptExecutionError;
    events: readonly string[];
};
export type ShellScriptExecutionOutput = {
    kind: "agentCore.basicTool.shell.scriptExecution";
    invocationId: string;
    scriptPreview: string;
    scriptLineCount: number;
    scriptBytes: number;
    language: ShellScriptLanguage;
    command: string;
    args: readonly string[];
    cwd?: string;
    timeoutMs: number;
    dryRun: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout: string;
    stderr: string;
    permissionsRequired: readonly ["shell:execute"];
    unsafeSideEffects: false;
};
export declare const shellScriptExecutionDescriptor: {
    readonly toolId: "shell.scriptExecution";
    readonly capability: "execute-script";
    readonly layer: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.shellExecution";
    readonly defaultDispatch: "dry-run";
    readonly defaultLanguage: "sh";
    readonly defaultTimeoutMs: 30000;
    readonly maxTimeoutMs: 600000;
    readonly maxScriptBytes: 65536;
    readonly permissionsRequired: readonly ["shell:execute"];
    readonly unsafeSideEffects: false;
    readonly requiresTapApproval: true;
    readonly tapOwnsApproval: true;
};
export declare function planShellScriptExecution(request?: ShellScriptExecutionRequest): ShellScriptExecutionResult;
export declare function executeShellScript(request?: ShellScriptExecutionRequest): Promise<ShellToolResult<ShellScriptExecutionOutput, ShellScriptExecutionErrorCode>>;
