agentic-flow 1.5.12 → 1.6.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 (78) hide show
  1. package/CHANGELOG.md +199 -0
  2. package/README.md +43 -23
  3. package/dist/cli-proxy.js +195 -1
  4. package/dist/config/quic.js +6 -0
  5. package/dist/reasoningbank/backend-selector.js +145 -0
  6. package/dist/reasoningbank/index.js +4 -0
  7. package/dist/transport/quic.js +43 -0
  8. package/dist/utils/cli.js +5 -0
  9. package/docs/.claude-flow/metrics/performance.json +80 -2
  10. package/docs/.claude-flow/metrics/task-metrics.json +3 -3
  11. package/docs/INDEX.md +55 -9
  12. package/docs/INTEGRATION-COMPLETE.md +291 -0
  13. package/docs/QUIC_FINAL_STATUS.md +399 -0
  14. package/docs/README_QUIC_PHASE1.md +117 -0
  15. package/docs/integration-docs/CLAUDE-FLOW-INTEGRATION-ANALYSIS.md +653 -0
  16. package/docs/integration-docs/IMPLEMENTATION_SUMMARY.md +369 -0
  17. package/docs/integration-docs/INTEGRATION-QUICK-SUMMARY.md +249 -0
  18. package/docs/integration-docs/INTEGRATION-STATUS-CORRECTED.md +488 -0
  19. package/docs/integration-docs/README.md +61 -0
  20. package/docs/quantum-goap/DEPENDENCY_GRAPH.mermaid +133 -0
  21. package/docs/quantum-goap/EXECUTION_SUMMARY.md +199 -0
  22. package/docs/quantum-goap/GOAP_IMPLEMENTATION_PLAN.md +2406 -0
  23. package/docs/quantum-goap/QUICK_START.md +301 -0
  24. package/docs/quantum-research/QUANTUM_RESEARCH_LITERATURE_REVIEW.md +2071 -0
  25. package/docs/quantum-research/README.md +94 -0
  26. package/docs/reasoningbank/MEMORY_VALIDATION_REPORT.md +417 -0
  27. package/docs/reasoningbank/README.md +43 -0
  28. package/docs/reasoningbank/REASONINGBANK_ARCHITECTURE.md +663 -0
  29. package/docs/reasoningbank/REASONINGBANK_BACKENDS.md +375 -0
  30. package/docs/reasoningbank/REASONINGBANK_FIXES.md +455 -0
  31. package/docs/reasoningbank/REASONINGBANK_INVESTIGATION.md +380 -0
  32. package/docs/releases/v1.5.14-QUIC-TRANSPORT.md +201 -0
  33. package/docs/validation-reports/BENCHMARK_AND_OPTIMIZATION_REPORT.md +470 -0
  34. package/docs/validation-reports/DOCKER_VALIDATION_RESULTS.md +391 -0
  35. package/docs/validation-reports/NO_REGRESSIONS_CONFIRMED.md +384 -0
  36. package/docs/validation-reports/NPM-PACKAGE-ANALYSIS-FINAL.md +543 -0
  37. package/docs/validation-reports/README.md +43 -0
  38. package/docs/validation-reports/V2.7.0-ALPHA.10_FINAL_VALIDATION.md +817 -0
  39. package/docs/validation-reports/V2.7.0-ALPHA.9_VALIDATION.md +546 -0
  40. package/docs/validation-reports/v1.6.0-QUIC-CLI-VALIDATION.md +558 -0
  41. package/docs/version-releases/README.md +82 -0
  42. package/package.json +15 -1
  43. package/validation/docker/Dockerfile.reasoningbank-local +24 -0
  44. package/validation/docker/Dockerfile.reasoningbank-test +21 -0
  45. package/validation/docker/README.md +234 -0
  46. package/validation/docker/docker-compose.yml +29 -0
  47. package/validation/docker/test-reasoningbank-npx.mjs +442 -0
  48. package/validation/docker-quic-test.sh +42 -0
  49. package/validation/docker-quic-validation.sh +60 -0
  50. package/validation/quic-deep-validation.ts +304 -0
  51. package/validation/test-quic-wasm.ts +94 -0
  52. package/validation/test-regression.mjs +246 -0
  53. package/wasm/quic/README.md +75 -0
  54. package/wasm/quic/agentic_flow_quic.d.ts +37 -0
  55. package/wasm/quic/agentic_flow_quic.js +779 -0
  56. package/wasm/quic/agentic_flow_quic_bg.wasm +0 -0
  57. package/wasm/quic/agentic_flow_quic_bg.wasm.d.ts +19 -0
  58. package/wasm/quic/package.json +20 -0
  59. /package/docs/{PACKAGE_STRUCTURE.md → architecture/PACKAGE_STRUCTURE.md} +0 -0
  60. /package/docs/{MODEL-ID-MAPPING.md → guides/MODEL-ID-MAPPING.md} +0 -0
  61. /package/docs/{ONNX-PROXY-IMPLEMENTATION.md → guides/ONNX-PROXY-IMPLEMENTATION.md} +0 -0
  62. /package/docs/{STANDALONE_PROXY_GUIDE.md → guides/STANDALONE_PROXY_GUIDE.md} +0 -0
  63. /package/docs/{AGENT-BOOSTER-INTEGRATION.md → integration-docs/AGENT-BOOSTER-INTEGRATION.md} +0 -0
  64. /package/docs/{CLI-INTEGRATION-COMPLETE.md → integration-docs/CLI-INTEGRATION-COMPLETE.md} +0 -0
  65. /package/docs/{INTEGRATION_COMPLETE_SUMMARY.md → integration-docs/INTEGRATION_COMPLETE_SUMMARY.md} +0 -0
  66. /package/docs/{WASM_ESM_FIX.md → integration-docs/WASM_ESM_FIX.md} +0 -0
  67. /package/docs/{WASM_INTEGRATION_COMPLETE.md → integration-docs/WASM_INTEGRATION_COMPLETE.md} +0 -0
  68. /package/docs/{REASONING-AGENTS.md → reasoningbank/REASONING-AGENTS.md} +0 -0
  69. /package/docs/{REASONINGBANK-BENCHMARK-RESULTS.md → reasoningbank/REASONINGBANK-BENCHMARK-RESULTS.md} +0 -0
  70. /package/docs/{REASONINGBANK-BENCHMARK.md → reasoningbank/REASONINGBANK-BENCHMARK.md} +0 -0
  71. /package/docs/{REASONINGBANK-CLI-INTEGRATION.md → reasoningbank/REASONINGBANK-CLI-INTEGRATION.md} +0 -0
  72. /package/docs/{REASONINGBANK-DEMO.md → reasoningbank/REASONINGBANK-DEMO.md} +0 -0
  73. /package/docs/{REASONINGBANK-VALIDATION.md → reasoningbank/REASONINGBANK-VALIDATION.md} +0 -0
  74. /package/docs/{REASONINGBANK_IMPLEMENTATION_STATUS.md → reasoningbank/REASONINGBANK_IMPLEMENTATION_STATUS.md} +0 -0
  75. /package/docs/{REASONINGBANK_INTEGRATION_PLAN.md → reasoningbank/REASONINGBANK_INTEGRATION_PLAN.md} +0 -0
  76. /package/docs/{PUBLICATION_REPORT_v1.5.11.md → version-releases/PUBLICATION_REPORT_v1.5.11.md} +0 -0
  77. /package/docs/{v1.5.9-DOCKER-VERIFICATION.md → version-releases/v1.5.9-DOCKER-VERIFICATION.md} +0 -0
  78. /package/docs/{v1.5.9-RELEASE-SUMMARY.md → version-releases/v1.5.9-RELEASE-SUMMARY.md} +0 -0
