@reicek/neataptic-ts 0.1.26 → 0.1.27

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 (123) hide show
  1. package/.github/agents/boundary-mapper.agent.md +13 -8
  2. package/.github/agents/docs-scout.agent.md +14 -9
  3. package/.github/agents/plan-scout.agent.md +11 -6
  4. package/.github/agents/solid-split.agent.md +33 -17
  5. package/.github/copilot-instructions.md +100 -88
  6. package/.github/skills/educational-docs/SKILL.md +90 -40
  7. package/.github/skills/educational-docs/assets/mermaid-diagram-playbook.md +141 -141
  8. package/.github/skills/educational-docs/assets/visual-style-guide.md +1 -1
  9. package/.github/skills/plan-alignment/SKILL.md +1 -1
  10. package/.github/skills/solid-split/SKILL.md +54 -35
  11. package/.github/skills/solid-split/assets/docs-checklist.md +1 -1
  12. package/.github/skills/solid-split/assets/split-plan-template.md +41 -12
  13. package/.github/skills/solid-split/assets/split-workflow-checklist.md +4 -1
  14. package/.github/skills/test-fix-workflow/SKILL.md +12 -7
  15. package/.github/skills/trace-analyzer-extension/SKILL.md +1 -1
  16. package/.github/skills/trace-analyzer-extension/assets/extension-checklist.md +1 -1
  17. package/.github/skills/trace-analyzer-extension/references/analyzer-extension-workflow.md +1 -1
  18. package/.github/skills/trace-audit-reporting/SKILL.md +1 -1
  19. package/.github/skills/trace-audit-reporting/assets/performance-report-template.md +1 -1
  20. package/.github/skills/trace-audit-reporting/references/trace-analysis-workflow.md +1 -1
  21. package/.github/skills/tracker-handoff/SKILL.md +53 -5
  22. package/package.json +1 -1
  23. package/plans/Flappy_Bird_Folder_Documentation_Pass.logs.md +42 -0
  24. package/plans/Flappy_Bird_Folder_Documentation_Pass.md +22 -104
  25. package/plans/README.md +6 -2
  26. package/plans/Roadmap.md +35 -31
  27. package/plans/analyze-trace-solid-split.logs.md +35 -0
  28. package/plans/analyze-trace-solid-split.plans.md +21 -52
  29. package/plans/architecture-solid-split.logs.md +44 -0
  30. package/plans/architecture-solid-split.plans.md +20 -653
  31. package/plans/asciiMaze-typescript-repair.logs.md +35 -0
  32. package/plans/asciiMaze-typescript-repair.plans.md +30 -36
  33. package/plans/generate-docs-solid-split.logs.md +36 -0
  34. package/plans/generate-docs-solid-split.plans.md +21 -73
  35. package/plans/methods-docs.logs.md +37 -0
  36. package/plans/methods-docs.plans.md +22 -183
  37. package/plans/methods-solid-split.logs.md +41 -0
  38. package/plans/methods-solid-split.plans.md +23 -65
  39. package/plans/neat-docs.logs.md +38 -0
  40. package/plans/neat-docs.plans.md +21 -63
  41. package/plans/neat-test-surface-repair.logs.md +38 -0
  42. package/plans/neat-test-surface-repair.plans.md +24 -24
  43. package/plans/readme-first-section-pass.logs.md +63 -0
  44. package/plans/readme-first-section-pass.plans.md +42 -0
  45. package/plans/render-docs-html-solid-split.logs.md +36 -0
  46. package/plans/render-docs-html-solid-split.plans.md +20 -54
  47. package/plans/src-no-explicit-any-cleanup.logs.md +39 -0
  48. package/plans/src-no-explicit-any-cleanup.plans.md +23 -161
  49. package/plans/utils-docs.logs.md +37 -0
  50. package/plans/utils-docs.plans.md +20 -35
  51. package/src/README.md +88 -22
  52. package/src/architecture/README.md +94 -17
  53. package/src/architecture/activationArrayPool/README.md +53 -0
  54. package/src/architecture/activationArrayPool/activationArrayPool.ts +53 -0
  55. package/src/architecture/layer/README.md +94 -5
  56. package/src/architecture/layer/layer.ts +94 -5
  57. package/src/architecture/network/README.md +85 -14
  58. package/src/architecture/network/activate/README.md +301 -213
  59. package/src/architecture/network/activate/docs.order.json +9 -0
  60. package/src/architecture/network/activate/network.activate.utils.ts +90 -0
  61. package/src/architecture/network/connect/README.md +80 -3
  62. package/src/architecture/network/connect/docs.order.json +9 -0
  63. package/src/architecture/network/connect/network.connect.utils.ts +79 -0
  64. package/src/architecture/network/deterministic/README.md +96 -12
  65. package/src/architecture/network/deterministic/docs.order.json +10 -0
  66. package/src/architecture/network/deterministic/network.deterministic.utils.ts +90 -0
  67. package/src/architecture/network/evolve/README.md +286 -228
  68. package/src/architecture/network/evolve/docs.order.json +11 -0
  69. package/src/architecture/network/evolve/network.evolve.utils.ts +59 -0
  70. package/src/architecture/network/gating/README.md +58 -16
  71. package/src/architecture/network/gating/docs.order.json +9 -0
  72. package/src/architecture/network/gating/network.gating.utils.ts +43 -0
  73. package/src/architecture/network/genetic/README.md +75 -36
  74. package/src/architecture/network/genetic/docs.order.json +10 -0
  75. package/src/architecture/network/genetic/network.genetic.utils.ts +53 -17
  76. package/src/architecture/network/network.ts +91 -46
  77. package/src/architecture/network/standalone/README.md +309 -285
  78. package/src/architecture/network/standalone/docs.order.json +13 -0
  79. package/src/architecture/network/standalone/network.standalone.utils.ts +51 -28
  80. package/src/architecture/network.ts +94 -17
  81. package/src/architecture/nodePool/README.md +53 -0
  82. package/src/architecture/nodePool/nodePool.ts +53 -0
  83. package/src/methods/README.md +80 -34
  84. package/src/methods/methods.ts +80 -34
  85. package/src/methods/mutation/README.md +39 -93
  86. package/src/methods/mutation/mutation.ts +58 -0
  87. package/src/multithreading/README.md +114 -14
  88. package/src/multithreading/docs.order.json +5 -0
  89. package/src/multithreading/multi.ts +103 -7
  90. package/src/multithreading/types.ts +6 -1
  91. package/src/multithreading/workers/README.md +72 -2
  92. package/src/multithreading/workers/browser/README.md +39 -0
  93. package/src/multithreading/workers/browser/testworker.ts +40 -0
  94. package/src/multithreading/workers/node/README.md +50 -11
  95. package/src/multithreading/workers/node/docs.order.json +4 -0
  96. package/src/multithreading/workers/node/testworker.ts +43 -3
  97. package/src/multithreading/workers/workers.ts +36 -1
  98. package/src/neat/README.md +230 -152
  99. package/src/neat/adaptive/core/README.md +99 -42
  100. package/src/neat/adaptive/core/adaptive.core.ts +71 -14
  101. package/src/neat/adaptive/core/docs.order.json +8 -0
  102. package/src/neat/docs.order.json +9 -0
  103. package/src/neat/lineage/README.md +118 -16
  104. package/src/neat/lineage/lineage.ts +115 -13
  105. package/src/neat/neat.defaults.constants.ts +91 -13
  106. package/src/neat.ts +86 -20
  107. package/src/utils/README.md +71 -21
  108. package/src/utils/memory.ts +69 -19
  109. package/test/examples/asciiMaze/browser-entry/README.md +81 -8
  110. package/test/examples/asciiMaze/browser-entry/browser-entry.ts +81 -8
  111. package/test/examples/asciiMaze/dashboardManager/README.md +68 -4
  112. package/test/examples/asciiMaze/dashboardManager/dashboardManager.ts +68 -4
  113. package/test/examples/asciiMaze/evolutionEngine/README.md +1259 -1174
  114. package/test/examples/asciiMaze/evolutionEngine/docs.order.json +10 -0
  115. package/test/examples/asciiMaze/evolutionEngine/evolutionEngine.types.ts +87 -0
  116. package/test/examples/asciiMaze/mazeMovement/README.md +81 -4
  117. package/test/examples/asciiMaze/mazeMovement/mazeMovement.ts +81 -4
  118. package/test/examples/flappy_bird/browser-entry/README.md +64 -21
  119. package/test/examples/flappy_bird/browser-entry/browser-entry.ts +64 -21
  120. package/test/examples/flappy_bird/flappy-evolution-worker/README.md +98 -10
  121. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.ts +98 -10
  122. package/test/examples/flappy_bird/simulation-shared/README.md +88 -4
  123. package/test/examples/flappy_bird/simulation-shared/simulation-shared.types.ts +88 -4
