@reicek/neataptic-ts 0.1.25 → 0.1.26

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 (210) hide show
  1. package/.github/copilot-instructions.md +11 -0
  2. package/.github/skills/trace-analyzer-extension/SKILL.md +3 -3
  3. package/.github/skills/trace-analyzer-extension/assets/extension-checklist.md +1 -1
  4. package/.github/skills/trace-analyzer-extension/references/analyzer-extension-workflow.md +1 -1
  5. package/.github/skills/trace-audit-reporting/SKILL.md +3 -3
  6. package/.github/skills/trace-audit-reporting/references/trace-analysis-workflow.md +1 -1
  7. package/package.json +19 -13
  8. package/plans/Flappy_Bird_Folder_Documentation_Pass.md +4 -4
  9. package/plans/README.md +24 -0
  10. package/plans/Roadmap.md +62 -40
  11. package/plans/analyze-trace-solid-split.plans.md +66 -0
  12. package/plans/architecture-solid-split.plans.md +9 -15
  13. package/plans/asciiMaze-typescript-repair.plans.md +1 -1
  14. package/plans/generate-docs-solid-split.plans.md +87 -0
  15. package/plans/methods-docs.plans.md +25 -1
  16. package/plans/methods-solid-split.plans.md +14 -14
  17. package/plans/neat-docs.plans.md +9 -1
  18. package/plans/neat-test-surface-repair.plans.md +1 -1
  19. package/plans/render-docs-html-solid-split.plans.md +68 -0
  20. package/plans/src-no-explicit-any-cleanup.plans.md +1 -1
  21. package/plans/utils-docs.plans.md +6 -1
  22. package/scripts/analyze-trace/analyze-trace.analysis.ts +479 -0
  23. package/scripts/analyze-trace/analyze-trace.constants.ts +35 -0
  24. package/scripts/analyze-trace/analyze-trace.io.ts +69 -0
  25. package/scripts/analyze-trace/analyze-trace.report.ts +100 -0
  26. package/scripts/analyze-trace/analyze-trace.shared.ts +116 -0
  27. package/scripts/analyze-trace/analyze-trace.ts +45 -0
  28. package/scripts/analyze-trace/analyze-trace.types.ts +72 -0
  29. package/scripts/assets/theme.css +80 -23
  30. package/scripts/copy-examples.ts +239 -0
  31. package/scripts/export-onnx.ts +223 -0
  32. package/scripts/generate-bench-tables.ts +378 -37
  33. package/scripts/generate-docs/generate-docs.constants.ts +107 -0
  34. package/scripts/generate-docs/generate-docs.order.ts +355 -0
  35. package/scripts/generate-docs/generate-docs.state.ts +31 -0
  36. package/scripts/generate-docs/generate-docs.targets.ts +165 -0
  37. package/scripts/generate-docs/generate-docs.ts +63 -0
  38. package/scripts/generate-docs/generate-docs.types.ts +112 -0
  39. package/scripts/generate-docs/output/generate-docs.output.folder-index.utils.ts +167 -0
  40. package/scripts/generate-docs/output/generate-docs.output.ordering.utils.ts +353 -0
  41. package/scripts/generate-docs/output/generate-docs.output.readme.utils.ts +420 -0
  42. package/scripts/generate-docs/output/generate-docs.output.ts +123 -0
  43. package/scripts/generate-docs/output/generate-docs.output.warnings.utils.ts +219 -0
  44. package/scripts/generate-docs/symbols/generate-docs.symbols.collection.utils.ts +365 -0
  45. package/scripts/generate-docs/symbols/generate-docs.symbols.jsdoc.utils.ts +373 -0
  46. package/scripts/generate-docs/symbols/generate-docs.symbols.normalize.utils.ts +155 -0
  47. package/scripts/generate-docs/symbols/generate-docs.symbols.render.utils.ts +149 -0
  48. package/scripts/generate-docs/symbols/generate-docs.symbols.signature.utils.ts +289 -0
  49. package/scripts/generate-docs/symbols/generate-docs.symbols.ts +11 -0
  50. package/scripts/mermaid-cli.mjs +102 -22
  51. package/scripts/mermaid-cli.ts +736 -0
  52. package/scripts/render-docs-html/render-docs-html.assets.ts +54 -0
  53. package/scripts/render-docs-html/render-docs-html.mermaid.ts +245 -0
  54. package/scripts/{render-docs-html.sidebar.ts → render-docs-html/render-docs-html.navigation.ts} +141 -144
  55. package/scripts/render-docs-html/render-docs-html.pages.ts +333 -0
  56. package/scripts/render-docs-html/render-docs-html.shared.ts +333 -0
  57. package/scripts/render-docs-html/render-docs-html.types.ts +42 -0
  58. package/scripts/render-docs-html.ts +23 -587
  59. package/scripts/run-docs.ts +238 -0
  60. package/scripts/write-dist-docs-pkg.ts +40 -0
  61. package/src/README.md +75 -75
  62. package/src/architecture/connection/README.md +5 -5
  63. package/src/architecture/layer/README.md +508 -508
  64. package/src/architecture/network/README.md +1458 -1458
  65. package/src/architecture/network/activate/README.md +694 -694
  66. package/src/architecture/network/bootstrap/README.md +77 -77
  67. package/src/architecture/network/connect/README.md +74 -74
  68. package/src/architecture/network/deterministic/README.md +135 -135
  69. package/src/architecture/network/evolve/README.md +364 -364
  70. package/src/architecture/network/gating/README.md +130 -130
  71. package/src/architecture/network/genetic/README.md +399 -399
  72. package/src/architecture/network/mutate/README.md +897 -897
  73. package/src/architecture/network/onnx/README.md +720 -720
  74. package/src/architecture/network/onnx/export/README.md +728 -728
  75. package/src/architecture/network/onnx/export/layers/README.md +450 -450
  76. package/src/architecture/network/onnx/import/README.md +618 -618
  77. package/src/architecture/network/onnx/schema/README.md +32 -32
  78. package/src/architecture/network/prune/README.md +245 -245
  79. package/src/architecture/network/remove/README.md +135 -135
  80. package/src/architecture/network/runtime/README.md +106 -106
  81. package/src/architecture/network/serialize/README.md +542 -542
  82. package/src/architecture/network/slab/README.md +608 -608
  83. package/src/architecture/network/standalone/README.md +212 -212
  84. package/src/architecture/network/stats/README.md +84 -84
  85. package/src/architecture/network/topology/README.md +465 -465
  86. package/src/architecture/network/training/README.md +200 -200
  87. package/src/architecture/node/README.md +5 -5
  88. package/src/architecture/nodePool/README.md +14 -14
  89. package/src/methods/README.md +99 -99
  90. package/src/methods/activation/README.md +189 -189
  91. package/src/methods/cost/README.md +131 -131
  92. package/src/methods/rate/README.md +86 -86
  93. package/src/multithreading/README.md +77 -77
  94. package/src/multithreading/workers/browser/README.md +8 -8
  95. package/src/multithreading/workers/node/README.md +8 -8
  96. package/src/neat/README.md +148 -148
  97. package/src/neat/adaptive/README.md +120 -120
  98. package/src/neat/adaptive/acceptance/README.md +40 -40
  99. package/src/neat/adaptive/complexity/README.md +137 -137
  100. package/src/neat/adaptive/core/README.md +197 -197
  101. package/src/neat/adaptive/lineage/README.md +90 -90
  102. package/src/neat/adaptive/mutation/README.md +284 -284
  103. package/src/neat/compat/README.md +43 -43
  104. package/src/neat/compat/core/README.md +90 -90
  105. package/src/neat/diversity/README.md +35 -35
  106. package/src/neat/diversity/core/README.md +88 -88
  107. package/src/neat/evaluate/README.md +85 -85
  108. package/src/neat/evaluate/auto-distance/README.md +75 -75
  109. package/src/neat/evaluate/entropy-compat/README.md +37 -37
  110. package/src/neat/evaluate/entropy-sharing/README.md +43 -43
  111. package/src/neat/evaluate/fitness/README.md +23 -23
  112. package/src/neat/evaluate/novelty/README.md +120 -120
  113. package/src/neat/evaluate/objectives/README.md +17 -17
  114. package/src/neat/evaluate/shared/README.md +94 -94
  115. package/src/neat/evolve/README.md +96 -96
  116. package/src/neat/evolve/adaptive/README.md +60 -60
  117. package/src/neat/evolve/objectives/README.md +63 -63
  118. package/src/neat/evolve/offspring/README.md +56 -56
  119. package/src/neat/evolve/population/README.md +171 -171
  120. package/src/neat/evolve/runtime/README.md +79 -79
  121. package/src/neat/evolve/speciation/README.md +74 -74
  122. package/src/neat/evolve/warnings/README.md +10 -10
  123. package/src/neat/export/README.md +114 -114
  124. package/src/neat/helpers/README.md +50 -50
  125. package/src/neat/init/README.md +9 -9
  126. package/src/neat/lineage/core/README.md +101 -101
  127. package/src/neat/multiobjective/category/README.md +74 -74
  128. package/src/neat/multiobjective/crowding/README.md +272 -272
  129. package/src/neat/multiobjective/dominance/README.md +171 -171
  130. package/src/neat/multiobjective/fronts/README.md +68 -68
  131. package/src/neat/multiobjective/metrics/README.md +43 -43
  132. package/src/neat/multiobjective/objectives/README.md +31 -31
  133. package/src/neat/multiobjective/shared/README.md +27 -27
  134. package/src/neat/mutation/README.md +97 -97
  135. package/src/neat/mutation/add-conn/README.md +115 -115
  136. package/src/neat/mutation/add-node/README.md +126 -126
  137. package/src/neat/mutation/flow/README.md +149 -149
  138. package/src/neat/mutation/repair/README.md +185 -185
  139. package/src/neat/mutation/select/README.md +117 -117
  140. package/src/neat/mutation/shared/README.md +32 -32
  141. package/src/neat/objectives/README.md +25 -25
  142. package/src/neat/objectives/core/README.md +67 -67
  143. package/src/neat/pruning/README.md +40 -40
  144. package/src/neat/pruning/core/README.md +171 -171
  145. package/src/neat/pruning/facade/README.md +32 -32
  146. package/src/neat/rng/README.md +104 -104
  147. package/src/neat/rng/core/README.md +137 -137
  148. package/src/neat/rng/facade/README.md +50 -50
  149. package/src/neat/selection/README.md +111 -111
  150. package/src/neat/selection/core/README.md +227 -227
  151. package/src/neat/selection/facade/README.md +61 -61
  152. package/src/neat/shared/README.md +163 -163
  153. package/src/neat/speciation/README.md +31 -31
  154. package/src/neat/speciation/threshold/README.md +35 -35
  155. package/src/neat/species/README.md +25 -25
  156. package/src/neat/species/core/README.md +20 -20
  157. package/src/neat/species/core/shared/README.md +18 -18
  158. package/src/neat/species/history/context/README.md +22 -22
  159. package/src/neat/telemetry/accessors/README.md +58 -58
  160. package/src/neat/telemetry/exports/README.md +233 -233
  161. package/src/neat/telemetry/facade/README.md +252 -252
  162. package/src/neat/telemetry/facade/archive/README.md +57 -57
  163. package/src/neat/telemetry/facade/buffer/README.md +43 -43
  164. package/src/neat/telemetry/facade/lineage/README.md +12 -12
  165. package/src/neat/telemetry/facade/objectives/README.md +44 -44
  166. package/src/neat/telemetry/facade/runtime/README.md +26 -26
  167. package/src/neat/telemetry/facade/species/README.md +27 -27
  168. package/src/neat/telemetry/metrics/README.md +696 -696
  169. package/src/neat/telemetry/recorder/README.md +57 -57
  170. package/src/neat/telemetry/types/README.md +32 -32
  171. package/src/neat/topology-intent/README.md +75 -75
  172. package/src/utils/README.md +193 -193
  173. package/test/examples/asciiMaze/browser-entry/README.md +92 -92
  174. package/test/examples/asciiMaze/dashboardManager/README.md +109 -109
  175. package/test/examples/asciiMaze/dashboardManager/telemetry/README.md +28 -28
  176. package/test/examples/asciiMaze/evolutionEngine/README.md +1527 -1527
  177. package/test/examples/asciiMaze/mazeMovement/README.md +105 -105
  178. package/test/examples/asciiMaze/mazeMovement/finalization/README.md +16 -16
  179. package/test/examples/asciiMaze/mazeMovement/policy/README.md +57 -57
  180. package/test/examples/asciiMaze/mazeMovement/runtime/README.md +52 -52
  181. package/test/examples/asciiMaze/mazeMovement/shaping/README.md +46 -46
  182. package/test/examples/flappy_bird/browser-entry/README.md +508 -508
  183. package/test/examples/flappy_bird/browser-entry/host/README.md +101 -101
  184. package/test/examples/flappy_bird/browser-entry/host/resize/README.md +144 -144
  185. package/test/examples/flappy_bird/browser-entry/network-view/README.md +194 -194
  186. package/test/examples/flappy_bird/browser-entry/playback/README.md +278 -278
  187. package/test/examples/flappy_bird/browser-entry/playback/background/README.md +129 -129
  188. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/README.md +502 -502
  189. package/test/examples/flappy_bird/browser-entry/playback/frame-render/README.md +139 -139
  190. package/test/examples/flappy_bird/browser-entry/playback/snapshot/README.md +10 -10
  191. package/test/examples/flappy_bird/browser-entry/playback/trail/README.md +43 -43
  192. package/test/examples/flappy_bird/browser-entry/playback/worker-channel/README.md +30 -30
  193. package/test/examples/flappy_bird/browser-entry/runtime/README.md +59 -59
  194. package/test/examples/flappy_bird/browser-entry/visualization/README.md +276 -276
  195. package/test/examples/flappy_bird/browser-entry/worker-channel/README.md +16 -16
  196. package/test/examples/flappy_bird/constants/README.md +1070 -1070
  197. package/test/examples/flappy_bird/environment/README.md +22 -22
  198. package/test/examples/flappy_bird/evaluation/README.md +32 -32
  199. package/test/examples/flappy_bird/evaluation/rollout/README.md +141 -141
  200. package/test/examples/flappy_bird/flappy-evolution-worker/README.md +425 -425
  201. package/test/examples/flappy_bird/simulation-shared/README.md +170 -170
  202. package/test/examples/flappy_bird/simulation-shared/observation/README.md +109 -109
  203. package/test/examples/flappy_bird/trainer/README.md +325 -325
  204. package/test/examples/flappy_bird/trainer/evaluation/README.md +74 -74
  205. package/scripts/analyze-trace.ts +0 -590
  206. package/scripts/copy-examples.mjs +0 -114
  207. package/scripts/export-onnx.mjs +0 -86
  208. package/scripts/generate-bench-tables.mjs +0 -182
  209. package/scripts/generate-docs.ts +0 -2900
  210. package/scripts/write-dist-docs-pkg.mjs +0 -16
