Files
openclaw/packages/memory-host-sdk/src/engine-storage.ts
Peter Steinberger 8dbd30ba74 feat(memory): per-entry glob patterns for extraPaths (#121209)
* feat(memory): support globbed extra paths

Allow root-relative glob patterns on existing memory.search.extraPaths entries across discovery, watching, reindex identity, and QMD migration.

* fix(memory): drop stale lease type import

* fix(memory): enforce extra path glob scope
2026-08-09 13:05:24 -07:00

86 lines
2.5 KiB
TypeScript

// Real workspace contract for memory engine storage/index helpers.
export {
buildFileEntry,
buildMultimodalChunkForIndexing,
chunkMarkdown,
cosineSimilarity,
extractProjectKeysFromCuratedEntry,
ensureDir,
hashText,
INVALID_PROJECT_ANNOTATION_KEY,
listMemoryFiles,
matchesExtraMemoryPathEntry,
MEMORY_CHUNKING_VERSION,
normalizeExtraMemoryPathEntries,
normalizeProjectAnnotationKey,
normalizeExtraMemoryPaths,
parseEmbedding,
remapChunkLines,
runWithConcurrency,
splitCuratedMarkdownEntries,
stripMemoryAnnotationCarriers,
type CuratedMarkdownEntry,
type CuratedProjectAnnotations,
type MemoryChunk,
type MemoryFileEntry,
type NormalizedExtraMemoryPath,
} from "./host/internal.js";
export { readMemoryFile } from "./host/read-file.js";
export { isTransientMemoryReadError, retryTransientMemoryRead } from "./host/read-retry.js";
export {
buildMemoryReadResult,
buildMemoryReadResultFromSlice,
DEFAULT_MEMORY_READ_LINES,
DEFAULT_MEMORY_READ_MAX_CHARS,
type MemoryReadResult,
} from "./host/read-file-shared.js";
export { resolveMemoryBackendConfig } from "./host/backend-config.js";
export { resolveMemorySearchStaleness } from "./host/types.js";
export type { ResolvedMemoryBackendConfig } from "./host/backend-config.js";
export type {
MemoryEmbeddingProbeResult,
MemoryEntryProvenance,
MemoryExtraPath,
MemoryOriginClass,
MemoryProviderStatus,
MemorySearchManager,
MemorySearchRuntimeDebug,
MemorySearchResult,
MemorySessionSyncTarget,
MemorySessionKind,
MemorySource,
MemorySyncParams,
MemorySyncProgressUpdate,
MemoryVectorIndexState,
} from "./host/types.js";
export {
dropMemoryPathFtsTriggers,
ensureMemoryChunkProvenance,
ensureMemoryIndexSchema,
ensureMemoryRecallMetadataSchema,
ensureMemoryPathFtsTriggers,
MEMORY_EMBEDDING_CACHE_TABLE,
MEMORY_INDEX_CHUNKS_TABLE,
MEMORY_INDEX_CHUNK_PROVENANCE_TABLE,
MEMORY_INDEX_CHUNK_RECALL_METADATA_TABLE,
MEMORY_INDEX_FTS_TABLE,
MEMORY_INDEX_META_TABLE,
MEMORY_INDEX_PATHS_FTS_TABLE,
MEMORY_INDEX_SOURCES_TABLE,
MEMORY_INDEX_STATE_TABLE,
MEMORY_INDEX_VECTOR_TABLE,
} from "./host/memory-schema.js";
export { loadSqliteVecExtension } from "./host/sqlite-vec.js";
export {
readCuratedProjectMemoryCandidates,
readCuratedMemoryTriggerCandidates,
readMemoryRecallMetadata,
} from "./host/memory-recall-metadata.js";
export {
closeMemorySqliteWalMaintenance,
configureMemorySqliteWalMaintenance,
requireNodeSqlite,
} from "./host/sqlite.js";
export { isFileMissingError, statRegularFile } from "./host/fs-utils.js";