/**
 * WindsurfAdapter -- Windsurf (Codeium) IDE adapter.
 *
 * Windsurf is an agentic IDE built by Codeium. Its core feature is Cascade,
 * a multi-step agentic system that plans and executes multi-tool workflows
 * autonomously. Windsurf competes directly with Cursor and has a fast adoption
 * curve among professional developers. Its agentic depth makes it the
 * highest-governance-exposure IDE in the Connexum catalogue.
 *
 * Deployment modes:
 *   windsurf-cloud      -- Codeium-managed SaaS. Default for individuals and teams.
 *   windsurf-enterprise -- Customer-operated VPC or air-gapped deployment.
 *                          Enterprise mode supports air-gapped operation, making it
 *                          suitable for classified-network and sovereign-data deployments.
 *   windsurf-individual -- Individual Windsurf subscription. No enterprise controls.
 *
 * Hook surfaces (seven distinct governable surfaces):
 *
 *   cascadeFlowRequested(flowDescription, tools, steps)
 *     Multi-step agentic flow. The highest-leverage governance gate. Cascade
 *     can plan and execute dozens of tool calls in a single flow. REQUIRES a
 *     non-empty flowDescription for auditability -- empty/missing description
 *     is DENIED. Reason code: windsurf-cascade-flow-description-required.
 *
 *   chatRequested(prompt)
 *     Standard chat gate. Scanned for secrets before dispatch.
 *
 *   inlineCompletionRequested(file, cursor, context)
 *     Autocomplete gate. Most frequent surface. Surrounding context is scanned
 *     for secrets and PHI indicators.
 *
 *   commandRequested(command, targetFile)
 *     Slash command execution (file edits, refactors). Target file is checked
 *     for sensitive-path patterns.
 *
 *   terminalCommandRequested(command)
 *     Terminal execution that Windsurf can run autonomously. CRITICAL governance
 *     surface. Strict-mode enforcement:
 *       - Default: DENIED unless allowTerminalExecution: true in config.
 *       - windsurf-individual: only allowed if explicitly opted in.
 *       - airGapped: true sub-mode: terminal commands MUST pass an
 *         allowed-command-prefix list (allowedTerminalPrefixes[]). If the
 *         command does not start with an allowed prefix, DENIED even when
 *         allowTerminalExecution is true.
 *       This gate prevents autonomous terminal execution in classified/air-gapped
 *       environments where arbitrary shell access is unacceptable.
 *
 *   webSearchRequested(query, url)
 *     Cascade can browse the web. Sensitive surface for data-exfiltration risk.
 *     In airGapped: true mode: ALWAYS DENIED (unconditionally). Air-gapped
 *     deployments cannot permit outbound web requests.
 *     In non-air-gapped: audited and allowed.
 *
 *   multiFileEditRequested(files[])
 *     Apply edits across files atomically. Blast-radius cap enforced:
 *     count of affected files > multiFileEditCap (default 10) = DENIED.
 *     This limits blast radius of runaway Cascade flows.
 *
 * Air-gapped enforcement (the Windsurf-distinct privacy differentiator):
 *   windsurf-enterprise mode supports air-gapped operation. Set airGapped: true
 *   to activate classified-network policy:
 *     - Web search is UNCONDITIONALLY DENIED.
 *     - Terminal command requires BOTH allowTerminalExecution: true AND the
 *       command must start with one of the strings in allowedTerminalPrefixes[].
 *     - This enables governance of fully-offline enterprise Windsurf deployments.
 *
 * Pen-tests:
 *   PT-ADAPT-WINDSURF-1: empty packId throws at construction; denied on each wrap call
 *   PT-ADAPT-WINDSURF-2: Windsurf auth token never appears in audit entries
 *   PT-ADAPT-WINDSURF-3: malformed config throws at construction (invalid deploymentMode,
 *                        negative multiFileEditCap, airGapped on non-enterprise)
 *   PT-ADAPT-WINDSURF-4: terminal command denials produce audit entries with reason codes
 *   PT-ADAPT-WINDSURF-5: cascade flow without description produces audit with
 *                        windsurf-cascade-flow-description-required
 *
 * Spec: P3-SUB-IDE-08
 *
 * @connexum/ai-governance
 */
import { BaseIdeAdapter } from './base';
import { type IdeAdapterConfig, type IdeAdapterCapabilities, type IdeSessionContext, type ToolInvocationContext, type ToolInvocationDecision, type UserIdentity, type ReviewerTier } from './index';
/**
 * Windsurf deployment modes.
 *
 *   windsurf-cloud      -- Codeium-managed SaaS (default for teams and individuals).
 *   windsurf-enterprise -- Customer-operated VPC or air-gapped deployment.
 *                          Only mode that supports airGapped: true sub-mode.
 *   windsurf-individual -- Individual subscription. No enterprise governance controls.
 */
