agentic-flow 1.6.5 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/.claude/skills/.claude-flow/metrics/agent-metrics.json +1 -0
  2. package/.claude/skills/.claude-flow/metrics/performance.json +87 -0
  3. package/.claude/skills/.claude-flow/metrics/task-metrics.json +10 -0
  4. package/.claude/skills/skill-builder/.claude-flow/metrics/agent-metrics.json +1 -0
  5. package/.claude/skills/skill-builder/.claude-flow/metrics/performance.json +87 -0
  6. package/.claude/skills/skill-builder/.claude-flow/metrics/task-metrics.json +10 -0
  7. package/CHANGELOG.md +0 -20
  8. package/README.md +16 -2
  9. package/dist/agentdb/benchmarks/comprehensive-benchmark.js +664 -0
  10. package/dist/agentdb/benchmarks/frontier-benchmark.js +419 -0
  11. package/dist/agentdb/benchmarks/reflexion-benchmark.js +370 -0
  12. package/dist/agentdb/cli/agentdb-cli.js +717 -0
  13. package/dist/agentdb/controllers/CausalMemoryGraph.js +322 -0
  14. package/dist/agentdb/controllers/CausalRecall.js +281 -0
  15. package/dist/agentdb/controllers/EmbeddingService.js +118 -0
  16. package/dist/agentdb/controllers/ExplainableRecall.js +387 -0
  17. package/dist/agentdb/controllers/NightlyLearner.js +382 -0
  18. package/dist/agentdb/controllers/ReflexionMemory.js +239 -0
  19. package/dist/agentdb/controllers/SkillLibrary.js +276 -0
  20. package/dist/agentdb/controllers/frontier-index.js +9 -0
  21. package/dist/agentdb/controllers/index.js +8 -0
  22. package/dist/agentdb/index.js +32 -0
  23. package/dist/agentdb/optimizations/BatchOperations.js +198 -0
  24. package/dist/agentdb/optimizations/QueryOptimizer.js +225 -0
  25. package/dist/agentdb/optimizations/index.js +7 -0
  26. package/dist/agentdb/tests/frontier-features.test.js +665 -0
  27. package/dist/cli/skills-manager.js +1297 -0
  28. package/dist/cli/update-message.js +175 -0
  29. package/dist/cli-proxy.js +2 -26
  30. package/dist/mcp/standalone-stdio.js +200 -4
  31. package/dist/memory/SharedMemoryPool.js +211 -0
  32. package/dist/memory/index.js +6 -0
  33. package/dist/reasoningbank/AdvancedMemory.js +67 -0
  34. package/dist/reasoningbank/HybridBackend.js +91 -0
  35. package/dist/reasoningbank/index-new.js +87 -0
  36. package/dist/reasoningbank/index.js +0 -4
  37. package/dist/utils/cli.js +0 -5
  38. package/docs/AGENTDB_TESTING.md +411 -0
  39. package/package.json +4 -4
  40. package/scripts/run-validation.sh +165 -0
  41. package/scripts/test-agentdb.sh +153 -0
  42. package/wasm/reasoningbank/reasoningbank_wasm_bg.js +2 -2
  43. package/wasm/reasoningbank/reasoningbank_wasm_bg.wasm +0 -0
  44. package/docs/AGENTDB_INTEGRATION.md +0 -379
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "agentic-flow",
3
- "version": "1.6.5",
3
+ "version": "1.7.0",
4
4
  "description": "Production-ready AI agent orchestration platform with 66 specialized agents, 213 MCP tools, ReasoningBank learning memory, and autonomous multi-agent swarms. Built by @ruvnet with Claude Agent SDK, neural networks, memory persistence, GitHub integration, and distributed consensus protocols.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
8
- "agentic-flow": "dist/cli-proxy.js"
8
+ "agentic-flow": "dist/cli-proxy.js",
9
+ "agentdb": "dist/agentdb/cli/agentdb-cli.js"
9
10
  },
10
11
  "exports": {
11
12
  ".": "./dist/index.js",
@@ -14,7 +15,6 @@
14
15
  "browser": "./dist/reasoningbank/wasm-adapter.js",
15
16
  "default": "./dist/reasoningbank/index.js"
16
17
  },
17
- "./reasoningbank/agentdb": "./dist/reasoningbank/agentdb-adapter.js",
18
18
  "./reasoningbank/backend-selector": "./dist/reasoningbank/backend-selector.js",
19
19
  "./reasoningbank/wasm-adapter": "./dist/reasoningbank/wasm-adapter.js",
20
20
  "./router": "./dist/router/index.js",
@@ -142,7 +142,7 @@
142
142
  "@anthropic-ai/claude-agent-sdk": "^0.1.5",
143
143
  "@anthropic-ai/sdk": "^0.65.0",
