@claude-flow/cli 3.56.4 → 3.56.5

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.56.4",
3
+ "version": "3.56.5",
4
4
  "files": {
5
5
  "auto-memory-hook.mjs": "381412515fb490def7d821ddfe1ebf8d9bee76e49a86e182806c0274f568bf15",
6
6
  "hook-handler.cjs": "38fc235079ddcf74b62452a91b9e56703026a1a7682dcce3c635be5ad1c8ea19",
@@ -9,6 +9,6 @@
9
9
  "router.cjs": "16648b3c0d73b6681ac2d8d13def6a68286c57f5a11004de5b19a0fa088c833d"
10
10
  }
11
11
  },
12
- "signature": "Dhlixv3hNK+hc+t5recMVcHtVZ6ilyT4uN4YLuFsoSVwbTI6dt6VfzyZZXDjgfm6ei8NR9IHIjjmVgKkUmRBDw==",
12
+ "signature": "/MW5zFGHYeVuoNFAcDlUhkjIdDhPmBiUQTVJTz8Ku20SpFOoxpIXbgv01PxS5IloBqfmuDLieu++2cG55SIzAg==",
13
13
  "algorithm": "ed25519"
14
14
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "generation": 7,
4
- "generatedAt": "2026-10-11T01:01:00.018Z",
5
- "gitSha": "f6781f1a",
4
+ "generatedAt": "2026-10-11T02:06:08.884Z",
5
+ "gitSha": "72255a2f",
6
6
  "catalog": {
7
7
  "agents": 176,
8
8
  "tools": 423,
@@ -32,6 +32,7 @@
32
32
  import * as path from 'path';
33
33
  import * as fs from 'fs';
34
34
  import * as crypto from 'crypto';
35
+ import { execFileSync } from 'child_process';
35
36
  import { getMemoryRoot } from './memory-initializer.js';
36
37
  import { encodeEmbedding } from './embedding-quantization.js';
37
38
  import { loadBetterSqlite3 } from './shared-sqlite.js';
@@ -54,20 +55,41 @@ import { isEncryptedBlob } from '../encryption/vault.js';
54
55
  // skip the native open (it would only throw) and warn once per distinct
55
56
  // dbPath (not once per process — a process can legitimately touch more
56
57
  // than one encrypted store via a custom `dbPath` argument).
58
+ /** Child-process body: print the first `argv[2]` bytes of `argv[1]` as hex. */
59
+ const HEADER_READER = "const fs=require('fs');const fd=fs.openSync(process.argv[1],'r');const b=Buffer.alloc(Number(process.argv[2]));" +
60
+ "const n=fs.readSync(fd,b,0,b.length,0);process.stdout.write(b.subarray(0,n).toString('hex'))";
61
+ const HEADER_READ_TIMEOUT_MS = 5000;
57
62
  /** Read just the first `len` bytes of a file without loading the whole file
58
- * into memory. Mirrors the pattern in commands/doctor.ts's readHeaderBytes
59
- * (not imported from there — this is a memory-layer module and must not
60
- * depend on the command layer). */
63
+ * into memory.
64
+ *
65
+ * #4040: on POSIX this never opens the file in THIS process. close(2) on any
66
+ * descriptor for an inode drops every advisory lock the process holds on it
67
+ * (https://www.sqlite.org/howtocorrupt.html), including the ones SQLite's own
68
+ * live handle holds - a second process then believes it is the only
69
+ * connection and checkpoints/deletes the WAL under us. This module (and the
70
+ * shared AgentDB handle) can own such a handle, so the header is read by a
71
+ * short-lived child: empty environment, one bounded read, 5 s timeout. Windows
72
+ * byte-range locks are per handle, not per process, so it reads in-process. */
61
73
  function readHeaderBytes(filePath, len) {
62
- const fd = fs.openSync(filePath, 'r');
63
- try {
64
- const buf = Buffer.alloc(len);
65
- const bytesRead = fs.readSync(fd, buf, 0, len, 0);
66
- return buf.subarray(0, bytesRead);
67
- }
68
- finally {
69
- fs.closeSync(fd);
74
+ if (process.platform === 'win32') {
75
+ const fd = fs.openSync(filePath, 'r');
76
+ try {
77
+ const buf = Buffer.alloc(len);
78
+ const bytesRead = fs.readSync(fd, buf, 0, len, 0);
79
+ return buf.subarray(0, bytesRead);
80
+ }
81
+ finally {
82
+ fs.closeSync(fd);
83
+ }
70
84
  }
85
+ const hex = execFileSync(process.execPath, ['-e', HEADER_READER, filePath, String(len)], {
86
+ env: {},
87
+ timeout: HEADER_READ_TIMEOUT_MS,
88
+ maxBuffer: len * 2 + 64,
89
+ stdio: ['ignore', 'pipe', 'ignore'],
90
+ encoding: 'utf8',
91
+ });
92
+ return Buffer.from(hex, 'hex');
71
93
  }
72
94
  // RFE1 wire format is magic(4) + iv(12) + ciphertext(N) + tag(16); the
73
95
  // shortest possible blob is 32 bytes. 64 gives headroom.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.56.4",
3
+ "version": "3.56.5",
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",