@@ -4,59 +4,61 @@ Output node discriminator used for standalone precondition checks.
4
4
 
5
5
  ## architecture/network/standalone/network.standalone.utils.types.ts
6
6
 
7
- ### OUTPUT_NODE_TYPE
7
+ ### ACTIVATION_PRECISION_F32
8
8
 
9
- Output node discriminator used for standalone precondition checks.
9
+ Precision token selecting Float32 activation/state buffers.
10
10
 
11
- ### SINGLE_TERM_FALLBACK
11
+ ### ARROW_TOKEN
12
12
 
13
- Fallback literal used when a node has no incoming terms.
13
+ Arrow token used during function-source normalization.
14
14
 
15
- ### MASK_MULTIPLIER_IDENTITY
15
+ ### BUILTIN_ACTIVATION_SNIPPETS
16
16
 
17
- Multiplicative identity used to omit redundant mask expressions.
17
+ Built-in activation snippets emitted as named JavaScript function declarations.
18
18
 
19
- ### INPUT_LOOP_LINE
19
+ Values are intentionally compact so emitted standalone source remains deterministic and small.
20
20
 
21
- Generated source line for copying external inputs into activation buffer.
21
+ ### COVERAGE_CALL_REGEX
22
22
 
23
- ### ACTIVATION_PRECISION_F32
23
+ Regex stripping Istanbul function invocations from source snippets.
24
24
 
