@absolutejs/rag 0.0.1

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.
Files changed (110) hide show
  1. package/README.md +6 -0
  2. package/dist/ai/client/index.js +12628 -0
  3. package/dist/ai/client/index.js.map +15 -0
  4. package/dist/ai/client/ui.js +11245 -0
  5. package/dist/ai/client/ui.js.map +12 -0
  6. package/dist/ai/rag/index.js +37146 -0
  7. package/dist/ai/rag/index.js.map +38 -0
  8. package/dist/ai/rag/quality.js +11358 -0
  9. package/dist/ai/rag/quality.js.map +12 -0
  10. package/dist/ai/rag/ui.js +11282 -0
  11. package/dist/ai/rag/ui.js.map +12 -0
  12. package/dist/angular/ai/index.js +4383 -0
  13. package/dist/angular/ai/index.js.map +17 -0
  14. package/dist/react/ai/index.js +4942 -0
  15. package/dist/react/ai/index.js.map +31 -0
  16. package/dist/src/ai/client/createRAGAnswerWorkflow.d.ts +32 -0
  17. package/dist/src/ai/client/createRAGStream.d.ts +2 -0
  18. package/dist/src/ai/client/createRAGWorkflow.d.ts +3 -0
  19. package/dist/src/ai/client/index.d.ts +8 -0
  20. package/dist/src/ai/client/ragClient.d.ts +349 -0
  21. package/dist/src/ai/client/ui.d.ts +5 -0
  22. package/dist/src/ai/rag/accessControl.d.ts +2 -0
  23. package/dist/src/ai/rag/adapters/filtering.d.ts +2 -0
  24. package/dist/src/ai/rag/adapters/inMemory.d.ts +8 -0
  25. package/dist/src/ai/rag/adapters/postgres.d.ts +20 -0
  26. package/dist/src/ai/rag/adapters/queryPlanning.d.ts +26 -0
  27. package/dist/src/ai/rag/adapters/sqlite.d.ts +24 -0
  28. package/dist/src/ai/rag/adapters/utils.d.ts +3 -0
  29. package/dist/src/ai/rag/chat.d.ts +1773 -0
  30. package/dist/src/ai/rag/collection.d.ts +15 -0
  31. package/dist/src/ai/rag/constants.d.ts +9 -0
  32. package/dist/src/ai/rag/emailProviders.d.ts +34 -0
  33. package/dist/src/ai/rag/embedding.d.ts +9 -0
  34. package/dist/src/ai/rag/embeddingProviders.d.ts +50 -0
  35. package/dist/src/ai/rag/extractorProviders.d.ts +58 -0
  36. package/dist/src/ai/rag/grounding.d.ts +6 -0
  37. package/dist/src/ai/rag/htmxConfig.d.ts +3 -0
  38. package/dist/src/ai/rag/htmxWorkflowRenderers.d.ts +3 -0
  39. package/dist/src/ai/rag/index.d.ts +30 -0
  40. package/dist/src/ai/rag/ingestion.d.ts +61 -0
  41. package/dist/src/ai/rag/jobState.d.ts +2 -0
  42. package/dist/src/ai/rag/lexical.d.ts +42 -0
  43. package/dist/src/ai/rag/presentation.d.ts +165 -0
  44. package/dist/src/ai/rag/quality.d.ts +607 -0
  45. package/dist/src/ai/rag/queryTransforms.d.ts +17 -0
  46. package/dist/src/ai/rag/reranking.d.ts +17 -0
  47. package/dist/src/ai/rag/resolveAbsoluteSQLiteVec.d.ts +3 -0
  48. package/dist/src/ai/rag/retrievalStrategies.d.ts +6 -0
  49. package/dist/src/ai/rag/sync.d.ts +37 -0
  50. package/dist/src/ai/rag/types.d.ts +11 -0
  51. package/dist/src/ai/rag/ui.d.ts +4 -0
  52. package/dist/src/ai/rag/workflowState.d.ts +1 -0
  53. package/dist/src/angular/ai/ai-rag-stream.service.d.ts +32 -0
  54. package/dist/src/angular/ai/ai-rag-workflow.service.d.ts +33 -0
  55. package/dist/src/angular/ai/index.d.ts +3 -0
  56. package/dist/src/angular/ai/rag-client.service.d.ts +243 -0
  57. package/dist/src/constants.d.ts +60 -0
  58. package/dist/src/react/ai/index.d.ts +18 -0
  59. package/dist/src/react/ai/useRAG.d.ts +341 -0
  60. package/dist/src/react/ai/useRAGChunkPreview.d.ts +20 -0
  61. package/dist/src/react/ai/useRAGCitations.d.ts +9 -0
  62. package/dist/src/react/ai/useRAGDocuments.d.ts +10 -0
  63. package/dist/src/react/ai/useRAGEvaluate.d.ts +28 -0
  64. package/dist/src/react/ai/useRAGGrounding.d.ts +10 -0
  65. package/dist/src/react/ai/useRAGIndexAdmin.d.ts +58 -0
  66. package/dist/src/react/ai/useRAGIngest.d.ts +16 -0
  67. package/dist/src/react/ai/useRAGOps.d.ts +20 -0
  68. package/dist/src/react/ai/useRAGSearch.d.ts +17 -0
  69. package/dist/src/react/ai/useRAGSources.d.ts +13 -0
  70. package/dist/src/react/ai/useRAGStatus.d.ts +10 -0
  71. package/dist/src/react/ai/useRAGStream.d.ts +55 -0
  72. package/dist/src/react/ai/useRAGStreamProgress.d.ts +9 -0
  73. package/dist/src/react/ai/useRAGWorkflow.d.ts +55 -0
  74. package/dist/src/svelte/ai/createRAG.d.ts +292 -0
  75. package/dist/src/svelte/ai/createRAGChunkPreview.d.ts +20 -0
  76. package/dist/src/svelte/ai/createRAGCitations.d.ts +10 -0
  77. package/dist/src/svelte/ai/createRAGDocuments.d.ts +10 -0
  78. package/dist/src/svelte/ai/createRAGEvaluate.d.ts +28 -0
  79. package/dist/src/svelte/ai/createRAGGrounding.d.ts +11 -0
  80. package/dist/src/svelte/ai/createRAGIndexAdmin.d.ts +58 -0
  81. package/dist/src/svelte/ai/createRAGIngest.d.ts +17 -0
  82. package/dist/src/svelte/ai/createRAGOps.d.ts +20 -0
  83. package/dist/src/svelte/ai/createRAGSearch.d.ts +15 -0
  84. package/dist/src/svelte/ai/createRAGSources.d.ts +14 -0
  85. package/dist/src/svelte/ai/createRAGStatus.d.ts +9 -0
  86. package/dist/src/svelte/ai/createRAGStream.d.ts +30 -0
  87. package/dist/src/svelte/ai/createRAGStreamProgress.d.ts +8 -0
  88. package/dist/src/svelte/ai/createRAGWorkflow.d.ts +30 -0
  89. package/dist/src/svelte/ai/index.d.ts +17 -0
  90. package/dist/src/vue/ai/index.d.ts +17 -0
  91. package/dist/src/vue/ai/useRAG.d.ts +2892 -0
  92. package/dist/src/vue/ai/useRAGChunkPreview.d.ts +152 -0
  93. package/dist/src/vue/ai/useRAGCitations.d.ts +10 -0
  94. package/dist/src/vue/ai/useRAGDocuments.d.ts +94 -0
  95. package/dist/src/vue/ai/useRAGEvaluate.d.ts +1002 -0
  96. package/dist/src/vue/ai/useRAGGrounding.d.ts +11 -0
  97. package/dist/src/vue/ai/useRAGIndexAdmin.d.ts +1104 -0
  98. package/dist/src/vue/ai/useRAGIngest.d.ts +27 -0
  99. package/dist/src/vue/ai/useRAGOps.d.ts +220 -0
  100. package/dist/src/vue/ai/useRAGSearch.d.ts +159 -0
  101. package/dist/src/vue/ai/useRAGSources.d.ts +14 -0
  102. package/dist/src/vue/ai/useRAGStatus.d.ts +9 -0
  103. package/dist/src/vue/ai/useRAGStream.d.ts +35 -0
  104. package/dist/src/vue/ai/useRAGStreamProgress.d.ts +8 -0
  105. package/dist/src/vue/ai/useRAGWorkflow.d.ts +35 -0
  106. package/dist/svelte/ai/index.js +4930 -0
  107. package/dist/svelte/ai/index.js.map +29 -0
  108. package/dist/vue/ai/index.js +4905 -0
  109. package/dist/vue/ai/index.js.map +29 -0
  110. package/package.json +81 -0
