import { type KernelDisplayOutput } from "./display"; export type { KernelDisplayOutput, PythonStatusEvent } from "./display"; export { renderKernelDisplay } from "./display"; export interface KernelExecuteOptions { signal?: AbortSignal; onChunk?: (text: string) => Promise | void; onDisplay?: (output: KernelDisplayOutput) => Promise | void; timeoutMs?: number; silent?: boolean; storeHistory?: boolean; allowStdin?: boolean; } export interface KernelExecuteResult { status: "ok" | "error"; executionCount?: number; error?: { name: string; value: string; traceback: string[]; }; cancelled: boolean; timedOut: boolean; stdinRequested: boolean; /** * True when the kernel subprocess was killed as part of settling this * execution (e.g. SIGINT was ignored and we escalated to shutdown, or the * kernel died unexpectedly). When false, the kernel remains reusable. */ kernelKilled?: boolean; } export interface KernelShutdownResult { confirmed: boolean; } interface KernelLifecycleOptions { signal?: AbortSignal; deadlineMs?: number; } interface KernelStartOptions extends KernelLifecycleOptions { cwd: string; env?: Record; } interface KernelShutdownOptions { signal?: AbortSignal; timeoutMs?: number; } export interface PythonKernelAvailability { ok: boolean; pythonPath?: string; reason?: string; } export declare function checkPythonKernelAvailability(cwd: string): Promise; export declare class PythonKernel { #private; readonly id: string; private constructor(); static start(options: KernelStartOptions): Promise; isAlive(): boolean; execute(code: string, options?: KernelExecuteOptions): Promise; interrupt(): Promise; shutdown(options?: KernelShutdownOptions): Promise; }