import type { ExtensionContext } from "@earendil-works/pi-coding-agent"; import type { NotebookRuntimeOptions } from "../code-mode/shared-runtime.ts"; import type { NotebookMemoryUsage, ToolExecutionContext } from "../code-mode/types.ts"; import type { NotebookBridgeServer } from "./bridge-server.ts"; import { NotebookCheckpointManager } from "./checkpoint-manager.ts"; import { type NotebookJournal } from "./journal.ts"; import type { DenoJupyterKernel } from "./jupyter-kernel.ts"; import { type RetainedProjectBinding } from "./project-state-metadata.ts"; import { type NotebookRuntimeHealth } from "./runtime-health.ts"; export declare class NotebookSessionRuntime { readonly options: NotebookRuntimeOptions; readonly checkpointMaxBytes: number; readonly checkpoints: NotebookCheckpointManager; private readonly bridge; private readonly runningCellId; private kernelValue; private runtimeHealthValue; private identityValue; private checkpointIdentityValue; private startup; private startupAbort; private notice; private memoryValue; private journalValue; private extensionContext; private baseline; private startedAtValue; private profileLoaded; constructor(options: { runtime: NotebookRuntimeOptions; bridge: NotebookBridgeServer; runningCellId(): string | undefined; }); identityMatches(context: ExtensionContext): boolean; ensure(context: ToolExecutionContext, signal?: AbortSignal): Promise; restart(context: ExtensionContext, signal?: AbortSignal, skipProfile?: boolean): Promise; invalidateKernel(notice?: string): Promise; recoverFromBootstrapFailure(value: unknown): Promise; stopWithoutCheckpoint(): Promise; abortStartup(reason: Error): Promise; shutdown(): Promise; kernel(): DenoJupyterKernel | undefined; runtimeHealth(): NotebookRuntimeHealth; runtimeHealthFor(context: ExtensionContext): NotebookRuntimeHealth; journal(): NotebookJournal | undefined; materializeJournal(): void; baselineNames(): ReadonlySet; configuredProfileLoaded(): boolean; retainedBindings(): RetainedProjectBinding[]; recordMemory(memory: NotebookMemoryUsage | undefined): void; recordNpmImports(source: string): Promise; memory(): NotebookMemoryUsage | undefined; addNotice(notice: string): void; takeNotice(): string | undefined; metadata(): { startedAt?: number | undefined; userCells: number; memory?: NotebookMemoryUsage | undefined; checkpoint: Record; }; private start; private handleKernelFailure; private beginStartup; }