25
- Precision token selecting Float32 activation/state buffers.
25
+ ### COVERAGE_COUNTER_REGEX
26
26
 
27
- ### FLOAT32_ARRAY_TYPE
27
+ Regex stripping Istanbul counters from stringified functions.
28
28
 
29
- Typed-array constructor names used in generated source.
29
+ ### COVERAGE_REPLACEMENT
30
30
 
31
- ### FLOAT64_ARRAY_TYPE
31
+ Empty replacement used while stripping coverage artifacts.
32
32
 
33
- Typed-array constructor names used in generated source.
33
+ ### EMPTY_TOKEN_REGEX
34
34
 
35
- ### FUNCTION_PREFIX
35
+ Regex removing empty punctuation-only token lines.
36
36
 
37
- Prefix token used when normalizing function sources.
37
+ ### FALLBACK_IDENTITY_BODY
38
38
 
39
- ### ARROW_TOKEN
39
+ Identity-function fallback body for invalid custom squash sources.
40
40
 
41
- Arrow token used during function-source normalization.
41
+ ### FLOAT32_ARRAY_TYPE
42
42
 
43
- ### FALLBACK_IDENTITY_BODY
43
+ Typed-array constructor names used in generated source.
44
44
 
45
- Identity-function fallback body for invalid custom squash sources.
45
+ ### FLOAT64_ARRAY_TYPE
46
46
 