@@ -1,93 +1,92 @@
1
1
  # architecture/network/activate
2
2
 
3
- ## architecture/network/activate/network.activate.utils.types.ts
4
-
5
- ### ActivateRuntimeNetworkProps
6
-
7
- Runtime network view used by the object-graph activation pipeline.
8
-
9
- This intentionally describes the internal fields activation reads/writes
10
- (training step, RNG, regularization knobs, and slab fast-path hooks).
11
-
12
- ### ActivationOutputBuffer
13
-
14
- Pooled activation output array type acquired from the shared activation array pool.
15
-
16
- ### ActivationStats
17
-
18
- Activation telemetry collected during a single activation pass.
19
-
20
- ### BATCH_INPUTS_COLLECTION_ERROR_MESSAGE
21
-
22
- Error message used when batch activation receives a non-array container.
23
-
24
- ### BatchActivationContext
25
-
26
- Shared state used by batch activation orchestration.
27
-
28
- ### BatchRowActivationContext
29
-
30
- Shared state used while validating and activating one row in a batch.
31
-
32
- ### DEFAULT_MAX_ACTIVATION_DEPTH
33
-
34
- Default hard limit for recursive activation depth in raw activation mode.
35
-
36
- ### INITIAL_OUTPUT_WRITE_INDEX
37
-
38
- Initial write index used when collecting output activations.
39
-
40
- ### INPUT_NODE_TYPE
41
-
42
- Node role label used by activation traversal for input neurons.
43
-
44
- ### NetworkLayer
45
-
46
- Layer container type used by the layered activation paths.
47
-
48
- ### NetworkLayerNodes
49
-
50
- Node collection type attached to a single network layer.
51
-
52
- ### NO_TRACE_FAST_SLAB_TRAINING_FLAG
53
-
54
- Training flag value used by no-trace fast slab eligibility checks.
55
-
56
- ### NoTraceActivationContext
57
-
58
- Shared state used by no-trace activation orchestration and helpers.
3
+ Activation chapter for `Network` execution policy.
59
4
 
