agentic-flow 2.0.1-alpha.5 → 2.0.1-alpha.50
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/settings.json +133 -9
- package/.claude/skills/worker-benchmarks/skill.md +135 -0
- package/.claude/skills/worker-integration/skill.md +154 -0
- package/README.md +131 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/agentdb/controllers/EmbeddingService.d.ts +37 -0
- package/dist/agentdb/controllers/EmbeddingService.d.ts.map +1 -0
- package/dist/agentdb/controllers/EmbeddingService.js +1 -0
- package/dist/agentdb/controllers/EmbeddingService.js.map +1 -0
- package/dist/benchmarks/embeddings-benchmark.d.ts +37 -0
- package/dist/benchmarks/embeddings-benchmark.d.ts.map +1 -0
- package/dist/benchmarks/embeddings-benchmark.js +282 -0
- package/dist/benchmarks/embeddings-benchmark.js.map +1 -0
- package/dist/cli/commands/embeddings.d.ts +12 -0
- package/dist/cli/commands/embeddings.d.ts.map +1 -0
- package/dist/cli/commands/embeddings.js +386 -0
- package/dist/cli/commands/embeddings.js.map +1 -0
- package/dist/cli/commands/hooks.d.ts +18 -0
- package/dist/cli/commands/hooks.d.ts.map +1 -0
- package/dist/cli/commands/hooks.js +973 -0
- package/dist/cli/commands/hooks.js.map +1 -0
- package/dist/cli/commands/swarm.d.ts +17 -0
- package/dist/cli/commands/swarm.d.ts.map +1 -0
- package/dist/cli/commands/swarm.js +325 -0
- package/dist/cli/commands/swarm.js.map +1 -0
- package/dist/cli/commands/workers.d.ts +9 -0
- package/dist/cli/commands/workers.d.ts.map +1 -0
- package/dist/cli/commands/workers.js +957 -0
- package/dist/cli/commands/workers.js.map +1 -0
- package/dist/cli-proxy.js +56 -1
- package/dist/cli-proxy.js.map +1 -1
- package/dist/embeddings/index.d.ts +17 -0
- package/dist/embeddings/index.d.ts.map +1 -0
- package/dist/embeddings/index.js +17 -0
- package/dist/embeddings/index.js.map +1 -0
- package/dist/embeddings/neural-substrate.d.ts +206 -0
- package/dist/embeddings/neural-substrate.d.ts.map +1 -0
- package/dist/embeddings/neural-substrate.js +629 -0
- package/dist/embeddings/neural-substrate.js.map +1 -0
- package/dist/embeddings/optimized-embedder.d.ts +103 -0
- package/dist/embeddings/optimized-embedder.d.ts.map +1 -0
- package/dist/embeddings/optimized-embedder.js +729 -0
- package/dist/embeddings/optimized-embedder.js.map +1 -0
- package/dist/examples/embedding-geometry.d.ts +105 -0
- package/dist/examples/embedding-geometry.d.ts.map +1 -0
- package/dist/examples/embedding-geometry.js +528 -0
- package/dist/examples/embedding-geometry.js.map +1 -0
- package/dist/hooks/p2p-swarm-hooks.d.ts +105 -0
- package/dist/hooks/p2p-swarm-hooks.d.ts.map +1 -0
- package/dist/hooks/p2p-swarm-hooks.js +260 -0
- package/dist/hooks/p2p-swarm-hooks.js.map +1 -0
- package/dist/intelligence/EmbeddingCache.d.ts +112 -0
- package/dist/intelligence/EmbeddingCache.d.ts.map +1 -0
- package/dist/intelligence/EmbeddingCache.js +624 -0
- package/dist/intelligence/EmbeddingCache.js.map +1 -0
- package/dist/intelligence/EmbeddingService.d.ts +380 -0
- package/dist/intelligence/EmbeddingService.d.ts.map +1 -0
- package/dist/intelligence/EmbeddingService.js +1484 -0
- package/dist/intelligence/EmbeddingService.js.map +1 -0
- package/dist/intelligence/IntelligenceStore.d.ts +168 -0
- package/dist/intelligence/IntelligenceStore.d.ts.map +1 -0
- package/dist/intelligence/IntelligenceStore.js +364 -0
- package/dist/intelligence/IntelligenceStore.js.map +1 -0
- package/dist/intelligence/RuVectorIntelligence.d.ts +362 -0
- package/dist/intelligence/RuVectorIntelligence.d.ts.map +1 -0
- package/dist/intelligence/RuVectorIntelligence.js +853 -0
- package/dist/intelligence/RuVectorIntelligence.js.map +1 -0
- package/dist/intelligence/agent-booster-enhanced.d.ts +299 -0
- package/dist/intelligence/agent-booster-enhanced.d.ts.map +1 -0
- package/dist/intelligence/agent-booster-enhanced.js +1122 -0
- package/dist/intelligence/agent-booster-enhanced.js.map +1 -0
- package/dist/intelligence/embedding-benchmark.d.ts +7 -0
- package/dist/intelligence/embedding-benchmark.d.ts.map +1 -0
- package/dist/intelligence/embedding-benchmark.js +155 -0
- package/dist/intelligence/embedding-benchmark.js.map +1 -0
- package/dist/intelligence/index.d.ts +21 -0
- package/dist/intelligence/index.d.ts.map +1 -0
- package/dist/intelligence/index.js +28 -0
- package/dist/intelligence/index.js.map +1 -0
- package/dist/intelligence/wasm-acceleration.d.ts +168 -0
- package/dist/intelligence/wasm-acceleration.d.ts.map +1 -0
- package/dist/intelligence/wasm-acceleration.js +303 -0
- package/dist/intelligence/wasm-acceleration.js.map +1 -0
- package/dist/llm/RuvLLMOrchestrator.d.ts +184 -0
- package/dist/llm/RuvLLMOrchestrator.d.ts.map +1 -0
- package/dist/llm/RuvLLMOrchestrator.js +442 -0
- package/dist/llm/RuvLLMOrchestrator.js.map +1 -0
- package/dist/llm/index.d.ts +9 -0
- package/dist/llm/index.d.ts.map +1 -0
- package/dist/llm/index.js +8 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/mcp/fastmcp/servers/hooks-server.d.ts +15 -0
- package/dist/mcp/fastmcp/servers/hooks-server.d.ts.map +1 -0
- package/dist/mcp/fastmcp/servers/hooks-server.js +63 -0
- package/dist/mcp/fastmcp/servers/hooks-server.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/benchmark.d.ts +20 -0
- package/dist/mcp/fastmcp/tools/hooks/benchmark.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/benchmark.js +110 -0
- package/dist/mcp/fastmcp/tools/hooks/benchmark.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/build-agents.d.ts +7 -0
- package/dist/mcp/fastmcp/tools/hooks/build-agents.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/build-agents.js +276 -0
- package/dist/mcp/fastmcp/tools/hooks/build-agents.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/explain.d.ts +6 -0
- package/dist/mcp/fastmcp/tools/hooks/explain.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/explain.js +164 -0
- package/dist/mcp/fastmcp/tools/hooks/explain.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/index.d.ts +28 -0
- package/dist/mcp/fastmcp/tools/hooks/index.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/index.js +59 -0
- package/dist/mcp/fastmcp/tools/hooks/index.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/intelligence-bridge.d.ts +362 -0
- package/dist/mcp/fastmcp/tools/hooks/intelligence-bridge.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/intelligence-bridge.js +1038 -0
- package/dist/mcp/fastmcp/tools/hooks/intelligence-bridge.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/intelligence-tools.d.ts +58 -0
- package/dist/mcp/fastmcp/tools/hooks/intelligence-tools.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/intelligence-tools.js +425 -0
- package/dist/mcp/fastmcp/tools/hooks/intelligence-tools.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/metrics.d.ts +6 -0
- package/dist/mcp/fastmcp/tools/hooks/metrics.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/metrics.js +137 -0
- package/dist/mcp/fastmcp/tools/hooks/metrics.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/post-command.d.ts +7 -0
- package/dist/mcp/fastmcp/tools/hooks/post-command.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/post-command.js +91 -0
- package/dist/mcp/fastmcp/tools/hooks/post-command.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/post-edit.d.ts +12 -0
- package/dist/mcp/fastmcp/tools/hooks/post-edit.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/post-edit.js +146 -0
- package/dist/mcp/fastmcp/tools/hooks/post-edit.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/pre-command.d.ts +7 -0
- package/dist/mcp/fastmcp/tools/hooks/pre-command.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/pre-command.js +70 -0
- package/dist/mcp/fastmcp/tools/hooks/pre-command.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/pre-edit.d.ts +14 -0
- package/dist/mcp/fastmcp/tools/hooks/pre-edit.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/pre-edit.js +121 -0
- package/dist/mcp/fastmcp/tools/hooks/pre-edit.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/pretrain.d.ts +7 -0
- package/dist/mcp/fastmcp/tools/hooks/pretrain.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/pretrain.js +171 -0
- package/dist/mcp/fastmcp/tools/hooks/pretrain.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/route.d.ts +12 -0
- package/dist/mcp/fastmcp/tools/hooks/route.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/route.js +267 -0
- package/dist/mcp/fastmcp/tools/hooks/route.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/shared.d.ts +46 -0
- package/dist/mcp/fastmcp/tools/hooks/shared.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/shared.js +159 -0
- package/dist/mcp/fastmcp/tools/hooks/shared.js.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/transfer.d.ts +7 -0
- package/dist/mcp/fastmcp/tools/hooks/transfer.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/hooks/transfer.js +151 -0
- package/dist/mcp/fastmcp/tools/hooks/transfer.js.map +1 -0
- package/dist/mcp/fastmcp/tools/swarm/p2p-swarm-tools.d.ts +650 -0
- package/dist/mcp/fastmcp/tools/swarm/p2p-swarm-tools.d.ts.map +1 -0
- package/dist/mcp/fastmcp/tools/swarm/p2p-swarm-tools.js +405 -0
- package/dist/mcp/fastmcp/tools/swarm/p2p-swarm-tools.js.map +1 -0
- package/dist/mcp/tools/enhanced-booster-tools.d.ts +653 -0
- package/dist/mcp/tools/enhanced-booster-tools.d.ts.map +1 -0
- package/dist/mcp/tools/enhanced-booster-tools.js +470 -0
- package/dist/mcp/tools/enhanced-booster-tools.js.map +1 -0
- package/dist/memory/SharedMemoryPool.d.ts +16 -3
- package/dist/memory/SharedMemoryPool.d.ts.map +1 -1
- package/dist/memory/SharedMemoryPool.js +33 -1
- package/dist/memory/SharedMemoryPool.js.map +1 -1
- package/dist/middleware/auth.middleware.d.ts +122 -0
- package/dist/middleware/auth.middleware.d.ts.map +1 -0
- package/dist/middleware/auth.middleware.js +260 -0
- package/dist/middleware/auth.middleware.js.map +1 -0
- package/dist/routing/CircuitBreakerRouter.d.ts +187 -0
- package/dist/routing/CircuitBreakerRouter.d.ts.map +1 -0
- package/dist/routing/CircuitBreakerRouter.js +460 -0
- package/dist/routing/CircuitBreakerRouter.js.map +1 -0
- package/dist/routing/SemanticRouter.d.ts +164 -0
- package/dist/routing/SemanticRouter.d.ts.map +1 -0
- package/dist/routing/SemanticRouter.js +291 -0
- package/dist/routing/SemanticRouter.js.map +1 -0
- package/dist/routing/TinyDancerRouter.d.ts +161 -0
- package/dist/routing/TinyDancerRouter.d.ts.map +1 -0
- package/dist/routing/TinyDancerRouter.js +408 -0
- package/dist/routing/TinyDancerRouter.js.map +1 -0
- package/dist/routing/index.d.ts +12 -0
- package/dist/routing/index.d.ts.map +1 -0
- package/dist/routing/index.js +10 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/sdk/agent-converter.d.ts +41 -0
- package/dist/sdk/agent-converter.d.ts.map +1 -0
- package/dist/sdk/agent-converter.js +188 -0
- package/dist/sdk/agent-converter.js.map +1 -0
- package/dist/sdk/e2b-sandbox.d.ts +105 -0
- package/dist/sdk/e2b-sandbox.d.ts.map +1 -0
- package/dist/sdk/e2b-sandbox.js +419 -0
- package/dist/sdk/e2b-sandbox.js.map +1 -0
- package/dist/sdk/e2b-swarm-optimizer.d.ts +116 -0
- package/dist/sdk/e2b-swarm-optimizer.d.ts.map +1 -0
- package/dist/sdk/e2b-swarm-optimizer.js +253 -0
- package/dist/sdk/e2b-swarm-optimizer.js.map +1 -0
- package/dist/sdk/e2b-swarm.d.ts +160 -0
- package/dist/sdk/e2b-swarm.d.ts.map +1 -0
- package/dist/sdk/e2b-swarm.js +366 -0
- package/dist/sdk/e2b-swarm.js.map +1 -0
- package/dist/sdk/hooks-bridge.d.ts +109 -0
- package/dist/sdk/hooks-bridge.d.ts.map +1 -0
- package/dist/sdk/hooks-bridge.js +235 -0
- package/dist/sdk/hooks-bridge.js.map +1 -0
- package/dist/sdk/index.d.ts +17 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +28 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/permission-handler.d.ts +53 -0
- package/dist/sdk/permission-handler.d.ts.map +1 -0
- package/dist/sdk/permission-handler.js +229 -0
- package/dist/sdk/permission-handler.js.map +1 -0
- package/dist/sdk/plugins.d.ts +102 -0
- package/dist/sdk/plugins.d.ts.map +1 -0
- package/dist/sdk/plugins.js +279 -0
- package/dist/sdk/plugins.js.map +1 -0
- package/dist/sdk/query-control.d.ts +158 -0
- package/dist/sdk/query-control.d.ts.map +1 -0
- package/dist/sdk/query-control.js +273 -0
- package/dist/sdk/query-control.js.map +1 -0
- package/dist/sdk/security.d.ts +120 -0
- package/dist/sdk/security.d.ts.map +1 -0
- package/dist/sdk/security.js +329 -0
- package/dist/sdk/security.js.map +1 -0
- package/dist/sdk/session-manager.d.ts +112 -0
- package/dist/sdk/session-manager.d.ts.map +1 -0
- package/dist/sdk/session-manager.js +181 -0
- package/dist/sdk/session-manager.js.map +1 -0
- package/dist/sdk/streaming-input.d.ts +153 -0
- package/dist/sdk/streaming-input.d.ts.map +1 -0
- package/dist/sdk/streaming-input.js +336 -0
- package/dist/sdk/streaming-input.js.map +1 -0
- package/dist/swarm/ipfs-swarm.d.ts +265 -0
- package/dist/swarm/ipfs-swarm.d.ts.map +1 -0
- package/dist/swarm/ipfs-swarm.js +508 -0
- package/dist/swarm/ipfs-swarm.js.map +1 -0
- package/dist/swarm/p2p-free-swarm.d.ts +344 -0
- package/dist/swarm/p2p-free-swarm.d.ts.map +1 -0
- package/dist/swarm/p2p-free-swarm.js +603 -0
- package/dist/swarm/p2p-free-swarm.js.map +1 -0
- package/dist/swarm/p2p-swarm-v2.d.ts +634 -0
- package/dist/swarm/p2p-swarm-v2.d.ts.map +1 -0
- package/dist/swarm/p2p-swarm-v2.js +1787 -0
- package/dist/swarm/p2p-swarm-v2.js.map +1 -0
- package/dist/swarm/p2p-swarm-wasm.d.ts +162 -0
- package/dist/swarm/p2p-swarm-wasm.d.ts.map +1 -0
- package/dist/swarm/p2p-swarm-wasm.js +315 -0
- package/dist/swarm/p2p-swarm-wasm.js.map +1 -0
- package/dist/swarm/real-p2p-swarm.d.ts +183 -0
- package/dist/swarm/real-p2p-swarm.d.ts.map +1 -0
- package/dist/swarm/real-p2p-swarm.js +469 -0
- package/dist/swarm/real-p2p-swarm.js.map +1 -0
- package/dist/utils/audit-logger.d.ts +115 -0
- package/dist/utils/audit-logger.d.ts.map +1 -0
- package/dist/utils/audit-logger.js +228 -0
- package/dist/utils/audit-logger.js.map +1 -0
- package/dist/utils/cli.d.ts +1 -1
- package/dist/utils/cli.d.ts.map +1 -1
- package/dist/utils/cli.js +15 -0
- package/dist/utils/cli.js.map +1 -1
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/input-validator.d.ts +116 -0
- package/dist/utils/input-validator.d.ts.map +1 -0
- package/dist/utils/input-validator.js +299 -0
- package/dist/utils/input-validator.js.map +1 -0
- package/dist/utils/model-cache.d.ts +57 -0
- package/dist/utils/model-cache.d.ts.map +1 -0
- package/dist/utils/model-cache.js +169 -0
- package/dist/utils/model-cache.js.map +1 -0
- package/dist/utils/safe-exec.d.ts +103 -0
- package/dist/utils/safe-exec.d.ts.map +1 -0
- package/dist/utils/safe-exec.js +205 -0
- package/dist/utils/safe-exec.js.map +1 -0
- package/dist/utils/suppress-warnings.d.ts +19 -0
- package/dist/utils/suppress-warnings.d.ts.map +1 -0
- package/dist/utils/suppress-warnings.js +59 -0
- package/dist/utils/suppress-warnings.js.map +1 -0
- package/dist/wasm/edge-full.d.ts +366 -0
- package/dist/wasm/edge-full.d.ts.map +1 -0
- package/dist/wasm/edge-full.js +637 -0
- package/dist/wasm/edge-full.js.map +1 -0
- package/dist/wasm/onnx-embeddings-wasm.d.ts +123 -0
- package/dist/wasm/onnx-embeddings-wasm.d.ts.map +1 -0
- package/dist/wasm/onnx-embeddings-wasm.js +310 -0
- package/dist/wasm/onnx-embeddings-wasm.js.map +1 -0
- package/dist/wasm/ruvector-edge.d.ts +109 -0
- package/dist/wasm/ruvector-edge.d.ts.map +1 -0
- package/dist/wasm/ruvector-edge.js +353 -0
- package/dist/wasm/ruvector-edge.js.map +1 -0
- package/dist/workers/consolidated-phases.d.ts +40 -0
- package/dist/workers/consolidated-phases.d.ts.map +1 -0
- package/dist/workers/consolidated-phases.js +497 -0
- package/dist/workers/consolidated-phases.js.map +1 -0
- package/dist/workers/custom-worker-config.d.ts +133 -0
- package/dist/workers/custom-worker-config.d.ts.map +1 -0
- package/dist/workers/custom-worker-config.js +215 -0
- package/dist/workers/custom-worker-config.js.map +1 -0
- package/dist/workers/custom-worker-factory.d.ts +89 -0
- package/dist/workers/custom-worker-factory.d.ts.map +1 -0
- package/dist/workers/custom-worker-factory.js +386 -0
- package/dist/workers/custom-worker-factory.js.map +1 -0
- package/dist/workers/dispatch-service.d.ts +123 -0
- package/dist/workers/dispatch-service.d.ts.map +1 -0
- package/dist/workers/dispatch-service.js +1024 -0
- package/dist/workers/dispatch-service.js.map +1 -0
- package/dist/workers/hooks-integration.d.ts +79 -0
- package/dist/workers/hooks-integration.d.ts.map +1 -0
- package/dist/workers/hooks-integration.js +286 -0
- package/dist/workers/hooks-integration.js.map +1 -0
- package/dist/workers/index.d.ts +41 -0
- package/dist/workers/index.d.ts.map +1 -0
- package/dist/workers/index.js +50 -0
- package/dist/workers/index.js.map +1 -0
- package/dist/workers/mcp-tools.d.ts +56 -0
- package/dist/workers/mcp-tools.d.ts.map +1 -0
- package/dist/workers/mcp-tools.js +359 -0
- package/dist/workers/mcp-tools.js.map +1 -0
- package/dist/workers/phase-executors.d.ts +22 -0
- package/dist/workers/phase-executors.d.ts.map +1 -0
- package/dist/workers/phase-executors.js +445 -0
- package/dist/workers/phase-executors.js.map +1 -0
- package/dist/workers/resource-governor.d.ts +75 -0
- package/dist/workers/resource-governor.d.ts.map +1 -0
- package/dist/workers/resource-governor.js +187 -0
- package/dist/workers/resource-governor.js.map +1 -0
- package/dist/workers/ruvector-integration.d.ts +163 -0
- package/dist/workers/ruvector-integration.d.ts.map +1 -0
- package/dist/workers/ruvector-integration.js +545 -0
- package/dist/workers/ruvector-integration.js.map +1 -0
- package/dist/workers/ruvector-native-integration.d.ts +91 -0
- package/dist/workers/ruvector-native-integration.d.ts.map +1 -0
- package/dist/workers/ruvector-native-integration.js +252 -0
- package/dist/workers/ruvector-native-integration.js.map +1 -0
- package/dist/workers/trigger-detector.d.ts +57 -0
- package/dist/workers/trigger-detector.d.ts.map +1 -0
- package/dist/workers/trigger-detector.js +264 -0
- package/dist/workers/trigger-detector.js.map +1 -0
- package/dist/workers/types.d.ts +144 -0
- package/dist/workers/types.d.ts.map +1 -0
- package/dist/workers/types.js +6 -0
- package/dist/workers/types.js.map +1 -0
- package/dist/workers/worker-agent-integration.d.ts +140 -0
- package/dist/workers/worker-agent-integration.d.ts.map +1 -0
- package/dist/workers/worker-agent-integration.js +471 -0
- package/dist/workers/worker-agent-integration.js.map +1 -0
- package/dist/workers/worker-benchmarks.d.ts +88 -0
- package/dist/workers/worker-benchmarks.d.ts.map +1 -0
- package/dist/workers/worker-benchmarks.js +451 -0
- package/dist/workers/worker-benchmarks.js.map +1 -0
- package/dist/workers/worker-registry.d.ts +85 -0
- package/dist/workers/worker-registry.d.ts.map +1 -0
- package/dist/workers/worker-registry.js +546 -0
- package/dist/workers/worker-registry.js.map +1 -0
- package/docs/IMPROVEMENT_ROADMAP.md +184 -0
- package/docs/embeddings/EMBEDDING_GEOMETRY.md +935 -0
- package/package.json +28 -13
- package/validation/sdk-integration-test.ts +208 -0
package/.claude/settings.json
CHANGED
|
@@ -5,14 +5,125 @@
|
|
|
5
5
|
"CLAUDE_FLOW_HOOKS_ENABLED": "true",
|
|
6
6
|
"CLAUDE_FLOW_TELEMETRY_ENABLED": "true",
|
|
7
7
|
"CLAUDE_FLOW_REMOTE_EXECUTION": "true",
|
|
8
|
-
"CLAUDE_FLOW_CHECKPOINTS_ENABLED": "true"
|
|
8
|
+
"CLAUDE_FLOW_CHECKPOINTS_ENABLED": "true",
|
|
9
|
+
"CLAUDE_FLOW_WORKERS_ENABLED": "true",
|
|
10
|
+
"CLAUDE_FLOW_WORKER_PARALLEL": "true",
|
|
11
|
+
"CLAUDE_FLOW_MODEL_CACHE_MB": "512",
|
|
12
|
+
"CLAUDE_FLOW_SUPPRESS_WARNINGS": "true"
|
|
13
|
+
},
|
|
14
|
+
"workers": {
|
|
15
|
+
"enabled": true,
|
|
16
|
+
"parallel": true,
|
|
17
|
+
"maxConcurrent": 10,
|
|
18
|
+
"maxPerTrigger": 3,
|
|
19
|
+
"defaultTimeout": 300000,
|
|
20
|
+
"memoryDepositEnabled": true,
|
|
21
|
+
"progressEventsEnabled": true,
|
|
22
|
+
"triggers": {
|
|
23
|
+
"ultralearn": { "priority": "high", "timeout": 300000, "maxAgents": 5 },
|
|
24
|
+
"optimize": { "priority": "medium", "timeout": 180000, "maxAgents": 2 },
|
|
25
|
+
"consolidate": { "priority": "low", "timeout": 120000, "maxAgents": 1 },
|
|
26
|
+
"predict": { "priority": "medium", "timeout": 60000, "maxAgents": 2 },
|
|
27
|
+
"audit": { "priority": "high", "timeout": 300000, "maxAgents": 3 },
|
|
28
|
+
"map": { "priority": "medium", "timeout": 240000, "maxAgents": 2 },
|
|
29
|
+
"preload": { "priority": "low", "timeout": 30000, "maxAgents": 1 },
|
|
30
|
+
"deepdive": { "priority": "high", "timeout": 600000, "maxAgents": 4 },
|
|
31
|
+
"document": { "priority": "low", "timeout": 180000, "maxAgents": 2 },
|
|
32
|
+
"refactor": { "priority": "medium", "timeout": 120000, "maxAgents": 2 },
|
|
33
|
+
"benchmark": { "priority": "medium", "timeout": 180000, "maxAgents": 2 },
|
|
34
|
+
"testgaps": { "priority": "medium", "timeout": 120000, "maxAgents": 2 }
|
|
35
|
+
},
|
|
36
|
+
"agentMappings": {
|
|
37
|
+
"ultralearn": ["researcher", "coder"],
|
|
38
|
+
"optimize": ["performance-analyzer", "coder"],
|
|
39
|
+
"audit": ["security-analyst", "tester"],
|
|
40
|
+
"benchmark": ["performance-analyzer"],
|
|
41
|
+
"testgaps": ["tester"],
|
|
42
|
+
"document": ["documenter", "researcher"],
|
|
43
|
+
"deepdive": ["researcher", "security-analyst"],
|
|
44
|
+
"refactor": ["coder", "reviewer"],
|
|
45
|
+
"map": ["researcher"],
|
|
46
|
+
"preload": ["researcher"],
|
|
47
|
+
"predict": ["performance-analyzer"],
|
|
48
|
+
"consolidate": ["researcher"]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"performance": {
|
|
52
|
+
"modelCache": {
|
|
53
|
+
"enabled": true,
|
|
54
|
+
"maxSizeMB": 512,
|
|
55
|
+
"evictionPolicy": "lru"
|
|
56
|
+
},
|
|
57
|
+
"benchmarkThresholds": {
|
|
58
|
+
"triggerDetection": { "p95Ms": 5 },
|
|
59
|
+
"workerRegistry": { "p95Ms": 10 },
|
|
60
|
+
"agentSelection": { "p95Ms": 1 },
|
|
61
|
+
"memoryKeyGeneration": { "p95Ms": 0.1 },
|
|
62
|
+
"concurrentWorkers": { "totalMs": 1000 }
|
|
63
|
+
},
|
|
64
|
+
"optimizations": {
|
|
65
|
+
"parallelDispatch": true,
|
|
66
|
+
"batchMemoryWrites": true,
|
|
67
|
+
"cacheEmbeddings": true,
|
|
68
|
+
"suppressWarnings": true
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"agents": {
|
|
72
|
+
"presets": {
|
|
73
|
+
"quick-scan": {
|
|
74
|
+
"phases": ["file-discovery", "pattern-discovery", "summarization"],
|
|
75
|
+
"timeout": 60000,
|
|
76
|
+
"priority": "low"
|
|
77
|
+
},
|
|
78
|
+
"deep-analysis": {
|
|
79
|
+
"phases": ["file-discovery", "static-analysis", "complexity-analysis", "pattern-extraction", "summarization"],
|
|
80
|
+
"timeout": 300000,
|
|
81
|
+
"priority": "high"
|
|
82
|
+
},
|
|
83
|
+
"security-scan": {
|
|
84
|
+
"phases": ["file-discovery", "security-analysis", "secret-detection", "summarization"],
|
|
85
|
+
"timeout": 180000,
|
|
86
|
+
"priority": "critical"
|
|
87
|
+
},
|
|
88
|
+
"learning": {
|
|
89
|
+
"phases": ["file-discovery", "pattern-extraction", "vectorization", "sona-training", "pattern-storage"],
|
|
90
|
+
"timeout": 300000,
|
|
91
|
+
"priority": "medium"
|
|
92
|
+
},
|
|
93
|
+
"api-docs": {
|
|
94
|
+
"phases": ["api-discovery", "pattern-extraction", "report-generation", "indexing"],
|
|
95
|
+
"timeout": 180000,
|
|
96
|
+
"priority": "low"
|
|
97
|
+
},
|
|
98
|
+
"test-analysis": {
|
|
99
|
+
"phases": ["file-discovery", "pattern-discovery", "coverage-analysis", "summarization"],
|
|
100
|
+
"timeout": 120000,
|
|
101
|
+
"priority": "medium"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"capabilities": {
|
|
105
|
+
"default": {
|
|
106
|
+
"onnxEmbeddings": true,
|
|
107
|
+
"vectorDb": true,
|
|
108
|
+
"sonaLearning": true,
|
|
109
|
+
"reasoningBank": true,
|
|
110
|
+
"intelligenceStore": true,
|
|
111
|
+
"progressEvents": true,
|
|
112
|
+
"memoryDeposits": true,
|
|
113
|
+
"persistResults": true
|
|
114
|
+
}
|
|
115
|
+
}
|
|
9
116
|
},
|
|
10
117
|
"permissions": {
|
|
11
118
|
"allow": [
|
|
12
119
|
"Bash(npx claude-flow *)",
|
|
120
|
+
"Bash(npx agentic-flow *)",
|
|
13
121
|
"Bash(npm run lint)",
|
|
14
122
|
"Bash(npm run test:*)",
|
|
15
123
|
"Bash(npm test *)",
|
|
124
|
+
"Bash(npm run build)",
|
|
125
|
+
"Bash(npm run benchmark)",
|
|
126
|
+
"Bash(npm run workers *)",
|
|
16
127
|
"Bash(git status)",
|
|
17
128
|
"Bash(git diff *)",
|
|
18
129
|
"Bash(git log *)",
|
|
@@ -28,7 +139,10 @@
|
|
|
28
139
|
"Bash(node *)",
|
|
29
140
|
"Bash(which *)",
|
|
30
141
|
"Bash(pwd)",
|
|
31
|
-
"Bash(ls *)"
|
|
142
|
+
"Bash(ls *)",
|
|
143
|
+
"mcp__ruv-swarm",
|
|
144
|
+
"mcp__claude-flow@alpha",
|
|
145
|
+
"mcp__flow-nexus"
|
|
32
146
|
],
|
|
33
147
|
"deny": [
|
|
34
148
|
"Bash(rm -rf /)",
|
|
@@ -38,13 +152,23 @@
|
|
|
38
152
|
]
|
|
39
153
|
},
|
|
40
154
|
"hooks": {
|
|
155
|
+
"UserPromptSubmit": [
|
|
156
|
+
{
|
|
157
|
+
"hooks": [
|
|
158
|
+
{
|
|
159
|
+
"type": "command",
|
|
160
|
+
"command": "cat | jq -r '.user_prompt // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha workers dispatch --prompt '{}' --parallel true 2>/dev/null || true"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
],
|
|
41
165
|
"PreToolUse": [
|
|
42
166
|
{
|
|
43
167
|
"matcher": "Bash",
|
|
44
168
|
"hooks": [
|
|
45
169
|
{
|
|
46
170
|
"type": "command",
|
|
47
|
-
"command": "cat | jq -r '.tool_input.command // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks pre-command --command '{}' --validate-safety true --prepare-resources true"
|
|
171
|
+
"command": "cat | jq -r '.tool_input.command // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks pre-command --command '{}' --validate-safety true --prepare-resources true 2>/dev/null || true"
|
|
48
172
|
}
|
|
49
173
|
]
|
|
50
174
|
},
|
|
@@ -53,7 +177,7 @@
|
|
|
53
177
|
"hooks": [
|
|
54
178
|
{
|
|
55
179
|
"type": "command",
|
|
56
|
-
"command": "cat | jq -r '.tool_input.file_path // .tool_input.path // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks pre-edit --file '{}' --auto-assign-agents true --load-context true"
|
|
180
|
+
"command": "cat | jq -r '.tool_input.file_path // .tool_input.path // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks pre-edit --file '{}' --auto-assign-agents true --load-context true 2>/dev/null || true"
|
|
57
181
|
}
|
|
58
182
|
]
|
|
59
183
|
}
|
|
@@ -64,7 +188,7 @@
|
|
|
64
188
|
"hooks": [
|
|
65
189
|
{
|
|
66
190
|
"type": "command",
|
|
67
|
-
"command": "cat | jq -r '.tool_input.command // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks post-command --command '{}' --track-metrics true --store-results true"
|
|
191
|
+
"command": "cat | jq -r '.tool_input.command // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks post-command --command '{}' --track-metrics true --store-results true 2>/dev/null || true"
|
|
68
192
|
}
|
|
69
193
|
]
|
|
70
194
|
},
|
|
@@ -73,7 +197,7 @@
|
|
|
73
197
|
"hooks": [
|
|
74
198
|
{
|
|
75
199
|
"type": "command",
|
|
76
|
-
"command": "cat | jq -r '.tool_input.file_path // .tool_input.path // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks post-edit --file '{}' --format true --update-memory true"
|
|
200
|
+
"command": "cat | jq -r '.tool_input.file_path // .tool_input.path // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks post-edit --file '{}' --format true --update-memory true 2>/dev/null || true"
|
|
77
201
|
}
|
|
78
202
|
]
|
|
79
203
|
}
|
|
@@ -84,7 +208,7 @@
|
|
|
84
208
|
"hooks": [
|
|
85
209
|
{
|
|
86
210
|
"type": "command",
|
|
87
|
-
"command": "/bin/bash -c '
|
|
211
|
+
"command": "/bin/bash -c 'echo \"🔄 PreCompact: Check CLAUDE.md for 54 agents, swarm patterns, SPARC workflows\"; echo \"✅ Ready for compact\"'"
|
|
88
212
|
}
|
|
89
213
|
]
|
|
90
214
|
},
|
|
@@ -93,7 +217,7 @@
|
|
|
93
217
|
"hooks": [
|
|
94
218
|
{
|
|
95
219
|
"type": "command",
|
|
96
|
-
"command": "/bin/bash -c 'echo \"🔄 Auto-Compact
|
|
220
|
+
"command": "/bin/bash -c 'echo \"🔄 Auto-Compact: Preserving agent/worker context\"; echo \"✅ Auto-compact proceeding\"'"
|
|
97
221
|
}
|
|
98
222
|
]
|
|
99
223
|
}
|
|
@@ -103,7 +227,7 @@
|
|
|
103
227
|
"hooks": [
|
|
104
228
|
{
|
|
105
229
|
"type": "command",
|
|
106
|
-
"command": "npx claude-flow@alpha hooks session-end --generate-summary true --persist-state true --export-metrics true"
|
|
230
|
+
"command": "npx claude-flow@alpha hooks session-end --generate-summary true --persist-state true --export-metrics true 2>/dev/null || true"
|
|
107
231
|
}
|
|
108
232
|
]
|
|
109
233
|
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: worker-benchmarks
|
|
3
|
+
description: Run comprehensive worker system benchmarks and performance analysis
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
invocable: true
|
|
6
|
+
author: agentic-flow
|
|
7
|
+
capabilities:
|
|
8
|
+
- performance_testing
|
|
9
|
+
- metrics_collection
|
|
10
|
+
- optimization_recommendations
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Worker Benchmarks Skill
|
|
14
|
+
|
|
15
|
+
Run comprehensive performance benchmarks for the agentic-flow worker system.
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Run full benchmark suite
|
|
21
|
+
npx agentic-flow workers benchmark
|
|
22
|
+
|
|
23
|
+
# Run specific benchmark
|
|
24
|
+
npx agentic-flow workers benchmark --type trigger-detection
|
|
25
|
+
npx agentic-flow workers benchmark --type registry
|
|
26
|
+
npx agentic-flow workers benchmark --type agent-selection
|
|
27
|
+
npx agentic-flow workers benchmark --type concurrent
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Benchmark Types
|
|
31
|
+
|
|
32
|
+
### 1. Trigger Detection (`trigger-detection`)
|
|
33
|
+
Tests keyword detection speed across 12 worker triggers.
|
|
34
|
+
- **Target**: p95 < 5ms
|
|
35
|
+
- **Iterations**: 1000
|
|
36
|
+
- **Metrics**: latency, throughput, histogram
|
|
37
|
+
|
|
38
|
+
### 2. Worker Registry (`registry`)
|
|
39
|
+
Tests CRUD operations on worker entries.
|
|
40
|
+
- **Target**: p95 < 10ms
|
|
41
|
+
- **Iterations**: 500 creates, gets, updates
|
|
42
|
+
- **Metrics**: per-operation latency breakdown
|
|
43
|
+
|
|
44
|
+
### 3. Agent Selection (`agent-selection`)
|
|
45
|
+
Tests performance-based agent selection.
|
|
46
|
+
- **Target**: p95 < 1ms
|
|
47
|
+
- **Iterations**: 1000
|
|
48
|
+
- **Metrics**: selection confidence, agent scores
|
|
49
|
+
|
|
50
|
+
### 4. Model Cache (`cache`)
|
|
51
|
+
Tests model caching performance.
|
|
52
|
+
- **Target**: p95 < 0.5ms
|
|
53
|
+
- **Metrics**: hit rate, cache size, eviction stats
|
|
54
|
+
|
|
55
|
+
### 5. Concurrent Workers (`concurrent`)
|
|
56
|
+
Tests parallel worker creation and updates.
|
|
57
|
+
- **Target**: < 1000ms for 10 workers
|
|
58
|
+
- **Metrics**: per-worker latency, memory usage
|
|
59
|
+
|
|
60
|
+
### 6. Memory Key Generation (`memory-keys`)
|
|
61
|
+
Tests memory pattern key generation.
|
|
62
|
+
- **Target**: p95 < 0.1ms
|
|
63
|
+
- **Iterations**: 5000
|
|
64
|
+
- **Metrics**: unique patterns, throughput
|
|
65
|
+
|
|
66
|
+
## Output Format
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
═══════════════════════════════════════════════════════════
|
|
70
|
+
📈 BENCHMARK RESULTS
|
|
71
|
+
═══════════════════════════════════════════════════════════
|
|
72
|
+
|
|
73
|
+
✅ Trigger Detection
|
|
74
|
+
Operation: detect
|
|
75
|
+
Count: 1,000
|
|
76
|
+
Avg: 0.045ms | p95: 0.120ms (target: 5ms)
|
|
77
|
+
Throughput: 22,222 ops/s
|
|
78
|
+
Memory Δ: 0.12MB
|
|
79
|
+
|
|
80
|
+
✅ Worker Registry
|
|
81
|
+
Operation: crud
|
|
82
|
+
Count: 1,500
|
|
83
|
+
Avg: 1.234ms | p95: 3.456ms (target: 10ms)
|
|
84
|
+
Throughput: 810 ops/s
|
|
85
|
+
Memory Δ: 2.34MB
|
|
86
|
+
|
|
87
|
+
───────────────────────────────────────────────────────────
|
|
88
|
+
📊 SUMMARY
|
|
89
|
+
───────────────────────────────────────────────────────────
|
|
90
|
+
Total Tests: 6
|
|
91
|
+
Passed: 6 | Failed: 0
|
|
92
|
+
Avg Latency: 0.567ms
|
|
93
|
+
Total Duration: 2345ms
|
|
94
|
+
Peak Memory: 8.90MB
|
|
95
|
+
═══════════════════════════════════════════════════════════
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Integration with Settings
|
|
99
|
+
|
|
100
|
+
Benchmark thresholds are configured in `.claude/settings.json`:
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"performance": {
|
|
105
|
+
"benchmarkThresholds": {
|
|
106
|
+
"triggerDetection": { "p95Ms": 5 },
|
|
107
|
+
"workerRegistry": { "p95Ms": 10 },
|
|
108
|
+
"agentSelection": { "p95Ms": 1 },
|
|
109
|
+
"memoryKeyGeneration": { "p95Ms": 0.1 },
|
|
110
|
+
"concurrentWorkers": { "totalMs": 1000 }
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Programmatic Usage
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
import { workerBenchmarks, runBenchmarks } from 'agentic-flow/workers/worker-benchmarks';
|
|
120
|
+
|
|
121
|
+
// Run full suite
|
|
122
|
+
const suite = await runBenchmarks();
|
|
123
|
+
console.log(suite.summary);
|
|
124
|
+
|
|
125
|
+
// Run individual benchmarks
|
|
126
|
+
const triggerResult = await workerBenchmarks.benchmarkTriggerDetection(1000);
|
|
127
|
+
const registryResult = await workerBenchmarks.benchmarkRegistryOperations(500);
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Performance Optimization Tips
|
|
131
|
+
|
|
132
|
+
1. **Model Cache**: Enable with `CLAUDE_FLOW_MODEL_CACHE_MB=512`
|
|
133
|
+
2. **Parallel Workers**: Enable with `CLAUDE_FLOW_WORKER_PARALLEL=true`
|
|
134
|
+
3. **Warning Suppression**: Enable with `CLAUDE_FLOW_SUPPRESS_WARNINGS=true`
|
|
135
|
+
4. **SQLite WAL Mode**: Automatic for better concurrent performance
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: worker-integration
|
|
3
|
+
description: Worker-Agent integration for intelligent task dispatch and performance tracking
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
invocable: true
|
|
6
|
+
author: agentic-flow
|
|
7
|
+
capabilities:
|
|
8
|
+
- agent_selection
|
|
9
|
+
- performance_tracking
|
|
10
|
+
- memory_coordination
|
|
11
|
+
- self_learning
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Worker-Agent Integration Skill
|
|
15
|
+
|
|
16
|
+
Intelligent coordination between background workers and specialized agents.
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# View agent recommendations for a trigger
|
|
22
|
+
npx agentic-flow workers agents ultralearn
|
|
23
|
+
npx agentic-flow workers agents optimize
|
|
24
|
+
|
|
25
|
+
# View performance metrics
|
|
26
|
+
npx agentic-flow workers metrics
|
|
27
|
+
|
|
28
|
+
# View integration stats
|
|
29
|
+
npx agentic-flow workers stats --integration
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Agent Mappings
|
|
33
|
+
|
|
34
|
+
Workers automatically dispatch to optimal agents based on trigger type:
|
|
35
|
+
|
|
36
|
+
| Trigger | Primary Agents | Fallback | Pipeline Phases |
|
|
37
|
+
|---------|---------------|----------|-----------------|
|
|
38
|
+
| `ultralearn` | researcher, coder | planner | discovery → patterns → vectorization → summary |
|
|
39
|
+
| `optimize` | performance-analyzer, coder | researcher | static-analysis → performance → patterns |
|
|
40
|
+
| `audit` | security-analyst, tester | reviewer | security → secrets → vulnerability-scan |
|
|
41
|
+
| `benchmark` | performance-analyzer | coder, tester | performance → metrics → report |
|
|
42
|
+
| `testgaps` | tester | coder | discovery → coverage → gaps |
|
|
43
|
+
| `document` | documenter, researcher | coder | api-discovery → patterns → indexing |
|
|
44
|
+
| `deepdive` | researcher, security-analyst | coder | call-graph → deps → trace |
|
|
45
|
+
| `refactor` | coder, reviewer | researcher | complexity → smells → patterns |
|
|
46
|
+
|
|
47
|
+
## Performance-Based Selection
|
|
48
|
+
|
|
49
|
+
The system learns from execution history to improve agent selection:
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
// Agent selection considers:
|
|
53
|
+
// 1. Quality score (0-1)
|
|
54
|
+
// 2. Success rate
|
|
55
|
+
// 3. Average latency
|
|
56
|
+
// 4. Execution count
|
|
57
|
+
|
|
58
|
+
const { agent, confidence, reasoning } = selectBestAgent('optimize');
|
|
59
|
+
// agent: "performance-analyzer"
|
|
60
|
+
// confidence: 0.87
|
|
61
|
+
// reasoning: "Selected based on 45 executions with 94.2% success"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Memory Key Patterns
|
|
65
|
+
|
|
66
|
+
Workers store results using consistent patterns:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
{trigger}/{topic}/{phase}
|
|
70
|
+
|
|
71
|
+
Examples:
|
|
72
|
+
- ultralearn/auth-module/analysis
|
|
73
|
+
- optimize/database/performance
|
|
74
|
+
- audit/payment/vulnerabilities
|
|
75
|
+
- benchmark/api/metrics
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Benchmark Thresholds
|
|
79
|
+
|
|
80
|
+
Agents are monitored against performance thresholds:
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"researcher": {
|
|
85
|
+
"p95_latency": "<500ms",
|
|
86
|
+
"memory_mb": "<256MB"
|
|
87
|
+
},
|
|
88
|
+
"coder": {
|
|
89
|
+
"p95_latency": "<300ms",
|
|
90
|
+
"quality_score": ">0.85"
|
|
91
|
+
},
|
|
92
|
+
"security-analyst": {
|
|
93
|
+
"scan_coverage": ">95%",
|
|
94
|
+
"p95_latency": "<1000ms"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Feedback Loop
|
|
100
|
+
|
|
101
|
+
Workers provide feedback for continuous improvement:
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
import { workerAgentIntegration } from 'agentic-flow/workers/worker-agent-integration';
|
|
105
|
+
|
|
106
|
+
// Record execution feedback
|
|
107
|
+
workerAgentIntegration.recordFeedback(
|
|
108
|
+
'optimize', // trigger
|
|
109
|
+
'coder', // agent
|
|
110
|
+
true, // success
|
|
111
|
+
245, // latency ms
|
|
112
|
+
0.92 // quality score
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
// Check compliance
|
|
116
|
+
const { compliant, violations } = workerAgentIntegration.checkBenchmarkCompliance('coder');
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Integration Statistics
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
$ npx agentic-flow workers stats --integration
|
|
123
|
+
|
|
124
|
+
Worker-Agent Integration Stats
|
|
125
|
+
══════════════════════════════
|
|
126
|
+
Total Agents: 6
|
|
127
|
+
Tracked Agents: 4
|
|
128
|
+
Total Feedback: 156
|
|
129
|
+
Avg Quality Score: 0.89
|
|
130
|
+
|
|
131
|
+
Model Cache Stats
|
|
132
|
+
─────────────────
|
|
133
|
+
Hits: 1,234
|
|
134
|
+
Misses: 45
|
|
135
|
+
Hit Rate: 96.5%
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Configuration
|
|
139
|
+
|
|
140
|
+
Enable integration features in `.claude/settings.json`:
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"workers": {
|
|
145
|
+
"enabled": true,
|
|
146
|
+
"parallel": true,
|
|
147
|
+
"memoryDepositEnabled": true,
|
|
148
|
+
"agentMappings": {
|
|
149
|
+
"ultralearn": ["researcher", "coder"],
|
|
150
|
+
"optimize": ["performance-analyzer", "coder"]
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
```
|
package/README.md
CHANGED
|
@@ -60,6 +60,7 @@ Most AI coding agents are **painfully slow** and **frustratingly forgetful**. Th
|
|
|
60
60
|
| **QUIC Transport** | Ultra-low latency agent communication via Rust/WASM QUIC protocol | 50-70% faster than TCP, 0-RTT | [Docs](https://github.com/ruvnet/agentic-flow/tree/main/crates/agentic-flow-quic) |
|
|
61
61
|
| **Federation Hub** 🆕 | Ephemeral agents (5s-15min lifetime) with persistent cross-agent memory | Infinite scale, 0 waste | [Docs](./agentic-flow/src/federation) |
|
|
62
62
|
| **Swarm Optimization** 🆕 | Self-learning parallel execution with AI topology selection | 3-5x speedup, auto-optimizes | [Docs](./docs/swarm-optimization-report.md) |
|
|
63
|
+
| **Background Workers** 🆕 | Non-blocking keyword-triggered workers with SONA/ReasoningBank learning | <5ms dispatch, auto-learn | [Docs](#-background-workers) |
|
|
63
64
|
|
|
64
65
|
**CLI Usage**:
|
|
65
66
|
- **AgentDB**: Full CLI with 17 commands (`npx agentdb <command>`)
|
|
@@ -69,6 +70,8 @@ Most AI coding agents are **painfully slow** and **frustratingly forgetful**. Th
|
|
|
69
70
|
- **QUIC Transport**: API only
|
|
70
71
|
- **Federation Hub**: `npx agentic-flow federation start` 🆕
|
|
71
72
|
- **Swarm Optimization**: Automatic with parallel execution 🆕
|
|
73
|
+
- **Background Workers**: `npx agentic-flow workers <command>` 🆕
|
|
74
|
+
- **Intelligence Hooks**: `npx agentic-flow hooks <command>` 🆕
|
|
72
75
|
|
|
73
76
|
**Programmatic**: All components importable: `agentic-flow/agentdb`, `agentic-flow/router`, `agentic-flow/reasoningbank`, `agentic-flow/agent-booster`, `agentic-flow/transport/quic`
|
|
74
77
|
|
|
@@ -238,6 +241,134 @@ spec:
|
|
|
238
241
|
|
|
239
242
|
---
|
|
240
243
|
|
|
244
|
+
### ⚡ Background Workers
|
|
245
|
+
|
|
246
|
+
**Non-blocking keyword-triggered workers** that run silently while users continue chatting, with full RuVector integration:
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
# CLI: Background worker operations
|
|
250
|
+
npx agentic-flow workers dispatch ultralearn "authentication patterns" --session abc123
|
|
251
|
+
npx agentic-flow workers status # View all workers
|
|
252
|
+
npx agentic-flow workers status --worker wrk_123 # Specific worker
|
|
253
|
+
npx agentic-flow workers cancel wrk_123 # Cancel running worker
|
|
254
|
+
npx agentic-flow workers triggers # List available triggers
|
|
255
|
+
npx agentic-flow workers stats --timeframe 24h # Aggregated statistics
|
|
256
|
+
|
|
257
|
+
# Initialize hooks and workers integration
|
|
258
|
+
npx agentic-flow hooks init # Creates .claude/settings.json with all hooks
|
|
259
|
+
|
|
260
|
+
# Hook-based automatic dispatch (in .claude/settings.json)
|
|
261
|
+
# Workers spawn automatically when keywords detected in prompts
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Trigger Keywords:**
|
|
265
|
+
|
|
266
|
+
| Trigger | Description | Phases | Use Case |
|
|
267
|
+
|---------|-------------|--------|----------|
|
|
268
|
+
| **ultralearn** | Deep knowledge acquisition | discovery → analysis → vectorization → indexing | "ultralearn authentication" |
|
|
269
|
+
| **optimize** | Performance optimization | pattern-analysis → bottleneck-detect → cache-warmup | "optimize my workflow" |
|
|
270
|
+
| **consolidate** | Memory consolidation | inventory → similarity → merge → prune → reindex | "consolidate memories" |
|
|
271
|
+
| **predict** | Predictive preloading | context-gather → pattern-match → predict → preload | "predict next steps" |
|
|
272
|
+
| **audit** | Security analysis | static-analysis → dependency-scan → vulnerability-check | "audit this codebase" |
|
|
273
|
+
| **map** | Codebase mapping | file-discovery → import-analysis → graph-build → cycle-detection | "map the architecture" |
|
|
274
|
+
| **deepdive** | Deep code analysis | locate → trace-calls → build-graph → analyze-depth | "deepdive into auth.ts" |
|
|
275
|
+
| **document** | Auto-documentation | analyze → template → generate → format | "document this module" |
|
|
276
|
+
| **refactor** | Refactoring suggestions | complexity → duplication → coupling → suggestions | "refactor opportunities" |
|
|
277
|
+
| **benchmark** | Performance benchmarks | discover → instrument → execute → analyze → report | "benchmark the API" |
|
|
278
|
+
| **testgaps** | Test coverage analysis | coverage → paths → criticality → suggestions | "find testgaps" |
|
|
279
|
+
|
|
280
|
+
**RuVector Integration:**
|
|
281
|
+
- **SONA**: Self-learning trajectory tracking for each worker
|
|
282
|
+
- **ReasoningBank**: Pattern storage from successful worker runs
|
|
283
|
+
- **HNSW**: Vector indexing for semantic search of results
|
|
284
|
+
- **Quality-based Learning**: Workers with 80%+ quality trigger pattern learning
|
|
285
|
+
|
|
286
|
+
**Programmatic API:**
|
|
287
|
+
```typescript
|
|
288
|
+
import {
|
|
289
|
+
getWorkerDispatchService,
|
|
290
|
+
getTriggerDetector,
|
|
291
|
+
getRuVectorWorkerIntegration
|
|
292
|
+
} from 'agentic-flow/workers';
|
|
293
|
+
|
|
294
|
+
// Dispatch a worker
|
|
295
|
+
const dispatcher = getWorkerDispatchService();
|
|
296
|
+
const workerId = await dispatcher.dispatch('ultralearn', 'authentication', 'session-123');
|
|
297
|
+
|
|
298
|
+
// Monitor progress
|
|
299
|
+
dispatcher.on('worker:progress', ({ workerId, progress, phase }) => {
|
|
300
|
+
console.log(`Worker ${workerId}: ${progress}% - ${phase}`);
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
// Access learned patterns
|
|
304
|
+
const ruvector = getRuVectorWorkerIntegration();
|
|
305
|
+
const patterns = await ruvector.findRelevantPatterns('ultralearn', 'auth', 5);
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
**MCP Tools (8 tools):**
|
|
309
|
+
- `worker_dispatch` - Spawn background worker
|
|
310
|
+
- `worker_status` - Get worker status
|
|
311
|
+
- `worker_cancel` - Cancel running worker
|
|
312
|
+
- `worker_triggers` - List available triggers
|
|
313
|
+
- `worker_results` - Get completed worker results
|
|
314
|
+
- `worker_detect` - Detect triggers in prompt
|
|
315
|
+
- `worker_stats` - Aggregated statistics
|
|
316
|
+
- `worker_context` - Get relevant context for injection
|
|
317
|
+
|
|
318
|
+
**Performance:**
|
|
319
|
+
- **Trigger Detection**: <5ms (regex-based)
|
|
320
|
+
- **Worker Spawn**: <50ms
|
|
321
|
+
- **Max Concurrent**: 10 workers (configurable)
|
|
322
|
+
- **Memory Limit**: 1024MB heap per session
|
|
323
|
+
- **Learning**: Automatic SONA adaptation on 80%+ quality
|
|
324
|
+
|
|
325
|
+
**Documentation:** [Background Workers Source](./src/workers/)
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
### 🧠 Intelligence Hooks CLI
|
|
330
|
+
|
|
331
|
+
**Self-learning hooks** for intelligent agent routing and code optimization:
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
# Initialize - creates .claude/settings.json with all hooks
|
|
335
|
+
npx agentic-flow hooks init # Full configuration
|
|
336
|
+
npx agentic-flow hooks init --minimal # Minimal setup
|
|
337
|
+
|
|
338
|
+
# Pre/Post hooks for learning
|
|
339
|
+
npx agentic-flow hooks pre-edit src/auth.ts --task "add OAuth"
|
|
340
|
+
npx agentic-flow hooks post-edit src/auth.ts --success --agent coder
|
|
341
|
+
npx agentic-flow hooks pre-command "npm test"
|
|
342
|
+
npx agentic-flow hooks post-command "npm test" --exit-code 0
|
|
343
|
+
|
|
344
|
+
# Intelligence routing
|
|
345
|
+
npx agentic-flow hooks route "implement authentication"
|
|
346
|
+
npx agentic-flow hooks explain "add OAuth to API"
|
|
347
|
+
|
|
348
|
+
# RuVector intelligence (SONA + MoE + HNSW)
|
|
349
|
+
npx agentic-flow hooks intelligence stats
|
|
350
|
+
npx agentic-flow hooks intelligence route "debug memory leak"
|
|
351
|
+
npx agentic-flow hooks intelligence trajectory-start --task "build API"
|
|
352
|
+
npx agentic-flow hooks intelligence pattern-store --task "auth" --resolution "JWT"
|
|
353
|
+
npx agentic-flow hooks intelligence pattern-search "authentication"
|
|
354
|
+
|
|
355
|
+
# Bootstrap learning from codebase
|
|
356
|
+
npx agentic-flow hooks pretrain
|
|
357
|
+
npx agentic-flow hooks build-agents
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
**Generated settings.json** includes:
|
|
361
|
+
- **PreToolUse**: Pre-edit/pre-command intelligence
|
|
362
|
+
- **PostToolUse**: Success-based learning
|
|
363
|
+
- **PostToolUseFailure**: Learn from failures
|
|
364
|
+
- **SessionStart**: Workers status check, intelligence stats
|
|
365
|
+
- **SessionEnd**: Workers cleanup (24h retention)
|
|
366
|
+
- **UserPromptSubmit**: Background worker dispatch on keyword triggers
|
|
367
|
+
|
|
368
|
+
**Documentation:** [Hooks Source](./src/cli/commands/hooks.ts)
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
241
372
|
### 🦀 agentic-jujutsu (Native Rust Package)
|
|
242
373
|
|
|
243
374
|
**High-performance Rust/NAPI bindings** for change-centric version control:
|