@aiquants/enrichment-react 0.1.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.
- package/LICENSE +21 -0
- package/README.md +89 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +342 -0
- package/dist/index.d.ts +342 -0
- package/dist/index.js +1 -0
- package/package.json +82 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import React$1, { ReactNode } from "react";
|
|
2
|
+
import { ConfidentialityLevel, EnrichmentStageKey, SearchMode } from "@aiquants/enrichment-core";
|
|
3
|
+
interface SearchMetadataLike {
|
|
4
|
+
is_degraded: boolean;
|
|
5
|
+
search_mode: string;
|
|
6
|
+
quality_tier: string;
|
|
7
|
+
degradation_reason?: string | null;
|
|
8
|
+
}
|
|
9
|
+
interface DegradedSearchBannerProps {
|
|
10
|
+
metadata: SearchMetadataLike;
|
|
11
|
+
onDismiss?: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare const REASON_LABELS: Readonly<Record<string, string>>;
|
|
14
|
+
declare function DegradedSearchBanner({ metadata, onDismiss }: DegradedSearchBannerProps): React$1.JSX.Element | null;
|
|
15
|
+
interface DocumentIngestLabel {
|
|
16
|
+
labelKey: string;
|
|
17
|
+
category: "user" | "system" | "domain";
|
|
18
|
+
confidenceScore: number;
|
|
19
|
+
}
|
|
20
|
+
interface DocumentIngestPayload {
|
|
21
|
+
fileUri: string;
|
|
22
|
+
confidentialityLevel: ConfidentialityLevel;
|
|
23
|
+
targetDomainKey: string;
|
|
24
|
+
departmentId?: number | null;
|
|
25
|
+
titleOverride?: string | null;
|
|
26
|
+
labels: DocumentIngestLabel[];
|
|
27
|
+
}
|
|
28
|
+
interface FileInspectionResult {
|
|
29
|
+
fileUri: string;
|
|
30
|
+
exists: boolean;
|
|
31
|
+
fileName: string;
|
|
32
|
+
fileSize: number;
|
|
33
|
+
mimeType: string;
|
|
34
|
+
mtime: string | null;
|
|
35
|
+
revisionId: string | null;
|
|
36
|
+
}
|
|
37
|
+
interface RecentIngestItem {
|
|
38
|
+
id: number;
|
|
39
|
+
fileUri: string;
|
|
40
|
+
fileName: string;
|
|
41
|
+
confidentialityLevel: string;
|
|
42
|
+
syncStatus: string;
|
|
43
|
+
revision: number;
|
|
44
|
+
isCurrent?: boolean;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
updatedAt: string;
|
|
47
|
+
errorMessage?: string | null;
|
|
48
|
+
}
|
|
49
|
+
type IngestRowAction = {
|
|
50
|
+
readonly kind: "retry";
|
|
51
|
+
} | {
|
|
52
|
+
readonly kind: "resync";
|
|
53
|
+
} | {
|
|
54
|
+
readonly kind: "blocked";
|
|
55
|
+
readonly reason: string;
|
|
56
|
+
};
|
|
57
|
+
declare function ingestRowAction(item: Pick<RecentIngestItem, "syncStatus" | "isCurrent">): IngestRowAction;
|
|
58
|
+
interface IngestCapabilityPolicy {
|
|
59
|
+
confidentialityLevel: ConfidentialityLevel;
|
|
60
|
+
capability: string;
|
|
61
|
+
isEnabled: boolean;
|
|
62
|
+
}
|
|
63
|
+
interface DocumentIngestConsoleProps {
|
|
64
|
+
tenantId: string;
|
|
65
|
+
policies?: readonly IngestCapabilityPolicy[];
|
|
66
|
+
recentItems?: RecentIngestItem[];
|
|
67
|
+
inspectionResult?: FileInspectionResult | null;
|
|
68
|
+
isSubmitting?: boolean;
|
|
69
|
+
isInspecting?: boolean;
|
|
70
|
+
onInspectUri?: (fileUri: string) => void;
|
|
71
|
+
onIngestDocument?: (payload: DocumentIngestPayload) => void;
|
|
72
|
+
onRetryItem?: (fileId: number) => void;
|
|
73
|
+
}
|
|
74
|
+
declare function DocumentIngestConsole({ policies, tenantId, recentItems, inspectionResult, isSubmitting, isInspecting, onInspectUri, onIngestDocument, onRetryItem }: DocumentIngestConsoleProps): ReactNode;
|
|
75
|
+
type StrategyProvenance = "tenant" | "system";
|
|
76
|
+
interface EnrichmentStrategyRow {
|
|
77
|
+
id: number;
|
|
78
|
+
domainId: number;
|
|
79
|
+
domainKey: string;
|
|
80
|
+
domainLabel: string;
|
|
81
|
+
strategyName: string;
|
|
82
|
+
provenance: StrategyProvenance;
|
|
83
|
+
stages: Readonly<Record<EnrichmentStageKey, boolean>>;
|
|
84
|
+
isActive: boolean;
|
|
85
|
+
}
|
|
86
|
+
interface EnrichmentStrategyBoardProps {
|
|
87
|
+
strategies: readonly EnrichmentStrategyRow[];
|
|
88
|
+
featureFlags: Readonly<Record<string, boolean>>;
|
|
89
|
+
onToggleStage?: (row: EnrichmentStrategyRow, stage: EnrichmentStageKey, enabled: boolean) => void | Promise<void>;
|
|
90
|
+
isUpdating?: boolean;
|
|
91
|
+
}
|
|
92
|
+
type GateState = "open" | "closed" | "unmeasured" | "absent";
|
|
93
|
+
declare function gateStateOf(featureFlagKey: string | null, flags: Readonly<Record<string, boolean>>): GateState;
|
|
94
|
+
declare function EnrichmentStrategyBoard({ strategies, featureFlags, onToggleStage, isUpdating }: EnrichmentStrategyBoardProps): React$1.JSX.Element;
|
|
95
|
+
interface ServiceHealthStatus {
|
|
96
|
+
serviceName: string;
|
|
97
|
+
category: "vector" | "graph" | "cache" | "database" | "api";
|
|
98
|
+
status: "connected" | "error";
|
|
99
|
+
version: string | null;
|
|
100
|
+
endpoint: string;
|
|
101
|
+
latencyMs: number;
|
|
102
|
+
details: Record<string, string | number | boolean | null>;
|
|
103
|
+
errorMessage?: string;
|
|
104
|
+
}
|
|
105
|
+
interface SystemInfrastructureHealth {
|
|
106
|
+
services: {
|
|
107
|
+
qdrant: ServiceHealthStatus;
|
|
108
|
+
neo4j: ServiceHealthStatus;
|
|
109
|
+
redis: ServiceHealthStatus;
|
|
110
|
+
sqlServer: ServiceHealthStatus;
|
|
111
|
+
quantsApi: ServiceHealthStatus;
|
|
112
|
+
};
|
|
113
|
+
allHealthy: boolean;
|
|
114
|
+
checkedAt: string;
|
|
115
|
+
}
|
|
116
|
+
interface InfrastructureHealthMonitorProps {
|
|
117
|
+
health: SystemInfrastructureHealth;
|
|
118
|
+
isRefreshing?: boolean;
|
|
119
|
+
onRefresh?: () => void;
|
|
120
|
+
className?: string;
|
|
121
|
+
}
|
|
122
|
+
declare function InfrastructureHealthMonitor({ health, isRefreshing, onRefresh, className }: InfrastructureHealthMonitorProps): React$1.JSX.Element;
|
|
123
|
+
declare const SEARCH_MODE_LABELS: Record<SearchMode, {
|
|
124
|
+
readonly label: string;
|
|
125
|
+
readonly description: string;
|
|
126
|
+
}>;
|
|
127
|
+
type FusionStrategy = "rrf" | "linear";
|
|
128
|
+
type ConfidentialityLevelFilter = "ALL" | "PUBLIC" | "INTERNAL" | "DEPARTMENT" | "CONFIDENTIAL";
|
|
129
|
+
interface SearchHitScoreBreakdown {
|
|
130
|
+
fused: number;
|
|
131
|
+
vector?: {
|
|
132
|
+
value: number;
|
|
133
|
+
kind: "cosine" | "bm25" | "mixed";
|
|
134
|
+
};
|
|
135
|
+
lexicalRank?: number;
|
|
136
|
+
graphRank?: number;
|
|
137
|
+
}
|
|
138
|
+
interface SearchHitGraphRelation {
|
|
139
|
+
relation: string;
|
|
140
|
+
target_name: string;
|
|
141
|
+
}
|
|
142
|
+
interface MetadataSearchHit {
|
|
143
|
+
id: number;
|
|
144
|
+
file_uri: string;
|
|
145
|
+
file_name: string;
|
|
146
|
+
mime_type: string;
|
|
147
|
+
folder_path: string | null;
|
|
148
|
+
confidentiality_level: string;
|
|
149
|
+
department_id: number | null;
|
|
150
|
+
created_by: string;
|
|
151
|
+
mtime: string;
|
|
152
|
+
ai_summary: string | null;
|
|
153
|
+
tags: string[] | null;
|
|
154
|
+
structured_data: unknown;
|
|
155
|
+
scores?: SearchHitScoreBreakdown;
|
|
156
|
+
graph_relations?: SearchHitGraphRelation[];
|
|
157
|
+
}
|
|
158
|
+
interface MetadataSearchParams {
|
|
159
|
+
q: string;
|
|
160
|
+
mode: SearchMode;
|
|
161
|
+
limit: number;
|
|
162
|
+
threshold?: number;
|
|
163
|
+
fusion?: FusionStrategy;
|
|
164
|
+
rrf_k?: number;
|
|
165
|
+
alpha?: number;
|
|
166
|
+
department_id?: number;
|
|
167
|
+
confidentiality_level?: ConfidentialityLevelFilter;
|
|
168
|
+
mime_type?: string;
|
|
169
|
+
tag?: string;
|
|
170
|
+
}
|
|
171
|
+
interface SearchAuthzScopes {
|
|
172
|
+
rowScopeApplied: boolean;
|
|
173
|
+
columnScopeApplied: boolean;
|
|
174
|
+
}
|
|
175
|
+
interface MetadataSearchResult {
|
|
176
|
+
count: number;
|
|
177
|
+
hits: MetadataSearchHit[];
|
|
178
|
+
authzScopes: SearchAuthzScopes;
|
|
179
|
+
search_metadata: SearchMetadataLike & {
|
|
180
|
+
requested_mode?: SearchMode;
|
|
181
|
+
executed_tiers?: {
|
|
182
|
+
sql: boolean;
|
|
183
|
+
dense: boolean;
|
|
184
|
+
sparse: boolean;
|
|
185
|
+
graph: boolean;
|
|
186
|
+
};
|
|
187
|
+
execution_time_ms?: number;
|
|
188
|
+
circuit_breaker_status?: Record<string, string>;
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
interface MetadataSearchWorkbenchProps {
|
|
192
|
+
tenantId: string;
|
|
193
|
+
onSearch?: (params: MetadataSearchParams) => Promise<MetadataSearchResult>;
|
|
194
|
+
initialParams?: Partial<MetadataSearchParams>;
|
|
195
|
+
initialResult?: MetadataSearchResult | null;
|
|
196
|
+
circuitBreakerStatus?: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN">;
|
|
197
|
+
isLoading?: boolean;
|
|
198
|
+
}
|
|
199
|
+
interface DeveloperSearchPreset {
|
|
200
|
+
id: string;
|
|
201
|
+
title: string;
|
|
202
|
+
description: string;
|
|
203
|
+
params: Partial<MetadataSearchParams>;
|
|
204
|
+
}
|
|
205
|
+
declare const SEARCH_PRESETS: DeveloperSearchPreset[];
|
|
206
|
+
declare function MetadataSearchWorkbench({ tenantId, onSearch, initialParams, initialResult, circuitBreakerStatus, isLoading: externalLoading }: MetadataSearchWorkbenchProps): React.JSX.Element;
|
|
207
|
+
interface OntologyClassItem {
|
|
208
|
+
name: string;
|
|
209
|
+
description: string;
|
|
210
|
+
count?: number;
|
|
211
|
+
}
|
|
212
|
+
interface OntologyPredicateItem {
|
|
213
|
+
name: string;
|
|
214
|
+
description: string;
|
|
215
|
+
direction: string;
|
|
216
|
+
}
|
|
217
|
+
interface OntologyStatusData {
|
|
218
|
+
schemaName: string;
|
|
219
|
+
currentVersion: number | null;
|
|
220
|
+
lifecyclePhase: "EXPAND" | "DUAL_WRITE" | "BACKFILL" | "READ_SWITCH" | "CONTRACT" | null;
|
|
221
|
+
autonomousEvolutionEnabled: boolean;
|
|
222
|
+
promotionThresholds: {
|
|
223
|
+
confidence: number | null;
|
|
224
|
+
cooccurrence: number | null;
|
|
225
|
+
minDistinctUsers: number | null;
|
|
226
|
+
};
|
|
227
|
+
totalConstraints: number | null;
|
|
228
|
+
totalIndexes: number | null;
|
|
229
|
+
searchIndexes: number | null;
|
|
230
|
+
unresolvedCandidatesCount: number | null;
|
|
231
|
+
classes: OntologyClassItem[] | null;
|
|
232
|
+
predicates: OntologyPredicateItem[] | null;
|
|
233
|
+
}
|
|
234
|
+
interface OntologyStatusCardProps {
|
|
235
|
+
tenantId: string;
|
|
236
|
+
ontologyStatus: OntologyStatusData;
|
|
237
|
+
}
|
|
238
|
+
declare function OntologyStatusCard({ tenantId, ontologyStatus }: OntologyStatusCardProps): ReactNode;
|
|
239
|
+
interface QdrantCollectionInfo {
|
|
240
|
+
collection_name: string;
|
|
241
|
+
domain_key: string;
|
|
242
|
+
points_count: number;
|
|
243
|
+
vectors_count: number;
|
|
244
|
+
vectors_config: {
|
|
245
|
+
dense?: {
|
|
246
|
+
size: number;
|
|
247
|
+
distance: string;
|
|
248
|
+
};
|
|
249
|
+
sparse?: {
|
|
250
|
+
modifier?: string;
|
|
251
|
+
};
|
|
252
|
+
image?: {
|
|
253
|
+
size: number;
|
|
254
|
+
distance: string;
|
|
255
|
+
};
|
|
256
|
+
[key: string]: unknown;
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
interface QdrantHealthInfo {
|
|
260
|
+
healthy: boolean;
|
|
261
|
+
latency_ms: number;
|
|
262
|
+
status_text?: string;
|
|
263
|
+
}
|
|
264
|
+
interface QdrantResourceUsage {
|
|
265
|
+
ram_bytes?: number;
|
|
266
|
+
disk_bytes?: number;
|
|
267
|
+
segment_count?: number;
|
|
268
|
+
}
|
|
269
|
+
interface QdrantStorageOverview {
|
|
270
|
+
collections: QdrantCollectionInfo[];
|
|
271
|
+
probe_failure: string | null;
|
|
272
|
+
}
|
|
273
|
+
interface QdrantStorageCardProps {
|
|
274
|
+
collections: QdrantCollectionInfo[];
|
|
275
|
+
probeFailure?: string | null;
|
|
276
|
+
health?: QdrantHealthInfo;
|
|
277
|
+
resources?: QdrantResourceUsage;
|
|
278
|
+
onRefresh?: () => void | Promise<void>;
|
|
279
|
+
isRefreshing?: boolean;
|
|
280
|
+
onSelectCollection?: (collectionName: string) => void;
|
|
281
|
+
selectedCollectionName?: string | null;
|
|
282
|
+
}
|
|
283
|
+
declare function QdrantStorageCard({ collections, probeFailure, health, resources, onRefresh, isRefreshing, onSelectCollection, selectedCollectionName }: QdrantStorageCardProps): React$1.JSX.Element;
|
|
284
|
+
interface StageMetric {
|
|
285
|
+
latency_p50_ms: number;
|
|
286
|
+
latency_p95_ms: number;
|
|
287
|
+
throughput_rps: number;
|
|
288
|
+
success_rate: number;
|
|
289
|
+
}
|
|
290
|
+
interface StageGates {
|
|
291
|
+
featureFlagKey: string | null;
|
|
292
|
+
featureFlag: boolean | null;
|
|
293
|
+
domainsEnabled: number | null;
|
|
294
|
+
domainsTotal: number | null;
|
|
295
|
+
}
|
|
296
|
+
interface PipelineConfig {
|
|
297
|
+
enable_summary_generation?: StageGates;
|
|
298
|
+
enable_structured_extraction?: StageGates;
|
|
299
|
+
enable_vector_indexing?: StageGates;
|
|
300
|
+
enable_graph_indexing?: StageGates;
|
|
301
|
+
enable_asset_extraction?: StageGates;
|
|
302
|
+
}
|
|
303
|
+
type CircuitBreakerState = "CLOSED" | "OPEN" | "HALF_OPEN";
|
|
304
|
+
type NodeOperationalStatus = "active" | "partial" | "degraded" | "disabled" | "unmeasured";
|
|
305
|
+
interface RAGPipelineGraphViewerProps {
|
|
306
|
+
pipelineConfig: PipelineConfig;
|
|
307
|
+
circuitBreakerStatus?: Record<string, CircuitBreakerState>;
|
|
308
|
+
stageMetrics?: Record<string, StageMetric>;
|
|
309
|
+
selectedNodeId?: string | null;
|
|
310
|
+
onNodeSelect?: (nodeId: string | null) => void;
|
|
311
|
+
}
|
|
312
|
+
declare function RAGPipelineGraphViewer({ pipelineConfig, circuitBreakerStatus, stageMetrics, selectedNodeId: controlledSelectedId, onNodeSelect }: RAGPipelineGraphViewerProps): React$1.JSX.Element;
|
|
313
|
+
interface FailedSyncItem {
|
|
314
|
+
id: string | number;
|
|
315
|
+
file_uri: string;
|
|
316
|
+
file_name: string;
|
|
317
|
+
sync_status: string;
|
|
318
|
+
error_message?: string | null;
|
|
319
|
+
failed_at: string | null;
|
|
320
|
+
}
|
|
321
|
+
interface SyncStatusCounts {
|
|
322
|
+
PENDING?: number;
|
|
323
|
+
EXTRACTING?: number;
|
|
324
|
+
ENRICHING?: number;
|
|
325
|
+
PROJECTING?: number;
|
|
326
|
+
SYNCED?: number;
|
|
327
|
+
FAILED_EXTRACT?: number;
|
|
328
|
+
FAILED_ENRICH?: number;
|
|
329
|
+
FAILED_VECTOR?: number;
|
|
330
|
+
FAILED_GRAPH?: number;
|
|
331
|
+
}
|
|
332
|
+
interface SyncStatusMonitorProps {
|
|
333
|
+
counts: SyncStatusCounts;
|
|
334
|
+
totalFiles: number;
|
|
335
|
+
failedItems?: FailedSyncItem[];
|
|
336
|
+
onRetryAll?: () => void | Promise<void>;
|
|
337
|
+
onRetryItem?: (id: string | number, fileUri: string) => void | Promise<void>;
|
|
338
|
+
isRetrying?: boolean;
|
|
339
|
+
onRefresh?: () => void;
|
|
340
|
+
}
|
|
341
|
+
declare function SyncStatusMonitor({ counts, totalFiles, failedItems, onRetryAll, onRetryItem, isRetrying, onRefresh }: SyncStatusMonitorProps): React$1.JSX.Element;
|
|
342
|
+
export { type CircuitBreakerState, type ConfidentialityLevelFilter, DegradedSearchBanner, type DegradedSearchBannerProps, type DeveloperSearchPreset, DocumentIngestConsole, type DocumentIngestConsoleProps, type DocumentIngestLabel, type DocumentIngestPayload, EnrichmentStrategyBoard, type EnrichmentStrategyBoardProps, type EnrichmentStrategyRow, type FailedSyncItem, type FileInspectionResult, type FusionStrategy, InfrastructureHealthMonitor, type InfrastructureHealthMonitorProps, type IngestCapabilityPolicy, type IngestRowAction, type MetadataSearchHit, type MetadataSearchParams, type MetadataSearchResult, MetadataSearchWorkbench, type MetadataSearchWorkbenchProps, type NodeOperationalStatus, type OntologyClassItem, type OntologyPredicateItem, OntologyStatusCard, type OntologyStatusCardProps, type OntologyStatusData, type PipelineConfig, type QdrantCollectionInfo, type QdrantHealthInfo, type QdrantResourceUsage, QdrantStorageCard, type QdrantStorageCardProps, type QdrantStorageOverview, RAGPipelineGraphViewer, type RAGPipelineGraphViewerProps, REASON_LABELS, type RecentIngestItem, SEARCH_MODE_LABELS, SEARCH_PRESETS, type SearchAuthzScopes, type SearchHitGraphRelation, type SearchHitScoreBreakdown, type SearchMetadataLike, type ServiceHealthStatus, type StageGates, type StageMetric, type StrategyProvenance, type SyncStatusCounts, SyncStatusMonitor, type SyncStatusMonitorProps, type SystemInfrastructureHealth, gateStateOf, ingestRowAction };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import React$1, { ReactNode } from "react";
|
|
2
|
+
import { ConfidentialityLevel, EnrichmentStageKey, SearchMode } from "@aiquants/enrichment-core";
|
|
3
|
+
interface SearchMetadataLike {
|
|
4
|
+
is_degraded: boolean;
|
|
5
|
+
search_mode: string;
|
|
6
|
+
quality_tier: string;
|
|
7
|
+
degradation_reason?: string | null;
|
|
8
|
+
}
|
|
9
|
+
interface DegradedSearchBannerProps {
|
|
10
|
+
metadata: SearchMetadataLike;
|
|
11
|
+
onDismiss?: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare const REASON_LABELS: Readonly<Record<string, string>>;
|
|
14
|
+
declare function DegradedSearchBanner({ metadata, onDismiss }: DegradedSearchBannerProps): React$1.JSX.Element | null;
|
|
15
|
+
interface DocumentIngestLabel {
|
|
16
|
+
labelKey: string;
|
|
17
|
+
category: "user" | "system" | "domain";
|
|
18
|
+
confidenceScore: number;
|
|
19
|
+
}
|
|
20
|
+
interface DocumentIngestPayload {
|
|
21
|
+
fileUri: string;
|
|
22
|
+
confidentialityLevel: ConfidentialityLevel;
|
|
23
|
+
targetDomainKey: string;
|
|
24
|
+
departmentId?: number | null;
|
|
25
|
+
titleOverride?: string | null;
|
|
26
|
+
labels: DocumentIngestLabel[];
|
|
27
|
+
}
|
|
28
|
+
interface FileInspectionResult {
|
|
29
|
+
fileUri: string;
|
|
30
|
+
exists: boolean;
|
|
31
|
+
fileName: string;
|
|
32
|
+
fileSize: number;
|
|
33
|
+
mimeType: string;
|
|
34
|
+
mtime: string | null;
|
|
35
|
+
revisionId: string | null;
|
|
36
|
+
}
|
|
37
|
+
interface RecentIngestItem {
|
|
38
|
+
id: number;
|
|
39
|
+
fileUri: string;
|
|
40
|
+
fileName: string;
|
|
41
|
+
confidentialityLevel: string;
|
|
42
|
+
syncStatus: string;
|
|
43
|
+
revision: number;
|
|
44
|
+
isCurrent?: boolean;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
updatedAt: string;
|
|
47
|
+
errorMessage?: string | null;
|
|
48
|
+
}
|
|
49
|
+
type IngestRowAction = {
|
|
50
|
+
readonly kind: "retry";
|
|
51
|
+
} | {
|
|
52
|
+
readonly kind: "resync";
|
|
53
|
+
} | {
|
|
54
|
+
readonly kind: "blocked";
|
|
55
|
+
readonly reason: string;
|
|
56
|
+
};
|
|
57
|
+
declare function ingestRowAction(item: Pick<RecentIngestItem, "syncStatus" | "isCurrent">): IngestRowAction;
|
|
58
|
+
interface IngestCapabilityPolicy {
|
|
59
|
+
confidentialityLevel: ConfidentialityLevel;
|
|
60
|
+
capability: string;
|
|
61
|
+
isEnabled: boolean;
|
|
62
|
+
}
|
|
63
|
+
interface DocumentIngestConsoleProps {
|
|
64
|
+
tenantId: string;
|
|
65
|
+
policies?: readonly IngestCapabilityPolicy[];
|
|
66
|
+
recentItems?: RecentIngestItem[];
|
|
67
|
+
inspectionResult?: FileInspectionResult | null;
|
|
68
|
+
isSubmitting?: boolean;
|
|
69
|
+
isInspecting?: boolean;
|
|
70
|
+
onInspectUri?: (fileUri: string) => void;
|
|
71
|
+
onIngestDocument?: (payload: DocumentIngestPayload) => void;
|
|
72
|
+
onRetryItem?: (fileId: number) => void;
|
|
73
|
+
}
|
|
74
|
+
declare function DocumentIngestConsole({ policies, tenantId, recentItems, inspectionResult, isSubmitting, isInspecting, onInspectUri, onIngestDocument, onRetryItem }: DocumentIngestConsoleProps): ReactNode;
|
|
75
|
+
type StrategyProvenance = "tenant" | "system";
|
|
76
|
+
interface EnrichmentStrategyRow {
|
|
77
|
+
id: number;
|
|
78
|
+
domainId: number;
|
|
79
|
+
domainKey: string;
|
|
80
|
+
domainLabel: string;
|
|
81
|
+
strategyName: string;
|
|
82
|
+
provenance: StrategyProvenance;
|
|
83
|
+
stages: Readonly<Record<EnrichmentStageKey, boolean>>;
|
|
84
|
+
isActive: boolean;
|
|
85
|
+
}
|
|
86
|
+
interface EnrichmentStrategyBoardProps {
|
|
87
|
+
strategies: readonly EnrichmentStrategyRow[];
|
|
88
|
+
featureFlags: Readonly<Record<string, boolean>>;
|
|
89
|
+
onToggleStage?: (row: EnrichmentStrategyRow, stage: EnrichmentStageKey, enabled: boolean) => void | Promise<void>;
|
|
90
|
+
isUpdating?: boolean;
|
|
91
|
+
}
|
|
92
|
+
type GateState = "open" | "closed" | "unmeasured" | "absent";
|
|
93
|
+
declare function gateStateOf(featureFlagKey: string | null, flags: Readonly<Record<string, boolean>>): GateState;
|
|
94
|
+
declare function EnrichmentStrategyBoard({ strategies, featureFlags, onToggleStage, isUpdating }: EnrichmentStrategyBoardProps): React$1.JSX.Element;
|
|
95
|
+
interface ServiceHealthStatus {
|
|
96
|
+
serviceName: string;
|
|
97
|
+
category: "vector" | "graph" | "cache" | "database" | "api";
|
|
98
|
+
status: "connected" | "error";
|
|
99
|
+
version: string | null;
|
|
100
|
+
endpoint: string;
|
|
101
|
+
latencyMs: number;
|
|
102
|
+
details: Record<string, string | number | boolean | null>;
|
|
103
|
+
errorMessage?: string;
|
|
104
|
+
}
|
|
105
|
+
interface SystemInfrastructureHealth {
|
|
106
|
+
services: {
|
|
107
|
+
qdrant: ServiceHealthStatus;
|
|
108
|
+
neo4j: ServiceHealthStatus;
|
|
109
|
+
redis: ServiceHealthStatus;
|
|
110
|
+
sqlServer: ServiceHealthStatus;
|
|
111
|
+
quantsApi: ServiceHealthStatus;
|
|
112
|
+
};
|
|
113
|
+
allHealthy: boolean;
|
|
114
|
+
checkedAt: string;
|
|
115
|
+
}
|
|
116
|
+
interface InfrastructureHealthMonitorProps {
|
|
117
|
+
health: SystemInfrastructureHealth;
|
|
118
|
+
isRefreshing?: boolean;
|
|
119
|
+
onRefresh?: () => void;
|
|
120
|
+
className?: string;
|
|
121
|
+
}
|
|
122
|
+
declare function InfrastructureHealthMonitor({ health, isRefreshing, onRefresh, className }: InfrastructureHealthMonitorProps): React$1.JSX.Element;
|
|
123
|
+
declare const SEARCH_MODE_LABELS: Record<SearchMode, {
|
|
124
|
+
readonly label: string;
|
|
125
|
+
readonly description: string;
|
|
126
|
+
}>;
|
|
127
|
+
type FusionStrategy = "rrf" | "linear";
|
|
128
|
+
type ConfidentialityLevelFilter = "ALL" | "PUBLIC" | "INTERNAL" | "DEPARTMENT" | "CONFIDENTIAL";
|
|
129
|
+
interface SearchHitScoreBreakdown {
|
|
130
|
+
fused: number;
|
|
131
|
+
vector?: {
|
|
132
|
+
value: number;
|
|
133
|
+
kind: "cosine" | "bm25" | "mixed";
|
|
134
|
+
};
|
|
135
|
+
lexicalRank?: number;
|
|
136
|
+
graphRank?: number;
|
|
137
|
+
}
|
|
138
|
+
interface SearchHitGraphRelation {
|
|
139
|
+
relation: string;
|
|
140
|
+
target_name: string;
|
|
141
|
+
}
|
|
142
|
+
interface MetadataSearchHit {
|
|
143
|
+
id: number;
|
|
144
|
+
file_uri: string;
|
|
145
|
+
file_name: string;
|
|
146
|
+
mime_type: string;
|
|
147
|
+
folder_path: string | null;
|
|
148
|
+
confidentiality_level: string;
|
|
149
|
+
department_id: number | null;
|
|
150
|
+
created_by: string;
|
|
151
|
+
mtime: string;
|
|
152
|
+
ai_summary: string | null;
|
|
153
|
+
tags: string[] | null;
|
|
154
|
+
structured_data: unknown;
|
|
155
|
+
scores?: SearchHitScoreBreakdown;
|
|
156
|
+
graph_relations?: SearchHitGraphRelation[];
|
|
157
|
+
}
|
|
158
|
+
interface MetadataSearchParams {
|
|
159
|
+
q: string;
|
|
160
|
+
mode: SearchMode;
|
|
161
|
+
limit: number;
|
|
162
|
+
threshold?: number;
|
|
163
|
+
fusion?: FusionStrategy;
|
|
164
|
+
rrf_k?: number;
|
|
165
|
+
alpha?: number;
|
|
166
|
+
department_id?: number;
|
|
167
|
+
confidentiality_level?: ConfidentialityLevelFilter;
|
|
168
|
+
mime_type?: string;
|
|
169
|
+
tag?: string;
|
|
170
|
+
}
|
|
171
|
+
interface SearchAuthzScopes {
|
|
172
|
+
rowScopeApplied: boolean;
|
|
173
|
+
columnScopeApplied: boolean;
|
|
174
|
+
}
|
|
175
|
+
interface MetadataSearchResult {
|
|
176
|
+
count: number;
|
|
177
|
+
hits: MetadataSearchHit[];
|
|
178
|
+
authzScopes: SearchAuthzScopes;
|
|
179
|
+
search_metadata: SearchMetadataLike & {
|
|
180
|
+
requested_mode?: SearchMode;
|
|
181
|
+
executed_tiers?: {
|
|
182
|
+
sql: boolean;
|
|
183
|
+
dense: boolean;
|
|
184
|
+
sparse: boolean;
|
|
185
|
+
graph: boolean;
|
|
186
|
+
};
|
|
187
|
+
execution_time_ms?: number;
|
|
188
|
+
circuit_breaker_status?: Record<string, string>;
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
interface MetadataSearchWorkbenchProps {
|
|
192
|
+
tenantId: string;
|
|
193
|
+
onSearch?: (params: MetadataSearchParams) => Promise<MetadataSearchResult>;
|
|
194
|
+
initialParams?: Partial<MetadataSearchParams>;
|
|
195
|
+
initialResult?: MetadataSearchResult | null;
|
|
196
|
+
circuitBreakerStatus?: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN">;
|
|
197
|
+
isLoading?: boolean;
|
|
198
|
+
}
|
|
199
|
+
interface DeveloperSearchPreset {
|
|
200
|
+
id: string;
|
|
201
|
+
title: string;
|
|
202
|
+
description: string;
|
|
203
|
+
params: Partial<MetadataSearchParams>;
|
|
204
|
+
}
|
|
205
|
+
declare const SEARCH_PRESETS: DeveloperSearchPreset[];
|
|
206
|
+
declare function MetadataSearchWorkbench({ tenantId, onSearch, initialParams, initialResult, circuitBreakerStatus, isLoading: externalLoading }: MetadataSearchWorkbenchProps): React.JSX.Element;
|
|
207
|
+
interface OntologyClassItem {
|
|
208
|
+
name: string;
|
|
209
|
+
description: string;
|
|
210
|
+
count?: number;
|
|
211
|
+
}
|
|
212
|
+
interface OntologyPredicateItem {
|
|
213
|
+
name: string;
|
|
214
|
+
description: string;
|
|
215
|
+
direction: string;
|
|
216
|
+
}
|
|
217
|
+
interface OntologyStatusData {
|
|
218
|
+
schemaName: string;
|
|
219
|
+
currentVersion: number | null;
|
|
220
|
+
lifecyclePhase: "EXPAND" | "DUAL_WRITE" | "BACKFILL" | "READ_SWITCH" | "CONTRACT" | null;
|
|
221
|
+
autonomousEvolutionEnabled: boolean;
|
|
222
|
+
promotionThresholds: {
|
|
223
|
+
confidence: number | null;
|
|
224
|
+
cooccurrence: number | null;
|
|
225
|
+
minDistinctUsers: number | null;
|
|
226
|
+
};
|
|
227
|
+
totalConstraints: number | null;
|
|
228
|
+
totalIndexes: number | null;
|
|
229
|
+
searchIndexes: number | null;
|
|
230
|
+
unresolvedCandidatesCount: number | null;
|
|
231
|
+
classes: OntologyClassItem[] | null;
|
|
232
|
+
predicates: OntologyPredicateItem[] | null;
|
|
233
|
+
}
|
|
234
|
+
interface OntologyStatusCardProps {
|
|
235
|
+
tenantId: string;
|
|
236
|
+
ontologyStatus: OntologyStatusData;
|
|
237
|
+
}
|
|
238
|
+
declare function OntologyStatusCard({ tenantId, ontologyStatus }: OntologyStatusCardProps): ReactNode;
|
|
239
|
+
interface QdrantCollectionInfo {
|
|
240
|
+
collection_name: string;
|
|
241
|
+
domain_key: string;
|
|
242
|
+
points_count: number;
|
|
243
|
+
vectors_count: number;
|
|
244
|
+
vectors_config: {
|
|
245
|
+
dense?: {
|
|
246
|
+
size: number;
|
|
247
|
+
distance: string;
|
|
248
|
+
};
|
|
249
|
+
sparse?: {
|
|
250
|
+
modifier?: string;
|
|
251
|
+
};
|
|
252
|
+
image?: {
|
|
253
|
+
size: number;
|
|
254
|
+
distance: string;
|
|
255
|
+
};
|
|
256
|
+
[key: string]: unknown;
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
interface QdrantHealthInfo {
|
|
260
|
+
healthy: boolean;
|
|
261
|
+
latency_ms: number;
|
|
262
|
+
status_text?: string;
|
|
263
|
+
}
|
|
264
|
+
interface QdrantResourceUsage {
|
|
265
|
+
ram_bytes?: number;
|
|
266
|
+
disk_bytes?: number;
|
|
267
|
+
segment_count?: number;
|
|
268
|
+
}
|
|
269
|
+
interface QdrantStorageOverview {
|
|
270
|
+
collections: QdrantCollectionInfo[];
|
|
271
|
+
probe_failure: string | null;
|
|
272
|
+
}
|
|
273
|
+
interface QdrantStorageCardProps {
|
|
274
|
+
collections: QdrantCollectionInfo[];
|
|
275
|
+
probeFailure?: string | null;
|
|
276
|
+
health?: QdrantHealthInfo;
|
|
277
|
+
resources?: QdrantResourceUsage;
|
|
278
|
+
onRefresh?: () => void | Promise<void>;
|
|
279
|
+
isRefreshing?: boolean;
|
|
280
|
+
onSelectCollection?: (collectionName: string) => void;
|
|
281
|
+
selectedCollectionName?: string | null;
|
|
282
|
+
}
|
|
283
|
+
declare function QdrantStorageCard({ collections, probeFailure, health, resources, onRefresh, isRefreshing, onSelectCollection, selectedCollectionName }: QdrantStorageCardProps): React$1.JSX.Element;
|
|
284
|
+
interface StageMetric {
|
|
285
|
+
latency_p50_ms: number;
|
|
286
|
+
latency_p95_ms: number;
|
|
287
|
+
throughput_rps: number;
|
|
288
|
+
success_rate: number;
|
|
289
|
+
}
|
|
290
|
+
interface StageGates {
|
|
291
|
+
featureFlagKey: string | null;
|
|
292
|
+
featureFlag: boolean | null;
|
|
293
|
+
domainsEnabled: number | null;
|
|
294
|
+
domainsTotal: number | null;
|
|
295
|
+
}
|
|
296
|
+
interface PipelineConfig {
|
|
297
|
+
enable_summary_generation?: StageGates;
|
|
298
|
+
enable_structured_extraction?: StageGates;
|
|
299
|
+
enable_vector_indexing?: StageGates;
|
|
300
|
+
enable_graph_indexing?: StageGates;
|
|
301
|
+
enable_asset_extraction?: StageGates;
|
|
302
|
+
}
|
|
303
|
+
type CircuitBreakerState = "CLOSED" | "OPEN" | "HALF_OPEN";
|
|
304
|
+
type NodeOperationalStatus = "active" | "partial" | "degraded" | "disabled" | "unmeasured";
|
|
305
|
+
interface RAGPipelineGraphViewerProps {
|
|
306
|
+
pipelineConfig: PipelineConfig;
|
|
307
|
+
circuitBreakerStatus?: Record<string, CircuitBreakerState>;
|
|
308
|
+
stageMetrics?: Record<string, StageMetric>;
|
|
309
|
+
selectedNodeId?: string | null;
|
|
310
|
+
onNodeSelect?: (nodeId: string | null) => void;
|
|
311
|
+
}
|
|
312
|
+
declare function RAGPipelineGraphViewer({ pipelineConfig, circuitBreakerStatus, stageMetrics, selectedNodeId: controlledSelectedId, onNodeSelect }: RAGPipelineGraphViewerProps): React$1.JSX.Element;
|
|
313
|
+
interface FailedSyncItem {
|
|
314
|
+
id: string | number;
|
|
315
|
+
file_uri: string;
|
|
316
|
+
file_name: string;
|
|
317
|
+
sync_status: string;
|
|
318
|
+
error_message?: string | null;
|
|
319
|
+
failed_at: string | null;
|
|
320
|
+
}
|
|
321
|
+
interface SyncStatusCounts {
|
|
322
|
+
PENDING?: number;
|
|
323
|
+
EXTRACTING?: number;
|
|
324
|
+
ENRICHING?: number;
|
|
325
|
+
PROJECTING?: number;
|
|
326
|
+
SYNCED?: number;
|
|
327
|
+
FAILED_EXTRACT?: number;
|
|
328
|
+
FAILED_ENRICH?: number;
|
|
329
|
+
FAILED_VECTOR?: number;
|
|
330
|
+
FAILED_GRAPH?: number;
|
|
331
|
+
}
|
|
332
|
+
interface SyncStatusMonitorProps {
|
|
333
|
+
counts: SyncStatusCounts;
|
|
334
|
+
totalFiles: number;
|
|
335
|
+
failedItems?: FailedSyncItem[];
|
|
336
|
+
onRetryAll?: () => void | Promise<void>;
|
|
337
|
+
onRetryItem?: (id: string | number, fileUri: string) => void | Promise<void>;
|
|
338
|
+
isRetrying?: boolean;
|
|
339
|
+
onRefresh?: () => void;
|
|
340
|
+
}
|
|
341
|
+
declare function SyncStatusMonitor({ counts, totalFiles, failedItems, onRetryAll, onRetryItem, isRetrying, onRefresh }: SyncStatusMonitorProps): React$1.JSX.Element;
|
|
342
|
+
export { type CircuitBreakerState, type ConfidentialityLevelFilter, DegradedSearchBanner, type DegradedSearchBannerProps, type DeveloperSearchPreset, DocumentIngestConsole, type DocumentIngestConsoleProps, type DocumentIngestLabel, type DocumentIngestPayload, EnrichmentStrategyBoard, type EnrichmentStrategyBoardProps, type EnrichmentStrategyRow, type FailedSyncItem, type FileInspectionResult, type FusionStrategy, InfrastructureHealthMonitor, type InfrastructureHealthMonitorProps, type IngestCapabilityPolicy, type IngestRowAction, type MetadataSearchHit, type MetadataSearchParams, type MetadataSearchResult, MetadataSearchWorkbench, type MetadataSearchWorkbenchProps, type NodeOperationalStatus, type OntologyClassItem, type OntologyPredicateItem, OntologyStatusCard, type OntologyStatusCardProps, type OntologyStatusData, type PipelineConfig, type QdrantCollectionInfo, type QdrantHealthInfo, type QdrantResourceUsage, QdrantStorageCard, type QdrantStorageCardProps, type QdrantStorageOverview, RAGPipelineGraphViewer, type RAGPipelineGraphViewerProps, REASON_LABELS, type RecentIngestItem, SEARCH_MODE_LABELS, SEARCH_PRESETS, type SearchAuthzScopes, type SearchHitGraphRelation, type SearchHitScoreBreakdown, type SearchMetadataLike, type ServiceHealthStatus, type StageGates, type StageMetric, type StrategyProvenance, type SyncStatusCounts, SyncStatusMonitor, type SyncStatusMonitorProps, type SystemInfrastructureHealth, gateStateOf, ingestRowAction };
|