47
- ### COVERAGE_REPLACEMENT
47
+ Typed-array constructor names used in generated source.
48
48
 
49
- Empty replacement used while stripping coverage artifacts.
49
+ ### FUNCTION_PREFIX
50
50
 
51
- ### NO_OUTPUT_NODES_ERROR
51
+ Prefix token used when normalizing function sources.
52
52
 
53
- Error message when attempting standalone generation without outputs.
53
+ ### INPUT_LOOP_LINE
54
54
 
55
- ### INVALID_INPUT_SIZE_ERROR_PREFIX
55
+ Generated source line for copying external inputs into activation buffer.
56
+
57
+ ### INVALID_INPUT_SIZE_ERROR_MIDDLE
56
58
 
57
59
  Input-size validation message fragments for generated activate guards.
58
60
 
59
- ### INVALID_INPUT_SIZE_ERROR_MIDDLE
61
+ ### INVALID_INPUT_SIZE_ERROR_PREFIX
60
62
 
61
63
  Input-size validation message fragments for generated activate guards.
62
64
 
@@ -64,43 +66,33 @@ Input-size validation message fragments for generated activate guards.
64
66
 
65
67
  Regex stripping Istanbul ignore blocks from stringified functions.
66
68
 
67
- ### COVERAGE_COUNTER_REGEX
69
+ ### MASK_MULTIPLIER_IDENTITY
68
70
 
69
- Regex stripping Istanbul counters from stringified functions.
71
+ Multiplicative identity used to omit redundant mask expressions.
70
72
 
71
- ### COVERAGE_CALL_REGEX
73
+ ### NO_OUTPUT_NODES_ERROR
72
74
 
73
- Regex stripping Istanbul function invocations from source snippets.
75
+ Error message when attempting standalone generation without outputs.
74
76
 
75
- ### SOURCE_MAP_REGEX
77
+ ### OUTPUT_NODE_TYPE
76
78
 
77
- Regex stripping sourceMappingURL comments from generated snippets.
79
+ Output node discriminator used for standalone precondition checks.
78
80
 
79
- ### STRAY_COMMA_OPEN_REGEX
81
+ ### REPEATED_SEMICOLON_REGEX
80
82
 
81
- Regex normalizing stray commas near opening parentheses.
83
+ Regex collapsing repeated semicolons.
82
84
 
83
- ### STRAY_COMMA_CLOSE_REGEX
85
+ ### SINGLE_TERM_FALLBACK
84
86
 
85
- Regex normalizing stray commas near closing parentheses.
87
+ Fallback literal used when a node has no incoming terms.
86
88
 
87
89
  ### SOLITARY_SEMICOLON_REGEX
88
90
 
89
91
  Regex removing solitary semicolon lines created by instrumentation.
90
92
 
