/**
 * NotebookAIAdapter -- unified Notebook AI governance adapter.
 *
 * Governs AI-assisted notebook surfaces across four platforms via a
 * `platform` discriminator on the config:
 *
 *   jupyter-ai   -- JupyterLab built-in AI (self-hosted or on-prem);
 *                   multi-tenant capable; requires instanceUrl.
 *   hex-ai       -- Hex AI (cloud SaaS, team-based); high data-egress
 *                   sensitivity (Snowflake/BigQuery sample rows).
 *   deepnote-ai  -- Deepnote AI (cloud SaaS, team workspaces); integrates
 *                   cloud DBs and cloud storage.
 *   colab-ai     -- Google Colab AI (cloud SaaS by Google); all notebook
 *                   content is sent to Google by design.
 *
 * Why unified vs four separate adapters:
 *   All four platforms expose the same governable surface: cells, kernel,
 *   datasets, and exports. The platform-specific differences are deployment
 *   shape and data-residency concerns, not method shape. A unified adapter
 *   with a `platform` discriminator keeps the contract simple and lets
 *   healthcare-research customers standardize across multiple platforms.
 *
 * Hook surfaces (9):
 *
 *   wrapCellGeneration(prompt, language?)
 *     AI generates a new cell (code or markdown) from a prompt.
 *     Secret scan applied to generated content before placement.
 *
 *   wrapCellEdit(cellId, originalContent, instruction)
 *     AI rewrites / refactors an existing cell.
 *     Secret scan applied to the edited content.
 *
 *   wrapCellExplain(cellId, cellContent)
 *     AI explains an existing cell (read-only). Lower risk surface.
 *
 *   wrapKernelExecution(cellId, cellContent, language?)
 *     AI proposes / triggers cell execution in the kernel. HIGH RISK.
 *     Denied unless allowKernelExecution: true.
 *     In air-gapped mode: additionally denied if cell contains network-egress
 *     patterns (requests.get, urllib, socket, etc.).
 *     Minor / student safeguard: ALWAYS denied regardless of opt-in.
 *
 *   wrapDatasetIntrospection(source, sampleRows?)
 *     AI reads dataset schema or sample rows. PRIVACY-CRITICAL.
 *     PHI scan applied to sample rows (SSN, MRN, ICD-10 patterns).
 *     Cloud modes: source must be in allowedDatasetSources if set.
 *     Air-gapped mode: non-local sources (not file://) denied.
 *
 *   wrapChartGeneration(source, chartType?)
 *     AI generates a chart from a dataset.
 *     Same dataset-source allowlist gate as introspection.
 *
 *   wrapNotebookExport(format, exportTarget?)
 *     AI helps export the notebook (HTML, PDF, slides).
 *     Air-gapped: only local file targets allowed; upload denied.
 *     Education mode: default-deny unless allowExport: true is explicit.
 *
 *   wrapChat(prompt)
 *     Assistant panel chat. Secret scan applied.
 *
 *   wrapSlashCommand(command, args?)
 *     Slash commands: /explain, /fix, /optimize, etc.
 *
 * Platform-specific config validation:
 *   jupyter-ai:           instanceUrl required; rejected for cloud platforms.
 *   hex-ai/deepnote-ai/colab-ai: instanceUrl rejected (managed by vendor).
 *
 * Deployment modes:
 *   notebook-ai-multi-tenant-cloud -- Hex, Deepnote, Colab default.
 *   notebook-ai-self-hosted        -- Jupyter on-prem.
 *   notebook-ai-air-gapped         -- Jupyter offline / sovereign deployment.
 *   notebook-ai-education          -- Any platform with minor/student users.
 *
 * Strict-mode enforcement (the differentiators):
 *   - Air-gapped + kernel execution: denied if cell contains egress patterns.
 *   - Air-gapped + dataset introspection: non-local source denied.
 *   - Air-gapped + notebook export: upload / non-local target denied.
 *   - Cloud + dataset allowlist: source NOT in list denied.
 *   - PHI scan: SSN, MRN, ICD-10 patterns in sample rows trigger redaction.
 *   - Minor / student + kernel execution: ALWAYS denied (non-negotiable).
 *   - Cell generation / edit: secret scan on generated content.
 *   - Multi-cell edit cap: batch edits beyond cap denied.
 *   - Education mode + export: default-deny unless allowExport: true.
 *
 * Pen-tests:
 *   PT-ADAPT-NOTEBOOK-1: empty packBinding[] denied at every wrap call
 *   PT-ADAPT-NOTEBOOK-2: API keys / dataset connection strings never in audits
 *   PT-ADAPT-NOTEBOOK-3: malformed config throws at construction
 *   PT-ADAPT-NOTEBOOK-4: minor + kernel execution ALWAYS denied
 *   PT-ADAPT-NOTEBOOK-5: air-gapped + network-egress code ALWAYS denied
 *   PT-ADAPT-NOTEBOOK-6: dataset introspection PHI pattern triggers redaction
 *   PT-ADAPT-NOTEBOOK-7: cell generation with secret content denied
 *
 * Spec: P3-SUB-IDE-10
 *
 * @connexum/ai-governance
 */
