agentic-flow 1.9.4 → 1.10.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.
- package/CHANGELOG.md +246 -0
- package/dist/proxy/adaptive-proxy.js +224 -0
- package/dist/proxy/anthropic-to-gemini.js +2 -2
- package/dist/proxy/http2-proxy-optimized.js +191 -0
- package/dist/proxy/http2-proxy.js +381 -0
- package/dist/proxy/http3-proxy-old.js +331 -0
- package/dist/proxy/http3-proxy.js +51 -0
- package/dist/proxy/websocket-proxy.js +406 -0
- package/dist/utils/auth.js +52 -0
- package/dist/utils/compression-middleware.js +149 -0
- package/dist/utils/connection-pool.js +184 -0
- package/dist/utils/rate-limiter.js +48 -0
- package/dist/utils/response-cache.js +211 -0
- package/dist/utils/streaming-optimizer.js +141 -0
- package/docs/.claude-flow/metrics/performance.json +3 -3
- package/docs/.claude-flow/metrics/task-metrics.json +3 -3
- package/docs/ISSUE-55-VALIDATION.md +152 -0
- package/docs/OPTIMIZATIONS.md +460 -0
- package/docs/README.md +217 -0
- package/docs/issues/ISSUE-xenova-transformers-dependency.md +380 -0
- package/package.json +1 -1
- package/scripts/claude +31 -0
- package/validation/test-gemini-exclusiveMinimum-fix.ts +142 -0
- package/validation/validate-v1.10.0-docker.sh +296 -0
- package/wasm/reasoningbank/reasoningbank_wasm_bg.js +2 -2
- package/wasm/reasoningbank/reasoningbank_wasm_bg.wasm +0 -0
- package/docs/INDEX.md +0 -279
- package/docs/guides/.claude-flow/metrics/agent-metrics.json +0 -1
- package/docs/guides/.claude-flow/metrics/performance.json +0 -9
- package/docs/guides/.claude-flow/metrics/task-metrics.json +0 -10
- package/docs/router/.claude-flow/metrics/agent-metrics.json +0 -1
- package/docs/router/.claude-flow/metrics/performance.json +0 -9
- package/docs/router/.claude-flow/metrics/task-metrics.json +0 -10
- /package/docs/{TEST-V1.7.8.Dockerfile → docker-tests/TEST-V1.7.8.Dockerfile} +0 -0
- /package/docs/{TEST-V1.7.9-NODE20.Dockerfile → docker-tests/TEST-V1.7.9-NODE20.Dockerfile} +0 -0
- /package/docs/{TEST-V1.7.9.Dockerfile → docker-tests/TEST-V1.7.9.Dockerfile} +0 -0
- /package/docs/{v1.7.1-QUICK-START.md → guides/QUICK-START-v1.7.1.md} +0 -0
- /package/docs/{INTEGRATION-COMPLETE.md → integration-docs/INTEGRATION-COMPLETE.md} +0 -0
- /package/docs/{LANDING-PAGE-PROVIDER-CONTENT.md → providers/LANDING-PAGE-PROVIDER-CONTENT.md} +0 -0
- /package/docs/{PROVIDER-FALLBACK-GUIDE.md → providers/PROVIDER-FALLBACK-GUIDE.md} +0 -0
- /package/docs/{PROVIDER-FALLBACK-SUMMARY.md → providers/PROVIDER-FALLBACK-SUMMARY.md} +0 -0
- /package/docs/{QUIC_FINAL_STATUS.md → quic/QUIC_FINAL_STATUS.md} +0 -0
- /package/docs/{README_QUIC_PHASE1.md → quic/README_QUIC_PHASE1.md} +0 -0
- /package/docs/{AGENTDB_TESTING.md → testing/AGENTDB_TESTING.md} +0 -0
package/docs/README.md
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# Agentic-Flow Documentation
|
|
2
|
+
|
|
3
|
+
Complete documentation for the agentic-flow platform - AI agent orchestration with 66 specialized agents, 213 MCP tools, ReasoningBank learning memory, and autonomous multi-agent swarms.
|
|
4
|
+
|
|
5
|
+
## 📚 Documentation Structure
|
|
6
|
+
|
|
7
|
+
### Core Documentation
|
|
8
|
+
- **[CLAUDE.md](CLAUDE.md)** - Claude Code configuration and SPARC development environment setup
|
|
9
|
+
|
|
10
|
+
### Quick Start & Guides
|
|
11
|
+
- **[guides/](guides/)** - User guides, tutorials, and how-to documentation
|
|
12
|
+
- [Quick Start Guide](guides/QUICK-START-v1.7.1.md)
|
|
13
|
+
- [MCP Tools](guides/MCP-TOOLS.md)
|
|
14
|
+
- [Claude Code Integration](guides/CLAUDE-CODE-INTEGRATION.md)
|
|
15
|
+
- [Agent Booster](guides/AGENT-BOOSTER.md)
|
|
16
|
+
- [ReasoningBank](guides/REASONINGBANK.md)
|
|
17
|
+
- [Multi-Model Router](guides/MULTI-MODEL-ROUTER.md)
|
|
18
|
+
- [Deployment Guide](guides/DEPLOYMENT.md)
|
|
19
|
+
|
|
20
|
+
### Architecture & Design
|
|
21
|
+
- **[architecture/](architecture/)** - System architecture and design documents
|
|
22
|
+
- [Executive Summary](architecture/EXECUTIVE_SUMMARY.md)
|
|
23
|
+
- [Package Structure](architecture/PACKAGE_STRUCTURE.md)
|
|
24
|
+
- [QUIC Implementation](architecture/QUIC-IMPLEMENTATION-SUMMARY.md)
|
|
25
|
+
- [Integration Status](architecture/INTEGRATION-STATUS.md)
|
|
26
|
+
- [Improvement Plan](architecture/IMPROVEMENT_PLAN.md)
|
|
27
|
+
|
|
28
|
+
### Integration Documentation
|
|
29
|
+
- **[integration-docs/](integration-docs/)** - Integration guides and implementation summaries
|
|
30
|
+
- **[integrations/](integrations/)** - Specific integration implementations
|
|
31
|
+
- [Claude Flow Integration](integrations/CLAUDE_FLOW_INTEGRATION.md)
|
|
32
|
+
- [Flow Nexus Integration](integrations/FLOW-NEXUS-INTEGRATION.md)
|
|
33
|
+
- [FastMCP Integration](integrations/FASTMCP_CLI_INTEGRATION.md)
|
|
34
|
+
|
|
35
|
+
### Feature Documentation
|
|
36
|
+
|
|
37
|
+
#### Provider & Router
|
|
38
|
+
- **[providers/](providers/)** - Provider fallback and configuration
|
|
39
|
+
- [Provider Fallback Guide](providers/PROVIDER-FALLBACK-GUIDE.md)
|
|
40
|
+
- [Provider Fallback Summary](providers/PROVIDER-FALLBACK-SUMMARY.md)
|
|
41
|
+
- [Landing Page Provider Content](providers/LANDING-PAGE-PROVIDER-CONTENT.md)
|
|
42
|
+
- **[router/](router/)** - Multi-model router documentation
|
|
43
|
+
- [Router User Guide](router/ROUTER_USER_GUIDE.md)
|
|
44
|
+
- [Router Config Reference](router/ROUTER_CONFIG_REFERENCE.md)
|
|
45
|
+
|
|
46
|
+
#### QUIC Transport
|
|
47
|
+
- **[quic/](quic/)** - QUIC protocol implementation
|
|
48
|
+
- [QUIC Status](quic/QUIC-STATUS.md)
|
|
49
|
+
- [Implementation Complete](quic/IMPLEMENTATION-COMPLETE-SUMMARY.md)
|
|
50
|
+
- [Final Validation](quic/FINAL-VALIDATION.md)
|
|
51
|
+
- [Performance Validation](quic/PERFORMANCE-VALIDATION.md)
|
|
52
|
+
|
|
53
|
+
#### ReasoningBank
|
|
54
|
+
- **[reasoningbank/](reasoningbank/)** - ReasoningBank learning memory system
|
|
55
|
+
- [Architecture](reasoningbank/REASONINGBANK_ARCHITECTURE.md)
|
|
56
|
+
- [Backends](reasoningbank/REASONINGBANK_BACKENDS.md)
|
|
57
|
+
- [Benchmark Results](reasoningbank/REASONINGBANK-BENCHMARK-RESULTS.md)
|
|
58
|
+
- [Validation](reasoningbank/REASONINGBANK-VALIDATION.md)
|
|
59
|
+
|
|
60
|
+
#### Supabase Integration
|
|
61
|
+
- **[supabase/](supabase/)** - Supabase realtime federation
|
|
62
|
+
- [Quick Start](supabase/QUICKSTART.md)
|
|
63
|
+
- [Implementation Summary](supabase/IMPLEMENTATION-SUMMARY.md)
|
|
64
|
+
- [Test Report](supabase/TEST-REPORT.md)
|
|
65
|
+
|
|
66
|
+
#### Federation
|
|
67
|
+
- **[federation/](federation/)** - Agent federation and deployment
|
|
68
|
+
- [Deployment Validation](federation/DEPLOYMENT-VALIDATION-SUCCESS.md)
|
|
69
|
+
- [Debug Streaming](federation/DEBUG-STREAMING-COMPLETE.md)
|
|
70
|
+
|
|
71
|
+
### Testing & Validation
|
|
72
|
+
- **[testing/](testing/)** - Test documentation and results
|
|
73
|
+
- [Agent System Validation](testing/AGENT-SYSTEM-VALIDATION.md)
|
|
74
|
+
- [Final Testing Summary](testing/FINAL-TESTING-SUMMARY.md)
|
|
75
|
+
- [Regression Test Results](testing/REGRESSION-TEST-RESULTS.md)
|
|
76
|
+
- **[validation/](validation/)** - Validation reports and processes
|
|
77
|
+
- **[validation-reports/](validation-reports/)** - Detailed validation results
|
|
78
|
+
- [Docker Validation](validation-reports/DOCKER_VALIDATION_RESULTS.md)
|
|
79
|
+
- [No Regressions Confirmed](validation-reports/NO_REGRESSIONS_CONFIRMED.md)
|
|
80
|
+
- **[docker-tests/](docker-tests/)** - Docker test configurations
|
|
81
|
+
|
|
82
|
+
### MCP Validation
|
|
83
|
+
- **[mcp-validation/](mcp-validation/)** - Model Context Protocol validation
|
|
84
|
+
- [MCP CLI Validation Report](mcp-validation/MCP-CLI-VALIDATION-REPORT.md)
|
|
85
|
+
- [Implementation Summary](mcp-validation/IMPLEMENTATION-SUMMARY.md)
|
|
86
|
+
|
|
87
|
+
### Benchmarks & Performance
|
|
88
|
+
- **[benchmarks/](benchmarks/)** - Performance benchmarks
|
|
89
|
+
- [QUIC Results](benchmarks/quic-results.md)
|
|
90
|
+
- [Optimization Guide](benchmarks/optimization-guide.md)
|
|
91
|
+
|
|
92
|
+
### Release Information
|
|
93
|
+
- **[releases/](releases/)** - Release notes and GitHub issues
|
|
94
|
+
- [v1.8.13 Release](releases/RELEASE-v1.8.13.md)
|
|
95
|
+
- [v1.5.14 QUIC Transport](releases/v1.5.14-QUIC-TRANSPORT.md)
|
|
96
|
+
- [v1.4.6 ReasoningBank](releases/v1.4.6-reasoningbank-release.md)
|
|
97
|
+
- **[version-releases/](version-releases/)** - Version-specific release documentation
|
|
98
|
+
|
|
99
|
+
### Planning & Research
|
|
100
|
+
- **[plans/](plans/)** - Feature plans and roadmaps
|
|
101
|
+
- [QUIC Implementation](plans/QUIC/)
|
|
102
|
+
- [Agent Booster](plans/agent-booster/)
|
|
103
|
+
- [Requesty](plans/requesty/)
|
|
104
|
+
- **[quantum-goap/](quantum-goap/)** - Goal-Oriented Action Planning
|
|
105
|
+
- **[quantum-research/](quantum-research/)** - Quantum research literature
|
|
106
|
+
|
|
107
|
+
### Issues & Reports
|
|
108
|
+
- **[issues/](issues/)** - Known issues and troubleshooting
|
|
109
|
+
- [Supabase Integration Issue](issues/ISSUE-SUPABASE-INTEGRATION.md)
|
|
110
|
+
- [Xenova Transformers Dependency](issues/ISSUE-xenova-transformers-dependency.md)
|
|
111
|
+
- **[reports/](reports/)** - Status reports and completion summaries
|
|
112
|
+
- **[reviews/](reviews/)** - Code and implementation reviews
|
|
113
|
+
|
|
114
|
+
### Archived Documentation
|
|
115
|
+
- **[archived/](archived/)** - Historical documentation (kept for reference)
|
|
116
|
+
- Old validation reports
|
|
117
|
+
- Deprecated integration guides
|
|
118
|
+
- Previous version documentation
|
|
119
|
+
|
|
120
|
+
## 🚀 Quick Links
|
|
121
|
+
|
|
122
|
+
### Getting Started
|
|
123
|
+
1. [Quick Start Guide](guides/QUICK-START-v1.7.1.md)
|
|
124
|
+
2. [Claude Code Setup](CLAUDE.md)
|
|
125
|
+
3. [Installation Guide](guides/DEPLOYMENT.md)
|
|
126
|
+
|
|
127
|
+
### Core Features
|
|
128
|
+
- [66 Specialized Agents](CLAUDE.md#-available-agents-54-total)
|
|
129
|
+
- [213 MCP Tools](guides/MCP-TOOLS.md)
|
|
130
|
+
- [ReasoningBank Learning](reasoningbank/README.md)
|
|
131
|
+
- [Multi-Model Router](router/README.md)
|
|
132
|
+
- [QUIC Transport](quic/QUIC-STATUS.md)
|
|
133
|
+
|
|
134
|
+
### Integration
|
|
135
|
+
- [Claude Flow](integrations/CLAUDE_FLOW_INTEGRATION.md)
|
|
136
|
+
- [Flow Nexus](integrations/FLOW-NEXUS-INTEGRATION.md)
|
|
137
|
+
- [FastMCP](integrations/FASTMCP_CLI_INTEGRATION.md)
|
|
138
|
+
- [Supabase](supabase/README.md)
|
|
139
|
+
|
|
140
|
+
### Development
|
|
141
|
+
- [Architecture Overview](architecture/EXECUTIVE_SUMMARY.md)
|
|
142
|
+
- [SPARC Methodology](CLAUDE.md#sparc-workflow-phases)
|
|
143
|
+
- [Testing Guide](testing/README.md)
|
|
144
|
+
|
|
145
|
+
## 📖 Documentation Standards
|
|
146
|
+
|
|
147
|
+
### File Organization
|
|
148
|
+
- Use descriptive filenames in UPPERCASE-WITH-DASHES.md format
|
|
149
|
+
- Group related docs in topic-specific directories
|
|
150
|
+
- Keep root directory minimal (README, CLAUDE, LICENSE only)
|
|
151
|
+
|
|
152
|
+
### Content Guidelines
|
|
153
|
+
- Start with a clear title and description
|
|
154
|
+
- Include table of contents for docs > 200 lines
|
|
155
|
+
- Use code blocks with language identifiers
|
|
156
|
+
- Add examples and use cases where applicable
|
|
157
|
+
|
|
158
|
+
### Directory Structure
|
|
159
|
+
```
|
|
160
|
+
docs/
|
|
161
|
+
├── README.md # This file
|
|
162
|
+
├── CLAUDE.md # Claude Code config
|
|
163
|
+
├── LICENSE # License file
|
|
164
|
+
├── architecture/ # System architecture
|
|
165
|
+
├── guides/ # User guides
|
|
166
|
+
├── integration-docs/ # Integration documentation
|
|
167
|
+
├── integrations/ # Specific integrations
|
|
168
|
+
├── testing/ # Test documentation
|
|
169
|
+
├── releases/ # Release notes
|
|
170
|
+
├── issues/ # Known issues
|
|
171
|
+
├── providers/ # Provider configuration
|
|
172
|
+
├── quic/ # QUIC implementation
|
|
173
|
+
├── reasoningbank/ # ReasoningBank docs
|
|
174
|
+
├── router/ # Router documentation
|
|
175
|
+
├── supabase/ # Supabase integration
|
|
176
|
+
└── archived/ # Historical docs
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## 🔍 Search Tips
|
|
180
|
+
|
|
181
|
+
### Finding Documentation
|
|
182
|
+
- Use `grep -r "keyword" docs/` to search all docs
|
|
183
|
+
- Check the appropriate category directory first
|
|
184
|
+
- Look in archived/ for historical documentation
|
|
185
|
+
|
|
186
|
+
### Common Topics
|
|
187
|
+
- **Setup**: See guides/ and CLAUDE.md
|
|
188
|
+
- **API Reference**: See integration-docs/
|
|
189
|
+
- **Troubleshooting**: See issues/
|
|
190
|
+
- **Performance**: See benchmarks/
|
|
191
|
+
- **Releases**: See releases/ and version-releases/
|
|
192
|
+
|
|
193
|
+
## 🤝 Contributing to Docs
|
|
194
|
+
|
|
195
|
+
### Adding New Documentation
|
|
196
|
+
1. Identify the appropriate directory
|
|
197
|
+
2. Follow naming conventions
|
|
198
|
+
3. Include proper frontmatter/headers
|
|
199
|
+
4. Update this README index
|
|
200
|
+
5. Add cross-references as needed
|
|
201
|
+
|
|
202
|
+
### Updating Existing Docs
|
|
203
|
+
1. Keep archived versions if major changes
|
|
204
|
+
2. Update last modified date
|
|
205
|
+
3. Maintain backward compatibility links
|
|
206
|
+
4. Test all code examples
|
|
207
|
+
|
|
208
|
+
## 📞 Support
|
|
209
|
+
|
|
210
|
+
- **GitHub Issues**: https://github.com/ruvnet/agentic-flow/issues
|
|
211
|
+
- **Documentation Updates**: Submit PR to docs/ directory
|
|
212
|
+
- **Questions**: Check issues/ directory first
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
**Last Updated**: November 6, 2025
|
|
217
|
+
**Version**: 1.9.1
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
# Issue: npm install fails with @xenova/transformers version conflict
|
|
2
|
+
|
|
3
|
+
## Problem Description
|
|
4
|
+
|
|
5
|
+
Users report installation failure when running:
|
|
6
|
+
```bash
|
|
7
|
+
npm i -g claude-flow@alpha
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
**Error:**
|
|
11
|
+
```
|
|
12
|
+
npm error code ETARGET
|
|
13
|
+
npm error notarget No matching version found for @xenova/transformers@^3.2.0.
|
|
14
|
+
npm error notarget In most cases you or one of your dependencies are requesting
|
|
15
|
+
npm error notarget a package version that doesn't exist.
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Root Cause Analysis
|
|
19
|
+
|
|
20
|
+
### Version Mismatch
|
|
21
|
+
- **Requested version**: `@xenova/transformers@^3.2.0` (doesn't exist)
|
|
22
|
+
- **Latest available version**: `2.17.2`
|
|
23
|
+
- **Our package.json**: Correctly specifies `^2.17.2`
|
|
24
|
+
|
|
25
|
+
### Source of Conflict - IDENTIFIED! ✅
|
|
26
|
+
|
|
27
|
+
**The problem is in `claude-flow@alpha` package:**
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
User runs: npm i -g claude-flow@alpha
|
|
31
|
+
|
|
32
|
+
Dependency chain:
|
|
33
|
+
└── claude-flow@2.7.28 (alpha tag)
|
|
34
|
+
└── agentic-flow@^1.8.10
|
|
35
|
+
├── @xenova/transformers@^2.17.2 ✅ (correct)
|
|
36
|
+
└── agentdb@^1.4.3
|
|
37
|
+
└── NO @xenova/transformers ❌ (missing!)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**The issue:**
|
|
41
|
+
- `claude-flow@alpha` (v2.7.28) depends on `agentic-flow@^1.8.10`
|
|
42
|
+
- `agentic-flow@1.8.10` depends on `agentdb@^1.4.3`
|
|
43
|
+
- **`agentdb@1.4.3` does NOT have `@xenova/transformers` in dependencies**
|
|
44
|
+
- But `agentdb@1.5.0+` DOES include `@xenova/transformers@^2.17.2`
|
|
45
|
+
|
|
46
|
+
**Why the error occurs:**
|
|
47
|
+
- User installs `claude-flow@alpha` globally
|
|
48
|
+
- npm resolves to `agentic-flow@1.8.10` → `agentdb@1.4.3`
|
|
49
|
+
- `agentdb@1.4.3` is OLD and missing transformers dependency
|
|
50
|
+
- Somewhere in the dependency resolution, npm gets confused about version requirements
|
|
51
|
+
- Reports non-existent `^3.2.0` (likely npm registry corruption or cache issue)
|
|
52
|
+
|
|
53
|
+
**Published versions:**
|
|
54
|
+
- ✅ `agentdb@1.4.3` - No transformers (OLD)
|
|
55
|
+
- ✅ `agentdb@1.5.0+` - Has transformers@^2.17.2 (FIXED)
|
|
56
|
+
- ✅ `agentdb@1.6.1` - Has transformers@^2.17.2 (CURRENT)
|
|
57
|
+
- ✅ `agentic-flow@1.8.10` - Has transformers@^2.17.2 (used by claude-flow@alpha)
|
|
58
|
+
- ✅ `agentic-flow@1.9.1` - Has transformers@^2.17.2 (LATEST, not published as alpha)
|
|
59
|
+
|
|
60
|
+
### Current Usage in Codebase
|
|
61
|
+
|
|
62
|
+
**Files using @xenova/transformers:**
|
|
63
|
+
1. `packages/agentdb/src/controllers/EmbeddingService.ts:32` - Dynamic import
|
|
64
|
+
2. `agentic-flow/src/agentdb/controllers/EmbeddingService.ts:32` - Dynamic import
|
|
65
|
+
3. `agentic-flow/src/router/providers/onnx.ts:33` - Dynamic import
|
|
66
|
+
4. `agentic-flow/src/reasoningbank/utils/embeddings.ts:6` - Static import
|
|
67
|
+
|
|
68
|
+
**Key observation**: Most imports are **dynamic** (`await import()`) except embeddings.ts which uses static import.
|
|
69
|
+
|
|
70
|
+
## Impact
|
|
71
|
+
|
|
72
|
+
- **Severity**: HIGH - Blocks all global installations of `claude-flow@alpha`
|
|
73
|
+
- **Affected package**: `claude-flow@alpha` (v2.7.28)
|
|
74
|
+
- **Dependency chain**: `claude-flow@alpha` → `agentic-flow@1.8.10` → `agentdb@1.4.3` (missing transformers)
|
|
75
|
+
- **User impact**: Cannot install `claude-flow@alpha` globally
|
|
76
|
+
- **Root package**: This repository (`agentic-flow`) needs to coordinate fix with `claude-flow`
|
|
77
|
+
- **Workaround**: Update `claude-flow@alpha` to use `agentic-flow@^1.9.0` which depends on newer `agentdb`
|
|
78
|
+
|
|
79
|
+
## Proposed Solution
|
|
80
|
+
|
|
81
|
+
### IMMEDIATE FIX: Update claude-flow@alpha dependency (REQUIRED)
|
|
82
|
+
|
|
83
|
+
**The `claude-flow` package needs to be updated:**
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
// claude-flow/package.json
|
|
87
|
+
{
|
|
88
|
+
"dependencies": {
|
|
89
|
+
"agentic-flow": "^1.9.0" // Change from ^1.8.10 to ^1.9.0
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This ensures it pulls `agentdb@1.6.x` which has the transformers dependency.
|
|
95
|
+
|
|
96
|
+
**Action required:**
|
|
97
|
+
1. Update `claude-flow` repository to bump `agentic-flow` to `^1.9.0`
|
|
98
|
+
2. Publish new `claude-flow@alpha` version
|
|
99
|
+
3. Test global installation: `npm i -g claude-flow@alpha`
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### Strategy 1: Make @xenova/transformers Optional (LONG-TERM, RECOMMENDED)
|
|
104
|
+
|
|
105
|
+
Convert `@xenova/transformers` to an **optional peer dependency** with lazy loading:
|
|
106
|
+
|
|
107
|
+
**Benefits:**
|
|
108
|
+
- ✅ Users only install ONNX libraries when actually needed
|
|
109
|
+
- ✅ Reduces package size (23MB+ model downloads)
|
|
110
|
+
- ✅ Avoids dependency conflicts
|
|
111
|
+
- ✅ Faster installation for users not using embeddings
|
|
112
|
+
- ✅ Graceful fallback to hash-based embeddings
|
|
113
|
+
|
|
114
|
+
**Implementation:**
|
|
115
|
+
|
|
116
|
+
#### 1. Update package.json dependencies
|
|
117
|
+
|
|
118
|
+
**packages/agentdb/package.json:**
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"dependencies": {
|
|
122
|
+
"@modelcontextprotocol/sdk": "^1.20.1",
|
|
123
|
+
"chalk": "^5.3.0",
|
|
124
|
+
"commander": "^12.1.0",
|
|
125
|
+
"hnswlib-node": "^3.0.0",
|
|
126
|
+
"sql.js": "^1.13.0",
|
|
127
|
+
"zod": "^3.25.76"
|
|
128
|
+
},
|
|
129
|
+
"optionalDependencies": {
|
|
130
|
+
"better-sqlite3": "^11.8.1",
|
|
131
|
+
"@xenova/transformers": "^2.17.2"
|
|
132
|
+
},
|
|
133
|
+
"peerDependenciesMeta": {
|
|
134
|
+
"@xenova/transformers": {
|
|
135
|
+
"optional": true
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**agentic-flow/package.json:**
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"dependencies": {
|
|
145
|
+
"@anthropic-ai/claude-agent-sdk": "^0.1.5",
|
|
146
|
+
"@anthropic-ai/sdk": "^0.65.0",
|
|
147
|
+
"agentdb": "^1.4.3",
|
|
148
|
+
// ... other deps
|
|
149
|
+
},
|
|
150
|
+
"optionalDependencies": {
|
|
151
|
+
"@xenova/transformers": "^2.17.2"
|
|
152
|
+
},
|
|
153
|
+
"peerDependenciesMeta": {
|
|
154
|
+
"@xenova/transformers": {
|
|
155
|
+
"optional": true
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
#### 2. Update static import to dynamic
|
|
162
|
+
|
|
163
|
+
**agentic-flow/src/reasoningbank/utils/embeddings.ts:**
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
// BEFORE (line 6):
|
|
167
|
+
import { pipeline, env } from '@xenova/transformers';
|
|
168
|
+
|
|
169
|
+
// AFTER:
|
|
170
|
+
let transformersModule: any = null;
|
|
171
|
+
|
|
172
|
+
async function loadTransformers() {
|
|
173
|
+
if (!transformersModule) {
|
|
174
|
+
try {
|
|
175
|
+
transformersModule = await import('@xenova/transformers');
|
|
176
|
+
return transformersModule;
|
|
177
|
+
} catch (error) {
|
|
178
|
+
console.warn('[Embeddings] @xenova/transformers not installed. Using hash-based fallback.');
|
|
179
|
+
console.warn('[Embeddings] For semantic embeddings: npm install @xenova/transformers');
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return transformersModule;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// Update line 11-12:
|
|
187
|
+
async function configureTransformers() {
|
|
188
|
+
const transformers = await loadTransformers();
|
|
189
|
+
if (transformers?.env) {
|
|
190
|
+
transformers.env.backends.onnx.wasm.proxy = false;
|
|
191
|
+
transformers.env.backends.onnx.wasm.numThreads = 1;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Update initializeEmbeddings() function:
|
|
196
|
+
async function initializeEmbeddings(): Promise<void> {
|
|
197
|
+
// ... existing npx detection code ...
|
|
198
|
+
|
|
199
|
+
const transformers = await loadTransformers();
|
|
200
|
+
if (!transformers) {
|
|
201
|
+
console.log('[Embeddings] Transformers not available - using hash-based embeddings');
|
|
202
|
+
isInitializing = false;
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
try {
|
|
207
|
+
embeddingPipeline = await transformers.pipeline(
|
|
208
|
+
'feature-extraction',
|
|
209
|
+
'Xenova/all-MiniLM-L6-v2',
|
|
210
|
+
{ quantized: true }
|
|
211
|
+
);
|
|
212
|
+
console.log('[Embeddings] Local model ready! (384 dimensions)');
|
|
213
|
+
} catch (error: any) {
|
|
214
|
+
console.error('[Embeddings] Failed to initialize:', error?.message || error);
|
|
215
|
+
console.warn('[Embeddings] Falling back to hash-based embeddings');
|
|
216
|
+
} finally {
|
|
217
|
+
isInitializing = false;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
#### 3. Clean up lock files
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Remove lock files that may have stale dependencies
|
|
226
|
+
rm -f packages/agentdb/package-lock.json
|
|
227
|
+
rm -f agentic-flow/package-lock.json
|
|
228
|
+
rm -f package-lock.json
|
|
229
|
+
|
|
230
|
+
# Regenerate with correct versions
|
|
231
|
+
npm install
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
#### 4. Add installation documentation
|
|
235
|
+
|
|
236
|
+
**README.md addition:**
|
|
237
|
+
```markdown
|
|
238
|
+
## Optional Dependencies
|
|
239
|
+
|
|
240
|
+
### Semantic Embeddings (@xenova/transformers)
|
|
241
|
+
|
|
242
|
+
For semantic similarity search with ReasoningBank and AgentDB, install:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
npm install @xenova/transformers
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**Without this package:** Hash-based embeddings are used (fast, deterministic, no semantic meaning)
|
|
249
|
+
**With this package:** True semantic embeddings (slower, requires 23MB model download, better accuracy)
|
|
250
|
+
|
|
251
|
+
The package will work without @xenova/transformers installed, using a fast hash-based fallback.
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Strategy 2: Fix Transitive Dependency (Alternative)
|
|
255
|
+
|
|
256
|
+
**Investigation steps:**
|
|
257
|
+
```bash
|
|
258
|
+
# Find which dependency requires 3.2.0
|
|
259
|
+
npm ls @xenova/transformers
|
|
260
|
+
npm explain @xenova/transformers
|
|
261
|
+
|
|
262
|
+
# Check for outdated dependencies
|
|
263
|
+
npm outdated
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**If found, update the problematic dependency:**
|
|
267
|
+
```bash
|
|
268
|
+
npm update <problematic-package>
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Strategy 3: Use npm overrides (Quick Fix)
|
|
272
|
+
|
|
273
|
+
**package.json:**
|
|
274
|
+
```json
|
|
275
|
+
{
|
|
276
|
+
"overrides": {
|
|
277
|
+
"@xenova/transformers": "^2.17.2"
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
This forces all dependencies to use version 2.17.2.
|
|
283
|
+
|
|
284
|
+
## Recommended Implementation Order
|
|
285
|
+
|
|
286
|
+
1. ✅ **Immediate**: Add npm overrides to force correct version (Strategy 3)
|
|
287
|
+
2. ✅ **Next release**: Implement optional dependencies (Strategy 1)
|
|
288
|
+
3. ✅ **Investigation**: Identify and update problematic transitive dependency (Strategy 2)
|
|
289
|
+
|
|
290
|
+
## Testing Plan
|
|
291
|
+
|
|
292
|
+
### Unit Tests
|
|
293
|
+
- ✅ Test EmbeddingService with transformers installed
|
|
294
|
+
- ✅ Test EmbeddingService without transformers (fallback)
|
|
295
|
+
- ✅ Test ReasoningBank embeddings with/without transformers
|
|
296
|
+
- ✅ Verify hash-based fallback accuracy
|
|
297
|
+
|
|
298
|
+
### Integration Tests
|
|
299
|
+
```bash
|
|
300
|
+
# Test global installation
|
|
301
|
+
npm uninstall -g claude-flow
|
|
302
|
+
npm install -g claude-flow@alpha
|
|
303
|
+
|
|
304
|
+
# Test with transformers
|
|
305
|
+
npm install @xenova/transformers
|
|
306
|
+
npx claude-flow reasoningbank test
|
|
307
|
+
|
|
308
|
+
# Test without transformers
|
|
309
|
+
npm uninstall @xenova/transformers
|
|
310
|
+
npx claude-flow reasoningbank test
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Performance Validation
|
|
314
|
+
- Measure installation time (with vs without transformers)
|
|
315
|
+
- Measure embedding generation speed (semantic vs hash)
|
|
316
|
+
- Memory usage comparison
|
|
317
|
+
|
|
318
|
+
## Migration Guide
|
|
319
|
+
|
|
320
|
+
### For Users
|
|
321
|
+
|
|
322
|
+
**Current behavior:**
|
|
323
|
+
```bash
|
|
324
|
+
npm i -g claude-flow@alpha # FAILS with version error
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
**After fix:**
|
|
328
|
+
```bash
|
|
329
|
+
npm i -g claude-flow@alpha # ✅ Works, uses hash-based embeddings
|
|
330
|
+
|
|
331
|
+
# Optional: Install for semantic embeddings
|
|
332
|
+
npm install -g @xenova/transformers
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### For Developers
|
|
336
|
+
|
|
337
|
+
No API changes required. All existing code continues to work:
|
|
338
|
+
- `computeEmbedding()` - Automatically uses available method
|
|
339
|
+
- `computeEmbeddingBatch()` - Same behavior
|
|
340
|
+
- Error handling already exists for transformer failures
|
|
341
|
+
|
|
342
|
+
## Related Files
|
|
343
|
+
|
|
344
|
+
### To Modify:
|
|
345
|
+
- `packages/agentdb/package.json` - Move to optionalDependencies
|
|
346
|
+
- `agentic-flow/package.json` - Move to optionalDependencies
|
|
347
|
+
- `agentic-flow/src/reasoningbank/utils/embeddings.ts` - Convert static import to dynamic
|
|
348
|
+
|
|
349
|
+
### Already Correct (using dynamic imports):
|
|
350
|
+
- `packages/agentdb/src/controllers/EmbeddingService.ts`
|
|
351
|
+
- `agentic-flow/src/agentdb/controllers/EmbeddingService.ts`
|
|
352
|
+
- `agentic-flow/src/router/providers/onnx.ts`
|
|
353
|
+
|
|
354
|
+
## Success Criteria
|
|
355
|
+
|
|
356
|
+
- ✅ `npm install -g claude-flow@alpha` completes successfully
|
|
357
|
+
- ✅ Package works without @xenova/transformers (hash fallback)
|
|
358
|
+
- ✅ Package works with @xenova/transformers (semantic embeddings)
|
|
359
|
+
- ✅ Installation time reduced by ~5 seconds (no 23MB download)
|
|
360
|
+
- ✅ Package size reduced by ~50MB (ONNX models optional)
|
|
361
|
+
- ✅ All existing tests pass
|
|
362
|
+
- ✅ Documentation updated with optional dependency info
|
|
363
|
+
|
|
364
|
+
## Timeline
|
|
365
|
+
|
|
366
|
+
- **Investigation**: 30 minutes (identify transitive dependency)
|
|
367
|
+
- **Implementation**: 2 hours (package.json changes, dynamic imports, tests)
|
|
368
|
+
- **Testing**: 1 hour (installation, functionality, performance)
|
|
369
|
+
- **Documentation**: 30 minutes (README, migration guide)
|
|
370
|
+
- **Total**: ~4 hours
|
|
371
|
+
|
|
372
|
+
## Priority: HIGH
|
|
373
|
+
|
|
374
|
+
This blocks all global installations and should be fixed immediately.
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
**Labels**: bug, dependencies, installation, high-priority
|
|
379
|
+
**Milestone**: v1.9.2 (patch release)
|
|
380
|
+
**Assignee**: @ruvnet
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-flow",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.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",
|
package/scripts/claude
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Simple claude command wrapper
|
|
5
|
+
* This script makes the claude command available by running npx claude
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { spawn } from 'child_process';
|
|
9
|
+
|
|
10
|
+
// Get all arguments passed to this script (excluding node and script path)
|
|
11
|
+
const args = process.argv.slice(2);
|
|
12
|
+
|
|
13
|
+
// Spawn npx claude with all the arguments
|
|
14
|
+
const claudeProcess = spawn('npx', ['claude', ...args], {
|
|
15
|
+
stdio: 'inherit',
|
|
16
|
+
env: process.env
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// Handle process exit
|
|
20
|
+
claudeProcess.on('exit', (code) => {
|
|
21
|
+
process.exit(code || 0);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// Handle signals
|
|
25
|
+
process.on('SIGINT', () => {
|
|
26
|
+
claudeProcess.kill('SIGINT');
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
process.on('SIGTERM', () => {
|
|
30
|
+
claudeProcess.kill('SIGTERM');
|
|
31
|
+
});
|