@@ -0,0 +1,27 @@
1
+ import type { RAGDocumentChunk, RAGDocumentIngestInput, RAGDocumentUploadIngestInput, RAGDocumentUrlIngestInput, RAGIngestResponse } from '@absolutejs/ai';
2
+ export declare const useRAGIngest: (path: string) => {
3
+ clearIndex: () => Promise<{
4
+ ok: boolean;
5
+ }>;
6
+ error: import("vue").Ref<string | null, string | null>;
7
+ ingest: (chunks: RAGDocumentChunk[]) => Promise<RAGIngestResponse>;
8
+ ingestChunks: (chunks: RAGDocumentChunk[]) => Promise<RAGIngestResponse>;
9
+ ingestDocuments: (input: RAGDocumentIngestInput) => Promise<RAGIngestResponse>;
10
+ ingestUploads: (input: RAGDocumentUploadIngestInput) => Promise<RAGIngestResponse>;
11
+ ingestUrls: (input: RAGDocumentUrlIngestInput) => Promise<RAGIngestResponse>;
12
+ isIngesting: import("vue").Ref<boolean, boolean>;
13
+ lastDocumentCount: import("vue").Ref<number | null, number | null>;
14
+ lastIngestCount: import("vue").Ref<number | null, number | null>;
15
+ lastResponse: import("vue").Ref<{
16
+ ok: boolean;
17
+ count?: number | undefined;
18
+ documentCount?: number | undefined;
19
+ error?: string | undefined;
20
+ } | null, RAGIngestResponse | {
21
+ ok: boolean;
22
+ count?: number | undefined;
23
+ documentCount?: number | undefined;
24
+ error?: string | undefined;
25
+ } | null>;
26
+ reset: () => void;
27
+ };
@@ -0,0 +1,220 @@
1
+ import type { RAGAdminActionRecord, RAGAdminJobRecord, RAGAdminCapabilities, RAGBackendCapabilities, RAGBackendMaintenanceSummary, RAGCorpusHealth, RAGDocumentSummary, RAGExtractorReadiness, RAGIngestJobRecord, RAGOperationsResponse, RAGSyncSourceRecord, RAGVectorStoreStatus } from '@absolutejs/ai';
2
+ export declare const useRAGOps: (path: string, autoLoad?: boolean) => {
3
+ admin: import("vue").Ref<RAGAdminCapabilities | undefined, RAGAdminCapabilities | undefined>;
4
+ adminActions: import("vue").Ref<{
5
+ id: string;
6
+ action: "analyze_backend" | "rebuild_native_index" | "clear_index" | "create_document" | "delete_document" | "promote_retrieval_baseline" | "revert_retrieval_baseline" | "prune_search_traces" | "reindex_document" | "reindex_source" | "sync_all_sources" | "sync_source" | "reseed" | "reset";
7
+ status: "completed" | "failed";
8
+ startedAt: number;
9
+ finishedAt?: number | undefined;
10
+ elapsedMs?: number | undefined;
11
+ documentId?: string | undefined;
12
+ target?: string | undefined;
13
+ error?: string | undefined;
14
+ }[], RAGAdminActionRecord[] | {
15
+ id: string;
16
+ action: "analyze_backend" | "rebuild_native_index" | "clear_index" | "create_document" | "delete_document" | "promote_retrieval_baseline" | "revert_retrieval_baseline" | "prune_search_traces" | "reindex_document" | "reindex_source" | "sync_all_sources" | "sync_source" | "reseed" | "reset";
17
+ status: "completed" | "failed";
18
+ startedAt: number;
19
+ finishedAt?: number | undefined;
20
+ elapsedMs?: number | undefined;
21
+ documentId?: string | undefined;
22
+ target?: string | undefined;
23
+ error?: string | undefined;
24
+ }[]>;
25
+ adminJobs: import("vue").Ref<{
26
+ id: string;
27
+ action: "analyze_backend" | "rebuild_native_index" | "clear_index" | "create_document" | "delete_document" | "promote_retrieval_baseline" | "revert_retrieval_baseline" | "prune_search_traces" | "reindex_document" | "reindex_source" | "sync_all_sources" | "sync_source" | "reseed" | "reset";
28
+ status: import("@absolutejs/ai").RAGAdminJobStatus;
29
+ startedAt: number;
30
+ finishedAt?: number | undefined;
31
+ elapsedMs?: number | undefined;
32
+ target?: string | undefined;
33
+ error?: string | undefined;
34
+ }[], RAGAdminJobRecord[] | {
35
+ id: string;
36
+ action: "analyze_backend" | "rebuild_native_index" | "clear_index" | "create_document" | "delete_document" | "promote_retrieval_baseline" | "revert_retrieval_baseline" | "prune_search_traces" | "reindex_document" | "reindex_source" | "sync_all_sources" | "sync_source" | "reseed" | "reset";
37
+ status: import("@absolutejs/ai").RAGAdminJobStatus;
38
+ startedAt: number;
39
+ finishedAt?: number | undefined;
40
+ elapsedMs?: number | undefined;
41
+ target?: string | undefined;
42
+ error?: string | undefined;
43
+ }[]>;
44
+ capabilities: import("vue").Ref<RAGBackendCapabilities | undefined, RAGBackendCapabilities | undefined>;
45
+ documents: import("vue").Ref<RAGDocumentSummary | undefined, RAGDocumentSummary | undefined>;
46
+ error: import("vue").Ref<string | null, string | null>;
47
+ health: import("vue").Ref<RAGCorpusHealth | undefined, RAGCorpusHealth | undefined>;
48
+ ingestJobs: import("vue").Ref<{
49
+ id: string;
50
+ status: import("@absolutejs/ai").RAGIngestJobStatus;
51
+ startedAt: number;
52
+ finishedAt?: number | undefined;
53
+ elapsedMs?: number | undefined;
54
+ inputKind: "chunks" | "documents" | "urls" | "uploads";
55
+ requestedCount: number;
56
+ chunkCount?: number | undefined;
57
+ documentCount?: number | undefined;
58
+ error?: string | undefined;
59
+ extractorNames?: string[] | undefined;
60
+ }[], RAGIngestJobRecord[] | {
61
+ id: string;
62
+ status: import("@absolutejs/ai").RAGIngestJobStatus;
63
+ startedAt: number;
64
+ finishedAt?: number | undefined;
65
+ elapsedMs?: number | undefined;
66
+ inputKind: "chunks" | "documents" | "urls" | "uploads";
67
+ requestedCount: number;
68
+ chunkCount?: number | undefined;
69
+ documentCount?: number | undefined;
70
+ error?: string | undefined;
71
+ extractorNames?: string[] | undefined;
72
+ }[]>;
73
+ isLoading: import("vue").Ref<boolean, boolean>;
74
+ maintenance: import("vue").Ref<RAGBackendMaintenanceSummary | undefined, RAGBackendMaintenanceSummary | undefined>;
75
+ operations: import("vue").Ref<RAGOperationsResponse | undefined, RAGOperationsResponse | undefined>;
76
+ readiness: import("vue").Ref<RAGExtractorReadiness | undefined, RAGExtractorReadiness | undefined>;
77
+ refresh: () => Promise<RAGOperationsResponse>;
78
+ reset: () => void;
79
+ status: import("vue").Ref<RAGVectorStoreStatus | undefined, RAGVectorStoreStatus | undefined>;
80
+ syncSources: import("vue").Ref<{
81
+ id: string;
82
+ label: string;
83
+ kind: "directory" | "url" | "storage" | "email" | "custom";
84
+ status: import("@absolutejs/ai").RAGSyncSourceStatus;
85
+ description?: string | undefined;
86
+ target?: string | undefined;
87
+ lastStartedAt?: number | undefined;
88
+ lastSyncedAt?: number | undefined;
89
+ lastSyncDurationMs?: number | undefined;
90
+ lastError?: string | undefined;
91
+ lastSuccessfulSyncAt?: number | undefined;
92
+ consecutiveFailures?: number | undefined;
93
+ retryAttempts?: number | undefined;
94
+ nextRetryAt?: number | undefined;
95
+ documentCount?: number | undefined;
96
+ chunkCount?: number | undefined;
97
+ reconciliation?: {
98
+ refreshMode: "noop" | "targeted";
99
+ staleDocumentIds: string[];
100
+ staleSyncKeys: string[];
101
+ refreshedDocumentIds: string[];
102
+ refreshedSyncKeys: string[];
103
+ unchangedDocumentIds: string[];
104
+ unchangedSyncKeys: string[];
105
+ targetedRefreshSyncKeys: string[];
106
+ duplicateSyncKeyGroups: {
107
+ syncKey: string;
108
+ count: number;
109
+ documentIds: string[];
110
+ }[];
111
+ lineageConflicts: {
112
+ syncKey: string;
113
+ lineageIds: string[];
114
+ versionIds: string[];
115
+ latestDocumentIds: string[];
116
+ documentIds: string[];
117
+ documents: {
118
+ documentId: string;
119
+ lineageId?: string | undefined;
120
+ versionId?: string | undefined;
121
+ versionNumber?: number | undefined;
122
+ isLatestVersion: boolean;
123
+ }[];
124
+ reasons: Array<"duplicate_sync_key" | "multiple_lineages" | "multiple_versions" | "multiple_latest_versions">;
125
+ }[];
126
+ } | undefined;
127
+ diagnostics?: {
128
+ summary: string;
129
+ entries: {
130
+ code: import("@absolutejs/ai").RAGSyncSourceDiagnosticCode;
131
+ severity: "info" | "warning" | "error";
132
+ summary: string;
133
+ }[];
134
+ extractionFailures?: {
135
+ itemLabel: string;
136
+ itemKind: "directory_file" | "url" | "storage_object" | "email_attachment";
137
+ reason: string;
138
+ remediation: "configure_extractor" | "add_ocr_extractor" | "inspect_file";
139
+ }[] | undefined;
140
+ retryGuidance?: {
141
+ action: "wait_for_retry" | "resume_sync" | "resolve_conflicts" | "rerun_sync" | "inspect_source" | "configure_extractor";
142
+ reason: string;
143
+ nextRetryAt?: number | undefined;
144
+ resumeCursor?: string | undefined;
145
+ syncKeys?: string[] | undefined;
146
+ } | undefined;
147
+ } | undefined;
148
+ metadata?: Record<string, unknown> | undefined;
149
+ }[], RAGSyncSourceRecord[] | {
150
+ id: string;
151
+ label: string;
152
+ kind: "directory" | "url" | "storage" | "email" | "custom";
153
+ status: import("@absolutejs/ai").RAGSyncSourceStatus;
154
+ description?: string | undefined;
155
+ target?: string | undefined;
156
+ lastStartedAt?: number | undefined;
157
+ lastSyncedAt?: number | undefined;
158
+ lastSyncDurationMs?: number | undefined;
159
+ lastError?: string | undefined;
160
+ lastSuccessfulSyncAt?: number | undefined;
161
+ consecutiveFailures?: number | undefined;
162
+ retryAttempts?: number | undefined;
163
+ nextRetryAt?: number | undefined;
164
+ documentCount?: number | undefined;
165
+ chunkCount?: number | undefined;
166
+ reconciliation?: {
167
+ refreshMode: "noop" | "targeted";
168
+ staleDocumentIds: string[];
169
+ staleSyncKeys: string[];
170
+ refreshedDocumentIds: string[];
171
+ refreshedSyncKeys: string[];
172
+ unchangedDocumentIds: string[];
173
+ unchangedSyncKeys: string[];
174
+ targetedRefreshSyncKeys: string[];
175
+ duplicateSyncKeyGroups: {
176
+ syncKey: string;
177
+ count: number;
178
+ documentIds: string[];
179
+ }[];
180
+ lineageConflicts: {
181
+ syncKey: string;
182
+ lineageIds: string[];
183
+ versionIds: string[];
184
+ latestDocumentIds: string[];
185
+ documentIds: string[];
186
+ documents: {
187
+ documentId: string;
188
+ lineageId?: string | undefined;
189
+ versionId?: string | undefined;
190
+ versionNumber?: number | undefined;
191
+ isLatestVersion: boolean;
192
+ }[];
193
+ reasons: Array<"duplicate_sync_key" | "multiple_lineages" | "multiple_versions" | "multiple_latest_versions">;
194
+ }[];
195
+ } | undefined;
196
+ diagnostics?: {
197
+ summary: string;
198
+ entries: {
199
+ code: import("@absolutejs/ai").RAGSyncSourceDiagnosticCode;
200
+ severity: "info" | "warning" | "error";
201
+ summary: string;
202
+ }[];
203
+ extractionFailures?: {
204
+ itemLabel: string;
205
+ itemKind: "directory_file" | "url" | "storage_object" | "email_attachment";
206
+ reason: string;
207
+ remediation: "configure_extractor" | "add_ocr_extractor" | "inspect_file";
208
+ }[] | undefined;
209
+ retryGuidance?: {
210
+ action: "wait_for_retry" | "resume_sync" | "resolve_conflicts" | "rerun_sync" | "inspect_source" | "configure_extractor";
211
+ reason: string;
212
+ nextRetryAt?: number | undefined;
213
+ resumeCursor?: string | undefined;
214
+ syncKeys?: string[] | undefined;
215
+ } | undefined;
216
+ } | undefined;
217
+ metadata?: Record<string, unknown> | undefined;
218
+ }[]>;
219
+ };
220
+ export type UseRAGOpsResult = ReturnType<typeof useRAGOps>;
@@ -0,0 +1,159 @@
1
+ import type { RAGSearchRequest, RAGSource } from '@absolutejs/ai';
2
+ import { type RAGDetailedSearchResponse } from '../../ai/client/ragClient';
3
+ type SearchRequest = Omit<RAGSearchRequest, 'includeTrace'>;
4
+ export declare const useRAGSearch: (path: string) => {
5
+ error: import("vue").Ref<string | null, string | null>;
6
+ hasSearched: import("vue").Ref<boolean, boolean>;
7
+ isSearching: import("vue").Ref<boolean, boolean>;
8
+ lastRequest: import("vue").Ref<{
9
+ filter?: Record<string, unknown> | undefined;
10
+ query: string;
11
+ candidateTopK?: number | undefined;
12
+ retrieval?: import("@absolutejs/ai").RAGHybridRetrievalMode | {
13
+ mode?: import("@absolutejs/ai").RAGHybridRetrievalMode | undefined;
14
+ lexicalTopK?: number | undefined;
15
+ maxResultsPerSource?: number | undefined;
16
+ sourceBalanceStrategy?: import("@absolutejs/ai").RAGSourceBalanceStrategy | undefined;
17
+ diversityStrategy?: import("@absolutejs/ai").RAGDiversityStrategy | undefined;
18
+ mmrLambda?: number | undefined;
19
+ fusion?: import("@absolutejs/ai").RAGHybridFusionMode | undefined;
20
+ fusionConstant?: number | undefined;
21
+ lexicalWeight?: number | undefined;
22
+ vectorWeight?: number | undefined;
23
+ nativeQueryProfile?: import("@absolutejs/ai").RAGNativeQueryProfile | undefined;
24
+ nativeCandidateLimit?: number | undefined;
25
+ nativeMaxBackfills?: number | undefined;
26
+ nativeMinResults?: number | undefined;
27
+ nativeFillPolicy?: "strict_topk" | "satisfy_min_results" | undefined;
28
+ } | undefined;
29
+ model?: string | undefined;
30
+ topK?: number | undefined;
31
+ scoreThreshold?: number | undefined;
32
+ nativeQueryProfile?: import("@absolutejs/ai").RAGNativeQueryProfile | undefined;
33
+ nativeQueryMultiplier?: number | undefined;
34
+ nativeCandidateLimit?: number | undefined;
35
+ nativeMaxBackfills?: number | undefined;
36
+ nativeMinResults?: number | undefined;
37
+ nativeFillPolicy?: "strict_topk" | "satisfy_min_results" | undefined;
38
+ queryTransform?: import("@absolutejs/ai").RAGQueryTransformer | {
39
+ transform: import("@absolutejs/ai").RAGQueryTransformer;
40
+ defaultModel?: string | undefined;
41
+ providerName?: string | undefined;
42
+ } | undefined;
43
+ retrievalStrategy?: import("@absolutejs/ai").RAGRetrievalStrategySelector | {
44
+ select: import("@absolutejs/ai").RAGRetrievalStrategySelector;
45
+ providerName?: string | undefined;
46
+ defaultLabel?: string | undefined;
47
+ } | undefined;
48
+ includeTrace?: boolean | undefined;
49
+ persistTrace?: boolean | undefined;
50
+ traceGroupKey?: string | undefined;
51
+ traceTags?: string[] | undefined;
52
+ } | null, RAGSearchRequest | {
53
+ filter?: Record<string, unknown> | undefined;
54
+ query: string;
55
+ candidateTopK?: number | undefined;
56
+ retrieval?: import("@absolutejs/ai").RAGHybridRetrievalMode | {
57
+ mode?: import("@absolutejs/ai").RAGHybridRetrievalMode | undefined;
58
+ lexicalTopK?: number | undefined;
59
+ maxResultsPerSource?: number | undefined;
60
+ sourceBalanceStrategy?: import("@absolutejs/ai").RAGSourceBalanceStrategy | undefined;
61
+ diversityStrategy?: import("@absolutejs/ai").RAGDiversityStrategy | undefined;
62
+ mmrLambda?: number | undefined;
63
+ fusion?: import("@absolutejs/ai").RAGHybridFusionMode | undefined;
64
+ fusionConstant?: number | undefined;
65
+ lexicalWeight?: number | undefined;
66
+ vectorWeight?: number | undefined;
67
+ nativeQueryProfile?: import("@absolutejs/ai").RAGNativeQueryProfile | undefined;
68
+ nativeCandidateLimit?: number | undefined;
69
+ nativeMaxBackfills?: number | undefined;
70
+ nativeMinResults?: number | undefined;
71
+ nativeFillPolicy?: "strict_topk" | "satisfy_min_results" | undefined;
72
+ } | undefined;
73
+ model?: string | undefined;
74
+ topK?: number | undefined;
75
+ scoreThreshold?: number | undefined;
76
+ nativeQueryProfile?: import("@absolutejs/ai").RAGNativeQueryProfile | undefined;
77
+ nativeQueryMultiplier?: number | undefined;
78
+ nativeCandidateLimit?: number | undefined;
79
+ nativeMaxBackfills?: number | undefined;
80
+ nativeMinResults?: number | undefined;
81
+ nativeFillPolicy?: "strict_topk" | "satisfy_min_results" | undefined;
82
+ queryTransform?: import("@absolutejs/ai").RAGQueryTransformer | {
83
+ transform: import("@absolutejs/ai").RAGQueryTransformer;
84
+ defaultModel?: string | undefined;
85
+ providerName?: string | undefined;
86
+ } | undefined;
87
+ retrievalStrategy?: import("@absolutejs/ai").RAGRetrievalStrategySelector | {
88
+ select: import("@absolutejs/ai").RAGRetrievalStrategySelector;
89
+ providerName?: string | undefined;
90
+ defaultLabel?: string | undefined;
91
+ } | undefined;
92
+ includeTrace?: boolean | undefined;
93
+ persistTrace?: boolean | undefined;
94
+ traceGroupKey?: string | undefined;
95
+ traceTags?: string[] | undefined;
96
+ } | null>;
97
+ reset: () => void;
98
+ results: import("vue").Ref<{
99
+ chunkId: string;
100
+ corpusKey?: string | undefined;
101
+ score: number;
102
+ text: string;
103
+ title?: string | undefined;
104
+ source?: string | undefined;
105
+ metadata?: Record<string, unknown> | undefined;
106
+ labels?: {
107
+ contextLabel?: string | undefined;
108
+ locatorLabel?: string | undefined;
109
+ provenanceLabel?: string | undefined;
110
+ } | undefined;
111
+ structure?: {
112
+ section?: {
113
+ title?: string | undefined;
114
+ path?: string[] | undefined;
115
+ depth?: number | undefined;
116
+ kind?: "markdown_heading" | "html_heading" | "office_heading" | "office_block" | "pdf_block" | "spreadsheet_rows" | "presentation_slide" | undefined;
117
+ } | undefined;
118
+ sequence?: {
119
+ sectionChunkId?: string | undefined;
120
+ sectionChunkIndex?: number | undefined;
121
+ sectionChunkCount?: number | undefined;
122
+ previousChunkId?: string | undefined;
123
+ nextChunkId?: string | undefined;
124
+ } | undefined;
125
+ } | undefined;
126
+ }[], RAGSource[] | {
127
+ chunkId: string;
128
+ corpusKey?: string | undefined;
129
+ score: number;
130
+ text: string;
131
+ title?: string | undefined;
132
+ source?: string | undefined;
133
+ metadata?: Record<string, unknown> | undefined;
134
+ labels?: {
135
+ contextLabel?: string | undefined;
136
+ locatorLabel?: string | undefined;
137
+ provenanceLabel?: string | undefined;
138
+ } | undefined;
139
+ structure?: {
140
+ section?: {
141
+ title?: string | undefined;
142
+ path?: string[] | undefined;
143
+ depth?: number | undefined;
144
+ kind?: "markdown_heading" | "html_heading" | "office_heading" | "office_block" | "pdf_block" | "spreadsheet_rows" | "presentation_slide" | undefined;
145
+ } | undefined;
146
+ sequence?: {
147
+ sectionChunkId?: string | undefined;
148
+ sectionChunkIndex?: number | undefined;
149
+ sectionChunkCount?: number | undefined;
150
+ previousChunkId?: string | undefined;
151
+ nextChunkId?: string | undefined;
152
+ } | undefined;
153
+ } | undefined;
154
+ }[]>;
155
+ search: (input: SearchRequest) => Promise<RAGSource[]>;
156
+ searchWithTrace: (input: SearchRequest) => Promise<RAGDetailedSearchResponse>;
157
+ trace: import("vue").Ref<import("@absolutejs/ai").RAGRetrievalTrace | undefined, import("@absolutejs/ai").RAGRetrievalTrace | undefined>;
158
+ };
159
+ export {};
@@ -0,0 +1,14 @@
1
+ import { type Ref } from 'vue';
2
+ import type { AIMessage } from '@absolutejs/ai';
3
+ export declare const useRAGSources: (messages: Ref<AIMessage[]>) => {
4
+ citationReferenceMap: import("vue").ComputedRef<import("@absolutejs/ai").RAGCitationReferenceMap>;
5
+ chunkGraph: import("vue").ComputedRef<import("@absolutejs/ai").RAGChunkGraph>;
6
+ hasSources: import("vue").ComputedRef<boolean>;
7
+ latestAssistantMessage: import("vue").ComputedRef<AIMessage | undefined>;
8
+ navigationForChunk: (chunkId?: string | null) => import("@absolutejs/ai").RAGChunkGraphNavigation;
9
+ sectionDiagnostics: import("vue").ComputedRef<import("@absolutejs/ai").RAGSectionRetrievalDiagnostic[]>;
10
+ sourceGroups: import("vue").ComputedRef<import("@absolutejs/ai").RAGSourceGroup[]>;
11
+ sources: import("vue").ComputedRef<import("@absolutejs/ai").RAGSource[]>;
12
+ sourceSummaries: import("vue").ComputedRef<import("@absolutejs/ai").RAGSourceSummary[]>;
13
+ };
14
+ export type UseRAGSourcesResult = ReturnType<typeof useRAGSources>;
@@ -0,0 +1,9 @@
1
+ import type { RAGBackendCapabilities, RAGVectorStoreStatus } from '@absolutejs/ai';
2
+ export declare const useRAGStatus: (path: string, autoLoad?: boolean) => {
3
+ capabilities: import("vue").Ref<RAGBackendCapabilities | undefined, RAGBackendCapabilities | undefined>;
4
+ error: import("vue").Ref<string | null, string | null>;
5
+ isLoading: import("vue").Ref<boolean, boolean>;
6
+ refresh: () => Promise<import("@absolutejs/ai").RAGStatusResponse>;
7
+ reset: () => void;
8
+ status: import("vue").Ref<RAGVectorStoreStatus | undefined, RAGVectorStoreStatus | undefined>;
9
+ };
@@ -0,0 +1,35 @@
1
+ import type { AIAttachment } from '@absolutejs/ai';
2
+ export declare const useRAGStream: (path: string, conversationId?: string) => {
3
+ citationReferenceMap: import("vue").ComputedRef<import("@absolutejs/ai").RAGCitationReferenceMap>;
4
+ citations: import("vue").ComputedRef<import("@absolutejs/ai").RAGCitation[]>;
5
+ coverage: import("vue").ComputedRef<"grounded" | "partial" | "ungrounded">;
6
+ groundedAnswer: import("vue").ComputedRef<import("@absolutejs/ai").RAGGroundedAnswer>;
7
+ groundingReferences: import("vue").ComputedRef<import("@absolutejs/ai").RAGGroundingReference[]>;
8
+ hasGrounding: import("vue").ComputedRef<boolean>;
9
+ hasRetrieved: import("vue").ComputedRef<boolean>;
10
+ hasSources: import("vue").ComputedRef<boolean>;
11
+ isAnswerStreaming: import("vue").ComputedRef<boolean>;
12
+ isComplete: import("vue").ComputedRef<boolean>;
13
+ isError: import("vue").ComputedRef<boolean>;
14
+ isRetrieved: import("vue").ComputedRef<boolean>;
15
+ isRetrieving: import("vue").ComputedRef<boolean>;
16
+ isRunning: import("vue").ComputedRef<boolean>;
17
+ latestAssistantMessage: import("vue").ComputedRef<import("@absolutejs/ai").AIMessage | undefined>;
18
+ progress: import("vue").ComputedRef<import("../../ai/rag/presentation").RAGStreamProgress>;
19
+ query: (content: string, attachments?: AIAttachment[]) => void;
20
+ retrieval: import("vue").ComputedRef<import("@absolutejs/ai").RAGRetrievedState | null>;
21
+ sourceGroups: import("vue").ComputedRef<import("@absolutejs/ai").RAGSourceGroup[]>;
22
+ sourceSummaries: import("vue").ComputedRef<import("@absolutejs/ai").RAGSourceSummary[]>;
23
+ sources: import("vue").ComputedRef<import("@absolutejs/ai").RAGSource[]>;
24
+ stage: import("vue").ComputedRef<import("@absolutejs/ai").RAGStreamStage>;
25
+ ungroundedReferenceNumbers: import("vue").ComputedRef<number[]>;
26
+ workflow: import("vue").ComputedRef<import("@absolutejs/ai").RAGAnswerWorkflowState>;
27
+ branch: (messageId: string, content: string) => void;
28
+ cancel: () => void;
29
+ destroy: () => void;
30
+ error: import("vue").Ref<string | null, string | null>;
31
+ isStreaming: import("vue").Ref<boolean, boolean>;
32
+ messages: import("vue").ShallowRef<import("@absolutejs/ai").AIMessage[], import("@absolutejs/ai").AIMessage[]>;
33
+ send: (content: string, attachments?: AIAttachment[]) => void;
34
+ };
35
+ export type UseRAGStreamResult = ReturnType<typeof useRAGStream>;
@@ -0,0 +1,8 @@
1
+ import { type Ref } from 'vue';
2
+ import type { AIMessage } from '@absolutejs/ai';
3
+ export declare const useRAGStreamProgress: (params: {
4
+ error: Ref<string | null>;
5
+ isStreaming: Ref<boolean>;
6
+ messages: Ref<AIMessage[]>;
7
+ }) => import("vue").ComputedRef<import("../../ai/rag/presentation").RAGStreamProgress>;
8
+ export type UseRAGStreamProgressResult = ReturnType<typeof useRAGStreamProgress>;
@@ -0,0 +1,35 @@
1
+ export declare const useRAGWorkflow: (path: string, conversationId?: string) => {
2
+ state: import("vue").ComputedRef<import("@absolutejs/ai").RAGAnswerWorkflowState>;
3
+ citationReferenceMap: import("vue").ComputedRef<import("@absolutejs/ai").RAGCitationReferenceMap>;
4
+ citations: import("vue").ComputedRef<import("@absolutejs/ai").RAGCitation[]>;
5
+ coverage: import("vue").ComputedRef<"grounded" | "partial" | "ungrounded">;
6
+ groundedAnswer: import("vue").ComputedRef<import("@absolutejs/ai").RAGGroundedAnswer>;
7
+ groundingReferences: import("vue").ComputedRef<import("@absolutejs/ai").RAGGroundingReference[]>;
8
+ hasGrounding: import("vue").ComputedRef<boolean>;
9
+ hasRetrieved: import("vue").ComputedRef<boolean>;
10
+ hasSources: import("vue").ComputedRef<boolean>;
11
+ isAnswerStreaming: import("vue").ComputedRef<boolean>;
12
+ isComplete: import("vue").ComputedRef<boolean>;
13
+ isError: import("vue").ComputedRef<boolean>;
14
+ isRetrieved: import("vue").ComputedRef<boolean>;
15
+ isRetrieving: import("vue").ComputedRef<boolean>;
16
+ isRunning: import("vue").ComputedRef<boolean>;
17
+ latestAssistantMessage: import("vue").ComputedRef<import("@absolutejs/ai").AIMessage | undefined>;
18
+ progress: import("vue").ComputedRef<import("../../ai/rag/presentation").RAGStreamProgress>;
19
+ query: (content: string, attachments?: import("@absolutejs/ai").AIAttachment[]) => void;
20
+ retrieval: import("vue").ComputedRef<import("@absolutejs/ai").RAGRetrievedState | null>;
21
+ sourceGroups: import("vue").ComputedRef<import("@absolutejs/ai").RAGSourceGroup[]>;
22
+ sourceSummaries: import("vue").ComputedRef<import("@absolutejs/ai").RAGSourceSummary[]>;
23
+ sources: import("vue").ComputedRef<import("@absolutejs/ai").RAGSource[]>;
24
+ stage: import("vue").ComputedRef<import("@absolutejs/ai").RAGStreamStage>;
25
+ ungroundedReferenceNumbers: import("vue").ComputedRef<number[]>;
26
+ workflow: import("vue").ComputedRef<import("@absolutejs/ai").RAGAnswerWorkflowState>;
27
+ branch: (messageId: string, content: string) => void;
28
+ cancel: () => void;
29
+ destroy: () => void;
30
+ error: import("vue").Ref<string | null, string | null>;
31
+ isStreaming: import("vue").Ref<boolean, boolean>;
32
+ messages: import("vue").ShallowRef<import("@absolutejs/ai").AIMessage[], import("@absolutejs/ai").AIMessage[]>;
33
+ send: (content: string, attachments?: import("@absolutejs/ai").AIAttachment[]) => void;
34
+ };
35
+ export type UseRAGWorkflowResult = ReturnType<typeof useRAGWorkflow>;