@cnstra/core 1.6.0 → 1.8.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.
- package/README.md +47 -24
- package/dist/CNS.d.ts +12 -83
- package/dist/CNS.d.ts.map +1 -1
- package/dist/CNSNetwork.d.ts +87 -0
- package/dist/CNSNetwork.d.ts.map +1 -0
- package/dist/CNSNeuronActivationPump.d.ts +27 -0
- package/dist/CNSNeuronActivationPump.d.ts.map +1 -0
- package/dist/CNSStimulation.d.ts +27 -6
- package/dist/CNSStimulation.d.ts.map +1 -1
- package/dist/index.cjs +324 -304
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +324 -304
- package/dist/index.js.map +1 -1
- package/dist/interfaces/ICNS.d.ts +12 -24
- package/dist/interfaces/ICNS.d.ts.map +1 -1
- package/dist/interfaces/ICNSStimulationContextStore.d.ts +3 -2
- package/dist/interfaces/ICNSStimulationContextStore.d.ts.map +1 -1
- package/dist/types/TCNSDendrite.d.ts +2 -2
- package/dist/types/TCNSDendrite.d.ts.map +1 -1
- package/dist/types/TCNSNeuronActivationTask.d.ts +8 -0
- package/dist/types/TCNSNeuronActivationTask.d.ts.map +1 -0
- package/dist/types/TCNSNeuronActivationTaskFailure.d.ts +7 -0
- package/dist/types/TCNSNeuronActivationTaskFailure.d.ts.map +1 -0
- package/dist/types/TCNSSignal.d.ts.map +1 -1
- package/dist/types/TCNSStimulationOptions.d.ts +6 -5
- package/dist/types/TCNSStimulationOptions.d.ts.map +1 -1
- package/dist/types/TCNSStimulationResponse.d.ts +11 -4
- package/dist/types/TCNSStimulationResponse.d.ts.map +1 -1
- package/dist/types/TCNSStimulationSerializedContextValue.d.ts +4 -0
- package/dist/types/TCNSStimulationSerializedContextValue.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/CNSFunctionalQueue.d.ts +0 -26
- package/dist/CNSFunctionalQueue.d.ts.map +0 -1
- package/dist/types/TCNSSerializedSignal.d.ts +0 -10
- package/dist/types/TCNSSerializedSignal.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -81,10 +81,11 @@ const userService = neuron('user-service', {
|
|
|
81
81
|
const cns = new CNS([userService]);
|
|
82
82
|
|
|
83
83
|
// Stimulate the system
|
|
84
|
-
|
|
84
|
+
const stimulation = cns.stimulate(userCreated.createSignal({
|
|
85
85
|
id: '123',
|
|
86
86
|
name: 'John Doe'
|
|
87
87
|
}));
|
|
88
|
+
await stimulation.waitUntilComplete();
|
|
88
89
|
```
|
|
89
90
|
|
|
90
91
|
## 📚 API Reference
|
|
@@ -206,20 +207,22 @@ cns.stimulate(signal | signal[], options?)
|
|
|
206
207
|
- `signal`: A signal or array of signals created by `collateral.createSignal(payload)`
|
|
207
208
|
- `options`: Optional stimulation configuration
|
|
208
209
|
|
|
209
|
-
**Returns:** `
|
|
210
|
+
**Returns:** `CNSStimulation` instance. Use `stimulation.waitUntilComplete()` to await completion.
|
|
210
211
|
|
|
211
212
|
**Example:**
|
|
212
213
|
```typescript
|
|
213
214
|
// Single signal
|
|
214
|
-
|
|
215
|
+
const stimulation = cns.stimulate(
|
|
215
216
|
userCreated.createSignal({ id: '123', name: 'John' })
|
|
216
217
|
);
|
|
218
|
+
await stimulation.waitUntilComplete();
|
|
217
219
|
|
|
218
220
|
// Multiple signals at once
|
|
219
|
-
|
|
221
|
+
const stimulation = cns.stimulate([
|
|
220
222
|
userCreated.createSignal({ id: '123', name: 'John' }),
|
|
221
223
|
userCreated.createSignal({ id: '456', name: 'Jane' })
|
|
222
224
|
]);
|
|
225
|
+
await stimulation.waitUntilComplete();
|
|
223
226
|
```
|
|
224
227
|
|
|
225
228
|
## ⚙️ Stimulation Options
|
|
@@ -228,16 +231,17 @@ await cns.stimulate([
|
|
|
228
231
|
Prevents infinite loops by limiting signal traversal depth.
|
|
229
232
|
|
|
230
233
|
```typescript
|
|
231
|
-
|
|
234
|
+
const stimulation = cns.stimulate(signal, {
|
|
232
235
|
maxNeuronHops: 50 // Stop after 50 neuron hops
|
|
233
236
|
});
|
|
237
|
+
await stimulation.waitUntilComplete();
|
|
234
238
|
```
|
|
235
239
|
|
|
236
240
|
### `onResponse?: (response) => void`
|
|
237
241
|
Real-time callback for monitoring signal flow and completion.
|
|
238
242
|
|
|
239
243
|
```typescript
|
|
240
|
-
|
|
244
|
+
const stimulation = cns.stimulate(signal, {
|
|
241
245
|
onResponse: (response) => {
|
|
242
246
|
console.log(`Signal: ${response.outputSignal?.collateral.id}`);
|
|
243
247
|
console.log(`Hops: ${response.hops}`);
|
|
@@ -251,13 +255,17 @@ await cns.stimulate(signal, {
|
|
|
251
255
|
}
|
|
252
256
|
}
|
|
253
257
|
});
|
|
258
|
+
await stimulation.waitUntilComplete();
|
|
254
259
|
```
|
|
255
260
|
|
|
256
261
|
**Response Object:**
|
|
257
|
-
- `
|
|
258
|
-
- `
|
|
262
|
+
- `inputSignal` — The input signal being ingested (if any)
|
|
263
|
+
- `outputSignal` — The output signal being processed (if any)
|
|
264
|
+
- `contextValue` — The context value for this stimulation
|
|
259
265
|
- `queueLength` — Remaining signals in processing queue (0 = complete)
|
|
266
|
+
- `stimulation` — Reference to the CNSStimulation instance
|
|
260
267
|
- `error` — Any error that occurred during processing
|
|
268
|
+
- `hops` — Number of neuron hops taken so far (only present if maxNeuronHops is set)
|
|
261
269
|
- `stimulationId` — Unique identifier for this stimulation
|
|
262
270
|
|
|
263
271
|
### `abortSignal?: AbortSignal`
|
|
@@ -266,12 +274,13 @@ Gracefully stop stimulation using AbortController.
|
|
|
266
274
|
```typescript
|
|
267
275
|
const controller = new AbortController();
|
|
268
276
|
|
|
269
|
-
cns.stimulate(signal, {
|
|
277
|
+
const stimulation = cns.stimulate(signal, {
|
|
270
278
|
abortSignal: controller.signal
|
|
271
279
|
});
|
|
272
280
|
|
|
273
281
|
// Cancel after 5 seconds
|
|
274
282
|
setTimeout(() => controller.abort(), 5000);
|
|
283
|
+
await stimulation.waitUntilComplete();
|
|
275
284
|
```
|
|
276
285
|
Inside dendrites, read it via `ctx.abortSignal`.
|
|
277
286
|
|
|
@@ -279,27 +288,30 @@ Inside dendrites, read it via `ctx.abortSignal`.
|
|
|
279
288
|
Custom identifier for this stimulation cascade. Auto-generated if not provided.
|
|
280
289
|
|
|
281
290
|
```typescript
|
|
282
|
-
|
|
291
|
+
const stimulation = cns.stimulate(signal, {
|
|
283
292
|
stimulationId: 'user-action-' + Date.now()
|
|
284
293
|
});
|
|
294
|
+
await stimulation.waitUntilComplete();
|
|
285
295
|
```
|
|
286
296
|
|
|
287
297
|
### `allowName?: (collateralName: string) => boolean`
|
|
288
298
|
Filter which collateral names can be processed.
|
|
289
299
|
|
|
290
300
|
```typescript
|
|
291
|
-
|
|
301
|
+
const stimulation = cns.stimulate(signal, {
|
|
292
302
|
allowName: (name) => name.startsWith('user:') // Only process user-related signals
|
|
293
303
|
});
|
|
304
|
+
await stimulation.waitUntilComplete();
|
|
294
305
|
```
|
|
295
306
|
|
|
296
307
|
### `concurrency?: number` (default: unlimited)
|
|
297
308
|
Limit concurrent operations to prevent resource exhaustion.
|
|
298
309
|
|
|
299
310
|
```typescript
|
|
300
|
-
|
|
311
|
+
const stimulation = cns.stimulate(signal, {
|
|
301
312
|
concurrency: 10 // Max 10 operations at once
|
|
302
313
|
});
|
|
314
|
+
await stimulation.waitUntilComplete();
|
|
303
315
|
```
|
|
304
316
|
|
|
305
317
|
#### Per‑neuron global concurrency
|
|
@@ -314,18 +326,20 @@ const worker = neuron('worker', { out })
|
|
|
314
326
|
Provide existing context store for recovery/retry scenarios.
|
|
315
327
|
|
|
316
328
|
```typescript
|
|
317
|
-
|
|
329
|
+
const stimulation = cns.stimulate(signal, {
|
|
318
330
|
ctx: savedContextStore // Restore previous state
|
|
319
331
|
});
|
|
332
|
+
await stimulation.waitUntilComplete();
|
|
320
333
|
```
|
|
321
334
|
|
|
322
335
|
### `createContextStore?: () => ICNSStimulationContextStore`
|
|
323
336
|
Factory for custom context store implementations.
|
|
324
337
|
|
|
325
338
|
```typescript
|
|
326
|
-
|
|
339
|
+
const stimulation = cns.stimulate(signal, {
|
|
327
340
|
createContextStore: () => new CustomContextStore()
|
|
328
341
|
});
|
|
342
|
+
await stimulation.waitUntilComplete();
|
|
329
343
|
```
|
|
330
344
|
|
|
331
345
|
## 🔄 Signal Flow Patterns
|
|
@@ -353,7 +367,8 @@ const step2 = neuron('step2', { output }).dendrite({
|
|
|
353
367
|
|
|
354
368
|
const cns = new CNS([step1, step2]);
|
|
355
369
|
|
|
356
|
-
|
|
370
|
+
const stimulation = cns.stimulate(input.createSignal({ value: 5 }));
|
|
371
|
+
await stimulation.waitUntilComplete();
|
|
357
372
|
// Flows: input(5) → middle(10) → output("Final: 10")
|
|
358
373
|
```
|
|
359
374
|
|
|
@@ -381,8 +396,10 @@ const counter = withCtx<{ total: number }>()
|
|
|
381
396
|
|
|
382
397
|
const cns = new CNS([counter]);
|
|
383
398
|
|
|
384
|
-
|
|
385
|
-
await
|
|
399
|
+
const stimulation1 = cns.stimulate(input.createSignal({ increment: 5 }));
|
|
400
|
+
await stimulation1.waitUntilComplete(); // count: 5
|
|
401
|
+
const stimulation2 = cns.stimulate(input.createSignal({ increment: 3 }));
|
|
402
|
+
await stimulation2.waitUntilComplete(); // count: 8 (separate context)
|
|
386
403
|
```
|
|
387
404
|
|
|
388
405
|
### Multiple Signals (Fan-out Pattern)
|
|
@@ -428,9 +445,10 @@ const inventoryService = neuron('inventory-service', {}).dendrite({
|
|
|
428
445
|
const cns = new CNS([orderProcessor, inventoryService /* ... */]);
|
|
429
446
|
|
|
430
447
|
// Single order triggers multiple parallel operations
|
|
431
|
-
|
|
448
|
+
const stimulation = cns.stimulate(
|
|
432
449
|
orderPlaced.createSignal({ orderId: 'ORD-001', items: ['A', 'B', 'C'] })
|
|
433
450
|
);
|
|
451
|
+
await stimulation.waitUntilComplete();
|
|
434
452
|
// Flows: orderPlaced → [inventory(A), inventory(B), inventory(C), email, audit]
|
|
435
453
|
```
|
|
436
454
|
|
|
@@ -459,10 +477,11 @@ const validator = neuron('validator', { success, error, audit }).dendrite({
|
|
|
459
477
|
**Starting with Multiple Signals:**
|
|
460
478
|
```typescript
|
|
461
479
|
// Process multiple orders in parallel
|
|
462
|
-
|
|
480
|
+
const stimulation = cns.stimulate([
|
|
463
481
|
orderPlaced.createSignal({ orderId: 'ORD-001', items: ['X'] }),
|
|
464
482
|
orderPlaced.createSignal({ orderId: 'ORD-002', items: ['Y', 'Z'] })
|
|
465
483
|
]);
|
|
484
|
+
await stimulation.waitUntilComplete();
|
|
466
485
|
```
|
|
467
486
|
|
|
468
487
|
See [Multiple Signals Recipe](https://cnstra.org/docs/recipes/multiple-signals) for more patterns and best practices.
|
|
@@ -550,7 +569,7 @@ const cns = new CNS([eventStore, stateManager]);
|
|
|
550
569
|
Errors are delivered immediately via `onResponse` callbacks:
|
|
551
570
|
|
|
552
571
|
```typescript
|
|
553
|
-
|
|
572
|
+
const stimulation = cns.stimulate(signal, {
|
|
554
573
|
onResponse: (response) => {
|
|
555
574
|
if (response.error) {
|
|
556
575
|
console.error(`Error in neuron processing:`, response.error);
|
|
@@ -566,26 +585,29 @@ await cns.stimulate(signal, {
|
|
|
566
585
|
}
|
|
567
586
|
}
|
|
568
587
|
});
|
|
588
|
+
await stimulation.waitUntilComplete();
|
|
569
589
|
```
|
|
570
590
|
|
|
571
591
|
**Error Recovery with Context:**
|
|
572
592
|
```typescript
|
|
573
593
|
let savedContext: ICNSStimulationContextStore | undefined;
|
|
574
594
|
|
|
575
|
-
|
|
595
|
+
const stimulation = cns.stimulate(signal, {
|
|
576
596
|
onResponse: (response) => {
|
|
577
597
|
if (response.error) {
|
|
578
598
|
// Save context for retry
|
|
579
|
-
savedContext = response.
|
|
599
|
+
savedContext = response.stimulation.getContext();
|
|
580
600
|
}
|
|
581
601
|
}
|
|
582
602
|
});
|
|
603
|
+
await stimulation.waitUntilComplete();
|
|
583
604
|
|
|
584
605
|
// Retry with preserved context
|
|
585
606
|
if (savedContext) {
|
|
586
|
-
|
|
607
|
+
const retryStimulation = cns.stimulate(retrySignal, {
|
|
587
608
|
ctx: savedContext
|
|
588
609
|
});
|
|
610
|
+
await retryStimulation.waitUntilComplete();
|
|
589
611
|
}
|
|
590
612
|
```
|
|
591
613
|
|
|
@@ -605,9 +627,10 @@ class RedisContextStore implements ICNSStimulationContextStore {
|
|
|
605
627
|
}
|
|
606
628
|
}
|
|
607
629
|
|
|
608
|
-
|
|
630
|
+
const stimulation = cns.stimulate(signal, {
|
|
609
631
|
createContextStore: () => new RedisContextStore(redisClient, 'session-123')
|
|
610
632
|
});
|
|
633
|
+
await stimulation.waitUntilComplete();
|
|
611
634
|
```
|
|
612
635
|
|
|
613
636
|
### CNS Configuration
|
package/dist/CNS.d.ts
CHANGED
|
@@ -1,42 +1,21 @@
|
|
|
1
1
|
import { TCNSNeuron } from './types/TCNSNeuron';
|
|
2
2
|
import { TCNSDendrite } from './types/TCNSDendrite';
|
|
3
|
-
import { ICNS } from './interfaces/ICNS';
|
|
4
|
-
import { TCNSSubscriber } from './types/TCNSSubscriber';
|
|
5
3
|
import { TCNSOptions } from './types/TCNSOptions';
|
|
6
4
|
import { TCNSStimulationOptions } from './types/TCNSStimulationOptions';
|
|
7
|
-
import {
|
|
5
|
+
import { CNSStimulation } from './CNSStimulation';
|
|
8
6
|
import { TCNSSignal } from './types/TCNSSignal';
|
|
9
7
|
import { CNSInstanceNeuronQueue } from './CNSInstanceNeuronQueue';
|
|
10
8
|
import { TCNSStimulationResponse } from './types/TCNSStimulationResponse';
|
|
11
|
-
|
|
9
|
+
import { TCNSNeuronActivationTask } from './types/TCNSNeuronActivationTask';
|
|
10
|
+
import { CNSNetwork } from './CNSNetwork';
|
|
11
|
+
import { ICNS } from './interfaces/ICNS';
|
|
12
|
+
export declare class CNS<TCollateralName extends string, TNeuronName extends string, TNeuron extends TCNSNeuron<any, TNeuronName, any, any, any, any, any>, TDendrite extends TCNSDendrite<any, any, any, any, any, any>> implements Omit<ICNS<TCollateralName, TNeuronName, TNeuron, TDendrite>, 'stimulate'> {
|
|
12
13
|
protected readonly neurons: TNeuron[];
|
|
13
14
|
readonly options?: TCNSOptions | undefined;
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
-
* Built once at construction time.
|
|
17
|
-
*/
|
|
18
|
-
private subIndex;
|
|
19
|
-
private neuronIndex;
|
|
20
|
-
private dendriteIndex;
|
|
21
|
-
private collateralIndex;
|
|
22
|
-
private parentNeuronByCollateralName;
|
|
23
|
-
/**
|
|
24
|
-
* Strongly Connected Components of the neuron graph.
|
|
25
|
-
* Each component is a set of neuron IDs that can reach each other.
|
|
16
|
+
* Network graph analysis and strongly connected components.
|
|
26
17
|
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Quick lookup: neuron ID -> SCC index for fast reachability checks.
|
|
30
|
-
*/
|
|
31
|
-
private neuronToSCC;
|
|
32
|
-
/**
|
|
33
|
-
* DAG of SCCs: SCC index -> set of SCC indices that can reach this SCC
|
|
34
|
-
*/
|
|
35
|
-
private sccDag;
|
|
36
|
-
/**
|
|
37
|
-
* Precomputed ancestor sets for each SCC for fast reachability checks
|
|
38
|
-
*/
|
|
39
|
-
private sccAncestors;
|
|
18
|
+
readonly network: CNSNetwork<TCollateralName, TNeuronName, TNeuron, TDendrite>;
|
|
40
19
|
/**
|
|
41
20
|
* Global per-neuron concurrency gates shared across all stimulations.
|
|
42
21
|
*/
|
|
@@ -45,68 +24,18 @@ export declare class CNS<TCollateralName extends string, TNeuronName extends str
|
|
|
45
24
|
* Global task queue used by stimulation to schedule per-neuron gated work.
|
|
46
25
|
* Does not replace per-stimulation concurrency; only coordinates global per-neuron limits.
|
|
47
26
|
*/
|
|
48
|
-
private readonly globalTaskQueue;
|
|
49
27
|
protected readonly instanceNeuronQueue: CNSInstanceNeuronQueue<TNeuron>;
|
|
50
28
|
/**
|
|
51
29
|
* Global response listeners applied to every stimulation.
|
|
52
30
|
*/
|
|
53
31
|
private readonly globalResponseListeners;
|
|
54
32
|
constructor(neurons: TNeuron[], options?: TCNSOptions | undefined);
|
|
33
|
+
addResponseListener<TInputPayload, TOutputPayload>(listener: (response: TCNSStimulationResponse<TCollateralName, TInputPayload, TOutputPayload, TNeuronName>) => void | Promise<void>): () => void;
|
|
34
|
+
private wrapOnResponse;
|
|
35
|
+
stimulate<TInputPayload extends TOutputPayload, TOutputPayload = TInputPayload>(signalOrSignals: TCNSSignal<TCollateralName, TInputPayload> | TCNSSignal<TCollateralName, TInputPayload>[], options?: TCNSStimulationOptions<TCollateralName, TInputPayload, TOutputPayload, TNeuronName, TNeuron, TDendrite>): CNSStimulation<TCollateralName, TNeuronName, TNeuron, TDendrite, TInputPayload, TOutputPayload>;
|
|
55
36
|
/**
|
|
56
|
-
*
|
|
57
|
-
* - neuron names are unique and non-empty
|
|
58
|
-
* - axon collateral types are globally unique (single owner)
|
|
59
|
-
* - the same collateral instance cannot be owned by multiple neurons
|
|
60
|
-
* Throws aggregated error if violations are found.
|
|
61
|
-
*/
|
|
62
|
-
private validateUniqueIdentifiers;
|
|
63
|
-
addResponseListener(listener: <TInputPayload, TOutputPayload>(response: TCNSStimulationResponse<TCollateralName, TInputPayload, TOutputPayload>) => void | Promise<void>): () => void;
|
|
64
|
-
wrapOnResponse<T>(local?: (response: T) => void | Promise<void>): (response: T) => void | Promise<void>;
|
|
65
|
-
protected runWithNeuronConcurrency(neuron: TNeuron, fn: () => (() => void) | Promise<() => void>): Promise<void>;
|
|
66
|
-
private buildIndexes;
|
|
67
|
-
/**
|
|
68
|
-
* Build the neuron graph where neurons are connected if one can stimulate the other.
|
|
69
|
-
*/
|
|
70
|
-
private buildNeuronGraph;
|
|
71
|
-
/**
|
|
72
|
-
* Build strongly connected components using Tarjan's algorithm.
|
|
73
|
-
*/
|
|
74
|
-
private buildSCC;
|
|
75
|
-
/**
|
|
76
|
-
* Build DAG between SCCs based on the original neuron graph
|
|
77
|
-
*/
|
|
78
|
-
private buildSCCDAG;
|
|
79
|
-
/**
|
|
80
|
-
* Precompute ancestor sets for each SCC for fast reachability checks
|
|
81
|
-
* Uses topological sort for efficient computation
|
|
82
|
-
*/
|
|
83
|
-
private buildSCCAncestors;
|
|
84
|
-
/**
|
|
85
|
-
* Get outgoing edges for a given SCC index
|
|
86
|
-
*/
|
|
87
|
-
private getOutgoingEdges;
|
|
88
|
-
/**
|
|
89
|
-
* Check if a neuron can be reached again (including self-calling).
|
|
90
|
-
* Returns true if the neuron is in a strongly connected component with more than one member,
|
|
91
|
-
* or if it's in a single-member SCC that can reach itself.
|
|
92
|
-
*/
|
|
93
|
-
getSCCSetByNeuronName(neuronName: string): Set<string> | undefined;
|
|
94
|
-
/**
|
|
95
|
-
* Get the SCC index for a given neuron ID
|
|
96
|
-
*/
|
|
97
|
-
getSccIndexByNeuronName(neuronName: string): number | undefined;
|
|
98
|
-
/**
|
|
99
|
-
* Check if a neuron can be guaranteed not to be visited again during the current propagation.
|
|
100
|
-
* This is the core logic for safe context cleanup.
|
|
37
|
+
* Start a stimulation with activation tasks directly
|
|
101
38
|
*/
|
|
102
|
-
|
|
103
|
-
getParentNeuronByCollateralName(collateralName: TCollateralName): TNeuron | undefined;
|
|
104
|
-
getDendrites(): TDendrite[];
|
|
105
|
-
getCollaterals(): CNSCollateral<TCollateralName, unknown>[];
|
|
106
|
-
getNeurons(): TNeuron[];
|
|
107
|
-
getCollateralByName<TName extends string = string>(collateralName: TName): CNSCollateral<TName, unknown> | undefined;
|
|
108
|
-
getNeuronByName<TName extends string = string>(neuronName: TName): TNeuron | undefined;
|
|
109
|
-
getSubscribers(collateralName: TCollateralName): TCNSSubscriber<TNeuron, TDendrite>[];
|
|
110
|
-
stimulate<TInputPayload extends TOutputPayload, TOutputPayload>(signalOrSignals: TCNSSignal<TCollateralName, TInputPayload> | TCNSSignal<TCollateralName, TInputPayload>[], options?: TCNSStimulationOptions<TCollateralName, TInputPayload, TOutputPayload>): Promise<void>;
|
|
39
|
+
activate<TInputPayload, TOutputPayload>(tasks: TCNSNeuronActivationTask<TCollateralName, TNeuronName>[], options?: TCNSStimulationOptions<TCollateralName, TInputPayload, TOutputPayload, TNeuronName, TNeuron, TDendrite>): CNSStimulation<TCollateralName, TNeuronName, TNeuron, TDendrite, TInputPayload, TOutputPayload>;
|
|
111
40
|
}
|
|
112
41
|
//# sourceMappingURL=CNS.d.ts.map
|
package/dist/CNS.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CNS.d.ts","sourceRoot":"","sources":["../src/CNS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CNS.d.ts","sourceRoot":"","sources":["../src/CNS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,qBAAa,GAAG,CACZ,eAAe,SAAS,MAAM,EAC9B,WAAW,SAAS,MAAM,EAC1B,OAAO,SAAS,UAAU,CAAC,G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,EACf,WAAW,EACX,OAAO,EACP,SAAS,EACT,aAAa,EACb,cAAc,CACjB;IAiBD;;OAEG;IACI,QAAQ,CAAC,aAAa,EAAE,cAAc,EACzC,KAAK,EAAE,wBAAwB,CAAC,eAAe,EAAE,WAAW,CAAC,EAAE,EAC/D,OAAO,CAAC,EAAE,sBAAsB,CAC5B,eAAe,EACf,aAAa,EACb,cAAc,EACd,WAAW,EACX,OAAO,EACP,SAAS,CACZ,GACF,cAAc,CACb,eAAe,EACf,WAAW,EACX,OAAO,EACP,SAAS,EACT,aAAa,EACb,cAAc,CACjB;CAgBJ"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { TCNSNeuron } from './types/TCNSNeuron';
|
|
2
|
+
import { TCNSSubscriber } from './types/TCNSSubscriber';
|
|
3
|
+
import { TCNSDendrite } from './types/TCNSDendrite';
|
|
4
|
+
import { CNSCollateral } from './CNSCollateral';
|
|
5
|
+
export declare class CNSNetwork<TCollateralName extends string, TNeuronName extends string, TNeuron extends TCNSNeuron<any, TNeuronName, any, any, any, any, any>, TDendrite extends TCNSDendrite<any, any, any, any, any, any>> {
|
|
6
|
+
private readonly neurons;
|
|
7
|
+
/**
|
|
8
|
+
* Strongly Connected Components of the neuron graph.
|
|
9
|
+
* Each component is a set of neuron IDs that can reach each other.
|
|
10
|
+
*/
|
|
11
|
+
stronglyConnectedComponents: Set<string>[];
|
|
12
|
+
/**
|
|
13
|
+
* Quick lookup: neuron ID -> SCC index for fast reachability checks.
|
|
14
|
+
*/
|
|
15
|
+
private neuronToSCC;
|
|
16
|
+
/**
|
|
17
|
+
* DAG of SCCs: SCC index -> set of SCC indices that can reach this SCC
|
|
18
|
+
*/
|
|
19
|
+
private sccDag;
|
|
20
|
+
/**
|
|
21
|
+
* Precomputed ancestor sets for each SCC for fast reachability checks
|
|
22
|
+
*/
|
|
23
|
+
private sccAncestors;
|
|
24
|
+
/**
|
|
25
|
+
* Fast lookup: collateralName -> list of (neuron, dendrite) subscribers.
|
|
26
|
+
* Built once at construction time.
|
|
27
|
+
*/
|
|
28
|
+
private subIndex;
|
|
29
|
+
private neuronIndex;
|
|
30
|
+
private dendriteIndex;
|
|
31
|
+
private collateralIndex;
|
|
32
|
+
private parentNeuronByCollateralName;
|
|
33
|
+
constructor(neurons: TNeuron[]);
|
|
34
|
+
/**
|
|
35
|
+
* Validate uniqueness constraints:
|
|
36
|
+
* - neuron names are unique and non-empty
|
|
37
|
+
* - axon collateral types are globally unique (single owner)
|
|
38
|
+
* - the same collateral instance cannot be owned by multiple neurons
|
|
39
|
+
* Throws aggregated error if violations are found.
|
|
40
|
+
*/
|
|
41
|
+
private validateUniqueIdentifiers;
|
|
42
|
+
/**
|
|
43
|
+
* Build the neuron graph where neurons are connected if one can stimulate the other.
|
|
44
|
+
*/
|
|
45
|
+
private buildNeuronGraph;
|
|
46
|
+
/**
|
|
47
|
+
* Build strongly connected components using Tarjan's algorithm.
|
|
48
|
+
*/
|
|
49
|
+
private buildSCC;
|
|
50
|
+
/**
|
|
51
|
+
* Build DAG between SCCs based on the original neuron graph
|
|
52
|
+
*/
|
|
53
|
+
private buildSCCDAG;
|
|
54
|
+
/**
|
|
55
|
+
* Precompute ancestor sets for each SCC for fast reachability checks
|
|
56
|
+
* Uses topological sort for efficient computation
|
|
57
|
+
*/
|
|
58
|
+
private buildSCCAncestors;
|
|
59
|
+
/**
|
|
60
|
+
* Get outgoing edges for a given SCC index
|
|
61
|
+
*/
|
|
62
|
+
private getOutgoingEdges;
|
|
63
|
+
/**
|
|
64
|
+
* Check if a neuron can be reached again (including self-calling).
|
|
65
|
+
* Returns true if the neuron is in a strongly connected component with more than one member,
|
|
66
|
+
* or if it's in a single-member SCC that can reach itself.
|
|
67
|
+
*/
|
|
68
|
+
getSCCSetByNeuronName(neuronName: string): Set<string> | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Get the SCC index for a given neuron ID
|
|
71
|
+
*/
|
|
72
|
+
getSccIndexByNeuronName(neuronName: string): number | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Check if a neuron can be guaranteed not to be visited again during the current propagation.
|
|
75
|
+
* This is the core logic for safe context cleanup.
|
|
76
|
+
*/
|
|
77
|
+
canNeuronBeGuaranteedDone(neuronName: string, activeSccCounts: Map<number, number>): boolean;
|
|
78
|
+
private buildIndexes;
|
|
79
|
+
getParentNeuronByCollateralName(collateralName: TCollateralName): TNeuron | undefined;
|
|
80
|
+
getDendrites(): TDendrite[];
|
|
81
|
+
getCollaterals(): CNSCollateral<TCollateralName, unknown>[];
|
|
82
|
+
getNeurons(): TNeuron[];
|
|
83
|
+
getCollateralByName<TName extends string = string>(collateralName: TName): CNSCollateral<TName, unknown> | undefined;
|
|
84
|
+
getNeuronByName<TName extends string = string>(neuronName: TName): TNeuron | undefined;
|
|
85
|
+
getSubscribers(collateralName: TCollateralName): TCNSSubscriber<TNeuron, TDendrite>[];
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=CNSNetwork.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CNSNetwork.d.ts","sourceRoot":"","sources":["../src/CNSNetwork.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,UAAU,CACnB,eAAe,SAAS,MAAM,EAC9B,WAAW,SAAS,MAAM,EAC1B,OAAO,SAAS,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EACrE,SAAS,SAAS,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAyChD,OAAO,CAAC,QAAQ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IAIhE,cAAc,CACjB,cAAc,EAAE,eAAe,GAChC,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE;CAG1C"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TCNSNeuronActivationTask } from './types/TCNSNeuronActivationTask';
|
|
2
|
+
export declare class CNSNeuronActivationPump<TCollateralName extends string, TNeuronName extends string> {
|
|
3
|
+
private readonly processor;
|
|
4
|
+
protected readonly concurrency?: number | undefined;
|
|
5
|
+
protected readonly abortSignal?: AbortSignal | undefined;
|
|
6
|
+
private items;
|
|
7
|
+
private head;
|
|
8
|
+
private tail;
|
|
9
|
+
private size;
|
|
10
|
+
private capacity;
|
|
11
|
+
protected activeOperations: number;
|
|
12
|
+
private activeTasks;
|
|
13
|
+
private pumping;
|
|
14
|
+
private needsPump;
|
|
15
|
+
constructor(processor: (neuronActivationTask: TCNSNeuronActivationTask<TCollateralName, TNeuronName>) => (() => void) | Promise<() => void>, concurrency?: number | undefined, abortSignal?: AbortSignal | undefined, initialCapacity?: number);
|
|
16
|
+
protected get canStartOperation(): boolean;
|
|
17
|
+
private resize;
|
|
18
|
+
private dequeue;
|
|
19
|
+
private enqueueItem;
|
|
20
|
+
protected pump(): void;
|
|
21
|
+
enqueue(neuronActivationTask: TCNSNeuronActivationTask<TCollateralName, TNeuronName>): void;
|
|
22
|
+
get length(): number;
|
|
23
|
+
getActiveOperationsCount(): number;
|
|
24
|
+
getQueuedTasks(): TCNSNeuronActivationTask<TCollateralName, TNeuronName>[];
|
|
25
|
+
getActiveTasks(): TCNSNeuronActivationTask<TCollateralName, TNeuronName>[];
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=CNSNeuronActivationPump.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CNSNeuronActivationPump.d.ts","sourceRoot":"","sources":["../src/CNSNeuronActivationPump.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CA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ore } from './interfaces/ICNSStimulationContextStore';
|
|
2
2
|
import { TCNSStimulationOptions } from './types/TCNSStimulationOptions';
|
|
3
3
|
import { TCNSNeuron } from './types/TCNSNeuron';
|
|
4
4
|
import { TCNSDendrite } from './types/TCNSDendrite';
|
|
5
5
|
import { TCNSSubscriber } from './types/TCNSSubscriber';
|
|
6
6
|
import { CNSInstanceNeuronQueue } from './CNSInstanceNeuronQueue';
|
|
7
7
|
import { TCNSSignal } from './types/TCNSSignal';
|
|
8
|
-
import {
|
|
8
|
+
import { TCNSNeuronActivationTask } from './types/TCNSNeuronActivationTask';
|
|
9
|
+
import { CNS } from './CNS';
|
|
10
|
+
import { TCNSNeuronActivationTaskFailure } from './types/TCNSNeuronActivationTaskFailure';
|
|
9
11
|
export declare class CNSStimulation<TCollateralName extends string, TNeuronName extends string, TNeuron extends TCNSNeuron<any, TNeuronName, TCollateralName, any, any, any, any>, TDendrite extends TCNSDendrite<any, any, any, any, any, any>, TInputPayload, TOutputPayload> {
|
|
10
12
|
private readonly cns;
|
|
11
|
-
readonly options?: TCNSStimulationOptions<TCollateralName, TInputPayload, TOutputPayload> | undefined;
|
|
13
|
+
readonly options?: TCNSStimulationOptions<TCollateralName, TInputPayload, TOutputPayload, TNeuronName> | undefined;
|
|
12
14
|
private readonly ctx;
|
|
13
15
|
private readonly queue;
|
|
14
16
|
private readonly nueronVisitMap?;
|
|
15
17
|
private readonly instanceNeuronQueue;
|
|
16
18
|
private scheduledCount;
|
|
19
|
+
private readonly pendingTasks;
|
|
20
|
+
private readonly failedTasks;
|
|
17
21
|
private completed;
|
|
18
22
|
private resolveCompleted;
|
|
19
23
|
private rejectCompleted;
|
|
20
24
|
private isCompleted;
|
|
25
|
+
private onResponseError;
|
|
21
26
|
/**
|
|
22
27
|
* Track active SCCs: SCC index -> count of active neurons in that SCC
|
|
23
28
|
*/
|
|
24
29
|
private readonly activeSccCounts;
|
|
25
30
|
readonly id: string;
|
|
26
|
-
constructor(cns:
|
|
31
|
+
constructor(cns: CNS<TCollateralName, TNeuronName, TNeuron, TDendrite>, instanceNeuronQueue: CNSInstanceNeuronQueue<TNeuron>, options?: TCNSStimulationOptions<TCollateralName, TInputPayload, TOutputPayload, TNeuronName> | undefined);
|
|
27
32
|
private tryResolveCompleted;
|
|
28
33
|
waitUntilComplete(): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Returns all current activation tasks: queued, active, and pending (scheduled but not yet enqueued)
|
|
36
|
+
*/
|
|
37
|
+
getAllActivationTasks(): TCNSNeuronActivationTask<TCollateralName, TNeuronName>[];
|
|
38
|
+
/**
|
|
39
|
+
* Returns all tasks that failed or were aborted
|
|
40
|
+
*/
|
|
41
|
+
getFailedTasks(): Array<TCNSNeuronActivationTaskFailure<TCollateralName, TNeuronName>>;
|
|
42
|
+
/**
|
|
43
|
+
* Get the context store for this stimulation
|
|
44
|
+
*/
|
|
45
|
+
getContext(): ICNSStimulationContextStore;
|
|
46
|
+
/**
|
|
47
|
+
* Enqueue activation tasks directly into the stimulation queue
|
|
48
|
+
*/
|
|
49
|
+
enqueueTasks(tasks: TCNSNeuronActivationTask<TCollateralName, TNeuronName>[]): void;
|
|
29
50
|
protected get concurrencyEnabled(): boolean;
|
|
30
51
|
protected get autoCleanupContextsEnabled(): boolean;
|
|
31
52
|
/**
|
|
@@ -49,8 +70,8 @@ export declare class CNSStimulation<TCollateralName extends string, TNeuronName
|
|
|
49
70
|
*/
|
|
50
71
|
protected canNeuronBeGuaranteedDone(neuronId: TNeuronName): boolean;
|
|
51
72
|
protected cleanupCtxIfNeeded(neuron: TNeuron): void;
|
|
52
|
-
protected createSubscriberQueueItem(subscriber: TCNSSubscriber<TNeuron, TDendrite>, inputSignal?: TCNSSignal<TCollateralName, any>):
|
|
53
|
-
private
|
|
73
|
+
protected createSubscriberQueueItem(subscriber: TCNSSubscriber<TNeuron, TDendrite>, inputSignal?: TCNSSignal<TCollateralName, any>): TCNSNeuronActivationTask<TCollateralName, TNeuronName>;
|
|
74
|
+
private executeActivationTask;
|
|
54
75
|
protected processResponseOrResponses(inputSignal?: TCNSSignal<TCollateralName, TInputPayload>, outputSignalOrSignals?: TCNSSignal<TCollateralName, TOutputPayload> | TCNSSignal<TCollateralName, TOutputPayload>[], error?: any): void;
|
|
55
76
|
protected processResponse(inputSignal?: TCNSSignal<TCollateralName, TInputPayload>, outputSignal?: TCNSSignal<TCollateralName, TOutputPayload>, error?: any): void;
|
|
56
77
|
responseToSignal(signalOrSignals: TCNSSignal<TCollateralName, TOutputPayload> | TCNSSignal<TCollateralName, TOutputPayload>[]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CNSStimulation.d.ts","sourceRoot":"","sources":["../src/CNSStimulation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CNSStimulation.d.ts","sourceRoot":"","sources":["../src/CNSStimulation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAE1F,qBAAa,cAAc,CACvB,eAAe,SAAS,MAAM,EAC9B,WAAW,SAAS,MAAM,EAC1B,OAAO,SAAS,UAAU,CACtB,GAAG,EACH,WAAW,EACX,eAAe,EACf,GAAG,EACH,GAA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