/**
 * BaseIdeAdapter -- abstract base class for all IDE adapters.
 *
 * Provides:
 *   - Common tool-invocation routing through the governance runtime
 *   - Common audit-event emission using the canonical taxonomy (Section 3.2)
 *   - Common session-scoped policy application
 *   - Common user-identity attribution defaulting
 *   - Common per-tool reviewer routing
 *   - Common error translation
 *
 * Concrete adapters (ClaudeCodeIdeAdapter, CursorIdeAdapter, etc.) extend
 * this class and override only IDE-specific integration plumbing.
 *
 * Spec: P3-IDE-01 AC 3, Section 3.2
 *
 * @connexum/ai-governance
 */
import type { IdeAdapter, IdeAdapterConfig, IdeAdapterCapabilities, IdeSessionContext, IdeSessionHandle, ToolInvocationContext, ToolInvocationDecision, ToolResult, UserIdentity, ReviewerTier, ReviewerRoutingResult } from './index';
import { IdeAdapterError } from './index';
import { type IdeAuditEmitter } from './shared';
export declare abstract class BaseIdeAdapter implements IdeAdapter {
    abstract readonly adapterId: string;
    abstract readonly ideId: string;
    protected config: IdeAdapterConfig | null;
    protected initialized: boolean;
    protected auditEmit: IdeAuditEmitter | null;
    /** Active sessions keyed by sessionId */
    private activeSessions;
    /**
     * Initialize the adapter with config and bind a policy pack.
     *
     * Throws `IdeSessionError` if `config.packId` is not provided.
     * No default pack is loaded. No neutral-pass. Fail-closed per AC 28.
     */
    initialize(config: IdeAdapterConfig): void;
    /**
     * Wire an audit emitter. Called after initialization by the governance
     * runtime or tests. Adapters emit canonical IDE audit events through this.
     */
    setAuditEmitter(emit: IdeAuditEmitter): void;
    protected ensureInitialized(): void;
    openSession(ctx: IdeSessionContext): Promise<IdeSessionHandle>;
    closeSession(handle: IdeSessionHandle): Promise<void>;
    /**
     * Common tool-invocation governance dispatch.
     *
     * Applies session-scoped policy, emits the canonical audit event, and
     * returns the decision. Concrete adapters call this from
     * interceptToolInvocation() after normalising the IDE-native payload into
     * a ToolInvocationContext.
     */
    protected routeToolInvocation(ctx: ToolInvocationContext, policyDecision: ToolInvocationDecision): Promise<ToolInvocationDecision>;
    recordToolResult(ctx: ToolInvocationContext, result: ToolResult): Promise<void>;
    abstract resolveUserIdentity(session: IdeSessionContext): Promise<UserIdentity>;
    protected emitIdentityResolved(userId: string, sessionId?: string): void;
    protected emitIdentityUnresolved(sessionId?: string, detail?: string): void;
    routeToolToReviewer(tool: string, ctx: ToolInvocationContext, tier: ReviewerTier): Promise<ReviewerRoutingResult>;
    translateError(raw: unknown): IdeAdapterError;
    abstract getIdeCapabilities(): IdeAdapterCapabilities;
    abstract interceptToolInvocation(ctx: ToolInvocationContext): Promise<ToolInvocationDecision>;
    protected emit(event: Parameters<IdeAuditEmitter>[0]): void;
}
//# sourceMappingURL=base.d.ts.map