144
144
  "@google/genai": "^1.22.0",
145
- "agentdb": "^1.0.4",
145
+ "agentdb": "^1.3.9",
146
146
  "agentic-payments": "^0.1.3",
147
147
  "axios": "^1.12.2",
148
148
  "better-sqlite3": "^12.4.1",
@@ -0,0 +1,165 @@
1
+ #!/bin/bash
2
+ # Comprehensive Validation Script for v1.7.0
3
+ # Runs Docker-based validation and generates report
4
+
5
+ set -e
6
+
7
+ echo "================================================================"
8
+ echo "AGENTIC-FLOW v1.7.0 - DOCKER VALIDATION"
9
+ echo "================================================================"
10
+ echo "Started: $(date)"
11
+ echo "================================================================"
12
+ echo ""
13
+
14
+ # Colors for output
15
+ RED='\033[0;31m'
16
+ GREEN='\033[0;32m'
17
+ YELLOW='\033[1;33m'
18
+ NC='\033[0m' # No Color
19
+
20
+ # Create results directory
21
+ mkdir -p validation-results
22
+ mkdir -p benchmark-results
23
+
24
+ # Function to print colored messages
25
+ print_status() {
26
+ echo -e "${GREEN}✓${NC} $1"
27
+ }
28
+
29
+ print_error() {
30
+ echo -e "${RED}✗${NC} $1"
31
+ }
32
+
33
+ print_warning() {
34
+ echo -e "${YELLOW}⚠${NC} $1"
35
+ }
36
+
37
+ # Step 1: Clean previous runs
38
+ echo "Step 1: Cleaning previous validation runs..."
39
+ docker-compose -f docker-compose.validation.yml down -v 2>/dev/null || true
40
+ rm -rf validation-results/* benchmark-results/*
41
+ print_status "Cleaned previous runs"
42
+ echo ""
43
+
44
+ # Step 2: Build validation image
45
+ echo "Step 2: Building validation Docker image..."
46
+ if docker-compose -f docker-compose.validation.yml build validation; then
47
+ print_status "Validation image built successfully"
48
+ else
49
+ print_error "Failed to build validation image"
50
+ exit 1
51
+ fi
52
+ echo ""
53
+
54
+ # Step 3: Run validation suite
55
+ echo "Step 3: Running comprehensive validation suite..."
56
+ echo " This will test:"
57
+ echo " - Backwards compatibility"
58
+ echo " - New HybridReasoningBank capabilities"
59
+ echo " - SharedMemoryPool performance"
60
+ echo " - AdvancedMemorySystem features"
61
+ echo " - Memory profiling"
62
+ echo " - Regression detection"
63
+ echo ""
64
+
65
+ if docker-compose -f docker-compose.validation.yml run --rm validation; then
66
+ print_status "Validation suite PASSED"
67
+ VALIDATION_STATUS=0
68
+ else
69
+ print_error "Validation suite FAILED"
70
+ VALIDATION_STATUS=1
71
+ fi
72
+ echo ""
73
+
74
+ # Step 4: Copy results from container
75
+ echo "Step 4: Extracting validation results..."
76
+ docker cp agentic-flow-validation:/app/validation-results.json validation-results/ 2>/dev/null || true
77
+ if [ -f "validation-results/validation-results.json" ]; then
78
+ print_status "Results extracted successfully"
79
+ else
80
+ print_warning "Could not extract results file"
81
+ fi
82
+ echo ""
83
+
84
+ # Step 5: Display results summary
85
+ echo "Step 5: Validation Results Summary"
86
+ echo "================================================================"
87
+ if [ -f "validation-results/validation-results.json" ]; then
88
+ # Extract key metrics using jq if available
89
+ if command -v jq &> /dev/null; then
90
+ TOTAL=$(jq '.summary.total' validation-results/validation-results.json)
91
+ PASSED=$(jq '.summary.passed' validation-results/validation-results.json)
92
+ FAILED=$(jq '.summary.failed' validation-results/validation-results.json)
93
+ PASS_RATE=$(jq '.summary.passRate' validation-results/validation-results.json)
94
+
95
+ echo "Total Tests: $TOTAL"
96
+ echo "Passed: $PASSED"
97
+ echo "Failed: $FAILED"
98
+ echo "Pass Rate: $PASS_RATE%"
99
+ echo ""
100
+
101
+ if [ "$FAILED" -gt 0 ]; then
102
+ echo "Failed Tests:"
103
+ jq -r '.results[] | select(.status == "FAIL") | " - \(.test): \(.error)"' validation-results/validation-results.json
104
+ echo ""
105
+ fi
106
+ else
107
+ cat validation-results/validation-results.json
108
+ fi
109
+ else
110
+ print_warning "No results file found - check Docker logs"
111
+ fi
112
+ echo "================================================================"
113
+ echo ""
114
+
115
+ # Step 6: Run regression tests (optional - if validation passed)
116
+ if [ $VALIDATION_STATUS -eq 0 ]; then
117
+ echo "Step 6: Running regression tests..."
118
+ if docker-compose -f docker-compose.validation.yml run --rm regression 2>/dev/null; then
119
+ print_status "Regression tests PASSED"
120
+ else
121
+ print_warning "Some regression tests failed (check logs)"
122
+ fi
123
+ echo ""
124
+ fi
125
+
126
+ # Step 7: Run performance benchmarks (optional)
127
+ echo "Step 7: Running performance benchmarks..."
128
+ echo " (This may take several minutes)"
129
+ if docker-compose -f docker-compose.validation.yml run --rm benchmark 2>/dev/null; then
130
+ print_status "Benchmarks completed"
131
+ else
132
+ print_warning "Benchmarks incomplete (check logs)"
133
+ fi
134
+ echo ""
135
+
136
+ # Step 8: Cleanup
137
+ echo "Step 8: Cleaning up Docker resources..."
138
+ docker-compose -f docker-compose.validation.yml down -v
139
+ print_status "Cleanup complete"
140
+ echo ""
141
+
142
+ # Final Summary
143
+ echo "================================================================"
144
+ echo "VALIDATION COMPLETE"
145
+ echo "================================================================"
146
+ echo "Completed: $(date)"
147
+ echo ""
148
+
149
+ if [ $VALIDATION_STATUS -eq 0 ]; then
150
+ echo -e "${GREEN}✓✓✓ ALL VALIDATIONS PASSED ✓✓✓${NC}"
151
+ echo ""
152
+ echo "Next steps:"
153
+ echo " 1. Review results in validation-results/"
154
+ echo " 2. Check benchmark-results/ for performance metrics"
155
+ echo " 3. Proceed with release"
156
+ exit 0
157
+ else
158
+ echo -e "${RED}✗✗✗ VALIDATION FAILED ✗✗✗${NC}"
159
+ echo ""
160
+ echo "Action required:"
161
+ echo " 1. Review failed tests in validation-results/"
162
+ echo " 2. Check Docker logs: docker-compose -f docker-compose.validation.yml logs"
163
+ echo " 3. Fix issues before release"
164
+ exit 1
165
+ fi
@@ -0,0 +1,153 @@
1
+ #!/bin/bash
2
+ # AgentDB CLI Quick Test Script
3
+
4
+ set -e
5
+
6
+ echo "🧪 AgentDB CLI Testing Script"
7
+ echo "=============================="
8
+ echo ""
9
+
10
+ # Set test database path
11
+ export AGENTDB_PATH="./test-agentdb.db"
12
+
13
+ # Clean up old test database
14
+ if [ -f "$AGENTDB_PATH" ]; then
15
+ echo "🗑️ Removing old test database..."
16
+ rm "$AGENTDB_PATH"
17
+ fi
18
+
19
+ echo "📍 Current directory: $(pwd)"
20
+ echo "💾 Database path: $AGENTDB_PATH"
21
+ echo ""
22
+
23
+ # Test 1: Help command
24
+ echo "1️⃣ Testing help command..."
25
+ echo ""
26
+ node dist/agentdb/cli/agentdb-cli.js --help | head -20
27
+ echo ""
28
+ echo "✅ Help command works!"
29
+ echo ""
30
+
31
+ # Test 2: Store a successful episode
32
+ echo "2️⃣ Storing a successful episode..."
33
+ node dist/agentdb/cli/agentdb-cli.js reflexion store \
34
+ "test-session-1" \
35
+ "implement_authentication" \
36
+ 0.95 \
37
+ true \
38
+ "Successfully implemented OAuth2 with JWT tokens" \
39
+ "User login requirement" \
40
+ "Working auth system with refresh tokens" \
41
+ 1200 \
42
+ 5000
43
+ echo ""
44
+
45
+ # Test 3: Store a failed episode
46
+ echo "3️⃣ Storing a failed episode..."
47
+ node dist/agentdb/cli/agentdb-cli.js reflexion store \
48
+ "test-session-1" \
49
+ "implement_authentication" \
50
+ 0.35 \
51
+ false \
52
+ "Forgot to validate token expiration" \
53
+ "User login requirement" \
54
+ "Insecure auth system" \
55
+ 800 \
56
+ 3000
57
+ echo ""
58
+
59
+ # Test 4: Retrieve episodes
60
+ echo "4️⃣ Retrieving episodes..."
61
+ node dist/agentdb/cli/agentdb-cli.js reflexion retrieve \
62
+ "authentication" \
63
+ 5 \
64
+ 0.3
65
+ echo ""
66
+
67
+ # Test 5: Get critique summary
68
+ echo "5️⃣ Getting critique summary (failures only)..."
69
+ node dist/agentdb/cli/agentdb-cli.js reflexion critique-summary \
70
+ "authentication" \
71
+ true
72
+ echo ""
73
+
74
+ # Test 6: Create a skill
75
+ echo "6️⃣ Creating a skill..."
76
+ node dist/agentdb/cli/agentdb-cli.js skill create \
77
+ "jwt_authentication" \
78
+ "Generate and validate JWT tokens for user authentication" \
79
+ "function generateJWT(payload, secret) { return jwt.sign(payload, secret, { expiresIn: '1h' }); }"
80
+ echo ""
81
+
82
+ # Test 7: Search skills
83
+ echo "7️⃣ Searching for skills..."
84
+ node dist/agentdb/cli/agentdb-cli.js skill search \
85
+ "authentication" \
86
+ 5
87
+ echo ""
88
+
89
+ # Test 8: Add a causal edge
90
+ echo "8️⃣ Adding a causal edge..."
91
+ node dist/agentdb/cli/agentdb-cli.js causal add-edge \
92
+ "add_unit_tests" \
93
+ "code_quality_score" \
94
+ 0.25 \
95
+ 0.95 \
96
+ 100
97
+ echo ""
98
+
99
+ # Test 9: Create an experiment
100
+ echo "9️⃣ Creating an A/B experiment..."
101
+ node dist/agentdb/cli/agentdb-cli.js causal experiment create \
102
+ "test-coverage-vs-bugs" \
103
+ "test_coverage" \
104
+ "bug_rate"
105
+ echo ""
106
+
107
+ # Test 10: Add experiment observations
108
+ echo "🔟 Adding experiment observations..."
109
+ echo " - Treatment group (high test coverage)..."
110
+ node dist/agentdb/cli/agentdb-cli.js causal experiment add-observation \
111
+ 1 \
112
+ true \
113
+ 0.15 \
114
+ '{"coverage": 0.85, "lines": 5000}'
115
+ echo " - Control group (low test coverage)..."
116
+ node dist/agentdb/cli/agentdb-cli.js causal experiment add-observation \
117
+ 1 \
118
+ false \
119
+ 0.35 \
120
+ '{"coverage": 0.45, "lines": 5000}'
121
+ echo ""
122
+
123
+ # Test 11: Calculate experiment uplift
124
+ echo "1️⃣1️⃣ Calculating experiment uplift..."
125
+ node dist/agentdb/cli/agentdb-cli.js causal experiment calculate 1
126
+ echo ""
127
+
128
+ # Test 12: Query causal edges
129
+ echo "1️⃣2️⃣ Querying causal edges..."
130
+ node dist/agentdb/cli/agentdb-cli.js causal query \
131
+ "" \
132
+ "" \
133
+ 0.5 \
134
+ 0.1 \
135
+ 10
136
+ echo ""
137
+
138
+ # Test 13: Database stats
139
+ echo "1️⃣3️⃣ Getting database statistics..."
140
+ node dist/agentdb/cli/agentdb-cli.js db stats
141
+ echo ""
142
+
143
+ # Summary
144
+ echo "=============================="
145
+ echo "✅ All 13 tests completed successfully!"
146
+ echo ""
147
+ echo "📊 Test database created at: $AGENTDB_PATH"
148
+ echo "📁 Size: $(du -h "$AGENTDB_PATH" | cut -f1)"
149
+ echo ""
150
+ echo "🔍 You can now explore the database or run individual commands:"
151
+ echo " node dist/agentdb/cli/agentdb-cli.js --help"
152
+ echo " AGENTDB_PATH=$AGENTDB_PATH node dist/agentdb/cli/agentdb-cli.js reflexion retrieve authentication 5"
153
+ echo ""
@@ -258,7 +258,7 @@ export function log(message) {
258
258
  wasm.log(ptr0, len0);
259
259
  }
260
260
 
261
- function __wbg_adapter_4(arg0, arg1, arg2) {
261
+ function __wbg_adapter_6(arg0, arg1, arg2) {
262
262
  wasm.__wbindgen_export_5(arg0, arg1, addHeapObject(arg2));
263
263
  }
264
264
 
@@ -540,7 +540,7 @@ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
540
540
 
541
541
  export function __wbindgen_cast_8eb6fd44e7238d11(arg0, arg1) {
542
542
  // Cast intrinsic for `Closure(Closure { dtor_idx: 62, function: Function { arguments: [Externref], shim_idx: 63, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
543
- const ret = makeMutClosure(arg0, arg1, 62, __wbg_adapter_4);
543
+ const ret = makeMutClosure(arg0, arg1, 62, __wbg_adapter_6);
544
544
  return addHeapObject(ret);
545
545
  };
546
546