@absolutejs/rag 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ export { createRAGVector, normalizeVector, querySimilarity } from "../adapters/utils";
2
+ export { matchesMetadataFilterRecord } from "../adapters/filtering";
3
+ export { planNativeCandidateSearchBackfillK, planNativeCandidateSearchK, resolveAdaptiveNativeCandidateLimit, summarizeSQLiteCandidateCoverage, } from "../adapters/queryPlanning";
4
+ export { rankRAGLexicalMatches } from "../retrieval/lexical";
5
+ export { createRAGCollection } from "../retrieval/collection";
6
+ export { ragChat, ragChat as ragPlugin } from "../chat/chat";
7
+ export { RAG_NATIVE_QUERY_CANDIDATE_LIMIT, RAG_VECTOR_DIMENSIONS_DEFAULT, } from "../constants";
8
+ export type { RAGBackendCapabilities, RAGCollection, RAGEmbeddingInput, RAGLexicalQueryInput, RAGPostgresNativeDiagnostics, RAGQueryInput, RAGQueryResult, RAGSQLiteNativeDiagnostics, RAGUpsertInput, RAGVectorCountInput, RAGVectorDeleteInput, RAGVectorStore, RAGVectorStoreStatus, SQLiteVecResolution, } from "@absolutejs/ai";
@@ -1025,8 +1025,17 @@ export declare const ragChat: (config: RAGChatPluginConfig) => Elysia<"", {
1025
1025
  headers: unknown;
1026
1026
  response: {
1027
1027
  200: AsyncGenerator<{
1028
- data: string;
1029
- event: string;
1028
+ readonly data: string;
1029
+ readonly event: "error";
1030
+ } | {
1031
+ readonly data: string;
1032
+ readonly event: "start";
1033
+ } | {
1034
+ readonly data: string;
1035
+ readonly event: "case";
1036
+ } | {
1037
+ readonly data: string;
1038
+ readonly event: "result";
1030
1039
  }, void, unknown>;
1031
1040
  };
1032
1041
  };
