@omiron33/omi-neuron-web 0.1.0

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 (55) hide show
  1. package/README.md +55 -0
  2. package/dist/api/index.cjs +943 -0
  3. package/dist/api/index.cjs.map +1 -0
  4. package/dist/api/index.d.cts +140 -0
  5. package/dist/api/index.d.ts +140 -0
  6. package/dist/api/index.js +934 -0
  7. package/dist/api/index.js.map +1 -0
  8. package/dist/chunk-BSOSHBDR.cjs +300 -0
  9. package/dist/chunk-BSOSHBDR.cjs.map +1 -0
  10. package/dist/chunk-COO66N7H.cjs +950 -0
  11. package/dist/chunk-COO66N7H.cjs.map +1 -0
  12. package/dist/chunk-FXKXMSLY.cjs +270 -0
  13. package/dist/chunk-FXKXMSLY.cjs.map +1 -0
  14. package/dist/chunk-PSDVPB7Y.js +289 -0
  15. package/dist/chunk-PSDVPB7Y.js.map +1 -0
  16. package/dist/chunk-RQCGONPN.js +937 -0
  17. package/dist/chunk-RQCGONPN.js.map +1 -0
  18. package/dist/chunk-RTSFO7BW.cjs +592 -0
  19. package/dist/chunk-RTSFO7BW.cjs.map +1 -0
  20. package/dist/chunk-TFLMPBX7.js +262 -0
  21. package/dist/chunk-TFLMPBX7.js.map +1 -0
  22. package/dist/chunk-XNR42GCJ.js +547 -0
  23. package/dist/chunk-XNR42GCJ.js.map +1 -0
  24. package/dist/cli/index.cjs +571 -0
  25. package/dist/cli/index.cjs.map +1 -0
  26. package/dist/cli/index.d.cts +1 -0
  27. package/dist/cli/index.d.ts +1 -0
  28. package/dist/cli/index.js +563 -0
  29. package/dist/cli/index.js.map +1 -0
  30. package/dist/database-B0vplyA4.d.cts +41 -0
  31. package/dist/database-B0vplyA4.d.ts +41 -0
  32. package/dist/edge-BzsYe2Ed.d.cts +269 -0
  33. package/dist/edge-BzsYe2Ed.d.ts +269 -0
  34. package/dist/index.cjs +895 -0
  35. package/dist/index.cjs.map +1 -0
  36. package/dist/index.d.cts +1484 -0
  37. package/dist/index.d.ts +1484 -0
  38. package/dist/index.js +654 -0
  39. package/dist/index.js.map +1 -0
  40. package/dist/migration/index.cjs +32 -0
  41. package/dist/migration/index.cjs.map +1 -0
  42. package/dist/migration/index.d.cts +51 -0
  43. package/dist/migration/index.d.ts +51 -0
  44. package/dist/migration/index.js +3 -0
  45. package/dist/migration/index.js.map +1 -0
  46. package/dist/query-helpers-D8po5Mn-.d.cts +777 -0
  47. package/dist/query-helpers-DvQTA2_Z.d.ts +777 -0
  48. package/dist/visualization/index.cjs +485 -0
  49. package/dist/visualization/index.cjs.map +1 -0
  50. package/dist/visualization/index.d.cts +134 -0
  51. package/dist/visualization/index.d.ts +134 -0
  52. package/dist/visualization/index.js +460 -0
  53. package/dist/visualization/index.js.map +1 -0
  54. package/docker/docker-compose.template.yml +28 -0
  55. package/package.json +116 -0
