import { type ShellCommandExecutionErrorCode, type ShellCommandExecutionPlan, type ShellCommandExecutionProviderResult, type ShellExecutionBoundary, type ShellExecutionContext, type ShellToolContext, type ShellToolResult } from "../shell.commandExecution/core.js";
export type ShellInvocationEnvironmentEntry = {
    name: string;
    value: string;
};
export type ShellInvocationObject = {
    invocationId?: string;
    executable?: string;
    args?: readonly string[];
    cwd?: string;
    shellType?: string;
    env?: readonly ShellInvocationEnvironmentEntry[];
    timeoutMs?: number;
    stdin?: string;
    metadata?: Readonly<Record<string, unknown>>;
};
export type ShellInvocationExecutionProviderRequest = {
    invocationId: string;
    executable: string;
    args: readonly string[];
    cwd?: string;
    shellType?: string;
    env: Readonly<Record<string, string>>;
    timeoutMs: number;
    stdin?: string;
};
export type ShellInvocationExecutionProvider = (request: ShellInvocationExecutionProviderRequest, context: ShellToolContext) => ShellCommandExecutionProviderResult | Promise<ShellCommandExecutionProviderResult>;
export type ShellInvocationExecutionRequest = {
    context?: ShellExecutionContext;
    invocation?: ShellInvocationObject;
    provider?: ShellInvocationExecutionProvider;
    metadata?: Readonly<Record<string, unknown>>;
};
export type ShellInvocationExecutionErrorCode = "MISSING_RUNTIME_ID" | "MISSING_INVOCATION" | "MISSING_INVOCATION_ID" | "MISSING_EXECUTABLE" | "INVALID_ENVIRONMENT" | "INVALID_STDIN" | "COMMAND_PLAN_REJECTED" | ShellCommandExecutionErrorCode;
export type ShellInvocationExecutionError = {
    code: ShellInvocationExecutionErrorCode;
    message: string;
    boundary: ShellExecutionBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type ShellInvocationExecutionPlan = {
    toolId: "shell.invocationExecution";
    capability: "execute-invocation-object";
    runtimeId: string;
    invocationId: string;
    executable: string;
    args: readonly string[];
    cwd?: string;
    shellType?: string;
    env: Readonly<Record<string, string>>;
    commandPlan: ShellCommandExecutionPlan;
    requiredPermissions: readonly ["shell:execute:dry-run"];
    requiresTapApproval: true;
    dispatch: "dry-run";
    dryRun: true;
    wouldSpawnProcess: true;
    unsafeSideEffects: false;
    acceptedScopes: readonly string[];
    audit: {
        event: "basicTool.shell.invocationExecution.planned";
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type ShellInvocationExecutionResult = {
    ok: true;
    plan: ShellInvocationExecutionPlan;
    events: readonly string[];
} | {
    ok: false;
    error: ShellInvocationExecutionError;
    events: readonly string[];
};
export type ShellInvocationExecutionOutput = {
    kind: "agentCore.basicTool.shell.invocationExecution";
    invocationId: string;
    executable: string;
    args: readonly string[];
    cwd?: string;
    shellType?: string;
    env: Readonly<Record<string, string>>;
    timeoutMs: number;
    dryRun: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout: string;
    stderr: string;
    permissionsRequired: readonly ["shell:execute"];
    unsafeSideEffects: false;
};
export declare const shellInvocationExecutionDescriptor: {
    readonly toolId: "shell.invocationExecution";
    readonly capability: "execute-invocation-object";
    readonly layer: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.shellExecution";
    readonly defaultDispatch: "dry-run";
    readonly defaultTimeoutMs: 30000;
    readonly maxTimeoutMs: 600000;
    readonly permissionsRequired: readonly ["shell:execute"];
    readonly unsafeSideEffects: false;
    readonly requiresTapApproval: true;
    readonly tapOwnsApproval: true;
};
export declare class ShellInvocationExecutionProviderUnavailableError extends Error {
    readonly code: "PROVIDER_UNAVAILABLE";
}
export declare function planShellInvocationExecution(request?: ShellInvocationExecutionRequest): ShellInvocationExecutionResult;
export declare function executeShellInvocation(request?: ShellInvocationExecutionRequest): Promise<ShellToolResult<ShellInvocationExecutionOutput, ShellInvocationExecutionErrorCode>>;