import { BaseIdeAdapter } from './base';
import { type IdeAdapterConfig, type IdeAdapterCapabilities, type IdeSessionContext, type ToolInvocationContext, type ToolInvocationDecision, type UserIdentity } from './index';
/**
 * The four supported notebook AI platforms.
 *
 *   jupyter-ai   -- JupyterLab AI (self-hosted; requires instanceUrl).
 *   hex-ai       -- Hex cloud AI (managed SaaS).
 *   deepnote-ai  -- Deepnote cloud AI (managed SaaS).
 *   colab-ai     -- Google Colab AI (managed by Google).
 */
export type NotebookAIPlatform = 'jupyter-ai' | 'hex-ai' | 'deepnote-ai' | 'colab-ai';
export declare const NOTEBOOK_AI_VALID_PLATFORMS: readonly NotebookAIPlatform[];
/** Cloud-managed platforms (instanceUrl is rejected for these). */
export declare const NOTEBOOK_AI_CLOUD_PLATFORMS: readonly NotebookAIPlatform[];
export type NotebookAIDeploymentMode = 'notebook-ai-multi-tenant-cloud' | 'notebook-ai-self-hosted' | 'notebook-ai-air-gapped' | 'notebook-ai-education';
export declare const NOTEBOOK_AI_VALID_DEPLOYMENT_MODES: readonly NotebookAIDeploymentMode[];
export type NotebookAIUserTier = 'professional' | 'student' | 'researcher' | 'admin';
export declare const NOTEBOOK_AI_VALID_USER_TIERS: readonly NotebookAIUserTier[];
export interface NotebookAIAdapterConfig extends IdeAdapterConfig {
    /**
     * Platform discriminator. REQUIRED.
     * Determines deployment-shape and data-residency expectations.
     */
    platform: NotebookAIPlatform;
    /**
     * Deployment mode. Governs data egress and kernel-execution policy.
     * Default: 'notebook-ai-multi-tenant-cloud' for cloud platforms;
     *          'notebook-ai-self-hosted' for jupyter-ai.
     */
    deploymentMode?: NotebookAIDeploymentMode;
    /**
     * User tier. Affects kernel execution and export permissions.
     * Default: 'professional'.
     */
    userTier?: NotebookAIUserTier;
    /**
     * Minor / student safeguard flag. When true, kernel execution is ALWAYS
     * denied regardless of allowKernelExecution. Cannot be overridden by
     * instructorOverride unless userTier='admin' and instructorOverride=true.
     * Default: false.
     */
    userIsMinor?: boolean;
    /**
     * Required for jupyter-ai platform when self-hosted or air-gapped.
     * Rejected for cloud platforms (hex-ai, deepnote-ai, colab-ai).
     */
    instanceUrl?: string;
    /**
     * FQDN / URI allowlist for permitted dataset sources.
     * When set, sources not matching any entry are denied in cloud modes.
     * In air-gapped mode, all non-local sources are denied regardless.
     * Example: ['snowflake-prod.acme.com', 's3://acme-research-bucket']
     */
    allowedDatasetSources?: string[];
    /**
     * Allow AI-triggered kernel execution (code runs in the notebook kernel).
     * HIGH RISK: executes arbitrary code.
     * Default: false.
     * Minor/student safeguard: ignored (still denied) when userIsMinor=true or
     * userTier='student' unless instructorOverride=true.
     */
    allowKernelExecution?: boolean;
    /**
     * When kernel execution is allowed, restrict to these languages only.
     * Default: all languages permitted when allowKernelExecution=true.
     */
    allowedKernelLanguages?: Array<'python' | 'r' | 'sql' | 'julia'>;
    /**
     * Allow notebook export (HTML, PDF, slides, etc.).
     * Default: true for professional/researcher/admin.
     * Default: false for education deployment mode and student tier.
     */
    allowExport?: boolean;
    /**
     * Advisory maximum cell execution time in milliseconds.
     * Default: 30000.
     */
    cellExecutionTimeMs?: number;
    /**
     * Maximum cells that may be edited in a single batch operation.
     * Default: 25.
     */
    multiCellEditCap?: number;
    /**
     * Instructor override for minor/student kernel-execution gate.
     * When true AND userTier='admin', permits kernel execution even for
     * sessions flagged as minor.
     * Default: false.
     */
    instructorOverride?: boolean;
}
export declare class NotebookAIAdapter extends BaseIdeAdapter {
    readonly adapterId = "notebook-ai";
    readonly ideId = "notebook-ai";
    private platform;
    private deploymentMode;
    private userTier;
    private userIsMinor;
    private instanceUrl;
    private allowedDatasetSources;
    private allowKernelExecution;
    private allowedKernelLanguages;
    private allowExport;
    private cellExecutionTimeMs;
    private multiCellEditCap;
    private instructorOverride;
    initialize(config: NotebookAIAdapterConfig): void;
    resolveUserIdentity(session: IdeSessionContext): Promise<UserIdentity>;
    getIdeCapabilities(): IdeAdapterCapabilities;
    interceptToolInvocation(ctx: ToolInvocationContext): Promise<ToolInvocationDecision>;
    private checkPackBinding;
    private checkMinorKernelExecution;
    wrapCellGeneration(ctx: ToolInvocationContext, prompt: string, language?: string): Promise<ToolInvocationDecision>;
    wrapCellEdit(ctx: ToolInvocationContext, cellId: string, originalContent: string, instruction: string, cellCount?: number): Promise<ToolInvocationDecision>;
    wrapCellExplain(ctx: ToolInvocationContext, cellId: string, cellContent: string): Promise<ToolInvocationDecision>;
    wrapKernelExecution(ctx: ToolInvocationContext, cellId: string, cellContent: string, language?: string): Promise<ToolInvocationDecision>;
    wrapDatasetIntrospection(ctx: ToolInvocationContext, source: string, sampleRows?: string): Promise<ToolInvocationDecision>;
    wrapChartGeneration(ctx: ToolInvocationContext, source: string, chartType?: string): Promise<ToolInvocationDecision>;
    wrapNotebookExport(ctx: ToolInvocationContext, format: string, exportTarget?: string): Promise<ToolInvocationDecision>;
    wrapChat(ctx: ToolInvocationContext, prompt: string): Promise<ToolInvocationDecision>;
    wrapSlashCommand(ctx: ToolInvocationContext, command: string, args?: string): Promise<ToolInvocationDecision>;
}
//# sourceMappingURL=notebook-ai.d.ts.map