@rotifer/playground 0.8.1 → 0.8.5
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/CHANGELOG.md +25 -11
- package/README.md +64 -48
- package/README.zh.md +60 -37
- package/dist/cloud/auth.d.ts +9 -3
- package/dist/cloud/auth.d.ts.map +1 -1
- package/dist/cloud/auth.js +28 -13
- package/dist/cloud/auth.js.map +1 -1
- package/dist/cloud/client.d.ts +4 -3
- package/dist/cloud/client.d.ts.map +1 -1
- package/dist/cloud/client.js +139 -68
- package/dist/cloud/client.js.map +1 -1
- package/dist/cloud/types.d.ts +3 -0
- package/dist/cloud/types.d.ts.map +1 -1
- package/dist/cloud/types.js.map +1 -1
- package/dist/commands/agent-create.d.ts +20 -0
- package/dist/commands/agent-create.d.ts.map +1 -1
- package/dist/commands/agent-create.js +91 -80
- package/dist/commands/agent-create.js.map +1 -1
- package/dist/commands/agent-list.d.ts.map +1 -1
- package/dist/commands/agent-list.js +27 -24
- package/dist/commands/agent-list.js.map +1 -1
- package/dist/commands/agent-run.d.ts +24 -0
- package/dist/commands/agent-run.d.ts.map +1 -1
- package/dist/commands/agent-run.js +154 -36
- package/dist/commands/agent-run.js.map +1 -1
- package/dist/commands/api-key.d.ts +3 -0
- package/dist/commands/api-key.d.ts.map +1 -0
- package/dist/commands/api-key.js +235 -0
- package/dist/commands/api-key.js.map +1 -0
- package/dist/commands/arena-list.d.ts.map +1 -1
- package/dist/commands/arena-list.js +113 -97
- package/dist/commands/arena-list.js.map +1 -1
- package/dist/commands/arena-submit.d.ts.map +1 -1
- package/dist/commands/arena-submit.js +113 -30
- package/dist/commands/arena-submit.js.map +1 -1
- package/dist/commands/arena-watch.d.ts.map +1 -1
- package/dist/commands/arena-watch.js +59 -87
- package/dist/commands/arena-watch.js.map +1 -1
- package/dist/commands/compare.d.ts.map +1 -1
- package/dist/commands/compare.js +40 -50
- package/dist/commands/compare.js.map +1 -1
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +60 -37
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/hello.d.ts +3 -0
- package/dist/commands/hello.d.ts.map +1 -0
- package/dist/commands/hello.js +575 -0
- package/dist/commands/hello.js.map +1 -0
- package/dist/commands/info.d.ts.map +1 -1
- package/dist/commands/info.js +130 -40
- package/dist/commands/info.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +39 -60
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +35 -9
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +111 -58
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +23 -10
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/network.d.ts.map +1 -1
- package/dist/commands/network.js +48 -67
- package/dist/commands/network.js.map +1 -1
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +127 -53
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/reputation.js +84 -85
- package/dist/commands/reputation.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +26 -9
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/scan.d.ts.map +1 -1
- package/dist/commands/scan.js +8 -9
- package/dist/commands/scan.js.map +1 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +80 -54
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/self-update.d.ts +7 -0
- package/dist/commands/self-update.d.ts.map +1 -0
- package/dist/commands/self-update.js +187 -0
- package/dist/commands/self-update.js.map +1 -0
- package/dist/commands/stats.d.ts.map +1 -1
- package/dist/commands/stats.js +20 -26
- package/dist/commands/stats.js.map +1 -1
- package/dist/commands/test.d.ts.map +1 -1
- package/dist/commands/test.js +95 -75
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/user-config.d.ts +3 -0
- package/dist/commands/user-config.d.ts.map +1 -0
- package/dist/commands/user-config.js +82 -0
- package/dist/commands/user-config.js.map +1 -0
- package/dist/commands/versions.d.ts.map +1 -1
- package/dist/commands/versions.js +46 -33
- package/dist/commands/versions.js.map +1 -1
- package/dist/commands/vg.d.ts.map +1 -1
- package/dist/commands/vg.js +65 -63
- package/dist/commands/vg.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +33 -23
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/wrap.d.ts.map +1 -1
- package/dist/commands/wrap.js +57 -40
- package/dist/commands/wrap.js.map +1 -1
- package/dist/index.js +61 -1
- package/dist/index.js.map +1 -1
- package/dist/publish/pre-publish-check.d.ts +15 -0
- package/dist/publish/pre-publish-check.d.ts.map +1 -0
- package/dist/publish/pre-publish-check.js +228 -0
- package/dist/publish/pre-publish-check.js.map +1 -0
- package/dist/runtime/domain-failover.d.ts +1 -1
- package/dist/runtime/domain-failover.js +1 -1
- package/dist/runtime/network-gateway.d.ts +1 -1
- package/dist/runtime/network-gateway.d.ts.map +1 -1
- package/dist/runtime/network-gateway.js +10 -10
- package/dist/runtime/network-gateway.js.map +1 -1
- package/dist/scanner/scanner.js +3 -3
- package/dist/scanner/scanner.js.map +1 -1
- package/dist/utils/binding.d.ts.map +1 -1
- package/dist/utils/binding.js +5 -4
- package/dist/utils/binding.js.map +1 -1
- package/dist/utils/content-hash.d.ts +3 -0
- package/dist/utils/content-hash.d.ts.map +1 -0
- package/dist/utils/content-hash.js +25 -0
- package/dist/utils/content-hash.js.map +1 -0
- package/dist/utils/display.d.ts +44 -1
- package/dist/utils/display.d.ts.map +1 -1
- package/dist/utils/display.js +443 -14
- package/dist/utils/display.js.map +1 -1
- package/dist/utils/domain-suggest.d.ts.map +1 -1
- package/dist/utils/domain-suggest.js +3 -3
- package/dist/utils/domain-suggest.js.map +1 -1
- package/dist/utils/javy-compiler.js +9 -3
- package/dist/utils/javy-compiler.js.map +1 -1
- package/dist/utils/open-browser.d.ts +7 -3
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js +15 -4
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/palette.d.ts +49 -0
- package/dist/utils/palette.d.ts.map +1 -0
- package/dist/utils/palette.js +80 -0
- package/dist/utils/palette.js.map +1 -0
- package/dist/utils/private-fs.d.ts +3 -0
- package/dist/utils/private-fs.d.ts.map +1 -0
- package/dist/utils/private-fs.js +25 -0
- package/dist/utils/private-fs.js.map +1 -0
- package/dist/utils/project-root.d.ts +2 -0
- package/dist/utils/project-root.d.ts.map +1 -0
- package/dist/utils/project-root.js +49 -0
- package/dist/utils/project-root.js.map +1 -0
- package/dist/utils/run-logger.d.ts +24 -0
- package/dist/utils/run-logger.d.ts.map +1 -0
- package/dist/utils/run-logger.js +70 -0
- package/dist/utils/run-logger.js.map +1 -0
- package/dist/utils/update-check.d.ts +20 -0
- package/dist/utils/update-check.d.ts.map +1 -0
- package/dist/utils/update-check.js +155 -0
- package/dist/utils/update-check.js.map +1 -0
- package/dist/utils/user-config.d.ts +10 -0
- package/dist/utils/user-config.d.ts.map +1 -0
- package/dist/utils/user-config.js +54 -0
- package/dist/utils/user-config.js.map +1 -0
- package/dist/utils/validate-gene-name.d.ts +7 -0
- package/dist/utils/validate-gene-name.d.ts.map +1 -0
- package/dist/utils/validate-gene-name.js +28 -0
- package/dist/utils/validate-gene-name.js.map +1 -0
- package/genes/genesis-code-format/phenotype.json +4 -3
- package/genes/genesis-file-read/phenotype.json +4 -3
- package/genes/genesis-l0-constraint/phenotype.json +4 -3
- package/genes/genesis-web-search/phenotype.json +5 -4
- package/genes/genesis-web-search-lite/phenotype.json +4 -3
- package/package.json +29 -8
- package/scripts/postinstall.js +38 -0
- package/dist/errors/formatter.d.ts +0 -25
- package/dist/errors/formatter.d.ts.map +0 -1
- package/dist/errors/formatter.js +0 -43
- package/dist/errors/formatter.js.map +0 -1
- package/genes/academic-writer/.cloud-manifest.json +0 -6
- package/genes/academic-writer/.gene-manifest.json +0 -8
- package/genes/academic-writer/SKILL.md +0 -274
- package/genes/academic-writer/phenotype.json +0 -28
- package/genes/ai-components/.cloud-manifest.json +0 -6
- package/genes/ai-components/.gene-manifest.json +0 -8
- package/genes/ai-components/SKILL.md +0 -381
- package/genes/ai-components/phenotype.json +0 -28
- package/genes/algorithmic-art/.cloud-manifest.json +0 -6
- package/genes/algorithmic-art/.gene-manifest.json +0 -8
- package/genes/algorithmic-art/SKILL.md +0 -405
- package/genes/algorithmic-art/phenotype.json +0 -28
- package/genes/answer-synthesizer/.cloud-manifest.json +0 -6
- package/genes/answer-synthesizer/index.ts +0 -194
- package/genes/answer-synthesizer/phenotype.json +0 -61
- package/genes/api-designer/.cloud-manifest.json +0 -6
- package/genes/api-designer/.gene-manifest.json +0 -8
- package/genes/api-designer/SKILL.md +0 -456
- package/genes/api-designer/phenotype.json +0 -28
- package/genes/auto-coder/.cloud-manifest.json +0 -6
- package/genes/auto-coder/.gene-manifest.json +0 -8
- package/genes/auto-coder/SKILL.md +0 -400
- package/genes/auto-coder/phenotype.json +0 -28
- package/genes/auto-writer/.cloud-manifest.json +0 -6
- package/genes/auto-writer/.gene-manifest.json +0 -8
- package/genes/auto-writer/SKILL.md +0 -361
- package/genes/auto-writer/phenotype.json +0 -28
- package/genes/brand-personality/.cloud-manifest.json +0 -6
- package/genes/brand-personality/.gene-manifest.json +0 -8
- package/genes/brand-personality/SKILL.md +0 -549
- package/genes/brand-personality/phenotype.json +0 -28
- package/genes/business-writer/.cloud-manifest.json +0 -6
- package/genes/business-writer/.gene-manifest.json +0 -8
- package/genes/business-writer/SKILL.md +0 -448
- package/genes/business-writer/phenotype.json +0 -28
- package/genes/citation-manager/.cloud-manifest.json +0 -6
- package/genes/citation-manager/.gene-manifest.json +0 -8
- package/genes/citation-manager/SKILL.md +0 -279
- package/genes/citation-manager/index.ts +0 -162
- package/genes/citation-manager/package.json +0 -1
- package/genes/citation-manager/phenotype.json +0 -50
- package/genes/code-complexity/.cloud-manifest.json +0 -6
- package/genes/code-complexity/README.md +0 -35
- package/genes/code-complexity/index.ts +0 -101
- package/genes/code-complexity/phenotype.json +0 -34
- package/genes/copywriter/.cloud-manifest.json +0 -6
- package/genes/copywriter/.gene-manifest.json +0 -8
- package/genes/copywriter/SKILL.md +0 -329
- package/genes/copywriter/phenotype.json +0 -28
- package/genes/creative-writer/.cloud-manifest.json +0 -6
- package/genes/creative-writer/.gene-manifest.json +0 -8
- package/genes/creative-writer/SKILL.md +0 -356
- package/genes/creative-writer/phenotype.json +0 -28
- package/genes/data-modeler/.cloud-manifest.json +0 -6
- package/genes/data-modeler/.gene-manifest.json +0 -8
- package/genes/data-modeler/SKILL.md +0 -486
- package/genes/data-modeler/phenotype.json +0 -28
- package/genes/debugger/.cloud-manifest.json +0 -6
- package/genes/debugger/.gene-manifest.json +0 -8
- package/genes/debugger/SKILL.md +0 -416
- package/genes/debugger/phenotype.json +0 -28
- package/genes/design-tokens/.cloud-manifest.json +0 -6
- package/genes/design-tokens/.gene-manifest.json +0 -8
- package/genes/design-tokens/SKILL.md +0 -222
- package/genes/design-tokens/index.ts +0 -128
- package/genes/design-tokens/package.json +0 -1
- package/genes/design-tokens/phenotype.json +0 -1
- package/genes/devops-automator/.cloud-manifest.json +0 -6
- package/genes/devops-automator/.gene-manifest.json +0 -8
- package/genes/devops-automator/SKILL.md +0 -490
- package/genes/devops-automator/phenotype.json +0 -28
- package/genes/doc-coauthoring/.cloud-manifest.json +0 -6
- package/genes/doc-coauthoring/.gene-manifest.json +0 -8
- package/genes/doc-coauthoring/SKILL.md +0 -375
- package/genes/doc-coauthoring/phenotype.json +0 -28
- package/genes/doc-retrieval/.cloud-manifest.json +0 -6
- package/genes/doc-retrieval/index.ts +0 -134
- package/genes/doc-retrieval/phenotype.json +0 -54
- package/genes/docs-writer/.cloud-manifest.json +0 -6
- package/genes/docs-writer/.gene-manifest.json +0 -8
- package/genes/docs-writer/SKILL.md +0 -492
- package/genes/docs-writer/phenotype.json +0 -28
- package/genes/evolve-life/.cloud-manifest.json +0 -6
- package/genes/evolve-life/.compile-result.json +0 -12
- package/genes/evolve-life/README.md +0 -52
- package/genes/evolve-life/gene.ir.wasm +0 -0
- package/genes/evolve-life/gene.wasm +0 -0
- package/genes/evolve-life/index.ts +0 -255
- package/genes/evolve-life/phenotype.json +0 -129
- package/genes/evolve-life-bitwise/.cloud-manifest.json +0 -6
- package/genes/evolve-life-bitwise/.compile-result.json +0 -12
- package/genes/evolve-life-bitwise/gene.ir.wasm +0 -0
- package/genes/evolve-life-bitwise/gene.wasm +0 -0
- package/genes/evolve-life-bitwise/index.ts +0 -273
- package/genes/evolve-life-bitwise/phenotype.json +0 -129
- package/genes/evolve-life-sparse/.cloud-manifest.json +0 -6
- package/genes/evolve-life-sparse/.compile-result.json +0 -12
- package/genes/evolve-life-sparse/gene.ir.wasm +0 -0
- package/genes/evolve-life-sparse/gene.wasm +0 -0
- package/genes/evolve-life-sparse/index.ts +0 -236
- package/genes/evolve-life-sparse/phenotype.json +0 -129
- package/genes/fact-checker/.cloud-manifest.json +0 -6
- package/genes/fact-checker/.gene-manifest.json +0 -8
- package/genes/fact-checker/SKILL.md +0 -373
- package/genes/fact-checker/phenotype.json +0 -28
- package/genes/git-workflow/.cloud-manifest.json +0 -6
- package/genes/git-workflow/.gene-manifest.json +0 -8
- package/genes/git-workflow/SKILL.md +0 -407
- package/genes/git-workflow/phenotype.json +0 -28
- package/genes/grammar-checker/.cloud-manifest.json +0 -6
- package/genes/grammar-checker/.gene-manifest.json +0 -8
- package/genes/grammar-checker/SKILL.md +0 -194
- package/genes/grammar-checker/index.ts +0 -168
- package/genes/grammar-checker/package.json +0 -1
- package/genes/grammar-checker/phenotype.json +0 -52
- package/genes/guard-balanced/.gene-manifest.json +0 -8
- package/genes/guard-balanced/phenotype.json +0 -105
- package/genes/guard-balanced/system-prompt.md +0 -23
- package/genes/guard-strict/.gene-manifest.json +0 -8
- package/genes/guard-strict/phenotype.json +0 -107
- package/genes/guard-strict/system-prompt.md +0 -18
- package/genes/json-validator/.cloud-manifest.json +0 -6
- package/genes/json-validator/README.md +0 -42
- package/genes/json-validator/index.ts +0 -112
- package/genes/json-validator/phenotype.json +0 -42
- package/genes/license-advisor/.cloud-manifest.json +0 -6
- package/genes/license-advisor/.gene-manifest.json +0 -8
- package/genes/license-advisor/SKILL.md +0 -117
- package/genes/license-advisor/phenotype.json +0 -28
- package/genes/logic-architect/.cloud-manifest.json +0 -6
- package/genes/logic-architect/.gene-manifest.json +0 -8
- package/genes/logic-architect/SKILL.md +0 -451
- package/genes/logic-architect/phenotype.json +0 -28
- package/genes/markdown-formatter/.cloud-manifest.json +0 -6
- package/genes/markdown-formatter/README.md +0 -34
- package/genes/markdown-formatter/index.ts +0 -86
- package/genes/markdown-formatter/phenotype.json +0 -32
- package/genes/orch/.cloud-manifest.json +0 -6
- package/genes/orch/.gene-manifest.json +0 -8
- package/genes/orch/SKILL.md +0 -504
- package/genes/orch/phenotype.json +0 -28
- package/genes/particle-barneshut/.cloud-manifest.json +0 -6
- package/genes/particle-barneshut/.compile-result.json +0 -12
- package/genes/particle-barneshut/README.md +0 -55
- package/genes/particle-barneshut/gene.ir.wasm +0 -0
- package/genes/particle-barneshut/gene.wasm +0 -0
- package/genes/particle-barneshut/index.ts +0 -486
- package/genes/particle-barneshut/phenotype.json +0 -137
- package/genes/particle-brute/.cloud-manifest.json +0 -6
- package/genes/particle-brute/.compile-result.json +0 -12
- package/genes/particle-brute/README.md +0 -55
- package/genes/particle-brute/gene.ir.wasm +0 -0
- package/genes/particle-brute/gene.wasm +0 -0
- package/genes/particle-brute/index.ts +0 -277
- package/genes/particle-brute/phenotype.json +0 -137
- package/genes/particle-spatial/.cloud-manifest.json +0 -6
- package/genes/particle-spatial/.compile-result.json +0 -12
- package/genes/particle-spatial/README.md +0 -53
- package/genes/particle-spatial/gene.ir.wasm +0 -0
- package/genes/particle-spatial/gene.wasm +0 -0
- package/genes/particle-spatial/index.ts +0 -352
- package/genes/particle-spatial/phenotype.json +0 -137
- package/genes/performance-optimizer/.cloud-manifest.json +0 -6
- package/genes/performance-optimizer/.gene-manifest.json +0 -8
- package/genes/performance-optimizer/SKILL.md +0 -480
- package/genes/performance-optimizer/phenotype.json +0 -28
- package/genes/plagiarism-checker/.cloud-manifest.json +0 -6
- package/genes/plagiarism-checker/.gene-manifest.json +0 -8
- package/genes/plagiarism-checker/SKILL.md +0 -342
- package/genes/plagiarism-checker/phenotype.json +0 -28
- package/genes/product-manager/.cloud-manifest.json +0 -6
- package/genes/product-manager/.gene-manifest.json +0 -8
- package/genes/product-manager/SKILL.md +0 -249
- package/genes/product-manager/phenotype.json +0 -28
- package/genes/project-reviewer/.cloud-manifest.json +0 -6
- package/genes/project-reviewer/.gene-manifest.json +0 -8
- package/genes/project-reviewer/SKILL.md +0 -312
- package/genes/project-reviewer/phenotype.json +0 -28
- package/genes/prompt-engineer/.cloud-manifest.json +0 -6
- package/genes/prompt-engineer/.gene-manifest.json +0 -8
- package/genes/prompt-engineer/SKILL.md +0 -411
- package/genes/prompt-engineer/phenotype.json +0 -28
- package/genes/prompt-review-perf/.gene-manifest.json +0 -8
- package/genes/prompt-review-perf/phenotype.json +0 -61
- package/genes/prompt-review-perf/system-prompt.md +0 -22
- package/genes/prompt-review-readability/.gene-manifest.json +0 -8
- package/genes/prompt-review-readability/phenotype.json +0 -60
- package/genes/prompt-review-readability/system-prompt.md +0 -21
- package/genes/prompt-review-security/.gene-manifest.json +0 -8
- package/genes/prompt-review-security/phenotype.json +0 -60
- package/genes/prompt-review-security/system-prompt.md +0 -21
- package/genes/readability-analyzer/.cloud-manifest.json +0 -6
- package/genes/readability-analyzer/.gene-manifest.json +0 -8
- package/genes/readability-analyzer/SKILL.md +0 -357
- package/genes/readability-analyzer/index.ts +0 -123
- package/genes/readability-analyzer/package.json +0 -1
- package/genes/readability-analyzer/phenotype.json +0 -35
- package/genes/rotifer-protocol/SKILL.md +0 -121
- package/genes/rule-router-frequency/.gene-manifest.json +0 -8
- package/genes/rule-router-frequency/phenotype.json +0 -76
- package/genes/rule-router-frequency/system-prompt.md +0 -26
- package/genes/rule-router-relevance/.gene-manifest.json +0 -8
- package/genes/rule-router-relevance/phenotype.json +0 -76
- package/genes/rule-router-relevance/system-prompt.md +0 -29
- package/genes/security-auditor/.cloud-manifest.json +0 -6
- package/genes/security-auditor/.gene-manifest.json +0 -8
- package/genes/security-auditor/SKILL.md +0 -494
- package/genes/security-auditor/phenotype.json +0 -28
- package/genes/seo-optimizer/.cloud-manifest.json +0 -6
- package/genes/seo-optimizer/.gene-manifest.json +0 -8
- package/genes/seo-optimizer/SKILL.md +0 -327
- package/genes/seo-optimizer/index.ts +0 -206
- package/genes/seo-optimizer/package.json +0 -1
- package/genes/seo-optimizer/phenotype.json +0 -1
- package/genes/source-linker/.cloud-manifest.json +0 -6
- package/genes/source-linker/index.ts +0 -88
- package/genes/source-linker/phenotype.json +0 -45
- package/genes/style-optimizer/.cloud-manifest.json +0 -6
- package/genes/style-optimizer/.gene-manifest.json +0 -8
- package/genes/style-optimizer/SKILL.md +0 -285
- package/genes/style-optimizer/phenotype.json +0 -28
- package/genes/tech-lead/.cloud-manifest.json +0 -6
- package/genes/tech-lead/.gene-manifest.json +0 -8
- package/genes/tech-lead/SKILL.md +0 -451
- package/genes/tech-lead/phenotype.json +0 -28
- package/genes/test-wrap/.cloud-manifest.json +0 -6
- package/genes/test-wrap/.gene-manifest.json +0 -8
- package/genes/test-wrap/phenotype.json +0 -28
- package/genes/testing-strategist/.cloud-manifest.json +0 -6
- package/genes/testing-strategist/.gene-manifest.json +0 -8
- package/genes/testing-strategist/SKILL.md +0 -500
- package/genes/testing-strategist/phenotype.json +0 -28
- package/genes/text-summarizer/.cloud-manifest.json +0 -6
- package/genes/text-summarizer/README.md +0 -34
- package/genes/text-summarizer/index.ts +0 -122
- package/genes/text-summarizer/phenotype.json +0 -32
- package/genes/tone-analyzer/.cloud-manifest.json +0 -6
- package/genes/tone-analyzer/.gene-manifest.json +0 -8
- package/genes/tone-analyzer/SKILL.md +0 -410
- package/genes/tone-analyzer/phenotype.json +0 -28
- package/genes/translator/.cloud-manifest.json +0 -6
- package/genes/translator/.gene-manifest.json +0 -8
- package/genes/translator/SKILL.md +0 -355
- package/genes/translator/phenotype.json +0 -28
- package/genes/ui-components/.cloud-manifest.json +0 -6
- package/genes/ui-components/.gene-manifest.json +0 -8
- package/genes/ui-components/SKILL.md +0 -467
- package/genes/ui-components/phenotype.json +0 -28
- package/genes/uiux-designer/.cloud-manifest.json +0 -6
- package/genes/uiux-designer/.gene-manifest.json +0 -8
- package/genes/uiux-designer/SKILL.md +0 -353
- package/genes/uiux-designer/phenotype.json +0 -28
- package/genes/url-extractor/.cloud-manifest.json +0 -6
- package/genes/url-extractor/README.md +0 -37
- package/genes/url-extractor/index.ts +0 -86
- package/genes/url-extractor/phenotype.json +0 -48
- package/genes/ux-patterns/.cloud-manifest.json +0 -6
- package/genes/ux-patterns/.gene-manifest.json +0 -8
- package/genes/ux-patterns/SKILL.md +0 -872
- package/genes/ux-patterns/phenotype.json +0 -28
- package/genes/web3-components/.cloud-manifest.json +0 -6
- package/genes/web3-components/.gene-manifest.json +0 -8
- package/genes/web3-components/SKILL.md +0 -390
- package/genes/web3-components/phenotype.json +0 -28
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"domain": "sim.particle",
|
|
3
|
-
"description": "N-body gravitational simulation using Barnes-Hut quadtree approximation. Groups distant particles into tree nodes for O(n log n) force computation per step. Balances accuracy and speed via configurable opening angle theta.",
|
|
4
|
-
"inputSchema": {
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"particles": {
|
|
8
|
-
"type": "array",
|
|
9
|
-
"description": "Initial particle states. Ignored if preset is provided.",
|
|
10
|
-
"items": {
|
|
11
|
-
"type": "object",
|
|
12
|
-
"properties": {
|
|
13
|
-
"x": {
|
|
14
|
-
"type": "number"
|
|
15
|
-
},
|
|
16
|
-
"y": {
|
|
17
|
-
"type": "number"
|
|
18
|
-
},
|
|
19
|
-
"vx": {
|
|
20
|
-
"type": "number"
|
|
21
|
-
},
|
|
22
|
-
"vy": {
|
|
23
|
-
"type": "number"
|
|
24
|
-
},
|
|
25
|
-
"mass": {
|
|
26
|
-
"type": "number"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"required": [
|
|
30
|
-
"x",
|
|
31
|
-
"y",
|
|
32
|
-
"vx",
|
|
33
|
-
"vy",
|
|
34
|
-
"mass"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"preset": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"description": "Preset particle configuration",
|
|
41
|
-
"enum": [
|
|
42
|
-
"solar",
|
|
43
|
-
"binary",
|
|
44
|
-
"cluster",
|
|
45
|
-
"collision"
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
"count": {
|
|
49
|
-
"type": "number",
|
|
50
|
-
"description": "Number of particles for preset generation",
|
|
51
|
-
"default": 64,
|
|
52
|
-
"minimum": 2,
|
|
53
|
-
"maximum": 2048
|
|
54
|
-
},
|
|
55
|
-
"steps": {
|
|
56
|
-
"type": "number",
|
|
57
|
-
"description": "Number of simulation steps",
|
|
58
|
-
"default": 100,
|
|
59
|
-
"minimum": 1,
|
|
60
|
-
"maximum": 10000
|
|
61
|
-
},
|
|
62
|
-
"dt": {
|
|
63
|
-
"type": "number",
|
|
64
|
-
"description": "Time step size",
|
|
65
|
-
"default": 0.01
|
|
66
|
-
},
|
|
67
|
-
"G": {
|
|
68
|
-
"type": "number",
|
|
69
|
-
"description": "Gravitational constant",
|
|
70
|
-
"default": 1
|
|
71
|
-
},
|
|
72
|
-
"softening": {
|
|
73
|
-
"type": "number",
|
|
74
|
-
"description": "Softening parameter to prevent singularity at close range",
|
|
75
|
-
"default": 0.01
|
|
76
|
-
},
|
|
77
|
-
"seed": {
|
|
78
|
-
"type": "number",
|
|
79
|
-
"description": "Random seed for preset generation (deterministic output)"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"required": []
|
|
83
|
-
},
|
|
84
|
-
"outputSchema": {
|
|
85
|
-
"type": "object",
|
|
86
|
-
"properties": {
|
|
87
|
-
"particles": {
|
|
88
|
-
"type": "array",
|
|
89
|
-
"description": "Final particle states after simulation",
|
|
90
|
-
"items": {
|
|
91
|
-
"type": "object",
|
|
92
|
-
"properties": {
|
|
93
|
-
"x": {
|
|
94
|
-
"type": "number"
|
|
95
|
-
},
|
|
96
|
-
"y": {
|
|
97
|
-
"type": "number"
|
|
98
|
-
},
|
|
99
|
-
"vx": {
|
|
100
|
-
"type": "number"
|
|
101
|
-
},
|
|
102
|
-
"vy": {
|
|
103
|
-
"type": "number"
|
|
104
|
-
},
|
|
105
|
-
"mass": {
|
|
106
|
-
"type": "number"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
"steps_computed": {
|
|
112
|
-
"type": "number",
|
|
113
|
-
"description": "Actual number of simulation steps computed"
|
|
114
|
-
},
|
|
115
|
-
"total_energy": {
|
|
116
|
-
"type": "number",
|
|
117
|
-
"description": "Total system energy (kinetic + potential) at final state"
|
|
118
|
-
},
|
|
119
|
-
"interactions_computed": {
|
|
120
|
-
"type": "number",
|
|
121
|
-
"description": "Total pairwise force evaluations across all steps"
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
"required": [
|
|
125
|
-
"particles",
|
|
126
|
-
"steps_computed",
|
|
127
|
-
"total_energy",
|
|
128
|
-
"interactions_computed"
|
|
129
|
-
]
|
|
130
|
-
},
|
|
131
|
-
"dependencies": [],
|
|
132
|
-
"version": "0.1.0",
|
|
133
|
-
"author": "rotifer-team",
|
|
134
|
-
"fidelity": "Native",
|
|
135
|
-
"transparency": "Open",
|
|
136
|
-
"ir_hash": "391614d239e64ad94d257ec59c079a1a060d0143b28f6edd8ec255858f961d1c"
|
|
137
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"geneId": "0ec8e0410da37367e5a3fbacdfbb53e44f22da0741bc538eeef819d728a4305c",
|
|
3
|
-
"name": "particle-brute",
|
|
4
|
-
"domain": "sim.particle",
|
|
5
|
-
"compiledAt": "2026-03-14T09:13:33.395Z",
|
|
6
|
-
"fidelity": "Native",
|
|
7
|
-
"wasmAvailable": true,
|
|
8
|
-
"irHash": "391614d239e64ad94d257ec59c079a1a060d0143b28f6edd8ec255858f961d1c",
|
|
9
|
-
"totalSize": 1295630,
|
|
10
|
-
"codeSectionSize": 956115,
|
|
11
|
-
"durationMs": 6609
|
|
12
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# particle-brute
|
|
2
|
-
|
|
3
|
-
Brute-force N-body gravitational simulation — a pure-computation Native Gene for the Rotifer Protocol.
|
|
4
|
-
|
|
5
|
-
## Algorithm
|
|
6
|
-
|
|
7
|
-
All-pairs direct summation with O(n²) complexity per step. For each pair of particles (i, j), computes the exact gravitational force using Newton's law with a softening parameter to prevent singularities:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
F = G × m_i × m_j × r̂ / (|r|² + ε²)^(3/2)
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Integration uses the symplectic leapfrog (kick-drift-kick) scheme for energy conservation.
|
|
14
|
-
|
|
15
|
-
This is the **accuracy baseline** — every pairwise interaction is computed exactly, making it ideal for validating approximation-based algorithms like Barnes-Hut or spatial hashing.
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
# Solar system preset (64 particles, 100 steps)
|
|
21
|
-
rotifer run particle-brute --input '{"preset": "solar"}'
|
|
22
|
-
|
|
23
|
-
# Cluster collision (128 particles, 500 steps)
|
|
24
|
-
rotifer run particle-brute --input '{"preset": "collision", "count": 128, "steps": 500}'
|
|
25
|
-
|
|
26
|
-
# Custom particles
|
|
27
|
-
rotifer run particle-brute --input '{"particles": [{"x":0,"y":0,"vx":0,"vy":0,"mass":100}, {"x":5,"y":0,"vx":0,"vy":4.47,"mass":1}]}'
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Presets
|
|
31
|
-
|
|
32
|
-
| Preset | Description |
|
|
33
|
-
|--------|-------------|
|
|
34
|
-
| `solar` | Central massive body + orbiting lighter bodies with circular velocities |
|
|
35
|
-
| `binary` | Two equal-mass stars in mutual orbit + debris ring |
|
|
36
|
-
| `cluster` | Random particles in a disk with small random velocities |
|
|
37
|
-
| `collision` | Two groups of particles approaching head-on |
|
|
38
|
-
|
|
39
|
-
## Output
|
|
40
|
-
|
|
41
|
-
- `particles` — final positions and velocities of all particles
|
|
42
|
-
- `steps_computed` — number of simulation steps executed
|
|
43
|
-
- `total_energy` — total system energy (kinetic + potential) for conservation validation
|
|
44
|
-
- `interactions_computed` — total force evaluations (n(n-1)/2 × 2 × steps for kick-drift-kick)
|
|
45
|
-
|
|
46
|
-
## Fitness Characteristics
|
|
47
|
-
|
|
48
|
-
| Metric | Expected |
|
|
49
|
-
|--------|----------|
|
|
50
|
-
| Success Rate | 1.0 (deterministic, no failure mode) |
|
|
51
|
-
| Accuracy | Exact (machine-precision pairwise forces) |
|
|
52
|
-
| Complexity | O(n² × steps) |
|
|
53
|
-
| Interactions | n(n-1) × steps |
|
|
54
|
-
| Best For | Small N (≤256), accuracy benchmarks |
|
|
55
|
-
| Weakness | Scales poorly for large N |
|
|
Binary file
|
|
Binary file
|
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
interface Particle {
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
vx: number;
|
|
5
|
-
vy: number;
|
|
6
|
-
mass: number;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface ParticleInput {
|
|
10
|
-
particles?: Particle[];
|
|
11
|
-
preset?: "solar" | "binary" | "cluster" | "collision";
|
|
12
|
-
count?: number;
|
|
13
|
-
steps?: number;
|
|
14
|
-
dt?: number;
|
|
15
|
-
G?: number;
|
|
16
|
-
softening?: number;
|
|
17
|
-
seed?: number;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
interface ParticleOutput {
|
|
21
|
-
particles: Particle[];
|
|
22
|
-
steps_computed: number;
|
|
23
|
-
total_energy: number;
|
|
24
|
-
interactions_computed: number;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function mulberry32(seed: number): () => number {
|
|
28
|
-
let s = seed | 0;
|
|
29
|
-
return () => {
|
|
30
|
-
s = (s + 0x6d2b79f5) | 0;
|
|
31
|
-
let t = Math.imul(s ^ (s >>> 15), 1 | s);
|
|
32
|
-
t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
|
|
33
|
-
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function generatePreset(
|
|
38
|
-
preset: "solar" | "binary" | "cluster" | "collision",
|
|
39
|
-
count: number,
|
|
40
|
-
seed: number
|
|
41
|
-
): Particle[] {
|
|
42
|
-
const rng = mulberry32(seed);
|
|
43
|
-
const G = 1.0;
|
|
44
|
-
|
|
45
|
-
switch (preset) {
|
|
46
|
-
case "solar": {
|
|
47
|
-
const particles: Particle[] = [];
|
|
48
|
-
const M_central = 100;
|
|
49
|
-
particles.push({ x: 0, y: 0, vx: 0, vy: 0, mass: M_central });
|
|
50
|
-
|
|
51
|
-
const nOrbiters = Math.min(count - 1, 63);
|
|
52
|
-
for (let i = 0; i < nOrbiters; i++) {
|
|
53
|
-
const r = 2 + rng() * 8;
|
|
54
|
-
const theta = rng() * 2 * Math.PI;
|
|
55
|
-
const x = r * Math.cos(theta);
|
|
56
|
-
const y = r * Math.sin(theta);
|
|
57
|
-
const v = Math.sqrt((G * M_central) / r);
|
|
58
|
-
const vx = -v * Math.sin(theta);
|
|
59
|
-
const vy = v * Math.cos(theta);
|
|
60
|
-
const mass = 0.1 + rng() * 0.9;
|
|
61
|
-
particles.push({ x, y, vx, vy, mass });
|
|
62
|
-
}
|
|
63
|
-
return particles;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
case "binary": {
|
|
67
|
-
const particles: Particle[] = [];
|
|
68
|
-
const m1 = 50;
|
|
69
|
-
const m2 = 50;
|
|
70
|
-
const d = 4;
|
|
71
|
-
const r1 = (d * m2) / (m1 + m2);
|
|
72
|
-
const r2 = (d * m1) / (m1 + m2);
|
|
73
|
-
const omega = Math.sqrt((G * (m1 + m2)) / (d * d * d));
|
|
74
|
-
const v1 = omega * r1;
|
|
75
|
-
const v2 = omega * r2;
|
|
76
|
-
|
|
77
|
-
particles.push({ x: -r1, y: 0, vx: 0, vy: -v1, mass: m1 });
|
|
78
|
-
particles.push({ x: r2, y: 0, vx: 0, vy: v2, mass: m2 });
|
|
79
|
-
|
|
80
|
-
const nDebris = Math.min(count - 2, 62);
|
|
81
|
-
for (let i = 0; i < nDebris; i++) {
|
|
82
|
-
const r = 6 + rng() * 4;
|
|
83
|
-
const theta = rng() * 2 * Math.PI;
|
|
84
|
-
const x = r * Math.cos(theta);
|
|
85
|
-
const y = r * Math.sin(theta);
|
|
86
|
-
const v = Math.sqrt((G * (m1 + m2)) / r) * (0.8 + rng() * 0.4);
|
|
87
|
-
const vx = -v * Math.sin(theta);
|
|
88
|
-
const vy = v * Math.cos(theta);
|
|
89
|
-
const mass = 0.1 + rng() * 0.5;
|
|
90
|
-
particles.push({ x, y, vx, vy, mass });
|
|
91
|
-
}
|
|
92
|
-
return particles;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
case "cluster": {
|
|
96
|
-
const particles: Particle[] = [];
|
|
97
|
-
const radius = 5;
|
|
98
|
-
for (let i = 0; i < count; i++) {
|
|
99
|
-
const r = radius * Math.sqrt(rng());
|
|
100
|
-
const theta = rng() * 2 * Math.PI;
|
|
101
|
-
const x = r * Math.cos(theta);
|
|
102
|
-
const y = r * Math.sin(theta);
|
|
103
|
-
const vMax = 0.3;
|
|
104
|
-
const vx = (rng() - 0.5) * 2 * vMax;
|
|
105
|
-
const vy = (rng() - 0.5) * 2 * vMax;
|
|
106
|
-
const mass = 0.5 + rng() * 1.5;
|
|
107
|
-
particles.push({ x, y, vx, vy, mass });
|
|
108
|
-
}
|
|
109
|
-
return particles;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
case "collision": {
|
|
113
|
-
const particles: Particle[] = [];
|
|
114
|
-
const half = Math.floor(count / 2);
|
|
115
|
-
const sep = 10;
|
|
116
|
-
const vApproach = 1.5;
|
|
117
|
-
|
|
118
|
-
for (let i = 0; i < half; i++) {
|
|
119
|
-
const x = -sep + (rng() - 0.5) * 4;
|
|
120
|
-
const y = (rng() - 0.5) * 4;
|
|
121
|
-
const vx = vApproach + (rng() - 0.5) * 0.4;
|
|
122
|
-
const vy = (rng() - 0.5) * 0.4;
|
|
123
|
-
const mass = 0.5 + rng() * 1.5;
|
|
124
|
-
particles.push({ x, y, vx, vy, mass });
|
|
125
|
-
}
|
|
126
|
-
for (let i = 0; i < count - half; i++) {
|
|
127
|
-
const x = sep + (rng() - 0.5) * 4;
|
|
128
|
-
const y = (rng() - 0.5) * 4;
|
|
129
|
-
const vx = -vApproach + (rng() - 0.5) * 0.4;
|
|
130
|
-
const vy = (rng() - 0.5) * 0.4;
|
|
131
|
-
const mass = 0.5 + rng() * 1.5;
|
|
132
|
-
particles.push({ x, y, vx, vy, mass });
|
|
133
|
-
}
|
|
134
|
-
return particles;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
default:
|
|
138
|
-
return generatePreset("cluster", count, seed);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function computeTotalEnergy(
|
|
143
|
-
particles: Particle[],
|
|
144
|
-
G: number,
|
|
145
|
-
softening: number
|
|
146
|
-
): number {
|
|
147
|
-
let kinetic = 0;
|
|
148
|
-
let potential = 0;
|
|
149
|
-
const n = particles.length;
|
|
150
|
-
|
|
151
|
-
for (let i = 0; i < n; i++) {
|
|
152
|
-
const p = particles[i];
|
|
153
|
-
kinetic += 0.5 * p.mass * (p.vx * p.vx + p.vy * p.vy);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
for (let i = 0; i < n; i++) {
|
|
157
|
-
for (let j = i + 1; j < n; j++) {
|
|
158
|
-
const pi = particles[i];
|
|
159
|
-
const pj = particles[j];
|
|
160
|
-
const dx = pj.x - pi.x;
|
|
161
|
-
const dy = pj.y - pi.y;
|
|
162
|
-
const rSq = dx * dx + dy * dy + softening * softening;
|
|
163
|
-
const r = Math.sqrt(rSq);
|
|
164
|
-
potential -= (G * pi.mass * pj.mass) / r;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return kinetic + potential;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export async function express(input: ParticleInput): Promise<ParticleOutput> {
|
|
172
|
-
const count = Math.max(2, Math.min(2048, input.count ?? 64));
|
|
173
|
-
const steps = Math.max(1, Math.min(10000, input.steps ?? 100));
|
|
174
|
-
const dt = input.dt ?? 0.01;
|
|
175
|
-
const G = input.G ?? 1.0;
|
|
176
|
-
const softening = input.softening ?? 0.01;
|
|
177
|
-
const seed = input.seed ?? 42;
|
|
178
|
-
|
|
179
|
-
let particles: Particle[];
|
|
180
|
-
|
|
181
|
-
if (input.particles && input.particles.length > 0) {
|
|
182
|
-
particles = input.particles.map((p) => ({
|
|
183
|
-
x: p.x,
|
|
184
|
-
y: p.y,
|
|
185
|
-
vx: p.vx,
|
|
186
|
-
vy: p.vy,
|
|
187
|
-
mass: p.mass,
|
|
188
|
-
}));
|
|
189
|
-
} else {
|
|
190
|
-
const preset = input.preset ?? "cluster";
|
|
191
|
-
particles = generatePreset(preset, count, seed);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
const n = particles.length;
|
|
195
|
-
const pairsPerStep = (n * (n - 1)) / 2;
|
|
196
|
-
let interactionsComputed = 0;
|
|
197
|
-
|
|
198
|
-
const ax = new Float64Array(n);
|
|
199
|
-
const ay = new Float64Array(n);
|
|
200
|
-
|
|
201
|
-
for (let stepIdx = 0; stepIdx < steps; stepIdx++) {
|
|
202
|
-
ax.fill(0);
|
|
203
|
-
ay.fill(0);
|
|
204
|
-
|
|
205
|
-
for (let i = 0; i < n; i++) {
|
|
206
|
-
for (let j = i + 1; j < n; j++) {
|
|
207
|
-
const pi = particles[i];
|
|
208
|
-
const pj = particles[j];
|
|
209
|
-
const dx = pj.x - pi.x;
|
|
210
|
-
const dy = pj.y - pi.y;
|
|
211
|
-
const rSq = dx * dx + dy * dy + softening * softening;
|
|
212
|
-
const rSoft = Math.pow(rSq, 1.5);
|
|
213
|
-
const factor = G / rSoft;
|
|
214
|
-
|
|
215
|
-
const axij = factor * pj.mass * dx;
|
|
216
|
-
const ayij = factor * pj.mass * dy;
|
|
217
|
-
|
|
218
|
-
ax[i] += axij;
|
|
219
|
-
ay[i] += ayij;
|
|
220
|
-
ax[j] -= factor * pi.mass * dx;
|
|
221
|
-
ay[j] -= factor * pi.mass * dy;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
interactionsComputed += pairsPerStep;
|
|
225
|
-
|
|
226
|
-
for (let i = 0; i < n; i++) {
|
|
227
|
-
const p = particles[i];
|
|
228
|
-
p.vx += 0.5 * dt * ax[i];
|
|
229
|
-
p.vy += 0.5 * dt * ay[i];
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
for (let i = 0; i < n; i++) {
|
|
233
|
-
const p = particles[i];
|
|
234
|
-
p.x += dt * p.vx;
|
|
235
|
-
p.y += dt * p.vy;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
ax.fill(0);
|
|
239
|
-
ay.fill(0);
|
|
240
|
-
|
|
241
|
-
for (let i = 0; i < n; i++) {
|
|
242
|
-
for (let j = i + 1; j < n; j++) {
|
|
243
|
-
const pi = particles[i];
|
|
244
|
-
const pj = particles[j];
|
|
245
|
-
const dx = pj.x - pi.x;
|
|
246
|
-
const dy = pj.y - pi.y;
|
|
247
|
-
const rSq = dx * dx + dy * dy + softening * softening;
|
|
248
|
-
const rSoft = Math.pow(rSq, 1.5);
|
|
249
|
-
const factor = G / rSoft;
|
|
250
|
-
|
|
251
|
-
const axij = factor * pj.mass * dx;
|
|
252
|
-
const ayij = factor * pj.mass * dy;
|
|
253
|
-
|
|
254
|
-
ax[i] += axij;
|
|
255
|
-
ay[i] += ayij;
|
|
256
|
-
ax[j] -= factor * pi.mass * dx;
|
|
257
|
-
ay[j] -= factor * pi.mass * dy;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
interactionsComputed += pairsPerStep;
|
|
261
|
-
|
|
262
|
-
for (let i = 0; i < n; i++) {
|
|
263
|
-
const p = particles[i];
|
|
264
|
-
p.vx += 0.5 * dt * ax[i];
|
|
265
|
-
p.vy += 0.5 * dt * ay[i];
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
const totalEnergy = computeTotalEnergy(particles, G, softening);
|
|
270
|
-
|
|
271
|
-
return {
|
|
272
|
-
particles,
|
|
273
|
-
steps_computed: steps,
|
|
274
|
-
total_energy: totalEnergy,
|
|
275
|
-
interactions_computed: interactionsComputed,
|
|
276
|
-
};
|
|
277
|
-
}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"domain": "sim.particle",
|
|
3
|
-
"description": "N-body gravitational simulation using brute-force all-pairs direct summation. Computes exact O(n^2) pairwise interactions per step — maximum accuracy baseline. Supports preset configurations (solar system, binary star, galaxy cluster, collision).",
|
|
4
|
-
"inputSchema": {
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"particles": {
|
|
8
|
-
"type": "array",
|
|
9
|
-
"description": "Initial particle states. Ignored if preset is provided.",
|
|
10
|
-
"items": {
|
|
11
|
-
"type": "object",
|
|
12
|
-
"properties": {
|
|
13
|
-
"x": {
|
|
14
|
-
"type": "number"
|
|
15
|
-
},
|
|
16
|
-
"y": {
|
|
17
|
-
"type": "number"
|
|
18
|
-
},
|
|
19
|
-
"vx": {
|
|
20
|
-
"type": "number"
|
|
21
|
-
},
|
|
22
|
-
"vy": {
|
|
23
|
-
"type": "number"
|
|
24
|
-
},
|
|
25
|
-
"mass": {
|
|
26
|
-
"type": "number"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"required": [
|
|
30
|
-
"x",
|
|
31
|
-
"y",
|
|
32
|
-
"vx",
|
|
33
|
-
"vy",
|
|
34
|
-
"mass"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"preset": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"description": "Preset particle configuration",
|
|
41
|
-
"enum": [
|
|
42
|
-
"solar",
|
|
43
|
-
"binary",
|
|
44
|
-
"cluster",
|
|
45
|
-
"collision"
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
"count": {
|
|
49
|
-
"type": "number",
|
|
50
|
-
"description": "Number of particles for preset generation",
|
|
51
|
-
"default": 64,
|
|
52
|
-
"minimum": 2,
|
|
53
|
-
"maximum": 2048
|
|
54
|
-
},
|
|
55
|
-
"steps": {
|
|
56
|
-
"type": "number",
|
|
57
|
-
"description": "Number of simulation steps",
|
|
58
|
-
"default": 100,
|
|
59
|
-
"minimum": 1,
|
|
60
|
-
"maximum": 10000
|
|
61
|
-
},
|
|
62
|
-
"dt": {
|
|
63
|
-
"type": "number",
|
|
64
|
-
"description": "Time step size",
|
|
65
|
-
"default": 0.01
|
|
66
|
-
},
|
|
67
|
-
"G": {
|
|
68
|
-
"type": "number",
|
|
69
|
-
"description": "Gravitational constant",
|
|
70
|
-
"default": 1
|
|
71
|
-
},
|
|
72
|
-
"softening": {
|
|
73
|
-
"type": "number",
|
|
74
|
-
"description": "Softening parameter to prevent singularity at close range",
|
|
75
|
-
"default": 0.01
|
|
76
|
-
},
|
|
77
|
-
"seed": {
|
|
78
|
-
"type": "number",
|
|
79
|
-
"description": "Random seed for preset generation (deterministic output)"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"required": []
|
|
83
|
-
},
|
|
84
|
-
"outputSchema": {
|
|
85
|
-
"type": "object",
|
|
86
|
-
"properties": {
|
|
87
|
-
"particles": {
|
|
88
|
-
"type": "array",
|
|
89
|
-
"description": "Final particle states after simulation",
|
|
90
|
-
"items": {
|
|
91
|
-
"type": "object",
|
|
92
|
-
"properties": {
|
|
93
|
-
"x": {
|
|
94
|
-
"type": "number"
|
|
95
|
-
},
|
|
96
|
-
"y": {
|
|
97
|
-
"type": "number"
|
|
98
|
-
},
|
|
99
|
-
"vx": {
|
|
100
|
-
"type": "number"
|
|
101
|
-
},
|
|
102
|
-
"vy": {
|
|
103
|
-
"type": "number"
|
|
104
|
-
},
|
|
105
|
-
"mass": {
|
|
106
|
-
"type": "number"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
"steps_computed": {
|
|
112
|
-
"type": "number",
|
|
113
|
-
"description": "Actual number of simulation steps computed"
|
|
114
|
-
},
|
|
115
|
-
"total_energy": {
|
|
116
|
-
"type": "number",
|
|
117
|
-
"description": "Total system energy (kinetic + potential) at final state"
|
|
118
|
-
},
|
|
119
|
-
"interactions_computed": {
|
|
120
|
-
"type": "number",
|
|
121
|
-
"description": "Total pairwise force evaluations across all steps"
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
"required": [
|
|
125
|
-
"particles",
|
|
126
|
-
"steps_computed",
|
|
127
|
-
"total_energy",
|
|
128
|
-
"interactions_computed"
|
|
129
|
-
]
|
|
130
|
-
},
|
|
131
|
-
"dependencies": [],
|
|
132
|
-
"version": "0.1.0",
|
|
133
|
-
"author": "rotifer-team",
|
|
134
|
-
"fidelity": "Native",
|
|
135
|
-
"transparency": "Open",
|
|
136
|
-
"ir_hash": "391614d239e64ad94d257ec59c079a1a060d0143b28f6edd8ec255858f961d1c"
|
|
137
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"geneId": "91f0c58c3342d9853eef2747aa91cf59e23f80a5426be2ce9200a1e44a0de113",
|
|
3
|
-
"name": "particle-spatial",
|
|
4
|
-
"domain": "sim.particle",
|
|
5
|
-
"compiledAt": "2026-03-14T09:13:54.298Z",
|
|
6
|
-
"fidelity": "Native",
|
|
7
|
-
"wasmAvailable": true,
|
|
8
|
-
"irHash": "391614d239e64ad94d257ec59c079a1a060d0143b28f6edd8ec255858f961d1c",
|
|
9
|
-
"totalSize": 1322156,
|
|
10
|
-
"codeSectionSize": 956115,
|
|
11
|
-
"durationMs": 5868
|
|
12
|
-
}
|