@reicek/neataptic-ts 0.1.24 → 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.
- package/.github/copilot-instructions.md +11 -0
- package/.github/skills/trace-analyzer-extension/SKILL.md +3 -3
- package/.github/skills/trace-analyzer-extension/assets/extension-checklist.md +1 -1
- package/.github/skills/trace-analyzer-extension/references/analyzer-extension-workflow.md +1 -1
- package/.github/skills/trace-audit-reporting/SKILL.md +3 -3
- package/.github/skills/trace-audit-reporting/references/trace-analysis-workflow.md +1 -1
- package/.github/workflows/ci.yml +3 -3
- package/.github/workflows/deploy-pages.yml +6 -6
- package/.github/workflows/manual_release_pipeline.yml +3 -3
- package/.github/workflows/publish.yml +18 -19
- package/.github/workflows/release_dispatch.yml +3 -3
- package/package.json +26 -20
- package/plans/Flappy_Bird_Folder_Documentation_Pass.md +4 -4
- package/plans/README.md +24 -0
- package/plans/Roadmap.md +62 -40
- package/plans/analyze-trace-solid-split.plans.md +66 -0
- package/plans/architecture-solid-split.plans.md +9 -15
- package/plans/asciiMaze-typescript-repair.plans.md +1 -1
- package/plans/generate-docs-solid-split.plans.md +87 -0
- package/plans/methods-docs.plans.md +25 -1
- package/plans/methods-solid-split.plans.md +14 -14
- package/plans/neat-docs.plans.md +9 -1
- package/plans/neat-test-surface-repair.plans.md +1 -1
- package/plans/render-docs-html-solid-split.plans.md +68 -0
- package/plans/src-no-explicit-any-cleanup.plans.md +1 -1
- package/plans/utils-docs.plans.md +6 -1
- package/scripts/analyze-trace/analyze-trace.analysis.ts +479 -0
- package/scripts/analyze-trace/analyze-trace.constants.ts +35 -0
- package/scripts/analyze-trace/analyze-trace.io.ts +69 -0
- package/scripts/analyze-trace/analyze-trace.report.ts +100 -0
- package/scripts/analyze-trace/analyze-trace.shared.ts +116 -0
- package/scripts/analyze-trace/analyze-trace.ts +45 -0
- package/scripts/analyze-trace/analyze-trace.types.ts +72 -0
- package/scripts/assets/theme.css +80 -23
- package/scripts/copy-examples.ts +239 -0
- package/scripts/export-onnx.ts +223 -0
- package/scripts/generate-bench-tables.ts +378 -37
- package/scripts/generate-docs/generate-docs.constants.ts +107 -0
- package/scripts/generate-docs/generate-docs.order.ts +355 -0
- package/scripts/generate-docs/generate-docs.state.ts +31 -0
- package/scripts/generate-docs/generate-docs.targets.ts +165 -0
- package/scripts/generate-docs/generate-docs.ts +63 -0
- package/scripts/generate-docs/generate-docs.types.ts +112 -0
- package/scripts/generate-docs/output/generate-docs.output.folder-index.utils.ts +167 -0
- package/scripts/generate-docs/output/generate-docs.output.ordering.utils.ts +353 -0
- package/scripts/generate-docs/output/generate-docs.output.readme.utils.ts +420 -0
- package/scripts/generate-docs/output/generate-docs.output.ts +123 -0
- package/scripts/generate-docs/output/generate-docs.output.warnings.utils.ts +219 -0
- package/scripts/generate-docs/symbols/generate-docs.symbols.collection.utils.ts +365 -0
- package/scripts/generate-docs/symbols/generate-docs.symbols.jsdoc.utils.ts +373 -0
- package/scripts/generate-docs/symbols/generate-docs.symbols.normalize.utils.ts +155 -0
- package/scripts/generate-docs/symbols/generate-docs.symbols.render.utils.ts +149 -0
- package/scripts/generate-docs/symbols/generate-docs.symbols.signature.utils.ts +289 -0
- package/scripts/generate-docs/symbols/generate-docs.symbols.ts +11 -0
- package/scripts/mermaid-cli.mjs +102 -22
- package/scripts/mermaid-cli.ts +736 -0
- package/scripts/render-docs-html/render-docs-html.assets.ts +54 -0
- package/scripts/render-docs-html/render-docs-html.mermaid.ts +245 -0
- package/scripts/{render-docs-html.sidebar.ts → render-docs-html/render-docs-html.navigation.ts} +141 -144
- package/scripts/render-docs-html/render-docs-html.pages.ts +333 -0
- package/scripts/render-docs-html/render-docs-html.shared.ts +333 -0
- package/scripts/render-docs-html/render-docs-html.types.ts +42 -0
- package/scripts/render-docs-html.ts +23 -587
- package/scripts/run-docs.ts +238 -0
- package/scripts/write-dist-docs-pkg.ts +40 -0
- package/src/README.md +75 -75
- package/src/architecture/connection/README.md +5 -5
- package/src/architecture/layer/README.md +508 -508
- package/src/architecture/network/README.md +1458 -1458
- package/src/architecture/network/activate/README.md +694 -694
- package/src/architecture/network/bootstrap/README.md +77 -77
- package/src/architecture/network/connect/README.md +74 -74
- package/src/architecture/network/deterministic/README.md +135 -135
- package/src/architecture/network/evolve/README.md +364 -364
- package/src/architecture/network/gating/README.md +130 -130
- package/src/architecture/network/genetic/README.md +399 -399
- package/src/architecture/network/mutate/README.md +897 -897
- package/src/architecture/network/onnx/README.md +720 -720
- package/src/architecture/network/onnx/export/README.md +728 -728
- package/src/architecture/network/onnx/export/layers/README.md +450 -450
- package/src/architecture/network/onnx/import/README.md +618 -618
- package/src/architecture/network/onnx/schema/README.md +32 -32
- package/src/architecture/network/prune/README.md +245 -245
- package/src/architecture/network/remove/README.md +135 -135
- package/src/architecture/network/runtime/README.md +106 -106
- package/src/architecture/network/serialize/README.md +542 -542
- package/src/architecture/network/slab/README.md +608 -608
- package/src/architecture/network/standalone/README.md +212 -212
- package/src/architecture/network/stats/README.md +84 -84
- package/src/architecture/network/topology/README.md +465 -465
- package/src/architecture/network/training/README.md +200 -200
- package/src/architecture/node/README.md +5 -5
- package/src/architecture/nodePool/README.md +14 -14
- package/src/methods/README.md +99 -99
- package/src/methods/activation/README.md +189 -189
- package/src/methods/cost/README.md +131 -131
- package/src/methods/rate/README.md +86 -86
- package/src/multithreading/README.md +77 -77
- package/src/multithreading/workers/browser/README.md +8 -8
- package/src/multithreading/workers/node/README.md +8 -8
- package/src/neat/README.md +148 -148
- package/src/neat/adaptive/README.md +120 -120
- package/src/neat/adaptive/acceptance/README.md +40 -40
- package/src/neat/adaptive/complexity/README.md +137 -137
- package/src/neat/adaptive/core/README.md +197 -197
- package/src/neat/adaptive/lineage/README.md +90 -90
- package/src/neat/adaptive/mutation/README.md +284 -284
- package/src/neat/compat/README.md +43 -43
- package/src/neat/compat/core/README.md +90 -90
- package/src/neat/diversity/README.md +35 -35
- package/src/neat/diversity/core/README.md +88 -88
- package/src/neat/evaluate/README.md +85 -85
- package/src/neat/evaluate/auto-distance/README.md +75 -75
- package/src/neat/evaluate/entropy-compat/README.md +37 -37
- package/src/neat/evaluate/entropy-sharing/README.md +43 -43
- package/src/neat/evaluate/fitness/README.md +23 -23
- package/src/neat/evaluate/novelty/README.md +120 -120
- package/src/neat/evaluate/objectives/README.md +17 -17
- package/src/neat/evaluate/shared/README.md +94 -94
- package/src/neat/evolve/README.md +96 -96
- package/src/neat/evolve/adaptive/README.md +60 -60
- package/src/neat/evolve/objectives/README.md +63 -63
- package/src/neat/evolve/offspring/README.md +56 -56
- package/src/neat/evolve/population/README.md +171 -171
- package/src/neat/evolve/runtime/README.md +79 -79
- package/src/neat/evolve/speciation/README.md +74 -74
- package/src/neat/evolve/warnings/README.md +10 -10
- package/src/neat/export/README.md +114 -114
- package/src/neat/helpers/README.md +50 -50
- package/src/neat/init/README.md +9 -9
- package/src/neat/lineage/core/README.md +101 -101
- package/src/neat/multiobjective/category/README.md +74 -74
- package/src/neat/multiobjective/crowding/README.md +272 -272
- package/src/neat/multiobjective/dominance/README.md +171 -171
- package/src/neat/multiobjective/fronts/README.md +68 -68
- package/src/neat/multiobjective/metrics/README.md +43 -43
- package/src/neat/multiobjective/objectives/README.md +31 -31
- package/src/neat/multiobjective/shared/README.md +27 -27
- package/src/neat/mutation/README.md +97 -97
- package/src/neat/mutation/add-conn/README.md +115 -115
- package/src/neat/mutation/add-node/README.md +126 -126
- package/src/neat/mutation/flow/README.md +149 -149
- package/src/neat/mutation/repair/README.md +185 -185
- package/src/neat/mutation/select/README.md +117 -117
- package/src/neat/mutation/shared/README.md +32 -32
- package/src/neat/objectives/README.md +25 -25
- package/src/neat/objectives/core/README.md +67 -67
- package/src/neat/pruning/README.md +40 -40
- package/src/neat/pruning/core/README.md +171 -171
- package/src/neat/pruning/facade/README.md +32 -32
- package/src/neat/rng/README.md +104 -104
- package/src/neat/rng/core/README.md +137 -137
- package/src/neat/rng/facade/README.md +50 -50
- package/src/neat/selection/README.md +111 -111
- package/src/neat/selection/core/README.md +227 -227
- package/src/neat/selection/facade/README.md +61 -61
- package/src/neat/shared/README.md +163 -163
- package/src/neat/speciation/README.md +31 -31
- package/src/neat/speciation/threshold/README.md +35 -35
- package/src/neat/species/README.md +25 -25
- package/src/neat/species/core/README.md +20 -20
- package/src/neat/species/core/shared/README.md +18 -18
- package/src/neat/species/history/context/README.md +22 -22
- package/src/neat/telemetry/accessors/README.md +58 -58
- package/src/neat/telemetry/exports/README.md +233 -233
- package/src/neat/telemetry/facade/README.md +252 -252
- package/src/neat/telemetry/facade/archive/README.md +57 -57
- package/src/neat/telemetry/facade/buffer/README.md +43 -43
- package/src/neat/telemetry/facade/lineage/README.md +12 -12
- package/src/neat/telemetry/facade/objectives/README.md +44 -44
- package/src/neat/telemetry/facade/runtime/README.md +26 -26
- package/src/neat/telemetry/facade/species/README.md +27 -27
- package/src/neat/telemetry/metrics/README.md +696 -696
- package/src/neat/telemetry/recorder/README.md +57 -57
- package/src/neat/telemetry/types/README.md +32 -32
- package/src/neat/topology-intent/README.md +75 -75
- package/src/utils/README.md +193 -193
- package/test/examples/asciiMaze/browser-entry/README.md +92 -92
- package/test/examples/asciiMaze/dashboardManager/README.md +109 -109
- package/test/examples/asciiMaze/dashboardManager/telemetry/README.md +28 -28
- package/test/examples/asciiMaze/evolutionEngine/README.md +1527 -1527
- package/test/examples/asciiMaze/mazeMovement/README.md +105 -105
- package/test/examples/asciiMaze/mazeMovement/finalization/README.md +16 -16
- package/test/examples/asciiMaze/mazeMovement/policy/README.md +57 -57
- package/test/examples/asciiMaze/mazeMovement/runtime/README.md +52 -52
- package/test/examples/asciiMaze/mazeMovement/shaping/README.md +46 -46
- package/test/examples/flappy_bird/browser-entry/README.md +508 -508
- package/test/examples/flappy_bird/browser-entry/host/README.md +101 -101
- package/test/examples/flappy_bird/browser-entry/host/resize/README.md +144 -144
- package/test/examples/flappy_bird/browser-entry/network-view/README.md +194 -194
- package/test/examples/flappy_bird/browser-entry/playback/README.md +278 -278
- package/test/examples/flappy_bird/browser-entry/playback/background/README.md +129 -129
- package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/README.md +502 -502
- package/test/examples/flappy_bird/browser-entry/playback/frame-render/README.md +139 -139
- package/test/examples/flappy_bird/browser-entry/playback/snapshot/README.md +10 -10
- package/test/examples/flappy_bird/browser-entry/playback/trail/README.md +43 -43
- package/test/examples/flappy_bird/browser-entry/playback/worker-channel/README.md +30 -30
- package/test/examples/flappy_bird/browser-entry/runtime/README.md +59 -59
- package/test/examples/flappy_bird/browser-entry/visualization/README.md +276 -276
- package/test/examples/flappy_bird/browser-entry/worker-channel/README.md +16 -16
- package/test/examples/flappy_bird/constants/README.md +1070 -1070
- package/test/examples/flappy_bird/environment/README.md +22 -22
- package/test/examples/flappy_bird/evaluation/README.md +32 -32
- package/test/examples/flappy_bird/evaluation/rollout/README.md +141 -141
- package/test/examples/flappy_bird/flappy-evolution-worker/README.md +425 -425
- package/test/examples/flappy_bird/simulation-shared/README.md +170 -170
- package/test/examples/flappy_bird/simulation-shared/observation/README.md +109 -109
- package/test/examples/flappy_bird/trainer/README.md +325 -325
- package/test/examples/flappy_bird/trainer/evaluation/README.md +74 -74
- package/scripts/analyze-trace.ts +0 -590
- package/scripts/copy-examples.mjs +0 -114
- package/scripts/export-onnx.mjs +0 -86
- package/scripts/generate-bench-tables.mjs +0 -182
- package/scripts/generate-docs.ts +0 -2900
- package/scripts/write-dist-docs-pkg.mjs +0 -16
|
@@ -91,6 +91,15 @@ When a generated `src/**/README.md` appears outdated relative to the code or JSD
|
|
|
91
91
|
- run `npm run docs` to refresh generated documentation when needed,
|
|
92
92
|
- consider `educational-docs` pre-approved to run `npm run docs` after doc-affecting edits so README files stay synchronized and drift does not confuse later work.
|
|
93
93
|
|
|
94
|
+
CI-sensitive docs and tooling validation
|
|
95
|
+
---------------------------------------
|
|
96
|
+
When a task touches `.github/workflows/**`, `package.json`, `package-lock.json`, `scripts/**` that launch docs or browser tooling, Mermaid rendering, Puppeteer/Chromium, or any dependency change that can affect those paths:
|
|
97
|
+
|
|
98
|
+
- do not treat local Windows success as sufficient evidence for GitHub-hosted Linux runners,
|
|
99
|
+
- run `npm ci` after manifest or lockfile edits and report pass/fail before claiming the workflow is fixed,
|
|
100
|
+
- run `npm run docs` when Mermaid, Puppeteer, docs generation, or related launch scripts are affected,
|
|
101
|
+
- when browser-based docs tooling runs in Linux CI, explicitly account for Chromium sandbox restrictions and prefer durable script-level launch configuration over workflow-only ad hoc flags.
|
|
102
|
+
|
|
94
103
|
Folder README reconnaissance (read this before deep code search)
|
|
95
104
|
---------------------------------------------------------------
|
|
96
105
|
Because JSDoc is auto-compiled into each folder's `README.md`, those README files are the fastest condensed overview of a module's purpose, exported surface, neighboring files, and intended usage.
|
|
@@ -327,8 +336,10 @@ When you modify or create files under `src/` or `test/`, run (or advise running)
|
|
|
327
336
|
Quick checks to run (recommended)
|
|
328
337
|
--------------------------------
|
|
329
338
|
- TypeScript: run `npm run build` and report pass/fail.
|
|
339
|
+
- Clean install: when `package.json`, `package-lock.json`, or workflow/runtime tooling changes, run `npm ci` and report pass/fail.
|
|
330
340
|
- Tests heuristic: flag test files that contain more than one `expect(` occurrence (these should be split into multiple `it()` blocks).
|
|
331
341
|
- JSDoc: for new exported symbols, ensure a JSDoc block with `@param`/`@returns` exists (or flag if missing).
|
|
342
|
+
- CI browser/docs tooling: when the changed path can invoke Mermaid, Puppeteer, or Chromium in CI, validate `npm run docs` and do not assume local non-Linux success generalizes to GitHub-hosted Linux.
|
|
332
343
|
- ES2023 modernization: flag legacy patterns and suggest modern equivalents (see below one-liners).
|
|
333
344
|
|
|
334
345
|
PowerShell examples (local validation)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: trace-analyzer-extension
|
|
3
|
-
description: 'Extend scripts/analyze-trace.ts with new rollups, comparisons, script attribution, percentiles, or deterministic report sections. Use when the existing trace analyzer cannot answer an engineering question about Chrome trace or Perfetto data.'
|
|
3
|
+
description: 'Extend scripts/analyze-trace/analyze-trace.ts with new rollups, comparisons, script attribution, percentiles, or deterministic report sections. Use when the existing trace analyzer cannot answer an engineering question about Chrome trace or Perfetto data.'
|
|
4
4
|
argument-hint: 'Describe the trace question, missing metric, and validation trace file.'
|
|
5
5
|
user-invocable: true
|
|
6
6
|
disable-model-invocation: false
|
|
@@ -8,7 +8,7 @@ disable-model-invocation: false
|
|
|
8
8
|
|
|
9
9
|
# Trace Analyzer Extension
|
|
10
10
|
|
|
11
|
-
Use this skill when an agent needs to modify `scripts/analyze-trace.ts` instead
|
|
11
|
+
Use this skill when an agent needs to modify `scripts/analyze-trace/analyze-trace.ts` instead
|
|
12
12
|
of only consuming its current output.
|
|
13
13
|
|
|
14
14
|
## When to Use
|
|
@@ -27,7 +27,7 @@ of only consuming its current output.
|
|
|
27
27
|
## Standard Workflow
|
|
28
28
|
|
|
29
29
|
1. State the engineering question the current analyzer cannot answer.
|
|
30
|
-
2. Read `scripts/analyze-trace.ts` before proposing a new section.
|
|
30
|
+
2. Read `scripts/analyze-trace/analyze-trace.ts` before proposing a new section.
|
|
31
31
|
3. Prefer extending existing helpers over adding parallel ad hoc logic.
|
|
32
32
|
4. Keep output deterministic, text-first, and easy to compare across captures.
|
|
33
33
|
5. Validate the new output against a real trace file from the repo.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Analyzer Extension Workflow
|
|
2
2
|
|
|
3
|
-
This reference explains how to safely extend `scripts/analyze-trace.ts` without
|
|
3
|
+
This reference explains how to safely extend `scripts/analyze-trace/analyze-trace.ts` without
|
|
4
4
|
turning it into a one-off debugging script.
|
|
5
5
|
|
|
6
6
|
## Start With the Question
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: trace-audit-reporting
|
|
3
|
-
description: 'Analyze Chrome trace or Perfetto trace captures, run scripts/analyze-trace.ts, map hotspots to NeatapticTS source files, and generate a detailed performance report with findings, evidence, and an action plan. Use when auditing renderer, worker, GPU, requestAnimationFrame, postMessage, or long-task regressions.'
|
|
3
|
+
description: 'Analyze Chrome trace or Perfetto trace captures, run scripts/analyze-trace/analyze-trace.ts, map hotspots to NeatapticTS source files, and generate a detailed performance report with findings, evidence, and an action plan. Use when auditing renderer, worker, GPU, requestAnimationFrame, postMessage, or long-task regressions.'
|
|
4
4
|
argument-hint: 'Describe the trace file, feature area, and target report file.'
|
|
5
5
|
user-invocable: true
|
|
6
6
|
disable-model-invocation: false
|
|
@@ -42,7 +42,7 @@ surface for the library rather than the final destination for a workaround.
|
|
|
42
42
|
- [Trace analysis workflow](./references/trace-analysis-workflow.md)
|
|
43
43
|
- [Performance report template](./assets/performance-report-template.md)
|
|
44
44
|
- Companion skill: `trace-analyzer-extension` for modifying
|
|
45
|
-
`scripts/analyze-trace.ts` itself when new rollups or comparisons are needed.
|
|
45
|
+
`scripts/analyze-trace/analyze-trace.ts` itself when new rollups or comparisons are needed.
|
|
46
46
|
|
|
47
47
|
## Standard Workflow
|
|
48
48
|
|
|
@@ -97,7 +97,7 @@ surface for the library rather than the final destination for a workaround.
|
|
|
97
97
|
|
|
98
98
|
## Repo-Specific Notes
|
|
99
99
|
|
|
100
|
-
- This repository already includes `scripts/analyze-trace.ts` for compact,
|
|
100
|
+
- This repository already includes `scripts/analyze-trace/analyze-trace.ts` for compact,
|
|
101
101
|
thread-aware trace audits.
|
|
102
102
|
- For work in `src/` or `test/`, consult the nearest folder `README.md` before
|
|
103
103
|
deep file reads.
|
|
@@ -116,7 +116,7 @@ Use these heuristics when the trace touches evaluation or inference paths:
|
|
|
116
116
|
|
|
117
117
|
## When to Extend the Analyzer
|
|
118
118
|
|
|
119
|
-
Modify `scripts/analyze-trace.ts` only when the existing output cannot answer a
|
|
119
|
+
Modify `scripts/analyze-trace/analyze-trace.ts` only when the existing output cannot answer a
|
|
120
120
|
meaningful engineering question.
|
|
121
121
|
|
|
122
122
|
Good reasons to extend it:
|
package/.github/workflows/ci.yml
CHANGED
|
@@ -11,11 +11,11 @@ jobs:
|
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
|
|
13
13
|
steps:
|
|
14
|
-
- uses: actions/checkout@
|
|
14
|
+
- uses: actions/checkout@v6
|
|
15
15
|
- name: Use Node.js
|
|
16
|
-
uses: actions/setup-node@
|
|
16
|
+
uses: actions/setup-node@v6
|
|
17
17
|
with:
|
|
18
|
-
node-version: '
|
|
18
|
+
node-version: '24'
|
|
19
19
|
- name: Install dependencies
|
|
20
20
|
run: npm ci
|
|
21
21
|
- name: Run tests
|
|
@@ -22,12 +22,12 @@ jobs:
|
|
|
22
22
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
23
23
|
steps:
|
|
24
24
|
- name: Checkout
|
|
25
|
-
uses: actions/checkout@
|
|
25
|
+
uses: actions/checkout@v6
|
|
26
26
|
|
|
27
27
|
- name: Setup Node
|
|
28
|
-
uses: actions/setup-node@
|
|
28
|
+
uses: actions/setup-node@v6
|
|
29
29
|
with:
|
|
30
|
-
node-version:
|
|
30
|
+
node-version: 24
|
|
31
31
|
|
|
32
32
|
- name: Install dependencies
|
|
33
33
|
run: npm ci
|
|
@@ -36,13 +36,13 @@ jobs:
|
|
|
36
36
|
run: npm run docs
|
|
37
37
|
|
|
38
38
|
- name: Setup Pages
|
|
39
|
-
uses: actions/configure-pages@
|
|
39
|
+
uses: actions/configure-pages@v6
|
|
40
40
|
|
|
41
41
|
- name: Upload docs artifact
|
|
42
|
-
uses: actions/upload-pages-artifact@
|
|
42
|
+
uses: actions/upload-pages-artifact@v4
|
|
43
43
|
with:
|
|
44
44
|
path: docs
|
|
45
45
|
|
|
46
46
|
- name: Deploy to GitHub Pages
|
|
47
47
|
id: deployment
|
|
48
|
-
uses: actions/deploy-pages@
|
|
48
|
+
uses: actions/deploy-pages@v5
|
|
@@ -25,15 +25,15 @@ jobs:
|
|
|
25
25
|
|
|
26
26
|
steps:
|
|
27
27
|
- name: Checkout
|
|
28
|
-
uses: actions/checkout@
|
|
28
|
+
uses: actions/checkout@v6
|
|
29
29
|
with:
|
|
30
30
|
ref: ${{ github.event.inputs.branch }}
|
|
31
31
|
fetch-depth: 0
|
|
32
32
|
|
|
33
33
|
- name: Setup Node
|
|
34
|
-
uses: actions/setup-node@
|
|
34
|
+
uses: actions/setup-node@v6
|
|
35
35
|
with:
|
|
36
|
-
node-version: '
|
|
36
|
+
node-version: '24'
|
|
37
37
|
|
|
38
38
|
- name: Install dependencies
|
|
39
39
|
run: npm ci
|
|
@@ -51,24 +51,23 @@ jobs:
|
|
|
51
51
|
LOOP_SKIP: 'false'
|
|
52
52
|
steps:
|
|
53
53
|
- name: Checkout
|
|
54
|
-
uses: actions/checkout@
|
|
54
|
+
uses: actions/checkout@v6
|
|
55
55
|
with:
|
|
56
56
|
fetch-depth: 0
|
|
57
57
|
|
|
58
58
|
- name: Use npm cache
|
|
59
59
|
if: ${{ env.LOOP_SKIP == 'false' }}
|
|
60
|
-
uses: actions/setup-node@
|
|
60
|
+
uses: actions/setup-node@v6
|
|
61
61
|
with:
|
|
62
|
-
node-version:
|
|
62
|
+
node-version: 24
|
|
63
63
|
cache: 'npm'
|
|
64
64
|
|
|
65
65
|
- name: Setup Node (npmjs)
|
|
66
66
|
if: ${{ env.LOOP_SKIP == 'false' }}
|
|
67
|
-
uses: actions/setup-node@
|
|
67
|
+
uses: actions/setup-node@v6
|
|
68
68
|
with:
|
|
69
|
-
node-version:
|
|
69
|
+
node-version: 24
|
|
70
70
|
registry-url: https://registry.npmjs.org
|
|
71
|
-
always-auth: true
|
|
72
71
|
env:
|
|
73
72
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
74
73
|
|
|
@@ -141,11 +140,10 @@ jobs:
|
|
|
141
140
|
|
|
142
141
|
- name: Setup Node (GitHub Packages)
|
|
143
142
|
if: ${{ env.LOOP_SKIP == 'false' }}
|
|
144
|
-
uses: actions/setup-node@
|
|
143
|
+
uses: actions/setup-node@v6
|
|
145
144
|
with:
|
|
146
|
-
node-version:
|
|
145
|
+
node-version: 24
|
|
147
146
|
registry-url: https://npm.pkg.github.com/
|
|
148
|
-
always-auth: true
|
|
149
147
|
env:
|
|
150
148
|
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
151
149
|
|
|
@@ -188,17 +186,18 @@ jobs:
|
|
|
188
186
|
fi
|
|
189
187
|
- name: Create GitHub Release
|
|
190
188
|
if: ${{ env.LOOP_SKIP == 'false' && env.RUN_PUBLISH == 'true' && github.event_name != 'release' }}
|
|
191
|
-
uses: actions/create-release@v1
|
|
192
189
|
env:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
190
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
191
|
+
run: |
|
|
192
|
+
set -e
|
|
193
|
+
TAG="v${{ steps.pkgver.outputs.version }}"
|
|
194
|
+
if gh release view "$TAG" >/dev/null 2>&1; then
|
|
195
|
+
echo "GitHub release $TAG already exists."
|
|
196
|
+
else
|
|
197
|
+
gh release create "$TAG" \
|
|
198
|
+
--title "$TAG" \
|
|
199
|
+
--notes "Automated release for version $TAG.\nGenerated by publish workflow."
|
|
200
|
+
fi
|
|
202
201
|
|
|
203
202
|
- name: Summary
|
|
204
203
|
run: |
|
|
@@ -12,14 +12,14 @@ jobs:
|
|
|
12
12
|
bump-and-release:
|
|
13
13
|
runs-on: ubuntu-latest
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v6
|
|
16
16
|
with:
|
|
17
17
|
fetch-depth: 0
|
|
18
18
|
|
|
19
19
|
- name: Setup Node
|
|
20
|
-
uses: actions/setup-node@
|
|
20
|
+
uses: actions/setup-node@v6
|
|
21
21
|
with:
|
|
22
|
-
node-version: '
|
|
22
|
+
node-version: '24'
|
|
23
23
|
|
|
24
24
|
- name: Install deps
|
|
25
25
|
run: npm ci
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reicek/neataptic-ts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.26",
|
|
4
4
|
"description": "Architecture-free neural network library with genetic algorithm implementations",
|
|
5
5
|
"main": "./dist/neataptic.js",
|
|
6
6
|
"module": "./dist/neataptic.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"pretest": "npm run build",
|
|
13
13
|
"test:bench": "npm run jest:base -- --no-cache --runInBand --verbose --testPathPatterns=benchmark",
|
|
14
14
|
"bench:asciiMaze": "node -r ts-node/register test/benchmarks/asciiMaze.micro.bench.ts",
|
|
15
|
+
"bench:tables": "npm run docs:build-scripts && node ./dist-docs/scripts/generate-bench-tables.js",
|
|
15
16
|
"test:silent": "npm run jest:base -- --no-cache --coverage --collect-coverage --runInBand --testPathIgnorePatterns=.e2e.test.ts --testPathIgnorePatterns=benchmark\\..*\\.test\\.ts$ --silent",
|
|
16
17
|
"deploy": "npm run build && npm run test:dist && npm publish",
|
|
17
18
|
"build": "npm run build:webpack && npm run build:ts",
|
|
@@ -20,28 +21,33 @@
|
|
|
20
21
|
"build:ascii-maze": "npx esbuild test/examples/asciiMaze/browser-entry.ts --bundle --outfile=docs/assets/ascii-maze.bundle.js --platform=browser --format=iife --minify --sourcemap --external:fs --external:child_process --external:path",
|
|
21
22
|
"build:flappy-worker": "npx esbuild test/examples/flappy_bird/flappyEvolution.worker.ts --bundle --outfile=docs/assets/flappy-evolution.worker.bundle.js --platform=browser --format=iife --minify --sourcemap --external:fs --external:child_process --external:path",
|
|
22
23
|
"build:flappy-bird": "npx esbuild test/examples/flappy_bird/browser-entry/browser-entry.ts --bundle --outfile=docs/assets/flappy-bird.bundle.js --platform=browser --format=iife --minify --sourcemap --external:fs --external:child_process --external:path",
|
|
23
|
-
"trace:analyze": "
|
|
24
|
+
"trace:analyze": "npm run docs:build-scripts && node ./dist-docs/scripts/analyze-trace/analyze-trace.js",
|
|
24
25
|
"start:local-server": "npx http-server . -p 8080 -c-1",
|
|
25
26
|
"start:ts": "ts-node src/neataptic.ts",
|
|
26
27
|
"test:e2e": "cross-env FORCE_COLOR=true NODE_OPTIONS=--no-experimental-webstorage jest e2e.test.ts --config=jest.config.mjs --no-cache --runInBand",
|
|
27
28
|
"test:e2e:logs": "npm run jest:base -- e2e.test.ts --verbose --runInBand --no-cache",
|
|
28
29
|
"test:dist": "npm run build:ts && npm run jest:base -- --no-cache --coverage --collect-coverage --runInBand --testPathIgnorePatterns=.e2e.test.ts --testPathIgnorePatterns=benchmark\\..*\\.test\\.ts$",
|
|
29
|
-
"docs:build-scripts": "tsc -p tsconfig.docs.json && node scripts/write-dist-docs-pkg.
|
|
30
|
-
"docs:folders:src": "
|
|
31
|
-
"docs:folders:
|
|
32
|
-
"docs:folders:
|
|
33
|
-
"docs:folders": "npm run docs:
|
|
34
|
-
"docs:
|
|
35
|
-
"docs:
|
|
36
|
-
"docs:
|
|
37
|
-
"docs:
|
|
30
|
+
"docs:build-scripts": "tsc -p tsconfig.docs.json && node ./dist-docs/scripts/write-dist-docs-pkg.js",
|
|
31
|
+
"docs:folders:src:built": "node ./dist-docs/scripts/generate-docs/generate-docs.js --target=src",
|
|
32
|
+
"docs:folders:src": "npm run docs:build-scripts && npm run docs:folders:src:built",
|
|
33
|
+
"docs:folders:asciiMaze:built": "node ./dist-docs/scripts/generate-docs/generate-docs.js --target=asciiMaze",
|
|
34
|
+
"docs:folders:asciiMaze": "npm run docs:build-scripts && npm run docs:folders:asciiMaze:built",
|
|
35
|
+
"docs:folders:flappy-bird:built": "node ./dist-docs/scripts/generate-docs/generate-docs.js --target=flappy-bird",
|
|
36
|
+
"docs:folders:flappy-bird": "npm run docs:build-scripts && npm run docs:folders:flappy-bird:built",
|
|
37
|
+
"docs:folders": "npm run docs:build-scripts && node ./dist-docs/scripts/run-docs.js folders",
|
|
38
|
+
"docs:html:built": "node ./dist-docs/scripts/render-docs-html.js",
|
|
39
|
+
"docs:html": "npm run docs:build-scripts && npm run docs:html:built",
|
|
40
|
+
"docs:mermaid:validate": "npm run docs:build-scripts && node ./dist-docs/scripts/mermaid-cli.js validate",
|
|
41
|
+
"docs:mermaid:export": "npm run docs:build-scripts && node ./dist-docs/scripts/mermaid-cli.js export",
|
|
42
|
+
"docs:examples:built": "node ./dist-docs/scripts/copy-examples.js",
|
|
43
|
+
"docs:examples": "npm run docs:build-scripts && npm run docs:examples:built",
|
|
38
44
|
"prettier": "npm run prettier:tests && npm run prettier:src",
|
|
39
45
|
"prettier:tests": "npx prettier --write test/**/*.ts",
|
|
40
46
|
"prettier:src": "npx prettier --write src/**/*.ts",
|
|
41
|
-
"docs": "npm run
|
|
47
|
+
"docs": "npm run docs:build-scripts && node ./dist-docs/scripts/run-docs.js all",
|
|
42
48
|
"lint": "eslint src/ test/",
|
|
43
49
|
"lint:fix": "eslint src/ --fix",
|
|
44
|
-
"onnx:export": "node scripts/export-onnx.
|
|
50
|
+
"onnx:export": "npm run docs:build-scripts && node ./dist-docs/scripts/export-onnx.js"
|
|
45
51
|
},
|
|
46
52
|
"exports": {
|
|
47
53
|
".": {
|
|
@@ -60,13 +66,13 @@
|
|
|
60
66
|
"@types/seedrandom": "^3.0.8",
|
|
61
67
|
"@types/webpack": "^5.28.5",
|
|
62
68
|
"@types/webpack-dev-server": "^4.7.2",
|
|
63
|
-
"@typescript-eslint/eslint-plugin": "^8.57.
|
|
64
|
-
"@typescript-eslint/parser": "^8.57.
|
|
69
|
+
"@typescript-eslint/eslint-plugin": "^8.57.2",
|
|
70
|
+
"@typescript-eslint/parser": "^8.57.2",
|
|
65
71
|
"chai": "^6.2.2",
|
|
66
72
|
"copy-webpack-plugin": "^14.0.0",
|
|
67
73
|
"cross-env": "^10.1.0",
|
|
68
74
|
"esbuild": "^0.27.4",
|
|
69
|
-
"eslint": "^10.0
|
|
75
|
+
"eslint": "^10.1.0",
|
|
70
76
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
71
77
|
"fast-glob": "^3.3.3",
|
|
72
78
|
"fs-extra": "^11.3.4",
|
|
@@ -74,7 +80,7 @@
|
|
|
74
80
|
"jest": "^30.3.0",
|
|
75
81
|
"jest-environment-jsdom": "^30.3.0",
|
|
76
82
|
"jsdoc-to-markdown": "^9.1.3",
|
|
77
|
-
"marked": "^17.0.
|
|
83
|
+
"marked": "^17.0.5",
|
|
78
84
|
"mermaid": "^11.13.0",
|
|
79
85
|
"mkdocs": "^0.0.1",
|
|
80
86
|
"puppeteer": "^23.11.1",
|
|
@@ -83,9 +89,9 @@
|
|
|
83
89
|
"ts-morph": "^27.0.2",
|
|
84
90
|
"ts-node": "^10.9.2",
|
|
85
91
|
"typescript": "^5.9.3",
|
|
86
|
-
"undici-types": "^7.24.
|
|
92
|
+
"undici-types": "^7.24.6",
|
|
87
93
|
"webpack": "^5.105.4",
|
|
88
|
-
"webpack-cli": "^
|
|
94
|
+
"webpack-cli": "^7.0.2"
|
|
89
95
|
},
|
|
90
96
|
"repository": {
|
|
91
97
|
"type": "git",
|
|
@@ -120,6 +126,6 @@
|
|
|
120
126
|
},
|
|
121
127
|
"dependencies": {
|
|
122
128
|
"seedrandom": "^3.0.5",
|
|
123
|
-
"undici": "^7.24.
|
|
129
|
+
"undici": "^7.24.6"
|
|
124
130
|
}
|
|
125
131
|
}
|
|
@@ -37,13 +37,13 @@ tour of the example architecture rather than a sparse export inventory.
|
|
|
37
37
|
## Steps
|
|
38
38
|
|
|
39
39
|
- [x] Step 1: Tidy the root `test/examples/flappy_bird` surface and verify the
|
|
40
|
-
|
|
40
|
+
README inventory-driven workflow.
|
|
41
41
|
- [x] Step 2: Tidy the worker and trainer-facing folders.
|
|
42
42
|
- [x] Step 3: Tidy shared simulation, environment, constants, and evaluation
|
|
43
|
-
|
|
43
|
+
folders.
|
|
44
44
|
- [x] Step 4: Tidy browser-entry and its nested README-owning folders one by one.
|
|
45
45
|
- [x] Step 5: Regenerate docs, run focused validation, and record any durable
|
|
46
|
-
|
|
46
|
+
boundary notes that changed during the pass.
|
|
47
47
|
|
|
48
48
|
## Step 1 Inventory
|
|
49
49
|
|
|
@@ -114,4 +114,4 @@ tour of the example architecture rather than a sparse export inventory.
|
|
|
114
114
|
- The todo list reflects completion folder by folder.
|
|
115
115
|
- Docs regeneration succeeds after documentation-affecting changes.
|
|
116
116
|
- A later session can resume from this plan and the todo list without prior chat
|
|
117
|
-
history.
|
|
117
|
+
history.
|
package/plans/README.md
CHANGED
|
@@ -25,34 +25,57 @@ Recommended reading order:
|
|
|
25
25
|
|
|
26
26
|
Selection guide:
|
|
27
27
|
|
|
28
|
+
- `plans/analyze-trace-solid-split.plans.md`: completed trace-analyzer tooling split and reopen point for future script-boundary work.
|
|
29
|
+
- `plans/architecture-solid-split.plans.md`: active architecture folderization and boundary-ownership cleanup across `src/architecture`.
|
|
28
30
|
- `plans/neat.plans.md`: core NEAT correctness, innovation tracking, crossover alignment, speciation invariants.
|
|
29
31
|
- `plans/Roadmap.md`: dependency-aware execution order across all initiatives.
|
|
30
32
|
- `plans/Architecture_Primitives_Node_Group_Layer.md`: first-class architecture-building primitives such as nodes, groups, and layers.
|
|
33
|
+
- `plans/asciiMaze-typescript-repair.plans.md`: completed `asciiMaze` TypeScript repair baseline and reopen point for future diagnostics.
|
|
31
34
|
- `plans/Browser_Build_and_CDN_Distribution.md`: browser packaging, CDN usage, and distribution ergonomics.
|
|
32
35
|
- `plans/Construct_From_Parts_Graph_Assembly.md`: deterministic graph assembly and validated network construction from parts.
|
|
36
|
+
- `plans/ES2023 migration`: repository-wide ES2023 syntax and modernization lane.
|
|
33
37
|
- `plans/Evolution_Training_Interoperability_Contracts.md`: contracts between evolution workflows and gradient-based training.
|
|
38
|
+
- `plans/Flappy_Bird_Folder_Documentation_Pass.md`: completed Flappy Bird folder documentation baseline and reopen point for example-docs follow-up.
|
|
39
|
+
- `plans/generate-docs-solid-split.plans.md`: completed docs-generator tooling split and reopen point for future `scripts/generate-docs/` work.
|
|
34
40
|
- `plans/HyperEvoDevoMorphoNEAT.md`: evo-devo and morphology-oriented research direction.
|
|
35
41
|
- `plans/Interactive_Examples_and_Learning_Path.md`: runnable examples, onboarding flow, and learning-path improvements.
|
|
36
42
|
- `plans/Memory_Optimization.md`: scaling, memory layout, and strategies for very large networks.
|
|
43
|
+
- `plans/methods-docs.plans.md`: completed educational-docs lane for `src/methods` and reopen point for methods documentation drift.
|
|
44
|
+
- `plans/methods-solid-split.plans.md`: completed structural split lane for `src/methods` and reopen point for later refactors.
|
|
45
|
+
- `plans/neat-docs.plans.md`: active educational-docs lane for NEAT surfaces and generated README quality.
|
|
46
|
+
- `plans/neat-test-surface-repair.plans.md`: completed NEAT public test-surface repair baseline and reopen point for future compatibility regressions.
|
|
37
47
|
- `plans/Network_Visualization_Export_Schema.md`: stable export schema for visualization and inspection tooling.
|
|
38
48
|
- `plans/ONNX_EXPORT_PLAN.md`: ONNX export/import architecture and rollout phases.
|
|
39
49
|
- `plans/Population_Save_Resume_and_Checkpointing.md`: checkpointing, persistence, save/resume workflows.
|
|
40
50
|
- `plans/Preconfigured_Architectures_MLP_LSTM_GRU_NARX.md`: prebuilt architecture constructors and sequence-oriented builders.
|
|
51
|
+
- `plans/render-docs-html-solid-split.plans.md`: completed HTML docs renderer split and reopen point for future docs-site tooling work.
|
|
41
52
|
- `plans/src-no-explicit-any-cleanup.plans.md`: completed `src/` strict-typing cleanup baseline for `@typescript-eslint/no-explicit-any`, kept as the reopen point if later refactors reintroduce debt.
|
|
42
53
|
- `plans/Stable_Activation_Ordering_and_Explicit_IO_Roles.md`: deterministic execution ordering and explicit input/output roles.
|
|
43
54
|
- `plans/Standalone_Inference_Export.md`: dependency-free exported inference runtime.
|
|
44
55
|
- `plans/Turnkey_Multithread_Evaluation_API.md`: parallel evaluation API for Node and browser workers.
|
|
56
|
+
- `plans/utils-docs.plans.md`: completed educational-docs lane for `src/utils` and reopen point for later documentation drift.
|
|
45
57
|
- `plans/Worker_Friendly_Network_Serialization_Fastpath.md`: fast serialization path for worker-based evaluation.
|
|
46
58
|
|
|
47
59
|
Task-to-plan trigger phrases:
|
|
48
60
|
|
|
61
|
+
- trace analyzer, Chrome trace, Perfetto report script, `trace:analyze`, tooling split reopen: `plans/analyze-trace-solid-split.plans.md`
|
|
62
|
+
- architecture split, folderization, orchestration-first cleanup in `src/architecture`: `plans/architecture-solid-split.plans.md`
|
|
49
63
|
- NEAT correctness, innovation IDs, crossover, compatibility distance, speciation: `plans/neat.plans.md`
|
|
50
64
|
- roadmap, sequence, dependency order, what comes first: `plans/Roadmap.md`
|
|
51
65
|
- architecture builder, layer API, node/group primitives: `plans/Architecture_Primitives_Node_Group_Layer.md`
|
|
66
|
+
- asciiMaze TypeScript diagnostics, example test compile failures, reopen asciiMaze repair: `plans/asciiMaze-typescript-repair.plans.md`
|
|
52
67
|
- construct from parts, graph assembly, deterministic builder: `plans/Construct_From_Parts_Graph_Assembly.md`
|
|
53
68
|
- browser bundle, CDN, browser-first usage: `plans/Browser_Build_and_CDN_Distribution.md`
|
|
69
|
+
- ES2023, immutable array methods, modernization pass, syntax cleanup, migration sequencing: `plans/ES2023 migration`
|
|
70
|
+
- Flappy Bird docs pass, example folder documentation, generated README quality for Flappy: `plans/Flappy_Bird_Folder_Documentation_Pass.md`
|
|
71
|
+
- generate-docs, folder README generation, docs.order, docs generator split: `plans/generate-docs-solid-split.plans.md`
|
|
54
72
|
- ONNX, import/export interoperability: `plans/ONNX_EXPORT_PLAN.md`
|
|
73
|
+
- methods docs, methods README quality, educational-docs for methods: `plans/methods-docs.plans.md`
|
|
74
|
+
- methods split, `src/methods` refactor, methods folderization: `plans/methods-solid-split.plans.md`
|
|
75
|
+
- NEAT docs, generated README quality, NEAT documentation lane: `plans/neat-docs.plans.md`
|
|
76
|
+
- NEAT test surface, public type compatibility, root facade repair: `plans/neat-test-surface-repair.plans.md`
|
|
55
77
|
- explicit any, no-explicit-any, strict typing, src lint cleanup follow-up, reopen completed cleanup lane: `plans/src-no-explicit-any-cleanup.plans.md`
|
|
78
|
+
- HTML docs renderer, sidebar, Mermaid validation, docs site tooling split: `plans/render-docs-html-solid-split.plans.md`
|
|
56
79
|
- visualization, schema, inspect network shape: `plans/Network_Visualization_Export_Schema.md`
|
|
57
80
|
- checkpoint, resume, save population: `plans/Population_Save_Resume_and_Checkpointing.md`
|
|
58
81
|
- workers, threads, parallel evaluation: `plans/Turnkey_Multithread_Evaluation_API.md`
|
|
@@ -64,6 +87,7 @@ Task-to-plan trigger phrases:
|
|
|
64
87
|
- preconfigured models, MLP, LSTM, GRU, NARX builders: `plans/Preconfigured_Architectures_MLP_LSTM_GRU_NARX.md`
|
|
65
88
|
- examples, tutorials, learning path, onboarding: `plans/Interactive_Examples_and_Learning_Path.md`
|
|
66
89
|
- evo-devo, morphology, research-heavy extensions: `plans/HyperEvoDevoMorphoNEAT.md`
|
|
90
|
+
- utils docs, utility README quality, educational-docs for `src/utils`: `plans/utils-docs.plans.md`
|
|
67
91
|
|
|
68
92
|
Working rule:
|
|
69
93
|
When a task changes code in a way that could conflict with one of these plans, mention the relevant plan in the working notes or final summary and call out any mismatch instead of silently diverging from the roadmap.
|