export type WindsurfDeploymentMode = 'windsurf-cloud' | 'windsurf-enterprise' | 'windsurf-individual';
export declare const WINDSURF_VALID_DEPLOYMENT_MODES: readonly WindsurfDeploymentMode[];
/** Modes eligible for HIPAA BAA coverage. */
export declare const WINDSURF_BAA_ELIGIBLE_MODES: readonly WindsurfDeploymentMode[];
/** Modes that support air-gapped operation (classified-network deployments). */
export declare const WINDSURF_AIR_GAPPED_CAPABLE_MODES: readonly WindsurfDeploymentMode[];
export interface WindsurfAdapterConfig extends IdeAdapterConfig {
    /**
     * Windsurf deployment mode. Required.
     * No default: must be declared explicitly so governance can apply the correct
     * data-residency, terminal-execution, and web-search policies.
     */
    deploymentMode: WindsurfDeploymentMode;
    /**
     * Air-gapped sub-mode for windsurf-enterprise deployments.
     * Default: false.
     *
     * When true, activates classified-network policy:
     *   - Web search UNCONDITIONALLY DENIED.
     *   - Terminal commands require BOTH allowTerminalExecution: true AND
     *     the command must match one of the allowedTerminalPrefixes[] strings.
     *
     * Only valid in 'windsurf-enterprise' mode. Setting airGapped: true in
     * any other mode throws IdeSessionError at construction time.
     */
    airGapped?: boolean;
    /**
     * Explicit opt-in for terminal command execution.
     * Default: false (governance default-deny).
     *
     * In 'windsurf-individual' mode: allowed only when explicitly set to true.
     * In air-gapped mode: true here is necessary but not sufficient; the command
     * must also match allowedTerminalPrefixes.
     */
    allowTerminalExecution?: boolean;
    /**
     * Allowed command prefix list for air-gapped terminal execution.
     * Only used when airGapped: true. A terminal command is permitted only if
     * it starts with one of these strings (case-sensitive, stripped of leading
     * whitespace). Empty list with allowTerminalExecution: true in air-gapped
     * mode means ALL terminal commands are DENIED (safe default).
     */
    allowedTerminalPrefixes?: string[];
    /**
     * Maximum number of files that may be edited in a single multiFileEdit operation.
     * Default: 10. Operations exceeding this cap are denied (blast-radius guard).
     * Must be a positive integer.
     */
    multiFileEditCap?: number;
    /** Reviewer tier for HIPAA-bound PHI gate. Default: T2_LEAD */
    hipaaReviewerTier?: ReviewerTier;
}
export interface WindsurfCascadeFlowContext {
    /** Description of the planned flow. REQUIRED -- empty/missing causes denial. */
    flowDescription: string;
    /** Tool names the flow will invoke */
    tools?: string[];
    /** Planned step count */
    estimatedSteps?: number;
    sessionId?: string;
}
export interface WindsurfChatContext {
    promptText: string;
    sessionId?: string;
}
export interface WindsurfInlineCompletionContext {
    filePath: string;
    cursorPosition?: {
        line: number;
        column: number;
    };
    surroundingContext?: string;
    sessionId?: string;
}
export interface WindsurfCommandContext {
    command: string;
    targetFile?: string;
    sessionId?: string;
}
export interface WindsurfTerminalCommandContext {
    command: string;
    workingDirectory?: string;
    sessionId?: string;
}
export interface WindsurfWebSearchContext {
    query: string;
    url?: string;
    sessionId?: string;
}
export interface WindsurfMultiFileEditContext {
    files: string[];
    description?: string;
    sessionId?: string;
}
export declare class WindsurfAdapter extends BaseIdeAdapter {
    readonly adapterId = "windsurf";
    readonly ideId = "windsurf";
    private windsurfConfig;
    initialize(config: IdeAdapterConfig): void;
    resolveUserIdentity(session: IdeSessionContext): Promise<UserIdentity>;
    interceptToolInvocation(ctx: ToolInvocationContext): Promise<ToolInvocationDecision>;
    private _gateCascadeFlowRequest;
    private _gateChatRequest;
    private _gateInlineCompletionRequest;
    private _gateCommandRequest;
    private _gateTerminalCommandRequest;
    private _gateWebSearchRequest;
    private _gateMultiFileEditRequest;
    wrapCascadeFlow(ctx: WindsurfCascadeFlowContext): Promise<ToolInvocationDecision>;
    wrapChat(ctx: WindsurfChatContext): Promise<ToolInvocationDecision>;
    wrapInlineCompletion(ctx: WindsurfInlineCompletionContext): Promise<ToolInvocationDecision>;
    wrapCommand(ctx: WindsurfCommandContext): Promise<ToolInvocationDecision>;
    wrapTerminalCommand(ctx: WindsurfTerminalCommandContext): Promise<ToolInvocationDecision>;
    wrapWebSearch(ctx: WindsurfWebSearchContext): Promise<ToolInvocationDecision>;
    wrapMultiFileEdit(ctx: WindsurfMultiFileEditContext): Promise<ToolInvocationDecision>;
    getIdeCapabilities(): IdeAdapterCapabilities;
    translateError(raw: unknown): import('./index').IdeAdapterError;
    getDeploymentMode(): WindsurfDeploymentMode;
    isAirGapped(): boolean;
    isTerminalExecutionAllowed(): boolean;
    getMultiFileEditCap(): number;
    private _scanForSecrets;
    private _scanForPhiIndicators;
    private _isHipaaBinding;
    private _isSensitivePath;
}
//# sourceMappingURL=windsurf.d.ts.map