60
- ### NoTraceNodeTraversalContext
5
+ This folder answers the moment when a graph already exists and the next
6
+ question becomes: how should signal move through it right now? The same
7
+ network may be stepped for ordinary inference, training-aware forward passes,
8
+ zero-copy raw output reuse, or a sequence of batch rows. Keeping those paths
9
+ together makes the execution tradeoffs visible without mixing them into
10
+ topology or serialization code.
61
11
 
62
- Shared state used for node traversal during no-trace activation.
12
+ The important split is between graph meaning and graph execution. Node and
13
+ connection chapters explain what the structure is. `activate/` explains how
14
+ that structure is stepped: validate inputs, decide whether the slab fast path
15
+ is still legal, preserve or skip training traces, and return outputs in the
16
+ shape the caller requested.
63
17
 
64
- ### OUTPUT_NODE_TYPE
18
+ A second useful lens is to read the public exports as four modes.
19
+ `activate()` is the ordinary compatibility path. `noTraceActivate()` is the
20
+ hot inference path when trace bookkeeping would be wasteful. `activateRaw()`
21
+ keeps typed-array reuse available when pooling matters more than boxed
22
+ outputs. `activateBatch()` is the clear orchestration layer for repeated
23
+ forward passes over many rows.
65
24
 
66
- Node role label used by activation traversal for output neurons.
25
+ The performance lesson here is not "always choose the fastest path." It is
26
+ "choose the narrowest path that still matches the caller's semantics." If a
27
+ network is slab-ready, this chapter can exploit contiguous typed arrays. If a
28
+ structural edit made that layout stale, the same boundary falls back to node
29
+ traversal instead of forcing callers to understand storage internals first.
67
30
 
68
- ### OUTPUT_WRITE_INDEX_INCREMENT
69
-
70
- Increment applied after writing one output activation value.
31
+ ```mermaid
32
+ flowchart LR
33
+ classDef base fill:#08131f,stroke:#1ea7ff,color:#dff6ff,stroke-width:1px;
34
+ classDef accent fill:#0f2233,stroke:#ffd166,color:#fff4cc,stroke-width:1.5px;
71
35
 
72
- ### RawActivationContext
36
+ Input[caller input]:::base --> Modes[activate chapter]:::accent
37
+ Modes --> Trace[activate<br/>keep traces]:::base
38
+ Modes --> NoTrace[noTraceActivate<br/>inference hot path]:::base
39
+ Modes --> Raw[activateRaw<br/>typed output reuse]:::base
40
+ Modes --> Batch[activateBatch<br/>repeat over rows]:::base
41
+ ```
73
42
 
