import { CreateKnowledgeDocumentInput, IndexedKnowledgeDocument, KnowledgeChunk, KnowledgeDocument, KnowledgeDocumentId, KnowledgeFile, KnowledgeScope, KnowledgeScopeId, KnowledgeSearchScope, UpdateKnowledgeDocumentInput } from "./documents.mjs"; import { KnowledgeStoreError, SearchIndexStoreError } from "./errors.mjs"; import { KnowledgeEmbedding } from "./embeddings.mjs"; import { Context, Effect } from "effect"; //#region src/store.d.ts type GetKnowledgeDocumentInput = { readonly scope: KnowledgeScope; readonly id: KnowledgeDocumentId; }; type GetKnowledgeDocumentBySlugInput = { readonly scope: KnowledgeScope; readonly slug: string; }; type ListKnowledgeDocumentsInput = { readonly scope: KnowledgeScope; readonly limit: number; readonly availability?: KnowledgeDocument['availability']; }; type ListKnowledgeDocumentsResult = { readonly documents: ReadonlyArray; }; type ListPinnedKnowledgeInput = { readonly scope: KnowledgeScope; readonly limit: number; }; type ListPinnedKnowledgeResult = { readonly documents: ReadonlyArray; }; type KnowledgeStoreApi = { readonly createDocument: (input: CreateKnowledgeDocumentInput) => Effect.Effect; readonly updateDocument: (input: UpdateKnowledgeDocumentInput) => Effect.Effect; readonly getDocument: (input: GetKnowledgeDocumentInput) => Effect.Effect; readonly getDocumentBySlug: (input: GetKnowledgeDocumentBySlugInput) => Effect.Effect; readonly listDocuments: (input: ListKnowledgeDocumentsInput) => Effect.Effect; readonly listPinned: (input: ListPinnedKnowledgeInput) => Effect.Effect; readonly deleteDocument: (input: GetKnowledgeDocumentInput) => Effect.Effect; readonly listFiles: (input: GetKnowledgeDocumentInput) => Effect.Effect, KnowledgeStoreError>; }; declare const KnowledgeStore_base: Context.ServiceClass; declare class KnowledgeStore extends KnowledgeStore_base {} type UpsertIndexedKnowledgeDocumentInput = { readonly document: IndexedKnowledgeDocument; }; type ReplaceKnowledgeDocumentChunksInput = { readonly scopeId: KnowledgeScopeId; readonly documentId: KnowledgeDocumentId; readonly chunks: ReadonlyArray<{ readonly chunk: KnowledgeChunk; readonly embedding: KnowledgeEmbedding; }>; }; type MarkKnowledgeDocumentReadyInput = { readonly scopeId: KnowledgeScopeId; readonly documentId: KnowledgeDocumentId; readonly title?: string; readonly summary?: string; readonly contentHash?: string; readonly tokenCount: number; readonly chunkCount: number; }; type MarkKnowledgeDocumentErrorInput = { readonly scopeId: KnowledgeScopeId; readonly documentId: KnowledgeDocumentId; readonly message: string; }; type KnowledgeChunkSearchInput = { readonly scope: KnowledgeSearchScope; readonly embedding: KnowledgeEmbedding; readonly limit: number; readonly minScore?: number; }; type KnowledgeChunkTextSearchInput = { readonly scope: KnowledgeSearchScope; readonly query: string; readonly limit: number; }; type KnowledgeChunkSearchResult = { readonly chunk: KnowledgeChunk; readonly score: number; readonly document: IndexedKnowledgeDocument; }; type KnowledgeSearchContextChunksInput = { readonly scopeId: KnowledgeScopeId; readonly documentId: KnowledgeDocumentId; readonly position: number; readonly contextChunks: number; }; type SearchIndexStoreApi = { readonly upsertDocument: (input: UpsertIndexedKnowledgeDocumentInput) => Effect.Effect; readonly markDocumentProcessing: (input: { readonly scopeId: KnowledgeScopeId; readonly documentId: KnowledgeDocumentId; }) => Effect.Effect; readonly replaceDocumentChunks: (input: ReplaceKnowledgeDocumentChunksInput) => Effect.Effect; readonly markDocumentReady: (input: MarkKnowledgeDocumentReadyInput) => Effect.Effect; readonly markDocumentError: (input: MarkKnowledgeDocumentErrorInput) => Effect.Effect; readonly deleteDocument: (input: { readonly scopeId: KnowledgeScopeId; readonly documentId: KnowledgeDocumentId; }) => Effect.Effect; readonly searchChunks: (input: KnowledgeChunkSearchInput) => Effect.Effect, SearchIndexStoreError>; readonly searchChunksByText: (input: KnowledgeChunkTextSearchInput) => Effect.Effect, SearchIndexStoreError>; readonly getContextChunks: (input: KnowledgeSearchContextChunksInput) => Effect.Effect, SearchIndexStoreError>; }; declare const SearchIndexStore_base: Context.ServiceClass; declare class SearchIndexStore extends SearchIndexStore_base {} //#endregion export { GetKnowledgeDocumentBySlugInput, GetKnowledgeDocumentInput, KnowledgeChunkSearchInput, KnowledgeChunkSearchResult, KnowledgeChunkTextSearchInput, KnowledgeSearchContextChunksInput, KnowledgeStore, KnowledgeStoreApi, ListKnowledgeDocumentsInput, ListKnowledgeDocumentsResult, ListPinnedKnowledgeInput, ListPinnedKnowledgeResult, MarkKnowledgeDocumentErrorInput, MarkKnowledgeDocumentReadyInput, ReplaceKnowledgeDocumentChunksInput, SearchIndexStore, SearchIndexStoreApi, UpsertIndexedKnowledgeDocumentInput }; //# sourceMappingURL=store.d.mts.map