import type { ControlPlaneProxyClient } from '../../../client-shared/api/proxy.js';
import type { ControlPlaneApprovalDecision, ControlPlanePermissionModeUpdateInput, RouterInputs } from '../../../client-shared/api/types.js';
export type ControlPlaneSessionCreateInput = Exclude<NonNullable<RouterInputs['controlPlane']['sessionCreate']>, void>;
type SessionSendPromptInput = RouterInputs['controlPlane']['sessionSendPrompt'];
type SessionSendPromptAsyncInput = RouterInputs['controlPlane']['sessionSendPromptAsync'];
type SessionDirectShellPreflightInput = RouterInputs['controlPlane']['sessionDirectShellPreflight'];
type SessionDirectShellAsyncInput = RouterInputs['controlPlane']['sessionDirectShellAsync'];
type SlashCommandExecuteInput = RouterInputs['controlPlane']['slashCommandExecute'];
type WorkspaceFileSearchInput = RouterInputs['controlPlane']['workspaceFileSearch'];
export declare const SLASH_COMMAND_REQUEST_TIMEOUT_MS: number;
export type ControlPlaneSessionApiServiceOptions = {
    client: ControlPlaneProxyClient;
    defaultModel?: string;
    maxSteps?: number;
    searchIgnoreDirs?: string[];
    systemContext?: string;
    apiKey?: string;
    preferApiKey?: boolean;
};
/**
 * Owns cli-v2 control-plane API calls that require terminal runtime defaults.
 */
export declare class ControlPlaneSessionApiService {
    private readonly client;
    private readonly defaults;
    constructor(options: ControlPlaneSessionApiServiceOptions);
    resolveWorkspaceId(workspaceId?: string): Promise<string>;
    listSessions(workspaceId: string): Promise<import("../../../server/control-plane-types.js").ChatSessionView[]>;
    getModelOptions(): Promise<{
        groups: {
            label: string;
            models: string[];
            options: import("../../../core/llm/models/model-policy-service.js").CredentialAwareModelOption[];
        }[];
    }>;
    createSession(workspaceId: string, input?: ControlPlaneSessionCreateInput): Promise<import("../../../server/control-plane-types.js").ChatSessionDetail>;
    getSession(workspaceId: string, sessionId: string): Promise<import("../../../server/control-plane-types.js").ChatSessionDetail | null>;
    getRunning(workspaceId: string, sessionId: string): Promise<{
        running: boolean;
    }>;
    getRunState(workspaceId: string, sessionId: string): Promise<{
        running: boolean;
        pendingApproval: {
            tool: string;
            summary: string;
            callId: string;
            requestedAt: string;
            input?: unknown;
            reason?: string | undefined;
            editPreview?: {
                path: string;
                action: "created" | "overwritten" | "replaced";
                diff: string;
                truncated: boolean;
            } | undefined;
            autopilotRootApproval?: {
                label: string;
                allow: import("../../../core/approvals/index.js").AutopilotCapability[];
                access: "autopilot";
                root: string;
                relativeRoot: string;
            } | undefined;
            rememberProjectApproval?: {
                label: string;
                rule: import("../../../index.js").ProjectApprovalRule;
            } | undefined;
        } | null;
    }>;
    getRuntimeContext(workspaceId: string, sessionId: string): Promise<import("../../../server/control-plane-types.js").ControlPlaneSessionRuntimeContext>;
    getPendingApproval(workspaceId: string, sessionId: string): Promise<{
        tool: string;
        summary: string;
        callId: string;
        requestedAt: string;
        input?: unknown;
        reason?: string | undefined;
        editPreview?: {
            path: string;
            action: "created" | "overwritten" | "replaced";
            diff: string;
            truncated: boolean;
        } | undefined;
        autopilotRootApproval?: {
            label: string;
            allow: import("../../../core/approvals/index.js").AutopilotCapability[];
            access: "autopilot";
            root: string;
            relativeRoot: string;
        } | undefined;
        rememberProjectApproval?: {
            label: string;
            rule: import("../../../index.js").ProjectApprovalRule;
        } | undefined;
    } | null>;
    getSlashCommandCatalog(workspaceId: string): Promise<{
        commands: {
            aliases?: string[] | undefined;
            id: string;
            syntax: string;
            description: string;
        }[];
        hints: import("../../../core/commands/slash/types.js").SlashCommandHint[];
    }>;
    updatePermissionMode(workspaceId: string, mode: ControlPlanePermissionModeUpdateInput['mode']): Promise<{
        permissionMode: "default" | "custom" | "auto";
        permissionModeOptions: import("../../../core/approvals/index.js").AutonomyPermissionModeOption[];
    }>;
    searchWorkspaceFiles(input: WorkspaceFileSearchInput): Promise<{
        workspaceId: string;
        files: import("../../../server/controllers/trpc/control-plane/workspace-files.js").WorkspaceFileSuggestion[];
    }>;
    sendPrompt(input: Pick<SessionSendPromptInput, 'workspaceId' | 'sessionId' | 'prompt' | 'includePlanTool' | 'memoryMaintenanceMode'>): Promise<{
        outcome: string;
        summary: string;
        session: import("../../../server/control-plane-types.js").ChatSessionDetail;
    }>;
    sendPromptAsync(input: Pick<SessionSendPromptAsyncInput, 'workspaceId' | 'sessionId' | 'prompt' | 'includePlanTool' | 'memoryMaintenanceMode'>): Promise<{
        accepted: true;
        workspaceId: string;
        sessionId: string;
        runId: string;
        acceptedAt: string;
    } | {
        queued: true;
        workspaceId: string;
        sessionId: string;
        queueItemId: string;
        queuedAt: string;
        position: number;
    }>;
    preflightDirectShell(input: Pick<SessionDirectShellPreflightInput, 'workspaceId' | 'sessionId' | 'command'>): Promise<import("../../../core/chat/engine/direct-shell/types.js").ConversationDirectShellPreflight>;
    runDirectShellAsync(input: Pick<SessionDirectShellAsyncInput, 'workspaceId' | 'sessionId' | 'command' | 'riskAccepted'>): Promise<{
        accepted: true;
        workspaceId: string;
        sessionId: string;
        runId: string;
        acceptedAt: string;
    } | {
        queued: true;
        workspaceId: string;
        sessionId: string;
        queueItemId: string;
        queuedAt: string;
        position: number;
    }>;
    executeSlashCommand(input: Pick<SlashCommandExecuteInput, 'workspaceId' | 'sessionId' | 'command'>): Promise<import("../../../core/commands/slash/result-types.js").SlashCommandResult>;
    continueSession(workspaceId: string, sessionId: string): Promise<{
        outcome: string;
        summary: string;
        session: import("../../../server/control-plane-types.js").ChatSessionDetail;
    }>;
    cancelRun(workspaceId: string, sessionId: string): Promise<{
        cancelled: boolean;
    }>;
    resolvePendingApproval(workspaceId: string, sessionId: string, decision: ControlPlaneApprovalDecision): Promise<{
        resolved: boolean;
    }>;
}
export {};
//# sourceMappingURL=control-plane-session-api-service.d.ts.map