import type { ShellProcessSpawningPermission } from "../shell.processSpawning/core.js";
export type ShellForegroundExecutionPermission = ShellProcessSpawningPermission;
export type ShellForegroundExecutionBoundary = "input" | "scope" | "permission" | "contract" | "resource";
export type ShellForegroundExecutionContext = {
    runtimeId?: string;
    invocationId?: string;
    dryRun?: boolean;
    allowedWorkingDirectories?: readonly string[];
    grantedPermissions?: readonly ShellForegroundExecutionPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
    guard?: {
        accepted?: boolean;
        allowed?: boolean;
        reason?: string;
    };
};
export type ShellForegroundExecutionTarget = {
    command: string;
    workingDirectory?: string;
    shell?: "sh" | "bash" | "zsh";
    timeoutMs?: number;
    stdin?: string;
    captureStdout?: boolean;
    captureStderr?: boolean;
};
export type ShellForegroundExecutionRequest = {
    target?: Partial<ShellForegroundExecutionTarget>;
    context?: ShellForegroundExecutionContext;
};
export type ShellForegroundExecutionErrorCode = "MISSING_COMMAND" | "INVALID_SHELL" | "INVALID_CWD" | "INVALID_STDIN" | "INVALID_TIMEOUT" | "INVALID_CAPTURE_SETTING" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "REAL_EXECUTION_BLOCKED";
export type ShellForegroundExecutionError = {
    code: ShellForegroundExecutionErrorCode;
    message: string;
    boundary: ShellForegroundExecutionBoundary;
    publicSafe: true;
    internalDetailExposed: false;
};
export type ShellForegroundExecutionAuditEvent = {
    type: string;
    toolId: "shell.foregroundExecution";
    invocationId: string;
    dryRun: boolean;
    workingDirectory?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type ShellForegroundExecutionOutput = {
    kind: "agentCore.basicTool.shell.foregroundExecution";
    target: {
        command: string;
        workingDirectory?: string;
        shell: "sh" | "bash" | "zsh";
        timeoutMs: number;
        stdinBytes: number;
        captureStdout: boolean;
        captureStderr: boolean;
    };
    commandPreview: readonly string[];
    permissionsRequired: readonly ShellForegroundExecutionPermission[];
    foregroundContract: {
        blocksCallerUntilExit: true;
        exitStatusWillBeCaptured: true;
    };
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled?: boolean;
    unsafeSideEffects: false;
    resultEnvelope: Readonly<Record<string, unknown>> & {
        planned?: true;
        exitCode?: number;
        stdout?: string;
        stderr?: string;
    };
};
export type ShellForegroundExecutionResult = {
    ok: true;
    toolId: "shell.foregroundExecution";
    output: ShellForegroundExecutionOutput;
    audit: readonly ShellForegroundExecutionAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "shell.foregroundExecution";
    error: ShellForegroundExecutionError;
    audit: readonly ShellForegroundExecutionAuditEvent[];
    events: readonly string[];
};
export declare const shellForegroundExecutionDescriptor: {
    readonly toolId: "shell.foregroundExecution";
    readonly capability: "shell-foreground-execution";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.processControl";
    readonly defaultDryRun: true;
    readonly tapOwnsApproval: true;
    readonly permissionsRequired: readonly ShellForegroundExecutionPermission[];
    readonly unsafeSideEffects: false;
};
export declare function planShellForegroundExecution(request?: ShellForegroundExecutionRequest): ShellForegroundExecutionResult;