@@ -0,0 +1,1484 @@
1
+ import { b as NeuronNode, c as NeuronEdge, d as NeuronNodeCreate, R as RelationshipType, E as EdgeEvidence, N as NeuronVisualNode, a as NeuronVisualEdge, e as NeuronNodeUpdate } from './edge-BzsYe2Ed.js';
2
+ export { A as AnalysisStatus, B as BuiltInRelationshipType, k as EdgeSource, I as InferredRelationship, f as NeuronEdgeCreate, g as NeuronEdgeUpdate, i as NeuronNodeBase, j as NeuronNodeBatchCreate, h as NodeTier } from './edge-BzsYe2Ed.js';
3
+ import { A as AnalysisRun, a as NeuronCluster, b as NeuronSettings, T as ClusterMembership, V as ClusteringAlgorithm, N as NeuronConfig, L as ListNodesParams, k as ListNodesResponse, m as GetNodeResponse, C as CreateNodesRequest, l as CreateNodesResponse, U as UpdateNodeRequest, D as DeleteNodeResponse, n as ListEdgesParams, o as ListEdgesResponse, p as CreateEdgesRequest, q as CreateEdgesResponse, r as UpdateEdgeRequest, s as DeleteEdgeResponse, G as GetGraphParams, d as GetGraphResponse, E as ExpandGraphRequest, e as ExpandGraphResponse, F as FindPathRequest, f as FindPathResponse, g as AnalysisRequest, h as AnalysisResponse, t as GetAnalysisJobResponse, u as CancelAnalysisResponse, I as GetSettingsResponse, J as UpdateSettingsRequest, K as UpdateSettingsResponse, M as ResetSettingsResponse, v as SemanticSearchRequest, x as SemanticSearchResponse, z as FindSimilarRequest, H as FindSimilarResponse, X as NeuronVisualCluster, j as GraphFilters, c as NeuronSettingsUpdate, Y as VisualizationSettings, y as SearchResult, w as SemanticSearchOptions, B as FindSimilarOptions } from './query-helpers-DvQTA2_Z.js';
4
+ export { a1 as AnalysisJobStatus, a5 as AnalysisPipelineConfig, a0 as AnalysisRunType, ab as AnalysisSettings, O as ApiErrorResponse, ae as ApiSettings, $ as ClusteringConfig, a4 as ClusteringResult, ah as DEFAULT_ANALYSIS_SETTINGS, ag as DEFAULT_VISUALIZATION_SETTINGS, ad as DatabaseSettings, a9 as DomainConfig, a6 as EmbeddingModel, a3 as EmbeddingResult, Q as HealthCheckResponse, a2 as InferredRelationshipResult, ac as InstanceSettings, af as LoggingSettings, Z as NeuronClusterCreate, _ as NeuronClusterUpdate, a8 as NodeTypeConfig, i as PaginationMeta, P as PaginationParams, a7 as PerformanceMode, aa as RelationshipTypeConfig, R as ResetSettingsRequest, S as SelectOptions, W as WhereClause, am as buildDelete, aj as buildInsert, al as buildSelect, ak as buildUpdate, ai as buildWhereClause } from './query-helpers-DvQTA2_Z.js';
5
+ import { z } from 'zod';
6
+ import { D as Database, a as DatabaseConfig } from './database-B0vplyA4.js';
7
+ export { P as PoolStats } from './database-B0vplyA4.js';
8
+ export { Migration, MigrationRunner, MigrationStatus, migration001, migration002, migration003, migration004, migrations } from './migration/index.js';
9
+ import * as React from 'react';
10
+ import React__default from 'react';
11
+ import 'pg';
12
+
13
+ /**
14
+ * Event Types for omi-neuron-web
15
+ * Defines the event system for extensibility and integration
16
+ */
17
+
18
+ /**
19
+ * All event types in the system
20
+ */
21
+ type NeuronEventType = 'node:created' | 'node:updated' | 'node:deleted' | 'node:batch_created' | 'edge:created' | 'edge:updated' | 'edge:deleted' | 'analysis:started' | 'analysis:progress' | 'analysis:completed' | 'analysis:failed' | 'analysis:cancelled' | 'cluster:created' | 'cluster:updated' | 'cluster:membership_changed' | 'relationship:inferred' | 'relationship:rejected' | 'viz:node_focused' | 'viz:node_selected' | 'viz:node_hovered' | 'viz:path_started' | 'viz:path_completed' | 'viz:filter_applied' | 'viz:camera_changed' | 'settings:updated';
22
+ /**
23
+ * Event source - where the event originated
24
+ */
25
+ type EventSource = 'api' | 'ui' | 'analysis' | 'system';
26
+ /**
27
+ * Base event interface
28
+ */
29
+ interface NeuronEvent<T = unknown> {
30
+ type: NeuronEventType;
31
+ timestamp: Date;
32
+ payload: T;
33
+ source: EventSource;
34
+ }
35
+ interface NodeCreatedEventPayload {
36
+ node: NeuronNode;
37
+ source: 'manual' | 'import' | 'analysis';
38
+ }
39
+ interface NodeUpdatedEventPayload {
40
+ node: NeuronNode;
41
+ previousNode: NeuronNode;
42
+ changedFields: string[];
43
+ }
44
+ interface NodeDeletedEventPayload {
45
+ nodeId: string;
46
+ slug: string;
47
+ edgesRemoved: number;
48
+ }
49
+ interface NodeBatchCreatedEventPayload {
50
+ nodes: NeuronNode[];
51
+ skipped: Array<{
52
+ slug: string;
53
+ reason: string;
54
+ }>;
55
+ source: 'manual' | 'import';
56
+ }
57
+ interface EdgeCreatedEventPayload {
58
+ edge: NeuronEdge;
59
+ source: 'manual' | 'ai_inferred' | 'imported';
60
+ }
61
+ interface EdgeUpdatedEventPayload {
62
+ edge: NeuronEdge;
63
+ previousEdge: NeuronEdge;
64
+ changedFields: string[];
65
+ }
66
+ interface EdgeDeletedEventPayload {
67
+ edgeId: string;
68
+ fromNodeId: string;
69
+ toNodeId: string;
70
+ }
71
+ interface AnalysisStartedEventPayload {
72
+ jobId: string;
73
+ runType: AnalysisRun['runType'];
74
+ nodeCount: number;
75
+ }
76
+ interface AnalysisProgressEventPayload {
77
+ jobId: string;
78
+ progress: number;
79
+ currentStep: string;
80
+ nodesProcessed: number;
81
+ totalNodes: number;
82
+ }
83
+ interface AnalysisCompletedEventPayload {
84
+ job: AnalysisRun;
85
+ }
86
+ interface AnalysisFailedEventPayload {
87
+ jobId: string;
88
+ error: string;
89
+ partialResults?: AnalysisRun['results'];
90
+ }
91
+ interface AnalysisCancelledEventPayload {
92
+ jobId: string;
93
+ reason: string;
94
+ }
95
+ interface ClusterCreatedEventPayload {
96
+ cluster: NeuronCluster;
97
+ nodeIds: string[];
98
+ }
99
+ interface ClusterUpdatedEventPayload {
100
+ cluster: NeuronCluster;
101
+ previousCluster: NeuronCluster;
102
+ }
103
+ interface ClusterMembershipChangedEventPayload {
104
+ clusterId: string;
105
+ addedNodeIds: string[];
106
+ removedNodeIds: string[];
107
+ }
108
+ interface RelationshipInferredEventPayload {
109
+ edge: NeuronEdge;
110
+ confidence: number;
111
+ reasoning: string;
112
+ }
113
+ interface RelationshipRejectedEventPayload {
114
+ fromNodeId: string;
115
+ toNodeId: string;
116
+ confidence: number;
117
+ reason: string;
118
+ }
119
+ interface VizNodeFocusedEventPayload {
120
+ node: NeuronNode;
121
+ previousNode?: NeuronNode;
122
+ source: 'click' | 'search' | 'path' | 'api';
123
+ }
124
+ interface VizNodeSelectedEventPayload {
125
+ node: NeuronNode | null;
126
+ previousNode?: NeuronNode | null;
127
+ }
128
+ interface VizNodeHoveredEventPayload {
129
+ node: NeuronNode | null;
130
+ }
131
+ interface VizPathStartedEventPayload {
132
+ path: NeuronNode[];
133
+ label?: string;
134
+ }
135
+ interface VizPathCompletedEventPayload {
136
+ path: NeuronNode[];
137
+ completed: boolean;
138
+ }
139
+ interface VizFilterAppliedEventPayload {
140
+ filters: {
141
+ domains?: string[];
142
+ nodeTypes?: string[];
143
+ search?: string;
144
+ };
145
+ visibleNodeCount: number;
146
+ }
147
+ interface VizCameraChangedEventPayload {
148
+ position: [number, number, number];
149
+ target: [number, number, number];
150
+ }
151
+ interface SettingsUpdatedEventPayload {
152
+ settings: NeuronSettings;
153
+ previousSettings: NeuronSettings;
154
+ changedSections: string[];
155
+ }
156
+ /**
157
+ * Event handler type
158
+ */
159
+ type EventHandler<T = unknown> = (event: NeuronEvent<T>) => void | Promise<void>;
160
+ /**
161
+ * Event subscription
162
+ */
163
+ interface EventSubscription {
164
+ unsubscribe: () => void;
165
+ }
166
+ /**
167
+ * Event filter options
168
+ */
169
+ interface EventFilterOptions {
170
+ types?: NeuronEventType[];
171
+ sources?: EventSource[];
172
+ }
173
+ /**
174
+ * Event emitter interface
175
+ */
176
+ interface NeuronEventEmitter {
177
+ emit<T>(event: NeuronEvent<T>): void;
178
+ subscribe<T>(type: NeuronEventType, handler: EventHandler<T>): EventSubscription;
179
+ subscribeAll(handler: EventHandler<unknown>): EventSubscription;
180
+ unsubscribeAll(): void;
181
+ }
182
+
183
+ declare const nodeTierSchema: z.ZodEnum<{
184
+ primary: "primary";
185
+ secondary: "secondary";
186
+ tertiary: "tertiary";
187
+ insight: "insight";
188
+ }>;
189
+ declare const nodeCreateSchema: z.ZodPipe<z.ZodObject<{
190
+ slug: z.ZodOptional<z.ZodString>;
191
+ label: z.ZodString;
192
+ nodeType: z.ZodOptional<z.ZodString>;
193
+ domain: z.ZodOptional<z.ZodString>;
194
+ summary: z.ZodOptional<z.ZodString>;
195
+ description: z.ZodOptional<z.ZodString>;
196
+ content: z.ZodOptional<z.ZodString>;
197
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
198
+ tier: z.ZodOptional<z.ZodEnum<{
199
+ primary: "primary";
200
+ secondary: "secondary";
201
+ tertiary: "tertiary";
202
+ insight: "insight";
203
+ }>>;
204
+ }, z.core.$strip>, z.ZodTransform<{
205
+ slug: string;
206
+ label: string;
207
+ nodeType?: string | undefined;
208
+ domain?: string | undefined;
209
+ summary?: string | undefined;
210
+ description?: string | undefined;
211
+ content?: string | undefined;
212
+ metadata?: Record<string, unknown> | undefined;
213
+ tier?: "primary" | "secondary" | "tertiary" | "insight" | undefined;
214
+ }, {
215
+ label: string;
216
+ slug?: string | undefined;
217
+ nodeType?: string | undefined;
218
+ domain?: string | undefined;
219
+ summary?: string | undefined;
220
+ description?: string | undefined;
221
+ content?: string | undefined;
222
+ metadata?: Record<string, unknown> | undefined;
223
+ tier?: "primary" | "secondary" | "tertiary" | "insight" | undefined;
224
+ }>>;
225
+ declare const nodeUpdateSchema: z.ZodObject<{
226
+ label: z.ZodOptional<z.ZodString>;
227
+ summary: z.ZodOptional<z.ZodString>;
228
+ description: z.ZodOptional<z.ZodString>;
229
+ content: z.ZodOptional<z.ZodString>;
230
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
231
+ domain: z.ZodOptional<z.ZodString>;
232
+ tier: z.ZodOptional<z.ZodEnum<{
233
+ primary: "primary";
234
+ secondary: "secondary";
235
+ tertiary: "tertiary";
236
+ insight: "insight";
237
+ }>>;
238
+ positionOverride: z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>>;
239
+ }, z.core.$strip>;
240
+ declare const nodeBatchCreateSchema: z.ZodObject<{
241
+ nodes: z.ZodArray<z.ZodPipe<z.ZodObject<{
242
+ slug: z.ZodOptional<z.ZodString>;
243
+ label: z.ZodString;
244
+ nodeType: z.ZodOptional<z.ZodString>;
245
+ domain: z.ZodOptional<z.ZodString>;
246
+ summary: z.ZodOptional<z.ZodString>;
247
+ description: z.ZodOptional<z.ZodString>;
248
+ content: z.ZodOptional<z.ZodString>;
249
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
250
+ tier: z.ZodOptional<z.ZodEnum<{
251
+ primary: "primary";
252
+ secondary: "secondary";
253
+ tertiary: "tertiary";
254
+ insight: "insight";
255
+ }>>;
256
+ }, z.core.$strip>, z.ZodTransform<{
257
+ slug: string;
258
+ label: string;
259
+ nodeType?: string | undefined;
260
+ domain?: string | undefined;
261
+ summary?: string | undefined;
262
+ description?: string | undefined;
263
+ content?: string | undefined;
264
+ metadata?: Record<string, unknown> | undefined;
265
+ tier?: "primary" | "secondary" | "tertiary" | "insight" | undefined;
266
+ }, {
267
+ label: string;
268
+ slug?: string | undefined;
269
+ nodeType?: string | undefined;
270
+ domain?: string | undefined;
271
+ summary?: string | undefined;
272
+ description?: string | undefined;
273
+ content?: string | undefined;
274
+ metadata?: Record<string, unknown> | undefined;
275
+ tier?: "primary" | "secondary" | "tertiary" | "insight" | undefined;
276
+ }>>>;
277
+ options: z.ZodOptional<z.ZodObject<{
278
+ skipDuplicates: z.ZodOptional<z.ZodBoolean>;
279
+ updateOnConflict: z.ZodOptional<z.ZodBoolean>;
280
+ autoAnalyze: z.ZodOptional<z.ZodBoolean>;
281
+ analysisDepth: z.ZodOptional<z.ZodEnum<{
282
+ embeddings: "embeddings";
283
+ cluster: "cluster";
284
+ full: "full";
285
+ }>>;
286
+ }, z.core.$strip>>;
287
+ }, z.core.$strip>;
288
+ declare const nodeFilterSchema: z.ZodObject<{
289
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
290
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
291
+ nodeType: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
292
+ domain: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
293
+ clusterId: z.ZodOptional<z.ZodString>;
294
+ analysisStatus: z.ZodOptional<z.ZodString>;
295
+ search: z.ZodOptional<z.ZodString>;
296
+ sortBy: z.ZodOptional<z.ZodEnum<{
297
+ createdAt: "createdAt";
298
+ updatedAt: "updatedAt";
299
+ label: "label";
300
+ connectionCount: "connectionCount";
301
+ }>>;
302
+ sortOrder: z.ZodOptional<z.ZodEnum<{
303
+ asc: "asc";
304
+ desc: "desc";
305
+ }>>;
306
+ includeEmbeddings: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
307
+ includeStats: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
308
+ }, z.core.$strip>;
309
+ type NodeCreateInput = z.infer<typeof nodeCreateSchema>;
310
+ type NodeUpdateInput = z.infer<typeof nodeUpdateSchema>;
311
+ type NodeBatchCreateInput = z.infer<typeof nodeBatchCreateSchema>;
312
+ type NodeFilterInput = z.infer<typeof nodeFilterSchema>;
313
+
314
+ declare const edgeEvidenceSchema: z.ZodObject<{
315
+ type: z.ZodEnum<{
316
+ text: "text";
317
+ url: "url";
318
+ citation: "citation";
319
+ ai_inference: "ai_inference";
320
+ }>;
321
+ content: z.ZodString;
322
+ confidence: z.ZodOptional<z.ZodNumber>;
323
+ sourceId: z.ZodOptional<z.ZodString>;
324
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
325
+ }, z.core.$strip>;
326
+ declare const edgeCreateSchema: z.ZodObject<{
327
+ fromNodeId: z.ZodString;
328
+ toNodeId: z.ZodString;
329
+ relationshipType: z.ZodOptional<z.ZodString>;
330
+ strength: z.ZodOptional<z.ZodNumber>;
331
+ confidence: z.ZodOptional<z.ZodNumber>;
332
+ evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
333
+ type: z.ZodEnum<{
334
+ text: "text";
335
+ url: "url";
336
+ citation: "citation";
337
+ ai_inference: "ai_inference";
338
+ }>;
339
+ content: z.ZodString;
340
+ confidence: z.ZodOptional<z.ZodNumber>;
341
+ sourceId: z.ZodOptional<z.ZodString>;
342
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
343
+ }, z.core.$strip>>>;
344
+ label: z.ZodOptional<z.ZodString>;
345
+ description: z.ZodOptional<z.ZodString>;
346
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
347
+ bidirectional: z.ZodOptional<z.ZodBoolean>;
348
+ }, z.core.$strip>;
349
+ declare const edgeUpdateSchema: z.ZodObject<{
350
+ strength: z.ZodOptional<z.ZodNumber>;
351
+ confidence: z.ZodOptional<z.ZodNumber>;
352
+ relationshipType: z.ZodOptional<z.ZodString>;
353
+ label: z.ZodOptional<z.ZodString>;
354
+ description: z.ZodOptional<z.ZodString>;
355
+ evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
356
+ type: z.ZodEnum<{
357
+ text: "text";
358
+ url: "url";
359
+ citation: "citation";
360
+ ai_inference: "ai_inference";
361
+ }>;
362
+ content: z.ZodString;
363
+ confidence: z.ZodOptional<z.ZodNumber>;
364
+ sourceId: z.ZodOptional<z.ZodString>;
365
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
366
+ }, z.core.$strip>>>;
367
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
368
+ }, z.core.$strip>;
369
+ declare const edgeFilterSchema: z.ZodObject<{
370
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
371
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
372
+ fromNodeId: z.ZodOptional<z.ZodString>;
373
+ toNodeId: z.ZodOptional<z.ZodString>;
374
+ nodeId: z.ZodOptional<z.ZodString>;
375
+ relationshipType: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
376
+ source: z.ZodOptional<z.ZodEnum<{
377
+ manual: "manual";
378
+ ai_inferred: "ai_inferred";
379
+ imported: "imported";
380
+ }>>;
381
+ minStrength: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
382
+ minConfidence: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
383
+ }, z.core.$strip>;
384
+ type EdgeEvidenceInput = z.infer<typeof edgeEvidenceSchema>;
385
+ type EdgeCreateInput = z.infer<typeof edgeCreateSchema>;
386
+ type EdgeUpdateInput = z.infer<typeof edgeUpdateSchema>;
387
+ type EdgeFilterInput = z.infer<typeof edgeFilterSchema>;
388
+
389
+ declare const clusteringConfigSchema: z.ZodObject<{
390
+ algorithm: z.ZodEnum<{
391
+ kmeans: "kmeans";
392
+ dbscan: "dbscan";
393
+ hierarchical: "hierarchical";
394
+ }>;
395
+ clusterCount: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
396
+ minClusterSize: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
397
+ similarityThreshold: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
398
+ epsilon: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
399
+ minSamples: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
400
+ }, z.core.$strip>;
401
+ declare const clusterCreateSchema: z.ZodObject<{
402
+ label: z.ZodString;
403
+ clusterType: z.ZodOptional<z.ZodString>;
404
+ centroid: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
405
+ memberCount: z.ZodOptional<z.ZodNumber>;
406
+ avgSimilarity: z.ZodOptional<z.ZodNumber>;
407
+ cohesion: z.ZodOptional<z.ZodNumber>;
408
+ description: z.ZodOptional<z.ZodString>;
409
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
410
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
411
+ }, z.core.$strip>;
412
+ declare const clusterUpdateSchema: z.ZodObject<{
413
+ label: z.ZodOptional<z.ZodString>;
414
+ clusterType: z.ZodOptional<z.ZodOptional<z.ZodString>>;
415
+ centroid: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodNumber>>>;
416
+ memberCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
417
+ avgSimilarity: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
418
+ cohesion: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
419
+ description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
420
+ keywords: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
421
+ metadata: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
422
+ }, z.core.$strip>;
423
+ type ClusteringConfigInput = z.infer<typeof clusteringConfigSchema>;
424
+ type ClusterCreateInput = z.infer<typeof clusterCreateSchema>;
425
+ type ClusterUpdateInput = z.infer<typeof clusterUpdateSchema>;
426
+
427
+ declare const analysisOptionsSchema: z.ZodObject<{
428
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
429
+ forceRecompute: z.ZodOptional<z.ZodBoolean>;
430
+ skipEmbeddings: z.ZodOptional<z.ZodBoolean>;
431
+ embeddingModel: z.ZodOptional<z.ZodString>;
432
+ skipClustering: z.ZodOptional<z.ZodBoolean>;
433
+ clusterCount: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
434
+ clusteringAlgorithm: z.ZodOptional<z.ZodEnum<{
435
+ kmeans: "kmeans";
436
+ dbscan: "dbscan";
437
+ hierarchical: "hierarchical";
438
+ }>>;
439
+ skipRelationships: z.ZodOptional<z.ZodBoolean>;
440
+ relationshipThreshold: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
441
+ maxRelationshipsPerNode: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
442
+ }, z.core.$strip>;
443
+ declare const analysisRequestSchema: z.ZodObject<{
444
+ action: z.ZodEnum<{
445
+ embeddings: "embeddings";
446
+ cluster: "cluster";
447
+ full: "full";
448
+ infer_relationships: "infer_relationships";
449
+ }>;
450
+ options: z.ZodOptional<z.ZodObject<{
451
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
452
+ forceRecompute: z.ZodOptional<z.ZodBoolean>;
453
+ skipEmbeddings: z.ZodOptional<z.ZodBoolean>;
454
+ embeddingModel: z.ZodOptional<z.ZodString>;
455
+ skipClustering: z.ZodOptional<z.ZodBoolean>;
456
+ clusterCount: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
457
+ clusteringAlgorithm: z.ZodOptional<z.ZodEnum<{
458
+ kmeans: "kmeans";
459
+ dbscan: "dbscan";
460
+ hierarchical: "hierarchical";
461
+ }>>;
462
+ skipRelationships: z.ZodOptional<z.ZodBoolean>;
463
+ relationshipThreshold: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
464
+ maxRelationshipsPerNode: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
465
+ }, z.core.$strip>>;
466
+ }, z.core.$strip>;
467
+ type AnalysisOptionsInput = z.infer<typeof analysisOptionsSchema>;
468
+ type AnalysisRequestInput = z.infer<typeof analysisRequestSchema>;
469
+
470
+ declare const nodeTypeConfigSchema: z.ZodObject<{
471
+ type: z.ZodString;
472
+ label: z.ZodString;
473
+ description: z.ZodOptional<z.ZodString>;
474
+ defaultDomain: z.ZodString;
475
+ icon: z.ZodOptional<z.ZodString>;
476
+ color: z.ZodOptional<z.ZodString>;
477
+ analysisPrompt: z.ZodOptional<z.ZodString>;
478
+ }, z.core.$strip>;
479
+ declare const domainConfigSchema: z.ZodObject<{
480
+ key: z.ZodString;
481
+ label: z.ZodString;
482
+ color: z.ZodString;
483
+ description: z.ZodOptional<z.ZodString>;
484
+ }, z.core.$strip>;
485
+ declare const relationshipTypeConfigSchema: z.ZodObject<{
486
+ type: z.ZodString;
487
+ label: z.ZodString;
488
+ description: z.ZodOptional<z.ZodString>;
489
+ bidirectional: z.ZodBoolean;
490
+ color: z.ZodOptional<z.ZodString>;
491
+ }, z.core.$strip>;
492
+ declare const visualizationSettingsSchema: z.ZodObject<{
493
+ domainColors: z.ZodRecord<z.ZodString, z.ZodString>;
494
+ defaultDomainColor: z.ZodString;
495
+ edgeColor: z.ZodString;
496
+ edgeActiveColor: z.ZodString;
497
+ backgroundColor: z.ZodString;
498
+ defaultCameraPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
499
+ defaultCameraTarget: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
500
+ minZoomDistance: z.ZodNumber;
501
+ maxZoomDistance: z.ZodNumber;
502
+ enableStarfield: z.ZodBoolean;
503
+ starfieldCount: z.ZodNumber;
504
+ labelDistance: z.ZodNumber;
505
+ maxVisibleLabels: z.ZodNumber;
506
+ performanceMode: z.ZodEnum<{
507
+ auto: "auto";
508
+ normal: "normal";
509
+ degraded: "degraded";
510
+ fallback: "fallback";
511
+ }>;
512
+ nodeCountThreshold: z.ZodNumber;
513
+ pixelRatioCap: z.ZodNumber;
514
+ enableAnimations: z.ZodBoolean;
515
+ focusTweenDuration: z.ZodNumber;
516
+ filterTransitionDuration: z.ZodNumber;
517
+ enableHover: z.ZodBoolean;
518
+ enableClick: z.ZodBoolean;
519
+ enableDoubleClick: z.ZodBoolean;
520
+ enablePan: z.ZodBoolean;
521
+ enableZoom: z.ZodBoolean;
522
+ enableRotate: z.ZodBoolean;
523
+ }, z.core.$strip>;
524
+ declare const analysisSettingsSchema: z.ZodObject<{
525
+ embeddingModel: z.ZodEnum<{
526
+ "text-embedding-ada-002": "text-embedding-ada-002";
527
+ "text-embedding-3-small": "text-embedding-3-small";
528
+ "text-embedding-3-large": "text-embedding-3-large";
529
+ }>;
530
+ embeddingDimensions: z.ZodNumber;
531
+ embeddingBatchSize: z.ZodNumber;
532
+ embeddingCacheTTL: z.ZodNumber;
533
+ clusteringAlgorithm: z.ZodEnum<{
534
+ kmeans: "kmeans";
535
+ dbscan: "dbscan";
536
+ hierarchical: "hierarchical";
537
+ }>;
538
+ defaultClusterCount: z.ZodNumber;
539
+ minClusterSize: z.ZodNumber;
540
+ clusterSimilarityThreshold: z.ZodNumber;
541
+ relationshipInferenceModel: z.ZodString;
542
+ relationshipMinConfidence: z.ZodNumber;
543
+ relationshipMaxPerNode: z.ZodNumber;
544
+ openaiRateLimit: z.ZodNumber;
545
+ maxConcurrentAnalysis: z.ZodNumber;
546
+ }, z.core.$strip>;
547
+ declare const databaseSettingsSchema: z.ZodObject<{
548
+ mode: z.ZodEnum<{
549
+ docker: "docker";
550
+ external: "external";
551
+ }>;
552
+ port: z.ZodNumber;
553
+ containerName: z.ZodOptional<z.ZodString>;
554
+ image: z.ZodOptional<z.ZodString>;
555
+ user: z.ZodOptional<z.ZodString>;
556
+ password: z.ZodOptional<z.ZodString>;
557
+ database: z.ZodOptional<z.ZodString>;
558
+ url: z.ZodOptional<z.ZodString>;
559
+ pool: z.ZodOptional<z.ZodObject<{
560
+ min: z.ZodNumber;
561
+ max: z.ZodNumber;
562
+ idleTimeoutMs: z.ZodNumber;
563
+ connectionTimeoutMs: z.ZodNumber;
564
+ }, z.core.$strip>>;
565
+ resources: z.ZodOptional<z.ZodObject<{
566
+ memoryLimit: z.ZodString;
567
+ cpuLimit: z.ZodOptional<z.ZodString>;
568
+ }, z.core.$strip>>;
569
+ }, z.core.$strip>;
570
+ declare const neuronSettingsSchema: z.ZodObject<{
571
+ instance: z.ZodObject<{
572
+ name: z.ZodString;
573
+ version: z.ZodString;
574
+ repoName: z.ZodString;
575
+ }, z.core.$strip>;
576
+ visualization: z.ZodObject<{
577
+ domainColors: z.ZodRecord<z.ZodString, z.ZodString>;
578
+ defaultDomainColor: z.ZodString;
579
+ edgeColor: z.ZodString;
580
+ edgeActiveColor: z.ZodString;
581
+ backgroundColor: z.ZodString;
582
+ defaultCameraPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
583
+ defaultCameraTarget: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
584
+ minZoomDistance: z.ZodNumber;
585
+ maxZoomDistance: z.ZodNumber;
586
+ enableStarfield: z.ZodBoolean;
587
+ starfieldCount: z.ZodNumber;
588
+ labelDistance: z.ZodNumber;
589
+ maxVisibleLabels: z.ZodNumber;
590
+ performanceMode: z.ZodEnum<{
591
+ auto: "auto";
592
+ normal: "normal";
593
+ degraded: "degraded";
594
+ fallback: "fallback";
595
+ }>;
596
+ nodeCountThreshold: z.ZodNumber;
597
+ pixelRatioCap: z.ZodNumber;
598
+ enableAnimations: z.ZodBoolean;
599
+ focusTweenDuration: z.ZodNumber;
600
+ filterTransitionDuration: z.ZodNumber;
601
+ enableHover: z.ZodBoolean;
602
+ enableClick: z.ZodBoolean;
603
+ enableDoubleClick: z.ZodBoolean;
604
+ enablePan: z.ZodBoolean;
605
+ enableZoom: z.ZodBoolean;
606
+ enableRotate: z.ZodBoolean;
607
+ }, z.core.$strip>;
608
+ analysis: z.ZodObject<{
609
+ embeddingModel: z.ZodEnum<{
610
+ "text-embedding-ada-002": "text-embedding-ada-002";
611
+ "text-embedding-3-small": "text-embedding-3-small";
612
+ "text-embedding-3-large": "text-embedding-3-large";
613
+ }>;
614
+ embeddingDimensions: z.ZodNumber;
615
+ embeddingBatchSize: z.ZodNumber;
616
+ embeddingCacheTTL: z.ZodNumber;
617
+ clusteringAlgorithm: z.ZodEnum<{
618
+ kmeans: "kmeans";
619
+ dbscan: "dbscan";
620
+ hierarchical: "hierarchical";
621
+ }>;
622
+ defaultClusterCount: z.ZodNumber;
623
+ minClusterSize: z.ZodNumber;
624
+ clusterSimilarityThreshold: z.ZodNumber;
625
+ relationshipInferenceModel: z.ZodString;
626
+ relationshipMinConfidence: z.ZodNumber;
627
+ relationshipMaxPerNode: z.ZodNumber;
628
+ openaiRateLimit: z.ZodNumber;
629
+ maxConcurrentAnalysis: z.ZodNumber;
630
+ }, z.core.$strip>;
631
+ nodeTypes: z.ZodArray<z.ZodObject<{
632
+ type: z.ZodString;
633
+ label: z.ZodString;
634
+ description: z.ZodOptional<z.ZodString>;
635
+ defaultDomain: z.ZodString;
636
+ icon: z.ZodOptional<z.ZodString>;
637
+ color: z.ZodOptional<z.ZodString>;
638
+ analysisPrompt: z.ZodOptional<z.ZodString>;
639
+ }, z.core.$strip>>;
640
+ domains: z.ZodArray<z.ZodObject<{
641
+ key: z.ZodString;
642
+ label: z.ZodString;
643
+ color: z.ZodString;
644
+ description: z.ZodOptional<z.ZodString>;
645
+ }, z.core.$strip>>;
646
+ relationshipTypes: z.ZodArray<z.ZodObject<{
647
+ type: z.ZodString;
648
+ label: z.ZodString;
649
+ description: z.ZodOptional<z.ZodString>;
650
+ bidirectional: z.ZodBoolean;
651
+ color: z.ZodOptional<z.ZodString>;
652
+ }, z.core.$strip>>;
653
+ }, z.core.$strip>;
654
+ declare const neuronSettingsUpdateSchema: z.ZodObject<{
655
+ visualization: z.ZodOptional<z.ZodObject<{
656
+ domainColors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
657
+ defaultDomainColor: z.ZodOptional<z.ZodString>;
658
+ edgeColor: z.ZodOptional<z.ZodString>;
659
+ edgeActiveColor: z.ZodOptional<z.ZodString>;
660
+ backgroundColor: z.ZodOptional<z.ZodString>;
661
+ defaultCameraPosition: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
662
+ defaultCameraTarget: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
663
+ minZoomDistance: z.ZodOptional<z.ZodNumber>;
664
+ maxZoomDistance: z.ZodOptional<z.ZodNumber>;
665
+ enableStarfield: z.ZodOptional<z.ZodBoolean>;
666
+ starfieldCount: z.ZodOptional<z.ZodNumber>;
667
+ labelDistance: z.ZodOptional<z.ZodNumber>;
668
+ maxVisibleLabels: z.ZodOptional<z.ZodNumber>;
669
+ performanceMode: z.ZodOptional<z.ZodEnum<{
670
+ auto: "auto";
671
+ normal: "normal";
672
+ degraded: "degraded";
673
+ fallback: "fallback";
674
+ }>>;
675
+ nodeCountThreshold: z.ZodOptional<z.ZodNumber>;
676
+ pixelRatioCap: z.ZodOptional<z.ZodNumber>;
677
+ enableAnimations: z.ZodOptional<z.ZodBoolean>;
678
+ focusTweenDuration: z.ZodOptional<z.ZodNumber>;
679
+ filterTransitionDuration: z.ZodOptional<z.ZodNumber>;
680
+ enableHover: z.ZodOptional<z.ZodBoolean>;
681
+ enableClick: z.ZodOptional<z.ZodBoolean>;
682
+ enableDoubleClick: z.ZodOptional<z.ZodBoolean>;
683
+ enablePan: z.ZodOptional<z.ZodBoolean>;
684
+ enableZoom: z.ZodOptional<z.ZodBoolean>;
685
+ enableRotate: z.ZodOptional<z.ZodBoolean>;
686
+ }, z.core.$strip>>;
687
+ analysis: z.ZodOptional<z.ZodObject<{
688
+ embeddingModel: z.ZodOptional<z.ZodEnum<{
689
+ "text-embedding-ada-002": "text-embedding-ada-002";
690
+ "text-embedding-3-small": "text-embedding-3-small";
691
+ "text-embedding-3-large": "text-embedding-3-large";
692
+ }>>;
693
+ embeddingDimensions: z.ZodOptional<z.ZodNumber>;
694
+ embeddingBatchSize: z.ZodOptional<z.ZodNumber>;
695
+ embeddingCacheTTL: z.ZodOptional<z.ZodNumber>;
696
+ clusteringAlgorithm: z.ZodOptional<z.ZodEnum<{
697
+ kmeans: "kmeans";
698
+ dbscan: "dbscan";
699
+ hierarchical: "hierarchical";
700
+ }>>;
701
+ defaultClusterCount: z.ZodOptional<z.ZodNumber>;
702
+ minClusterSize: z.ZodOptional<z.ZodNumber>;
703
+ clusterSimilarityThreshold: z.ZodOptional<z.ZodNumber>;
704
+ relationshipInferenceModel: z.ZodOptional<z.ZodString>;
705
+ relationshipMinConfidence: z.ZodOptional<z.ZodNumber>;
706
+ relationshipMaxPerNode: z.ZodOptional<z.ZodNumber>;
707
+ openaiRateLimit: z.ZodOptional<z.ZodNumber>;
708
+ maxConcurrentAnalysis: z.ZodOptional<z.ZodNumber>;
709
+ }, z.core.$strip>>;
710
+ nodeTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
711
+ type: z.ZodString;
712
+ label: z.ZodString;
713
+ description: z.ZodOptional<z.ZodString>;
714
+ defaultDomain: z.ZodString;
715
+ icon: z.ZodOptional<z.ZodString>;
716
+ color: z.ZodOptional<z.ZodString>;
717
+ analysisPrompt: z.ZodOptional<z.ZodString>;
718
+ }, z.core.$strip>>>;
719
+ domains: z.ZodOptional<z.ZodArray<z.ZodObject<{
720
+ key: z.ZodString;
721
+ label: z.ZodString;
722
+ color: z.ZodString;
723
+ description: z.ZodOptional<z.ZodString>;
724
+ }, z.core.$strip>>>;
725
+ relationshipTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
726
+ type: z.ZodString;
727
+ label: z.ZodString;
728
+ description: z.ZodOptional<z.ZodString>;
729
+ bidirectional: z.ZodBoolean;
730
+ color: z.ZodOptional<z.ZodString>;
731
+ }, z.core.$strip>>>;
732
+ }, z.core.$strip>;
733
+ declare const neuronConfigSchema: z.ZodObject<{
734
+ instance: z.ZodObject<{
735
+ name: z.ZodString;
736
+ version: z.ZodString;
737
+ repoName: z.ZodString;
738
+ }, z.core.$strip>;
739
+ visualization: z.ZodObject<{
740
+ domainColors: z.ZodRecord<z.ZodString, z.ZodString>;
741
+ defaultDomainColor: z.ZodString;
742
+ edgeColor: z.ZodString;
743
+ edgeActiveColor: z.ZodString;
744
+ backgroundColor: z.ZodString;
745
+ defaultCameraPosition: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
746
+ defaultCameraTarget: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
747
+ minZoomDistance: z.ZodNumber;
748
+ maxZoomDistance: z.ZodNumber;
749
+ enableStarfield: z.ZodBoolean;
750
+ starfieldCount: z.ZodNumber;
751
+ labelDistance: z.ZodNumber;
752
+ maxVisibleLabels: z.ZodNumber;
753
+ performanceMode: z.ZodEnum<{
754
+ auto: "auto";
755
+ normal: "normal";
756
+ degraded: "degraded";
757
+ fallback: "fallback";
758
+ }>;
759
+ nodeCountThreshold: z.ZodNumber;
760
+ pixelRatioCap: z.ZodNumber;
761
+ enableAnimations: z.ZodBoolean;
762
+ focusTweenDuration: z.ZodNumber;
763
+ filterTransitionDuration: z.ZodNumber;
764
+ enableHover: z.ZodBoolean;
765
+ enableClick: z.ZodBoolean;
766
+ enableDoubleClick: z.ZodBoolean;
767
+ enablePan: z.ZodBoolean;
768
+ enableZoom: z.ZodBoolean;
769
+ enableRotate: z.ZodBoolean;
770
+ }, z.core.$strip>;
771
+ analysis: z.ZodObject<{
772
+ embeddingModel: z.ZodEnum<{
773
+ "text-embedding-ada-002": "text-embedding-ada-002";
774
+ "text-embedding-3-small": "text-embedding-3-small";
775
+ "text-embedding-3-large": "text-embedding-3-large";
776
+ }>;
777
+ embeddingDimensions: z.ZodNumber;
778
+ embeddingBatchSize: z.ZodNumber;
779
+ embeddingCacheTTL: z.ZodNumber;
780
+ clusteringAlgorithm: z.ZodEnum<{
781
+ kmeans: "kmeans";
782
+ dbscan: "dbscan";
783
+ hierarchical: "hierarchical";
784
+ }>;
785
+ defaultClusterCount: z.ZodNumber;
786
+ minClusterSize: z.ZodNumber;
787
+ clusterSimilarityThreshold: z.ZodNumber;
788
+ relationshipInferenceModel: z.ZodString;
789
+ relationshipMinConfidence: z.ZodNumber;
790
+ relationshipMaxPerNode: z.ZodNumber;
791
+ openaiRateLimit: z.ZodNumber;
792
+ maxConcurrentAnalysis: z.ZodNumber;
793
+ }, z.core.$strip>;
794
+ nodeTypes: z.ZodArray<z.ZodObject<{
795
+ type: z.ZodString;
796
+ label: z.ZodString;
797
+ description: z.ZodOptional<z.ZodString>;
798
+ defaultDomain: z.ZodString;
799
+ icon: z.ZodOptional<z.ZodString>;
800
+ color: z.ZodOptional<z.ZodString>;
801
+ analysisPrompt: z.ZodOptional<z.ZodString>;
802
+ }, z.core.$strip>>;
803
+ domains: z.ZodArray<z.ZodObject<{
804
+ key: z.ZodString;
805
+ label: z.ZodString;
806
+ color: z.ZodString;
807
+ description: z.ZodOptional<z.ZodString>;
808
+ }, z.core.$strip>>;
809
+ relationshipTypes: z.ZodArray<z.ZodObject<{
810
+ type: z.ZodString;
811
+ label: z.ZodString;
812
+ description: z.ZodOptional<z.ZodString>;
813
+ bidirectional: z.ZodBoolean;
814
+ color: z.ZodOptional<z.ZodString>;
815
+ }, z.core.$strip>>;
816
+ openai: z.ZodObject<{
817
+ apiKey: z.ZodString;
818
+ organization: z.ZodOptional<z.ZodString>;
819
+ requestsPerMinute: z.ZodOptional<z.ZodNumber>;
820
+ maxRetries: z.ZodOptional<z.ZodNumber>;
821
+ }, z.core.$strip>;
822
+ database: z.ZodObject<{
823
+ mode: z.ZodEnum<{
824
+ docker: "docker";
825
+ external: "external";
826
+ }>;
827
+ port: z.ZodNumber;
828
+ containerName: z.ZodOptional<z.ZodString>;
829
+ image: z.ZodOptional<z.ZodString>;
830
+ user: z.ZodOptional<z.ZodString>;
831
+ password: z.ZodOptional<z.ZodString>;
832
+ database: z.ZodOptional<z.ZodString>;
833
+ url: z.ZodOptional<z.ZodString>;
834
+ pool: z.ZodOptional<z.ZodObject<{
835
+ min: z.ZodNumber;
836
+ max: z.ZodNumber;
837
+ idleTimeoutMs: z.ZodNumber;
838
+ connectionTimeoutMs: z.ZodNumber;
839
+ }, z.core.$strip>>;
840
+ resources: z.ZodOptional<z.ZodObject<{
841
+ memoryLimit: z.ZodString;
842
+ cpuLimit: z.ZodOptional<z.ZodString>;
843
+ }, z.core.$strip>>;
844
+ }, z.core.$strip>;
845
+ api: z.ZodObject<{
846
+ basePath: z.ZodString;
847
+ enableCors: z.ZodBoolean;
848
+ rateLimit: z.ZodOptional<z.ZodObject<{
849
+ windowMs: z.ZodNumber;
850
+ max: z.ZodNumber;
851
+ }, z.core.$strip>>;
852
+ }, z.core.$strip>;
853
+ logging: z.ZodObject<{
854
+ level: z.ZodEnum<{
855
+ debug: "debug";
856
+ info: "info";
857
+ warn: "warn";
858
+ error: "error";
859
+ }>;
860
+ prettyPrint: z.ZodBoolean;
861
+ }, z.core.$strip>;
862
+ }, z.core.$strip>;
863
+ type NodeTypeConfigInput = z.infer<typeof nodeTypeConfigSchema>;
864
+ type DomainConfigInput = z.infer<typeof domainConfigSchema>;
865
+ type RelationshipTypeConfigInput = z.infer<typeof relationshipTypeConfigSchema>;
866
+ type VisualizationSettingsInput = z.infer<typeof visualizationSettingsSchema>;
867
+ type AnalysisSettingsInput = z.infer<typeof analysisSettingsSchema>;
868
+ type DatabaseSettingsInput = z.infer<typeof databaseSettingsSchema>;
869
+ type NeuronSettingsInput = z.infer<typeof neuronSettingsSchema>;
870
+ type NeuronSettingsUpdateInput = z.infer<typeof neuronSettingsUpdateSchema>;
871
+ type NeuronConfigInput = z.infer<typeof neuronConfigSchema>;
872
+
873
+ declare const paginationSchema: z.ZodObject<{
874
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
875
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
876
+ }, z.core.$strip>;
877
+ declare const listNodesParamsSchema: z.ZodObject<{
878
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
879
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
880
+ nodeType: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
881
+ domain: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
882
+ clusterId: z.ZodOptional<z.ZodString>;
883
+ analysisStatus: z.ZodOptional<z.ZodString>;
884
+ search: z.ZodOptional<z.ZodString>;
885
+ sortBy: z.ZodOptional<z.ZodEnum<{
886
+ createdAt: "createdAt";
887
+ updatedAt: "updatedAt";
888
+ label: "label";
889
+ connectionCount: "connectionCount";
890
+ }>>;
891
+ sortOrder: z.ZodOptional<z.ZodEnum<{
892
+ asc: "asc";
893
+ desc: "desc";
894
+ }>>;
895
+ includeEmbeddings: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
896
+ includeStats: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
897
+ }, z.core.$strip>;
898
+ declare const listEdgesParamsSchema: z.ZodObject<{
899
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
900
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
901
+ fromNodeId: z.ZodOptional<z.ZodString>;
902
+ toNodeId: z.ZodOptional<z.ZodString>;
903
+ nodeId: z.ZodOptional<z.ZodString>;
904
+ relationshipType: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
905
+ source: z.ZodOptional<z.ZodEnum<{
906
+ manual: "manual";
907
+ ai_inferred: "ai_inferred";
908
+ imported: "imported";
909
+ }>>;
910
+ minStrength: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
911
+ minConfidence: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
912
+ }, z.core.$strip>;
913
+ declare const getGraphParamsSchema: z.ZodObject<{
914
+ nodeTypes: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
915
+ domains: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
916
+ clusterIds: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
917
+ nodeIds: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
918
+ depth: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
919
+ minEdgeStrength: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
920
+ relationshipTypes: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
921
+ maxNodes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
922
+ includeOrphanNodes: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
923
+ }, z.core.$strip>;
924
+ declare const expandGraphRequestSchema: z.ZodObject<{
925
+ fromNodeIds: z.ZodArray<z.ZodString>;
926
+ depth: z.ZodCoercedNumber<unknown>;
927
+ direction: z.ZodEnum<{
928
+ outbound: "outbound";
929
+ inbound: "inbound";
930
+ both: "both";
931
+ }>;
932
+ maxNodes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
933
+ }, z.core.$strip>;
934
+ declare const findPathRequestSchema: z.ZodObject<{
935
+ fromNodeId: z.ZodString;
936
+ toNodeId: z.ZodString;
937
+ maxDepth: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
938
+ algorithm: z.ZodOptional<z.ZodEnum<{
939
+ shortest: "shortest";
940
+ all: "all";
941
+ }>>;
942
+ }, z.core.$strip>;
943
+ declare const semanticSearchRequestSchema: z.ZodObject<{
944
+ query: z.ZodString;
945
+ nodeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
946
+ domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
947
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
948
+ }, z.core.$strip>;
949
+ declare const findSimilarRequestSchema: z.ZodObject<{
950
+ nodeId: z.ZodString;
951
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
952
+ excludeConnected: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
953
+ }, z.core.$strip>;
954
+ type PaginationInput = z.infer<typeof paginationSchema>;
955
+ type ListNodesParamsInput = z.infer<typeof listNodesParamsSchema>;
956
+ type ListEdgesParamsInput = z.infer<typeof listEdgesParamsSchema>;
957
+ type GetGraphParamsInput = z.infer<typeof getGraphParamsSchema>;
958
+ type ExpandGraphRequestInput = z.infer<typeof expandGraphRequestSchema>;
959
+ type FindPathRequestInput = z.infer<typeof findPathRequestSchema>;
960
+ type SemanticSearchRequestInput = z.infer<typeof semanticSearchRequestSchema>;
961
+ type FindSimilarRequestInput = z.infer<typeof findSimilarRequestSchema>;
962
+
963
+ type EventMiddleware = (event: NeuronEvent, next: () => void | Promise<void>) => void | Promise<void>;
964
+ declare class EventBus implements NeuronEventEmitter {
965
+ private subscribers;
966
+ private globalSubscribers;
967
+ private middleware;
968
+ private history;
969
+ private historyLimit;
970
+ emit<T>(event: NeuronEvent<T>): void;
971
+ emitAsync<T>(event: NeuronEvent<T>): Promise<void>;
972
+ subscribe<T>(type: NeuronEventType, handler: EventHandler<T>): EventSubscription;
973
+ subscribeMany(types: NeuronEventType[], handler: EventHandler): EventSubscription;
974
+ subscribeAll(handler: EventHandler<unknown>): EventSubscription;
975
+ unsubscribe(type: NeuronEventType, handler: EventHandler): void;
976
+ unsubscribeAll(): void;
977
+ use(middleware: EventMiddleware): void;
978
+ getSubscriberCount(type?: NeuronEventType): number;
979
+ getEventHistory(limit?: number): NeuronEvent[];
980
+ clearHistory(): void;
981
+ private recordEvent;
982
+ private runMiddleware;
983
+ }
984
+ declare const createEvent: <T>(type: NeuronEventType, payload: T, source?: EventSource) => NeuronEvent<T>;
985
+
986
+ declare const createNodeEvent: (type: "node:created" | "node:updated" | "node:deleted" | "node:batch_created", payload: NodeCreatedEventPayload | NodeUpdatedEventPayload | NodeDeletedEventPayload | NodeBatchCreatedEventPayload, source?: EventSource) => NeuronEvent;
987
+ declare const createEdgeEvent: (type: "edge:created" | "edge:updated" | "edge:deleted", payload: EdgeCreatedEventPayload | EdgeUpdatedEventPayload | EdgeDeletedEventPayload, source?: EventSource) => NeuronEvent;
988
+ declare const createAnalysisEvent: (type: "analysis:started" | "analysis:progress" | "analysis:completed" | "analysis:failed", payload: AnalysisStartedEventPayload | AnalysisProgressEventPayload | AnalysisCompletedEventPayload | AnalysisFailedEventPayload, source?: EventSource) => NeuronEvent;
989
+ declare const createGenericEvent: <T>(type: NeuronEventType, payload: T, source?: EventSource) => NeuronEvent<T>;
990
+
991
+ declare const loggingMiddleware: EventMiddleware;
992
+
993
+ declare const validationMiddleware: EventMiddleware;
994
+
995
+ interface ProcessingOptions {
996
+ skipDuplicates?: boolean;
997
+ updateOnConflict?: boolean;
998
+ defaultNodeType?: string;
999
+ defaultDomain?: string;
1000
+ contentFields?: string[];
1001
+ labelField?: string;
1002
+ slugField?: string;
1003
+ metadataFields?: string[];
1004
+ }
1005
+ declare class DataProcessor {
1006
+ private options;
1007
+ constructor(options?: ProcessingOptions);
1008
+ processItem(item: Record<string, unknown>): NeuronNodeCreate;
1009
+ processBatch(items: Record<string, unknown>[]): {
1010
+ nodes: NeuronNodeCreate[];
1011
+ errors: Array<{
1012
+ index: number;
1013
+ error: string;
1014
+ }>;
1015
+ };
1016
+ processJSON(json: string): NeuronNodeCreate[];
1017
+ processCSV(csv: string): NeuronNodeCreate[];
1018
+ generateSlug(label: string, existingSlugs?: Set<string>): string;
1019
+ extractContent(item: Record<string, unknown>): string;
1020
+ detectDuplicates(nodes: NeuronNodeCreate[]): {
1021
+ unique: NeuronNodeCreate[];
1022
+ duplicates: Array<{
1023
+ node: NeuronNodeCreate;
1024
+ reason: string;
1025
+ }>;
1026
+ };
1027
+ private extractMetadata;
1028
+ }
1029
+
1030
+ interface EmbeddingsConfig {
1031
+ openaiApiKey: string;
1032
+ model: 'text-embedding-ada-002' | 'text-embedding-3-small' | 'text-embedding-3-large';
1033
+ dimensions?: number;
1034
+ batchSize: number;
1035
+ rateLimit: number;
1036
+ cacheTTL: number;
1037
+ maxRetries: number;
1038
+ }
1039
+ interface EmbeddingResult {
1040
+ nodeId: string;
1041
+ embedding: number[];
1042
+ model: string;
1043
+ tokenCount: number;
1044
+ cached: boolean;
1045
+ }
1046
+ declare class EmbeddingsService {
1047
+ private config;
1048
+ private db;
1049
+ private client;
1050
+ constructor(config: EmbeddingsConfig, db: Database);
1051
+ generateEmbedding(text: string): Promise<number[]>;
1052
+ generateBatchEmbeddings(texts: string[]): Promise<number[][]>;
1053
+ embedNode(nodeId: string): Promise<EmbeddingResult>;
1054
+ embedNodes(nodeIds: string[]): Promise<{
1055
+ results: EmbeddingResult[];
1056
+ errors: Array<{
1057
+ nodeId: string;
1058
+ error: string;
1059
+ }>;
1060
+ }>;
1061
+ getCachedEmbedding(nodeId: string): Promise<number[] | null>;
1062
+ cacheEmbedding(nodeId: string, embedding: number[], model: string): Promise<void>;
1063
+ invalidateCache(nodeIds?: string[]): Promise<void>;
1064
+ countTokens(text: string): number;
1065
+ estimateCost(nodeCount: number): {
1066
+ tokens: number;
1067
+ cost: number;
1068
+ };
1069
+ private withRetry;
1070
+ private applyRateLimit;
1071
+ }
1072
+
1073
+ interface ClusteringConfig {
1074
+ algorithm: 'kmeans' | 'dbscan' | 'hierarchical';
1075
+ clusterCount?: number;
1076
+ minClusterSize?: number;
1077
+ similarityThreshold?: number;
1078
+ epsilon?: number;
1079
+ minSamples?: number;
1080
+ }
1081
+ interface ClusteringResult {
1082
+ clusterId: string;
1083
+ label: string;
1084
+ nodeIds: string[];
1085
+ centroid: number[];
1086
+ avgSimilarity: number;
1087
+ cohesion: number;
1088
+ }
1089
+ declare class ClusteringEngine {
1090
+ private db;
1091
+ private embeddings;
1092
+ constructor(db: Database, embeddings: EmbeddingsService);
1093
+ clusterNodes(config: ClusteringConfig): Promise<{
1094
+ clusters: ClusteringResult[];
1095
+ unassigned: string[];
1096
+ }>;
1097
+ recluster(config: ClusteringConfig): Promise<ClusteringResult[]>;
1098
+ assignToCluster(nodeId: string): Promise<ClusterMembership | null>;
1099
+ findBestCluster(embedding: number[]): Promise<{
1100
+ clusterId: string;
1101
+ similarity: number;
1102
+ } | null>;
1103
+ recomputeCentroid(clusterId: string): Promise<void>;
1104
+ recomputeAllCentroids(): Promise<void>;
1105
+ generateClusterLabel(clusterId: string): Promise<string>;
1106
+ generateAllLabels(): Promise<void>;
1107
+ calculateSilhouetteScore(clusters: ClusteringResult[]): number;
1108
+ calculateCohesion(cluster: ClusteringResult): number;
1109
+ private fetchNodesWithEmbeddings;
1110
+ private runKmeans;
1111
+ private runDbscan;
1112
+ private findNeighbors;
1113
+ private persistClusters;
1114
+ }
1115
+
1116
+ interface InferenceConfig {
1117
+ model: string;
1118
+ minConfidence: number;
1119
+ maxPerNode: number;
1120
+ similarityThreshold: number;
1121
+ includeExisting: boolean;
1122
+ batchSize: number;
1123
+ rateLimit: number;
1124
+ }
1125
+ interface InferredRelationship {
1126
+ fromNodeId: string;
1127
+ toNodeId: string;
1128
+ relationshipType: RelationshipType;
1129
+ confidence: number;
1130
+ reasoning: string;
1131
+ evidence: EdgeEvidence[];
1132
+ }
1133
+ declare class RelationshipEngine {
1134
+ private db;
1135
+ private config;
1136
+ private client;
1137
+ constructor(db: Database, config: InferenceConfig);
1138
+ inferForNode(nodeId: string): Promise<InferredRelationship[]>;
1139
+ inferForNodes(nodeIds: string[]): Promise<{
1140
+ inferred: InferredRelationship[];
1141
+ errors: Array<{
1142
+ nodeId: string;
1143
+ error: string;
1144
+ }>;
1145
+ }>;
1146
+ inferAll(): Promise<InferredRelationship[]>;
1147
+ findCandidates(nodeId: string): Promise<Array<{
1148
+ nodeId: string;
1149
+ similarity: number;
1150
+ }>>;
1151
+ validateRelationship(rel: InferredRelationship): Promise<boolean>;
1152
+ createEdgesFromInferences(inferences: InferredRelationship[], autoApprove?: boolean): Promise<NeuronEdge[]>;
1153
+ private inferPair;
1154
+ private applyRateLimit;
1155
+ }
1156
+
1157
+ interface ScoringConfig {
1158
+ similarityWeight: number;
1159
+ connectionWeight: number;
1160
+ recencyWeight: number;
1161
+ domainBoost: number;
1162
+ }
1163
+ interface ScoredNode {
1164
+ node: NeuronNode;
1165
+ score: number;
1166
+ breakdown: {
1167
+ similarity: number;
1168
+ connections: number;
1169
+ recency: number;
1170
+ domainMatch: number;
1171
+ };
1172
+ }
1173
+ declare class ScoringEngine {
1174
+ private db;
1175
+ private config;
1176
+ constructor(db: Database, config?: ScoringConfig);
1177
+ cosineSimilarity(a: number[], b: number[]): number;
1178
+ semanticSimilarity(nodeA: string, nodeB: string): Promise<number>;
1179
+ scoreForQuery(queryEmbedding: number[], nodeIds?: string[]): Promise<ScoredNode[]>;
1180
+ findSimilar(nodeId: string, limit?: number, excludeConnected?: boolean): Promise<ScoredNode[]>;
1181
+ calculateNodeImportance(nodeId: string): Promise<number>;
1182
+ rankAllNodes(): Promise<Array<{
1183
+ nodeId: string;
1184
+ importance: number;
1185
+ }>>;
1186
+ scoreRelevance(sourceNodeId: string, candidateNodeIds: string[], context?: string): Promise<ScoredNode[]>;
1187
+ private applyScoring;
1188
+ }
1189
+
1190
+ interface PipelineOptions {
1191
+ nodeIds?: string[];
1192
+ forceRecompute?: boolean;
1193
+ skipEmbeddings?: boolean;
1194
+ embeddingModel?: string;
1195
+ skipClustering?: boolean;
1196
+ clusterCount?: number;
1197
+ clusteringAlgorithm?: ClusteringAlgorithm;
1198
+ skipRelationships?: boolean;
1199
+ relationshipThreshold?: number;
1200
+ maxRelationshipsPerNode?: number;
1201
+ onProgress?: (progress: PipelineProgress) => void;
1202
+ webhookUrl?: string;
1203
+ }
1204
+ interface PipelineProgress {
1205
+ stage: 'embeddings' | 'clustering' | 'relationships' | 'complete';
1206
+ progress: number;
1207
+ currentItem: string;
1208
+ itemsProcessed: number;
1209
+ totalItems: number;
1210
+ estimatedTimeRemaining?: number;
1211
+ }
1212
+ declare class AnalysisPipeline {
1213
+ private db;
1214
+ private embeddings;
1215
+ private clustering;
1216
+ private relationships;
1217
+ private events;
1218
+ private activeJobs;
1219
+ constructor(db: Database, embeddings: EmbeddingsService, clustering: ClusteringEngine, relationships: RelationshipEngine, events: EventBus);
1220
+ runFull(options?: PipelineOptions): Promise<AnalysisRun>;
1221
+ runEmbeddings(options?: PipelineOptions): Promise<AnalysisRun>;
1222
+ runClustering(options?: PipelineOptions): Promise<AnalysisRun>;
1223
+ runRelationships(options?: PipelineOptions): Promise<AnalysisRun>;
1224
+ getJob(jobId: string): Promise<AnalysisRun | null>;
1225
+ listJobs(options?: {
1226
+ status?: string;
1227
+ limit?: number;
1228
+ }): Promise<AnalysisRun[]>;
1229
+ cancelJob(jobId: string): Promise<boolean>;
1230
+ getActiveJobs(): AnalysisRun[];
1231
+ isRunning(): boolean;
1232
+ private runEmbeddingsStage;
1233
+ private runClusteringStage;
1234
+ private runRelationshipsStage;
1235
+ private createJob;
1236
+ private completeJob;
1237
+ private failJob;
1238
+ private updateJobResults;
1239
+ private resolveNodeIds;
1240
+ }
1241
+
1242
+ interface DockerConfig {
1243
+ repoName: string;
1244
+ port: number;
1245
+ containerName?: string;
1246
+ image?: string;
1247
+ user?: string;
1248
+ password?: string;
1249
+ database?: string;
1250
+ memoryLimit?: string;
1251
+ }
1252
+ interface StartOptions {
1253
+ forceRecreate?: boolean;
1254
+ waitForReady?: boolean;
1255
+ timeoutMs?: number;
1256
+ }
1257
+ interface StopOptions {
1258
+ removeVolumes?: boolean;
1259
+ timeoutMs?: number;
1260
+ }
1261
+ interface EnsureOptions {
1262
+ waitForReady?: boolean;
1263
+ }
1264
+ interface HealthCheckResult {
1265
+ containerRunning: boolean;
1266
+ databaseReady: boolean;
1267
+ connectionString: string;
1268
+ details?: string;
1269
+ }
1270
+ interface ContainerStats {
1271
+ cpuPercent?: string;
1272
+ memoryUsage?: string;
1273
+ memoryPercent?: string;
1274
+ netIO?: string;
1275
+ blockIO?: string;
1276
+ }
1277
+ interface LogOptions {
1278
+ tail?: number;
1279
+ since?: string;
1280
+ }
1281
+ declare class DockerManager {
1282
+ private config;
1283
+ private composeFilePath;
1284
+ constructor(config: DockerConfig);
1285
+ start(options?: StartOptions): Promise<void>;
1286
+ stop(options?: StopOptions): Promise<void>;
1287
+ ensureRunning(options?: EnsureOptions): Promise<void>;
1288
+ isRunning(): Promise<boolean>;
1289
+ healthCheck(): Promise<HealthCheckResult>;
1290
+ getStats(): Promise<ContainerStats>;
1291
+ getConnectionString(): Promise<string>;
1292
+ getLogs(options?: LogOptions): Promise<string>;
1293
+ execSql(sql: string): Promise<string>;
1294
+ updatePort(newPort: number): Promise<void>;
1295
+ private assertDockerAvailable;
1296
+ private getComposeCommand;
1297
+ private getContainerName;
1298
+ private getVolumeName;
1299
+ private ensureComposeFile;
1300
+ private renderTemplate;
1301
+ private ensurePortAvailable;
1302
+ private isPortAvailable;
1303
+ private waitForReady;
1304
+ private execPgIsReady;
1305
+ private inspectContainer;
1306
+ }
1307
+
1308
+ declare function createDatabase(config: NeuronConfig): Database;
1309
+ declare function createDatabaseFromEnv(): Database;
1310
+ declare function getDatabase(config?: DatabaseConfig): Database;
1311
+ declare function resetDatabaseSingleton(): void;
1312
+
1313
+ declare const defineNeuronConfig: (config: NeuronConfig) => NeuronConfig;
1314
+
1315
+ declare class NeuronApiClient {
1316
+ private basePath;
1317
+ constructor(basePath: string);
1318
+ private request;
1319
+ nodes: {
1320
+ list: (params?: ListNodesParams) => Promise<ListNodesResponse>;
1321
+ get: (id: string) => Promise<GetNodeResponse>;
1322
+ create: (data: CreateNodesRequest) => Promise<CreateNodesResponse>;
1323
+ update: (id: string, data: UpdateNodeRequest) => Promise<unknown>;
1324
+ delete: (id: string) => Promise<DeleteNodeResponse>;
1325
+ };
1326
+ edges: {
1327
+ list: (params?: ListEdgesParams) => Promise<ListEdgesResponse>;
1328
+ create: (data: CreateEdgesRequest) => Promise<CreateEdgesResponse>;
1329
+ update: (id: string, data: UpdateEdgeRequest) => Promise<unknown>;
1330
+ delete: (id: string) => Promise<DeleteEdgeResponse>;
1331
+ };
1332
+ graph: {
1333
+ get: (params?: GetGraphParams) => Promise<GetGraphResponse>;
1334
+ expand: (data: ExpandGraphRequest) => Promise<ExpandGraphResponse>;
1335
+ findPath: (data: FindPathRequest) => Promise<FindPathResponse>;
1336
+ };
1337
+ analyze: {
1338
+ start: (data: AnalysisRequest) => Promise<AnalysisResponse>;
1339
+ getStatus: (jobId: string) => Promise<GetAnalysisJobResponse>;
1340
+ cancel: (jobId: string) => Promise<CancelAnalysisResponse>;
1341
+ };
1342
+ settings: {
1343
+ get: () => Promise<GetSettingsResponse>;
1344
+ update: (data: UpdateSettingsRequest) => Promise<UpdateSettingsResponse>;
1345
+ reset: () => Promise<ResetSettingsResponse>;
1346
+ };
1347
+ search: {
1348
+ semantic: (data: SemanticSearchRequest) => Promise<SemanticSearchResponse>;
1349
+ similar: (data: FindSimilarRequest) => Promise<FindSimilarResponse>;
1350
+ };
1351
+ }
1352
+
1353
+ interface ErrorContext {
1354
+ message: string;
1355
+ }
1356
+ interface NeuronContextValue {
1357
+ config: NeuronConfig;
1358
+ settings: NeuronSettings;
1359
+ api: NeuronApiClient;
1360
+ events: EventBus;
1361
+ isInitialized: boolean;
1362
+ error: Error | null;
1363
+ updateSettings: (settings: Partial<NeuronSettings>) => Promise<void>;
1364
+ resetSettings: () => Promise<void>;
1365
+ onEvent?: (event: NeuronEvent) => void;
1366
+ onError?: (error: Error, context: ErrorContext) => void;
1367
+ }
1368
+
1369
+ declare function useNeuronContext(): NeuronContextValue;
1370
+
1371
+ interface UseNeuronGraphOptions {
1372
+ domains?: string[];
1373
+ nodeTypes?: string[];
1374
+ minEdgeStrength?: number;
1375
+ autoRefresh?: boolean;
1376
+ refreshInterval?: number;
1377
+ }
1378
+ declare function useNeuronGraph(options?: UseNeuronGraphOptions): {
1379
+ nodes: NeuronVisualNode[];
1380
+ edges: NeuronVisualEdge[];
1381
+ clusters: NeuronVisualCluster[];
1382
+ isLoading: boolean;
1383
+ error: Error | null;
1384
+ filters: GraphFilters;
1385
+ setFilters: (next: Partial<GraphFilters>) => void;
1386
+ clearFilters: () => void;
1387
+ selectedNode: NeuronVisualNode | null;
1388
+ selectNode: (nodeId: string | null) => void;
1389
+ clearSelection: () => void;
1390
+ refetch: () => Promise<void>;
1391
+ expandFromNode: (nodeId: string, depth?: number) => Promise<void>;
1392
+ findPath: (fromId: string, toId: string) => Promise<FindPathResponse["paths"][number]>;
1393
+ };
1394
+
1395
+ interface UseNeuronNodesOptions {
1396
+ initialFilters?: ListNodesParams;
1397
+ pageSize?: number;
1398
+ }
1399
+ declare function useNeuronNodes(options?: UseNeuronNodesOptions): {
1400
+ nodes: NeuronNode[];
1401
+ isLoading: boolean;
1402
+ error: Error | null;
1403
+ createNode: (data: NeuronNodeCreate) => Promise<NeuronNode>;
1404
+ updateNode: (id: string, data: NeuronNodeUpdate) => Promise<NeuronNode>;
1405
+ deleteNode: (id: string) => Promise<void>;
1406
+ batchCreate: (nodesInput: NeuronNodeCreate[]) => Promise<NeuronNode[]>;
1407
+ search: (query: string) => Promise<void>;
1408
+ pagination: {
1409
+ page: number;
1410
+ totalPages: number;
1411
+ hasNext: boolean;
1412
+ hasPrev: boolean;
1413
+ };
1414
+ setPage: React.Dispatch<React.SetStateAction<number>>;
1415
+ nextPage: () => void;
1416
+ prevPage: () => void;
1417
+ };
1418
+
1419
+ declare function useNeuronAnalysis(): {
1420
+ activeJobs: AnalysisRun[];
1421
+ jobHistory: AnalysisRun[];
1422
+ startAnalysis: (request: AnalysisRequest) => Promise<AnalysisResponse>;
1423
+ cancelJob: (jobId: string) => Promise<void>;
1424
+ getJobStatus: (jobId: string) => Promise<AnalysisRun>;
1425
+ isRunning: boolean;
1426
+ currentProgress: number | null;
1427
+ };
1428
+
1429
+ declare function useNeuronSettings(): {
1430
+ settings: NeuronSettings;
1431
+ isLoading: boolean;
1432
+ isUpdating: boolean;
1433
+ error: Error | null;
1434
+ updateSettings: (updates: NeuronSettingsUpdate) => Promise<void>;
1435
+ resetSettings: (sections?: string[]) => Promise<void>;
1436
+ setDomainColor: (domain: string, color: string) => Promise<void>;
1437
+ setVisualization: (updates: Partial<VisualizationSettings>) => Promise<void>;
1438
+ };
1439
+
1440
+ declare function useNeuronSearch(): {
1441
+ results: SearchResult[];
1442
+ isSearching: boolean;
1443
+ error: Error | null;
1444
+ search: (query: string, options?: SemanticSearchOptions) => Promise<void>;
1445
+ findSimilar: (nodeId: string, options?: FindSimilarOptions) => Promise<void>;
1446
+ clearResults: () => void;
1447
+ };
1448
+
1449
+ declare function useNeuronEvents(): {
1450
+ subscribe: <T>(type: NeuronEventType, handler: EventHandler<T>) => void;
1451
+ emit: <T>(type: NeuronEventType, payload: T) => void;
1452
+ };
1453
+ declare function useNodeEvents(handlers: {
1454
+ onCreated?: (node: NeuronNode) => void;
1455
+ onUpdated?: (node: NeuronNode) => void;
1456
+ onDeleted?: (nodeId: string) => void;
1457
+ }): void;
1458
+ declare function useAnalysisEvents(handlers: {
1459
+ onStarted?: (jobId: string) => void;
1460
+ onProgress?: (jobId: string, progress: number) => void;
1461
+ onCompleted?: (job: AnalysisRun) => void;
1462
+ onFailed?: (jobId: string, error: string) => void;
1463
+ }): void;
1464
+
1465
+ interface NeuronWebProviderProps {
1466
+ children: React__default.ReactNode;
1467
+ config: {
1468
+ openaiApiKey?: string;
1469
+ databaseUrl?: string;
1470
+ settings?: Partial<NeuronSettings>;
1471
+ onEvent?: (event: NeuronEvent) => void;
1472
+ onError?: (error: Error, context: ErrorContext) => void;
1473
+ };
1474
+ }
1475
+ declare function NeuronWebProvider({ children, config }: NeuronWebProviderProps): React__default.ReactElement;
1476
+
1477
+ /**
1478
+ * omi-neuron-web
1479
+ * A drop-in Next.js library for data analysis and 3D visualization
1480
+ */
1481
+
1482
+ declare const VERSION = "0.1.0";
1483
+
1484
+ export { type AnalysisCancelledEventPayload, type AnalysisCompletedEventPayload, type AnalysisFailedEventPayload, type AnalysisOptionsInput, AnalysisPipeline, type AnalysisProgressEventPayload, AnalysisRequest, type AnalysisRequestInput, AnalysisResponse, AnalysisRun, type AnalysisSettingsInput, type AnalysisStartedEventPayload, CancelAnalysisResponse, type ClusterCreateInput, type ClusterCreatedEventPayload, ClusterMembership, type ClusterMembershipChangedEventPayload, type ClusterUpdateInput, type ClusterUpdatedEventPayload, ClusteringAlgorithm, type ClusteringConfigInput, ClusteringEngine, type ContainerStats, CreateEdgesRequest, CreateEdgesResponse, CreateNodesRequest, CreateNodesResponse, DataProcessor, Database, DatabaseConfig, type DatabaseSettingsInput, DeleteEdgeResponse, DeleteNodeResponse, type DockerConfig, DockerManager, type DomainConfigInput, type EdgeCreateInput, type EdgeCreatedEventPayload, type EdgeDeletedEventPayload, EdgeEvidence, type EdgeEvidenceInput, type EdgeFilterInput, type EdgeUpdateInput, type EdgeUpdatedEventPayload, EmbeddingsService, type EnsureOptions, EventBus, type EventFilterOptions, type EventHandler, type EventMiddleware, type EventSource, type EventSubscription, ExpandGraphRequest, type ExpandGraphRequestInput, ExpandGraphResponse, FindPathRequest, type FindPathRequestInput, FindPathResponse, FindSimilarOptions, FindSimilarRequest, type FindSimilarRequestInput, FindSimilarResponse, GetAnalysisJobResponse, GetGraphParams, type GetGraphParamsInput, GetGraphResponse, GetNodeResponse, GetSettingsResponse, GraphFilters, type HealthCheckResult, ListEdgesParams, type ListEdgesParamsInput, ListEdgesResponse, ListNodesParams, type ListNodesParamsInput, ListNodesResponse, type LogOptions, NeuronCluster, NeuronConfig, type NeuronConfigInput, NeuronEdge, type NeuronEvent, type NeuronEventEmitter, type NeuronEventType, NeuronNode, NeuronNodeCreate, NeuronNodeUpdate, NeuronSettings, type NeuronSettingsInput, NeuronSettingsUpdate, type NeuronSettingsUpdateInput, NeuronVisualCluster, NeuronVisualEdge, NeuronVisualNode, NeuronWebProvider, type NodeBatchCreateInput, type NodeBatchCreatedEventPayload, type NodeCreateInput, type NodeCreatedEventPayload, type NodeDeletedEventPayload, type NodeFilterInput, type NodeTypeConfigInput, type NodeUpdateInput, type NodeUpdatedEventPayload, type PaginationInput, RelationshipEngine, type RelationshipInferredEventPayload, type RelationshipRejectedEventPayload, RelationshipType, type RelationshipTypeConfigInput, ResetSettingsResponse, ScoringEngine, SearchResult, SemanticSearchOptions, SemanticSearchRequest, type SemanticSearchRequestInput, SemanticSearchResponse, type SettingsUpdatedEventPayload, type StartOptions, type StopOptions, UpdateEdgeRequest, UpdateNodeRequest, UpdateSettingsRequest, UpdateSettingsResponse, type UseNeuronGraphOptions, type UseNeuronNodesOptions, VERSION, VisualizationSettings, type VisualizationSettingsInput, type VizCameraChangedEventPayload, type VizFilterAppliedEventPayload, type VizNodeFocusedEventPayload, type VizNodeHoveredEventPayload, type VizNodeSelectedEventPayload, type VizPathCompletedEventPayload, type VizPathStartedEventPayload, analysisOptionsSchema, analysisRequestSchema, analysisSettingsSchema, clusterCreateSchema, clusterUpdateSchema, clusteringConfigSchema, createAnalysisEvent, createDatabase, createDatabaseFromEnv, createEdgeEvent, createEvent, createGenericEvent, createNodeEvent, databaseSettingsSchema, defineNeuronConfig, domainConfigSchema, edgeCreateSchema, edgeEvidenceSchema, edgeFilterSchema, edgeUpdateSchema, expandGraphRequestSchema, findPathRequestSchema, findSimilarRequestSchema, getDatabase, getGraphParamsSchema, listEdgesParamsSchema, listNodesParamsSchema, loggingMiddleware, neuronConfigSchema, neuronSettingsSchema, neuronSettingsUpdateSchema, nodeBatchCreateSchema, nodeCreateSchema, nodeFilterSchema, nodeTierSchema, nodeTypeConfigSchema, nodeUpdateSchema, paginationSchema, relationshipTypeConfigSchema, resetDatabaseSingleton, semanticSearchRequestSchema, useAnalysisEvents, useNeuronAnalysis, useNeuronContext, useNeuronEvents, useNeuronGraph, useNeuronNodes, useNeuronSearch, useNeuronSettings, useNodeEvents, validationMiddleware, visualizationSettingsSchema };