@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.
- package/README.md +230 -3
- package/dist/{NeuronWebExplorer-lBM0Jcf9.d.ts → NeuronWebExplorer-OYEmP22R.d.cts} +19 -3
- package/dist/{NeuronWebExplorer-7sRtXdqa.d.cts → NeuronWebExplorer-XMtk_7z-.d.ts} +19 -3
- package/dist/api/index.d.cts +3 -3
- package/dist/api/index.d.ts +3 -3
- package/dist/{chunk-5SZ37JXQ.cjs → chunk-A5KXAYKG.cjs} +519 -9
- package/dist/chunk-A5KXAYKG.cjs.map +1 -0
- package/dist/{chunk-XSDOIONK.js → chunk-QSSXMXPT.js} +518 -10
- package/dist/chunk-QSSXMXPT.js.map +1 -0
- package/dist/{edge-U2Qgwg-K.d.cts → cluster-CU_pBUcK.d.cts} +123 -1
- package/dist/{edge-U2Qgwg-K.d.ts → cluster-CU_pBUcK.d.ts} +123 -1
- package/dist/index.cjs +655 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -7
- package/dist/index.d.ts +66 -7
- package/dist/index.js +641 -4
- package/dist/index.js.map +1 -1
- package/dist/{query-helpers-DMnkjfO0.d.cts → query-helpers-CA23s1ct.d.cts} +2 -102
- package/dist/{query-helpers-BpVwXZJk.d.ts → query-helpers-CdDGFiK3.d.ts} +2 -102
- package/dist/visualization/index.cjs +22 -14
- package/dist/visualization/index.d.cts +19 -6
- package/dist/visualization/index.d.ts +19 -6
- package/dist/visualization/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-5SZ37JXQ.cjs.map +0 -1
- package/dist/chunk-XSDOIONK.js.map +0 -1
|
@@ -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
|
-
|
|
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
|
-
|
|
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 };
|