export type QueryType = 'recall' | 'search' | 'dna' | 'replay' | 'archetype' | 'stats'; export type Cell = { kind: 'markdown'; source: string; } | { kind: 'query'; queryType: QueryType; source: string; lastResult?: string; lastRun?: string; } | { kind: 'code'; language: 'ts' | 'py' | 'sh'; source: string; }; export interface NotebookMetadata { project: string; created: string; modified: string; brain_version: string; } export interface Notebook { title: string; cells: Cell[]; metadata: NotebookMetadata; } export interface NotebookRunResult { cells: Array<{ index: number; kind: Cell['kind']; result?: string; durationMs?: number; error?: string; }>; totalDurationMs: number; ranAt: string; } export declare class BrainNotebook { /** Create a starter notebook on disk and return its path. */ createNotebook(project: string, title: string): Promise<{ path: string; }>; /** Parse a notebook from disk. */ parse(filePath: string): Promise; /** Parse a notebook from a raw string (useful for tests). */ parseString(raw: string, source?: string): Notebook; /** Run a single cell. Markdown cells are no-ops; code cells echo with a TODO. */ runCell(notebook: Notebook, cellIndex: number): Promise<{ result: string; durationMs: number; }>; /** Run every query cell in order. */ runAll(notebook: Notebook): Promise; /** Write the notebook back to disk with the latest run results inlined. */ save(notebook: Notebook, filePath: string): Promise; /** Render the notebook as a plain Markdown document. */ toMarkdown(notebook: Notebook): string; private executeQuery; private runRecall; private runDna; private runReplay; private runArchetype; private runStats; private fallbackResult; } export declare function getBrainNotebook(): BrainNotebook; export declare function resetBrainNotebookForTests(): void; //# sourceMappingURL=brain-notebook.d.ts.map