@omiron33/omi-neuron-web 0.2.21 → 0.2.23

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.
@@ -10,6 +10,11 @@ type NodeTier = 'primary' | 'secondary' | 'tertiary' | 'insight';
10
10
  * Analysis status for tracking node processing state
11
11
  */
12
12
  type AnalysisStatus = 'pending' | 'processing' | 'complete' | 'failed';
13
+ /**
14
+ * Workflow status for color coding nodes in static/authored graphs
15
+ * Used for quest systems, kanban boards, pipelines, etc.
16
+ */
17
+ type NodeStatus = 'default' | 'draft' | 'active' | 'complete' | 'blocked' | 'archived';
13
18
  /**
14
19
  * Base node interface - all nodes in the system extend this
15
20
  * Kept minimal to allow maximum flexibility in consuming apps
@@ -67,6 +72,8 @@ interface NeuronNode extends NeuronNodeBase {
67
72
  visualPriority?: number;
68
73
  /** Manual position override [x, y, z] */
69
74
  positionOverride?: [number, number, number] | null;
75
+ /** Workflow status for color coding */
76
+ status?: NodeStatus;
70
77
  }
71
78
  /**
72
79
  * Input type for creating nodes - minimal required fields
@@ -90,6 +97,8 @@ interface NeuronNodeCreate {
90
97
  metadata?: Record<string, unknown>;
91
98
  /** Optional tier */
92
99
  tier?: NodeTier;
100
+ /** Optional workflow status */
101
+ status?: NodeStatus;
93
102
  }
94
103
  /**
95
104
  * Input type for updating nodes
@@ -135,6 +144,8 @@ interface NeuronVisualNode {
135
144
  connectionCount: number;
136
145
  /** Optional position override */
137
146
  position?: [number, number, number];
147
+ /** Workflow status for color coding */
148
+ status?: NodeStatus;
138
149
  }
139
150
 
140
151
  /**
@@ -266,4 +277,115 @@ interface InferredRelationship {
266
277
  evidence: EdgeEvidence[];
267
278
  }
268
279
 
269
- export type { AnalysisStatus as A, BuiltInRelationshipType as B, EdgeEvidence as E, InferredRelationship as I, NeuronVisualNode as N, RelationshipType as R, NeuronVisualEdge as a, NeuronNode as b, NeuronEdge as c, NodeTier as d, NeuronNodeCreate as e, NeuronNodeUpdate as f, NeuronEdgeCreate as g, NeuronEdgeUpdate as h, NeuronNodeBase as i, NeuronNodeBatchCreate as j, EdgeSource as k };
280
+ /**
281
+ * Cluster Types for omi-neuron-web
282
+ * Defines groupings of similar nodes based on embeddings
283
+ */
284
+ /**
285
+ * Cluster represents a grouping of similar nodes
286
+ */
287
+ interface NeuronCluster {
288
+ /** UUID v4 identifier */
289
+ id: string;
290
+ /** AI-generated or manual label */
291
+ label: string;
292
+ /** Type of cluster (e.g., 'topic', 'narrative', 'entity') */
293
+ clusterType: string;
294
+ /** Average embedding of all members */
295
+ centroid: number[];
296
+ /** Number of nodes in cluster */
297
+ memberCount: number;
298
+ /** Average similarity of members to centroid (0-1) */
299
+ avgSimilarity: number;
300
+ /** How tightly grouped the cluster is (0-1) */
301
+ cohesion: number;
302
+ /** Optional description */
303
+ description?: string | null;
304
+ /** Extracted keywords */
305
+ keywords: string[];
306
+ /** Additional metadata */
307
+ metadata: Record<string, unknown>;
308
+ /** Creation timestamp */
309
+ createdAt: Date;
310
+ /** Last update timestamp */
311
+ updatedAt: Date;
312
+ /** Last time centroid was recomputed */
313
+ lastRecomputedAt?: Date | null;
314
+ }
315
+ /**
316
+ * Node-to-cluster membership
317
+ */
318
+ interface ClusterMembership {
319
+ /** Node ID */
320
+ nodeId: string;
321
+ /** Cluster ID */
322
+ clusterId: string;
323
+ /** Similarity to cluster centroid (0-1) */
324
+ similarityScore: number;
325
+ /** Whether this is the primary cluster for this node */
326
+ isPrimary: boolean;
327
+ /** When the node was assigned to this cluster */
328
+ assignedAt: Date;
329
+ }
330
+ /**
331
+ * Input for creating clusters manually
332
+ */
333
+ interface NeuronClusterCreate {
334
+ label: string;
335
+ clusterType?: string;
336
+ description?: string;
337
+ keywords?: string[];
338
+ metadata?: Record<string, unknown>;
339
+ }
340
+ /**
341
+ * Input for updating clusters
342
+ */
343
+ interface NeuronClusterUpdate {
344
+ label?: string;
345
+ description?: string;
346
+ keywords?: string[];
347
+ metadata?: Record<string, unknown>;
348
+ }
349
+ /**
350
+ * Visual cluster representation
351
+ * Used for static/authored clusters with explicit membership
352
+ */
353
+ interface NeuronVisualCluster {
354
+ id: string;
355
+ label: string;
356
+ /** Explicit list of node IDs in this cluster */
357
+ nodeIds: string[];
358
+ /** Optional color override (CSS color string) */
359
+ color?: string;
360
+ /** Optional fixed center position for the cluster */
361
+ position?: {
362
+ x: number;
363
+ y: number;
364
+ z: number;
365
+ };
366
+ /** Optional metadata */
367
+ metadata?: Record<string, unknown>;
368
+ }
369
+ /**
370
+ * Clustering algorithm options
371
+ */
372
+ type ClusteringAlgorithm = 'kmeans' | 'dbscan' | 'hierarchical';
373
+ /**
374
+ * Clustering configuration
375
+ */
376
+ interface ClusteringConfig {
377
+ /** Algorithm to use */
378
+ algorithm: ClusteringAlgorithm;
379
+ /** Target number of clusters (for k-means) */
380
+ clusterCount?: number;
381
+ /** Minimum cluster size */
382
+ minClusterSize?: number;
383
+ /** Similarity threshold for cluster assignment */
384
+ similarityThreshold?: number;
385
+ /** Epsilon for DBSCAN */
386
+ epsilon?: number;
387
+ /** Min samples for DBSCAN */
388
+ minSamples?: number;
389
+ }
390
+
391
+ export type { AnalysisStatus as A, BuiltInRelationshipType as B, ClusteringAlgorithm as C, EdgeEvidence as E, InferredRelationship as I, NeuronVisualNode as N, RelationshipType as R, NeuronVisualEdge as a, NeuronVisualCluster as b, NeuronNode as c, NeuronEdge as d, NodeStatus as e, NodeTier as f, NeuronNodeCreate as g, NeuronCluster as h, NeuronNodeUpdate as i, NeuronEdgeCreate as j, NeuronEdgeUpdate as k, ClusterMembership as l, NeuronNodeBase as m, NeuronNodeBatchCreate as n, EdgeSource as o, NeuronClusterCreate as p, NeuronClusterUpdate as q, ClusteringConfig as r };
@@ -10,6 +10,11 @@ type NodeTier = 'primary' | 'secondary' | 'tertiary' | 'insight';
10
10
  * Analysis status for tracking node processing state
