import { type DataStoreTransport, type ParserMemorySnapshot } from './data-store-transport.js'; /** Input message: pass the SAB-backed source bytes and an opaque request id. */ export interface ParserWorkerInputMessage { type: 'parse'; id: string; source: SharedArrayBuffer; /** Optional yieldIntervalMs override (forwarded to parseColumnar). */ yieldIntervalMs?: number; /** Defer indexing of property atoms (huge-file mode). */ deferPropertyAtomIndex?: boolean; /** * If set, the worker holds the parse before the WASM scan until a * `set-entity-index` message arrives. The streaming geometry pre-pass * already builds the same index in another worker — handing it across * via SAB lets us skip a second 6–10 s file scan. */ waitForEntityIndex?: boolean; } /** Hand the worker a pre-built entity index (typically from the geometry pre-pass). */ export interface ParserWorkerEntityIndexMessage { type: 'set-entity-index'; ids: Uint32Array; starts: Uint32Array; lengths: Uint32Array; } /** Progress update from the worker. */ export interface ParserWorkerProgressMessage { type: 'progress'; id: string; progress: { phase: string; percent: number; }; } /** Optional structured diagnostic line (mirrors parseColumnar `onDiagnostic`). */ export interface ParserWorkerDiagnosticMessage { type: 'diagnostic'; id: string; message: string; } /** Hierarchy is ready — UI can render the spatial panel before full parse completes. */ export interface ParserWorkerPartialStoreMessage { type: 'partial-store'; id: string; payload: DataStoreTransport; } /** Full data store is ready. */ export interface ParserWorkerCompleteMessage { type: 'complete'; id: string; payload: DataStoreTransport; memory: ParserMemorySnapshot; } export interface ParserWorkerErrorMessage { type: 'error'; id: string; message: string; } export type ParserWorkerOutputMessage = ParserWorkerProgressMessage | ParserWorkerDiagnosticMessage | ParserWorkerPartialStoreMessage | ParserWorkerCompleteMessage | ParserWorkerErrorMessage; //# sourceMappingURL=parser.worker.d.ts.map