claude-flow-novice 1.3.6 → 1.5.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/analysis/code-analyzer.md +3 -20
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +1 -1
- package/.claude/agents/analyst.md +208 -550
- package/.claude/agents/architect.md +136 -469
- package/.claude/agents/architecture/system-architect.md +20 -1
- package/.claude/agents/architecture/system-design/arch-system-design.md +1 -1
- package/.claude/agents/base-template-generator.md +24 -1
- package/.claude/agents/coder.md +87 -303
- package/.claude/agents/consensus/byzantine-coordinator.md +4 -21
- package/.claude/agents/consensus/consensus-builder.md +3 -20
- package/.claude/agents/consensus/crdt-synchronizer.md +4 -21
- package/.claude/agents/consensus/gossip-coordinator.md +4 -21
- package/.claude/agents/consensus/performance-benchmarker.md +4 -21
- package/.claude/agents/consensus/quorum-manager.md +4 -21
- package/.claude/agents/consensus/raft-manager.md +4 -21
- package/.claude/agents/consensus/security-manager.md +4 -21
- package/.claude/agents/coordinator.md +22 -11
- package/.claude/agents/data/ml/data-ml-model.md +2 -2
- package/.claude/agents/development/backend/dev-backend-api.md +2 -2
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +2 -2
- package/.claude/agents/devops/devops-engineer.md +134 -402
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +2 -2
- package/.claude/agents/github/code-review-swarm.md +1 -1
- package/.claude/agents/github/github-specialist.md +856 -0
- package/.claude/agents/github/pr-manager.md +1 -1
- package/.claude/agents/github/release-manager.md +1 -1
- package/.claude/agents/neural/neural-pattern-agent.md +762 -0
- package/.claude/agents/optimization/benchmark-suite.md +1 -1
- package/.claude/agents/optimization/perf-analyzer.md +1 -1
- package/.claude/agents/optimization/performance-monitor.md +1 -1
- package/.claude/agents/planner.md +135 -0
- package/.claude/agents/researcher.md +22 -9
- package/.claude/agents/reviewer.md +291 -0
- package/.claude/agents/security/security-specialist.md +1 -1
- package/.claude/agents/sparc/architecture.md +1 -1
- package/.claude/agents/sparc/pseudocode.md +1 -1
- package/.claude/agents/sparc/refinement.md +1 -1
- package/.claude/agents/sparc/specification.md +1 -1
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +2 -2
- package/.claude/agents/tester.md +21 -11
- package/.claude/agents/testing/unit/tdd-london-swarm.md +1 -1
- package/.claude/agents/testing/validation/production-validator.md +1 -1
- package/.claude/commands/claude-soul.js +1 -1
- package/.claude/hooks.json +12 -15
- package/{.claude → .claude-flow-novice/.claude}/agents/MIGRATION_SUMMARY.md +1 -1
- package/.claude-flow-novice/.claude/agents/analysis/code-analyzer.md +192 -0
- package/.claude-flow-novice/.claude/agents/analysis/code-review/analyze-code-quality.md +180 -0
- package/.claude-flow-novice/.claude/agents/analyst.md +300 -0
- package/.claude-flow-novice/.claude/agents/architect.md +557 -0
- package/.claude-flow-novice/.claude/agents/architecture/system-architect.md +630 -0
- package/.claude-flow-novice/.claude/agents/architecture/system-design/arch-system-design.md +156 -0
- package/.claude-flow-novice/.claude/agents/base-template-generator.md +65 -0
- package/.claude-flow-novice/.claude/agents/coder.md +180 -0
- package/.claude-flow-novice/.claude/agents/consensus/byzantine-coordinator.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/consensus-builder.md +225 -0
- package/.claude-flow-novice/.claude/agents/consensus/crdt-synchronizer.md +980 -0
- package/.claude-flow-novice/.claude/agents/consensus/gossip-coordinator.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/performance-benchmarker.md +834 -0
- package/.claude-flow-novice/.claude/agents/consensus/quorum-manager.md +806 -0
- package/.claude-flow-novice/.claude/agents/consensus/raft-manager.md +46 -0
- package/.claude-flow-novice/.claude/agents/consensus/security-manager.md +605 -0
- package/.claude-flow-novice/.claude/agents/coordinator.md +842 -0
- package/.claude-flow-novice/.claude/agents/data/ml/data-ml-model.md +193 -0
- package/.claude-flow-novice/.claude/agents/development/backend/dev-backend-api.md +142 -0
- package/.claude-flow-novice/.claude/agents/devops/ci-cd/ops-cicd-github.md +164 -0
- package/.claude-flow-novice/.claude/agents/devops/devops-engineer.md +638 -0
- package/.claude-flow-novice/.claude/agents/documentation/api-docs/docs-api-openapi.md +174 -0
- package/.claude-flow-novice/.claude/agents/github/code-review-swarm.md +538 -0
- package/.claude-flow-novice/.claude/agents/github/github-modes.md +173 -0
- package/.claude-flow-novice/.claude/agents/github/github-specialist.md +856 -0
- package/.claude-flow-novice/.claude/agents/github/issue-tracker.md +319 -0
- package/.claude-flow-novice/.claude/agents/github/multi-repo-swarm.md +553 -0
- package/.claude-flow-novice/.claude/agents/github/pr-manager.md +191 -0
- package/.claude-flow-novice/.claude/agents/github/project-board-sync.md +509 -0
- package/.claude-flow-novice/.claude/agents/github/release-manager.md +367 -0
- package/.claude-flow-novice/.claude/agents/github/release-swarm.md +583 -0
- package/.claude-flow-novice/.claude/agents/github/repo-architect.md +398 -0
- package/.claude-flow-novice/.claude/agents/github/swarm-issue.md +573 -0
- package/.claude-flow-novice/.claude/agents/github/swarm-pr.md +428 -0
- package/.claude-flow-novice/.claude/agents/github/sync-coordinator.md +452 -0
- package/.claude-flow-novice/.claude/agents/github/workflow-automation.md +635 -0
- package/.claude-flow-novice/.claude/agents/goal/goal-planner.md +73 -0
- package/.claude-flow-novice/.claude/agents/neural/neural-pattern-agent.md +762 -0
- package/.claude-flow-novice/.claude/agents/neural/safla-neural.md +74 -0
- package/.claude-flow-novice/.claude/agents/optimization/benchmark-suite.md +665 -0
- package/.claude-flow-novice/.claude/agents/optimization/load-balancer.md +431 -0
- package/.claude-flow-novice/.claude/agents/optimization/perf-analyzer.md +725 -0
- package/.claude-flow-novice/.claude/agents/optimization/performance-monitor.md +672 -0
- package/.claude-flow-novice/.claude/agents/optimization/resource-allocator.md +674 -0
- package/.claude-flow-novice/.claude/agents/optimization/topology-optimizer.md +808 -0
- package/.claude-flow-novice/.claude/agents/planner.md +135 -0
- package/.claude-flow-novice/.claude/agents/researcher.md +185 -0
- package/.claude-flow-novice/.claude/agents/reviewer.md +291 -0
- package/.claude-flow-novice/.claude/agents/security/security-specialist.md +978 -0
- package/.claude-flow-novice/.claude/agents/sparc/architecture.md +472 -0
- package/.claude-flow-novice/.claude/agents/sparc/pseudocode.md +318 -0
- package/.claude-flow-novice/.claude/agents/sparc/refinement.md +525 -0
- package/.claude-flow-novice/.claude/agents/sparc/specification.md +276 -0
- package/.claude-flow-novice/.claude/agents/specialized/mobile/spec-mobile-react-native.md +226 -0
- package/.claude-flow-novice/.claude/agents/sublinear/consciousness-evolution-agent.md +499 -0
- package/.claude-flow-novice/.claude/agents/sublinear/matrix-solver-agent.md +113 -0
- package/.claude-flow-novice/.claude/agents/sublinear/nanosecond-scheduler-agent.md +644 -0
- package/.claude-flow-novice/.claude/agents/sublinear/pagerank-agent.md +699 -0
- package/.claude-flow-novice/.claude/agents/sublinear/phi-calculator-agent.md +749 -0
- package/.claude-flow-novice/.claude/agents/sublinear/psycho-symbolic-agent.md +543 -0
- package/.claude-flow-novice/.claude/agents/sublinear/sublinear.md +816 -0
- package/.claude-flow-novice/.claude/agents/sublinear/temporal-advantage-agent.md +360 -0
- package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator-enhanced.md +746 -0
- package/.claude-flow-novice/.claude/agents/swarm/adaptive-coordinator.md +396 -0
- package/.claude-flow-novice/.claude/agents/swarm/hierarchical-coordinator.md +300 -0
- package/.claude-flow-novice/.claude/agents/swarm/mesh-coordinator.md +435 -0
- package/.claude-flow-novice/.claude/agents/templates/automation-smart-agent.md +205 -0
- package/.claude-flow-novice/.claude/agents/templates/coordinator-swarm-init.md +90 -0
- package/.claude-flow-novice/.claude/agents/templates/github-pr-manager.md +177 -0
- package/.claude-flow-novice/.claude/agents/templates/implementer-sparc-coder.md +259 -0
- package/.claude-flow-novice/.claude/agents/templates/memory-coordinator.md +187 -0
- package/.claude-flow-novice/.claude/agents/templates/migration-plan.md +746 -0
- package/.claude-flow-novice/.claude/agents/templates/orchestrator-task.md +139 -0
- package/.claude-flow-novice/.claude/agents/templates/performance-analyzer.md +199 -0
- package/.claude-flow-novice/.claude/agents/templates/sparc-coordinator.md +183 -0
- package/.claude-flow-novice/.claude/agents/tester.md +663 -0
- package/.claude-flow-novice/.claude/agents/testing/e2e/playwright-agent.md +249 -0
- package/.claude-flow-novice/.claude/agents/testing/unit/tdd-london-swarm.md +244 -0
- package/.claude-flow-novice/.claude/agents/testing/validation/production-validator.md +395 -0
- package/.claude-flow-novice/dist/index.js +12 -24
- package/.claude-flow-novice/dist/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/agents/agent-manager.js +123 -69
- package/.claude-flow-novice/dist/src/agents/agent-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js +7 -7
- package/.claude-flow-novice/dist/src/agents/github/utils/hook-integration.js.map +1 -1
- package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js +485 -0
- package/.claude-flow-novice/dist/src/agents/stage3-integration-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js +630 -0
- package/.claude-flow-novice/dist/src/agents/unified-ultra-fast-agent-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/cli/commands/agent.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/agent.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/config-integration.js +6 -6
- package/.claude-flow-novice/dist/src/cli/commands/enterprise.js +18 -18
- package/.claude-flow-novice/dist/src/cli/commands/enterprise.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/goal-init.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/help-new.js +23 -23
- package/.claude-flow-novice/dist/src/cli/commands/help-new.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/help.js +74 -74
- package/.claude-flow-novice/dist/src/cli/commands/help.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js +2 -2
- package/.claude-flow-novice/dist/src/cli/commands/hive-mind/pause.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/hive.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/index.js +103 -132
- package/.claude-flow-novice/dist/src/cli/commands/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/mcp.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/migrate.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/migrate.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/monitor.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/neural-init.js +4 -4
- package/.claude-flow-novice/dist/src/cli/commands/ruv-swarm.js +8 -8
- package/.claude-flow-novice/dist/src/cli/commands/sparc.js +12 -12
- package/.claude-flow-novice/dist/src/cli/commands/sparc.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/start/start-command.js +3 -3
- package/.claude-flow-novice/dist/src/cli/commands/status.js +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/swarm.js +7 -7
- package/.claude-flow-novice/dist/src/cli/commands/swarm.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/verification.js +18 -18
- package/.claude-flow-novice/dist/src/cli/completion.js +54 -54
- package/.claude-flow-novice/dist/src/cli/completion.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js +11 -11
- package/.claude-flow-novice/dist/src/cli/consolidated/ConsolidatedCLI.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/core/CommandHandlers.js +31 -31
- package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js +39 -39
- package/.claude-flow-novice/dist/src/cli/consolidated/core/TierManager.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js +25 -25
- package/.claude-flow-novice/dist/src/cli/consolidated/help/InteractiveHelp.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js +8 -8
- package/.claude-flow-novice/dist/src/cli/consolidated/routing/CommandRouter.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js +6 -6
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/IntelligentDefaults.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js +7 -7
- package/.claude-flow-novice/dist/src/cli/consolidated/utils/PerformanceOptimizer.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/index-remote.js +10 -10
- package/.claude-flow-novice/dist/src/cli/index.js +1 -1
- package/.claude-flow-novice/dist/src/cli/init/directory-structure.js +8 -8
- package/.claude-flow-novice/dist/src/cli/init/index.js +3 -3
- package/.claude-flow-novice/dist/src/cli/init/sparc-environment.js +67 -67
- package/.claude-flow-novice/dist/src/cli/init/swarm-commands.js +18 -18
- package/.claude-flow-novice/dist/src/cli/node-repl.js +2 -2
- package/.claude-flow-novice/dist/src/cli/repl.js +1 -1
- package/.claude-flow-novice/dist/src/cli/simple-cli.js +68 -68
- package/.claude-flow-novice/dist/src/cli/simple-cli.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/simple-commands/session-start-soul.js +271 -0
- package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js +7 -7
- package/.claude-flow-novice/dist/src/cli/simple-orchestrator.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/ui/fallback-handler.js +7 -7
- package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js +816 -0
- package/.claude-flow-novice/dist/src/communication/enhanced-event-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js +812 -0
- package/.claude-flow-novice/dist/src/communication/failure-recovery-system.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/optimized-serialization.js +369 -0
- package/.claude-flow-novice/dist/src/communication/optimized-serialization.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/performance-optimizations.js +526 -0
- package/.claude-flow-novice/dist/src/communication/performance-optimizations.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/performance-validator.js +532 -0
- package/.claude-flow-novice/dist/src/communication/performance-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/priority-message-queue.js +525 -0
- package/.claude-flow-novice/dist/src/communication/priority-message-queue.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js +218 -0
- package/.claude-flow-novice/dist/src/communication/shared-buffer-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js +521 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-communication-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js +563 -0
- package/.claude-flow-novice/dist/src/communication/ultra-fast-serialization.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/websocket-cluster.js +344 -0
- package/.claude-flow-novice/dist/src/communication/websocket-cluster.js.map +1 -0
- package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js +369 -0
- package/.claude-flow-novice/dist/src/communication/zero-copy-structures.js.map +1 -0
- package/.claude-flow-novice/dist/src/config/config-manager.js +1 -1
- package/.claude-flow-novice/dist/src/config/config-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/core/intelligent-configuration-manager.js +1 -1
- package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js +6 -6
- package/.claude-flow-novice/dist/src/config/integration/hooks-integration.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/migration/config-migration.js +1 -1
- package/.claude-flow-novice/dist/src/config/ruv-swarm-integration.js +1 -1
- package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js +1 -1
- package/.claude-flow-novice/dist/src/config/utils/zero-config-setup.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/web-portal-config.js +0 -9
- package/.claude-flow-novice/dist/src/config/web-portal-config.js.map +1 -1
- package/.claude-flow-novice/dist/src/config/zero-config-setup.js +18 -18
- package/.claude-flow-novice/dist/src/config/zero-config-setup.js.map +1 -1
- package/.claude-flow-novice/dist/src/core/logger.js +33 -10
- package/.claude-flow-novice/dist/src/core/logger.js.map +1 -1
- package/.claude-flow-novice/dist/src/migration/index.js +1 -1
- package/.claude-flow-novice/dist/src/migration/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/migration/migration-runner.js +4 -4
- package/.claude-flow-novice/dist/src/migration/migration-runner.js.map +1 -1
- package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js +430 -0
- package/.claude-flow-novice/dist/src/monitoring/agent-health-monitor.js.map +1 -0
- package/.claude-flow-novice/dist/src/slash-commands/claude-soul.js +248 -365
- package/.claude-flow-novice/dist/src/slash-commands/register-all-commands.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/claude-code-interface.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/claude-flow-executor.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js +471 -0
- package/.claude-flow-novice/dist/src/swarm/consensus-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm/hive-mind-integration.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js +543 -0
- package/.claude-flow-novice/dist/src/swarm/large-scale-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm/optimizations/connection-pool.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/optimizations/optimized-executor.js +1 -1
- package/.claude-flow-novice/dist/src/swarm/types.js.map +1 -1
- package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js +709 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/integrations/communication-bridge.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js +612 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/api-contract-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js +679 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/backend-test-orchestrator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js +654 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/frontend-test-orchestrator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js +402 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/testing/visual-regression.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js +459 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/convergence-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js +513 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/fix-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js +19 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js +568 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/iterative-build-test.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js +418 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/regression-test-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js +530 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/test-result-analyzer.js.map +1 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js +250 -0
- package/.claude-flow-novice/dist/src/swarm-fullstack/workflows/workflow-metrics.js.map +1 -0
- package/.claude-flow-novice/dist/src/task/index.js +7 -7
- package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js +420 -0
- package/.claude-flow-novice/dist/src/validation/fullstack-integration-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/validation/production-validator.js +1435 -0
- package/.claude-flow-novice/dist/src/validation/production-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/verification/cli-integration.js +3 -3
- package/.claude-flow-novice/dist/src/verification/hooks.js +1 -1
- package/CHANGELOG.md +13 -0
- package/CLAUDE.md +1029 -68
- package/README.md +0 -1
- package/config/build/babel.config.cjs +19 -11
- package/config/typescript/tsconfig.json +1 -1
- package/examples/claude-api-error-handling.ts +2 -2
- package/examples/frontend-testing-demo.ts +470 -0
- package/examples/litellm/config/config.yaml +1 -1
- package/package.json +13 -7
- package/scripts/build/unified-builder.sh +6 -6
- package/scripts/build/validate-agents.js +238 -0
- package/scripts/run-production-validation.ts +590 -0
- package/scripts/test/test-coordination-features.ts +2 -2
- package/scripts/validate-stage3-performance.ts +377 -0
- package/src/cli/simple-commands/hooks.js +1 -0
- package/src/cli/simple-commands/init/agent-copier.js +0 -2
- package/src/cli/simple-commands/init/index.js +5 -97
- package/src/cli/simple-commands/init/templates/CLAUDE.md +162 -1158
- package/src/cli/simple-commands/init/templates/claude-md.js +38 -157
- package/src/swarm-fullstack/integrations/communication-bridge.ts +931 -0
- package/src/swarm-fullstack/testing/api-contract-validator.ts +909 -0
- package/src/swarm-fullstack/testing/backend-test-orchestrator.ts +791 -0
- package/src/swarm-fullstack/testing/frontend-test-orchestrator.ts +853 -0
- package/src/swarm-fullstack/testing/visual-regression.ts +507 -0
- package/src/swarm-fullstack/workflows/convergence-detector.ts +736 -0
- package/src/swarm-fullstack/workflows/fix-coordinator.ts +677 -0
- package/src/swarm-fullstack/workflows/index.ts +75 -0
- package/src/swarm-fullstack/workflows/iterative-build-test.ts +829 -0
- package/src/swarm-fullstack/workflows/regression-test-manager.ts +590 -0
- package/src/swarm-fullstack/workflows/test-result-analyzer.ts +739 -0
- package/src/swarm-fullstack/workflows/workflow-metrics.ts +399 -0
- package/wiki/command-reference/README.md +1 -2
- package/wiki/command-reference/mcp-tools/README.md +1 -1
- package/wiki/getting-started/claude-code-mcp/README.md +1 -2
- package/wiki/getting-started/installation/README.md +2 -10
- package/.claude/commands/flow-nexus/app-store.md +0 -124
- package/.claude/commands/flow-nexus/challenges.md +0 -120
- package/.claude/commands/flow-nexus/login-registration.md +0 -65
- package/.claude/commands/flow-nexus/neural-network.md +0 -134
- package/.claude/commands/flow-nexus/payments.md +0 -116
- package/.claude/commands/flow-nexus/sandbox.md +0 -83
- package/.claude/commands/flow-nexus/swarm.md +0 -87
- package/.claude/commands/flow-nexus/user-tools.md +0 -152
- package/.claude/commands/flow-nexus/workflow.md +0 -115
- package/.claude-flow-novice/dist/cli/index.js +0 -45
- package/.claude-flow-novice/dist/core/index.js +0 -22
- package/.claude-flow-novice/dist/mcp/mcp-server-novice.js +0 -595
- package/.claude-flow-novice/dist/mcp/mcp-server-sdk.js +0 -649
- package/.claude-flow-novice/dist/mcp/mcp-server-with-slash-commands.js +0 -776
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-md.js +0 -1101
- package/src/cli/simple-commands/init/templates/CLAUDE.md.optimized +0 -265
- /package/{.claude → .claude-flow-novice/.claude}/agents/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/backend-dev.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/code-analyzer.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/coder.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/consensus/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/coder.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/planner.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/researcher.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/reviewer.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/core/tester.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/optimization/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/planner.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/researcher.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/reviewer.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/swarm/README.md +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/system-architect.json +0 -0
- /package/{.claude → .claude-flow-novice/.claude}/agents/tester.json +0 -0
|
@@ -0,0 +1,563 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ultra-Fast Binary Serialization Protocol
|
|
3
|
+
* Custom binary encoding optimized for minimum latency
|
|
4
|
+
* Target: <50μs serialization time
|
|
5
|
+
*/ // Message type enumeration for compact encoding
|
|
6
|
+
export var MessageType = /*#__PURE__*/ function(MessageType) {
|
|
7
|
+
MessageType[MessageType["HEARTBEAT"] = 1] = "HEARTBEAT";
|
|
8
|
+
MessageType[MessageType["TASK_ASSIGNMENT"] = 2] = "TASK_ASSIGNMENT";
|
|
9
|
+
MessageType[MessageType["TASK_RESULT"] = 3] = "TASK_RESULT";
|
|
10
|
+
MessageType[MessageType["COORDINATION"] = 4] = "COORDINATION";
|
|
11
|
+
MessageType[MessageType["ERROR"] = 5] = "ERROR";
|
|
12
|
+
MessageType[MessageType["BATCH"] = 6] = "BATCH";
|
|
13
|
+
MessageType[MessageType["STREAM_START"] = 7] = "STREAM_START";
|
|
14
|
+
MessageType[MessageType["STREAM_DATA"] = 8] = "STREAM_DATA";
|
|
15
|
+
MessageType[MessageType["STREAM_END"] = 9] = "STREAM_END";
|
|
16
|
+
MessageType[MessageType["METRICS"] = 10] = "METRICS";
|
|
17
|
+
return MessageType;
|
|
18
|
+
}({});
|
|
19
|
+
// Compression flags
|
|
20
|
+
export var CompressionType = /*#__PURE__*/ function(CompressionType) {
|
|
21
|
+
CompressionType[CompressionType["NONE"] = 0] = "NONE";
|
|
22
|
+
CompressionType[CompressionType["ZSTD"] = 1] = "ZSTD";
|
|
23
|
+
CompressionType[CompressionType["LZ4"] = 2] = "LZ4";
|
|
24
|
+
CompressionType[CompressionType["SNAPPY"] = 3] = "SNAPPY";
|
|
25
|
+
return CompressionType;
|
|
26
|
+
}({});
|
|
27
|
+
// String interning pool for common values
|
|
28
|
+
let StringInternPool = class StringInternPool {
|
|
29
|
+
stringToId = new Map();
|
|
30
|
+
idToString = new Map();
|
|
31
|
+
nextId = 1;
|
|
32
|
+
// Pre-populate with common strings
|
|
33
|
+
constructor(){
|
|
34
|
+
this.prePopulateCommonStrings();
|
|
35
|
+
}
|
|
36
|
+
prePopulateCommonStrings() {
|
|
37
|
+
const commonStrings = [
|
|
38
|
+
'task',
|
|
39
|
+
'result',
|
|
40
|
+
'error',
|
|
41
|
+
'success',
|
|
42
|
+
'failure',
|
|
43
|
+
'agent',
|
|
44
|
+
'coordinator',
|
|
45
|
+
'worker',
|
|
46
|
+
'message',
|
|
47
|
+
'timestamp',
|
|
48
|
+
'id',
|
|
49
|
+
'type',
|
|
50
|
+
'payload',
|
|
51
|
+
'data',
|
|
52
|
+
'status',
|
|
53
|
+
'processing',
|
|
54
|
+
'completed',
|
|
55
|
+
'pending'
|
|
56
|
+
];
|
|
57
|
+
commonStrings.forEach((str)=>this.intern(str));
|
|
58
|
+
}
|
|
59
|
+
intern(str) {
|
|
60
|
+
let id = this.stringToId.get(str);
|
|
61
|
+
if (id === undefined) {
|
|
62
|
+
id = this.nextId++;
|
|
63
|
+
this.stringToId.set(str, id);
|
|
64
|
+
this.idToString.set(id, str);
|
|
65
|
+
}
|
|
66
|
+
return id;
|
|
67
|
+
}
|
|
68
|
+
getString(id) {
|
|
69
|
+
return this.idToString.get(id);
|
|
70
|
+
}
|
|
71
|
+
hasString(str) {
|
|
72
|
+
return this.stringToId.has(str);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
// Variable-length integer encoding for space efficiency
|
|
76
|
+
export class VarintEncoder {
|
|
77
|
+
static encode(value) {
|
|
78
|
+
const bytes = [];
|
|
79
|
+
let remaining = value;
|
|
80
|
+
while(remaining >= 0x80){
|
|
81
|
+
bytes.push(remaining & 0xFF | 0x80);
|
|
82
|
+
remaining >>>= 7;
|
|
83
|
+
}
|
|
84
|
+
bytes.push(remaining & 0xFF);
|
|
85
|
+
return new Uint8Array(bytes);
|
|
86
|
+
}
|
|
87
|
+
static decode(buffer, offset = 0) {
|
|
88
|
+
let value = 0;
|
|
89
|
+
let shift = 0;
|
|
90
|
+
let bytesRead = 0;
|
|
91
|
+
while(offset + bytesRead < buffer.length){
|
|
92
|
+
const byte = buffer[offset + bytesRead++];
|
|
93
|
+
value |= (byte & 0x7F) << shift;
|
|
94
|
+
if ((byte & 0x80) === 0) {
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
shift += 7;
|
|
98
|
+
if (shift >= 32) {
|
|
99
|
+
throw new Error('Varint too long');
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
value,
|
|
104
|
+
bytesRead
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
static encodeBigInt(value) {
|
|
108
|
+
const bytes = [];
|
|
109
|
+
let remaining = value;
|
|
110
|
+
while(remaining >= 0x80n){
|
|
111
|
+
bytes.push(Number(remaining & 0xFFn) | 0x80);
|
|
112
|
+
remaining >>= 7n;
|
|
113
|
+
}
|
|
114
|
+
bytes.push(Number(remaining & 0xFFn));
|
|
115
|
+
return new Uint8Array(bytes);
|
|
116
|
+
}
|
|
117
|
+
static decodeBigInt(buffer, offset = 0) {
|
|
118
|
+
let value = 0n;
|
|
119
|
+
let shift = 0n;
|
|
120
|
+
let bytesRead = 0;
|
|
121
|
+
while(offset + bytesRead < buffer.length){
|
|
122
|
+
const byte = buffer[offset + bytesRead++];
|
|
123
|
+
value |= BigInt(byte & 0x7F) << shift;
|
|
124
|
+
if ((byte & 0x80) === 0) {
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
shift += 7n;
|
|
128
|
+
if (shift >= 64n) {
|
|
129
|
+
throw new Error('BigInt varint too long');
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
value,
|
|
134
|
+
bytesRead
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
// High-performance binary encoder with zero-copy operations
|
|
139
|
+
export class UltraFastBinaryEncoder {
|
|
140
|
+
buffer;
|
|
141
|
+
view;
|
|
142
|
+
uint8View;
|
|
143
|
+
position = 0;
|
|
144
|
+
stringPool;
|
|
145
|
+
constructor(initialSize = 8192){
|
|
146
|
+
this.buffer = new ArrayBuffer(initialSize);
|
|
147
|
+
this.view = new DataView(this.buffer);
|
|
148
|
+
this.uint8View = new Uint8Array(this.buffer);
|
|
149
|
+
this.stringPool = new StringInternPool();
|
|
150
|
+
}
|
|
151
|
+
reset() {
|
|
152
|
+
this.position = 0;
|
|
153
|
+
}
|
|
154
|
+
ensureCapacity(additionalBytes) {
|
|
155
|
+
if (this.position + additionalBytes > this.buffer.byteLength) {
|
|
156
|
+
const newSize = Math.max(this.buffer.byteLength * 2, this.position + additionalBytes + 1024);
|
|
157
|
+
const newBuffer = new ArrayBuffer(newSize);
|
|
158
|
+
new Uint8Array(newBuffer).set(this.uint8View);
|
|
159
|
+
this.buffer = newBuffer;
|
|
160
|
+
this.view = new DataView(this.buffer);
|
|
161
|
+
this.uint8View = new Uint8Array(this.buffer);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
// Write message header
|
|
165
|
+
writeHeader(header) {
|
|
166
|
+
this.ensureCapacity(32); // Conservative estimate
|
|
167
|
+
this.view.setUint8(this.position++, 0xCF); // Magic
|
|
168
|
+
this.view.setUint8(this.position++, header.version);
|
|
169
|
+
this.view.setUint8(this.position++, header.type);
|
|
170
|
+
this.view.setUint8(this.position++, header.flags);
|
|
171
|
+
// Write payload length as varint
|
|
172
|
+
const lengthBytes = VarintEncoder.encode(header.payloadLength);
|
|
173
|
+
this.uint8View.set(lengthBytes, this.position);
|
|
174
|
+
this.position += lengthBytes.length;
|
|
175
|
+
// Write timestamp as little-endian uint64
|
|
176
|
+
this.view.setBigUint64(this.position, header.timestamp, true);
|
|
177
|
+
this.position += 8;
|
|
178
|
+
// Write correlation ID
|
|
179
|
+
this.view.setBigUint64(this.position, header.correlationId, true);
|
|
180
|
+
this.position += 8;
|
|
181
|
+
}
|
|
182
|
+
// Write optimized string (with interning)
|
|
183
|
+
writeString(str) {
|
|
184
|
+
if (this.stringPool.hasString(str)) {
|
|
185
|
+
// Write interned string marker and ID
|
|
186
|
+
this.ensureCapacity(6);
|
|
187
|
+
this.view.setUint8(this.position++, 0xFF); // Interned string marker
|
|
188
|
+
const id = this.stringPool.intern(str);
|
|
189
|
+
const idBytes = VarintEncoder.encode(id);
|
|
190
|
+
this.uint8View.set(idBytes, this.position);
|
|
191
|
+
this.position += idBytes.length;
|
|
192
|
+
} else {
|
|
193
|
+
// Write raw string
|
|
194
|
+
const encoded = new TextEncoder().encode(str);
|
|
195
|
+
this.ensureCapacity(encoded.length + 5);
|
|
196
|
+
const lengthBytes = VarintEncoder.encode(encoded.length);
|
|
197
|
+
this.uint8View.set(lengthBytes, this.position);
|
|
198
|
+
this.position += lengthBytes.length;
|
|
199
|
+
this.uint8View.set(encoded, this.position);
|
|
200
|
+
this.position += encoded.length;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
// Write various data types with type-specific optimizations
|
|
204
|
+
writeUint8(value) {
|
|
205
|
+
this.ensureCapacity(1);
|
|
206
|
+
this.view.setUint8(this.position++, value);
|
|
207
|
+
}
|
|
208
|
+
writeUint16(value) {
|
|
209
|
+
this.ensureCapacity(2);
|
|
210
|
+
this.view.setUint16(this.position, value, true); // Little endian
|
|
211
|
+
this.position += 2;
|
|
212
|
+
}
|
|
213
|
+
writeUint32(value) {
|
|
214
|
+
this.ensureCapacity(4);
|
|
215
|
+
this.view.setUint32(this.position, value, true);
|
|
216
|
+
this.position += 4;
|
|
217
|
+
}
|
|
218
|
+
writeUint64(value) {
|
|
219
|
+
this.ensureCapacity(8);
|
|
220
|
+
this.view.setBigUint64(this.position, value, true);
|
|
221
|
+
this.position += 8;
|
|
222
|
+
}
|
|
223
|
+
writeVarint(value) {
|
|
224
|
+
const bytes = VarintEncoder.encode(value);
|
|
225
|
+
this.ensureCapacity(bytes.length);
|
|
226
|
+
this.uint8View.set(bytes, this.position);
|
|
227
|
+
this.position += bytes.length;
|
|
228
|
+
}
|
|
229
|
+
writeVarintBigInt(value) {
|
|
230
|
+
const bytes = VarintEncoder.encodeBigInt(value);
|
|
231
|
+
this.ensureCapacity(bytes.length);
|
|
232
|
+
this.uint8View.set(bytes, this.position);
|
|
233
|
+
this.position += bytes.length;
|
|
234
|
+
}
|
|
235
|
+
writeFloat32(value) {
|
|
236
|
+
this.ensureCapacity(4);
|
|
237
|
+
this.view.setFloat32(this.position, value, true);
|
|
238
|
+
this.position += 4;
|
|
239
|
+
}
|
|
240
|
+
writeFloat64(value) {
|
|
241
|
+
this.ensureCapacity(8);
|
|
242
|
+
this.view.setFloat64(this.position, value, true);
|
|
243
|
+
this.position += 8;
|
|
244
|
+
}
|
|
245
|
+
writeBoolean(value) {
|
|
246
|
+
this.writeUint8(value ? 1 : 0);
|
|
247
|
+
}
|
|
248
|
+
// Write raw bytes (zero-copy for ArrayBuffer views)
|
|
249
|
+
writeBytes(data) {
|
|
250
|
+
const bytes = data instanceof ArrayBuffer ? new Uint8Array(data) : data;
|
|
251
|
+
this.ensureCapacity(bytes.length);
|
|
252
|
+
this.uint8View.set(bytes, this.position);
|
|
253
|
+
this.position += bytes.length;
|
|
254
|
+
}
|
|
255
|
+
// Write array with length prefix
|
|
256
|
+
writeArray(array, writer) {
|
|
257
|
+
this.writeVarint(array.length);
|
|
258
|
+
array.forEach(writer);
|
|
259
|
+
}
|
|
260
|
+
// Write map with length prefix
|
|
261
|
+
writeMap(map, keyWriter, valueWriter) {
|
|
262
|
+
this.writeVarint(map.size);
|
|
263
|
+
for (const [key, value] of map){
|
|
264
|
+
keyWriter(key);
|
|
265
|
+
valueWriter(value);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
// Get final encoded buffer (zero-copy slice)
|
|
269
|
+
getBuffer() {
|
|
270
|
+
return this.buffer.slice(0, this.position);
|
|
271
|
+
}
|
|
272
|
+
getUint8Array() {
|
|
273
|
+
return new Uint8Array(this.buffer, 0, this.position);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
// High-performance binary decoder with minimal allocations
|
|
277
|
+
export class UltraFastBinaryDecoder {
|
|
278
|
+
view;
|
|
279
|
+
uint8View;
|
|
280
|
+
position = 0;
|
|
281
|
+
stringPool;
|
|
282
|
+
constructor(buffer){
|
|
283
|
+
if (buffer instanceof Uint8Array) {
|
|
284
|
+
this.view = new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
285
|
+
this.uint8View = buffer;
|
|
286
|
+
} else {
|
|
287
|
+
this.view = new DataView(buffer);
|
|
288
|
+
this.uint8View = new Uint8Array(buffer);
|
|
289
|
+
}
|
|
290
|
+
this.stringPool = new StringInternPool();
|
|
291
|
+
}
|
|
292
|
+
reset(position = 0) {
|
|
293
|
+
this.position = position;
|
|
294
|
+
}
|
|
295
|
+
// Read message header
|
|
296
|
+
readHeader() {
|
|
297
|
+
const magic = this.view.getUint8(this.position++);
|
|
298
|
+
if (magic !== 0xCF) {
|
|
299
|
+
throw new Error(`Invalid magic byte: expected 0xCF, got 0x${magic.toString(16)}`);
|
|
300
|
+
}
|
|
301
|
+
const version = this.view.getUint8(this.position++);
|
|
302
|
+
const type = this.view.getUint8(this.position++);
|
|
303
|
+
const flags = this.view.getUint8(this.position++);
|
|
304
|
+
const { value: payloadLength, bytesRead } = VarintEncoder.decode(this.uint8View, this.position);
|
|
305
|
+
this.position += bytesRead;
|
|
306
|
+
const timestamp = this.view.getBigUint64(this.position, true);
|
|
307
|
+
this.position += 8;
|
|
308
|
+
const correlationId = this.view.getBigUint64(this.position, true);
|
|
309
|
+
this.position += 8;
|
|
310
|
+
return {
|
|
311
|
+
magic: 0xCF,
|
|
312
|
+
version,
|
|
313
|
+
type,
|
|
314
|
+
flags,
|
|
315
|
+
payloadLength,
|
|
316
|
+
timestamp,
|
|
317
|
+
correlationId
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
// Read optimized string (with interning support)
|
|
321
|
+
readString() {
|
|
322
|
+
const firstByte = this.view.getUint8(this.position);
|
|
323
|
+
if (firstByte === 0xFF) {
|
|
324
|
+
// Interned string
|
|
325
|
+
this.position++;
|
|
326
|
+
const { value: id, bytesRead } = VarintEncoder.decode(this.uint8View, this.position);
|
|
327
|
+
this.position += bytesRead;
|
|
328
|
+
const str = this.stringPool.getString(id);
|
|
329
|
+
if (str === undefined) {
|
|
330
|
+
throw new Error(`Unknown interned string ID: ${id}`);
|
|
331
|
+
}
|
|
332
|
+
return str;
|
|
333
|
+
} else {
|
|
334
|
+
// Raw string
|
|
335
|
+
const { value: length, bytesRead } = VarintEncoder.decode(this.uint8View, this.position);
|
|
336
|
+
this.position += bytesRead;
|
|
337
|
+
const bytes = this.uint8View.slice(this.position, this.position + length);
|
|
338
|
+
this.position += length;
|
|
339
|
+
return new TextDecoder().decode(bytes);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
// Read various data types
|
|
343
|
+
readUint8() {
|
|
344
|
+
return this.view.getUint8(this.position++);
|
|
345
|
+
}
|
|
346
|
+
readUint16() {
|
|
347
|
+
const value = this.view.getUint16(this.position, true);
|
|
348
|
+
this.position += 2;
|
|
349
|
+
return value;
|
|
350
|
+
}
|
|
351
|
+
readUint32() {
|
|
352
|
+
const value = this.view.getUint32(this.position, true);
|
|
353
|
+
this.position += 4;
|
|
354
|
+
return value;
|
|
355
|
+
}
|
|
356
|
+
readUint64() {
|
|
357
|
+
const value = this.view.getBigUint64(this.position, true);
|
|
358
|
+
this.position += 8;
|
|
359
|
+
return value;
|
|
360
|
+
}
|
|
361
|
+
readVarint() {
|
|
362
|
+
const { value, bytesRead } = VarintEncoder.decode(this.uint8View, this.position);
|
|
363
|
+
this.position += bytesRead;
|
|
364
|
+
return value;
|
|
365
|
+
}
|
|
366
|
+
readVarintBigInt() {
|
|
367
|
+
const { value, bytesRead } = VarintEncoder.decodeBigInt(this.uint8View, this.position);
|
|
368
|
+
this.position += bytesRead;
|
|
369
|
+
return value;
|
|
370
|
+
}
|
|
371
|
+
readFloat32() {
|
|
372
|
+
const value = this.view.getFloat32(this.position, true);
|
|
373
|
+
this.position += 4;
|
|
374
|
+
return value;
|
|
375
|
+
}
|
|
376
|
+
readFloat64() {
|
|
377
|
+
const value = this.view.getFloat64(this.position, true);
|
|
378
|
+
this.position += 8;
|
|
379
|
+
return value;
|
|
380
|
+
}
|
|
381
|
+
readBoolean() {
|
|
382
|
+
return this.readUint8() === 1;
|
|
383
|
+
}
|
|
384
|
+
// Read raw bytes (zero-copy slice)
|
|
385
|
+
readBytes(length) {
|
|
386
|
+
const bytes = this.uint8View.slice(this.position, this.position + length);
|
|
387
|
+
this.position += length;
|
|
388
|
+
return bytes;
|
|
389
|
+
}
|
|
390
|
+
// Read array with length prefix
|
|
391
|
+
readArray(reader) {
|
|
392
|
+
const length = this.readVarint();
|
|
393
|
+
const array = new Array(length);
|
|
394
|
+
for(let i = 0; i < length; i++){
|
|
395
|
+
array[i] = reader();
|
|
396
|
+
}
|
|
397
|
+
return array;
|
|
398
|
+
}
|
|
399
|
+
// Read map with length prefix
|
|
400
|
+
readMap(keyReader, valueReader) {
|
|
401
|
+
const size = this.readVarint();
|
|
402
|
+
const map = new Map();
|
|
403
|
+
for(let i = 0; i < size; i++){
|
|
404
|
+
const key = keyReader();
|
|
405
|
+
const value = valueReader();
|
|
406
|
+
map.set(key, value);
|
|
407
|
+
}
|
|
408
|
+
return map;
|
|
409
|
+
}
|
|
410
|
+
// Check if more data is available
|
|
411
|
+
hasMore() {
|
|
412
|
+
return this.position < this.uint8View.length;
|
|
413
|
+
}
|
|
414
|
+
// Get remaining bytes
|
|
415
|
+
remaining() {
|
|
416
|
+
return this.uint8View.length - this.position;
|
|
417
|
+
}
|
|
418
|
+
// Skip bytes
|
|
419
|
+
skip(count) {
|
|
420
|
+
this.position = Math.min(this.position + count, this.uint8View.length);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
// Message serialization utilities
|
|
424
|
+
export class MessageSerializer {
|
|
425
|
+
static encoder = new UltraFastBinaryEncoder();
|
|
426
|
+
static serialize(type, payload, correlationId) {
|
|
427
|
+
this.encoder.reset();
|
|
428
|
+
// Serialize payload first to get its length
|
|
429
|
+
const payloadStart = this.encoder.position;
|
|
430
|
+
this.serializePayload(payload, type);
|
|
431
|
+
const payloadLength = this.encoder.position - payloadStart;
|
|
432
|
+
// Create and insert header
|
|
433
|
+
const header = {
|
|
434
|
+
magic: 0xCF,
|
|
435
|
+
version: 1,
|
|
436
|
+
type,
|
|
437
|
+
flags: 0,
|
|
438
|
+
payloadLength,
|
|
439
|
+
timestamp: BigInt(Math.floor(performance.now() * 1000000)),
|
|
440
|
+
correlationId: correlationId || BigInt(Date.now()) * 1000000n + BigInt(Math.random() * 1000000)
|
|
441
|
+
};
|
|
442
|
+
// Move payload and insert header at the beginning
|
|
443
|
+
const payloadBytes = this.encoder.getUint8Array().slice(payloadStart);
|
|
444
|
+
this.encoder.reset();
|
|
445
|
+
this.encoder.writeHeader(header);
|
|
446
|
+
this.encoder.writeBytes(payloadBytes);
|
|
447
|
+
return this.encoder.getBuffer();
|
|
448
|
+
}
|
|
449
|
+
static serializePayload(payload, type) {
|
|
450
|
+
switch(type){
|
|
451
|
+
case 2:
|
|
452
|
+
this.serializeTaskAssignment(payload);
|
|
453
|
+
break;
|
|
454
|
+
case 3:
|
|
455
|
+
this.serializeTaskResult(payload);
|
|
456
|
+
break;
|
|
457
|
+
case 4:
|
|
458
|
+
this.serializeCoordination(payload);
|
|
459
|
+
break;
|
|
460
|
+
case 1:
|
|
461
|
+
this.serializeHeartbeat(payload);
|
|
462
|
+
break;
|
|
463
|
+
default:
|
|
464
|
+
// Generic object serialization
|
|
465
|
+
this.serializeGeneric(payload);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
static serializeTaskAssignment(task) {
|
|
469
|
+
this.encoder.writeString(task.id || '');
|
|
470
|
+
this.encoder.writeString(task.type || '');
|
|
471
|
+
this.encoder.writeString(task.agent || '');
|
|
472
|
+
this.encoder.writeVarintBigInt(task.timestamp || 0n);
|
|
473
|
+
this.encoder.writeString(JSON.stringify(task.data || {}));
|
|
474
|
+
this.encoder.writeUint8(task.priority || 0);
|
|
475
|
+
}
|
|
476
|
+
static serializeTaskResult(result) {
|
|
477
|
+
this.encoder.writeString(result.taskId || '');
|
|
478
|
+
this.encoder.writeBoolean(result.success || false);
|
|
479
|
+
this.encoder.writeString(JSON.stringify(result.data || {}));
|
|
480
|
+
this.encoder.writeString(result.error || '');
|
|
481
|
+
this.encoder.writeVarintBigInt(result.executionTime || 0n);
|
|
482
|
+
}
|
|
483
|
+
static serializeCoordination(coord) {
|
|
484
|
+
this.encoder.writeString(coord.command || '');
|
|
485
|
+
this.encoder.writeArray(coord.agents || [], (agent)=>this.encoder.writeString(agent));
|
|
486
|
+
this.encoder.writeString(JSON.stringify(coord.parameters || {}));
|
|
487
|
+
}
|
|
488
|
+
static serializeHeartbeat(heartbeat) {
|
|
489
|
+
this.encoder.writeString(heartbeat.agentId || '');
|
|
490
|
+
this.encoder.writeVarintBigInt(heartbeat.timestamp || 0n);
|
|
491
|
+
this.encoder.writeFloat32(heartbeat.cpuUsage || 0);
|
|
492
|
+
this.encoder.writeFloat32(heartbeat.memoryUsage || 0);
|
|
493
|
+
this.encoder.writeUint32(heartbeat.messageCount || 0);
|
|
494
|
+
}
|
|
495
|
+
static serializeGeneric(obj) {
|
|
496
|
+
// Fallback to JSON with compression for complex objects
|
|
497
|
+
const json = JSON.stringify(obj);
|
|
498
|
+
this.encoder.writeString(json);
|
|
499
|
+
}
|
|
500
|
+
static deserialize(buffer) {
|
|
501
|
+
const decoder = new UltraFastBinaryDecoder(buffer);
|
|
502
|
+
const header = decoder.readHeader();
|
|
503
|
+
const payload = this.deserializePayload(decoder, header.type);
|
|
504
|
+
return {
|
|
505
|
+
header,
|
|
506
|
+
payload
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
static deserializePayload(decoder, type) {
|
|
510
|
+
switch(type){
|
|
511
|
+
case 2:
|
|
512
|
+
return this.deserializeTaskAssignment(decoder);
|
|
513
|
+
case 3:
|
|
514
|
+
return this.deserializeTaskResult(decoder);
|
|
515
|
+
case 4:
|
|
516
|
+
return this.deserializeCoordination(decoder);
|
|
517
|
+
case 1:
|
|
518
|
+
return this.deserializeHeartbeat(decoder);
|
|
519
|
+
default:
|
|
520
|
+
return this.deserializeGeneric(decoder);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
static deserializeTaskAssignment(decoder) {
|
|
524
|
+
return {
|
|
525
|
+
id: decoder.readString(),
|
|
526
|
+
type: decoder.readString(),
|
|
527
|
+
agent: decoder.readString(),
|
|
528
|
+
timestamp: decoder.readVarintBigInt(),
|
|
529
|
+
data: JSON.parse(decoder.readString()),
|
|
530
|
+
priority: decoder.readUint8()
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
static deserializeTaskResult(decoder) {
|
|
534
|
+
return {
|
|
535
|
+
taskId: decoder.readString(),
|
|
536
|
+
success: decoder.readBoolean(),
|
|
537
|
+
data: JSON.parse(decoder.readString()),
|
|
538
|
+
error: decoder.readString(),
|
|
539
|
+
executionTime: decoder.readVarintBigInt()
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
static deserializeCoordination(decoder) {
|
|
543
|
+
return {
|
|
544
|
+
command: decoder.readString(),
|
|
545
|
+
agents: decoder.readArray(()=>decoder.readString()),
|
|
546
|
+
parameters: JSON.parse(decoder.readString())
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
static deserializeHeartbeat(decoder) {
|
|
550
|
+
return {
|
|
551
|
+
agentId: decoder.readString(),
|
|
552
|
+
timestamp: decoder.readVarintBigInt(),
|
|
553
|
+
cpuUsage: decoder.readFloat32(),
|
|
554
|
+
memoryUsage: decoder.readFloat32(),
|
|
555
|
+
messageCount: decoder.readUint32()
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
static deserializeGeneric(decoder) {
|
|
559
|
+
return JSON.parse(decoder.readString());
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
//# sourceMappingURL=ultra-fast-serialization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/communication/ultra-fast-serialization.ts"],"names":["MessageType","CompressionType","StringInternPool","stringToId","Map","idToString","nextId","prePopulateCommonStrings","commonStrings","forEach","str","intern","id","get","undefined","set","getString","hasString","has","VarintEncoder","encode","value","bytes","remaining","push","Uint8Array","decode","buffer","offset","shift","bytesRead","length","byte","Error","encodeBigInt","Number","decodeBigInt","BigInt","UltraFastBinaryEncoder","view","uint8View","position","stringPool","initialSize","ArrayBuffer","DataView","reset","ensureCapacity","additionalBytes","byteLength","newSize","Math","max","newBuffer","writeHeader","header","setUint8","version","type","flags","lengthBytes","payloadLength","setBigUint64","timestamp","correlationId","writeString","idBytes","encoded","TextEncoder","writeUint8","writeUint16","setUint16","writeUint32","setUint32","writeUint64","writeVarint","writeVarintBigInt","writeFloat32","setFloat32","writeFloat64","setFloat64","writeBoolean","writeBytes","data","writeArray","array","writer","writeMap","map","keyWriter","valueWriter","size","key","getBuffer","slice","getUint8Array","UltraFastBinaryDecoder","byteOffset","readHeader","magic","getUint8","toString","getBigUint64","readString","firstByte","TextDecoder","readUint8","readUint16","getUint16","readUint32","getUint32","readUint64","readVarint","readVarintBigInt","readFloat32","getFloat32","readFloat64","getFloat64","readBoolean","readBytes","readArray","reader","Array","i","readMap","keyReader","valueReader","hasMore","skip","count","min","MessageSerializer","encoder","serialize","payload","payloadStart","serializePayload","floor","performance","now","Date","random","payloadBytes","serializeTaskAssignment","serializeTaskResult","serializeCoordination","serializeHeartbeat","serializeGeneric","task","agent","JSON","stringify","priority","result","taskId","success","error","executionTime","coord","command","agents","parameters","heartbeat","agentId","cpuUsage","memoryUsage","messageCount","obj","json","deserialize","decoder","deserializePayload","deserializeTaskAssignment","deserializeTaskResult","deserializeCoordination","deserialize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