91
- ### REPEATED_SEMICOLON_REGEX
92
-
93
- Regex collapsing repeated semicolons.
94
-
95
- ### EMPTY_TOKEN_REGEX
96
-
97
- Regex removing empty punctuation-only token lines.
98
-
99
- ### BUILTIN_ACTIVATION_SNIPPETS
100
-
101
- Built-in activation snippets emitted as named JavaScript function declarations.
93
+ ### SOURCE_MAP_REGEX
102
94
 
103
- Values are intentionally compact so emitted standalone source remains deterministic and small.
95
+ Regex stripping sourceMappingURL comments from generated snippets.
104
96
 
105
97
  ### StandaloneSquashFunction
106
98
 
@@ -113,6 +105,14 @@ StandaloneSquashFunction(
113
105
 
114
106
  Activation function shape used by standalone source generation helpers.
115
107
 
108
+ ### STRAY_COMMA_CLOSE_REGEX
109
+
110
+ Regex normalizing stray commas near closing parentheses.
111
+
112
+ ### STRAY_COMMA_OPEN_REGEX
113
+
114
+ Regex normalizing stray commas near opening parentheses.
115
+
116
116
  ## architecture/network/standalone/network.standalone.utils.ts
117
117
 
118
118
  Standalone forward pass code generator.
@@ -169,18 +169,24 @@ Returns: Source string (ES5-compatible) – safe to eval in sandbox to obtain ac
169
169
 
170
170
  ## architecture/network/standalone/network.standalone.utils.loop.ts
171
171
 
172
- ### appendInputSeedLine
172
+ ### appendActivationLine
173
173
 
174
174
  ```ts
175
- appendInputSeedLine(
175
+ appendActivationLine(
176
176
  generationContext: StandaloneGenerationContext,
177
+ nodeTraversalIndex: number,
178
+ activationFunctionIndex: number,
179
+ maskValue: number,
177
180
  ): void
178
181
  ```
179
182
 
180
- Append the generated input-copy loop to the standalone body.
183
+ Append generated activation assignment line for one node.
181
184
 
182
185
  Parameters:
183
186
  - `generationContext` - Mutable generation context.
187
+ - `nodeTraversalIndex` - Node index.
188
+ - `activationFunctionIndex` - Function table index.
189
+ - `maskValue` - Multiplicative mask.
184
190
 
185
191
  Returns: Void.
186
192
 
@@ -199,6 +205,21 @@ Parameters:
199
205
 
200
206
  Returns: Void.
201
207
 
208
+ ### appendInputSeedLine
209
+
210
+ ```ts
211
+ appendInputSeedLine(
212
+ generationContext: StandaloneGenerationContext,
213
+ ): void
214
+ ```
215
+
216
+ Append the generated input-copy loop to the standalone body.
217
+
218
+ Parameters:
219
+ - `generationContext` - Mutable generation context.
220
+
221
+ Returns: Void.
222
+
202
223
  ### appendOutputReturnLine
203
224
 
204
225
  ```ts
@@ -254,43 +275,39 @@ Parameters:
254
275
 
255
276
  Returns: Void.
256
277
 
257
- ### appendActivationLine
278
+ ### buildMaskSuffix
258
279
 
259
280
  ```ts
260
- appendActivationLine(
261
- generationContext: StandaloneGenerationContext,
262
- nodeTraversalIndex: number,
263
- activationFunctionIndex: number,
281
+ buildMaskSuffix(
264
282
  maskValue: number,
265
- ): void
283
+ ): string
266
284
  ```
267
285
 
268
- Append generated activation assignment line for one node.
286
+ Build optional activation mask suffix for generated assignment line.
269
287
 
270
288
  Parameters:
271
- - `generationContext` - Mutable generation context.
272
- - `nodeTraversalIndex` - Node index.
273
- - `activationFunctionIndex` - Function table index.
274
- - `maskValue` - Multiplicative mask.
289
+ - `maskValue` - Multiplicative mask value.
275
290
 
276
- Returns: Void.
291
+ Returns: Empty suffix for identity, otherwise multiplicative fragment.
277
292
 
278
- ### buildMaskSuffix
293
+ ## architecture/network/standalone/network.standalone.utils.graph.ts
294
+
295
+ ### appendGateMultiplier
279
296
 
280
297
  ```ts
281
- buildMaskSuffix(
282
- maskValue: number,
298
+ appendGateMultiplier(
299
+ connectionTerm: string,
300
+ gateNode: default | null,
283
301
  ): string
284
302
  ```
285
303
 
286
- Build optional activation mask suffix for generated assignment line.
304
+ Append a gate activation multiplier to a connection term when a gate exists.
287
305
 
288
306
  Parameters:
289
- - `maskValue` - Multiplicative mask value.
290
-
291
- Returns: Empty suffix for identity, otherwise multiplicative fragment.
307
+ - `connectionTerm` - Base connection term.
308
+ - `gateNode` - Optional gate node.
292
309
 
293
- ## architecture/network/standalone/network.standalone.utils.graph.ts
310
+ Returns: Term with optional gate multiplier.
294
311
 
295
312
  ### buildNodeSumExpression
296
313
 
@@ -309,84 +326,82 @@ Parameters:
309
326
 
310
327
  Returns: String expression used for generated `S[index]` assignment.
311
328
 
312
- ### collectOutputIndexes
329
+ ### collectIncomingTerms
313
330
 
314
331
  ```ts
315
- collectOutputIndexes(
316
- generationContext: StandaloneGenerationContext,
317
- ): number[]
332
+ collectIncomingTerms(
333
+ currentNode: default,
334
+ ): string[]
318
335
  ```
319
336
 
320
- Collect output node indexes from the output tail segment.
337
+ Collect feed-forward inbound connection terms for a node.
321
338
 
322
339
  Parameters:
323
- - `generationContext` - Mutable generation context.
340
+ - `currentNode` - Current node.
324
341
 
325
- Returns: Output indexes used for result array emission.
342
+ Returns: Weighted term expressions.
326
343
 
327
- ### formatOutputArrayValues
344
+ ### collectOutputIndexes
328
345
 
329
346
  ```ts
330
- formatOutputArrayValues(
331
- outputIndexes: number[],
332
- ): string
347
+ collectOutputIndexes(
348
+ generationContext: StandaloneGenerationContext,
349
+ ): number[]
333
350
  ```
334
351
 
335
- Format output activation selectors for generated return expression.
352
+ Collect output node indexes from the output tail segment.
336
353
 
337
354
  Parameters:
338
- - `outputIndexes` - Output node indexes.
355
+ - `generationContext` - Mutable generation context.
339
356
 
340
- Returns: Comma-separated `A[index]` selector list.
357
+ Returns: Output indexes used for result array emission.
341
358
 
342
- ### collectIncomingTerms
359
+ ### collectSelfConnectionTerms
343
360
 
344
361
  ```ts
345
- collectIncomingTerms(
362
+ collectSelfConnectionTerms(
346
363
  currentNode: default,
364
+ nodeTraversalIndex: number,
347
365
  ): string[]
348
366
  ```
349
367
 
350
- Collect feed-forward inbound connection terms for a node.
368
+ Collect recurrent self-connection term for a node when present.
351
369
 
352
370
  Parameters:
353
371
  - `currentNode` - Current node.
372
+ - `nodeTraversalIndex` - Node index used for self-state reference.
354
373
 
355
- Returns: Weighted term expressions.
374
+ Returns: Zero or one recurrent term expressions.
356
375
 
357
- ### collectSelfConnectionTerms
376
+ ### foldTermsIntoExpression
358
377
 
359
378
  ```ts
360
- collectSelfConnectionTerms(
361
- currentNode: default,
362
- nodeTraversalIndex: number,
363
- ): string[]
379
+ foldTermsIntoExpression(
380
+ allTerms: string[],
381
+ ): string
364
382
  ```
365
383
 
366
- Collect recurrent self-connection term for a node when present.
384
+ Fold a term collection into a summation expression.
367
385
 
368
386
  Parameters:
369
- - `currentNode` - Current node.
370
- - `nodeTraversalIndex` - Node index used for self-state reference.
387
+ - `allTerms` - Term collection.
371
388
 
372
- Returns: Zero or one recurrent term expressions.
389
+ Returns: Summation expression or fallback zero literal.
373
390
 
374
- ### appendGateMultiplier
391
+ ### formatOutputArrayValues
375
392
 
376
393
  ```ts
377
- appendGateMultiplier(
378
- connectionTerm: string,
379
- gateNode: default | null,
394
+ formatOutputArrayValues(
395
+ outputIndexes: number[],
380
396
  ): string
381
397
  ```
382
398
 
383
- Append a gate activation multiplier to a connection term when a gate exists.
399
+ Format output activation selectors for generated return expression.
384
400
 
385
401
  Parameters:
386
- - `connectionTerm` - Base connection term.
387
- - `gateNode` - Optional gate node.
402
+ - `outputIndexes` - Output node indexes.
388
403
 
389
- Returns: Term with optional gate multiplier.
404
+ Returns: Comma-separated `A[index]` selector list.
390
405
 
391
406
  ### getOptionalNodeIndex
392
407
 
@@ -420,21 +435,6 @@ Parameters:
420
435
 
421
436
  Returns: Combined term collection.
422
437
 
423
- ### foldTermsIntoExpression
424
-
425
- ```ts
426
- foldTermsIntoExpression(
427
- allTerms: string[],
428
- ): string
429
- ```
430
-
431
- Fold a term collection into a summation expression.
432
-
433
- Parameters:
434
- - `allTerms` - Term collection.
435
-
436
- Returns: Summation expression or fallback zero literal.
437
-
438
438
  ## architecture/network/standalone/network.standalone.utils.setup.ts
439
439
 
440
440
  ### asStandaloneProps
@@ -452,35 +452,35 @@ Parameters:
452
452
 
453
453
  Returns: Internal network properties used by the standalone generator.
454
454
 
455
- ### ensureOutputNodesExist
455
+ ### createGenerationContext
456
456
 
457
457
  ```ts
458
- ensureOutputNodesExist(
458
+ createGenerationContext(
459
459
  standaloneProps: NetworkStandaloneProps,
460
- ): void
460
+ ): StandaloneGenerationContext
461
461
  ```
462
462
 
463
- Validate that the network has at least one output node.
463
+ Create a fresh generation context used across orchestration steps.
464
464
 
465
465
  Parameters:
466
466
  - `standaloneProps` - Internal standalone network view.
467
467
 
468
- Returns: Void.
468
+ Returns: Initialized generation context.
469
469
 
470
- ### createGenerationContext
470
+ ### ensureOutputNodesExist
471
471
 
472
472
  ```ts
473
- createGenerationContext(
473
+ ensureOutputNodesExist(
474
474
  standaloneProps: NetworkStandaloneProps,
475
- ): StandaloneGenerationContext
475
+ ): void
476
476
  ```
477
477
 
478
- Create a fresh generation context used across orchestration steps.
478
+ Validate that the network has at least one output node.
479
479
 
480
480
  Parameters:
481
481
  - `standaloneProps` - Internal standalone network view.
482
482
 
483
- Returns: Initialized generation context.
483
+ Returns: Void.
484
484
 
485
485
  ### seedNodeIndexesAndState
486
486
 
@@ -546,54 +546,54 @@ Parameters:
546
546
 
547
547
  Returns: Comma-separated activation function names.
548
548
 
549
- ### resolveActivationArrayType
549
+ ### buildInputGuardLine
550
550
 
551
551
  ```ts
552
- resolveActivationArrayType(
553
- generationContext: StandaloneGenerationContext,
552
+ buildInputGuardLine(
553
+ expectedInputSize: number,
554
554
  ): string
555
555
  ```
556
556
 
557
- Resolve typed-array constructor name based on configured activation precision.
557
+ Build generated input length guard line.
558
558
 
559
559
  Parameters:
560
- - `generationContext` - Mutable generation context.
560
+ - `expectedInputSize` - Required input vector size.
561
561
 
562
- Returns: Constructor name used in generated source.
562
+ Returns: Guard statement line including trailing newline.
563
563
 
564
- ### buildInputGuardLine
564
+ ### resolveActivationArrayType
565
565
 
566
566
  ```ts
567
- buildInputGuardLine(
568
- expectedInputSize: number,
567
+ resolveActivationArrayType(
568
+ generationContext: StandaloneGenerationContext,
569
569
  ): string
570
570
  ```
571
571
 
572
- Build generated input length guard line.
572
+ Resolve typed-array constructor name based on configured activation precision.
573
573
 
574
574
  Parameters:
575
- - `expectedInputSize` - Required input vector size.
575
+ - `generationContext` - Mutable generation context.
576
576
 
577
- Returns: Guard statement line including trailing newline.
577
+ Returns: Constructor name used in generated source.
578
578
 
579
579
  ## architecture/network/standalone/network.standalone.utils.activation.ts
580
580
 
581
- ### resolveSquashName
581
+ ### convertArrowToNamedFunction
582
582
 
583
583
  ```ts
584
- resolveSquashName(
585
- currentNode: default,
586
- nodeTraversalIndex: number,
584
+ convertArrowToNamedFunction(
585
+ sourceCode: string,
586
+ squashName: string,
587
587
  ): string
588
588
  ```
589
589
 
590
- Resolve a stable activation function name for emission.
590
+ Convert an arrow-function source string into a named function declaration source.
591
591
 
592
592
  Parameters:
593
- - `currentNode` - Current node.
594
- - `nodeTraversalIndex` - Node index for anonymous-name fallback.
593
+ - `sourceCode` - Arrow-function source.
594
+ - `squashName` - Required function name.
595
595
 
596
- Returns: Activation function identifier.
596
+ Returns: Named function source.
597
597
 
598
598
  ### ensureActivationFunctionIndex
599
599
 
@@ -616,140 +616,140 @@ Parameters:
616
616
 
617
617
  Returns: Activation function index within generated `F` array.
618
618
 
619
- ### resolveActivationFunctionSource
619
+ ### ensureNamedFunctionSource
620
620
 
621
621
  ```ts
622
- resolveActivationFunctionSource(
622
+ ensureNamedFunctionSource(
623
+ sourceCode: string,
623
624
  squashName: string,
624
- squashFunction: StandaloneSquashFunction,
625
- nodeTraversalIndex: number,
626
625
  ): string
627
626
  ```
628
627
 
629
- Resolve emitted source for built-in or custom activation functions.
628
+ Ensure generated function source starts with the required named signature.
630
629
 
631
630
  Parameters:
632
- - `squashName` - Activation function name.
633
- - `squashFunction` - Activation function implementation.
634
- - `nodeTraversalIndex` - Current node index for fallback flow.
631
+ - `sourceCode` - Function source.
632
+ - `squashName` - Required function name.
635
633
 
636
- Returns: Named function source string.
634
+ Returns: Named function source.
637
635
 
638
- ### normalizeBuiltinSource
636
+ ### normalizeArrowBody
639
637
 
640
638
  ```ts
641
- normalizeBuiltinSource(
642
- sourceCode: string,
643
- squashName: string,
639
+ normalizeArrowBody(
640
+ bodySegment: string,
644
641
  ): string
645
642
  ```
646
643
 
647
- Normalize built-in activation source to a named function and strip coverage artifacts.
644
+ Normalize arrow body into a function-body block.
648
645
 
649
646
  Parameters:
650
- - `sourceCode` - Built-in function source.
651
- - `squashName` - Required function name.
647
+ - `bodySegment` - Raw arrow body segment.
652
648
 
653
- Returns: Cleaned named function source.
649
+ Returns: Function body block string.
654
650
 
655
- ### normalizeCustomSource
651
+ ### normalizeArrowParameters
656
652
 
657
653
  ```ts
658
- normalizeCustomSource(
659
- sourceCode: string,
660
- squashName: string,
661
- nodeTraversalIndex: number,
654
+ normalizeArrowParameters(
655
+ parameterSegment: string,
662
656
  ): string
663
657
  ```
664
658
 
665
- Normalize custom activation source with function/arrow/fallback handling.
659
+ Normalize arrow parameter segment into comma-separated parameter list content.
666
660
 
667
661
  Parameters:
668
- - `sourceCode` - Custom function source.
669
- - `squashName` - Required function name.
670
- - `nodeTraversalIndex` - Current node index for traversal-context parity.
662
+ - `parameterSegment` - Raw arrow parameter segment.
671
663
 
672
- Returns: Cleaned named function source.
664
+ Returns: Parameter list body (without surrounding parentheses).
673
665
 
674
- ### ensureNamedFunctionSource
666
+ ### normalizeBuiltinSource
675
667
 
676
668
  ```ts
677
- ensureNamedFunctionSource(
669
+ normalizeBuiltinSource(
678
670
  sourceCode: string,
679
671
  squashName: string,
680
672
  ): string
681
673
  ```
682
674
 
683
- Ensure generated function source starts with the required named signature.
675
+ Normalize built-in activation source to a named function and strip coverage artifacts.
684
676
 
685
677
  Parameters:
686
- - `sourceCode` - Function source.
678
+ - `sourceCode` - Built-in function source.
687
679
  - `squashName` - Required function name.
688
680
 
689
- Returns: Named function source.
681
+ Returns: Cleaned named function source.
690
682
 
691
- ### convertArrowToNamedFunction
683
+ ### normalizeCustomSource
692
684
 
693
685
  ```ts
694
- convertArrowToNamedFunction(
686
+ normalizeCustomSource(
695
687
  sourceCode: string,
696
688
  squashName: string,
689
+ nodeTraversalIndex: number,
697
690
  ): string
698
691
  ```
699
692
 
700
- Convert an arrow-function source string into a named function declaration source.
693
+ Normalize custom activation source with function/arrow/fallback handling.
701
694
 
702
695
  Parameters:
703
- - `sourceCode` - Arrow-function source.
696
+ - `sourceCode` - Custom function source.
704
697
  - `squashName` - Required function name.
698
+ - `nodeTraversalIndex` - Current node index for traversal-context parity.
705
699
 
706
- Returns: Named function source.
700
+ Returns: Cleaned named function source.
707
701
 
708
- ### normalizeArrowParameters
702
+ ### registerActivationFunction
709
703
 
710
704
  ```ts
711
- normalizeArrowParameters(
712
- parameterSegment: string,
713
- ): string
705
+ registerActivationFunction(
706
+ generationContext: StandaloneGenerationContext,
707
+ squashName: string,
708
+ functionSource: string,
709
+ ): void
714
710
  ```
715
711
 
716
- Normalize arrow parameter segment into comma-separated parameter list content.
712
+ Register a function source and allocate its numeric index.
717
713
 
718
714
  Parameters:
719
- - `parameterSegment` - Raw arrow parameter segment.
715
+ - `generationContext` - Mutable generation context.
716
+ - `squashName` - Activation function name.
717
+ - `functionSource` - Named function source to store.
720
718
 
721
- Returns: Parameter list body (without surrounding parentheses).
719
+ Returns: Void.
722
720
 
723
- ### normalizeArrowBody
721
+ ### resolveActivationFunctionSource
724
722
 
725
723
  ```ts
726
- normalizeArrowBody(
727
- bodySegment: string,
724
+ resolveActivationFunctionSource(
725
+ squashName: string,
726
+ squashFunction: StandaloneSquashFunction,
727
+ nodeTraversalIndex: number,
728
728
  ): string
729
729
  ```
730
730
 
731
- Normalize arrow body into a function-body block.
731
+ Resolve emitted source for built-in or custom activation functions.
732
732
 
733
733
  Parameters:
734
- - `bodySegment` - Raw arrow body segment.
734
+ - `squashName` - Activation function name.
735
+ - `squashFunction` - Activation function implementation.
736
+ - `nodeTraversalIndex` - Current node index for fallback flow.
735
737
 
736
- Returns: Function body block string.
738
+ Returns: Named function source string.
737
739
 
738
- ### registerActivationFunction
740
+ ### resolveSquashName
739
741
 
740
742
  ```ts
741
- registerActivationFunction(
742
- generationContext: StandaloneGenerationContext,
743
- squashName: string,
744
- functionSource: string,
745
- ): void
743
+ resolveSquashName(
744
+ currentNode: default,
745
+ nodeTraversalIndex: number,
746
+ ): string
746
747
  ```
747
748
 
748
- Register a function source and allocate its numeric index.
749
+ Resolve a stable activation function name for emission.
749
750
 
750
751
  Parameters:
751
- - `generationContext` - Mutable generation context.
752
- - `squashName` - Activation function name.
753
- - `functionSource` - Named function source to store.
752
+ - `currentNode` - Current node.
753
+ - `nodeTraversalIndex` - Node index for anonymous-name fallback.
754
754
 
755
- Returns: Void.
755
+ Returns: Activation function identifier.