11
11
  */
12
12
  type AnalysisStatus = 'pending' | 'processing' | 'complete' | 'failed';
13
+ /**
14
+ * Workflow status for color coding nodes in static/authored graphs
15
+ * Used for quest systems, kanban boards, pipelines, etc.
16
+ */
17
+ type NodeStatus = 'default' | 'draft' | 'active' | 'complete' | 'blocked' | 'archived';
13
18
  /**
14
19
  * Base node interface - all nodes in the system extend this
15
20
  * Kept minimal to allow maximum flexibility in consuming apps
@@ -67,6 +72,8 @@ interface NeuronNode extends NeuronNodeBase {
67
72
  visualPriority?: number;
68
73
  /** Manual position override [x, y, z] */
69
74
  positionOverride?: [number, number, number] | null;
75
+ /** Workflow status for color coding */
76
+ status?: NodeStatus;
70
77
  }
71
78
  /**
72
79
  * Input type for creating nodes - minimal required fields
@@ -90,6 +97,8 @@ interface NeuronNodeCreate {
90
97
  metadata?: Record<string, unknown>;
91
98
  /** Optional tier */
92
99
  tier?: NodeTier;
100
+ /** Optional workflow status */
101
+ status?: NodeStatus;
93
102
  }
94
103
  /**
95
104
  * Input type for updating nodes
@@ -135,6 +144,8 @@ interface NeuronVisualNode {
135
144
  connectionCount: number;
136
145
  /** Optional position override */
137
146
  position?: [number, number, number];
147
+ /** Workflow status for color coding */
148
+ status?: NodeStatus;
138
149
  }
139
150
 
