@claude-flow/cli 3.32.35 → 3.32.37
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 +5 -5
- package/.claude/helpers/hook-handler.cjs +30 -0
- package/.claude/helpers/intelligence.cjs +83 -5
- package/.claude/helpers/statusline.cjs +169 -6
- package/bin/cli.js +25 -1
- package/catalog-manifest.json +2 -2
- package/dist/src/commands/agent.js +1 -1
- package/dist/src/commands/doctor.js +159 -11
- package/dist/src/commands/hooks.js +39 -4
- package/dist/src/commands/init.js +52 -8
- package/dist/src/commands/mcp.js +1 -1
- package/dist/src/commands/memory-distill.js +1 -0
- package/dist/src/commands/swarm.js +28 -0
- package/dist/src/init/executor.js +45 -10
- package/dist/src/init/helpers-generator.js +15 -4
- package/dist/src/init/statusline-generator.js +18 -5
- package/dist/src/mcp-server.d.ts +25 -0
- package/dist/src/mcp-server.js +57 -2
- package/dist/src/mcp-tools/embeddings-tools.js +51 -10
- package/dist/src/mcp-tools/hooks-tools.js +34 -8
- package/dist/src/mcp-tools/metaharness-tools.js +1 -1
- package/dist/src/memory/memory-bridge.d.ts +12 -0
- package/dist/src/memory/memory-bridge.js +29 -6
- package/dist/src/memory/memory-initializer.js +11 -8
- package/dist/src/services/memory-distillation.d.ts +1 -0
- package/dist/src/services/memory-distillation.js +81 -5
- package/dist/src/services/worker-daemon.js +1 -0
- package/node_modules/@claude-flow/codex/.agents/skills/github-automation/SKILL.md +32 -0
- package/node_modules/@claude-flow/codex/.agents/skills/performance-analysis/SKILL.md +32 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/cli.d.ts +4 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/cli.d.ts.map +1 -1
- package/node_modules/@claude-flow/codex/dist/dual-mode/cli.js +20 -1
- package/node_modules/@claude-flow/codex/dist/dual-mode/cli.js.map +1 -1
- package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.d.ts +4 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.d.ts.map +1 -1
- package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.js +18 -2
- package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.js.map +1 -1
- package/node_modules/@claude-flow/codex/dist/generators/skill-md.d.ts +11 -5
- package/node_modules/@claude-flow/codex/dist/generators/skill-md.d.ts.map +1 -1
- package/node_modules/@claude-flow/codex/dist/generators/skill-md.js +84 -849
- package/node_modules/@claude-flow/codex/dist/generators/skill-md.js.map +1 -1
- package/node_modules/@claude-flow/codex/dist/initializer.d.ts +5 -0
- package/node_modules/@claude-flow/codex/dist/initializer.d.ts.map +1 -1
- package/node_modules/@claude-flow/codex/dist/initializer.js +54 -20
- package/node_modules/@claude-flow/codex/dist/initializer.js.map +1 -1
- package/package.json +1 -1
- package/plugins/ruflo-metaharness/commands/ruflo-metaharness.md +4 -2
- package/plugins/ruflo-metaharness/scripts/_harness.mjs +5 -1
- package/plugins/ruflo-metaharness/scripts/_invoke.mjs +12 -13
- package/plugins/ruflo-metaharness/scripts/genome.mjs +29 -4
- package/plugins/ruflo-metaharness/scripts/mcp-scan.mjs +7 -8
- package/plugins/ruflo-metaharness/scripts/smoke.sh +58 -2
- package/plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs +25 -1
- package/plugins/ruflo-metaharness/scripts/test-similarity.mjs +38 -0
- package/plugins/ruflo-metaharness/scripts/threat-model.mjs +4 -1
- package/plugins/ruflo-metaharness/skills/harness-genome/SKILL.md +5 -2
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
} from './_similarity.mjs';
|
|
27
27
|
// iter 64 — also test the iter-63 shared severity primitives
|
|
28
28
|
import { SEVERITY_RANK, rankSeverity, parseMcpScanText } from './_harness.mjs';
|
|
29
|
+
import { parseTrailingJson } from './_invoke.mjs';
|
|
29
30
|
|
|
30
31
|
const ARGS = (() => {
|
|
31
32
|
const a = { format: 'table' };
|
|
@@ -273,6 +274,22 @@ assert(single.summary?.overallSeverity === 'info',
|
|
|
273
274
|
assert(single.summary?.totalCount === 1,
|
|
274
275
|
'summary.totalCount === 1 from "(1 finding,"');
|
|
275
276
|
|
|
277
|
+
// Newer metaharness releases align severity labels to a fixed-width column.
|
|
278
|
+
// Keep parsing the legacy compact form above while accepting `[LOW ]`.
|
|
279
|
+
const padded = parseMcpScanText(`harness mcp-scan — /repo
|
|
280
|
+
|
|
281
|
+
[LOW ] 8 unpinned dependency range(s)
|
|
282
|
+
Floating ranges weaken supply-chain reproducibility.
|
|
283
|
+
|
|
284
|
+
Result: LOW (1 finding, 0 high)
|
|
285
|
+
`);
|
|
286
|
+
assert(padded.findings.length === 1, 'padded [LOW ] block → 1 finding');
|
|
287
|
+
assert(padded.findings[0].severity === 'low',
|
|
288
|
+
'padded severity lowercased without trailing whitespace');
|
|
289
|
+
assert(padded.findings[0].message.includes('8 unpinned dependency range(s)') &&
|
|
290
|
+
padded.findings[0].message.includes('supply-chain reproducibility'),
|
|
291
|
+
'padded finding message and continuation extracted');
|
|
292
|
+
|
|
276
293
|
// Continuation line — indented text appends to previous finding
|
|
277
294
|
const cont = parseMcpScanText(`
|
|
278
295
|
[HIGH] Exposed credential path
|
|
@@ -314,6 +331,27 @@ assert(mixed.findings.length === 1,
|
|
|
314
331
|
assert(mixed.findings[0].severity === 'high',
|
|
315
332
|
'strict regex captured the uppercase entry');
|
|
316
333
|
|
|
334
|
+
console.log('\nPhase 11 — complete trailing JSON extraction');
|
|
335
|
+
|
|
336
|
+
const nestedJson = parseTrailingJson(`progress: scanning {not-json}
|
|
337
|
+
{
|
|
338
|
+
"dir": "/repo",
|
|
339
|
+
"findings": [
|
|
340
|
+
{ "id": "allow-shell", "severity": "high" },
|
|
341
|
+
{ "id": "no-audit-log", "severity": "medium" }
|
|
342
|
+
],
|
|
343
|
+
"worst": "high"
|
|
344
|
+
}
|
|
345
|
+
`);
|
|
346
|
+
assert(nestedJson?.dir === '/repo', 'mixed stdout returns root JSON object');
|
|
347
|
+
assert(nestedJson?.findings?.length === 2,
|
|
348
|
+
'nested findings remain attached to root payload');
|
|
349
|
+
assert(nestedJson?.findings?.[1]?.id === 'no-audit-log',
|
|
350
|
+
'extractor does not return the last nested object');
|
|
351
|
+
assert(nestedJson?.worst === 'high', 'root-level severity is preserved');
|
|
352
|
+
assert(parseTrailingJson('progress only {not-json}') === null,
|
|
353
|
+
'non-JSON progress braces return null');
|
|
354
|
+
|
|
317
355
|
// ──────────────────────────────────────────────────────────────────
|
|
318
356
|
const summary = {
|
|
319
357
|
passed, failed,
|
|
@@ -26,7 +26,10 @@ function main() {
|
|
|
26
26
|
}
|
|
27
27
|
const r = runHarness(['threat-model', ARGS.path]);
|
|
28
28
|
if (r.degraded) { emitDegradedJsonAndExit(r.reason); return; }
|
|
29
|
-
|
|
29
|
+
// Upstream uses exit 2 for a valid HIGH verdict. A parsed JSON payload is
|
|
30
|
+
// authoritative regardless of that domain exit code; only reject a
|
|
31
|
+
// non-zero invocation when it produced no structured result.
|
|
32
|
+
if (!r.json && r.exitCode !== 0 && r.exitCode !== 1) {
|
|
30
33
|
console.error(`threat-model: harness exited ${r.exitCode}`);
|
|
31
34
|
if (r.stderr) console.error(r.stderr.slice(0, 400));
|
|
32
35
|
process.exit(2);
|
|
@@ -17,8 +17,11 @@ Implementation: [`scripts/genome.mjs`](../../scripts/genome.mjs).
|
|
|
17
17
|
1. Shell out to `npx metaharness genome <path> --json` (60s hard timeout).
|
|
18
18
|
2. Parse the shape: `{ repo_type, agent_topology[], risk_score,
|
|
19
19
|
mcp_surface, test_confidence, publish_readiness }`.
|
|
20
|
-
3.
|
|
21
|
-
|
|
20
|
+
3. Preserve upstream's readiness verdict as `verdict` and
|
|
21
|
+
`verdictExitCode`. Upstream exits 1 for `needs-work` and 2 for `blocked`;
|
|
22
|
+
these are valid reports, so the wrapper returns them successfully.
|
|
23
|
+
4. If `--alert-on-risk-above N`: exit 1 when `risk_score > N`.
|
|
24
|
+
5. Output JSON (default) or markdown.
|
|
22
25
|
|
|
23
26
|
## Phase-0 baseline (ruflo, measured 2026-06-16)
|
|
24
27
|
|