@claude-flow/cli 3.38.3 → 3.38.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.38.
|
|
3
|
+
"version": "3.38.5",
|
|
4
4
|
"files": {
|
|
5
5
|
"auto-memory-hook.mjs": "85fe05c757421c52137c0bc8545a0896bab6b4714538c2a11d1d0835bfcc8c1c",
|
|
6
6
|
"hook-handler.cjs": "dae295fb9ae2626b89899c19a20cc911541af82b52d2eeb9b214d618b96e9a86",
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
"statusline.cjs": "0457fe53f8cd2c56458ff178392536a5868efd1a573665fa43bc01d2d95ca677"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
|
-
"signature": "
|
|
11
|
+
"signature": "aNZkK2xmrSn4xS5GEZ42BMV56uqQorOY8jt/3cxHbCUt1D2Vi8Ewz31d4vrm8pDUR1wTtkUKj148o8saoUaxAg==",
|
|
12
12
|
"algorithm": "ed25519"
|
|
13
13
|
}
|
package/catalog-manifest.json
CHANGED
|
@@ -496,8 +496,16 @@ const initClaudeAction = async (ctx) => {
|
|
|
496
496
|
const force = ctx.flags.force;
|
|
497
497
|
const minimal = ctx.flags.minimal;
|
|
498
498
|
const full = ctx.flags.full;
|
|
499
|
-
|
|
500
|
-
|
|
499
|
+
// #2952 — every long-flag write path in the parser goes through
|
|
500
|
+
// normalizeKey() (parser.ts:399-402), which converts kebab-case to
|
|
501
|
+
// camelCase before storing. `--skip-claude`/`--only-claude`/
|
|
502
|
+
// `--all-agents`/`--cloud-mcp` land as `flags.skipClaude`/`flags.onlyClaude`/
|
|
503
|
+
// `flags.allAgents`/`flags.cloudMcp` — there is no code path that ever
|
|
504
|
+
// stores the literal kebab-case key. Reading `ctx.flags['skip-claude']`
|
|
505
|
+
// etc. was always undefined, so all four flags were silent no-ops. Same
|
|
506
|
+
// bug class as #2098A below, just never applied to these siblings.
|
|
507
|
+
const skipClaude = ctx.flags.skipClaude;
|
|
508
|
+
const onlyClaude = ctx.flags.onlyClaude;
|
|
501
509
|
// #2098A — the parser handles `--no-foo` by stripping the prefix and
|
|
502
510
|
// storing `flags.foo = false` (parser.ts:291-294), not by storing
|
|
503
511
|
// `flags['no-foo'] = true`. So `--no-global` lands as
|
|
@@ -505,8 +513,8 @@ const initClaudeAction = async (ctx) => {
|
|
|
505
513
|
// was always undefined and silently no-op'd — every user with the flag
|
|
506
514
|
// set still got `~/.claude/CLAUDE.md` modified. Read the real key.
|
|
507
515
|
const noGlobal = ctx.flags['no-global'] === true || ctx.flags['global'] === false;
|
|
508
|
-
const allAgents = ctx.flags
|
|
509
|
-
const cloudMcp = ctx.flags
|
|
516
|
+
const allAgents = ctx.flags.allAgents;
|
|
517
|
+
const cloudMcp = ctx.flags.cloudMcp;
|
|
510
518
|
const cwd = ctx.cwd;
|
|
511
519
|
// Check if already initialized
|
|
512
520
|
const initialized = isInitialized(cwd);
|
|
@@ -170,7 +170,14 @@ const scanCommand = {
|
|
|
170
170
|
if (scanType === 'all' || scanType === 'code') {
|
|
171
171
|
spinner.setText('Scanning for hardcoded secrets...');
|
|
172
172
|
const secretPatterns = [
|
|
173
|
-
|
|
173
|
+
// #2931: was `['"](?:sk-|...)...{20,}['"]` — the 20-char floor
|
|
174
|
+
// missed shorter-but-real keys like `sk-1234567890abcdef` (16
|
|
175
|
+
// chars), and the quote-adjacency anchor required a quote
|
|
176
|
+
// literally next to the prefix, missing the extremely common
|
|
177
|
+
// `Authorization: "Bearer sk_live_..."` shape where the quote
|
|
178
|
+
// sits next to "Bearer", not the key. Lookaround boundaries
|
|
179
|
+
// match the prefix wherever it appears as a standalone token.
|
|
180
|
+
{ pattern: /(?<![a-zA-Z0-9_])(?:sk-|sk_live_|sk_test_)[a-zA-Z0-9]{10,}(?![a-zA-Z0-9_])/g, type: 'API Key (Stripe/OpenAI)' },
|
|
174
181
|
{ pattern: /['"]AKIA[A-Z0-9]{16}['"]/g, type: 'AWS Access Key' },
|
|
175
182
|
{ pattern: /['"]ghp_[a-zA-Z0-9]{36}['"]/g, type: 'GitHub Token' },
|
|
176
183
|
{ pattern: /['"]xox[baprs]-[a-zA-Z0-9-]+['"]/g, type: 'Slack Token' },
|
|
@@ -789,7 +796,7 @@ const secretsCommand = {
|
|
|
789
796
|
{ pattern: /eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}/g, type: 'JWT Token', risk: 'High', action: 'Remove from source' },
|
|
790
797
|
{ pattern: /-----BEGIN (?:RSA|EC|DSA|OPENSSH) PRIVATE KEY-----/g, type: 'Private Key', risk: 'Critical', action: 'Remove and regenerate' },
|
|
791
798
|
{ pattern: /(?:mongodb|postgres|mysql|redis):\/\/[^\s'"]+/g, type: 'Connection String', risk: 'High', action: 'Use env variable' },
|
|
792
|
-
{ pattern: /[
|
|
799
|
+
{ pattern: /(?<![a-zA-Z0-9_])(?:sk-|sk_live_|sk_test_)[a-zA-Z0-9]{10,}(?![a-zA-Z0-9_])/g, type: 'API Key (Stripe/OpenAI)', risk: 'Critical', action: 'Rotate immediately' },
|
|
793
800
|
{ pattern: /['"]xox[baprs]-[a-zA-Z0-9-]+['"]/g, type: 'Slack Token', risk: 'High', action: 'Revoke and rotate' },
|
|
794
801
|
{ pattern: /[a-zA-Z0-9_-]*(?:api[_-]?key|secret[_-]?key|auth[_-]?token|access[_-]?token|private[_-]?key)\s*[:=]\s*['"][^'"]{8,}['"]/gi, type: 'Generic Secret/API Key', risk: 'High', action: 'Use env variable' },
|
|
795
802
|
{ pattern: /(?:password|passwd|pwd)\s*[:=]\s*['"][^'"]{8,}['"]/gi, type: 'Hardcoded Password', risk: 'High', action: 'Use secrets manager' },
|
|
@@ -391,9 +391,16 @@ export const githubTools = [
|
|
|
391
391
|
const store = loadGitHubStore();
|
|
392
392
|
const action = input.action || 'list';
|
|
393
393
|
const gh = hasGhCli();
|
|
394
|
+
// #2963 — owner/repo were validated but never passed to `gh`, so `gh`
|
|
395
|
+
// silently resolved the target repo from the cwd's git remote instead
|
|
396
|
+
// of the caller-specified one. `gh` accepts `--repo owner/repo` on
|
|
397
|
+
// every issue subcommand used here.
|
|
398
|
+
const owner = input.owner;
|
|
399
|
+
const repo = input.repo;
|
|
400
|
+
const repoArgs = owner && repo ? ['--repo', `${owner}/${repo}`] : [];
|
|
394
401
|
if (action === 'list') {
|
|
395
402
|
if (gh) {
|
|
396
|
-
const raw =
|
|
403
|
+
const raw = runArgv('gh', ['issue', 'list', '--state', 'all', '--limit', '20', '--json', 'number,title,state,labels,createdAt', ...repoArgs]);
|
|
397
404
|
if (raw) {
|
|
398
405
|
try {
|
|
399
406
|
const issues = JSON.parse(raw);
|
|
@@ -413,7 +420,7 @@ export const githubTools = [
|
|
|
413
420
|
// outside [A-Za-z0-9 _\-./] and caps each label at 64 chars.
|
|
414
421
|
const labels = sanitizeLabels(input.labels) ?? [];
|
|
415
422
|
if (gh) {
|
|
416
|
-
const argv = ['issue', 'create', '--title', title, '--body', body];
|
|
423
|
+
const argv = ['issue', 'create', '--title', title, '--body', body, ...repoArgs];
|
|
417
424
|
if (labels.length > 0) {
|
|
418
425
|
argv.push('--label', labels.join(','));
|
|
419
426
|
}
|
|
@@ -442,7 +449,7 @@ export const githubTools = [
|
|
|
442
449
|
argv.push('--add-label', labels.join(','));
|
|
443
450
|
}
|
|
444
451
|
if (argv.length > 3) {
|
|
445
|
-
const result = runArgv('gh', argv);
|
|
452
|
+
const result = runArgv('gh', [...argv, ...repoArgs]);
|
|
446
453
|
if (result !== null)
|
|
447
454
|
return { success: true, _real: true, action: 'updated', issueNumber };
|
|
448
455
|
}
|
|
@@ -463,7 +470,7 @@ export const githubTools = [
|
|
|
463
470
|
if (action === 'close') {
|
|
464
471
|
const issueNumber = toPositiveInt(input.issueNumber);
|
|
465
472
|
if (gh && issueNumber) {
|
|
466
|
-
const result = runArgv('gh', ['issue', 'close', String(issueNumber)]);
|
|
473
|
+
const result = runArgv('gh', ['issue', 'close', String(issueNumber), ...repoArgs]);
|
|
467
474
|
if (result !== null)
|
|
468
475
|
return { success: true, _real: true, action: 'closed', issueNumber, closedAt: new Date().toISOString() };
|
|
469
476
|
}
|
|
@@ -1377,26 +1377,36 @@ export const hooksPostTask = {
|
|
|
1377
1377
|
catch {
|
|
1378
1378
|
// Intelligence module not available — non-fatal
|
|
1379
1379
|
}
|
|
1380
|
-
// ADR-130 Phase 3:
|
|
1380
|
+
// ADR-130 Phase 3: "reinforced-by" edge on task success.
|
|
1381
1381
|
// Writes: context node → task pattern node (relation: "reinforced-by")
|
|
1382
|
+
//
|
|
1383
|
+
// #2961 — this used to be fire-and-forget (no `await` on the IIFE). That
|
|
1384
|
+
// was invisible from the long-running MCP server, where the process
|
|
1385
|
+
// stays alive long enough for the detached write to finish in the
|
|
1386
|
+
// background. But `hooks post-task` (CLI) is the exact same handler
|
|
1387
|
+
// invoked from a one-shot process that calls `process.exit(0)`
|
|
1388
|
+
// immediately after this action resolves (bin/cli.js, #1552) — the
|
|
1389
|
+
// still-pending dynamic `import(...)` + `insertGraphEdge()` call was
|
|
1390
|
+
// killed before its first tick, so the CLI form dropped this edge on
|
|
1391
|
+
// every single success, not intermittently. Await it — this is a
|
|
1392
|
+
// single fast DB write, not worth losing correctness on one call site
|
|
1393
|
+
// to save latency on the other.
|
|
1382
1394
|
if (success) {
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
catch { /* non-fatal */ }
|
|
1399
|
-
})().catch(() => { });
|
|
1395
|
+
try {
|
|
1396
|
+
const { insertGraphEdge } = await import('../memory/graph-edge-writer.js');
|
|
1397
|
+
const sessionCtxId = `task:${taskId}`;
|
|
1398
|
+
const patternId = `pattern:${taskId}`;
|
|
1399
|
+
await insertGraphEdge({
|
|
1400
|
+
sourceId: sessionCtxId,
|
|
1401
|
+
targetId: patternId,
|
|
1402
|
+
relation: 'reinforced-by',
|
|
1403
|
+
weight: quality,
|
|
1404
|
+
confidence: quality,
|
|
1405
|
+
lastReinforced: new Date().toISOString(),
|
|
1406
|
+
metadata: { success, agent, taskId },
|
|
1407
|
+
});
|
|
1408
|
+
}
|
|
1409
|
+
catch { /* non-fatal */ }
|
|
1400
1410
|
}
|
|
1401
1411
|
// Persist routing outcome for runtime learning (file-based, always reliable)
|
|
1402
1412
|
const taskText = params.task || '';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/cli",
|
|
3
|
-
"version": "3.38.
|
|
3
|
+
"version": "3.38.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",
|