agentic-flow 2.0.2 ā 2.0.4
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/test-neural.md +14 -0
- package/.claude/settings.json +9 -133
- package/README.md +622 -1862
- package/dist/.tsbuildinfo +1 -1
- package/dist/billing/mcp/tools.js +0 -1
- package/dist/billing/mcp/tools.js.map +1 -1
- package/dist/cli/commands/hooks.d.ts.map +1 -1
- package/dist/cli/commands/hooks.js +4 -79
- package/dist/cli/commands/hooks.js.map +1 -1
- package/dist/cli-proxy.js +1 -89
- package/dist/cli-proxy.js.map +1 -1
- package/dist/core/agentdb-fast.js +3 -3
- package/dist/core/agentdb-fast.js.map +1 -1
- package/dist/core/agentdb-wrapper-enhanced.d.ts.map +1 -1
- package/dist/core/agentdb-wrapper-enhanced.js +4 -20
- package/dist/core/agentdb-wrapper-enhanced.js.map +1 -1
- package/dist/core/agentdb-wrapper.d.ts +2 -3
- package/dist/core/agentdb-wrapper.d.ts.map +1 -1
- package/dist/core/agentdb-wrapper.js +1 -15
- package/dist/core/agentdb-wrapper.js.map +1 -1
- package/dist/core/attention-native.d.ts +0 -4
- package/dist/core/attention-native.d.ts.map +1 -1
- package/dist/core/attention-native.js +2 -14
- package/dist/core/attention-native.js.map +1 -1
- package/dist/federation/SecurityManager.d.ts +2 -11
- package/dist/federation/SecurityManager.d.ts.map +1 -1
- package/dist/federation/SecurityManager.js +17 -50
- package/dist/federation/SecurityManager.js.map +1 -1
- package/dist/federation/integrations/supabase-adapter-debug.js +3 -3
- package/dist/federation/integrations/supabase-adapter-debug.js.map +1 -1
- package/dist/hooks/swarm-learning-optimizer.js +5 -5
- package/dist/hooks/swarm-learning-optimizer.js.map +1 -1
- package/dist/intelligence/IntelligenceStore.d.ts +26 -35
- package/dist/intelligence/IntelligenceStore.d.ts.map +1 -1
- package/dist/intelligence/IntelligenceStore.js +123 -308
- package/dist/intelligence/IntelligenceStore.js.map +1 -1
- package/dist/intelligence/RuVectorIntelligence.d.ts +1 -26
- package/dist/intelligence/RuVectorIntelligence.d.ts.map +1 -1
- package/dist/intelligence/RuVectorIntelligence.js +10 -49
- package/dist/intelligence/RuVectorIntelligence.js.map +1 -1
- package/dist/intelligence/agent-booster-enhanced.d.ts +0 -1
- package/dist/intelligence/agent-booster-enhanced.d.ts.map +1 -1
- package/dist/intelligence/agent-booster-enhanced.js +3 -24
- package/dist/intelligence/agent-booster-enhanced.js.map +1 -1
- package/dist/intelligence/index.d.ts +3 -29
- package/dist/intelligence/index.d.ts.map +1 -1
- package/dist/intelligence/index.js +3 -13
- package/dist/intelligence/index.js.map +1 -1
- package/dist/mcp/claudeFlowSdkServer.d.ts.map +1 -1
- package/dist/mcp/claudeFlowSdkServer.js +3 -9
- package/dist/mcp/claudeFlowSdkServer.js.map +1 -1
- package/dist/mcp/fastmcp/tools/hooks/intelligence-bridge.js +5 -5
- package/dist/mcp/fastmcp/tools/hooks/intelligence-bridge.js.map +1 -1
- package/dist/mcp/fastmcp/tools/swarm/init.d.ts.map +1 -1
- package/dist/mcp/fastmcp/tools/swarm/init.js +7 -36
- package/dist/mcp/fastmcp/tools/swarm/init.js.map +1 -1
- package/dist/mcp/fastmcp/tools/swarm/spawn.d.ts.map +1 -1
- package/dist/mcp/fastmcp/tools/swarm/spawn.js +8 -47
- package/dist/mcp/fastmcp/tools/swarm/spawn.js.map +1 -1
- package/dist/mcp/tools/agent-booster-tools.d.ts +1 -1
- package/dist/mcp/tools/agent-booster-tools.d.ts.map +1 -1
- package/dist/mcp/tools/agent-booster-tools.js +4 -10
- package/dist/mcp/tools/agent-booster-tools.js.map +1 -1
- package/dist/mcp/tools/sona-tools.d.ts.map +1 -1
- package/dist/mcp/tools/sona-tools.js +0 -6
- package/dist/mcp/tools/sona-tools.js.map +1 -1
- package/dist/optimizations/agent-booster-migration.d.ts.map +1 -1
- package/dist/optimizations/agent-booster-migration.js +2 -5
- package/dist/optimizations/agent-booster-migration.js.map +1 -1
- package/dist/proxy/anthropic-to-openrouter.js.map +1 -1
- package/dist/proxy/anthropic-to-requesty.js.map +1 -1
- package/dist/proxy/quic-proxy.d.ts +1 -0
- package/dist/proxy/quic-proxy.d.ts.map +1 -1
- package/dist/proxy/quic-proxy.js +2 -2
- package/dist/proxy/quic-proxy.js.map +1 -1
- package/dist/reasoningbank/AdvancedMemory.js +1 -1
- package/dist/reasoningbank/AdvancedMemory.js.map +1 -1
- package/dist/reasoningbank/HybridBackend.d.ts.map +1 -1
- package/dist/reasoningbank/HybridBackend.js +5 -2
- package/dist/reasoningbank/HybridBackend.js.map +1 -1
- package/dist/reasoningbank/backend-selector.d.ts +1 -11
- package/dist/reasoningbank/backend-selector.d.ts.map +1 -1
- package/dist/reasoningbank/backend-selector.js +5 -45
- package/dist/reasoningbank/backend-selector.js.map +1 -1
- package/dist/reasoningbank/core/consolidate.d.ts.map +1 -1
- package/dist/reasoningbank/core/consolidate.js +45 -113
- package/dist/reasoningbank/core/consolidate.js.map +1 -1
- package/dist/reasoningbank/index-new.d.ts +6 -1
- package/dist/reasoningbank/index-new.d.ts.map +1 -1
- package/dist/reasoningbank/index-new.js +6 -1
- package/dist/reasoningbank/index-new.js.map +1 -1
- package/dist/reasoningbank/index.d.ts +6 -2
- package/dist/reasoningbank/index.d.ts.map +1 -1
- package/dist/reasoningbank/index.js +6 -2
- package/dist/reasoningbank/index.js.map +1 -1
- package/dist/reasoningbank/utils/embeddings.d.ts +0 -1
- package/dist/reasoningbank/utils/embeddings.d.ts.map +1 -1
- package/dist/reasoningbank/utils/embeddings.js +26 -53
- package/dist/reasoningbank/utils/embeddings.js.map +1 -1
- package/dist/router/index.d.ts +17 -0
- package/dist/router/index.d.ts.map +1 -0
- package/dist/router/index.js +19 -0
- package/dist/router/index.js.map +1 -0
- package/dist/router/providers/onnx-local-optimized.d.ts +0 -2
- package/dist/router/providers/onnx-local-optimized.d.ts.map +1 -1
- package/dist/router/providers/onnx-local-optimized.js +0 -10
- package/dist/router/providers/onnx-local-optimized.js.map +1 -1
- package/dist/router/providers/onnx-local.d.ts +0 -1
- package/dist/router/providers/onnx-local.d.ts.map +1 -1
- package/dist/router/providers/onnx-local.js +5 -22
- package/dist/router/providers/onnx-local.js.map +1 -1
- package/dist/services/embedding-service.js.map +1 -1
- package/dist/services/sona-agent-training.d.ts +0 -1
- package/dist/services/sona-agent-training.d.ts.map +1 -1
- package/dist/services/sona-agent-training.js.map +1 -1
- package/dist/services/sona-agentdb-integration.d.ts.map +1 -1
- package/dist/services/sona-agentdb-integration.js +6 -9
- package/dist/services/sona-agentdb-integration.js.map +1 -1
- package/dist/services/sona-service.d.ts.map +1 -1
- package/dist/services/sona-service.js +5 -6
- package/dist/services/sona-service.js.map +1 -1
- package/dist/utils/cli.d.ts +1 -1
- package/dist/utils/cli.d.ts.map +1 -1
- package/dist/utils/cli.js +0 -21
- package/dist/utils/cli.js.map +1 -1
- package/package.json +7 -19
- package/scripts/postinstall.js +4 -45
- package/wasm/reasoningbank/reasoningbank_wasm_bg.js +2 -2
- package/wasm/reasoningbank/reasoningbank_wasm_bg.wasm +0 -0
- package/.claude/agents/.claude-flow/metrics/agent-metrics.json +0 -1
- package/.claude/agents/.claude-flow/metrics/performance.json +0 -87
- package/.claude/agents/.claude-flow/metrics/task-metrics.json +0 -10
- package/.claude/skills/.claude-flow/metrics/agent-metrics.json +0 -1
- package/.claude/skills/.claude-flow/metrics/performance.json +0 -87
- package/.claude/skills/.claude-flow/metrics/task-metrics.json +0 -10
- package/.claude/skills/agentic-flow-quickstart/skill.md +0 -69
- package/.claude/skills/hooks-automation/skill.md +0 -155
- package/.claude/skills/memory-patterns/skill.md +0 -110
- package/.claude/skills/skill-builder/.claude-flow/metrics/agent-metrics.json +0 -1
- package/.claude/skills/skill-builder/.claude-flow/metrics/performance.json +0 -87
- package/.claude/skills/skill-builder/.claude-flow/metrics/task-metrics.json +0 -10
- package/.claude/skills/sparc-methodology/skill.md +0 -137
- package/.claude/skills/swarm-coordination/skill.md +0 -94
- package/.claude/skills/worker-benchmarks/skill.md +0 -135
- package/.claude/skills/worker-integration/skill.md +0 -154
- package/.claude/statusline.mjs +0 -109
- package/.claude/statusline.sh +0 -71
- package/dist/agentdb/benchmarks/comprehensive-benchmark.js +0 -664
- package/dist/agentdb/benchmarks/frontier-benchmark.js +0 -419
- package/dist/agentdb/benchmarks/reflexion-benchmark.js +0 -370
- package/dist/agentdb/cli/agentdb-cli.js +0 -717
- package/dist/agentdb/controllers/CausalMemoryGraph.js +0 -322
- package/dist/agentdb/controllers/CausalRecall.js +0 -281
- package/dist/agentdb/controllers/EmbeddingService.d.ts +0 -37
- package/dist/agentdb/controllers/EmbeddingService.d.ts.map +0 -1
- package/dist/agentdb/controllers/EmbeddingService.js +0 -119
- package/dist/agentdb/controllers/EmbeddingService.js.map +0 -1
- package/dist/agentdb/controllers/ExplainableRecall.js +0 -387
- package/dist/agentdb/controllers/NightlyLearner.js +0 -382
- package/dist/agentdb/controllers/ReflexionMemory.js +0 -239
- package/dist/agentdb/controllers/SkillLibrary.js +0 -276
- package/dist/agentdb/controllers/frontier-index.js +0 -9
- package/dist/agentdb/controllers/index.js +0 -8
- package/dist/agentdb/optimizations/BatchOperations.js +0 -198
- package/dist/agentdb/optimizations/QueryOptimizer.js +0 -225
- package/dist/agentdb/optimizations/index.js +0 -7
- package/dist/agentdb/tests/frontier-features.test.js +0 -665
- package/dist/benchmarks/embeddings-benchmark.d.ts +0 -38
- package/dist/benchmarks/embeddings-benchmark.d.ts.map +0 -1
- package/dist/benchmarks/embeddings-benchmark.js +0 -282
- package/dist/benchmarks/embeddings-benchmark.js.map +0 -1
- package/dist/cli/commands/embeddings.d.ts +0 -12
- package/dist/cli/commands/embeddings.d.ts.map +0 -1
- package/dist/cli/commands/embeddings.js +0 -386
- package/dist/cli/commands/embeddings.js.map +0 -1
- package/dist/cli/commands/init.d.ts +0 -8
- package/dist/cli/commands/init.d.ts.map +0 -1
- package/dist/cli/commands/init.js +0 -514
- package/dist/cli/commands/init.js.map +0 -1
- package/dist/cli/commands/workers.d.ts +0 -9
- package/dist/cli/commands/workers.d.ts.map +0 -1
- package/dist/cli/commands/workers.js +0 -991
- package/dist/cli/commands/workers.js.map +0 -1
- package/dist/cli/skills-manager.js +0 -1297
- package/dist/cli/update-message.js +0 -175
- package/dist/embeddings/index.d.ts +0 -17
- package/dist/embeddings/index.d.ts.map +0 -1
- package/dist/embeddings/index.js +0 -17
- package/dist/embeddings/index.js.map +0 -1
- package/dist/embeddings/neural-substrate.d.ts +0 -206
- package/dist/embeddings/neural-substrate.d.ts.map +0 -1
- package/dist/embeddings/neural-substrate.js +0 -629
- package/dist/embeddings/neural-substrate.js.map +0 -1
- package/dist/embeddings/optimized-embedder.d.ts +0 -103
- package/dist/embeddings/optimized-embedder.d.ts.map +0 -1
- package/dist/embeddings/optimized-embedder.js +0 -730
- package/dist/embeddings/optimized-embedder.js.map +0 -1
- package/dist/examples/embedding-geometry.d.ts +0 -105
- package/dist/examples/embedding-geometry.d.ts.map +0 -1
- package/dist/examples/embedding-geometry.js +0 -528
- package/dist/examples/embedding-geometry.js.map +0 -1
- package/dist/memory/SharedMemoryPool.d.ts +0 -129
- package/dist/memory/SharedMemoryPool.d.ts.map +0 -1
- package/dist/memory/SharedMemoryPool.js +0 -243
- package/dist/memory/SharedMemoryPool.js.map +0 -1
- package/dist/memory/index.d.ts +0 -8
- package/dist/memory/index.d.ts.map +0 -1
- package/dist/memory/index.js +0 -7
- package/dist/memory/index.js.map +0 -1
- package/dist/proxy/http3-proxy-old.js +0 -331
- package/dist/proxy/proxy/anthropic-to-gemini.js +0 -439
- package/dist/proxy/utils/logger.js +0 -59
- package/dist/reasoningbank/agentdb-adapter.js +0 -125
- package/dist/reasoningbank/core/database.js +0 -250
- package/dist/reasoningbank/core/memory-engine.js +0 -335
- package/dist/swarm/ipfs-swarm.d.ts +0 -265
- package/dist/swarm/ipfs-swarm.d.ts.map +0 -1
- package/dist/swarm/ipfs-swarm.js +0 -508
- package/dist/swarm/ipfs-swarm.js.map +0 -1
- package/dist/swarm/p2p-free-swarm.d.ts +0 -344
- package/dist/swarm/p2p-free-swarm.d.ts.map +0 -1
- package/dist/swarm/p2p-free-swarm.js +0 -603
- package/dist/swarm/p2p-free-swarm.js.map +0 -1
- package/dist/swarm/real-p2p-swarm.d.ts +0 -183
- package/dist/swarm/real-p2p-swarm.d.ts.map +0 -1
- package/dist/swarm/real-p2p-swarm.js +0 -469
- package/dist/swarm/real-p2p-swarm.js.map +0 -1
- package/dist/utils/adaptive-pool-sizing.js +0 -414
- package/dist/utils/agentdbCommands.js +0 -175
- package/dist/utils/circular-rate-limiter.js +0 -391
- package/dist/utils/dynamic-compression.js +0 -298
- package/dist/utils/http2-multiplexing.js +0 -319
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -6
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/lazy-auth.js +0 -311
- package/dist/utils/model-cache.d.ts +0 -61
- package/dist/utils/model-cache.d.ts.map +0 -1
- package/dist/utils/model-cache.js +0 -176
- package/dist/utils/model-cache.js.map +0 -1
- package/dist/utils/server-push.js +0 -251
- package/dist/utils/suppress-warnings.d.ts +0 -19
- package/dist/utils/suppress-warnings.d.ts.map +0 -1
- package/dist/utils/suppress-warnings.js +0 -59
- package/dist/utils/suppress-warnings.js.map +0 -1
- package/dist/utils/zero-copy-buffer.js +0 -286
- package/dist/workers/consolidated-phases.d.ts +0 -40
- package/dist/workers/consolidated-phases.d.ts.map +0 -1
- package/dist/workers/consolidated-phases.js +0 -497
- package/dist/workers/consolidated-phases.js.map +0 -1
- package/dist/workers/custom-worker-config.d.ts +0 -133
- package/dist/workers/custom-worker-config.d.ts.map +0 -1
- package/dist/workers/custom-worker-config.js +0 -215
- package/dist/workers/custom-worker-config.js.map +0 -1
- package/dist/workers/custom-worker-factory.d.ts +0 -89
- package/dist/workers/custom-worker-factory.d.ts.map +0 -1
- package/dist/workers/custom-worker-factory.js +0 -404
- package/dist/workers/custom-worker-factory.js.map +0 -1
- package/dist/workers/dispatch-service.d.ts +0 -123
- package/dist/workers/dispatch-service.d.ts.map +0 -1
- package/dist/workers/dispatch-service.js +0 -1024
- package/dist/workers/dispatch-service.js.map +0 -1
- package/dist/workers/hooks-integration.d.ts +0 -79
- package/dist/workers/hooks-integration.d.ts.map +0 -1
- package/dist/workers/hooks-integration.js +0 -286
- package/dist/workers/hooks-integration.js.map +0 -1
- package/dist/workers/index.d.ts +0 -42
- package/dist/workers/index.d.ts.map +0 -1
- package/dist/workers/index.js +0 -52
- package/dist/workers/index.js.map +0 -1
- package/dist/workers/mcp-tools.d.ts +0 -56
- package/dist/workers/mcp-tools.d.ts.map +0 -1
- package/dist/workers/mcp-tools.js +0 -359
- package/dist/workers/mcp-tools.js.map +0 -1
- package/dist/workers/phase-executors.d.ts +0 -22
- package/dist/workers/phase-executors.d.ts.map +0 -1
- package/dist/workers/phase-executors.js +0 -445
- package/dist/workers/phase-executors.js.map +0 -1
- package/dist/workers/resource-governor.d.ts +0 -75
- package/dist/workers/resource-governor.d.ts.map +0 -1
- package/dist/workers/resource-governor.js +0 -187
- package/dist/workers/resource-governor.js.map +0 -1
- package/dist/workers/ruvector-integration.d.ts +0 -163
- package/dist/workers/ruvector-integration.d.ts.map +0 -1
- package/dist/workers/ruvector-integration.js +0 -543
- package/dist/workers/ruvector-integration.js.map +0 -1
- package/dist/workers/ruvector-native-integration.d.ts +0 -91
- package/dist/workers/ruvector-native-integration.d.ts.map +0 -1
- package/dist/workers/ruvector-native-integration.js +0 -254
- package/dist/workers/ruvector-native-integration.js.map +0 -1
- package/dist/workers/trigger-detector.d.ts +0 -68
- package/dist/workers/trigger-detector.d.ts.map +0 -1
- package/dist/workers/trigger-detector.js +0 -281
- package/dist/workers/trigger-detector.js.map +0 -1
- package/dist/workers/types.d.ts +0 -145
- package/dist/workers/types.d.ts.map +0 -1
- package/dist/workers/types.js +0 -6
- package/dist/workers/types.js.map +0 -1
- package/dist/workers/worker-agent-integration.d.ts +0 -140
- package/dist/workers/worker-agent-integration.d.ts.map +0 -1
- package/dist/workers/worker-agent-integration.js +0 -471
- package/dist/workers/worker-agent-integration.js.map +0 -1
- package/dist/workers/worker-benchmarks.d.ts +0 -88
- package/dist/workers/worker-benchmarks.d.ts.map +0 -1
- package/dist/workers/worker-benchmarks.js +0 -452
- package/dist/workers/worker-benchmarks.js.map +0 -1
- package/dist/workers/worker-registry.d.ts +0 -85
- package/dist/workers/worker-registry.d.ts.map +0 -1
- package/dist/workers/worker-registry.js +0 -547
- package/dist/workers/worker-registry.js.map +0 -1
- package/docs/.claude-flow/metrics/agent-metrics.json +0 -1
- package/docs/.claude-flow/metrics/performance.json +0 -87
- package/docs/.claude-flow/metrics/task-metrics.json +0 -10
- package/docs/embeddings/EMBEDDING_GEOMETRY.md +0 -935
- /package/.claude/agents/analysis/{analyze-code-quality.md ā code-review/analyze-code-quality.md} +0 -0
- /package/.claude/agents/architecture/{arch-system-design.md ā system-design/arch-system-design.md} +0 -0
- /package/.claude/agents/data/{data-ml-model.md ā ml/data-ml-model.md} +0 -0
- /package/.claude/agents/development/{dev-backend-api.md ā backend/dev-backend-api.md} +0 -0
- /package/.claude/agents/devops/{ops-cicd-github.md ā ci-cd/ops-cicd-github.md} +0 -0
- /package/.claude/agents/documentation/{docs-api-openapi.md ā api-docs/docs-api-openapi.md} +0 -0
- /package/.claude/agents/specialized/{spec-mobile-react-native.md ā mobile/spec-mobile-react-native.md} +0 -0
- /package/.claude/agents/testing/{tdd-london-swarm.md ā unit/tdd-london-swarm.md} +0 -0
- /package/.claude/agents/testing/{production-validator.md ā validation/production-validator.md} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/cli/commands/hooks.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,IAAI,M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AAC;AAED,eAAe,kBAAkB,CAAC;AAElC,oCAAoC;AACpC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACpE,IAAI,WAAW,EAAE,CAAC;IAChB,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC","sourcesContent":["#!/usr/bin/env node\n/**\n * CLI Hooks Commands\n * Provides CLI interface for agentic-flow hook tools\n *\n * NOW WITH FULL RUVECTOR INTELLIGENCE:\n * - @ruvector/sona: Micro-LoRA (~0.05ms), EWC++, Trajectory tracking\n * - @ruvector/attention: MoE, Flash, Hyperbolic, Graph attention\n * - ruvector core: HNSW indexing (150x faster)\n *\n * Available as BOTH:\n * 1. CLI Commands (agentic-flow hooks ...)\n * 2. MCP Tools (via hooks-server.ts)\n */\n\nimport { Command } from 'commander';\nimport * as path from 'path';\n\n// Import hook tools\nimport { hookPreEditTool } from '../../mcp/fastmcp/tools/hooks/pre-edit.js';\nimport { hookPostEditTool } from '../../mcp/fastmcp/tools/hooks/post-edit.js';\nimport { hookPreCommandTool } from '../../mcp/fastmcp/tools/hooks/pre-command.js';\nimport { hookPostCommandTool } from '../../mcp/fastmcp/tools/hooks/post-command.js';\nimport { hookRouteTool } from '../../mcp/fastmcp/tools/hooks/route.js';\nimport { hookExplainTool } from '../../mcp/fastmcp/tools/hooks/explain.js';\nimport { hookPretrainTool } from '../../mcp/fastmcp/tools/hooks/pretrain.js';\nimport { hookBuildAgentsTool } from '../../mcp/fastmcp/tools/hooks/build-agents.js';\nimport { hookMetricsTool } from '../../mcp/fastmcp/tools/hooks/metrics.js';\nimport { hookTransferTool } from '../../mcp/fastmcp/tools/hooks/transfer.js';\n\n// Import intelligence tools (RuVector SONA + Attention + HNSW)\nimport {\n intelligenceRouteTool,\n intelligenceTrajectoryStartTool,\n intelligenceTrajectoryStepTool,\n intelligenceTrajectoryEndTool,\n intelligencePatternStoreTool,\n intelligencePatternSearchTool,\n intelligenceStatsTool,\n intelligenceLearnTool,\n intelligenceAttentionTool\n} from '../../mcp/fastmcp/tools/hooks/intelligence-tools.js';\n\nconst mockContext = {\n onProgress: (update: { progress: number; message: string }) => {\n if (process.env.VERBOSE) {\n console.log(`[${Math.round(update.progress * 100)}%] ${update.message}`);\n }\n }\n};\n\nexport function createHooksCommand(): Command {\n const hooks = new Command('hooks')\n .description('Self-learning intelligence hooks for agent routing and optimization')\n .addHelpCommand(true) // Enable 'hooks help <subcommand>'\n .action(() => {\n // Default action when no subcommand provided - show help\n hooks.outputHelp();\n });\n\n // Pre-edit hook\n hooks\n .command('pre-edit <filePath>')\n .description('Get context and agent suggestion before editing a file')\n .option('-t, --task <task>', 'Task description')\n .option('-j, --json', 'Output as JSON')\n .action(async (filePath: string, options: { task?: string; json?: boolean }) => {\n try {\n const result = await hookPreEditTool.execute(\n { filePath, task: options.task },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nšÆ Suggested Agent: ${result.suggestedAgent}`);\n console.log(`š Confidence: ${(result.confidence * 100).toFixed(1)}%`);\n if (result.relatedFiles?.length > 0) {\n console.log(`š Related Files:`);\n result.relatedFiles.forEach((f: string) => console.log(` - ${f}`));\n }\n console.log(`ā±ļø Latency: ${result.latencyMs}ms`);\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Post-edit hook\n hooks\n .command('post-edit <filePath>')\n .description('Record edit outcome for learning')\n .option('-s, --success', 'Mark as successful edit')\n .option('-f, --fail', 'Mark as failed edit')\n .option('-a, --agent <agent>', 'Agent that performed the edit')\n .option('-d, --duration <ms>', 'Edit duration in milliseconds', parseInt)\n .option('-e, --error <message>', 'Error message if failed')\n .option('-j, --json', 'Output as JSON')\n .action(async (filePath: string, options: {\n success?: boolean;\n fail?: boolean;\n agent?: string;\n duration?: number;\n error?: string;\n json?: boolean;\n }) => {\n try {\n const success = options.success || !options.fail;\n const result = await hookPostEditTool.execute(\n {\n filePath,\n success,\n agent: options.agent,\n duration: options.duration,\n errorMessage: options.error\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\n${success ? 'ā
' : 'ā'} Edit recorded: ${filePath}`);\n console.log(`š Pattern updated: ${result.newPatternValue?.toFixed(2) || 'N/A'}`);\n console.log(`š Routing accuracy: ${(result.routingAccuracy * 100).toFixed(1)}%`);\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Pre-command hook\n hooks\n .command('pre-command <command>')\n .description('Assess command risk before execution')\n .option('-j, --json', 'Output as JSON')\n .action(async (command: string, options: { json?: boolean }) => {\n try {\n const result = await hookPreCommandTool.execute({ command }, mockContext);\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n const riskIcon = result.blocked ? 'š«' :\n result.riskCategory === 'safe' ? 'ā
' :\n result.riskCategory === 'caution' ? 'ā ļø' : 'ā';\n console.log(`\\n${riskIcon} Risk Level: ${result.riskCategory.toUpperCase()} (${(result.riskLevel * 100).toFixed(0)}%)`);\n if (result.blocked) {\n console.log(`š« Command BLOCKED - dangerous operation detected`);\n } else if (result.approved) {\n console.log(`ā
Command APPROVED`);\n }\n if (result.suggestions?.length > 0) {\n console.log(`š” Suggestions:`);\n result.suggestions.forEach((s: string) => console.log(` - ${s}`));\n }\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Post-command hook\n hooks\n .command('post-command <command>')\n .description('Record command outcome for learning')\n .option('-c, --exit-code <code>', 'Exit code', parseInt, 0)\n .option('-o, --stdout <output>', 'Command stdout')\n .option('-e, --stderr <error>', 'Command stderr')\n .option('-j, --json', 'Output as JSON')\n .action(async (command: string, options: {\n exitCode?: number;\n stdout?: string;\n stderr?: string;\n json?: boolean;\n }) => {\n try {\n const result = await hookPostCommandTool.execute(\n {\n command,\n exitCode: options.exitCode ?? 0,\n stdout: options.stdout,\n stderr: options.stderr\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\n${result.commandSuccess ? 'ā
' : 'ā'} Command outcome recorded`);\n console.log(`š Learned: ${result.learned ? 'Yes' : 'No'}`);\n if (result.errorType) {\n console.log(`š Error type: ${result.errorType}`);\n }\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Route hook\n hooks\n .command('route <task>')\n .description('Route task to optimal agent using learned patterns')\n .option('-f, --file <filePath>', 'Context file path')\n .option('-e, --explore', 'Enable exploration mode')\n .option('-j, --json', 'Output as JSON')\n .action(async (task: string, options: {\n file?: string;\n explore?: boolean;\n json?: boolean;\n }) => {\n try {\n const result = await hookRouteTool.execute(\n {\n task,\n context: options.file ? { file: options.file } : undefined,\n explore: options.explore\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nšÆ Recommended Agent: ${result.agent}`);\n console.log(`š Confidence: ${(result.confidence * 100).toFixed(1)}%`);\n if (result.explored) {\n console.log(`š Exploration mode: Active`);\n }\n console.log(`\\nš Routing Factors:`);\n result.factors.forEach((f: { name: string; score: number }) => {\n console.log(` ⢠${f.name}: ${(f.score * 100).toFixed(0)}%`);\n });\n if (result.alternatives?.length > 0) {\n console.log(`\\nš Alternatives:`);\n result.alternatives.forEach((a: { agent: string; score: number }) => {\n console.log(` - ${a.agent} (${(a.score * 100).toFixed(0)}%)`);\n });\n }\n console.log(`\\nā±ļø Latency: ${result.latencyMs}ms`);\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Explain hook\n hooks\n .command('explain <task>')\n .description('Explain routing decision with full transparency')\n .option('-f, --file <filePath>', 'Context file path')\n .option('-j, --json', 'Output as JSON')\n .action(async (task: string, options: {\n file?: string;\n json?: boolean;\n }) => {\n try {\n const result = await hookExplainTool.execute(\n { task, file: options.file },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš Summary: ${result.summary}`);\n console.log(`\\nšÆ Recommended: ${result.recommendedAgent}`);\n console.log(`\\nš” Reasons:`);\n result.reasons.forEach((r: string) => console.log(` ⢠${r}`));\n console.log(`\\nš Agent Ranking:`);\n result.ranking.forEach((r: { rank: number; agent: string; score: number }) => {\n console.log(` ${r.rank}. ${r.agent} - ${(r.score * 100).toFixed(1)}%`);\n });\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Pretrain hook\n hooks\n .command('pretrain')\n .description('Analyze repository to bootstrap intelligence')\n .option('-d, --depth <n>', 'Git history depth', parseInt, 50)\n .option('--skip-git', 'Skip git history analysis')\n .option('--skip-files', 'Skip file structure analysis')\n .option('-j, --json', 'Output as JSON')\n .action(async (options: {\n depth?: number;\n skipGit?: boolean;\n skipFiles?: boolean;\n json?: boolean;\n }) => {\n try {\n console.log('š§ Analyzing repository...\\n');\n const result = await hookPretrainTool.execute(\n {\n depth: options.depth ?? 50,\n skipGit: options.skipGit ?? false,\n skipFiles: options.skipFiles ?? false\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš Pretrain Complete!`);\n console.log(` š Files analyzed: ${result.filesAnalyzed}`);\n console.log(` š§© Patterns created: ${result.patternsCreated}`);\n console.log(` š¾ Memories stored: ${result.memoriesStored}`);\n console.log(` š Co-edits found: ${result.coEditsFound || 0}`);\n if (result.languages?.length > 0) {\n console.log(` š Languages: ${result.languages.join(', ')}`);\n }\n console.log(` ā±ļø Duration: ${result.durationMs}ms`);\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Build-agents hook\n hooks\n .command('build-agents')\n .description('Generate optimized agent configurations from pretrain data')\n .option('-f, --focus <mode>', 'Focus mode: quality|speed|security|testing|fullstack', 'quality')\n .option('-o, --output <dir>', 'Output directory', '.claude/agents')\n .option('--format <fmt>', 'Output format: yaml|json', 'yaml')\n .option('--no-prompts', 'Exclude system prompts')\n .option('-j, --json', 'Output as JSON')\n .action(async (options: {\n focus?: string;\n output?: string;\n format?: string;\n prompts?: boolean;\n json?: boolean;\n }) => {\n try {\n console.log(`šļø Building agents with focus: ${options.focus}...\\n`);\n const result = await hookBuildAgentsTool.execute(\n {\n focus: options.focus as 'quality' | 'speed' | 'security' | 'testing' | 'fullstack',\n output: options.output,\n format: options.format as 'yaml' | 'json',\n includePrompts: options.prompts !== false\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nā
Agents Generated!`);\n console.log(` š¦ Total: ${result.agentsGenerated}`);\n console.log(` š Output: ${result.outputDir}`);\n console.log(` šÆ Focus: ${result.focus}`);\n console.log(`\\n Agents created:`);\n result.agents.forEach((a: string) => console.log(` ⢠${a}`));\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Metrics hook\n hooks\n .command('metrics')\n .alias('stats')\n .description('View learning metrics and performance dashboard')\n .option('-t, --timeframe <period>', 'Timeframe: 1h|24h|7d|30d', '24h')\n .option('-d, --detailed', 'Show detailed metrics')\n .option('-j, --json', 'Output as JSON')\n .action(async (options: {\n timeframe?: string;\n detailed?: boolean;\n json?: boolean;\n }) => {\n try {\n const result = await hookMetricsTool.execute(\n {\n timeframe: options.timeframe as '1h' | '24h' | '7d' | '30d',\n detailed: options.detailed\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš Learning Metrics (${options.timeframe || '24h'})\\n`);\n console.log(`šÆ Routing:`);\n console.log(` Total routes: ${result.routing.total}`);\n console.log(` Successful: ${result.routing.successful}`);\n console.log(` Accuracy: ${(result.routing.accuracy * 100).toFixed(1)}%`);\n\n console.log(`\\nš Learning:`);\n console.log(` Patterns: ${result.learning.patterns}`);\n console.log(` Memories: ${result.learning.memories}`);\n console.log(` Error patterns: ${result.learning.errorPatterns}`);\n\n console.log(`\\nš Health: ${result.health.status.toUpperCase()}`);\n if (result.health.issues?.length > 0) {\n console.log(` Issues:`);\n result.health.issues.forEach((i: string) => console.log(` ā ļø ${i}`));\n }\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Transfer hook\n hooks\n .command('transfer <sourceProject>')\n .description('Transfer learned patterns from another project')\n .option('-c, --min-confidence <n>', 'Minimum confidence threshold', parseFloat, 0.7)\n .option('-m, --max-patterns <n>', 'Maximum patterns to transfer', parseInt, 50)\n .option('--mode <mode>', 'Transfer mode: merge|replace|additive', 'merge')\n .option('-j, --json', 'Output as JSON')\n .action(async (sourceProject: string, options: {\n minConfidence?: number;\n maxPatterns?: number;\n mode?: string;\n json?: boolean;\n }) => {\n try {\n console.log(`š¤ Transferring patterns from: ${sourceProject}...\\n`);\n const result = await hookTransferTool.execute(\n {\n sourceProject,\n minConfidence: options.minConfidence,\n maxPatterns: options.maxPatterns,\n mode: options.mode as 'merge' | 'replace' | 'additive'\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nā
Transfer Complete!`);\n console.log(` š„ Patterns transferred: ${result.transferred}`);\n console.log(` š Patterns adapted: ${result.adapted}`);\n console.log(` šÆ Mode: ${result.mode}`);\n if (result.targetStack?.length > 0) {\n console.log(` š ļø Target stack: ${result.targetStack.join(', ')}`);\n }\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Init command (creates .claude/settings.json with hooks)\n hooks\n .command('init')\n .description('Initialize hooks in project with .claude/settings.json')\n .option('--minimal', 'Minimal configuration')\n .option('--force', 'Overwrite existing configuration')\n .option('--no-statusline', 'Skip statusline generation')\n .action(async (options: { minimal?: boolean; force?: boolean; statusline?: boolean }) => {\n try {\n const fs = await import('fs');\n const settingsPath = path.join(process.cwd(), '.claude', 'settings.json');\n const statuslinePath = path.join(process.cwd(), '.claude', 'statusline.mjs');\n const claudeDir = path.dirname(settingsPath);\n\n // Check if exists\n if (fs.existsSync(settingsPath) && !options.force) {\n console.log('ā ļø Settings file already exists. Use --force to overwrite.');\n return;\n }\n\n // Create .claude directory\n if (!fs.existsSync(claudeDir)) {\n fs.mkdirSync(claudeDir, { recursive: true });\n }\n\n // Create statusline.mjs (compact colored format with agent stats)\n if (options.statusline !== false) {\n const statuslineContent = `#!/usr/bin/env node\n// Agentic Flow Intelligence Status Line - Compact Format with Colors\n// Works on Windows, Mac, and Linux - Queries SQLite for real stats\n\nimport { readFileSync, statSync, existsSync } from 'fs';\nimport { execSync } from 'child_process';\n\nconst INTEL_FILE = '.agentic-flow/intelligence.json';\nconst INTEL_DB = '.agentic-flow/intelligence.db';\n\n// Detect dark/light mode\nconst isDarkMode = (() => {\n const colorScheme = process.env.COLORFGBG || '';\n const termBg = process.env.TERM_BACKGROUND || '';\n const vscodeTheme = process.env.VSCODE_TERMINAL_COLOR_THEME || '';\n if (termBg === 'light') return false;\n if (vscodeTheme.toLowerCase().includes('light')) return false;\n if (colorScheme.startsWith('0;') || colorScheme.includes(';15')) return false;\n if (process.env.CLAUDE_CODE_THEME === 'light') return false;\n return true;\n})();\n\n// Color palettes\nconst colors = {\n dark: {\n reset: '\\\\x1b[0m', dim: '\\\\x1b[2m', bold: '\\\\x1b[1m',\n model: '\\\\x1b[38;5;208m', project: '\\\\x1b[38;5;39m', branch: '\\\\x1b[38;5;156m',\n brain: '\\\\x1b[38;5;213m', patterns: '\\\\x1b[38;5;220m', memory: '\\\\x1b[38;5;117m',\n trajectories: '\\\\x1b[38;5;183m', agents: '\\\\x1b[38;5;156m',\n target: '\\\\x1b[38;5;196m', learning: '\\\\x1b[38;5;226m', epsilon: '\\\\x1b[38;5;51m',\n success: '\\\\x1b[38;5;46m', symbol: '\\\\x1b[38;5;245m'\n },\n light: {\n reset: '\\\\x1b[0m', dim: '\\\\x1b[2m', bold: '\\\\x1b[1m',\n model: '\\\\x1b[38;5;166m', project: '\\\\x1b[38;5;27m', branch: '\\\\x1b[38;5;28m',\n brain: '\\\\x1b[38;5;129m', patterns: '\\\\x1b[38;5;136m', memory: '\\\\x1b[38;5;30m',\n trajectories: '\\\\x1b[38;5;91m', agents: '\\\\x1b[38;5;28m',\n target: '\\\\x1b[38;5;160m', learning: '\\\\x1b[38;5;136m', epsilon: '\\\\x1b[38;5;31m',\n success: '\\\\x1b[38;5;28m', symbol: '\\\\x1b[38;5;240m'\n }\n};\nconst c = isDarkMode ? colors.dark : colors.light;\n\nfunction readJson(file) {\n try { return JSON.parse(readFileSync(file, 'utf8')); } catch { return null; }\n}\n\nfunction querySqlite(db, sql) {\n try {\n return execSync(\\`sqlite3 \"\\${db}\" \"\\${sql}\"\\`, { encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'], timeout: 1000 }).trim();\n } catch { return null; }\n}\n\nfunction getGitBranch() {\n try { return execSync('git branch --show-current', { encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] }).trim(); }\n catch { return ''; }\n}\n\nfunction getProjectName() {\n try { return process.cwd().split('/').pop() || 'project'; } catch { return 'project'; }\n}\n\nfunction formatSize(bytes) {\n if (bytes < 1024) return \\`\\${bytes}B\\`;\n if (bytes < 1024 * 1024) return \\`\\${Math.round(bytes / 1024)}K\\`;\n return \\`\\${(bytes / (1024 * 1024)).toFixed(1)}M\\`;\n}\n\nconst LEARNING_RATE = parseFloat(process.env.AGENTIC_FLOW_LEARNING_RATE || '0.1');\nconst EPSILON = parseFloat(process.env.AGENTIC_FLOW_EPSILON || '0.1');\n\nconst intel = readJson(INTEL_FILE);\nlet dbStats = { totalTrajectories: 0, successfulRoutings: 0, totalRoutings: 0, totalPatterns: 0, totalAgents: 0, activeAgents: 0 };\n\nif (existsSync(INTEL_DB)) {\n const statsRow = querySqlite(INTEL_DB, 'SELECT * FROM stats LIMIT 1');\n if (statsRow) {\n const cols = statsRow.split('|');\n dbStats.totalTrajectories = parseInt(cols[1]) || 0;\n dbStats.totalRoutings = parseInt(cols[3]) || 0;\n dbStats.successfulRoutings = parseInt(cols[4]) || 0;\n dbStats.totalPatterns = parseInt(cols[5]) || 0;\n }\n const trajCount = querySqlite(INTEL_DB, 'SELECT COUNT(*) FROM trajectories');\n if (trajCount) dbStats.totalTrajectories = parseInt(trajCount) || dbStats.totalTrajectories;\n const patternCount = querySqlite(INTEL_DB, 'SELECT COUNT(*) FROM patterns');\n if (patternCount) dbStats.totalPatterns = parseInt(patternCount) || 0;\n}\n\nconst routes = dbStats.totalRoutings > 0 ? dbStats.totalRoutings : (intel?.metrics?.totalRoutes || 0);\nconst patterns = dbStats.totalPatterns > 0 ? dbStats.totalPatterns : (intel?.patterns ? Object.keys(intel.patterns).length : 0);\nconst memories = intel?.memories?.length || 0;\nconst trajectories = dbStats.totalTrajectories;\n\nlet agents = intel?.agents ? Object.keys(intel.agents).length : 66;\nlet activeAgents = intel?.agents ? Object.values(intel.agents).filter(a => a.status === 'active').length : 0;\n\nconst branch = getGitBranch();\nconst project = getProjectName();\n\nlet dbSize = 0;\nif (existsSync(INTEL_DB)) {\n try { dbSize = statSync(INTEL_DB).size; } catch {}\n}\n\nconst lines = [];\n\n// Line 1: Model + project + branch (colored)\nlet line1 = \\`\\${c.model}\\${c.bold}Opus 4.5\\${c.reset}\\`;\nline1 += \\` \\${c.dim}in\\${c.reset} \\${c.project}\\${project}\\${c.reset}\\`;\nif (branch) line1 += \\` \\${c.dim}on\\${c.reset} \\${c.symbol}ā\\${c.reset} \\${c.branch}\\${branch}\\${c.reset}\\`;\nlines.push(line1);\n\n// Line 2: RuVector stats (compact with symbols)\nlet line2 = \\`\\${c.brain}š§ RuVector\\${c.reset}\\`;\nline2 += \\` \\${c.symbol}ā\\${c.reset} \\${c.patterns}\\${patterns}\\${c.reset} \\${c.dim}patterns\\${c.reset}\\`;\nif (memories > 0 || dbSize > 0) {\n line2 += \\` \\${c.symbol}⬔\\${c.reset} \\${c.memory}\\${memories > 0 ? memories : formatSize(dbSize)}\\${c.reset} \\${c.dim}mem\\${c.reset}\\`;\n}\nif (trajectories > 0) line2 += \\` \\${c.symbol}ā\\${c.reset}\\${c.trajectories}\\${trajectories}\\${c.reset}\\`;\nif (agents > 0) line2 += \\` \\${c.symbol}#\\${c.reset}\\${c.agents}\\${activeAgents > 0 ? activeAgents + '/' : ''}\\${agents}\\${c.reset}\\`;\nlines.push(line2);\n\n// Line 3: Routing info (compact)\nconst lrPercent = Math.round(LEARNING_RATE * 100);\nconst epsPercent = Math.round(EPSILON * 100);\nlet line3 = \\`\\${c.target}šÆ Routing\\${c.reset} \\${c.dim}q-learning\\${c.reset}\\`;\nline3 += \\` \\${c.learning}lr:\\${lrPercent}%\\${c.reset} \\${c.epsilon}ε:\\${epsPercent}%\\${c.reset}\\`;\nif (routes > 0) {\n const successRate = dbStats.successfulRoutings > 0 ? Math.round((dbStats.successfulRoutings / routes) * 100) : 100;\n line3 += \\` \\${c.symbol}|\\${c.reset} \\${c.success}\\${successRate}% ā\\${c.reset}\\`;\n}\nlines.push(line3);\n\nconsole.log(lines.join('\\\\n'));\n`;\n fs.writeFileSync(statuslinePath, statuslineContent);\n console.log(` š Created: ${statuslinePath}`);\n }\n\n // Create settings with full capabilities\n const settings = {\n env: {\n AGENTIC_FLOW_INTELLIGENCE: 'true',\n AGENTIC_FLOW_LEARNING_RATE: '0.1',\n AGENTIC_FLOW_MEMORY_BACKEND: 'agentdb',\n AGENTIC_FLOW_WORKERS_ENABLED: 'true',\n AGENTIC_FLOW_MAX_WORKERS: '10'\n },\n hooks: {\n PreToolUse: [\n {\n matcher: 'Edit|Write',\n hooks: [\n {\n type: 'command',\n command: 'npx agentic-flow hooks pre-edit \"$TOOL_INPUT_file_path\"'\n }\n ]\n },\n {\n matcher: 'Bash',\n hooks: [\n {\n type: 'command',\n command: 'npx agentic-flow hooks pre-command \"$TOOL_INPUT_command\"'\n }\n ]\n }\n ],\n PostToolUse: [\n {\n matcher: 'Edit|Write',\n hooks: [\n {\n type: 'command',\n command: 'npx agentic-flow hooks post-edit \"$TOOL_INPUT_file_path\" --success'\n }\n ]\n }\n ],\n PostToolUseFailure: [\n {\n matcher: 'Edit|Write',\n hooks: [\n {\n type: 'command',\n command: 'npx agentic-flow hooks post-edit \"$TOOL_INPUT_file_path\" --fail --error \"$ERROR_MESSAGE\"'\n }\n ]\n }\n ],\n SessionStart: [\n {\n hooks: [\n {\n type: 'command',\n command: 'npx agentic-flow hooks intelligence stats'\n }\n ]\n },\n {\n hooks: [\n {\n type: 'command',\n command: 'npx agentic-flow workers status --active --json 2>/dev/null || true'\n }\n ]\n }\n ],\n SessionEnd: [\n {\n hooks: [\n {\n type: 'command',\n command: 'npx agentic-flow workers cleanup --age 24 2>/dev/null || true'\n }\n ]\n }\n ],\n UserPromptSubmit: [\n {\n hooks: [\n {\n type: 'command',\n timeout: 2000,\n command: 'npx agentic-flow hooks intelligence stats'\n }\n ]\n },\n {\n hooks: [\n {\n type: 'command',\n timeout: 5000,\n background: true,\n command: 'npx agentic-flow workers dispatch-prompt \"$USER_PROMPT\" --session \"$SESSION_ID\" --json 2>/dev/null || true'\n }\n ]\n }\n ]\n },\n permissions: {\n allow: [\n 'Bash(npx:*)',\n 'Bash(agentic-flow:*)',\n 'Bash(npm run:*)',\n 'mcp__agentic-flow',\n 'mcp__claude-flow',\n 'mcp__ruv-swarm'\n ]\n },\n statusLine: options.statusline !== false ? {\n type: 'command',\n command: 'node .claude/statusline.mjs'\n } : undefined\n };\n\n fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));\n console.log('ā
Hooks initialized!');\n console.log(` š Created: ${settingsPath}`);\n console.log('\\nš” Next steps:');\n console.log(' 1. Run: npx agentic-flow hooks pretrain');\n console.log(' 2. Run: npx agentic-flow hooks build-agents');\n console.log(' 3. Start using Claude Code with intelligent routing!');\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // ============================================\n // RUVECTOR INTELLIGENCE COMMANDS\n // SONA Micro-LoRA + MoE Attention + HNSW\n // ============================================\n\n // Create intelligence subcommand group\n const intelligence = new Command('intelligence')\n .alias('intel')\n .description('RuVector intelligence: SONA Micro-LoRA (~0.05ms) + MoE attention + HNSW (150x faster)');\n\n // Intelligence route command\n intelligence\n .command('route <task>')\n .description('Route task using SONA + MoE + HNSW (150x faster than brute force)')\n .option('-f, --file <path>', 'File context')\n .option('-e, --error <context>', 'Error context for debugging')\n .option('-k, --top-k <n>', 'Number of candidates', parseInt, 5)\n .option('-j, --json', 'Output as JSON')\n .action(async (task: string, options: {\n file?: string;\n error?: string;\n topK?: number;\n json?: boolean;\n }) => {\n try {\n const result = await intelligenceRouteTool.execute(\n { task, file: options.file, errorContext: options.error, topK: options.topK },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nā” RuVector Intelligence Route`);\n console.log(`šÆ Agent: ${result.agent}`);\n console.log(`š Confidence: ${((result.confidence || 0) * 100).toFixed(1)}%`);\n console.log(`š§ Engine: ${result.engine}`);\n console.log(`ā±ļø Latency: ${result.latencyMs?.toFixed(2)}ms`);\n if (result.features?.length > 0) {\n console.log(`š§ Features: ${result.features.join(', ')}`);\n }\n if (result.alternatives?.length > 0) {\n console.log(`\\nš Alternatives:`);\n result.alternatives.forEach((a: any) => {\n console.log(` - ${a.agent} (${((a.confidence || 0) * 100).toFixed(1)}%)`);\n });\n }\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Trajectory start command\n intelligence\n .command('trajectory-start <task>')\n .description('Begin SONA trajectory for reinforcement learning')\n .requiredOption('-a, --agent <name>', 'Agent executing the task')\n .option('-c, --context <text>', 'Additional context')\n .option('-j, --json', 'Output as JSON')\n .action(async (task: string, options: {\n agent: string;\n context?: string;\n json?: boolean;\n }) => {\n try {\n const result = await intelligenceTrajectoryStartTool.execute(\n { task, agent: options.agent, context: options.context },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš¬ Trajectory Started`);\n console.log(`š ID: ${result.trajectoryId}`);\n console.log(`š¤ Agent: ${options.agent}`);\n console.log(`š§ Features: ${result.features?.join(', ')}`);\n console.log(`\\nš” Use this ID with trajectory-step and trajectory-end commands`);\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Trajectory step command\n intelligence\n .command('trajectory-step <trajectoryId>')\n .description('Record step in trajectory for reinforcement learning')\n .requiredOption('-a, --action <action>', 'Action taken')\n .requiredOption('-r, --reward <n>', 'Reward signal (-1 to 1)', parseFloat)\n .option('-f, --file <path>', 'File involved')\n .option('--error-fixed', 'Mark as error fix')\n .option('--test-passed', 'Mark as test passed')\n .option('-j, --json', 'Output as JSON')\n .action(async (trajectoryId: string, options: {\n action: string;\n reward: number;\n file?: string;\n errorFixed?: boolean;\n testPassed?: boolean;\n json?: boolean;\n }) => {\n try {\n const result = await intelligenceTrajectoryStepTool.execute(\n {\n trajectoryId: parseInt(trajectoryId),\n action: options.action,\n reward: options.reward,\n file: options.file,\n errorFixed: options.errorFixed,\n testPassed: options.testPassed\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš Step Recorded`);\n console.log(` Action: ${options.action}`);\n console.log(` Reward: ${options.reward}`);\n console.log(` Trajectory: ${trajectoryId}`);\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Trajectory end command\n intelligence\n .command('trajectory-end <trajectoryId>')\n .description('End trajectory and trigger SONA learning with EWC++')\n .option('-s, --success', 'Mark as successful')\n .option('-f, --fail', 'Mark as failed')\n .option('-q, --quality <n>', 'Quality score (0-1)', parseFloat, 0.8)\n .option('-j, --json', 'Output as JSON')\n .action(async (trajectoryId: string, options: {\n success?: boolean;\n fail?: boolean;\n quality?: number;\n json?: boolean;\n }) => {\n try {\n const success = options.success || !options.fail;\n const result = await intelligenceTrajectoryEndTool.execute(\n { trajectoryId: parseInt(trajectoryId), success, quality: options.quality },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš Trajectory Completed`);\n console.log(` ${success ? 'ā
Success' : 'ā Failed'}`);\n console.log(` Quality: ${(options.quality || 0.8) * 100}%`);\n console.log(` Learning: EWC++ consolidation applied`);\n if (result.learningOutcome) {\n console.log(` Outcome: ${JSON.stringify(result.learningOutcome)}`);\n }\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Pattern store command\n intelligence\n .command('pattern-store')\n .description('Store pattern in ReasoningBank (HNSW-indexed)')\n .requiredOption('-t, --task <task>', 'Task description')\n .requiredOption('-r, --resolution <text>', 'How it was resolved')\n .option('-s, --score <n>', 'Success score (0-1)', parseFloat, 0.9)\n .option('-j, --json', 'Output as JSON')\n .action(async (options: {\n task: string;\n resolution: string;\n score?: number;\n json?: boolean;\n }) => {\n try {\n const result = await intelligencePatternStoreTool.execute(\n { task: options.task, resolution: options.resolution, reward: options.score || 0.9 },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš¾ Pattern Stored`);\n console.log(` Task: ${options.task.slice(0, 50)}...`);\n console.log(` Score: ${((options.score || 0.9) * 100).toFixed(0)}%`);\n console.log(` Index: HNSW (150x faster retrieval)`);\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Pattern search command\n intelligence\n .command('pattern-search <query>')\n .description('Search ReasoningBank using HNSW (150x faster)')\n .option('-k, --top-k <n>', 'Number of results', parseInt, 5)\n .option('-m, --min-reward <n>', 'Minimum reward filter', parseFloat)\n .option('-j, --json', 'Output as JSON')\n .action(async (query: string, options: {\n topK?: number;\n minReward?: number;\n json?: boolean;\n }) => {\n try {\n const result = await intelligencePatternSearchTool.execute(\n { query, topK: options.topK, minReward: options.minReward },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš Pattern Search Results`);\n console.log(` Query: \"${query.slice(0, 50)}\"`);\n console.log(` Engine: ${result.searchEngine}`);\n console.log(` Found: ${result.count} patterns`);\n if (result.patterns?.length > 0) {\n console.log(`\\n š Results:`);\n result.patterns.forEach((p: any, i: number) => {\n console.log(` ${i + 1}. [${((p.similarity || 0) * 100).toFixed(0)}%] ${p.resolution?.slice(0, 40)}...`);\n });\n }\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Intelligence stats command\n intelligence\n .command('stats')\n .description('Get RuVector intelligence layer statistics')\n .option('-j, --json', 'Output as JSON')\n .action(async (options: { json?: boolean }) => {\n try {\n const result = await intelligenceStatsTool.execute({}, mockContext);\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš RuVector Intelligence Stats`);\n console.log(`\\nš§ SONA Engine:`);\n console.log(` Micro-LoRA: ${result.features?.sona?.microLora || 'rank-1 (~0.05ms)'}`);\n console.log(` Base-LoRA: ${result.features?.sona?.baseLora || 'rank-8'}`);\n console.log(` EWC Lambda: ${result.features?.sona?.ewcLambda || 1000.0}`);\n console.log(`\\nā” Attention:`);\n console.log(` Type: ${result.features?.attention?.type || 'moe'}`);\n console.log(` Experts: ${result.features?.attention?.experts || 4}`);\n console.log(` Top-K: ${result.features?.attention?.topK || 2}`);\n console.log(`\\nš HNSW:`);\n console.log(` Enabled: ${result.features?.hnsw?.enabled ?? true}`);\n console.log(` Speedup: ${result.features?.hnsw?.speedup || '150x vs brute-force'}`);\n console.log(`\\nš Learning:`);\n console.log(` Trajectories: ${result.persistence?.trajectories ?? result.stats?.trajectoryCount ?? 0}`);\n console.log(` Active: ${result.stats?.activeTrajectories || 0}`);\n console.log(`\\nš¾ Persistence (SQLite):`);\n console.log(` Backend: ${result.persistence?.backend || 'sqlite'}`);\n console.log(` Routings: ${result.persistence?.routings ?? 0}`);\n console.log(` Patterns: ${result.persistence?.patterns ?? 0}`);\n console.log(` Operations: ${result.persistence?.operations ?? 0}`);\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Force learning command\n intelligence\n .command('learn')\n .description('Force immediate SONA learning cycle with EWC++ consolidation')\n .option('-r, --reason <text>', 'Reason for forcing learning')\n .option('-j, --json', 'Output as JSON')\n .action(async (options: { reason?: string; json?: boolean }) => {\n try {\n const result = await intelligenceLearnTool.execute(\n { reason: options.reason },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš Learning Cycle Complete`);\n console.log(` ${result.success ? 'ā
' : 'ā'} ${result.message}`);\n console.log(` Reason: ${result.reason || 'manual trigger'}`);\n console.log(` Features: ${result.features?.join(', ')}`);\n console.log(` Latency: ${result.latencyMs?.toFixed(2)}ms`);\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Attention compute command\n intelligence\n .command('attention <query>')\n .description('Compute attention-weighted similarity using MoE/Flash/Hyperbolic')\n .requiredOption('-c, --candidates <texts...>', 'Candidate texts to score')\n .option('-t, --type <type>', 'Attention type: moe|flash|hyperbolic|graph|dual', 'moe')\n .option('-j, --json', 'Output as JSON')\n .action(async (query: string, options: {\n candidates: string[];\n type?: string;\n json?: boolean;\n }) => {\n try {\n const result = await intelligenceAttentionTool.execute(\n {\n query,\n candidates: options.candidates,\n attentionType: options.type as 'moe' | 'flash' | 'hyperbolic' | 'graph' | 'dual'\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš§ Attention Scores (${options.type || 'moe'})`);\n console.log(` Query: \"${query.slice(0, 40)}...\"`);\n console.log(`\\n š Results:`);\n result.results?.forEach((r: any, i: number) => {\n const bar = 'ā'.repeat(Math.round(r.score * 20));\n console.log(` ${i + 1}. ${bar} ${(r.score * 100).toFixed(1)}% \"${r.text}\"`);\n });\n console.log(`\\n ā±ļø Latency: ${result.latencyMs?.toFixed(2)}ms`);\n }\n process.exit(0);\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Add intelligence subcommand to hooks\n hooks.addCommand(intelligence);\n\n return hooks;\n}\n\nexport default createHooksCommand;\n\n// CLI entry point when run directly\nconst isDirectRun = import.meta.url === `file://${process.argv[1]}`;\nif (isDirectRun) {\n const hooks = createHooksCommand();\n hooks.parse(process.argv);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/cli/commands/hooks.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,oBAAoB;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OA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AAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,uCAAuC;IACvC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAE/B,OAAO,KAAK,CAAC;AACf,CAAC;AAED,eAAe,kBAAkB,CAAC","sourcesContent":["#!/usr/bin/env node\n/**\n * CLI Hooks Commands\n * Provides CLI interface for agentic-flow hook tools\n *\n * NOW WITH FULL RUVECTOR INTELLIGENCE:\n * - @ruvector/sona: Micro-LoRA (~0.05ms), EWC++, Trajectory tracking\n * - @ruvector/attention: MoE, Flash, Hyperbolic, Graph attention\n * - ruvector core: HNSW indexing (150x faster)\n *\n * Available as BOTH:\n * 1. CLI Commands (agentic-flow hooks ...)\n * 2. MCP Tools (via hooks-server.ts)\n */\n\nimport { Command } from 'commander';\nimport * as path from 'path';\n\n// Import hook tools\nimport { hookPreEditTool } from '../../mcp/fastmcp/tools/hooks/pre-edit.js';\nimport { hookPostEditTool } from '../../mcp/fastmcp/tools/hooks/post-edit.js';\nimport { hookPreCommandTool } from '../../mcp/fastmcp/tools/hooks/pre-command.js';\nimport { hookPostCommandTool } from '../../mcp/fastmcp/tools/hooks/post-command.js';\nimport { hookRouteTool } from '../../mcp/fastmcp/tools/hooks/route.js';\nimport { hookExplainTool } from '../../mcp/fastmcp/tools/hooks/explain.js';\nimport { hookPretrainTool } from '../../mcp/fastmcp/tools/hooks/pretrain.js';\nimport { hookBuildAgentsTool } from '../../mcp/fastmcp/tools/hooks/build-agents.js';\nimport { hookMetricsTool } from '../../mcp/fastmcp/tools/hooks/metrics.js';\nimport { hookTransferTool } from '../../mcp/fastmcp/tools/hooks/transfer.js';\n\n// Import intelligence tools (RuVector SONA + Attention + HNSW)\nimport {\n intelligenceRouteTool,\n intelligenceTrajectoryStartTool,\n intelligenceTrajectoryStepTool,\n intelligenceTrajectoryEndTool,\n intelligencePatternStoreTool,\n intelligencePatternSearchTool,\n intelligenceStatsTool,\n intelligenceLearnTool,\n intelligenceAttentionTool\n} from '../../mcp/fastmcp/tools/hooks/intelligence-tools.js';\n\nconst mockContext = {\n onProgress: (update: { progress: number; message: string }) => {\n if (process.env.VERBOSE) {\n console.log(`[${Math.round(update.progress * 100)}%] ${update.message}`);\n }\n }\n};\n\nexport function createHooksCommand(): Command {\n const hooks = new Command('hooks')\n .description('Self-learning intelligence hooks for agent routing and optimization');\n\n // Pre-edit hook\n hooks\n .command('pre-edit <filePath>')\n .description('Get context and agent suggestion before editing a file')\n .option('-t, --task <task>', 'Task description')\n .option('-j, --json', 'Output as JSON')\n .action(async (filePath: string, options: { task?: string; json?: boolean }) => {\n try {\n const result = await hookPreEditTool.execute(\n { filePath, task: options.task },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nšÆ Suggested Agent: ${result.suggestedAgent}`);\n console.log(`š Confidence: ${(result.confidence * 100).toFixed(1)}%`);\n if (result.relatedFiles?.length > 0) {\n console.log(`š Related Files:`);\n result.relatedFiles.forEach((f: string) => console.log(` - ${f}`));\n }\n console.log(`ā±ļø Latency: ${result.latencyMs}ms`);\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Post-edit hook\n hooks\n .command('post-edit <filePath>')\n .description('Record edit outcome for learning')\n .option('-s, --success', 'Mark as successful edit')\n .option('-f, --fail', 'Mark as failed edit')\n .option('-a, --agent <agent>', 'Agent that performed the edit')\n .option('-d, --duration <ms>', 'Edit duration in milliseconds', parseInt)\n .option('-e, --error <message>', 'Error message if failed')\n .option('-j, --json', 'Output as JSON')\n .action(async (filePath: string, options: {\n success?: boolean;\n fail?: boolean;\n agent?: string;\n duration?: number;\n error?: string;\n json?: boolean;\n }) => {\n try {\n const success = options.success || !options.fail;\n const result = await hookPostEditTool.execute(\n {\n filePath,\n success,\n agent: options.agent,\n duration: options.duration,\n errorMessage: options.error\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\n${success ? 'ā
' : 'ā'} Edit recorded: ${filePath}`);\n console.log(`š Pattern updated: ${result.newPatternValue?.toFixed(2) || 'N/A'}`);\n console.log(`š Routing accuracy: ${(result.routingAccuracy * 100).toFixed(1)}%`);\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Pre-command hook\n hooks\n .command('pre-command <command>')\n .description('Assess command risk before execution')\n .option('-j, --json', 'Output as JSON')\n .action(async (command: string, options: { json?: boolean }) => {\n try {\n const result = await hookPreCommandTool.execute({ command }, mockContext);\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n const riskIcon = result.blocked ? 'š«' :\n result.riskCategory === 'safe' ? 'ā
' :\n result.riskCategory === 'caution' ? 'ā ļø' : 'ā';\n console.log(`\\n${riskIcon} Risk Level: ${result.riskCategory.toUpperCase()} (${(result.riskLevel * 100).toFixed(0)}%)`);\n if (result.blocked) {\n console.log(`š« Command BLOCKED - dangerous operation detected`);\n } else if (result.approved) {\n console.log(`ā
Command APPROVED`);\n }\n if (result.suggestions?.length > 0) {\n console.log(`š” Suggestions:`);\n result.suggestions.forEach((s: string) => console.log(` - ${s}`));\n }\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Post-command hook\n hooks\n .command('post-command <command>')\n .description('Record command outcome for learning')\n .option('-c, --exit-code <code>', 'Exit code', parseInt, 0)\n .option('-o, --stdout <output>', 'Command stdout')\n .option('-e, --stderr <error>', 'Command stderr')\n .option('-j, --json', 'Output as JSON')\n .action(async (command: string, options: {\n exitCode?: number;\n stdout?: string;\n stderr?: string;\n json?: boolean;\n }) => {\n try {\n const result = await hookPostCommandTool.execute(\n {\n command,\n exitCode: options.exitCode ?? 0,\n stdout: options.stdout,\n stderr: options.stderr\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\n${result.commandSuccess ? 'ā
' : 'ā'} Command outcome recorded`);\n console.log(`š Learned: ${result.learned ? 'Yes' : 'No'}`);\n if (result.errorType) {\n console.log(`š Error type: ${result.errorType}`);\n }\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Route hook\n hooks\n .command('route <task>')\n .description('Route task to optimal agent using learned patterns')\n .option('-f, --file <filePath>', 'Context file path')\n .option('-e, --explore', 'Enable exploration mode')\n .option('-j, --json', 'Output as JSON')\n .action(async (task: string, options: {\n file?: string;\n explore?: boolean;\n json?: boolean;\n }) => {\n try {\n const result = await hookRouteTool.execute(\n {\n task,\n context: options.file ? { file: options.file } : undefined,\n explore: options.explore\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nšÆ Recommended Agent: ${result.agent}`);\n console.log(`š Confidence: ${(result.confidence * 100).toFixed(1)}%`);\n if (result.explored) {\n console.log(`š Exploration mode: Active`);\n }\n console.log(`\\nš Routing Factors:`);\n result.factors.forEach((f: { name: string; score: number }) => {\n console.log(` ⢠${f.name}: ${(f.score * 100).toFixed(0)}%`);\n });\n if (result.alternatives?.length > 0) {\n console.log(`\\nš Alternatives:`);\n result.alternatives.forEach((a: { agent: string; score: number }) => {\n console.log(` - ${a.agent} (${(a.score * 100).toFixed(0)}%)`);\n });\n }\n console.log(`\\nā±ļø Latency: ${result.latencyMs}ms`);\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Explain hook\n hooks\n .command('explain <task>')\n .description('Explain routing decision with full transparency')\n .option('-f, --file <filePath>', 'Context file path')\n .option('-j, --json', 'Output as JSON')\n .action(async (task: string, options: {\n file?: string;\n json?: boolean;\n }) => {\n try {\n const result = await hookExplainTool.execute(\n { task, file: options.file },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš Summary: ${result.summary}`);\n console.log(`\\nšÆ Recommended: ${result.recommendedAgent}`);\n console.log(`\\nš” Reasons:`);\n result.reasons.forEach((r: string) => console.log(` ⢠${r}`));\n console.log(`\\nš Agent Ranking:`);\n result.ranking.forEach((r: { rank: number; agent: string; score: number }) => {\n console.log(` ${r.rank}. ${r.agent} - ${(r.score * 100).toFixed(1)}%`);\n });\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Pretrain hook\n hooks\n .command('pretrain')\n .description('Analyze repository to bootstrap intelligence')\n .option('-d, --depth <n>', 'Git history depth', parseInt, 50)\n .option('--skip-git', 'Skip git history analysis')\n .option('--skip-files', 'Skip file structure analysis')\n .option('-j, --json', 'Output as JSON')\n .action(async (options: {\n depth?: number;\n skipGit?: boolean;\n skipFiles?: boolean;\n json?: boolean;\n }) => {\n try {\n console.log('š§ Analyzing repository...\\n');\n const result = await hookPretrainTool.execute(\n {\n depth: options.depth ?? 50,\n skipGit: options.skipGit ?? false,\n skipFiles: options.skipFiles ?? false\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš Pretrain Complete!`);\n console.log(` š Files analyzed: ${result.filesAnalyzed}`);\n console.log(` š§© Patterns created: ${result.patternsCreated}`);\n console.log(` š¾ Memories stored: ${result.memoriesStored}`);\n console.log(` š Co-edits found: ${result.coEditsFound || 0}`);\n if (result.languages?.length > 0) {\n console.log(` š Languages: ${result.languages.join(', ')}`);\n }\n console.log(` ā±ļø Duration: ${result.durationMs}ms`);\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Build-agents hook\n hooks\n .command('build-agents')\n .description('Generate optimized agent configurations from pretrain data')\n .option('-f, --focus <mode>', 'Focus mode: quality|speed|security|testing|fullstack', 'quality')\n .option('-o, --output <dir>', 'Output directory', '.claude/agents')\n .option('--format <fmt>', 'Output format: yaml|json', 'yaml')\n .option('--no-prompts', 'Exclude system prompts')\n .option('-j, --json', 'Output as JSON')\n .action(async (options: {\n focus?: string;\n output?: string;\n format?: string;\n prompts?: boolean;\n json?: boolean;\n }) => {\n try {\n console.log(`šļø Building agents with focus: ${options.focus}...\\n`);\n const result = await hookBuildAgentsTool.execute(\n {\n focus: options.focus as 'quality' | 'speed' | 'security' | 'testing' | 'fullstack',\n output: options.output,\n format: options.format as 'yaml' | 'json',\n includePrompts: options.prompts !== false\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nā
Agents Generated!`);\n console.log(` š¦ Total: ${result.agentsGenerated}`);\n console.log(` š Output: ${result.outputDir}`);\n console.log(` šÆ Focus: ${result.focus}`);\n console.log(`\\n Agents created:`);\n result.agents.forEach((a: string) => console.log(` ⢠${a}`));\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Metrics hook\n hooks\n .command('metrics')\n .alias('stats')\n .description('View learning metrics and performance dashboard')\n .option('-t, --timeframe <period>', 'Timeframe: 1h|24h|7d|30d', '24h')\n .option('-d, --detailed', 'Show detailed metrics')\n .option('-j, --json', 'Output as JSON')\n .action(async (options: {\n timeframe?: string;\n detailed?: boolean;\n json?: boolean;\n }) => {\n try {\n const result = await hookMetricsTool.execute(\n {\n timeframe: options.timeframe as '1h' | '24h' | '7d' | '30d',\n detailed: options.detailed\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš Learning Metrics (${options.timeframe || '24h'})\\n`);\n console.log(`šÆ Routing:`);\n console.log(` Total routes: ${result.routing.total}`);\n console.log(` Successful: ${result.routing.successful}`);\n console.log(` Accuracy: ${(result.routing.accuracy * 100).toFixed(1)}%`);\n\n console.log(`\\nš Learning:`);\n console.log(` Patterns: ${result.learning.patterns}`);\n console.log(` Memories: ${result.learning.memories}`);\n console.log(` Error patterns: ${result.learning.errorPatterns}`);\n\n console.log(`\\nš Health: ${result.health.status.toUpperCase()}`);\n if (result.health.issues?.length > 0) {\n console.log(` Issues:`);\n result.health.issues.forEach((i: string) => console.log(` ā ļø ${i}`));\n }\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Transfer hook\n hooks\n .command('transfer <sourceProject>')\n .description('Transfer learned patterns from another project')\n .option('-c, --min-confidence <n>', 'Minimum confidence threshold', parseFloat, 0.7)\n .option('-m, --max-patterns <n>', 'Maximum patterns to transfer', parseInt, 50)\n .option('--mode <mode>', 'Transfer mode: merge|replace|additive', 'merge')\n .option('-j, --json', 'Output as JSON')\n .action(async (sourceProject: string, options: {\n minConfidence?: number;\n maxPatterns?: number;\n mode?: string;\n json?: boolean;\n }) => {\n try {\n console.log(`š¤ Transferring patterns from: ${sourceProject}...\\n`);\n const result = await hookTransferTool.execute(\n {\n sourceProject,\n minConfidence: options.minConfidence,\n maxPatterns: options.maxPatterns,\n mode: options.mode as 'merge' | 'replace' | 'additive'\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nā
Transfer Complete!`);\n console.log(` š„ Patterns transferred: ${result.transferred}`);\n console.log(` š Patterns adapted: ${result.adapted}`);\n console.log(` šÆ Mode: ${result.mode}`);\n if (result.targetStack?.length > 0) {\n console.log(` š ļø Target stack: ${result.targetStack.join(', ')}`);\n }\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Init command (creates .claude/settings.json with hooks)\n hooks\n .command('init')\n .description('Initialize hooks in project with .claude/settings.json')\n .option('--minimal', 'Minimal configuration')\n .option('--force', 'Overwrite existing configuration')\n .option('--no-statusline', 'Skip statusline generation')\n .action(async (options: { minimal?: boolean; force?: boolean; statusline?: boolean }) => {\n try {\n const fs = await import('fs');\n const settingsPath = path.join(process.cwd(), '.claude', 'settings.json');\n const statuslinePath = path.join(process.cwd(), '.claude', 'statusline.mjs');\n const claudeDir = path.dirname(settingsPath);\n\n // Check if exists\n if (fs.existsSync(settingsPath) && !options.force) {\n console.log('ā ļø Settings file already exists. Use --force to overwrite.');\n return;\n }\n\n // Create .claude directory\n if (!fs.existsSync(claudeDir)) {\n fs.mkdirSync(claudeDir, { recursive: true });\n }\n\n // Create statusline.mjs (compact colored format with agent stats)\n if (options.statusline !== false) {\n const statuslineContent = `#!/usr/bin/env node\n// Agentic Flow Intelligence Status Line - Compact Format with Colors\n// Works on Windows, Mac, and Linux - Queries SQLite for real stats\n\nimport { readFileSync, statSync, existsSync } from 'fs';\nimport { execSync } from 'child_process';\n\nconst INTEL_FILE = '.agentic-flow/intelligence.json';\nconst INTEL_DB = '.agentic-flow/intelligence.db';\n\n// Detect dark/light mode\nconst isDarkMode = (() => {\n const colorScheme = process.env.COLORFGBG || '';\n const termBg = process.env.TERM_BACKGROUND || '';\n const vscodeTheme = process.env.VSCODE_TERMINAL_COLOR_THEME || '';\n if (termBg === 'light') return false;\n if (vscodeTheme.toLowerCase().includes('light')) return false;\n if (colorScheme.startsWith('0;') || colorScheme.includes(';15')) return false;\n if (process.env.CLAUDE_CODE_THEME === 'light') return false;\n return true;\n})();\n\n// Color palettes\nconst colors = {\n dark: {\n reset: '\\\\x1b[0m', dim: '\\\\x1b[2m', bold: '\\\\x1b[1m',\n model: '\\\\x1b[38;5;208m', project: '\\\\x1b[38;5;39m', branch: '\\\\x1b[38;5;156m',\n brain: '\\\\x1b[38;5;213m', patterns: '\\\\x1b[38;5;220m', memory: '\\\\x1b[38;5;117m',\n trajectories: '\\\\x1b[38;5;183m', agents: '\\\\x1b[38;5;156m',\n target: '\\\\x1b[38;5;196m', learning: '\\\\x1b[38;5;226m', epsilon: '\\\\x1b[38;5;51m',\n success: '\\\\x1b[38;5;46m', symbol: '\\\\x1b[38;5;245m'\n },\n light: {\n reset: '\\\\x1b[0m', dim: '\\\\x1b[2m', bold: '\\\\x1b[1m',\n model: '\\\\x1b[38;5;166m', project: '\\\\x1b[38;5;27m', branch: '\\\\x1b[38;5;28m',\n brain: '\\\\x1b[38;5;129m', patterns: '\\\\x1b[38;5;136m', memory: '\\\\x1b[38;5;30m',\n trajectories: '\\\\x1b[38;5;91m', agents: '\\\\x1b[38;5;28m',\n target: '\\\\x1b[38;5;160m', learning: '\\\\x1b[38;5;136m', epsilon: '\\\\x1b[38;5;31m',\n success: '\\\\x1b[38;5;28m', symbol: '\\\\x1b[38;5;240m'\n }\n};\nconst c = isDarkMode ? colors.dark : colors.light;\n\nfunction readJson(file) {\n try { return JSON.parse(readFileSync(file, 'utf8')); } catch { return null; }\n}\n\nfunction querySqlite(db, sql) {\n try {\n return execSync(\\`sqlite3 \"\\${db}\" \"\\${sql}\"\\`, { encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'], timeout: 1000 }).trim();\n } catch { return null; }\n}\n\nfunction getGitBranch() {\n try { return execSync('git branch --show-current', { encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] }).trim(); }\n catch { return ''; }\n}\n\nfunction getProjectName() {\n try { return process.cwd().split('/').pop() || 'project'; } catch { return 'project'; }\n}\n\nfunction formatSize(bytes) {\n if (bytes < 1024) return \\`\\${bytes}B\\`;\n if (bytes < 1024 * 1024) return \\`\\${Math.round(bytes / 1024)}K\\`;\n return \\`\\${(bytes / (1024 * 1024)).toFixed(1)}M\\`;\n}\n\nconst LEARNING_RATE = parseFloat(process.env.AGENTIC_FLOW_LEARNING_RATE || '0.1');\nconst EPSILON = parseFloat(process.env.AGENTIC_FLOW_EPSILON || '0.1');\n\nconst intel = readJson(INTEL_FILE);\nlet dbStats = { totalTrajectories: 0, successfulRoutings: 0, totalRoutings: 0, totalPatterns: 0, totalAgents: 0, activeAgents: 0 };\n\nif (existsSync(INTEL_DB)) {\n const statsRow = querySqlite(INTEL_DB, 'SELECT * FROM stats LIMIT 1');\n if (statsRow) {\n const cols = statsRow.split('|');\n dbStats.totalTrajectories = parseInt(cols[1]) || 0;\n dbStats.totalRoutings = parseInt(cols[3]) || 0;\n dbStats.successfulRoutings = parseInt(cols[4]) || 0;\n dbStats.totalPatterns = parseInt(cols[5]) || 0;\n }\n const trajCount = querySqlite(INTEL_DB, 'SELECT COUNT(*) FROM trajectories');\n if (trajCount) dbStats.totalTrajectories = parseInt(trajCount) || dbStats.totalTrajectories;\n const patternCount = querySqlite(INTEL_DB, 'SELECT COUNT(*) FROM patterns');\n if (patternCount) dbStats.totalPatterns = parseInt(patternCount) || 0;\n}\n\nconst routes = dbStats.totalRoutings > 0 ? dbStats.totalRoutings : (intel?.metrics?.totalRoutes || 0);\nconst patterns = dbStats.totalPatterns > 0 ? dbStats.totalPatterns : (intel?.patterns ? Object.keys(intel.patterns).length : 0);\nconst memories = intel?.memories?.length || 0;\nconst trajectories = dbStats.totalTrajectories;\n\nlet agents = intel?.agents ? Object.keys(intel.agents).length : 66;\nlet activeAgents = intel?.agents ? Object.values(intel.agents).filter(a => a.status === 'active').length : 0;\n\nconst branch = getGitBranch();\nconst project = getProjectName();\n\nlet dbSize = 0;\nif (existsSync(INTEL_DB)) {\n try { dbSize = statSync(INTEL_DB).size; } catch {}\n}\n\nconst lines = [];\n\n// Line 1: Model + project + branch (colored)\nlet line1 = \\`\\${c.model}\\${c.bold}Opus 4.5\\${c.reset}\\`;\nline1 += \\` \\${c.dim}in\\${c.reset} \\${c.project}\\${project}\\${c.reset}\\`;\nif (branch) line1 += \\` \\${c.dim}on\\${c.reset} \\${c.symbol}ā\\${c.reset} \\${c.branch}\\${branch}\\${c.reset}\\`;\nlines.push(line1);\n\n// Line 2: RuVector stats (compact with symbols)\nlet line2 = \\`\\${c.brain}š§ RuVector\\${c.reset}\\`;\nline2 += \\` \\${c.symbol}ā\\${c.reset} \\${c.patterns}\\${patterns}\\${c.reset} \\${c.dim}patterns\\${c.reset}\\`;\nif (memories > 0 || dbSize > 0) {\n line2 += \\` \\${c.symbol}⬔\\${c.reset} \\${c.memory}\\${memories > 0 ? memories : formatSize(dbSize)}\\${c.reset} \\${c.dim}mem\\${c.reset}\\`;\n}\nif (trajectories > 0) line2 += \\` \\${c.symbol}ā\\${c.reset}\\${c.trajectories}\\${trajectories}\\${c.reset}\\`;\nif (agents > 0) line2 += \\` \\${c.symbol}#\\${c.reset}\\${c.agents}\\${activeAgents > 0 ? activeAgents + '/' : ''}\\${agents}\\${c.reset}\\`;\nlines.push(line2);\n\n// Line 3: Routing info (compact)\nconst lrPercent = Math.round(LEARNING_RATE * 100);\nconst epsPercent = Math.round(EPSILON * 100);\nlet line3 = \\`\\${c.target}šÆ Routing\\${c.reset} \\${c.dim}q-learning\\${c.reset}\\`;\nline3 += \\` \\${c.learning}lr:\\${lrPercent}%\\${c.reset} \\${c.epsilon}ε:\\${epsPercent}%\\${c.reset}\\`;\nif (routes > 0) {\n const successRate = dbStats.successfulRoutings > 0 ? Math.round((dbStats.successfulRoutings / routes) * 100) : 100;\n line3 += \\` \\${c.symbol}|\\${c.reset} \\${c.success}\\${successRate}% ā\\${c.reset}\\`;\n}\nlines.push(line3);\n\nconsole.log(lines.join('\\\\n'));\n`;\n fs.writeFileSync(statuslinePath, statuslineContent);\n console.log(` š Created: ${statuslinePath}`);\n }\n\n // Create settings\n const settings = {\n env: {\n AGENTIC_FLOW_INTELLIGENCE: 'true',\n AGENTIC_FLOW_LEARNING_RATE: '0.1',\n AGENTIC_FLOW_MEMORY_BACKEND: 'agentdb'\n },\n hooks: {\n PreToolUse: [\n {\n matcher: 'Edit|Write',\n hooks: [\n {\n type: 'command',\n command: 'npx agentic-flow hooks pre-edit \"$TOOL_INPUT_file_path\"'\n }\n ]\n },\n {\n matcher: 'Bash',\n hooks: [\n {\n type: 'command',\n command: 'npx agentic-flow hooks pre-command \"$TOOL_INPUT_command\"'\n }\n ]\n }\n ],\n PostToolUse: [\n {\n matcher: 'Edit|Write',\n hooks: [\n {\n type: 'command',\n command: 'npx agentic-flow hooks post-edit \"$TOOL_INPUT_file_path\" --success'\n }\n ]\n }\n ],\n SessionStart: [\n {\n hooks: [\n {\n type: 'command',\n command: 'npx agentic-flow hooks intelligence stats'\n }\n ]\n }\n ],\n UserPromptSubmit: [\n {\n hooks: [\n {\n type: 'command',\n timeout: 2000,\n command: 'npx agentic-flow hooks intelligence stats'\n }\n ]\n }\n ]\n },\n permissions: {\n allow: [\n 'Bash(npx:*)',\n 'Bash(agentic-flow:*)',\n 'mcp__agentic-flow'\n ]\n },\n statusLine: options.statusline !== false ? {\n type: 'command',\n command: 'node .claude/statusline.mjs'\n } : undefined\n };\n\n fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));\n console.log('ā
Hooks initialized!');\n console.log(` š Created: ${settingsPath}`);\n console.log('\\nš” Next steps:');\n console.log(' 1. Run: npx agentic-flow hooks pretrain');\n console.log(' 2. Run: npx agentic-flow hooks build-agents');\n console.log(' 3. Start using Claude Code with intelligent routing!');\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // ============================================\n // RUVECTOR INTELLIGENCE COMMANDS\n // SONA Micro-LoRA + MoE Attention + HNSW\n // ============================================\n\n // Create intelligence subcommand group\n const intelligence = new Command('intelligence')\n .alias('intel')\n .description('RuVector intelligence: SONA Micro-LoRA (~0.05ms) + MoE attention + HNSW (150x faster)');\n\n // Intelligence route command\n intelligence\n .command('route <task>')\n .description('Route task using SONA + MoE + HNSW (150x faster than brute force)')\n .option('-f, --file <path>', 'File context')\n .option('-e, --error <context>', 'Error context for debugging')\n .option('-k, --top-k <n>', 'Number of candidates', parseInt, 5)\n .option('-j, --json', 'Output as JSON')\n .action(async (task: string, options: {\n file?: string;\n error?: string;\n topK?: number;\n json?: boolean;\n }) => {\n try {\n const result = await intelligenceRouteTool.execute(\n { task, file: options.file, errorContext: options.error, topK: options.topK },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nā” RuVector Intelligence Route`);\n console.log(`šÆ Agent: ${result.agent}`);\n console.log(`š Confidence: ${((result.confidence || 0) * 100).toFixed(1)}%`);\n console.log(`š§ Engine: ${result.engine}`);\n console.log(`ā±ļø Latency: ${result.latencyMs?.toFixed(2)}ms`);\n if (result.features?.length > 0) {\n console.log(`š§ Features: ${result.features.join(', ')}`);\n }\n if (result.alternatives?.length > 0) {\n console.log(`\\nš Alternatives:`);\n result.alternatives.forEach((a: any) => {\n console.log(` - ${a.agent} (${((a.confidence || 0) * 100).toFixed(1)}%)`);\n });\n }\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Trajectory start command\n intelligence\n .command('trajectory-start <task>')\n .description('Begin SONA trajectory for reinforcement learning')\n .requiredOption('-a, --agent <name>', 'Agent executing the task')\n .option('-c, --context <text>', 'Additional context')\n .option('-j, --json', 'Output as JSON')\n .action(async (task: string, options: {\n agent: string;\n context?: string;\n json?: boolean;\n }) => {\n try {\n const result = await intelligenceTrajectoryStartTool.execute(\n { task, agent: options.agent, context: options.context },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš¬ Trajectory Started`);\n console.log(`š ID: ${result.trajectoryId}`);\n console.log(`š¤ Agent: ${options.agent}`);\n console.log(`š§ Features: ${result.features?.join(', ')}`);\n console.log(`\\nš” Use this ID with trajectory-step and trajectory-end commands`);\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Trajectory step command\n intelligence\n .command('trajectory-step <trajectoryId>')\n .description('Record step in trajectory for reinforcement learning')\n .requiredOption('-a, --action <action>', 'Action taken')\n .requiredOption('-r, --reward <n>', 'Reward signal (-1 to 1)', parseFloat)\n .option('-f, --file <path>', 'File involved')\n .option('--error-fixed', 'Mark as error fix')\n .option('--test-passed', 'Mark as test passed')\n .option('-j, --json', 'Output as JSON')\n .action(async (trajectoryId: string, options: {\n action: string;\n reward: number;\n file?: string;\n errorFixed?: boolean;\n testPassed?: boolean;\n json?: boolean;\n }) => {\n try {\n const result = await intelligenceTrajectoryStepTool.execute(\n {\n trajectoryId: parseInt(trajectoryId),\n action: options.action,\n reward: options.reward,\n file: options.file,\n errorFixed: options.errorFixed,\n testPassed: options.testPassed\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš Step Recorded`);\n console.log(` Action: ${options.action}`);\n console.log(` Reward: ${options.reward}`);\n console.log(` Trajectory: ${trajectoryId}`);\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Trajectory end command\n intelligence\n .command('trajectory-end <trajectoryId>')\n .description('End trajectory and trigger SONA learning with EWC++')\n .option('-s, --success', 'Mark as successful')\n .option('-f, --fail', 'Mark as failed')\n .option('-q, --quality <n>', 'Quality score (0-1)', parseFloat, 0.8)\n .option('-j, --json', 'Output as JSON')\n .action(async (trajectoryId: string, options: {\n success?: boolean;\n fail?: boolean;\n quality?: number;\n json?: boolean;\n }) => {\n try {\n const success = options.success || !options.fail;\n const result = await intelligenceTrajectoryEndTool.execute(\n { trajectoryId: parseInt(trajectoryId), success, quality: options.quality },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš Trajectory Completed`);\n console.log(` ${success ? 'ā
Success' : 'ā Failed'}`);\n console.log(` Quality: ${(options.quality || 0.8) * 100}%`);\n console.log(` Learning: EWC++ consolidation applied`);\n if (result.learningOutcome) {\n console.log(` Outcome: ${JSON.stringify(result.learningOutcome)}`);\n }\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Pattern store command\n intelligence\n .command('pattern-store')\n .description('Store pattern in ReasoningBank (HNSW-indexed)')\n .requiredOption('-t, --task <task>', 'Task description')\n .requiredOption('-r, --resolution <text>', 'How it was resolved')\n .option('-s, --score <n>', 'Success score (0-1)', parseFloat, 0.9)\n .option('-j, --json', 'Output as JSON')\n .action(async (options: {\n task: string;\n resolution: string;\n score?: number;\n json?: boolean;\n }) => {\n try {\n const result = await intelligencePatternStoreTool.execute(\n { task: options.task, resolution: options.resolution, reward: options.score || 0.9 },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš¾ Pattern Stored`);\n console.log(` Task: ${options.task.slice(0, 50)}...`);\n console.log(` Score: ${((options.score || 0.9) * 100).toFixed(0)}%`);\n console.log(` Index: HNSW (150x faster retrieval)`);\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Pattern search command\n intelligence\n .command('pattern-search <query>')\n .description('Search ReasoningBank using HNSW (150x faster)')\n .option('-k, --top-k <n>', 'Number of results', parseInt, 5)\n .option('-m, --min-reward <n>', 'Minimum reward filter', parseFloat)\n .option('-j, --json', 'Output as JSON')\n .action(async (query: string, options: {\n topK?: number;\n minReward?: number;\n json?: boolean;\n }) => {\n try {\n const result = await intelligencePatternSearchTool.execute(\n { query, topK: options.topK, minReward: options.minReward },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš Pattern Search Results`);\n console.log(` Query: \"${query.slice(0, 50)}\"`);\n console.log(` Engine: ${result.searchEngine}`);\n console.log(` Found: ${result.count} patterns`);\n if (result.patterns?.length > 0) {\n console.log(`\\n š Results:`);\n result.patterns.forEach((p: any, i: number) => {\n console.log(` ${i + 1}. [${((p.similarity || 0) * 100).toFixed(0)}%] ${p.resolution?.slice(0, 40)}...`);\n });\n }\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Intelligence stats command\n intelligence\n .command('stats')\n .description('Get RuVector intelligence layer statistics')\n .option('-j, --json', 'Output as JSON')\n .action(async (options: { json?: boolean }) => {\n try {\n const result = await intelligenceStatsTool.execute({}, mockContext);\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš RuVector Intelligence Stats`);\n console.log(`\\nš§ SONA Engine:`);\n console.log(` Micro-LoRA: ${result.features?.sona?.microLora || 'rank-1 (~0.05ms)'}`);\n console.log(` Base-LoRA: ${result.features?.sona?.baseLora || 'rank-8'}`);\n console.log(` EWC Lambda: ${result.features?.sona?.ewcLambda || 1000.0}`);\n console.log(`\\nā” Attention:`);\n console.log(` Type: ${result.features?.attention?.type || 'moe'}`);\n console.log(` Experts: ${result.features?.attention?.experts || 4}`);\n console.log(` Top-K: ${result.features?.attention?.topK || 2}`);\n console.log(`\\nš HNSW:`);\n console.log(` Enabled: ${result.features?.hnsw?.enabled ?? true}`);\n console.log(` Speedup: ${result.features?.hnsw?.speedup || '150x vs brute-force'}`);\n console.log(`\\nš Learning:`);\n console.log(` Trajectories: ${result.persistence?.trajectories ?? result.stats?.trajectoryCount ?? 0}`);\n console.log(` Active: ${result.stats?.activeTrajectories || 0}`);\n console.log(`\\nš¾ Persistence (SQLite):`);\n console.log(` Backend: ${result.persistence?.backend || 'sqlite'}`);\n console.log(` Routings: ${result.persistence?.routings ?? 0}`);\n console.log(` Patterns: ${result.persistence?.patterns ?? 0}`);\n console.log(` Operations: ${result.persistence?.operations ?? 0}`);\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Force learning command\n intelligence\n .command('learn')\n .description('Force immediate SONA learning cycle with EWC++ consolidation')\n .option('-r, --reason <text>', 'Reason for forcing learning')\n .option('-j, --json', 'Output as JSON')\n .action(async (options: { reason?: string; json?: boolean }) => {\n try {\n const result = await intelligenceLearnTool.execute(\n { reason: options.reason },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš Learning Cycle Complete`);\n console.log(` ${result.success ? 'ā
' : 'ā'} ${result.message}`);\n console.log(` Reason: ${result.reason || 'manual trigger'}`);\n console.log(` Features: ${result.features?.join(', ')}`);\n console.log(` Latency: ${result.latencyMs?.toFixed(2)}ms`);\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Attention compute command\n intelligence\n .command('attention <query>')\n .description('Compute attention-weighted similarity using MoE/Flash/Hyperbolic')\n .requiredOption('-c, --candidates <texts...>', 'Candidate texts to score')\n .option('-t, --type <type>', 'Attention type: moe|flash|hyperbolic|graph|dual', 'moe')\n .option('-j, --json', 'Output as JSON')\n .action(async (query: string, options: {\n candidates: string[];\n type?: string;\n json?: boolean;\n }) => {\n try {\n const result = await intelligenceAttentionTool.execute(\n {\n query,\n candidates: options.candidates,\n attentionType: options.type as 'moe' | 'flash' | 'hyperbolic' | 'graph' | 'dual'\n },\n mockContext\n );\n\n if (options.json) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n console.log(`\\nš§ Attention Scores (${options.type || 'moe'})`);\n console.log(` Query: \"${query.slice(0, 40)}...\"`);\n console.log(`\\n š Results:`);\n result.results?.forEach((r: any, i: number) => {\n const bar = 'ā'.repeat(Math.round(r.score * 20));\n console.log(` ${i + 1}. ${bar} ${(r.score * 100).toFixed(1)}% \"${r.text}\"`);\n });\n console.log(`\\n ā±ļø Latency: ${result.latencyMs?.toFixed(2)}ms`);\n }\n } catch (error) {\n console.error('Error:', error instanceof Error ? error.message : error);\n process.exit(1);\n }\n });\n\n // Add intelligence subcommand to hooks\n hooks.addCommand(intelligence);\n\n return hooks;\n}\n\nexport default createHooksCommand;\n"]}
|
package/dist/cli-proxy.js
CHANGED
|
@@ -34,7 +34,6 @@ import { handleReasoningBankCommand } from "./utils/reasoningbankCommands.js";
|
|
|
34
34
|
import { handleConfigCommand } from "./cli/config-wizard.js";
|
|
35
35
|
import { handleAgentCommand } from "./cli/agent-manager.js";
|
|
36
36
|
import { handleFederationCommand } from "./cli/federation-cli.js";
|
|
37
|
-
import { handleInitCommand } from "./cli/commands/init.js";
|
|
38
37
|
import { ModelOptimizer } from "./utils/modelOptimizer.js";
|
|
39
38
|
import { detectModelCapabilities } from "./utils/modelCapabilities.js";
|
|
40
39
|
import { AgentBoosterPreprocessor } from "./utils/agentBoosterPreprocessor.js";
|
|
@@ -56,16 +55,10 @@ class AgenticFlowCLI {
|
|
|
56
55
|
process.exit(0);
|
|
57
56
|
}
|
|
58
57
|
// If no mode and no agent specified, show help
|
|
59
|
-
if (!options.agent && options.mode !== 'list' && !['
|
|
58
|
+
if (!options.agent && options.mode !== 'list' && !['config', 'agent-manager', 'mcp-manager', 'proxy', 'quic', 'claude-code', 'mcp', 'reasoningbank', 'federation'].includes(options.mode)) {
|
|
60
59
|
this.printHelp();
|
|
61
60
|
process.exit(0);
|
|
62
61
|
}
|
|
63
|
-
if (options.mode === 'init') {
|
|
64
|
-
// Handle init command - creates .claude/ folder and configuration
|
|
65
|
-
const initArgs = process.argv.slice(3); // Skip 'node', 'cli-proxy.js', 'init'
|
|
66
|
-
await handleInitCommand(initArgs);
|
|
67
|
-
process.exit(0);
|
|
68
|
-
}
|
|
69
62
|
if (options.mode === 'list') {
|
|
70
63
|
this.listAgents();
|
|
71
64
|
process.exit(0);
|
|
@@ -158,52 +151,6 @@ class AgenticFlowCLI {
|
|
|
158
151
|
await handleFederationCommand(federationArgs);
|
|
159
152
|
process.exit(0);
|
|
160
153
|
}
|
|
161
|
-
if (options.mode === 'hooks') {
|
|
162
|
-
// Handle Hooks commands (intelligence, init, pre-edit, post-edit, etc.)
|
|
163
|
-
const { spawn } = await import('child_process');
|
|
164
|
-
const { resolve, dirname } = await import('path');
|
|
165
|
-
const { fileURLToPath } = await import('url');
|
|
166
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
167
|
-
const __dirname = dirname(__filename);
|
|
168
|
-
const hooksPath = resolve(__dirname, './cli/commands/hooks.js');
|
|
169
|
-
// Pass all args after 'hooks' to hooks command
|
|
170
|
-
const hooksArgs = process.argv.slice(3);
|
|
171
|
-
const proc = spawn('node', [hooksPath, ...hooksArgs], {
|
|
172
|
-
stdio: 'inherit'
|
|
173
|
-
});
|
|
174
|
-
proc.on('exit', (code) => {
|
|
175
|
-
process.exit(code || 0);
|
|
176
|
-
});
|
|
177
|
-
process.on('SIGINT', () => proc.kill('SIGINT'));
|
|
178
|
-
process.on('SIGTERM', () => proc.kill('SIGTERM'));
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
if (options.mode === 'workers') {
|
|
182
|
-
// Handle Workers commands (status, cleanup, dispatch-prompt, etc.)
|
|
183
|
-
const { spawn } = await import('child_process');
|
|
184
|
-
const { resolve, dirname } = await import('path');
|
|
185
|
-
const { fileURLToPath } = await import('url');
|
|
186
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
187
|
-
const __dirname = dirname(__filename);
|
|
188
|
-
const workersPath = resolve(__dirname, './cli/commands/workers.js');
|
|
189
|
-
// Pass all args after 'workers' to workers command
|
|
190
|
-
const workersArgs = process.argv.slice(3);
|
|
191
|
-
const proc = spawn('node', [workersPath, ...workersArgs], {
|
|
192
|
-
stdio: 'inherit'
|
|
193
|
-
});
|
|
194
|
-
proc.on('exit', (code) => {
|
|
195
|
-
process.exit(code || 0);
|
|
196
|
-
});
|
|
197
|
-
process.on('SIGINT', () => proc.kill('SIGINT'));
|
|
198
|
-
process.on('SIGTERM', () => proc.kill('SIGTERM'));
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
if (options.mode === 'embeddings') {
|
|
202
|
-
// Handle Embeddings commands (init, download, list, benchmark, status)
|
|
203
|
-
const { handleEmbeddingsCommand } = await import('./cli/commands/embeddings.js');
|
|
204
|
-
await handleEmbeddingsCommand(process.argv.slice(3));
|
|
205
|
-
process.exit(0);
|
|
206
|
-
}
|
|
207
154
|
// Apply model optimization if requested
|
|
208
155
|
if (options.optimize && options.agent && options.task) {
|
|
209
156
|
const recommendation = ModelOptimizer.optimize({
|
|
@@ -967,7 +914,6 @@ USAGE:
|
|
|
967
914
|
npx agentic-flow [COMMAND] [OPTIONS]
|
|
968
915
|
|
|
969
916
|
COMMANDS:
|
|
970
|
-
init [options] Initialize project with .claude/ folder and configuration
|
|
971
917
|
config [subcommand] Manage environment configuration (interactive wizard)
|
|
972
918
|
mcp <command> [server] Manage MCP servers (start, stop, status, list)
|
|
973
919
|
agent <command> Agent management (list, create, info, conflicts)
|
|
@@ -1011,40 +957,6 @@ FEDERATION COMMANDS:
|
|
|
1011
957
|
Federation enables ephemeral agents (5s-15min lifetime) with persistent memory.
|
|
1012
958
|
Hub stores memories permanently; agents access past learnings from dead agents.
|
|
1013
959
|
|
|
1014
|
-
EMBEDDINGS COMMANDS:
|
|
1015
|
-
npx agentic-flow embeddings init Download and initialize embeddings (default: all-MiniLM-L6-v2)
|
|
1016
|
-
npx agentic-flow embeddings download Download a specific model
|
|
1017
|
-
npx agentic-flow embeddings list List available embedding models
|
|
1018
|
-
npx agentic-flow embeddings benchmark Run embedding performance benchmarks
|
|
1019
|
-
npx agentic-flow embeddings status Show embeddings system status
|
|
1020
|
-
|
|
1021
|
-
Optimized ONNX embeddings with LRU cache, SIMD operations, and 150x faster search.
|
|
1022
|
-
|
|
1023
|
-
HOOKS COMMANDS:
|
|
1024
|
-
npx agentic-flow hooks Show all hook commands
|
|
1025
|
-
npx agentic-flow hooks pre-edit Get context before editing a file
|
|
1026
|
-
npx agentic-flow hooks post-edit Record edit outcome for learning
|
|
1027
|
-
npx agentic-flow hooks route Route task to optimal agent
|
|
1028
|
-
npx agentic-flow hooks pretrain Analyze repository to bootstrap intelligence
|
|
1029
|
-
npx agentic-flow hooks build-agents Generate optimized agent configurations
|
|
1030
|
-
npx agentic-flow hooks metrics View learning metrics dashboard
|
|
1031
|
-
npx agentic-flow hooks intelligence RuVector intelligence commands (SONA + MoE + HNSW)
|
|
1032
|
-
npx agentic-flow hooks init Initialize hooks in project
|
|
1033
|
-
|
|
1034
|
-
Self-learning hooks for intelligent agent routing and optimization.
|
|
1035
|
-
|
|
1036
|
-
WORKERS COMMANDS:
|
|
1037
|
-
npx agentic-flow workers Show all worker commands
|
|
1038
|
-
npx agentic-flow workers dispatch Dispatch background workers from triggers
|
|
1039
|
-
npx agentic-flow workers status Get worker status
|
|
1040
|
-
npx agentic-flow workers triggers List available trigger keywords
|
|
1041
|
-
npx agentic-flow workers stats Get worker statistics
|
|
1042
|
-
npx agentic-flow workers results View worker analysis results
|
|
1043
|
-
npx agentic-flow workers benchmark Run worker performance benchmarks
|
|
1044
|
-
npx agentic-flow workers native Run native ruvector workers
|
|
1045
|
-
|
|
1046
|
-
Background workers for non-blocking analysis tasks.
|
|
1047
|
-
|
|
1048
960
|
OPTIONS:
|
|
1049
961
|
--task, -t <task> Task description for agent mode
|
|
1050
962
|
--model, -m <model> Model to use (triggers OpenRouter if contains "/")
|