@claude-flow/cli 3.39.2 → 3.39.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/.claude/helpers/helpers.manifest.json +2 -2
- package/catalog-manifest.json +2 -2
- package/dist/src/log-filters.d.ts +3 -3
- package/dist/src/mcp-tools/agentbbs-tools.d.ts +11 -0
- package/dist/src/mcp-tools/agentbbs-tools.js +52 -29
- package/node_modules/@claude-flow/codex/dist/cli.js +0 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.js +0 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": {
|
|
3
|
-
"version": "3.39.
|
|
3
|
+
"version": "3.39.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": "
|
|
11
|
+
"signature": "rJ2JGAqKGTyEQH0zJfJEUHMUC+KV5FdSPiprkhc9gf620sZQO0r9/YksOolXgQOJLpg9EF05oFc+XSBaA772AA==",
|
|
12
12
|
"algorithm": "ed25519"
|
|
13
13
|
}
|
package/catalog-manifest.json
CHANGED
|
@@ -40,7 +40,7 @@ declare const STDERR_REDIRECT_PREFIXES: string[];
|
|
|
40
40
|
declare const AGENTDB_MOCK_FALLBACK_DROP_PREFIXES: string[];
|
|
41
41
|
declare const shouldRedirectToStderr: (msg: unknown) => boolean;
|
|
42
42
|
declare const isAgentdbMockFallbackNoise: (msg: unknown) => boolean;
|
|
43
|
-
declare const origWarn: (...
|
|
44
|
-
declare const origLog: (...
|
|
45
|
-
declare const origError: (...
|
|
43
|
+
declare const origWarn: (message?: any, ...optionalParams: any[]) => void;
|
|
44
|
+
declare const origLog: (message?: any, ...optionalParams: any[]) => void;
|
|
45
|
+
declare const origError: (message?: any, ...optionalParams: any[]) => void;
|
|
46
46
|
//# sourceMappingURL=log-filters.d.ts.map
|
|
@@ -21,6 +21,17 @@
|
|
|
21
21
|
* so callers see one contract regardless of install state
|
|
22
22
|
* - Phase 1: polling-based watch (streaming subscriptions are Phase 4)
|
|
23
23
|
*
|
|
24
|
+
* Presence check: the published `agentbbs` package (as of 0.2.1) is a CLI-only
|
|
25
|
+
* launcher — a `bin` script with no importable JS entry point (no `main` /
|
|
26
|
+
* `exports` field) — that downloads/builds a Rust binary and shells out to it.
|
|
27
|
+
* `await import('agentbbs')` can therefore never resolve, even when the CLI is
|
|
28
|
+
* correctly installed and on PATH: there is no module for Node to find. This
|
|
29
|
+
* previously made every tool report `degraded: true` unconditionally,
|
|
30
|
+
* regardless of install state. Detect real availability instead by probing the
|
|
31
|
+
* CLI itself, matching how the rest of this codebase treats optional
|
|
32
|
+
* command-line tools (`shutil.which()`-style guards) rather than assuming a
|
|
33
|
+
* package shape the dependency doesn't have.
|
|
34
|
+
*
|
|
24
35
|
* @module @claude-flow/cli/mcp-tools/agentbbs
|
|
25
36
|
*/
|
|
26
37
|
import type { MCPTool } from './types.js';
|
|
@@ -21,33 +21,50 @@
|
|
|
21
21
|
* so callers see one contract regardless of install state
|
|
22
22
|
* - Phase 1: polling-based watch (streaming subscriptions are Phase 4)
|
|
23
23
|
*
|
|
24
|
+
* Presence check: the published `agentbbs` package (as of 0.2.1) is a CLI-only
|
|
25
|
+
* launcher — a `bin` script with no importable JS entry point (no `main` /
|
|
26
|
+
* `exports` field) — that downloads/builds a Rust binary and shells out to it.
|
|
27
|
+
* `await import('agentbbs')` can therefore never resolve, even when the CLI is
|
|
28
|
+
* correctly installed and on PATH: there is no module for Node to find. This
|
|
29
|
+
* previously made every tool report `degraded: true` unconditionally,
|
|
30
|
+
* regardless of install state. Detect real availability instead by probing the
|
|
31
|
+
* CLI itself, matching how the rest of this codebase treats optional
|
|
32
|
+
* command-line tools (`shutil.which()`-style guards) rather than assuming a
|
|
33
|
+
* package shape the dependency doesn't have.
|
|
34
|
+
*
|
|
24
35
|
* @module @claude-flow/cli/mcp-tools/agentbbs
|
|
25
36
|
*/
|
|
26
37
|
import { existsSync, mkdirSync, readFileSync, writeFileSync, appendFileSync } from 'node:fs';
|
|
27
38
|
import { resolve, isAbsolute, join } from 'node:path';
|
|
28
39
|
import { randomBytes, createHash } from 'node:crypto';
|
|
40
|
+
import { execFileSync } from 'node:child_process';
|
|
29
41
|
import { getProjectCwd } from './types.js';
|
|
30
|
-
const
|
|
31
|
-
// Cache: amortize
|
|
32
|
-
// null = not yet
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
_loadAttempted = true;
|
|
42
|
+
const CLI_NAME = 'agentbbs';
|
|
43
|
+
// Cache: amortize the subprocess probe cost across handler calls within a
|
|
44
|
+
// process. null = not yet probed; boolean = probe result.
|
|
45
|
+
let _cliAvailable = null;
|
|
46
|
+
function agentbbsCliAvailable() {
|
|
47
|
+
if (_cliAvailable !== null)
|
|
48
|
+
return _cliAvailable;
|
|
49
|
+
const bin = process.env.AGENTBBS_BIN || CLI_NAME;
|
|
39
50
|
try {
|
|
40
|
-
|
|
41
|
-
|
|
51
|
+
// On Windows npm's global-install shim is `agentbbs.cmd`, and
|
|
52
|
+
// child_process cannot spawn a .cmd without going through cmd.exe, which
|
|
53
|
+
// is what resolves the PATHEXT extension. POSIX keeps shell:false so the
|
|
54
|
+
// AGENTBBS_BIN override is never shell-interpreted — same convention as
|
|
55
|
+
// browser-tools.ts and commands/init.ts.
|
|
56
|
+
execFileSync(bin, ['--version'], {
|
|
57
|
+
stdio: 'ignore',
|
|
58
|
+
timeout: 5000,
|
|
59
|
+
shell: process.platform === 'win32',
|
|
60
|
+
windowsHide: true,
|
|
61
|
+
});
|
|
62
|
+
_cliAvailable = true;
|
|
42
63
|
}
|
|
43
|
-
catch
|
|
44
|
-
|
|
45
|
-
/Cannot find (module|package)/i.test(String(err?.message)))) {
|
|
46
|
-
_agentbbsMod = false;
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
throw err;
|
|
64
|
+
catch {
|
|
65
|
+
_cliAvailable = false;
|
|
50
66
|
}
|
|
67
|
+
return _cliAvailable;
|
|
51
68
|
}
|
|
52
69
|
function degradedResult(reason) {
|
|
53
70
|
return { success: true, degraded: true, reason };
|
|
@@ -128,12 +145,22 @@ function nextSeq(path) {
|
|
|
128
145
|
* agentbbs server's responsibility (nonce JTI tracking, per ADR-164 §3.2.4).
|
|
129
146
|
* Phase 2+ will wire this to the existing federation Ed25519 keypair.
|
|
130
147
|
*/
|
|
148
|
+
// Use @noble/ed25519 (already a hard dep of @claude-flow/cli for IPFS
|
|
149
|
+
// signing). Memoized behind one loader — two separate dynamic `import()`
|
|
150
|
+
// call sites for the same bare specifier in this module tripped up the
|
|
151
|
+
// test runner's dependency pre-bundling (surfaced once federation_bbs_
|
|
152
|
+
// human_join actually ran instead of always short-circuiting to degraded).
|
|
153
|
+
let _edMod = null;
|
|
154
|
+
async function loadEd25519() {
|
|
155
|
+
if (!_edMod)
|
|
156
|
+
_edMod = await import('@noble/ed25519');
|
|
157
|
+
return _edMod;
|
|
158
|
+
}
|
|
131
159
|
let _signingKey = null;
|
|
132
160
|
async function getSigningKey() {
|
|
133
161
|
if (_signingKey)
|
|
134
162
|
return _signingKey;
|
|
135
|
-
|
|
136
|
-
const ed = await import('@noble/ed25519');
|
|
163
|
+
const ed = await loadEd25519();
|
|
137
164
|
const priv = ed.utils.randomPrivateKey
|
|
138
165
|
? ed.utils.randomPrivateKey()
|
|
139
166
|
: randomBytes(32);
|
|
@@ -177,8 +204,7 @@ export const agentbbsTools = [
|
|
|
177
204
|
// to mask malformed requests.
|
|
178
205
|
const roomLabel = validateRoomLabel(String(input.roomLabel));
|
|
179
206
|
const basePath = resolveBasePath(input.basePath);
|
|
180
|
-
|
|
181
|
-
if (!api)
|
|
207
|
+
if (!agentbbsCliAvailable())
|
|
182
208
|
return degradedResult('agentbbs-not-found');
|
|
183
209
|
ensureDir(basePath);
|
|
184
210
|
const roomId = roomIdFromLabel(roomLabel);
|
|
@@ -260,8 +286,7 @@ export const agentbbsTools = [
|
|
|
260
286
|
if (typeof input.payload !== 'object' || input.payload === null) {
|
|
261
287
|
throw new Error('payload must be a JSON object');
|
|
262
288
|
}
|
|
263
|
-
|
|
264
|
-
if (!api)
|
|
289
|
+
if (!agentbbsCliAvailable())
|
|
265
290
|
return degradedResult('agentbbs-not-found');
|
|
266
291
|
ensureDir(basePath);
|
|
267
292
|
const logPath = roomLogPath(basePath, roomId);
|
|
@@ -314,8 +339,7 @@ export const agentbbsTools = [
|
|
|
314
339
|
handler: async (input) => {
|
|
315
340
|
const basePath = resolveBasePath(input.basePath);
|
|
316
341
|
const roomId = validateRoomId(String(input.roomId));
|
|
317
|
-
|
|
318
|
-
if (!api)
|
|
342
|
+
if (!agentbbsCliAvailable())
|
|
319
343
|
return degradedResult('agentbbs-not-found');
|
|
320
344
|
const limitRaw = typeof input.limit === 'number' ? input.limit : 50;
|
|
321
345
|
const limit = Math.max(1, Math.min(500, Math.trunc(limitRaw)));
|
|
@@ -358,8 +382,7 @@ export const agentbbsTools = [
|
|
|
358
382
|
},
|
|
359
383
|
handler: async (input) => {
|
|
360
384
|
const roomId = validateRoomId(String(input.roomId));
|
|
361
|
-
|
|
362
|
-
if (!api)
|
|
385
|
+
if (!agentbbsCliAvailable())
|
|
363
386
|
return degradedResult('agentbbs-not-found');
|
|
364
387
|
const ttlRaw = typeof input.ttlSeconds === 'number' ? input.ttlSeconds : 300;
|
|
365
388
|
const ttlSeconds = Math.max(30, Math.min(900, Math.trunc(ttlRaw)));
|
|
@@ -368,7 +391,7 @@ export const agentbbsTools = [
|
|
|
368
391
|
const nonce = base64url(randomBytes(16));
|
|
369
392
|
const payload = { roomId, nonce, expiresAt };
|
|
370
393
|
const canonical = JSON.stringify(payload);
|
|
371
|
-
const ed = await
|
|
394
|
+
const ed = await loadEd25519();
|
|
372
395
|
const { priv, pub } = await getSigningKey();
|
|
373
396
|
const sigBytes = await (ed.signAsync ?? ed.sign)(new TextEncoder().encode(canonical), priv);
|
|
374
397
|
// Token format: base64url(JSON{payload, sig, pub}). Single string, easy
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.39.
|
|
3
|
+
"version": "3.39.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",
|