agentic-flow 1.6.6 → 1.7.1

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 -30
  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 +239 -0
  34. package/dist/reasoningbank/HybridBackend.js +305 -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
@@ -0,0 +1,411 @@
1
+ # AgentDB CLI - Local Testing Guide
2
+
3
+ ## Quick Start
4
+
5
+ ### Option 1: Run the Full Test Suite (Recommended)
6
+ ```bash
7
+ # From the project root: /workspaces/agentic-flow/agentic-flow
8
+ ./scripts/test-agentdb.sh
9
+ ```
10
+
11
+ This will run 13 comprehensive tests covering all CLI features!
12
+
13
+ ### Option 2: Manual Testing
14
+
15
+ #### 1. Ensure you're in the correct directory
16
+ ```bash
17
+ cd /workspaces/agentic-flow/agentic-flow
18
+ pwd # Should show: /workspaces/agentic-flow/agentic-flow
19
+ ```
20
+
21
+ #### 2. Build the Project (if not already built)
22
+ ```bash
23
+ npm run build
24
+ ```
25
+
26
+ #### 3. Test the CLI Directly
27
+ ```bash
28
+ # Show help (all 17 commands)
29
+ node dist/agentdb/cli/agentdb-cli.js --help
30
+
31
+ # Or use npx (if globally installed)
32
+ npx agentdb --help
33
+ ```
34
+
35
+ ### 3. Create a Test Database
36
+ ```bash
37
+ # Set database path
38
+ export AGENTDB_PATH=./test-agentdb.db
39
+
40
+ # Or specify inline for each command
41
+ AGENTDB_PATH=./test-agentdb.db node dist/agentdb/cli/agentdb-cli.js db stats
42
+ ```
43
+
44
+ ## Test Each Command Category
45
+
46
+ ### 🧠 Reflexion Memory (Episodic Replay)
47
+ ```bash
48
+ # Store an episode with self-critique
49
+ node dist/agentdb/cli/agentdb-cli.js reflexion store \
50
+ "session-1" \
51
+ "implement_authentication" \
52
+ 0.95 \
53
+ true \
54
+ "Successfully used OAuth2 with JWT tokens" \
55
+ "User login requirement" \
56
+ "Working auth system" \
57
+ 1200 \
58
+ 5000
59
+
60
+ # Store a failed episode
61
+ node dist/agentdb/cli/agentdb-cli.js reflexion store \
62
+ "session-1" \
63
+ "implement_authentication" \
64
+ 0.3 \
65
+ false \
66
+ "Forgot to validate tokens properly" \
67
+ "User login requirement" \
68
+ "Insecure auth" \
69
+ 800 \
70
+ 3000
71
+
72
+ # Retrieve relevant episodes
73
+ node dist/agentdb/cli/agentdb-cli.js reflexion retrieve \
74
+ "authentication" \
75
+ 5 \
76
+ 0.5
77
+
78
+ # Get critique summary from failures
79
+ node dist/agentdb/cli/agentdb-cli.js reflexion critique-summary \
80
+ "authentication" \
81
+ true
82
+
83
+ # Prune old episodes
84
+ node dist/agentdb/cli/agentdb-cli.js reflexion prune 30 0.2
85
+ ```
86
+
87
+ ### 🛠️ Skill Library (Lifelong Learning)
88
+ ```bash
89
+ # Create a skill manually
90
+ node dist/agentdb/cli/agentdb-cli.js skill create \
91
+ "jwt_authentication" \
92
+ "Generate and validate JWT tokens for user authentication" \
93
+ "function generateJWT(payload) { return jwt.sign(payload, secret); }"
94
+
95
+ # Search for skills
96
+ node dist/agentdb/cli/agentdb-cli.js skill search \
97
+ "authentication tokens" \
98
+ 5
99
+
100
+ # Auto-consolidate episodes into skills
101
+ node dist/agentdb/cli/agentdb-cli.js skill consolidate \
102
+ 3 \
103
+ 0.7 \
104
+ 7
105
+
106
+ # Prune underperforming skills
107
+ node dist/agentdb/cli/agentdb-cli.js skill prune \
108
+ 3 \
109
+ 0.4 \
110
+ 60
111
+ ```
112
+
113
+ ### 🔗 Causal Memory Graph (Intervention-Based)
114
+ ```bash
115
+ # Add a causal edge manually
116
+ node dist/agentdb/cli/agentdb-cli.js causal add-edge \
117
+ "add_unit_tests" \
118
+ "code_quality_score" \
119
+ 0.25 \
120
+ 0.95 \
121
+ 100
122
+
123
+ # Create an A/B experiment
124
+ node dist/agentdb/cli/agentdb-cli.js causal experiment create \
125
+ "test-coverage-vs-bugs" \
126
+ "test_coverage" \
127
+ "bug_rate"
128
+
129
+ # Add observations (treatment group)
130
+ node dist/agentdb/cli/agentdb-cli.js causal experiment add-observation \
131
+ 1 \
132
+ true \
133
+ 0.15 \
134
+ '{"coverage": 0.85}'
135
+
136
+ # Add observations (control group)
137
+ node dist/agentdb/cli/agentdb-cli.js causal experiment add-observation \
138
+ 1 \
139
+ false \
140
+ 0.35 \
141
+ '{"coverage": 0.45}'
142
+
143
+ # Calculate uplift
144
+ node dist/agentdb/cli/agentdb-cli.js causal experiment calculate 1
145
+
146
+ # Query causal edges
147
+ node dist/agentdb/cli/agentdb-cli.js causal query \
148
+ "test" \
149
+ "quality" \
150
+ 0.6 \
151
+ 0.1 \
152
+ 10
153
+ ```
154
+
155
+ ### 🔍 Causal Recall (Utility-Based Reranking)
156
+ ```bash
157
+ # Retrieve with causal utility and provenance certificate
158
+ node dist/agentdb/cli/agentdb-cli.js recall with-certificate \
159
+ "implement secure authentication" \
160
+ 10 \
161
+ 0.7 \
162
+ 0.2 \
163
+ 0.1
164
+ ```
165
+
166
+ ### 🌙 Nightly Learner (Automated Discovery)
167
+ ```bash
168
+ # Discover causal edges from patterns (dry run)
169
+ node dist/agentdb/cli/agentdb-cli.js learner run \
170
+ 3 \
171
+ 0.6 \
172
+ 0.7 \
173
+ true
174
+
175
+ # Discover and save edges
176
+ node dist/agentdb/cli/agentdb-cli.js learner run \
177
+ 3 \
178
+ 0.6 \
179
+ 0.7 \
180
+ false
181
+
182
+ # Prune low-quality edges
183
+ node dist/agentdb/cli/agentdb-cli.js learner prune \
184
+ 0.5 \
185
+ 0.05 \
186
+ 90
187
+ ```
188
+
189
+ ### 📊 Database Stats
190
+ ```bash
191
+ # Get comprehensive database statistics
192
+ node dist/agentdb/cli/agentdb-cli.js db stats
193
+ ```
194
+
195
+ ## Full Workflow Example
196
+
197
+ ### Scenario: Learning from Authentication Implementation
198
+
199
+ ```bash
200
+ #!/bin/bash
201
+
202
+ # Set up test database
203
+ export AGENTDB_PATH=./auth-learning.db
204
+
205
+ # 1. Store successful attempts
206
+ node dist/agentdb/cli/agentdb-cli.js reflexion store \
207
+ "session-auth-1" "oauth2_implementation" 0.95 true \
208
+ "Used industry-standard OAuth2 flow" \
209
+ "Implement secure login" "Working OAuth2 system" 1500 6000
210
+
211
+ node dist/agentdb/cli/agentdb-cli.js reflexion store \
212
+ "session-auth-2" "jwt_tokens" 0.90 true \
213
+ "JWT with proper expiration and refresh tokens" \
214
+ "Token management" "Secure JWT system" 1200 5500
215
+
216
+ # 2. Store failed attempts
217
+ node dist/agentdb/cli/agentdb-cli.js reflexion store \
218
+ "session-auth-3" "session_storage" 0.35 false \
219
+ "Insecure session storage in localStorage" \
220
+ "Session management" "Security vulnerability" 800 3000
221
+
222
+ # 3. Create a skill from successful pattern
223
+ node dist/agentdb/cli/agentdb-cli.js skill create \
224
+ "secure_oauth2_jwt" \
225
+ "OAuth2 flow with JWT token management" \
226
+ "const auth = { oauth2: true, jwt: true, refresh: true }"
227
+
228
+ # 4. Add causal edge
229
+ node dist/agentdb/cli/agentdb-cli.js causal add-edge \
230
+ "add_token_refresh" "session_security" 0.40 0.92 50
231
+
232
+ # 5. Query for authentication guidance
233
+ node dist/agentdb/cli/agentdb-cli.js reflexion retrieve \
234
+ "secure authentication" 5 0.8
235
+
236
+ # 6. Get critique summary of what NOT to do
237
+ node dist/agentdb/cli/agentdb-cli.js reflexion critique-summary \
238
+ "authentication" true
239
+
240
+ # 7. Search for applicable skills
241
+ node dist/agentdb/cli/agentdb-cli.js skill search \
242
+ "oauth jwt tokens" 3
243
+
244
+ # 8. Check database stats
245
+ node dist/agentdb/cli/agentdb-cli.js db stats
246
+ ```
247
+
248
+ ## Verify Installation
249
+
250
+ ### Check Binary Links
251
+ ```bash
252
+ # Should show the CLI binary path
253
+ which agentdb
254
+
255
+ # Or check npm bin
256
+ npm bin agentdb
257
+ ```
258
+
259
+ ### Run from Package
260
+ ```bash
261
+ # If you've run npm install -g or npm link
262
+ agentdb --help
263
+ ```
264
+
265
+ ## Environment Variables
266
+
267
+ ```bash
268
+ # Database path (default: ./agentdb.db)
269
+ export AGENTDB_PATH=/path/to/your/database.db
270
+
271
+ # Example with custom path
272
+ AGENTDB_PATH=~/my-agent-memory.db node dist/agentdb/cli/agentdb-cli.js db stats
273
+ ```
274
+
275
+ ## Expected Output Examples
276
+
277
+ ### Successful Episode Storage
278
+ ```
279
+ ✓ Stored episode #1 (session: session-1, task: implement_authentication)
280
+ Reward: 0.95 | Success: true | Latency: 1200ms | Tokens: 5000
281
+ ```
282
+
283
+ ### Skill Search Results
284
+ ```
285
+ 🔍 Found 3 skills for "authentication"
286
+
287
+ #1: jwt_authentication (success rate: 0.90, uses: 5)
288
+ Generate and validate JWT tokens for user authentication
289
+
290
+ #2: oauth2_flow (success rate: 0.85, uses: 3)
291
+ Complete OAuth2 authorization code flow
292
+ ```
293
+
294
+ ### Database Stats
295
+ ```
296
+ AgentDB Statistics
297
+
298
+ Episodes: 15
299
+ Skills: 8
300
+ Causal Edges: 12
301
+ Experiments: 3
302
+ Certificates: 5
303
+
304
+ Total Size: 2.4 MB
305
+ ```
306
+
307
+ ## Troubleshooting
308
+
309
+ ### Issue: "Cannot find module"
310
+ ```bash
311
+ # Rebuild the project
312
+ npm run build
313
+
314
+ # Check dist folder exists
315
+ ls dist/agentdb/cli/agentdb-cli.js
316
+ ```
317
+
318
+ ### Issue: "Database is locked"
319
+ ```bash
320
+ # Close any open database connections
321
+ # Or use a different database path
322
+ export AGENTDB_PATH=./test2-agentdb.db
323
+ ```
324
+
325
+ ### Issue: "Permission denied"
326
+ ```bash
327
+ # Make CLI executable
328
+ chmod +x dist/agentdb/cli/agentdb-cli.js
329
+ ```
330
+
331
+ ## Advanced Testing
332
+
333
+ ### Test with Programmatic API
334
+ ```typescript
335
+ import { AgentDBCLI } from './dist/agentdb/cli/agentdb-cli.js';
336
+
337
+ const cli = new AgentDBCLI('./test.db');
338
+
339
+ // Store episode
340
+ await cli.reflexionStore({
341
+ sessionId: 'test-1',
342
+ task: 'example',
343
+ reward: 0.9,
344
+ success: true,
345
+ critique: 'Good approach'
346
+ });
347
+
348
+ // Retrieve episodes
349
+ await cli.reflexionRetrieve({
350
+ task: 'example',
351
+ k: 5
352
+ });
353
+ ```
354
+
355
+ ### Integration with Your Project
356
+ ```typescript
357
+ // In your agent code
358
+ import { AgentDBCLI } from 'agentic-flow/agentdb';
359
+
360
+ const memory = new AgentDBCLI();
361
+
362
+ // Learn from task outcomes
363
+ async function learnFromTask(task, outcome) {
364
+ await memory.reflexionStore({
365
+ sessionId: getCurrentSession(),
366
+ task: task.name,
367
+ reward: outcome.score,
368
+ success: outcome.passed,
369
+ critique: outcome.feedback,
370
+ input: task.input,
371
+ output: outcome.result,
372
+ latencyMs: outcome.duration,
373
+ tokensUsed: outcome.tokens
374
+ });
375
+ }
376
+
377
+ // Retrieve similar past experiences
378
+ async function recallSimilar(task) {
379
+ return await memory.reflexionRetrieve({
380
+ task: task.name,
381
+ k: 5,
382
+ minReward: 0.7
383
+ });
384
+ }
385
+ ```
386
+
387
+ ## Performance Benchmarks
388
+
389
+ ```bash
390
+ # Time a full workflow
391
+ time bash full-workflow-example.sh
392
+
393
+ # Check database performance
394
+ node dist/agentdb/cli/agentdb-cli.js db stats
395
+ ```
396
+
397
+ ## Next Steps
398
+
399
+ 1. ✅ Test basic commands (reflexion, skill)
400
+ 2. ✅ Test causal features (edges, experiments)
401
+ 3. ✅ Run nightly learner for discovery
402
+ 4. ✅ Verify causal recall with certificates
403
+ 5. ✅ Check database stats
404
+ 6. 🚀 Integrate into your agent workflows
405
+
406
+ ## Resources
407
+
408
+ - **AgentDB Controllers**: `/src/agentdb/controllers/`
409
+ - **CLI Source**: `/src/agentdb/cli/agentdb-cli.ts`
410
+ - **Tests**: `/src/agentdb/tests/frontier-features.test.ts`
411
+ - **Binary**: `/dist/agentdb/cli/agentdb-cli.js`
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "agentic-flow",
3
- "version": "1.6.6",
3
+ "version": "1.7.1",
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.5",
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