claude-flow 3.38.2 → 3.38.3
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/package.json +1 -1
- package/v3/@claude-flow/cli/README.md +20 -4
- package/v3/@claude-flow/cli/catalog-manifest.json +2 -2
- package/v3/@claude-flow/cli/dist/src/commands/hooks.js +33 -4
- package/v3/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.js +32 -0
- package/v3/@claude-flow/cli/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
3
|
[](https://cognitum.one/agentic-engineering)
|
|
4
|
+
[](https://agentics.org/siliconvalley/?UTM=GH-RuFlo-SV)
|
|
5
|
+
|
|
4
6
|
|
|
5
7
|
<!-- Try Ruflo — the 4 badges first-time visitors actually act on -->
|
|
6
8
|
[](https://flo.ruv.io/)
|
|
@@ -56,7 +58,7 @@ There are **two different install paths** with very different surface areas. Pic
|
|
|
56
58
|
|---|---|---|
|
|
57
59
|
| What it gives you | Slash commands + a few skills + agent definitions per-plugin | Full Ruflo loop — 98 agents, 60+ commands, 30 skills, MCP server, hooks, daemon |
|
|
58
60
|
| Files in your workspace | **Zero** | `.claude/`, `.claude-flow/`, `CLAUDE.md`, helpers, settings |
|
|
59
|
-
| MCP server registered |
|
|
61
|
+
| MCP server registered | **No** (`memory_store`, `swarm_init`, etc. unavailable to Claude) | Yes |
|
|
60
62
|
| Hooks installed | No | Yes |
|
|
61
63
|
| Best for | Try a single plugin's commands without committing to the full install | Production use — everything works as documented |
|
|
62
64
|
|
|
@@ -73,7 +75,7 @@ There are **two different install paths** with very different surface areas. Pic
|
|
|
73
75
|
/plugin install ruflo-neural-trader@ruflo
|
|
74
76
|
```
|
|
75
77
|
|
|
76
|
-
This adds slash commands and agent definitions.
|
|
78
|
+
This adds slash commands and agent definitions only. The Ruflo MCP server is NOT registered, so `memory_store`, `swarm_init`, `agent_spawn`, etc. won't be callable from Claude. For the full loop, use Path B below.
|
|
77
79
|
|
|
78
80
|
<details>
|
|
79
81
|
<summary><strong>🔌 All 35 plugins</strong></summary>
|
|
@@ -187,10 +189,24 @@ npm install -g ruflo@latest
|
|
|
187
189
|
### MCP Server
|
|
188
190
|
|
|
189
191
|
```bash
|
|
190
|
-
# Add Ruflo as an MCP server in Claude Code
|
|
191
|
-
claude mcp add
|
|
192
|
+
# Add Ruflo as an MCP server in Claude Code (canonical form, matches USERGUIDE.md)
|
|
193
|
+
claude mcp add ruflo -- npx ruflo@latest mcp start
|
|
192
194
|
```
|
|
193
195
|
|
|
196
|
+
Small-context backends can advertise only the tool categories they need:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
CLAUDE_FLOW_MCP_TOOLS=memory,swarm,agent,hooks \
|
|
200
|
+
npx ruflo@latest mcp start
|
|
201
|
+
|
|
202
|
+
# Optional: lets `ruflo doctor -c mcp-overhead` compare the live schema
|
|
203
|
+
# estimate with the backend's real context limit.
|
|
204
|
+
CLAUDE_FLOW_CONTEXT_WINDOW_TOKENS=32000 ruflo doctor -c mcp-overhead
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
The default remains `all` for backwards compatibility. Selectors accept
|
|
208
|
+
categories, namespace prefixes, or exact tool names.
|
|
209
|
+
|
|
194
210
|
---
|
|
195
211
|
|
|
196
212
|
## What You Get
|
|
@@ -2194,7 +2194,12 @@ const intelligenceCommand = {
|
|
|
2194
2194
|
tokenReduction: 'N/A',
|
|
2195
2195
|
sweBenchScore: 'N/A',
|
|
2196
2196
|
},
|
|
2197
|
-
|
|
2197
|
+
// #2940: a training cycle that actually ran this invocation is "now"
|
|
2198
|
+
// — reading the pre-call `lastAdaptation` here would still show the
|
|
2199
|
+
// stale age (the exact "aged instead of reset" symptom reported).
|
|
2200
|
+
lastTrainingMs: mcpResult?.training?.trained
|
|
2201
|
+
? 0
|
|
2202
|
+
: (lastAdaptation ? Date.now() - lastAdaptation : undefined),
|
|
2198
2203
|
persistence: {
|
|
2199
2204
|
dataDir: persistence.dataDir,
|
|
2200
2205
|
patternsFile: persistence.patternsFile,
|
|
@@ -2206,10 +2211,34 @@ const intelligenceCommand = {
|
|
|
2206
2211
|
trajectoriesFromDisk,
|
|
2207
2212
|
},
|
|
2208
2213
|
};
|
|
2214
|
+
// #2940: this block used to be a cosmetic 500ms sleep followed by an
|
|
2215
|
+
// unconditional "Training cycle completed" — no training ever ran and
|
|
2216
|
+
// `lastAdaptation` never moved, so `--status` could never report a
|
|
2217
|
+
// training cycle as recent no matter how many times `--train` was
|
|
2218
|
+
// invoked. `hooks_intelligence` now actually distills when asked
|
|
2219
|
+
// (see mcp-tools/hooks-tools.ts); report what it actually did instead
|
|
2220
|
+
// of a canned success message.
|
|
2221
|
+
const trainingResult = mcpResult?.training;
|
|
2209
2222
|
if (forceTraining) {
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2223
|
+
if (trainingResult?.trained && trainingResult.patternsDistilled) {
|
|
2224
|
+
spinner.succeed(`Training cycle completed — distilled ${trainingResult.patternsDistilled} pattern${trainingResult.patternsDistilled === 1 ? '' : 's'}`);
|
|
2225
|
+
}
|
|
2226
|
+
else if (trainingResult?.trained) {
|
|
2227
|
+
// Ran (SONA/EWC++ distillation pass executed, lastAdaptation
|
|
2228
|
+
// moved) but found zero new patterns — deliberately NOT the same
|
|
2229
|
+
// message as a real distillation, or this is exactly the "success
|
|
2230
|
+
// report with no state change behind it" the issue describes.
|
|
2231
|
+
spinner.stop();
|
|
2232
|
+
output.printWarning(`Training cycle ran — 0 new patterns to distill (${trainingResult.reason || 'nothing new since the last cycle'})`);
|
|
2233
|
+
}
|
|
2234
|
+
else if (trainingResult?.attempted) {
|
|
2235
|
+
spinner.stop();
|
|
2236
|
+
output.printWarning(`Training cycle ran with nothing to do — ${trainingResult.reason || 'no new trajectories to distill'}`);
|
|
2237
|
+
}
|
|
2238
|
+
else {
|
|
2239
|
+
spinner.stop();
|
|
2240
|
+
output.printWarning('Training cycle could not run — intelligence MCP tool unavailable');
|
|
2241
|
+
}
|
|
2213
2242
|
}
|
|
2214
2243
|
else {
|
|
2215
2244
|
spinner.succeed(hasLocalData ? 'Intelligence system active (local data loaded)' : 'Intelligence system active');
|
|
@@ -2360,7 +2360,39 @@ export const hooksIntelligence = {
|
|
|
2360
2360
|
const flashAvailable = (await getFlashAttention()) !== null;
|
|
2361
2361
|
const ewcAvailable = (await getEWCConsolidator()) !== null;
|
|
2362
2362
|
const loraAvailable = (await getLoRAAdapter()) !== null;
|
|
2363
|
+
// #2940: `forceTraining` (CLI `hooks intelligence --train`) was declared
|
|
2364
|
+
// on this tool's input schema but never read — the handler always
|
|
2365
|
+
// returned the same read-only status dashboard, so `lastAdaptation`
|
|
2366
|
+
// (what `--status` reports as "Last Training") could never move no
|
|
2367
|
+
// matter how many times `--train` ran. Actually distill when asked,
|
|
2368
|
+
// and report honestly rather than always implying success:
|
|
2369
|
+
// `attempted: false` (flag not passed), `trained: true` (real work
|
|
2370
|
+
// happened, lastAdaptation now current), or `trained: false` with a
|
|
2371
|
+
// reason (nothing new to distill, or distillation unavailable).
|
|
2372
|
+
const training = { attempted: false, trained: false };
|
|
2373
|
+
if (params.forceTraining) {
|
|
2374
|
+
training.attempted = true;
|
|
2375
|
+
try {
|
|
2376
|
+
const { distillLearning } = await import('../memory/intelligence.js');
|
|
2377
|
+
const result = await distillLearning();
|
|
2378
|
+
if (result) {
|
|
2379
|
+
training.trained = true;
|
|
2380
|
+
training.patternsDistilled = result.patternsDistilled;
|
|
2381
|
+
training.ewcPenalty = result.ewcPenalty;
|
|
2382
|
+
if (result.patternsDistilled === 0) {
|
|
2383
|
+
training.reason = 'no new trajectories to distill since the last training cycle';
|
|
2384
|
+
}
|
|
2385
|
+
}
|
|
2386
|
+
else {
|
|
2387
|
+
training.reason = 'intelligence system unavailable — could not initialize SONA/ReasoningBank';
|
|
2388
|
+
}
|
|
2389
|
+
}
|
|
2390
|
+
catch (error) {
|
|
2391
|
+
training.reason = `distillation failed: ${error instanceof Error ? error.message : String(error)}`;
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2363
2394
|
return {
|
|
2395
|
+
training,
|
|
2364
2396
|
mode,
|
|
2365
2397
|
status: 'active',
|
|
2366
2398
|
components: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.38.
|
|
3
|
+
"version": "3.38.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
|
|
6
6
|
"main": "dist/src/index.js",
|