@claude-flow/cli 3.45.0 → 3.46.1
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/README.md +2 -0
- package/bin/cli.js +13 -0
- package/bin/mcp-server.js +16 -0
- package/catalog-manifest.json +2 -2
- package/dist/src/commands/doctor.d.ts +3 -0
- package/dist/src/commands/doctor.js +131 -2
- package/dist/src/commands/embeddings.js +50 -7
- package/dist/src/commands/init.js +5 -2
- package/dist/src/commands/mcp.js +27 -4
- package/dist/src/mcp-server.d.ts +50 -6
- package/dist/src/mcp-server.js +267 -33
- package/dist/src/mcp-tools/agent-execute-core.js +7 -0
- package/dist/src/mcp-tools/agentdb-tools.js +20 -8
- package/dist/src/mcp-tools/browser-tools.js +59 -48
- package/dist/src/mcp-tools/memory-tools.js +9 -4
- package/dist/src/mcp-tools/metaharness-tools.js +1 -1
- package/dist/src/mcp-tools/policy-enforcer.d.ts +4 -4
- package/dist/src/mcp-tools/policy-enforcer.js +4 -4
- package/dist/src/mcp-tools/terminal-tools.js +11 -1
- package/dist/src/mcp-tools/workflow-tools.js +1 -1
- package/dist/src/memory/ewc-consolidation.d.ts +16 -1
- package/dist/src/memory/ewc-consolidation.js +63 -13
- package/dist/src/memory/intelligence.d.ts +6 -2
- package/dist/src/memory/intelligence.js +18 -11
- package/dist/src/memory/memory-bridge.js +84 -0
- package/dist/src/runtime/browser-command.d.ts +29 -0
- package/dist/src/runtime/browser-command.js +101 -0
- package/dist/src/ruvector/model-router.js +19 -1
- package/dist/src/services/distill-oracle.js +2 -1
- package/dist/src/services/git-workspace-identity.js +5 -8
- package/dist/src/services/policy-runtime.js +114 -4
- package/dist/src/services/worker-daemon.js +8 -3
- package/node_modules/@claude-flow/codex/dist/cli.js +0 -0
- package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.d.ts.map +1 -1
- package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.js +2 -6
- package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.js.map +1 -1
- package/node_modules/@claude-flow/mcp/dist/transport/http.d.ts.map +1 -1
- package/node_modules/@claude-flow/mcp/dist/transport/http.js +14 -1
- package/node_modules/@claude-flow/mcp/dist/transport/http.js.map +1 -1
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/planner-descriptor.d.ts +40 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/planner-descriptor.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/planner-descriptor.js +100 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/planner-descriptor.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.js +0 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/index.d.ts +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/index.d.ts.map +1 -1
- package/node_modules/@claude-flow/plugin-agent-federation/dist/index.js +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/index.js.map +1 -1
- package/node_modules/@claude-flow/plugin-agent-federation/package.json +1 -0
- package/node_modules/@claude-flow/security/dist/input-validator.d.ts +6 -6
- package/node_modules/@claude-flow/security/dist/safe-git.d.ts +22 -0
- package/node_modules/@claude-flow/security/dist/safe-git.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/safe-git.js +63 -0
- package/node_modules/@claude-flow/security/dist/safe-git.js.map +1 -0
- package/package.json +5 -5
- package/plugins/ruflo-metaharness/agents/metaharness-architect.md +1 -1
- package/plugins/ruflo-metaharness/commands/ruflo-metaharness.md +1 -1
- package/plugins/ruflo-metaharness/scripts/_darwin.mjs +84 -12
- package/plugins/ruflo-metaharness/scripts/_harness.mjs +10 -4
- package/plugins/ruflo-metaharness/scripts/_invoke.mjs +120 -6
- package/plugins/ruflo-metaharness/scripts/_redblue.mjs +33 -6
- package/plugins/ruflo-metaharness/scripts/audit-list.mjs +11 -10
- package/plugins/ruflo-metaharness/scripts/audit-trend.mjs +8 -7
- package/plugins/ruflo-metaharness/scripts/drift-from-history.mjs +2 -3
- package/plugins/ruflo-metaharness/scripts/oia-audit.mjs +8 -7
- package/plugins/ruflo-metaharness/scripts/similarity.mjs +9 -8
- package/plugins/ruflo-metaharness/scripts/smoke.sh +31 -0
- package/plugins/ruflo-metaharness/scripts/test-no-tool-time-npx.mjs +319 -0
- package/plugins/ruflo-metaharness/scripts/test-pin-alignment.mjs +182 -0
- package/plugins/ruflo-metaharness/skills/harness-evolve/SKILL.md +4 -2
- package/plugins/ruflo-metaharness/skills/harness-gepa/SKILL.md +1 -1
- package/plugins/ruflo-metaharness/skills/harness-learn/SKILL.md +1 -1
- package/plugins/ruflo-metaharness/skills/harness-mcp-scan/SKILL.md +1 -1
- package/plugins/ruflo-metaharness/skills/harness-score/SKILL.md +1 -1
- package/plugins/ruflo-metaharness/skills/harness-security-bench/SKILL.md +3 -1
- package/plugins/ruflo-metaharness/skills/harness-threat-model/SKILL.md +1 -1
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// test-pin-alignment.mjs — regression test for plugin helper pins that
|
|
3
|
+
// drifted away from the ranges @claude-flow/cli declares (#3366).
|
|
4
|
+
//
|
|
5
|
+
// THE BUG
|
|
6
|
+
// The plugin helpers carry their own tilde pins (_harness.mjs
|
|
7
|
+
// METAHARNESS_PIN_VERSION, _darwin.mjs DARWIN_PIN_VERSION). Those pins decide
|
|
8
|
+
// which INSTALLED copy `findLocalPackageDir()` accepts. They sat at ~0.3.0 /
|
|
9
|
+
// ~0.8.0 while v3/@claude-flow/cli/package.json declared metaharness ^0.4.1 and
|
|
10
|
+
// @metaharness/darwin ~0.10.2, so on a normal ruflo install every
|
|
11
|
+
// metaharness_* tool call rejected the copy ruflo ships and ran
|
|
12
|
+
// `npm install --prefix ~/.ruflo/metaharness-cache-0.3.0 metaharness@~0.3.0`
|
|
13
|
+
// at TOOL-CALL time (a network download of an older release; `degraded` when
|
|
14
|
+
// offline). scripts/check-metaharness-pins.mjs compared only the CLI's ranges,
|
|
15
|
+
// so nothing noticed.
|
|
16
|
+
//
|
|
17
|
+
// WHAT THIS TEST PROVES (hermetic — no network, no real MetaHarness package)
|
|
18
|
+
// Phase 1 each helper pin accepts the declared range's floor AND a later
|
|
19
|
+
// patch in it, using the same `satisfiesTildeRange()` predicate
|
|
20
|
+
// findLocalPackageDir() applies at runtime.
|
|
21
|
+
// Phase 2 end-to-end in the PUBLISHED layout
|
|
22
|
+
// (<prefix>/node_modules/@claude-flow/cli/plugins/ruflo-metaharness/
|
|
23
|
+
// scripts, next to <prefix>/node_modules/metaharness at the declared
|
|
24
|
+
// floor version): metaharnessResolution() reports source 'local',
|
|
25
|
+
// score.mjs returns the installed copy's output, and NOT ONE
|
|
26
|
+
// npm / npx process is spawned (a PATH trap logs any attempt).
|
|
27
|
+
// The scripts are copied into that layout because resolution walks up from
|
|
28
|
+
// the helper's own directory; in the repo checkout (plugins/ at the repo
|
|
29
|
+
// root) the walk never reaches an installed CLI's node_modules.
|
|
30
|
+
//
|
|
31
|
+
// USAGE
|
|
32
|
+
// node plugins/ruflo-metaharness/scripts/test-pin-alignment.mjs
|
|
33
|
+
//
|
|
34
|
+
// EXIT CODES
|
|
35
|
+
// 0 all assertions passed (or skipped on win32 — the trap is POSIX sh)
|
|
36
|
+
// 1 at least one assertion failed
|
|
37
|
+
// 2 setup error
|
|
38
|
+
|
|
39
|
+
import { spawnSync } from 'node:child_process';
|
|
40
|
+
import { chmodSync, copyFileSync, existsSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, realpathSync, rmSync, writeFileSync } from 'node:fs';
|
|
41
|
+
import { tmpdir } from 'node:os';
|
|
42
|
+
import { dirname, join } from 'node:path';
|
|
43
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
44
|
+
|
|
45
|
+
const SCRIPTS_DIR = dirname(fileURLToPath(import.meta.url));
|
|
46
|
+
const CLI_PKG_JSON = join(SCRIPTS_DIR, '..', '..', '..', 'v3', '@claude-flow', 'cli', 'package.json');
|
|
47
|
+
|
|
48
|
+
if (process.platform === 'win32') {
|
|
49
|
+
console.log('# test-pin-alignment — SKIPPED on win32 (the npm/npx trap is a POSIX sh script)');
|
|
50
|
+
process.exit(0);
|
|
51
|
+
}
|
|
52
|
+
if (!existsSync(CLI_PKG_JSON)) {
|
|
53
|
+
console.error(`test-pin-alignment: ${CLI_PKG_JSON} not found — run from a ruflo repo checkout`);
|
|
54
|
+
process.exit(2);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
let passed = 0, failed = 0;
|
|
58
|
+
const failures = [];
|
|
59
|
+
function assert(cond, label) {
|
|
60
|
+
console.log(` ${cond ? '✓' : '✗'} ${label}`);
|
|
61
|
+
if (cond) passed++;
|
|
62
|
+
else { failures.push(label); failed++; }
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Same lookup order as scripts/check-metaharness-pins.mjs. */
|
|
66
|
+
function declaredRange(pkgJson, name) {
|
|
67
|
+
for (const where of ['dependencies', 'optionalDependencies', 'peerDependencies']) {
|
|
68
|
+
if (pkgJson[where]?.[name]) return pkgJson[where][name];
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
function floorOf(range) {
|
|
73
|
+
const m = /^[~^]?(\d+)\.(\d+)\.(\d+)/.exec(String(range));
|
|
74
|
+
return m ? [Number(m[1]), Number(m[2]), Number(m[3])] : null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const cliPkg = JSON.parse(readFileSync(CLI_PKG_JSON, 'utf-8'));
|
|
78
|
+
const { satisfiesTildeRange } = await import(pathToFileURL(join(SCRIPTS_DIR, '_invoke.mjs')).href);
|
|
79
|
+
const { METAHARNESS_VERSION_PIN } = await import(pathToFileURL(join(SCRIPTS_DIR, '_harness.mjs')).href);
|
|
80
|
+
const { DARWIN_VERSION_PIN } = await import(pathToFileURL(join(SCRIPTS_DIR, '_darwin.mjs')).href);
|
|
81
|
+
const pinOf = (full) => full.slice(full.lastIndexOf('@') + 1);
|
|
82
|
+
|
|
83
|
+
console.log('# test-pin-alignment\n');
|
|
84
|
+
|
|
85
|
+
// ──────────────────────────────────────────────────────────────────────
|
|
86
|
+
// Phase 1 — every helper pin accepts what the CLI declares
|
|
87
|
+
// ──────────────────────────────────────────────────────────────────────
|
|
88
|
+
console.log('Phase 1 — helper pins accept the versions @claude-flow/cli declares');
|
|
89
|
+
const PINS = [
|
|
90
|
+
{ pkg: 'metaharness', helper: '_harness.mjs', pin: pinOf(METAHARNESS_VERSION_PIN) },
|
|
91
|
+
{ pkg: '@metaharness/darwin', helper: '_darwin.mjs', pin: pinOf(DARWIN_VERSION_PIN) },
|
|
92
|
+
];
|
|
93
|
+
const floors = {};
|
|
94
|
+
for (const p of PINS) {
|
|
95
|
+
const declared = declaredRange(cliPkg, p.pkg);
|
|
96
|
+
const floor = floorOf(declared);
|
|
97
|
+
assert(!!floor, `${p.pkg}: declared in v3/@claude-flow/cli/package.json (got ${declared})`);
|
|
98
|
+
if (!floor) continue;
|
|
99
|
+
floors[p.pkg] = floor.join('.');
|
|
100
|
+
const laterPatch = [floor[0], floor[1], floor[2] + 100].join('.');
|
|
101
|
+
assert(satisfiesTildeRange(floors[p.pkg], p.pin),
|
|
102
|
+
`${p.helper} pin ${p.pin} accepts ${floors[p.pkg]} (floor of declared ${declared})`);
|
|
103
|
+
assert(satisfiesTildeRange(laterPatch, p.pin),
|
|
104
|
+
`${p.helper} pin ${p.pin} accepts ${laterPatch} (a later patch inside declared ${declared})`);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// ──────────────────────────────────────────────────────────────────────
|
|
108
|
+
// Phase 2 — published layout: the installed copy is used, nothing downloads
|
|
109
|
+
// ──────────────────────────────────────────────────────────────────────
|
|
110
|
+
console.log('\nPhase 2 — published layout resolves the installed metaharness without npm/npx');
|
|
111
|
+
// realpath: macOS tmpdir() is /var/… while resolved paths come back as /private/var/…
|
|
112
|
+
const TMP = realpathSync(mkdtempSync(join(tmpdir(), 'ruflo-pin-alignment-')));
|
|
113
|
+
try {
|
|
114
|
+
const NM = join(TMP, 'node_modules');
|
|
115
|
+
const PLUGIN_SCRIPTS = join(NM, '@claude-flow', 'cli', 'plugins', 'ruflo-metaharness', 'scripts');
|
|
116
|
+
mkdirSync(PLUGIN_SCRIPTS, { recursive: true });
|
|
117
|
+
for (const f of readdirSync(SCRIPTS_DIR)) {
|
|
118
|
+
if (f.endsWith('.mjs')) copyFileSync(join(SCRIPTS_DIR, f), join(PLUGIN_SCRIPTS, f));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Stub `metaharness` at the declared floor: both bins echo a marker JSON.
|
|
122
|
+
const mhVersion = floors.metaharness ?? '0.0.0';
|
|
123
|
+
const MH = join(NM, 'metaharness');
|
|
124
|
+
mkdirSync(join(MH, 'dist'), { recursive: true });
|
|
125
|
+
writeFileSync(join(MH, 'package.json'), JSON.stringify({
|
|
126
|
+
name: 'metaharness', version: mhVersion, type: 'module',
|
|
127
|
+
bin: { metaharness: 'dist/bin.js', harness: 'dist/harness-bin.js' },
|
|
128
|
+
}, null, 2));
|
|
129
|
+
for (const [file, bin] of [['bin.js', 'metaharness'], ['harness-bin.js', 'harness']]) {
|
|
130
|
+
writeFileSync(join(MH, 'dist', file),
|
|
131
|
+
`console.log(JSON.stringify({ stub: '${bin}', version: '${mhVersion}', argv: process.argv.slice(2) }));\n`);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// npm / npx trap: log the attempt, fail like an offline machine would.
|
|
135
|
+
const TRAP = join(TMP, 'trap-bin');
|
|
136
|
+
const TRAP_LOG = join(TMP, 'trap.log');
|
|
137
|
+
mkdirSync(TRAP);
|
|
138
|
+
for (const t of ['npm', 'npx']) {
|
|
139
|
+
writeFileSync(join(TRAP, t), `#!/bin/sh\nprintf '%s %s\\n' "${t}" "$*" >> "${TRAP_LOG}"\necho "npm ERR! ${t} blocked by test-pin-alignment trap" >&2\nexit 1\n`);
|
|
140
|
+
chmodSync(join(TRAP, t), 0o755);
|
|
141
|
+
}
|
|
142
|
+
const PROJECT = join(TMP, 'project');
|
|
143
|
+
mkdirSync(PROJECT);
|
|
144
|
+
const env = {
|
|
145
|
+
...process.env,
|
|
146
|
+
PATH: `${TRAP}:${process.env.PATH}`,
|
|
147
|
+
RUFLO_METAHARNESS_CACHE_BASE: join(TMP, 'empty-cache-base'),
|
|
148
|
+
};
|
|
149
|
+
delete env.RUFLO_METAHARNESS_SKIP_LOCAL;
|
|
150
|
+
const run = (args) => spawnSync(process.execPath, args, { cwd: PROJECT, env, encoding: 'utf-8', timeout: 60_000 });
|
|
151
|
+
|
|
152
|
+
const probe = run(['--input-type=module', '-e',
|
|
153
|
+
`const m = await import(${JSON.stringify(pathToFileURL(join(PLUGIN_SCRIPTS, '_harness.mjs')).href)});` +
|
|
154
|
+
'console.log(JSON.stringify(m.metaharnessResolution()));']);
|
|
155
|
+
let resolution = null;
|
|
156
|
+
try { resolution = JSON.parse(probe.stdout.trim().split('\n').pop()); } catch { /* asserted below */ }
|
|
157
|
+
assert(resolution?.ok === true && resolution?.source === 'local',
|
|
158
|
+
`metaharnessResolution() → source 'local' (got ${JSON.stringify(resolution)})`);
|
|
159
|
+
assert(typeof resolution?.bins?.metaharness === 'string' && resolution.bins.metaharness.startsWith(MH),
|
|
160
|
+
'resolved metaharness bin is the installed copy next to @claude-flow/cli');
|
|
161
|
+
|
|
162
|
+
const score = run([join(PLUGIN_SCRIPTS, 'score.mjs'), '--path', PROJECT, '--format', 'json']);
|
|
163
|
+
let payload = null;
|
|
164
|
+
try { payload = JSON.parse(score.stdout); } catch { /* asserted below */ }
|
|
165
|
+
assert(score.status === 0, `score.mjs exits 0 (got ${score.status})`);
|
|
166
|
+
assert(payload?.degraded !== true, `score.mjs is not degraded (reason: ${payload?.reason ?? 'none'})`);
|
|
167
|
+
assert(payload?.stub === 'metaharness' && payload?.version === mhVersion,
|
|
168
|
+
`score.mjs ran the installed metaharness ${mhVersion}`);
|
|
169
|
+
|
|
170
|
+
const trapped = existsSync(TRAP_LOG) ? readFileSync(TRAP_LOG, 'utf-8').trim() : '';
|
|
171
|
+
assert(trapped === '', `no npm / npx process spawned${trapped ? ` (got: ${trapped.split('\n')[0]})` : ''}`);
|
|
172
|
+
} finally {
|
|
173
|
+
rmSync(TMP, { recursive: true, force: true });
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
console.log(`\n${passed} passed, ${failed} failed`);
|
|
177
|
+
if (failed > 0) {
|
|
178
|
+
console.log('\nFailures:');
|
|
179
|
+
for (const f of failures) console.log(` - ${f}`);
|
|
180
|
+
process.exit(1);
|
|
181
|
+
}
|
|
182
|
+
console.log('\n✓ Plugin helper pins accept the versions @claude-flow/cli declares; no tool-time download.');
|
|
@@ -35,8 +35,10 @@ Implementation: [`scripts/evolve.mjs`](../../scripts/evolve.mjs).
|
|
|
35
35
|
≤ 20, `--concurrency` ≤ 8, sandbox/selection/mutator are known values).
|
|
36
36
|
2. Without `--confirm`: print plan + exit 0 (mirrors `harness-mint` safety
|
|
37
37
|
convention; defense in depth over the upstream `safety.ts` checks).
|
|
38
|
-
3. With `--confirm`:
|
|
39
|
-
|
|
38
|
+
3. With `--confirm`: run `metaharness-darwin evolve <repo> ...` from the installed
|
|
39
|
+
`@metaharness/darwin` (pin in `_darwin.mjs`; one-time `~/.ruflo/darwin-cache-<pin>`
|
|
40
|
+
install only if no installed copy qualifies — never npx) via the shared
|
|
41
|
+
`_darwin.mjs` async helper. Per-generation progress is
|
|
40
42
|
forwarded to stderr; final champion JSON is captured from stdout.
|
|
41
43
|
4. Compute timeout from `generations × children × per-variant` (per-variant
|
|
42
44
|
≈ 60s real, ≈ 2s mock). Caller may override with `--timeout-ms`.
|
|
@@ -39,7 +39,7 @@ cross a subprocess boundary. Two supported paths instead:
|
|
|
39
39
|
Implementation: [`scripts/gepa.mjs`](../../scripts/gepa.mjs).
|
|
40
40
|
|
|
41
41
|
1. `import('@metaharness/darwin/gepa')`; on MODULE_NOT_FOUND fall back to a
|
|
42
|
-
one-time `npm install --prefix ~/.ruflo/darwin-cache
|
|
42
|
+
one-time `npm install --prefix ~/.ruflo/darwin-cache-<pin>` and import
|
|
43
43
|
the cached `dist/gepa/index.js` (versioned dir → pin bumps invalidate).
|
|
44
44
|
2. Dispatch `--op`:
|
|
45
45
|
- `genome` → `loadGenome(fs, path)` or `loadCand6Genome()` + `validateGenome`
|
|
@@ -41,7 +41,7 @@ ADR-235 follow-up and not available yet.
|
|
|
41
41
|
Implementation: [`scripts/learn.mjs`](../../scripts/learn.mjs).
|
|
42
42
|
|
|
43
43
|
1. Validate `--repo` exists when given; export it as `$METAHARNESS_REPO`.
|
|
44
|
-
2. Invoke the pinned `metaharness` binary (`metaharness@~0.
|
|
44
|
+
2. Invoke the pinned `metaharness` binary (`metaharness@~0.4.1`, local install
|
|
45
45
|
or one-time versioned cache — never `@latest`): `metaharness learn --host <h>
|
|
46
46
|
--model <m> --slice <s> [--run]` via `_harness.mjs` (graceful degradation,
|
|
47
47
|
hard timeout).
|
|
@@ -13,7 +13,7 @@ tool; pure static analysis.
|
|
|
13
13
|
|
|
14
14
|
Implementation: [`scripts/mcp-scan.mjs`](../../scripts/mcp-scan.mjs).
|
|
15
15
|
|
|
16
|
-
1. Invoke the pinned `harness` binary (`metaharness@~0.
|
|
16
|
+
1. Invoke the pinned `harness` binary (`metaharness@~0.4.1`, resolved from a
|
|
17
17
|
local install or the one-time `~/.ruflo/metaharness-cache-<pin>` cache —
|
|
18
18
|
never `@latest`): `harness mcp-scan <path> --json`.
|
|
19
19
|
2. Parse `findings[]` with `{ severity, id, server, tool, message }`.
|
|
@@ -58,7 +58,7 @@ no network, registry unreachable), the script emits:
|
|
|
58
58
|
{
|
|
59
59
|
"degraded": true,
|
|
60
60
|
"reason": "metaharness-not-available",
|
|
61
|
-
"hint": "Install with `npm i -D metaharness@~0.
|
|
61
|
+
"hint": "Install with `npm i -D metaharness@~0.4.1` (pinned range — this plugin never fetches @latest) or verify network access for the one-time cache install."
|
|
62
62
|
}
|
|
63
63
|
```
|
|
64
64
|
|
|
@@ -29,7 +29,9 @@ ground-truth set. Running this nightly gives us:
|
|
|
29
29
|
|
|
30
30
|
Implementation: [`scripts/security-bench.mjs`](../../scripts/security-bench.mjs).
|
|
31
31
|
|
|
32
|
-
1.
|
|
32
|
+
1. Run `metaharness-darwin security bench --population N --cycles N [--seed S]` from the
|
|
33
|
+
installed `@metaharness/darwin` (pin in `_darwin.mjs`; one-time cache install only if
|
|
34
|
+
no installed copy qualifies — never npx).
|
|
33
35
|
2. Default timeout = `3s × 19 evaluations × population × cycles + 30s overhead`.
|
|
34
36
|
At default `--population 2 --cycles 1` ≈ 144s; at `--population 4 --cycles 3` ≈ 12 min.
|
|
35
37
|
3. Parse the markdown report — overall PASS/FAIL plus per-gate
|
|
@@ -13,7 +13,7 @@ categorized report suitable for sharing with an InfoSec team.
|
|
|
13
13
|
|
|
14
14
|
Implementation: [`scripts/threat-model.mjs`](../../scripts/threat-model.mjs).
|
|
15
15
|
|
|
16
|
-
1. Invoke the pinned `harness` binary (`metaharness@~0.
|
|
16
|
+
1. Invoke the pinned `harness` binary (`metaharness@~0.4.1`, resolved from a
|
|
17
17
|
local install or the one-time `~/.ruflo/metaharness-cache-<pin>` cache —
|
|
18
18
|
never `@latest`): `harness threat-model <path> --json`.
|
|
19
19
|
2. Parse `{ worst, findings[] }`.
|