import { _l as SqliteWalMaintenance, vl as SqliteWalMaintenanceOptions } from "./types-BVAOMoZy.js";
import { DatabaseSync } from "node:sqlite";

//#region packages/memory-host-sdk/src/host/read-retry.d.ts
/** Return true for transient memory read failures that should be retried. */
declare function isTransientMemoryReadError(error: unknown): boolean;
/** Retry a memory read with the narrow transient error predicate. */
declare function retryTransientMemoryRead<T>(read: () => Promise<T>, label?: string): Promise<T>;
//#endregion
//#region packages/memory-host-sdk/src/host/memory-schema.d.ts
/** Ensure memory index tables and optional FTS/cache tables exist. */
declare function ensureMemoryIndexSchema(params: {
  db: DatabaseSync;
  embeddingCacheTable: string;
  cacheEnabled: boolean;
  ftsTable: string;
  ftsEnabled: boolean;
  ftsTokenizer?: "unicode61" | "trigram";
}): {
  ftsAvailable: boolean;
  ftsError?: string;
};
//#endregion
//#region packages/memory-host-sdk/src/host/sqlite-vec.d.ts
declare function loadSqliteVecExtension(params: {
  db: DatabaseSync;
  extensionPath?: string;
}): Promise<{
  ok: boolean;
  extensionPath?: string;
  error?: string;
}>;
//#endregion
//#region packages/memory-host-sdk/src/host/sqlite.d.ts
declare function requireNodeSqlite(): typeof import("node:sqlite");
declare function configureMemorySqliteWalMaintenance(db: DatabaseSync, options?: SqliteWalMaintenanceOptions): SqliteWalMaintenance;
declare function closeMemorySqliteWalMaintenance(db: DatabaseSync): boolean;
//#endregion
//#region src/plugin-sdk/memory-core-host-engine-storage.d.ts
/** Origin bucket for memory search results exposed through the SDK. */
type MemorySource = "memory" | "sessions";
/** Normalized search hit shape returned by memory host searches. */
type MemorySearchResult = {
  path: string;
  startLine: number;
  endLine: number;
  score: number;
  vectorScore?: number;
  textScore?: number;
  snippet: string;
  source: MemorySource;
  citation?: string;
};
/** Health probe result for embedding provider availability checks. */
type MemoryEmbeddingProbeResult = {
  ok: boolean;
  error?: string;
  checked?: boolean;
  cached?: boolean;
  checkedAtMs?: number;
  cacheExpiresAtMs?: number;
};
//#endregion
export { configureMemorySqliteWalMaintenance as a, ensureMemoryIndexSchema as c, closeMemorySqliteWalMaintenance as i, isTransientMemoryReadError as l, MemorySearchResult as n, requireNodeSqlite as o, MemorySource as r, loadSqliteVecExtension as s, MemoryEmbeddingProbeResult as t, retryTransientMemoryRead as u };