@claude-flow/cli 3.41.2 → 3.41.4
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": {
|
|
3
|
-
"version": "3.41.
|
|
3
|
+
"version": "3.41.4",
|
|
4
4
|
"files": {
|
|
5
5
|
"auto-memory-hook.mjs": "85fe05c757421c52137c0bc8545a0896bab6b4714538c2a11d1d0835bfcc8c1c",
|
|
6
6
|
"hook-handler.cjs": "209d9fafe10e17d1be0866727f6f9cf9ac66f9a0793f1c793a4f58319e8e4583",
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
"statusline.cjs": "4a48353b4f1566fa4379b00fd0321b6676a22b6cc91fbbd8380ac5183d619468"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
|
-
"signature": "
|
|
11
|
+
"signature": "QbsQi7C+pl+Nam2mKSa0FmTWyFKbZnNzLGltRMREMq/BGR4U6klP43oN0eYzVHQCwQiUKz4YOsPo1CEfjVCcDA==",
|
|
12
12
|
"algorithm": "ed25519"
|
|
13
13
|
}
|
package/catalog-manifest.json
CHANGED
|
@@ -167,8 +167,22 @@ export const agentdbPatternStore = {
|
|
|
167
167
|
const confidence = validateScore(params.confidence, 0.8);
|
|
168
168
|
const bridge = await getBridge();
|
|
169
169
|
const result = await bridge.bridgeStorePattern({ pattern, type, confidence });
|
|
170
|
-
if (result)
|
|
171
|
-
|
|
170
|
+
if (result) {
|
|
171
|
+
// #3288: `controller: 'reasoningBank'` is the ONLY label that means
|
|
172
|
+
// the healthy path ran. Every other label bridgeStorePattern can
|
|
173
|
+
// return (`bridge-fallback` today; more may be added later) is a
|
|
174
|
+
// degraded write that still reports {success: true} — flag it at
|
|
175
|
+
// this one boundary instead of chasing each fallback label
|
|
176
|
+
// individually, so a new label can't silently reopen this gap.
|
|
177
|
+
if (result.controller === 'reasoningBank')
|
|
178
|
+
return result;
|
|
179
|
+
return {
|
|
180
|
+
...result,
|
|
181
|
+
degraded: true,
|
|
182
|
+
reason: `reasoningBank-unavailable:${result.controller}`,
|
|
183
|
+
note: `ReasoningBank controller unavailable (controller=${result.controller}). Pattern persisted via the fallback path. Run \`agentdb_health\` to inspect controller registration.`,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
172
186
|
// ADR-093 F4: when the ReasoningBank controller registry returns
|
|
173
187
|
// null (the cause of audit-reported "AgentDB bridge not available"
|
|
174
188
|
// even though `agentdb_health.reasoningBank.enabled === true`), fall
|
|
@@ -187,6 +201,12 @@ export const agentdbPatternStore = {
|
|
|
187
201
|
});
|
|
188
202
|
return {
|
|
189
203
|
success: true,
|
|
204
|
+
// #3288: a caller must not have to already know to distrust a
|
|
205
|
+
// "successful" response — degraded:true is the structural signal
|
|
206
|
+
// (matching agentbbs-tools.ts's degradedResult() convention),
|
|
207
|
+
// `note` stays for the human-readable detail.
|
|
208
|
+
degraded: true,
|
|
209
|
+
reason: 'reasoningBank-unavailable:registry-null',
|
|
190
210
|
patternId,
|
|
191
211
|
controller: 'memory-store-fallback',
|
|
192
212
|
note: 'ReasoningBank controller registry unavailable. Pattern persisted via memory_store. Run `agentdb_health` to inspect controller registration.',
|
|
@@ -232,7 +252,20 @@ export const agentdbPatternSearch = {
|
|
|
232
252
|
const bridge = await getBridge();
|
|
233
253
|
const result = await bridge.bridgeSearchPatterns({ query, topK, minConfidence });
|
|
234
254
|
if (result && Array.isArray(result.results) && result.results.length > 0) {
|
|
235
|
-
|
|
255
|
+
// #3288: `controller: 'reasoningBank'` is the only label meaning the
|
|
256
|
+
// healthy path ran and actually found results. Any other label
|
|
257
|
+
// (`bridge-fallback` today; more may be added later) is a degraded
|
|
258
|
+
// response even though it has results — flag it here, since this
|
|
259
|
+
// early return bypasses the tier1/tier2 fallback block below
|
|
260
|
+
// entirely (and its degraded:true) whenever there ARE results.
|
|
261
|
+
if (result.controller === 'reasoningBank')
|
|
262
|
+
return result;
|
|
263
|
+
return {
|
|
264
|
+
...result,
|
|
265
|
+
degraded: true,
|
|
266
|
+
reason: `reasoningBank-unavailable:${result.controller}`,
|
|
267
|
+
note: `ReasoningBank controller unavailable (controller=${result.controller}); results returned via the fallback path. Run \`agentdb_health\` to inspect controller registration.`,
|
|
268
|
+
};
|
|
236
269
|
}
|
|
237
270
|
// #1889 — symmetric fallback. pattern-store writes to the `pattern`
|
|
238
271
|
// namespace via memory_store when ReasoningBank is unavailable; the
|
|
@@ -316,8 +349,13 @@ export const agentdbPatternSearch = {
|
|
|
316
349
|
// round-trip sees both ends agree. The store reports
|
|
317
350
|
// `memory-store-fallback`; we use the same name + a `tier` field
|
|
318
351
|
// to expose which sub-strategy fired.
|
|
352
|
+
// #3288: degraded:true is the structural signal a caller can check
|
|
353
|
+
// without already knowing to distrust an apparently-successful
|
|
354
|
+
// response — matches agentbbs-tools.ts's degradedResult() convention.
|
|
319
355
|
return {
|
|
320
356
|
results,
|
|
357
|
+
degraded: true,
|
|
358
|
+
reason: result ? `reasoningBank-empty:${result.controller ?? 'unknown'}` : 'reasoningBank-unavailable:registry-null',
|
|
321
359
|
controller: 'memory-store-fallback',
|
|
322
360
|
tier,
|
|
323
361
|
note: result
|
|
@@ -88,13 +88,18 @@ function publishEvent(ws, nt, sk, tags, content) {
|
|
|
88
88
|
ws.send(JSON.stringify(['EVENT', ev]));
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
function reqEvents(ws, filter) {
|
|
91
|
+
function reqEvents(ws, nt, filter) {
|
|
92
92
|
const out = [];
|
|
93
93
|
return new Promise((resolve) => {
|
|
94
94
|
const t = setTimeout(() => resolve(out), 12000);
|
|
95
95
|
ws.on('message', (d) => {
|
|
96
96
|
const m = JSON.parse(d.toString());
|
|
97
|
-
|
|
97
|
+
// Only a signature-verified event can be trusted as evidence of who sent
|
|
98
|
+
// it. Without this check an unverified EVENT frame — relay bug, MITM, or
|
|
99
|
+
// a compromised relay — would reach callers that treat .pubkey/.id as
|
|
100
|
+
// authenticated (channel_accept's NIP-44 conversation-key derivation,
|
|
101
|
+
// channel_read's returned identity).
|
|
102
|
+
if (m[0] === 'EVENT' && nt.verifyEvent(m[2]))
|
|
98
103
|
out.push(m[2]);
|
|
99
104
|
else if (m[0] === 'EOSE') {
|
|
100
105
|
clearTimeout(t);
|
|
@@ -168,7 +173,7 @@ export const xFederationChannelTools = [
|
|
|
168
173
|
return degraded();
|
|
169
174
|
const { sk, pubkey } = loadOrCreateKey(t.nt, KEY_FILE());
|
|
170
175
|
const relay = RELAY_WS(i.relayWs);
|
|
171
|
-
const evs = await relayCall(relay, sk, t.nt, (ws) => reqEvents(ws, {
|
|
176
|
+
const evs = await relayCall(relay, sk, t.nt, (ws) => reqEvents(ws, t.nt, {
|
|
172
177
|
kinds: [1], '#t': ['ruflo-swarm'], '#k': ['ChannelGrant'], '#p': [pubkey],
|
|
173
178
|
since: Math.floor(Date.now() / 1000) - (i.sinceSeconds ?? 7 * 86400), limit: 200,
|
|
174
179
|
}));
|
|
@@ -256,7 +261,7 @@ export const xFederationChannelTools = [
|
|
|
256
261
|
if (!t)
|
|
257
262
|
return degraded();
|
|
258
263
|
const { sk } = loadOrCreateKey(t.nt, KEY_FILE());
|
|
259
|
-
const evs = await relayCall(RELAY_WS(i.relayWs), sk, t.nt, (ws) => reqEvents(ws, {
|
|
264
|
+
const evs = await relayCall(RELAY_WS(i.relayWs), sk, t.nt, (ws) => reqEvents(ws, t.nt, {
|
|
260
265
|
kinds: [1], '#t': ['ruflo-swarm'], '#c': [i.channel],
|
|
261
266
|
since: Math.floor(Date.now() / 1000) - (i.sinceSeconds ?? 3600), limit: i.limit ?? 100,
|
|
262
267
|
}));
|
|
@@ -266,9 +271,12 @@ export const xFederationChannelTools = [
|
|
|
266
271
|
const ev = e;
|
|
267
272
|
const k = ev.tags.find((x) => x[0] === 'k')?.[1];
|
|
268
273
|
const base = { id: ev.id, pubkey: ev.pubkey, created_at: ev.created_at };
|
|
274
|
+
// base's verified id/pubkey/created_at must win over the parsed/decrypted
|
|
275
|
+
// body — spread body first so a stray id/pubkey/created_at key in the
|
|
276
|
+
// publisher's own content can't override the authenticated identity.
|
|
269
277
|
if (k !== 'enc') {
|
|
270
278
|
try {
|
|
271
|
-
return { ...
|
|
279
|
+
return { ...JSON.parse(ev.content), ...base };
|
|
272
280
|
}
|
|
273
281
|
catch {
|
|
274
282
|
return { ...base, raw: ev.content };
|
|
@@ -277,7 +285,7 @@ export const xFederationChannelTools = [
|
|
|
277
285
|
if (!key)
|
|
278
286
|
return { ...base, encrypted: true, reason: 'no channel key held' };
|
|
279
287
|
try {
|
|
280
|
-
return { ...
|
|
288
|
+
return { ...JSON.parse(t.nip44.v2.decrypt(ev.content, key)), ...base };
|
|
281
289
|
}
|
|
282
290
|
catch {
|
|
283
291
|
return { ...base, encrypted: true, reason: 'held key does not open this message' };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.41.
|
|
3
|
+
"version": "3.41.4",
|
|
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",
|