140
151
  /**
@@ -266,4 +277,115 @@ interface InferredRelationship {
266
277
  evidence: EdgeEvidence[];
267
278
  }
268
279
 
269
- export type { AnalysisStatus as A, BuiltInRelationshipType as B, EdgeEvidence as E, InferredRelationship as I, NeuronVisualNode as N, RelationshipType as R, NeuronVisualEdge as a, NeuronNode as b, NeuronEdge as c, NodeTier as d, NeuronNodeCreate as e, NeuronNodeUpdate as f, NeuronEdgeCreate as g, NeuronEdgeUpdate as h, NeuronNodeBase as i, NeuronNodeBatchCreate as j, EdgeSource as k };
280
+ /**
281
+ * Cluster Types for omi-neuron-web
282
+ * Defines groupings of similar nodes based on embeddings
283
+ */
284
+ /**
285
+ * Cluster represents a grouping of similar nodes
286
+ */
287
+ interface NeuronCluster {
288
+ /** UUID v4 identifier */
289
+ id: string;
290
+ /** AI-generated or manual label */
291
+ label: string;
292
+ /** Type of cluster (e.g., 'topic', 'narrative', 'entity') */
293
+ clusterType: string;
294
+ /** Average embedding of all members */
295
+ centroid: number[];
296
+ /** Number of nodes in cluster */
297
+ memberCount: number;
298
+ /** Average similarity of members to centroid (0-1) */
299
+ avgSimilarity: number;
300
+ /** How tightly grouped the cluster is (0-1) */
301
+ cohesion: number;
302
+ /** Optional description */
303
+ description?: string | null;
304
+ /** Extracted keywords */
305
+ keywords: string[];
306
+ /** Additional metadata */
307
+ metadata: Record<string, unknown>;
308
+ /** Creation timestamp */
309
+ createdAt: Date;
310
+ /** Last update timestamp */
311
+ updatedAt: Date;
312
+ /** Last time centroid was recomputed */
313
+ lastRecomputedAt?: Date | null;
314
+ }
315
+ /**
316
+ * Node-to-cluster membership
317
+ */
318
+ interface ClusterMembership {
319
+ /** Node ID */
320
+ nodeId: string;
321
+ /** Cluster ID */
322
+ clusterId: string;
323
+ /** Similarity to cluster centroid (0-1) */
324
+ similarityScore: number;
325
+ /** Whether this is the primary cluster for this node */
326
+ isPrimary: boolean;
327
+ /** When the node was assigned to this cluster */
328
+ assignedAt: Date;
329
+ }
330
+ /**
331
+ * Input for creating clusters manually
332
+ */
333
+ interface NeuronClusterCreate {
334
+ label: string;
335
+ clusterType?: string;
336
+ description?: string;
337
+ keywords?: string[];
338
+ metadata?: Record<string, unknown>;
339
+ }
340
+ /**
341
+ * Input for updating clusters
342
+ */
343
+ interface NeuronClusterUpdate {
344
+ label?: string;
345
+ description?: string;
346
+ keywords?: string[];
347
+ metadata?: Record<string, unknown>;
348
+ }
349
+ /**
350
+ * Visual cluster representation
351
+ * Used for static/authored clusters with explicit membership
352
+ */
353
+ interface NeuronVisualCluster {
354
+ id: string;
355
+ label: string;
356
+ /** Explicit list of node IDs in this cluster */
357
+ nodeIds: string[];
358
+ /** Optional color override (CSS color string) */
359
+ color?: string;
360
+ /** Optional fixed center position for the cluster */
361
+ position?: {
362
+ x: number;
363
+ y: number;
364
+ z: number;
365
+ };
366
+ /** Optional metadata */
367
+ metadata?: Record<string, unknown>;
368
+ }
369
+ /**
370
+ * Clustering algorithm options
371
+ */
372
+ type ClusteringAlgorithm = 'kmeans' | 'dbscan' | 'hierarchical';
373
+ /**
374
+ * Clustering configuration
375
+ */
376
+ interface ClusteringConfig {
377
+ /** Algorithm to use */
378
+ algorithm: ClusteringAlgorithm;
379
+ /** Target number of clusters (for k-means) */
380
+ clusterCount?: number;
381
+ /** Minimum cluster size */
382
+ minClusterSize?: number;
383
+ /** Similarity threshold for cluster assignment */
384
+ similarityThreshold?: number;
385
+ /** Epsilon for DBSCAN */
386
+ epsilon?: number;
387
+ /** Min samples for DBSCAN */
388
+ minSamples?: number;
389
+ }
390
+
391
+ export type { AnalysisStatus as A, BuiltInRelationshipType as B, ClusteringAlgorithm as C, EdgeEvidence as E, InferredRelationship as I, NeuronVisualNode as N, RelationshipType as R, NeuronVisualEdge as a, NeuronVisualCluster as b, NeuronNode as c, NeuronEdge as d, NodeStatus as e, NodeTier as f, NeuronNodeCreate as g, NeuronCluster as h, NeuronNodeUpdate as i, NeuronEdgeCreate as j, NeuronEdgeUpdate as k, ClusterMembership as l, NeuronNodeBase as m, NeuronNodeBatchCreate as n, EdgeSource as o, NeuronClusterCreate as p, NeuronClusterUpdate as q, ClusteringConfig as r };