type EngineErrorKind = 'analyzer-not-found' | 'analyzer-capability-missing' | 'invalid-sql-literal' | 'placeholder-arity-mismatch' | 'invalid-search-types' | 'attached-table-missing' | 'manifest-cas-exhausted' | 'invalid-snapshot-filename' | 'unsupported-snapshot-index-version' | 'invalid-schema-identifier' | 'invalid-year-month' | 'missing-attach-url' | 'manifest-cas-round-lost' | 'iceberg-table-op-failed' | 'sink-table-flush-failed' | 'rollup-build-failed' | 'lock-acquire-timeout'; type EngineError = { kind: 'analyzer-not-found'; tool: string; message: string; } | { kind: 'analyzer-capability-missing'; tool: string; missing: readonly string[]; message: string; } | { kind: 'invalid-sql-literal'; message: string; } | { kind: 'placeholder-arity-mismatch'; message: string; } | { kind: 'invalid-search-types'; message: string; cause?: unknown; } | { kind: 'attached-table-missing'; missing: readonly string[]; message: string; } | { kind: 'manifest-cas-exhausted'; message: string; siteId: string; table: string; attempts: number; } | { kind: 'invalid-snapshot-filename'; message: string; fileName: string; } | { kind: 'unsupported-snapshot-index-version'; message: string; version: unknown; } | { kind: 'invalid-schema-identifier'; message: string; schema: string; } | { kind: 'invalid-year-month'; message: string; value: string; } | { kind: 'missing-attach-url'; message: string; fileName: string; } | { kind: 'manifest-cas-round-lost'; message: string; siteId: string; table: string; attempt: number; } | { kind: 'iceberg-table-op-failed'; message: string; op: 'create' | 'drop'; table: string; cause?: unknown; } | { kind: 'sink-table-flush-failed'; message: string; table: string; cause?: unknown; } | { kind: 'rollup-build-failed'; message: string; id: string; cause?: unknown; } | { kind: 'lock-acquire-timeout'; message: string; scope: string; timeoutMs: number; }; declare const engineErrors: { readonly analyzerNotFound: (tool: string) => EngineError; readonly analyzerCapabilityMissing: (tool: string, missing: readonly string[]) => EngineError; readonly nonFiniteNumberLiteral: (value: number) => EngineError; readonly controlCharsInLiteral: () => EngineError; readonly uninlinableLiteralType: (type: string) => EngineError; readonly morePlaceholdersThanParams: (have: number) => EngineError; readonly dollarPlaceholderOutOfRange: (n: number, have: number) => EngineError; readonly mixedPlaceholderStyles: () => EngineError; readonly unusedParams: (unused: number) => EngineError; readonly searchTypesNotArray: () => EngineError; readonly unknownSearchType: (value: unknown) => EngineError; readonly searchTypesMissingWeb: () => EngineError; readonly attachedTableMissing: (missing: readonly string[]) => EngineError; readonly manifestCasExhausted: (siteId: string, table: string, attempts: number) => EngineError; readonly invalidSnapshotFilename: (fileName: string) => EngineError; readonly unsupportedSnapshotIndexVersion: (version: unknown) => EngineError; readonly invalidSchemaIdentifier: (schema: string) => EngineError; readonly invalidYearMonth: (value: string) => EngineError; readonly missingAttachUrl: (fileName: string) => EngineError; readonly manifestCasRoundLost: (siteId: string, table: string, attempt: number) => EngineError; readonly icebergTableOpFailed: (op: "create" | "drop", table: string, cause: unknown) => EngineError; readonly sinkTableFlushFailed: (table: string, cause: unknown) => EngineError; readonly rollupBuildFailed: (id: string, cause: unknown) => EngineError; readonly lockAcquireTimeout: (scope: string, timeoutMs: number) => EngineError; }; declare function isEngineError(value: unknown): value is EngineError; /** * Re-raises an `EngineError` value as a generic `Error`, stashing the union under * `.engineError` for stack-walking. Used by the throwing wrappers over the * `Result`-returning cores whose original throws were bare `Error`s (the SQL * binder, sync-config). Modules that historically threw a *named* class * (`AnalyzerCapabilityError`, `AttachedTableMissingError`) provide their own * mapper so the class identity callers match on is preserved. */ declare function engineErrorToException(error: EngineError): Error; export { EngineError, EngineErrorKind, engineErrorToException, engineErrors, isEngineError };