import type { ConnectionConfig, QueryExecutor } from "@duckcodeailabs/dql-connectors"; export type DatasetStorageMode = "local" | "project" | "staged"; export type DatasetTrustState = "local_ad_hoc" | "project_controlled" | "governed_snapshot" | "review_required"; export interface DatasetColumn { name: string; type: string; nullable?: boolean; nullCount?: number; distinctCount?: number; sampleValues?: unknown[]; flags?: Array<"identifier" | "date" | "measure" | "null_heavy" | "sensitive">; } export interface DatasetProfile { rowCount: number; sampledRows: number; columns: DatasetColumn[]; duplicateRows?: number; warnings: string[]; preview: Array>; } export interface DatasetLineage { connectionName?: string; query?: string; blockPath?: string; semanticMetrics?: string[]; semanticDimensions?: string[]; filters?: Record; parameters?: Record; extractedAt?: string; rowCount?: number; byteCount?: number; sourceFingerprint?: string; resultFingerprint?: string; } export interface DatasetSource { id: string; name: string; alias: string; description?: string; owner?: string; tags: string[]; sourcePath: string; storageMode: DatasetStorageMode; format: "csv" | "parquet" | "json"; fileFingerprint: string; sizeBytes: number; modifiedAt: string; importedAt: string; refreshedAt: string; profile: DatasetProfile; trustState: DatasetTrustState; linked?: boolean; pinned?: boolean; expiresAt?: string; lineage?: DatasetLineage; schemaDrift?: { detectedAt: string; added: string[]; removed: string[]; changed: Array<{ column: string; before: string; after: string; }>; }; schemaOverrides?: Record; } export interface ImportDatasetInput { filename?: string; sourcePath?: string; /** Base64 encoded file contents. File bodies are never placed in AI context. */ contentBase64?: string; /** Multipart uploads arrive as bytes without JSON/base64 expansion. */ content?: Buffer; storageMode?: "local" | "project"; link?: boolean; name?: string; alias?: string; description?: string; owner?: string; tags?: string[]; } export declare class NotebookDatasetWorkspace { readonly projectRoot: string; private readonly executor; readonly localRoot: string; readonly datasetRoot: string; readonly stagedRoot: string; readonly databasePath: string; readonly localConnection: ConnectionConfig; constructor(projectRoot: string, executor: QueryExecutor, moduleSearchPaths?: string[]); list(): DatasetSource[]; get(id: string): DatasetSource | undefined; initialize(): Promise; import(input: ImportDatasetInput): Promise<{ dataset: DatasetSource; duplicate: boolean; }>; refresh(id: string): Promise; rename(id: string, name: string, alias?: string): DatasetSource; updateSchema(id: string, overrides: Record): Promise; pin(id: string, pinned: boolean): DatasetSource; remove(id: string): void; stageRows(input: { name: string; rows: Array>; lineage: DatasetLineage; expiresInDays?: number; }): Promise; registerView(dataset: DatasetSource): Promise; private inspect; private require; private absolutePath; private upsert; private readLocalRegistry; private writeLocalRegistry; private readProjectRegistry; private writeProjectRegistry; } //# sourceMappingURL=notebook-datasets.d.ts.map