@@ -0,0 +1,21 @@
1
+ # Dockerfile for validating agentic-flow ReasoningBank in clean environment
2
+ FROM node:20-slim
3
+
4
+ # Install necessary dependencies
5
+ RUN apt-get update && apt-get install -y \
6
+ git \
7
+ curl \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Create working directory
11
+ WORKDIR /test
12
+
13
+ # Copy validation scripts
14
+ COPY validation/docker/test-reasoningbank-npx.mjs /test/
15
+
16
+ # Set environment variables
17
+ ENV NODE_ENV=production
18
+ ENV NPM_CONFIG_UPDATE_NOTIFIER=false
19
+
20
+ # Default command runs validation
21
+ CMD ["node", "--experimental-wasm-modules", "/test/test-reasoningbank-npx.mjs"]
@@ -0,0 +1,234 @@
1
+ # Docker Validation for ReasoningBank
2
+
3
+ This directory contains Docker-based validation scripts to test agentic-flow package in clean, isolated environments.
4
+
5
+ ## Purpose
6
+
7
+ Validates that agentic-flow works correctly when installed via npm/npx in a fresh Node.js environment, testing:
8
+
9
+ 1. **Package Installation** - npm install works correctly
10
+ 2. **Backend Selector** - Environment detection functions properly
11
+ 3. **Node.js Backend** - SQLite backend initializes and works
12
+ 4. **WASM Backend** - WASM module loads and functions in Node.js
13
+ 5. **Package Exports** - All export paths resolve correctly
14
+
15
+ ## Quick Start
16
+
17
+ ### Test Local Build
18
+
19
+ ```bash
20
+ # From agentic-flow root directory
21
+
22
+ # 1. Build the package
23
+ npm run build
24
+
25
+ # 2. Create package tarball
26
+ npm pack
27
+
28
+ # 3. Run Docker validation
29
+ cd validation/docker
30
+ docker build -f Dockerfile.reasoningbank-local -t agentic-flow-test:local ../..
31
+ docker run --rm agentic-flow-test:local
32
+ ```
33
+
34
+ ### Test Published Version
35
+
36
+ ```bash
37
+ # Test latest published version from npm
38
+ docker build -f Dockerfile.reasoningbank-test -t agentic-flow-test:latest ../..
39
+ docker run --rm agentic-flow-test:latest
40
+
41
+ # Or use docker-compose
42
+ docker-compose up reasoningbank-test-latest
43
+ ```
44
+
45
+ ## Files
46
+
47
+ | File | Purpose |
48
+ |------|---------|
49
+ | `Dockerfile.reasoningbank-test` | Tests published npm package |
50
+ | `Dockerfile.reasoningbank-local` | Tests local build (npm pack) |
51
+ | `test-reasoningbank-npx.mjs` | Validation test suite |
52
+ | `docker-compose.yml` | Orchestrates multiple test scenarios |
53
+ | `README.md` | This file |
54
+
55
+ ## Test Suite
56
+
57
+ The validation script (`test-reasoningbank-npx.mjs`) runs:
58
+
59
+ ### Test 1: Package Installation
60
+ - Initializes package.json
61
+ - Installs agentic-flow via npm
62
+ - Verifies installation success
63
+
64
+ ### Test 2: Backend Selector
65
+ - Imports backend-selector module
66
+ - Tests environment detection (expects 'nodejs')
67
+ - Validates backend info structure
68
+ - Checks environment validation
69
+
70
+ ### Test 3: Node.js Backend (SQLite)
71
+ - Creates ReasoningBank with optimal backend
72
+ - Verifies Node.js backend selected
73
+ - Checks db module is present
74
+ - Tests database initialization
75
+
76
+ ### Test 4: WASM Backend
77
+ - Imports WASM adapter
78
+ - Creates WASM ReasoningBank instance
79
+ - Stores test pattern
80
+ - Performs category search
81
+ - Runs semantic similarity search
82
+ - Validates similarity scores
83
+ - Checks stats reporting
84
+
85
+ ### Test 5: Package Exports
86
+ - Tests main export (`agentic-flow`)
87
+ - Tests reasoningbank export (conditional)
88
+ - Tests backend-selector export
89
+ - Tests wasm-adapter export
90
+
91
+ ## Expected Output
92
+
93
+ ```
94
+ 🐳 Docker Validation: agentic-flow ReasoningBank
95
+
96
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
97
+ ✅ Created test directory: /test/validation-workspace
98
+
99
+ 📦 Test 1: Package Installation via npm
100
+
101
+ Installing agentic-flow@latest...
102
+ ✅ Package installation
103
+ Installed agentic-flow@1.5.13
104
+
105
+ 🔍 Test 2: Backend Selector Environment Detection
106
+
107
+ ✅ Backend selector import
108
+ Detected: nodejs
109
+
110
+ ✅ Environment detection
111
+ Expected nodejs, got nodejs
112
+
113
+ 💾 Test 3: Node.js Backend (SQLite)
114
+
115
+ ✅ Node.js backend initialization
116
+ SQLite backend loaded
117
+
118
+ ✅ Node.js backend detection
119
+ db module present
120
+
121
+ ⚡ Test 4: WASM Backend (In-Memory)
122
+
123
+ ✅ WASM backend initialization
124
+ WASM module loaded
125
+
126
+ ✅ WASM pattern storage
127
+ In-memory storage works
128
+
129
+ ✅ WASM semantic search
130
+ Similarity matching works
131
+
132
+ ✅ WASM similarity scoring
133
+ Score: 0.5401
134
+
135
+ 📦 Test 5: Package Exports
136
+
137
+ ✅ Package exports
138
+ All import paths valid
139
+
140
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
141
+ 📊 VALIDATION SUMMARY
142
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
143
+
144
+ Total Tests: 10
145
+ ✅ Passed: 10
146
+ ❌ Failed: 0
147
+ ⏱️ Duration: 45.23s
148
+
149
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
150
+
151
+ 🎉 All tests passed! Package is working correctly.
152
+ ```
153
+
154
+ ## Troubleshooting
155
+
156
+ ### Test Failures
157
+
158
+ If tests fail, check:
159
+
160
+ 1. **Package installation fails**
161
+ - Verify network connectivity
162
+ - Check npm registry is accessible
163
+ - Try with `--registry https://registry.npmjs.org`
164
+
165
+ 2. **Backend selector fails**
166
+ - Check package.json exports field
167
+ - Verify conditional exports syntax
168
+ - Test with `node --experimental-modules`
169
+
170
+ 3. **WASM backend fails**
171
+ - Ensure `--experimental-wasm-modules` flag is set
172
+ - Check WASM binary is included in dist/
173
+ - Verify wasm-pack build completed
174
+
175
+ 4. **SQLite backend fails**
176
+ - Check better-sqlite3 is in dependencies
177
+ - Verify native module compilation
178
+ - Test on matching Node.js version
179
+
180
+ ### Local Testing
181
+
182
+ To test locally without Docker:
183
+
184
+ ```bash
185
+ cd /tmp
186
+ mkdir reasoningbank-test && cd reasoningbank-test
187
+ npm init -y
188
+ npm install agentic-flow@latest
189
+
190
+ # Run individual tests
191
+ node --experimental-wasm-modules <<EOF
192
+ import { getRecommendedBackend } from 'agentic-flow/reasoningbank/backend-selector';
193
+ console.log('Backend:', getRecommendedBackend());
194
+ EOF
195
+ ```
196
+
197
+ ## CI/CD Integration
198
+
199
+ Add to GitHub Actions:
200
+
201
+ ```yaml
202
+ - name: Validate agentic-flow in Docker
203
+ run: |
204
+ cd validation/docker
205
+ docker build -f Dockerfile.reasoningbank-local -t test ../..
206
+ docker run --rm test
207
+ ```
208
+
209
+ ## Performance Benchmarks
210
+
211
+ Expected performance in Docker:
212
+
213
+ | Operation | Time |
214
+ |-----------|------|
215
+ | Package install | 15-30s |
216
+ | Backend detection | <100ms |
217
+ | WASM initialization | 50-100ms |
218
+ | Pattern storage | 1-5ms |
219
+ | Semantic search | 50-100ms |
220
+
221
+ ## Environment Details
222
+
223
+ - **Base Image**: `node:20-slim`
224
+ - **Node.js Version**: 20.x LTS
225
+ - **Architecture**: linux/amd64
226
+ - **Dependencies**: git, curl
227
+
228
+ ## Support
229
+
230
+ If validation fails:
231
+
232
+ 1. Check the [REASONINGBANK_BACKENDS.md](../../docs/REASONINGBANK_BACKENDS.md) guide
233
+ 2. Review [IMPLEMENTATION_SUMMARY.md](../../docs/IMPLEMENTATION_SUMMARY.md)
234
+ 3. Open an issue at https://github.com/ruvnet/agentic-flow/issues
@@ -0,0 +1,29 @@
1
+ version: '3.8'
2
+
3
+ services:
4
+ # Test with latest published version from npm
5
+ reasoningbank-test-latest:
6
+ build:
7
+ context: ../..
8
+ dockerfile: validation/docker/Dockerfile.reasoningbank-test
9
+ environment:
10
+ - PACKAGE_VERSION=latest
11
+ - NODE_ENV=production
12
+ command: node --experimental-wasm-modules /test/test-reasoningbank-npx.mjs
13
+ networks:
14
+ - test-network
15
+
16
+ # Test with local build (after npm pack)
17
+ reasoningbank-test-local:
18
+ build:
19
+ context: ../..
20
+ dockerfile: validation/docker/Dockerfile.reasoningbank-local
21
+ environment:
22
+ - NODE_ENV=production
23
+ command: node --experimental-wasm-modules /test/test-reasoningbank-npx.mjs
24
+ networks:
25
+ - test-network
26
+
27
+ networks:
28
+ test-network:
29
+ driver: bridge