claude-flow 3.6.1 → 3.6.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "3.6.1",
3
+ "version": "3.6.3",
4
4
  "description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -20,9 +20,16 @@ function getPackageVersion() {
20
20
  try {
21
21
  const __filename = fileURLToPath(import.meta.url);
22
22
  const __dirname = dirname(__filename);
23
- const pkgPath = join(__dirname, '..', '..', 'package.json');
24
- const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
25
- return pkg.version || '3.0.0';
23
+ for (const depth of ['../..', '../../..']) {
24
+ const pkgPath = join(__dirname, depth, 'package.json');
25
+ if (existsSync(pkgPath)) {
26
+ const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
27
+ if (pkg.name?.includes('claude-flow') || pkg.name === 'ruflo') {
28
+ return pkg.version || '3.0.0';
29
+ }
30
+ }
31
+ }
32
+ return '3.0.0';
26
33
  }
27
34
  catch {
28
35
  return '3.0.0';
@@ -10,15 +10,15 @@ export function searchPlugins(registry, options = {}) {
10
10
  // Text search (name, displayName, description, tags)
11
11
  if (options.query) {
12
12
  const query = options.query.toLowerCase();
13
- plugins = plugins.filter(p => p.name.toLowerCase().includes(query) ||
14
- p.displayName.toLowerCase().includes(query) ||
15
- p.description.toLowerCase().includes(query) ||
16
- p.tags.some(t => t.toLowerCase().includes(query)) ||
17
- p.keywords.some(k => k.toLowerCase().includes(query)));
13
+ plugins = plugins.filter(p => p.name?.toLowerCase().includes(query) ||
14
+ p.displayName?.toLowerCase().includes(query) ||
15
+ p.description?.toLowerCase().includes(query) ||
16
+ (p.tags || []).some(t => t.toLowerCase().includes(query)) ||
17
+ (p.keywords || []).some(k => k.toLowerCase().includes(query)));
18
18
  }
19
19
  // Category filter
20
20
  if (options.category) {
21
- plugins = plugins.filter(p => p.categories.includes(options.category));
21
+ plugins = plugins.filter(p => (p.categories || []).includes(options.category));
22
22
  }
23
23
  // Type filter
24
24
  if (options.type) {
@@ -26,7 +26,7 @@ export function searchPlugins(registry, options = {}) {
26
26
  }
27
27
  // Tags filter (match any)
28
28
  if (options.tags && options.tags.length > 0) {
29
- plugins = plugins.filter(p => options.tags.some(tag => p.tags.includes(tag)));
29
+ plugins = plugins.filter(p => options.tags.some(tag => (p.tags || []).includes(tag)));
30
30
  }
31
31
  // Author filter
32
32
  if (options.author) {
@@ -56,7 +56,7 @@ export function searchPlugins(registry, options = {}) {
56
56
  }
57
57
  // Permissions filter
58
58
  if (options.permissions && options.permissions.length > 0) {
59
- plugins = plugins.filter(p => options.permissions.every(perm => p.permissions.includes(perm)));
59
+ plugins = plugins.filter(p => options.permissions.every(perm => (p.permissions || []).includes(perm)));
60
60
  }
61
61
  // Security audit filter
62
62
  if (options.hasSecurityAudit !== undefined) {
@@ -116,13 +116,13 @@ export function getPluginSearchSuggestions(registry, partialQuery, limit = 10) {
116
116
  suggestions.add(plugin.displayName);
117
117
  }
118
118
  // Search in tags
119
- for (const tag of plugin.tags) {
119
+ for (const tag of plugin.tags || []) {
120
120
  if (tag.toLowerCase().includes(query)) {
121
121
  suggestions.add(tag);
122
122
  }
123
123
  }
124
124
  // Search in keywords
125
- for (const keyword of plugin.keywords) {
125
+ for (const keyword of plugin.keywords || []) {
126
126
  if (keyword.toLowerCase().includes(query)) {
127
127
  suggestions.add(keyword);
128
128
  }
@@ -136,7 +136,7 @@ export function getPluginSearchSuggestions(registry, partialQuery, limit = 10) {
136
136
  export function getPluginTagCloud(registry) {
137
137
  const tagCounts = new Map();
138
138
  for (const plugin of registry.plugins) {
139
- for (const tag of plugin.tags) {
139
+ for (const tag of plugin.tags || []) {
140
140
  tagCounts.set(tag, (tagCounts.get(tag) || 0) + 1);
141
141
  }
142
142
  }
@@ -150,7 +150,7 @@ export function getPluginTagCloud(registry) {
150
150
  export function getPluginCategoryStats(registry) {
151
151
  const categoryCounts = new Map();
152
152
  for (const plugin of registry.plugins) {
153
- for (const category of plugin.categories) {
153
+ for (const category of plugin.categories || []) {
154
154
  categoryCounts.set(category, (categoryCounts.get(category) || 0) + 1);
155
155
  }
156
156
  }
@@ -170,10 +170,10 @@ export function findSimilarPlugins(registry, pluginId, limit = 5) {
170
170
  .map(plugin => {
171
171
  let score = 0;
172
172
  // Tag overlap
173
- const tagOverlap = plugin.tags.filter(t => targetPlugin.tags.includes(t)).length;
173
+ const tagOverlap = (plugin.tags || []).filter(t => (targetPlugin.tags || []).includes(t)).length;
174
174
  score += tagOverlap * 2;
175
175
  // Category match
176
- const categoryMatch = plugin.categories.some(c => targetPlugin.categories.includes(c));
176
+ const categoryMatch = (plugin.categories || []).some(c => (targetPlugin.categories || []).includes(c));
177
177
  if (categoryMatch)
178
178
  score += 3;
179
179
  // Type match
@@ -225,6 +225,6 @@ export function getOfficialPlugins(registry) {
225
225
  * Get plugins by permission
226
226
  */
227
227
  export function getPluginsByPermission(registry, permission) {
228
- return registry.plugins.filter(p => p.permissions.includes(permission));
228
+ return registry.plugins.filter(p => (p.permissions || []).includes(permission));
229
229
  }
230
230
  //# sourceMappingURL=search.js.map
@@ -22,6 +22,8 @@
22
22
  */
23
23
  import { readFileSync } from 'node:fs';
24
24
  import { createRequire } from 'node:module';
25
+ // WASM binary requires at least 768-dim input for MicroLoRA adapt()
26
+ const MICROLORA_WASM_MIN_DIM = 768;
25
27
  // ── WASM Module Detection & Init ─────────────────────────────
26
28
  let _wasmReady = false;
27
29
  /**
@@ -188,7 +190,6 @@ export async function createMicroLora(config) {
188
190
  return lora.apply(input);
189
191
  },
190
192
  adapt(quality, learningRate = 0.01, success = true) {
191
- // v2.0.2: adapt(input, feedback) — two args
192
193
  const feedback = new mod.AdaptFeedbackWasm();
193
194
  feedback.quality = quality;
194
195
  feedback.learningRate = learningRate;
@@ -196,17 +197,8 @@ export async function createMicroLora(config) {
196
197
  feedback.success = success;
197
198
  }
198
199
  catch { /* v2.0.2 quirk */ }
199
- const input = new Float32Array(config.inputDim);
200
- try {
201
- lora.adapt(input, feedback);
202
- }
203
- catch (e) {
204
- if (e?.message?.includes('Input size mismatch')) {
205
- throw new Error(`MicroLoRA adapt failed: WASM expects inputDim=768 but this adapter was created with inputDim=${config.inputDim}. ` +
206
- `Recreate with inputDim=768 or a multiple of 768.`);
207
- }
208
- throw e;
209
- }
200
+ const input = new Float32Array(Math.max(config.inputDim, MICROLORA_WASM_MIN_DIM));
201
+ lora.adapt(input, feedback);
210
202
  },
211
203
  applyUpdates(gradients) {
212
204
  lora.applyUpdates(gradients);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.6.1",
3
+ "version": "3.6.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",