claude-flow 3.7.0-alpha.62 → 3.7.0-alpha.63
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.7.0-alpha.
|
|
3
|
+
"version": "3.7.0-alpha.63",
|
|
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",
|
|
@@ -917,16 +917,16 @@ export const memoryTools = [
|
|
|
917
917
|
const claudeEntries = await listEntries({ namespace: 'claude-memories' });
|
|
918
918
|
claudeMemoryEntries = claudeEntries?.total
|
|
919
919
|
?? claudeEntries?.entries?.length ?? 0;
|
|
920
|
-
//
|
|
921
|
-
//
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
920
|
+
// #2037 + #1940: per-namespace counts via dynamic enumeration
|
|
921
|
+
// from the already-fetched `allEntries`. The old hardcoded
|
|
922
|
+
// 7-namespace whitelist silently dropped custom namespaces
|
|
923
|
+
// (team prefixes, plugin namespaces, etc.) from the bridge
|
|
924
|
+
// status — exactly the bug #2037 reported on the sibling
|
|
925
|
+
// memory_search_unified tool.
|
|
926
|
+
for (const e of allEntries?.entries ?? []) {
|
|
927
|
+
if (typeof e.namespace === 'string' && e.namespace.length > 0) {
|
|
928
|
+
namespaceCounts[e.namespace] = (namespaceCounts[e.namespace] ?? 0) + 1;
|
|
928
929
|
}
|
|
929
|
-
catch { /* skip per-namespace failure */ }
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
catch { /* ignore */ }
|
|
@@ -952,31 +952,71 @@ export const memoryTools = [
|
|
|
952
952
|
},
|
|
953
953
|
{
|
|
954
954
|
name: 'memory_search_unified',
|
|
955
|
-
description: 'Search across
|
|
955
|
+
description: 'Search across Claude Code memories and AgentDB entries using semantic vector similarity. By default DYNAMICALLY ENUMERATES all namespaces in the store via listEntries — no longer hardcoded — so custom namespaces (e.g. team/project-prefixed) are included. Use `namespace` to filter to one, or `namespaces` to target an explicit set. Returns merged, deduplicated results sorted by score. Native Read/Write is fine for one-shot file I/O; use this when you need (a) cross-session retrieval by semantic similarity, (b) cross-namespace search without managing the namespace list, or (c) the .swarm/memory.db audit trail.',
|
|
956
956
|
category: 'memory',
|
|
957
957
|
inputSchema: {
|
|
958
958
|
type: 'object',
|
|
959
959
|
properties: {
|
|
960
960
|
query: { type: 'string', description: 'Search query (natural language)' },
|
|
961
961
|
limit: { type: 'number', description: 'Max results (default: 10)' },
|
|
962
|
-
namespace: { type: 'string', description: 'Filter to namespace
|
|
962
|
+
namespace: { type: 'string', description: 'Filter to a single namespace. Omit for all.' },
|
|
963
|
+
namespaces: {
|
|
964
|
+
type: 'array',
|
|
965
|
+
items: { type: 'string' },
|
|
966
|
+
description: 'Explicit list of namespaces to search. Overrides the auto-enumeration. Use when you know exactly which namespaces are relevant (e.g. team prefixes). Ignored when `namespace` is set.',
|
|
967
|
+
},
|
|
963
968
|
},
|
|
964
969
|
required: ['query'],
|
|
965
970
|
},
|
|
966
971
|
handler: async (input) => {
|
|
967
972
|
await ensureInitialized();
|
|
968
|
-
const { searchEntries } = await getMemoryFunctions();
|
|
973
|
+
const { searchEntries, listEntries } = await getMemoryFunctions();
|
|
969
974
|
validateMemoryInput(undefined, undefined, input.query);
|
|
970
975
|
const query = input.query;
|
|
971
976
|
const limit = input.limit ?? 10;
|
|
972
977
|
const ns = input.namespace;
|
|
978
|
+
const explicitNamespaces = Array.isArray(input.namespaces) ? input.namespaces : undefined;
|
|
973
979
|
if (ns) {
|
|
974
980
|
const vNs = validateIdentifier(ns, 'namespace');
|
|
975
981
|
if (!vNs.valid)
|
|
976
982
|
return { success: false, query, results: [], total: 0, error: vNs.error };
|
|
977
983
|
}
|
|
978
|
-
|
|
979
|
-
|
|
984
|
+
if (explicitNamespaces) {
|
|
985
|
+
for (const n of explicitNamespaces) {
|
|
986
|
+
const v = validateIdentifier(n, 'namespace');
|
|
987
|
+
if (!v.valid)
|
|
988
|
+
return { success: false, query, results: [], total: 0, error: v.error };
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
// #2037: enumerate namespaces dynamically. Resolution order:
|
|
992
|
+
// 1. `namespace` (single string) → that one only
|
|
993
|
+
// 2. `namespaces` (explicit array) → that list
|
|
994
|
+
// 3. Auto-discover every namespace present in the store via
|
|
995
|
+
// listEntries — replaces the old hardcoded 6-namespace
|
|
996
|
+
// whitelist that silently dropped custom namespaces.
|
|
997
|
+
let namespaces;
|
|
998
|
+
if (ns) {
|
|
999
|
+
namespaces = [ns];
|
|
1000
|
+
}
|
|
1001
|
+
else if (explicitNamespaces && explicitNamespaces.length > 0) {
|
|
1002
|
+
namespaces = explicitNamespaces;
|
|
1003
|
+
}
|
|
1004
|
+
else {
|
|
1005
|
+
try {
|
|
1006
|
+
const all = await listEntries({ limit: 100000 });
|
|
1007
|
+
const seen = new Set();
|
|
1008
|
+
for (const e of all.entries ?? []) {
|
|
1009
|
+
if (typeof e.namespace === 'string' && e.namespace.length > 0)
|
|
1010
|
+
seen.add(e.namespace);
|
|
1011
|
+
}
|
|
1012
|
+
namespaces = seen.size > 0 ? Array.from(seen).sort() : ['default'];
|
|
1013
|
+
}
|
|
1014
|
+
catch {
|
|
1015
|
+
// Listing failed (store empty or backend hiccup) — fall back
|
|
1016
|
+
// to 'default' so the tool always returns something coherent.
|
|
1017
|
+
namespaces = ['default'];
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
980
1020
|
const allResults = [];
|
|
981
1021
|
for (const searchNs of namespaces) {
|
|
982
1022
|
try {
|
|
@@ -988,12 +1028,14 @@ export const memoryTools = [
|
|
|
988
1028
|
content: (entry.content || entry.value || '').toString().slice(0, 200),
|
|
989
1029
|
score: entry.score || 0,
|
|
990
1030
|
namespace: searchNs,
|
|
991
|
-
source: searchNs === 'claude-memories' ? 'claude-code'
|
|
1031
|
+
source: searchNs === 'claude-memories' ? 'claude-code'
|
|
1032
|
+
: searchNs === 'auto-memory' ? 'auto-memory'
|
|
1033
|
+
: 'agentdb',
|
|
992
1034
|
});
|
|
993
1035
|
}
|
|
994
1036
|
}
|
|
995
1037
|
}
|
|
996
|
-
catch { /* namespace
|
|
1038
|
+
catch { /* namespace search failure — keep going */ }
|
|
997
1039
|
}
|
|
998
1040
|
// Sort by score, deduplicate by key, take top N
|
|
999
1041
|
allResults.sort((a, b) => b.score - a.score);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.7.0-alpha.
|
|
3
|
+
"version": "3.7.0-alpha.63",
|
|
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",
|