@claude-flow/cli 3.41.2 → 3.41.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": {
3
- "version": "3.41.2",
3
+ "version": "3.41.3",
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": "cmz1Yt39LkaWY+8JH1BOtqD27A3TYoFbpHnMGTpKZDzpuhgq1RQCF9P90z1yrnnStOSX0e01meDsHeRoGQgtAA==",
11
+ "signature": "YKF5dYIr74cL7hG0bQ8z6ygCZF4Atdhj79kRLOoCKLSO+o0pbUvs+4u9qQHN9Jig99FufZYKwvciYrE/85XaBA==",
12
12
  "algorithm": "ed25519"
13
13
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "generation": 6,
4
- "generatedAt": "2026-09-10T19:46:29.600Z",
5
- "gitSha": "df87b0db",
4
+ "generatedAt": "2026-09-14T17:14:45.365Z",
5
+ "gitSha": "8008bc35",
6
6
  "catalog": {
7
7
  "agents": 167,
8
8
  "tools": 418,
@@ -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
- if (m[0] === 'EVENT')
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 { ...base, ...JSON.parse(ev.content) };
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 { ...base, ...JSON.parse(t.nip44.v2.decrypt(ev.content, key)) };
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.2",
3
+ "version": "3.41.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",