export type ShellExecutionBoundary = "input" | "contract" | "governance" | "scope" | "resource" | "permission" | "provider";
export type ShellExecutionGate = {
    accepted?: boolean;
    allowed?: boolean;
    reason?: string;
};
export type ShellToolContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: ShellExecutionGate;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type ShellExecutionContext = ShellToolContext;
export type ShellCommandExecutionProviderRequest = {
    command: string;
    args: readonly string[];
    cwd?: string;
    timeoutMs: number;
    stdin?: string;
};
export type ShellCommandExecutionProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type ShellCommandExecutionProvider = (request: ShellCommandExecutionProviderRequest, context: ShellToolContext) => ShellCommandExecutionProviderResult | Promise<ShellCommandExecutionProviderResult>;
export type ShellCommandExecutionRequest = {
    context?: ShellExecutionContext;
    command?: string;
    args?: readonly string[];
    cwd?: string;
    shellType?: string;
    timeoutMs?: number;
    stdin?: string;
    provider?: ShellCommandExecutionProvider;
    metadata?: Readonly<Record<string, unknown>>;
};
export type ShellCommandExecutionErrorCode = "MISSING_RUNTIME_ID" | "MISSING_COMMAND" | "INVALID_COMMAND" | "INVALID_ARGUMENT" | "INVALID_CWD" | "INVALID_TIMEOUT" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "WORKSPACE_WRITE_REQUIRES_CODE_TOOL" | "LONG_RUNNING_FOREGROUND_COMMAND" | "SANDBOX_PROVIDER_UNSUPPORTED" | "SANDBOX_UNAVAILABLE" | "REAL_COMMAND_EXECUTION_NOT_ALLOWED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type ShellCommandExecutionError = {
    code: ShellCommandExecutionErrorCode;
    message: string;
    boundary: ShellExecutionBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type ShellToolAuditEvent = {
    type: string;
    toolId: string;
    invocationId: string;
    dryRun: boolean;
    metadata?: Readonly<Record<string, unknown>>;
};
export type ShellToolSuccessEnvelope<Output> = {
    ok: true;
    toolId: string;
    output: Output;
    audit: readonly ShellToolAuditEvent[];
    events: readonly string[];
};
export type ShellToolError<Code extends string = ShellCommandExecutionErrorCode> = {
    code: Code;
    message: string;
    boundary: ShellExecutionBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type ShellToolFailureEnvelope<Code extends string = ShellCommandExecutionErrorCode> = {
    ok: false;
    toolId: string;
    error: ShellToolError<Code>;
    audit: readonly ShellToolAuditEvent[];
    events: readonly string[];
};
export type ShellToolResult<Output, Code extends string = ShellCommandExecutionErrorCode> = ShellToolSuccessEnvelope<Output> | ShellToolFailureEnvelope<Code>;
export type ShellCommandExecutionPlan = {
    toolId: "shell.commandExecution";
    capability: "execute-command";
    runtimeId: string;
    invocationId: string;
    command: string;
    args: readonly string[];
    cwd?: string;
    shellType?: string;
    timeoutMs: number;
    requiredPermissions: readonly ["shell:execute:dry-run"];
    requiresTapApproval: true;
    dispatch: "dry-run";
    dryRun: true;
    wouldSpawnProcess: true;
    unsafeSideEffects: false;
    acceptedScopes: readonly string[];
    outputEnvelope: {
        exitCode?: number;
        stdoutPreview: "";
        stderrPreview: "";
        started: false;
    };
    audit: {
        guard: "shell-command-dry-run-approval";
        event: "basicTool.shell.commandExecution.planned";
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type ShellCommandExecutionResult = {
    ok: true;
    plan: ShellCommandExecutionPlan;
    events: readonly string[];
} | {
    ok: false;
    error: ShellCommandExecutionError;
    events: readonly string[];
};
export type ShellCommandExecutionOutput = {
    kind: "agentCore.basicTool.shell.commandExecution";
    command: string;
    args: readonly string[];
    cwd?: string;
    shellType?: string;
    timeoutMs: number;
    dryRun: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout: string;
    stderr: string;
    permissionsRequired: readonly ["shell:execute"];
    unsafeSideEffects: false;
};
export declare const shellCommandExecutionDescriptor: {
    readonly toolId: "shell.commandExecution";
    readonly capability: "execute-command";
    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 function planShellCommandExecution(request?: ShellCommandExecutionRequest): ShellCommandExecutionResult;
export declare function executeShellCommand(request?: ShellCommandExecutionRequest): Promise<ShellToolResult<ShellCommandExecutionOutput>>;
