export type ShellProcessSpawningPermission = "shell:execute";
export type ShellProcessSpawningBoundary = "input" | "scope" | "permission" | "approval" | "contract" | "resource";
export type ShellProcessLaunchMode = "foreground" | "background" | "detached";
export type ShellProcessStdioMode = "pipe" | "inherit" | "ignore";
export type ShellProcessSpawningContext = {
    runtimeId?: string;
    invocationId?: string;
    dryRun?: boolean;
    allowedWorkingDirectories?: readonly string[];
    grantedPermissions?: readonly ShellProcessSpawningPermission[];
    approval?: {
        accepted: boolean;
        approvalId?: string;
        reason?: string;
    };
    guard?: {
        accepted?: boolean;
        allowed?: boolean;
        reason?: string;
    };
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type ShellProcessSpawnTarget = {
    executable?: string;
    command?: string;
    args?: readonly string[];
    workingDirectory?: string;
    shell?: "sh" | "bash" | "zsh";
    env?: Readonly<Record<string, string>>;
    stdio?: ShellProcessStdioMode;
};
export type ShellProcessSpawningRequest = {
    target?: Partial<ShellProcessSpawnTarget>;
    launchMode?: ShellProcessLaunchMode;
    riskLevel?: "low" | "medium" | "high";
    context?: ShellProcessSpawningContext;
};
export type ShellProcessSpawningErrorCode = "MISSING_TARGET" | "AMBIGUOUS_TARGET" | "INVALID_ARGUMENT" | "INVALID_CWD" | "INVALID_ENVIRONMENT" | "INVALID_SHELL" | "INVALID_STDIO" | "INVALID_LAUNCH_MODE" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "APPROVAL_REQUIRED" | "APPROVAL_REJECTED" | "REAL_EXECUTION_BLOCKED";
export type ShellProcessSpawningError = {
    code: ShellProcessSpawningErrorCode;
    message: string;
    boundary: ShellProcessSpawningBoundary;
    publicSafe: true;
    internalDetailExposed: false;
};
export type ShellProcessSpawningAuditEvent = {
    type: string;
    toolId: "shell.processSpawning";
    invocationId: string;
    dryRun: boolean;
    workingDirectory?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type ShellProcessSpawningOutput = {
    kind: "agentCore.basicTool.shell.processSpawning";
    launchMode: ShellProcessLaunchMode;
    target: {
        executable?: string;
        command?: string;
        args: readonly string[];
        workingDirectory?: string;
        shell?: "sh" | "bash" | "zsh";
        envKeys: readonly string[];
        stdio: ShellProcessStdioMode;
    };
    commandPreview: readonly string[];
    permissionsRequired: readonly ShellProcessSpawningPermission[];
    approvalId?: string;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled?: boolean;
    unsafeSideEffects: false;
    resultEnvelope: Readonly<Record<string, unknown>> & {
        planned?: true;
        pid?: number;
        spawnHandle?: string;
    };
};
export type ShellProcessSpawningResult = {
    ok: true;
    toolId: "shell.processSpawning";
    output: ShellProcessSpawningOutput;
    audit: readonly ShellProcessSpawningAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "shell.processSpawning";
    error: ShellProcessSpawningError;
    audit: readonly ShellProcessSpawningAuditEvent[];
    events: readonly string[];
};
export declare const shellProcessSpawningDescriptor: {
    readonly toolId: "shell.processSpawning";
    readonly capability: "shell-process-spawning";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.processControl";
    readonly defaultDryRun: true;
    readonly tapOwnsApproval: true;
    readonly permissionsRequired: readonly ["shell:execute"];
    readonly unsafeSideEffects: false;
};
export declare function planShellProcessSpawn(request?: ShellProcessSpawningRequest): ShellProcessSpawningResult;