74
- Shared state used by raw activation orchestration.
43
+ ```mermaid
44
+ flowchart TD
45
+ classDef base fill:#08131f,stroke:#1ea7ff,color:#dff6ff,stroke-width:1px;
46
+ classDef accent fill:#0f2233,stroke:#ffd166,color:#fff4cc,stroke-width:1.5px;
75
47
 
76
- ### SingleNodeNoTraceActivationContext
48
+ ActivateChapter[activate/]:::accent --> Validation[input validation and contexts]:::base
49
+ ActivateChapter --> FastPath[slab fast path when layout is ready]:::base
50
+ ActivateChapter --> Traversal[node traversal fallback]:::base
51
+ ActivateChapter --> Buffers[pooled activation buffers]:::base
52
+ ```
77
53
 
78
- Shared state used while activating one node during no-trace traversal.
54
+ For background on why some activation paths preserve training traces while
55
+ others skip them, see Wikipedia contributors,
56
+ [Backpropagation](https://en.wikipedia.org/wiki/Backpropagation). This
57
+ chapter sits at the forward-pass side of that story and decides how much
58
+ training bookkeeping each call should carry along.
79
59
 
80
- ### UNDEFINED_INPUT_LENGTH_TEXT
60
+ Example: use the no-trace path when you only need inference outputs.
81
61
 
82
- Fallback text for undefined input lengths when formatting validation errors.
62
+ ```ts
63
+ const network = Network.createMLP(2, [3], 1);
64
+ const outputValues = network.noTraceActivate([0.2, 0.8]);
65
+ ```
83
66
 
84
- ### WeightNoiseApplyResult
67
+ Example: run the same network over several input rows with one orchestration
68
+ call.
85
69
 
86
- Marker returned by weight-noise application to drive safe restore logic.
70
+ ```ts
71
+ const network = Network.createMLP(2, [3], 1);
72
+ const batchOutputs = network.activateBatch(
73
+ [
74
+ [0, 1],
75
+ [1, 0],
76
+ ],
77
+ true,
78
+ );
79
+ ```
87
80
 
88
- ### WeightNoiseStats
81
+ Practical reading order:
89
82
 
90
- Weight-noise telemetry collected during a single activation pass.
83
+ 1. Start here for the public activation modes and their semantic differences.
84
+ 2. Continue into `network.activate.core.utils.ts` when you want the ordinary
85
+ forward-pass pipeline.
86
+ 3. Continue into `network.activate.raw.utils.ts` and the no-trace helpers
87
+ when typed-array reuse or inference hot paths are the next question.
88
+ 4. Finish with the context and helper files when you want the orchestration
89
+ details behind validation, batching, and fallback behavior.
91
90
 
92
91
  ## architecture/network/activate/network.activate.utils.ts
93
92
 
@@ -229,55 +228,94 @@ Example:
229
228
  const out = net.noTraceActivate([0.1, 0.2, 0.3]);
230
229
  console.log(out); // => e.g. [0.5123, 0.0441]
231
230
 
232
- ## architecture/network/activate/network.activate.raw.utils.ts
231
+ ## architecture/network/activate/network.activate.utils.types.ts
233
232
 
234
- ### activateViaNetworkDelegate
233
+ ### ActivateRuntimeNetworkProps
235
234
 
236
- ```ts
237
- activateViaNetworkDelegate(
238
- activationContext: RawActivationContext,
239
- ): number[]
240
- ```
235
+ Runtime network view used by the object-graph activation pipeline.
241
236
 
242
- Delegate raw activation to the core network activation implementation.
237
+ This intentionally describes the internal fields activation reads/writes
238
+ (training step, RNG, regularization knobs, and slab fast-path hooks).
243
239
 
244
- Parameters:
245
- - `activationContext` - - Shared raw activation state.
240
+ ### ActivationOutputBuffer
246
241
 
247
- Returns: Activation output vector.
242
+ Pooled activation output array type acquired from the shared activation array pool.
248
243
 
249
- ### activateWithSelectedReusePath
244
+ ### ActivationStats
250
245
 
251
- ```ts
252
- activateWithSelectedReusePath(
253
- activationContext: RawActivationContext,
254
- ): number[]
255
- ```
246
+ Activation telemetry collected during a single activation pass.
256
247
 
257
- Select the raw activation execution path based on runtime reuse configuration.
248
+ ### BATCH_INPUTS_COLLECTION_ERROR_MESSAGE
258
249
 
259
- Parameters:
260
- - `activationContext` - - Shared raw activation state.
250
+ Error message used when batch activation receives a non-array container.
261
251
 
262
- Returns: Activation output vector.
252
+ ### BatchActivationContext
263
253
 
264
- ### executeRawActivation
254
+ Shared state used by batch activation orchestration.
265
255
 
266
- ```ts
267
- executeRawActivation(
268
- activationContext: RawActivationContext,
269
- ): number[]
270
- ```
256
+ ### BatchRowActivationContext
271
257
 
272
- Execute raw activation through the network delegate using a compact orchestration flow.
258
+ Shared state used while validating and activating one row in a batch.
273
259
 
274
- This helper keeps the exported activation method focused on context creation while this
275
- module owns the execution path and future branching behavior.
260
+ ### DEFAULT_MAX_ACTIVATION_DEPTH
276
261
 
277
- Parameters:
278
- - `activationContext` - - Shared raw activation state.
262
+ Default hard limit for recursive activation depth in raw activation mode.
279
263
 
280
- Returns: Activation output vector from the network delegate.
264
+ ### INITIAL_OUTPUT_WRITE_INDEX
265
+
266
+ Initial write index used when collecting output activations.
267
+
268
+ ### INPUT_NODE_TYPE
269
+
270
+ Node role label used by activation traversal for input neurons.
271
+
272
+ ### NetworkLayer
273
+
274
+ Layer container type used by the layered activation paths.
275
+
276
+ ### NetworkLayerNodes
277
+
278
+ Node collection type attached to a single network layer.
279
+
280
+ ### NO_TRACE_FAST_SLAB_TRAINING_FLAG
281
+
282
+ Training flag value used by no-trace fast slab eligibility checks.
283
+
284
+ ### NoTraceActivationContext
285
+
286
+ Shared state used by no-trace activation orchestration and helpers.
287
+
288
+ ### NoTraceNodeTraversalContext
289
+
290
+ Shared state used for node traversal during no-trace activation.
291
+
292
+ ### OUTPUT_NODE_TYPE
293
+
294
+ Node role label used by activation traversal for output neurons.
295
+
296
+ ### OUTPUT_WRITE_INDEX_INCREMENT
297
+
298
+ Increment applied after writing one output activation value.
299
+
300
+ ### RawActivationContext
301
+
302
+ Shared state used by raw activation orchestration.
303
+
304
+ ### SingleNodeNoTraceActivationContext
305
+
306
+ Shared state used while activating one node during no-trace traversal.
307
+
308
+ ### UNDEFINED_INPUT_LENGTH_TEXT
309
+
310
+ Fallback text for undefined input lengths when formatting validation errors.
311
+
312
+ ### WeightNoiseApplyResult
313
+
314
+ Marker returned by weight-noise application to drive safe restore logic.
315
+
316
+ ### WeightNoiseStats
317
+
318
+ Weight-noise telemetry collected during a single activation pass.
281
319
 
282
320
  ## architecture/network/activate/network.activate.core.utils.ts
283
321
 
@@ -1139,189 +1177,245 @@ Parameters:
1139
1177
 
1140
1178
  Returns: Nothing.
1141
1179
 
1142
- ## architecture/network/activate/network.activate.batch.utils.ts
1180
+ ## architecture/network/activate/network.activate.helpers.utils.ts
1143
1181
 
1144
- ### activateSingleBatchRow
1182
+ ### createBatchActivationContext
1145
1183
 
1146
1184
  ```ts
1147
- activateSingleBatchRow(
1148
- rowActivationContext: BatchRowActivationContext,
1149
- ): number[]
1185
+ createBatchActivationContext(
1186
+ network: default,
1187
+ batchInputs: number[][],
1188
+ isTraining: boolean,
1189
+ ): BatchActivationContext
1150
1190
  ```
1151
1191
 
1152
- Validate and activate one batch row.
1192
+ Build shared batch activation context for helper orchestration.
1153
1193
 
1154
1194
  Parameters:
1155
- - `rowActivationContext` - - Shared state for one batch-row activation.
1195
+ - `network` - - Network instance bound to the activation call.
1196
+ - `batchInputs` - - Input matrix supplied by the caller.
1197
+ - `isTraining` - - Whether activation should retain training traces.
1156
1198
 
1157
- Returns: Activation output vector for the row.
1199
+ Returns: Fully populated batch activation context.
1158
1200
 
1159
- ### activateValidatedBatchRows
1201
+ ### createNoTraceActivationContext
1160
1202
 
1161
1203
  ```ts
1162
- activateValidatedBatchRows(
1204
+ createNoTraceActivationContext(
1205
+ network: default,
1206
+ inputVector: number[],
1207
+ ): NoTraceActivationContext
1208
+ ```
1209
+
1210
+ Build shared no-trace activation context for helper orchestration.
1211
+
1212
+ Parameters:
1213
+ - `network` - - Network instance bound to the activation call.
1214
+ - `inputVector` - - Input activation vector supplied by the caller.
1215
+
1216
+ Returns: Fully populated no-trace activation context.
1217
+
1218
+ ### createRawActivationContext
1219
+
1220
+ ```ts
1221
+ createRawActivationContext(
1222
+ network: default,
1223
+ inputVector: number[],
1224
+ isTraining: boolean,
1225
+ maximumActivationDepth: number,
1226
+ ): RawActivationContext
1227
+ ```
1228
+
1229
+ Build shared raw activation context for helper orchestration.
1230
+
1231
+ Parameters:
1232
+ - `network` - - Network instance bound to the activation call.
1233
+ - `inputVector` - - Input activation vector supplied by the caller.
1234
+ - `isTraining` - - Whether activation should retain training traces.
1235
+ - `maximumActivationDepth` - - Guard against runaway activation depth.
1236
+
1237
+ Returns: Fully populated raw activation context.
1238
+
1239
+ ### executeBatchActivation
1240
+
1241
+ ```ts
1242
+ executeBatchActivation(
1163
1243
  activationContext: BatchActivationContext,
1164
1244
  ): number[][]
1165
1245
  ```
1166
1246
 
1167
- Activate each row in a validated batch matrix.
1247
+ Execute mini-batch activation with top-level shape validation and per-row checks.
1248
+
1249
+ The orchestration keeps behavior deterministic by validating the container first,
1250
+ then validating each row before delegating to the core network activation function.
1168
1251
 
1169
1252
  Parameters:
1170
1253
  - `activationContext` - - Shared batch activation state.
1171
1254
 
1172
1255
  Returns: Matrix of activation outputs.
1173
1256
 
1174
- ### assertBatchInputCollection
1257
+ ### executeNoTraceActivation
1175
1258
 
1176
1259
  ```ts
1177
- assertBatchInputCollection(
1178
- batchInputs: number[][],
1179
- ): void
1260
+ executeNoTraceActivation(
1261
+ activationContext: NoTraceActivationContext,
1262
+ ): number[]
1180
1263
  ```
1181
1264
 
1182
- Validate that the batch input collection is an array of rows.
1265
+ Execute no-trace activation with a fast-path attempt and deterministic fallback traversal.
1266
+
1267
+ The orchestration follows a strict sequence: refresh order guarantees, validate input shape,
1268
+ try fast slab inference, then compute outputs through node traversal when needed.
1183
1269
 
1184
1270
  Parameters:
1185
- - `batchInputs` - - Candidate batch input collection.
1271
+ - `activationContext` - - Shared no-trace activation state.
1186
1272
 
1187
- Returns: Nothing.
1273
+ Returns: Output activation vector detached from pooled storage.
1188
1274
 
1189
- ### assertBatchRowInputSize
1275
+ ### executeRawActivation
1190
1276
 
1191
1277
  ```ts
1192
- assertBatchRowInputSize(
1193
- rowActivationContext: BatchRowActivationContext,
1194
- ): void
1278
+ executeRawActivation(
1279
+ activationContext: RawActivationContext,
1280
+ ): number[]
1195
1281
  ```
1196
1282
 
1197
- Validate one batch row dimensionality.
1283
+ Execute raw activation through the network delegate using a compact orchestration flow.
1284
+
1285
+ This helper keeps the exported activation method focused on context creation while this
1286
+ module owns the execution path and future branching behavior.
1198
1287
 
1199
1288
  Parameters:
1200
- - `rowActivationContext` - - Shared state for one batch-row activation.
1289
+ - `activationContext` - - Shared raw activation state.
1201
1290
 
1202
- Returns: Nothing.
1291
+ Returns: Activation output vector from the network delegate.
1203
1292
 
1204
- ### buildBatchRowInputSizeMismatchMessage
1293
+ ## architecture/network/activate/network.activate.raw.utils.ts
1294
+
1295
+ ### activateViaNetworkDelegate
1205
1296
 
1206
1297
  ```ts
1207
- buildBatchRowInputSizeMismatchMessage(
1208
- rowActivationContext: BatchRowActivationContext,
1209
- ): string
1298
+ activateViaNetworkDelegate(
1299
+ activationContext: RawActivationContext,
1300
+ ): number[]
1210
1301
  ```
1211
1302
 
1212
- Build a descriptive mismatch message for invalid batch row input dimensions.
1303
+ Delegate raw activation to the core network activation implementation.
1213
1304
 
1214
1305
  Parameters:
1215
- - `rowActivationContext` - - Shared state for one batch-row activation.
1306
+ - `activationContext` - - Shared raw activation state.
1216
1307
 
1217
- Returns: Formatted error message for invalid row dimensionality.
1308
+ Returns: Activation output vector.
1218
1309
 
1219
- ### executeBatchActivation
1310
+ ### activateWithSelectedReusePath
1220
1311
 
1221
1312
  ```ts
1222
- executeBatchActivation(
1223
- activationContext: BatchActivationContext,
1224
- ): number[][]
1313
+ activateWithSelectedReusePath(
1314
+ activationContext: RawActivationContext,
1315
+ ): number[]
1225
1316
  ```
1226
1317
 
1227
- Execute mini-batch activation with top-level shape validation and per-row checks.
1228
-
1229
- The orchestration keeps behavior deterministic by validating the container first,
1230
- then validating each row before delegating to the core network activation function.
1318
+ Select the raw activation execution path based on runtime reuse configuration.
1231
1319
 
1232
1320
  Parameters:
1233
- - `activationContext` - - Shared batch activation state.
1321
+ - `activationContext` - - Shared raw activation state.
1234
1322
 
1235
- Returns: Matrix of activation outputs.
1323
+ Returns: Activation output vector.
1236
1324
 
1237
- ### formatInputLengthForMessage
1325
+ ### executeRawActivation
1238
1326
 
1239
1327
  ```ts
1240
- formatInputLengthForMessage(
1241
- inputVector: number[],
1242
- ): string
1328
+ executeRawActivation(
1329
+ activationContext: RawActivationContext,
1330
+ ): number[]
1243
1331
  ```
1244
1332
 
1245
- Convert input length into a display-safe string for error messaging.
1333
+ Execute raw activation through the network delegate using a compact orchestration flow.
1334
+
1335
+ This helper keeps the exported activation method focused on context creation while this
1336
+ module owns the execution path and future branching behavior.
1246
1337
 
1247
1338
  Parameters:
1248
- - `inputVector` - - Candidate batch row input vector.
1339
+ - `activationContext` - - Shared raw activation state.
1249
1340
 
1250
- Returns: Numeric length as string or predefined undefined text.
1341
+ Returns: Activation output vector from the network delegate.
1251
1342
 
1252
- ### isBatchRowInputSizeValid
1343
+ ## architecture/network/activate/network.activate.batch.utils.ts
1344
+
1345
+ ### activateSingleBatchRow
1253
1346
 
1254
1347
  ```ts
1255
- isBatchRowInputSizeValid(
1348
+ activateSingleBatchRow(
1256
1349
  rowActivationContext: BatchRowActivationContext,
1257
- ): boolean
1350
+ ): number[]
1258
1351
  ```
1259
1352
 
1260
- Determine whether one batch row matches the expected input dimensionality.
1353
+ Validate and activate one batch row.
1261
1354
 
1262
1355
  Parameters:
1263
1356
  - `rowActivationContext` - - Shared state for one batch-row activation.
1264
1357
 
1265
- Returns: True when row size is valid.
1358
+ Returns: Activation output vector for the row.
1266
1359
 
1267
- ## architecture/network/activate/network.activate.helpers.utils.ts
1360
+ ### activateValidatedBatchRows
1268
1361
 
1269
- ### createBatchActivationContext
1362
+ ```ts
1363
+ activateValidatedBatchRows(
1364
+ activationContext: BatchActivationContext,
1365
+ ): number[][]
1366
+ ```
1367
+
1368
+ Activate each row in a validated batch matrix.
1369
+
1370
+ Parameters:
1371
+ - `activationContext` - - Shared batch activation state.
1372
+
1373
+ Returns: Matrix of activation outputs.
1374
+
1375
+ ### assertBatchInputCollection
1270
1376
 
1271
1377
  ```ts
1272
- createBatchActivationContext(
1273
- network: default,
1378
+ assertBatchInputCollection(
1274
1379
  batchInputs: number[][],
1275
- isTraining: boolean,
1276
- ): BatchActivationContext
1380
+ ): void
1277
1381
  ```
1278
1382
 
1279
- Build shared batch activation context for helper orchestration.
1383
+ Validate that the batch input collection is an array of rows.
1280
1384
 
1281
1385
  Parameters:
1282
- - `network` - - Network instance bound to the activation call.
1283
- - `batchInputs` - - Input matrix supplied by the caller.
1284
- - `isTraining` - - Whether activation should retain training traces.
1386
+ - `batchInputs` - - Candidate batch input collection.
1285
1387
 
1286
- Returns: Fully populated batch activation context.
1388
+ Returns: Nothing.
1287
1389
 
1288
- ### createNoTraceActivationContext
1390
+ ### assertBatchRowInputSize
1289
1391
 
1290
1392
  ```ts
1291
- createNoTraceActivationContext(
1292
- network: default,
1293
- inputVector: number[],
1294
- ): NoTraceActivationContext
1393
+ assertBatchRowInputSize(
1394
+ rowActivationContext: BatchRowActivationContext,
1395
+ ): void
1295
1396
  ```
1296
1397
 
1297
- Build shared no-trace activation context for helper orchestration.
1398
+ Validate one batch row dimensionality.
1298
1399
 
1299
1400
  Parameters:
1300
- - `network` - - Network instance bound to the activation call.
1301
- - `inputVector` - - Input activation vector supplied by the caller.
1401
+ - `rowActivationContext` - - Shared state for one batch-row activation.
1302
1402
 
1303
- Returns: Fully populated no-trace activation context.
1403
+ Returns: Nothing.
1304
1404
 
1305
- ### createRawActivationContext
1405
+ ### buildBatchRowInputSizeMismatchMessage
1306
1406
 
1307
1407
  ```ts
1308
- createRawActivationContext(
1309
- network: default,
1310
- inputVector: number[],
1311
- isTraining: boolean,
1312
- maximumActivationDepth: number,
1313
- ): RawActivationContext
1408
+ buildBatchRowInputSizeMismatchMessage(
1409
+ rowActivationContext: BatchRowActivationContext,
1410
+ ): string
1314
1411
  ```
1315
1412
 
1316
- Build shared raw activation context for helper orchestration.
1413
+ Build a descriptive mismatch message for invalid batch row input dimensions.
1317
1414
 
1318
1415
  Parameters:
1319
- - `network` - - Network instance bound to the activation call.
1320
- - `inputVector` - - Input activation vector supplied by the caller.
1321
- - `isTraining` - - Whether activation should retain training traces.
1322
- - `maximumActivationDepth` - - Guard against runaway activation depth.
1416
+ - `rowActivationContext` - - Shared state for one batch-row activation.
1323
1417
 
1324
- Returns: Fully populated raw activation context.
1418
+ Returns: Formatted error message for invalid row dimensionality.
1325
1419
 
1326
1420
  ### executeBatchActivation
1327
1421
 
@@ -1341,41 +1435,35 @@ Parameters:
1341
1435
 
1342
1436
  Returns: Matrix of activation outputs.
1343
1437
 
1344
- ### executeNoTraceActivation
1438
+ ### formatInputLengthForMessage
1345
1439
 
1346
1440
  ```ts
1347
- executeNoTraceActivation(
1348
- activationContext: NoTraceActivationContext,
1349
- ): number[]
1441
+ formatInputLengthForMessage(
1442
+ inputVector: number[],
1443
+ ): string
1350
1444
  ```
1351
1445
 
1352
- Execute no-trace activation with a fast-path attempt and deterministic fallback traversal.
1353
-
1354
- The orchestration follows a strict sequence: refresh order guarantees, validate input shape,
1355
- try fast slab inference, then compute outputs through node traversal when needed.
1446
+ Convert input length into a display-safe string for error messaging.
1356
1447
 
1357
1448
  Parameters:
1358
- - `activationContext` - - Shared no-trace activation state.
1449
+ - `inputVector` - - Candidate batch row input vector.
1359
1450
 
1360
- Returns: Output activation vector detached from pooled storage.
1451
+ Returns: Numeric length as string or predefined undefined text.
1361
1452
 
1362
- ### executeRawActivation
1453
+ ### isBatchRowInputSizeValid
1363
1454
 
1364
1455
  ```ts
1365
- executeRawActivation(
1366
- activationContext: RawActivationContext,
1367
- ): number[]
1456
+ isBatchRowInputSizeValid(
1457
+ rowActivationContext: BatchRowActivationContext,
1458
+ ): boolean
1368
1459
  ```
1369
1460
 
1370
- Execute raw activation through the network delegate using a compact orchestration flow.
1371
-
1372
- This helper keeps the exported activation method focused on context creation while this
1373
- module owns the execution path and future branching behavior.
1461
+ Determine whether one batch row matches the expected input dimensionality.
1374
1462
 
1375
1463
  Parameters:
1376
- - `activationContext` - - Shared raw activation state.
1464
+ - `rowActivationContext` - - Shared state for one batch-row activation.
1377
1465
 
1378
- Returns: Activation output vector from the network delegate.
1466
+ Returns: True when row size is valid.
1379
1467
 
1380
1468
  ## architecture/network/activate/network.activate.notrace.utils.ts
1381
1469