export type ShellPromptHandlingPermission = "shell:prompt:handle";
export type ShellPromptHandlingBoundary = "input" | "permission" | "scope" | "approval" | "contract";
export type ShellPromptKind = "confirmation" | "password" | "sudo" | "selection" | "generic";
export type ShellPromptHandlingAction = "observe" | "respond" | "escalate";
export type ShellPromptHandlingContext = {
    runtimeId?: string;
    invocationId?: string;
    dryRun?: boolean;
    grantedPermissions?: readonly ShellPromptHandlingPermission[];
    allowedSessionIds?: readonly string[];
    approval?: {
        accepted: boolean;
        approvalId?: string;
        reason?: string;
    };
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type ShellPromptHandlingTarget = {
    sessionId: string;
    promptText: string;
    promptKind?: ShellPromptKind;
    action?: ShellPromptHandlingAction;
    responseText?: string;
    options?: readonly string[];
};
export type ShellPromptHandlingRequest = {
    target?: Partial<ShellPromptHandlingTarget>;
    context?: ShellPromptHandlingContext;
};
export type ShellPromptHandlingErrorCode = "MISSING_SESSION_ID" | "MISSING_PROMPT_TEXT" | "INVALID_PROMPT_KIND" | "INVALID_ACTION" | "MISSING_RESPONSE" | "INVALID_OPTION" | "PERMISSION_DENIED" | "SCOPE_REJECTED" | "APPROVAL_REQUIRED" | "APPROVAL_REJECTED" | "REAL_PROMPT_HANDLING_BLOCKED";
export type ShellPromptHandlingError = {
    code: ShellPromptHandlingErrorCode;
    message: string;
    boundary: ShellPromptHandlingBoundary;
    publicSafe: true;
    internalDetailExposed: false;
};
export type ShellPromptHandlingAuditEvent = {
    type: string;
    toolId: "shell.promptHandling";
    invocationId: string;
    dryRun: boolean;
    sessionId?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type ShellPromptHandlingOutput = {
    kind: "agentCore.basicTool.shell.promptHandling";
    sessionId: string;
    promptKind: ShellPromptKind;
    action: ShellPromptHandlingAction;
    promptPreview: string;
    responsePreview?: string;
    responseBytes?: number;
    options: readonly string[];
    requiredPermission: ShellPromptHandlingPermission;
    requiresTapApproval: boolean;
    approvalId?: string;
    dryRun: boolean;
    stdinWriteBlocked: boolean;
    unsafeSideEffects: boolean;
};
export type ShellPromptHandlingResult = {
    ok: true;
    toolId: "shell.promptHandling";
    output: ShellPromptHandlingOutput;
    audit: readonly ShellPromptHandlingAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "shell.promptHandling";
    error: ShellPromptHandlingError;
    audit: readonly ShellPromptHandlingAuditEvent[];
    events: readonly string[];
};
export declare const shellPromptHandlingDescriptor: {
    readonly toolId: "shell.promptHandling";
    readonly capability: "shell-prompt-handling";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.shellInteraction";
    readonly defaultDryRun: true;
    readonly requiredPermission: "shell:prompt:handle";
    readonly tapOwnsApproval: true;
    readonly unsafeSideEffectsWhenResponding: true;
};
export declare function planShellPromptHandling(request?: ShellPromptHandlingRequest): ShellPromptHandlingResult;
