/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */ import type { Database } from 'bun:sqlite'; /** * Resolves the path to the sqlite-vec native extension. * * When running inside a Bun bundled executable (import.meta.url path contains * "$bunfs"), the npm package's import.meta.resolve() cannot find the extension * because the virtual filesystem does not contain node_modules. In that case, * the extension must be co-located with the binary under * `/lib/sqlite-vec--/vec0.`. * * In development (bun run / node), the package's own getLoadablePath() is used * via the re-exported `load()` function. * * Shared by memory-vector-store.ts (MemoryStore's vector index) and * code-index-store.ts (the repo source-tree code index; see CHANGELOG 0.38.0) so both * indexes load the exact same native extension the exact same way. */ export declare function resolveSqliteVecPath(): string; /** * Thrown when the RUNTIME PLATFORM cannot load SQLite extensions at all, * most commonly a macOS-compiled binary, where bun:sqlite links Apple's * system SQLite, which ships with extension loading disabled. This is a * permanent capability limit of the platform, not a defect in the build: * callers should degrade to their documented no-vector mode with the * `reason` surfaced, rather than reporting an error. A missing extension * FILE (a genuine packaging defect) deliberately does NOT map to this class. */ export declare class SqliteVecPlatformUnsupportedError extends Error { readonly platformLimit = true; constructor(cause: string); } /** * Loads the sqlite-vec extension into a Bun SQLite database. * Handles both bundled-binary and development execution contexts. * * Throws SqliteVecPlatformUnsupportedError when the platform itself refuses * extension loading (see the class doc); rethrows everything else untouched. */ export declare function loadSqliteVecExtension(db: Database): void; //# sourceMappingURL=sqlite-vec-loader.d.ts.map