/**
 * Approval gate types — defines the contract for tool-call approval prompts.
 *
 * Extensions and modes implement ApprovalGate to control whether tool calls
 * require user confirmation, are auto-approved, or are rejected.
 */
import type { ExtensionContext } from '../extensions/index.js';
/** User responses to an approval prompt. */
export declare const APPROVAL: {
    readonly ACCEPT: "Accept";
    readonly ACCEPT_ALL: "Accept All";
    readonly RUN_FOREGROUND: "Run foreground";
    readonly RUN_BACKGROUND: "Run background";
    readonly ALLOW_ONCE: "Allow Once";
    readonly ALLOW_FILE: "Always Allow File";
    readonly ALLOW_FOLDER: "Always Allow Folder";
    readonly REJECT: "Reject";
};
export type ApprovalChoice = (typeof APPROVAL)[keyof typeof APPROVAL];
/** A pending approval request shown to the user. */
export interface ApprovalRequest<T> {
    kind: string;
    title: string;
    payload: T;
    alwaysRequireExplicitApproval?: boolean;
}
/**
 * Gate that decides whether a tool call needs user approval.
 *
 * Implementations check auto-approve state, prompt the user when needed,
 * and handle "Accept All" to skip future prompts for the session.
 */
export interface ApprovalGate<T> {
    isAutoApproved: () => boolean;
    requestApproval: (request: ApprovalRequest<T>, ctx: ExtensionContext) => Promise<ApprovalChoice | undefined>;
    onAcceptAll: () => void;
}
/** Progress info for batched approval prompts (e.g. "2 of 5"). */
export interface ApprovalQueueInfo {
    current: number;
    total: number;
}
export interface FileAccessApprovalData {
    path: string;
    access: 'read' | 'write';
    workspaceRoots: string[];
    allowPersistentGrant: boolean;
    fileGrantPath: string;
    folderGrantPath: string;
}
export interface BashApprovalData {
    command: string;
    description?: string;
    /** Connection names whose credentials will be injected. */
    connections?: string[];
    /** High-risk operations detected in the command text that require explicit one-time approval. */
    highRiskOperations?: Array<{
        label: string;
        reason: string;
    }>;
}
export interface TaskSpawnApprovalData {
    subagentType: string;
    name: string;
    query: string;
    model?: string;
    /** Task spawn approval is all-or-nothing: approved children run as full workers. */
    fullWorker: true;
    /** True when this subagent can recursively spawn more full-worker children. */
    canSpawnSubagents: boolean;
    /** Launch mode requested by the tool call before user approval overrides. */
    requestedRunInBackground: boolean;
}
export interface SwitchModeApprovalData {
    currentMode: string;
    targetMode: string;
    reason?: string;
}
//# sourceMappingURL=types.d.ts.map