import{EmbeddingService as y,VectorIndexer as z}from"@contractspec/lib.knowledge/ingestion";import{ContextSnapshotPipeline as A,PostgresContextStorage as B}from"@contractspec/module.context-storage";function H(f){let j=new B({database:f.database,schema:f.schema,createTablesIfMissing:f.createTablesIfMissing}),k=f.embeddingProvider?new y(f.embeddingProvider,f.embeddingBatchSize):void 0,q=f.vectorStoreProvider&&f.vectorIndex?new z(f.vectorStoreProvider,f.vectorIndex):void 0,w=new A({store:j,documentProcessor:f.documentProcessor,embeddingService:k,vectorIndexer:q});return{store:j,pipeline:w}}export{H as createContextStorageService};