@@ -20,13 +20,9 @@ export { createRAGBunS3SyncClient, createRAGDirectorySyncSource, createRAGEmailS
20
20
  export { createRAGFileJobStateStore } from "./internal/jobState";
21
21
  export { createRAGCollection, ingestDocuments, ingestRAGDocuments, searchDocuments, } from "./retrieval/collection";
22
22
  export { createInMemoryRAGStore } from "./adapters/inMemory";
23
- export { createPostgresRAGStore } from "./adapters/postgres";
24
- export { createSQLiteRAGStore } from "./adapters/sqlite";
25
- export { resolveAbsoluteSQLiteVec, resolveAbsoluteSQLiteVecExtensionPath, } from "./internal/resolveAbsoluteSQLiteVec";
26
23
  export { createRAGVector, normalizeVector, querySimilarity, } from "./adapters/utils";
27
24
  export type { SQLiteRAGSearchTraceStoreOptions } from "./quality/quality";
28
25
  export type { AnthropicOCRConfig, CrossEncoderRerankerConfig, GeminiEmbeddingsConfig, GeminiOCRConfig, GmailEmailSyncConfig, GraphEmailSyncConfig, IMAPEmailSyncConfig, OllamaEmbeddingsConfig, OllamaOCRConfig, OllamaTranscriptionConfig, OpenAICompatibleEmbeddingsConfig, OpenAICompatibleOCRConfig, OpenAICompatibleTranscriptionConfig, OpenAIEmbeddingsConfig, OpenAIOCRConfig, OpenAITranscriptionConfig, } from "../types/providers";
29
- export type { NativeSQLiteRAGStoreOptions, SQLiteRAGStoreOptions, } from "../types/adapters";
30
26
  export type { AIHTMXRenderConfig, RAGAnswerWorkflowState, RAGBackendCapabilities, RAGCitation, RAGCitationReferenceMap, RAGGroundedAnswer, RAGGroundedAnswerPart, RAGGroundingReference, RAGChunkingOptions, RAGChunkingStrategy, RAGDocumentChunk, RAGDocumentChunkPreview, RAGArchiveEntry, RAGArchiveExpander, RAGArchiveExpansionResult, RAGExtractedFileDocument, RAGFileExtractionInput, RAGFileExtractor, RAGPDFOCRExtractorOptions, RAGDocumentFileInput, RAGDirectoryIngestInput, RAGDocumentIngestInput, RAGDocumentUploadIngestInput, RAGDocumentUploadInput, RAGDocumentUrlIngestInput, RAGDocumentUrlInput, RAGEmailSyncAttachment, RAGEmailSyncClient, RAGEmailSyncListInput, RAGEmailSyncListResult, RAGEmailSyncMessage, RAGEmailSyncSourceOptions, RAGLinkedConnectorSyncSourceOptions, RAGConnectorCheckpoint, RAGConnectorItem, RAGConnectorRuntime, RAGConnectorSyncInput, RAGConnectorSyncResult, RAGFeedSyncInput, RAGFeedSyncSourceOptions, RAGGitHubRepoSyncInput, RAGGitHubSyncSourceOptions, RAGSitemapSyncInput, RAGSitemapSyncSourceOptions, RAGSiteDiscoveryInput, RAGSiteDiscoverySyncSourceOptions, RAGStorageSyncClient, RAGStorageSyncFile, RAGStorageSyncListInput, RAGStorageSyncListResult, RAGStorageSyncObject, RAGStorageSyncSourceOptions, RAGEmbeddingFunction, RAGEmbeddingInput, RAGEmbeddingProvider, RAGEmbeddingProviderLike, RAGBackendDescriptor, RAGCollection, RAGCollectionSearchParams, RAGContentFormat, RAGAnswerGroundingEvaluationCase, RAGAnswerGroundingEvaluationCaseResult, RAGAnswerGroundingEvaluationInput, RAGAnswerGroundingEvaluationResponse, RAGAnswerGroundingEvaluationSummary, RAGEvaluationCase, RAGEvaluationCaseResult, RAGEvaluationLeaderboardEntry, RAGEvaluationInput, RAGEvaluationResponse, RAGEvaluationSummary, RAGEvaluationSuite, RAGEvaluationSuiteRun, RAGRetrievalCandidate, RAGRetrievalComparison, RAGRetrievalComparisonEntry, RAGRetrievalComparisonSummary, RAGHTMXConfig, RAGHTMXWorkflowRenderConfig, RAGIngestDocument, RAGIngestResponse, RAGIndexedDocument, RAGHybridFusionMode, RAGHybridRetrievalMode, RAGHybridSearchOptions, RAGMediaTranscriber, RAGMediaTranscriptSegment, RAGMediaTranscriptionResult, RAGMutationResponse, RAGLexicalQueryInput, RAGOCRProvider, RAGOCRResult, RAGQueryInput, RAGQueryResult, RAGQueryTransformInput, RAGQueryTransformProvider, RAGQueryTransformProviderLike, RAGQueryTransformResult, RAGQueryTransformer, RAGPreparedDocument, RAGReranker, RAGRerankerCandidate, RAGRerankerComparison, RAGRerankerComparisonEntry, RAGRerankerComparisonSummary, RAGRerankerInput, RAGRerankerProvider, RAGRerankerProviderLike, RAGSearchRequest, RAGSyncManager, RAGSyncSchedule, RAGSyncScheduler, RAGSyncResponse, RAGSyncRunOptions, RAGSyncStateStore, RAGSyncSourceContext, RAGSyncSourceDefinition, RAGSyncSourceRecord, RAGSyncSourceRunResult, RAGDirectorySyncSourceOptions, RAGUrlSyncSourceOptions, RAGSource, RAGSourceGroup, RAGSourceSummary, RAGSQLiteNativeDiagnostics, RAGStatusResponse, RAGUpsertInput, RAGVectorStore, RAGVectorStoreStatus, SQLiteVecResolution, } from "../types";
31
27
  export type { RAGJobState, RAGJobStateStore, RAGPostgresNativeDiagnostics, RAGRetrievalComparisonCandidateInput, RAGRetrievalComparisonHistoryResponse, RAGRetrievalComparisonHistoryStore, RAGRetrievalComparisonRequest, RAGRetrievalComparisonResponse, RAGRetrievalComparisonRun, RAGSearchTraceGroupHistoryResponse, RAGSearchTraceHistoryResponse, RAGSearchTracePrunePreviewResponse, RAGSearchTracePruneHistoryResponse, RAGSearchTracePruneResponse, RAGSearchTracePruneInput, RAGSearchTracePrunePreview, RAGSearchTracePruneResult, RAGSearchTracePruneHistoryStore, RAGSearchTracePruneRun, RAGSearchTraceRetentionRuntime, RAGSearchTraceRetentionSchedule, RAGSearchTraceStats, RAGSearchTraceStatsResponse, } from "@absolutejs/ai";
32
28
  export type * from "@absolutejs/ai";
@@ -1,6 +1,6 @@
1
1
  import { S3Client } from "bun";
2
2
  import type { CreateRAGSyncManagerOptions, RAGSyncSourceDiagnostics, RAGSyncExtractionRecoveryHandlers, RAGSyncExtractionRecoveryPreview, RAGSyncExtractionRecoveryResult, RAGSyncConflictResolutionPreview, RAGSyncConflictResolutionResult, RAGSyncConflictResolutionStrategy, RAGDirectorySyncSourceOptions, RAGStorageSyncClient, RAGStorageSyncSourceOptions, RAGEmailSyncClient, RAGEmailSyncMessage, RAGEmailSyncSourceOptions, RAGGmailLinkedEmailSyncSourceOptions, RAGFeedSyncSourceOptions, RAGGitHubSyncSourceOptions, RAGSitemapSyncSourceOptions, RAGSiteDiscoverySyncSourceOptions, RAGSyncSchedule, RAGSyncScheduler, RAGSyncStateStore, RAGSyncManager, RAGSyncSourceDefinition, RAGSyncSourceReconciliationSummary, RAGUrlSyncSourceOptions } from "@absolutejs/ai";
3
- import type { RAGLinkedConnectorSyncSourceOptions } from "../../types/sync";
3
+ import type { RAGLinkedConnectorSyncSourceOptions } from "@absolutejs/ai";
4
4
  export declare const previewRAGSyncExtractionRecovery: (input: {
5
5
  diagnostics?: RAGSyncSourceDiagnostics;
6
6
  }) => RAGSyncExtractionRecoveryPreview;
@@ -1275,8 +1275,13 @@ export declare const useRAG: (path: string, options?: UseRAGOptions) => {
1275
1275
  reason?: string | undefined;
1276
1276
  lastSeedMs?: number | undefined;
1277
1277
  status?: {
1278
- backend: "in_memory" | "sqlite" | "postgres";
1279
- vectorMode: "in_memory" | "json_fallback" | "native_vec0" | "native_pgvector";
1278
+ backend: "in_memory";
1279
+ vectorMode: "in_memory";
1280
+ dimensions?: number | undefined;
1281
+ native?: undefined | undefined;
1282
+ } | {
1283
+ backend: "sqlite";
1284
+ vectorMode: "json_fallback" | "native_vec0";
1280
1285
  dimensions?: number | undefined;
1281
1286
  native?: {
1282
1287
  requested: boolean;
@@ -1337,7 +1342,12 @@ export declare const useRAG: (path: string, options?: UseRAGOptions) => {
1337
1342
  candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
1338
1343
  queryMode: "json_fallback" | "native_vec0";
1339
1344
  } | undefined;
1340
- } | {
1345
+ } | undefined;
1346
+ } | {
1347
+ backend: "postgres";
1348
+ vectorMode: "native_pgvector";
1349
+ dimensions?: number | undefined;
1350
+ native?: {
1341
1351
  requested: boolean;
1342
1352
  available: boolean;
1343
1353
  active: boolean;
@@ -1425,8 +1435,13 @@ export declare const useRAG: (path: string, options?: UseRAGOptions) => {
1425
1435
  reason?: string | undefined;
1426
1436
  lastSeedMs?: number | undefined;
1427
1437
  status?: {
1428
- backend: "in_memory" | "sqlite" | "postgres";
1429
- vectorMode: "in_memory" | "json_fallback" | "native_vec0" | "native_pgvector";
1438
+ backend: "in_memory";
1439
+ vectorMode: "in_memory";
1440
+ dimensions?: number | undefined;
1441
+ native?: undefined | undefined;
1442
+ } | {
1443
+ backend: "sqlite";
1444
+ vectorMode: "json_fallback" | "native_vec0";
1430
1445
  dimensions?: number | undefined;
1431
1446
  native?: {
1432
1447
  requested: boolean;
@@ -1487,7 +1502,12 @@ export declare const useRAG: (path: string, options?: UseRAGOptions) => {
1487
1502
  candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
1488
1503
  queryMode: "json_fallback" | "native_vec0";
1489
1504
  } | undefined;
1490
- } | {
1505
+ } | undefined;
1506
+ } | {
1507
+ backend: "postgres";
1508
+ vectorMode: "native_pgvector";
1509
+ dimensions?: number | undefined;
1510
+ native?: {
1491
1511
  requested: boolean;
1492
1512
  available: boolean;
1493
1513
  active: boolean;
@@ -1615,8 +1635,13 @@ export declare const useRAG: (path: string, options?: UseRAGOptions) => {
1615
1635
  }[];
1616
1636
  } | undefined;
1617
1637
  workflowStatus?: {
1618
- backend: "in_memory" | "sqlite" | "postgres";
1619
- vectorMode: "in_memory" | "json_fallback" | "native_vec0" | "native_pgvector";
1638
+ backend: "in_memory";
1639
+ vectorMode: "in_memory";
1640
+ dimensions?: number | undefined;
1641
+ native?: undefined | undefined;
1642
+ } | {
1643
+ backend: "sqlite";
1644
+ vectorMode: "json_fallback" | "native_vec0";
1620
1645
  dimensions?: number | undefined;
1621
1646
  native?: {
1622
1647
  requested: boolean;
@@ -1677,7 +1702,12 @@ export declare const useRAG: (path: string, options?: UseRAGOptions) => {
1677
1702
  candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
1678
1703
  queryMode: "json_fallback" | "native_vec0";
1679
1704
  } | undefined;
1680
- } | {
1705
+ } | undefined;
1706
+ } | {
1707
+ backend: "postgres";
1708
+ vectorMode: "native_pgvector";
1709
+ dimensions?: number | undefined;
1710
+ native?: {
1681
1711
  requested: boolean;
1682
1712
  available: boolean;
1683
1713
  active: boolean;
@@ -1837,8 +1867,13 @@ export declare const useRAG: (path: string, options?: UseRAGOptions) => {
1837
1867
  }[];
1838
1868
  } | undefined;
1839
1869
  workflowStatus?: {
1840
- backend: "in_memory" | "sqlite" | "postgres";
1841
- vectorMode: "in_memory" | "json_fallback" | "native_vec0" | "native_pgvector";
1870
+ backend: "in_memory";
1871
+ vectorMode: "in_memory";
1872
+ dimensions?: number | undefined;
1873
+ native?: undefined | undefined;
1874
+ } | {
1875
+ backend: "sqlite";
1876
+ vectorMode: "json_fallback" | "native_vec0";
1842
1877
  dimensions?: number | undefined;
1843
1878
  native?: {
1844
1879
  requested: boolean;
@@ -1899,7 +1934,12 @@ export declare const useRAG: (path: string, options?: UseRAGOptions) => {
1899
1934
  candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
1900
1935
  queryMode: "json_fallback" | "native_vec0";
1901
1936
  } | undefined;
1902
- } | {
1937
+ } | undefined;
1938
+ } | {
1939
+ backend: "postgres";
1940
+ vectorMode: "native_pgvector";
1941
+ dimensions?: number | undefined;
1942
+ native?: {
1903
1943
  requested: boolean;
1904
1944
  available: boolean;
1905
1945
  active: boolean;
@@ -2065,7 +2105,7 @@ export declare const useRAG: (path: string, options?: UseRAGOptions) => {
2065
2105
  source: {
2066
2106
  id: string;
2067
2107
  label: string;
2068
- kind: "directory" | "url" | "storage" | "email" | "custom";
2108
+ kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
2069
2109
  status: import("@absolutejs/ai").RAGSyncSourceStatus;
2070
2110
  description?: string | undefined;
2071
2111
  target?: string | undefined;
@@ -2138,7 +2178,7 @@ export declare const useRAG: (path: string, options?: UseRAGOptions) => {
2138
2178
  sources: {
2139
2179
  id: string;
2140
2180
  label: string;
2141
- kind: "directory" | "url" | "storage" | "email" | "custom";
2181
+ kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
2142
2182
  status: import("@absolutejs/ai").RAGSyncSourceStatus;
2143
2183
  description?: string | undefined;
2144
2184
  target?: string | undefined;
@@ -2216,7 +2256,7 @@ export declare const useRAG: (path: string, options?: UseRAGOptions) => {
2216
2256
  source: {
2217
2257
  id: string;
2218
2258
  label: string;
2219
- kind: "directory" | "url" | "storage" | "email" | "custom";
2259
+ kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
2220
2260
  status: import("@absolutejs/ai").RAGSyncSourceStatus;
2221
2261
  description?: string | undefined;
2222
2262
  target?: string | undefined;
@@ -2289,7 +2329,7 @@ export declare const useRAG: (path: string, options?: UseRAGOptions) => {
2289
2329
  sources: {
2290
2330
  id: string;
2291
2331
  label: string;
2292
- kind: "directory" | "url" | "storage" | "email" | "custom";
2332
+ kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
2293
2333
  status: import("@absolutejs/ai").RAGSyncSourceStatus;
2294
2334
  description?: string | undefined;
2295
2335
  target?: string | undefined;
@@ -2471,7 +2511,7 @@ export declare const useRAG: (path: string, options?: UseRAGOptions) => {
2471
2511
  syncSources: import("vue").Ref<{
2472
2512
  id: string;
2473
2513
  label: string;
2474
- kind: "directory" | "url" | "storage" | "email" | "custom";
2514
+ kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
2475
2515
  status: import("@absolutejs/ai").RAGSyncSourceStatus;
2476
2516
  description?: string | undefined;
2477
2517
  target?: string | undefined;
@@ -2540,7 +2580,7 @@ export declare const useRAG: (path: string, options?: UseRAGOptions) => {
2540
2580
  }[], import("@absolutejs/ai").RAGSyncSourceRecord[] | {
2541
2581
  id: string;
2542
2582
  label: string;
2543
- kind: "directory" | "url" | "storage" | "email" | "custom";
2583
+ kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
2544
2584
  status: import("@absolutejs/ai").RAGSyncSourceStatus;
2545
2585
  description?: string | undefined;
2546
2586
  target?: string | undefined;
@@ -12,8 +12,13 @@ export declare const useRAGIndexAdmin: (path: string) => {
12
12
  reason?: string | undefined;
13
13
  lastSeedMs?: number | undefined;
14
14
  status?: {
15
- backend: "in_memory" | "sqlite" | "postgres";
16
- vectorMode: "in_memory" | "json_fallback" | "native_vec0" | "native_pgvector";
15
+ backend: "in_memory";
16
+ vectorMode: "in_memory";
17
+ dimensions?: number | undefined;
18
+ native?: undefined | undefined;
19
+ } | {
20
+ backend: "sqlite";
21
+ vectorMode: "json_fallback" | "native_vec0";
17
22
  dimensions?: number | undefined;
18
23
  native?: {
19
24
  requested: boolean;
@@ -74,7 +79,12 @@ export declare const useRAGIndexAdmin: (path: string) => {
74
79
  candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
75
80
  queryMode: "json_fallback" | "native_vec0";
76
81
  } | undefined;
77
- } | {
82
+ } | undefined;
83
+ } | {
84
+ backend: "postgres";
85
+ vectorMode: "native_pgvector";
86
+ dimensions?: number | undefined;
87
+ native?: {
78
88
  requested: boolean;
79
89
  available: boolean;
80
90
  active: boolean;
@@ -162,8 +172,13 @@ export declare const useRAGIndexAdmin: (path: string) => {
162
172
  reason?: string | undefined;
163
173
  lastSeedMs?: number | undefined;
164
174
  status?: {
165
- backend: "in_memory" | "sqlite" | "postgres";
166
- vectorMode: "in_memory" | "json_fallback" | "native_vec0" | "native_pgvector";
175
+ backend: "in_memory";
176
+ vectorMode: "in_memory";
177
+ dimensions?: number | undefined;
178
+ native?: undefined | undefined;
179
+ } | {
180
+ backend: "sqlite";
181
+ vectorMode: "json_fallback" | "native_vec0";
167
182
  dimensions?: number | undefined;
168
183
  native?: {
169
184
  requested: boolean;
@@ -224,7 +239,12 @@ export declare const useRAGIndexAdmin: (path: string) => {
224
239
  candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
225
240
  queryMode: "json_fallback" | "native_vec0";
226
241
  } | undefined;
227
- } | {
242
+ } | undefined;
243
+ } | {
244
+ backend: "postgres";
245
+ vectorMode: "native_pgvector";
246
+ dimensions?: number | undefined;
247
+ native?: {
228
248
  requested: boolean;
229
249
  available: boolean;
230
250
  active: boolean;
@@ -352,8 +372,13 @@ export declare const useRAGIndexAdmin: (path: string) => {
352
372
  }[];
353
373
  } | undefined;
354
374
  workflowStatus?: {
355
- backend: "in_memory" | "sqlite" | "postgres";
356
- vectorMode: "in_memory" | "json_fallback" | "native_vec0" | "native_pgvector";
375
+ backend: "in_memory";
376
+ vectorMode: "in_memory";
377
+ dimensions?: number | undefined;
378
+ native?: undefined | undefined;
379
+ } | {
380
+ backend: "sqlite";
381
+ vectorMode: "json_fallback" | "native_vec0";
357
382
  dimensions?: number | undefined;
358
383
  native?: {
359
384
  requested: boolean;
@@ -414,7 +439,12 @@ export declare const useRAGIndexAdmin: (path: string) => {
414
439
  candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
415
440
  queryMode: "json_fallback" | "native_vec0";
416
441
  } | undefined;
417
- } | {
442
+ } | undefined;
443
+ } | {
444
+ backend: "postgres";
445
+ vectorMode: "native_pgvector";
446
+ dimensions?: number | undefined;
447
+ native?: {
418
448
  requested: boolean;
419
449
  available: boolean;
420
450
  active: boolean;
@@ -574,8 +604,13 @@ export declare const useRAGIndexAdmin: (path: string) => {
574
604
  }[];
575
605
  } | undefined;
576
606
  workflowStatus?: {
577
- backend: "in_memory" | "sqlite" | "postgres";
578
- vectorMode: "in_memory" | "json_fallback" | "native_vec0" | "native_pgvector";
607
+ backend: "in_memory";
608
+ vectorMode: "in_memory";
609
+ dimensions?: number | undefined;
610
+ native?: undefined | undefined;
611
+ } | {
612
+ backend: "sqlite";
613
+ vectorMode: "json_fallback" | "native_vec0";
579
614
  dimensions?: number | undefined;
580
615
  native?: {
581
616
  requested: boolean;
@@ -636,7 +671,12 @@ export declare const useRAGIndexAdmin: (path: string) => {
636
671
  candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad" | undefined;
637
672
  queryMode: "json_fallback" | "native_vec0";
638
673
  } | undefined;
639
- } | {
674
+ } | undefined;
675
+ } | {
676
+ backend: "postgres";
677
+ vectorMode: "native_pgvector";
678
+ dimensions?: number | undefined;
679
+ native?: {
640
680
  requested: boolean;
641
681
  available: boolean;
642
682
  active: boolean;
@@ -802,7 +842,7 @@ export declare const useRAGIndexAdmin: (path: string) => {
802
842
  source: {
803
843
  id: string;
804
844
  label: string;
805
- kind: "directory" | "url" | "storage" | "email" | "custom";
845
+ kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
806
846
  status: import("@absolutejs/ai").RAGSyncSourceStatus;
807
847
  description?: string | undefined;
808
848
  target?: string | undefined;
@@ -875,7 +915,7 @@ export declare const useRAGIndexAdmin: (path: string) => {
875
915
  sources: {
876
916
  id: string;
877
917
  label: string;
878
- kind: "directory" | "url" | "storage" | "email" | "custom";
918
+ kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
879
919
  status: import("@absolutejs/ai").RAGSyncSourceStatus;
880
920
  description?: string | undefined;
881
921
  target?: string | undefined;
@@ -953,7 +993,7 @@ export declare const useRAGIndexAdmin: (path: string) => {
953
993
  source: {
954
994
  id: string;
955
995
  label: string;
956
- kind: "directory" | "url" | "storage" | "email" | "custom";
996
+ kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
957
997
  status: import("@absolutejs/ai").RAGSyncSourceStatus;
958
998
  description?: string | undefined;
959
999
  target?: string | undefined;
@@ -1026,7 +1066,7 @@ export declare const useRAGIndexAdmin: (path: string) => {
1026
1066
  sources: {
1027
1067
  id: string;
1028
1068
  label: string;
1029
- kind: "directory" | "url" | "storage" | "email" | "custom";
1069
+ kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
1030
1070
  status: import("@absolutejs/ai").RAGSyncSourceStatus;
1031
1071
  description?: string | undefined;
1032
1072
  target?: string | undefined;
@@ -80,7 +80,7 @@ export declare const useRAGOps: (path: string, autoLoad?: boolean) => {
80
80
  syncSources: import("vue").Ref<{
81
81
  id: string;
82
82
  label: string;
83
- kind: "directory" | "url" | "storage" | "email" | "custom";
83
+ kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
84
84
  status: import("@absolutejs/ai").RAGSyncSourceStatus;
85
85
  description?: string | undefined;
86
86
  target?: string | undefined;
@@ -149,7 +149,7 @@ export declare const useRAGOps: (path: string, autoLoad?: boolean) => {
149
149
  }[], RAGSyncSourceRecord[] | {
150
150
  id: string;
151
151
  label: string;
152
- kind: "directory" | "url" | "storage" | "email" | "custom";
152
+ kind: "directory" | "url" | "storage" | "email" | "connector" | "custom";
153
153
  status: import("@absolutejs/ai").RAGSyncSourceStatus;
154
154
  description?: string | undefined;
155
155
  target?: string | undefined;
@@ -1,37 +1,4 @@
1
- import type { Database } from "bun:sqlite";
2
1
  export type InMemoryRAGStoreOptions = {
3
2
  dimensions?: number;
4
3
  mockEmbedding?: (text: string) => Promise<number[]>;
5
4
  };
6
- export type PostgresRAGStoreOptions = {
7
- connectionString?: string;
8
- sql?: InstanceType<typeof Bun.SQL>;
9
- dimensions?: number;
10
- mockEmbedding?: (text: string) => Promise<number[]>;
11
- tableName?: string;
12
- schemaName?: string;
13
- distanceMetric?: "cosine" | "l2" | "inner_product";
14
- queryMultiplier?: number;
15
- indexType?: "none" | "hnsw" | "ivfflat";
16
- indexLists?: number;
17
- hnswM?: number;
18
- hnswEfConstruction?: number;
19
- };
20
- export type NativeSQLiteRAGStoreOptions = {
21
- mode: "vec0";
22
- extensionPath?: string;
23
- extensionInitSql?: string | string[];
24
- distanceMetric?: "cosine" | "l2";
25
- tableName?: string;
26
- queryMultiplier?: number;
27
- requireAvailable?: boolean;
28
- resolveFromAbsolutePackages?: boolean;
29
- };
30
- export type SQLiteRAGStoreOptions = {
31
- db?: Database;
32
- path?: string;
33
- dimensions?: number;
34
- mockEmbedding?: (text: string) => Promise<number[]>;
35
- tableName?: string;
36
- native?: NativeSQLiteRAGStoreOptions;
37
- };
@@ -6,4 +6,3 @@ export type * from "./presentation";
6
6
  export type * from "./providers";
7
7
  export type * from "./quality";
8
8
  export type * from "./retrieval";
9
- export type * from "./sync";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/rag",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "Standalone RAG ingestion, sync, retrieval, evaluation, clients, and framework adapters extracted from AbsoluteJS",
5
5
  "license": "BSL-1.1",
6
6
  "type": "module",
@@ -15,6 +15,10 @@
15
15
  "import": "./dist/index.js",
16
16
  "types": "./dist/src/index.d.ts"
17
17
  },
18
+ "./adapter-kit": {
19
+ "import": "./dist/adapter-kit/index.js",
20
+ "types": "./dist/src/adapter-kit/index.d.ts"
21
+ },
18
22
  "./client": {
19
23
  "import": "./dist/client/index.js",
20
24
  "types": "./dist/src/client/index.d.ts"
@@ -49,7 +53,7 @@
49
53
  }
50
54
  },
51
55
  "dependencies": {
52
- "@absolutejs/ai": "0.0.5",
56
+ "@absolutejs/ai": "^0.0.9",
53
57
  "@absolutejs/linked-providers": "0.0.2"
54
58
  },
55
59
  "peerDependencies": {
@@ -74,6 +78,7 @@
74
78
  }
75
79
  },
76
80
  "devDependencies": {
81
+ "@absolutejs/absolute": "^0.19.0-beta.1051",
77
82
  "@angular/core": "^21.0.0",
78
83
  "@types/bun": "1.3.9",
79
84
  "@types/react": "19.2.0",
@@ -93,6 +98,7 @@
93
98
  },
94
99
  "scripts": {
95
100
  "build": "bun run scripts/build.ts",
101
+ "config": "absolute config",
96
102
  "typecheck": "tsc --noEmit --project tsconfig.json",
97
103
  "lint": "eslint . --max-warnings 0",
98
104
  "format": "prettier --write .",
@@ -104,6 +110,9 @@
104
110
  },
105
111
  "typesVersions": {
106
112
  "*": {
113
+ "adapter-kit": [
114
+ "dist/src/adapter-kit/index.d.ts"
115
+ ],
107
116
  "client": [
108
117
  "dist/src/client/index.d.ts"
109
118
  ],
@@ -1,3 +0,0 @@
1
- import type { RAGVectorStore } from "@absolutejs/ai";
2
- import type { PostgresRAGStoreOptions } from "../../types/adapters";
3
- export declare const createPostgresRAGStore: (options?: PostgresRAGStoreOptions) => RAGVectorStore;
@@ -1,3 +0,0 @@
1
- import type { RAGVectorStore } from "@absolutejs/ai";
2
- import type { SQLiteRAGStoreOptions } from "../../types/adapters";
3
- export declare const createSQLiteRAGStore: (options?: SQLiteRAGStoreOptions) => RAGVectorStore;
@@ -1,3 +0,0 @@
1
- import type { SQLiteVecResolution } from "@absolutejs/ai";
2
- export declare const resolveAbsoluteSQLiteVec: () => SQLiteVecResolution;
3
- export declare const resolveAbsoluteSQLiteVecExtensionPath: () => string | null;
@@ -1,23 +0,0 @@
1
- import type { RAGChunkingOptions, RAGChunkingRegistryLike, RAGConnectorRuntime, RAGFileExtractor, RAGFileExtractorRegistryLike, RAGLinkedProviderCredentialResolver, RAGLinkedProviderResolutionPurpose } from "@absolutejs/ai";
2
- export type RAGLinkedConnectorSyncSourceOptions = {
3
- id: string;
4
- label: string;
5
- runtime: RAGConnectorRuntime;
6
- resolver: RAGLinkedProviderCredentialResolver;
7
- ownerRef: string;
8
- bindingId?: string;
9
- externalAccountId?: string;
10
- purpose?: RAGLinkedProviderResolutionPurpose;
11
- requiredScopes?: string[];
12
- minValidityMs?: number;
13
- description?: string;
14
- maxItemsPerRun?: number;
15
- baseMetadata?: Record<string, unknown>;
16
- defaultChunking?: RAGChunkingOptions;
17
- chunkingRegistry?: RAGChunkingRegistryLike;
18
- extractors?: RAGFileExtractor[];
19
- extractorRegistry?: RAGFileExtractorRegistryLike;
20
- metadata?: Record<string, unknown>;
21
- retryAttempts?: number;
22
- retryDelayMs?: number;
23
- };