kynjal-cli 3.1.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/core/coder.md +1 -1
- package/.claude/agents/core/planner.md +2 -2
- package/.claude/agents/core/researcher.md +1 -1
- package/.claude/agents/core/reviewer.md +1 -1
- package/.claude/agents/core/tester.md +1 -1
- package/.claude/agents/data/data-ml-model.md +4 -4
- package/.claude/agents/development/dev-backend-api.md +4 -4
- package/.claude/agents/documentation/docs-api-openapi.md +4 -4
- package/.claude/agents/github/code-review-swarm.md +2 -2
- package/.claude/agents/github/issue-tracker.md +2 -2
- package/.claude/agents/github/pr-manager.md +2 -2
- package/.claude/agents/github/release-manager.md +2 -2
- package/.claude/agents/github/workflow-automation.md +2 -2
- package/.claude/agents/sparc/architecture.md +3 -3
- package/.claude/agents/sparc/pseudocode.md +2 -2
- package/.claude/agents/sparc/refinement.md +3 -3
- package/.claude/agents/sparc/specification.md +2 -2
- package/.claude/agents/swarm/adaptive-coordinator.md +1 -1
- package/.claude/agents/swarm/hierarchical-coordinator.md +1 -1
- package/.claude/agents/swarm/mesh-coordinator.md +1 -1
- package/.claude/agents/templates/base-template-generator.md +25 -4
- package/.claude/agents/templates/sparc-coordinator.md +3 -3
- package/.claude/helpers/auto-commit.sh +1 -1
- package/.claude/helpers/auto-memory-hook.mjs +27 -9
- package/.claude/helpers/hook-handler.cjs +58 -18
- package/.claude/helpers/statusline.cjs +14 -33
- package/.claude/helpers/statusline.js +3 -3
- package/.claude/settings.json +9 -9
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +2 -2
- package/.claude/skills/swarm-orchestration/SKILL.md +1 -1
- package/README.md +383 -170
- package/bin/cli.js +6 -6
- package/bin/mcp-server.js +1 -1
- package/bin/preinstall.cjs +2 -0
- package/dist/src/appliance/gguf-engine.js +664 -0
- package/dist/src/appliance/gguf-engine.js.map +1 -0
- package/dist/src/appliance/ruvllm-bridge.js +492 -0
- package/dist/src/appliance/ruvllm-bridge.js.map +1 -0
- package/dist/src/appliance/rvfa-builder.js +383 -0
- package/dist/src/appliance/rvfa-builder.js.map +1 -0
- package/dist/src/appliance/rvfa-distribution.js +533 -0
- package/dist/src/appliance/rvfa-distribution.js.map +1 -0
- package/dist/src/appliance/rvfa-format.js +465 -0
- package/dist/src/appliance/rvfa-format.js.map +1 -0
- package/dist/src/appliance/rvfa-runner.js +373 -0
- package/dist/src/appliance/rvfa-runner.js.map +1 -0
- package/dist/src/appliance/rvfa-signing.js +469 -0
- package/dist/src/appliance/rvfa-signing.js.map +1 -0
- package/dist/src/benchmarks/pretrain/index.js +542 -331
- package/dist/src/benchmarks/pretrain/index.js.map +1 -1
- package/dist/src/commands/agent.d.ts.map +1 -1
- package/dist/src/commands/agent.js +725 -502
- package/dist/src/commands/agent.js.map +1 -1
- package/dist/src/commands/analyze.js +1548 -1218
- package/dist/src/commands/analyze.js.map +1 -1
- package/dist/src/commands/appliance-advanced.d.ts +9 -0
- package/dist/src/commands/appliance-advanced.d.ts.map +1 -0
- package/dist/src/commands/appliance-advanced.js +324 -0
- package/dist/src/commands/appliance-advanced.js.map +1 -0
- package/dist/src/commands/appliance.d.ts +8 -0
- package/dist/src/commands/appliance.d.ts.map +1 -0
- package/dist/src/commands/appliance.js +581 -0
- package/dist/src/commands/appliance.js.map +1 -0
- package/dist/src/commands/benchmark.js +523 -372
- package/dist/src/commands/benchmark.js.map +1 -1
- package/dist/src/commands/claims.js +364 -274
- package/dist/src/commands/claims.js.map +1 -1
- package/dist/src/commands/cleanup.d.ts +13 -0
- package/dist/src/commands/cleanup.d.ts.map +1 -0
- package/dist/src/commands/cleanup.js +262 -0
- package/dist/src/commands/cleanup.js.map +1 -0
- package/dist/src/commands/completions.js +118 -477
- package/dist/src/commands/completions.js.map +1 -1
- package/dist/src/commands/config.js +303 -237
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/daemon.d.ts.map +1 -1
- package/dist/src/commands/daemon.js +597 -425
- package/dist/src/commands/daemon.js.map +1 -1
- package/dist/src/commands/deployment.js +275 -194
- package/dist/src/commands/deployment.js.map +1 -1
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +690 -460
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/embeddings.js +1543 -1293
- package/dist/src/commands/embeddings.js.map +1 -1
- package/dist/src/commands/guidance.js +596 -449
- package/dist/src/commands/guidance.js.map +1 -1
- package/dist/src/commands/hive-mind.js +938 -854
- package/dist/src/commands/hive-mind.js.map +1 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +3677 -2570
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/index.js +322 -122
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.d.ts +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +943 -787
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/issues.js +558 -383
- package/dist/src/commands/issues.js.map +1 -1
- package/dist/src/commands/mcp.d.ts.map +1 -1
- package/dist/src/commands/mcp.js +605 -475
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/memory.d.ts.map +1 -1
- package/dist/src/commands/memory.js +1031 -814
- package/dist/src/commands/memory.js.map +1 -1
- package/dist/src/commands/migrate.js +347 -282
- package/dist/src/commands/migrate.js.map +1 -1
- package/dist/src/commands/neural.d.ts.map +1 -1
- package/dist/src/commands/neural.js +1563 -1283
- package/dist/src/commands/neural.js.map +1 -1
- package/dist/src/commands/performance.js +643 -497
- package/dist/src/commands/performance.js.map +1 -1
- package/dist/src/commands/plugins.js +841 -668
- package/dist/src/commands/plugins.js.map +1 -1
- package/dist/src/commands/process.js +447 -392
- package/dist/src/commands/process.js.map +1 -1
- package/dist/src/commands/progress.js +256 -162
- package/dist/src/commands/progress.js.map +1 -1
- package/dist/src/commands/providers.js +220 -150
- package/dist/src/commands/providers.js.map +1 -1
- package/dist/src/commands/route.js +665 -520
- package/dist/src/commands/route.js.map +1 -1
- package/dist/src/commands/ruvector/backup.js +651 -505
- package/dist/src/commands/ruvector/backup.js.map +1 -1
- package/dist/src/commands/ruvector/benchmark.js +401 -349
- package/dist/src/commands/ruvector/benchmark.js.map +1 -1
- package/dist/src/commands/ruvector/import.js +267 -225
- package/dist/src/commands/ruvector/import.js.map +1 -1
- package/dist/src/commands/ruvector/index.js +75 -37
- package/dist/src/commands/ruvector/index.js.map +1 -1
- package/dist/src/commands/ruvector/init.js +359 -336
- package/dist/src/commands/ruvector/init.js.map +1 -1
- package/dist/src/commands/ruvector/migrate.js +322 -335
- package/dist/src/commands/ruvector/migrate.js.map +1 -1
- package/dist/src/commands/ruvector/optimize.js +431 -375
- package/dist/src/commands/ruvector/optimize.js.map +1 -1
- package/dist/src/commands/ruvector/setup.js +117 -703
- package/dist/src/commands/ruvector/setup.js.map +1 -1
- package/dist/src/commands/ruvector/status.js +419 -364
- package/dist/src/commands/ruvector/status.js.map +1 -1
- package/dist/src/commands/security.d.ts.map +1 -1
- package/dist/src/commands/security.js +610 -456
- package/dist/src/commands/security.js.map +1 -1
- package/dist/src/commands/session.d.ts +1 -1
- package/dist/src/commands/session.js +627 -505
- package/dist/src/commands/session.js.map +1 -1
- package/dist/src/commands/start.d.ts +1 -1
- package/dist/src/commands/start.js +368 -271
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/status.d.ts +1 -1
- package/dist/src/commands/status.d.ts.map +1 -1
- package/dist/src/commands/status.js +492 -379
- package/dist/src/commands/status.js.map +1 -1
- package/dist/src/commands/swarm.js +488 -408
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/commands/task.d.ts +1 -1
- package/dist/src/commands/task.js +539 -424
- package/dist/src/commands/task.js.map +1 -1
- package/dist/src/commands/transfer-store.js +412 -322
- package/dist/src/commands/transfer-store.js.map +1 -1
- package/dist/src/commands/update.js +291 -196
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/commands/workflow.js +486 -386
- package/dist/src/commands/workflow.js.map +1 -1
- package/dist/src/config-adapter.js +40 -39
- package/dist/src/config-adapter.js.map +1 -1
- package/dist/src/index.js +416 -312
- package/dist/src/index.js.map +1 -1
- package/dist/src/infrastructure/in-memory-repositories.js +507 -246
- package/dist/src/infrastructure/in-memory-repositories.js.map +1 -1
- package/dist/src/init/claudemd-generator.js +78 -368
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/executor.js +1019 -1345
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/helpers-generator.js +60 -635
- package/dist/src/init/helpers-generator.js.map +1 -1
- package/dist/src/init/index.d.ts +1 -1
- package/dist/src/init/index.d.ts.map +1 -1
- package/dist/src/init/index.js +1 -1
- package/dist/src/init/index.js.map +1 -1
- package/dist/src/init/mcp-generator.d.ts +0 -1
- package/dist/src/init/mcp-generator.d.ts.map +1 -1
- package/dist/src/init/mcp-generator.js +62 -42
- package/dist/src/init/mcp-generator.js.map +1 -1
- package/dist/src/init/settings-generator.d.ts.map +1 -1
- package/dist/src/init/settings-generator.js +167 -100
- package/dist/src/init/settings-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.d.ts +16 -8
- package/dist/src/init/statusline-generator.d.ts.map +1 -1
- package/dist/src/init/statusline-generator.js +20 -1300
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/init/types.d.ts +15 -5
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +66 -76
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/mcp-client.js +130 -76
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-server.js +758 -445
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/mcp-tools/agent-tools.js +492 -391
- package/dist/src/mcp-tools/agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/agentdb-tools.d.ts +30 -0
- package/dist/src/mcp-tools/agentdb-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/agentdb-tools.js +758 -0
- package/dist/src/mcp-tools/agentdb-tools.js.map +1 -0
- package/dist/src/mcp-tools/analyze-tools.js +236 -172
- package/dist/src/mcp-tools/analyze-tools.js.map +1 -1
- package/dist/src/mcp-tools/auto-install.js +142 -80
- package/dist/src/mcp-tools/auto-install.js.map +1 -1
- package/dist/src/mcp-tools/browser-tools.js +375 -252
- package/dist/src/mcp-tools/browser-tools.js.map +1 -1
- package/dist/src/mcp-tools/claims-tools.js +565 -473
- package/dist/src/mcp-tools/claims-tools.js.map +1 -1
- package/dist/src/mcp-tools/config-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/config-tools.js +284 -190
- package/dist/src/mcp-tools/config-tools.js.map +1 -1
- package/dist/src/mcp-tools/coordination-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/coordination-tools.js +600 -349
- package/dist/src/mcp-tools/coordination-tools.js.map +1 -1
- package/dist/src/mcp-tools/daa-tools.js +367 -289
- package/dist/src/mcp-tools/daa-tools.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +693 -582
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
- package/dist/src/mcp-tools/github-tools.js +312 -261
- package/dist/src/mcp-tools/github-tools.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +718 -423
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +2726 -1978
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/index.d.ts +2 -0
- package/dist/src/mcp-tools/index.d.ts.map +1 -1
- package/dist/src/mcp-tools/index.js +2 -0
- package/dist/src/mcp-tools/index.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +514 -329
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +428 -326
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/mcp-tools/performance-tools.js +480 -420
- package/dist/src/mcp-tools/performance-tools.js.map +1 -1
- package/dist/src/mcp-tools/progress-tools.js +278 -204
- package/dist/src/mcp-tools/progress-tools.js.map +1 -1
- package/dist/src/mcp-tools/ruvllm-tools.d.ts +9 -0
- package/dist/src/mcp-tools/ruvllm-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/ruvllm-tools.js +399 -0
- package/dist/src/mcp-tools/ruvllm-tools.js.map +1 -0
- package/dist/src/mcp-tools/security-tools.js +429 -297
- package/dist/src/mcp-tools/security-tools.js.map +1 -1
- package/dist/src/mcp-tools/session-tools.js +234 -185
- package/dist/src/mcp-tools/session-tools.js.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.d.ts +2 -1
- package/dist/src/mcp-tools/swarm-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.js +303 -64
- package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
- package/dist/src/mcp-tools/system-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/system-tools.js +352 -200
- package/dist/src/mcp-tools/system-tools.js.map +1 -1
- package/dist/src/mcp-tools/task-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/task-tools.js +357 -189
- package/dist/src/mcp-tools/task-tools.js.map +1 -1
- package/dist/src/mcp-tools/terminal-tools.js +196 -148
- package/dist/src/mcp-tools/terminal-tools.js.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.js +333 -186
- package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
- package/dist/src/mcp-tools/wasm-agent-tools.d.ts +9 -0
- package/dist/src/mcp-tools/wasm-agent-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/wasm-agent-tools.js +377 -0
- package/dist/src/mcp-tools/wasm-agent-tools.js.map +1 -0
- package/dist/src/mcp-tools/workflow-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/workflow-tools.js +471 -335
- package/dist/src/mcp-tools/workflow-tools.js.map +1 -1
- package/dist/src/memory/ewc-consolidation.js +345 -173
- package/dist/src/memory/ewc-consolidation.js.map +1 -1
- package/dist/src/memory/intelligence.js +841 -359
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.js +1964 -0
- package/dist/src/memory/memory-bridge.js.map +1 -0
- package/dist/src/memory/memory-initializer.js +1895 -1602
- package/dist/src/memory/memory-initializer.js.map +1 -1
- package/dist/src/memory/sona-optimizer.js +329 -199
- package/dist/src/memory/sona-optimizer.js.map +1 -1
- package/dist/src/output.d.ts +2 -2
- package/dist/src/output.d.ts.map +1 -1
- package/dist/src/output.js +273 -242
- package/dist/src/output.js.map +1 -1
- package/dist/src/parser.js +217 -124
- package/dist/src/parser.js.map +1 -1
- package/dist/src/plugins/manager.js +531 -278
- package/dist/src/plugins/manager.js.map +1 -1
- package/dist/src/plugins/store/discovery.js +362 -275
- package/dist/src/plugins/store/discovery.js.map +1 -1
- package/dist/src/plugins/store/index.js +105 -48
- package/dist/src/plugins/store/index.js.map +1 -1
- package/dist/src/plugins/store/search.js +107 -69
- package/dist/src/plugins/store/search.js.map +1 -1
- package/dist/src/plugins/tests/demo-plugin-store.js +160 -113
- package/dist/src/plugins/tests/demo-plugin-store.js.map +1 -1
- package/dist/src/plugins/tests/standalone-test.js +223 -172
- package/dist/src/plugins/tests/standalone-test.js.map +1 -1
- package/dist/src/plugins/tests/test-plugin-store.js +228 -190
- package/dist/src/plugins/tests/test-plugin-store.js.map +1 -1
- package/dist/src/production/circuit-breaker.js +126 -62
- package/dist/src/production/circuit-breaker.js.map +1 -1
- package/dist/src/production/error-handler.js +156 -86
- package/dist/src/production/error-handler.js.map +1 -1
- package/dist/src/production/monitoring.js +220 -139
- package/dist/src/production/monitoring.js.map +1 -1
- package/dist/src/production/rate-limiter.js +93 -74
- package/dist/src/production/rate-limiter.js.map +1 -1
- package/dist/src/production/retry.js +167 -75
- package/dist/src/production/retry.js.map +1 -1
- package/dist/src/prompt.js +560 -436
- package/dist/src/prompt.js.map +1 -1
- package/dist/src/runtime/headless.js +289 -200
- package/dist/src/runtime/headless.js.map +1 -1
- package/dist/src/ruvector/agent-wasm.js +511 -0
- package/dist/src/ruvector/agent-wasm.js.map +1 -0
- package/dist/src/ruvector/ast-analyzer.js +232 -145
- package/dist/src/ruvector/ast-analyzer.js.map +1 -1
- package/dist/src/ruvector/coverage-router.js +419 -287
- package/dist/src/ruvector/coverage-router.js.map +1 -1
- package/dist/src/ruvector/coverage-tools.js +101 -56
- package/dist/src/ruvector/coverage-tools.js.map +1 -1
- package/dist/src/ruvector/diff-classifier.js +451 -324
- package/dist/src/ruvector/diff-classifier.js.map +1 -1
- package/dist/src/ruvector/enhanced-model-router.js +337 -251
- package/dist/src/ruvector/enhanced-model-router.js.map +1 -1
- package/dist/src/ruvector/flash-attention.js +254 -223
- package/dist/src/ruvector/flash-attention.js.map +1 -1
- package/dist/src/ruvector/graph-analyzer.js +680 -486
- package/dist/src/ruvector/graph-analyzer.js.map +1 -1
- package/dist/src/ruvector/index.js +113 -27
- package/dist/src/ruvector/index.js.map +1 -1
- package/dist/src/ruvector/lora-adapter.js +248 -155
- package/dist/src/ruvector/lora-adapter.js.map +1 -1
- package/dist/src/ruvector/model-router.js +248 -175
- package/dist/src/ruvector/model-router.js.map +1 -1
- package/dist/src/ruvector/moe-router.js +286 -228
- package/dist/src/ruvector/moe-router.js.map +1 -1
- package/dist/src/ruvector/q-learning-router.js +338 -257
- package/dist/src/ruvector/q-learning-router.js.map +1 -1
- package/dist/src/ruvector/ruvllm-wasm.js +527 -0
- package/dist/src/ruvector/ruvllm-wasm.js.map +1 -0
- package/dist/src/ruvector/semantic-router.js +67 -60
- package/dist/src/ruvector/semantic-router.js.map +1 -1
- package/dist/src/ruvector/vector-db.js +205 -119
- package/dist/src/ruvector/vector-db.js.map +1 -1
- package/dist/src/services/agentic-flow-bridge.js +168 -0
- package/dist/src/services/agentic-flow-bridge.js.map +1 -0
- package/dist/src/services/claim-service.js +940 -615
- package/dist/src/services/claim-service.js.map +1 -1
- package/dist/src/services/container-worker-pool.js +669 -399
- package/dist/src/services/container-worker-pool.js.map +1 -1
- package/dist/src/services/headless-worker-executor.js +467 -441
- package/dist/src/services/headless-worker-executor.js.map +1 -1
- package/dist/src/services/index.d.ts +5 -5
- package/dist/src/services/index.d.ts.map +1 -1
- package/dist/src/services/index.js +4 -4
- package/dist/src/services/index.js.map +1 -1
- package/dist/src/services/registry-api.js +201 -93
- package/dist/src/services/registry-api.js.map +1 -1
- package/dist/src/services/ruvector-training.js +414 -144
- package/dist/src/services/ruvector-training.js.map +1 -1
- package/dist/src/services/worker-daemon.js +928 -531
- package/dist/src/services/worker-daemon.js.map +1 -1
- package/dist/src/services/worker-queue.js +550 -331
- package/dist/src/services/worker-queue.js.map +1 -1
- package/dist/src/suggest.js +55 -45
- package/dist/src/suggest.js.map +1 -1
- package/dist/src/transfer/anonymization/index.js +37 -29
- package/dist/src/transfer/anonymization/index.js.map +1 -1
- package/dist/src/transfer/deploy-seraphine.d.ts +1 -1
- package/dist/src/transfer/deploy-seraphine.js +156 -129
- package/dist/src/transfer/deploy-seraphine.js.map +1 -1
- package/dist/src/transfer/export.js +142 -84
- package/dist/src/transfer/export.js.map +1 -1
- package/dist/src/transfer/index.d.ts +1 -1
- package/dist/src/transfer/index.d.ts.map +1 -1
- package/dist/src/transfer/index.js +2 -0
- package/dist/src/transfer/index.js.map +1 -1
- package/dist/src/transfer/ipfs/client.js +337 -179
- package/dist/src/transfer/ipfs/client.js.map +1 -1
- package/dist/src/transfer/ipfs/upload.js +434 -290
- package/dist/src/transfer/ipfs/upload.js.map +1 -1
- package/dist/src/transfer/models/seraphine.js +58 -58
- package/dist/src/transfer/models/seraphine.js.map +1 -1
- package/dist/src/transfer/serialization/cfp.js +37 -33
- package/dist/src/transfer/serialization/cfp.js.map +1 -1
- package/dist/src/transfer/storage/gcs.js +248 -139
- package/dist/src/transfer/storage/gcs.js.map +1 -1
- package/dist/src/transfer/store/discovery.js +353 -243
- package/dist/src/transfer/store/discovery.js.map +1 -1
- package/dist/src/transfer/store/download.js +365 -243
- package/dist/src/transfer/store/download.js.map +1 -1
- package/dist/src/transfer/store/index.js +130 -63
- package/dist/src/transfer/store/index.js.map +1 -1
- package/dist/src/transfer/store/publish.js +258 -184
- package/dist/src/transfer/store/publish.js.map +1 -1
- package/dist/src/transfer/store/registry.js +73 -51
- package/dist/src/transfer/store/registry.js.map +1 -1
- package/dist/src/transfer/store/search.js +96 -64
- package/dist/src/transfer/store/search.js.map +1 -1
- package/dist/src/transfer/store/tests/standalone-test.js +231 -174
- package/dist/src/transfer/store/tests/standalone-test.js.map +1 -1
- package/dist/src/transfer/test-seraphine.js +130 -95
- package/dist/src/transfer/test-seraphine.js.map +1 -1
- package/dist/src/transfer/tests/test-store.js +239 -194
- package/dist/src/transfer/tests/test-store.js.map +1 -1
- package/dist/src/types.js +56 -27
- package/dist/src/types.js.map +1 -1
- package/dist/src/update/checker.js +183 -106
- package/dist/src/update/checker.js.map +1 -1
- package/dist/src/update/executor.js +198 -135
- package/dist/src/update/executor.js.map +1 -1
- package/dist/src/update/index.js +85 -38
- package/dist/src/update/index.js.map +1 -1
- package/dist/src/update/rate-limiter.js +31 -19
- package/dist/src/update/rate-limiter.js.map +1 -1
- package/dist/src/update/validator.js +64 -38
- package/dist/src/update/validator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -10
- package/.claude/agents/custom/accessibility-auditor.yaml +0 -56
- package/.claude/agents/custom/design-architect.yaml +0 -48
- package/.claude/agents/custom/ui-developer.yaml +0 -46
- package/.claude/agents/custom/ux-researcher.yaml +0 -60
- package/dist/src/benchmarks/pretrain/index.d.ts +0 -58
- package/dist/src/benchmarks/pretrain/index.d.ts.map +0 -1
- package/dist/src/commands/index.d.ts +0 -108
- package/dist/src/commands/index.d.ts.map +0 -1
- package/dist/src/config-adapter.d.ts +0 -15
- package/dist/src/config-adapter.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -76
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/infrastructure/in-memory-repositories.d.ts +0 -68
- package/dist/src/infrastructure/in-memory-repositories.d.ts.map +0 -1
- package/dist/src/init/claudemd-generator.d.ts +0 -25
- package/dist/src/init/claudemd-generator.d.ts.map +0 -1
- package/dist/src/init/executor.d.ts +0 -41
- package/dist/src/init/executor.d.ts.map +0 -1
- package/dist/src/init/helpers-generator.d.ts +0 -60
- package/dist/src/init/helpers-generator.d.ts.map +0 -1
- package/dist/src/mcp-client.d.ts +0 -92
- package/dist/src/mcp-client.d.ts.map +0 -1
- package/dist/src/mcp-server.d.ts +0 -161
- package/dist/src/mcp-server.d.ts.map +0 -1
- package/dist/src/mcp-tools/auto-install.d.ts +0 -83
- package/dist/src/mcp-tools/auto-install.d.ts.map +0 -1
- package/dist/src/mcp-tools/types.d.ts +0 -31
- package/dist/src/mcp-tools/types.d.ts.map +0 -1
- package/dist/src/memory/ewc-consolidation.d.ts +0 -271
- package/dist/src/memory/ewc-consolidation.d.ts.map +0 -1
- package/dist/src/memory/intelligence.d.ts +0 -285
- package/dist/src/memory/intelligence.d.ts.map +0 -1
- package/dist/src/memory/memory-initializer.d.ts +0 -396
- package/dist/src/memory/memory-initializer.d.ts.map +0 -1
- package/dist/src/memory/sona-optimizer.d.ts +0 -227
- package/dist/src/memory/sona-optimizer.d.ts.map +0 -1
- package/dist/src/parser.d.ts +0 -41
- package/dist/src/parser.d.ts.map +0 -1
- package/dist/src/plugins/manager.d.ts +0 -133
- package/dist/src/plugins/manager.d.ts.map +0 -1
- package/dist/src/plugins/store/discovery.d.ts +0 -88
- package/dist/src/plugins/store/discovery.d.ts.map +0 -1
- package/dist/src/plugins/store/index.d.ts +0 -76
- package/dist/src/plugins/store/index.d.ts.map +0 -1
- package/dist/src/plugins/store/search.d.ts +0 -46
- package/dist/src/plugins/store/search.d.ts.map +0 -1
- package/dist/src/plugins/store/types.d.ts +0 -274
- package/dist/src/plugins/store/types.d.ts.map +0 -1
- package/dist/src/production/circuit-breaker.d.ts +0 -101
- package/dist/src/production/circuit-breaker.d.ts.map +0 -1
- package/dist/src/production/error-handler.d.ts +0 -92
- package/dist/src/production/error-handler.d.ts.map +0 -1
- package/dist/src/production/monitoring.d.ts +0 -161
- package/dist/src/production/monitoring.d.ts.map +0 -1
- package/dist/src/production/rate-limiter.d.ts +0 -80
- package/dist/src/production/rate-limiter.d.ts.map +0 -1
- package/dist/src/production/retry.d.ts +0 -48
- package/dist/src/production/retry.d.ts.map +0 -1
- package/dist/src/prompt.d.ts +0 -44
- package/dist/src/prompt.d.ts.map +0 -1
- package/dist/src/runtime/headless.d.ts +0 -60
- package/dist/src/runtime/headless.d.ts.map +0 -1
- package/dist/src/ruvector/ast-analyzer.d.ts +0 -67
- package/dist/src/ruvector/ast-analyzer.d.ts.map +0 -1
- package/dist/src/ruvector/coverage-router.d.ts +0 -160
- package/dist/src/ruvector/coverage-router.d.ts.map +0 -1
- package/dist/src/ruvector/diff-classifier.d.ts +0 -175
- package/dist/src/ruvector/diff-classifier.d.ts.map +0 -1
- package/dist/src/ruvector/enhanced-model-router.d.ts +0 -146
- package/dist/src/ruvector/enhanced-model-router.d.ts.map +0 -1
- package/dist/src/ruvector/flash-attention.d.ts +0 -195
- package/dist/src/ruvector/flash-attention.d.ts.map +0 -1
- package/dist/src/ruvector/graph-analyzer.d.ts +0 -187
- package/dist/src/ruvector/graph-analyzer.d.ts.map +0 -1
- package/dist/src/ruvector/index.d.ts +0 -34
- package/dist/src/ruvector/index.d.ts.map +0 -1
- package/dist/src/ruvector/lora-adapter.d.ts +0 -218
- package/dist/src/ruvector/lora-adapter.d.ts.map +0 -1
- package/dist/src/ruvector/model-router.d.ts +0 -220
- package/dist/src/ruvector/model-router.d.ts.map +0 -1
- package/dist/src/ruvector/moe-router.d.ts +0 -206
- package/dist/src/ruvector/moe-router.d.ts.map +0 -1
- package/dist/src/ruvector/q-learning-router.d.ts +0 -211
- package/dist/src/ruvector/q-learning-router.d.ts.map +0 -1
- package/dist/src/ruvector/semantic-router.d.ts +0 -77
- package/dist/src/ruvector/semantic-router.d.ts.map +0 -1
- package/dist/src/ruvector/vector-db.d.ts +0 -69
- package/dist/src/ruvector/vector-db.d.ts.map +0 -1
- package/dist/src/services/claim-service.d.ts +0 -204
- package/dist/src/services/claim-service.d.ts.map +0 -1
- package/dist/src/services/container-worker-pool.d.ts +0 -197
- package/dist/src/services/container-worker-pool.d.ts.map +0 -1
- package/dist/src/services/headless-worker-executor.d.ts +0 -304
- package/dist/src/services/headless-worker-executor.d.ts.map +0 -1
- package/dist/src/services/registry-api.d.ts +0 -58
- package/dist/src/services/registry-api.d.ts.map +0 -1
- package/dist/src/services/ruvector-training.d.ts +0 -213
- package/dist/src/services/ruvector-training.d.ts.map +0 -1
- package/dist/src/services/worker-daemon.d.ts +0 -203
- package/dist/src/services/worker-daemon.d.ts.map +0 -1
- package/dist/src/services/worker-queue.d.ts +0 -194
- package/dist/src/services/worker-queue.d.ts.map +0 -1
- package/dist/src/suggest.d.ts +0 -53
- package/dist/src/suggest.d.ts.map +0 -1
- package/dist/src/transfer/export.d.ts +0 -25
- package/dist/src/transfer/export.d.ts.map +0 -1
- package/dist/src/transfer/ipfs/client.d.ts +0 -109
- package/dist/src/transfer/ipfs/client.d.ts.map +0 -1
- package/dist/src/transfer/ipfs/upload.d.ts +0 -95
- package/dist/src/transfer/ipfs/upload.d.ts.map +0 -1
- package/dist/src/transfer/models/seraphine.d.ts +0 -72
- package/dist/src/transfer/models/seraphine.d.ts.map +0 -1
- package/dist/src/transfer/serialization/cfp.d.ts +0 -49
- package/dist/src/transfer/serialization/cfp.d.ts.map +0 -1
- package/dist/src/transfer/storage/gcs.d.ts +0 -82
- package/dist/src/transfer/storage/gcs.d.ts.map +0 -1
- package/dist/src/transfer/store/discovery.d.ts +0 -84
- package/dist/src/transfer/store/discovery.d.ts.map +0 -1
- package/dist/src/transfer/store/download.d.ts +0 -70
- package/dist/src/transfer/store/download.d.ts.map +0 -1
- package/dist/src/transfer/store/index.d.ts +0 -84
- package/dist/src/transfer/store/index.d.ts.map +0 -1
- package/dist/src/transfer/store/publish.d.ts +0 -76
- package/dist/src/transfer/store/publish.d.ts.map +0 -1
- package/dist/src/transfer/store/search.d.ts +0 -54
- package/dist/src/transfer/store/search.d.ts.map +0 -1
- package/dist/src/transfer/types.d.ts +0 -245
- package/dist/src/transfer/types.d.ts.map +0 -1
- package/dist/src/types.d.ts +0 -198
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/update/checker.d.ts +0 -34
- package/dist/src/update/checker.d.ts.map +0 -1
- package/dist/src/update/executor.d.ts +0 -32
- package/dist/src/update/executor.d.ts.map +0 -1
- package/dist/src/update/index.d.ts +0 -33
- package/dist/src/update/index.d.ts.map +0 -1
- package/dist/src/update/rate-limiter.d.ts +0 -20
- package/dist/src/update/rate-limiter.d.ts.map +0 -1
- package/dist/src/update/validator.d.ts +0 -17
- package/dist/src/update/validator.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env npx tsx
|
|
2
2
|
/**
|
|
3
3
|
* Deploy Seraphine Genesis Model
|
|
4
|
-
* Exports and uploads the first
|
|
4
|
+
* Exports and uploads the first Claude Flow pattern model to IPFS
|
|
5
5
|
*
|
|
6
6
|
* Usage:
|
|
7
7
|
* npx tsx deploy-seraphine.ts
|
|
@@ -9,10 +9,46 @@
|
|
|
9
9
|
* npx tsx deploy-seraphine.ts --to-ipfs
|
|
10
10
|
* npx tsx deploy-seraphine.ts --to-ipfs --anonymize strict
|
|
11
11
|
*/
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (_) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
12
48
|
import * as path from 'path';
|
|
13
49
|
import { fileURLToPath } from 'url';
|
|
14
|
-
|
|
15
|
-
|
|
50
|
+
var __filename = fileURLToPath(import.meta.url);
|
|
51
|
+
var __dirname = path.dirname(__filename);
|
|
16
52
|
import { createSeraphineGenesis, getSeraphineInfo } from './models/seraphine.js';
|
|
17
53
|
import { exportPatterns } from './export.js';
|
|
18
54
|
import { validateCFP } from './serialization/cfp.js';
|
|
@@ -21,17 +57,17 @@ import { scanCFPForPII } from './anonymization/index.js';
|
|
|
21
57
|
* Parse CLI arguments
|
|
22
58
|
*/
|
|
23
59
|
function parseArgs() {
|
|
24
|
-
|
|
25
|
-
|
|
60
|
+
var args = process.argv.slice(2);
|
|
61
|
+
var options = {
|
|
26
62
|
toIpfs: false,
|
|
27
63
|
anonymize: 'standard',
|
|
28
64
|
pin: true,
|
|
29
65
|
gateway: 'https://w3s.link',
|
|
30
66
|
validate: true,
|
|
31
|
-
verbose: false
|
|
67
|
+
verbose: false
|
|
32
68
|
};
|
|
33
|
-
for (
|
|
34
|
-
|
|
69
|
+
for (var i = 0; i < args.length; i++) {
|
|
70
|
+
var arg = args[i];
|
|
35
71
|
switch (arg) {
|
|
36
72
|
case '--output':
|
|
37
73
|
case '-o':
|
|
@@ -71,134 +107,125 @@ function parseArgs() {
|
|
|
71
107
|
* Print help message
|
|
72
108
|
*/
|
|
73
109
|
function printHelp() {
|
|
74
|
-
console.log(
|
|
75
|
-
Seraphine Genesis Deployer
|
|
76
|
-
==========================
|
|
77
|
-
|
|
78
|
-
Deploy the foundational KynjalFlow pattern model.
|
|
79
|
-
|
|
80
|
-
Usage:
|
|
81
|
-
npx ts-node deploy-seraphine.ts [options]
|
|
82
|
-
|
|
83
|
-
Options:
|
|
84
|
-
--output, -o <path> Output file path
|
|
85
|
-
--to-ipfs, --ipfs Upload to IPFS
|
|
86
|
-
--anonymize, -a <level> Anonymization level (minimal|standard|strict|paranoid)
|
|
87
|
-
--gateway, -g <url> IPFS gateway URL
|
|
88
|
-
--no-pin Don't pin to pinning service
|
|
89
|
-
--no-validate Skip validation
|
|
90
|
-
--verbose, -v Verbose output
|
|
91
|
-
--help, -h Show this help
|
|
92
|
-
|
|
93
|
-
Examples:
|
|
94
|
-
npx ts-node deploy-seraphine.ts --output ./seraphine-genesis.cfp.json
|
|
95
|
-
npx ts-node deploy-seraphine.ts --to-ipfs --anonymize strict
|
|
96
|
-
npx ts-node deploy-seraphine.ts --to-ipfs --gateway https://dweb.link
|
|
97
|
-
`);
|
|
110
|
+
console.log("\nSeraphine Genesis Deployer\n==========================\n\nDeploy the foundational Claude Flow pattern model.\n\nUsage:\n npx ts-node deploy-seraphine.ts [options]\n\nOptions:\n --output, -o <path> Output file path\n --to-ipfs, --ipfs Upload to IPFS\n --anonymize, -a <level> Anonymization level (minimal|standard|strict|paranoid)\n --gateway, -g <url> IPFS gateway URL\n --no-pin Don't pin to pinning service\n --no-validate Skip validation\n --verbose, -v Verbose output\n --help, -h Show this help\n\nExamples:\n npx ts-node deploy-seraphine.ts --output ./seraphine-genesis.cfp.json\n npx ts-node deploy-seraphine.ts --to-ipfs --anonymize strict\n npx ts-node deploy-seraphine.ts --to-ipfs --gateway https://dweb.link\n");
|
|
98
111
|
}
|
|
99
112
|
/**
|
|
100
113
|
* Main deploy function
|
|
101
114
|
*/
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
115
|
+
function deploy() {
|
|
116
|
+
return __awaiter(this, void 0, Promise, function () {
|
|
117
|
+
var options, genesis, info, _i, _a, _b, type, count, validation, _c, _d, error, piiScan, _e, _f, _g, type, count, exportOptions, defaultOutput, result;
|
|
118
|
+
return __generator(this, function (_h) {
|
|
119
|
+
switch (_h.label) {
|
|
120
|
+
case 0:
|
|
121
|
+
options = parseArgs();
|
|
122
|
+
console.log('');
|
|
123
|
+
console.log('╔══════════════════════════════════════════════════════════╗');
|
|
124
|
+
console.log('║ SERAPHINE GENESIS MODEL DEPLOYMENT ║');
|
|
125
|
+
console.log('║ The First Claude Flow Pattern Model ║');
|
|
126
|
+
console.log('╚══════════════════════════════════════════════════════════╝');
|
|
127
|
+
console.log('');
|
|
128
|
+
// Step 1: Create Seraphine Genesis
|
|
129
|
+
console.log('📦 Creating Seraphine Genesis Model...');
|
|
130
|
+
genesis = createSeraphineGenesis();
|
|
131
|
+
info = getSeraphineInfo();
|
|
132
|
+
console.log(" Name: " + info.name);
|
|
133
|
+
console.log(" Version: " + info.version);
|
|
134
|
+
console.log(" Description: " + info.description.slice(0, 60) + "...");
|
|
135
|
+
console.log('');
|
|
136
|
+
console.log(' Pattern Counts:');
|
|
137
|
+
for (_i = 0, _a = Object.entries(info.patternCounts); _i < _a.length; _i++) {
|
|
138
|
+
_b = _a[_i], type = _b[0], count = _b[1];
|
|
139
|
+
console.log(" - " + type + ": " + count);
|
|
140
|
+
}
|
|
141
|
+
console.log('');
|
|
142
|
+
// Step 2: Validate
|
|
143
|
+
if (options.validate) {
|
|
144
|
+
console.log('✅ Validating CFP format...');
|
|
145
|
+
validation = validateCFP(genesis);
|
|
146
|
+
if (!validation.valid) {
|
|
147
|
+
console.error('❌ Validation failed:');
|
|
148
|
+
for (_c = 0, _d = validation.errors; _c < _d.length; _c++) {
|
|
149
|
+
error = _d[_c];
|
|
150
|
+
console.error(" - " + error);
|
|
151
|
+
}
|
|
152
|
+
process.exit(1);
|
|
153
|
+
}
|
|
154
|
+
console.log(' Format is valid!');
|
|
155
|
+
console.log('');
|
|
156
|
+
}
|
|
157
|
+
// Step 3: Scan for PII
|
|
158
|
+
console.log('🔍 Scanning for PII...');
|
|
159
|
+
piiScan = scanCFPForPII(genesis);
|
|
160
|
+
if (piiScan.found) {
|
|
161
|
+
console.log(" Found " + piiScan.count + " PII items:");
|
|
162
|
+
for (_e = 0, _f = Object.entries(piiScan.types); _e < _f.length; _e++) {
|
|
163
|
+
_g = _f[_e], type = _g[0], count = _g[1];
|
|
164
|
+
console.log(" - " + type + ": " + count);
|
|
165
|
+
}
|
|
166
|
+
console.log(' Will be redacted during export.');
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
console.log(' No PII detected!');
|
|
170
|
+
}
|
|
171
|
+
console.log('');
|
|
172
|
+
// Step 4: Export
|
|
173
|
+
console.log("\uD83D\uDCE4 Exporting with " + options.anonymize + " anonymization...");
|
|
174
|
+
exportOptions = {
|
|
175
|
+
output: options.output,
|
|
176
|
+
toIpfs: options.toIpfs,
|
|
177
|
+
anonymize: options.anonymize,
|
|
178
|
+
pin: options.pin,
|
|
179
|
+
gateway: options.gateway,
|
|
180
|
+
format: 'json',
|
|
181
|
+
redactPii: true
|
|
182
|
+
};
|
|
183
|
+
// If no output specified and not uploading to IPFS, create default output
|
|
184
|
+
if (!options.output && !options.toIpfs) {
|
|
185
|
+
defaultOutput = path.join(process.cwd(), 'seraphine-genesis.cfp.json');
|
|
186
|
+
exportOptions.output = defaultOutput;
|
|
187
|
+
}
|
|
188
|
+
return [4 /*yield*/, exportPatterns(genesis, exportOptions)];
|
|
189
|
+
case 1:
|
|
190
|
+
result = _h.sent();
|
|
191
|
+
console.log('');
|
|
192
|
+
console.log('═══════════════════════════════════════════════════════════');
|
|
193
|
+
console.log(' DEPLOYMENT COMPLETE ');
|
|
194
|
+
console.log('═══════════════════════════════════════════════════════════');
|
|
195
|
+
console.log('');
|
|
196
|
+
if (result.success) {
|
|
197
|
+
console.log('✅ Successfully deployed Seraphine Genesis!');
|
|
198
|
+
console.log('');
|
|
199
|
+
console.log(' 📊 Export Summary:');
|
|
200
|
+
console.log(" Patterns: " + result.patternCount);
|
|
201
|
+
console.log(" Size: " + result.size + " bytes");
|
|
202
|
+
console.log(" Anonymization: " + result.anonymizationLevel);
|
|
203
|
+
if (result.outputPath) {
|
|
204
|
+
console.log('');
|
|
205
|
+
console.log(" \uD83D\uDCC1 File: " + result.outputPath);
|
|
206
|
+
}
|
|
207
|
+
if (result.cid) {
|
|
208
|
+
console.log('');
|
|
209
|
+
console.log(' 🌐 IPFS:');
|
|
210
|
+
console.log(" CID: " + result.cid);
|
|
211
|
+
console.log(" Gateway URL: " + result.gateway + "/ipfs/" + result.cid);
|
|
212
|
+
}
|
|
213
|
+
console.log('');
|
|
214
|
+
console.log(' 🎉 Hello World! The genesis pattern has been deployed.');
|
|
215
|
+
console.log(' 🌟 This is the first Claude Flow pattern ever shared.');
|
|
216
|
+
console.log('');
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
console.error('❌ Deployment failed!');
|
|
220
|
+
process.exit(1);
|
|
221
|
+
}
|
|
222
|
+
return [2 /*return*/];
|
|
131
223
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
console.log(' Format is valid!');
|
|
135
|
-
console.log('');
|
|
136
|
-
}
|
|
137
|
-
// Step 3: Scan for PII
|
|
138
|
-
console.log('🔍 Scanning for PII...');
|
|
139
|
-
const piiScan = scanCFPForPII(genesis);
|
|
140
|
-
if (piiScan.found) {
|
|
141
|
-
console.log(` Found ${piiScan.count} PII items:`);
|
|
142
|
-
for (const [type, count] of Object.entries(piiScan.types)) {
|
|
143
|
-
console.log(` - ${type}: ${count}`);
|
|
144
|
-
}
|
|
145
|
-
console.log(' Will be redacted during export.');
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
console.log(' No PII detected!');
|
|
149
|
-
}
|
|
150
|
-
console.log('');
|
|
151
|
-
// Step 4: Export
|
|
152
|
-
console.log(`📤 Exporting with ${options.anonymize} anonymization...`);
|
|
153
|
-
const exportOptions = {
|
|
154
|
-
output: options.output,
|
|
155
|
-
toIpfs: options.toIpfs,
|
|
156
|
-
anonymize: options.anonymize,
|
|
157
|
-
pin: options.pin,
|
|
158
|
-
gateway: options.gateway,
|
|
159
|
-
format: 'json',
|
|
160
|
-
redactPii: true,
|
|
161
|
-
};
|
|
162
|
-
// If no output specified and not uploading to IPFS, create default output
|
|
163
|
-
if (!options.output && !options.toIpfs) {
|
|
164
|
-
const defaultOutput = path.join(process.cwd(), 'seraphine-genesis.cfp.json');
|
|
165
|
-
exportOptions.output = defaultOutput;
|
|
166
|
-
}
|
|
167
|
-
const result = await exportPatterns(genesis, exportOptions);
|
|
168
|
-
console.log('');
|
|
169
|
-
console.log('═══════════════════════════════════════════════════════════');
|
|
170
|
-
console.log(' DEPLOYMENT COMPLETE ');
|
|
171
|
-
console.log('═══════════════════════════════════════════════════════════');
|
|
172
|
-
console.log('');
|
|
173
|
-
if (result.success) {
|
|
174
|
-
console.log('✅ Successfully deployed Seraphine Genesis!');
|
|
175
|
-
console.log('');
|
|
176
|
-
console.log(' 📊 Export Summary:');
|
|
177
|
-
console.log(` Patterns: ${result.patternCount}`);
|
|
178
|
-
console.log(` Size: ${result.size} bytes`);
|
|
179
|
-
console.log(` Anonymization: ${result.anonymizationLevel}`);
|
|
180
|
-
if (result.outputPath) {
|
|
181
|
-
console.log('');
|
|
182
|
-
console.log(` 📁 File: ${result.outputPath}`);
|
|
183
|
-
}
|
|
184
|
-
if (result.cid) {
|
|
185
|
-
console.log('');
|
|
186
|
-
console.log(' 🌐 IPFS:');
|
|
187
|
-
console.log(` CID: ${result.cid}`);
|
|
188
|
-
console.log(` Gateway URL: ${result.gateway}/ipfs/${result.cid}`);
|
|
189
|
-
}
|
|
190
|
-
console.log('');
|
|
191
|
-
console.log(' 🎉 Hello World! The genesis pattern has been deployed.');
|
|
192
|
-
console.log(' 🌟 This is the first KynjalFlow pattern ever shared.');
|
|
193
|
-
console.log('');
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
console.error('❌ Deployment failed!');
|
|
197
|
-
process.exit(1);
|
|
198
|
-
}
|
|
224
|
+
});
|
|
225
|
+
});
|
|
199
226
|
}
|
|
200
227
|
// Run if executed directly
|
|
201
|
-
deploy()
|
|
228
|
+
deploy()["catch"](function (error) {
|
|
202
229
|
console.error('Fatal error:', error);
|
|
203
230
|
process.exit(1);
|
|
204
231
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-seraphine.js","sourceRoot":"","sources":["../../../src/transfer/deploy-seraphine.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG
|
|
1
|
+
{"version":3,"file":"deploy-seraphine.js","sourceRoot":"","sources":["../../../src/transfer/deploy-seraphine.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,IAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,IAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAmB,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAgBzD;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CAAC"}
|
|
@@ -2,6 +2,42 @@
|
|
|
2
2
|
* Pattern Export Pipeline
|
|
3
3
|
* Export patterns with anonymization and optional IPFS upload
|
|
4
4
|
*/
|
|
5
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
15
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
16
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
17
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
18
|
+
function step(op) {
|
|
19
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
20
|
+
while (_) try {
|
|
21
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
22
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
23
|
+
switch (op[0]) {
|
|
24
|
+
case 0: case 1: t = op; break;
|
|
25
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
26
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
27
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
28
|
+
default:
|
|
29
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
30
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
31
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
32
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
33
|
+
if (t[2]) _.ops.pop();
|
|
34
|
+
_.trys.pop(); continue;
|
|
35
|
+
}
|
|
36
|
+
op = body.call(thisArg, _);
|
|
37
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
38
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
39
|
+
}
|
|
40
|
+
};
|
|
5
41
|
import * as fs from 'fs';
|
|
6
42
|
import * as path from 'path';
|
|
7
43
|
import { serializeToJson, serializeToBuffer, getFileExtension } from './serialization/cfp.js';
|
|
@@ -10,104 +46,126 @@ import { uploadToIPFS } from './ipfs/upload.js';
|
|
|
10
46
|
/**
|
|
11
47
|
* Export patterns to file or IPFS
|
|
12
48
|
*/
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
49
|
+
export function exportPatterns(cfp, options) {
|
|
50
|
+
var _a, _b, _c, _d, _e;
|
|
51
|
+
if (options === void 0) { options = {}; }
|
|
52
|
+
return __awaiter(this, void 0, Promise, function () {
|
|
53
|
+
var output, _f, format, _g, anonymize, _h, redactPii, _j, stripPaths, _k, toIpfs, _l, pin, _m, gateway, piiScan, _o, anonymizedCfp, transforms, serialized, size, outputPath, cid, ipfsResult, ext, dir, patternCount;
|
|
54
|
+
return __generator(this, function (_p) {
|
|
55
|
+
switch (_p.label) {
|
|
56
|
+
case 0:
|
|
57
|
+
output = options.output, _f = options.format, format = _f === void 0 ? 'json' : _f, _g = options.anonymize, anonymize = _g === void 0 ? 'standard' : _g, _h = options.redactPii, redactPii = _h === void 0 ? true : _h, _j = options.stripPaths, stripPaths = _j === void 0 ? false : _j, _k = options.toIpfs, toIpfs = _k === void 0 ? false : _k, _l = options.pin, pin = _l === void 0 ? true : _l, _m = options.gateway, gateway = _m === void 0 ? 'https://w3s.link' : _m;
|
|
58
|
+
piiScan = scanCFPForPII(cfp);
|
|
59
|
+
if (piiScan.found && redactPii) {
|
|
60
|
+
console.log("Found " + piiScan.count + " PII items, will be redacted");
|
|
61
|
+
}
|
|
62
|
+
_o = anonymizeCFP(cfp, anonymize), anonymizedCfp = _o.cfp, transforms = _o.transforms;
|
|
63
|
+
console.log("Applied " + transforms.length + " anonymization transforms: " + transforms.join(', '));
|
|
64
|
+
serialized = format === 'json'
|
|
65
|
+
? serializeToJson(anonymizedCfp)
|
|
66
|
+
: serializeToBuffer(anonymizedCfp, format);
|
|
67
|
+
size = typeof serialized === 'string' ? Buffer.byteLength(serialized) : serialized.length;
|
|
68
|
+
if (!toIpfs) return [3 /*break*/, 2];
|
|
69
|
+
return [4 /*yield*/, uploadToIPFS(Buffer.isBuffer(serialized) ? serialized : Buffer.from(serialized), {
|
|
70
|
+
pin: pin,
|
|
71
|
+
gateway: gateway,
|
|
72
|
+
name: anonymizedCfp.metadata.name || 'patterns'
|
|
73
|
+
})];
|
|
74
|
+
case 1:
|
|
75
|
+
ipfsResult = _p.sent();
|
|
76
|
+
cid = ipfsResult.cid;
|
|
77
|
+
anonymizedCfp.ipfs = {
|
|
78
|
+
cid: ipfsResult.cid,
|
|
79
|
+
pinnedAt: ipfsResult.pinnedAt ? [ipfsResult.pinnedAt] : [],
|
|
80
|
+
gateway: ipfsResult.gateway,
|
|
81
|
+
size: ipfsResult.size
|
|
82
|
+
};
|
|
83
|
+
console.log("Uploaded to IPFS: " + cid);
|
|
84
|
+
console.log("Gateway URL: " + gateway + "/ipfs/" + cid);
|
|
85
|
+
_p.label = 2;
|
|
86
|
+
case 2:
|
|
87
|
+
if (output) {
|
|
88
|
+
ext = getFileExtension(format);
|
|
89
|
+
outputPath = output.endsWith(ext) ? output : output + ext;
|
|
90
|
+
dir = path.dirname(outputPath);
|
|
91
|
+
if (!fs.existsSync(dir)) {
|
|
92
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
93
|
+
}
|
|
94
|
+
// Write file
|
|
95
|
+
if (typeof serialized === 'string') {
|
|
96
|
+
fs.writeFileSync(outputPath, serialized, 'utf-8');
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
fs.writeFileSync(outputPath, serialized);
|
|
100
|
+
}
|
|
101
|
+
console.log("Exported to: " + outputPath);
|
|
102
|
+
}
|
|
103
|
+
patternCount = (((_a = cfp.patterns.routing) === null || _a === void 0 ? void 0 : _a.length) || 0) +
|
|
104
|
+
(((_b = cfp.patterns.complexity) === null || _b === void 0 ? void 0 : _b.length) || 0) +
|
|
105
|
+
(((_c = cfp.patterns.coverage) === null || _c === void 0 ? void 0 : _c.length) || 0) +
|
|
106
|
+
(((_d = cfp.patterns.trajectory) === null || _d === void 0 ? void 0 : _d.length) || 0) +
|
|
107
|
+
(((_e = cfp.patterns.custom) === null || _e === void 0 ? void 0 : _e.length) || 0);
|
|
108
|
+
return [2 /*return*/, {
|
|
109
|
+
success: true,
|
|
110
|
+
outputPath: outputPath,
|
|
111
|
+
cid: cid,
|
|
112
|
+
gateway: cid ? gateway : undefined,
|
|
113
|
+
size: size,
|
|
114
|
+
patternCount: patternCount,
|
|
115
|
+
anonymizationLevel: anonymize
|
|
116
|
+
}];
|
|
117
|
+
}
|
|
37
118
|
});
|
|
38
|
-
|
|
39
|
-
anonymizedCfp.ipfs = {
|
|
40
|
-
cid: ipfsResult.cid,
|
|
41
|
-
pinnedAt: ipfsResult.pinnedAt ? [ipfsResult.pinnedAt] : [],
|
|
42
|
-
gateway: ipfsResult.gateway,
|
|
43
|
-
size: ipfsResult.size,
|
|
44
|
-
};
|
|
45
|
-
console.log(`Uploaded to IPFS: ${cid}`);
|
|
46
|
-
console.log(`Gateway URL: ${gateway}/ipfs/${cid}`);
|
|
47
|
-
}
|
|
48
|
-
if (output) {
|
|
49
|
-
// Write to file
|
|
50
|
-
const ext = getFileExtension(format);
|
|
51
|
-
outputPath = output.endsWith(ext) ? output : output + ext;
|
|
52
|
-
// Ensure directory exists
|
|
53
|
-
const dir = path.dirname(outputPath);
|
|
54
|
-
if (!fs.existsSync(dir)) {
|
|
55
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
56
|
-
}
|
|
57
|
-
// Write file
|
|
58
|
-
if (typeof serialized === 'string') {
|
|
59
|
-
fs.writeFileSync(outputPath, serialized, 'utf-8');
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
fs.writeFileSync(outputPath, serialized);
|
|
63
|
-
}
|
|
64
|
-
console.log(`Exported to: ${outputPath}`);
|
|
65
|
-
}
|
|
66
|
-
// Calculate pattern count
|
|
67
|
-
const patternCount = (cfp.patterns.routing?.length || 0) +
|
|
68
|
-
(cfp.patterns.complexity?.length || 0) +
|
|
69
|
-
(cfp.patterns.coverage?.length || 0) +
|
|
70
|
-
(cfp.patterns.trajectory?.length || 0) +
|
|
71
|
-
(cfp.patterns.custom?.length || 0);
|
|
72
|
-
return {
|
|
73
|
-
success: true,
|
|
74
|
-
outputPath,
|
|
75
|
-
cid,
|
|
76
|
-
gateway: cid ? gateway : undefined,
|
|
77
|
-
size,
|
|
78
|
-
patternCount,
|
|
79
|
-
anonymizationLevel: anonymize,
|
|
80
|
-
};
|
|
119
|
+
});
|
|
81
120
|
}
|
|
82
121
|
/**
|
|
83
122
|
* Export Seraphine genesis model
|
|
84
123
|
*/
|
|
85
|
-
export
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
124
|
+
export function exportSeraphine(options) {
|
|
125
|
+
if (options === void 0) { options = {}; }
|
|
126
|
+
return __awaiter(this, void 0, Promise, function () {
|
|
127
|
+
var createSeraphineGenesis, genesis;
|
|
128
|
+
return __generator(this, function (_a) {
|
|
129
|
+
switch (_a.label) {
|
|
130
|
+
case 0: return [4 /*yield*/, import('./models/seraphine.js')];
|
|
131
|
+
case 1:
|
|
132
|
+
createSeraphineGenesis = (_a.sent()).createSeraphineGenesis;
|
|
133
|
+
genesis = createSeraphineGenesis();
|
|
134
|
+
return [2 /*return*/, exportPatterns(genesis, options)];
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
});
|
|
90
138
|
}
|
|
91
139
|
/**
|
|
92
140
|
* Quick export to file
|
|
93
141
|
*/
|
|
94
|
-
export
|
|
95
|
-
return
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
142
|
+
export function quickExport(cfp, outputPath) {
|
|
143
|
+
return __awaiter(this, void 0, Promise, function () {
|
|
144
|
+
return __generator(this, function (_a) {
|
|
145
|
+
return [2 /*return*/, exportPatterns(cfp, {
|
|
146
|
+
output: outputPath,
|
|
147
|
+
format: 'json',
|
|
148
|
+
anonymize: 'standard'
|
|
149
|
+
})];
|
|
150
|
+
});
|
|
99
151
|
});
|
|
100
152
|
}
|
|
101
153
|
/**
|
|
102
154
|
* Quick export to IPFS
|
|
103
155
|
*/
|
|
104
|
-
export
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
156
|
+
export function quickExportToIPFS(cfp, options) {
|
|
157
|
+
var _a, _b;
|
|
158
|
+
if (options === void 0) { options = {}; }
|
|
159
|
+
return __awaiter(this, void 0, Promise, function () {
|
|
160
|
+
return __generator(this, function (_c) {
|
|
161
|
+
return [2 /*return*/, exportPatterns(cfp, {
|
|
162
|
+
toIpfs: true,
|
|
163
|
+
pin: (_a = options.pin) !== null && _a !== void 0 ? _a : true,
|
|
164
|
+
gateway: (_b = options.gateway) !== null && _b !== void 0 ? _b : 'https://w3s.link',
|
|
165
|
+
format: 'json',
|
|
166
|
+
anonymize: 'strict'
|
|
167
|
+
})];
|
|
168
|
+
});
|
|
111
169
|
});
|
|
112
170
|
}
|
|
113
171
|
//# sourceMappingURL=export.js.map
|