claude-flow 2.7.31 → 2.7.33
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/skills/agentic-jujutsu/SKILL.md +645 -0
- package/CHANGELOG.md +19 -0
- package/bin/claude-flow +1 -1
- package/dist/src/cli/simple-cli.js +173 -79
- package/dist/src/cli/simple-cli.js.map +1 -1
- package/dist/src/cli/simple-commands/init/agent-copier.js +3 -9
- package/dist/src/cli/simple-commands/init/agent-copier.js.map +1 -1
- package/dist/src/cli/simple-commands/memory.js +67 -17
- package/dist/src/cli/simple-commands/memory.js.map +1 -1
- package/dist/src/core/version.js +1 -1
- package/dist/src/core/version.js.map +1 -1
- package/dist/src/utils/key-redactor.js.map +1 -1
- package/docs/AGENT_FOLDER_STRUCTURE_FIX.md +192 -0
- package/docs/BUG_REPORT_MEMORY_STATS.md +355 -0
- package/docs/FIX_VERIFICATION_MEMORY_STATS.md +235 -0
- package/docs/RECENT_RELEASES_SUMMARY.md +375 -0
- package/docs/V2.7.31_RELEASE_NOTES.md +375 -0
- package/package.json +2 -1
- package/src/cli/simple-commands/init/agent-copier.js +5 -10
- package/src/cli/simple-commands/memory.js +93 -19
- /package/.claude/agents/analysis/{code-review/analyze-code-quality.md → analyze-code-quality.md} +0 -0
- /package/.claude/agents/architecture/{system-design/arch-system-design.md → arch-system-design.md} +0 -0
- /package/.claude/agents/data/{ml/data-ml-model.md → data-ml-model.md} +0 -0
- /package/.claude/agents/development/{backend/dev-backend-api.md → dev-backend-api.md} +0 -0
- /package/.claude/agents/devops/{ci-cd/ops-cicd-github.md → ops-cicd-github.md} +0 -0
- /package/.claude/agents/documentation/{api-docs/docs-api-openapi.md → docs-api-openapi.md} +0 -0
- /package/.claude/agents/specialized/{mobile/spec-mobile-react-native.md → spec-mobile-react-native.md} +0 -0
- /package/.claude/agents/testing/{validation/production-validator.md → production-validator.md} +0 -0
- /package/.claude/agents/testing/{unit/tdd-london-swarm.md → tdd-london-swarm.md} +0 -0
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
# claude-flow v2.7.31 Release Notes
|
|
2
|
+
|
|
3
|
+
**Release Date**: 2025-11-06
|
|
4
|
+
**Release Type**: Dependency Update (agentic-flow v1.9.4)
|
|
5
|
+
**Risk Level**: LOW ✅
|
|
6
|
+
**Git Tag**: `v2.7.31`
|
|
7
|
+
**NPM**: `claude-flow@2.7.31` (latest, alpha)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 🎯 Summary
|
|
12
|
+
|
|
13
|
+
Updated `agentic-flow` dependency from `^1.8.10` to `^1.9.4`, adding enterprise-grade features including provider fallback, Supabase cloud integration, circuit breaker patterns, and enhanced reliability capabilities.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 📦 Dependency Changes
|
|
18
|
+
|
|
19
|
+
### Updated Dependencies
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"agentic-flow": "^1.9.4" // Was: ^1.8.10
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### New Transitive Dependencies
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"@supabase/supabase-js": "^2.78.0" // Cloud database features
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Unchanged (No Regression)
|
|
34
|
+
- **agentdb**: `^1.6.1` (stable from v2.7.30)
|
|
35
|
+
- **16 other dependencies**: All version numbers unchanged
|
|
36
|
+
- **Full backwards compatibility**: No breaking changes
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## ✨ New Features (via agentic-flow v1.9.4)
|
|
41
|
+
|
|
42
|
+
### 1. Enterprise Provider Fallback
|
|
43
|
+
**Automatic failover chain**: `Gemini → Claude → OpenRouter → ONNX`
|
|
44
|
+
|
|
45
|
+
- **Circuit breaker**: Prevents cascading failures in distributed systems
|
|
46
|
+
- **Real-time health monitoring**: Automatic provider health checks
|
|
47
|
+
- **Auto-recovery**: Seamless failover when providers are down
|
|
48
|
+
- **Cost optimization**: 70% cost savings with intelligent routing
|
|
49
|
+
|
|
50
|
+
**Usage**:
|
|
51
|
+
```bash
|
|
52
|
+
# Check provider health
|
|
53
|
+
npx agentic-flow@latest providers health
|
|
54
|
+
|
|
55
|
+
# List available providers
|
|
56
|
+
npx agentic-flow@latest providers list
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 2. Supabase Cloud Integration
|
|
60
|
+
**Cloud database and authentication platform**
|
|
61
|
+
|
|
62
|
+
- **Distributed coordination**: Multi-instance agent synchronization
|
|
63
|
+
- **Real-time updates**: Live data synchronization across agents
|
|
64
|
+
- **Authentication**: Secure cloud-based auth system
|
|
65
|
+
- **Persistent storage**: Cloud-backed memory and state
|
|
66
|
+
|
|
67
|
+
### 3. Reliability Improvements
|
|
68
|
+
**Enterprise-grade stability features**
|
|
69
|
+
|
|
70
|
+
- **Checkpointing**: Automatic crash recovery
|
|
71
|
+
```bash
|
|
72
|
+
npx agentic-flow@latest checkpoint save
|
|
73
|
+
npx agentic-flow@latest checkpoint restore
|
|
74
|
+
```
|
|
75
|
+
- **Budget controls**: Cost tracking and limits
|
|
76
|
+
```bash
|
|
77
|
+
npx agentic-flow@latest cost budget --max 100
|
|
78
|
+
```
|
|
79
|
+
- **Enhanced retry logic**: Intelligent error handling
|
|
80
|
+
- **Performance monitoring**: Real-time diagnostics
|
|
81
|
+
|
|
82
|
+
### 4. Cost Optimization
|
|
83
|
+
- **Provider selection**: Automatic cost-aware routing
|
|
84
|
+
- **Token tracking**: Real-time usage monitoring
|
|
85
|
+
- **Budget alerts**: Prevent overspending
|
|
86
|
+
- **Analytics**: Cost analysis and recommendations
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 🔍 Risk Assessment: LOW ✅
|
|
91
|
+
|
|
92
|
+
### Why This Update is Safe
|
|
93
|
+
|
|
94
|
+
1. **Minimal Dependency Changes**
|
|
95
|
+
- 16 existing dependencies: **All unchanged**
|
|
96
|
+
- 1 new optional dependency: `@supabase/supabase-js`
|
|
97
|
+
- No version bumps in critical dependencies
|
|
98
|
+
|
|
99
|
+
2. **Full Backwards Compatibility**
|
|
100
|
+
- No breaking changes in agentic-flow API
|
|
101
|
+
- All existing features continue to work
|
|
102
|
+
- agentdb remains at v1.6.1 (no regression)
|
|
103
|
+
|
|
104
|
+
3. **Comprehensive Testing**
|
|
105
|
+
- ✅ 8/8 Docker regression tests passed
|
|
106
|
+
- ✅ Local validation complete
|
|
107
|
+
- ✅ CLI, memory, ReasoningBank all functional
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 📋 Testing Results
|
|
112
|
+
|
|
113
|
+
### Docker Validation Suite
|
|
114
|
+
**Image**: `claude-flow-test:v2.7.31`
|
|
115
|
+
**Test File**: `tests/docker/Dockerfile.v2.7.31-test`
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# Build and run tests
|
|
119
|
+
docker build -f tests/docker/Dockerfile.v2.7.31-test -t test .
|
|
120
|
+
docker run --rm test
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Test Results**:
|
|
124
|
+
1. ✅ **Version Check**: Claude-Flow v2.7.31 confirmed
|
|
125
|
+
2. ✅ **package.json**: agentic-flow ^1.9.4 present
|
|
126
|
+
3. ✅ **Installation**: agentic-flow 1.9.4 installed correctly
|
|
127
|
+
4. ✅ **No Regression**: agentdb still v1.6.1
|
|
128
|
+
5. ✅ **ReasoningBank**: Initialization successful
|
|
129
|
+
6. ✅ **Memory Command**: Functional
|
|
130
|
+
7. ✅ **CLI Execution**: Working correctly
|
|
131
|
+
8. ✅ **New Dependency**: @supabase/supabase-js@2.80.0 available
|
|
132
|
+
|
|
133
|
+
### Local Regression Tests
|
|
134
|
+
```bash
|
|
135
|
+
✅ CLI version: v2.7.31
|
|
136
|
+
✅ Memory stats: Working
|
|
137
|
+
✅ ReasoningBank init: Success
|
|
138
|
+
✅ agentdb: v1.6.1 (no regression)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 💻 Installation
|
|
144
|
+
|
|
145
|
+
### For End Users
|
|
146
|
+
```bash
|
|
147
|
+
# NPX (recommended for quick use)
|
|
148
|
+
npx claude-flow@latest init
|
|
149
|
+
|
|
150
|
+
# Global installation
|
|
151
|
+
npm install -g claude-flow@latest
|
|
152
|
+
|
|
153
|
+
# Local project installation
|
|
154
|
+
npm install claude-flow@latest
|
|
155
|
+
|
|
156
|
+
# Verify installation
|
|
157
|
+
claude-flow --version # Output: v2.7.31
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### For Developers
|
|
161
|
+
```bash
|
|
162
|
+
# Clone repository
|
|
163
|
+
git clone https://github.com/ruvnet/claude-flow.git
|
|
164
|
+
cd claude-flow
|
|
165
|
+
|
|
166
|
+
# Checkout v2.7.31 tag
|
|
167
|
+
git checkout v2.7.31
|
|
168
|
+
|
|
169
|
+
# Install dependencies
|
|
170
|
+
npm install --legacy-peer-deps
|
|
171
|
+
|
|
172
|
+
# Run tests
|
|
173
|
+
npm test
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## 🚀 New CLI Commands (via agentic-flow)
|
|
179
|
+
|
|
180
|
+
### Provider Management
|
|
181
|
+
```bash
|
|
182
|
+
# List available LLM providers
|
|
183
|
+
npx agentic-flow@latest providers list
|
|
184
|
+
|
|
185
|
+
# Check provider health status
|
|
186
|
+
npx agentic-flow@latest providers health
|
|
187
|
+
|
|
188
|
+
# Get provider details
|
|
189
|
+
npx agentic-flow@latest providers info gemini
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Cost Management
|
|
193
|
+
```bash
|
|
194
|
+
# Analyze current costs
|
|
195
|
+
npx agentic-flow@latest cost analyze
|
|
196
|
+
|
|
197
|
+
# Set budget limit
|
|
198
|
+
npx agentic-flow@latest cost budget --max 100
|
|
199
|
+
|
|
200
|
+
# View cost history
|
|
201
|
+
npx agentic-flow@latest cost history
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Checkpointing
|
|
205
|
+
```bash
|
|
206
|
+
# Save current state
|
|
207
|
+
npx agentic-flow@latest checkpoint save
|
|
208
|
+
|
|
209
|
+
# List checkpoints
|
|
210
|
+
npx agentic-flow@latest checkpoint list
|
|
211
|
+
|
|
212
|
+
# Restore from checkpoint
|
|
213
|
+
npx agentic-flow@latest checkpoint restore <id>
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Agent Management
|
|
217
|
+
```bash
|
|
218
|
+
# List all 66 available agents
|
|
219
|
+
npx agentic-flow@latest agents list
|
|
220
|
+
|
|
221
|
+
# Get agent details
|
|
222
|
+
npx agentic-flow@latest agent info coder
|
|
223
|
+
|
|
224
|
+
# Run agent with task
|
|
225
|
+
npx agentic-flow@latest agent run coder "Build REST API"
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## 📊 Performance Metrics
|
|
231
|
+
|
|
232
|
+
### Installation
|
|
233
|
+
- **Added packages**: 2
|
|
234
|
+
- **Removed packages**: 16
|
|
235
|
+
- **Changed packages**: 8
|
|
236
|
+
- **Install time**: ~45 seconds (with --legacy-peer-deps)
|
|
237
|
+
- **Total packages**: 730+ (consistent with v2.7.30)
|
|
238
|
+
|
|
239
|
+
### Runtime
|
|
240
|
+
- **Startup time**: No regression (< 1s)
|
|
241
|
+
- **Memory usage**: Similar to v2.7.30
|
|
242
|
+
- **CLI responsiveness**: Excellent
|
|
243
|
+
- **ReasoningBank init**: ~2-3 seconds
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## 🔗 Related Documentation
|
|
248
|
+
|
|
249
|
+
### This Release
|
|
250
|
+
- **CHANGELOG.md**: Full v2.7.31 release notes
|
|
251
|
+
- **Docker Tests**: `tests/docker/Dockerfile.v2.7.31-test`
|
|
252
|
+
- **Dependency Comparison**: `/tmp/compare-versions.md` (build artifact)
|
|
253
|
+
|
|
254
|
+
### Previous Release (v2.7.30)
|
|
255
|
+
- **agentdb Update**: `docs/AGENTDB_V1.6.1_DEEP_REVIEW.md`
|
|
256
|
+
- **Docker Tests**: `tests/docker/Dockerfile.agentdb-deep-review`
|
|
257
|
+
|
|
258
|
+
### General Documentation
|
|
259
|
+
- **README.md**: Project overview and quick start
|
|
260
|
+
- **CLAUDE.md**: Development guidelines and SPARC methodology
|
|
261
|
+
- **GitHub**: https://github.com/ruvnet/claude-flow
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## 🐛 Known Issues
|
|
266
|
+
|
|
267
|
+
### None Detected
|
|
268
|
+
No known issues or regressions in v2.7.31. All tests passing.
|
|
269
|
+
|
|
270
|
+
If you encounter any issues, please report at:
|
|
271
|
+
- **GitHub Issues**: https://github.com/ruvnet/claude-flow/issues
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## 🔄 Migration Guide
|
|
276
|
+
|
|
277
|
+
### From v2.7.30 to v2.7.31
|
|
278
|
+
**No migration needed** - Drop-in replacement
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
# Update existing installation
|
|
282
|
+
npm install -g claude-flow@latest
|
|
283
|
+
|
|
284
|
+
# Verify update
|
|
285
|
+
claude-flow --version # Should show v2.7.31
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### From v2.7.29 or Earlier
|
|
289
|
+
If upgrading from v2.7.29 or earlier:
|
|
290
|
+
1. Update to v2.7.30 first (agentdb update)
|
|
291
|
+
2. Then update to v2.7.31 (agentic-flow update)
|
|
292
|
+
|
|
293
|
+
Or directly update to v2.7.31 (fully compatible).
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## 🎉 What's Next?
|
|
298
|
+
|
|
299
|
+
### Potential Future Enhancements
|
|
300
|
+
Based on new agentic-flow v1.9.4 features:
|
|
301
|
+
|
|
302
|
+
1. **Cloud Coordination**: Leverage Supabase for distributed swarms
|
|
303
|
+
2. **Cost Dashboards**: Visual cost analytics and budget management
|
|
304
|
+
3. **Enhanced Checkpointing**: Automatic state recovery
|
|
305
|
+
4. **Provider Analytics**: Deep insights into LLM usage patterns
|
|
306
|
+
5. **Enterprise Features**: Multi-tenant support, SSO, audit logs
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## 🙏 Credits
|
|
311
|
+
|
|
312
|
+
### Contributors
|
|
313
|
+
- **rUv**: Package maintainer and primary developer
|
|
314
|
+
- **Claude Code**: AI assistant for testing and documentation
|
|
315
|
+
- **agentic-flow team**: Upstream dependency maintainers
|
|
316
|
+
|
|
317
|
+
### Dependencies
|
|
318
|
+
- **agentic-flow@1.9.4**: Core agent orchestration platform
|
|
319
|
+
- **agentdb@1.6.1**: High-performance vector database
|
|
320
|
+
- **@supabase/supabase-js@2.78.0**: Cloud database integration
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## 📝 Changelog Entry
|
|
325
|
+
|
|
326
|
+
```markdown
|
|
327
|
+
## [2.7.31] - 2025-11-06
|
|
328
|
+
|
|
329
|
+
> **📦 Dependency Update**: Updated agentic-flow to v1.9.4 with new enterprise features
|
|
330
|
+
|
|
331
|
+
### Summary
|
|
332
|
+
Updated `agentic-flow` dependency from `^1.8.10` to `^1.9.4` to add new enterprise features including Supabase cloud integration, provider fallback, circuit breaker patterns, and enhanced reliability features.
|
|
333
|
+
|
|
334
|
+
### Changes
|
|
335
|
+
- agentic-flow: ^1.8.10 → ^1.9.4
|
|
336
|
+
- NEW: @supabase/supabase-js@^2.78.0
|
|
337
|
+
- agentdb: Still v1.6.1 (no regression)
|
|
338
|
+
|
|
339
|
+
### Testing
|
|
340
|
+
✅ 8/8 Docker tests passed
|
|
341
|
+
✅ All regression tests passed
|
|
342
|
+
✅ No breaking changes detected
|
|
343
|
+
|
|
344
|
+
### Risk: LOW
|
|
345
|
+
- 16 existing dependencies unchanged
|
|
346
|
+
- 1 new optional dependency
|
|
347
|
+
- Full backwards compatibility
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
## 📅 Release Timeline
|
|
353
|
+
|
|
354
|
+
- **2025-11-05**: agentdb updated to v1.6.1 (v2.7.30)
|
|
355
|
+
- **2025-11-06**: agentic-flow updated to v1.9.4 (v2.7.31)
|
|
356
|
+
- **Next**: Monitor for user feedback and potential hotfixes
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## 🔍 Version Matrix
|
|
361
|
+
|
|
362
|
+
| Package | v2.7.30 | v2.7.31 | Notes |
|
|
363
|
+
|---------|---------|---------|-------|
|
|
364
|
+
| claude-flow | 2.7.30 | **2.7.31** | ✅ Updated |
|
|
365
|
+
| agentic-flow | 1.8.10 | **1.9.4** | ✅ Updated |
|
|
366
|
+
| agentdb | 1.6.1 | 1.6.1 | ✅ Stable |
|
|
367
|
+
| better-sqlite3 | 12.2.0 | 12.2.0 | ✅ Unchanged |
|
|
368
|
+
| @anthropic-ai/sdk | 0.65.0 | 0.65.0 | ✅ Unchanged |
|
|
369
|
+
| @supabase/supabase-js | - | **2.78.0** | ✨ NEW |
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
**Release Notes Generated**: 2025-11-06
|
|
374
|
+
**Document Version**: 1.0
|
|
375
|
+
**Status**: ✅ Published and Validated
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-flow",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.33",
|
|
4
4
|
"description": "Enterprise-grade AI agent orchestration with WASM-powered ReasoningBank memory and AgentDB vector database (always uses latest agentic-flow)",
|
|
5
5
|
"mcpName": "io.github.ruvnet/claude-flow",
|
|
6
6
|
"main": "cli.mjs",
|
|
@@ -168,6 +168,7 @@
|
|
|
168
168
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
169
169
|
"@typescript-eslint/parser": "^6.21.0",
|
|
170
170
|
"@vercel/ncc": "^0.38.3",
|
|
171
|
+
"agentic-jujutsu": "^2.3.2",
|
|
171
172
|
"babel-jest": "^29.7.0",
|
|
172
173
|
"eslint": "^8.57.1",
|
|
173
174
|
"eslint-plugin-react": "^7.37.5",
|
|
@@ -135,35 +135,30 @@ export async function copyAgentFiles(targetDir, options = {}) {
|
|
|
135
135
|
* Create agent directories structure
|
|
136
136
|
*/
|
|
137
137
|
export async function createAgentDirectories(targetDir, dryRun = false) {
|
|
138
|
+
// Flat structure - all .md files directly in category folders
|
|
138
139
|
const agentDirs = [
|
|
139
140
|
'.claude',
|
|
140
141
|
'.claude/agents',
|
|
141
142
|
'.claude/agents/core',
|
|
142
|
-
'.claude/agents/swarm',
|
|
143
|
+
'.claude/agents/swarm',
|
|
143
144
|
'.claude/agents/hive-mind',
|
|
144
145
|
'.claude/agents/consensus',
|
|
145
146
|
'.claude/agents/optimization',
|
|
146
147
|
'.claude/agents/github',
|
|
147
148
|
'.claude/agents/sparc',
|
|
148
149
|
'.claude/agents/testing',
|
|
149
|
-
'.claude/agents/testing/unit',
|
|
150
|
-
'.claude/agents/testing/validation',
|
|
151
150
|
'.claude/agents/templates',
|
|
152
151
|
'.claude/agents/analysis',
|
|
153
|
-
'.claude/agents/analysis/code-review',
|
|
154
152
|
'.claude/agents/architecture',
|
|
155
|
-
'.claude/agents/architecture/system-design',
|
|
156
153
|
'.claude/agents/data',
|
|
157
|
-
'.claude/agents/data/ml',
|
|
158
154
|
'.claude/agents/development',
|
|
159
|
-
'.claude/agents/development/backend',
|
|
160
155
|
'.claude/agents/devops',
|
|
161
|
-
'.claude/agents/devops/ci-cd',
|
|
162
156
|
'.claude/agents/documentation',
|
|
163
|
-
'.claude/agents/documentation/api-docs',
|
|
164
157
|
'.claude/agents/specialized',
|
|
165
|
-
'.claude/agents/specialized/mobile',
|
|
166
158
|
'.claude/agents/flow-nexus',
|
|
159
|
+
'.claude/agents/goal',
|
|
160
|
+
'.claude/agents/neural',
|
|
161
|
+
'.claude/agents/reasoning',
|
|
167
162
|
'.claude/commands',
|
|
168
163
|
'.claude/commands/flow-nexus'
|
|
169
164
|
];
|
|
@@ -49,6 +49,7 @@ export async function memoryCommand(subArgs, flags) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
// NEW: Delegate to ReasoningBank for regular commands if mode is set
|
|
52
|
+
// Note: 'stats' is handled in switch statement for unified output
|
|
52
53
|
if (mode === 'reasoningbank' && ['store', 'query', 'list'].includes(memorySubcommand)) {
|
|
53
54
|
return await handleReasoningBankCommand(memorySubcommand, subArgs, flags);
|
|
54
55
|
}
|
|
@@ -63,7 +64,9 @@ export async function memoryCommand(subArgs, flags) {
|
|
|
63
64
|
break;
|
|
64
65
|
|
|
65
66
|
case 'stats':
|
|
66
|
-
|
|
67
|
+
// Always use showMemoryStats for unified output
|
|
68
|
+
// It will detect mode and show appropriate stats
|
|
69
|
+
await showMemoryStats(loadMemory, mode);
|
|
67
70
|
break;
|
|
68
71
|
|
|
69
72
|
case 'export':
|
|
@@ -214,28 +217,95 @@ async function queryMemory(subArgs, loadMemory, namespace, enableRedaction = fal
|
|
|
214
217
|
}
|
|
215
218
|
}
|
|
216
219
|
|
|
217
|
-
async function showMemoryStats(loadMemory) {
|
|
220
|
+
async function showMemoryStats(loadMemory, mode) {
|
|
218
221
|
try {
|
|
219
|
-
const
|
|
220
|
-
let totalEntries = 0;
|
|
221
|
-
const namespaceStats = {};
|
|
222
|
+
const rbInitialized = await isReasoningBankInitialized();
|
|
222
223
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
// If in auto mode and ReasoningBank is initialized, show unified stats
|
|
225
|
+
if (mode === 'reasoningbank' || (rbInitialized && mode !== 'basic')) {
|
|
226
|
+
// Show unified statistics for both backends
|
|
227
|
+
printSuccess('Memory Bank Statistics:\n');
|
|
227
228
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
` Size: ${(new TextEncoder().encode(JSON.stringify(data)).length / 1024).toFixed(2)} KB`,
|
|
233
|
-
);
|
|
229
|
+
// JSON Storage stats
|
|
230
|
+
const data = await loadMemory();
|
|
231
|
+
let totalEntries = 0;
|
|
232
|
+
const namespaceStats = {};
|
|
234
233
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
234
|
+
for (const [namespace, entries] of Object.entries(data)) {
|
|
235
|
+
namespaceStats[namespace] = entries.length;
|
|
236
|
+
totalEntries += entries.length;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
console.log('📁 JSON Storage (./memory/memory-store.json):');
|
|
240
|
+
console.log(` Total Entries: ${totalEntries}`);
|
|
241
|
+
console.log(` Namespaces: ${Object.keys(data).length}`);
|
|
242
|
+
console.log(
|
|
243
|
+
` Size: ${(new TextEncoder().encode(JSON.stringify(data)).length / 1024).toFixed(2)} KB`,
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
if (Object.keys(data).length > 0) {
|
|
247
|
+
console.log(' Namespace Breakdown:');
|
|
248
|
+
for (const [namespace, count] of Object.entries(namespaceStats)) {
|
|
249
|
+
console.log(` ${namespace}: ${count} entries`);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// ReasoningBank stats
|
|
254
|
+
if (rbInitialized) {
|
|
255
|
+
try {
|
|
256
|
+
const { getStatus } = await import('../../reasoningbank/reasoningbank-adapter.js');
|
|
257
|
+
const rbStats = await getStatus();
|
|
258
|
+
|
|
259
|
+
console.log('\n🧠 ReasoningBank Storage (.swarm/memory.db):');
|
|
260
|
+
console.log(` Total Memories: ${rbStats.total_memories}`);
|
|
261
|
+
console.log(` Categories: ${rbStats.total_categories}`);
|
|
262
|
+
console.log(` Average Confidence: ${(rbStats.avg_confidence * 100).toFixed(1)}%`);
|
|
263
|
+
console.log(` Embeddings: ${rbStats.total_embeddings}`);
|
|
264
|
+
console.log(` Trajectories: ${rbStats.total_trajectories}`);
|
|
265
|
+
|
|
266
|
+
// Get database file size
|
|
267
|
+
try {
|
|
268
|
+
const dbPath = rbStats.database_path || '.swarm/memory.db';
|
|
269
|
+
const stats = await fs.stat(dbPath);
|
|
270
|
+
console.log(` Database Size: ${(stats.size / 1024 / 1024).toFixed(2)} MB`);
|
|
271
|
+
} catch (sizeErr) {
|
|
272
|
+
// Ignore size calculation errors
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
console.log('\n💡 Active Mode: ReasoningBank (auto-selected)');
|
|
276
|
+
console.log(' Use --basic flag to force JSON-only statistics');
|
|
277
|
+
} catch (rbErr) {
|
|
278
|
+
console.log('\n⚠️ ReasoningBank stats unavailable:', rbErr.message);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
} else {
|
|
282
|
+
// Basic mode - JSON only
|
|
283
|
+
const data = await loadMemory();
|
|
284
|
+
let totalEntries = 0;
|
|
285
|
+
const namespaceStats = {};
|
|
286
|
+
|
|
287
|
+
for (const [namespace, entries] of Object.entries(data)) {
|
|
288
|
+
namespaceStats[namespace] = entries.length;
|
|
289
|
+
totalEntries += entries.length;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
printSuccess('Memory Bank Statistics (JSON Mode):');
|
|
293
|
+
console.log(` Total Entries: ${totalEntries}`);
|
|
294
|
+
console.log(` Namespaces: ${Object.keys(data).length}`);
|
|
295
|
+
console.log(
|
|
296
|
+
` Size: ${(new TextEncoder().encode(JSON.stringify(data)).length / 1024).toFixed(2)} KB`,
|
|
297
|
+
);
|
|
298
|
+
|
|
299
|
+
if (Object.keys(data).length > 0) {
|
|
300
|
+
console.log('\n📁 Namespace Breakdown:');
|
|
301
|
+
for (const [namespace, count] of Object.entries(namespaceStats)) {
|
|
302
|
+
console.log(` ${namespace}: ${count} entries`);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
if (!rbInitialized) {
|
|
307
|
+
console.log('\n💡 Tip: Initialize ReasoningBank for AI-powered memory');
|
|
308
|
+
console.log(' Run: memory init --reasoningbank');
|
|
239
309
|
}
|
|
240
310
|
}
|
|
241
311
|
} catch (err) {
|
|
@@ -578,6 +648,10 @@ async function handleReasoningBankCommand(command, subArgs, flags) {
|
|
|
578
648
|
await handleReasoningBankStatus(getStatus);
|
|
579
649
|
break;
|
|
580
650
|
|
|
651
|
+
case 'stats':
|
|
652
|
+
await handleReasoningBankStatus(getStatus);
|
|
653
|
+
break;
|
|
654
|
+
|
|
581
655
|
case 'consolidate':
|
|
582
656
|
case 'demo':
|
|
583
657
|
case 'test':
|
/package/.claude/agents/analysis/{code-review/analyze-code-quality.md → analyze-code-quality.md}
RENAMED
|
File without changes
|
/package/.claude/agents/architecture/{system-design/arch-system-design.md → arch-system-design.md}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/.claude/agents/testing/{validation/production-validator.md → production-validator.md}
RENAMED
|
File without changes
|
|
File without changes
|