import { GhosttyBindings } from './bindings.js'; import { CoreTerminal, type TerminalHost } from './terminal.js'; import type { CoreRuntimeOptions, CoreTerminalOptions } from './types.js'; type CallbackIndexes = TerminalHost['callbackIndexes']; /** * Shared headless Ghostty WASM runtime that creates and owns terminal instances. * * @remarks * Reuse one runtime for independent headless sessions so they share the loaded and compiled Ghostty * module. Disposing the runtime disposes every terminal it created. */ export declare class CoreRuntime implements TerminalHost { private readonly terminals; private nextId; private disposed; /** @internal */ readonly bindings: GhosttyBindings; /** @internal */ readonly callbackIndexes: CallbackIndexes; /** Compiled Ghostty module shared by terminals created from this runtime. */ readonly wasmModule: WebAssembly.Module; private constructor(); /** * Creates and initializes a runtime from optional custom WASM sources. * * @remarks The Ghostty artifact is validated against its self-described ABI before this resolves. */ static create(options?: CoreRuntimeOptions): Promise; /** * Creates a headless terminal owned by this runtime. * * @remarks The default grid is 80 by 24 cells with 10,000 lines of scrollback. */ createTerminal(options?: CoreTerminalOptions): CoreTerminal; /** @internal */ unregister(id: number): void; /** Disposes every owned terminal and prevents further terminal creation. */ dispose(): void; } /** Creates and initializes a shared headless Ghostty runtime. */ export declare function createCoreRuntime(options?: CoreRuntimeOptions): Promise; export {}; //# sourceMappingURL=runtime.d.ts.map