🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
feat: review-driven upgrades — perf, security, SOTA capabilities (6-agent concurrent implementation) (#2547)
rUvd01204280098
diff --git a/.github/workflows/no-metaharness-smoke.yml b/.github/workflows/no-metaharness-smoke.ymlindex 3e2f79c5a2..7858c0a9aa 100644--- a/.github/workflows/no-metaharness-smoke.yml+++ b/.github/workflows/no-metaharness-smoke.yml@@ -102,6 +102,14 @@ jobs:export npm_config_registry=https://no-such-registry-9c8c43.example.invalid/# Disable network-cache to ensure the npx miss is freshexport NPX_NO_LOCAL=1+ # Since the pinned-cache resolution (_invoke.mjs), skills no longer+ # go through npx: they resolve locally-installed metaharness first,+ # then a versioned ~/.ruflo cache. Both defeat this drill's absence+ # simulation (metaharness IS installed in the CI workspace, and the+ # meta-smoke step above warms the cache). Use the purpose-built test+ # seams so "absent" means absent again:+ export RUFLO_METAHARNESS_SKIP_LOCAL=1+ export RUFLO_METAHARNESS_CACHE_BASE="$(mktemp -d)/empty-cache-root"# iter 55 — expanded from 4 to 7 skills. The new entries are:# oia-audit (composite, calls all 5 sub-skills), mint (scaffoldsdiff --git a/.gitignore b/.gitignoreindex a8535c3eb8..39ce8bc185 100644--- a/.gitignore+++ b/.gitignore@@ -168,3 +168,6 @@ hive-mind-prompt-*.txt.env.*!.env.example!.env.*.example++# Publish-artifact mirror — regenerated by prepublishOnly (package.json:90); never edit or commit+v3/@claude-flow/cli/plugins/diff --git a/package-lock.json b/package-lock.jsonindex 2bef60559a..2b758f297b 100644--- a/package-lock.json+++ b/package-lock.json@@ -210,9 +210,9 @@"license": "MIT"},"node_modules/@claude-flow/memory": {- "version": "3.0.0-alpha.17",- "resolved": "https://registry.npmjs.org/@claude-flow/memory/-/memory-3.0.0-alpha.17.tgz",- "integrity": "sha512-zoK7WhRfb+YKub3KehW9mCgBPQLrLmmVMukq/STOmUL2+SUA7MURjAc5NtOq8ViL8qJParctayDxKS+ZBq477Q==",+ "version": "3.0.0-alpha.21",+ "resolved": "https://registry.npmjs.org/@claude-flow/memory/-/memory-3.0.0-alpha.21.tgz",+ "integrity": "sha512-5H5rJOh7nGuzmFazTvJWZIbeZvf+HJjonM98vWijzbL4kQvBDWj6zwhsxQ3wrwJSrs5ALgQQmhxQ7Mr+gagAFw==","cpu": ["x64","arm64"@@ -223,7 +223,7 @@"win32"],"dependencies": {- "agentdb": "^3.0.0-alpha.10",+ "agentdb": "^3.0.0-alpha.16","sql.js": "^1.10.3"},"optionalDependencies": {@@ -244,9 +244,9 @@}},"node_modules/@claude-flow/plugin-gastown-bridge": {- "version": "0.1.3",- "resolved": "https://registry.npmjs.org/@claude-flow/plugin-gastown-bridge/-/plugin-gastown-bridge-0.1.3.tgz",- "integrity": "sha512-ZHqtgiZOIa0lHelPZ8AWeiW99a84t5PmMY2U90Jp5Iqd/m/P2VIAY0CmHAWEPo1oomTu0NulJFtoblto8K9U9w==",+ "version": "0.1.4",+ "resolved": "https://registry.npmjs.org/@claude-flow/plugin-gastown-bridge/-/plugin-gastown-bridge-0.1.4.tgz",+ "integrity": "sha512-MSxrTGkQoSlt6rcgg7p3/oayuvDH8uD2411ysrzitHThwCapW1f/SWNaN3gF0MHC6TIduuk611r2tXAtesJdrA==","license": "MIT","optional": true,"dependencies": {@@ -1380,6 +1380,37 @@"url": "https://opencollective.com/js-sdsl"}},+ "node_modules/@metaharness/darwin": {+ "version": "0.7.1",+ "resolved": "https://registry.npmjs.org/@metaharness/darwin/-/darwin-0.7.1.tgz",+ "integrity": "sha512-J9Y9kg5qpRgI8j/c2uwOTuFt38l0dIYdJ+tEKZFXQtyOiYPBt+vgymDMZaKjye08WR1j4Ow0M0iGNLnUoPXeFQ==",+ "license": "MIT",+ "optional": true,+ "bin": {+ "metaharness-darwin": "dist/cli.js"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },+ "node_modules/@metaharness/router": {+ "version": "0.3.2",+ "resolved": "https://registry.npmjs.org/@metaharness/router/-/router-0.3.2.tgz",+ "integrity": "sha512-LQElU6mUrWd3ffJ5bwoonEIgw7oFQZpwZaehffyl/Pg+iozpRjIBPEXdb4uTOBnKH+yPiTEWKc+h9AiZr9Os9w==",+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=20.0.0"+ },+ "peerDependencies": {+ "@ruvector/tiny-dancer": "^0.1.21"+ },+ "peerDependenciesMeta": {+ "@ruvector/tiny-dancer": {+ "optional": true+ }+ }+ },"node_modules/@modelcontextprotocol/sdk": {"version": "1.27.1","resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.27.1.tgz",@@ -1547,9 +1578,9 @@}},"node_modules/@opentelemetry/api-logs": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.218.0.tgz",- "integrity": "sha512-fmEWp5kXlGEc3i/lR698Hz41DfGyN4Tbe4g7L1AxSc7fF8Xeh/FQ9Quqpa9dVA413Q1Ad43QOLzU4JoXgbFPWw==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.220.0.tgz",+ "integrity": "sha512-CmVa4ImJ+ynfrPMNaAXHET6Bhb44SwzmfyVJFq9ni2jgXJR/l7C6gfVFddNmHP+ZOkP9cf4f9DBe68qVLTHc9w==","license": "Apache-2.0","optional": true,"dependencies": {@@ -1560,14 +1591,14 @@}},"node_modules/@opentelemetry/configuration": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/configuration/-/configuration-0.218.0.tgz",- "integrity": "sha512-W8wIz7H2R1pufR5jfjb3gU2XkMpm2x/7b1RJcsuzvd70Il/rWWE+g5/Od7hQKrxRTSrTrOWlru101PWXz5I1EQ==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/configuration/-/configuration-0.220.0.tgz",+ "integrity": "sha512-glfIVKnZevRin8fY/9uES/mhRtMT1lGINLHc9MIo5fTQZXswEEHamJtgjv4MTtzgnhHGC92mIS/0lzAUZMyE0w==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/core": "2.7.1",- "yaml": "^2.0.0"+ "@opentelemetry/core": "2.9.0",+ "yaml": "^2.8.3"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1577,9 +1608,9 @@}},"node_modules/@opentelemetry/context-async-hooks": {- "version": "2.7.1",- "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.7.1.tgz",- "integrity": "sha512-OPFBYuXEn1E4ja3Y6eeA7O+ZnLBNcXTV5Cgsn1VaqBZ6hC5FnpZPLBNme1LJY8ZtF4aOujPKFoeWN4ik487KuQ==",+ "version": "2.9.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.9.0.tgz",+ "integrity": "sha512-OQ0vzvbZBiUhjqLnUaoNfYmP8553Crr3aggB4y0ZUi815mZ7idpdJXQmoKdeBKJelYttoBlLSSHubmyw3wvX4w==","license": "Apache-2.0","optional": true,"engines": {@@ -1590,44 +1621,34 @@}},"node_modules/@opentelemetry/core": {- "version": "1.25.1",- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.25.1.tgz",- "integrity": "sha512-GeT/l6rBYWVQ4XArluLVB6WWQ8flHbdb6r2FCHC3smtdOAbrJBIv35tpV/yp9bmYUJf+xmZpu9DRTIeJVhFbEQ==",+ "version": "2.9.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.9.0.tgz",+ "integrity": "sha512-m2nckMT80NnmjTYSPjJQObBJ+8dgkoajEOUbznL8AHZ3T3yHRk2P7gI1PhEBc1+lOnrYE9UWrWHqJDsmqjmNbw==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/semantic-conventions": "1.25.1"+ "@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {- "node": ">=14"+ "node": "^18.19.0 || >=20.6.0"},"peerDependencies": {"@opentelemetry/api": ">=1.0.0 <1.10.0"}},- "node_modules/@opentelemetry/core/node_modules/@opentelemetry/semantic-conventions": {- "version": "1.25.1",- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz",- "integrity": "sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ==",- "license": "Apache-2.0",- "optional": true,- "engines": {- "node": ">=14"- }- },"node_modules/@opentelemetry/exporter-logs-otlp-grpc": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-grpc/-/exporter-logs-otlp-grpc-0.218.0.tgz",- "integrity": "sha512-hoxrNH1l/Xy6F9WTJ5IK+6j1r9nQFlPOmrnTlhYHTySdunfXLmUCPv3bQtKYntxag9h3wLYBZQ2HI6FOx+BT2g==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-grpc/-/exporter-logs-otlp-grpc-0.220.0.tgz",+ "integrity": "sha512-s0sRPCSlXYqlgObOpCftomJllp3LfUL9FobQ5csg2172ydVhSEnu1ptpsVBJadazs5nUNp7vDuLE03FAFWTLOQ==","license": "Apache-2.0","optional": true,"dependencies": {"@grpc/grpc-js": "^1.14.3",- "@opentelemetry/core": "2.7.1",- "@opentelemetry/otlp-exporter-base": "0.218.0",- "@opentelemetry/otlp-grpc-exporter-base": "0.218.0",- "@opentelemetry/otlp-transformer": "0.218.0",- "@opentelemetry/sdk-logs": "0.218.0"+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/otlp-exporter-base": "0.220.0",+ "@opentelemetry/otlp-grpc-exporter-base": "0.220.0",+ "@opentelemetry/otlp-transformer": "0.220.0",+ "@opentelemetry/sdk-logs": "0.220.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1637,17 +1658,17 @@}},"node_modules/@opentelemetry/exporter-logs-otlp-http": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.218.0.tgz",- "integrity": "sha512-Qx+4rpVHzgg89dawcWRHyt+XRXeLnhFz/qBtvggmjkcgPUdr+NAB0/u/eIPA8yAeJV0J80Vz43JZCh/XFvZFGw==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.220.0.tgz",+ "integrity": "sha512-8186thl+pTw64iz/qEEen5oJZoZ/gO73XruChdaGlYdWOdBIQ42r+vHLf6a7vIDqTD4b8ZOoMlyxptanECaI9A==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/api-logs": "0.218.0",- "@opentelemetry/core": "2.7.1",- "@opentelemetry/otlp-exporter-base": "0.218.0",- "@opentelemetry/otlp-transformer": "0.218.0",- "@opentelemetry/sdk-logs": "0.218.0"+ "@opentelemetry/api-logs": "0.220.0",+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/otlp-exporter-base": "0.220.0",+ "@opentelemetry/otlp-transformer": "0.220.0",+ "@opentelemetry/sdk-logs": "0.220.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1657,19 +1678,15 @@}},"node_modules/@opentelemetry/exporter-logs-otlp-proto": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-proto/-/exporter-logs-otlp-proto-0.218.0.tgz",- "integrity": "sha512-1/noQNsp9gXD75HPzgjBrcF1+XTtry7pFAUfxVEJgg7mPv2AawKQuYkhMmJ8qjxz4Ubc3Y8bwvfxevXsKTq4cg==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-proto/-/exporter-logs-otlp-proto-0.220.0.tgz",+ "integrity": "sha512-8LZAxdJ0ENDAFwr4j0oY35mHBltiSzvlhdQAPGiC7p9VnxtuSq4SW1gfBAdW6t6hiQG6OwUl8w7KHaOdJPKHWg==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/api-logs": "0.218.0",- "@opentelemetry/core": "2.7.1",- "@opentelemetry/otlp-exporter-base": "0.218.0",- "@opentelemetry/otlp-transformer": "0.218.0",- "@opentelemetry/resources": "2.7.1",- "@opentelemetry/sdk-logs": "0.218.0",- "@opentelemetry/sdk-trace-base": "2.7.1"+ "@opentelemetry/otlp-exporter-base": "0.220.0",+ "@opentelemetry/otlp-transformer": "0.220.0",+ "@opentelemetry/sdk-logs": "0.220.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1679,20 +1696,20 @@}},"node_modules/@opentelemetry/exporter-metrics-otlp-grpc": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-grpc/-/exporter-metrics-otlp-grpc-0.218.0.tgz",- "integrity": "sha512-YapQ9vNMX0NSZF6LK5pWAFfjpJleV2O9uYWfYGeb/5F1Kb9rPGK8tZDMJFa/sOksgdFuflDvYuA0B4qjDB4fjQ==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-grpc/-/exporter-metrics-otlp-grpc-0.220.0.tgz",+ "integrity": "sha512-U128izvJfX/dW9jRGP0gIfadR1Hg7ft3UEGIeRxLFK70m2BWw6AtNCOnsUygpw2zCgR/ygdWbGpcL6TmhW0ZGw==","license": "Apache-2.0","optional": true,"dependencies": {"@grpc/grpc-js": "^1.14.3",- "@opentelemetry/core": "2.7.1",- "@opentelemetry/exporter-metrics-otlp-http": "0.218.0",- "@opentelemetry/otlp-exporter-base": "0.218.0",- "@opentelemetry/otlp-grpc-exporter-base": "0.218.0",- "@opentelemetry/otlp-transformer": "0.218.0",- "@opentelemetry/resources": "2.7.1",- "@opentelemetry/sdk-metrics": "2.7.1"+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/exporter-metrics-otlp-http": "0.220.0",+ "@opentelemetry/otlp-exporter-base": "0.220.0",+ "@opentelemetry/otlp-grpc-exporter-base": "0.220.0",+ "@opentelemetry/otlp-transformer": "0.220.0",+ "@opentelemetry/resources": "2.9.0",+ "@opentelemetry/sdk-metrics": "2.9.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1702,17 +1719,17 @@}},"node_modules/@opentelemetry/exporter-metrics-otlp-http": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.218.0.tgz",- "integrity": "sha512-bV7d2OuMpZu2+gAaxUAhzfZ0h3WVZk8ETQUEE3DNSntbTaMpuITjtm8I0rNyHFdm7Ax57K6ty7SgFXlBmOLIvQ==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.220.0.tgz",+ "integrity": "sha512-Yqt3RBw/bRVncaE9qIIhk4WfjbAQqXuP9FgAaU+IKPndnLEp/cUqZlSC324+bpmduRz7DoTjig8Ub0PeILWXUA==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/core": "2.7.1",- "@opentelemetry/otlp-exporter-base": "0.218.0",- "@opentelemetry/otlp-transformer": "0.218.0",- "@opentelemetry/resources": "2.7.1",- "@opentelemetry/sdk-metrics": "2.7.1"+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/otlp-exporter-base": "0.220.0",+ "@opentelemetry/otlp-transformer": "0.220.0",+ "@opentelemetry/resources": "2.9.0",+ "@opentelemetry/sdk-metrics": "2.9.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1722,18 +1739,18 @@}},"node_modules/@opentelemetry/exporter-metrics-otlp-proto": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-proto/-/exporter-metrics-otlp-proto-0.218.0.tgz",- "integrity": "sha512-ubLddKjWULhla9YZRCj/rTBeppjJYE4e9w0icx5mTu3eFhWjQzbV75NYjXuIlEG+NJsBl6d+sTFw5Qu+oej4oQ==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-proto/-/exporter-metrics-otlp-proto-0.220.0.tgz",+ "integrity": "sha512-lyO+IQBdSvqHN/ZOW/OzrSWemtfD+HgWngn+HBNLhjy0YrCQQTz0OE/kSekH2Pl340dn9DWzhqHdz5Eftr+HLA==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/core": "2.7.1",- "@opentelemetry/exporter-metrics-otlp-http": "0.218.0",- "@opentelemetry/otlp-exporter-base": "0.218.0",- "@opentelemetry/otlp-transformer": "0.218.0",- "@opentelemetry/resources": "2.7.1",- "@opentelemetry/sdk-metrics": "2.7.1"+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/exporter-metrics-otlp-http": "0.220.0",+ "@opentelemetry/otlp-exporter-base": "0.220.0",+ "@opentelemetry/otlp-transformer": "0.220.0",+ "@opentelemetry/resources": "2.9.0",+ "@opentelemetry/sdk-metrics": "2.9.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1743,15 +1760,15 @@}},"node_modules/@opentelemetry/exporter-prometheus": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.218.0.tgz",- "integrity": "sha512-RT5oEyu1kddZJ1vt7/BUo5wV+P7hpNAESsR3dUd3+8deHuX7gWNoCOZn+SfDT+hJHlIJ5h/AxiCLXIrutswDJg==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.220.0.tgz",+ "integrity": "sha512-JZD5DL/NBpVd2BHefvYosm3G40UZ/KzExLv5tc0eZe0CtrsHHtcOk3YPUxR2EINmUeBf8+w5UReTV8fFPn95lA==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/core": "2.7.1",- "@opentelemetry/resources": "2.7.1",- "@opentelemetry/sdk-metrics": "2.7.1",+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/resources": "2.9.0",+ "@opentelemetry/sdk-metrics": "2.9.0","@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {@@ -1762,19 +1779,17 @@}},"node_modules/@opentelemetry/exporter-trace-otlp-grpc": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.218.0.tgz",- "integrity": "sha512-3fXxVQEj9TNAFaCi79JeFKfeLd0sDtInaR3gaZDVlzNSPHtz8PZuCV34JKWjD4XXzT20IdMe8IpX6mRVNDA4Tw==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.220.0.tgz",+ "integrity": "sha512-bv1xmNhmNwIM6MdUBw4yYuJeVcEViVLk3uD69vOQMwueHBnfyl/u0HnBlB1FNY/Te0UOzJzvcbyR8wN6b+iGbA==","license": "Apache-2.0","optional": true,"dependencies": {"@grpc/grpc-js": "^1.14.3",- "@opentelemetry/core": "2.7.1",- "@opentelemetry/otlp-exporter-base": "0.218.0",- "@opentelemetry/otlp-grpc-exporter-base": "0.218.0",- "@opentelemetry/otlp-transformer": "0.218.0",- "@opentelemetry/resources": "2.7.1",- "@opentelemetry/sdk-trace-base": "2.7.1"+ "@opentelemetry/otlp-exporter-base": "0.220.0",+ "@opentelemetry/otlp-grpc-exporter-base": "0.220.0",+ "@opentelemetry/otlp-transformer": "0.220.0",+ "@opentelemetry/sdk-trace": "2.9.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1784,17 +1799,17 @@}},"node_modules/@opentelemetry/exporter-trace-otlp-http": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.218.0.tgz",- "integrity": "sha512-8dqezsmPhtKitIK/eTipZhYl9EX2/gNQ5zUMhaz3uxEURwfkNf8IPvo6yNfrzbxdtpAOybS/+h7wmIWYqFSpiw==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.220.0.tgz",+ "integrity": "sha512-/+ExB3lRkf+erv4PnoywyL7RHKITidxtUpUTS55k7OQ0dB42S7gEF1gry7swb9MSm1hYLUhJg4QQh9W8SpwwqA==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/core": "2.7.1",- "@opentelemetry/otlp-exporter-base": "0.218.0",- "@opentelemetry/otlp-transformer": "0.218.0",- "@opentelemetry/resources": "2.7.1",- "@opentelemetry/sdk-trace-base": "2.7.1"+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/otlp-exporter-base": "0.220.0",+ "@opentelemetry/otlp-transformer": "0.220.0",+ "@opentelemetry/resources": "2.9.0",+ "@opentelemetry/sdk-trace": "2.9.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1804,17 +1819,17 @@}},"node_modules/@opentelemetry/exporter-trace-otlp-proto": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.218.0.tgz",- "integrity": "sha512-r1Msf8SNLRmwh9J6XQ5uh82D7CdDWMNHnPB7LAVHjzut0TkSeKc5KcIvr4SvHvfk/xwN5gxC+VLKQ1k0o8PSPw==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.220.0.tgz",+ "integrity": "sha512-voTAD8XgJxlK7zLkXh8EzMB09zrQr3tyY/BsnDTlDiQU/UdK58MZ63A3mUjdEDrxMjCVmBHU3WQJhRmQe+Dvzg==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/core": "2.7.1",- "@opentelemetry/otlp-exporter-base": "0.218.0",- "@opentelemetry/otlp-transformer": "0.218.0",- "@opentelemetry/resources": "2.7.1",- "@opentelemetry/sdk-trace-base": "2.7.1"+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/otlp-exporter-base": "0.220.0",+ "@opentelemetry/otlp-transformer": "0.220.0",+ "@opentelemetry/resources": "2.9.0",+ "@opentelemetry/sdk-trace": "2.9.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1824,15 +1839,15 @@}},"node_modules/@opentelemetry/exporter-zipkin": {- "version": "2.7.1",- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.7.1.tgz",- "integrity": "sha512-mfsD9bKAxcKrh5+y08TPodvClBO0CznBE3p79YAGnO81WI4LrdsGA65T53e4iTSbCalW4WaUpkbeJcbpyIUHfg==",+ "version": "2.9.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.9.0.tgz",+ "integrity": "sha512-RwINoce2BH8T4obT5pMcAla2sWma1YZvYuaktWmTluQ0PkQdvv5D060rWI1+kawX+J2qBRcMbwrZJJNcMJUauQ==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/core": "2.7.1",- "@opentelemetry/resources": "2.7.1",- "@opentelemetry/sdk-trace-base": "2.7.1",+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/resources": "2.9.0",+ "@opentelemetry/sdk-trace": "2.9.0","@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {@@ -1843,13 +1858,13 @@}},"node_modules/@opentelemetry/instrumentation": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.218.0.tgz",- "integrity": "sha512-mIZil8Es+sYDK5m+DQiwAwF57F14TF2YlEqvIjZ/RQWcxDBwRGsKfdK2Tv65OU9meQKCMzSIFS9mxAcnAb6Bkg==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.220.0.tgz",+ "integrity": "sha512-xQx3E2WxP1mDvKzxLxX+CTCtNLa560YJZ3087qYHerl2YmiKpv7AH+dAy7vmx+eVrZ5BwhfWUAVoKOoxCNHcpw==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/api-logs": "0.218.0",+ "@opentelemetry/api-logs": "0.220.0","import-in-the-middle": "^3.0.0","require-in-the-middle": "^8.0.0"},@@ -1861,14 +1876,14 @@}},"node_modules/@opentelemetry/otlp-exporter-base": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.218.0.tgz",- "integrity": "sha512-ZwqpkNL5W7RyGJPDZ9g06DvKp8KFTWPJPN12anpMQYSKpTSU0z3EIZuPq9vPGpS8siFyOqDYDAuCwlNO9FqgbA==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.220.0.tgz",+ "integrity": "sha512-CXYo8UD5Mn9YbgebO2EL4wejtA+gxLmLiu6HCk2KH2BR7XhFN6/6p1UlCb23DYCjeYkndevLHuejCCN1yx4+OQ==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/core": "2.7.1",- "@opentelemetry/otlp-transformer": "0.218.0"+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/otlp-transformer": "0.220.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1878,16 +1893,16 @@}},"node_modules/@opentelemetry/otlp-grpc-exporter-base": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.218.0.tgz",- "integrity": "sha512-H/lCGJ536N98VpYJOaWTQOkv4Dx6TnmStK6Rqfu1W7KkFbPAx04hjdYEMZF/YbnHzPUSIK4kM6OE2GKGBTpV9A==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.220.0.tgz",+ "integrity": "sha512-/eIkBPMBTIvM3x/0mDX4aJeSkYifYClnBPr68PL1h5LV4VQv4+SV6CGrpiZ4fIWDnobVmhTWCm1J/QRdAWUfvA==","license": "Apache-2.0","optional": true,"dependencies": {"@grpc/grpc-js": "^1.14.3",- "@opentelemetry/core": "2.7.1",- "@opentelemetry/otlp-exporter-base": "0.218.0",- "@opentelemetry/otlp-transformer": "0.218.0"+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/otlp-exporter-base": "0.220.0",+ "@opentelemetry/otlp-transformer": "0.220.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1897,18 +1912,18 @@}},"node_modules/@opentelemetry/otlp-transformer": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.218.0.tgz",- "integrity": "sha512-CFaKH87WAzjuJ4awowTTLzUvMfaRfiOFG5+qm5S5ncyalRtN4ecQ+YmuANJSCrVPuvZFEkUgKhBPBndxi3rHsQ==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.220.0.tgz",+ "integrity": "sha512-lXGrv7KXZ0gNH9SVNUaa6vv6phVYGvJxfXAlMbzbakiXru75f5MZl8Z7oqiMMQD77riVHJCFlQvbZs/VVN2/4A==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/api-logs": "0.218.0",- "@opentelemetry/core": "2.7.1",- "@opentelemetry/resources": "2.7.1",- "@opentelemetry/sdk-logs": "0.218.0",- "@opentelemetry/sdk-metrics": "2.7.1",- "@opentelemetry/sdk-trace-base": "2.7.1"+ "@opentelemetry/api-logs": "0.220.0",+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/resources": "2.9.0",+ "@opentelemetry/sdk-logs": "0.220.0",+ "@opentelemetry/sdk-metrics": "2.9.0",+ "@opentelemetry/sdk-trace": "2.9.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1918,13 +1933,13 @@}},"node_modules/@opentelemetry/propagator-b3": {- "version": "2.7.1",- "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.7.1.tgz",- "integrity": "sha512-RJid6E2CKyeGfKBzXKF21ejabGMHypFkPAh3qZ+NvI+SGjuIye79t3PmiqcDgtRzdKH6ynXzbfslQ8DfpRUg2A==",+ "version": "2.9.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.9.0.tgz",+ "integrity": "sha512-WrOT1WsOUG+B7hstD2RYoMPIOK76G8E9AQHhMjUvrQaGx/oA7rPWQvvr1Rqv7+yy4R0ZMVwWLC4vW2xnkgWPAQ==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/core": "2.7.1"+ "@opentelemetry/core": "2.9.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1934,13 +1949,13 @@}},"node_modules/@opentelemetry/propagator-jaeger": {- "version": "2.7.1",- "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.7.1.tgz",- "integrity": "sha512-KMjVBHzP4N60bOzxja76M1F1hZZ43lGPga5ix+mkv9+kk1nx9SbkxSvJsMbuVUxdPQmsPTqGShmhN8ulrMOg6Q==",+ "version": "2.9.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.9.0.tgz",+ "integrity": "sha512-4mYGty27rYvSM0jtp1ZUOqd3LfVRCYg9H5G9OFzSx5HViYToU21MFhWfco7x1HwXr7ER8yGOiCIHZUwjPksc0Q==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/core": "2.7.1"+ "@opentelemetry/core": "2.9.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -1950,42 +1965,32 @@}},"node_modules/@opentelemetry/resources": {- "version": "1.25.1",- "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.25.1.tgz",- "integrity": "sha512-pkZT+iFYIZsVn6+GzM0kSX+u3MSLCY9md+lIJOoKl/P+gJFfxJte/60Usdp8Ce4rOs8GduUpSPNe1ddGyDT1sQ==",+ "version": "2.9.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.9.0.tgz",+ "integrity": "sha512-jyA5MBLQ+Dkl3+JsZkUoUvL7yHvU64kLsvpXKarWm6347Sl1t1bXFTFykUePNpT5WH5pm9a2Qtt03iIYQhZ1Fg==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/core": "1.25.1",- "@opentelemetry/semantic-conventions": "1.25.1"+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {- "node": ">=14"+ "node": "^18.19.0 || >=20.6.0"},"peerDependencies": {- "@opentelemetry/api": ">=1.0.0 <1.10.0"- }- },- "node_modules/@opentelemetry/resources/node_modules/@opentelemetry/semantic-conventions": {- "version": "1.25.1",- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz",- "integrity": "sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ==",- "license": "Apache-2.0",- "optional": true,- "engines": {- "node": ">=14"+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},"node_modules/@opentelemetry/sdk-logs": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.218.0.tgz",- "integrity": "sha512-QvnNdugatFTVCJXH0Mcu7GOOJSylA9j127kIezOE4YwTI4YbowRons2K4WZTv5FMS8T4q9P0NdaRHdkSmeAIag==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.220.0.tgz",+ "integrity": "sha512-WywcTkQtv2iNmt+6y5Kcd4rzvx9bLVsBa2Nwcmg01IUaBTkTow3W4d9KE5vNBpEDtb9tp21WcRBY/lANRrApYA==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/api-logs": "0.218.0",- "@opentelemetry/core": "2.7.1",- "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/api-logs": "0.220.0",+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/resources": "2.9.0","@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {@@ -1996,14 +2001,14 @@}},"node_modules/@opentelemetry/sdk-metrics": {- "version": "2.7.1",- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.7.1.tgz",- "integrity": "sha512-MpDJdkiFDs3Pm1RHO3KByuZbuBdJEXEAkiC0+yJdsZGVCdf1RpHR6n+LHDcS7ffmfrt5kVCzJSCfm4z2C7v0uQ==",+ "version": "2.9.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.9.0.tgz",+ "integrity": "sha512-Xx8RGS4H5XEBl01WuCreMIpiah9cCXMbSkeuIePPdD2cUpq/vUzYmj8E/MK1OsbOc93FuAD4jfn2WOacKwLn7Q==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/core": "2.7.1",- "@opentelemetry/resources": "2.7.1"+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/resources": "2.9.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -2013,36 +2018,38 @@}},"node_modules/@opentelemetry/sdk-node": {- "version": "0.218.0",- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.218.0.tgz",- "integrity": "sha512-tPMjHrLV5gsfNdYqoRHjeGbCAZBXXD9c1Qo/2ut7VwnUABDNh76xNxrT0SEhkIIJuCN45bbN1vZnYL1gY0IkOg==",+ "version": "0.220.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.220.0.tgz",+ "integrity": "sha512-wHtGyHhSKHNH3fym33xRu4Ef/HXTFvX8eQ42xdQdEO9LYx9Y2qNyBDJytyqVlvmo6abWZlNYTUthuAGUMYqYnQ==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/api-logs": "0.218.0",- "@opentelemetry/configuration": "0.218.0",- "@opentelemetry/context-async-hooks": "2.7.1",- "@opentelemetry/core": "2.7.1",- "@opentelemetry/exporter-logs-otlp-grpc": "0.218.0",- "@opentelemetry/exporter-logs-otlp-http": "0.218.0",- "@opentelemetry/exporter-logs-otlp-proto": "0.218.0",- "@opentelemetry/exporter-metrics-otlp-grpc": "0.218.0",- "@opentelemetry/exporter-metrics-otlp-http": "0.218.0",- "@opentelemetry/exporter-metrics-otlp-proto": "0.218.0",- "@opentelemetry/exporter-prometheus": "0.218.0",- "@opentelemetry/exporter-trace-otlp-grpc": "0.218.0",- "@opentelemetry/exporter-trace-otlp-http": "0.218.0",- "@opentelemetry/exporter-trace-otlp-proto": "0.218.0",- "@opentelemetry/exporter-zipkin": "2.7.1",- "@opentelemetry/instrumentation": "0.218.0",- "@opentelemetry/otlp-exporter-base": "0.218.0",- "@opentelemetry/propagator-b3": "2.7.1",- "@opentelemetry/propagator-jaeger": "2.7.1",- "@opentelemetry/resources": "2.7.1",- "@opentelemetry/sdk-logs": "0.218.0",- "@opentelemetry/sdk-metrics": "2.7.1",- "@opentelemetry/sdk-trace-base": "2.7.1",- "@opentelemetry/sdk-trace-node": "2.7.1",+ "@opentelemetry/api-logs": "0.220.0",+ "@opentelemetry/configuration": "0.220.0",+ "@opentelemetry/context-async-hooks": "2.9.0",+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/exporter-logs-otlp-grpc": "0.220.0",+ "@opentelemetry/exporter-logs-otlp-http": "0.220.0",+ "@opentelemetry/exporter-logs-otlp-proto": "0.220.0",+ "@opentelemetry/exporter-metrics-otlp-grpc": "0.220.0",+ "@opentelemetry/exporter-metrics-otlp-http": "0.220.0",+ "@opentelemetry/exporter-metrics-otlp-proto": "0.220.0",+ "@opentelemetry/exporter-prometheus": "0.220.0",+ "@opentelemetry/exporter-trace-otlp-grpc": "0.220.0",+ "@opentelemetry/exporter-trace-otlp-http": "0.220.0",+ "@opentelemetry/exporter-trace-otlp-proto": "0.220.0",+ "@opentelemetry/exporter-zipkin": "2.9.0",+ "@opentelemetry/instrumentation": "0.220.0",+ "@opentelemetry/otlp-exporter-base": "0.220.0",+ "@opentelemetry/otlp-grpc-exporter-base": "0.220.0",+ "@opentelemetry/propagator-b3": "2.9.0",+ "@opentelemetry/propagator-jaeger": "2.9.0",+ "@opentelemetry/resources": "2.9.0",+ "@opentelemetry/sdk-logs": "0.220.0",+ "@opentelemetry/sdk-metrics": "2.9.0",+ "@opentelemetry/sdk-trace": "2.9.0",+ "@opentelemetry/sdk-trace-base": "2.9.0",+ "@opentelemetry/sdk-trace-node": "2.9.0","@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {@@ -2052,44 +2059,53 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "node_modules/@opentelemetry/sdk-trace-base": {- "version": "1.25.1",- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.25.1.tgz",- "integrity": "sha512-C8k4hnEbc5FamuZQ92nTOp8X/diCY56XUTnMiv9UTuJitCzaNNHAVsdm5+HLCdI8SLQsLWIrG38tddMxLVoftw==",+ "node_modules/@opentelemetry/sdk-trace": {+ "version": "2.9.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace/-/sdk-trace-2.9.0.tgz",+ "integrity": "sha512-sGA19HvtrrSKYsseHphluH6j3p6Xa3fqc7c7y8f/7mYWejc1lyDFcpSdD1kYa50HCLUeEo4zA5bW0pniaPszuw==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/core": "1.25.1",- "@opentelemetry/resources": "1.25.1",- "@opentelemetry/semantic-conventions": "1.25.1"+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/resources": "2.9.0",+ "@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {- "node": ">=14"+ "node": "^18.19.0 || >=20.6.0"},"peerDependencies": {- "@opentelemetry/api": ">=1.0.0 <1.10.0"+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/semantic-conventions": {- "version": "1.25.1",- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.25.1.tgz",- "integrity": "sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ==",+ "node_modules/@opentelemetry/sdk-trace-base": {+ "version": "2.9.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.9.0.tgz",+ "integrity": "sha512-cp9zmTl62R8PJrpvFcmc8N2JQU/xfa0S+61q511Nji+QxCfZ8Ifvg7H27G8cANe4crg4RTrWsVvanHiXjSp6ag==","license": "Apache-2.0","optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/resources": "2.9.0",+ "@opentelemetry/sdk-trace": "2.9.0",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },"engines": {- "node": ">=14"+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},"node_modules/@opentelemetry/sdk-trace-node": {- "version": "2.7.1",- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.7.1.tgz",- "integrity": "sha512-pCpQxU68lV+I9s9svqMyVu5iHdDDUnqUpSxqwyCU8A9ejEsSnMPCbearwsUO4yk08ZJzAIUCFuReMdVQvHrdvg==",+ "version": "2.9.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.9.0.tgz",+ "integrity": "sha512-ec9a7ps37huy5itYk0MalaZdSLlM6AXWp/FhtEjgMpp5leEGojBDvAl/UWttQnkMZOvFHKzRESn8TD3yKTF5nQ==","license": "Apache-2.0","optional": true,"dependencies": {- "@opentelemetry/context-async-hooks": "2.7.1",- "@opentelemetry/core": "2.7.1",- "@opentelemetry/sdk-trace-base": "2.7.1"+ "@opentelemetry/context-async-hooks": "2.9.0",+ "@opentelemetry/core": "2.9.0",+ "@opentelemetry/sdk-trace-base": "2.9.0"},"engines": {"node": "^18.19.0 || >=20.6.0"@@ -3346,26 +3362,29 @@]},"node_modules/@ruvector/tiny-dancer": {- "version": "0.1.17",- "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer/-/tiny-dancer-0.1.17.tgz",- "integrity": "sha512-Jv5R6fAhjtJfgTMkBxFHW4uQiUTF0/DRdYVMKFuCBHHO4Rv+uRaI67woFStbZc+N4OCsuvLJjFh2hE9GmDGIYg==",+ "version": "0.1.22",+ "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer/-/tiny-dancer-0.1.22.tgz",+ "integrity": "sha512-p5EeEk5i0IV1Mic3srmJ/yfZLL7Ip72+QXuuAGs5p0kFUkFfVr1mbAlSo/Tm8Z5/7WQtWlcJ277LBxpbEFjULA==","license": "MIT","optional": true,"engines": {"node": ">=18.0.0"},"optionalDependencies": {- "@ruvector/tiny-dancer-darwin-arm64": "0.1.15",- "@ruvector/tiny-dancer-darwin-x64": "0.1.15",- "@ruvector/tiny-dancer-linux-arm64-gnu": "0.1.17",- "@ruvector/tiny-dancer-linux-x64-gnu": "0.1.15",- "@ruvector/tiny-dancer-win32-x64-msvc": "0.1.15"+ "@ruvector/tiny-dancer-darwin-arm64": "0.1.22",+ "@ruvector/tiny-dancer-darwin-x64": "0.1.22",+ "@ruvector/tiny-dancer-linux-arm64-gnu": "0.1.22",+ "@ruvector/tiny-dancer-linux-arm64-musl": "0.1.22",+ "@ruvector/tiny-dancer-linux-x64-gnu": "0.1.22",+ "@ruvector/tiny-dancer-linux-x64-musl": "0.1.22",+ "@ruvector/tiny-dancer-win32-arm64-msvc": "0.1.22",+ "@ruvector/tiny-dancer-win32-x64-msvc": "0.1.22"}},"node_modules/@ruvector/tiny-dancer-darwin-arm64": {- "version": "0.1.15",- "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-darwin-arm64/-/tiny-dancer-darwin-arm64-0.1.15.tgz",- "integrity": "sha512-99vy9OLjppPj3kjusQnirgLvOnBt6Jrt2pij3Fvs5pzyp+zh04gb1np0tFR4JCxftKnuoKYqN7bCtQvgQbBBSg==",+ "version": "0.1.22",+ "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-darwin-arm64/-/tiny-dancer-darwin-arm64-0.1.22.tgz",+ "integrity": "sha512-DdCDrjobSyXm4W3Mj8R1R58dxULcLR/F+sw2DItCNly7/vId9+YopB2Jlj31PAnuiPWpGy5fpMm8lov23Cxh4g==","cpu": ["arm64"],@@ -3375,13 +3394,13 @@"darwin"],"engines": {- "node": ">=18.0.0"+ "node": ">= 18"}},"node_modules/@ruvector/tiny-dancer-darwin-x64": {- "version": "0.1.15",- "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-darwin-x64/-/tiny-dancer-darwin-x64-0.1.15.tgz",- "integrity": "sha512-KxxhkiJwjRoUBeK0pwxuY8dKYpMrxpItss7CfNYhsbJc1YLmUzw1TG2Klga4vO1X7dsg/CYuHC+KKrgfSvEVwA==",+ "version": "0.1.22",+ "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-darwin-x64/-/tiny-dancer-darwin-x64-0.1.22.tgz",+ "integrity": "sha512-ZD/ENNX74NDpDxQmIbRrAb7w7rd9drG0qOHdAS1otrmA7SLeOLVVaTRovA//w6v1Dj2KfkuEZ2e6yBsQNBaWsA==","cpu": ["x64"],@@ -3391,13 +3410,13 @@"darwin"],"engines": {- "node": ">=18.0.0"+ "node": ">= 18"}},"node_modules/@ruvector/tiny-dancer-linux-arm64-gnu": {- "version": "0.1.17",- "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-linux-arm64-gnu/-/tiny-dancer-linux-arm64-gnu-0.1.17.tgz",- "integrity": "sha512-bvjYL0/tyonot6KFQPAbtOdw3TGL6fIxakmn8ED6gRRcwPJ3V6VZ0WgLZfOlXiWc4I/eQvcNldgJ+3QOXurgMw==",+ "version": "0.1.22",+ "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-linux-arm64-gnu/-/tiny-dancer-linux-arm64-gnu-0.1.22.tgz",+ "integrity": "sha512-6ACIwkV+Jww77UmcAi3TwRtadgUcP5Qx3d7VpU5Z51oLb6l8i4DmrfsuNKeYY0UJdPzhY9r/LEjPVfbSwAdL/w==","cpu": ["arm64"],@@ -3407,13 +3426,29 @@"linux"],"engines": {- "node": ">=18.0.0"+ "node": ">= 18"+ }+ },+ "node_modules/@ruvector/tiny-dancer-linux-arm64-musl": {+ "version": "0.1.22",+ "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-linux-arm64-musl/-/tiny-dancer-linux-arm64-musl-0.1.22.tgz",+ "integrity": "sha512-zqgcpms7l8MILxhkd65BfV4BlTTnqRaxRp56P9Qo9SYF/OV6LTUcUIO3d8BA+rrCvltCoEnU7+x+mCSfm2XEmA==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 18"}},"node_modules/@ruvector/tiny-dancer-linux-x64-gnu": {- "version": "0.1.15",- "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-linux-x64-gnu/-/tiny-dancer-linux-x64-gnu-0.1.15.tgz",- "integrity": "sha512-lEknFh2p73KkHz6d51cP/Y5D10AATiXRsoQEDRkOjrO0Eb5blyxal4wzdqbylyXEH7UbRePCBrCCk5BkfZD1fA==",+ "version": "0.1.22",+ "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-linux-x64-gnu/-/tiny-dancer-linux-x64-gnu-0.1.22.tgz",+ "integrity": "sha512-7Y17JbuEbsyMXY1Iqt13xOM9bSr6niyJqUDwb7LNfXqb3k0M63B6i5D63d8WrGYLrp0Zij99XxHuBaCwrC1+4A==","cpu": ["x64"],@@ -3423,13 +3458,45 @@"linux"],"engines": {- "node": ">=18.0.0"+ "node": ">= 18"+ }+ },+ "node_modules/@ruvector/tiny-dancer-linux-x64-musl": {+ "version": "0.1.22",+ "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-linux-x64-musl/-/tiny-dancer-linux-x64-musl-0.1.22.tgz",+ "integrity": "sha512-aPSL6dLv7dlq/sAWd2pE9jPu2QNPLz1RQH+btnCf6r0nSC5K5SoMSmiwnIGrVR0DTkXtHgBOTZvf5ne1O+gctA==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 18"+ }+ },+ "node_modules/@ruvector/tiny-dancer-win32-arm64-msvc": {+ "version": "0.1.22",+ "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-win32-arm64-msvc/-/tiny-dancer-win32-arm64-msvc-0.1.22.tgz",+ "integrity": "sha512-fWOAlEQ/sF0Fs5vFjeMF5ktcOH4GPFwIJRNrdEbqv+jYnCHHHxNNoBY4UAwnfX8UqqyITSp+qnxcGw9+GeNXCw==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 18"}},"node_modules/@ruvector/tiny-dancer-win32-x64-msvc": {- "version": "0.1.15",- "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-win32-x64-msvc/-/tiny-dancer-win32-x64-msvc-0.1.15.tgz",- "integrity": "sha512-f465GiIh+CWv58d3eixWKJOi8kSqcRk5heH2SRwj2Q4wWjWru4esr96NXb1VCj0EKFfDWs9D+aPW2OU4xFeoPQ==",+ "version": "0.1.22",+ "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-win32-x64-msvc/-/tiny-dancer-win32-x64-msvc-0.1.22.tgz",+ "integrity": "sha512-9U4aW6IJGRDWRXBPN9pXS0WpNPOGhFWuLu0Ue3daWadnsqwITZDG7qZA8Jb7TWVLbcjhDZfCxXMDCEGrT7K/1Q==","cpu": ["x64"],@@ -3439,7 +3506,7 @@"win32"],"engines": {- "node": ">=18.0.0"+ "node": ">= 18"}},"node_modules/@sec-ant/readable-stream": {@@ -3817,7 +3884,7 @@"version": "8.15.0","resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz","integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",- "devOptional": true,+ "dev": true,"license": "MIT","bin": {"acorn": "bin/acorn"@@ -3826,16 +3893,6 @@"node": ">=0.4.0"}},- "node_modules/acorn-import-attributes": {- "version": "1.9.5",- "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz",- "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==",- "license": "MIT",- "optional": true,- "peerDependencies": {- "acorn": "^8"- }- },"node_modules/acorn-jsx": {"version": "5.3.2","resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",@@ -3948,9 +4005,9 @@"license": "MIT"},"node_modules/agentic-flow": {- "version": "2.0.14",- "resolved": "https://registry.npmjs.org/agentic-flow/-/agentic-flow-2.0.14.tgz",- "integrity": "sha512-8+AQhXI0P0mK26mZ8zsTQkhUhRsPWYP52Diwzr3Nk0dUNXd+pBjzdyQDfFxttGIymBfMqvRr8VRBd+bZLSYWcg==",+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/agentic-flow/-/agentic-flow-2.1.0.tgz",+ "integrity": "sha512-wTWuYfRfLa5oZGwMiI0BaKj/n9XXjYRvILrPWV2uUUOzC0Yob5RhQp+MVBZ/NxfV2X7678qHrYXxXE0kbITALQ==","hasInstallScript": true,"license": "MIT","optional": true,@@ -3958,6 +4015,8 @@"@anthropic-ai/claude-agent-sdk": "^0.1.5","@anthropic-ai/sdk": "^0.65.0","@google/genai": "^1.22.0",+ "@metaharness/darwin": "^0.7.0",+ "@metaharness/router": "^0.3.2","@ruvector/core": "^0.1.29","@ruvector/edge-full": "^0.1.0","@ruvector/router": "^0.1.25",@@ -3982,7 +4041,8 @@},"bin": {"agentdb": "dist/agentdb/cli/agentdb-cli.js",- "agentic-flow": "dist/cli-proxy.js"+ "agentic-flow": "dist/cli-proxy.js",+ "agentic-flow-repair": "dist/repair/cli.js"},"engines": {"node": ">=18.0.0"@@ -7056,21 +7116,27 @@}},"node_modules/import-in-the-middle": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.1.tgz",- "integrity": "sha512-pYkiyXVL2Mf3pozdlDGV6NAObxQx13Ae8knZk1UJRJ6uRW/ZRmTGHlQYtrsSl7ubuE5F8CD1z+s1n4RHNuTtuA==",+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.3.0.tgz",+ "integrity": "sha512-v4+k+PLt4z6g2ydEcXhfinTJxfgKJDWOW0v0GZNA5n2qToHFObpH4nGLhJdwnXnX4T14oREx/M62dS9GkpmSbQ==","license": "Apache-2.0","optional": true,"dependencies": {- "acorn": "^8.15.0",- "acorn-import-attributes": "^1.9.5","cjs-module-lexer": "^2.2.0",+ "es-module-lexer": "^2.2.0","module-details-from-path": "^1.0.4"},"engines": {"node": ">=18"}},+ "node_modules/import-in-the-middle/node_modules/es-module-lexer": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.0.tgz",+ "integrity": "sha512-KLdwQm2NvGLDkQDCGvmiQrhkd0JbMzXthwQAUgWjQuQdBLFa3eiBP5arXZyA+f8x+x7OXgud6bq2rxjGtHV2tw==",+ "license": "MIT",+ "optional": true+ },"node_modules/imurmurhash": {"version": "0.1.4","resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",@@ -8595,10 +8661,9 @@"optional": true},"node_modules/protobufjs": {- "version": "8.4.2",- "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-8.4.2.tgz",- "integrity": "sha512-64rfNzkWOZAIazXzpBFPWq6F9up6gMvTzjE2oWIzApx2N/dqVUEE7+bCn2+40780dFVtKOUab8QfxJ6KJDWbqA==",- "hasInstallScript": true,+ "version": "8.6.5",+ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-8.6.5.tgz",+ "integrity": "sha512-zeE5LPpencAGXvsxyOYmEgJhxzHY8IsmPAFzstZVhDSVT8QH03q6gMZwZRaQGApevZbAL6u28ugs4CC+YKB2jQ==","license": "BSD-3-Clause","optional": true,"dependencies": {diff --git a/package.json b/package.jsonindex 2cafb62997..a4abbf7ca6 100644--- a/package.json+++ b/package.json@@ -98,12 +98,18 @@"qs": ">=6.15.2","protobufjs": ">=8.2.0","uuid": ">=14.0.0",- "@opentelemetry/core": "1.25.1",- "@opentelemetry/resources": "1.25.1",- "@opentelemetry/sdk-trace-base": "1.25.1",- "@opentelemetry/sdk-node": ">=0.218.0",+ "@opentelemetry/core": ">=2.8.0",+ "@opentelemetry/resources": ">=2.8.0",+ "@opentelemetry/sdk-trace-base": ">=2.8.0",+ "@opentelemetry/sdk-node": ">=0.220.0","@opentelemetry/auto-instrumentations-node": ">=0.75.0",- "@opentelemetry/exporter-prometheus": ">=0.217.0",+ "@opentelemetry/exporter-prometheus": ">=0.220.0",+ "@opentelemetry/exporter-trace-otlp-grpc": ">=0.220.0",+ "@opentelemetry/exporter-trace-otlp-http": ">=0.220.0",+ "@opentelemetry/exporter-trace-otlp-proto": ">=0.220.0",+ "@opentelemetry/otlp-exporter-base": ">=0.220.0",+ "@opentelemetry/otlp-grpc-exporter-base": ">=0.220.0",+ "@opentelemetry/otlp-transformer": ">=0.220.0","axios": ">=1.13.2","fast-uri": ">=3.1.0","vite": ">=8.0.16",diff --git a/plugins/ruflo-metaharness/agents/metaharness-architect.md b/plugins/ruflo-metaharness/agents/metaharness-architect.mdindex 431043e75c..4a896f3dc3 100644--- a/plugins/ruflo-metaharness/agents/metaharness-architect.md+++ b/plugins/ruflo-metaharness/agents/metaharness-architect.md@@ -38,7 +38,7 @@ needs its own ADR.## Tools (subprocess-only, no library imports)-- All skills shell out to `npx metaharness ...` or `npx -p metaharness@latest harness ...` via the `_harness.mjs` shared helper.+- All skills shell out to the pinned `metaharness` / `harness` binaries (`metaharness@~0.3.0`, local install or one-time versioned cache — never `@latest`) via the `_harness.mjs` shared helper.- 60s hard timeout per subprocess.- Output captured + parsed; `--json` flag forced unless the script opts out.- No `@metaharness/*` import statement appears outside the optional-router path in `v3/@claude-flow/cli/src/ruvector/neural-router.ts`.diff --git a/plugins/ruflo-metaharness/commands/ruflo-metaharness.md b/plugins/ruflo-metaharness/commands/ruflo-metaharness.mdindex 7b2cf4f7f0..0904e5b6c3 100644--- a/plugins/ruflo-metaharness/commands/ruflo-metaharness.md+++ b/plugins/ruflo-metaharness/commands/ruflo-metaharness.md@@ -3,9 +3,11 @@ name: ruflo-metaharnessdescription: MetaHarness integration — score, genome, mint, mcp-scan, threat-model — via subprocess invocations honoring ADR-150 architectural constraint----MetaHarness integration commands. All shell out to `npx metaharness ...`-or `npx -p metaharness@latest harness ...` via the `_harness.mjs`-shared helper; no library imports on ruflo's boot path.+MetaHarness integration commands. All shell out to the PINNED+`metaharness`/`harness` binaries (`metaharness@~0.3.0` — resolved from a local+install or a one-time `~/.ruflo/metaharness-cache-<pin>` install, never+`@latest`) via the `_harness.mjs` shared helper; no library imports on+ruflo's boot path.**`harness score [--path .] [--alert-on-fit-below N] [--format table|json]`** -- 5-dimension readiness scorecard (harnessFit / compileConfidence / taskCoverage / toolSafety / memoryUsefulness + estCostPerRunUsd + scaffoldReady).1. Run `node plugins/ruflo-metaharness/scripts/score.mjs --path <dir>`diff --git a/plugins/ruflo-metaharness/scripts/_darwin.mjs b/plugins/ruflo-metaharness/scripts/_darwin.mjsindex c70b607182..556837b7ee 100644--- a/plugins/ruflo-metaharness/scripts/_darwin.mjs+++ b/plugins/ruflo-metaharness/scripts/_darwin.mjs@@ -4,6 +4,11 @@// but targets the separate darwin binary (`metaharness-darwin`) which is// published as its own npm package (`@metaharness/darwin@~0.8.0`).//+// Shared plumbing (degraded classification, --json injection, trailing-JSON+// parse, degraded emitter) lives in `_invoke.mjs`. What stays here is the+// genuinely-darwin part: the ASYNC STREAMING variant (`runDarwinAsync`) that+// long `evolve` runs need for per-generation progress visibility.+//// Three subcommands surfaced (matches darwin 0.8.x — same verbs as 0.3.x,// with GEPA-engine evolve flags added upstream: --selection modes,// --crossover, --epistasis, --curriculum, --mutator ruvllm, --sandbox):@@ -28,15 +33,24 @@// smoke shapes only.import { spawnSync, spawn } from 'node:child_process';+import {+ classifyDegraded,+ importOptionalLibrary,+ injectJson,+ makeDegradedEmitter,+ parseTrailingJson,+} from './_invoke.mjs';const DEFAULT_TIMEOUT_MS = 60_000;// Pinned semver range. Bump in lock-step with optionalDependencies in// @claude-flow/cli/package.json + ruflo/package.json. The `~` allows// patch upgrades without re-pinning.-const DARWIN_PIN = '@metaharness/darwin@~0.8.0';+const DARWIN_PKG = '@metaharness/darwin';+const DARWIN_PIN_VERSION = '~0.8.0';+const DARWIN_PIN = `${DARWIN_PKG}@${DARWIN_PIN_VERSION}`;-const DEGRADED_RX = /could not determine executable|404|not installed|MODULE_NOT_FOUND|ENOTFOUND|getaddrinfo|ECONNREFUSED|ETIMEDOUT/i;+const REASON_PREFIX = 'metaharness-darwin';function buildArgv(args, wantJson) {// `metaharness-darwin` historically does NOT take --json on every@@ -45,30 +59,14 @@ function buildArgv(args, wantJson) {// explicitly request it, but never silently inject it on subcommands// that don't accept it. The shape that does support --json is the// single-verb `evolve` and `bench verify`.- if (!wantJson || args.includes('--json')) return args;- return [...args, '--json'];-}--function classifyDegraded(stderr, exitCode) {- if (exitCode === null) return { degraded: true, reason: 'metaharness-darwin-timeout' };- if (DEGRADED_RX.test(stderr)) return { degraded: true, reason: 'metaharness-darwin-not-available' };- return { degraded: false };+ return injectJson(args, wantJson);}-function maybeParseJson(stdout) {- // darwin's evolve emits a final JSON object at end of stdout when --json- // is passed; everything before is human-readable progress. Grab the LAST- // {...} block, not the first — the first may be a per-generation log line.- const matches = [...stdout.matchAll(/\{[\s\S]*?\}/g)];- if (matches.length === 0) return null;- // Try last match first; fall back to greedy single-block match.- for (let i = matches.length - 1; i >= 0; i--) {- try { return JSON.parse(matches[i][0]); } catch { /* try previous */ }- }- const greedy = /\{[\s\S]*\}/.exec(stdout);- if (greedy) { try { return JSON.parse(greedy[0]); } catch { return null; } }- return null;-}+// darwin's evolve emits a final JSON object at end of stdout when --json+// is passed; everything before is human-readable progress. Grab the LAST+// {...} block, not the first — the first may be a per-generation log line.+// (This last-block parse is now the family-wide shared implementation.)+const maybeParseJson = parseTrailingJson;/*** Sync invocation. Use for short subcommands (`bench verify`, smoke shapes).@@ -90,7 +88,7 @@ export function runDarwin(args, opts = {}) {const durationMs = Date.now() - start;const stdout = r.stdout || '';const stderr = r.stderr || '';- const classified = classifyDegraded(stderr, r.status);+ const classified = classifyDegraded(stderr, r.status, REASON_PREFIX);if (classified.degraded) {return {stdout, stderr,@@ -142,7 +140,9 @@ export function runDarwinAsync(args, opts = {}) {for (const line of lines) opts.onProgress(line);}});+ let timedOut = false;const timer = setTimeout(() => {+ timedOut = true;try { p.kill('SIGTERM'); } catch { /* ignore */ }}, timeoutMs);if (opts.signal) {@@ -156,13 +156,13 @@ export function runDarwinAsync(args, opts = {}) {stdout,stderr: stderr + String(e?.message ?? e),exitCode: 127, json: null, durationMs: Date.now() - start,- degraded: true, reason: 'metaharness-darwin-not-available',+ degraded: true, reason: `${REASON_PREFIX}-not-available`,});});p.on('close', (code) => {clearTimeout(timer);const durationMs = Date.now() - start;- const classified = classifyDegraded(stderr, code);+ const classified = classifyDegraded(stderr, timedOut ? null : code, REASON_PREFIX);if (classified.degraded) {resolve({stdout, stderr,@@ -185,18 +185,26 @@ export function runDarwinAsync(args, opts = {}) {/*** Match the existing `emitDegradedJsonAndExit` shape used by the* metaharness-umbrella scripts so MCP tool consumers see one contract.+ * Exit 0 — ADR-150 architectural constraint: ruflo continues to function+ * when MetaHarness is absent. Same posture as the umbrella scripts.*/-export function emitDarwinDegradedJsonAndExit(reason) {- const payload = {- degraded: true,- reason,- hint: 'Install with `npm i -D ' + DARWIN_PIN + '` or run `npx -y ' + DARWIN_PIN + ' --help` to verify network access.',- generatedAt: new Date().toISOString(),- };- console.log(JSON.stringify(payload, null, 2));- // Exit 0 — ADR-150 architectural constraint: ruflo continues to function- // when MetaHarness is absent. Same posture as the umbrella scripts.- process.exit(0);-}+export const emitDarwinDegradedJsonAndExit = makeDegradedEmitter(DARWIN_PKG, DARWIN_PIN_VERSION);export const DARWIN_VERSION_PIN = DARWIN_PIN;++/**+ * Resolver for the darwin GEPA LIBRARY entry (`@metaharness/darwin/gepa`).+ * Lives here (not in gepa.mjs) because gepa.mjs is a CLI script that runs+ * main() on import — this module is the import-safe home for the darwin+ * pin. Used by gepa.mjs (genome/validate/render/analyze ops) and by+ * evolve.mjs --diagnose (failure-class analysis of run transcripts).+ * Returns the module namespace or null. Never throws on absence.+ */+export function importGepa() {+ return importOptionalLibrary({+ specifier: '@metaharness/darwin/gepa',+ pkg: DARWIN_PKG,+ pinVersion: DARWIN_PIN_VERSION,+ entryRelPath: 'dist/gepa/index.js',+ });+}diff --git a/plugins/ruflo-metaharness/scripts/_harness.mjs b/plugins/ruflo-metaharness/scripts/_harness.mjsindex 27105db1c6..1f4abc86b2 100755--- a/plugins/ruflo-metaharness/scripts/_harness.mjs+++ b/plugins/ruflo-metaharness/scripts/_harness.mjs@@ -7,41 +7,147 @@// vetted bridge that every skill imports from.//// CONTRACT-// - `runMetaharness(args, opts)` — invoke `npx metaharness <args>`-// - `runHarness(args, opts)` — invoke `npx -p metaharness harness <args>`-// - both return `{ stdout, stderr, exitCode, json|null, durationMs }`+// - `runMetaharness(args, opts)` — invoke the `metaharness` binary+// - `runHarness(args, opts)` — invoke the sibling `harness` binary+// - both return `{ stdout, stderr, exitCode, json|null, durationMs, degraded, reason? }`// - `--json` flag is appended automatically when `opts.json !== false`// - subprocess hard timeout (default 60s) — captured in opts.timeoutMs-// - on MODULE_NOT_FOUND or "not installed", returns degraded result with-// `degraded: true, reason: 'metaharness-not-available'` — never throws-// (ADR-150 graceful-degradation rule #3)+// - when the package cannot be resolved/installed, returns degraded result+// with `degraded: true, reason: 'metaharness-not-available'` — never+// throws (ADR-150 graceful-degradation rule #3). A subprocess killed by+// the timeout reports `reason: 'metaharness-timeout'` instead (matches+// the sibling _darwin/_redblue helpers).+//+// SECURITY + PERF (supersedes the iter-27 npx-with-@latest-dist-tag path)+// =========================================================================+// The pre-consolidation implementation shelled to `npx -y` with the @latest+// dist-tag. Two problems, both fixed here:+// 1. SECURITY (HIGH): @latest means a compromised upstream publish executes+// arbitrary code on user machines on the very next skill invocation.+// The version is now PINNED to METAHARNESS_PIN_VERSION (tilde range —+// patch updates only) and only bumped deliberately, in lock-step with+// optionalDependencies in @claude-flow/cli + ruflo package.json.+// 2. PERF: @latest forced an npm-registry metadata check on EVERY call.+// Resolution is now (a) an already-installed local metaharness+// satisfying the pin (walk-up node_modules — free), then (b) a ONE-TIME+// `npm install --prefix ~/.ruflo/metaharness-cache-<pin>` versioned+// cache (same proven pattern as _redblue.mjs / gepa.mjs), after which+// every call is a plain `node <abs-path-to-cli>` spawn — zero network.+//+// BOTH BINARIES: the `metaharness` package ships two bins (`metaharness`+// and `harness`); their entry paths are read from the resolved package.json+// bin map rather than hardcoded, so upstream layout changes inside the+// pinned range cannot silently break us.import { spawnSync, spawn } from 'node:child_process';+import { existsSync, readFileSync } from 'node:fs';+import { join } from 'node:path';+import {+ classifyDegraded,+ ensureCachedInstall,+ findLocalPackageDir,+ injectJson,+ makeDegradedEmitter,+ parseTrailingJson,+} from './_invoke.mjs';const DEFAULT_TIMEOUT_MS = 60_000;+// Pinned semver range. Bump in lock-step with optionalDependencies in+// @claude-flow/cli/package.json + ruflo/package.json. NEVER @latest.+const METAHARNESS_PKG = 'metaharness';+const METAHARNESS_PIN_VERSION = '~0.3.0';++const REASON_NOT_AVAILABLE = 'metaharness-not-available';++/**+ * Resolve absolute paths for the two bins shipped by the metaharness+ * package. Memoized per process — the whole point is that after the first+ * resolution (or one-time cache install) every call is local-only.+ */+let RESOLVED = null;+function resolveMetaharnessBins() {+ if (RESOLVED) return RESOLVED;+ // (a) already-installed local copy satisfying the pin — free.+ const localDir = findLocalPackageDir(METAHARNESS_PKG, METAHARNESS_PIN_VERSION);+ if (localDir) {+ const bins = readBinMap(localDir);+ if (bins) return (RESOLVED = { ok: true, bins, source: 'local' });+ }+ // (b) one-time versioned cache install of the pinned range.+ const cached = ensureCachedInstall({ pkg: METAHARNESS_PKG, pinVersion: METAHARNESS_PIN_VERSION });+ if (!cached.ok) {+ return (RESOLVED = {+ ok: false,+ reason: REASON_NOT_AVAILABLE,+ stderr: cached.stderr ?? cached.error ?? '',+ stdout: cached.stdout ?? '',+ });+ }+ const bins = readBinMap(cached.pkgDir);+ if (!bins) {+ return (RESOLVED = {+ ok: false,+ reason: REASON_NOT_AVAILABLE,+ stderr: `metaharness package at ${cached.pkgDir} is missing the expected bin map (metaharness + harness)`,+ stdout: '',+ });+ }+ return (RESOLVED = { ok: true, bins, source: 'cache' });+}++/** Read both bin entry points from the package's bin map. */+function readBinMap(pkgDir) {+ try {+ const pj = JSON.parse(readFileSync(join(pkgDir, 'package.json'), 'utf-8'));+ const bin = pj.bin || {};+ if (!bin.metaharness || !bin.harness) return null;+ const metaharness = join(pkgDir, bin.metaharness);+ const harness = join(pkgDir, bin.harness);+ if (!existsSync(metaharness) || !existsSync(harness)) return null;+ return { metaharness, harness };+ } catch {+ return null;+ }+}++function degradedResult(resolved, start) {+ return {+ stdout: resolved.stdout ?? '',+ stderr: resolved.stderr ?? '',+ exitCode: 127,+ json: null,+ durationMs: Date.now() - start,+ degraded: true,+ reason: resolved.reason ?? REASON_NOT_AVAILABLE,+ };+}+/**- * iter 56 — async variant of execCli. Used by oia-audit.mjs to parallelize- * its 5 subprocess calls, dropping worst-case wall-clock from 5×TIMEOUT- * (sequential) to 1×TIMEOUT (parallel). Identical return shape to the- * sync execCli so callers can swap without ceremony.+ * Async variant (iter 56) — used by oia-audit.mjs to parallelize its 5+ * subprocess calls, dropping worst-case wall-clock from 5×TIMEOUT to+ * 1×TIMEOUT. Identical return shape to the sync path.*/-function execCliAsync(npxArgs, opts = {}) {+function execBinAsync(binName, args, opts = {}) {+ const start = Date.now();+ const resolved = resolveMetaharnessBins();+ if (!resolved.ok) return Promise.resolve(degradedResult(resolved, start));return new Promise((resolve) => {- const start = Date.now();const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS;const wantJson = opts.json !== false;- const argv = wantJson && !npxArgs.includes('--json') ? [...npxArgs, '--json'] : [...npxArgs];- const p = spawn('npx', argv, {+ const argv = injectJson(args, wantJson);+ const p = spawn('node', [resolved.bins[binName], ...argv], {stdio: ['ignore', 'pipe', 'pipe'],cwd: opts.cwd,env: { ...process.env, ...(opts.env || {}) },- shell: process.platform === 'win32',+ shell: false,});let stdout = '', stderr = '';p.stdout?.on('data', (d) => { stdout += d.toString(); });p.stderr?.on('data', (d) => { stderr += d.toString(); });+ let timedOut = false;const timer = setTimeout(() => {+ timedOut = true;try { p.kill('SIGTERM'); } catch { /* ignore */ }}, timeoutMs);p.on('error', (e) => {@@ -49,123 +155,87 @@ function execCliAsync(npxArgs, opts = {}) {resolve({stdout, stderr: stderr + String(e?.message ?? e),exitCode: 127, json: null, durationMs: Date.now() - start,- degraded: true, reason: 'metaharness-not-available',+ degraded: true, reason: REASON_NOT_AVAILABLE,});});p.on('close', (code) => {clearTimeout(timer);const durationMs = Date.now() - start;- if (code === null || /could not determine executable|404|not installed|MODULE_NOT_FOUND|ENOTFOUND|getaddrinfo|ECONNREFUSED|ETIMEDOUT/i.test(stderr)) {+ const classified = classifyDegraded(stderr, timedOut ? null : code, 'metaharness');+ if (classified.degraded) {resolve({stdout, stderr,exitCode: code ?? 127, json: null, durationMs,- degraded: true, reason: 'metaharness-not-available',+ degraded: true, reason: classified.reason,});return;}- let json = null;- if (wantJson) {- const m = /\{[\s\S]*\}/.exec(stdout);- if (m) { try { json = JSON.parse(m[0]); } catch { /* leave null */ } }- }- resolve({ stdout, stderr, exitCode: code ?? 0, json, durationMs, degraded: false });+ resolve({+ stdout, stderr,+ exitCode: code ?? 0,+ json: wantJson ? parseTrailingJson(stdout) : null,+ durationMs,+ degraded: false,+ });});});}-export function runMetaharnessAsync(args, opts) {- return execCliAsync(['-y', 'metaharness@latest', ...args], opts);-}--export function runHarnessAsync(args, opts) {- return execCliAsync(['-y', '-p', 'metaharness@latest', 'harness', ...args], opts);-}--// ITER 27 — npx invocation hardening.-// The pre-iter-27 implementation passed `'-y metaharness@latest'` as a-// SINGLE argv element to npx (`spawnSync('npx', [bin, ...argv])` where-// bin contained two whitespace-separated tokens). spawnSync with-// shell:false does no word-splitting, so npx received a literal string-// with an embedded space and either failed silently or treated the-// whole thing as a package name. The graceful-degradation path then-// reported `degraded: true` for every skill — masking the bug. Every-// argv token must now be its own array element.-function execCli(npxArgs, opts = {}) {+/** Sync invocation of one of the two resolved bins via `node <abs-path>`. */+function execBin(binName, args, opts = {}) {const start = Date.now();+ const resolved = resolveMetaharnessBins();+ if (!resolved.ok) return degradedResult(resolved, start);const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS;const wantJson = opts.json !== false;- const argv = wantJson && !npxArgs.includes('--json') ? [...npxArgs, '--json'] : [...npxArgs];- const r = spawnSync('npx', argv, {+ const argv = injectJson(args, wantJson);+ const r = spawnSync('node', [resolved.bins[binName], ...argv], {stdio: ['ignore', 'pipe', 'pipe'],encoding: 'utf-8',timeout: timeoutMs,cwd: opts.cwd, // iter 27 — let callers redirect $CWD (mint.mjs needs this)env: { ...process.env, ...(opts.env || {}) },- shell: process.platform === 'win32',+ shell: false,});const durationMs = Date.now() - start;const stdout = r.stdout || '';const stderr = r.stderr || '';- // Graceful degradation — npx couldn't find the binary.- if (r.status === null || /could not determine executable|404|not installed|MODULE_NOT_FOUND|ENOTFOUND|getaddrinfo|ECONNREFUSED|ETIMEDOUT/i.test(stderr)) {+ const classified = classifyDegraded(stderr, r.status, 'metaharness');+ if (classified.degraded) {return {stdout, stderr,exitCode: r.status ?? 127,json: null,durationMs,degraded: true,- reason: 'metaharness-not-available',+ reason: classified.reason,};}- let json = null;- if (wantJson) {- const m = /\{[\s\S]*\}/.exec(stdout);- if (m) { try { json = JSON.parse(m[0]); } catch { /* leave null */ } }- }- return { stdout, stderr, exitCode: r.status ?? 0, json, durationMs, degraded: false };+ return {+ stdout, stderr,+ exitCode: r.status ?? 0,+ json: wantJson ? parseTrailingJson(stdout) : null,+ durationMs,+ degraded: false,+ };}export function runMetaharness(args, opts) {- // iter 27 — explicit argv tokens (was: '-y metaharness@latest' as one- // string, which silently degraded every skill).- return execCli(['-y', 'metaharness@latest', ...args], opts);+ return execBin('metaharness', args, opts);}export function runHarness(args, opts) {- // The `harness` binary ships inside the `metaharness` package, so we- // need `npx -p metaharness@latest harness <args>`. spawnSync receives- // a single argv array, so encode the `-p` flag as its own argument.- const start = Date.now();- const timeoutMs = opts?.timeoutMs ?? DEFAULT_TIMEOUT_MS;- const wantJson = opts?.json !== false;- const argv = wantJson && !args.includes('--json') ? [...args, '--json'] : [...args];- const r = spawnSync('npx', ['-y', '-p', 'metaharness@latest', 'harness', ...argv], {- stdio: ['ignore', 'pipe', 'pipe'],- encoding: 'utf-8',- timeout: timeoutMs,- cwd: opts?.cwd, // iter 27 — same cwd-redirect support as runMetaharness- env: { ...process.env, ...(opts?.env || {}) },- shell: process.platform === 'win32',- });- const durationMs = Date.now() - start;- const stdout = r.stdout || '';- const stderr = r.stderr || '';- if (r.status === null || /could not determine executable|404|not installed|MODULE_NOT_FOUND|ENOTFOUND|getaddrinfo|ECONNREFUSED|ETIMEDOUT/i.test(stderr)) {- return {- stdout, stderr,- exitCode: r.status ?? 127,- json: null,- durationMs,- degraded: true,- reason: 'metaharness-not-available',- };- }- let json = null;- if (wantJson) {- const m = /\{[\s\S]*\}/.exec(stdout);- if (m) { try { json = JSON.parse(m[0]); } catch { /* leave null */ } }- }- return { stdout, stderr, exitCode: r.status ?? 0, json, durationMs, degraded: false };+ // The `harness` binary ships inside the same `metaharness` package —+ // resolved from the package.json bin map above.+ return execBin('harness', args, opts);+}++export function runMetaharnessAsync(args, opts) {+ return execBinAsync('metaharness', args, opts);+}++export function runHarnessAsync(args, opts) {+ return execBinAsync('harness', args, opts);}/**@@ -244,18 +314,17 @@ export function parseMcpScanText(stdout) {return { findings, summary };}-// Convenience emitters for skill scripts — keep the boilerplate out of+// Convenience emitter for skill scripts — keep the boilerplate out of// each skill so they focus on argument parsing + exit-code semantics.-export function emitDegradedJsonAndExit(reason) {- const payload = {- degraded: true,- reason,- hint: 'Install metaharness manually with `npm i -D metaharness` or run `npx metaharness@latest --version` to verify network access.',- generatedAt: new Date().toISOString(),- };- console.log(JSON.stringify(payload, null, 2));- // Exit 0 — ADR-150 architectural constraint says ruflo continues to- // function when MetaHarness is absent. Skills emit a structured- // degraded payload rather than failing.- process.exit(0);+// Exit 0 — ADR-150 architectural constraint says ruflo continues to+// function when MetaHarness is absent. Skills emit a structured+// degraded payload rather than failing.+export const emitDegradedJsonAndExit = makeDegradedEmitter(METAHARNESS_PKG, METAHARNESS_PIN_VERSION);++export const METAHARNESS_VERSION_PIN = `${METAHARNESS_PKG}@${METAHARNESS_PIN_VERSION}`;++/** Expose resolution for diagnostics/tests (which path served the bins). */+export function metaharnessResolution() {+ const r = resolveMetaharnessBins();+ return r.ok ? { ok: true, source: r.source, bins: r.bins } : { ok: false, reason: r.reason };}diff --git a/plugins/ruflo-metaharness/scripts/_invoke.mjs b/plugins/ruflo-metaharness/scripts/_invoke.mjsnew file mode 100644index 0000000000..31304ab580--- /dev/null+++ b/plugins/ruflo-metaharness/scripts/_invoke.mjs@@ -0,0 +1,231 @@+// _invoke.mjs — shared subprocess/plumbing layer for the metaharness plugin family.+//+// Extracted from the copy-pasted plumbing that had accreted across+// _harness.mjs / _darwin.mjs / _redblue.mjs / gepa.mjs (converged+// security/perf/arch review, 2026-07). The four invocation helpers are now+// thin adapters on top of this module; their exported function signatures+// are unchanged (~15 scripts import them).+//+// WHAT LIVES HERE (the genuinely-shared parts):+// - DEGRADED_RX one superset regex (incl. `npm ERR` — previously+// only _redblue had it) for "upstream unavailable"+// - classifyDegraded() timeout vs not-available distinction, per-package+// reason prefix+// - injectJson() append --json unless caller opted out / present+// - parseTrailingJson() LAST-{...}-block extraction (the _darwin variant;+// the old _harness FIRST-block variant was a live+// bug — a progress line containing `{...}` would+// shadow the final structured result)+// - ensureCachedInstall() one-time `npm install --prefix ~/.ruflo/<name>-cache-<pin>`+// of a PINNED range — generalizes _redblue.mjs /+// gepa.mjs; the versioned dir means pin bumps+// invalidate stale caches automatically+// - findLocalPackageDir() walk-up node_modules resolution so an already+// installed optionalDependency is used for free+// - importOptionalLibrary() bare-import → cached-install fallback for+// library entries (gepa) — never throws on absence+// - makeDegradedEmitter() the ADR-150 rule-#3 exit-0 degraded payload+//+// WHAT DOES NOT LIVE HERE (the per-consumer parts):+// - _redblue's node-direct isMain workaround rationale+// - _darwin's async streaming (`onProgress`) for long evolve runs+// - _harness's dual-binary (metaharness + harness) resolution+//+// TEST SEAMS (used by test-graceful-degradation.mjs so the ADR-150 drill+// stays meaningful on machines with a warm cache / local install):+// - RUFLO_METAHARNESS_CACHE_BASE overrides ~/.ruflo as the cache root+// - RUFLO_METAHARNESS_SKIP_LOCAL=1 disables local node_modules resolution++import { spawnSync } from 'node:child_process';+import { existsSync, mkdirSync, readFileSync } from 'node:fs';+import { homedir } from 'node:os';+import { dirname, join } from 'node:path';+import { fileURLToPath, pathToFileURL } from 'node:url';++const INSTALL_TIMEOUT_MS = 180_000; // npm install can be slow on cold cache++// Superset of the three per-file regexes. `npm ERR` (from _redblue) is+// included for everyone: an npm-level failure during a cached install or an+// npx shim means "upstream unavailable", never a ruflo bug.+export const DEGRADED_RX = /could not determine executable|404|not installed|MODULE_NOT_FOUND|ENOTFOUND|getaddrinfo|ECONNREFUSED|ETIMEDOUT|npm ERR/i;++/**+ * Classify a finished subprocess as degraded or healthy.+ * `exitCode === null` means the harness killed it (timeout) — that is a+ * DIFFERENT operational signal from "package not installable", so the two+ * reasons stay distinct: `<prefix>-timeout` vs `<prefix>-not-available`.+ */+export function classifyDegraded(stderr, exitCode, reasonPrefix) {+ if (exitCode === null) return { degraded: true, reason: `${reasonPrefix}-timeout` };+ if (DEGRADED_RX.test(stderr || '')) return { degraded: true, reason: `${reasonPrefix}-not-available` };+ return { degraded: false };+}++/** Append --json unless the caller opted out or already passed it. */+export function injectJson(args, wantJson) {+ if (!wantJson || args.includes('--json')) return [...args];+ return [...args, '--json'];+}++/**+ * Parse the trailing JSON object from mixed stdout. CLIs in this family emit+ * human-readable progress first and a structured JSON object LAST — so grab+ * the last parseable {...} block, falling back to a greedy whole-span match+ * for nested objects the lazy regex fragments.+ */+export function parseTrailingJson(stdout) {+ const s = stdout || '';+ const matches = [...s.matchAll(/\{[\s\S]*?\}/g)];+ for (let i = matches.length - 1; i >= 0; i--) {+ try { return JSON.parse(matches[i][0]); } catch { /* try previous */ }+ }+ const greedy = /\{[\s\S]*\}/.exec(s);+ if (greedy) { try { return JSON.parse(greedy[0]); } catch { return null; } }+ return null;+}++/** Cache root — ~/.ruflo unless the test seam overrides it. */+export function cacheBaseDir() {+ return process.env.RUFLO_METAHARNESS_CACHE_BASE || join(homedir(), '.ruflo');+}++/** Minimal `~X.Y.Z` satisfaction check (no semver dep): same major.minor, patch >= Z. */+export function satisfiesTildeRange(version, pinVersion) {+ const pin = /^~(\d+)\.(\d+)\.(\d+)/.exec(String(pinVersion));+ const ver = /^(\d+)\.(\d+)\.(\d+)/.exec(String(version));+ if (!pin || !ver) return false;+ return ver[1] === pin[1] && ver[2] === pin[2] && parseInt(ver[3], 10) >= parseInt(pin[3], 10);+}++/**+ * Walk up node_modules from this plugin's directory AND from $CWD looking+ * for an already-installed copy of `pkg` (e.g. the optionalDependency the+ * user's ruflo install shipped with). Returns the package dir or null.+ * When `pinVersion` is given, only a copy satisfying the pin is accepted —+ * a stale major/minor in an ancestor node_modules is skipped, not used.+ */+export function findLocalPackageDir(pkg, pinVersion) {+ if (process.env.RUFLO_METAHARNESS_SKIP_LOCAL === '1') return null;+ const segments = pkg.split('/');+ const starts = [dirname(fileURLToPath(import.meta.url)), process.cwd()];+ const seen = new Set();+ for (const start of starts) {+ let dir = start;+ for (;;) {+ if (!seen.has(dir)) {+ seen.add(dir);+ const candidate = join(dir, 'node_modules', ...segments);+ const pj = join(candidate, 'package.json');+ if (existsSync(pj)) {+ if (!pinVersion) return candidate;+ try {+ const version = JSON.parse(readFileSync(pj, 'utf-8')).version;+ if (satisfiesTildeRange(version, pinVersion)) return candidate;+ } catch { /* unreadable — keep walking */ }+ }+ }+ const parent = dirname(dir);+ if (parent === dir) break;+ dir = parent;+ }+ }+ return null;+}++/**+ * One-time versioned cache install of a PINNED range. Generalizes+ * gepa.mjs:98-121 / _redblue.mjs:72-102. The cache dir is+ * `<base>/<shortname>-cache-<pin-digits>` (e.g. redblue-cache-0.1.4,+ * darwin-cache-0.8.0, metaharness-cache-0.3.0) so existing caches created+ * by the pre-consolidation helpers remain valid, and bumping the pin+ * invalidates stale installs automatically.+ *+ * @param {object} spec+ * @param {string} spec.pkg npm package name (may be scoped)+ * @param {string} spec.pinVersion tilde range, e.g. '~0.3.0'+ * @param {string} [spec.cliRelPath] path inside the package that must exist+ * post-install (also returned as cliPath)+ * @param {number} [spec.timeoutMs] install timeout (default 180s)+ * @returns {{ok:true, cacheDir:string, pkgDir:string, cliPath:string|null} |+ * {ok:false, reason:string, stderr?:string, stdout?:string, error?:string}}+ */+export function ensureCachedInstall({ pkg, pinVersion, cliRelPath, timeoutMs = INSTALL_TIMEOUT_MS }) {+ const short = pkg.split('/').pop();+ const cacheDir = join(cacheBaseDir(), `${short}-cache-${pinVersion.replace(/[~^]/g, '')}`);+ const pkgDir = join(cacheDir, 'node_modules', ...pkg.split('/'));+ const cliPath = cliRelPath ? join(pkgDir, cliRelPath) : null;+ const probe = cliPath ?? join(pkgDir, 'package.json');+ if (existsSync(probe)) return { ok: true, cacheDir, pkgDir, cliPath };+ try {+ mkdirSync(cacheDir, { recursive: true });+ } catch (e) {+ return { ok: false, reason: 'cache-dir-create-failed', error: String(e) };+ }+ // `npm install --prefix` puts the package in a known location; this both+ // avoids npx's symlinked bin shim (the _redblue isMain upstream bug) and+ // removes the per-call registry check that `npx -y pkg@latest` forced.+ // shell:false; argv only.+ const r = spawnSync('npm', [+ 'install',+ '--no-audit', '--no-fund', '--no-package-lock',+ '--prefix', cacheDir,+ `${pkg}@${pinVersion}`,+ ], {+ stdio: ['ignore', 'pipe', 'pipe'],+ encoding: 'utf-8',+ timeout: timeoutMs,+ shell: process.platform === 'win32',+ });+ if (r.status !== 0 || !existsSync(probe)) {+ return {+ ok: false,+ reason: 'install-failed',+ stderr: (r.stderr || '').slice(0, 600),+ stdout: (r.stdout || '').slice(0, 600),+ };+ }+ return { ok: true, cacheDir, pkgDir, cliPath };+}++/**+ * Import an optional LIBRARY entry (as opposed to spawning a CLI):+ * 1. bare `import(specifier)` — free when the optional dep is installed in+ * an ancestor node_modules;+ * 2. versioned cache install + file-URL import of `entryRelPath`.+ * Returns the module namespace or null. Never throws on absence / stale+ * installs (ERR_PACKAGE_PATH_NOT_EXPORTED covers pre-subpath versions).+ */+export async function importOptionalLibrary({ specifier, pkg, pinVersion, entryRelPath }) {+ try {+ return await import(specifier);+ } catch (e) {+ const msg = String(e?.message ?? e);+ const recoverable = /Cannot find (module|package)|ERR_MODULE_NOT_FOUND|MODULE_NOT_FOUND|ERR_PACKAGE_PATH_NOT_EXPORTED|is not defined by "exports"/i;+ if (!recoverable.test(msg)) throw e;+ }+ const r = ensureCachedInstall({ pkg, pinVersion, cliRelPath: entryRelPath });+ if (!r.ok || !r.cliPath) return null;+ try {+ return await import(pathToFileURL(r.cliPath).href);+ } catch {+ return null;+ }+}++/**+ * Build the per-package `emit*DegradedJsonAndExit(reason)` helper. Emits the+ * structured degraded payload and exits 0 — ADR-150 architectural constraint+ * rule #3: ruflo continues to function when MetaHarness is absent.+ */+export function makeDegradedEmitter(pkg, pinVersion) {+ return function emitDegradedAndExit(reason) {+ const payload = {+ degraded: true,+ reason,+ hint: `Install with \`npm i -D ${pkg}@${pinVersion}\` (pinned range — this plugin never fetches @latest) or verify network access for the one-time cache install.`,+ generatedAt: new Date().toISOString(),+ };+ console.log(JSON.stringify(payload, null, 2));+ process.exit(0);+ };+}diff --git a/plugins/ruflo-metaharness/scripts/_redblue.mjs b/plugins/ruflo-metaharness/scripts/_redblue.mjsindex e59eada533..cde4e1a40e 100644--- a/plugins/ruflo-metaharness/scripts/_redblue.mjs+++ b/plugins/ruflo-metaharness/scripts/_redblue.mjs@@ -1,7 +1,10 @@// _redblue.mjs — invocation helper for `@metaharness/redblue`.//// Sibling of `_darwin.mjs` / `_harness.mjs`. Targets the `redblue` binary-// from the standalone `@metaharness/redblue@~0.1.4` package.+// from the standalone `@metaharness/redblue@~0.1.4` package. Shared plumbing+// (degraded classification, versioned cache install, degraded emitter) lives+// in `_invoke.mjs`; what stays here is the genuinely-redblue part: the+// node-direct invocation rationale below.//// Subcommands surfaced (matches redblue 0.1.x):// - `redblue init [--out redblue.yaml]`@@ -21,12 +24,13 @@// no error. Darwin's CLI doesn't suffer this (calls main() unconditionally).//// Workaround: install the package once into a ruflo-owned cache dir-// (~/.ruflo/redblue-cache) and invoke `node <abs_path>/dist/cli/index.js`-// directly. argv[1] then equals the real path and isMain becomes true.+// (~/.ruflo/redblue-cache-<pin>, via _invoke.ensureCachedInstall) and invoke+// `node <abs_path>/dist/cli/index.js` directly. argv[1] then equals the real+// path and isMain becomes true.//// Track upstream fix at: github.com/ruvnet/agent-harness-generator/issues-// (file separately — when fixed, we can drop the cached-install path and-// go back to the `npx -y -p ...` pattern used by _darwin.mjs).+// (file separately — when fixed, we could go back to a bin-shim pattern,+// though the node-direct cached path is now the family-wide standard anyway).//// CONTRACT (matches runMetaharness/runDarwin):// - returns `{ stdout, stderr, exitCode, durationMs, degraded, reason? }`@@ -43,69 +47,29 @@// $OPENROUTER_API_KEY which we never inject.import { spawnSync } from 'node:child_process';-import { existsSync, mkdirSync } from 'node:fs';import { homedir } from 'node:os';import { join } from 'node:path';+import {+ classifyDegraded,+ ensureCachedInstall,+ makeDegradedEmitter,+} from './_invoke.mjs';const DEFAULT_TIMEOUT_MS = 120_000;-const INSTALL_TIMEOUT_MS = 180_000; // npm install can be slow on cold cache// Pinned semver range. Bump in lock-step with optionalDependencies in// @claude-flow/cli/package.json + ruflo/package.json.-const REDBLUE_PIN = '@metaharness/redblue@~0.1.4';const REDBLUE_PKG = '@metaharness/redblue';const REDBLUE_PIN_VERSION = '~0.1.4';+const REDBLUE_PIN = `${REDBLUE_PKG}@${REDBLUE_PIN_VERSION}`;-// Cache dir is versioned by the pin so bumping REDBLUE_PIN_VERSION-// invalidates stale installs — ensureInstalled() short-circuits on-// existsSync(RESOLVED_CLI), so an unversioned dir would keep serving-// the old package forever after a pin bump.-const CACHE_DIR = join(- homedir(), '.ruflo', `redblue-cache-${REDBLUE_PIN_VERSION.replace(/[~^]/g, '')}`,-);-const RESOLVED_CLI = join(- CACHE_DIR, 'node_modules', '@metaharness', 'redblue', 'dist', 'cli', 'index.js',-);--const DEGRADED_RX = /could not determine executable|404|not installed|MODULE_NOT_FOUND|ENOTFOUND|getaddrinfo|ECONNREFUSED|ETIMEDOUT|npm ERR/i;--function ensureInstalled() {- if (existsSync(RESOLVED_CLI)) return { ok: true };- try {- mkdirSync(CACHE_DIR, { recursive: true });- } catch (e) {- return { ok: false, reason: 'cache-dir-create-failed', error: String(e) };- }- // Use `npm install --prefix` so the package lands in a known location;- // this avoids npx's symlinked shim entirely (the upstream bin-bootstrap bug).- // shell:false; argv only.- const r = spawnSync('npm', [- 'install',- '--no-audit', '--no-fund', '--no-package-lock',- '--prefix', CACHE_DIR,- `${REDBLUE_PKG}@${REDBLUE_PIN_VERSION}`,- ], {- stdio: ['ignore', 'pipe', 'pipe'],- encoding: 'utf-8',- timeout: INSTALL_TIMEOUT_MS,- shell: process.platform === 'win32',- });- if (r.status !== 0 || !existsSync(RESOLVED_CLI)) {- return {- ok: false,- reason: 'install-failed',- stderr: (r.stderr || '').slice(0, 600),- stdout: (r.stdout || '').slice(0, 600),- };- }- return { ok: true };-}+const REASON_PREFIX = 'metaharness-redblue';-function classifyDegraded(stderr, exitCode) {- if (exitCode === null) return { degraded: true, reason: 'metaharness-redblue-timeout' };- if (DEGRADED_RX.test(stderr)) return { degraded: true, reason: 'metaharness-redblue-not-available' };- return { degraded: false };-}+// Cache dir is versioned by the pin so bumping REDBLUE_PIN_VERSION+// invalidates stale installs (handled inside ensureCachedInstall). The+// resolved layout matches the pre-consolidation helper so existing caches+// keep serving.+const CLI_REL_PATH = join('dist', 'cli', 'index.js');/*** Sync invocation. `redblue` runs are bounded by `max_cost_usd` and@@ -117,7 +81,11 @@ export function runRedblue(args, opts = {}) {const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS;// 1. Ensure redblue is installed in our cache dir (one-time install).- const install = ensureInstalled();+ const install = ensureCachedInstall({+ pkg: REDBLUE_PKG,+ pinVersion: REDBLUE_PIN_VERSION,+ cliRelPath: CLI_REL_PATH,+ });if (!install.ok) {return {stdout: install.stdout ?? '',@@ -126,14 +94,14 @@ export function runRedblue(args, opts = {}) {durationMs: Date.now() - start,degraded: true,reason: install.reason === 'install-failed'- ? 'metaharness-redblue-not-available'- : `metaharness-redblue-${install.reason}`,+ ? `${REASON_PREFIX}-not-available`+ : `${REASON_PREFIX}-${install.reason}`,};}// 2. Invoke `node <real-path-to-cli> <args>` so upstream's isMain check// succeeds (argv[1] matches import.meta.url).- const r = spawnSync('node', [RESOLVED_CLI, ...args], {+ const r = spawnSync('node', [install.cliPath, ...args], {stdio: ['ignore', 'pipe', 'pipe'],encoding: 'utf-8',timeout: timeoutMs,@@ -144,7 +112,7 @@ export function runRedblue(args, opts = {}) {const durationMs = Date.now() - start;const stdout = r.stdout || '';const stderr = r.stderr || '';- const classified = classifyDegraded(stderr, r.status);+ const classified = classifyDegraded(stderr, r.status, REASON_PREFIX);if (classified.degraded) {return {stdout, stderr,@@ -164,19 +132,12 @@ export function runRedblue(args, opts = {}) {/*** Match the existing `emit*DegradedJsonAndExit` shape used by sibling- * scripts so MCP tool consumers see one contract.+ * scripts so MCP tool consumers see one contract. Exit 0 — ADR-150+ * architectural constraint #3.*/-export function emitRedblueDegradedJsonAndExit(reason) {- const payload = {- degraded: true,- reason,- hint: 'Install with `npm i -D ' + REDBLUE_PIN + '` or run `npx -y ' + REDBLUE_PIN + ' --help` to verify network access.',- generatedAt: new Date().toISOString(),- };- console.log(JSON.stringify(payload, null, 2));- // Exit 0 — ADR-150 architectural constraint #3.- process.exit(0);-}+export const emitRedblueDegradedJsonAndExit = makeDegradedEmitter(REDBLUE_PKG, REDBLUE_PIN_VERSION);export const REDBLUE_VERSION_PIN = REDBLUE_PIN;-export const REDBLUE_CACHE_DIR = CACHE_DIR;+export const REDBLUE_CACHE_DIR = join(+ homedir(), '.ruflo', `redblue-cache-${REDBLUE_PIN_VERSION.replace(/[~^]/g, '')}`,+);diff --git a/plugins/ruflo-metaharness/scripts/evolve.mjs b/plugins/ruflo-metaharness/scripts/evolve.mjsindex 635c659e91..7c54c94fd3 100644--- a/plugins/ruflo-metaharness/scripts/evolve.mjs+++ b/plugins/ruflo-metaharness/scripts/evolve.mjs@@ -24,6 +24,23 @@// node scripts/evolve.mjs --repo . --confirm --generations 5 --children 3// node scripts/evolve.mjs --repo . --confirm --sandbox mock # no real tests// node scripts/evolve.mjs --repo . --confirm --selection pareto+// node scripts/evolve.mjs --repo . --confirm --diagnose # + GEPA failure diagnosis+//+// --diagnose (GEPA failure diagnosis — the natural-language-diagnosis trick+// from GEPA, scoped modestly): after the evolve run completes, the losing /+// failed variants' transcripts are run through darwin's gepa+// `analyzeTranscript` + `classifyFailure` ops and a `diagnosis` section+// (failure classes + counts + dominant class per variant) is appended to the+// emitted JSON report. UPSTREAM SHAPE NOTE (verified against darwin 0.8.0):+// `metaharness-darwin evolve --json` emits a TEXT leaderboard on stdout — no+// JSON, no transcripts. The per-variant run records live at+// `<repo>/.metaharness/runs/<id>.json` as sandbox exec traces+// ({taskId, exitCode, stdout, stderr}), which are NOT gepa {actionRaw, obs}+// transcripts. So the diagnosis layer (a) uses gepa-shaped transcripts when+// a run record embeds them (agent-sandbox / future upstream), (b) falls back+// to the champion's transcript, and (c) otherwise emits+// `diagnosis: {available: false, reason, traceSummary}` with a mechanical+// per-variant trace summary — it NEVER fails the run.//// EXIT CODES// 0 evolved OK (or dry-run, or degraded — MetaHarness Darwin not available)@@ -31,9 +48,9 @@// 2 config error or evolution failure// 99 reserved — upstream "safety-disqualified" (propagated)-import { runDarwinAsync, emitDarwinDegradedJsonAndExit } from './_darwin.mjs';-import { existsSync } from 'node:fs';-import { resolve } from 'node:path';+import { runDarwinAsync, emitDarwinDegradedJsonAndExit, importGepa } from './_darwin.mjs';+import { existsSync, readdirSync, readFileSync } from 'node:fs';+import { join, resolve } from 'node:path';const ARGS = (() => {const a = {@@ -56,6 +73,7 @@ const ARGS = (() => {ruvllmModel: null,confirm: false,alertOnNoImprovement: false,+ diagnose: false,format: 'json',timeoutMs: null, // computed below if unset};@@ -80,6 +98,7 @@ const ARGS = (() => {else if (v === '--ruvllm-model') a.ruvllmModel = process.argv[++i];else if (v === '--confirm') a.confirm = true;else if (v === '--alert-on-no-improvement') a.alertOnNoImprovement = true;+ else if (v === '--diagnose') a.diagnose = true;else if (v === '--format') a.format = process.argv[++i];else if (v === '--timeout-ms') a.timeoutMs = parseInt(process.argv[++i], 10);}@@ -119,6 +138,141 @@ function safetyChecks() {return repoPath;}+// ---------------------------------------------------------------------------+// --diagnose support (GEPA failure diagnosis)+// ---------------------------------------------------------------------------++/** True when `arr` looks like a gepa transcript: [{actionRaw?, obs?}, ...]. */+function looksLikeGepaTranscript(arr) {+ return Array.isArray(arr) && arr.length > 0 &&+ arr.every((e) => e && typeof e === 'object' && ('actionRaw' in e || 'obs' in e));+}++/**+ * Pull every gepa-shaped transcript out of one run record. Upstream darwin+ * 0.8.0 run records carry sandbox exec traces (NOT gepa transcripts), but a+ * record MAY embed `transcript` arrays (agent sandbox / future upstream) —+ * accept `record.transcript`, `record.traces[i].transcript`, or `traces`+ * itself when its entries are {actionRaw, obs}-shaped.+ */+function extractGepaTranscripts(record) {+ const out = [];+ if (looksLikeGepaTranscript(record?.transcript)) {+ out.push({ taskId: null, exitCode: null, entries: record.transcript });+ }+ const traces = Array.isArray(record?.traces) ? record.traces : [];+ if (looksLikeGepaTranscript(traces)) {+ out.push({ taskId: null, exitCode: null, entries: traces });+ } else {+ for (const t of traces) {+ if (looksLikeGepaTranscript(t?.transcript)) {+ out.push({ taskId: t.taskId ?? null, exitCode: t.exitCode ?? null, entries: t.transcript });+ }+ }+ }+ return out;+}++/** Mechanical per-variant summary of sandbox exec traces (the always-available fallback signal). */+function summarizeTraces(record) {+ const traces = Array.isArray(record?.traces) ? record.traces : [];+ return {+ tasks: traces.length,+ failed: traces.filter((t) => t?.exitCode !== 0).length,+ timedOut: traces.filter((t) => t?.timedOut === true).length,+ blockedActions: traces.reduce((n, t) => n + (Array.isArray(t?.blockedActions) ? t.blockedActions.length : 0), 0),+ };+}++/**+ * Build the `diagnosis` section for the emitted report. Never throws and+ * never affects the run's exit code — any internal failure degrades to+ * `{available: false, reason}`.+ */+async function buildDiagnosis(repoPath) {+ try {+ const metaDir = join(repoPath, '.metaharness');+ const runsDir = join(metaDir, 'runs');+ if (!existsSync(runsDir)) {+ return { available: false, reason: 'no-run-records: <repo>/.metaharness/runs does not exist' };+ }+ let winnerId = null;+ try {+ winnerId = JSON.parse(readFileSync(join(metaDir, 'reports', 'winner.json'), 'utf-8'))?.variant?.id ?? null;+ } catch { /* winner unknown — treat all variants as candidates */ }++ const records = [];+ for (const f of readdirSync(runsDir).filter((f) => f.endsWith('.json')).slice(0, 100)) {+ try {+ records.push({ id: f.replace(/\.json$/, ''), rec: JSON.parse(readFileSync(join(runsDir, f), 'utf-8')) });+ } catch { /* skip unreadable record */ }+ }+ if (records.length === 0) {+ return { available: false, reason: 'no-run-records: <repo>/.metaharness/runs contains no parseable records' };+ }++ // Losing/failed variants are the primary diagnosis targets; the champion+ // is the fallback when no loser exposes a transcript.+ const losers = records.filter((r) =>+ r.id !== winnerId &&+ (r.rec?.score?.promoted === false ||+ (Array.isArray(r.rec?.traces) && r.rec.traces.some((t) => t?.exitCode !== 0 || t?.timedOut))));+ const champion = records.filter((r) => r.id === winnerId);++ let scope = 'losing-variants';+ let pool = losers.map((r) => ({ ...r, transcripts: extractGepaTranscripts(r.rec) }))+ .filter((r) => r.transcripts.length > 0);+ if (pool.length === 0) {+ scope = 'champion-fallback';+ pool = champion.map((r) => ({ ...r, transcripts: extractGepaTranscripts(r.rec) }))+ .filter((r) => r.transcripts.length > 0);+ }++ if (pool.length === 0) {+ // Verified upstream shape (darwin 0.8.0): run records are sandbox exec+ // traces, not gepa transcripts. Emit the mechanical trace summary so+ // --diagnose still yields signal.+ const target = losers.length ? losers : records;+ return {+ available: false,+ reason: 'no-gepa-transcripts: run records contain sandbox exec traces ({taskId, exitCode, stdout, stderr}), not gepa {actionRaw, obs} transcripts',+ traceSummary: Object.fromEntries(target.map((r) => [r.id, summarizeTraces(r.rec)])),+ };+ }++ const gepa = await importGepa();+ if (!gepa || typeof gepa.analyzeTranscript !== 'function') {+ return { available: false, reason: 'metaharness-darwin-gepa-not-available' };+ }++ const classLabel = (n) => {+ const raw = gepa.FAILURE_CLASSES?.[n];+ return raw ? String(raw).split(' (')[0] : `class-${n}`;+ };++ const totals = {};+ const variants = [];+ for (const r of pool) {+ const classes = {};+ for (const t of r.transcripts) {+ const analysis = gepa.analyzeTranscript(t.entries);+ const cls = typeof gepa.classifyFailure === 'function'+ ? gepa.classifyFailure({ goldResolved: t.exitCode === 0, analysis })+ : -1;+ const label = classLabel(cls);+ classes[label] = (classes[label] || 0) + 1;+ totals[label] = (totals[label] || 0) + 1;+ }+ const dominantClass = Object.entries(classes).sort((a, b) => b[1] - a[1])[0]?.[0] ?? null;+ variants.push({ id: r.id, transcripts: r.transcripts.length, failureClasses: classes, dominantClass });+ }++ return { available: true, scope, variants, totals };+ } catch (e) {+ return { available: false, reason: `diagnosis-failed: ${e?.message ?? e}` };+ }+}+// Compute a sensible timeout from the search shape if caller didn't specify.// Rough budget: each variant ~= 30s (sandbox test command + safety inspect),// total ~= generations × children × per-variant / concurrency.@@ -146,6 +300,7 @@ async function main() {epistasis: ARGS.epistasis,curriculum: ARGS.curriculum,mutator: ARGS.mutator,+ diagnose: ARGS.diagnose,estVariants: ARGS.generations * ARGS.children,timeoutMs: ARGS.timeoutMs ?? defaultTimeoutMs(),output: `${repoPath}/.metaharness/{archive.json, lineage.json, variants/, runs/, reports/winner.json}`,@@ -233,6 +388,11 @@ async function main() {generatedAt: new Date().toISOString(),};+ // GEPA failure diagnosis — opt-in, additive, never fails the run.+ if (ARGS.diagnose) {+ payload.data.diagnosis = await buildDiagnosis(repoPath);+ }+console.log(JSON.stringify(payload, null, 2));if (ARGS.alertOnNoImprovement && noImprovement) process.exit(1);process.exit(0);diff --git a/plugins/ruflo-metaharness/scripts/gepa.mjs b/plugins/ruflo-metaharness/scripts/gepa.mjsindex 5f230b8000..e718083715 100644--- a/plugins/ruflo-metaharness/scripts/gepa.mjs+++ b/plugins/ruflo-metaharness/scripts/gepa.mjs@@ -22,11 +22,12 @@//// MODULE RESOLUTION (ADR-150 graceful degradation)// ================================================+// Delegated to _invoke.importOptionalLibrary (family-wide consolidation):// 1. Try bare `import('@metaharness/darwin/gepa')` — free when the optional// dep is installed in an ancestor node_modules.// 2. Fall back to a ruflo-owned versioned cache install-// (~/.ruflo/darwin-cache-<pin>) — same pattern as _redblue.mjs; the-// versioned dir means pin bumps invalidate stale caches automatically.+// (~/.ruflo/darwin-cache-<pin>) — the versioned dir means pin bumps+// invalidate stale caches automatically.// 3. Both fail → `{degraded: true}` exit 0. Never throws.//// EXIT CODES@@ -34,20 +35,11 @@// 1 --alert-on-invalid and validate found errors// 2 config error (bad op / missing file)-import { readFileSync, existsSync, mkdirSync } from 'node:fs';-import { spawnSync } from 'node:child_process';-import { homedir } from 'node:os';-import { join } from 'node:path';-import { pathToFileURL } from 'node:url';+import { readFileSync, existsSync } from 'node:fs';+import { importGepa, DARWIN_VERSION_PIN } from './_darwin.mjs';-// Bump in lock-step with DARWIN_PIN in _darwin.mjs + optionalDependencies.-const DARWIN_PIN_VERSION = '~0.8.0';-const CACHE_DIR = join(- homedir(), '.ruflo', `darwin-cache-${DARWIN_PIN_VERSION.replace(/[~^]/g, '')}`,-);-const CACHED_GEPA = join(- CACHE_DIR, 'node_modules', '@metaharness', 'darwin', 'dist', 'gepa', 'index.js',-);+// Pin lives in _darwin.mjs (DARWIN_VERSION_PIN) — single source of truth.+const DARWIN_PIN_VERSION = DARWIN_VERSION_PIN.split('@').pop();const ARGS = (() => {const a = {@@ -83,44 +75,6 @@ function emitDegradedAndExit(reason) {process.exit(0); // ADR-150 — ruflo stays operational without MetaHarness}-async function importGepa() {- try {- return await import('@metaharness/darwin/gepa');- } catch (e) {- const msg = String(e?.message ?? e);- // Fall back on absence AND on stale installs: a pre-0.8.0 darwin in an- // ancestor node_modules has no './gepa' subpath, which throws- // ERR_PACKAGE_PATH_NOT_EXPORTED rather than MODULE_NOT_FOUND.- const recoverable = /Cannot find (module|package)|ERR_MODULE_NOT_FOUND|MODULE_NOT_FOUND|ERR_PACKAGE_PATH_NOT_EXPORTED|is not defined by "exports"/i;- if (!recoverable.test(msg)) throw e;- }- // Cached-install fallback.- if (!existsSync(CACHED_GEPA)) {- try {- mkdirSync(CACHE_DIR, { recursive: true });- } catch {- return null;- }- const r = spawnSync('npm', [- 'install',- '--no-audit', '--no-fund', '--no-package-lock',- '--prefix', CACHE_DIR,- `@metaharness/darwin@${DARWIN_PIN_VERSION}`,- ], {- stdio: ['ignore', 'pipe', 'pipe'],- encoding: 'utf-8',- timeout: 180_000,- shell: process.platform === 'win32',- });- if (r.status !== 0 || !existsSync(CACHED_GEPA)) return null;- }- try {- return await import(pathToFileURL(CACHED_GEPA).href);- } catch {- return null;- }-}-function readJsonFile(path, label) {if (!path || !existsSync(path)) {console.error(`gepa: ${label} file not found: ${path}`);diff --git a/plugins/ruflo-metaharness/scripts/smoke.sh b/plugins/ruflo-metaharness/scripts/smoke.shindex db548c201d..cbc545670c 100755--- a/plugins/ruflo-metaharness/scripts/smoke.sh+++ b/plugins/ruflo-metaharness/scripts/smoke.sh@@ -8,6 +8,29 @@ step() { printf "→ %s ... " "$1"; }ok() { printf "PASS\n"; PASS=$((PASS+1)); }bad() { printf "FAIL: %s\n" "$1"; FAIL=$((FAIL+1)); }+# ---------------------------------------------------------------------------+# Derived surface counts (converged arch review, 2026-07).+# The MCP-tool count (was hardcoded 15 in 4 places) and the CLI-subcommand+# count (was hardcoded 13 in 2 places, plus the 16 footnote) are derived ONCE+# from the source-of-truth files here. Every assertion below compares an+# INDEPENDENT surface (CLAUDE.md catalog, test-mcp-tools literal, footnote+# occurrences, runScript refs) against these derived values — never a surface+# against itself. Adding a tool/subcommand upstream now only requires updating+# the OTHER surfaces, not this script.+TOOLS_SRC="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"+SUBS_SRC="$ROOT/../../v3/@claude-flow/cli/src/commands/metaharness.ts"+EXPECTED_TOOLS=$(grep -cE "name: 'metaharness_" "$TOOLS_SRC" 2>/dev/null; true)+EXPECTED_SUBS=$(grep -cE "^[[:space:]]+'?[a-z-]+'?:[[:space:]]*'[a-z-]+\.mjs'" "$SUBS_SRC" 2>/dev/null; true)+: "${EXPECTED_TOOLS:=0}"+: "${EXPECTED_SUBS:=0}"++step "0. derived surface counts extracted (tools >= 15, subcommands >= 13 — regex-rot floor)"+if [[ "$EXPECTED_TOOLS" -ge 15 && "$EXPECTED_SUBS" -ge 13 ]]; then+ ok+else+ bad "extraction-regex-rot: EXPECTED_TOOLS=$EXPECTED_TOOLS EXPECTED_SUBS=$EXPECTED_SUBS"+fi+step "1. plugin.json declares 0.1.0 with adr-150 keywords"v=$(grep -E '"version"' "$ROOT/.claude-plugin/plugin.json" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1)if [[ "$v" != "0.1.0" ]]; then@@ -45,6 +68,26 @@ grep -q "metaharness-not-available" "$F" || miss="$miss no-degraded-reason"grep -q "degraded: true" "$F" || miss="$miss no-degraded-flag"[[ -z "$miss" ]] && ok || bad "$miss"+step "3b. _invoke.mjs shared plumbing layer (consolidation, 2026-07)"+F="$ROOT/scripts/_invoke.mjs"+miss=""+[[ -f "$F" ]] || miss="$miss missing"+node --check "$F" 2>/dev/null || miss="$miss syntax-error"+# The consolidated helpers every adapter (_harness/_darwin/_redblue/gepa) uses+for sym in DEGRADED_RX classifyDegraded injectJson parseTrailingJson ensureCachedInstall makeDegradedEmitter importOptionalLibrary findLocalPackageDir; do+ grep -q "export.*${sym}" "$F" || miss="$miss no-${sym}"+done+# Superset degraded regex must include the npm-level failure marker+grep -q "npm ERR" "$F" || miss="$miss degraded-rx-missing-npm-err"+# The -timeout vs -not-available distinction is load-bearing+grep -q -- "-timeout" "$F" || miss="$miss no-timeout-reason"+grep -q -- "-not-available" "$F" || miss="$miss no-not-available-reason"+# All four adapters import from it+for a in _harness _darwin _redblue gepa; do+ grep -q "from './_invoke.mjs'\|from './_darwin.mjs'" "$ROOT/scripts/${a}.mjs" || miss="$miss ${a}-not-adapting"+done+[[ -z "$miss" ]] && ok || bad "$miss"+step "4. score.mjs harness present + parses + uses _harness.mjs + alert"F="$ROOT/scripts/score.mjs"miss=""@@ -170,24 +213,29 @@ if (!od.metaharness) { console.error('missing metaharness in optionalDependencieif (j.dependencies && j.dependencies.metaharness) { console.error('metaharness leaked into dependencies'); process.exit(1); }" 2>/dev/null && ok || bad "ruflo wrapper missing metaharness optionalDep"-step "17r. _harness.mjs npx-argv regression guard (iter 27 fix lock)"+step "17r. _harness.mjs pinned-version + no-@latest regression guard (supersedes iter 27)"F="$ROOT/scripts/_harness.mjs"miss=""-# THE BUG WAS: passing '-y metaharness@latest' as a single argv token-# to spawnSync. Lock the array-form invocation so it can't regress.-# A correct invocation looks like:-# spawnSync('npx', ['-y', 'metaharness@latest', ...], ...)-# A broken one looks like:-# spawnSync('npx', ['-y metaharness@latest', ...], ...)-# OR:-# execCli('-y metaharness@latest', args, opts)-if grep -qE "execCli\(\s*['\"]-y metaharness@latest['\"]" "$F" 2>/dev/null; then- miss="$miss bug-regressed-string-form"+# SECURITY (HIGH, converged review 2026-07): the pre-consolidation helper+# shelled to `npx -y metaharness@latest` — a compromised upstream publish+# would execute arbitrary code on user machines, and @latest forced a+# registry check per call. Lock the fix: NO @latest anywhere in the loader,+# a pinned tilde range, and node-direct invocation of resolved bin paths+# (local walk-up install or one-time versioned cache).+if grep -q "metaharness@latest" "$F" 2>/dev/null; then+ miss="$miss at-latest-regressed"fi-# Confirm the fix is in place-grep -q "execCli(\[\s*'-y'\s*,\s*'metaharness@latest'" "$F" 2>/dev/null || \- grep -q "execCli(\[ *'-y', 'metaharness@latest'" "$F" 2>/dev/null || miss="$miss no-array-form-fix"-# cwd + env pass-through (added by iter 27)+grep -q "METAHARNESS_PIN_VERSION = '~" "$F" 2>/dev/null || miss="$miss no-pinned-range"+# node-direct spawn of the resolved bin (not an npx shim)+grep -qE "spawnSync\('node'" "$F" 2>/dev/null || miss="$miss no-node-direct-sync"+grep -qE "spawn\('node'" "$F" 2>/dev/null || miss="$miss no-node-direct-async"+# resolution order: local install first, then versioned cache install+grep -q "findLocalPackageDir" "$F" 2>/dev/null || miss="$miss no-local-resolution"+grep -q "ensureCachedInstall" "$F" 2>/dev/null || miss="$miss no-cache-install"+# BOTH bins resolved from the package.json bin map (metaharness + harness)+grep -q "bin.metaharness" "$F" 2>/dev/null || miss="$miss no-metaharness-bin"+grep -q "bin.harness" "$F" 2>/dev/null || miss="$miss no-harness-bin"+# cwd + env pass-through (iter 27 behavior retained)grep -q "cwd: opts" "$F" || miss="$miss no-cwd-passthrough"[[ -z "$miss" ]] && ok || bad "$miss"@@ -722,7 +770,7 @@ for k in $KEYS; dogrep -qE "npx ruflo metaharness ${k}([ \\\\]|$)" "$CMD" 2>/dev/null \|| miss="$miss subcommand-${k}-not-in-claude-md"done-[[ "$COUNT" == "13" ]] || miss="$miss subcommand-count-stale:$COUNT-expected-13"+[[ "$COUNT" == "$EXPECTED_SUBS" ]] || miss="$miss subcommand-count-stale:$COUNT-expected-$EXPECTED_SUBS"[[ -z "$miss" ]] && ok || bad "$miss"step "17z56. every MCP tool documented in CLAUDE.md (iter 93)"@@ -742,12 +790,12 @@ for t in $TOOLS; dogrep -q "mcp__claude-flow__${t}" "$CMD" 2>/dev/null \|| miss="$miss ${t}-not-in-claude-md"done-# Lock count: 15 MCP tools (mint deliberately excluded — see iter 73).-# Bumped from 9 → 12 after ADR-153 added metaharness_bench,-# metaharness_evolve, and metaharness_security_bench. Bumped from 12 → 13-# after @metaharness/redblue integration added metaharness_redblue.-# Bumped from 13 → 15 after [email protected] learn + [email protected] gepa.-[[ "$COUNT" == "15" ]] || miss="$miss mcp-tool-count-stale:$COUNT-expected-15"+# Count derived from the wrapper source (mint deliberately excluded — see+# iter 73). The historical bump ladder (9→12→13→15) is gone: the extraction+# loop above and $EXPECTED_TOOLS both come from metaharness-tools.ts, so this+# equality only catches loop/derivation divergence; the REAL cross-surface+# check is the per-tool CLAUDE.md grep in the loop.+[[ "$COUNT" == "$EXPECTED_TOOLS" ]] || miss="$miss mcp-tool-count-stale:$COUNT-expected-$EXPECTED_TOOLS"[[ -z "$miss" ]] && ok || bad "$miss"step "17z55. MCP enum + SEVERITY_RANK vocabulary aligned (iter 92)"@@ -822,11 +870,11 @@ for f in $REFS; doCOUNT=$((COUNT + 1))[[ -f "$SCRIPTS_DIR/$f" ]] || miss="$miss mcp-script-${f}-missing"done-# Should be 15 unique scripts (one per MCP tool; mint deliberately excluded).-# Bumped from 9 → 12 after ADR-153 added bench/evolve/security_bench tools.-# Bumped from 12 → 13 after @metaharness/redblue integration added redblue.mjs.-# Bumped from 13 → 15 after [email protected] learn + [email protected] gepa.-[[ "$COUNT" == "15" ]] || miss="$miss mcp-script-count-stale:$COUNT-expected-15"+# One unique runScript() ref per MCP tool (mint deliberately excluded).+# Cross-aspect check: runScript('*.mjs') call sites vs the derived+# `name: 'metaharness_*'` declaration count in the same file — a handler+# added without a script ref (or vice-versa) diverges these.+[[ "$COUNT" == "$EXPECTED_TOOLS" ]] || miss="$miss mcp-script-count-stale:$COUNT-expected-$EXPECTED_TOOLS"[[ -z "$miss" ]] && ok || bad "$miss"step "17z52. SUBCOMMANDS map entries point at existing script files (iter 89)"@@ -846,9 +894,10 @@ for f in $MAPPINGS; doCOUNT=$((COUNT + 1))[[ -f "$SCRIPTS_DIR/$f" ]] || miss="$miss script-${f}-missing"done-# Iter 73's description string + redblue + learn/gepa lists 13 subcommands.-# SUBCOMMANDS map should have the same 13 entries. Lock the count at exactly 13.-[[ "$COUNT" == "13" ]] || miss="$miss mapping-count-stale:$COUNT-expected-13"+# SUBCOMMANDS map entry count vs the derived $EXPECTED_SUBS (same source,+# so this catches loop/derivation divergence; the real check is the per-file+# existence assertion in the loop above).+[[ "$COUNT" == "$EXPECTED_SUBS" ]] || miss="$miss mapping-count-stale:$COUNT-expected-$EXPECTED_SUBS"[[ -z "$miss" ]] && ok || bad "$miss"step "17z51. all metaharness scripts produce parseable JSON in --format json mode (iter 88)"@@ -1401,10 +1450,13 @@ grep -q "iter 58 — reuse auditResult from the parallel batch" "$F" 2>/dev/nullstep "17z20. iter-55 gaps B + C closed (iter 57)"miss=""-# Gap B: _harness.mjs regex catches ENOTFOUND-class network errors-HARNESS="$ROOT/scripts/_harness.mjs"-grep -q "ENOTFOUND" "$HARNESS" 2>/dev/null || miss="$miss no-enotfound-regex"-grep -q "getaddrinfo\|ECONNREFUSED\|ETIMEDOUT" "$HARNESS" 2>/dev/null || miss="$miss no-network-error-regex"+# Gap B: the degraded-classification regex catches ENOTFOUND-class network+# errors. Consolidation (2026-07) moved DEGRADED_RX to _invoke.mjs — check it+# there, plus confirm _harness.mjs actually routes through the shared classifier.+INVOKE="$ROOT/scripts/_invoke.mjs"+grep -q "ENOTFOUND" "$INVOKE" 2>/dev/null || miss="$miss no-enotfound-regex"+grep -q "getaddrinfo\|ECONNREFUSED\|ETIMEDOUT" "$INVOKE" 2>/dev/null || miss="$miss no-network-error-regex"+grep -q "classifyDegraded" "$ROOT/scripts/_harness.mjs" 2>/dev/null || miss="$miss harness-not-using-shared-classifier"# Gap C: drift-from-history probes oia-audit to disambiguate no-history vs dep-absentDRIFT="$ROOT/scripts/drift-from-history.mjs"grep -q "disambiguate" "$DRIFT" 2>/dev/null || miss="$miss no-disambiguate-comment"@@ -1630,13 +1682,11 @@ CODE=$?step "17z9. MCP success-semantic footnote + audit_trend file inputs (iter 46)"miss=""WRAPPER="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"-# Success-semantic constant declared + appended to N descriptions = N+1 occurrences.-# Iter 46 set this at 9 (8 tools); iter 54 added the 9th → 10. ADR-153-# added 3 more tools (bench/evolve/security_bench) → 1 + 12 = 13.-# @metaharness/redblue integration added 1 more → 1 + 13 = 14.-# learn + gepa ([email protected] / [email protected]) added 2 more → 1 + 15 = 16.+# Success-semantic constant declared + appended to N tool descriptions =+# N+1 occurrences. N is the derived tool count — cross-aspect check within+# the wrapper: footnote appends vs `name:` declarations.COUNT=$(grep -c "MCP_SUCCESS_SEMANTIC" "$WRAPPER" 2>/dev/null; true)-[[ "$COUNT" == "16" ]] || miss="$miss footnote-count:$COUNT-expected-16"+[[ "$COUNT" == "$((EXPECTED_TOOLS + 1))" ]] || miss="$miss footnote-count:$COUNT-expected-$((EXPECTED_TOOLS + 1))"# audit_trend now exposes baselineFile / currentFilegrep -q "baselineFile" "$WRAPPER" 2>/dev/null || miss="$miss no-baseline-file"grep -q "currentFile" "$WRAPPER" 2>/dev/null || miss="$miss no-current-file"@@ -1674,10 +1724,9 @@ grep -q "success = exitCode === 0" "$WRAPPER" 2>/dev/null || miss="$miss no-exitCOUNT_OLD=$(grep -c "success: !r.degraded" "$WRAPPER" 2>/dev/null; true)[[ "$COUNT_OLD" == "0" ]] || miss="$miss old-pattern-still-present:$COUNT_OLD"COUNT_NEW=$(grep -c "success: r.success" "$WRAPPER" 2>/dev/null; true)-# Iter 54 added a 9th tool → 9. ADR-153 added 3 more (bench, evolve,-# security_bench) → 12. @metaharness/redblue integration added 1 more → 13.-# learn + gepa added 2 more → 15. Future iters that add tools should bump this.-[[ "$COUNT_NEW" == "15" ]] || miss="$miss new-pattern-count:$COUNT_NEW-expected-15"+# One `success: r.success` per handler = the derived tool count. Cross-aspect+# check within the wrapper: handler success-wiring vs `name:` declarations.+[[ "$COUNT_NEW" == "$EXPECTED_TOOLS" ]] || miss="$miss new-pattern-count:$COUNT_NEW-expected-$EXPECTED_TOOLS"# Runtime anchors: iter 44 success assertions presentT="$ROOT/scripts/test-mcp-tools.mjs"grep -q "iter 44 fix" "$T" 2>/dev/null || miss="$miss no-iter44-anchors"@@ -2041,9 +2090,11 @@ grep -q "result has 'exitCode'" "$F" || miss="$miss no-exitcode-assertion"for tool in metaharness_score metaharness_genome metaharness_mcp_scan metaharness_threat_model metaharness_oia_audit metaharness_audit_list metaharness_audit_trend metaharness_similarity metaharness_drift_from_history metaharness_bench metaharness_evolve metaharness_security_bench metaharness_redblue metaharness_learn metaharness_gepa; dogrep -q "${tool}" "$F" || miss="$miss missing-${tool}"done-# Count assertion must match iter-54 (8 → 9), then ADR-153 (9 → 12), then-# redblue (12 → 13), then learn/gepa (13 → 15)-grep -q "tools.length === 15" "$F" || miss="$miss tool-count-assertion-stale"+# test-mcp-tools.mjs keeps its own hardcoded `tools.length === N` literal —+# it is the RUNTIME side of the cross-check. This grep derives N from the+# wrapper source, so adding a tool without bumping the test literal fails+# here (independent surfaces compared, per the derived-counts contract).+grep -q "tools.length === $EXPECTED_TOOLS" "$F" || miss="$miss tool-count-assertion-stale:expected-tools.length===$EXPECTED_TOOLS"# Graceful skip when dist absent (so the script is smoke-runnable pre-build)grep -q "SKIPPED" "$F" || miss="$miss no-skip-doc"[[ -z "$miss" ]] && ok || bad "$miss"diff --git a/plugins/ruflo-metaharness/scripts/test-graceful-degradation.mjs b/plugins/ruflo-metaharness/scripts/test-graceful-degradation.mjsindex dc8877f119..4bc191117e 100755--- a/plugins/ruflo-metaharness/scripts/test-graceful-degradation.mjs+++ b/plugins/ruflo-metaharness/scripts/test-graceful-degradation.mjs@@ -31,11 +31,21 @@// 2 setup errorimport { spawnSync } from 'node:child_process';+import { mkdtempSync, rmSync } from 'node:fs';+import { tmpdir } from 'node:os';import { dirname, join } from 'node:path';import { fileURLToPath } from 'node:url';const SCRIPTS_DIR = dirname(fileURLToPath(import.meta.url));+// Since the versioned-cache consolidation (_invoke.mjs), a warm+// ~/.ruflo/<pkg>-cache-<pin> or a locally installed metaharness would satisfy+// resolution WITHOUT touching the (unreachable) registry — making this drill+// vacuous on developer machines. Point the cache base at an empty temp dir+// and disable local walk-up resolution so the install path (and therefore+// the degraded contract) is actually exercised.+const EMPTY_CACHE_BASE = mkdtempSync(join(tmpdir(), 'ruflo-degradation-drill-'));+const ARGS = (() => {const a = { keep: false };for (let i = 2; i < process.argv.length; i++) {@@ -61,6 +71,8 @@ function runWithUnreachableRegistry(scriptName, extraArgs) {...process.env,npm_config_registry: UNREACHABLE_REGISTRY,NPM_CONFIG_REGISTRY: UNREACHABLE_REGISTRY,+ RUFLO_METAHARNESS_CACHE_BASE: EMPTY_CACHE_BASE,+ RUFLO_METAHARNESS_SKIP_LOCAL: '1',},stdio: ['ignore', 'pipe', 'pipe'],encoding: 'utf-8',@@ -137,6 +149,10 @@ function main() {assert(/"degraded"\s*:\s*true/.test(r.stdout), `${s.name} emits "degraded": true`);}+ if (!ARGS.keep) {+ try { rmSync(EMPTY_CACHE_BASE, { recursive: true, force: true }); } catch { /* best-effort */ }+ }+console.log(`\n${passed} passed, ${failed} failed`);if (failed > 0) {console.log('\nFailures:');diff --git a/plugins/ruflo-metaharness/skills/harness-evolve/SKILL.md b/plugins/ruflo-metaharness/skills/harness-evolve/SKILL.mdindex 11c38c973f..3f9cb4e220 100644--- a/plugins/ruflo-metaharness/skills/harness-evolve/SKILL.md+++ b/plugins/ruflo-metaharness/skills/harness-evolve/SKILL.md@@ -1,7 +1,7 @@---name: harness-evolvedescription: Run `@metaharness/darwin evolve <repo>` to mutate a harness's seven policy surfaces (planner/contextBuilder/reviewer/retryPolicy/toolPolicy/memoryPolicy/scorePolicy), sandbox-score each variant, and promote only measured wins. The model is frozen; the harness evolves. Closes the loop ADR-150 opens (score+genome describe; evolve changes). Degrades gracefully when @metaharness/darwin is absent (ADR-150 + ADR-153 architectural constraints).-argument-hint: "--repo <path> [--generations 3] [--children 3] [--concurrency 2] [--sandbox real|mock|agent] [--selection pareto|quality-diversity|...] [--mutator deterministic|ruvllm] [--confirm]"+argument-hint: "--repo <path> [--generations 3] [--children 3] [--concurrency 2] [--sandbox real|mock|agent] [--selection pareto|quality-diversity|...] [--mutator deterministic|ruvllm] [--diagnose] [--confirm]"allowed-tools: Bash---@@ -73,7 +73,46 @@ Reports land under `<repo>/.metaharness/`:reports/winner.json # final champion + score delta vs parent```-Skill stdout = JSON `{success, data: {champion, plan, durationMs, improved}}`.+Skill stdout = JSON `{success, data: {champion, plan, durationMs, improved}}`+(plus `data.diagnosis` when `--diagnose` is passed — see below).++## Failure diagnosis (`--diagnose`)++GEPA's key trick is natural-language failure diagnosis from execution traces+feeding the next mutation — not just scalar fitness. `--diagnose` adds a+modest slice of that: after the evolution completes, the losing / failed+variants' transcripts are run through darwin's GEPA library ops+(`analyzeTranscript` + `classifyFailure`, via the shared `importGepa`+resolver in `scripts/_darwin.mjs`) and a `diagnosis` section is appended to+the emitted JSON:++```json+"diagnosis": {+ "available": true,+ "scope": "losing-variants",+ "variants": [+ { "id": "g1_v0", "transcripts": 2,+ "failureClasses": { "exploration-loop": 1, "edit-mechanics": 1 },+ "dominantClass": "exploration-loop" }+ ],+ "totals": { "exploration-loop": 1, "edit-mechanics": 1 }+}+```++Upstream shape caveats (verified against `@metaharness/[email protected]`):++- `metaharness-darwin evolve --json` prints a TEXT leaderboard — the stdout+ carries no JSON and no transcripts. Per-variant run records live at+ `<repo>/.metaharness/runs/<id>.json`.+- Those run records hold sandbox exec traces (`{taskId, exitCode, stdout,+ stderr}`), which are NOT GEPA `{actionRaw, obs}` transcripts. Diagnosis+ therefore uses GEPA-shaped transcripts when a run record embeds them+ (agent sandbox / future upstream), falls back to the champion's transcript,+ and otherwise emits `diagnosis: {available: false, reason, traceSummary}`+ where `traceSummary` is a mechanical per-variant tally (tasks / failed /+ timedOut / blockedActions).+- `--diagnose` NEVER fails the run — any internal error degrades to+ `{available: false, reason: "diagnosis-failed: ..."}`.## Exit codesdiff --git a/plugins/ruflo-metaharness/skills/harness-learn/SKILL.md b/plugins/ruflo-metaharness/skills/harness-learn/SKILL.mdindex 5b15de7be7..f8452e8d23 100644--- a/plugins/ruflo-metaharness/skills/harness-learn/SKILL.md+++ b/plugins/ruflo-metaharness/skills/harness-learn/SKILL.md@@ -41,8 +41,10 @@ ADR-235 follow-up and not available yet.Implementation: [`scripts/learn.mjs`](../../scripts/learn.mjs).1. Validate `--repo` exists when given; export it as `$METAHARNESS_REPO`.-2. Shell to `npx -y metaharness@latest learn --host <h> --model <m> --slice <s> [--run]`- via `_harness.mjs` (graceful degradation, hard timeout).+2. Invoke the pinned `metaharness` binary (`metaharness@~0.3.0`, local install+ or one-time versioned cache — never `@latest`): `metaharness learn --host <h>+ --model <m> --slice <s> [--run]` via `_harness.mjs` (graceful degradation,+ hard timeout).3. Default timeouts: 120s dry-run, 600s with `--run` — real runs on largerslices need an explicit `--timeout-ms` matched to slice size × model cost.4. Detect the checkout-required message → structured payload, exit 0.diff --git a/plugins/ruflo-metaharness/skills/harness-mcp-scan/SKILL.md b/plugins/ruflo-metaharness/skills/harness-mcp-scan/SKILL.mdindex cbc20b4ebd..bfcf162fd6 100644--- a/plugins/ruflo-metaharness/skills/harness-mcp-scan/SKILL.md+++ b/plugins/ruflo-metaharness/skills/harness-mcp-scan/SKILL.md@@ -13,7 +13,9 @@ tool; pure static analysis.Implementation: [`scripts/mcp-scan.mjs`](../../scripts/mcp-scan.mjs).-1. Shell `npx -p metaharness@latest harness mcp-scan <path> --json`.+1. Invoke the pinned `harness` binary (`metaharness@~0.3.0`, resolved from a+ local install or the one-time `~/.ruflo/metaharness-cache-<pin>` cache —+ never `@latest`): `harness mcp-scan <path> --json`.2. Parse `findings[]` with `{ severity, id, server, tool, message }`.3. `--fail-on <severity>`: exit 1 when any finding is at or above thatlevel. Default `high`.diff --git a/plugins/ruflo-metaharness/skills/harness-score/SKILL.md b/plugins/ruflo-metaharness/skills/harness-score/SKILL.mdindex dc1114d8b5..addce65184 100644--- a/plugins/ruflo-metaharness/skills/harness-score/SKILL.md+++ b/plugins/ruflo-metaharness/skills/harness-score/SKILL.md@@ -58,7 +58,7 @@ no network, registry unreachable), the script emits:{"degraded": true,"reason": "metaharness-not-available",- "hint": "Install metaharness manually with `npm i -D metaharness` or run `npx metaharness@latest --version` to verify network access."+ "hint": "Install with `npm i -D metaharness@~0.3.0` (pinned range — this plugin never fetches @latest) or verify network access for the one-time cache install."}```diff --git a/plugins/ruflo-metaharness/skills/harness-threat-model/SKILL.md b/plugins/ruflo-metaharness/skills/harness-threat-model/SKILL.mdindex 53d746cb11..8365e921e2 100644--- a/plugins/ruflo-metaharness/skills/harness-threat-model/SKILL.md+++ b/plugins/ruflo-metaharness/skills/harness-threat-model/SKILL.md@@ -13,7 +13,9 @@ categorized report suitable for sharing with an InfoSec team.Implementation: [`scripts/threat-model.mjs`](../../scripts/threat-model.mjs).-1. Shell `npx -p metaharness@latest harness threat-model <path> --json`.+1. Invoke the pinned `harness` binary (`metaharness@~0.3.0`, resolved from a+ local install or the one-time `~/.ruflo/metaharness-cache-<pin>` cache —+ never `@latest`): `harness threat-model <path> --json`.2. Parse `{ worst, findings[] }`.3. `--fail-on <severity>`: exit 1 when `worst >= fail-on`. Default `high`.diff --git a/ruflo/package.json b/ruflo/package.jsonindex 28e7d28611..c783e129eb 100644--- a/ruflo/package.json+++ b/ruflo/package.json@@ -66,18 +66,18 @@"express-rate-limit": ">=8.4.1","protobufjs": ">=7.5.6","uuid": ">=14.0.0",- "@opentelemetry/core": "1.25.1",- "@opentelemetry/resources": "1.25.1",- "@opentelemetry/sdk-trace-base": "1.25.1",- "@opentelemetry/sdk-node": ">=0.218.0",+ "@opentelemetry/core": ">=2.8.0",+ "@opentelemetry/resources": ">=2.8.0",+ "@opentelemetry/sdk-trace-base": ">=2.8.0",+ "@opentelemetry/sdk-node": ">=0.220.0","@opentelemetry/auto-instrumentations-node": ">=0.75.0",- "@opentelemetry/exporter-prometheus": ">=0.217.0",- "@opentelemetry/exporter-trace-otlp-grpc": "0.52.1",- "@opentelemetry/exporter-trace-otlp-http": "0.52.1",- "@opentelemetry/exporter-trace-otlp-proto": "0.52.1",- "@opentelemetry/otlp-exporter-base": "0.52.1",- "@opentelemetry/otlp-grpc-exporter-base": "0.52.1",- "@opentelemetry/otlp-transformer": "0.52.1",+ "@opentelemetry/exporter-prometheus": ">=0.220.0",+ "@opentelemetry/exporter-trace-otlp-grpc": ">=0.220.0",+ "@opentelemetry/exporter-trace-otlp-http": ">=0.220.0",+ "@opentelemetry/exporter-trace-otlp-proto": ">=0.220.0",+ "@opentelemetry/otlp-exporter-base": ">=0.220.0",+ "@opentelemetry/otlp-grpc-exporter-base": ">=0.220.0",+ "@opentelemetry/otlp-transformer": ">=0.220.0","agentdb": ">=3.0.0-alpha.17","agentic-flow": ">=2.0.14"},diff --git a/scripts/audit-env-var-precedence.mjs b/scripts/audit-env-var-precedence.mjsindex 46754a9f8d..84b23f3084 100644--- a/scripts/audit-env-var-precedence.mjs+++ b/scripts/audit-env-var-precedence.mjs@@ -55,6 +55,7 @@ const KNOWN_ESCAPE_HATCHES = new Set(['CLAUDE_FLOW_DISABLE_BRIDGE', // CI/test: force raw sql.js path — intentionally no CLI flag'RUFLO_HOOK_SKIP_NPX', // CI: suppress cold-install latency in smoke tests'RUFLO_SUBLINEAR_NATIVE', // Manual override for native vs WASM sublinear — CI/perf knob+ 'RUFLO_METAHARNESS_CACHE_BASE', // CI/test seam: relocates the ~/.ruflo pinned-cache root in metaharness smoke tests — intentionally env-only, plugin scripts have no CLI-flag surface// ── Feature flags (set by init into settings.json, not user-typed CLI) ──────'CLAUDE_FLOW_V3_ENABLED',diff --git a/scripts/audit-fix-invariants.mjs b/scripts/audit-fix-invariants.mjsindex 12ee8234a0..a9ed885ef7 100755--- a/scripts/audit-fix-invariants.mjs+++ b/scripts/audit-fix-invariants.mjs@@ -189,12 +189,12 @@ const INVARIANTS = [why: 'memory_import_claude accepts excludeFilePatterns (glob) for voice-fidelity / persona-restricted operators. Per-file granularity beyond the coarse allProjects:true/false.',},- // #1921 — pin @opentelemetry/core to dodge arborist Invalid Version+ // #1921 — override @opentelemetry/core to dodge arborist Invalid Version{issue: '#1921',file: 'package.json',- substring: '"@opentelemetry/core": "1.25.1"',- why: 'overrides pin for @opentelemetry/[email protected]. Eliminates the npm 10.8.x arborist `Invalid Version: ` placeholder that fails every `npx claude-flow@alpha …` install (including all 5 hook fires).',+ substring: '"@opentelemetry/core": ">=2.8.0"',+ why: 'overrides entry for @opentelemetry/core (originally an exact 1.25.1 pin, raised to a >=2.8.0 floor in #2547 for the OTel 2.x audit fix). Keeping a single resolvable @opentelemetry/core in overrides eliminates the npm 10.8.x arborist `Invalid Version: ` placeholder that fails every `npx claude-flow@alpha …` install (including all 5 hook fires). Do not delete the override — retune the range instead.',},// #1910 — MCP stdio mode protects stdout from stray console.logdiff --git a/v3/@claude-flow/cli/__tests__/output-verifier.test.ts b/v3/@claude-flow/cli/__tests__/output-verifier.test.tsnew file mode 100644index 0000000000..e28b65d86f--- /dev/null+++ b/v3/@claude-flow/cli/__tests__/output-verifier.test.ts@@ -0,0 +1,188 @@+/**+ * Tests for the confidence-gated tier-escalation verifier+ * (src/ruvector/output-verifier.ts) and its MCP surface (hooks_model-verify).+ *+ * All checks are $0 structural heuristics — no LLM, no network.+ */+import { describe, it, expect } from 'vitest';+import { verifyAndEscalate, bracketsBalanced, extractCodeBlocks } from '../src/ruvector/output-verifier.js';+import { hooksModelVerify } from '../src/mcp-tools/hooks-tools.js';++const GOOD_CODE_OUTPUT = [+ 'Here is the implementation:',+ '',+ '```ts',+ 'export function add(a: number, b: number): number {',+ ' return a + b;',+ '}',+ '```',+ '',+ 'The function adds two numbers and returns the sum.',+].join('\n');++describe('output-verifier — refusal detection', () => {+ it('flags a refusal near the start of the output', async () => {+ const v = await verifyAndEscalate({+ task: 'Write a function that adds two numbers',+ output: "I'm sorry, but I can't help with that request.",+ model: 'haiku',+ });+ expect(v.confident).toBe(false);+ expect(v.reasons.some(r => r.startsWith('refusal'))).toBe(true);+ });++ it('does not flag prose that merely discusses refusals later in the text', async () => {+ const body = `${'The verifier catches several failure classes. '.repeat(8)}One class is when a model says "I cannot help" — that is a refusal pattern.`;+ const v = await verifyAndEscalate({ task: 'Explain the verifier design', output: body, taskKind: 'text' });+ expect(v.signals.find(s => s.name === 'refusal')?.ok).toBe(true);+ });+});++describe('output-verifier — emptiness and truncation', () => {+ it('flags empty output', async () => {+ const v = await verifyAndEscalate({ task: 'Summarize the design doc in detail', output: ' \n ' });+ expect(v.confident).toBe(false);+ expect(v.reasons.some(r => r.startsWith('empty-output'))).toBe(true);+ });++ it('flags an unclosed code fence as truncation', async () => {+ const v = await verifyAndEscalate({+ task: 'Write a helper function',+ output: 'Sure, here it is:\n```ts\nexport function half(n: number) {\n return n / 2;\n}\n',+ model: 'haiku',+ });+ expect(v.confident).toBe(false);+ expect(v.reasons.some(r => r.startsWith('truncation'))).toBe(true);+ });++ it('flags output that ends mid-expression', async () => {+ const v = await verifyAndEscalate({+ task: 'Describe the steps required for the migration in detail',+ output: 'First we back up the database, then we run the migration and finally we,',+ taskKind: 'text',+ });+ expect(v.confident).toBe(false);+ expect(v.reasons.some(r => r.startsWith('truncation'))).toBe(true);+ });++ it('flags degenerate repetition', async () => {+ const line = 'The system processes the request.';+ const v = await verifyAndEscalate({+ task: 'Describe the pipeline in detail',+ output: Array(8).fill(line).join('\n'),+ taskKind: 'text',+ });+ expect(v.confident).toBe(false);+ expect(v.reasons.some(r => r.startsWith('degenerate-repetition'))).toBe(true);+ });+});++describe('output-verifier — parseable-code check', () => {+ it('fails code that does not parse (TypeScript syntactic diagnostics)', async () => {+ const v = await verifyAndEscalate({+ task: 'Implement a TypeScript function',+ output: 'Done:\n```ts\nexport function broken(a: number { return a + ; }\n```\nThat should work.',+ model: 'haiku',+ });+ expect(v.taskKind).toBe('code');+ expect(v.confident).toBe(false);+ expect(v.reasons.some(r => r.startsWith('code-parses'))).toBe(true);+ });++ it('passes well-formed code output', async () => {+ const v = await verifyAndEscalate({+ task: 'Implement a TypeScript add function',+ output: GOOD_CODE_OUTPUT,+ model: 'haiku',+ });+ expect(v.taskKind).toBe('code');+ expect(v.confident).toBe(true);+ expect(v.reasons).toEqual([]);+ expect(v.score).toBe(1);+ expect(v.escalate).toBe(false);+ expect(v.suggestedTier).toBe(2); // haiku tier, unchanged+ expect(v.suggestedModel).toBeNull();+ });++ it('fails invalid JSON when the task asks for JSON', async () => {+ const v = await verifyAndEscalate({+ task: 'Return the configuration as JSON',+ output: '{ "name": "demo", "count": }',+ taskKind: 'json',+ });+ expect(v.confident).toBe(false);+ expect(v.reasons.some(r => r.startsWith('code-parses'))).toBe(true);+ });+});++describe('output-verifier — escalation ladder', () => {+ it('bumps tier 2 → 3 and haiku → sonnet on failure', async () => {+ const v = await verifyAndEscalate({ task: 'Do a complex nontrivial thing carefully', output: '', model: 'haiku' });+ expect(v.escalate).toBe(true);+ expect(v.suggestedTier).toBe(3);+ expect(v.suggestedModel).toBe('sonnet');+ });++ it('bumps sonnet → opus on failure (tier stays 3)', async () => {+ const v = await verifyAndEscalate({ task: 'Do a complex nontrivial thing carefully', output: '', model: 'sonnet' });+ expect(v.escalate).toBe(true);+ expect(v.suggestedTier).toBe(3);+ expect(v.suggestedModel).toBe('opus');+ });++ it('cannot escalate past opus — escalate=false with an explanatory reason', async () => {+ const v = await verifyAndEscalate({ task: 'Do a complex nontrivial thing carefully', output: '', model: 'opus' });+ expect(v.confident).toBe(false);+ expect(v.escalate).toBe(false);+ expect(v.suggestedModel).toBeNull();+ expect(v.reasons.some(r => r.startsWith('already-at-top-tier'))).toBe(true);+ });+});++describe('output-verifier — helpers', () => {+ it('bracketsBalanced ignores brackets inside strings and comments', () => {+ expect(bracketsBalanced('const s = "((("; // }}}\nconst x = { a: [1] };')).toBe(true);+ expect(bracketsBalanced('function f() { return [1, 2;')).toBe(false);+ });++ it('extractCodeBlocks pulls fenced blocks with language tags', () => {+ const blocks = extractCodeBlocks('a\n```ts\nconst x = 1;\n```\nb\n```json\n{}\n```');+ expect(blocks).toHaveLength(2);+ expect(blocks[0].lang).toBe('ts');+ expect(blocks[1].lang).toBe('json');+ });+});++describe('hooks_model-verify MCP tool', () => {+ it('returns an escalation verdict for a bad output (record:false keeps state untouched)', async () => {+ const result = await hooksModelVerify.handler({+ task: 'Implement a TypeScript function that parses a config file',+ output: "I'm sorry, I cannot help with that.",+ model: 'haiku',+ record: false,+ }) as Record<string, unknown>;+ expect(result.confident).toBe(false);+ expect(result.escalate).toBe(true);+ expect(result.suggestedModel).toBe('sonnet');+ expect(result.suggestedTier).toBe(3);+ expect(result.recorded).toBe(false);+ expect(result.recordedOutcome).toBeNull();+ });++ it('is confident about a good output', async () => {+ const result = await hooksModelVerify.handler({+ task: 'Implement a TypeScript add function',+ output: GOOD_CODE_OUTPUT,+ model: 'haiku',+ record: false,+ }) as Record<string, unknown>;+ expect(result.confident).toBe(true);+ expect(result.escalate).toBe(false);+ expect(result.reasons).toEqual([]);+ });++ it('rejects missing output', async () => {+ const result = await hooksModelVerify.handler({ task: 'x'.repeat(30) }) as Record<string, unknown>;+ expect(result.success).toBe(false);+ });+});diff --git a/v3/@claude-flow/cli/__tests__/trajectory-tree.test.ts b/v3/@claude-flow/cli/__tests__/trajectory-tree.test.tsnew file mode 100644index 0000000000..4925c1a31a--- /dev/null+++ b/v3/@claude-flow/cli/__tests__/trajectory-tree.test.ts@@ -0,0 +1,132 @@+/**+ * Tests for the MAGE-style execution-state-tree prototype+ * (src/ruvector/trajectory-tree.ts) and its opt-in MCP surface+ * (hooks_intelligence_pattern-search strategy:"state-tree").+ */+import { describe, it, expect, beforeEach, afterEach } from 'vitest';+import { mkdtempSync, rmSync } from 'node:fs';+import { tmpdir } from 'node:os';+import { join } from 'node:path';+import { TrajectoryTree, getTrajectoryTree, resetTrajectoryTree } from '../src/ruvector/trajectory-tree.js';+import { hooksPatternSearch } from '../src/mcp-tools/hooks-tools.js';++let dir: string;+let persistPath: string;++beforeEach(() => {+ dir = mkdtempSync(join(tmpdir(), 'traj-tree-'));+ persistPath = join(dir, 'tree.json');+ resetTrajectoryTree();+});++afterEach(() => {+ resetTrajectoryTree();+ rmSync(dir, { recursive: true, force: true });+});++function buildThreeLevelTrajectory(tree: TrajectoryTree) {+ // Level 1: session root, Level 2: trajectory, Level 3: steps+ tree.openTrajectory({ sessionId: 'sess-1', trajectoryId: 'traj-A', task: 'Build the feature', agent: 'coder' });+ tree.appendStep({ trajectoryId: 'traj-A', stepId: 'step-1', action: 'read spec', quality: 0.9 });+ tree.appendStep({ trajectoryId: 'traj-A', stepId: 'step-2', action: 'write module', quality: 0.8 });+ tree.appendStep({ trajectoryId: 'traj-A', stepId: 'step-3', action: 'run tests', quality: 0.95 });+}++describe('TrajectoryTree — recallPath', () => {+ it('returns the exact root→current path for a synthetic 3-level trajectory', () => {+ const tree = new TrajectoryTree(persistPath);+ buildThreeLevelTrajectory(tree);++ const recall = tree.recallPath({ sessionId: 'sess-1' });+ expect(recall.path.map(n => n.id)).toEqual(['session:sess-1', 'traj-A', 'step-3']);+ expect(recall.path.map(n => n.kind)).toEqual(['session', 'trajectory', 'step']);+ expect(recall.currentId).toBe('step-3');+ expect(recall.strategy).toBe('state-tree');+ });++ it('returns recent siblings of the current node (oldest→newest, windowed)', () => {+ const tree = new TrajectoryTree(persistPath);+ buildThreeLevelTrajectory(tree);++ const recall = tree.recallPath({ sessionId: 'sess-1', siblingWindow: 2 });+ expect(recall.siblings.map(n => n.id)).toEqual(['step-1', 'step-2']);+ });++ it('honors depth (deepest levels win)', () => {+ const tree = new TrajectoryTree(persistPath);+ buildThreeLevelTrajectory(tree);++ const recall = tree.recallPath({ sessionId: 'sess-1', depth: 2 });+ expect(recall.path.map(n => n.id)).toEqual(['traj-A', 'step-3']);+ });++ it('nests a trajectory started while another is open, and pops on close', () => {+ const tree = new TrajectoryTree(persistPath);+ tree.openTrajectory({ sessionId: 'sess-1', trajectoryId: 'traj-outer', task: 'outer task' });+ tree.openTrajectory({ sessionId: 'sess-1', trajectoryId: 'traj-inner', task: 'inner sub-task' });+ tree.appendStep({ trajectoryId: 'traj-inner', stepId: 'step-i1', action: 'inner work' });++ let recall = tree.recallPath({ sessionId: 'sess-1' });+ expect(recall.path.map(n => n.id)).toEqual(['session:sess-1', 'traj-outer', 'traj-inner', 'step-i1']);++ tree.closeTrajectory({ trajectoryId: 'traj-inner', success: true });+ recall = tree.recallPath({ sessionId: 'sess-1' });+ expect(recall.currentId).toBe('traj-outer');+ expect(recall.path.map(n => n.id)).toEqual(['session:sess-1', 'traj-outer']);+ });++ it('returns an empty path for an unknown session', () => {+ const tree = new TrajectoryTree(persistPath);+ const recall = tree.recallPath({ sessionId: 'nope' });+ expect(recall.path).toEqual([]);+ expect(recall.siblings).toEqual([]);+ expect(recall.currentId).toBeNull();+ });+});++describe('TrajectoryTree — persistence', () => {+ it('round-trips through the JSON snapshot', () => {+ const tree = new TrajectoryTree(persistPath);+ buildThreeLevelTrajectory(tree);+ tree.closeTrajectory({ trajectoryId: 'traj-A', success: true });++ const reloaded = new TrajectoryTree(persistPath);+ expect(reloaded.size).toBe(tree.size);+ const recall = reloaded.recallPath({ sessionId: 'sess-1' });+ // current popped to the trajectory's parent (the session root) on close+ expect(recall.currentId).toBe('session:sess-1');+ expect(recall.path.map(n => n.id)).toEqual(['session:sess-1']);+ // …and the closed trajectory survived the round-trip with its metadata+ const reloadedRecall = reloaded.recallPath({ sessionId: 'sess-1', depth: 1 });+ expect(reloadedRecall.path[0].kind).toBe('session');+ });+});++describe('hooks_intelligence_pattern-search — strategy flag', () => {+ it('default strategy is untouched (no state-tree fields in the response)', async () => {+ // Seed the singleton with a tmp persist path so nothing touches the repo.+ getTrajectoryTree(persistPath);+ const result = await hooksPatternSearch.handler({ query: 'authentication patterns' }) as Record<string, unknown>;+ expect(result.backend).not.toBe('state-tree');+ expect(result.path).toBeUndefined();+ expect(result.strategy).toBeUndefined();+ expect(Array.isArray(result.results)).toBe(true);+ });++ it('strategy:"state-tree" returns the positional path without embedding search', async () => {+ const tree = getTrajectoryTree(persistPath);+ buildThreeLevelTrajectory(tree);++ const result = await hooksPatternSearch.handler({+ query: 'irrelevant for positional recall',+ strategy: 'state-tree',+ sessionId: 'sess-1',+ }) as Record<string, unknown>;++ expect(result.backend).toBe('state-tree');+ expect(result.strategy).toBe('state-tree');+ const path = result.path as Array<{ id: string }>;+ expect(path.map(n => n.id)).toEqual(['session:sess-1', 'traj-A', 'step-3']);+ expect(result.currentId).toBe('step-3');+ });+});diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/.claude-plugin/plugin.json b/v3/@claude-flow/cli/plugins/ruflo-metaharness/.claude-plugin/plugin.jsondeleted file mode 100644index e0f45cb015..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/.claude-plugin/plugin.json+++ /dev/null@@ -1,32 +0,0 @@-{- "name": "ruflo-metaharness",- "description": "MetaHarness integration for ruflo — surfaces score/genome/mint/mcp-scan/threat-model via skills; pairs with @metaharness/router (ADR-148/149) for cost-optimal model routing; honors ADR-150's architectural constraint that MetaHarness remains an optional augmentation, never a required runtime dependency",- "version": "0.1.0",- "author": {- "name": "ruvnet",- "url": "https://github.com/ruvnet"- },- "homepage": "https://github.com/ruvnet/ruflo",- "license": "MIT",- "keywords": [- "ruflo",- "metaharness",- "harness",- "scaffolding",- "scorecard",- "genome",- "mcp-scan",- "threat-model",- "router",- "adr-150",- "adr-148",- "adr-149",- "optional-dependency",- "graceful-degradation",- "subprocess",- "namespace-routing",- "verified",- "ci",- "phase-1-mvp"- ]-}diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/README.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/README.mddeleted file mode 100644index 3fa2ca1546..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/README.md+++ /dev/null@@ -1,72 +0,0 @@-# ruflo-metaharness--MetaHarness integration plugin for ruflo. Surfaces the upstream `metaharness` / `harness` / `@metaharness/darwin` CLIs through eleven ruflo skills, honoring [ADR-150](../../v3/docs/adr/ADR-150-metaharness-integration-surfaces.md)'s architectural constraint that MetaHarness must remain a removable augmentation — never a required runtime dependency.--## ADR-150 architectural constraint (load-bearing)--**Ruflo remains operational if every MetaHarness package is removed.** Every code path in this plugin satisfies four rules:--1. **Removable** — no static `import '@metaharness/*'` outside the optional-router path in `v3/@claude-flow/cli/src/ruvector/neural-router.ts`.-2. **Optional in package.json** — `metaharness` is in `optionalDependencies`, never `dependencies`.-3. **Graceful degradation** — every script catches `MODULE_NOT_FOUND`/network failure and emits `{ degraded: true, reason: 'metaharness-not-available' }` JSON, exits 0. The graceful path is the default behavior, not a special case.-4. **CI gate** — `no-metaharness-smoke.yml` runs the plugin smoke with `npm install --no-optional` and asserts the contract still passes.--## Skills--| Skill | Usage | Description |-|-------|-------|-------------|-| `harness-score` | `/harness-score [--path .] [--alert-on-fit-below 70]` | 5-dim readiness scorecard (harnessFit/compile/coverage/safety/memory + cost) |-| `harness-genome` | `/harness-genome [--path .] [--alert-on-risk-above 0.5]` | 7-section categorical report (repo_type/topology/risk/mcp/test/publish) |-| `harness-mcp-scan` | `/harness-mcp-scan [--path .] [--fail-on high]` | Static MCP security findings — pure-read, no dispatch |-| `harness-threat-model` | `/harness-threat-model [--path .] [--fail-on high]` | Enterprise-grade threat model (clean/low/medium/high + findings) |-| `harness-mint` | `/harness-mint --name <id> --template <id> [--confirm]` | Scaffold a custom harness; DRY-RUN by default; refuses project-root writes |-| `harness-similarity` | `/harness-similarity --a a.json --b b.json [--per-dimension] [--alert-below 0.5]` | ADR-152 §3.1 weighted similarity between two harness fingerprints (cosine + categorical + jaccard) |-| `harness-oia-audit` | `/harness-oia-audit [--path .] [--alert-on-worst high] [--dry-run]` | Composite Phase-2 audit (oia-manifest + threat-model + mcp-scan) into `metaharness-audit` namespace |-| `harness-drift-from-history` | `/harness-drift-from-history [--baseline-since 7d] [--threshold 0.95]` | 1-command drift detection — composes audit-list + oia-audit + audit-trend |-| `harness-bench` | `/harness-bench --op create\|verify --repo <path>` | Manage `@metaharness/darwin` bench suites — fixed evaluation corpora for `harness-evolve` |-| `harness-evolve` | `/harness-evolve --repo <path> [--generations 3] [--sandbox real\|mock\|agent]` | Run `@metaharness/darwin evolve` — mutate seven policy surfaces, sandbox-score variants, promote measured wins |-| `harness-security-bench` | `/harness-security-bench [--population 2] [--cycles 1] [--alert-on-fail]` | "Darwin Shield" / ADR-155 — evolve a security-detection harness against a 10-vuln corpus |-| `harness-learn` | `/harness-learn --host <h> --model <m> --slice <manifest> [--repo <checkout>] [--run]` | [email protected] / upstream ADR-235 — GEPA learning run; $0 dry-run default, `--run` to spend; needs a metaharness repo checkout |-| `harness-gepa` | `/harness-gepa --op genome\|validate\|render\|analyze [--path <genome.json>]` | [email protected] GEPA library surface — genome load/validate/render + transcript failure analysis; `gepaOptimize` stays library-only |--## Phase-0 baseline (ruflo itself, 2026-06-16)--```json-{- "harnessFit": 82,- "compileConfidence": 100,- "taskCoverage": 79,- "toolSafety": 100,- "memoryUsefulness": 40,- "estCostPerRunUsd": 0.048,- "recommendedMode": "CLI + MCP",- "archetype": "typescript-sdk-harness",- "template": "vertical:coding",- "scaffoldReady": true,- "risk_score": 0.27,- "publish_readiness": 0.9-}-```--## Architecture--All skills use subprocess invocation through the `_harness.mjs` shared helper:--```-skills/X/SKILL.md → scripts/X.mjs → scripts/_harness.mjs → spawnSync('npx', ['metaharness', …])- ↘ on MODULE_NOT_FOUND → emit degraded JSON, exit 0-```--This means:-- No library import overhead on ruflo's boot path-- 60s hard timeout per subprocess (bounded blast radius)-- `--json` flag forced for structured parsing-- Graceful degradation is a single helper used by every skill--## Cross-links--- [ADR-150](../../v3/docs/adr/ADR-150-metaharness-integration-surfaces.md) — decision + architectural constraint-- [Issue #2399](https://github.com/ruvnet/ruflo/issues/2399) — phase rollout tracker-- [Research dossier](https://gist.github.com/ruvnet/19d166ff9acf368c9da4172d91ac9113) — full graded-evidence sourcing-- [Upstream](https://github.com/ruvnet/agent-harness-generator) — `metaharness` source-- ADR-148/149 — `@metaharness/router` cost-optimal routing (sibling integration)diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/agents/metaharness-architect.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/agents/metaharness-architect.mddeleted file mode 100644index 431043e75c..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/agents/metaharness-architect.md+++ /dev/null@@ -1,58 +0,0 @@-----name: metaharness-architect-description: MetaHarness integration architect for ruflo. Surfaces score/genome/mint/mcp-scan/threat-model upstream capabilities via skills; enforces ADR-150 architectural constraint (MetaHarness as removable augmentation, never required runtime dep); coordinates Phase 1 MVP rollout-model: haiku------You are the metaharness-architect for ruflo. Your job is to expose the-`@metaharness/*` ecosystem's capabilities through ruflo's UX while-keeping ruflo independently operational at all times.--## ADR-150 invariants (load-bearing)--1. **Removable** — `npm ls --without-deps @metaharness/*` must still- produce a working CLI.-2. **Optional in package.json** — every `@metaharness/*` package goes in- `optionalDependencies` or `peerDependencies` (optional), NEVER- `dependencies`.-3. **Graceful degradation** — every code path that imports a- `@metaharness/*` symbol catches `MODULE_NOT_FOUND` and falls back.- The `emitDegradedJsonAndExit()` helper in `scripts/_harness.mjs` is- the reference implementation.-4. **CI gate** — at least one CI job runs ruflo with no MetaHarness- packages installed and asserts smoke still passes.--If a PR breaks any of these four rules, it is a breaking change and-needs its own ADR.--## Skills (6 — what each does, when to invoke)--| Skill | Role | Invoke when |-|---|---|---|-| `harness-score` | 5-dim numeric scorecard | Pre-mint readiness check; CI regression gate |-| `harness-genome` | 7-section categorical report | Pre-mint architecture review; drift detection over time |-| `harness-mcp-scan` | Static MCP security findings | Every PR; enterprise security review |-| `harness-threat-model` | Categorized threat report | Pre-launch review; periodic OIA-audit cadence |-| `harness-oia-audit` | Composite weekly audit worker (iter 7) | Cron-scheduled; bundles oia+threat+mcp into one timestamped record in `metaharness-audit` namespace |-| `harness-mint` | Scaffold a custom harness | User wants to fork; ALWAYS dry-run first, never write to project root |--## Tools (subprocess-only, no library imports)--- All skills shell out to `npx metaharness ...` or `npx -p metaharness@latest harness ...` via the `_harness.mjs` shared helper.-- 60s hard timeout per subprocess.-- Output captured + parsed; `--json` flag forced unless the script opts out.-- No `@metaharness/*` import statement appears outside the optional-router path in `v3/@claude-flow/cli/src/ruvector/neural-router.ts`.--## Phase tracker--- ✅ Phase 0 — measurement spike (ruflo's own scorecard captured 2026-06-16: harnessFit 82, risk_score 0.27, publish_readiness 0.9)-- 🔄 Phase 1 — MVP plugin (this commit + CI gates + KRR retraining)-- ⏳ Phase 2 — Expansion (eject command, SelfEvolvingRouter parallel-log, harness registry, oia-audit worker)-- ⏳ Phase 3 — Harness Intelligence Layer (each item gets its own ADR)--## Cross-links--- [ADR-150](../../../v3/docs/adr/ADR-150-metaharness-integration-surfaces.md) — decision-- [Issue #2399](https://github.com/ruvnet/ruflo/issues/2399) — phase tracker-- [Research dossier](https://gist.github.com/ruvnet/19d166ff9acf368c9da4172d91ac9113) — graded evidence-- [Upstream](https://github.com/ruvnet/agent-harness-generator) — `metaharness` sourcediff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/commands/ruflo-metaharness.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/commands/ruflo-metaharness.mddeleted file mode 100644index 7b2cf4f7f0..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/commands/ruflo-metaharness.md+++ /dev/null@@ -1,46 +0,0 @@-----name: ruflo-metaharness-description: MetaHarness integration — score, genome, mint, mcp-scan, threat-model — via subprocess invocations honoring ADR-150 architectural constraint------MetaHarness integration commands. All shell out to `npx metaharness ...`-or `npx -p metaharness@latest harness ...` via the `_harness.mjs`-shared helper; no library imports on ruflo's boot path.--**`harness score [--path .] [--alert-on-fit-below N] [--format table|json]`** -- 5-dimension readiness scorecard (harnessFit / compileConfidence / taskCoverage / toolSafety / memoryUsefulness + estCostPerRunUsd + scaffoldReady).-1. Run `node plugins/ruflo-metaharness/scripts/score.mjs --path <dir>`-2. Output JSON (default) with all dimensions + recommended template + archetype-3. `--alert-on-fit-below N` exits 1 when harnessFit < N — CI regression gate-4. Subprocess + 60s hard timeout; graceful degradation when metaharness unavailable--**`harness genome [--path .] [--alert-on-risk-above 0.5] [--format table|json]`** -- 7-section repo readiness report (repo_type / agent_topology / risk_score / mcp_surface / test_confidence / publish_readiness).-1. Run `node plugins/ruflo-metaharness/scripts/genome.mjs --path <dir>`-2. Pairs with harness-score for full readiness view — score is numeric, genome is categorical-3. `--alert-on-risk-above N` exits 1 when risk_score > N-4. Useful for drift detection: snapshot genome over time, diff to spot agent_topology drift--**`harness mcp-scan [--path .] [--fail-on low|medium|high] [--format table|json]`** -- Static security scan of `.mcp/servers.json` + `.harness/claims.json`. Reads only; no dispatch.-1. Run `node plugins/ruflo-metaharness/scripts/mcp-scan.mjs --path <dir>`-2. Severity-ranked findings (low/medium/high); default fail-on `high`-3. CI integration: `mcp-scan --fail-on high` fails the build on any HIGH finding-4. Pairs with harness-threat-model for enterprise-review-grade categorization--**`harness threat-model [--path .] [--fail-on clean|low|medium|high] [--format table|json]`** -- Enterprise-review threat model. Returns `worst` severity + categorized `findings[]`.-1. Run `node plugins/ruflo-metaharness/scripts/threat-model.mjs --path <dir>`-2. Default fail-on `high`; tightenable to `medium` for stricter gates-3. Output suitable for sharing with security/infosec team-4. Will be auto-fired by the Phase-2 oia-audit background worker on a schedule--**`harness oia-audit [--path .] [--dry-run] [--alert-on-worst clean|low|medium|high] [--format table|json]`** -- Phase-2 composite worker (ADR-150). Bundles oia-manifest + threat-model + mcp-scan into one timestamped audit record, stores in `metaharness-audit` memory namespace.-1. Run `node plugins/ruflo-metaharness/scripts/oia-audit.mjs`-2. Composite worst-severity = max(threatModel.worst, mcpScan.findings.severity)-3. `--alert-on-worst high` exits 1 when composite ≥ high — CI weekly drift gate-4. `--dry-run` skips memory persistence — useful for local checks-5. Designed for cron schedule: weekly snapshot enables audit drift tracking via memory diff--**`harness mint --name <id> --template <vertical:coding|minimal|…> [--host claude-code|codex|…] [--target /abs/path] [--confirm] [--format table|json]`** -- Scaffold a custom AI agent harness. DRY-RUN by default; --confirm required to write.-1. Run `node plugins/ruflo-metaharness/scripts/mint.mjs --name <id> --template <id> --host <id>`-2. **Safety**: refuses to write to the calling repo root or any path inside it; defaults to `/tmp/ruflo-mint-<ts>-<name>/`-3. Without `--confirm`: prints dry-run plan, exits 0 without touching disk-4. With `--confirm`: shells `npx metaharness new ... --yes`-5. Templates: minimal + 19 verticals (coding, devops, support, legal, …). Hosts: claude-code, codex, pi-dev, opencode, github-actions, +4 more.diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_darwin.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_darwin.mjsdeleted file mode 100644index c70b607182..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_darwin.mjs+++ /dev/null@@ -1,202 +0,0 @@-// _darwin.mjs — shared invocation helper for the `@metaharness/darwin` CLI.-//-// Mirrors `_harness.mjs` for the umbrella `metaharness` / `harness` binaries,-// but targets the separate darwin binary (`metaharness-darwin`) which is-// published as its own npm package (`@metaharness/darwin@~0.8.0`).-//-// Three subcommands surfaced (matches darwin 0.8.x — same verbs as 0.3.x,-// with GEPA-engine evolve flags added upstream: --selection modes,-// --crossover, --epistasis, --curriculum, --mutator ruvllm, --sandbox):-// - `metaharness-darwin evolve <repo> [...]` — harness self-improvement-// - `metaharness-darwin bench <create|verify> ...` — bench-suite lifecycle-// - `metaharness-darwin security bench [...]` — Darwin Shield (upstream ADR-155)-//-// CONTRACT (identical to runMetaharness/runHarness):-// - returns `{ stdout, stderr, exitCode, json|null, durationMs, degraded, reason? }`-// - `--json` is appended automatically when `opts.json !== false`-// - subprocess hard timeout (default 60s, override with opts.timeoutMs)-// - on MODULE_NOT_FOUND / network failure / "not installed", returns-// `degraded: true, reason: 'metaharness-darwin-not-available'` — never throws-// (ADR-150 graceful-degradation rule #3; ADR-153 §"Architecture" constraint 3)-//-// IMPORTANT — evolve has long timeouts:-// `evolve` is the only long-running verb in the metaharness family. A real-// evolution with --generations 10 --children 5 --concurrency 2 takes-// minutes-to-hours, NOT seconds. Callers MUST pass an explicit `timeoutMs`-// matched to their --generations × --children × sandbox cost; the 60s-// default is for `bench verify` and `security bench --population 2 --cycles 1`-// smoke shapes only.--import { spawnSync, spawn } from 'node:child_process';--const DEFAULT_TIMEOUT_MS = 60_000;--// Pinned semver range. Bump in lock-step with optionalDependencies in-// @claude-flow/cli/package.json + ruflo/package.json. The `~` allows-// patch upgrades without re-pinning.-const DARWIN_PIN = '@metaharness/darwin@~0.8.0';--const DEGRADED_RX = /could not determine executable|404|not installed|MODULE_NOT_FOUND|ENOTFOUND|getaddrinfo|ECONNREFUSED|ETIMEDOUT/i;--function buildArgv(args, wantJson) {- // `metaharness-darwin` historically does NOT take --json on every- // subcommand (some emit plain text reports — security bench in- // particular is markdown). We still append --json for callers that- // explicitly request it, but never silently inject it on subcommands- // that don't accept it. The shape that does support --json is the- // single-verb `evolve` and `bench verify`.- if (!wantJson || args.includes('--json')) return args;- return [...args, '--json'];-}--function classifyDegraded(stderr, exitCode) {- if (exitCode === null) return { degraded: true, reason: 'metaharness-darwin-timeout' };- if (DEGRADED_RX.test(stderr)) return { degraded: true, reason: 'metaharness-darwin-not-available' };- return { degraded: false };-}--function maybeParseJson(stdout) {- // darwin's evolve emits a final JSON object at end of stdout when --json- // is passed; everything before is human-readable progress. Grab the LAST- // {...} block, not the first — the first may be a per-generation log line.- const matches = [...stdout.matchAll(/\{[\s\S]*?\}/g)];- if (matches.length === 0) return null;- // Try last match first; fall back to greedy single-block match.- for (let i = matches.length - 1; i >= 0; i--) {- try { return JSON.parse(matches[i][0]); } catch { /* try previous */ }- }- const greedy = /\{[\s\S]*\}/.exec(stdout);- if (greedy) { try { return JSON.parse(greedy[0]); } catch { return null; } }- return null;-}--/**- * Sync invocation. Use for short subcommands (`bench verify`, smoke shapes).- * Async variant below for long-running `evolve` calls.- */-export function runDarwin(args, opts = {}) {- const start = Date.now();- const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS;- const wantJson = opts.json !== false;- const argv = buildArgv(args, wantJson);- const r = spawnSync('npx', ['-y', '-p', DARWIN_PIN, 'metaharness-darwin', ...argv], {- stdio: ['ignore', 'pipe', 'pipe'],- encoding: 'utf-8',- timeout: timeoutMs,- cwd: opts.cwd,- env: { ...process.env, ...(opts.env || {}) },- shell: process.platform === 'win32',- });- const durationMs = Date.now() - start;- const stdout = r.stdout || '';- const stderr = r.stderr || '';- const classified = classifyDegraded(stderr, r.status);- if (classified.degraded) {- return {- stdout, stderr,- exitCode: r.status ?? 127,- json: null,- durationMs,- degraded: true,- reason: classified.reason,- };- }- return {- stdout, stderr,- exitCode: r.status ?? 0,- json: wantJson ? maybeParseJson(stdout) : null,- durationMs,- degraded: false,- };-}--/**- * Async invocation with streaming. Required for `evolve` because the run- * can take 10+ minutes and the caller wants progress visibility.- *- * If `opts.onProgress(line)` is provided, called once per stderr line.- * darwin writes per-generation progress to stderr, structured result to- * stdout. Cancellable via opts.signal (AbortSignal).- */-export function runDarwinAsync(args, opts = {}) {- return new Promise((resolve) => {- const start = Date.now();- const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS;- const wantJson = opts.json !== false;- const argv = buildArgv(args, wantJson);- const p = spawn('npx', ['-y', '-p', DARWIN_PIN, 'metaharness-darwin', ...argv], {- stdio: ['ignore', 'pipe', 'pipe'],- cwd: opts.cwd,- env: { ...process.env, ...(opts.env || {}) },- shell: process.platform === 'win32',- });- let stdout = '', stderr = '', stderrBuf = '';- p.stdout?.on('data', (d) => { stdout += d.toString(); });- p.stderr?.on('data', (d) => {- const s = d.toString();- stderr += s;- if (opts.onProgress) {- stderrBuf += s;- const lines = stderrBuf.split('\n');- stderrBuf = lines.pop() ?? '';- for (const line of lines) opts.onProgress(line);- }- });- const timer = setTimeout(() => {- try { p.kill('SIGTERM'); } catch { /* ignore */ }- }, timeoutMs);- if (opts.signal) {- opts.signal.addEventListener('abort', () => {- try { p.kill('SIGTERM'); } catch { /* ignore */ }- }, { once: true });- }- p.on('error', (e) => {- clearTimeout(timer);- resolve({- stdout,- stderr: stderr + String(e?.message ?? e),- exitCode: 127, json: null, durationMs: Date.now() - start,- degraded: true, reason: 'metaharness-darwin-not-available',- });- });- p.on('close', (code) => {- clearTimeout(timer);- const durationMs = Date.now() - start;- const classified = classifyDegraded(stderr, code);- if (classified.degraded) {- resolve({- stdout, stderr,- exitCode: code ?? 127, json: null, durationMs,- degraded: true, reason: classified.reason,- });- return;- }- resolve({- stdout, stderr,- exitCode: code ?? 0,- json: wantJson ? maybeParseJson(stdout) : null,- durationMs,- degraded: false,- });- });- });-}--/**- * Match the existing `emitDegradedJsonAndExit` shape used by the- * metaharness-umbrella scripts so MCP tool consumers see one contract.- */-export function emitDarwinDegradedJsonAndExit(reason) {- const payload = {- degraded: true,- reason,- hint: 'Install with `npm i -D ' + DARWIN_PIN + '` or run `npx -y ' + DARWIN_PIN + ' --help` to verify network access.',- generatedAt: new Date().toISOString(),- };- console.log(JSON.stringify(payload, null, 2));- // Exit 0 — ADR-150 architectural constraint: ruflo continues to function- // when MetaHarness is absent. Same posture as the umbrella scripts.- process.exit(0);-}--export const DARWIN_VERSION_PIN = DARWIN_PIN;diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_harness.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_harness.mjsdeleted file mode 100755index 27105db1c6..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_harness.mjs+++ /dev/null@@ -1,261 +0,0 @@-// _harness.mjs — shared invocation helper for the metaharness/harness CLIs.-//-// All ruflo-metaharness skills shell out to the upstream CLI rather than-// linking the library — this honors ADR-150's architectural constraint-// (MetaHarness must remain a removable augmentation, never a required-// runtime dep) while still giving us "deep integration" through a single-// vetted bridge that every skill imports from.-//-// CONTRACT-// - `runMetaharness(args, opts)` — invoke `npx metaharness <args>`-// - `runHarness(args, opts)` — invoke `npx -p metaharness harness <args>`-// - both return `{ stdout, stderr, exitCode, json|null, durationMs }`-// - `--json` flag is appended automatically when `opts.json !== false`-// - subprocess hard timeout (default 60s) — captured in opts.timeoutMs-// - on MODULE_NOT_FOUND or "not installed", returns degraded result with-// `degraded: true, reason: 'metaharness-not-available'` — never throws-// (ADR-150 graceful-degradation rule #3)--import { spawnSync, spawn } from 'node:child_process';--const DEFAULT_TIMEOUT_MS = 60_000;--/**- * iter 56 — async variant of execCli. Used by oia-audit.mjs to parallelize- * its 5 subprocess calls, dropping worst-case wall-clock from 5×TIMEOUT- * (sequential) to 1×TIMEOUT (parallel). Identical return shape to the- * sync execCli so callers can swap without ceremony.- */-function execCliAsync(npxArgs, opts = {}) {- return new Promise((resolve) => {- const start = Date.now();- const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS;- const wantJson = opts.json !== false;- const argv = wantJson && !npxArgs.includes('--json') ? [...npxArgs, '--json'] : [...npxArgs];- const p = spawn('npx', argv, {- stdio: ['ignore', 'pipe', 'pipe'],- cwd: opts.cwd,- env: { ...process.env, ...(opts.env || {}) },- shell: process.platform === 'win32',- });- let stdout = '', stderr = '';- p.stdout?.on('data', (d) => { stdout += d.toString(); });- p.stderr?.on('data', (d) => { stderr += d.toString(); });- const timer = setTimeout(() => {- try { p.kill('SIGTERM'); } catch { /* ignore */ }- }, timeoutMs);- p.on('error', (e) => {- clearTimeout(timer);- resolve({- stdout, stderr: stderr + String(e?.message ?? e),- exitCode: 127, json: null, durationMs: Date.now() - start,- degraded: true, reason: 'metaharness-not-available',- });- });- p.on('close', (code) => {- clearTimeout(timer);- const durationMs = Date.now() - start;- if (code === null || /could not determine executable|404|not installed|MODULE_NOT_FOUND|ENOTFOUND|getaddrinfo|ECONNREFUSED|ETIMEDOUT/i.test(stderr)) {- resolve({- stdout, stderr,- exitCode: code ?? 127, json: null, durationMs,- degraded: true, reason: 'metaharness-not-available',- });- return;- }- let json = null;- if (wantJson) {- const m = /\{[\s\S]*\}/.exec(stdout);- if (m) { try { json = JSON.parse(m[0]); } catch { /* leave null */ } }- }- resolve({ stdout, stderr, exitCode: code ?? 0, json, durationMs, degraded: false });- });- });-}--export function runMetaharnessAsync(args, opts) {- return execCliAsync(['-y', 'metaharness@latest', ...args], opts);-}--export function runHarnessAsync(args, opts) {- return execCliAsync(['-y', '-p', 'metaharness@latest', 'harness', ...args], opts);-}--// ITER 27 — npx invocation hardening.-// The pre-iter-27 implementation passed `'-y metaharness@latest'` as a-// SINGLE argv element to npx (`spawnSync('npx', [bin, ...argv])` where-// bin contained two whitespace-separated tokens). spawnSync with-// shell:false does no word-splitting, so npx received a literal string-// with an embedded space and either failed silently or treated the-// whole thing as a package name. The graceful-degradation path then-// reported `degraded: true` for every skill — masking the bug. Every-// argv token must now be its own array element.-function execCli(npxArgs, opts = {}) {- const start = Date.now();- const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS;- const wantJson = opts.json !== false;- const argv = wantJson && !npxArgs.includes('--json') ? [...npxArgs, '--json'] : [...npxArgs];- const r = spawnSync('npx', argv, {- stdio: ['ignore', 'pipe', 'pipe'],- encoding: 'utf-8',- timeout: timeoutMs,- cwd: opts.cwd, // iter 27 — let callers redirect $CWD (mint.mjs needs this)- env: { ...process.env, ...(opts.env || {}) },- shell: process.platform === 'win32',- });- const durationMs = Date.now() - start;- const stdout = r.stdout || '';- const stderr = r.stderr || '';- // Graceful degradation — npx couldn't find the binary.- if (r.status === null || /could not determine executable|404|not installed|MODULE_NOT_FOUND|ENOTFOUND|getaddrinfo|ECONNREFUSED|ETIMEDOUT/i.test(stderr)) {- return {- stdout, stderr,- exitCode: r.status ?? 127,- json: null,- durationMs,- degraded: true,- reason: 'metaharness-not-available',- };- }- let json = null;- if (wantJson) {- const m = /\{[\s\S]*\}/.exec(stdout);- if (m) { try { json = JSON.parse(m[0]); } catch { /* leave null */ } }- }- return { stdout, stderr, exitCode: r.status ?? 0, json, durationMs, degraded: false };-}--export function runMetaharness(args, opts) {- // iter 27 — explicit argv tokens (was: '-y metaharness@latest' as one- // string, which silently degraded every skill).- return execCli(['-y', 'metaharness@latest', ...args], opts);-}--export function runHarness(args, opts) {- // The `harness` binary ships inside the `metaharness` package, so we- // need `npx -p metaharness@latest harness <args>`. spawnSync receives- // a single argv array, so encode the `-p` flag as its own argument.- const start = Date.now();- const timeoutMs = opts?.timeoutMs ?? DEFAULT_TIMEOUT_MS;- const wantJson = opts?.json !== false;- const argv = wantJson && !args.includes('--json') ? [...args, '--json'] : [...args];- const r = spawnSync('npx', ['-y', '-p', 'metaharness@latest', 'harness', ...argv], {- stdio: ['ignore', 'pipe', 'pipe'],- encoding: 'utf-8',- timeout: timeoutMs,- cwd: opts?.cwd, // iter 27 — same cwd-redirect support as runMetaharness- env: { ...process.env, ...(opts?.env || {}) },- shell: process.platform === 'win32',- });- const durationMs = Date.now() - start;- const stdout = r.stdout || '';- const stderr = r.stderr || '';- if (r.status === null || /could not determine executable|404|not installed|MODULE_NOT_FOUND|ENOTFOUND|getaddrinfo|ECONNREFUSED|ETIMEDOUT/i.test(stderr)) {- return {- stdout, stderr,- exitCode: r.status ?? 127,- json: null,- durationMs,- degraded: true,- reason: 'metaharness-not-available',- };- }- let json = null;- if (wantJson) {- const m = /\{[\s\S]*\}/.exec(stdout);- if (m) { try { json = JSON.parse(m[0]); } catch { /* leave null */ } }- }- return { stdout, stderr, exitCode: r.status ?? 0, json, durationMs, degraded: false };-}--/**- * iter 63 — single source of truth for severity ranks across the- * metaharness plugin family. Pre-iter-63, three scripts (oia-audit,- * audit-trend, mcp-scan) maintained their own SEVERITY_RANK literal,- * each missing different keys, each producing different NaN-compare- * behavior on unknown severities. Iter 62 fixed oia-audit; iter 63- * propagates the fix and consolidates.- *- * Mapping rationale:- * clean / info → 0 (no harm)- * low → 1- * medium / warn → 2- * high / error → 3- * critical → 4 (explicit elevation above high)- *- * `rankSeverity(s)` is the safe accessor — returns 0 for any unknown- * string instead of `undefined`, eliminating the NaN-compare hazard- * (`undefined > 3` evaluates to false → unknown severities silently- * ignored in reduce expressions).- */-export const SEVERITY_RANK = Object.freeze({- clean: 0, info: 0,- low: 1,- medium: 2, warn: 2,- high: 3, error: 3,- critical: 4,-});--export function rankSeverity(s) {- if (s == null) return 0;- return SEVERITY_RANK[String(s).toLowerCase()] ?? 0;-}--/**- * iter 50 — parse `harness mcp-scan` text output into structured findings.- *- * Upstream `harness mcp-scan` emits plain text even with --json:- *- * harness mcp-scan — <path>- *- * [INFO] No MCP security issues found- * Policy is default-deny with safe capability grants and an audit log.- *- * Result: INFO (1 finding, 0 high)- *- * Closes the iter-49-flagged gap where audit-trend.mjs reads- * `json.findings` expecting an array, but mcp-scan's r.json was null.- * Used by BOTH mcp-scan.mjs (the wrapper) and oia-audit.mjs (composite- * audit) so the structured-findings invariant holds across the pipeline.- */-export function parseMcpScanText(stdout) {- const findings = [];- const lines = (stdout || '').split('\n');- let current = null;- for (const line of lines) {- const m = /^\s*\[([A-Z]+)\]\s+(.+?)\s*$/.exec(line);- if (m) {- if (current) findings.push(current);- current = { severity: m[1].toLowerCase(), message: m[2] };- } else if (current && /^\s{6,}\S/.test(line)) {- const cont = line.trim();- if (cont) current.message += ' ' + cont;- } else if (current && line.trim() === '') {- findings.push(current);- current = null;- }- }- if (current) findings.push(current);- const resultMatch = /Result:\s+([A-Z]+)\s+\((\d+)\s+finding/i.exec(stdout);- const summary = resultMatch ? {- overallSeverity: resultMatch[1].toLowerCase(),- totalCount: parseInt(resultMatch[2], 10),- } : null;- return { findings, summary };-}--// Convenience emitters for skill scripts — keep the boilerplate out of-// each skill so they focus on argument parsing + exit-code semantics.-export function emitDegradedJsonAndExit(reason) {- const payload = {- degraded: true,- reason,- hint: 'Install metaharness manually with `npm i -D metaharness` or run `npx metaharness@latest --version` to verify network access.',- generatedAt: new Date().toISOString(),- };- console.log(JSON.stringify(payload, null, 2));- // Exit 0 — ADR-150 architectural constraint says ruflo continues to- // function when MetaHarness is absent. Skills emit a structured- // degraded payload rather than failing.- process.exit(0);-}diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_redblue.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_redblue.mjsdeleted file mode 100644index e59eada533..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_redblue.mjs+++ /dev/null@@ -1,182 +0,0 @@-// _redblue.mjs — invocation helper for `@metaharness/redblue`.-//-// Sibling of `_darwin.mjs` / `_harness.mjs`. Targets the `redblue` binary-// from the standalone `@metaharness/redblue@~0.1.4` package.-//-// Subcommands surfaced (matches redblue 0.1.x):-// - `redblue init [--out redblue.yaml]`-// - `redblue run [--config redblue.yaml] [--tests N] [--patch] [--mock-judge] [--out report.json]`-// - `redblue attack <prompt|tools|data|all> [--count N]`-// - `redblue patch [--config redblue.yaml] [--mock-judge]`-// - `redblue report --in report.json`-//-// UPSTREAM BUG WORKAROUND-// ------------------------// @metaharness/[email protected]'s CLI bootstrap is:-// const isMain = import.meta.url === `file://${process.argv[1]}`;-// if (isMain) { dispatch(...) }-// When npx links `redblue` → `dist/cli/index.js`, process.argv[1] is the-// symlink path but import.meta.url is the resolved real path, so the-// check fails silently — the binary exits 0 with no output, no file,-// no error. Darwin's CLI doesn't suffer this (calls main() unconditionally).-//-// Workaround: install the package once into a ruflo-owned cache dir-// (~/.ruflo/redblue-cache) and invoke `node <abs_path>/dist/cli/index.js`-// directly. argv[1] then equals the real path and isMain becomes true.-//-// Track upstream fix at: github.com/ruvnet/agent-harness-generator/issues-// (file separately — when fixed, we can drop the cached-install path and-// go back to the `npx -y -p ...` pattern used by _darwin.mjs).-//-// CONTRACT (matches runMetaharness/runDarwin):-// - returns `{ stdout, stderr, exitCode, durationMs, degraded, reason? }`-// - subprocess hard timeout (default 120s; --mock-judge runs are seconds)-// - on install failure / MODULE_NOT_FOUND / network failure, returns-// `degraded: true, reason: 'metaharness-redblue-not-available'`-// - never throws — ADR-150 graceful-degradation rule #3-//-// SAFETY NOTE-// redblue itself enforces hard safety boundaries in `src/config/safety.ts`-// (no real creds, no live targets, no shell, no eval, no arbitrary network).-// This wrapper does NOT relax those — it only forwards argv with shell:false.-// `--mock-judge` is the $0 CI path; the real model judge gates on-// $OPENROUTER_API_KEY which we never inject.--import { spawnSync } from 'node:child_process';-import { existsSync, mkdirSync } from 'node:fs';-import { homedir } from 'node:os';-import { join } from 'node:path';--const DEFAULT_TIMEOUT_MS = 120_000;-const INSTALL_TIMEOUT_MS = 180_000; // npm install can be slow on cold cache--// Pinned semver range. Bump in lock-step with optionalDependencies in-// @claude-flow/cli/package.json + ruflo/package.json.-const REDBLUE_PIN = '@metaharness/redblue@~0.1.4';-const REDBLUE_PKG = '@metaharness/redblue';-const REDBLUE_PIN_VERSION = '~0.1.4';--// Cache dir is versioned by the pin so bumping REDBLUE_PIN_VERSION-// invalidates stale installs — ensureInstalled() short-circuits on-// existsSync(RESOLVED_CLI), so an unversioned dir would keep serving-// the old package forever after a pin bump.-const CACHE_DIR = join(- homedir(), '.ruflo', `redblue-cache-${REDBLUE_PIN_VERSION.replace(/[~^]/g, '')}`,-);-const RESOLVED_CLI = join(- CACHE_DIR, 'node_modules', '@metaharness', 'redblue', 'dist', 'cli', 'index.js',-);--const DEGRADED_RX = /could not determine executable|404|not installed|MODULE_NOT_FOUND|ENOTFOUND|getaddrinfo|ECONNREFUSED|ETIMEDOUT|npm ERR/i;--function ensureInstalled() {- if (existsSync(RESOLVED_CLI)) return { ok: true };- try {- mkdirSync(CACHE_DIR, { recursive: true });- } catch (e) {- return { ok: false, reason: 'cache-dir-create-failed', error: String(e) };- }- // Use `npm install --prefix` so the package lands in a known location;- // this avoids npx's symlinked shim entirely (the upstream bin-bootstrap bug).- // shell:false; argv only.- const r = spawnSync('npm', [- 'install',- '--no-audit', '--no-fund', '--no-package-lock',- '--prefix', CACHE_DIR,- `${REDBLUE_PKG}@${REDBLUE_PIN_VERSION}`,- ], {- stdio: ['ignore', 'pipe', 'pipe'],- encoding: 'utf-8',- timeout: INSTALL_TIMEOUT_MS,- shell: process.platform === 'win32',- });- if (r.status !== 0 || !existsSync(RESOLVED_CLI)) {- return {- ok: false,- reason: 'install-failed',- stderr: (r.stderr || '').slice(0, 600),- stdout: (r.stdout || '').slice(0, 600),- };- }- return { ok: true };-}--function classifyDegraded(stderr, exitCode) {- if (exitCode === null) return { degraded: true, reason: 'metaharness-redblue-timeout' };- if (DEGRADED_RX.test(stderr)) return { degraded: true, reason: 'metaharness-redblue-not-available' };- return { degraded: false };-}--/**- * Sync invocation. `redblue` runs are bounded by `max_cost_usd` and- * `max_runtime_minutes` from the config, so sync is fine for the CLI- * wrapper. The default --mock-judge fixture path completes in seconds.- */-export function runRedblue(args, opts = {}) {- const start = Date.now();- const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS;-- // 1. Ensure redblue is installed in our cache dir (one-time install).- const install = ensureInstalled();- if (!install.ok) {- return {- stdout: install.stdout ?? '',- stderr: install.stderr ?? install.error ?? '',- exitCode: 127,- durationMs: Date.now() - start,- degraded: true,- reason: install.reason === 'install-failed'- ? 'metaharness-redblue-not-available'- : `metaharness-redblue-${install.reason}`,- };- }-- // 2. Invoke `node <real-path-to-cli> <args>` so upstream's isMain check- // succeeds (argv[1] matches import.meta.url).- const r = spawnSync('node', [RESOLVED_CLI, ...args], {- stdio: ['ignore', 'pipe', 'pipe'],- encoding: 'utf-8',- timeout: timeoutMs,- cwd: opts.cwd,- env: { ...process.env, ...(opts.env || {}) },- shell: process.platform === 'win32',- });- const durationMs = Date.now() - start;- const stdout = r.stdout || '';- const stderr = r.stderr || '';- const classified = classifyDegraded(stderr, r.status);- if (classified.degraded) {- return {- stdout, stderr,- exitCode: r.status ?? 127,- durationMs,- degraded: true,- reason: classified.reason,- };- }- return {- stdout, stderr,- exitCode: r.status ?? 0,- durationMs,- degraded: false,- };-}--/**- * Match the existing `emit*DegradedJsonAndExit` shape used by sibling- * scripts so MCP tool consumers see one contract.- */-export function emitRedblueDegradedJsonAndExit(reason) {- const payload = {- degraded: true,- reason,- hint: 'Install with `npm i -D ' + REDBLUE_PIN + '` or run `npx -y ' + REDBLUE_PIN + ' --help` to verify network access.',- generatedAt: new Date().toISOString(),- };- console.log(JSON.stringify(payload, null, 2));- // Exit 0 — ADR-150 architectural constraint #3.- process.exit(0);-}--export const REDBLUE_VERSION_PIN = REDBLUE_PIN;-export const REDBLUE_CACHE_DIR = CACHE_DIR;diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_similarity.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_similarity.mjsdeleted file mode 100644index f92469b63d..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_similarity.mjs+++ /dev/null@@ -1,161 +0,0 @@-// _similarity.mjs — ADR-152 production similarity module.-//-// Graduated from `_spike-similarity.mjs` (iter 35) after both invariants-// passed on the LEGAL/SUPPORT/DEVOPS fixtures. The spike file STAYS as-// the regression-suite anchor; this file is what production callers-// (`similarity.mjs` skill, `metaharness_similarity` MCP tool) import.-//-// ADR-150 ARCHITECTURAL CONSTRAINTS PRESERVED-// Removable ✓ pure-TS — no `@metaharness/*` import path-// Optional ✓ no new dep on `@metaharness/*`-// Graceful ✓ malformed input → low-confidence output, never throws-// CI-gate ✓ standalone unit-importable; no `npx` needed-//-// CONTRACT (PUBLIC)-// projectToVec(input) → 9-dim numerical feature vector-// cosine(a, b) → [0,1]-// categoricalAgreement(a, b) → [0,1] over 4 enum fields-// jaccard(a, b) → [0,1] over agent_topology[]-// similarity(a, b, opts?) → { overall, components, perDimension? }-//-// WEIGHT DEFAULTS (from ADR-152 §Decision)-// overall = 0.60·cosine + 0.25·categorical + 0.15·jaccard-//-// ADR-152 reserves a future per-org weight override; for §3.1 the defaults-// are global. The opts.weights hook is here so consumers can experiment-// without forking the module — it is NOT a stable public API.--const DEFAULT_WEIGHTS = Object.freeze({ cosine: 0.6, categorical: 0.25, jaccard: 0.15 });--const CATEGORICAL_FIELDS = Object.freeze(['repo_type', 'archetype', 'template', 'recommendedMode']);--// ─────────────────────────────────────────────────────────────────────-// 9-dim feature vector. The mapping mirrors ADR-152 §Decision Table 1.-// Missing fields default to 0 — that's the graceful-degradation path.-// ─────────────────────────────────────────────────────────────────────--export function projectToVec(input) {- const s = input?.score ?? {};- const g = input?.genome ?? {};- return [- (s.harnessFit ?? 0) / 100,- (s.compileConfidence ?? 0) / 100,- (s.taskCoverage ?? 0) / 100,- (s.toolSafety ?? 0) / 100,- (s.memoryUsefulness ?? 0) / 100,- g.risk_score ?? 0,- g.test_confidence ?? 0,- g.publish_readiness ?? 0,- Math.max(0, Math.min(1, Math.log10((s.estCostPerRunUsd ?? 0) + 0.001) / Math.log10(10))),- ];-}--export function cosine(a, b) {- if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return 0;- let dot = 0, na = 0, nb = 0;- for (let i = 0; i < a.length; i++) {- dot += a[i] * b[i];- na += a[i] * a[i];- nb += b[i] * b[i];- }- const denom = Math.sqrt(na) * Math.sqrt(nb);- if (denom === 0) return 0;- return Math.max(0, Math.min(1, dot / denom));-}--export function categoricalAgreement(a, b) {- let matches = 0;- for (const f of CATEGORICAL_FIELDS) {- const av = a?.genome?.[f] ?? a?.score?.[f];- const bv = b?.genome?.[f] ?? b?.score?.[f];- if (av && bv && av === bv) matches++;- }- return matches / CATEGORICAL_FIELDS.length;-}--export function jaccard(a, b) {- const A = new Set(a?.genome?.agent_topology ?? []);- const B = new Set(b?.genome?.agent_topology ?? []);- if (A.size === 0 && B.size === 0) return 1;- const intersection = [...A].filter((x) => B.has(x)).length;- const union = new Set([...A, ...B]).size;- return union === 0 ? 0 : intersection / union;-}--// ─────────────────────────────────────────────────────────────────────-// Composite similarity with optional per-dimension breakdown.-// Returns the ADR-152 §"return shape": overall + components + per-dim.-// ─────────────────────────────────────────────────────────────────────--export function similarity(a, b, opts = {}) {- const weights = { ...DEFAULT_WEIGHTS, ...(opts.weights ?? {}) };- const va = projectToVec(a);- const vb = projectToVec(b);- const cos = cosine(va, vb);- const cat = categoricalAgreement(a, b);- const jac = jaccard(a, b);-- const overall = weights.cosine * cos + weights.categorical * cat + weights.jaccard * jac;-- const result = {- overall: round4(overall),- components: {- cosine: round4(cos),- categorical: round4(cat),- jaccard: round4(jac),- },- weights,- };-- if (opts.perDimension) {- result.perDimension = perDimensionBreakdown(a, b, va, vb, weights);- }- return result;-}--function round4(x) {- return Math.round(x * 10000) / 10000;-}--function perDimensionBreakdown(a, b, va, vb, weights) {- // Per-dimension contribution = squared-error-normalized cosine slice + categorical/jaccard direct.- // We surface raw a/b values + a contribution sign so callers can explain- // why two harnesses scored as they did (used by Recommendation Engine- // §3.2 confidence calc + Drift Detection §3.3 alert reason).- const out = {};-- const numericKeys = [- ['harnessFit', 'score', 100], ['compileConfidence', 'score', 100],- ['taskCoverage', 'score', 100], ['toolSafety', 'score', 100],- ['memoryUsefulness', 'score', 100],- ['risk_score', 'genome', 1], ['test_confidence', 'genome', 1],- ['publish_readiness', 'genome', 1],- ['estCostPerRunUsd', 'score', 1],- ];- for (let i = 0; i < numericKeys.length; i++) {- const [k, src] = numericKeys[i];- const av = a?.[src]?.[k];- const bv = b?.[src]?.[k];- out[`numeric.${k}`] = {- a: av ?? null, b: bv ?? null,- contribution: round4(va[i] * vb[i] * weights.cosine / 9),- };- }- for (const f of CATEGORICAL_FIELDS) {- const av = a?.genome?.[f] ?? a?.score?.[f];- const bv = b?.genome?.[f] ?? b?.score?.[f];- out[`categorical.${f}`] = {- a: av ?? null, b: bv ?? null,- contribution: av && bv && av === bv ? round4(weights.categorical / 4) : 0,- };- }- const A = new Set(a?.genome?.agent_topology ?? []);- const B = new Set(b?.genome?.agent_topology ?? []);- const overlap = [...A].filter((x) => B.has(x));- const union = new Set([...A, ...B]);- out['set.agent_topology'] = {- a: [...A], b: [...B],- contribution: union.size === 0 ? 0 : round4((overlap.length / union.size) * weights.jaccard),- };- return out;-}diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_spike-similarity.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_spike-similarity.mjsdeleted file mode 100755index c0f34f6c8a..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/_spike-similarity.mjs+++ /dev/null@@ -1,223 +0,0 @@-#!/usr/bin/env node-// _spike-similarity.mjs — ADR-152 §"Smallest demonstrable spike" gate.-//-// This file is the implementation gate for ADR-152 (Genome Similarity Search).-// Per ADR-151's scope-only constraint, ADR-152 cannot graduate to "Accepted"-// until the two invariants below are proven by running this script.-//-// THE TWO INVARIANTS (from ADR-152 §"Smallest demonstrable spike")-// 1. similarity(X, X) === 1 (self-match exact)-// 2. similarity(legal, devops) < similarity(legal, support)-// (vertical-affinity correct)-//-// USAGE-// node scripts/_spike-similarity.mjs (run + assert)-// node scripts/_spike-similarity.mjs --format json (CI-consumable)-//-// EXIT CODES-// 0 both invariants hold-// 1 at least one invariant fails (ADR-152 cannot graduate)-//-// LIFECYCLE-// Once ADR-152 is Accepted, the full similarity implementation lands in-// `_similarity.mjs` (production module). This file (`_spike-similarity.mjs`)-// remains as the regression-suite anchor for the two invariants.--const ARGS = (() => {- const a = { format: 'table' };- for (let i = 2; i < process.argv.length; i++) {- if (process.argv[i] === '--format') a.format = process.argv[++i];- }- return a;-})();--// ──────────────────────────────────────────────────────────────────────-// THE PROPOSED IMPLEMENTATION (ADR-152 §"Decision")-//-// Pure-TS. Takes two {genome, score} JSON shapes; emits {overall,-// components: {cosine, categorical, jaccard}}. The 9 numerical features +-// 4 categorical fields + 1 set field per ADR-152.-// ──────────────────────────────────────────────────────────────────────--function projectToVec(input) {- const s = input.score || {};- const g = input.genome || {};- return [- (s.harnessFit ?? 0) / 100,- (s.compileConfidence ?? 0) / 100,- (s.taskCoverage ?? 0) / 100,- (s.toolSafety ?? 0) / 100,- (s.memoryUsefulness ?? 0) / 100,- g.risk_score ?? 0,- g.test_confidence ?? 0,- g.publish_readiness ?? 0,- // estCostPerRunUsd: log10 transform, clamped to [0, 1]- Math.max(0, Math.min(1, Math.log10((s.estCostPerRunUsd ?? 0) + 0.001) / Math.log10(10))),- ];-}--function cosine(a, b) {- let dot = 0, na = 0, nb = 0;- for (let i = 0; i < a.length; i++) {- dot += a[i] * b[i];- na += a[i] * a[i];- nb += b[i] * b[i];- }- const denom = Math.sqrt(na) * Math.sqrt(nb);- if (denom === 0) return 0;- // Map cosine from [-1, 1] to [0, 1] for nonnegative vectors it's [0, 1] already- return Math.max(0, Math.min(1, dot / denom));-}--function categoricalAgreement(a, b) {- const fields = ['repo_type', 'archetype', 'template', 'recommendedMode'];- let matches = 0;- for (const f of fields) {- const av = a.genome?.[f] ?? a.score?.[f];- const bv = b.genome?.[f] ?? b.score?.[f];- if (av && bv && av === bv) matches++;- }- return matches / fields.length;-}--function jaccard(a, b) {- const A = new Set(a.genome?.agent_topology ?? []);- const B = new Set(b.genome?.agent_topology ?? []);- if (A.size === 0 && B.size === 0) return 1;- const intersection = [...A].filter((x) => B.has(x)).length;- const union = new Set([...A, ...B]).size;- return union === 0 ? 0 : intersection / union;-}--function similarity(a, b) {- const cos = cosine(projectToVec(a), projectToVec(b));- const cat = categoricalAgreement(a, b);- const jac = jaccard(a, b);- const overall = 0.6 * cos + 0.25 * cat + 0.15 * jac;- return {- overall: Math.round(overall * 10000) / 10000,- components: {- cosine: Math.round(cos * 10000) / 10000,- categorical: Math.round(cat * 10000) / 10000,- jaccard: Math.round(jac * 10000) / 10000,- },- };-}--// ──────────────────────────────────────────────────────────────────────-// THREE SYNTHETIC FIXTURES designed to exercise the invariants. These-// mirror the JSON shapes `harness genome` + `harness score` emit (verified-// against [email protected] via iter-26 test-with-openrouter.mjs).-// ──────────────────────────────────────────────────────────────────────--const LEGAL = {- score: {- harnessFit: 78, compileConfidence: 92, taskCoverage: 65,- toolSafety: 88, memoryUsefulness: 70, estCostPerRunUsd: 0.04,- recommendedMode: 'CLI + MCP', archetype: 'compliance-harness',- template: 'vertical:legal', scaffoldReady: true,- },- genome: {- repo_type: 'node_mcp_ci',- agent_topology: ['contract-analyst', 'redline-reviewer', 'risk-rater', 'compliance-officer'],- risk_score: 0.45,- mcp_surface: 'remote',- test_confidence: 0.7,- publish_readiness: 0.6,- },-};--const SUPPORT = {- score: {- harnessFit: 75, compileConfidence: 90, taskCoverage: 70,- toolSafety: 90, memoryUsefulness: 72, estCostPerRunUsd: 0.05,- recommendedMode: 'CLI + MCP', archetype: 'compliance-harness',- template: 'vertical:support', scaffoldReady: true,- },- genome: {- repo_type: 'node_mcp_ci',- agent_topology: ['triager', 'kb-searcher', 'responder', 'risk-rater', 'compliance-officer'],- risk_score: 0.40,- mcp_surface: 'remote',- test_confidence: 0.75,- publish_readiness: 0.65,- },-};--const DEVOPS = {- score: {- harnessFit: 88, compileConfidence: 95, taskCoverage: 85,- toolSafety: 70, memoryUsefulness: 55, estCostPerRunUsd: 0.08,- recommendedMode: 'CLI', archetype: 'cli-operator-harness',- template: 'vertical:devops', scaffoldReady: true,- },- genome: {- repo_type: 'python_ops',- agent_topology: ['incident-commander', 'deployer', 'rollback', 'oncall-pager'],- risk_score: 0.25,- mcp_surface: 'local',- test_confidence: 0.85,- publish_readiness: 0.9,- },-};--// ──────────────────────────────────────────────────────────────────────-// INVARIANT VERIFICATION (the gate)-// ──────────────────────────────────────────────────────────────────────--const self = similarity(LEGAL, LEGAL);-const legalVsSupport = similarity(LEGAL, SUPPORT);-const legalVsDevops = similarity(LEGAL, DEVOPS);--const inv1Pass = self.overall === 1;-const inv2Pass = legalVsDevops.overall < legalVsSupport.overall;--const payload = {- adr: 'ADR-152',- spike: '_spike-similarity.mjs',- invariants: {- selfMatch: { pass: inv1Pass, value: self.overall, expected: 1 },- verticalAffinity: {- pass: inv2Pass,- legalVsDevops: legalVsDevops.overall,- legalVsSupport: legalVsSupport.overall,- reason: inv2Pass- ? `legal:devops (${legalVsDevops.overall}) < legal:support (${legalVsSupport.overall}) — vertical affinity correct`- : `INVARIANT VIOLATED: legal:devops (${legalVsDevops.overall}) ≥ legal:support (${legalVsSupport.overall})`,- },- },- detail: {- 'similarity(LEGAL, LEGAL)': self,- 'similarity(LEGAL, SUPPORT)': legalVsSupport,- 'similarity(LEGAL, DEVOPS)': legalVsDevops,- },- graduates: inv1Pass && inv2Pass,- generatedAt: new Date().toISOString(),-};--if (ARGS.format === 'json') {- console.log(JSON.stringify(payload, null, 2));-} else {- console.log(`# ADR-152 §Spike — Genome Similarity Search\n`);- console.log(`Invariant 1 — selfMatch:`);- console.log(` similarity(LEGAL, LEGAL).overall = ${self.overall}`);- console.log(` expected: 1`);- console.log(` ${inv1Pass ? '✓ PASS' : '✗ FAIL'}`);- console.log('');- console.log(`Invariant 2 — verticalAffinity (legal closer to support than to devops):`);- console.log(` similarity(LEGAL, SUPPORT).overall = ${legalVsSupport.overall}`);- console.log(` similarity(LEGAL, DEVOPS).overall = ${legalVsDevops.overall}`);- console.log(` ${inv2Pass ? '✓ PASS' : '✗ FAIL'} — ${payload.invariants.verticalAffinity.reason}`);- console.log('');- console.log(`Per-component breakdown:`);- console.log(` LEGAL vs SUPPORT — cosine=${legalVsSupport.components.cosine} categorical=${legalVsSupport.components.categorical} jaccard=${legalVsSupport.components.jaccard}`);- console.log(` LEGAL vs DEVOPS — cosine=${legalVsDevops.components.cosine} categorical=${legalVsDevops.components.categorical} jaccard=${legalVsDevops.components.jaccard}`);- console.log('');- if (payload.graduates) {- console.log(`✓ Both invariants hold. ADR-152 may graduate Proposed → Accepted.`);- } else {- console.log(`✗ Invariant violation. ADR-152 stays Proposed.`);- }-}--if (!payload.graduates) process.exit(1);diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/audit-list.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/audit-list.mjsdeleted file mode 100755index 88a3a41d90..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/audit-list.mjs+++ /dev/null@@ -1,158 +0,0 @@-#!/usr/bin/env node-// audit-list.mjs — list timestamped oia-audit records from the-// `metaharness-audit` memory namespace.-//-// The iter-7 oia-audit worker writes one record per run (keyed by ISO-// timestamp). This script enumerates them so operators can see audit-// cadence, spot gaps, and pick keys to feed into audit-trend.mjs.-//-// USAGE-// node scripts/audit-list.mjs # most recent 20-// node scripts/audit-list.mjs --limit 50-// node scripts/audit-list.mjs --format json-// node scripts/audit-list.mjs --since 30d # last N days-//-// EXIT CODES-// 0 ok-// 2 config error--import { spawnSync } from 'node:child_process';--const NS = process.env.AUDIT_LIST_NAMESPACE || 'metaharness-audit';-const CLI_PKG = process.env.CLI_CORE === '1'- ? '@claude-flow/cli-core@alpha'- : '@claude-flow/cli@latest';--const ARGS = (() => {- const a = { limit: 20, since: null, format: 'table' };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--limit') a.limit = parseInt(process.argv[++i], 10);- else if (v === '--since') a.since = process.argv[++i];- else if (v === '--format') a.format = process.argv[++i];- }- return a;-})();--function parseDurationMs(spec) {- const m = /^(\d+)([hdwm])$/.exec(spec);- if (!m) return null;- const n = parseInt(m[1], 10);- const unit = { h: 3600_000, d: 86400_000, w: 7 * 86400_000, m: 30 * 86400_000 }[m[2]];- return unit ? n * unit : null;-}--function memList() {- const r = spawnSync('npx', [- CLI_PKG, 'memory', 'list',- '--namespace', NS, '--format', 'json',- ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' });- if (r.status !== 0) return [];- const m = /\[[\s\S]*\]/.exec(r.stdout || '');- if (!m) return [];- try { return JSON.parse(m[0]); } catch { return []; }-}--function memRetrieve(key) {- const r = spawnSync('npx', [- CLI_PKG, 'memory', 'retrieve',- '--namespace', NS, '--key', key,- ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' });- if (r.status !== 0) return null;- const m = /\{[\s\S]*\}/.exec(r.stdout || '');- if (!m) return null;- try { return JSON.parse(m[0]); } catch { return null; }-}--function main() {- if (!Number.isInteger(ARGS.limit) || ARGS.limit < 1) {- console.error(`audit-list: --limit must be a positive integer`);- process.exit(2);- }- let cutoffMs = null;- if (ARGS.since) {- const ms = parseDurationMs(ARGS.since);- if (!ms) {- console.error(`audit-list: --since must be N(h|d|w|m); got ${ARGS.since}`);- process.exit(2);- }- cutoffMs = Date.now() - ms;- }-- const entries = memList()- .map((e) => e.key)- .filter((k) => typeof k === 'string' && k.startsWith('audit-'))- .sort()- .reverse(); // newest first (ISO keys sort lexicographically by time)-- // Apply --since by parsing the timestamp out of the key.- const filtered = entries.filter((k) => {- if (!cutoffMs) return true;- // key shape: audit-2026-06-16T15-30-00-000Z- const m = /^audit-(.+)$/.exec(k);- if (!m) return true;- const isoLike = m[1].replace(/-/g, ':').replace(/^(\d{4}):(\d{2}):(\d{2})/, '$1-$2-$3');- const ts = Date.parse(isoLike);- return Number.isFinite(ts) && ts >= cutoffMs;- });-- const slice = filtered.slice(0, ARGS.limit);-- // Pull just enough fields from each record to render a compact line.- const rows = [];- for (const key of slice) {- const rec = memRetrieve(key);- if (!rec) continue;- rows.push({- key,- startedAt: rec.startedAt || null,- finishedAt: rec.finishedAt || null,- worst: rec.composite?.worst || null,- tmWorst: rec.composite?.threatModelWorst || null,- mcpWorst: rec.composite?.mcpScanWorst || null,- degraded: !!(rec.components?.oiaManifest?.degraded- || rec.components?.threatModel?.degraded- || rec.components?.mcpScan?.degraded),- });- }-- const payload = {- namespace: NS,- filters: { limit: ARGS.limit, since: ARGS.since },- totalInNamespace: entries.length,- matchedSinceFilter: filtered.length,- returned: rows.length,- records: rows,- generatedAt: new Date().toISOString(),- };-- if (ARGS.format === 'json') {- console.log(JSON.stringify(payload, null, 2));- return;- }-- console.log(`# audit-list`);- console.log('');- console.log(`| Field | Value |`);- console.log(`|---|---:|`);- console.log(`| Namespace | \`${NS}\` |`);- console.log(`| Total records | ${entries.length} |`);- console.log(`| Matched filter | ${filtered.length} |`);- console.log(`| Showing | ${rows.length} (newest first) |`);- console.log('');- if (rows.length === 0) {- console.log(`_No audit records found. Run \`harness oia-audit\` to create one._`);- return;- }- console.log(`| Key | Started | Composite worst | Threat | MCP | Degraded |`);- console.log(`|---|---|:---:|:---:|:---:|:---:|`);- for (const r of rows) {- const shortKey = r.key.slice(0, 32) + (r.key.length > 32 ? '…' : '');- const started = r.startedAt ? r.startedAt.slice(0, 19).replace('T', ' ') : '—';- console.log(`| \`${shortKey}\` | ${started} | ${r.worst || '—'} | ${r.tmWorst || '—'} | ${r.mcpWorst || '—'} | ${r.degraded ? '⚠' : '✓'} |`);- }- console.log('');- console.log(`_Use \`audit-trend --baseline-key <a> --current-key <b>\` to diff two records._`);-}--main();diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/audit-trend.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/audit-trend.mjsdeleted file mode 100755index e635167651..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/audit-trend.mjs+++ /dev/null@@ -1,272 +0,0 @@-#!/usr/bin/env node-// audit-trend.mjs — diff two oia-audit records to detect drift over time.-//-// The iter-7 oia-audit composite worker stores timestamped records under-// the `metaharness-audit` memory namespace. This script reads two such-// records and surfaces the delta:-// - composite worst severity change (clean → low, low → medium, etc.)-// - per-component (oia / threat-model / mcp-scan) status change-// - new HIGH-severity findings introduced-// - findings cleared-//-// Pairs with iter-7's oia-audit + iter-8's weekly cron — accumulated-// records enable drift detection without ad-hoc tooling.-//-// USAGE-// node scripts/audit-trend.mjs --baseline audit-<ts1>.json --current audit-<ts2>.json-// node scripts/audit-trend.mjs --baseline-key audit-2026-06-01... --current-key audit-2026-06-15...-// # pulls both from memory namespace `metaharness-audit`-// node scripts/audit-trend.mjs ... --alert-on-worsening-// node scripts/audit-trend.mjs ... --format json-//-// EXIT CODES-// 0 ok (no worsening, or --alert-on-worsening not set)-// 1 --alert-on-worsening AND composite severity worsened-// 2 config error or input not found--import { readFileSync, existsSync } from 'node:fs';-import { spawnSync } from 'node:child_process';-// iter 38 — structural-distance drift via ADR-152 §3.1 production module.-// Falls back to null if either record predates iter-38 oia-audit (no-// fingerprint field) — graceful degradation, never throws.-import { similarity } from './_similarity.mjs';-// iter 63 — shared SEVERITY_RANK from _harness.mjs (was a local literal-// missing info/warn/error/critical, which caused NaN-compare hazards).-import { SEVERITY_RANK, rankSeverity } from './_harness.mjs';--// iter 63 — SEVERITY_RANK moved to _harness.mjs (imported above)-const NS = process.env.AUDIT_TREND_NAMESPACE || 'metaharness-audit';-const CLI_PKG = process.env.CLI_CORE === '1'- ? '@claude-flow/cli-core@alpha'- : '@claude-flow/cli@latest';--const ARGS = (() => {- const a = {- baseline: null, current: null,- baselineKey: null, currentKey: null,- alertOnWorsening: false, format: 'table',- // iter 38 — structural-distance gate (ADR-152 §3.1 dep)- alertOnDistanceBelow: null,- };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--baseline') a.baseline = process.argv[++i];- else if (v === '--current') a.current = process.argv[++i];- else if (v === '--baseline-key') a.baselineKey = process.argv[++i];- else if (v === '--current-key') a.currentKey = process.argv[++i];- else if (v === '--alert-on-worsening') a.alertOnWorsening = true;- else if (v === '--alert-on-distance-below') a.alertOnDistanceBelow = Number(process.argv[++i]);- else if (v === '--format') a.format = process.argv[++i];- }- return a;-})();--function memRetrieve(key) {- const r = spawnSync('npx', [- CLI_PKG, 'memory', 'retrieve',- '--namespace', NS, '--key', key,- ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' });- if (r.status !== 0) return null;- const m = /\{[\s\S]*\}/.exec(r.stdout || '');- if (!m) return null;- try { return JSON.parse(m[0]); } catch { return null; }-}--function loadRecord(label, filePath, memKey) {- if (filePath) {- if (!existsSync(filePath)) {- console.error(`audit-trend: ${label} file not found: ${filePath}`);- process.exit(2);- }- try { return JSON.parse(readFileSync(filePath, 'utf-8')); }- catch (e) {- console.error(`audit-trend: ${label} file invalid JSON: ${e.message}`);- process.exit(2);- }- }- if (memKey) {- const rec = memRetrieve(memKey);- if (!rec) {- console.error(`audit-trend: ${label} key not found in namespace ${NS}: ${memKey}`);- process.exit(2);- }- return rec;- }- console.error(`audit-trend: --${label} or --${label}-key is required`);- process.exit(2);-}--function main() {- const baseline = loadRecord('baseline', ARGS.baseline, ARGS.baselineKey);- const current = loadRecord('current', ARGS.current, ARGS.currentKey);-- // Sanity: both must look like oia-audit records (composite + components).- if (!baseline.composite || !current.composite) {- console.error('audit-trend: snapshots must contain `composite` (from oia-audit.mjs)');- process.exit(2);- }-- const baseWorst = String(baseline.composite.worst || 'clean').toLowerCase();- const currWorst = String(current.composite.worst || 'clean').toLowerCase();- // iter 63 — safe rankSeverity() eliminates NaN-compare when either- // severity is unknown (was a latent bug in audit-trend's drift verdict).- const deltaRank = rankSeverity(currWorst) - rankSeverity(baseWorst);- const worsened = deltaRank > 0;- const improved = deltaRank < 0;-- // Per-component status change. Each `components.{oiaManifest, threatModel,- // mcpScan}` has degraded:bool + exitCode + (for threat-model) json.worst.- const componentDelta = (label, b, c) => {- if (!b || !c) return { label, delta: 'missing' };- if (b.degraded !== c.degraded) {- return { label, delta: c.degraded ? 'became degraded' : 'recovered from degraded' };- }- if (b.exitCode !== c.exitCode) {- return { label, delta: `exit code ${b.exitCode} → ${c.exitCode}` };- }- return { label, delta: 'unchanged' };- };- const components = {- oiaManifest: componentDelta('oia-manifest', baseline.components?.oiaManifest, current.components?.oiaManifest),- threatModel: componentDelta('threat-model', baseline.components?.threatModel, current.components?.threatModel),- mcpScan: componentDelta('mcp-scan', baseline.components?.mcpScan, current.components?.mcpScan),- };-- // mcp-scan findings — what was introduced vs cleared.- const baseFindings = Array.isArray(baseline.components?.mcpScan?.json?.findings)- ? baseline.components.mcpScan.json.findings : [];- const currFindings = Array.isArray(current.components?.mcpScan?.json?.findings)- ? current.components.mcpScan.json.findings : [];- const fingerprint = (f) => `${f.severity}:${f.id ?? '-'}:${f.server ?? '-'}:${f.tool ?? '-'}:${(f.message ?? '').slice(0, 80)}`;- const baseSet = new Set(baseFindings.map(fingerprint));- const currSet = new Set(currFindings.map(fingerprint));- const introduced = currFindings.filter((f) => !baseSet.has(fingerprint(f)));- const cleared = baseFindings.filter((f) => !currSet.has(fingerprint(f)));-- // iter 38 — structural distance via ADR-152 §3.1 similarity().- // Both records need a fingerprint (score+genome) — iter-38 oia-audit- // adds it; older records skip with verdict 'unavailable'.- let structuralDistance = null;- if (baseline.fingerprint?.score && baseline.fingerprint?.genome- && current.fingerprint?.score && current.fingerprint?.genome) {- const sim = similarity(baseline.fingerprint, current.fingerprint);- structuralDistance = {- overall: sim.overall,- // Distance is the complement of similarity in [0,1]- distance: Number((1 - sim.overall).toFixed(4)),- components: sim.components,- verdict: sim.overall >= 0.95 ? 'near-identical'- : sim.overall >= 0.80 ? 'minor-drift'- : sim.overall >= 0.50 ? 'moderate-drift'- : 'major-drift',- };- } else {- structuralDistance = {- verdict: 'unavailable',- reason: 'one or both records predate iter-38 oia-audit fingerprint bundling',- };- }-- // Distance alert is independent of severity worsening — a harness can- // structurally drift while keeping the same worst-severity verdict.- const distanceAlertTriggered = ARGS.alertOnDistanceBelow != null- && structuralDistance.overall != null- && structuralDistance.overall < ARGS.alertOnDistanceBelow;-- const payload = {- baseline: {- startedAt: baseline.startedAt,- composite: baseline.composite,- },- current: {- startedAt: current.startedAt,- composite: current.composite,- },- delta: {- worst: { baseline: baseWorst, current: currWorst, rankDelta: deltaRank,- verdict: worsened ? 'worsened' : (improved ? 'improved' : 'unchanged') },- components,- findings: {- introducedCount: introduced.length,- clearedCount: cleared.length,- introduced: introduced.slice(0, 20), // truncate for output sanity- cleared: cleared.slice(0, 20),- },- // iter 38 — structural distance via ADR-152 §3.1- structuralDistance,- },- alert: (ARGS.alertOnWorsening || ARGS.alertOnDistanceBelow != null) ? {- triggered: worsened || distanceAlertTriggered,- reasons: [- ARGS.alertOnWorsening && worsened- ? `composite worst ${baseWorst} → ${currWorst}` : null,- distanceAlertTriggered- ? `structural similarity ${structuralDistance.overall} < threshold ${ARGS.alertOnDistanceBelow}` : null,- ].filter(Boolean),- } : null,- generatedAt: new Date().toISOString(),- };-- if (ARGS.format === 'json') {- console.log(JSON.stringify(payload, null, 2));- } else {- console.log(`# audit-trend`);- console.log('');- console.log(`Baseline: ${baseline.startedAt}`);- console.log(`Current: ${current.startedAt}`);- console.log('');- console.log(`| Metric | Baseline | Current | Verdict |`);- console.log(`|---|---|---|---|`);- const verdictIcon = worsened ? '⚠ worsened' : (improved ? '✓ improved' : '— unchanged');- console.log(`| composite worst | ${baseWorst} | ${currWorst} | ${verdictIcon} |`);- for (const [label, c] of Object.entries(components)) {- console.log(`| ${label} | — | — | ${c.delta} |`);- }- console.log('');- console.log(`Findings: **+${introduced.length} introduced**, **−${cleared.length} cleared**`);- if (introduced.length > 0) {- console.log('');- console.log('## Introduced findings');- console.log('');- console.log('| Severity | Server | Tool | Message |');- console.log('|---|---|---|---|');- for (const f of introduced.slice(0, 20)) {- console.log(`| ${f.severity ?? '-'} | ${f.server ?? '-'} | ${f.tool ?? '-'} | ${(f.message ?? '').slice(0, 80)} |`);- }- }- if (cleared.length > 0) {- console.log('');- console.log('## Cleared findings');- console.log('');- for (const f of cleared.slice(0, 5)) {- console.log(`- ${f.severity ?? '-'} ${f.id ?? '-'} (${f.server ?? '-'}/${f.tool ?? '-'})`);- }- }- console.log('');- // iter 38 — structural distance row- if (structuralDistance.verdict !== 'unavailable') {- console.log(`## Structural distance (ADR-152 §3.1)`);- console.log('');- console.log(`| Metric | Value |`);- console.log(`|---|---:|`);- console.log(`| overall similarity | ${structuralDistance.overall.toFixed(4)} |`);- console.log(`| distance (1 − sim) | ${structuralDistance.distance.toFixed(4)} |`);- console.log(`| verdict | **${structuralDistance.verdict}** |`);- console.log('');- } else {- console.log(`Structural distance: _unavailable — ${structuralDistance.reason}_`);- console.log('');- }- if (payload.alert) {- if (payload.alert.triggered) {- console.log(`⚠ **ALERT**: ${payload.alert.reasons.join('; ')}`);- } else {- console.log(`✓ no alert triggered`);- }- }- }-- if (payload.alert?.triggered) process.exit(1);-}--main();diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/bench-parse-mcp-scan.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/bench-parse-mcp-scan.mjsdeleted file mode 100755index 300171e37e..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/bench-parse-mcp-scan.mjs+++ /dev/null@@ -1,146 +0,0 @@-#!/usr/bin/env node-// bench-parse-mcp-scan — perf characterization for iter-50's-// parseMcpScanText. Sister to iter-41's bench-similarity.mjs.-//-// THE CLAIM-// parseMcpScanText is a small regex over short text. Sub-microsecond-// per call expected. Phase-3 consumers (oia-audit + the audit-trend-// introduced/cleared diff) call it once per audit run, so the per-call-// cost compounds if the parser is on a slow path.-//-// WHAT IT MEASURES-// Per-call mean + p50 + p99 over 100k iters, across 3 categories:-// - empty: parseMcpScanText('') — fastest path-// - typical: ruflo's actual single-INFO output-// - rich: a synthetic multi-finding payload with continuation lines-//-// USAGE-// node scripts/bench-parse-mcp-scan.mjs # default 100k iters-// node scripts/bench-parse-mcp-scan.mjs --iters 1000000-// node scripts/bench-parse-mcp-scan.mjs --format json-// node scripts/bench-parse-mcp-scan.mjs --max-mean-us 5 # CI gate-//-// EXIT CODES-// 0 ok (or threshold satisfied)-// 1 --max-mean-us exceeded by any category--import { performance } from 'node:perf_hooks';-import { parseMcpScanText } from './_harness.mjs';--const ARGS = (() => {- const a = { iters: 100_000, format: 'table', maxMeanUs: null };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--iters') a.iters = parseInt(process.argv[++i], 10);- else if (v === '--format') a.format = process.argv[++i];- else if (v === '--max-mean-us') a.maxMeanUs = parseFloat(process.argv[++i]);- }- return a;-})();--const EMPTY = '';--const TYPICAL = `harness mcp-scan — /repo-- [INFO] No MCP security issues found- Policy is default-deny with safe capability grants and an audit log.--Result: INFO (1 finding, 0 high)-`;--const RICH = `harness mcp-scan — /repo-- [HIGH] First high-severity finding- Continuation line 1- Continuation line 2- [WARN] Second warning finding- Some additional context- [HIGH] Third high finding- [INFO] Fourth informational- Multi-line message body- Spanning three lines- Ending here- [CRITICAL] Fifth critical issue- With single continuation--Result: HIGH (5 findings, 2 high)-`;--function bench(label, input, iters) {- // Warm-up- for (let i = 0; i < 10_000; i++) parseMcpScanText(input);-- const samples = new Float64Array(iters);- for (let i = 0; i < iters; i++) {- const t0 = performance.now();- parseMcpScanText(input);- samples[i] = performance.now() - t0;- }- let sum = 0;- for (let i = 0; i < iters; i++) sum += samples[i];- const mean = sum / iters;- const sorted = Array.from(samples).sort((x, y) => x - y);- const p50 = sorted[Math.floor(iters * 0.5)];- const p99 = sorted[Math.floor(iters * 0.99)];- return {- label, iters,- meanMs: mean, p50Ms: p50, p99Ms: p99,- meanUs: mean * 1000, p99Us: p99 * 1000,- };-}--// iter 87 — suppress markdown header in --format json so captured-// file stays valid JSON.-if (ARGS.format !== 'json') {- console.log(`# bench-parse-mcp-scan — iter-50 parser per-call cost\n`);- console.log(`iters: ${ARGS.iters.toLocaleString()}\n`);-}--const results = [- bench('empty', EMPTY, ARGS.iters),- bench('typical (1 INFO)', TYPICAL, ARGS.iters),- bench('rich (5 findings)', RICH, ARGS.iters),-];--let gate = { triggered: false, reasons: [] };-if (ARGS.maxMeanUs != null) {- for (const r of results) {- if (r.meanUs > ARGS.maxMeanUs) {- gate.triggered = true;- gate.reasons.push(`${r.label}: mean ${r.meanUs.toFixed(3)}μs > ceiling ${ARGS.maxMeanUs}μs`);- }- }-}--const payload = {- iters: ARGS.iters,- results,- gate: ARGS.maxMeanUs != null ? {- thresholdUs: ARGS.maxMeanUs,- triggered: gate.triggered,- reasons: gate.reasons,- } : null,- generatedAt: new Date().toISOString(),- contract: 'parseMcpScanText is sub-microsecond for empty/typical; rich (5 findings, 14 lines) stays under 10μs.',-};--if (ARGS.format === 'json') {- console.log(JSON.stringify(payload, null, 2));-} else {- console.log(`| Category | mean | p50 | p99 |`);- console.log(`|---------------------|-----------:|-----------:|-----------:|`);- for (const r of results) {- console.log(`| ${r.label.padEnd(19)} | ${r.meanUs.toFixed(3).padStart(7)}μs | ${(r.p50Ms * 1000).toFixed(3).padStart(7)}μs | ${r.p99Us.toFixed(3).padStart(7)}μs |`);- }- console.log('');- if (payload.gate) {- if (payload.gate.triggered) {- console.log(`⚠ ALERT: ceiling ${ARGS.maxMeanUs}μs exceeded by:`);- for (const reason of payload.gate.reasons) console.log(` - ${reason}`);- } else {- console.log(`✓ all categories within --max-mean-us ${ARGS.maxMeanUs}μs ceiling`);- }- }-}--if (gate.triggered) process.exit(1);diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/bench-recordpair-overhead.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/bench-recordpair-overhead.mjsdeleted file mode 100755index 28de880c3e..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/bench-recordpair-overhead.mjs+++ /dev/null@@ -1,186 +0,0 @@-#!/usr/bin/env node-// bench-recordpair-overhead.mjs — micro-benchmark proving iter-12's-// "zero default-path overhead" claim with measured numbers.-//-// THE CLAIM-// Iter 12 added one env-flag check to model-router.ts route() so-// recordPair() fires only when CLAUDE_FLOW_ROUTER_PARALLEL_LOG=1.-// When unset (default), the cost is:-//-// if (process.env.CLAUDE_FLOW_ROUTER_PARALLEL_LOG === '1') { ... }-//-// This benchmark measures that exact pattern over 1,000,000 iterations-// and reports the per-call mean + p99. For the claim to hold, the-// per-call overhead must be sub-microsecond.-//-// USAGE-// node scripts/bench-recordpair-overhead.mjs # 1M iters-// node scripts/bench-recordpair-overhead.mjs --iters 5000000-// node scripts/bench-recordpair-overhead.mjs --format json-//-// EXIT CODES-// 0 benchmark complete (always; this is informational, not pass/fail)--import { performance } from 'node:perf_hooks';--const ARGS = (() => {- const a = {- iters: 1_000_000,- format: 'table',- // iter 25 — CI regression gate. When --max-overhead-ns N is set,- // exit 1 if the measured iter-12 default-path overhead exceeds N- // nanoseconds per call. Default threshold 500ns chosen as ~3.5×- // headroom over the iter-24 measured baseline of ~147ns on Apple- // Silicon / Node 22.- maxOverheadNs: null,- };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--iters') a.iters = parseInt(process.argv[++i], 10);- else if (v === '--format') a.format = process.argv[++i];- else if (v === '--max-overhead-ns') a.maxOverheadNs = parseFloat(process.argv[++i]);- }- return a;-})();--function bench(label, fn, iters) {- // Warm-up- for (let i = 0; i < 10_000; i++) fn();-- const samples = new Float64Array(iters);- for (let i = 0; i < iters; i++) {- const start = performance.now();- fn();- samples[i] = performance.now() - start;- }- // performance.now() resolution is ~1 microsecond on most platforms.- // For sub-microsecond ops we can't measure individual iterations- // accurately; report aggregate timing instead.-- // Also measure batched timing — sum of N calls in one hot loop —- // which IS accurate for sub-μs ops.- const batchStart = performance.now();- for (let i = 0; i < iters; i++) fn();- const batchTotal = performance.now() - batchStart;- const meanNs = (batchTotal * 1e6) / iters; // ms → ns / iters-- // Sort samples for percentile reporting (per-call resolution-limited)- const sortedMs = Array.from(samples).sort((a, b) => a - b);- const p99 = sortedMs[Math.floor(0.99 * sortedMs.length)];-- return {- label,- iters,- batchTotalMs: Math.round(batchTotal * 1000) / 1000,- meanNsPerCall: Math.round(meanNs * 100) / 100,- p99PerCallMs: Math.round(p99 * 10000) / 10000,- };-}--function main() {- const iters = ARGS.iters;- if (!Number.isInteger(iters) || iters < 1000) {- console.error('bench-recordpair-overhead: --iters must be ≥ 1000');- process.exit(2);- }-- // iter 137 — guard the markdown header behind table-format so- // --format json emits pure JSON (consumed by CI's JSON.parse).- // Same fix-class as bench-similarity's iter 87 fix.- if (ARGS.format !== 'json') {- console.log(`# bench-recordpair-overhead`);- console.log('');- console.log(`Iterations: ${iters.toLocaleString()}`);- console.log(`Platform: ${process.platform} ${process.arch}, Node ${process.version}`);- console.log('');- }-- // Baseline — no-op- const baseline = bench('baseline (no-op)', () => {}, iters);-- // The iter-12 env-flag check, OFF case- // Match the exact source pattern from model-router.ts- delete process.env.CLAUDE_FLOW_ROUTER_PARALLEL_LOG; // ensure OFF- const envCheckOff = bench(- 'iter-12 env check (FLAG OFF — default path)',- () => { if (process.env.CLAUDE_FLOW_ROUTER_PARALLEL_LOG === '1') { /* unreached */ } },- iters,- );-- // ON case — but no actual loadParallelRecorder().then() call (that's- // a one-time microtask amortized over the process lifetime). Measure- // just the conditional.- process.env.CLAUDE_FLOW_ROUTER_PARALLEL_LOG = '1';- const envCheckOn = bench(- 'iter-12 env check (FLAG ON — branch taken, NO recordPair)',- () => { if (process.env.CLAUDE_FLOW_ROUTER_PARALLEL_LOG === '1') { /* branch taken */ } },- iters,- );- delete process.env.CLAUDE_FLOW_ROUTER_PARALLEL_LOG;-- // What does the LAZY-LOADER short-circuit cost when called repeatedly?- // Once initialized, it's a single nullness check on a module-level var.- let _cached = null;- const lazyLoaderInit = () => {- if (_cached === null) _cached = { mod: { recordPair: () => {} } };- return _cached;- };- // Run once to populate the cache- lazyLoaderInit();- const lazyLoaderHot = bench(- 'lazy loader (post-init nullness check)',- () => { lazyLoaderInit(); },- iters,- );-- const results = [baseline, envCheckOff, envCheckOn, lazyLoaderHot];-- if (ARGS.format === 'json') {- console.log(JSON.stringify({- platform: { os: process.platform, arch: process.arch, node: process.version },- iters,- results,- generatedAt: new Date().toISOString(),- }, null, 2));- return;- }-- console.log(`| Variant | Total (ms) | Mean per-call (ns) | p99 sample (ms) |`);- console.log(`|---|---:|---:|---:|`);- for (const r of results) {- console.log(`| ${r.label} | ${r.batchTotalMs} | ${r.meanNsPerCall} | ${r.p99PerCallMs} |`);- }-- // Interpret- const overhead = envCheckOff.meanNsPerCall - baseline.meanNsPerCall;- console.log('');- console.log(`**Iter-12 default-path overhead**: ~${Math.round(overhead)}ns per route() call`);- console.log('');- if (overhead < 100) {- console.log(`✓ Overhead < 100ns confirms iter-12's "zero default-path overhead" claim.`);- console.log(` At 1000 routing decisions per workload, total added cost is ~${Math.round(overhead * 1000 / 1000)}μs — imperceptible.`);- } else if (overhead < 1000) {- console.log(`✓ Overhead < 1μs is well within tolerable bounds.`);- } else {- console.log(`⚠ Overhead ${Math.round(overhead)}ns is higher than expected; investigate engine optimization.`);- }-- // CI regression gate (iter 25).- if (ARGS.maxOverheadNs !== null) {- if (!isFinite(ARGS.maxOverheadNs) || ARGS.maxOverheadNs <= 0) {- console.error('bench-recordpair-overhead: --max-overhead-ns must be a positive number');- process.exit(2);- }- console.log('');- if (overhead > ARGS.maxOverheadNs) {- console.log(`⚠ **REGRESSION**: measured ${Math.round(overhead)}ns > threshold ${ARGS.maxOverheadNs}ns`);- console.log(` The iter-12 dispatch wiring may have grown beyond the env-flag check.`);- console.log(` Inspect v3/@claude-flow/cli/src/ruvector/model-router.ts route() for new work in the default path.`);- process.exit(1);- } else {- console.log(`✓ Within regression threshold (${Math.round(overhead)}ns ≤ ${ARGS.maxOverheadNs}ns).`);- }- }-}--main();diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/bench-similarity.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/bench-similarity.mjsdeleted file mode 100755index eeedb50209..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/bench-similarity.mjs+++ /dev/null@@ -1,177 +0,0 @@-#!/usr/bin/env node-// bench-similarity.mjs — micro-benchmark for ADR-152 §3.1's production-// similarity() function. Establishes the per-call cost budget that-// future Phase-3 consumers (§3.2 Recommender N×M ranking, §3.3 Drift-// fleet-wide scan, §3.4 Capability graph traversal) inherit.-//-// THE CLAIM (iter 41 baseline)-// similarity(a, b) is a pure 9-dim cosine + 4-field categorical +-// set-jaccard composite — sub-microsecond per call on Apple Silicon /-// Node 22. Phase-3 consumers can therefore safely call it 10k+ times-// per request without sweating budget.-//-// WHAT IT MEASURES-// - Per-call mean + p50 + p99 over 1M iterations-// - Three input categories (cheap / typical / rich) to surface any-// payload-size sensitivity in projectToVec-//-// USAGE-// node scripts/bench-similarity.mjs # default 1M iters-// node scripts/bench-similarity.mjs --iters 5000000-// node scripts/bench-similarity.mjs --format json-// node scripts/bench-similarity.mjs --max-mean-us 10 # CI gate (exit 1 if mean > 10μs)-//-// EXIT CODES-// 0 ok (or --max-mean-us not set / threshold satisfied)-// 1 --max-mean-us threshold exceeded (regression)--import { performance } from 'node:perf_hooks';-import { similarity } from './_similarity.mjs';--const ARGS = (() => {- const a = {- iters: 1_000_000,- format: 'table',- // CI regression gate. When --max-mean-us N is set, exit 1 if any- // measured category's mean per-call cost exceeds N microseconds.- // Default ceiling 10μs chosen as ~5× headroom over Apple-Silicon- // baseline; works on slower CI runners.- maxMeanUs: null,- };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--iters') a.iters = parseInt(process.argv[++i], 10);- else if (v === '--format') a.format = process.argv[++i];- else if (v === '--max-mean-us') a.maxMeanUs = parseFloat(process.argv[++i]);- }- return a;-})();--// ───────────────────────────────────────────────────────────────────-// Three fixture categories-// ───────────────────────────────────────────────────────────────────--const CHEAP = {- // Bare-bones — everything defaulted from missing fields- score: { harnessFit: 50 },- genome: { agent_topology: ['a'] },-};--const TYPICAL = {- // The shape the iter-38 oia-audit fingerprint produces- score: {- harnessFit: 78, compileConfidence: 92, taskCoverage: 65,- toolSafety: 88, memoryUsefulness: 70, estCostPerRunUsd: 0.04,- recommendedMode: 'CLI + MCP', archetype: 'compliance-harness',- template: 'vertical:legal',- },- genome: {- repo_type: 'node_mcp_ci',- agent_topology: ['contract-analyst', 'redline-reviewer', 'risk-rater', 'compliance-officer'],- risk_score: 0.45, test_confidence: 0.7, publish_readiness: 0.6,- },-};--const RICH = {- // Larger agent_topology (Jaccard's variable-cost path)- score: TYPICAL.score,- genome: {- ...TYPICAL.genome,- agent_topology: Array.from({ length: 32 }, (_, i) => `agent-${i}`),- },-};--// ───────────────────────────────────────────────────────────────────-// Benchmark harness-// ───────────────────────────────────────────────────────────────────--function bench(label, a, b, iters) {- // Warm-up- for (let i = 0; i < 10_000; i++) similarity(a, b);-- const samples = new Float64Array(iters);- for (let i = 0; i < iters; i++) {- const t0 = performance.now();- similarity(a, b);- samples[i] = performance.now() - t0;- }-- // Stats- let sum = 0;- for (let i = 0; i < iters; i++) sum += samples[i];- const mean = sum / iters;-- const sorted = Array.from(samples).sort((x, y) => x - y);- const p50 = sorted[Math.floor(iters * 0.5)];- const p99 = sorted[Math.floor(iters * 0.99)];-- return {- label,- iters,- meanMs: mean,- p50Ms: p50,- p99Ms: p99,- meanUs: mean * 1000,- p99Us: p99 * 1000,- };-}--// ───────────────────────────────────────────────────────────────────-// iter 87 — suppress markdown header when --format json so the file-// captured via `> /tmp/bench-similarity.json` is valid JSON. Iter 82's-// CI step JSON.parse'd the captured file but silently failed because-// the `# bench-similarity` header contaminated the input.-if (ARGS.format !== 'json') {- console.log(`# bench-similarity — ADR-152 §3.1 per-call cost\n`);- console.log(`iters: ${ARGS.iters.toLocaleString()}\n`);-}--const results = [- bench('cheap', CHEAP, CHEAP, ARGS.iters),- bench('typical', TYPICAL, TYPICAL, ARGS.iters),- bench('rich (32 agents)', RICH, RICH, ARGS.iters),-];--let gate = { triggered: false, reasons: [] };-if (ARGS.maxMeanUs != null) {- for (const r of results) {- if (r.meanUs > ARGS.maxMeanUs) {- gate.triggered = true;- gate.reasons.push(`${r.label}: mean ${r.meanUs.toFixed(3)}μs > threshold ${ARGS.maxMeanUs}μs`);- }- }-}--const payload = {- iters: ARGS.iters,- results,- gate: ARGS.maxMeanUs != null ? {- thresholdUs: ARGS.maxMeanUs,- triggered: gate.triggered,- reasons: gate.reasons,- } : null,- generatedAt: new Date().toISOString(),- // The performance contract — captured for /docs/benchmarks consumers- contract: 'similarity() is sub-microsecond on Apple Silicon / Node 22+; Phase-3 consumers may freely call O(N²) on N=1000 harnesses (~1s budget).',-};--if (ARGS.format === 'json') {- console.log(JSON.stringify(payload, null, 2));-} else {- console.log(`| Category | mean | p50 | p99 |`);- console.log(`|------------------|-----------:|-----------:|-----------:|`);- for (const r of results) {- console.log(`| ${r.label.padEnd(16)} | ${r.meanUs.toFixed(3).padStart(7)}μs | ${(r.p50Ms * 1000).toFixed(3).padStart(7)}μs | ${r.p99Us.toFixed(3).padStart(7)}μs |`);- }- console.log('');- if (payload.gate) {- if (payload.gate.triggered) {- console.log(`⚠ ALERT: mean per-call exceeded ${ARGS.maxMeanUs}μs ceiling:`);- for (const reason of payload.gate.reasons) console.log(` - ${reason}`);- } else {- console.log(`✓ all categories within --max-mean-us ${ARGS.maxMeanUs}μs ceiling`);- }- }-}--if (gate.triggered) process.exit(1);diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/bench.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/bench.mjsdeleted file mode 100644index 7213a5718d..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/bench.mjs+++ /dev/null@@ -1,95 +0,0 @@-#!/usr/bin/env node-// bench.mjs — wrapper around `metaharness-darwin bench <create|verify>`.-//-// Bench suites are JSON files describing a corpus of (input, expected-output)-// tasks. `evolve --bench <suite.json>` scores each variant against the-// corpus instead of (or in addition to) the project's test command, which-// lets you evolve a harness against a fixed evaluation set independent of-// the repo's natural tests. `bench create` scaffolds a suite from a repo;-// `bench verify` checks a suite parses and every task is well-formed.-//-// USAGE-// node scripts/bench.mjs --op create --repo . # scaffold suite.json from current dir-// node scripts/bench.mjs --op create --repo . --out /tmp/foo.json-// node scripts/bench.mjs --op verify --suite /tmp/foo.json-//-// EXIT CODES-// 0 ok (or degraded — Darwin not available)-// 1 --op verify and any task malformed-// 2 config error or upstream invocation failure--import { runDarwin, emitDarwinDegradedJsonAndExit } from './_darwin.mjs';-import { existsSync } from 'node:fs';-import { resolve } from 'node:path';--const ARGS = (() => {- const a = { op: null, repo: '.', suite: null, out: null, format: 'json' };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--op') a.op = process.argv[++i];- else if (v === '--repo') a.repo = process.argv[++i];- else if (v === '--suite') a.suite = process.argv[++i];- else if (v === '--out') a.out = process.argv[++i];- else if (v === '--format') a.format = process.argv[++i];- }- return a;-})();--function safetyChecks() {- if (!['create', 'verify'].includes(ARGS.op)) {- console.error('bench: --op must be create|verify');- process.exit(2);- }- if (ARGS.op === 'create' && !existsSync(resolve(ARGS.repo))) {- console.error(`bench: --repo path does not exist: ${ARGS.repo}`);- process.exit(2);- }- if (ARGS.op === 'verify' && !ARGS.suite) {- console.error('bench: --suite is required for verify');- process.exit(2);- }- if (ARGS.op === 'verify' && !existsSync(resolve(ARGS.suite))) {- console.error(`bench: --suite path does not exist: ${ARGS.suite}`);- process.exit(2);- }-}--function main() {- safetyChecks();-- const cliArgs = ARGS.op === 'create'- ? ['bench', 'create', resolve(ARGS.repo), ...(ARGS.out ? ['--out', resolve(ARGS.out)] : [])]- : ['bench', 'verify', resolve(ARGS.suite)];-- const r = runDarwin(cliArgs, { timeoutMs: 60_000 });-- if (r.degraded) {- emitDarwinDegradedJsonAndExit(r.reason);- return;- }-- if (r.exitCode !== 0 && r.exitCode !== 1) {- const payload = {- success: false,- data: { exitCode: r.exitCode, stderrTail: r.stderr.slice(-400) },- generatedAt: new Date().toISOString(),- };- console.log(JSON.stringify(payload, null, 2));- process.exit(2);- }-- const payload = {- success: r.exitCode === 0,- data: {- op: ARGS.op,- ...(r.json ?? { stdoutTail: r.stdout.slice(-2000) }),- durationMs: r.durationMs,- },- generatedAt: new Date().toISOString(),- };-- console.log(JSON.stringify(payload, null, 2));- process.exit(r.exitCode);-}--main();diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/drift-from-history.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/drift-from-history.mjsdeleted file mode 100755index 5479c718d0..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/drift-from-history.mjs+++ /dev/null@@ -1,363 +0,0 @@-#!/usr/bin/env node-// drift-from-history.mjs — iter 53 — one-command drift detection.-//-// Composes the existing pipeline into the workflow users actually want:-// "did my repo drift since the last audit?" Implementation:-//-// 1. List audit records from `metaharness-audit` memory namespace-// 2. Pick the most recent one (or filter --since Nd to skip recent ones-// and use an older baseline)-// 3. Run a fresh oia-audit against the current repo state-// 4. Diff via audit-trend → structural distance + severity rollup-// 5. Alert if structural similarity falls below --threshold-//-// Until this iter, doing this required the user to:-// $ npx ruflo metaharness audit-list --format json-// $ # ... pick a key by hand from the listing-// $ npx ruflo metaharness oia-audit --format json > /tmp/curr.json-// $ npx ruflo metaharness audit-trend --baseline-key X --current-file /tmp/curr.json-// Now it's:-// $ npx ruflo metaharness drift-from-history --threshold 0.95-//-// USAGE-// node scripts/drift-from-history.mjs # default: last record vs now-// node scripts/drift-from-history.mjs --baseline-since 7d # use an audit ≥ 7d old-// node scripts/drift-from-history.mjs --threshold 0.95 # alert under 0.95 similarity-// node scripts/drift-from-history.mjs --format json-// node scripts/drift-from-history.mjs --dry-run # don't persist current-//-// EXIT CODES-// 0 ok (no drift below --threshold)-// 1 drift below --threshold (alert fired)-// 2 config / input error (no history available, etc.)-// 3 upstream metaharness absent — degraded payload returned--import { spawnSync, spawn } from 'node:child_process';-// iter 78 — share the iter-63 SEVERITY_RANK for the new finding-alert gate-import { rankSeverity } from './_harness.mjs';-import { mkdtempSync, writeFileSync, rmSync } from 'node:fs';-import { tmpdir } from 'node:os';-import { join, dirname } from 'node:path';-import { fileURLToPath } from 'node:url';--const SCRIPTS_DIR = dirname(fileURLToPath(import.meta.url));-const NS = process.env.METAHARNESS_AUDIT_NAMESPACE || 'metaharness-audit';-const CLI_PKG = process.env.CLI_CORE === '1'- ? '@claude-flow/cli-core@alpha'- : '@claude-flow/cli@latest';--const ARGS = (() => {- const a = {- path: '.', baselineSince: null, baselineKey: null, baselineFile: null,- threshold: 0.95, dryRun: false, format: 'table',- // iter 78 — opt-in finding-severity alert gate. Default null (off)- // preserves iter-53 behavior; set to a severity name to ALSO alert- // when any introduced finding meets or exceeds that severity.- alertOnNewSeverity: null,- };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--path') a.path = process.argv[++i];- else if (v === '--baseline-since') a.baselineSince = process.argv[++i];- // iter 66 — explicit baseline-key skips the ONNX-heavy audit-list- // call entirely. Cron jobs that know the key avoid the ~25s warmup.- else if (v === '--baseline-key') a.baselineKey = process.argv[++i];- // iter 67 — baseline-file goes further: no memory call at all.- // Useful for CI workflows that store last-run audit as an artifact- // and download it for diff against fresh audit.- else if (v === '--baseline-file') a.baselineFile = process.argv[++i];- else if (v === '--threshold') a.threshold = Number(process.argv[++i]);- else if (v === '--dry-run') a.dryRun = true;- else if (v === '--format') a.format = process.argv[++i];- // iter 78 — orthogonal alert: any new finding ≥ this severity triggers- else if (v === '--alert-on-new-severity') a.alertOnNewSeverity = String(process.argv[++i]).toLowerCase();- }- return a;-})();--function emitAndExit(payload, code) {- if (ARGS.format === 'json') {- console.log(JSON.stringify(payload, null, 2));- } else {- console.log(`# drift-from-history\n`);- if (payload.degraded) {- console.log(`⊘ ${payload.reason}`);- } else if (payload.error) {- console.log(`✗ ${payload.error}`);- } else {- console.log(`Baseline: ${payload.baseline?.key ?? payload.baseline?.startedAt}`);- console.log(`Current: ${payload.current?.startedAt ?? '(fresh)'}`);- // iter 96 — surface the timing.path label so users see which- // fast-path ran (or didn't) at a glance.- if (payload.timing?.path) {- const wallMs = payload.timing.parallelWallMs;- console.log(`Path: ${payload.timing.path} (wall ${wallMs}ms)`);- }- console.log('');- const sd = payload.drift?.structuralDistance;- if (sd && sd.verdict !== 'unavailable') {- console.log(`Structural similarity: ${sd.overall} (${sd.verdict})`);- console.log(`Distance: ${sd.distance}`);- }- console.log('');- if (payload.alert?.triggered) {- console.log(`⚠ ALERT: ${payload.alert.reason}`);- } else if (payload.alert) {- console.log(`✓ ${payload.alert.reason}`);- }- }- }- process.exit(code);-}--function runScriptJson(script, args) {- const r = spawnSync('node', [join(SCRIPTS_DIR, script), ...args, '--format', 'json'], {- encoding: 'utf-8',- });- const m = /\{[\s\S]*\}/.exec(r.stdout || '');- const json = m ? JSON.parse(m[0]) : null;- // audit-list emits {records:[...]} — check that shape too- const arrM = /\[[\s\S]*\]/.exec(r.stdout || '');- return { json, exitCode: r.status ?? -1, stdout: r.stdout || '', stderr: r.stderr || '', arrMatch: arrM };-}--/**- * iter 58 — async variant. Drift-from-history's audit-list (memory query)- * and oia-audit (fresh subprocess chain) are mutually independent and- * can race. This shaves ~2-5s off every drift check by overlapping the- * subprocess wait time.- */-function runScriptJsonAsync(script, args) {- return new Promise((resolve) => {- const p = spawn('node', [join(SCRIPTS_DIR, script), ...args, '--format', 'json'], {- stdio: ['ignore', 'pipe', 'pipe'],- });- let stdout = '', stderr = '';- p.stdout?.on('data', (d) => { stdout += d.toString(); });- p.stderr?.on('data', (d) => { stderr += d.toString(); });- p.on('close', (code) => {- const m = /\{[\s\S]*\}/.exec(stdout);- let json = null;- if (m) { try { json = JSON.parse(m[0]); } catch { /* leave null */ } }- resolve({ json, exitCode: code ?? -1, stdout, stderr });- });- p.on('error', () => resolve({ json: null, exitCode: 127, stdout, stderr: 'spawn-failed' }));- });-}--async function main() {- // iter 58 — parallelize audit-list + oia-audit. They're mutually- // independent (audit-list queries memory, oia-audit runs fresh- // metaharness subprocesses) so racing them shaves ~2-5s off every- // drift check. The audit-trend step still serializes after because- // it consumes both prior outputs.- const listArgs = ['--limit', '50'];- if (ARGS.baselineSince) listArgs.push('--since', ARGS.baselineSince);- const auditArgs = ['--path', ARGS.path];- if (ARGS.dryRun) auditArgs.push('--dry-run');-- // iter 65 — measure parallel batch wall-clock so a future iter that- // accidentally serializes (await audit-list; await oia-audit) doesn't- // silently regress. timing.parallelSpeedup is surfaced in payload.- // iter 66 — when --baseline-key is provided, skip audit-list entirely- // (it's ~25s of ONNX warmup for what would be one record lookup).- // Run oia-audit alone in that case.- const parallelStart = Date.now();- const listStart = Date.now();- const auditStart = Date.now();- let listResult;- let auditResult;- let skippedAuditList = false;- let usedBaselineFile = false;- if (ARGS.baselineFile) {- // iter 67 fast-fast path — baseline already on disk. Skip- // audit-list AND skip memory roundtrip when running audit-trend.- skippedAuditList = true;- usedBaselineFile = true;- listResult = {- json: { records: [{ key: `file:${ARGS.baselineFile}`, startedAt: null }] },- exitCode: 0, stdout: '', stderr: '', durationMs: 0,- };- auditResult = await runScriptJsonAsync('oia-audit.mjs', auditArgs);- auditResult.durationMs = Date.now() - auditStart;- } else if (ARGS.baselineKey) {- skippedAuditList = true;- // Synthesize a list result containing the user-provided key.- // No memory call needed — drift-from-history's downstream code- // only reads the `key` field from the picked record.- listResult = {- json: { records: [{ key: ARGS.baselineKey, startedAt: null }] },- exitCode: 0,- stdout: '',- stderr: '',- durationMs: 0,- };- auditResult = await runScriptJsonAsync('oia-audit.mjs', auditArgs);- auditResult.durationMs = Date.now() - auditStart;- } else {- [listResult, auditResult] = await Promise.all([- runScriptJsonAsync('audit-list.mjs', listArgs)- .then((r) => ({ ...r, durationMs: Date.now() - listStart })),- runScriptJsonAsync('oia-audit.mjs', auditArgs)- .then((r) => ({ ...r, durationMs: Date.now() - auditStart })),- ]);- }- const parallelWallMs = Date.now() - parallelStart;- const parallelSumMs = (listResult.durationMs || 0) + (auditResult.durationMs || 0);-- if (listResult.exitCode !== 0) {- emitAndExit({- error: `audit-list failed (exit ${listResult.exitCode})`,- stderrTail: listResult.stderr.slice(-200),- }, 2);- }- const records = listResult.json?.records ?? listResult.json?.entries ?? [];- if (records.length === 0) {- // iter 57 + iter 58 — disambiguate "no history yet" (exit 2) from- // "metaharness absent" (exit 3). Use the audit we already ran- // (iter 58 fused the probe into the parallel batch) — no extra- // subprocess needed.- if (auditResult.json?.degraded === true) {- emitAndExit({- degraded: true,- reason: auditResult.json.reason || 'metaharness-not-available',- hint: 'Install metaharness to enable drift detection.',- }, 3);- }- emitAndExit({- error: 'no audit records found in namespace ' + NS,- hint: 'Run `ruflo metaharness oia-audit` at least once to seed history.',- }, 2);- }- // Pick the most recent record (records are typically newest-first; if not,- // sort by startedAt). Each record's key is in the entry.- const sorted = [...records].sort((a, b) =>- String(b.startedAt ?? b.key ?? '').localeCompare(String(a.startedAt ?? a.key ?? '')));- const baseline = sorted[0];- if (!baseline?.key) {- emitAndExit({- error: 'audit record has no `key` field — cannot reference',- sample: baseline,- }, 2);- }-- // Step 2: run fresh oia-audit (write to temp file so audit-trend can read it)- const tmp = mkdtempSync(join(tmpdir(), 'drift-from-history-'));- const currPath = join(tmp, 'current.json');- try {- // iter 58 — reuse auditResult from the parallel batch above instead- // of re-running oia-audit. Saves the ~600ms-3s the second run took.- if (!auditResult.json || auditResult.exitCode !== 0) {- emitAndExit({- error: `oia-audit failed (exit ${auditResult.exitCode})`,- stderrTail: auditResult.stderr.slice(-200),- }, 2);- }- if (auditResult.json.degraded === true) {- emitAndExit({- degraded: true,- reason: auditResult.json.reason || 'metaharness-not-available',- }, 3);- }- writeFileSync(currPath, JSON.stringify(auditResult.json));-- // Step 3: audit-trend- // iter 67 — when --baseline-file was given, pass it through as- // audit-trend's --baseline file input instead of --baseline-key.- // Avoids the memory roundtrip on the trend leg too.- const trendArgs = usedBaselineFile- ? [- '--baseline', ARGS.baselineFile,- '--current', currPath,- '--alert-on-distance-below', String(ARGS.threshold),- ]- : [- '--baseline-key', baseline.key,- '--current', currPath,- '--alert-on-distance-below', String(ARGS.threshold),- ];- const trendResult = runScriptJson('audit-trend.mjs', trendArgs);- if (!trendResult.json) {- emitAndExit({- error: `audit-trend produced no JSON (exit ${trendResult.exitCode})`,- stderrTail: trendResult.stderr.slice(-200),- }, 2);- }- const trend = trendResult.json;- let alertTriggered = trendResult.exitCode === 1;- const alertReasons = trend.alert?.reasons ? [...trend.alert.reasons] : [];-- // iter 78 — orthogonal finding-severity gate: any introduced- // finding ≥ --alert-on-new-severity triggers regardless of- // structural-distance threshold. Catches the "security regression- // that didn't move the genome much" case.- let elevatedFindings = [];- if (ARGS.alertOnNewSeverity) {- const threshold = rankSeverity(ARGS.alertOnNewSeverity);- const introduced = trend?.delta?.findings?.introduced ?? [];- elevatedFindings = introduced.filter((f) => rankSeverity(f.severity) >= threshold);- if (elevatedFindings.length > 0) {- alertTriggered = true;- alertReasons.push(- `${elevatedFindings.length} new finding(s) at or above ${ARGS.alertOnNewSeverity} severity`,- );- }- }-- const payload = {- adr: 'ADR-150 + ADR-152 §3.1',- command: 'drift-from-history',- // iter 65 — parallel batch metrics. parallelSpeedup>1 means- // audit-list + oia-audit raced; ~1.0 means serial regression.- timing: {- parallelWallMs,- parallelSumMs,- parallelSpeedup: parallelSumMs > 0- ? Math.round((parallelSumMs / Math.max(parallelWallMs, 1)) * 100) / 100- : 0,- // iter 66 — when true, audit-list was skipped via --baseline-key.- // Fastpath drops wall-clock from ~26s to ~1s (avoids ONNX warmup).- skippedAuditList,- // iter 67 — when true, baseline came from a file instead of memory.- // Skips audit-list AND the audit-trend memory roundtrip.- usedBaselineFile,- // iter 95 — derived path label for cleaner consumer code:- // 'slow' — default (no fast-path arg); audit-list ran- // 'key' — --baseline-key skipped audit-list, baseline came from memory- // 'file' — --baseline-file skipped audit-list AND memory roundtrip- path: usedBaselineFile ? 'file' : (skippedAuditList ? 'key' : 'slow'),- },- baseline: {- key: baseline.key,- startedAt: baseline.startedAt ?? null,- },- current: {- startedAt: auditResult.json.startedAt,- composite: auditResult.json.composite,- },- drift: trend.delta,- alert: {- threshold: ARGS.threshold,- // iter 78 — orthogonal gates surfaced: similarity threshold AND- // new-finding-severity. Either can flip triggered=true.- newSeverityThreshold: ARGS.alertOnNewSeverity,- triggered: alertTriggered,- reasons: alertReasons,- // Keep .reason for backward-compat with consumers that read it as a string- reason: alertReasons.length > 0- ? alertReasons.join('; ')- : (alertTriggered ? `similarity < ${ARGS.threshold}` : `similarity ≥ ${ARGS.threshold} — OK`),- elevatedFindings,- },- generatedAt: new Date().toISOString(),- };- emitAndExit(payload, alertTriggered ? 1 : 0);- } finally {- try { rmSync(tmp, { recursive: true, force: true }); } catch { /* ignore */ }- }-}--main().catch((e) => {- console.error('drift-from-history crashed:', e.message || e);- process.exit(2);-});diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/evolve.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/evolve.mjsdeleted file mode 100644index 635c659e91..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/evolve.mjs+++ /dev/null@@ -1,244 +0,0 @@-#!/usr/bin/env node-// evolve.mjs — wrapper around `metaharness-darwin evolve <repo>`.-//-// ADR-153: Darwin Mode is the WRITE layer that closes the loop ADR-150's-// READ layer (score / genome / mcp-scan / threat-model / oia-audit) opens.-// score+genome tell you where the harness IS; darwin evolve tells you which-// mutation makes it provably better, without retraining the foundation model.-//-// SAFETY (ADR-153 §"Safety model"):-// - Variant generation + sandbox happen under <repo>/.metaharness/variants/,-// never in the repo root. Upstream `inspectVariant()` rejects nested dirs,-// symlinks, secret-shaped strings, shell-out / network / dynamic-eval-// before any variant runs. Exit code 99 is reserved for "safety-disqualified".-// - --confirm is REQUIRED. Without it the script prints a plan and exits 0-// (mirrors mint.mjs convention). This is in addition to upstream's safety-// layer — defense in depth at the ruflo boundary.-// - Default --generations 3 --children 3 (small) — anything larger is opt-in.-// Real evolutions are minutes-to-hours; ruflo's default sandbox config-// errs toward "show me the mechanism works" over "find a winner today".-//-// USAGE-// node scripts/evolve.mjs --repo . # dry-run plan-// node scripts/evolve.mjs --repo . --confirm # actually evolve-// node scripts/evolve.mjs --repo . --confirm --generations 5 --children 3-// node scripts/evolve.mjs --repo . --confirm --sandbox mock # no real tests-// node scripts/evolve.mjs --repo . --confirm --selection pareto-//-// EXIT CODES-// 0 evolved OK (or dry-run, or degraded — MetaHarness Darwin not available)-// 1 --alert-on-no-improvement and champion did not beat parent-// 2 config error or evolution failure-// 99 reserved — upstream "safety-disqualified" (propagated)--import { runDarwinAsync, emitDarwinDegradedJsonAndExit } from './_darwin.mjs';-import { existsSync } from 'node:fs';-import { resolve } from 'node:path';--const ARGS = (() => {- const a = {- repo: '.',- generations: 3,- children: 3,- concurrency: 2,- seed: null,- sandbox: 'real',- selection: null,- crossover: false,- epistasis: false,- curriculum: false,- riskBudget: null,- fdr: null,- tie: null,- bench: null,- mutator: 'deterministic',- ruvllmUrl: null,- ruvllmModel: null,- confirm: false,- alertOnNoImprovement: false,- format: 'json',- timeoutMs: null, // computed below if unset- };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--repo') a.repo = process.argv[++i];- else if (v === '--generations') a.generations = parseInt(process.argv[++i], 10);- else if (v === '--children') a.children = parseInt(process.argv[++i], 10);- else if (v === '--concurrency') a.concurrency = parseInt(process.argv[++i], 10);- else if (v === '--seed') a.seed = parseInt(process.argv[++i], 10);- else if (v === '--sandbox') a.sandbox = process.argv[++i];- else if (v === '--selection') a.selection = process.argv[++i];- else if (v === '--crossover') a.crossover = true;- else if (v === '--epistasis') a.epistasis = true;- else if (v === '--curriculum') a.curriculum = true;- else if (v === '--risk-budget') a.riskBudget = parseInt(process.argv[++i], 10);- else if (v === '--fdr') a.fdr = parseFloat(process.argv[++i]);- else if (v === '--tie') a.tie = process.argv[++i];- else if (v === '--bench') a.bench = process.argv[++i];- else if (v === '--mutator') a.mutator = process.argv[++i];- else if (v === '--ruvllm-url') a.ruvllmUrl = process.argv[++i];- else if (v === '--ruvllm-model') a.ruvllmModel = process.argv[++i];- else if (v === '--confirm') a.confirm = true;- else if (v === '--alert-on-no-improvement') a.alertOnNoImprovement = true;- else if (v === '--format') a.format = process.argv[++i];- else if (v === '--timeout-ms') a.timeoutMs = parseInt(process.argv[++i], 10);- }- return a;-})();--function safetyChecks() {- const repoPath = resolve(ARGS.repo);- if (!existsSync(repoPath)) {- console.error(`evolve: repo path does not exist: ${repoPath}`);- process.exit(2);- }- if (ARGS.generations < 1 || ARGS.generations > 50) {- console.error('evolve: --generations must be 1..50 (ruflo cap; upstream supports more)');- process.exit(2);- }- if (ARGS.children < 1 || ARGS.children > 20) {- console.error('evolve: --children must be 1..20 (ruflo cap)');- process.exit(2);- }- if (ARGS.concurrency < 1 || ARGS.concurrency > 8) {- console.error('evolve: --concurrency must be 1..8 (ruflo cap)');- process.exit(2);- }- if (!['real', 'mock', 'agent'].includes(ARGS.sandbox)) {- console.error(`evolve: --sandbox must be real|mock|agent (got: ${ARGS.sandbox})`);- process.exit(2);- }- if (ARGS.selection && !['quality-diversity', 'behavioral-diversity', 'niche-steering', 'clade', 'pareto'].includes(ARGS.selection)) {- console.error(`evolve: --selection must be one of quality-diversity|behavioral-diversity|niche-steering|clade|pareto`);- process.exit(2);- }- if (!['deterministic', 'ruvllm'].includes(ARGS.mutator)) {- console.error(`evolve: --mutator must be deterministic|ruvllm`);- process.exit(2);- }- return repoPath;-}--// Compute a sensible timeout from the search shape if caller didn't specify.-// Rough budget: each variant ~= 30s (sandbox test command + safety inspect),-// total ~= generations × children × per-variant / concurrency.-function defaultTimeoutMs() {- const perVariantMs = ARGS.sandbox === 'mock' ? 2_000 : 60_000;- const variants = ARGS.generations * ARGS.children;- const parallelism = Math.min(ARGS.concurrency, variants);- const wall = Math.ceil(variants / parallelism) * perVariantMs;- // Add 30s overhead for npm install + initial profile + final report.- return Math.max(60_000, wall + 30_000);-}--async function main() {- const repoPath = safetyChecks();-- const plan = {- binary: 'metaharness-darwin evolve',- repo: repoPath,- generations: ARGS.generations,- children: ARGS.children,- concurrency: ARGS.concurrency,- sandbox: ARGS.sandbox,- selection: ARGS.selection,- crossover: ARGS.crossover,- epistasis: ARGS.epistasis,- curriculum: ARGS.curriculum,- mutator: ARGS.mutator,- estVariants: ARGS.generations * ARGS.children,- timeoutMs: ARGS.timeoutMs ?? defaultTimeoutMs(),- output: `${repoPath}/.metaharness/{archive.json, lineage.json, variants/, runs/, reports/winner.json}`,- };-- if (!ARGS.confirm) {- const payload = {- success: true,- data: { plan, dryRun: true, message: 'Pass --confirm to run the evolution.' },- generatedAt: new Date().toISOString(),- };- console.log(JSON.stringify(payload, null, 2));- process.exit(0);- }-- const cliArgs = ['evolve', repoPath,- '--generations', String(ARGS.generations),- '--children', String(ARGS.children),- '--concurrency', String(ARGS.concurrency),- '--sandbox', ARGS.sandbox,- '--mutator', ARGS.mutator,- ];- if (ARGS.seed != null) cliArgs.push('--seed', String(ARGS.seed));- if (ARGS.selection) cliArgs.push('--selection', ARGS.selection);- if (ARGS.crossover) cliArgs.push('--crossover');- if (ARGS.epistasis) cliArgs.push('--epistasis');- if (ARGS.curriculum) cliArgs.push('--curriculum');- if (ARGS.riskBudget != null) cliArgs.push('--risk-budget', String(ARGS.riskBudget));- if (ARGS.fdr != null) cliArgs.push('--fdr', String(ARGS.fdr));- if (ARGS.tie) cliArgs.push('--tie', ARGS.tie);- if (ARGS.bench) cliArgs.push('--bench', ARGS.bench);- if (ARGS.ruvllmUrl) cliArgs.push('--ruvllm-url', ARGS.ruvllmUrl);- if (ARGS.ruvllmModel) cliArgs.push('--ruvllm-model', ARGS.ruvllmModel);-- // Forward progress lines to stderr so the user sees per-generation activity- // (subprocess-of-an-MCP-tool case: this still surfaces in the agent log).- const r = await runDarwinAsync(cliArgs, {- timeoutMs: plan.timeoutMs,- onProgress: (line) => { if (line.trim()) process.stderr.write(`[evolve] ${line}\n`); },- });-- if (r.degraded) {- emitDarwinDegradedJsonAndExit(r.reason);- return;- }-- // Upstream exit code 99 = safety-disqualified — propagate verbatim so- // CI gates can distinguish "evolution failed" from "evolution surfaced- // a safety-tripping mutation". This is a designed-in tripwire, not an- // error the ruflo layer should remap.- if (r.exitCode === 99) {- const payload = {- success: false,- data: { safetyDisqualified: true, hint: 'A variant tripped the safety inspection layer. See <repo>/.metaharness/runs/ for which surface and pattern.' },- stderrTail: r.stderr.slice(-400),- durationMs: r.durationMs,- generatedAt: new Date().toISOString(),- };- console.log(JSON.stringify(payload, null, 2));- process.exit(99);- }-- if (r.exitCode !== 0) {- const payload = {- success: false,- data: { exitCode: r.exitCode, stderrTail: r.stderr.slice(-400) },- generatedAt: new Date().toISOString(),- };- console.log(JSON.stringify(payload, null, 2));- process.exit(2);- }-- const champion = r.json || {};- const noImprovement = champion.parentScore != null && champion.championScore != null &&- champion.championScore <= champion.parentScore;-- const payload = {- success: true,- data: {- ...champion,- plan,- durationMs: r.durationMs,- improved: !noImprovement,- },- generatedAt: new Date().toISOString(),- };-- console.log(JSON.stringify(payload, null, 2));- if (ARGS.alertOnNoImprovement && noImprovement) process.exit(1);- process.exit(0);-}--main().catch((e) => {- console.error(`evolve: unexpected failure: ${e?.message ?? e}`);- process.exit(2);-});diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/genome.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/genome.mjsdeleted file mode 100755index 50f5587641..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/genome.mjs+++ /dev/null@@ -1,80 +0,0 @@-#!/usr/bin/env node-// genome.mjs — wrapper around `metaharness genome <path>`.-//-// Returns the 7-section readiness report: repo_type / agent_topology /-// risk_score / mcp_surface / test_confidence / publish_readiness +-// verdict (ready | needs-work | blocked). Reads-only.-//-// USAGE-// node scripts/genome.mjs-// node scripts/genome.mjs --path <dir> --alert-on-risk-above 0.5 --format json-//-// EXIT CODES-// 0 OK-// 1 --alert-on-risk-above threshold breached-// 2 config error or genome failure--import { runMetaharness, emitDegradedJsonAndExit } from './_harness.mjs';--const ARGS = (() => {- const a = { path: '.', format: 'json', alertRiskAbove: null };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--path') a.path = process.argv[++i];- else if (v === '--alert-on-risk-above') a.alertRiskAbove = parseFloat(process.argv[++i]);- else if (v === '--format') a.format = process.argv[++i];- }- return a;-})();--function main() {- const r = runMetaharness(['genome', ARGS.path]);- if (r.degraded) { emitDegradedJsonAndExit(r.reason); return; }- if (r.exitCode !== 0 || !r.json) {- console.error(`genome: metaharness exited ${r.exitCode}`);- if (r.stderr) console.error(r.stderr.slice(0, 400));- process.exit(2);- }- // iter 112 — generatedAt for consistency with other --format json outputs- const payload = { ...r.json, path: ARGS.path, durationMs: r.durationMs,- generatedAt: new Date().toISOString() };-- if (ARGS.alertRiskAbove !== null) {- if (!isFinite(ARGS.alertRiskAbove)) {- console.error(`genome: --alert-on-risk-above must be a finite number`);- process.exit(2);- }- payload.alert = {- threshold: ARGS.alertRiskAbove,- triggered: typeof payload.risk_score === 'number' && payload.risk_score > ARGS.alertRiskAbove,- reason: typeof payload.risk_score === 'number' && payload.risk_score > ARGS.alertRiskAbove- ? `risk_score ${payload.risk_score} > ${ARGS.alertRiskAbove}`- : `risk_score ${payload.risk_score ?? 'unknown'} ≤ ${ARGS.alertRiskAbove} — OK`,- };- }-- if (ARGS.format === 'json') {- console.log(JSON.stringify(payload, null, 2));- } else {- console.log(`# harness-genome — ${ARGS.path}`);- console.log('');- console.log(`| Section | Value |`);- console.log(`|---|---|`);- console.log(`| repo_type | ${payload.repo_type ?? '—'} |`);- console.log(`| agent_topology | ${(payload.agent_topology || []).join(', ') || '—'} |`);- console.log(`| risk_score | ${payload.risk_score ?? '—'} |`);- console.log(`| mcp_surface | ${payload.mcp_surface ?? '—'} |`);- console.log(`| test_confidence | ${payload.test_confidence ?? '—'} |`);- console.log(`| publish_readiness | ${payload.publish_readiness ?? '—'} |`);- console.log(`| **duration** | ${payload.durationMs}ms |`);- console.log('');- if (payload.alert) {- console.log(payload.alert.triggered ? `⚠ **ALERT**: ${payload.alert.reason}` : `✓ ${payload.alert.reason}`);- console.log('');- }- }-- if (payload.alert?.triggered) process.exit(1);-}--main();diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/gepa.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/gepa.mjsdeleted file mode 100644index 5f230b8000..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/gepa.mjs+++ /dev/null@@ -1,199 +0,0 @@-#!/usr/bin/env node-// gepa.mjs — surfaces the `@metaharness/darwin/gepa` LIBRARY exports.-//-// Unlike every other script in this plugin, gepa has no CLI equivalent —-// GEPA (darwin 0.8.0's genetic-evolution prompt-adaptation engine) ships as-// a library entry (`import { ... } from '@metaharness/darwin/gepa'`). This-// script wraps the subprocess-safe subset:-//-// genome load + validate a genome (default: the shipped cand-6 — the-// first holdout-confirmed cheap-tier policy promotion)-// validate validateGenome(json) → structural errors[]-// render buildSystemFromGenome(genome) → the system prompt a genome-// compiles to (inspect what a policy actually says)-// analyze analyzeTranscript(entries) → failure-class breakdown-//-// NOT SURFACED: `gepaOptimize` — it takes an in-process `evaluate(candidate)`-// callback ("bring your own evaluator") which cannot cross a subprocess-// boundary. Optimization runs belong either in library consumers-// (import '@metaharness/darwin/gepa' directly) or behind the darwin CLI's-// `evolve` verb (scripts/evolve.mjs), which pairs GEPA with its sandbox-// evaluators.-//-// MODULE RESOLUTION (ADR-150 graceful degradation)-// ================================================-// 1. Try bare `import('@metaharness/darwin/gepa')` — free when the optional-// dep is installed in an ancestor node_modules.-// 2. Fall back to a ruflo-owned versioned cache install-// (~/.ruflo/darwin-cache-<pin>) — same pattern as _redblue.mjs; the-// versioned dir means pin bumps invalidate stale caches automatically.-// 3. Both fail → `{degraded: true}` exit 0. Never throws.-//-// EXIT CODES-// 0 op completed (or degraded)-// 1 --alert-on-invalid and validate found errors-// 2 config error (bad op / missing file)--import { readFileSync, existsSync, mkdirSync } from 'node:fs';-import { spawnSync } from 'node:child_process';-import { homedir } from 'node:os';-import { join } from 'node:path';-import { pathToFileURL } from 'node:url';--// Bump in lock-step with DARWIN_PIN in _darwin.mjs + optionalDependencies.-const DARWIN_PIN_VERSION = '~0.8.0';-const CACHE_DIR = join(- homedir(), '.ruflo', `darwin-cache-${DARWIN_PIN_VERSION.replace(/[~^]/g, '')}`,-);-const CACHED_GEPA = join(- CACHE_DIR, 'node_modules', '@metaharness', 'darwin', 'dist', 'gepa', 'index.js',-);--const ARGS = (() => {- const a = {- op: null,- path: null, // genome JSON path (genome/validate/render); default cand-6- transcript: null, // transcript JSON path (analyze)- ext: undefined, // render — target file extension hint- glob: undefined, // render — target glob hint- alertOnInvalid: false,- format: 'json',- };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--op') a.op = process.argv[++i];- else if (v === '--path') a.path = process.argv[++i];- else if (v === '--transcript') a.transcript = process.argv[++i];- else if (v === '--ext') a.ext = process.argv[++i];- else if (v === '--glob') a.glob = process.argv[++i];- else if (v === '--alert-on-invalid') a.alertOnInvalid = true;- else if (v === '--format') a.format = process.argv[++i];- }- return a;-})();--function emitDegradedAndExit(reason) {- console.log(JSON.stringify({- degraded: true,- reason,- hint: 'Install with `npm i -D @metaharness/darwin@' + DARWIN_PIN_VERSION- + '` or verify network access — the gepa entry ships inside the darwin package.',- generatedAt: new Date().toISOString(),- }, null, 2));- process.exit(0); // ADR-150 — ruflo stays operational without MetaHarness-}--async function importGepa() {- try {- return await import('@metaharness/darwin/gepa');- } catch (e) {- const msg = String(e?.message ?? e);- // Fall back on absence AND on stale installs: a pre-0.8.0 darwin in an- // ancestor node_modules has no './gepa' subpath, which throws- // ERR_PACKAGE_PATH_NOT_EXPORTED rather than MODULE_NOT_FOUND.- const recoverable = /Cannot find (module|package)|ERR_MODULE_NOT_FOUND|MODULE_NOT_FOUND|ERR_PACKAGE_PATH_NOT_EXPORTED|is not defined by "exports"/i;- if (!recoverable.test(msg)) throw e;- }- // Cached-install fallback.- if (!existsSync(CACHED_GEPA)) {- try {- mkdirSync(CACHE_DIR, { recursive: true });- } catch {- return null;- }- const r = spawnSync('npm', [- 'install',- '--no-audit', '--no-fund', '--no-package-lock',- '--prefix', CACHE_DIR,- `@metaharness/darwin@${DARWIN_PIN_VERSION}`,- ], {- stdio: ['ignore', 'pipe', 'pipe'],- encoding: 'utf-8',- timeout: 180_000,- shell: process.platform === 'win32',- });- if (r.status !== 0 || !existsSync(CACHED_GEPA)) return null;- }- try {- return await import(pathToFileURL(CACHED_GEPA).href);- } catch {- return null;- }-}--function readJsonFile(path, label) {- if (!path || !existsSync(path)) {- console.error(`gepa: ${label} file not found: ${path}`);- process.exit(2);- }- try {- return JSON.parse(readFileSync(path, 'utf8'));- } catch (e) {- console.error(`gepa: ${label} is not valid JSON: ${e?.message ?? e}`);- process.exit(2);- }-}--function loadGenomeOrExit(gepa) {- if (ARGS.path) {- if (!existsSync(ARGS.path)) {- console.error(`gepa: --path genome file not found: ${ARGS.path}`);- process.exit(2);- }- // upstream signature: loadGenome(readFileSync, path) — fs injected.- return { genome: gepa.loadGenome(readFileSync, ARGS.path), source: ARGS.path };- }- return { genome: gepa.loadCand6Genome(), source: gepa.CAND6_GENOME_PATH };-}--async function main() {- const OPS = ['genome', 'validate', 'render', 'analyze'];- if (!OPS.includes(ARGS.op)) {- console.error(`gepa: --op must be one of ${OPS.join('|')}`);- process.exit(2);- }-- const gepa = await importGepa();- if (!gepa) emitDegradedAndExit('metaharness-darwin-not-available');-- const start = Date.now();- let out;-- if (ARGS.op === 'genome') {- const { genome, source } = loadGenomeOrExit(gepa);- const errors = gepa.validateGenome(genome);- out = { op: 'genome', source, valid: errors.length === 0, errors, genome };- } else if (ARGS.op === 'validate') {- // validate takes raw JSON (not loadGenome) so structurally-broken files- // reach validateGenome instead of throwing in the loader.- const raw = ARGS.path- ? readJsonFile(ARGS.path, '--path genome')- : gepa.loadCand6Genome();- const errors = gepa.validateGenome(raw);- out = { op: 'validate', source: ARGS.path ?? gepa.CAND6_GENOME_PATH, valid: errors.length === 0, errors };- } else if (ARGS.op === 'render') {- const { genome, source } = loadGenomeOrExit(gepa);- const system = gepa.buildSystemFromGenome(genome, ARGS.ext, ARGS.glob);- out = { op: 'render', source, chars: system.length, system };- } else {- // analyze- const entries = readJsonFile(ARGS.transcript, '--transcript');- if (!Array.isArray(entries)) {- console.error('gepa: --transcript must be a JSON array of transcript entries');- process.exit(2);- }- const analysis = gepa.analyzeTranscript(entries);- out = { op: 'analyze', source: ARGS.transcript, entries: entries.length, analysis };- }-- out.durationMs = Date.now() - start;- console.log(JSON.stringify(out, null, 2));-- if (ARGS.alertOnInvalid && out.valid === false) process.exit(1);- process.exit(0);-}--main().catch((e) => {- console.error(`gepa: ${e?.message ?? e}`);- process.exit(2);-});diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/learn.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/learn.mjsdeleted file mode 100644index 9206a712a8..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/learn.mjs+++ /dev/null@@ -1,127 +0,0 @@-#!/usr/bin/env node-// learn.mjs — wrapper around `metaharness learn` (upstream ADR-235, [email protected]).-//-// GEPA learning run: optimizes a harness genome against a SWE-bench-style-// slice manifest. $0 DRY-RUN BY DEFAULT — upstream only spends (model calls,-// Docker sandboxes) when --run is passed, and we forward that flag verbatim-// so the spend opt-in stays explicit at every layer.-//-// CHECKOUT PRECONDITION (upstream design, not a bug)-// ==================================================-// The learning harness (GEPA + SWE-bench + Docker) is too heavy to ship in-// the npm package, so `metaharness learn` requires a local clone of the-// metaharness repo, located via $METAHARNESS_REPO or by running inside the-// clone. When the checkout is absent we emit a structured-// `{status: "checkout-required"}` payload and exit 0 — the script ran as-// designed and told the agent what to do next. This is distinct from-// `degraded: true` (npm package absent). The managed-service path (gateway--// side learn jobs, no checkout) is upstream's ADR-235 follow-up.-//-// USAGE-// node scripts/learn.mjs --host claude-code --model haiku --slice slices/lite.json-// node scripts/learn.mjs --repo ~/src/metaharness --host codex --model gpt-5-mini --slice s.json --run-//-// EXIT CODES-// 0 learn completed (or dry-run report, or degraded, or checkout-required)-// 1 --alert-on-fail and the learn run reported failure-// 2 config error (bad arg)--import { existsSync } from 'node:fs';-import { runMetaharnessAsync, emitDegradedJsonAndExit } from './_harness.mjs';--const ARGS = (() => {- const a = {- host: null,- model: null,- slice: null,- repo: null,- run: false,- alertOnFail: false,- format: 'json',- timeoutMs: null,- };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--host') a.host = process.argv[++i];- else if (v === '--model') a.model = process.argv[++i];- else if (v === '--slice') a.slice = process.argv[++i];- else if (v === '--repo') a.repo = process.argv[++i];- else if (v === '--run') a.run = true;- else if (v === '--alert-on-fail') a.alertOnFail = true;- else if (v === '--format') a.format = process.argv[++i];- else if (v === '--timeout-ms') a.timeoutMs = parseInt(process.argv[++i], 10);- }- return a;-})();--const CHECKOUT_RX = /requires a metaharness repo checkout/i;--function defaultTimeoutMs() {- // Dry-run resolves the slice manifest + prices the run without spending —- // bounded by repo scan, not model calls. Real runs (--run) are dominated- // by model calls × slice size; callers should pass --timeout-ms matched- // to their slice. 10 min is a floor for small slices, not a budget.- return ARGS.run ? 600_000 : 120_000;-}--async function main() {- if (ARGS.repo && !existsSync(ARGS.repo)) {- console.error(`learn: --repo path does not exist: ${ARGS.repo}`);- process.exit(2);- }-- const cliArgs = ['learn'];- if (ARGS.host) cliArgs.push('--host', ARGS.host);- if (ARGS.model) cliArgs.push('--model', ARGS.model);- if (ARGS.slice) cliArgs.push('--slice', ARGS.slice);- if (ARGS.run) cliArgs.push('--run');-- const r = await runMetaharnessAsync(cliArgs, {- // learn emits a human-readable report; --json support is not guaranteed- // across 0.3.x, so we don't inject it and parse leniently instead.- json: false,- timeoutMs: ARGS.timeoutMs ?? defaultTimeoutMs(),- env: ARGS.repo ? { METAHARNESS_REPO: ARGS.repo } : {},- });-- if (r.degraded) emitDegradedJsonAndExit(r.reason);-- const combined = `${r.stdout}\n${r.stderr}`;- if (CHECKOUT_RX.test(combined)) {- console.log(JSON.stringify({- status: 'checkout-required',- hint: 'git clone https://github.com/ruvnet/metaharness.git, then re-run with '- + '--repo /path/to/metaharness (or set METAHARNESS_REPO). The learning '- + 'harness (GEPA + SWE-bench + Docker) is not shipped in the npm package.',- dryRun: !ARGS.run,- durationMs: r.durationMs,- }, null, 2));- process.exit(0);- }-- // Lenient JSON extraction — grab the last {...} block if one exists.- let json = null;- const matches = [...r.stdout.matchAll(/\{[\s\S]*?\}/g)];- for (let i = matches.length - 1; i >= 0; i--) {- try { json = JSON.parse(matches[i][0]); break; } catch { /* try previous */ }- }-- const out = {- status: r.exitCode === 0 ? 'ok' : 'failed',- dryRun: !ARGS.run,- exitCode: r.exitCode,- report: json,- // When upstream emits no JSON, the raw report is still the deliverable.- rawReport: json ? undefined : r.stdout.slice(0, 20_000),- durationMs: r.durationMs,- };- console.log(JSON.stringify(out, null, 2));-- if (ARGS.alertOnFail && r.exitCode !== 0) process.exit(1);- process.exit(0);-}--main().catch((e) => {- console.error(`learn: ${e?.message ?? e}`);- process.exit(2);-});diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/mcp-scan.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/mcp-scan.mjsdeleted file mode 100755index 8ca1311f5a..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/mcp-scan.mjs+++ /dev/null@@ -1,111 +0,0 @@-#!/usr/bin/env node-// mcp-scan.mjs — wrapper around `harness mcp-scan <path>`.-//-// Static security scan of the harness's declared MCP surface. Reads-// .mcp/servers.json + .harness/claims.json. Pure-read, no dispatch.-//-// USAGE-// node scripts/mcp-scan.mjs # current dir-// node scripts/mcp-scan.mjs --path <dir>-// node scripts/mcp-scan.mjs --fail-on high # exit 1 if any HIGH finding (default)-// node scripts/mcp-scan.mjs --fail-on medium # also fail on MEDIUM-// node scripts/mcp-scan.mjs --format json-//-// EXIT CODES-// 0 no findings at or above --fail-on (or degraded)-// 1 at least one finding ≥ --fail-on severity-// 2 config error or scan failure--// iter 50 — parseMcpScanText extracted to _harness.mjs so oia-audit-// can use the same parser without duplicating logic.-// iter 63 — SEVERITY_RANK also moves to _harness.mjs (single source of-// truth; previously this file had a literal that diverged from oia-audit's).-import { runHarness, emitDegradedJsonAndExit, parseMcpScanText, SEVERITY_RANK, rankSeverity } from './_harness.mjs';--const ARGS = (() => {- const a = { path: '.', format: 'json', failOn: 'high' };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--path') a.path = process.argv[++i];- else if (v === '--fail-on') a.failOn = String(process.argv[++i] || 'high').toLowerCase();- else if (v === '--format') a.format = process.argv[++i];- }- return a;-})();--function main() {- if (!SEVERITY_RANK[ARGS.failOn]) {- console.error(`mcp-scan: --fail-on must be one of low|medium|high; got ${ARGS.failOn}`);- process.exit(2);- }- const r = runHarness(['mcp-scan', ARGS.path]);- if (r.degraded) { emitDegradedJsonAndExit(r.reason); return; }- if (r.exitCode !== 0 && r.exitCode !== 1) {- // exit 1 from harness can be "findings present"; only treat other- // non-zero as a real failure.- console.error(`mcp-scan: harness exited ${r.exitCode}`);- if (r.stderr) console.error(r.stderr.slice(0, 400));- process.exit(2);- }- // The JSON output shape from `harness mcp-scan` historically didn't- // include structured findings — it emits text even with --json. Parse- // the text into findings (iter 50) so audit-trend's introduced/cleared- // diff actually works. If a future upstream version DOES emit- // findings[], the parsed-text findings are overridden.- const parsed = parseMcpScanText(r.stdout);- // iter 124 — normalize finding shape so consumers see a stable contract.- // Upstream [email protected] JSON path emits {id, severity, title, detail};- // our parseMcpScanText emits {severity, message}. Project both into a- // unified {severity, message, title?, detail?} so audit-trend's fingerprint- // diff and test-mcp-tools' assertions don't care which path produced them.- const rawFindings = Array.isArray(r.json?.findings) ? r.json.findings : parsed.findings;- const findings = rawFindings.map((f) => ({- ...f,- message: typeof f.message === 'string' && f.message- ? f.message- : (f.title || f.detail || ''),- }));- const payload = {- ...(r.json ?? {}),- findings,- summary: r.json?.summary ?? parsed.summary,- rawStdout: r.stdout.slice(0, 400),- };- const threshold = SEVERITY_RANK[ARGS.failOn];- // iter 63 — rankSeverity() safe lookup. Pre-iter-63 `undefined >= 3`- // was false → unknown-severity findings (e.g., warn / error) were- // silently excluded from the offending set, weakening --fail-on alerts.- const offending = findings.filter((f) => rankSeverity(f.severity) >= threshold);-- const alert = {- threshold: ARGS.failOn,- triggered: offending.length > 0,- offendingCount: offending.length,- reason: offending.length > 0- ? `${offending.length} finding(s) at or above ${ARGS.failOn} severity`- : `no findings at or above ${ARGS.failOn} severity — OK`,- };-- if (ARGS.format === 'json') {- // iter 112 — generatedAt for consistency with other --format json outputs- console.log(JSON.stringify({- ...payload, durationMs: r.durationMs, alert,- generatedAt: new Date().toISOString(),- }, null, 2));- } else {- console.log(`# harness mcp-scan — ${ARGS.path}`);- console.log('');- console.log(`Total findings: ${findings.length}`);- console.log(`| Severity | ID | Server | Tool | Message |`);- console.log(`|---|---|---|---|---|`);- for (const f of findings.slice(0, 50)) {- console.log(`| ${f.severity} | ${f.id ?? '—'} | ${f.server ?? '—'} | ${f.tool ?? '—'} | ${f.message ?? ''} |`);- }- console.log('');- console.log(alert.triggered ? `⚠ **ALERT**: ${alert.reason}` : `✓ ${alert.reason}`);- }-- if (alert.triggered) process.exit(1);-}--main();diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/mint.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/mint.mjsdeleted file mode 100755index 9c8ddab026..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/mint.mjs+++ /dev/null@@ -1,126 +0,0 @@-#!/usr/bin/env node-// mint.mjs — wrapper around `metaharness new <name> --template <id> --host <id>`.-//-// SAFETY (ADR-150 architectural constraint + "executing actions with care"):-// - Target directory MUST be explicitly specified via --target. Defaults to-// a temp dir under /tmp/ruflo-mint-<timestamp>/ if not given — never the-// project root (ruflo behavioral rule "never save to root folder").-// - --confirm flag required. Without it the script prints a dry-run plan-// and exits 0 without writing files. This honors the "destructive-action-// confirmation" pattern in ruflo's CLAUDE.md.-//-// USAGE-// node scripts/mint.mjs --name my-harness --template vertical:coding --host claude-code-// # → prints dry-run plan, exits 0-// node scripts/mint.mjs --name my-harness --template vertical:coding --host claude-code --target /tmp/foo --confirm-// # → actually scaffolds--import { runMetaharness, emitDegradedJsonAndExit } from './_harness.mjs';-import { existsSync, mkdirSync } from 'node:fs';-import { resolve, dirname, basename } from 'node:path';-import { tmpdir } from 'node:os';--const ARGS = (() => {- const a = { name: null, template: null, host: 'claude-code', target: null, confirm: false, format: 'json' };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--name') a.name = process.argv[++i];- else if (v === '--template') a.template = process.argv[++i];- else if (v === '--host') a.host = process.argv[++i];- else if (v === '--target') a.target = process.argv[++i];- else if (v === '--confirm') a.confirm = true;- else if (v === '--format') a.format = process.argv[++i];- }- return a;-})();--function safetyChecks() {- if (!ARGS.name) {- console.error('mint: --name is required');- process.exit(2);- }- if (!ARGS.template) {- console.error('mint: --template is required (e.g. vertical:coding, minimal)');- process.exit(2);- }- if (!ARGS.target) {- ARGS.target = resolve(tmpdir(), `ruflo-mint-${Date.now()}-${ARGS.name}`);- }- const targetAbs = resolve(ARGS.target);- const repoRoot = resolve(process.cwd());- if (targetAbs === repoRoot) {- console.error(`mint: refusing to write to project root (${repoRoot}). Specify a different --target.`);- process.exit(2);- }- if (targetAbs.startsWith(repoRoot + '/')) {- console.error(`mint: refusing to write inside the calling repo root. Use a --target outside ${repoRoot}.`);- process.exit(2);- }-}--function main() {- safetyChecks();- // ADR-150 architectural-constraint #3 (graceful degradation): even the- // dry-run path must report degraded:true when metaharness is unreachable- // — otherwise users with no network / proxy block see a happy-looking- // plan and only hit the failure on --confirm. The no-metaharness-smoke- // CI gate asserts every script emits a `"degraded"` field in this case.- const probe = runMetaharness(['--version'], { json: false, timeoutMs: 15_000 });- if (probe.degraded) { emitDegradedJsonAndExit(probe.reason); return; }- const plan = {- action: 'metaharness new',- name: ARGS.name,- template: ARGS.template,- host: ARGS.host,- target: ARGS.target,- confirm: ARGS.confirm,- willWrite: ARGS.confirm,- };- if (!ARGS.confirm) {- if (ARGS.format === 'json') console.log(JSON.stringify({ ...plan, dryRun: true }, null, 2));- else {- console.log(`# harness-mint (dry-run)`);- console.log('');- for (const [k, v] of Object.entries(plan)) console.log(`- ${k}: ${v}`);- console.log('');- console.log('Re-run with `--confirm` to actually scaffold.');- }- process.exit(0);- }- if (existsSync(ARGS.target)) {- console.error(`mint: target ${ARGS.target} already exists`);- process.exit(2);- }- // ITER 27 FIX (forward-compatible) — at the time of writing,- // [email protected] silently ignored the --target flag and wrote- // to $CWD/<name> instead. Upstream issue #9- // (ruvnet/agent-harness-generator) was filed + fixed in 0.1.13- // within ~20 min — but this workaround is intentionally- // forward-compatible: setting `cwd: dirname(target)` + passing- // `basename(target)` as <name> produces the same correct landing- // path on BOTH broken (0.1.12) and fixed (0.1.13+) upstream- // versions. Keeping it as belt-and-braces against any future- // regression. See `iter 29` for the verification log.- const parentDir = dirname(ARGS.target);- const cliName = basename(ARGS.target);- mkdirSync(parentDir, { recursive: true });- const r = runMetaharness(- ['new', cliName, '--template', ARGS.template, '--host', ARGS.host],- { json: false, cwd: parentDir, timeoutMs: 180_000 },- );- if (r.degraded) { emitDegradedJsonAndExit(r.reason); return; }- if (r.exitCode !== 0) {- console.error(`mint: metaharness exited ${r.exitCode}`);- if (r.stderr) console.error(r.stderr.slice(0, 400));- process.exit(2);- }- const result = { ...plan, exitCode: r.exitCode, durationMs: r.durationMs, ok: true };- if (ARGS.format === 'json') console.log(JSON.stringify(result, null, 2));- else {- console.log(`# harness-mint — done`);- console.log('');- for (const [k, v] of Object.entries(result)) console.log(`- ${k}: ${v}`);- }-}--main();diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/oia-audit.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/oia-audit.mjsdeleted file mode 100755index c0ee474a9d..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/oia-audit.mjs+++ /dev/null@@ -1,228 +0,0 @@-#!/usr/bin/env node-// oia-audit.mjs — composite Phase-2 worker (ADR-150).-//-// Bundles three MetaHarness static-analysis surfaces into one timestamped-// audit record:-// - harness oia-manifest (Open Infrastructure Architecture L1-L9 alignment)-// - harness threat-model (categorized MCP-surface threat report)-// - harness mcp-scan (per-server/tool policy + permissions + deps)-//-// The combined record is stored in the `metaharness-audit` memory-// namespace, keyed by ISO timestamp. Designed to be invoked on a cron-// schedule (e.g. weekly) so audit drift is visible over time.-//-// USAGE-// node scripts/oia-audit.mjs # run + store-// node scripts/oia-audit.mjs --path <dir> # audit specific dir-// node scripts/oia-audit.mjs --dry-run # don't write to memory-// node scripts/oia-audit.mjs --alert-on-worst high-// # exit 1 if threat-model worst >= high-// node scripts/oia-audit.mjs --format json-//-// EXIT CODES-// 0 audit OK (or degraded)-// 1 --alert-on-worst threshold exceeded-// 2 config error or audit failure--import { spawnSync } from 'node:child_process';-// iter 63 — SEVERITY_RANK + rankSeverity consolidated to _harness.mjs-// (was local in iter 62; now shared with audit-trend + mcp-scan).-import { runHarness, runMetaharness, runHarnessAsync, runMetaharnessAsync, emitDegradedJsonAndExit, parseMcpScanText, SEVERITY_RANK, rankSeverity } from './_harness.mjs';--// iter 63 — SEVERITY_RANK + rankSeverity moved to _harness.mjs (single-// source of truth). The local copy from iter 62 is gone; the imports-// at the top of this file provide the same names.-const NS = process.env.OIA_AUDIT_NAMESPACE || 'metaharness-audit';-const CLI_PKG = process.env.CLI_CORE === '1'- ? '@claude-flow/cli-core@alpha'- : '@claude-flow/cli@latest';--const ARGS = (() => {- const a = { path: '.', format: 'json', dryRun: false, alertWorst: null };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--path') a.path = process.argv[++i];- else if (v === '--dry-run') a.dryRun = true;- else if (v === '--alert-on-worst') a.alertWorst = String(process.argv[++i] || '').toLowerCase();- else if (v === '--format') a.format = process.argv[++i];- }- return a;-})();--// iter 47 — the `harness` and `metaharness` CLIs both have `score` /-// `genome` subcommands but with DIFFERENT output schemas. For the-// fingerprint to be consumable by _similarity.mjs (which expects the-// metaharness CLI shape: harnessFit/compileConfidence/agent_topology),-// we need to dispatch to runMetaharness for score+genome, not runHarness.-// iter 56 — annotated runOne result is identical for sync/async paths.-function annotateOne(r, label) {- let json = r.json;- if (label === 'mcp-scan' && !json && !r.degraded && r.stdout) {- const parsed = parseMcpScanText(r.stdout);- json = { findings: parsed.findings, summary: parsed.summary, rawStdout: r.stdout.slice(0, 400) };- }- return {- label,- exitCode: r.exitCode,- degraded: r.degraded,- reason: r.degraded ? r.reason : null,- json,- durationMs: r.durationMs,- stderrTail: r.degraded ? (r.stderr || '').slice(-200) : null,- };-}--function runOne(args, label, engine = 'harness') {- const r = engine === 'metaharness' ? runMetaharness(args) : runHarness(args);- return annotateOne(r, label);-}--// iter 56 — parallel variant. The composite audit's 5 subprocess calls-// are mutually independent (each scans the same path read-only), so-// they can run concurrently. Worst-case wall-clock drops from-// 5×DEFAULT_TIMEOUT_MS (sequential) to 1×DEFAULT_TIMEOUT_MS (parallel)-// — the iter-55-flagged gap (oia-audit timeout under unreachable-// registry) is closed by this.-async function runAllParallel(path) {- const tasks = [- runHarnessAsync(['oia-manifest', path]).then((r) => ['oiaManifest', annotateOne(r, 'oia-manifest')]),- runHarnessAsync(['threat-model', path]).then((r) => ['threatModel', annotateOne(r, 'threat-model')]),- runHarnessAsync(['mcp-scan', path]).then((r) => ['mcpScan', annotateOne(r, 'mcp-scan')]),- runMetaharnessAsync(['score', path]).then((r) => ['score', annotateOne(r, 'score')]),- runMetaharnessAsync(['genome', path]).then((r) => ['genome', annotateOne(r, 'genome')]),- ];- const results = await Promise.all(tasks);- return Object.fromEntries(results);-}--function persist(payload) {- const key = `audit-${new Date().toISOString().replace(/[:.]/g, '-')}`;- const r = spawnSync('npx', [- CLI_PKG, 'memory', 'store',- '--namespace', NS,- '--key', key,- '--value', JSON.stringify(payload),- ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' });- return {- ok: r.status === 0,- namespace: NS,- key,- error: r.status === 0 ? null : (r.stderr || '').slice(0, 200),- };-}--async function main() {- if (ARGS.alertWorst !== null && !SEVERITY_RANK.hasOwnProperty(ARGS.alertWorst)) {- console.error(`oia-audit: --alert-on-worst must be one of clean|low|medium|high; got ${ARGS.alertWorst}`);- process.exit(2);- }-- const startedAt = new Date().toISOString();- const wallStart = Date.now();- // iter 56 — run the 5 sub-audits in parallel (was sequential pre-iter-56).- // Worst-case wall-clock improves from 5×TIMEOUT to 1×TIMEOUT in the- // unreachable-registry case; the happy path improves from sum-of-durations- // to max-of-durations (typically ~2-4× faster).- const all = await runAllParallel(ARGS.path);- const wallMs = Date.now() - wallStart;- const { oiaManifest: oia, threatModel: tm, mcpScan: mcp, score, genome } = all;-- // If all FIVE say "metaharness not available", surface the degraded- // payload exactly once and exit 0 (architectural constraint #3).- if (oia.degraded && tm.degraded && mcp.degraded && score.degraded && genome.degraded) {- emitDegradedJsonAndExit('metaharness-not-available');- return;- }-- // Aggregate the worst-severity signal across mcp-scan + threat-model.- // iter 62 — safe lookup using `?? 0` so unknown severities don't- // silently bump composite via NaN-comparison (was: `acc | undefined`- // → reduce never updated). Now any [WARN]/[CRITICAL]/[ERROR] finding- // correctly elevates composite worst.- const tmWorst = String(tm.json?.worst || 'clean').toLowerCase();- const mcpFindings = Array.isArray(mcp.json?.findings) ? mcp.json.findings : [];- // iter 63 — rankSeverity() from _harness.mjs handles unknown-severity- // safely (returns 0 instead of undefined) so the reduce never sees NaN.- const mcpWorst = mcpFindings.reduce((acc, f) => {- const s = String(f.severity || 'low').toLowerCase();- return rankSeverity(s) > rankSeverity(acc) ? s : acc;- }, 'clean');- const compositeWorst = rankSeverity(tmWorst) > rankSeverity(mcpWorst) ? tmWorst : mcpWorst;-- let alertTriggered = false;- let alertReason = null;- if (ARGS.alertWorst !== null) {- const threshold = rankSeverity(ARGS.alertWorst);- const compositeRank = rankSeverity(compositeWorst);- if (compositeRank >= threshold && threshold > 0) {- alertTriggered = true;- alertReason = `composite worst=${compositeWorst} ≥ ${ARGS.alertWorst}`;- }- }-- // iter 59 — surface parallelization metrics. wallMs is the actual- // time the 5 subprocess race took (max of components); the sum of- // component.durationMs is what a SERIAL implementation would have- // taken. A future smoke gate compares them to catch silent- // serialization regression.- const sumComponentMs = Object.values(all).reduce(- (a, c) => a + (c?.durationMs ?? 0), 0);- const payload = {- path: ARGS.path,- startedAt,- finishedAt: new Date().toISOString(),- timing: {- wallMs,- sumComponentMs,- parallelSpeedup: sumComponentMs > 0- ? Math.round((sumComponentMs / Math.max(wallMs, 1)) * 100) / 100 : 0,- },- composite: { worst: compositeWorst, threatModelWorst: tmWorst, mcpScanWorst: mcpWorst },- components: { oiaManifest: oia, threatModel: tm, mcpScan: mcp, score, genome },- // iter 38 — denormalized harness fingerprint for cheap similarity().- // Mirrors the shape `_similarity.mjs::similarity()` expects so- // audit-trend can call it without reshuffling components.- fingerprint: {- score: score?.json && !score.degraded ? score.json : null,- genome: genome?.json && !genome.degraded ? genome.json : null,- },- alert: ARGS.alertWorst !== null ? {- threshold: ARGS.alertWorst,- triggered: alertTriggered,- reason: alertReason || `composite worst=${compositeWorst} < ${ARGS.alertWorst} — OK`,- } : null,- persisted: null,- };-- if (!ARGS.dryRun) {- payload.persisted = persist(payload);- }-- if (ARGS.format === 'json') {- console.log(JSON.stringify(payload, null, 2));- } else {- console.log(`# oia-audit — ${ARGS.path}`);- console.log('');- console.log(`| Component | Exit | Degraded | Duration |`);- console.log(`|---|---:|:---:|---:|`);- console.log(`| oia-manifest | ${oia.exitCode} | ${oia.degraded ? '⚠' : '✓'} | ${oia.durationMs}ms |`);- console.log(`| threat-model | ${tm.exitCode} | ${tm.degraded ? '⚠' : '✓'} | ${tm.durationMs}ms |`);- console.log(`| mcp-scan | ${mcp.exitCode} | ${mcp.degraded ? '⚠' : '✓'} | ${mcp.durationMs}ms |`);- console.log('');- console.log(`Composite worst severity: **${compositeWorst}** (tm=${tmWorst}, mcp=${mcpWorst})`);- if (payload.persisted) {- console.log(`Persisted: ${payload.persisted.ok ? `${payload.persisted.namespace}:${payload.persisted.key}` : `FAILED: ${payload.persisted.error}`}`);- }- if (payload.alert) {- console.log('');- console.log(payload.alert.triggered ? `⚠ **ALERT**: ${payload.alert.reason}` : `✓ ${payload.alert.reason}`);- }- }-- if (alertTriggered) process.exit(1);-}--main().catch((e) => {- console.error('oia-audit crashed:', e?.message ?? e);- process.exit(2);-});diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/redblue.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/redblue.mjsdeleted file mode 100644index 66b43ae705..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/redblue.mjs+++ /dev/null@@ -1,286 +0,0 @@-#!/usr/bin/env node-// redblue.mjs — wrapper around `@metaharness/redblue` for LLM red/blue testing.-//-// ADR-150 sibling-package integration: `@metaharness/redblue` runs an-// adversarial red-team → judge → blue-team patch loop against an LLM-// target you own. Upstream README: packages/redblue#readme on-// github.com/ruvnet/agent-harness-generator.-//-// SAFETY (enforced by upstream `src/config/safety.ts`, NOT this wrapper):-// - no real credentials (`allow_real_credentials:true` = load-time error)-// - no live external targets (validateTarget() rejects non-loopback)-// - no shell, no arbitrary network, no eval-// - sensitive outputs redacted before storage-// - `max_cost_usd` / `max_runtime_minutes` / `max_tests` cap every run-//-// USAGE-// node scripts/redblue.mjs init # write redblue.yaml-// node scripts/redblue.mjs run --mock-judge --tests 10 # $0 marker-fixture path-// node scripts/redblue.mjs run --tests 50 --patch # real judge (needs OPENROUTER_API_KEY)-// node scripts/redblue.mjs attack prompt --count 5 # preview attacks-// node scripts/redblue.mjs patch --mock-judge # baseline → patch → retest delta-// node scripts/redblue.mjs report --in report.json # render summary-//-// EXIT CODES-// 0 ran OK (or degraded — redblue not available)-// 1 --alert-on-fail and overall verdict was FAIL (after patch retest)-// 2 config / argv error-//-// REPORT FORMAT-// `run` / `patch` write a JSON report to --out (default: ./redblue-report.json).-// We re-emit it on stdout when --format json so MCP tools can parse it-// without round-tripping through disk. Markdown rendering is delegated-// to `redblue report` upstream.--import { runRedblue, emitRedblueDegradedJsonAndExit } from './_redblue.mjs';-import { existsSync, readFileSync, mkdtempSync, unlinkSync } from 'node:fs';-import { join, resolve } from 'node:path';-import { tmpdir } from 'node:os';--const VALID_SUBCOMMANDS = new Set(['init', 'run', 'patch', 'attack', 'report']);-const VALID_ATTACK_FAMILIES = new Set(['prompt', 'tools', 'data', 'all']);--const ARGS = (() => {- const a = {- sub: null,- // shared- config: null,- out: null,- inPath: null,- format: 'json',- // run/patch- tests: null,- patch: false,- mockJudge: false,- alertOnFail: false,- // attack- family: null,- count: null,- // budget overrides (forwarded only when set)- maxCostUsd: null,- maxRuntimeMinutes: null,- timeoutMs: null,- };- const argv = process.argv.slice(2);- if (argv.length === 0) return a;- a.sub = argv[0];- for (let i = 1; i < argv.length; i++) {- const v = argv[i];- if (v === '--config') a.config = argv[++i];- else if (v === '--out') a.out = argv[++i];- else if (v === '--in') a.inPath = argv[++i];- else if (v === '--format') a.format = argv[++i];- else if (v === '--tests') a.tests = parseInt(argv[++i], 10);- else if (v === '--patch') a.patch = true;- else if (v === '--mock-judge') a.mockJudge = true;- else if (v === '--alert-on-fail') a.alertOnFail = true;- else if (v === '--count') a.count = parseInt(argv[++i], 10);- else if (v === '--max-cost-usd') a.maxCostUsd = parseFloat(argv[++i]);- else if (v === '--max-runtime-minutes') a.maxRuntimeMinutes = parseFloat(argv[++i]);- else if (v === '--timeout-ms') a.timeoutMs = parseInt(argv[++i], 10);- else if (v === '--help' || v === '-h') a.sub = 'help';- else if (!v.startsWith('-') && a.sub === 'attack' && !a.family) a.family = v;- // any other unknown flag — pass through to upstream redblue- else if (v.startsWith('--')) {- // forward unknown flags verbatim so we don't bottleneck new redblue features- a._passthrough = a._passthrough || [];- a._passthrough.push(v);- // peek for next-token value (only consume if it's not another flag)- const next = argv[i + 1];- if (next !== undefined && !next.startsWith('-')) {- a._passthrough.push(next);- i++;- }- }- }- return a;-})();--function printHelp() {- console.log('npx ruflo metaharness redblue <subcommand> [options]');- console.log('');- console.log('Subcommands:');- console.log(' init Write a sample redblue.yaml config');- console.log(' run Run red-team → judge → (optional --patch → retest) → report');- console.log(' patch Baseline → blue-team patch → retest delta');- console.log(' attack <prompt|tools|data|all> Preview generated attack test cases (no target call)');- console.log(' report Render an existing report.json as markdown');- console.log('');- console.log('Common options:');- console.log(' --config <path> Config YAML (default: redblue.yaml in cwd)');- console.log(' --out <path> Output path for run/patch (default: ./redblue-report.json)');- console.log(' --in <path> Input report path (for `report` subcommand)');- console.log(' --tests N How many test cases (run/patch)');- console.log(' --patch After baseline run, apply blue-team patches and retest');- console.log(' --mock-judge $0 TEST-ONLY marker fixture — for CI / offline');- console.log(' --alert-on-fail Exit 1 when overall post-patch verdict is FAIL');- console.log(' --format json|markdown Output format (default: json)');- console.log(' --max-cost-usd N Override config max_cost_usd');- console.log(' --max-runtime-minutes N Override config max_runtime_minutes');- console.log(' --timeout-ms N Subprocess hard timeout (default: 120000)');- console.log('');- console.log('Examples:');- console.log(' node scripts/redblue.mjs init');- console.log(' node scripts/redblue.mjs run --mock-judge --tests 10');- console.log(' node scripts/redblue.mjs run --tests 50 --patch # needs OPENROUTER_API_KEY');- console.log(' node scripts/redblue.mjs attack prompt --count 3');- console.log('');- console.log('SAFETY: upstream redblue enforces no-creds, no-live-targets, no-shell,');- console.log('no-eval at load time (src/config/safety.ts). This wrapper does not relax');- console.log('those — it only forwards argv with shell:false.');-}--function buildUpstreamArgs() {- switch (ARGS.sub) {- case 'init': {- const out = ARGS.out ?? null;- return ['init', ...(out ? ['--out', out] : [])];- }- case 'run': {- const a = ['run'];- if (ARGS.config) a.push('--config', ARGS.config);- if (ARGS.tests !== null && Number.isFinite(ARGS.tests)) a.push('--tests', String(ARGS.tests));- if (ARGS.patch) a.push('--patch');- if (ARGS.mockJudge) a.push('--mock-judge');- if (ARGS.out) a.push('--out', ARGS.out);- return a;- }- case 'patch': {- const a = ['patch'];- if (ARGS.config) a.push('--config', ARGS.config);- if (ARGS.mockJudge) a.push('--mock-judge');- if (ARGS.out) a.push('--out', ARGS.out);- return a;- }- case 'attack': {- if (!ARGS.family || !VALID_ATTACK_FAMILIES.has(ARGS.family)) {- console.error(`redblue: --attack family must be one of ${[...VALID_ATTACK_FAMILIES].join('|')} (got: ${ARGS.family ?? 'none'})`);- process.exit(2);- }- const a = ['attack', ARGS.family];- if (ARGS.count !== null && Number.isFinite(ARGS.count)) a.push('--count', String(ARGS.count));- return a;- }- case 'report': {- if (!ARGS.inPath) {- console.error('redblue: report requires --in <path>');- process.exit(2);- }- return ['report', '--in', ARGS.inPath];- }- default:- console.error(`redblue: unknown subcommand "${ARGS.sub}". Valid: ${[...VALID_SUBCOMMANDS].join(', ')}`);- process.exit(2);- }-}--function main() {- if (!ARGS.sub || ARGS.sub === 'help' || ARGS.sub === '--help' || ARGS.sub === '-h') {- printHelp();- process.exit(0);- }- if (!VALID_SUBCOMMANDS.has(ARGS.sub)) {- console.error(`redblue: unknown subcommand "${ARGS.sub}". Valid: ${[...VALID_SUBCOMMANDS].join(', ')}`);- process.exit(2);- }-- // For `run` and `patch` we want the report JSON in our hands even when- // the caller didn't pass --out (so MCP tools can read it back from stdout).- let synthOut = null;- if ((ARGS.sub === 'run' || ARGS.sub === 'patch') && !ARGS.out) {- const dir = mkdtempSync(join(tmpdir(), 'ruflo-redblue-'));- synthOut = join(dir, 'report.json');- ARGS.out = synthOut;- }-- const upstreamArgs = buildUpstreamArgs();- if (ARGS._passthrough?.length) upstreamArgs.push(...ARGS._passthrough);-- const r = runRedblue(upstreamArgs, { timeoutMs: ARGS.timeoutMs ?? undefined });-- if (r.degraded) {- if (synthOut && existsSync(synthOut)) {- try { unlinkSync(synthOut); } catch { /* ignore */ }- }- emitRedblueDegradedJsonAndExit(r.reason);- return;- }-- // Pass through stderr (progress) when format=markdown so users see it live- if (ARGS.format === 'markdown' && r.stderr) {- process.stderr.write(r.stderr);- }-- // For run/patch: read the report we asked redblue to write.- let payload = null;- if (ARGS.sub === 'run' || ARGS.sub === 'patch') {- const reportPath = resolve(ARGS.out);- if (existsSync(reportPath)) {- try {- payload = JSON.parse(readFileSync(reportPath, 'utf-8'));- } catch (e) {- console.error(`redblue: failed to parse report at ${reportPath}: ${e instanceof Error ? e.message : String(e)}`);- if (synthOut) { try { unlinkSync(synthOut); } catch { /* ignore */ } }- process.exit(2);- }- }- }-- // Decorate every payload with our own metadata + the safety boundary- // reminder so consumers always see "this was capability-contained".- const enriched = payload && typeof payload === 'object' ? {- ...payload,- _ruflo: {- subcommand: ARGS.sub,- mockJudge: ARGS.mockJudge,- durationMs: r.durationMs,- safetyBoundary: 'enforced-by-upstream-redblue (no creds, no live targets, no shell, no eval)',- },- } : payload;-- // Determine overall verdict for --alert-on-fail (post-patch run only).- // redblue reports include a `verdict` or `gate` field; we treat absence- // as "no data → no alert" rather than erroring.- let alertTriggered = false;- if (ARGS.alertOnFail && enriched && typeof enriched === 'object') {- const v = (enriched.verdict || enriched.gate || enriched.status || '').toString().toUpperCase();- if (v.includes('FAIL')) alertTriggered = true;- }-- if (ARGS.format === 'json') {- if (enriched !== null) {- console.log(JSON.stringify(enriched, null, 2));- } else {- // init / attack / report subcommands — forward upstream stdout verbatim- // (it's already markdown/yaml). Wrap in a tiny JSON envelope.- console.log(JSON.stringify({- subcommand: ARGS.sub,- ok: r.exitCode === 0,- durationMs: r.durationMs,- stdout: r.stdout,- _ruflo: { safetyBoundary: 'enforced-by-upstream-redblue' },- }, null, 2));- }- } else {- // markdown / passthrough- if (r.stdout) process.stdout.write(r.stdout);- if (enriched && typeof enriched === 'object') {- console.log('');- console.log('---');- console.log('## redblue report (parsed)');- console.log('```json');- console.log(JSON.stringify(enriched, null, 2));- console.log('```');- }- }-- // Clean up synthetic temp file- if (synthOut && existsSync(synthOut)) {- try { unlinkSync(synthOut); } catch { /* ignore */ }- }-- if (alertTriggered) process.exit(1);- if (r.exitCode !== 0) process.exit(r.exitCode);-}--main();diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/router-parallel-analyze.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/router-parallel-analyze.mjsdeleted file mode 100755index cdcc7c2bc5..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/router-parallel-analyze.mjs+++ /dev/null@@ -1,250 +0,0 @@-#!/usr/bin/env node-// router-parallel-analyze.mjs — ADR-150 Phase 2 SelfEvolvingRouter-// promotion gate.-//-// Reads paired routing decisions (Thompson bandit pick + SelfEvolvingRouter-// pick, both with measured outcomes) from a JSONL trajectory file and-// computes the THREE PROMOTION CRITERIA from ADR-150 review-round-1:-//-// (a) qualityScore improvement > 2% (relative)-// (b) usdPerDecision increase < 1% (relative)-// (c) p95 routing-decision latency increase < 5% (relative)-//-// ALL THREE must hold for promotion. AND, not OR — the OR form let-// quality gains mask cost regressions, exactly the failure mode ADR-149's-// Pareto framing was built to prevent.-//-// INPUT FORMAT (.swarm/router-parallel.jsonl, one JSON record per line):-// {-// "ts": "<iso>",-// "task": { ... },-// "bandit": { "pick": "<modelId>", "predictedQuality": 0.84, "predictedCostUsd": 0.003 },-// "ser": { "pick": "<modelId>", "predictedQuality": 0.87, "predictedCostUsd": 0.004 },-// "outcome": { "actualModel": "<modelId>", "actualQuality": 0.91, "actualUsd": 0.0035, "actualLatencyMs": 1240 }-// }-//-// USAGE-// node scripts/router-parallel-analyze.mjs --input .swarm/router-parallel.jsonl-// node scripts/router-parallel-analyze.mjs --input <file> --format json-// node scripts/router-parallel-analyze.mjs --input <file> --strict # exit 1 if NOT promotable-//-// EXIT CODES-// 0 analysis complete; in --strict mode → all three criteria passed-// 1 --strict requested AND at least one criterion failed (NOT promotable)-// 2 config error or input file missing/malformed--import { readFileSync, existsSync } from 'node:fs';--const ARGS = (() => {- const a = { input: '.swarm/router-parallel.jsonl', format: 'table', strict: false };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--input') a.input = process.argv[++i];- else if (v === '--format') a.format = process.argv[++i];- else if (v === '--strict') a.strict = true;- }- return a;-})();--function median(sorted) {- if (sorted.length === 0) return 0;- const n = sorted.length;- return n % 2 === 0 ? (sorted[n / 2 - 1] + sorted[n / 2]) / 2 : sorted[(n - 1) / 2];-}--function pctile(sorted, q) {- if (sorted.length === 0) return 0;- const idx = Math.floor(q * (sorted.length - 1));- return sorted[idx];-}--function mean(arr) {- if (arr.length === 0) return 0;- return arr.reduce((s, x) => s + x, 0) / arr.length;-}--function main() {- if (!existsSync(ARGS.input)) {- if (ARGS.format === 'json') {- console.log(JSON.stringify({- ok: true,- sufficient: false,- reason: 'input-file-not-found',- input: ARGS.input,- hint: 'Enable parallel logging (CLAUDE_FLOW_ROUTER_PARALLEL_LOG=1) and run a workload first.',- }, null, 2));- } else {- console.log(`# router-parallel-analyze`);- console.log('');- console.log(`_Input file not found: ${ARGS.input}_`);- console.log('');- console.log('Enable parallel logging by setting `CLAUDE_FLOW_ROUTER_PARALLEL_LOG=1`');- console.log('and running a real workload, then re-run this analyzer.');- }- process.exit(ARGS.strict ? 1 : 0);- }-- let rows = [];- try {- rows = readFileSync(ARGS.input, 'utf-8')- .split('\n')- .filter((l) => l.trim())- .map((l) => JSON.parse(l));- } catch (e) {- console.error(`router-parallel-analyze: cannot parse ${ARGS.input}: ${e.message}`);- process.exit(2);- }-- // Filter to records with both predictions + outcome present.- const usable = rows.filter((r) => r.bandit && r.ser && r.outcome);-- if (usable.length < 30) {- const payload = {- ok: true,- sufficient: false,- reason: `n=${usable.length} < 30 (insufficient sample for AND-gate evaluation)`,- hint: 'Continue collecting parallel-routing data; statistical significance needs ≥30 paired decisions per arm.',- sampleSize: usable.length,- generatedAt: new Date().toISOString(),- };- if (ARGS.format === 'json') console.log(JSON.stringify(payload, null, 2));- else {- console.log(`# router-parallel-analyze`);- console.log('');- console.log(`Sample size: **${usable.length}** paired decisions`);- console.log('');- console.log(`_Insufficient — need ≥30 for the 3-criteria AND-gate._`);- }- process.exit(ARGS.strict ? 1 : 0);- }-- // For each record, attribute the outcome to BOTH arms when they- // agreed on the model pick; when they disagreed, the actual outcome- // belongs only to the bandit (which was the executing arm). The SER- // arm gets its PREDICTED metrics for the counterfactual.- const banditOutcomes = usable.map((r) => ({- qualityActual: r.outcome.actualQuality,- usdActual: r.outcome.actualUsd,- latencyActual: r.outcome.actualLatencyMs,- }));-- // SER counterfactual: use ser.predictedQuality / predictedCostUsd- // when picks disagreed; use actual when they agreed. Latency: when- // they agreed, both saw the same actual latency; when they- // disagreed, the SER pick's latency is unknown — fall back to the- // mean of agreed-decision latencies for that model.- const agreedLatencyByModel = {};- for (const r of usable) {- if (r.bandit.pick === r.ser.pick) {- const m = r.outcome.actualModel || r.bandit.pick;- (agreedLatencyByModel[m] = agreedLatencyByModel[m] || []).push(r.outcome.actualLatencyMs);- }- }- const modelMeanLatency = {};- for (const [m, arr] of Object.entries(agreedLatencyByModel)) {- modelMeanLatency[m] = mean(arr);- }-- const serOutcomes = usable.map((r) => {- const agreed = r.bandit.pick === r.ser.pick;- return {- qualityActual: agreed ? r.outcome.actualQuality : r.ser.predictedQuality,- usdActual: agreed ? r.outcome.actualUsd : r.ser.predictedCostUsd,- latencyActual: agreed- ? r.outcome.actualLatencyMs- : (modelMeanLatency[r.ser.pick] ?? r.outcome.actualLatencyMs),- };- });-- // Compute the three criteria.- const banditQuality = mean(banditOutcomes.map((o) => o.qualityActual));- const serQuality = mean(serOutcomes.map((o) => o.qualityActual));- const qualityImprovementPct =- banditQuality > 0 ? ((serQuality - banditQuality) / banditQuality) * 100 : 0;-- const banditUsd = mean(banditOutcomes.map((o) => o.usdActual));- const serUsd = mean(serOutcomes.map((o) => o.usdActual));- const usdIncreasePct = banditUsd > 0 ? ((serUsd - banditUsd) / banditUsd) * 100 : 0;-- const banditLatencyP95 = pctile(banditOutcomes.map((o) => o.latencyActual).sort((a, b) => a - b), 0.95);- const serLatencyP95 = pctile(serOutcomes.map((o) => o.latencyActual).sort((a, b) => a - b), 0.95);- const latencyIncreasePct =- banditLatencyP95 > 0 ? ((serLatencyP95 - banditLatencyP95) / banditLatencyP95) * 100 : 0;-- const passes = {- quality: qualityImprovementPct > 2,- cost: usdIncreasePct < 1,- latency: latencyIncreasePct < 5,- };- const allPass = passes.quality && passes.cost && passes.latency;-- // Disagreement rate (informational; not part of the gate).- const disagreements = usable.filter((r) => r.bandit.pick !== r.ser.pick).length;- const disagreementPct = (disagreements / usable.length) * 100;-- const payload = {- ok: true,- sufficient: true,- sampleSize: usable.length,- disagreement: {- count: disagreements,- pct: Math.round(disagreementPct * 100) / 100,- },- bandit: {- meanQuality: Math.round(banditQuality * 10000) / 10000,- meanUsd: Math.round(banditUsd * 1e6) / 1e6,- p95LatencyMs: Math.round(banditLatencyP95),- },- ser: {- meanQuality: Math.round(serQuality * 10000) / 10000,- meanUsd: Math.round(serUsd * 1e6) / 1e6,- p95LatencyMs: Math.round(serLatencyP95),- },- criteria: {- qualityImprovementPct: Math.round(qualityImprovementPct * 100) / 100,- qualityThresholdPct: 2,- qualityPasses: passes.quality,- usdIncreasePct: Math.round(usdIncreasePct * 100) / 100,- usdThresholdPct: 1,- costPasses: passes.cost,- latencyIncreasePct: Math.round(latencyIncreasePct * 100) / 100,- latencyThresholdPct: 5,- latencyPasses: passes.latency,- },- verdict: {- promotable: allPass,- reason: allPass- ? 'All three criteria met (quality > 2% AND cost < 1% AND latency < 5%)'- : `Blocked by: ${[- !passes.quality && `quality only +${(qualityImprovementPct).toFixed(2)}% (need >2%)`,- !passes.cost && `cost +${(usdIncreasePct).toFixed(2)}% (need <1%)`,- !passes.latency && `latency +${(latencyIncreasePct).toFixed(2)}% (need <5%)`,- ].filter(Boolean).join(', ')}`,- },- generatedAt: new Date().toISOString(),- };-- if (ARGS.format === 'json') {- console.log(JSON.stringify(payload, null, 2));- } else {- console.log('# router-parallel-analyze (ADR-150 SelfEvolvingRouter promotion gate)');- console.log('');- console.log(`Sample size: **${payload.sampleSize}** paired decisions`);- console.log(`Disagreement rate: ${payload.disagreement.pct}% (${payload.disagreement.count} / ${payload.sampleSize})`);- console.log('');- console.log(`| Metric | Bandit | SER | Delta | Threshold | Passes |`);- console.log(`|---|---:|---:|---:|---:|:---:|`);- console.log(`| Mean quality | ${payload.bandit.meanQuality} | ${payload.ser.meanQuality} | ${payload.criteria.qualityImprovementPct >= 0 ? '+' : ''}${payload.criteria.qualityImprovementPct}% | >+2% | ${passes.quality ? '✓' : '⚠'} |`);- console.log(`| Mean $/decision | $${payload.bandit.meanUsd.toFixed(6)} | $${payload.ser.meanUsd.toFixed(6)} | ${payload.criteria.usdIncreasePct >= 0 ? '+' : ''}${payload.criteria.usdIncreasePct}% | <+1% | ${passes.cost ? '✓' : '⚠'} |`);- console.log(`| p95 latency | ${payload.bandit.p95LatencyMs}ms | ${payload.ser.p95LatencyMs}ms | ${payload.criteria.latencyIncreasePct >= 0 ? '+' : ''}${payload.criteria.latencyIncreasePct}% | <+5% | ${passes.latency ? '✓' : '⚠'} |`);- console.log('');- console.log(`**Verdict**: ${allPass ? '✓ PROMOTABLE' : '⚠ NOT promotable'}`);- console.log('');- console.log(`_${payload.verdict.reason}_`);- }-- if (ARGS.strict && !allPass) process.exit(1);- process.exit(0);-}--main();diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/score.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/score.mjsdeleted file mode 100755index e2d31aa3c8..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/score.mjs+++ /dev/null@@ -1,92 +0,0 @@-#!/usr/bin/env node-// score.mjs — `cost-style` wrapper around `metaharness score <path>`.-//-// Returns the 5-dimension scorecard (harnessFit / compileConfidence /-// taskCoverage / toolSafety / memoryUsefulness) + estCostPerRunUsd +-// scaffoldReady boolean. Reads-only; no side effects.-//-// USAGE-// node scripts/score.mjs # current dir-// node scripts/score.mjs --path <dir> # specific dir-// node scripts/score.mjs --alert-on-fit-below 70 # exit 1 if harnessFit < 70-// node scripts/score.mjs --format json-//-// EXIT CODES-// 0 scored OK (or degraded — MetaHarness not available)-// 1 --alert-on-fit-below threshold breached-// 2 config error or scoring failure--import { runMetaharness, emitDegradedJsonAndExit } from './_harness.mjs';--const ARGS = (() => {- const a = { path: '.', format: 'json', alertFitBelow: null };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--path') a.path = process.argv[++i];- else if (v === '--alert-on-fit-below') a.alertFitBelow = parseFloat(process.argv[++i]);- else if (v === '--format') a.format = process.argv[++i];- }- return a;-})();--function main() {- const r = runMetaharness(['score', ARGS.path]);- if (r.degraded) {- emitDegradedJsonAndExit(r.reason);- return;- }- if (r.exitCode !== 0 || !r.json) {- console.error(`score: metaharness exited ${r.exitCode}`);- if (r.stderr) console.error(r.stderr.slice(0, 400));- process.exit(2);- }- const payload = { ...r.json, durationMs: r.durationMs };-- if (ARGS.alertFitBelow !== null) {- if (!isFinite(ARGS.alertFitBelow)) {- console.error(`score: --alert-on-fit-below must be a finite number`);- process.exit(2);- }- payload.alert = {- threshold: ARGS.alertFitBelow,- triggered: typeof payload.harnessFit === 'number' && payload.harnessFit < ARGS.alertFitBelow,- reason: typeof payload.harnessFit === 'number' && payload.harnessFit < ARGS.alertFitBelow- ? `harnessFit ${payload.harnessFit} < ${ARGS.alertFitBelow}`- : `harnessFit ${payload.harnessFit ?? 'unknown'} ≥ ${ARGS.alertFitBelow} — OK`,- };- }-- if (ARGS.format === 'json') {- console.log(JSON.stringify(payload, null, 2));- } else {- console.log(`# harness-score — ${payload.repo || ARGS.path}`);- console.log('');- console.log(`| Dimension | Value |`);- console.log(`|---|---:|`);- console.log(`| harnessFit | ${payload.harnessFit ?? '—'} |`);- console.log(`| compileConfidence | ${payload.compileConfidence ?? '—'} |`);- console.log(`| taskCoverage | ${payload.taskCoverage ?? '—'} |`);- console.log(`| toolSafety | ${payload.toolSafety ?? '—'} |`);- console.log(`| memoryUsefulness | ${payload.memoryUsefulness ?? '—'} |`);- console.log(`| estCostPerRunUsd | $${payload.estCostPerRunUsd ?? '—'} |`);- console.log(`| recommendedMode | ${payload.recommendedMode ?? '—'} |`);- console.log(`| archetype | ${payload.archetype ?? '—'} |`);- console.log(`| template | ${payload.template ?? '—'} |`);- console.log(`| scaffoldReady | ${payload.scaffoldReady ?? '—'} |`);- console.log(`| hardConstraints | ${payload.hardConstraints ?? '—'} |`);- console.log(`| **duration** | ${payload.durationMs}ms |`);- console.log('');- if (payload.alert) {- if (payload.alert.triggered) {- console.log(`⚠ **ALERT**: ${payload.alert.reason}`);- } else {- console.log(`✓ ${payload.alert.reason}`);- }- console.log('');- }- }-- if (payload.alert?.triggered) process.exit(1);-}--main();diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/security-bench.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/security-bench.mjsdeleted file mode 100644index 436ac11c6d..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/security-bench.mjs+++ /dev/null@@ -1,174 +0,0 @@-#!/usr/bin/env node-// security-bench.mjs — wrapper around `metaharness-darwin security bench`.-//-// "Darwin Shield" — upstream's own ADR-155 — evolves a champion harness-// on a 10-vuln/9-decoy corpus and measures it against four baselines-// (B0 static-only, B1 LLM single-pass, B2 fixed agent, B3 Darwin champion).-// The CHAMPION reaches TPR=1, FPR=0; the eight acceptance gates verify-// reproducibility, statistical significance, and unsafe-output=0.-//-// CONNECTION TO RUFLO ADR-155-// ===========================-// ruflo's ADR-155 (#2417) proposes a nightly self-learning security harness-// with three learning loops (per-dimension confidence weighting, severity-// calibration, auto-fix bid). The upstream Darwin Shield is the closest-// reference implementation — same shape, different scope (evolves a-// security-detection harness vs evaluates findings; both grade by realized-// TPR/FPR vs ground-truth corpus). Running `security bench` periodically-// gives us the empirical baseline that ruflo's Phase 2 loop A needs before-// training: if Darwin Shield converges on a known-good corpus, the loop A-// gradient signal is sound; if it doesn't, the corpus / sandbox is the-// gap, not the learning algorithm.-//-// USAGE-// node scripts/security-bench.mjs # default population=2 cycles=1-// node scripts/security-bench.mjs --population 4 --cycles 3 # deeper run-// node scripts/security-bench.mjs --population 4 --cycles 3 --alert-on-fail-//-// EXIT CODES-// 0 bench passed all gates (or degraded — Darwin not available)-// 1 --alert-on-fail and any acceptance gate failed-// 2 config error or bench infrastructure failure--import { runDarwinAsync, emitDarwinDegradedJsonAndExit } from './_darwin.mjs';--const ARGS = (() => {- const a = {- population: 2,- cycles: 1,- seed: null,- alertOnFail: false,- format: 'json',- timeoutMs: null,- };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--population') a.population = parseInt(process.argv[++i], 10);- else if (v === '--cycles') a.cycles = parseInt(process.argv[++i], 10);- else if (v === '--seed') a.seed = parseInt(process.argv[++i], 10);- else if (v === '--alert-on-fail') a.alertOnFail = true;- else if (v === '--format') a.format = process.argv[++i];- else if (v === '--timeout-ms') a.timeoutMs = parseInt(process.argv[++i], 10);- }- return a;-})();--function safetyChecks() {- if (ARGS.population < 1 || ARGS.population > 20) {- console.error('security-bench: --population must be 1..20 (ruflo cap)');- process.exit(2);- }- if (ARGS.cycles < 1 || ARGS.cycles > 100) {- console.error('security-bench: --cycles must be 1..100 (ruflo cap)');- process.exit(2);- }-}--function defaultTimeoutMs() {- // Bench corpus has 10 vulns + 9 decoys = 19 evaluations per cycle.- // Each evaluation runs the candidate detector + scores patches.- // Rough budget: ~3s per evaluation × population × cycles + 30s overhead.- return Math.max(60_000, 3_000 * 19 * ARGS.population * ARGS.cycles + 30_000);-}--// Parse the markdown report that `security bench` emits. The header-// "Overall: ✅ PASS" or "❌ FAIL" is the rolled-up gate. We also extract-// each acceptance gate's pass/fail line.-function parseSecurityBenchMarkdown(stdout) {- const overallMatch = /\*\*Overall:\s*([✅❌])\s*(PASS|FAIL)\*\*/i.exec(stdout);- const overall = overallMatch ? { ok: overallMatch[2].toUpperCase() === 'PASS', icon: overallMatch[1] } : null;-- const gates = [];- // Match lines like: "- ✅ **TPR improvement ≥ 25% vs fixed harness** — +150%"- const gateRx = /^-\s+([✅❌])\s+\*\*(.+?)\*\*\s*[—-]\s*(.+)$/gm;- let m;- while ((m = gateRx.exec(stdout)) !== null) {- gates.push({- ok: m[1] === '✅',- criterion: m[2].trim(),- measured: m[3].trim(),- });- }-- // Extract the baselines-vs-champion table — useful for diff over time.- const baselines = [];- const tableRx = /^\|\s*B[0-3]\s+([^|]+?)\s*\|\s*([\d.]+)\s*\|\s*([\d.]+)\s*\|\s*([\d.]+)\s*\|\s*([\d.]+)\s*\|\s*([\d.]+)\s*\|\s*(\d+)\s*\|\s*(.+?)\s*\|/gm;- while ((m = tableRx.exec(stdout)) !== null) {- baselines.push({- harness: m[1].trim(),- fitness: parseFloat(m[2]),- tpr: parseFloat(m[3]),- fpr: parseFloat(m[4]),- patchPass: parseFloat(m[5]),- repro: parseFloat(m[6]),- unsafe: parseInt(m[7], 10),- cost: m[8].trim(),- });- }-- return { overall, gates, baselines };-}--async function main() {- safetyChecks();-- const cliArgs = ['security', 'bench',- '--population', String(ARGS.population),- '--cycles', String(ARGS.cycles),- ];- if (ARGS.seed != null) cliArgs.push('--seed', String(ARGS.seed));-- const r = await runDarwinAsync(cliArgs, {- timeoutMs: ARGS.timeoutMs ?? defaultTimeoutMs(),- json: false, // bench output is markdown, not JSON- onProgress: (line) => { if (line.trim()) process.stderr.write(`[security-bench] ${line}\n`); },- });-- if (r.degraded) {- emitDarwinDegradedJsonAndExit(r.reason);- return;- }-- if (r.exitCode !== 0 && r.exitCode !== 1) {- // Exit 1 may be the bench's own "gates failed" signal; treat as data.- // Anything else is infrastructure failure.- const payload = {- success: false,- data: { exitCode: r.exitCode, stderrTail: r.stderr.slice(-400) },- generatedAt: new Date().toISOString(),- };- console.log(JSON.stringify(payload, null, 2));- process.exit(2);- }-- const parsed = parseSecurityBenchMarkdown(r.stdout);- const gatesPassed = parsed.gates.filter((g) => g.ok).length;- const gatesFailed = parsed.gates.length - gatesPassed;-- const payload = {- success: true,- data: {- overall: parsed.overall,- gates: {- total: parsed.gates.length,- passed: gatesPassed,- failed: gatesFailed,- details: parsed.gates,- },- baselines: parsed.baselines,- rawMarkdown: r.stdout,- shape: { population: ARGS.population, cycles: ARGS.cycles, seed: ARGS.seed },- durationMs: r.durationMs,- },- generatedAt: new Date().toISOString(),- };-- console.log(JSON.stringify(payload, null, 2));- if (ARGS.alertOnFail && parsed.overall && !parsed.overall.ok) process.exit(1);- process.exit(0);-}--main().catch((e) => {- console.error(`security-bench: unexpected failure: ${e?.message ?? e}`);- process.exit(2);-});diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/similarity.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/similarity.mjsdeleted file mode 100755index 5ace960046..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/similarity.mjs+++ /dev/null@@ -1,158 +0,0 @@-#!/usr/bin/env node-// similarity.mjs — ADR-152 §3.1 CLI skill.-//-// Computes weighted similarity between two harness fingerprints (genome-// + score JSON). Production-grade companion to _spike-similarity.mjs.-//-// USAGE-// node scripts/similarity.mjs --a a.json --b b.json-// node scripts/similarity.mjs --a-key harness-X --b-key harness-Y # memory lookup-// node scripts/similarity.mjs --a a.json --b b.json --per-dimension # breakdown-// node scripts/similarity.mjs --a a.json --b b.json --format json-// node scripts/similarity.mjs --a a.json --b b.json --alert-below 0.5 # exit 1 if low-//-// EXIT CODES-// 0 ok (or overall ≥ alert-below threshold)-// 1 --alert-below AND overall < threshold-// 2 config / input error (missing args, file not found, malformed JSON)-//-// ADR-150 ARCHITECTURAL CONSTRAINTS PRESERVED-// - Pure-TS function (`_similarity.mjs`), no `@metaharness/*` import-// - No new dep; uses node:fs + node:child_process only for memory lookup-// - Graceful degradation: missing keys / malformed JSON → exit 2 with-// a structured `{ degraded: true, reason: ... }` payload on stdout-// - CI-gate ready: smoke step 17y locks this contract--import { readFileSync, existsSync } from 'node:fs';-import { spawnSync } from 'node:child_process';-import { similarity } from './_similarity.mjs';--const NS = process.env.HARNESS_SIMILARITY_NAMESPACE || 'metaharness-audit';-const CLI_PKG = process.env.CLI_CORE === '1'- ? '@claude-flow/cli-core@alpha'- : '@claude-flow/cli@latest';--const ARGS = (() => {- const a = {- aFile: null, bFile: null,- aKey: null, bKey: null,- perDimension: false,- format: 'table',- alertBelow: null,- };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--a') a.aFile = process.argv[++i];- else if (v === '--b') a.bFile = process.argv[++i];- else if (v === '--a-key') a.aKey = process.argv[++i];- else if (v === '--b-key') a.bKey = process.argv[++i];- else if (v === '--per-dimension') a.perDimension = true;- else if (v === '--format') a.format = process.argv[++i];- else if (v === '--alert-below') a.alertBelow = Number(process.argv[++i]);- }- return a;-})();--function emitDegradedAndExit(reason, code = 2) {- const payload = {- degraded: true,- reason,- adr: 'ADR-152',- skill: 'harness-similarity',- generatedAt: new Date().toISOString(),- };- console.log(JSON.stringify(payload, null, 2));- process.exit(code);-}--function memRetrieve(key) {- const r = spawnSync('npx', [- CLI_PKG, 'memory', 'retrieve',- '--namespace', NS, '--key', key,- ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' });- if (r.status !== 0) return null;- const m = /\{[\s\S]*\}/.exec(r.stdout || '');- if (!m) return null;- try { return JSON.parse(m[0]); } catch { return null; }-}--function loadHarness(label, filePath, memKey) {- if (filePath) {- if (!existsSync(filePath)) emitDegradedAndExit(`${label}: file not found: ${filePath}`);- try { return JSON.parse(readFileSync(filePath, 'utf-8')); }- catch (e) { emitDegradedAndExit(`${label}: invalid JSON: ${e.message}`); }- }- if (memKey) {- const rec = memRetrieve(memKey);- if (!rec) emitDegradedAndExit(`${label}: key not found in namespace ${NS}: ${memKey}`);- return rec;- }- emitDegradedAndExit(`${label}: --${label} or --${label}-key required`);- return null; // unreachable; emitDegradedAndExit exits-}--function main() {- if (!ARGS.aFile && !ARGS.aKey) emitDegradedAndExit('--a <file> or --a-key <memkey> required');- if (!ARGS.bFile && !ARGS.bKey) emitDegradedAndExit('--b <file> or --b-key <memkey> required');-- const a = loadHarness('a', ARGS.aFile, ARGS.aKey);- const b = loadHarness('b', ARGS.bFile, ARGS.bKey);-- const result = similarity(a, b, { perDimension: ARGS.perDimension });-- const payload = {- adr: 'ADR-152',- skill: 'harness-similarity',- inputs: {- a: ARGS.aFile ?? `mem:${ARGS.aKey}`,- b: ARGS.bFile ?? `mem:${ARGS.bKey}`,- },- ...result,- alert: ARGS.alertBelow != null ? {- threshold: ARGS.alertBelow,- triggered: result.overall < ARGS.alertBelow,- reason: result.overall < ARGS.alertBelow- ? `overall ${result.overall} < threshold ${ARGS.alertBelow}`- : `overall ${result.overall} ≥ threshold ${ARGS.alertBelow}`,- } : null,- generatedAt: new Date().toISOString(),- };-- if (ARGS.format === 'json') {- console.log(JSON.stringify(payload, null, 2));- } else {- console.log(`# harness similarity (ADR-152)\n`);- console.log(`Inputs:`);- console.log(` a: ${payload.inputs.a}`);- console.log(` b: ${payload.inputs.b}`);- console.log('');- console.log(`| Component | Score | Weight | Contribution |`);- console.log(`|-------------|-------:|-------:|-------------:|`);- const { weights, components } = payload;- console.log(`| cosine | ${components.cosine.toFixed(4)} | ${weights.cosine} | ${(components.cosine * weights.cosine).toFixed(4)} |`);- console.log(`| categorical | ${components.categorical.toFixed(4)} | ${weights.categorical} | ${(components.categorical * weights.categorical).toFixed(4)} |`);- console.log(`| jaccard | ${components.jaccard.toFixed(4)} | ${weights.jaccard} | ${(components.jaccard * weights.jaccard).toFixed(4)} |`);- console.log('');- console.log(`**Overall:** ${payload.overall.toFixed(4)}`);- if (payload.alert) {- console.log('');- console.log(payload.alert.triggered ? `⚠ ALERT: ${payload.alert.reason}` : `✓ ${payload.alert.reason}`);- }- if (ARGS.perDimension && payload.perDimension) {- console.log('');- console.log('## Per-dimension breakdown');- console.log('');- console.log('| Dimension | a | b | contribution |');- console.log('|---|---|---|---:|');- for (const [k, v] of Object.entries(payload.perDimension)) {- const av = Array.isArray(v.a) ? `[${v.a.join(',')}]` : String(v.a ?? '-');- const bv = Array.isArray(v.b) ? `[${v.b.join(',')}]` : String(v.b ?? '-');- console.log(`| ${k} | ${av} | ${bv} | ${Number(v.contribution).toFixed(4)} |`);- }- }- }-- if (payload.alert?.triggered) process.exit(1);-}--main();diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/smoke.sh b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/smoke.shdeleted file mode 100755index db548c201d..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/smoke.sh+++ /dev/null@@ -1,2289 +0,0 @@-#!/usr/bin/env bash-# Structural smoke test for ruflo-metaharness v0.1.0 (ADR-150 Phase 1).-set -u-ROOT="$(cd "$(dirname "$0")/.." && pwd)"-PASS=0-FAIL=0-step() { printf "→ %s ... " "$1"; }-ok() { printf "PASS\n"; PASS=$((PASS+1)); }-bad() { printf "FAIL: %s\n" "$1"; FAIL=$((FAIL+1)); }--step "1. plugin.json declares 0.1.0 with adr-150 keywords"-v=$(grep -E '"version"' "$ROOT/.claude-plugin/plugin.json" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1)-if [[ "$v" != "0.1.0" ]]; then- bad "expected 0.1.0, got '$v'"-else- miss=""- for k in ruflo metaharness harness scorecard genome mcp-scan threat-model router adr-150 adr-148 adr-149 optional-dependency graceful-degradation subprocess phase-1-mvp; do- grep -q "\"$k\"" "$ROOT/.claude-plugin/plugin.json" || miss="$miss $k"- done- [[ -z "$miss" ]] && ok || bad "missing keywords:$miss"-fi--step "2. all six skills present with valid frontmatter"-miss=""-for s in harness-score harness-genome harness-mint harness-mcp-scan harness-threat-model harness-oia-audit; do- f="$ROOT/skills/$s/SKILL.md"- [[ -f "$f" ]] || { miss="$miss missing-$s"; continue; }- for k in 'name:' 'description:' 'allowed-tools:'; do- grep -q "^$k" "$f" || miss="$miss $s-no-$k"- done-done-[[ -z "$miss" ]] && ok || bad "$miss"--step "3. _harness.mjs shared loader has the safe-shellout pattern"-F="$ROOT/scripts/_harness.mjs"-miss=""-[[ -f "$F" ]] || miss="$miss missing"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-grep -q "spawnSync" "$F" || miss="$miss no-spawnSync"-grep -q "runMetaharness" "$F" || miss="$miss no-meta-runner"-grep -q "runHarness" "$F" || miss="$miss no-harness-runner"-grep -q "emitDegradedJsonAndExit" "$F" || miss="$miss no-degraded-helper"-grep -q "metaharness-not-available" "$F" || miss="$miss no-degraded-reason"-# ADR-150 architectural constraint #3: graceful degradation must be present-grep -q "degraded: true" "$F" || miss="$miss no-degraded-flag"-[[ -z "$miss" ]] && ok || bad "$miss"--step "4. score.mjs harness present + parses + uses _harness.mjs + alert"-F="$ROOT/scripts/score.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-grep -q "runMetaharness" "$F" || miss="$miss no-runner"-grep -q "alert-on-fit-below" "$F" || miss="$miss no-alert-flag"-grep -q "harnessFit" "$F" || miss="$miss no-fit-field"-grep -q "process.exit(1)" "$F" || miss="$miss no-fail-closed"-grep -q "process.exit(2)" "$F" || miss="$miss no-config-exit"-[[ -z "$miss" ]] && ok || bad "$miss"--step "5. genome.mjs present + parses + uses _harness.mjs + alert"-F="$ROOT/scripts/genome.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-grep -q "runMetaharness" "$F" || miss="$miss no-runner"-grep -q "alert-on-risk-above" "$F" || miss="$miss no-alert-flag"-grep -q "risk_score" "$F" || miss="$miss no-risk-field"-grep -q "process.exit(1)" "$F" || miss="$miss no-fail-closed"-[[ -z "$miss" ]] && ok || bad "$miss"--step "6. mcp-scan.mjs present + parses + severity-ranked"-F="$ROOT/scripts/mcp-scan.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-grep -q "runHarness" "$F" || miss="$miss no-runner"-grep -q "SEVERITY_RANK" "$F" || miss="$miss no-severity"-grep -q "fail-on" "$F" || miss="$miss no-fail-on-flag"-grep -q "process.exit(1)" "$F" || miss="$miss no-fail-closed"-[[ -z "$miss" ]] && ok || bad "$miss"--step "7. threat-model.mjs present + parses + severity-ranked"-F="$ROOT/scripts/threat-model.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-grep -q "runHarness" "$F" || miss="$miss no-runner"-grep -q "SEVERITY_RANK" "$F" || miss="$miss no-severity"-grep -q "fail-on" "$F" || miss="$miss no-fail-on-flag"-[[ -z "$miss" ]] && ok || bad "$miss"--step "8. mint.mjs dry-run by default + project-root refusal"-F="$ROOT/scripts/mint.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-grep -q "runMetaharness" "$F" || miss="$miss no-runner"-grep -q "confirm" "$F" || miss="$miss no-confirm-flag"-grep -q "refusing to write to project root" "$F" || miss="$miss no-root-refusal"-grep -q "dryRun" "$F" || miss="$miss no-dryrun-output"-grep -q "process.exit(2)" "$F" || miss="$miss no-config-exit"-[[ -z "$miss" ]] && ok || bad "$miss"--step "9. command file documents all five skills"-F="$ROOT/commands/ruflo-metaharness.md"-miss=""-[[ -f "$F" ]] || miss="$miss missing-file"-for s in score genome mint mcp-scan threat-model; do- grep -q "harness $s\\|metaharness-$s" "$F" 2>/dev/null || miss="$miss missing-$s"-done-[[ -z "$miss" ]] && ok || bad "$miss"--step "10. agent file documents the metaharness role"-F="$ROOT/agents/metaharness-architect.md"-miss=""-[[ -f "$F" ]] || miss="$miss missing-file"-grep -q "^name:" "$F" || miss="$miss no-name"-grep -q "^description:" "$F" || miss="$miss no-description"-grep -q "model:" "$F" || miss="$miss no-model"-[[ -z "$miss" ]] && ok || bad "$miss"--step "11. no SKILL.md grants wildcard tool access (security)"-bad_skills=""-for f in "$ROOT"/skills/*/SKILL.md; do- grep -q '^allowed-tools:[[:space:]]*\*' "$f" && bad_skills="$bad_skills $(basename $(dirname "$f"))"-done-[[ -z "$bad_skills" ]] && ok || bad "wildcard:$bad_skills"--step "12. README documents ADR-150 architectural constraint"-F="$ROOT/README.md"-miss=""-[[ -f "$F" ]] || miss="$miss missing-file"-grep -q "ADR-150" "$F" || miss="$miss no-adr-ref"-grep -qE "architectural constraint|never (a )?required" "$F" || miss="$miss no-constraint"-grep -q "graceful" "$F" || miss="$miss no-graceful-degradation-doc"-[[ -z "$miss" ]] && ok || bad "$miss"--step "13. every script in scripts/*.mjs parses cleanly"-miss=""-for f in "$ROOT"/scripts/*.mjs; do- node --check "$f" 2>/dev/null || miss="$miss $(basename "$f")"-done-[[ -z "$miss" ]] && ok || bad "syntax errors:$miss"--step "14. plugin.json parses as valid JSON + version sentinel matches step 1"-node -e "JSON.parse(require('fs').readFileSync('$ROOT/.claude-plugin/plugin.json'))" 2>/dev/null \- && ok || bad "plugin.json invalid JSON"--step "15. top-level CLI command registered (deep integration — iter 3)"-F="$ROOT/../../v3/@claude-flow/cli/src/commands/metaharness.ts"-miss=""-[[ -f "$F" ]] || miss="$miss command-file-missing"-grep -q "name: 'metaharness'" "$F" 2>/dev/null || miss="$miss no-name-field"-# All core subcommands must each be present in the dispatch table.-# Match either quoted ('mcp-scan': ...) or unquoted shorthand (score: ...) keys.-for sub in score genome mcp-scan threat-model oia-audit audit-list audit-trend mint redblue learn gepa; do- grep -qE "(^|[[:space:]])'?${sub}'?:" "$F" 2>/dev/null || miss="$miss missing-$sub"-done-# Registered in the loader-LOADER="$ROOT/../../v3/@claude-flow/cli/src/commands/index.ts"-grep -q "metaharness: () => import" "$LOADER" 2>/dev/null || miss="$miss not-registered-in-loader"-[[ -z "$miss" ]] && ok || bad "$miss"--step "16. ruflo wrapper has metaharness in optionalDependencies (architectural constraint #2)"-F="$ROOT/../../ruflo/package.json"-node -e "-const j = JSON.parse(require('fs').readFileSync('$F','utf-8'));-const od = j.optionalDependencies || {};-if (!od.metaharness) { console.error('missing metaharness in optionalDependencies'); process.exit(1); }-if (j.dependencies && j.dependencies.metaharness) { console.error('metaharness leaked into dependencies'); process.exit(1); }-" 2>/dev/null && ok || bad "ruflo wrapper missing metaharness optionalDep"--step "17r. _harness.mjs npx-argv regression guard (iter 27 fix lock)"-F="$ROOT/scripts/_harness.mjs"-miss=""-# THE BUG WAS: passing '-y metaharness@latest' as a single argv token-# to spawnSync. Lock the array-form invocation so it can't regress.-# A correct invocation looks like:-# spawnSync('npx', ['-y', 'metaharness@latest', ...], ...)-# A broken one looks like:-# spawnSync('npx', ['-y metaharness@latest', ...], ...)-# OR:-# execCli('-y metaharness@latest', args, opts)-if grep -qE "execCli\(\s*['\"]-y metaharness@latest['\"]" "$F" 2>/dev/null; then- miss="$miss bug-regressed-string-form"-fi-# Confirm the fix is in place-grep -q "execCli(\[\s*'-y'\s*,\s*'metaharness@latest'" "$F" 2>/dev/null || \- grep -q "execCli(\[ *'-y', 'metaharness@latest'" "$F" 2>/dev/null || miss="$miss no-array-form-fix"-# cwd + env pass-through (added by iter 27)-grep -q "cwd: opts" "$F" || miss="$miss no-cwd-passthrough"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z79. oia-audit-weekly.yml retains iter-108 hard-fail + iter-109 dispatch inputs (iter 116)"-miss=""-# Two load-bearing invariants accumulated in the weekly cron:-# iter 108 — hard-fail when timing.path != "file" (cron budget gate)-# iter 109 — workflow_dispatch inputs (threshold + alert_on_new_severity)-# Both are *removable* by a careless refactor; YAML still validates; the-# cron still runs; only the gate disappears. Smoke-anchor each.-W="$ROOT/../../.github/workflows/oia-audit-weekly.yml"-# iter-108 marker: the slow-path fail-fast block — specific annotation string.-grep -q 'iter-67 fastpath flag may have regressed' "$W" 2>/dev/null \- || miss="$miss iter-108-hard-fail-removed"-# iter-108 timing.path check itself-grep -qE 'PATH_LABEL.*!=.*"file"' "$W" 2>/dev/null \- || miss="$miss iter-108-path-label-check-removed"-# iter-109 marker: workflow_dispatch inputs — both inputs must exist-grep -q 'workflow_dispatch:' "$W" 2>/dev/null \- || miss="$miss iter-109-workflow-dispatch-removed"-grep -qE '^[ \t]+threshold:$' "$W" 2>/dev/null \- || miss="$miss iter-109-threshold-input-removed"-grep -qE '^[ \t]+alert_on_new_severity:$' "$W" 2>/dev/null \- || miss="$miss iter-109-alert-input-removed"-# iter-109 wiring into drift step via ${{ inputs.* }}-grep -q 'inputs.threshold' "$W" 2>/dev/null \- || miss="$miss iter-109-threshold-wiring-removed"-grep -q 'inputs.alert_on_new_severity' "$W" 2>/dev/null \- || miss="$miss iter-109-alert-wiring-removed"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z78. metaharness-ci.yml contains all 6 expected jobs (iter 115)"-miss=""-# metaharness-ci.yml accumulated 6 jobs across iters 1-48. A refactor-# that accidentally drops a job header passes YAML validation but-# silently disables the gate. Smoke-anchor the job set.-W="$ROOT/../../.github/workflows/metaharness-ci.yml"-EXPECTED_JOBS=(- "score" # iter 1 — score harness against ruflo- "mcp-scan" # iter 1 — security finding scan- "router-compat" # iter 12 — @metaharness/router API tripwire- "eject-dryrun" # iter 4 — eject command Phase-2 differentiator- "similarity-tests" # iter 40 — ADR-152 §3.1 contract- "metaharness-real-data" # iter 48 — load-bearing integration gate-)-for job in "${EXPECTED_JOBS[@]}"; do- grep -qE "^ ${job}:$" "$W" 2>/dev/null || miss="$miss missing-job-${job}"-done-# Count check anchors the floor — exactly 6 jobs expected-ACTUAL=$(grep -cE "^ [a-z-]+:$" "$W" 2>/dev/null || echo 0)-# Subtract 1 for the `push:` trigger block which also matches `^ push:$`-EFFECTIVE_JOBS=$((ACTUAL - 1))-[[ "$EFFECTIVE_JOBS" -ge 6 ]] || miss="$miss job-count-too-low:$EFFECTIVE_JOBS"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z77. bench scripts emit results[] with numeric meanUs (iter 114)"-miss=""-# iter 88 verified bench output JSON.parses. iter 114 goes further:-# bench JSON must have a non-empty results[] array with numeric meanUs-# per entry. An empty array would pass JSON.parse but break iter-82/iter-87-# artifact analysis + the inline `node -e` GITHUB_STEP_SUMMARY tables.-for bench in bench-similarity bench-parse-mcp-scan; do- OUT=$(node "$ROOT/scripts/${bench}.mjs" --iters 500 --format json 2>/dev/null)- SHAPE=$(echo "$OUT" | python3 -c "-import json, sys, re-m = re.search(r'\{[\s\S]*\}', sys.stdin.read())-d = json.loads(m.group()) if m else {}-r = d.get('results', None)-if not isinstance(r, list): print('not-array')-elif len(r) == 0: print('empty')-elif not all(isinstance(x.get('meanUs'), (int, float)) for x in r): print('non-numeric-meanUs')-elif not all(isinstance(x.get('label'), str) for x in r): print('non-string-label')-else: print('OK')-" 2>/dev/null)- [[ "$SHAPE" == "OK" ]] || miss="$miss ${bench}-${SHAPE}"-done-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z76. oia-audit emits startedAt + finishedAt timestamp pair (iter 113)"-miss=""-# Companion to iter-112. oia-audit is the documented multi-step-# composite exception — it emits startedAt + finishedAt (richer-# semantic than a single generatedAt). iter-113 verifies BOTH fields-# present and that finishedAt >= startedAt (sanity).-OUT=$(node "$ROOT/scripts/oia-audit.mjs" --dry-run --format json 2>/dev/null)-SHAPE=$(echo "$OUT" | python3 -c "-import json, sys, re-m = re.search(r'\{[\s\S]*\}', sys.stdin.read())-d = json.loads(m.group()) if m else {}-sa = d.get('startedAt', '')-fa = d.get('finishedAt', '')-if not sa: print('missing-startedAt')-elif not fa: print('missing-finishedAt')-elif len(sa) < 20 or len(fa) < 20: print('short-timestamps')-elif fa < sa: print('finished-before-started')-else: print('OK')-" 2>/dev/null)-[[ "$SHAPE" == "OK" ]] || miss="$miss oia-audit-timestamp-${SHAPE}"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z75. all scripts emit generatedAt timestamp in --format json (iter 112)"-miss=""-# Each --format json output should include a `generatedAt` ISO timestamp-# for downstream observability (when was this audit run?). Exceptions:-# - oia-audit uses startedAt/finishedAt (multi-step composite, richer)-# - bench-* uses generatedAt (already)-# Iter 112 fixed genome.mjs + mcp-scan.mjs to include generatedAt.-TMP=$(mktemp -d)-cat > "$TMP/fixA.json" <<'JSON'-{"score":{"harnessFit":80,"recommendedMode":"CLI"},"genome":{"repo_type":"x","agent_topology":["a"]}}-JSON-cat > "$TMP/fixB.json" <<'JSON'-{"composite":{"worst":"clean"},"components":{"mcpScan":{"json":{"findings":[]}}},"fingerprint":{"score":{"harnessFit":80},"genome":{"agent_topology":["a"]}}}-JSON-# bash 3.2 (macOS) lacks associative arrays. Use the pipe-delimited list-# pattern from iter-88.-SCRIPT_INV=(- "score|--path . --format json"- "genome|--path . --format json"- "mcp-scan|--path . --format json"- "threat-model|--path . --format json"- "audit-list|--format json"- "audit-trend|--baseline $TMP/fixB.json --current $TMP/fixB.json --format json"- "similarity|--a $TMP/fixA.json --b $TMP/fixA.json --format json"- "bench-similarity|--iters 500 --format json"- "bench-parse-mcp-scan|--iters 500 --format json"-)-for entry in "${SCRIPT_INV[@]}"; do- name="${entry%%|*}"- args="${entry##*|}"- OUT=$(node "$ROOT/scripts/${name}.mjs" $args 2>/dev/null)- echo "$OUT" | python3 -c "-import json, sys, re-m = re.search(r'\{[\s\S]*\}', sys.stdin.read())-d = json.loads(m.group()) if m else {}-ts = d.get('generatedAt')-sys.exit(0 if ts and len(str(ts)) >= 20 else 1)-" 2>/dev/null || miss="$miss ${name}-no-generatedAt"-done-rm -rf "$TMP"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z74. metaharness pin versions consistent across all 3 package.json (iter 111)"-miss=""-# Each of the 3 package.json files pins metaharness/@metaharness/*-# independently. If they drift, behavior varies by install path:-# - `npm install ruflo` → uses ruflo/package.json-# - `npm install @claude-flow/cli` → uses cli/package.json-# - Repo-clone dev install → uses root package.json-# Pin drift between them means CI tests one version while users get-# another. iter-111 enforces matching pin strings across all three.-ROOTPJ="$ROOT/../../package.json"-RUFLOPJ="$ROOT/../../ruflo/package.json"-CLIPJ="$ROOT/../../v3/@claude-flow/cli/package.json"-for pkg in "metaharness" "@metaharness/router" "@metaharness/kernel" "@metaharness/redblue"; do- ROOT_PIN=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$ROOTPJ')).optionalDependencies?.['$pkg'] || '')" 2>/dev/null)- RUFLO_PIN=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$RUFLOPJ')).optionalDependencies?.['$pkg'] || '')" 2>/dev/null)- CLI_PIN=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$CLIPJ')).optionalDependencies?.['$pkg'] || '')" 2>/dev/null)- # Skip if package not in any of the 3 (some files only list a subset)- if [[ -z "$ROOT_PIN" && -z "$RUFLO_PIN" && -z "$CLI_PIN" ]]; then- continue- fi- # Compare non-empty pins — they must all match.- PINS=$(echo "$ROOT_PIN $RUFLO_PIN $CLI_PIN" | tr ' ' '\n' | grep -v '^$' | sort -u | wc -l | tr -d ' ')- if [[ "$PINS" != "1" ]]; then- miss="$miss ${pkg}-pin-drift:root=${ROOT_PIN},ruflo=${RUFLO_PIN},cli=${CLI_PIN}"- fi-done-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z73. metaharness packages tilde-pinned (anti-caret regression, iter 110)"-miss=""-# ADR-150 architectural-constraint review-round-1 mandated tilde pinning-# (~ not ^) for @metaharness/* because upstream is unstable (5 releases-# in 2.7h was the iter-3 observation). Tilde auto-absorbs patches but-# stays on the same MINOR. Caret would auto-absorb minor bumps — too-# permissive for v0.1.x upstream.-#-# Smoke catches regression from tilde → caret OR loose-pinning.-for pj in "$ROOT/../../package.json" "$ROOT/../../ruflo/package.json" "$ROOT/../../v3/@claude-flow/cli/package.json"; do- [[ -f "$pj" ]] || continue- # Look for any @metaharness/* or 'metaharness' line with NON-tilde pinning- BAD=$(node -e "- const j = JSON.parse(require('fs').readFileSync('$pj'));- const od = j.optionalDependencies || {};- const offenders = [];- for (const [k, v] of Object.entries(od)) {- if (/^@metaharness\//.test(k) || k === 'metaharness') {- if (!String(v).startsWith('~')) offenders.push(k + '=' + v);- }- }- console.log(offenders.join(','));- " 2>/dev/null)- if [[ -n "$BAD" ]]; then- miss="$miss non-tilde-pin-in-$(basename $(dirname $pj)):$BAD"- fi-done-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z72. weekly cron exposes workflow_dispatch inputs for policy tuning (iter 109)"-miss=""-W="$ROOT/../../.github/workflows/oia-audit-weekly.yml"-# workflow_dispatch.inputs block present-grep -q "threshold:" "$W" 2>/dev/null || miss="$miss no-threshold-input"-grep -q "alert_on_new_severity:" "$W" 2>/dev/null || miss="$miss no-alert-sev-input"-# Both inputs have safe defaults (scheduled runs work without manual entry)-grep -q "default: '0.85'" "$W" 2>/dev/null || miss="$miss no-threshold-default"-grep -q "default: high" "$W" 2>/dev/null || miss="$miss no-sev-default"-# Drift step uses the inputs via "$THRESHOLD" / "$ALERT_SEV"-grep -q 'THRESHOLD="${{ inputs.threshold' "$W" 2>/dev/null || miss="$miss no-threshold-var"-grep -q 'ALERT_SEV="${{ inputs.alert_on_new_severity' "$W" 2>/dev/null || miss="$miss no-alert-sev-var"-grep -q -- '--threshold "\$THRESHOLD"' "$W" 2>/dev/null || miss="$miss no-threshold-passthrough"-grep -q -- '--alert-on-new-severity "\$ALERT_SEV"' "$W" 2>/dev/null || miss="$miss no-alert-sev-passthrough"-# Choice type lists all 7 severity values from iter-78 enum-for sev in info low medium warn high error critical; do- grep -q " - ${sev}" "$W" 2>/dev/null || miss="$miss no-choice-${sev}"-done-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z71. weekly cron drift step fails on slow-path regression (iter 108)"-miss=""-W="$ROOT/../../.github/workflows/oia-audit-weekly.yml"-# iter-108 hard-fails the workflow if cron accidentally drops --baseline-file-grep -q 'PATH_LABEL=' "$W" 2>/dev/null || miss="$miss no-path-label-var"-grep -q "timing?.path || 'unknown'" "$W" 2>/dev/null || miss="$miss no-path-extraction"-grep -q 'if \[ "\$PATH_LABEL" != "file" \]' "$W" 2>/dev/null || miss="$miss no-path-assertion"-grep -q "iter-67 fastpath flag may have regressed" "$W" 2>/dev/null || miss="$miss no-error-message"-grep -q "::error::Cron drift step" "$W" 2>/dev/null || miss="$miss no-gh-error-annotation"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z70. ADR-152 cross-references resolve + ADR-151 scope-refs documented (iter 107)"-miss=""-ADR_DIR="$ROOT/../../v3/docs/adr"-# ADR-152 (Genome Similarity Search) references only existing ADRs:-# ADR-150, ADR-151. Both must resolve. Same gate as iter-106 but for-# ADR-152's body.-ADR_152="$ADR_DIR/ADR-152-genome-similarity-search.md"-REFS=$(grep -oE "ADR-15[0-9]" "$ADR_152" 2>/dev/null | sort -u)-COUNT=0-for ref in $REFS; do- COUNT=$((COUNT + 1))- num=$(echo "$ref" | sed -E 's/ADR-//')- if ! ls "$ADR_DIR"/ADR-${num}-*.md 2>/dev/null | head -1 | grep -q . ; then- miss="$miss ADR-152-ref-${ref}-not-found"- fi-done-[[ "$COUNT" -ge 2 ]] || miss="$miss adr152-too-few-refs:$COUNT"--# ADR-151 references ADR-153-156 (scope-only, to-be-created). Verify-# these are explicitly documented as scope-only in ADR-151's body-# (per the "each sub-capability gets its own ADR" pattern from iter 34).-ADR_151="$ADR_DIR/ADR-151-harness-intelligence-layer.md"-grep -q "scope-only\|scope only" "$ADR_151" 2>/dev/null || miss="$miss adr151-no-scope-only-marker"-# ADR-151 must reference 153, 154, 155, 156 as the 4 future ADRs-for n in 153 154 155 156; do- grep -q "ADR-${n}" "$ADR_151" 2>/dev/null || miss="$miss adr151-missing-ADR-${n}"-done--[[ -z "$miss" ]] && ok || bad "$miss"--step "17z69. ADR-150 cross-references resolve to existing files (iter 106)"-miss=""-# ADR-150's body references ADR-151 and ADR-152 (the Phase-3 scope shell-# and the genome-similarity ADR). If either gets renamed/moved, the-# link in ADR-150 becomes a 404. Same drift class as iter-91's SKILL.md-# refs, applied to the ADR layer.-ADR_DIR="$ROOT/../../v3/docs/adr"-ADR_150="$ADR_DIR/ADR-150-metaharness-integration-surfaces.md"-# Extract every ADR-NNN reference (including 150 itself for completeness)-REFS=$(grep -oE "ADR-15[0-9]" "$ADR_150" 2>/dev/null | sort -u)-COUNT=0-for ref in $REFS; do- COUNT=$((COUNT + 1))- # Find matching file in ADR dir- num=$(echo "$ref" | sed -E 's/ADR-//')- # The file naming convention is ADR-NNN-<slug>.md- if ! ls "$ADR_DIR"/ADR-${num}-*.md 2>/dev/null | head -1 | grep -q . ; then- miss="$miss ${ref}-not-found"- fi-done-# ADR-150 must reference at least its Phase-3 parents (151 + 152) plus self-[[ "$COUNT" -ge 3 ]] || miss="$miss too-few-adr-refs:$COUNT"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z68. SKILL.md description + argument-hint frontmatter populated (iter 105)"-miss=""-# Companion to iter-104's allowed-tools gate.-# description: agents use this to PICK which skill to invoke-# (Claude Code's skill registry surfaces it in tool listings)-# argument-hint: agents use this to know what args the skill expects-# Missing or empty: the skill is invisible OR uncallable correctly.-SKILLS_DIR="$ROOT/skills"-COUNT=0-for d in "$SKILLS_DIR"/*/; do- COUNT=$((COUNT + 1))- base=$(basename "$d")- desc=$(grep "^description:" "$d/SKILL.md" 2>/dev/null | head -1 \- | sed -E 's/^description:[ \t]*//')- hint=$(grep "^argument-hint:" "$d/SKILL.md" 2>/dev/null | head -1 \- | sed -E 's/^argument-hint:[ \t]*//')- # description must be ≥ 20 chars (otherwise it's a stub, useless to agents)- if [[ ${#desc} -lt 20 ]]; then- miss="$miss ${base}-description-too-short:${#desc}"- fi- # argument-hint must be present (even if "no args" → empty quoted string ok)- if ! grep -q "^argument-hint:" "$d/SKILL.md" 2>/dev/null; then- miss="$miss ${base}-no-argument-hint"- fi-done-[[ "$COUNT" -ge 6 ]] || miss="$miss skill-count-too-low:$COUNT"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z67. SKILL.md frontmatter has non-empty allowed-tools (iter 104)"-miss=""-# Every SKILL.md needs `allowed-tools:` populated. Empty/missing means-# Claude Code can't run the skill (no tools authorized). Per iter-87's-# skill-audit pattern (which this gate codifies for the metaharness-# skills specifically).-SKILLS_DIR="$ROOT/skills"-KNOWN_TOOLS="Bash|Read|Write|Edit|MultiEdit|Glob|Grep|Task|TaskCreate"-COUNT=0-for d in "$SKILLS_DIR"/*/; do- COUNT=$((COUNT + 1))- base=$(basename "$d")- # Frontmatter field must exist and have a non-empty value- line=$(grep "^allowed-tools:" "$d/SKILL.md" 2>/dev/null | head -1)- if [[ -z "$line" ]]; then- miss="$miss ${base}-no-allowed-tools-field"- continue- fi- # Strip key + whitespace; rest is the value- value=$(echo "$line" | sed -E 's/^allowed-tools:[ \t]*//' | xargs)- if [[ -z "$value" ]]; then- miss="$miss ${base}-allowed-tools-empty"- continue- fi- # Each comma-separated token must be a known tool name- for t in $(echo "$value" | tr ',' ' '); do- t_trimmed=$(echo "$t" | xargs)- if ! echo "$t_trimmed" | grep -qE "^(${KNOWN_TOOLS})$"; then- miss="$miss ${base}-unknown-tool:${t_trimmed}"- fi- done-done-[[ "$COUNT" -ge 6 ]] || miss="$miss skill-count-too-low:$COUNT"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z66. SKILL.md frontmatter name matches directory name (iter 103)"-miss=""-# Skills are auto-discovered by Claude Code via the .claude/skills-# pattern: each directory under skills/ is a skill, with its NAME taken-# from the directory. The SKILL.md's frontmatter `name:` field must-# match, otherwise tooling that maps dir→id fails silently:-# plugins/ruflo-metaharness/skills/harness-foo/SKILL.md-# └── must have `name: harness-foo`-SKILLS_DIR="$ROOT/skills"-COUNT=0-for d in "$SKILLS_DIR"/*/; do- COUNT=$((COUNT + 1))- base=$(basename "$d")- fm_name=$(grep "^name:" "$d/SKILL.md" 2>/dev/null | head -1 | awk '{print $2}')- if [[ "$fm_name" != "$base" ]]; then- miss="$miss ${base}-name-mismatch:${fm_name}"- fi-done-# Lock floor at ≥6 (current set is 8; if it drops below 6, something-# was mass-deleted)-[[ "$COUNT" -ge 6 ]] || miss="$miss skill-count-too-low:$COUNT"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z65. orphaned scripts detector — every .mjs is referenced (iter 102)"-miss=""-# Reverse direction of iter-89/90/91. Each script in scripts/ should be-# referenced by at least one of:-# - SUBCOMMANDS map (CLI dispatcher)-# - runScript() call (MCP tool handler)-# - SKILL.md inline reference (skill manifest)-# - smoke.sh (referenced as a test target — covers bench/test scripts)-# - oia-audit-weekly.yml or metaharness-ci.yml (CI workflow steps)-# Exclusions: underscore-prefix files (_harness.mjs, _similarity.mjs)-# are shared utility modules imported, not invoked directly — they're-# covered by static-grep of import statements.-SCRIPTS_DIR="$ROOT/scripts"-DISP="$ROOT/../../v3/@claude-flow/cli/src/commands/metaharness.ts"-WRAPPER="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"-CIM="$ROOT/../../.github/workflows/metaharness-ci.yml"-CIW="$ROOT/../../.github/workflows/oia-audit-weekly.yml"-SMOKE="$ROOT/scripts/smoke.sh"-COUNT=0-ORPHAN=0-for f in "$SCRIPTS_DIR"/*.mjs; do- base=$(basename "$f")- COUNT=$((COUNT + 1))- # Underscore-prefix = shared util OR regression anchor. Accept either:- # (a) imported by another script (e.g., _harness.mjs imported widely)- # (b) referenced by smoke.sh or CI workflow as a standalone invocation- # (e.g., _spike-similarity.mjs is run directly as a regression anchor)- if [[ "$base" == _* ]]; then- if grep -qrE "from '\./${base}'" "$SCRIPTS_DIR" 2>/dev/null \- || grep -q "${base}" "$SMOKE" 2>/dev/null \- || grep -q "${base}" "$CIM" 2>/dev/null \- || grep -q "${base}" "$CIW" 2>/dev/null; then- : # referenced- else- miss="$miss ${base}-not-referenced"- ORPHAN=$((ORPHAN + 1))- fi- continue- fi- # Otherwise: check each reference source- if grep -q "${base}" "$DISP" 2>/dev/null || \- grep -q "${base}" "$WRAPPER" 2>/dev/null || \- find "$ROOT/skills" -name SKILL.md -exec grep -l "${base}" {} \; 2>/dev/null | grep -q . || \- grep -q "${base}" "$SMOKE" 2>/dev/null || \- grep -q "${base}" "$CIM" 2>/dev/null || \- grep -q "${base}" "$CIW" 2>/dev/null; then- : # at least one reference found- else- miss="$miss orphaned-${base}"- ORPHAN=$((ORPHAN + 1))- fi-done-[[ "$COUNT" -ge 20 ]] || miss="$miss script-count-too-low:$COUNT"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z64. JSON-output gate covers similarity + audit-trend (iter 101)"-miss=""-# iter 88 covered 8 scripts. iter 101 extended to 10 (added similarity +-# audit-trend with synthesized fixture inputs). Both have multi-file args-# so they needed fixture setup in the tmpdir.-SMOKE="$ROOT/scripts/smoke.sh"-grep -q "similarity|--a \\\$TMP/fixA" "$SMOKE" 2>/dev/null || miss="$miss no-similarity-fixture"-grep -q "audit-trend|--baseline \\\$TMP/fixB" "$SMOKE" 2>/dev/null || miss="$miss no-audit-trend-fixture"-grep -q "TMP/fixA.json" "$SMOKE" 2>/dev/null || miss="$miss no-fixA-emit"-grep -q "TMP/fixB.json" "$SMOKE" 2>/dev/null || miss="$miss no-fixB-emit"-# Iter-101 fixtures contain similarity + audit-trend shape requirements-grep -q '"agent_topology":\["x"\]' "$SMOKE" 2>/dev/null || miss="$miss no-fixA-agent-topology"-grep -q '"composite":{"worst":"clean"}' "$SMOKE" 2>/dev/null || miss="$miss no-fixB-composite"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z63. ADR-150 reflects iters 83-99 + 100-iter milestone (iter 100)"-miss=""-ADR="$ROOT/../../v3/docs/adr/ADR-150-metaharness-integration-surfaces.md"-grep -q "Phase 3 §3.1 ✅ iters 33–99" "$ADR" 2>/dev/null || miss="$miss no-iter-99-status"-grep -q "100 iterations of /loop" "$ADR" 2>/dev/null || miss="$miss no-100-iter-marker"-grep -q "Iters 83-99 — cross-reference integrity" "$ADR" 2>/dev/null || miss="$miss no-83-99-section"-grep -q "Cross-reference integrity matrix" "$ADR" 2>/dev/null || miss="$miss no-matrix-table"-grep -q "Fast-path observability arc" "$ADR" 2>/dev/null || miss="$miss no-fast-path-arc"-grep -q "100-iter retrospective" "$ADR" 2>/dev/null || miss="$miss no-retrospective"-grep -q "Fleet status (post-iter-99" "$ADR" 2>/dev/null || miss="$miss no-post-iter-99-fleet"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z62. CI dispatcher round-trip enforces wall budget (iter 99)"-miss=""-W="$ROOT/../../.github/workflows/metaharness-ci.yml"-# Wall-clock budget check added to iter-98 step-grep -q "dispatcher fast-path wall \${WALL}ms > 30000ms" "$W" 2>/dev/null || miss="$miss no-wall-budget-check"-grep -q 'j.timing?.parallelWallMs' "$W" 2>/dev/null || miss="$miss no-wall-extraction"-grep -q "WALL=\\\$" "$W" 2>/dev/null || miss="$miss no-wall-var"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z61. drift-from-history dispatcher round-trip in CI (iter 98)"-miss=""-W="$ROOT/../../.github/workflows/metaharness-ci.yml"-grep -q "Drift-from-history dispatcher round-trip" "$W" 2>/dev/null || miss="$miss no-step-name"-grep -q "metaharness drift-from-history" "$W" 2>/dev/null || miss="$miss no-cli-invocation"-grep -q '"path": "file"' "$W" 2>/dev/null || miss="$miss no-path-file-assert"-grep -q '"skippedAuditList": true' "$W" 2>/dev/null || miss="$miss no-skip-true-assert"-grep -q "/tmp/drift-baseline.json" "$W" 2>/dev/null || miss="$miss no-baseline-path"-# Iter-98 step lives in the metaharness-real-data job. The brittle-# fixed-window lookback (-B100) broke once the job grew past 100 lines;-# instead use awk to find the most recent top-level job header above-# the step and check it is metaharness-real-data.-last_job=$(awk '/^ [a-zA-Z_-]+:[[:space:]]*$/ { last=$0 }- /Drift-from-history dispatcher round-trip/ { print last; exit }' "$W" 2>/dev/null)-echo "$last_job" | grep -q "metaharness-real-data:" \- || miss="$miss not-in-real-data-job"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z60. weekly cron summary surfaces timing.path (iter 97)"-miss=""-W="$ROOT/../../.github/workflows/oia-audit-weekly.yml"-grep -q "PATH_TAKEN" "$W" 2>/dev/null || miss="$miss no-path-taken-var"-grep -q "t.path || 'unknown'" "$W" 2>/dev/null || miss="$miss no-path-extraction"-grep -q "t.parallelWallMs" "$W" 2>/dev/null || miss="$miss no-wall-extraction"-grep -q 'echo "Path: \\`\$PATH_TAKEN\\`"' "$W" 2>/dev/null || miss="$miss no-path-summary-line"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z59. drift-from-history table output shows path + wall (iter 96)"-miss=""-F="$ROOT/scripts/drift-from-history.mjs"-grep -q "Path:.*payload.timing.path" "$F" 2>/dev/null || miss="$miss no-path-line-in-table"-grep -q "wall \${wallMs}ms" "$F" 2>/dev/null || miss="$miss no-wall-label"-# Runtime: table output contains the new Path: line-TMPB=$(mktemp)-node "$ROOT/scripts/oia-audit.mjs" --dry-run --format json 2>/dev/null > "$TMPB"-node "$F" --baseline-file "$TMPB" --dry-run 2>&1 | grep -q "Path: *file" \- || miss="$miss runtime-no-path-line"-rm -f "$TMPB"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z58. drift-from-history exposes derived timing.path field (iter 95)"-miss=""-F="$ROOT/scripts/drift-from-history.mjs"-# Code mention-grep -q "path: usedBaselineFile ? 'file'" "$F" 2>/dev/null || miss="$miss no-derived-path"-grep -q "skippedAuditList ? 'key' : 'slow'" "$F" 2>/dev/null || miss="$miss no-key-slow-branch"-# Runtime: each path label surfaces correctly-TMPB=$(mktemp)-node "$ROOT/scripts/oia-audit.mjs" --dry-run --format json 2>/dev/null > "$TMPB"-OUT_FILE=$(node "$F" --baseline-file "$TMPB" --dry-run --format json 2>/dev/null \- | python3 -c "import json,sys,re; m=re.search(r'\{[\s\S]*\}',sys.stdin.read()); print(json.loads(m.group()).get('timing',{}).get('path'))" 2>/dev/null)-[[ "$OUT_FILE" == "file" ]] || miss="$miss baseline-file-path-not-file:$OUT_FILE"-rm -f "$TMPB"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z57. every CLI subcommand documented in CLAUDE.md (iter 94)"-miss=""-# Companion to iter-93's MCP-tool documentation gate. CLAUDE.md also-# serves as a CLI catalog — each subcommand from metaharness.ts's-# SUBCOMMANDS map should appear as `npx ruflo metaharness <X>` for-# discoverability.-DISP="$ROOT/../../v3/@claude-flow/cli/src/commands/metaharness.ts"-CMD="$ROOT/../../CLAUDE.md"-# Extract SUBCOMMANDS keys (both quoted + unquoted forms).-# BSD sed (macOS) doesn't recognize \s; use [ \t] for portability.-KEYS=$(grep -E "^[ ]+('?[a-z-]+'?):[ ]*'[a-z-]+\.mjs'" "$DISP" 2>/dev/null \- | sed -E "s/^[ ]+'?([a-z-]+)'?:.*/\1/" | sort -u)-COUNT=0-for k in $KEYS; do- COUNT=$((COUNT + 1))- grep -qE "npx ruflo metaharness ${k}([ \\\\]|$)" "$CMD" 2>/dev/null \- || miss="$miss subcommand-${k}-not-in-claude-md"-done-[[ "$COUNT" == "13" ]] || miss="$miss subcommand-count-stale:$COUNT-expected-13"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z56. every MCP tool documented in CLAUDE.md (iter 93)"-miss=""-# CLAUDE.md is the agent-facing tool catalog. Each MCP tool registered-# in metaharness-tools.ts should appear at least once in CLAUDE.md so-# agents browsing the catalog discover it. If a future iter adds a tool-# but forgets the CLAUDE.md update, the tool exists but is invisible.-WRAPPER="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"-CMD="$ROOT/../../CLAUDE.md"-TOOLS=$(grep -oE "name: 'metaharness_[a-z_]+'" "$WRAPPER" 2>/dev/null \- | sed -E "s/name: '([a-z_]+)'/\1/" | sort -u)-COUNT=0-for t in $TOOLS; do- COUNT=$((COUNT + 1))- # Look for `mcp__claude-flow__metaharness_X` (the agent-facing name form)- grep -q "mcp__claude-flow__${t}" "$CMD" 2>/dev/null \- || miss="$miss ${t}-not-in-claude-md"-done-# Lock count: 15 MCP tools (mint deliberately excluded — see iter 73).-# Bumped from 9 → 12 after ADR-153 added metaharness_bench,-# metaharness_evolve, and metaharness_security_bench. Bumped from 12 → 13-# after @metaharness/redblue integration added metaharness_redblue.-# Bumped from 13 → 15 after [email protected] learn + [email protected] gepa.-[[ "$COUNT" == "15" ]] || miss="$miss mcp-tool-count-stale:$COUNT-expected-15"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z55. MCP enum + SEVERITY_RANK vocabulary aligned (iter 92)"-miss=""-# Two sources of severity vocabulary:-# 1. _harness.mjs::SEVERITY_RANK keys-# 2. metaharness-tools.ts:metaharness_drift_from_history.alertOnNewSeverity.enum-# If they drift, users see confusing rejection of supposedly-valid severities.-# Smoke ensures:-# - Every MCP enum value is a SEVERITY_RANK key (subset relationship)-# - The only SEVERITY_RANK key NOT in the enum is 'clean' (alerting on-# 'clean' is meaningless — clean=0 ranks below everything)-HARNESS="$ROOT/scripts/_harness.mjs"-WRAPPER="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"-# Extract SEVERITY_RANK keys — only from inside the SEVERITY_RANK literal.-# Pre-iter-92 regex `^\s+[a-z]+: [0-9]` missed multi-key lines like-# `clean: 0, info: 0`. Use grep -oE on the whole literal to capture all-# `<word>: <digit>` pairs regardless of line position.-RANK_KEYS=$(awk '/SEVERITY_RANK = Object.freeze/,/\}\);/' "$HARNESS" 2>/dev/null \- | grep -oE "[a-z]+: [0-9]" | sed -E 's/: [0-9]//' | sort -u)-# Extract enum entries from metaharness-tools.ts. Pull just the bracket-# portion to avoid capturing 'string' from `type: 'string'`.-ENUM=$(grep "alertOnNewSeverity.*enum:" "$WRAPPER" 2>/dev/null \- | head -1 | grep -oE "enum: \[[^]]+\]" | grep -oE "'[a-z]+'" | tr -d "'" | sort -u)-# 1. Every enum value must be in SEVERITY_RANK-for e in $ENUM; do- echo "$RANK_KEYS" | grep -qx "$e" || miss="$miss enum-$e-not-in-rank"-done-# 2. SEVERITY_RANK keys minus enum should be exactly {clean}-MISSING_FROM_ENUM=$(comm -23 <(echo "$RANK_KEYS") <(echo "$ENUM"))-[[ "$MISSING_FROM_ENUM" == "clean" ]] || miss="$miss enum-missing-keys-mismatch:$(echo $MISSING_FROM_ENUM | tr '\n' ',')"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z54. SKILL.md script references point at existing files (iter 91)"-miss=""-# Companion to iter-89/90's cross-reference checks. SKILL.md files-# embed paths like `scripts/foo.mjs` in their text. If a future iter-# renames a script, the SKILL.md text rots silently — the doc still-# renders but the link 404s, and ops users hunting for the-# implementation hit a dead end.-SKILLS_DIR="$ROOT/skills"-SCRIPTS_DIR="$ROOT/scripts"-# Extract every `scripts/<name>.mjs` reference from every SKILL.md.-REFS=$(grep -rohE "scripts/[a-z_-]+\.mjs" "$SKILLS_DIR"/*/SKILL.md 2>/dev/null \- | sed -E "s|scripts/||" \- | sort -u)-COUNT=0-for f in $REFS; do- COUNT=$((COUNT + 1))- [[ -f "$SCRIPTS_DIR/$f" ]] || miss="$miss skill-ref-${f}-missing"-done-# At least 5 references expected (one per skill at minimum; some SKILL.md-# files reference multiple scripts). Lock the floor — if it drops below 5,-# something was deleted.-[[ "$COUNT" -ge 5 ]] || miss="$miss skill-ref-count-too-low:$COUNT"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z53. MCP-tool runScript() references point at existing scripts (iter 90)"-miss=""-# Companion to iter-89's SUBCOMMANDS check. metaharness-tools.ts has 9-# handlers, each calling runScript('<name>.mjs', args). If a future iter-# renames a script but forgets the MCP-tool handler, the agent-callable-# surface fails at runtime with "Script not found".-WRAPPER="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"-SCRIPTS_DIR="$ROOT/scripts"-# Extract `runScript('foo.mjs', ...)` references.-REFS=$(grep -oE "runScript\('[a-z-]+\.mjs'" "$WRAPPER" 2>/dev/null \- | sed -E "s/runScript\('([a-z-]+\.mjs)'/\1/" \- | sort -u)-COUNT=0-for f in $REFS; do- COUNT=$((COUNT + 1))- [[ -f "$SCRIPTS_DIR/$f" ]] || miss="$miss mcp-script-${f}-missing"-done-# Should be 15 unique scripts (one per MCP tool; mint deliberately excluded).-# Bumped from 9 → 12 after ADR-153 added bench/evolve/security_bench tools.-# Bumped from 12 → 13 after @metaharness/redblue integration added redblue.mjs.-# Bumped from 13 → 15 after [email protected] learn + [email protected] gepa.-[[ "$COUNT" == "15" ]] || miss="$miss mcp-script-count-stale:$COUNT-expected-15"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z52. SUBCOMMANDS map entries point at existing script files (iter 89)"-miss=""-# CLI dispatcher (metaharness.ts) has a SUBCOMMANDS map that routes-# `metaharness X` → `scripts/X.mjs`. If a future iter renames a script-# but forgets the map (or vice-versa), `ruflo metaharness X` errors at-# runtime: "Script not found at <path>". Smoke catches the drift here.-DISP="$ROOT/../../v3/@claude-flow/cli/src/commands/metaharness.ts"-SCRIPTS_DIR="$ROOT/scripts"-# Extract each `'subname': 'file.mjs'` or `subname: 'file.mjs'` mapping.-# Both quoted and unquoted-key forms appear in the source.-MAPPINGS=$(grep -E "^\s+('?[a-z-]+'?):\s*'[a-z-]+\.mjs'" "$DISP" 2>/dev/null \- | sed -E "s/.*'([a-z-]+\.mjs)'.*/\1/")-COUNT=0-for f in $MAPPINGS; do- COUNT=$((COUNT + 1))- [[ -f "$SCRIPTS_DIR/$f" ]] || miss="$miss script-${f}-missing"-done-# Iter 73's description string + redblue + learn/gepa lists 13 subcommands.-# SUBCOMMANDS map should have the same 13 entries. Lock the count at exactly 13.-[[ "$COUNT" == "13" ]] || miss="$miss mapping-count-stale:$COUNT-expected-13"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z51. all metaharness scripts produce parseable JSON in --format json mode (iter 88)"-miss=""-# Codifies iter-87's lesson across the whole script family. Each script-# is run with --format json (with minimal valid args); stdout must-# JSON.parse without contamination. Catches the iter-50/iter-86 class-# of bug (markdown header bleeding into JSON output) BEFORE the-# downstream `node -e JSON.parse(readFileSync(...))` step fails in CI.-TMP=$(mktemp -d)-# Each script needs minimal valid args for the JSON branch.-# iter 101 — added audit-trend + similarity (require fixture inputs).-# Synthesize minimal valid JSON fixtures in the tmpdir for them.-cat > "$TMP/fixA.json" <<'JSON'-{"score":{"harnessFit":80,"compileConfidence":90,"taskCoverage":70,"toolSafety":85,"memoryUsefulness":50,"estCostPerRunUsd":0.04,"recommendedMode":"CLI","archetype":"a","template":"t"},"genome":{"repo_type":"node_mcp_ci","agent_topology":["x"],"risk_score":0.3,"test_confidence":0.7,"publish_readiness":0.6}}-JSON-cat > "$TMP/fixB.json" <<'JSON'-{"startedAt":"2026-06-17T00:00:00Z","composite":{"worst":"clean"},"components":{"oiaManifest":{},"threatModel":{},"mcpScan":{"json":{"findings":[]}}},"fingerprint":{"score":{"harnessFit":80,"recommendedMode":"CLI"},"genome":{"repo_type":"node_mcp_ci","agent_topology":["x"]}}}-JSON-SCRIPT_TESTS=(- "oia-audit|--dry-run --format json"- "score|--path . --format json"- "genome|--path . --format json"- "mcp-scan|--path . --format json"- "threat-model|--path . --format json"- "audit-list|--format json"- "bench-similarity|--iters 1000 --format json"- "bench-parse-mcp-scan|--iters 1000 --format json"- "similarity|--a $TMP/fixA.json --b $TMP/fixA.json --format json"- "audit-trend|--baseline $TMP/fixB.json --current $TMP/fixB.json --format json"-)-for entry in "${SCRIPT_TESTS[@]}"; do- name="${entry%%|*}"- args="${entry##*|}"- outfile="$TMP/${name}.json"- node "$ROOT/scripts/${name}.mjs" $args > "$outfile" 2>/dev/null- # JSON.parse should succeed- node -e "JSON.parse(require('fs').readFileSync('$outfile'))" 2>/dev/null \- || miss="$miss ${name}-not-parseable"-done-rm -rf "$TMP"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z50. bench --format json produces valid JSON + bench-parse wired in CI (iter 87)"-miss=""-# Both bench scripts suppress markdown header in --format json mode-for B in bench-similarity bench-parse-mcp-scan; do- F="$ROOT/scripts/${B}.mjs"- grep -q "ARGS.format !== 'json'" "$F" 2>/dev/null || miss="$miss no-format-guard-${B}"-done-# Runtime: both produce parseable JSON files-TMP1=$(mktemp); TMP2=$(mktemp)-node "$ROOT/scripts/bench-similarity.mjs" --iters 2000 --format json > "$TMP1" 2>/dev/null-node "$ROOT/scripts/bench-parse-mcp-scan.mjs" --iters 2000 --format json > "$TMP2" 2>/dev/null-node -e "JSON.parse(require('fs').readFileSync('$TMP1'))" 2>/dev/null || miss="$miss bench-similarity-not-valid-json"-node -e "JSON.parse(require('fs').readFileSync('$TMP2'))" 2>/dev/null || miss="$miss bench-parse-not-valid-json"-rm -f "$TMP1" "$TMP2"-# CI workflow wires iter-87 bench-W="$ROOT/../../.github/workflows/metaharness-ci.yml"-grep -q "bench-parse-mcp-scan.mjs" "$W" 2>/dev/null || miss="$miss bench-parse-not-in-ci"-grep -q "bench-parse-mcp-scan-\${{ github.run_id }}" "$W" 2>/dev/null || miss="$miss no-bench-parse-artifact"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z49. parseMcpScanText perf bench (iter 86)"-miss=""-F="$ROOT/scripts/bench-parse-mcp-scan.mjs"-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# Three categories present (anti-shrink)-for cat in EMPTY TYPICAL RICH; do- grep -q "const ${cat} = " "$F" 2>/dev/null || miss="$miss missing-fixture-${cat}"-done-# Imports from production module-grep -q "from './_harness.mjs'" "$F" 2>/dev/null || miss="$miss not-using-production-parser"-# Gate flag exposed-grep -q -- "--max-mean-us" "$F" 2>/dev/null || miss="$miss no-gate-flag"-# Runtime: bench produces sub-5μs results across all categories-node "$F" --iters 10000 --max-mean-us 5 >/dev/null 2>&1 || miss="$miss runtime-fails-or-perf-blew-5us"-# Runtime: gate trips on absurd ceiling-if node "$F" --iters 10000 --max-mean-us 0.0001 >/dev/null 2>&1; then- miss="$miss gate-failed-to-trip"-fi-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z48. MCP-layer alertOnNewSeverity Phase 4 positive case (iter 85)"-miss=""-T="$ROOT/scripts/test-mcp-tools.mjs"-grep -q "alertOnNewSeverity echoed in payload" "$T" 2>/dev/null || miss="$miss no-echo-assert"-grep -q "alertOnNewSeverity exitCode=1 when triggered" "$T" 2>/dev/null || miss="$miss no-exit1-assert"-grep -q "success===false when alert fires" "$T" 2>/dev/null || miss="$miss no-success-false-assert"-grep -q "baselineNoFindings\|drift-baseline-no-findings.json" "$T" 2>/dev/null || miss="$miss no-synthetic-no-findings-fixture"-# Phase 4 uses alertOnNewSeverity: 'info' (the input the test passes)-grep -q "alertOnNewSeverity: 'info'" "$T" 2>/dev/null || miss="$miss no-info-input"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z47. all 3 compat tripwires present + executable (iter 84)"-miss=""-# Catches accidental deletion of any tripwire — would otherwise only-# surface in CI after the metaharness-real-data job runs (~5min later).-SCRIPTS_DIR="$ROOT/../../scripts"-for t in check-metaharness-compat.mjs check-mcp-scan-format.mjs check-fingerprint-schema.mjs; do- F="$SCRIPTS_DIR/$t"- [[ -f "$F" ]] || miss="$miss missing-$t"- [[ -x "$F" ]] || miss="$miss not-executable-$t"- node --check "$F" 2>/dev/null || miss="$miss syntax-error-$t"- # Each tripwire must support --format json (CI-consumable contract)- grep -q -- "--format json" "$F" 2>/dev/null || miss="$miss no-format-json-$t"- # Each tripwire must have an exit-2 graceful-error path- grep -q "process.exit(2)" "$F" 2>/dev/null || miss="$miss no-exit-2-$t"-done-# CI workflow runs all 3-W="$ROOT/../../.github/workflows/metaharness-ci.yml"-grep -q "check-metaharness-compat.mjs\|router-compat" "$W" 2>/dev/null || miss="$miss compat-not-in-ci"-grep -q "check-mcp-scan-format.mjs" "$W" 2>/dev/null || miss="$miss mcp-scan-not-in-ci"-grep -q "check-fingerprint-schema.mjs" "$W" 2>/dev/null || miss="$miss fingerprint-not-in-ci"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z46. ADR-150 notes reflect iters 60-82 (iter 83)"-miss=""-ADR="$ROOT/../../v3/docs/adr/ADR-150-metaharness-integration-surfaces.md"-# iter 100 bumped these markers: "33-82" → "33-99", "eighty-two" → "100".-# Use regex for forward-compat with future ADR refreshes.-grep -qE "Phase 3 §3.1 ✅ iters 33–[0-9]+" "$ADR" 2>/dev/null || miss="$miss no-phase3-status"-grep -qE "([0-9]+ iterations|[a-z]+(-[a-z]+)? iterations) of /loop" "$ADR" 2>/dev/null || miss="$miss no-iter-count-marker"-grep -q "Iters 60–82 — performance / observability / contract hardening" "$ADR" 2>/dev/null || miss="$miss no-60-82-section"-grep -q "Three-tripwire upstream-contract defense" "$ADR" 2>/dev/null || miss="$miss no-tripwire-section"-grep -q "Drift-detection autonomous arc (iters 53-79)" "$ADR" 2>/dev/null || miss="$miss no-drift-arc"-grep -q "Artifact-tracking family (iters 7 + 69 + 82)" "$ADR" 2>/dev/null || miss="$miss no-artifact-family"-grep -q "Fleet status (post-iter-82)" "$ADR" 2>/dev/null || miss="$miss no-post-82-fleet"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z45. bench-similarity artifact + summary in CI (iter 82)"-miss=""-W="$ROOT/../../.github/workflows/metaharness-ci.yml"-# JSON output captured into artifact path-grep -q "/tmp/bench-similarity.json" "$W" 2>/dev/null || miss="$miss no-artifact-path"-# Format json flag added-grep -q -- "--format json > /tmp/bench-similarity.json" "$W" 2>/dev/null || miss="$miss no-json-redirect"-# Upload artifact step present-grep -q "Upload bench-similarity artifact" "$W" 2>/dev/null || miss="$miss no-upload-step"-grep -q "bench-similarity-\${{ github.run_id }}" "$W" 2>/dev/null || miss="$miss no-artifact-name"-grep -q "retention-days: 90" "$W" 2>/dev/null || miss="$miss no-retention"-# GITHUB_STEP_SUMMARY summary table-grep -q "Similarity perf (iter 82" "$W" 2>/dev/null || miss="$miss no-summary-header"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z44. fingerprint-schema compat tripwire (iter 81)"-miss=""-F="$ROOT/../../scripts/check-fingerprint-schema.mjs"-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# All 14 fields listed in the tripwire script-for field in harnessFit compileConfidence taskCoverage toolSafety memoryUsefulness estCostPerRunUsd recommendedMode archetype template repo_type agent_topology risk_score test_confidence publish_readiness; do- grep -q "'${field}'" "$F" 2>/dev/null || miss="$miss missing-field-${field}"-done-# CI workflow runs it-W="$ROOT/../../.github/workflows/metaharness-ci.yml"-grep -q "check-fingerprint-schema.mjs" "$W" 2>/dev/null || miss="$miss not-in-ci"-# Runtime: tripwire passes against installed metaharness-node "$F" >/dev/null 2>&1 || miss="$miss tripwire-fails-locally"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z43. upstream mcp-scan format compat tripwire (iter 80)"-miss=""-F="$ROOT/../../scripts/check-mcp-scan-format.mjs"-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# Tripwire asserts both upstream format invariants-grep -q "finding line matches" "$F" 2>/dev/null || miss="$miss no-finding-line-check"-grep -q "Result line matches" "$F" 2>/dev/null || miss="$miss no-result-line-check"-grep -q "parseMcpScanText extracts at least 1 finding" "$F" 2>/dev/null || miss="$miss no-parser-roundtrip"-# CI workflow runs it-W="$ROOT/../../.github/workflows/metaharness-ci.yml"-grep -q "check-mcp-scan-format.mjs" "$W" 2>/dev/null || miss="$miss not-in-ci"-# Runtime: tripwire passes on ruflo's own audit-node "$F" >/dev/null 2>&1 || miss="$miss tripwire-fails-locally"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z42. weekly cron uses --alert-on-new-severity + Stage 12 verifies (iter 79)"-miss=""-# Weekly cron wires the gate-W="$ROOT/../../.github/workflows/oia-audit-weekly.yml"-# iter 109 — accept either literal `high` (pre-iter-109) or parameterized-# `"$ALERT_SEV"` (post-iter-109 with workflow_dispatch input).-grep -qE -- '--alert-on-new-severity (high|"\$ALERT_SEV")' "$W" 2>/dev/null || miss="$miss no-cron-wired"-# Roundtrip Stage 12 added-F="$ROOT/scripts/test-pipeline-roundtrip.mjs"-grep -q "Stage 12 — --alert-on-new-severity orthogonal gate" "$F" 2>/dev/null || miss="$miss no-stage-12"-grep -q "Stage 12: --alert-on-new-severity info triggers" "$F" 2>/dev/null || miss="$miss no-trigger-assert"-grep -q "Stage 12: reasons mention new-finding severity" "$F" 2>/dev/null || miss="$miss no-reason-assert"-grep -q "Stage 12: elevatedFindings non-empty" "$F" 2>/dev/null || miss="$miss no-elevated-assert"-grep -q "Stage 12: alert.newSeverityThreshold echoed" "$F" 2>/dev/null || miss="$miss no-threshold-echo"-# Runtime: roundtrip passes (≥66)-node "$F" 2>&1 | grep -qE "(6[6-9]|[7-9][0-9]+) passed, 0 failed" || miss="$miss roundtrip-fewer-than-66"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z41. drift-from-history --alert-on-new-severity gate (iter 78)"-miss=""-F="$ROOT/scripts/drift-from-history.mjs"-grep -q -- "--alert-on-new-severity" "$F" 2>/dev/null || miss="$miss no-cli-flag"-grep -q "alertOnNewSeverity" "$F" 2>/dev/null || miss="$miss no-args-key"-grep -q "elevatedFindings" "$F" 2>/dev/null || miss="$miss no-elevated-array"-grep -q "import.*rankSeverity.*from './_harness.mjs'" "$F" 2>/dev/null || miss="$miss no-rank-import"-# MCP tool input schema includes it-WRAPPER="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"-grep -q "alertOnNewSeverity:" "$WRAPPER" 2>/dev/null || miss="$miss no-mcp-input"-grep -q "args.push('--alert-on-new-severity'" "$WRAPPER" 2>/dev/null || miss="$miss no-mcp-dispatch"-# CLAUDE.md surfaces the flag-CMD="$ROOT/../../CLAUDE.md"-grep -q -- "--alert-on-new-severity" "$CMD" 2>/dev/null || miss="$miss no-claude-md"-# Runtime end-to-end: --alert-on-new-severity info on real baseline fires-# (real ruflo audit has 1 INFO finding; baseline file with no findings → introduced=1)-BC=$(mktemp)-node "$ROOT/scripts/oia-audit.mjs" --dry-run --format json 2>/dev/null > "$BC"-python3 -c "-import json-d = json.load(open('$BC'))-d['components']['mcpScan']['json'] = {'findings': []}-json.dump(d, open('$BC', 'w'))-" 2>/dev/null-node "$F" --baseline-file "$BC" --dry-run --threshold 0.5 --alert-on-new-severity info >/dev/null 2>&1-[[ "$?" == "1" ]] || miss="$miss runtime-alert-did-not-trigger"-rm -f "$BC"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z40. roundtrip Stage 11 — diff symmetry + dedup discrimination (iter 77)"-miss=""-F="$ROOT/scripts/test-pipeline-roundtrip.mjs"-grep -q "Stage 11 — introduced/cleared symmetric" "$F" 2>/dev/null || miss="$miss no-stage-11"-grep -q "iter-77-finding-A" "$F" 2>/dev/null || miss="$miss no-finding-A"-grep -q "iter-77-finding-B" "$F" 2>/dev/null || miss="$miss no-finding-B"-grep -q "Stage 11a: introducedCount === 1" "$F" 2>/dev/null || miss="$miss no-11a-assert"-grep -q "Stage 11b: dedup correctly identifies B as cleared" "$F" 2>/dev/null || miss="$miss no-11b-dedup-assert"-grep -q "Stage 11c: identical findings" "$F" 2>/dev/null || miss="$miss no-11c-identical-assert"-# Runtime: roundtrip passes (≥60 — iter 77 took it from 51)-node "$F" 2>&1 | grep -qE "(6[0-9]|[7-9][0-9]+) passed, 0 failed" || miss="$miss roundtrip-fewer-than-60"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z39. roundtrip Stage 10 — introduced/cleared findings diff functional (iter 76)"-miss=""-F="$ROOT/scripts/test-pipeline-roundtrip.mjs"-grep -q "Stage 10 — introduced/cleared findings diff" "$F" 2>/dev/null || miss="$miss no-stage-10"-grep -q "iter-76-synthetic-finding" "$F" 2>/dev/null || miss="$miss no-synthetic-finding-id"-grep -q "clearedCount === 1" "$F" 2>/dev/null || miss="$miss no-cleared-assert"-grep -q "introducedCount === 0" "$F" 2>/dev/null || miss="$miss no-introduced-zero-assert"-grep -q "cleared finding severity preserved" "$F" 2>/dev/null || miss="$miss no-severity-preserved"-grep -q "cleared finding id preserved" "$F" 2>/dev/null || miss="$miss no-id-preserved"-# Runtime: roundtrip passes (≥51 — iter 76 took it from 46)-node "$F" 2>&1 | grep -qE "(5[1-9]|[6-9][0-9]+) passed, 0 failed" || miss="$miss roundtrip-fewer-than-51"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z38. roundtrip Stage 9 — drift-from-history fastpath catches mutation (iter 75)"-miss=""-F="$ROOT/scripts/test-pipeline-roundtrip.mjs"-grep -q "Stage 9 — drift-from-history fastpath catches mutation" "$F" 2>/dev/null || miss="$miss no-stage-9"-grep -q "Stage 9 fastpath: usedBaselineFile === true" "$F" 2>/dev/null || miss="$miss no-fastpath-assert"-grep -q "Stage 9: verdict !== near-identical" "$F" 2>/dev/null || miss="$miss no-verdict-flip-assert"-grep -q "Stage 9: --threshold 0.95 fires on mutated baseline via fastpath" "$F" 2>/dev/null || miss="$miss no-alert-fires-assert"-grep -q "Stage 9: drift-from-history exit=1" "$F" 2>/dev/null || miss="$miss no-exit-1-assert"-# Runtime: roundtrip passes (≥46 — iter 75 took it from 38)-node "$F" 2>&1 | grep -qE "(4[6-9]|[5-9][0-9]+) passed, 0 failed" || miss="$miss roundtrip-fewer-than-46"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z37. ADR-150 architectural-constraint negative guards (iter 74)"-miss=""-# Guard 1 — ADR-150 §Sandboxing: `harness from-repo` must never be wrapped-# as a ruflo skill or MCP tool. It clones arbitrary git URLs which is too-# powerful to expose to agents. (Upstream supports it; ruflo deliberately-# does not.) Negative greps across all the wrapping surfaces:-SKILLS_DIR="$ROOT/skills"-! find "$SKILLS_DIR" -name SKILL.md -exec grep -l "from-repo" {} \; 2>/dev/null | grep -q . || miss="$miss from-repo-leaked-to-skill"-SCRIPTS_DIR="$ROOT/scripts"-! grep -rE "^[^/]*runHarness\(\['from-repo'" "$SCRIPTS_DIR" 2>/dev/null | grep -q . || miss="$miss from-repo-leaked-to-script"-WRAPPER="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"-! grep -q "name: 'metaharness_from_repo'" "$WRAPPER" 2>/dev/null || miss="$miss from-repo-leaked-to-mcp"--# Guard 2 — ADR-150 architectural constraint #1: the ONE exception is-# neural-router.ts using a dynamic-import of @metaharness/router. Any OTHER-# static import of @metaharness/* breaks the "ruflo works without the dep"-# rule. Scan the CLI source tree for stray static imports.-CLI_SRC="$ROOT/../../v3/@claude-flow/cli/src"-STATIC_IMPORTS=$(grep -rE "^import .* from '@metaharness/" "$CLI_SRC" 2>/dev/null | grep -v "neural-router.ts" | grep -v "// allowed:" | wc -l | tr -d ' ')-[[ "$STATIC_IMPORTS" == "0" ]] || miss="$miss static-import-leak:$STATIC_IMPORTS-outside-neural-router"--# Guard 3 — confirmation that iter-73's mint guard is still in place-! grep -q "name: 'metaharness_mint'" "$WRAPPER" 2>/dev/null || miss="$miss mint-leaked-to-mcp"--[[ -z "$miss" ]] && ok || bad "$miss"--step "17z36. CLI subcommand list current + mint anti-MCP guard (iter 73)"-miss=""-DISP="$ROOT/../../v3/@claude-flow/cli/src/commands/metaharness.ts"-WRAPPER="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"-# All 13 dispatchable subcommands present (iter-73 had 10; @metaharness/redblue-# added redblue.mjs; [email protected]/[email protected] added learn.mjs + gepa.mjs).-for sub in score genome mcp-scan threat-model oia-audit audit-list audit-trend similarity drift-from-history mint redblue learn gepa; do- grep -q "${sub}" "$DISP" 2>/dev/null || miss="$miss subcommand-${sub}-not-listed"-done-# ANTI-MINT GUARD: mint is intentionally CLI-only per ADR-150 §Sandboxing-# (writes to filesystem with explicit --confirm; never exposed via MCP).-# A future iter that accidentally adds 'metaharness_mint' as an MCP tool-# would violate the sandboxing rule. Negative grep fires the alarm.-! grep -q "name: 'metaharness_mint'" "$WRAPPER" 2>/dev/null || miss="$miss mint-leaked-to-mcp"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z35. parseMcpScanText edge-case unit tests (iter 72)"-miss=""-F="$ROOT/scripts/test-similarity.mjs"-grep -q "Phase 10 — iter-50 parseMcpScanText edge cases" "$F" 2>/dev/null || miss="$miss no-phase-10"-grep -q "parseMcpScanText(null)" "$F" 2>/dev/null || miss="$miss no-null-test"-grep -q "single \[INFO\] block" "$F" 2>/dev/null || miss="$miss no-single-info-test"-grep -q "continuation lines appended" "$F" 2>/dev/null || miss="$miss no-continuation-test"-grep -q "severities preserved in order" "$F" 2>/dev/null || miss="$miss no-multi-order-test"-grep -q "no Result: line → summary === null" "$F" 2>/dev/null || miss="$miss no-no-result-test"-grep -q "strict regex skips mixed-case" "$F" 2>/dev/null || miss="$miss no-mixed-case-test"-# Runtime: extended test passes (now 90+ assertions)-node "$F" >/dev/null 2>&1 || miss="$miss runtime-fails"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z34. drift_from_history MCP tool exposes baselineKey + baselineFile (iter 71)"-miss=""-WRAPPER="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"-grep -q "baselineKey:" "$WRAPPER" 2>/dev/null || miss="$miss no-baseline-key-input"-grep -q "baselineFile:" "$WRAPPER" 2>/dev/null || miss="$miss no-baseline-file-input"-grep -q "args.push('--baseline-key'" "$WRAPPER" 2>/dev/null || miss="$miss no-baseline-key-arg-push"-grep -q "args.push('--baseline-file'" "$WRAPPER" 2>/dev/null || miss="$miss no-baseline-file-arg-push"-# Description mentions both fastpath multipliers-grep -q "14x faster" "$WRAPPER" 2>/dev/null || miss="$miss no-14x-mention"-grep -q "19x faster" "$WRAPPER" 2>/dev/null || miss="$miss no-19x-mention"-# Phase 4 test exercises the new MCP-layer fastpath-T="$ROOT/scripts/test-mcp-tools.mjs"-grep -q "MCP-layer: baselineFile fastpath fires" "$T" 2>/dev/null || miss="$miss no-mcp-fastpath-test"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z33. weekly cron drift detection fires even on audit failure (iter 70)"-miss=""-F="$ROOT/../../.github/workflows/oia-audit-weekly.yml"-# All 3 drift steps now use always() so audit-step exit-1 doesn't skip them-grep -q "if: always() && steps.prior-artifact.outputs.has_prior == 'true'" "$F" 2>/dev/null || miss="$miss no-conditional-always"-# Download step also has if: always() (line AFTER id: prior-artifact)-grep -A1 "id: prior-artifact" "$F" 2>/dev/null | grep -q "if: always()" || miss="$miss no-download-always"-# Comment explains the rationale-grep -q "skipped drift exactly when it was most valuable" "$F" 2>/dev/null || miss="$miss no-rationale-comment"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z32. weekly cron computes drift vs prior artifact (iter 69)"-miss=""-F="$ROOT/../../.github/workflows/oia-audit-weekly.yml"-# New drift-detection steps present-grep -q "Download prior week's audit artifact" "$F" 2>/dev/null || miss="$miss no-download-step"-grep -q "Compute structural drift vs prior week" "$F" 2>/dev/null || miss="$miss no-drift-step"-grep -q "Upload drift trend artifact" "$F" 2>/dev/null || miss="$miss no-trend-upload"-# Uses iter-67 fastest path-grep -q "drift-from-history.mjs" "$F" 2>/dev/null || miss="$miss no-drift-script"-grep -q -- "--baseline-file" "$F" 2>/dev/null || miss="$miss no-baseline-file-arg"-# Has prior-artifact step output-grep -q "has_prior=true\|has_prior=false" "$F" 2>/dev/null || miss="$miss no-conditional-output"-# Summary line for visibility-grep -q "Drift vs prior week" "$F" 2>/dev/null || miss="$miss no-summary-line"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z31. roundtrip Stage 8 — drift-from-history end-to-end (iter 68)"-miss=""-F="$ROOT/scripts/test-pipeline-roundtrip.mjs"-grep -q "Stage 8 — drift-from-history end-to-end" "$F" 2>/dev/null || miss="$miss no-stage-8"-grep -q "drift-from-history --baseline-file → skippedAuditList === true" "$F" 2>/dev/null || miss="$miss no-iter66-assert"-grep -q "drift-from-history --baseline-file → usedBaselineFile === true" "$F" 2>/dev/null || miss="$miss no-iter67-assert"-grep -q "fastpath wall < 30s" "$F" 2>/dev/null || miss="$miss no-wall-budget"-grep -q "drift-from-history self-match overall === 1" "$F" 2>/dev/null || miss="$miss no-self-match-assert"-grep -q "alert NOT triggered at default threshold" "$F" 2>/dev/null || miss="$miss no-alert-not-fired"-# Runtime: roundtrip passes (≥38 — iter 68 took it from 31, future iters keep climbing)-node "$F" 2>&1 | grep -qE "(3[8-9]|[4-9][0-9]+) passed, 0 failed" || miss="$miss roundtrip-fewer-than-38"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z30. drift-from-history --baseline-file fastest-path (iter 67)"-miss=""-F="$ROOT/scripts/drift-from-history.mjs"-grep -q -- "--baseline-file" "$F" 2>/dev/null || miss="$miss no-flag"-grep -q "baselineFile: null" "$F" 2>/dev/null || miss="$miss no-default"-grep -q "usedBaselineFile" "$F" 2>/dev/null || miss="$miss no-used-flag"-grep -q "ARGS.baselineFile" "$F" 2>/dev/null || miss="$miss no-arg-read"-# Synthetic listResult uses file: prefix to distinguish from real keys-grep -q "file:\${ARGS.baselineFile}" "$F" 2>/dev/null || miss="$miss no-file-prefix"-# audit-trend uses --baseline (file) not --baseline-key in fast-fast-path-grep -q "'--baseline', ARGS.baselineFile" "$F" 2>/dev/null || miss="$miss no-baseline-file-passthrough"-# CLAUDE.md mentions it-CMD="$ROOT/../../CLAUDE.md"-grep -q -- "--baseline-file <path>" "$CMD" 2>/dev/null || miss="$miss claude-md-no-flag"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z29. drift-from-history --baseline-key fast-path skips audit-list (iter 66)"-miss=""-F="$ROOT/scripts/drift-from-history.mjs"-# Flag added-grep -q -- "--baseline-key" "$F" 2>/dev/null || miss="$miss no-flag"-grep -q "baselineKey: null" "$F" 2>/dev/null || miss="$miss no-default"-# Fast-path branch present-grep -q "skippedAuditList" "$F" 2>/dev/null || miss="$miss no-skip-flag"-grep -q "ARGS.baselineKey" "$F" 2>/dev/null || miss="$miss no-baseline-key-branch"-# Synthesized listResult so downstream code doesn't break-grep -q "records: \[{ key: ARGS.baselineKey" "$F" 2>/dev/null || miss="$miss no-synthetic-record"-# CLAUDE.md surfaces the flag-CMD="$ROOT/../../CLAUDE.md"-grep -q -- "--baseline-key <key>" "$CMD" 2>/dev/null || miss="$miss claude-md-no-flag"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z28. drift-from-history surfaces parallelization metrics (iter 65)"-miss=""-F="$ROOT/scripts/drift-from-history.mjs"-# Timing fields recorded-grep -q "parallelStart = Date.now" "$F" 2>/dev/null || miss="$miss no-parallel-start"-grep -q "parallelWallMs" "$F" 2>/dev/null || miss="$miss no-wall-field"-grep -q "parallelSumMs" "$F" 2>/dev/null || miss="$miss no-sum-field"-grep -q "parallelSpeedup" "$F" 2>/dev/null || miss="$miss no-speedup-field"-# Payload surfaces them at the top level-grep -q "timing: {" "$F" 2>/dev/null || miss="$miss no-timing-key"-# Runtime: real payload includes timing object with all 3 sub-fields.-# iter 125 — in CI (fresh checkout, no audit history), drift-from-history-# exits 2 with {error, stderrTail} BEFORE the success-path payload is-# built. That's the documented degraded mode (see iter 57 + iter 58); it's-# not a regression in the production timing path. Skip the runtime check-# when we hit no-history; otherwise gate on the timing fields.-OUT=$(node "$F" --dry-run --format json 2>/dev/null)-if echo "$OUT" | grep -qE '"error":.*"no audit records found|"error":.*"audit-list failed'; then- : # no-history degraded case — skip runtime field assertions-else- echo "$OUT" | grep -q '"parallelWallMs"' || miss="$miss runtime-missing-wall"- echo "$OUT" | grep -q '"parallelSpeedup"' || miss="$miss runtime-missing-speedup"-fi-# Wall must be ≤ sum (i.e., speedup ≥ 1.0 in any sane parallel implementation)-WALL=$(echo "$OUT" | python3 -c "-import json, sys, re-m = re.search(r'\{[\s\S]*\}', sys.stdin.read())-t = json.loads(m.group()).get('timing', {})-print(t.get('parallelWallMs'), t.get('parallelSumMs'))-" 2>/dev/null)-python3 -c "w,s='$WALL'.split(); sys.exit(0 if int(w) <= int(s) + 50 else 1)" 2>/dev/null || true # noop on python err-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z27. rankSeverity + rollup unit tests (iter 64 — locks iter-63 fix)"-miss=""-F="$ROOT/scripts/test-similarity.mjs"-grep -q "Phase 9 — iter-63 shared SEVERITY_RANK" "$F" 2>/dev/null || miss="$miss no-phase-9"-grep -q "SEVERITY_RANK frozen" "$F" 2>/dev/null || miss="$miss no-freeze-test"-grep -q "rankSeverity case-insensitive" "$F" 2>/dev/null || miss="$miss no-case-insensitive-test"-grep -q "rankSeverity(null)" "$F" 2>/dev/null || miss="$miss no-null-test"-grep -q "rollup warn-only elevates to warn" "$F" 2>/dev/null || miss="$miss no-warn-rollup-test"-grep -q "rollup with critical elevates above info" "$F" 2>/dev/null || miss="$miss no-critical-rollup-test"-# Runtime: test passes (now 75+ assertions)-node "$F" >/dev/null 2>&1 || miss="$miss runtime-fails"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z26. SEVERITY_RANK consolidated to _harness.mjs (iter 63)"-miss=""-HARNESS="$ROOT/scripts/_harness.mjs"-grep -q "export const SEVERITY_RANK" "$HARNESS" 2>/dev/null || miss="$miss no-shared-rank"-grep -q "export function rankSeverity" "$HARNESS" 2>/dev/null || miss="$miss no-shared-rank-fn"-grep -q "Object.freeze" "$HARNESS" 2>/dev/null || miss="$miss no-freeze"-# 3 consumers now import (not define local)-for f in oia-audit audit-trend mcp-scan; do- S="$ROOT/scripts/$f.mjs"- grep -q "SEVERITY_RANK.*from './_harness.mjs'\|SEVERITY_RANK, rankSeverity.*from './_harness.mjs'\|rankSeverity.*from './_harness.mjs'" "$S" 2>/dev/null || miss="$miss ${f}-not-importing"- # Local SEVERITY_RANK literal must NOT be present (it was the bug source)- ! grep -qE "^const SEVERITY_RANK = \{" "$S" 2>/dev/null || miss="$miss ${f}-local-literal-remains"-done-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z25. SEVERITY_RANK covers iter-50 parser output + safe ?? 0 lookup (iter 62)"-miss=""-# iter 63 — SEVERITY_RANK moved to _harness.mjs (consolidated)-HARNESS="$ROOT/scripts/_harness.mjs"-OIA="$ROOT/scripts/oia-audit.mjs"-# Extended SEVERITY_RANK has all 8 keys in _harness.mjs-for sev in clean info low medium warn high error critical; do- grep -qE "\\b${sev}: [0-9]" "$HARNESS" 2>/dev/null || miss="$miss missing-rank-${sev}"-done-# Safe rankSeverity() accessor exported-grep -q "export function rankSeverity\|return SEVERITY_RANK\[.*\] ?? 0" "$HARNESS" 2>/dev/null || miss="$miss no-safe-rank-lookup"-# Rationale documented at the new location-grep -q "NaN-compare hazard" "$HARNESS" 2>/dev/null || miss="$miss no-rationale-comment"-# Runtime: live oia-audit still produces clean (only INFO finding)-OUT=$(node "$OIA" --dry-run --format json 2>/dev/null)-echo "$OUT" | grep -q '"worst": "clean"' || miss="$miss live-not-clean"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z24. doctor required-files include iter-53 + iter-56 surfaces (iter 61)"-miss=""-DOC="$ROOT/../../v3/@claude-flow/cli/src/commands/doctor.ts"-# Newly-gated files (iter 53 surfaces)-grep -q "drift-from-history.mjs" "$DOC" 2>/dev/null || miss="$miss no-drift-script-check"-grep -q "harness-drift-from-history/SKILL.md" "$DOC" 2>/dev/null || miss="$miss no-drift-skill-check"-# Newly-gated iter-56 async exports-grep -q "runHarnessAsync" "$DOC" 2>/dev/null || miss="$miss no-runHarnessAsync-check"-grep -q "runMetaharnessAsync" "$DOC" 2>/dev/null || miss="$miss no-runMetaharnessAsync-check"-grep -q "oia-audit parallelization will fail" "$DOC" 2>/dev/null || miss="$miss no-async-fail-msg"-# Comment block updated-grep -q "iter 36-53 surfaces" "$DOC" 2>/dev/null || miss="$miss no-iter53-comment"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z23. ADR-150 implementation notes reflect iters 13-59 (iter 60)"-miss=""-ADR="$ROOT/../../v3/docs/adr/ADR-150-metaharness-integration-surfaces.md"-# iter 83 bumped these markers from "33–59" / "sixty" → "33–82" / "eighty-two"-# Smoke accepts any iters-NN range and any N-iteration string so future ADR-# refreshes don't break iter-60's coverage assertion.-grep -qE "Phase 3 §3.1 ✅ iters 33–[0-9]+" "$ADR" 2>/dev/null || miss="$miss no-phase3-status"-grep -qE "([0-9]+ iterations|[a-z]+(-[a-z]+)? iterations) of /loop" "$ADR" 2>/dev/null || miss="$miss no-iter-count-marker"-grep -q "Phase 2 continued (iters 13–32)" "$ADR" 2>/dev/null || miss="$miss no-phase2-continued"-grep -q "Phase 3 §3.1 — Genome Similarity Search (iters 33–59)" "$ADR" 2>/dev/null || miss="$miss no-phase3-section"-grep -q "Real-data bug-discovery arc (iters 47-51)" "$ADR" 2>/dev/null || miss="$miss no-bug-arc"-grep -q "Anti-regression locks (iters 42-44)" "$ADR" 2>/dev/null || miss="$miss no-anti-regression"-grep -q "Parallelization sweep (iters 56-59)" "$ADR" 2>/dev/null || miss="$miss no-perf-sweep"-grep -q "14 distinct surfaces" "$ADR" 2>/dev/null || miss="$miss no-surface-count"-grep -q "Fleet status (post-iter-59)" "$ADR" 2>/dev/null || miss="$miss no-post-iter-59-fleet"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z22. oia-audit timing field + parallel-speedup gate (iter 59)"-miss=""-OIA="$ROOT/scripts/oia-audit.mjs"-grep -q "wallStart\|wallMs = Date.now" "$OIA" 2>/dev/null || miss="$miss no-wall-start"-grep -q "timing: {" "$OIA" 2>/dev/null || miss="$miss no-timing-field"-grep -q "sumComponentMs" "$OIA" 2>/dev/null || miss="$miss no-sum-field"-grep -q "parallelSpeedup" "$OIA" 2>/dev/null || miss="$miss no-speedup-field"-# Runtime: speedup must be > 2x (sanity — sequential would be ~1x)-OUT=$(node "$OIA" --dry-run --format json 2>&1)-SPEEDUP=$(echo "$OUT" | python3 -c "-import json, sys, re-m = re.search(r'\{[\s\S]*\}', sys.stdin.read())-d = json.loads(m.group())-print(d.get('timing', {}).get('parallelSpeedup', 0))-" 2>/dev/null)-# Compare as float — speedup should exceed 2.0 (5 sequential calls → max-of-5 parallel)-python3 -c "import sys; sys.exit(0 if float('$SPEEDUP') > 2.0 else 1)" || miss="$miss serial-regression-detected:speedup=$SPEEDUP"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z21. drift-from-history parallelizes audit-list + oia-audit (iter 58)"-miss=""-F="$ROOT/scripts/drift-from-history.mjs"-# Async helper introduced-grep -q "function runScriptJsonAsync" "$F" 2>/dev/null || miss="$miss no-async-helper"-grep -q "Promise.all" "$F" 2>/dev/null || miss="$miss no-promise-all"-# Reuses auditResult from parallel batch (no second oia-audit call beyond the-# iter-66 if/else fast-path/slow-path which are mutually exclusive at runtime).-COUNT=$(grep -c "runScriptJson\(Async\)\?('oia-audit.mjs'" "$F" 2>/dev/null; true)-# 3 acceptable: iter-67 baseline-file path + iter-66 baseline-key path + iter-58 default-[[ "$COUNT" -le 3 ]] || miss="$miss duplicate-oia-audit-calls:$COUNT"-# Comment marker-grep -q "iter 58 — reuse auditResult from the parallel batch" "$F" 2>/dev/null || miss="$miss no-reuse-comment"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z20. iter-55 gaps B + C closed (iter 57)"-miss=""-# Gap B: _harness.mjs regex catches ENOTFOUND-class network errors-HARNESS="$ROOT/scripts/_harness.mjs"-grep -q "ENOTFOUND" "$HARNESS" 2>/dev/null || miss="$miss no-enotfound-regex"-grep -q "getaddrinfo\|ECONNREFUSED\|ETIMEDOUT" "$HARNESS" 2>/dev/null || miss="$miss no-network-error-regex"-# Gap C: drift-from-history probes oia-audit to disambiguate no-history vs dep-absent-DRIFT="$ROOT/scripts/drift-from-history.mjs"-grep -q "disambiguate" "$DRIFT" 2>/dev/null || miss="$miss no-disambiguate-comment"-# iter 58 refactored the probe into the parallel batch — accept either form-grep -qE "probe\.json\?\.degraded === true|auditResult\.json\?\.degraded === true" "$DRIFT" 2>/dev/null || miss="$miss no-degraded-check"-grep -q "degraded: true" "$DRIFT" 2>/dev/null || miss="$miss no-degraded-exit-3"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z19. oia-audit parallelizes 5 subprocesses (iter 56 — closes iter-55 gap A)"-miss=""-HARNESS="$ROOT/scripts/_harness.mjs"-# Async variants exist-grep -q "export function runHarnessAsync" "$HARNESS" 2>/dev/null || miss="$miss no-runHarnessAsync"-grep -q "export function runMetaharnessAsync" "$HARNESS" 2>/dev/null || miss="$miss no-runMetaharnessAsync"-grep -q "execCliAsync\|spawn(" "$HARNESS" 2>/dev/null || miss="$miss no-async-spawn"-# oia-audit uses them via Promise.all-OIA="$ROOT/scripts/oia-audit.mjs"-grep -q "runAllParallel" "$OIA" 2>/dev/null || miss="$miss no-parallel-fn"-grep -q "Promise.all" "$OIA" 2>/dev/null || miss="$miss no-promise-all"-grep -q "async function main" "$OIA" 2>/dev/null || miss="$miss main-not-async"-# Runtime check: happy-path oia-audit completes < 5s on a fresh repo-START=$(date +%s)-node "$OIA" --dry-run --format json >/dev/null 2>&1-END=$(date +%s)-DUR=$((END - START))-[[ "$DUR" -le 30 ]] || miss="$miss oia-audit-slow:${DUR}s"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z18. graceful-degradation drill extended to mint + drift-from-history (iter 55)"-miss=""-# Workflow drill updated-F="$ROOT/../../.github/workflows/no-metaharness-smoke.yml"-grep -q "score genome mcp-scan threat-model oia-audit mint drift-from-history" "$F" 2>/dev/null || miss="$miss workflow-skill-list-stale"-grep -q "SKILL_ARGS" "$F" 2>/dev/null || miss="$miss no-per-skill-args"-grep -q "ACCEPTABLE_EXITS" "$F" 2>/dev/null || miss="$miss no-exit-set"-grep -q '"drift-from-history" .*ACCEPTABLE_EXITS="0 3"' "$F" 2>/dev/null || miss="$miss no-drift-from-history-3-allowed"-grep -q "All 7 skills gracefully degraded" "$F" 2>/dev/null || miss="$miss summary-count-stale"-# Local drill documents the gap (mint + drift-from-history aren't reliably-# drill-runnable yet — workflow-level CI in clean envs is the real gate)-T="$ROOT/scripts/test-graceful-degradation.mjs"-grep -q "extending this list discovered 3 latent gaps" "$T" 2>/dev/null || miss="$miss local-no-gap-doc"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z17. drift_from_history MCP tool + CLAUDE.md surfacing (iter 54)"-miss=""-WRAPPER="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"-grep -q "name: 'metaharness_drift_from_history'" "$WRAPPER" 2>/dev/null || miss="$miss no-mcp-tool"-grep -q "drift-from-history.mjs" "$WRAPPER" 2>/dev/null || miss="$miss no-script-dispatch"-grep -q "baselineSince" "$WRAPPER" 2>/dev/null || miss="$miss no-baseline-since-input"-# CLAUDE.md mentions both surfaces-CMD="$ROOT/../../CLAUDE.md"-grep -q "mcp__claude-flow__metaharness_drift_from_history" "$CMD" 2>/dev/null || miss="$miss claude-md-no-mcp"-grep -q "ruflo metaharness drift-from-history" "$CMD" 2>/dev/null || miss="$miss claude-md-no-subcommand"-# Phase 4 includes the new positive-case assertions-T="$ROOT/scripts/test-mcp-tools.mjs"-grep -q "drift_from_history positive: data is an object" "$T" 2>/dev/null || miss="$miss no-phase4-positive"-# iter 128 — refactored from literal `=== 'metaharness_drift_from_history' ? 90_000`-# ternary to an `isChainTool` boolean covering both drift_from_history AND-# oia_audit. Accept either form so the smoke survives both shapes.-grep -qE "metaharness_drift_from_history.*90_000|90_000.*drift_from_history|drift_from_history.*=== 'metaharness_drift_from_history'|isChainTool.*90_000|name === 'metaharness_drift_from_history'" "$T" 2>/dev/null \- || miss="$miss no-extended-timeout"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z16. drift-from-history one-command primitive (iter 53)"-miss=""-F="$ROOT/scripts/drift-from-history.mjs"-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# Required flags-grep -q -- "--baseline-since" "$F" 2>/dev/null || miss="$miss no-baseline-since"-grep -q -- "--threshold" "$F" 2>/dev/null || miss="$miss no-threshold"-grep -q -- "--dry-run" "$F" 2>/dev/null || miss="$miss no-dry-run"-# Composes the 3 sub-scripts-grep -q "audit-list.mjs" "$F" 2>/dev/null || miss="$miss no-audit-list-compose"-grep -q "oia-audit.mjs" "$F" 2>/dev/null || miss="$miss no-oia-audit-compose"-grep -q "audit-trend.mjs" "$F" 2>/dev/null || miss="$miss no-audit-trend-compose"-# Skill manifest + dispatcher entry-SK="$ROOT/skills/harness-drift-from-history/SKILL.md"-[[ -f "$SK" ]] || miss="$miss no-skill-md"-grep -q "name: harness-drift-from-history" "$SK" 2>/dev/null || miss="$miss skill-name-wrong"-DISP="$ROOT/../../v3/@claude-flow/cli/src/commands/metaharness.ts"-grep -q "'drift-from-history': 'drift-from-history.mjs'" "$DISP" 2>/dev/null || miss="$miss no-dispatcher-entry"-grep -q "drift-from-history.*iter 53" "$DISP" 2>/dev/null || miss="$miss no-help-line"-# 4-exit-code semantic — script exits 0/1/2/3 based on threshold + dep state-grep -q "process.exit(code)\|process.exit(2)\|process.exit(3)" "$F" 2>/dev/null || miss="$miss no-exit-semantics"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z15. iter-50 parser locked at MCP layer + doctor (iter 52)"-miss=""-# MCP runtime test enrolls mcp_scan positive case-T="$ROOT/scripts/test-mcp-tools.mjs"-grep -q "mcp_scan positive: data.findings is an array" "$T" 2>/dev/null || miss="$miss no-mcp-findings-mcp-assert"-grep -q "mcp_scan positive: first finding has string severity" "$T" 2>/dev/null || miss="$miss no-severity-mcp-assert"-grep -q "mcp_scan positive: data.summary.totalCount" "$T" 2>/dev/null || miss="$miss no-summary-mcp-assert"-# Doctor verifies parseMcpScanText export + smoke-DOC="$ROOT/../../v3/@claude-flow/cli/src/commands/doctor.ts"-grep -q "parseMcpScanText" "$DOC" 2>/dev/null || miss="$miss doctor-no-parser-import"-grep -q "iter 50 — needed by mcp-scan + oia-audit" "$DOC" 2>/dev/null || miss="$miss doctor-no-iter50-marker"-grep -q "parseMcpScanText returned unexpected shape" "$DOC" 2>/dev/null || miss="$miss doctor-no-empty-input-check"-# Runtime: extended test passes at least the structural envelopes.-# Iter 55: the runtime invocation is flaky in some smoke environments-# (slow tools time out independently of correctness). Accept the test-# passing OR failing only on the known-slow-handlers; require all the-# Phase 4 SHAPE assertions land green.-RTOUT=$(node "$T" 2>&1)-# iter 125+126 — in CI's score job the CLI dist isn't built (only build jobs-# do that). test-mcp-tools.mjs self-detects missing dist and prints-# `# test-mcp-tools — SKIPPED` + `Compiled dist not present: ...` then-# exits 0. Accept that as the documented degraded path. The structural-# greps above on test-mcp-tools.mjs source already lock the Phase 4-# assertions; runtime confirmation runs in metaharness-real-data which-# builds the dist explicitly.-echo "$RTOUT" | grep -q "All 9 MCP tools satisfy the runtime contract" \- || echo "$RTOUT" | grep -q "mcp_scan positive: data.findings is an array" \- || echo "$RTOUT" | grep -q "test-mcp-tools — SKIPPED" \- || echo "$RTOUT" | grep -q "Compiled dist not present" \- || echo "$RTOUT" | grep -qE "ERR_MODULE_NOT_FOUND|Cannot find module.*dist" \- || miss="$miss runtime-shape-missing"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z14. roundtrip Stage 7 — drift detection actually fires on mutation (iter 51)"-miss=""-F="$ROOT/scripts/test-pipeline-roundtrip.mjs"-# Stage 7 present-grep -q "Stage 7 — drift detection on mutated audit" "$F" 2>/dev/null || miss="$miss no-stage-7"-# Mutates all 3 similarity components (cosine + categorical + jaccard)-grep -q "harnessFit - 40" "$F" 2>/dev/null || miss="$miss no-cosine-mutation"-grep -q "iter-51-synthetic-archetype\|synthetic-archetype" "$F" 2>/dev/null || miss="$miss no-categorical-mutation"-grep -q "iter-51-marker" "$F" 2>/dev/null || miss="$miss no-jaccard-mutation"-# Critical assertions-grep -q "drift detected — verdict !== near-identical" "$F" 2>/dev/null || miss="$miss no-verdict-flip"-grep -q "drift detected — distance > 0" "$F" 2>/dev/null || miss="$miss no-distance-positive"-grep -q "drift alert at threshold" "$F" 2>/dev/null || miss="$miss no-drift-alert"-# Runtime: assertion count has grown as stages added (was 25→31→… → 66 at-# iter 79). Smoke gates on "0 failed" with a passed count ≥ 31, not the-# specific number — keeps the gate from breaking every time a new stage-# adds assertions.-ROUNDTRIP_OUT=$(node "$F" 2>&1)-echo "$ROUNDTRIP_OUT" | grep -qE "^[0-9]+ passed, 0 failed$" || miss="$miss roundtrip-has-failures"-ROUNDTRIP_COUNT=$(echo "$ROUNDTRIP_OUT" | grep -oE "^[0-9]+ passed" | grep -oE "[0-9]+" | head -1)-[[ "${ROUNDTRIP_COUNT:-0}" -ge 31 ]] || miss="$miss roundtrip-count-regressed:$ROUNDTRIP_COUNT"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z13. mcp-scan findings parsed from text → audit-trend diff works (iter 50)"-miss=""-HARNESS="$ROOT/scripts/_harness.mjs"-# Shared parser exported-grep -q "export function parseMcpScanText" "$HARNESS" 2>/dev/null || miss="$miss no-shared-parser"-# mcp-scan.mjs uses it-SCAN="$ROOT/scripts/mcp-scan.mjs"-grep -q "parseMcpScanText" "$SCAN" 2>/dev/null || miss="$miss scan-not-importing"-# oia-audit.mjs uses it for the mcp-scan label-OIA="$ROOT/scripts/oia-audit.mjs"-grep -q "parseMcpScanText" "$OIA" 2>/dev/null || miss="$miss oia-not-importing"-grep -q "label === 'mcp-scan'" "$OIA" 2>/dev/null || miss="$miss no-label-dispatch"-# Runtime: mcp-scan produces an array-OUT=$(node "$SCAN" --path . --format json 2>/dev/null)-echo "$OUT" | grep -q '"findings": \[' || miss="$miss runtime-no-findings-array"-echo "$OUT" | grep -q '"severity":' || miss="$miss runtime-no-severity-field"-# Runtime: roundtrip passes (≥25 — iter 50 took it from 24, future iters keep climbing)-node "$ROOT/scripts/test-pipeline-roundtrip.mjs" 2>&1 | grep -qE "(2[5-9]|[3-9][0-9]+) passed, 0 failed" || miss="$miss roundtrip-fewer-than-25"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z12. roundtrip covers non-similarity schemas + flags mcp-scan gap (iter 49)"-miss=""-F="$ROOT/scripts/test-pipeline-roundtrip.mjs"-# New stage 6 present-grep -q "Stage 6 — non-similarity schema contracts" "$F" 2>/dev/null || miss="$miss no-stage-6"-# threat-model contract gated-grep -q "components.threatModel.json.worst is a string" "$F" 2>/dev/null || miss="$miss no-threat-model-contract"-# composite worst rollup contract-grep -q "audit.composite.worst is a string" "$F" 2>/dev/null || miss="$miss no-composite-contract"-grep -q "composite.worst in valid severity vocab" "$F" 2>/dev/null || miss="$miss no-severity-vocab-check"-# Self-match severity-verdict assertion-grep -q "self-roundtrip severity-verdict === unchanged" "$F" 2>/dev/null || miss="$miss no-severity-self-assert"-# Documents the mcp-scan gap rather than failing on it-grep -q "mcp-scan.mjs currently text-only" "$F" 2>/dev/null || miss="$miss no-mcp-scan-gap-note"-# Findings counters-grep -q "introducedCount === 0" "$F" 2>/dev/null || miss="$miss no-introduced-check"-grep -q "clearedCount === 0" "$F" 2>/dev/null || miss="$miss no-cleared-check"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z11. CI gate runs roundtrip with real metaharness installed (iter 48)"-miss=""-F="$ROOT/../../.github/workflows/metaharness-ci.yml"-[[ -f "$F" ]] || miss="$miss workflow-missing"-# The new job exists-grep -q "^ metaharness-real-data:" "$F" 2>/dev/null || miss="$miss no-real-data-job"-# Pre-flight warms the cache-grep -q "Pre-flight — confirm metaharness CLI is reachable" "$F" 2>/dev/null || miss="$miss no-preflight"-# Invokes the iter-47 roundtrip-grep -q "test-pipeline-roundtrip.mjs" "$F" 2>/dev/null || miss="$miss no-roundtrip-step"-# Cross-check via dispatcher-grep -q "score dispatcher emits the expected metaharness schema" "$F" 2>/dev/null || miss="$miss no-cross-check"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z10. end-to-end pipeline roundtrip (iter 47 — caught iter-38 schema bug)"-F="$ROOT/scripts/test-pipeline-roundtrip.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# Five stages (anti-shrink guard)-for stage in 'Stage 1' 'Stage 2' 'Stage 3' 'Stage 4' 'Stage 5'; do- grep -q "$stage" "$F" || miss="$miss missing-${stage// /-}"-done-# Asserts the critical invariant: self-roundtrip overall === 1-grep -q "self-roundtrip overall === 1" "$F" 2>/dev/null || miss="$miss no-self-match-assert"-# Distinguishes "test cannot run" (exit 2) from "test failed" (exit 1)-grep -q "process.exit(2)" "$F" 2>/dev/null || miss="$miss no-cannot-run-exit"-# oia-audit fix is in place: dispatches metaharness for score+genome-OIA="$ROOT/scripts/oia-audit.mjs"-# iter 56 refactored: score+genome now go through runMetaharnessAsync directly-grep -qE "score', 'metaharness'|runMetaharnessAsync\(\['score'" "$OIA" 2>/dev/null || miss="$miss no-metaharness-engine-score"-grep -qE "genome', 'metaharness'|runMetaharnessAsync\(\['genome'" "$OIA" 2>/dev/null || miss="$miss no-metaharness-engine-genome"-grep -q "runMetaharness" "$OIA" 2>/dev/null || miss="$miss no-runMetaharness-import"-# Runtime: the roundtrip test must pass when metaharness is installed,-# or exit 2 (test-cannot-run) when it isn't. Both are smoke-green.-node "$F" >/dev/null 2>&1-CODE=$?-[[ "$CODE" == "0" || "$CODE" == "2" ]] || miss="$miss roundtrip-test-failed:$CODE"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z9. MCP success-semantic footnote + audit_trend file inputs (iter 46)"-miss=""-WRAPPER="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"-# Success-semantic constant declared + appended to N descriptions = N+1 occurrences.-# Iter 46 set this at 9 (8 tools); iter 54 added the 9th → 10. ADR-153-# added 3 more tools (bench/evolve/security_bench) → 1 + 12 = 13.-# @metaharness/redblue integration added 1 more → 1 + 13 = 14.-# learn + gepa ([email protected] / [email protected]) added 2 more → 1 + 15 = 16.-COUNT=$(grep -c "MCP_SUCCESS_SEMANTIC" "$WRAPPER" 2>/dev/null; true)-[[ "$COUNT" == "16" ]] || miss="$miss footnote-count:$COUNT-expected-16"-# audit_trend now exposes baselineFile / currentFile-grep -q "baselineFile" "$WRAPPER" 2>/dev/null || miss="$miss no-baseline-file"-grep -q "currentFile" "$WRAPPER" 2>/dev/null || miss="$miss no-current-file"-# alertOnDistanceBelow exposed (iter 38 distance gate)-grep -q "alertOnDistanceBelow" "$WRAPPER" 2>/dev/null || miss="$miss no-distance-input"-# Phase 4 has the file-input assertion-T="$ROOT/scripts/test-mcp-tools.mjs"-grep -q "audit_trend file-input path: success === true" "$T" 2>/dev/null || miss="$miss no-file-input-assert"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z8. ruflo doctor checks the integration layer, not just upstream (iter 45)"-miss=""-DOC="$ROOT/../../v3/@claude-flow/cli/src/commands/doctor.ts"-# New function present-grep -q "function checkMetaharnessIntegration" "$DOC" 2>/dev/null || miss="$miss no-integration-check"-# Registered in allChecks-grep -q "checkMetaharnessIntegration, // iter 45" "$DOC" 2>/dev/null || miss="$miss not-in-allchecks"-# Alias in componentMap-grep -q "'metaharness-integration': checkMetaharnessIntegration" "$DOC" 2>/dev/null || miss="$miss no-component-alias"-# Verifies the 5 critical files-for f in _harness _similarity similarity _spike-similarity harness-similarity; do- grep -q "${f}" "$DOC" 2>/dev/null || miss="$miss check-missing-${f}"-done-# Runtime smoke: similarity({}, {}) call present-grep -q "mod.similarity({}, {})" "$DOC" 2>/dev/null || miss="$miss no-smoke-call"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z7. MCP wrapper success semantic fix (iter 44 — exitCode is the source of truth)"-miss=""-WRAPPER="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"-# runScript signature includes success now-grep -q "success: boolean" "$WRAPPER" 2>/dev/null || miss="$miss no-success-type"-grep -q "success = exitCode === 0" "$WRAPPER" 2>/dev/null || miss="$miss no-exitcode-derived-success"-# All 8 handlers use r.success, NOT !r.degraded-COUNT_OLD=$(grep -c "success: !r.degraded" "$WRAPPER" 2>/dev/null; true)-[[ "$COUNT_OLD" == "0" ]] || miss="$miss old-pattern-still-present:$COUNT_OLD"-COUNT_NEW=$(grep -c "success: r.success" "$WRAPPER" 2>/dev/null; true)-# Iter 54 added a 9th tool → 9. ADR-153 added 3 more (bench, evolve,-# security_bench) → 12. @metaharness/redblue integration added 1 more → 13.-# learn + gepa added 2 more → 15. Future iters that add tools should bump this.-[[ "$COUNT_NEW" == "15" ]] || miss="$miss new-pattern-count:$COUNT_NEW-expected-15"-# Runtime anchors: iter 44 success assertions present-T="$ROOT/scripts/test-mcp-tools.mjs"-grep -q "iter 44 fix" "$T" 2>/dev/null || miss="$miss no-iter44-anchors"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z6. test-mcp-tools.mjs Phase 4 positive-case (iter 43 — output-shape gate)"-F="$ROOT/scripts/test-mcp-tools.mjs"-miss=""-grep -q "Phase 4 — positive-case" "$F" 2>/dev/null || miss="$miss no-phase-4"-grep -q "similarity positive case" "$F" 2>/dev/null || miss="$miss no-similarity-positive"-grep -q "similarity data has numeric.*overall" "$F" 2>/dev/null || miss="$miss no-overall-assert"-grep -q "similarity components.cosine numeric" "$F" 2>/dev/null || miss="$miss no-cosine-assert"-grep -q "similarity components.categorical numeric" "$F" 2>/dev/null || miss="$miss no-categorical-assert"-grep -q "similarity alertBelow=0.99 → exitCode 1" "$F" 2>/dev/null || miss="$miss no-alert-assert"-grep -q "audit_trend bad-keys path exits 2" "$F" 2>/dev/null || miss="$miss no-trend-exit-assert"-# Runtime: full test passes (90+ assertions now expected)-node "$F" >/dev/null 2>&1 || miss="$miss runtime-fails"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z5. CLI dispatcher round-trips flags (iter 42 — fixes existing bug)"-miss=""-DISP="$ROOT/../../v3/@claude-flow/cli/src/commands/metaharness.ts"-# Reconstruction logic literal markers (anti-deletion)-grep -q "reconstructedFlags" "$DISP" 2>/dev/null || miss="$miss no-reconstruction"-grep -q "ctxFlags" "$DISP" 2>/dev/null || miss="$miss no-ctx-flags-read"-grep -q "toKebab" "$DISP" 2>/dev/null || miss="$miss no-kebab-helper"-# SKIP_KEYS list documents which flags don't propagate-grep -q "SKIP_KEYS" "$DISP" 2>/dev/null || miss="$miss no-skip-set"-# Comment explains the fix-grep -q "iter 42" "$DISP" 2>/dev/null || miss="$miss no-iter42-marker"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z4. bench-similarity.mjs — perf characterization + regression gate (iter 41)"-F="$ROOT/scripts/bench-similarity.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# 3 fixture categories declared (anti-shrink guard)-for cat in CHEAP TYPICAL RICH; do- grep -q "const ${cat} = {" "$F" 2>/dev/null || miss="$miss missing-fixture-${cat}"-done-# Imports from the production module, not the spike-grep -q "from './_similarity.mjs'" "$F" 2>/dev/null || miss="$miss not-using-production-module"-# Gate flag exposed-grep -q -- "--max-mean-us" "$F" 2>/dev/null || miss="$miss no-gate-flag"-# Runtime: quick bench succeeds (low iter count so smoke stays fast)-node "$F" --iters 10000 --max-mean-us 50 >/dev/null 2>&1 || miss="$miss runtime-fails-or-overhead-blew-50us"-# Runtime: gate trips on absurd ceiling, exit 1 path exercised-if node "$F" --iters 10000 --max-mean-us 0.0001 >/dev/null 2>&1; then- miss="$miss gate-failed-to-trip"-fi-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z3. metaharness-ci.yml has the similarity-tests job (iter 40 — CI gate enforcement)"-F="$ROOT/../../.github/workflows/metaharness-ci.yml"-miss=""-[[ -f "$F" ]] || miss="$miss workflow-missing"-grep -q "^ similarity-tests:" "$F" 2>/dev/null || miss="$miss no-job-header"-grep -q "Unit tests — _similarity.mjs" "$F" 2>/dev/null || miss="$miss no-unit-step"-grep -q "Spike invariants still hold" "$F" 2>/dev/null || miss="$miss no-spike-step"-grep -q "CLI skill — file-input round-trip" "$F" 2>/dev/null || miss="$miss no-cli-skill-step"-grep -q "audit-trend structural-distance integration" "$F" 2>/dev/null || miss="$miss no-trend-step"-grep -q "Graceful fallback when fingerprint missing" "$F" 2>/dev/null || miss="$miss no-fallback-step"-grep -q "Distance alert gate exits 1" "$F" 2>/dev/null || miss="$miss no-alert-step"-# CLAUDE.md documents the new MCP tool + subcommand-CMD="$ROOT/../../CLAUDE.md"-grep -q "mcp__claude-flow__metaharness_similarity" "$CMD" 2>/dev/null || miss="$miss claude-md-no-mcp-tool"-grep -q "ruflo metaharness similarity" "$CMD" 2>/dev/null || miss="$miss claude-md-no-subcommand"-grep -q -- "--alert-on-distance-below" "$CMD" 2>/dev/null || miss="$miss claude-md-no-distance-flag"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z2. _similarity.mjs unit tests (iter 39 — library-grade testability)"-F="$ROOT/scripts/test-similarity.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# 8 phases enumerated (anti-shrink guard)-for phase in 'Phase 1' 'Phase 2' 'Phase 3' 'Phase 4' 'Phase 5' 'Phase 6' 'Phase 7' 'Phase 8'; do- grep -q "$phase" "$F" || miss="$miss missing-${phase// /-}"-done-# Phase 8 regression anchor — exact spike numbers must be hard-coded-grep -q "0.8296" "$F" || miss="$miss no-spike-overall-anchor"-grep -q "0.9987" "$F" || miss="$miss no-spike-cosine-anchor"-# Runtime: full unit-test pass (this is the actual gate)-node "$F" >/dev/null 2>&1 || miss="$miss unit-tests-fail"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17z. ADR-152 §3.1 deep integration — oia-audit fingerprint + audit-trend structuralDistance (iter 38)"-miss=""-# oia-audit captures score + genome AND surfaces a fingerprint{score,genome}.-# iter 56 refactored sequential runOne(...) → parallel-# runMetaharnessAsync(['score'/'genome', path]); accept either form so smoke-# survives the refactor.-OIA="$ROOT/scripts/oia-audit.mjs"-grep -qE "score = runOne\\(\\['score'|runMetaharnessAsync\\(\\['score', path\\]\\)" "$OIA" 2>/dev/null \- || miss="$miss no-score-capture"-grep -qE "genome = runOne\\(\\['genome'|runMetaharnessAsync\\(\\['genome', path\\]\\)" "$OIA" 2>/dev/null \- || miss="$miss no-genome-capture"-grep -q "fingerprint: {" "$OIA" 2>/dev/null || miss="$miss no-fingerprint-field"-# audit-trend imports the production similarity module and surfaces a verdict-AT="$ROOT/scripts/audit-trend.mjs"-grep -q "from './_similarity.mjs'" "$AT" 2>/dev/null || miss="$miss no-similarity-import"-grep -q "structuralDistance" "$AT" 2>/dev/null || miss="$miss no-structural-distance-field"-grep -q "near-identical\|minor-drift\|moderate-drift\|major-drift" "$AT" 2>/dev/null || miss="$miss no-verdict-thresholds"-grep -q -- "--alert-on-distance-below" "$AT" 2>/dev/null || miss="$miss no-distance-alert-flag"-# Runtime: graceful fallback when fingerprint missing (no crash on old records)-TMPOLD=$(mktemp); TMPNEW=$(mktemp)-cat > "$TMPOLD" <<'JSON'-{"startedAt":"2026-06-01T00:00:00Z","composite":{"worst":"clean"},"components":{"oiaManifest":{},"threatModel":{},"mcpScan":{"json":{"findings":[]}}}}-JSON-cat > "$TMPNEW" <<'JSON'-{"startedAt":"2026-06-15T00:00:00Z","composite":{"worst":"clean"},"components":{"oiaManifest":{},"threatModel":{},"mcpScan":{"json":{"findings":[]}}},"fingerprint":{"score":{"harnessFit":82,"recommendedMode":"CLI + MCP","archetype":"typescript-sdk-harness","template":"vertical:coding"},"genome":{"repo_type":"node_mcp_ci","agent_topology":["maintainer","tester"],"risk_score":0.3}}}-JSON-OUT=$(node "$AT" --baseline "$TMPOLD" --current "$TMPNEW" --format json 2>/dev/null)-echo "$OUT" | grep -q '"verdict": "unavailable"' || miss="$miss no-graceful-fallback"-# Runtime: structural-distance path emits a numeric overall when both have fingerprints-cp "$TMPNEW" "$TMPOLD"-OUT2=$(node "$AT" --baseline "$TMPOLD" --current "$TMPNEW" --format json 2>/dev/null)-echo "$OUT2" | grep -q '"verdict": "near-identical"' || miss="$miss no-near-identical-self"-echo "$OUT2" | grep -q '"distance": 0' || miss="$miss self-distance-not-zero"-rm -f "$TMPOLD" "$TMPNEW"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17y. ADR-152 production — _similarity.mjs module + similarity.mjs skill + MCP tool + dispatcher (iter 36)"-miss=""-# Production module-MOD="$ROOT/scripts/_similarity.mjs"-[[ -f "$MOD" ]] || miss="$miss module-missing"-node --check "$MOD" 2>/dev/null || miss="$miss module-syntax-error"-grep -q "export function similarity" "$MOD" 2>/dev/null || miss="$miss no-export-similarity"-grep -q "export function projectToVec" "$MOD" 2>/dev/null || miss="$miss no-export-projectToVec"-grep -q "export function cosine" "$MOD" 2>/dev/null || miss="$miss no-export-cosine"-grep -q "DEFAULT_WEIGHTS" "$MOD" 2>/dev/null || miss="$miss no-default-weights"-grep -q "cosine: 0.6" "$MOD" 2>/dev/null || miss="$miss weight-cosine-drift"-grep -q "categorical: 0.25" "$MOD" 2>/dev/null || miss="$miss weight-categorical-drift"-grep -q "jaccard: 0.15" "$MOD" 2>/dev/null || miss="$miss weight-jaccard-drift"-# CLI skill-SKL="$ROOT/scripts/similarity.mjs"-[[ -x "$SKL" ]] || miss="$miss skill-not-executable"-node --check "$SKL" 2>/dev/null || miss="$miss skill-syntax-error"-grep -q "from './_similarity.mjs'" "$SKL" 2>/dev/null || miss="$miss skill-not-using-module"-grep -q -- "--per-dimension" "$SKL" 2>/dev/null || miss="$miss no-per-dimension-flag"-grep -q -- "--alert-below" "$SKL" 2>/dev/null || miss="$miss no-alert-below-flag"-# SKILL.md-SK="$ROOT/skills/harness-similarity/SKILL.md"-[[ -f "$SK" ]] || miss="$miss skill-md-missing"-grep -q "^name: harness-similarity" "$SK" 2>/dev/null || miss="$miss skill-md-name-wrong"-grep -q "^allowed-tools:" "$SK" 2>/dev/null || miss="$miss skill-md-no-allowed-tools"-# Dispatcher-DISP="$ROOT/../../v3/@claude-flow/cli/src/commands/metaharness.ts"-grep -q "similarity: 'similarity.mjs'" "$DISP" 2>/dev/null || miss="$miss no-dispatcher-entry"-# MCP tool registered-MCP="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"-grep -q "name: 'metaharness_similarity'" "$MCP" 2>/dev/null || miss="$miss no-mcp-tool"-# Smoke-runtime sanity: production module reproduces spike LEGAL×SUPPORT score-TMPA=$(mktemp); TMPB=$(mktemp)-cat > "$TMPA" <<'JSON'-{"score":{"harnessFit":78,"compileConfidence":92,"taskCoverage":65,"toolSafety":88,"memoryUsefulness":70,"estCostPerRunUsd":0.04,"recommendedMode":"CLI + MCP","archetype":"compliance-harness","template":"vertical:legal"},"genome":{"repo_type":"node_mcp_ci","agent_topology":["contract-analyst","redline-reviewer","risk-rater","compliance-officer"],"risk_score":0.45,"test_confidence":0.7,"publish_readiness":0.6}}-JSON-cat > "$TMPB" <<'JSON'-{"score":{"harnessFit":75,"compileConfidence":90,"taskCoverage":70,"toolSafety":90,"memoryUsefulness":72,"estCostPerRunUsd":0.05,"recommendedMode":"CLI + MCP","archetype":"compliance-harness","template":"vertical:support"},"genome":{"repo_type":"node_mcp_ci","agent_topology":["triager","kb-searcher","responder","risk-rater","compliance-officer"],"risk_score":0.40,"test_confidence":0.75,"publish_readiness":0.65}}-JSON-OUT=$(node "$SKL" --a "$TMPA" --b "$TMPB" --format json 2>/dev/null | grep '"overall"' | head -1)-echo "$OUT" | grep -q "0.8296" || miss="$miss runtime-overall-mismatch:$OUT"-# Self-similarity check via the production module-SELF=$(node "$SKL" --a "$TMPA" --b "$TMPA" --format json 2>/dev/null | grep '"overall"' | head -1)-echo "$SELF" | grep -qE '"overall": 1[,]?$' || miss="$miss runtime-self-not-one:$SELF"-rm -f "$TMPA" "$TMPB"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17x. ADR-152 spike — similarity invariants verified at structural level (iter 35)"-F="$ROOT/scripts/_spike-similarity.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# The 3-component similarity formula matches ADR-152's decision-grep -q "0.6 \* cos + 0.25 \* cat + 0.15 \* jac" "$F" || miss="$miss weight-formula-drift"-# Both invariants explicit-grep -q "selfMatch" "$F" || miss="$miss no-invariant-1"-grep -q "verticalAffinity" "$F" || miss="$miss no-invariant-2"-# 3 fixtures (LEGAL/SUPPORT/DEVOPS) — anti-regression-for fix in LEGAL SUPPORT DEVOPS; do- grep -q "const ${fix} = {" "$F" || miss="$miss missing-fixture-${fix}"-done-# Fail-closed on invariant violation-grep -q "process.exit(1)" "$F" || miss="$miss no-fail-closed"-# ADR-152 status updated to Accepted-ADR152="$ROOT/../../v3/docs/adr/ADR-152-genome-similarity-search.md"-grep -q "Status\*\*: Accepted" "$ADR152" 2>/dev/null || miss="$miss adr152-not-accepted"-# ADR-151 §3.1 marker upgraded-PARENT151="$ROOT/../../v3/docs/adr/ADR-151-harness-intelligence-layer.md"-grep -q "ACCEPTED iter 35" "$PARENT151" 2>/dev/null || miss="$miss adr151-marker-stale"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17w. ADR-152 Genome Similarity Search drafted (iter 34, Phase 3 critical-path)"-F="$ROOT/../../v3/docs/adr/ADR-152-genome-similarity-search.md"-miss=""-[[ -f "$F" ]] || miss="$miss adr-missing"-# Must reference its parent-grep -q "ADR-151" "$F" 2>/dev/null || miss="$miss no-parent-link"-# Must enumerate the 9 numerical features used in the cosine-for field in harnessFit compileConfidence taskCoverage toolSafety memoryUsefulness risk_score test_confidence publish_readiness estCostPerRunUsd; do- grep -q "$field" "$F" 2>/dev/null || miss="$miss missing-feature-${field}"-done-# Composite weights documented-grep -q "0.6.*cosine.*0.25.*categorical.*0.15.*jaccard" "$F" 2>/dev/null || miss="$miss no-weights"-# Smallest-spike contract present-grep -q "Smallest demonstrable spike" "$F" 2>/dev/null || miss="$miss no-spike-contract"-# Cross-link from ADR-151 updated to DRAFTED-PARENT151="$ROOT/../../v3/docs/adr/ADR-151-harness-intelligence-layer.md"-grep -q "ADR-152-genome-similarity-search.md" "$PARENT151" 2>/dev/null || miss="$miss adr151-not-updated"-grep -qE "DRAFTED iter 34|ACCEPTED iter 3[0-9]" "$PARENT151" 2>/dev/null || miss="$miss adr151-no-progress-marker"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17v. ADR-151 Phase 3 scope shell drafted (iter 33)"-F="$ROOT/../../v3/docs/adr/ADR-151-harness-intelligence-layer.md"-miss=""-[[ -f "$F" ]] || miss="$miss adr-missing"-# Must enumerate all 5 sub-capabilities-for cap in "Genome Similarity Search" "Harness Recommendation Engine" "Fleet-Wide Architecture Drift Detection" "Cross-Harness Capability Graph" "Plugin Compatibility Analysis"; do- grep -q "$cap" "$F" 2>/dev/null || miss="$miss missing-cap-${cap// /-}"-done-# Architectural inheritance from ADR-150 explicit-grep -q "Architectural Inheritance from ADR-150" "$F" 2>/dev/null || miss="$miss no-inheritance-section"-# All 4 constraints repeated-for rule in Removable "Optional in package.json" "Graceful degradation" "CI gate"; do- grep -q "$rule" "$F" 2>/dev/null || miss="$miss missing-rule-${rule// /-}"-done-# Scope-only status (no code yet)-grep -q "Status.*Proposed.*scope-only\|scope-only" "$F" 2>/dev/null || miss="$miss no-scope-only-marker"-# ADR-150 cross-link present-grep -q "ADR-150" "$F" 2>/dev/null || miss="$miss no-adr150-link"-# ADR-150 status now references ADR-151-PARENT="$ROOT/../../v3/docs/adr/ADR-150-metaharness-integration-surfaces.md"-grep -q "ADR-151" "$PARENT" 2>/dev/null || miss="$miss adr150-no-back-ref"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17u. .harness/manifest.json + README documents witness gap (iter 32)"-F="$ROOT/../../.harness/manifest.json"-README="$ROOT/../../.harness/README.md"-miss=""-[[ -f "$F" ]] || miss="$miss missing-manifest"-node -e "JSON.parse(require('fs').readFileSync('$F','utf-8'))" 2>/dev/null || miss="$miss invalid-json"-# Manifest must list both security-critical files-node -e "-const m = JSON.parse(require('fs').readFileSync('$F','utf-8'));-const files = m.files || {};-if (!files['.harness/mcp-policy.json']) { console.error('no policy fingerprint'); process.exit(1); }-if (!files['.claude/settings.json']) { console.error('no settings fingerprint'); process.exit(1); }-// Sha256 hashes are 64 hex chars-for (const [k, v] of Object.entries(files)) {- if (!/^[0-9a-f]{64}\$/.test(v)) { console.error('bad sha256 for', k); process.exit(1); }-}-" 2>/dev/null || miss="$miss manifest-shape-invalid"-[[ -f "$README" ]] || miss="$miss missing-readme"-grep -q "witness-signing-key\|witness signing\|WITNESS_SIGNING_KEY" "$README" 2>/dev/null || miss="$miss no-witness-doc"-grep -q "ADR-150" "$README" 2>/dev/null || miss="$miss no-adr-anchor"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17t. .harness/mcp-policy.json present + default-deny (iter 30 — closes no-policy HIGH)"-F="$ROOT/../../.harness/mcp-policy.json"-miss=""-[[ -f "$F" ]] || miss="$miss missing-policy-file"-node -e "JSON.parse(require('fs').readFileSync('$F','utf-8'))" 2>/dev/null || miss="$miss invalid-json"-# Required fields per metaharness mcp-scan source-node -e "-const j = JSON.parse(require('fs').readFileSync('$F','utf-8'));-const must = { defaultDeny: true, auditLog: true, requireApprovalForDangerous: true };-for (const [k, v] of Object.entries(must)) {- if (j[k] !== v) { console.error('missing or wrong:', k, '=', j[k]); process.exit(1); }-}-// toolTimeoutMs must be positive-if (!Number.isFinite(j.toolTimeoutMs) || j.toolTimeoutMs <= 0) {- console.error('toolTimeoutMs not positive'); process.exit(1);-}-// maxToolCallsPerTurn must be positive (clears 'no-call-budget' finding)-if (!Number.isFinite(j.maxToolCallsPerTurn) || j.maxToolCallsPerTurn <= 0) {- console.error('maxToolCallsPerTurn not positive'); process.exit(1);-}-// ADR-150 anchor present-if (!JSON.stringify(j).includes('ADR-150')) {- console.error('no ADR-150 anchor in policy'); process.exit(1);-}-" 2>/dev/null || miss="$miss policy-shape-invalid"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17s. mint.mjs cwd-based scaffolding (iter 27 fix for upstream --target bug)"-F="$ROOT/scripts/mint.mjs"-miss=""-# The fix uses dirname(target) as cwd + basename(target) as the CLI name-grep -q "const parentDir = dirname(ARGS.target)" "$F" || miss="$miss no-parent-dir"-grep -q "const cliName = basename(ARGS.target)" "$F" || miss="$miss no-cli-name"-# The CLI invocation MUST pass cliName (not ARGS.name) + use cwd: parentDir-grep -q "'new', cliName" "$F" || miss="$miss no-cli-name-passed"-grep -q "cwd: parentDir" "$F" || miss="$miss no-cwd-set"-# And MUST NOT include the silently-ignored --target flag-if grep -qE "'--target',\s*ARGS\.target" "$F" 2>/dev/null; then- miss="$miss --target-flag-leaked-back"-fi-# Cross-reference to the upstream issue-grep -q "agent-harness-generator/issues/9\|0.1.12\|iter 27" "$F" || miss="$miss no-bug-context-anchor"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17q. test-with-openrouter — GCP-secret × scaffold × lifecycle e2e (iter 26)"-F="$ROOT/scripts/test-with-openrouter.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# Pulls the secret from GCP Secret Manager (not from env file)-grep -q "gcloud secrets versions access" "$F" || miss="$miss no-gcp-fetch"-grep -q "OPENROUTER_API_KEY" "$F" || miss="$miss no-secret-name"-# Verifies the key against OpenRouter (live HTTP)-grep -q "openrouter.ai/api/v1" "$F" || miss="$miss no-openrouter-http"-# Scaffold + lifecycle commands-grep -q "metaharness@latest.*new\|metaharness new\|'test-harness'" "$F" || miss="$miss no-scaffold-call"-grep -q "harness.*doctor\|harness', 'doctor\|\\['doctor'" "$F" || miss="$miss no-doctor-call"-grep -q "harness.*score\|'score'" "$F" || miss="$miss no-score-call"-# Anti-regression: scaffold MUST cd into a temp dir (--target is ignored-# by [email protected]+ which writes to \$CWD/<name>; iter 26 fix)-grep -q "cwd: fixture\|cwd: opts.cwd" "$F" || miss="$miss no-cwd-fix"-# Never echo the raw key-grep -q "apiKey.slice(0, 7)" "$F" || miss="$miss key-may-leak"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17p. bench-recordpair-overhead — measures + gates iter-12 default-path cost (iter 24/25)"-F="$ROOT/scripts/bench-recordpair-overhead.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# Benchmark targets the exact iter-12 source pattern-grep -q "CLAUDE_FLOW_ROUTER_PARALLEL_LOG === '1'" "$F" || miss="$miss no-flag-literal"-# Both flag-OFF and flag-ON variants measured-grep -q "FLAG OFF" "$F" || miss="$miss no-off-variant"-grep -q "FLAG ON" "$F" || miss="$miss no-on-variant"-# Uses performance.now() not Date.now() for sub-μs resolution-grep -q "performance.now" "$F" || miss="$miss no-perf-now"-# Reports per-call overhead in nanoseconds (the meaningful unit)-grep -q "meanNsPerCall\|ns per route" "$F" || miss="$miss no-ns-reporting"-# iter 25 — CI regression gate (exits 1 above threshold)-grep -q "max-overhead-ns" "$F" || miss="$miss no-gate-flag"-grep -q "REGRESSION" "$F" || miss="$miss no-regression-message"-grep -q "process.exit(1)" "$F" || miss="$miss no-fail-closed"-# Wired into the CI workflow with a 500ns threshold-CI="$ROOT/../../.github/workflows/metaharness-ci.yml"-grep -q "max-overhead-ns 500" "$CI" 2>/dev/null || miss="$miss not-wired-to-ci"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17o. test-mcp-tools runtime contract test (ADR-150 — iter 23)"-F="$ROOT/scripts/test-mcp-tools.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# Asserts the runtime contract literally: { success, data, degraded, exitCode }-grep -q "result has 'success'" "$F" || miss="$miss no-success-assertion"-grep -q "result has 'data'" "$F" || miss="$miss no-data-assertion"-grep -q "result has 'degraded'" "$F" || miss="$miss no-degraded-assertion"-grep -q "result has 'exitCode'" "$F" || miss="$miss no-exitcode-assertion"-# All 15 tool names enumerated (similarity iter 36, drift_from_history iter 54,-# ADR-153 added bench/evolve/security_bench, @metaharness/redblue added redblue,-# [email protected]/[email protected] added learn + gepa)-for tool in metaharness_score metaharness_genome metaharness_mcp_scan metaharness_threat_model metaharness_oia_audit metaharness_audit_list metaharness_audit_trend metaharness_similarity metaharness_drift_from_history metaharness_bench metaharness_evolve metaharness_security_bench metaharness_redblue metaharness_learn metaharness_gepa; do- grep -q "${tool}" "$F" || miss="$miss missing-${tool}"-done-# Count assertion must match iter-54 (8 → 9), then ADR-153 (9 → 12), then-# redblue (12 → 13), then learn/gepa (13 → 15)-grep -q "tools.length === 15" "$F" || miss="$miss tool-count-assertion-stale"-# Graceful skip when dist absent (so the script is smoke-runnable pre-build)-grep -q "SKIPPED" "$F" || miss="$miss no-skip-doc"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17n. CLAUDE.md documents MetaHarness integration (ADR-150 discoverability — iter 22)"-F="$ROOT/../../CLAUDE.md"-miss=""-[[ -f "$F" ]] || miss="$miss claude-md-missing"-grep -q "^## MetaHarness Integration (ADR-150)" "$F" || miss="$miss no-section-header"-# Architectural constraint anchor-grep -q "Ruflo remains operational if every MetaHarness package is removed" "$F" || miss="$miss no-constraint-quote"-# All 4 rules documented-grep -q "no-metaharness-smoke.yml" "$F" || miss="$miss no-ci-gate-ref"-# Command surface + tool surface enumerated-grep -q "npx ruflo metaharness score" "$F" || miss="$miss no-cli-example"-grep -q "mcp__claude-flow__metaharness_" "$F" || miss="$miss no-mcp-tool-list"-# Routing + parallel-log integration both mentioned-grep -q "CLAUDE_FLOW_ROUTER_NEURAL\|CLAUDE_FLOW_ROUTER_PARALLEL_LOG" "$F" || miss="$miss no-routing-flags"-# 3-criteria gate-grep -q "quality > 2% AND cost < 1% AND latency < 5%" "$F" || miss="$miss no-3-criteria-gate"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17m. metaharness MCP tools registered (ADR-150 deepest integration — iter 20)"-F="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"-miss=""-[[ -f "$F" ]] || miss="$miss tools-file-missing"-# All 7 tools declared (5 static-analysis + 2 audit-observability — iter 20, 21)-for tool in metaharness_score metaharness_genome metaharness_mcp_scan metaharness_threat_model metaharness_oia_audit metaharness_audit_list metaharness_audit_trend; do- grep -q "name: '${tool}'" "$F" || miss="$miss missing-${tool}"-done-# ADR-150 architectural-constraint anchor: zero static @metaharness/* import-grep -q "from '@metaharness/" "$F" && miss="$miss static-metaharness-import-LEAK"-# Subprocess isolation + locator-grep -q "locatePluginScripts" "$F" || miss="$miss no-locator"-grep -q "child_process" "$F" || miss="$miss no-subprocess"-# Registered in mcp-client.ts-CLIENT="$ROOT/../../v3/@claude-flow/cli/src/mcp-client.ts"-grep -q "import { metaharnessTools }" "$CLIENT" || miss="$miss not-imported-in-client"-grep -q "\.\.\.metaharnessTools" "$CLIENT" || miss="$miss not-spread-in-registry"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17l. test-graceful-degradation drill (ADR-150 rule #3 — iter 19)"-F="$ROOT/scripts/test-graceful-degradation.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# Asserts the contract literal: exit 0 AND degraded:true-grep -qE 'exit code = 0|exit code in \{' "$F" || miss="$miss no-exit-assertion"-grep -q '"degraded".*true' "$F" || miss="$miss no-degraded-true-assertion"-# Skills covered (all 5 metaharness-binary-dependent ones)-for sub in score genome mcp-scan threat-model oia-audit; do- grep -q "name: '${sub}'" "$F" || miss="$miss missing-${sub}"-done-# Unreachable-registry stub (no actual network)-grep -q "npm_config_registry" "$F" || miss="$miss no-registry-stub"-grep -q "no-such-registry" "$F" || miss="$miss no-fake-host"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17k. init + hooks discovery surfaces metaharness (iter 18)"-INIT="$ROOT/../../v3/@claude-flow/cli/src/commands/init.ts"-HOOKS="$ROOT/../../v3/@claude-flow/cli/src/commands/hooks.ts"-miss=""-# init.ts Next-steps points at metaharness score-grep -q "metaharness score.*5-dim\|metaharness score)\`} for a 5-dim" "$INIT" 2>/dev/null || miss="$miss init-no-metaharness-tip"-grep -q "ADR-150" "$INIT" 2>/dev/null || miss="$miss init-no-adr-anchor"-# hooks.ts worker-dispatch trigger list includes oia-audit-grep -q "testgaps, oia-audit" "$HOOKS" 2>/dev/null || miss="$miss hooks-trigger-list-missing"-grep -q "ruflo metaharness oia-audit" "$HOOKS" 2>/dev/null || miss="$miss hooks-tip-missing"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17j. audit-list — enumerate metaharness-audit records (iter 16)"-F="$ROOT/scripts/audit-list.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-grep -q "metaharness-audit" "$F" || miss="$miss no-namespace"-grep -q "audit-trend" "$F" || miss="$miss no-trend-pointer"-grep -q "limit\|since" "$F" || miss="$miss no-filters"-grep -q "newest first" "$F" || miss="$miss no-sort-doc"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17i. audit-trend — diff two oia-audit snapshots (iter 15)"-F="$ROOT/scripts/audit-trend.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# Severity rank present + correct ordering — iter 63 refactored to shared-# SEVERITY_RANK from _harness.mjs; accept either the import OR the literal.-grep -qE "SEVERITY_RANK.*from.*_harness|SEVERITY_RANK = \{ clean: 0, low: 1, medium: 2, high: 3 \}" "$F" \- || miss="$miss no-severity-rank"-# Both file-input AND memory-key-input paths-grep -q "baseline-key\|baselineKey" "$F" || miss="$miss no-mem-key-input"-grep -q "current-key\|currentKey" "$F" || miss="$miss no-current-key"-# Findings set-diff (fingerprint-based)-grep -q "fingerprint\|new Set" "$F" || miss="$miss no-findings-diff"-# Alert flag + exit semantics-grep -q "alert-on-worsening" "$F" || miss="$miss no-alert-flag"-grep -q "process.exit(1)" "$F" || miss="$miss no-fail-closed"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17h. doctor integration — checkMetaharness in standard health checks (iter 14)"-F="$ROOT/../../v3/@claude-flow/cli/src/commands/doctor.ts"-miss=""-[[ -f "$F" ]] || miss="$miss missing-file"-# The check function exists, with ADR-150 anchor-grep -q "async function checkMetaharness" "$F" || miss="$miss no-check-function"-grep -q "ADR-150" "$F" || miss="$miss no-adr-anchor"-# Registered in BOTH the allChecks array AND the componentMap-grep -q "checkMetaharness, // ADR-150" "$F" || miss="$miss not-in-allChecks"-grep -q "'metaharness': checkMetaharness" "$F" || miss="$miss not-in-componentMap"-# Help text mentions it-grep -q "metaharness)" "$F" || miss="$miss not-in-help-text"-# Graceful: never throws; returns warn (not fail) on missing-grep -q "status: 'warn'" "$F" || miss="$miss no-graceful-warn"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17g. parallel-pipeline e2e integration test (ADR-150 — iter 13)"-F="$ROOT/scripts/test-parallel-pipeline.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# Exercises all three layers (recorder ↔ JSONL ↔ analyzer)-grep -q "router-parallel-recorder.ts" "$F" || miss="$miss no-recorder-coverage"-grep -q "router-parallel-analyze.mjs" "$F" || miss="$miss no-analyzer-coverage"-# Asserts the 3 thresholds from ADR-150 review-round-1 are EXACTLY those-grep -q "qualityThresholdPct === 2" "$F" || miss="$miss no-quality-threshold-assertion"-grep -q "usdThresholdPct === 1" "$F" || miss="$miss no-cost-threshold-assertion"-grep -q "latencyThresholdPct === 5" "$F" || miss="$miss no-latency-threshold-assertion"-# Both promotable + non-promotable paths exercised-grep -q "promotable.*true\|verdict.promotable === true" "$F" || miss="$miss no-promotable-assertion"-grep -q "exits 1\|status === 1" "$F" || miss="$miss no-non-promotable-assertion"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17f. model-router.ts wires recordPair() (ADR-150 last-mile, iter 12)"-F="$ROOT/../../v3/@claude-flow/cli/src/ruvector/model-router.ts"-miss=""-[[ -f "$F" ]] || miss="$miss missing-file"-# Lazy loader registered-grep -q "loadParallelRecorder" "$F" || miss="$miss no-lazy-loader"-grep -q "router-parallel-recorder" "$F" || miss="$miss no-recorder-import"-# Env-gated (additive, off-by-default)-grep -q "CLAUDE_FLOW_ROUTER_PARALLEL_LOG === '1'" "$F" || miss="$miss no-env-gate-in-router"-# Call site present-grep -q "mod.recordPair({" "$F" || miss="$miss no-recordPair-call"-# Never-throws guarantee (ADR-150 rule #3)-grep -qE "try \{[[:space:]]*$|\\.catch\\(" "$F" || miss="$miss no-fail-safe"-# Both arms attributed (bandit + ser)-grep -q "thompson-bandit" "$F" || miss="$miss no-bandit-tag"-grep -q "metaharness-router-hybrid\|bandit-only" "$F" || miss="$miss no-ser-tag"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17e. router-parallel-recorder TS module (ADR-150 SelfEvolvingRouter recording — iter 11)"-F="$ROOT/../../v3/@claude-flow/cli/src/ruvector/router-parallel-recorder.ts"-miss=""-[[ -f "$F" ]] || miss="$miss missing-file"-# Architectural constraint #2: env-gated optional behavior-grep -q "CLAUDE_FLOW_ROUTER_PARALLEL_LOG" "$F" || miss="$miss no-env-gate"-# Constraint #3: graceful degradation — every appendFileSync is wrapped-grep -q "ADR-150" "$F" || miss="$miss no-adr-anchor"-grep -qE "never (throws|throw|block)|never throw" "$F" || miss="$miss no-no-throw-doc"-# Public API surface-grep -q "export function recordPair\b" "$F" || miss="$miss no-recordPair-export"-grep -q "export function recordPairOutcome\b" "$F" || miss="$miss no-recordPairOutcome-export"-grep -q "export function parallelRecorderStatus\b" "$F" || miss="$miss no-status-export"-# Pairs cleanly with the analyzer's expected JSONL shape-grep -q "task_hash" "$F" || miss="$miss no-task-hash"-grep -q "predictedQuality\|predictedCostUsd" "$F" || miss="$miss no-prediction-fields"-# Default path matches analyzer's default input-grep -q "router-parallel.jsonl" "$F" || miss="$miss path-mismatch-with-analyzer"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17d. router-parallel-analyze (ADR-150 SelfEvolvingRouter promotion gate — iter 10)"-F="$ROOT/scripts/router-parallel-analyze.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-# The 3-criteria AND-gate from ADR-150 review-round-1 must be explicit-grep -q "qualityImprovementPct" "$F" || miss="$miss no-quality-metric"-grep -q "usdIncreasePct" "$F" || miss="$miss no-cost-metric"-grep -q "latencyIncreasePct" "$F" || miss="$miss no-latency-metric"-# AND-semantics (not OR)-grep -q "passes.quality && passes.cost && passes.latency" "$F" || miss="$miss no-AND-gate"-# Thresholds documented in source-grep -q "qualityThresholdPct: 2" "$F" || miss="$miss no-quality-threshold"-grep -q "usdThresholdPct: 1" "$F" || miss="$miss no-cost-threshold"-grep -q "latencyThresholdPct: 5" "$F" || miss="$miss no-latency-threshold"-# Insufficient-data + strict modes both exit cleanly-grep -q "n=\${usable.length} < 30\|sufficient: false" "$F" || miss="$miss no-insufficient-guard"-grep -q "ARGS.strict" "$F" || miss="$miss no-strict-mode"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17c. oia-audit composite worker (Phase 2 — iter 7)"-F="$ROOT/scripts/oia-audit.mjs"-miss=""-[[ -x "$F" ]] || miss="$miss not-executable"-node --check "$F" 2>/dev/null || miss="$miss syntax-error"-grep -q "runHarness" "$F" || miss="$miss no-runner"-# All three component invocations-grep -q "oia-manifest" "$F" || miss="$miss no-oia-manifest"-grep -q "threat-model" "$F" || miss="$miss no-threat-model"-grep -q "mcp-scan" "$F" || miss="$miss no-mcp-scan"-# Composite severity computation-grep -q "compositeWorst\|composite.*Worst" "$F" || miss="$miss no-composite-severity"-grep -q "SEVERITY_RANK" "$F" || miss="$miss no-severity-rank"-# Memory persistence (default behavior, --dry-run to skip)-grep -q "metaharness-audit" "$F" || miss="$miss no-namespace"-grep -q "memory.*store" "$F" || miss="$miss no-memory-store"-# Alert exit code-grep -q "alert-on-worst" "$F" || miss="$miss no-alert-flag"-grep -q "process.exit(1)" "$F" || miss="$miss no-fail-closed"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17b. harness type in plugin registry (Phase 2 — iter 6)"-F="$ROOT/../../v3/@claude-flow/cli/src/plugins/store/types.ts"-miss=""-[[ -f "$F" ]] || miss="$miss types-file-missing"-grep -q "'harness'" "$F" 2>/dev/null || miss="$miss no-harness-type"-grep -q "ADR-150" "$F" 2>/dev/null || miss="$miss no-adr-anchor"-D="$ROOT/../../v3/@claude-flow/cli/src/plugins/store/discovery.ts"-grep -q "id: 'harness'" "$D" 2>/dev/null || miss="$miss no-harness-category"-[[ -z "$miss" ]] && ok || bad "$miss"--step "17. eject command — Phase 2 differentiator (iter 4)"-F="$ROOT/../../v3/@claude-flow/cli/src/commands/eject.ts"-miss=""-[[ -f "$F" ]] || miss="$miss command-file-missing"-grep -q "name: 'eject'" "$F" 2>/dev/null || miss="$miss no-name-field"-grep -q "from-existing" "$F" 2>/dev/null || miss="$miss no-from-existing-flag"-# Safety: must refuse writing inside the calling repo-grep -q "target-inside-repo" "$F" 2>/dev/null || miss="$miss no-repo-refusal"-grep -q "target-exists" "$F" 2>/dev/null || miss="$miss no-exists-refusal"-# Dry-run default — confirm flag required-grep -q "confirm" "$F" 2>/dev/null || miss="$miss no-confirm-flag"-grep -q "dryRun" "$F" 2>/dev/null || miss="$miss no-dryrun"-# Graceful degradation on missing binary-grep -q "metaharness-not-available\|degraded:" "$F" 2>/dev/null || miss="$miss no-graceful-deg"-# Registered in the loader-LOADER="$ROOT/../../v3/@claude-flow/cli/src/commands/index.ts"-grep -q "eject: () => import" "$LOADER" 2>/dev/null || miss="$miss not-registered-in-loader"-[[ -z "$miss" ]] && ok || bad "$miss"--printf "\n%s passed, %s failed\n" "$PASS" "$FAIL"-[[ $FAIL -eq 0 ]] || exit 1diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-graceful-degradation.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-graceful-degradation.mjsdeleted file mode 100755index dc8877f119..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-graceful-degradation.mjs+++ /dev/null@@ -1,149 +0,0 @@-#!/usr/bin/env node-// test-graceful-degradation.mjs — runtime drill for ADR-150 architectural-// constraint rule #3 (graceful degradation).-//-// CI runs this via .github/workflows/no-metaharness-smoke.yml; this-// script lets developers reproduce the same drill locally for fast-// iteration (no GitHub Actions roundtrip).-//-// STRATEGY-// Point `npm_config_registry` at an unresolvable host, then invoke every-// metaharness-CLI-dependent skill. Each MUST:-// (a) exit 0 — never propagate a failure code from a missing optional dep-// (b) emit JSON containing `"degraded": true` somewhere in its output-//-// The 8 covered skills (all rely on `npx metaharness` / `npx -p-// metaharness harness`):-// score / genome / mcp-scan / threat-model / oia-audit /-// audit-list / audit-trend / mint-//-// (audit-list + audit-trend talk to `npx @claude-flow/cli memory ...`-// rather than metaharness — they're tested separately for the-// "no records in namespace" graceful path.)-//-// USAGE-// node scripts/test-graceful-degradation.mjs # default-// node scripts/test-graceful-degradation.mjs --keep-fixtures # for debugging-//-// EXIT CODES-// 0 all skills gracefully degraded-// 1 at least one skill failed the contract (exit != 0 or no degraded:true)-// 2 setup error--import { spawnSync } from 'node:child_process';-import { dirname, join } from 'node:path';-import { fileURLToPath } from 'node:url';--const SCRIPTS_DIR = dirname(fileURLToPath(import.meta.url));--const ARGS = (() => {- const a = { keep: false };- for (let i = 2; i < process.argv.length; i++) {- if (process.argv[i] === '--keep-fixtures') a.keep = true;- }- return a;-})();--const UNREACHABLE_REGISTRY = 'https://no-such-registry-9c8c43.example.invalid/';--let passed = 0, failed = 0;-const failures = [];--function assert(cond, label) {- console.log(` ${cond ? '✓' : '✗'} ${label}`);- if (cond) passed++;- else { failures.push(label); failed++; }-}--function runWithUnreachableRegistry(scriptName, extraArgs) {- const r = spawnSync('node', [join(SCRIPTS_DIR, scriptName), ...extraArgs], {- env: {- ...process.env,- npm_config_registry: UNREACHABLE_REGISTRY,- NPM_CONFIG_REGISTRY: UNREACHABLE_REGISTRY,- },- stdio: ['ignore', 'pipe', 'pipe'],- encoding: 'utf-8',- // 180s per subprocess — long enough for npx's DNS-retry + 60s- // subprocess timeout inside _harness.mjs to elapse. Smaller- // timeouts here truncate the subprocess BEFORE it reaches its- // own degraded-payload emit, which made earlier iterations of- // this drill report false negatives (exit 1 from harness kill,- // not from the script).- timeout: 180_000,- });- return {- // r.status is null when the subprocess was killed by our timeout.- // Distinguish that case explicitly so callers can see "drill- // harness killed it" vs "script exited non-zero".- exitCode: r.status,- stdout: r.stdout || '',- stderr: r.stderr || '',- killedByTimeout: r.status === null,- };-}--function main() {- console.log('# test-graceful-degradation\n');- console.log(`Registry: ${UNREACHABLE_REGISTRY}`);- console.log('Each skill must exit 0 AND emit "degraded": true in JSON.\n');-- // The 5 skills that directly invoke metaharness/harness binaries.- // (audit-list / audit-trend talk to claude-flow's memory layer, not- // metaharness; they have their own empty-namespace graceful paths- // tested separately. mint requires a --name argv to even start.)- // iter 55 — extending this list discovered 3 latent gaps:- // - oia-audit can exceed 180s in the unreachable-registry case- // (composes 5 subprocesses, each retries DNS)- // - mint's degraded payload doesn't currently include the- // literal "degraded": true marker- // - drift-from-history exits 2 (config error: no history) rather- // than 3 (test-cannot-run) when there are no audit records yet- // These are real bugs filed for follow-up; the workflow-level drill- // (`.github/workflows/no-metaharness-smoke.yml`) covers them in a- // fresh CI environment where DNS failure is faster, but they're- // unreliable to assert locally. Keeping the local drill at the 5- // skills it reliably tests until the underlying graceful-degradation- // contracts are tightened.- const skills = [- { name: 'score', args: ['--format', 'json'] },- { name: 'genome', args: ['--format', 'json'] },- { name: 'mcp-scan', args: ['--format', 'json'] },- { name: 'threat-model', args: ['--format', 'json'] },- { name: 'oia-audit', args: ['--dry-run', '--format', 'json'] },- // ADR-153 — darwin scripts (separate optional dep @metaharness/darwin).- // evolve.mjs without --confirm short-circuits to a dry-run plan BEFORE- // any subprocess call, so it's not exercising the degraded path. Pass- // --confirm with --sandbox mock + minimal shape so we hit the subprocess- // path quickly and verify the {degraded: true} emit on registry-unreachable.- { name: 'evolve', args: ['--repo', '.', '--confirm', '--sandbox', 'mock', '--generations', '1', '--children', '1', '--concurrency', '1', '--timeout-ms', '60000'] },- { name: 'security-bench', args: ['--population', '1', '--cycles', '1', '--timeout-ms', '60000'] },- { name: 'bench', args: ['--op', 'verify', '--suite', '/dev/null'] },- ];-- for (const s of skills) {- console.log(`-- ${s.name} --`);- const r = runWithUnreachableRegistry(`${s.name}.mjs`, s.args);- if (process.env.DEBUG || r.killedByTimeout || r.exitCode !== 0) {- // Surface the failure context: drill timeouts and unexpected exits- // are both worth seeing, otherwise debugging is blind.- console.log(` stdout (last 400): ${r.stdout.slice(-400)}`);- console.log(` stderr (last 300): ${r.stderr.slice(-300)}`);- if (r.killedByTimeout) console.log(` (killed by drill 180s timeout)`);- }- const acceptable = s.acceptableExits ?? [0];- assert(acceptable.includes(r.exitCode) || (acceptable.length === 1 && r.exitCode === 0),- `${s.name} exit code in {${acceptable.join(',')}} (got ${r.killedByTimeout ? 'timeout' : r.exitCode})`);- assert(/"degraded"\s*:\s*true/.test(r.stdout), `${s.name} emits "degraded": true`);- }-- console.log(`\n${passed} passed, ${failed} failed`);- if (failed > 0) {- console.log('\nFailures:');- for (const f of failures) console.log(` - ${f}`);- process.exit(1);- }- console.log('\n✓ All skills satisfy ADR-150 rule #3 (graceful degradation).');-}--main();diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-mcp-tools.mjsdeleted file mode 100755index c6db600fef..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs+++ /dev/null@@ -1,472 +0,0 @@-#!/usr/bin/env node-// test-mcp-tools.mjs — runtime test for the iter-20/21 MCP tool registry.-//-// tsc proves the metaharness-tools.ts module COMPILES; structural smoke-// proves the source DECLARES the right tool names. Neither proves the-// HANDLERS actually run without throwing. This test imports the compiled-// module and invokes every tool's handler with minimal inputs.-//-// CONTRACT EACH TOOL MUST SATISFY-// - handler is callable as `await tool.handler({ ... })`-// - returns an object with keys: success, data, degraded, exitCode-// - never throws (even with bad/missing optional dep — graceful)-// - handler honors the 120s subprocess timeout (no hang)-//-// USAGE-// node scripts/test-mcp-tools.mjs # default-// node scripts/test-mcp-tools.mjs --format json-//-// EXIT CODES-// 0 all tools satisfy the contract-// 1 at least one tool failed-// 2 setup error (compiled dist not present)--import { existsSync } from 'node:fs';-import { dirname, join, resolve } from 'node:path';-import { fileURLToPath } from 'node:url';--const SCRIPTS_DIR = dirname(fileURLToPath(import.meta.url));-const ARGS = (() => {- const a = { format: 'table' };- for (let i = 2; i < process.argv.length; i++) {- if (process.argv[i] === '--format') a.format = process.argv[++i];- }- return a;-})();--let passed = 0, failed = 0;-const failures = [];--function assert(cond, label) {- if (cond) { console.log(` ✓ ${label}`); passed++; }- else { console.log(` ✗ ${label}`); failures.push(label); failed++; }-}--async function main() {- // Locate the compiled dist of metaharness-tools.- const distPath = resolve(SCRIPTS_DIR, '..', '..', '..',- 'v3', '@claude-flow', 'cli', 'dist', 'src', 'mcp-tools', 'metaharness-tools.js');-- if (!existsSync(distPath)) {- console.log(`# test-mcp-tools — SKIPPED`);- console.log('');- console.log(`Compiled dist not present: ${distPath}`);- console.log(`Build the CLI first:`);- console.log(` cd v3/@claude-flow/cli && npm run build`);- console.log('');- console.log(`Exit 0 — this script is meaningfully runnable only post-build.`);- process.exit(0);- }-- let mod;- try {- mod = await import(distPath);- } catch (e) {- console.error(`test-mcp-tools: failed to import ${distPath}: ${e.message}`);- process.exit(2);- }-- const tools = mod.metaharnessTools;- console.log(`# test-mcp-tools — runtime contract\n`);-- // ──────────────────────────────────────────────────────────────────- // PHASE 1 — module exports the right shape- // ──────────────────────────────────────────────────────────────────- console.log('Phase 1 — module shape');- assert(Array.isArray(tools), 'metaharnessTools is an array');- assert(tools.length === 15, `15 tools registered (got ${tools.length})`);-- const expectedNames = new Set([- 'metaharness_score',- 'metaharness_genome',- 'metaharness_mcp_scan',- 'metaharness_threat_model',- 'metaharness_oia_audit',- 'metaharness_audit_list',- 'metaharness_audit_trend',- // iter 36 — ADR-152 §3.1 production- 'metaharness_similarity',- // iter 54 — one-command drift detection (composes audit-list + oia-audit + audit-trend)- 'metaharness_drift_from_history',- // ADR-153 — bench suites + evolve driver + security-focused bench- 'metaharness_bench',- 'metaharness_evolve',- 'metaharness_security_bench',- // @metaharness/redblue@~0.1.4 — adversarial red/blue LLM testing- 'metaharness_redblue',- // [email protected] — upstream ADR-235 GEPA learning run- 'metaharness_learn',- // @metaharness/[email protected] — GEPA library surface (genome ops)- 'metaharness_gepa',- ]);- const actualNames = new Set(tools.map((t) => t.name));- for (const name of expectedNames) {- assert(actualNames.has(name), `${name} registered`);- }-- // ──────────────────────────────────────────────────────────────────- // PHASE 2 — every tool has the required MCP shape- // ──────────────────────────────────────────────────────────────────- console.log('\nPhase 2 — per-tool shape');- for (const tool of tools) {- const ok = typeof tool.name === 'string'- && typeof tool.description === 'string'- && typeof tool.category === 'string'- && typeof tool.handler === 'function'- && typeof tool.inputSchema === 'object';- assert(ok, `${tool.name} has {name, description, category, handler, inputSchema}`);- assert(tool.category === 'metaharness', `${tool.name} category === 'metaharness'`);- }-- // ──────────────────────────────────────────────────────────────────- // PHASE 3 — handlers callable + return contract shape- //- // We invoke each handler with minimal valid input. The handlers may- // succeed (if metaharness is installed) or report degraded (if not).- // EITHER way, they must return { success, data, degraded, exitCode }- // without throwing.- // ──────────────────────────────────────────────────────────────────- console.log('\nPhase 3 — handler invocations (allow up to 30s each)');- for (const tool of tools) {- // Construct minimal valid input per tool.- let input = {};- if (tool.name === 'metaharness_audit_trend') {- // Requires baselineKey + currentKey — use fake keys that won't- // resolve so we exercise the not-found path.- input = { baselineKey: 'audit-fake-base', currentKey: 'audit-fake-curr' };- }- if (tool.name === 'metaharness_similarity') {- // Needs --a/--b OR --a-key/--b-key. Use fake mem keys to exercise- // the graceful not-found path (matches audit_trend convention).- input = { aKey: 'harness-fake-a', bKey: 'harness-fake-b' };- }- if (tool.name === 'metaharness_drift_from_history') {- // iter 54 — composes 3 subprocesses, needs more time than the default.- input = { dryRun: true, threshold: 0.5 };- }- if (tool.name === 'metaharness_oia_audit') {- // iter 128 — composite audit runs 5 sub-audits (oia-manifest +- // threat-model + mcp-scan + score + genome) in parallel. Each- // shells out via npx. --dry-run skips memory persistence so the- // test doesn't pollute namespaces.- input = { dryRun: true };- }- if (tool.name === 'metaharness_redblue') {- // `attack` preview is the fastest path that exercises the upstream- // binary without needing OPENROUTER_API_KEY or running any model- // calls. Count=1 keeps cold-cache npx fetch the dominant cost.- input = { subcommand: 'attack', family: 'prompt', count: 1 };- }- if (tool.name === 'metaharness_learn') {- // No repo checkout in CI → structured {status:"checkout-required"}- // exit-0 path. $0: without run=true upstream never spends anyway.- input = {};- }- if (tool.name === 'metaharness_gepa') {- // op is required; `genome` loads + validates the SHIPPED cand-6- // genome — pure-local library call once darwin is cached.- input = { op: 'genome' };- }-- // iter 124 → 130 — timeouts have crept up as CI cold-cache npx- // warmup costs got measured. Final budgets:- // default : 60s- // chain-tools : 180s (drift_from_history + oia_audit + audit_list)- // iter 131 — bumped chain-tool budget 90s → 180s. audit_list still- // timed out at 90s in CI; locally it runs in ~4s, but CI's- // `npx @claude-flow/cli@latest memory list` invocation pays both- // the npx fetch AND a full CLI startup (which loads agentic-flow +- // ONNX). 180s gives 30x headroom over the local cost.- const isChainTool = tool.name === 'metaharness_drift_from_history'- || tool.name === 'metaharness_oia_audit'- || tool.name === 'metaharness_audit_list'- // redblue: `attack prompt --count 1` is preview-only (no model- // calls) but the cold-cache `npx -y @metaharness/redblue@~0.1.4`- // fetch can take 30-60s. 180s gives 3x headroom.- || tool.name === 'metaharness_redblue'- // learn: cold-cache `npx -y metaharness@latest` fetch dominates.- // gepa: one-time `npm install --prefix ~/.ruflo/darwin-cache-*`- // fallback install can take 30-60s on cold cache.- || tool.name === 'metaharness_learn'- || tool.name === 'metaharness_gepa';- const timeoutMs = isChainTool ? 180_000 : 60_000;- const handlerPromise = tool.handler(input);- const timeoutPromise = new Promise((_, reject) =>- setTimeout(() => reject(new Error(`${timeoutMs / 1000}s handler timeout`)), timeoutMs));-- let result;- let threw = false;- try {- result = await Promise.race([handlerPromise, timeoutPromise]);- } catch (e) {- threw = true;- console.log(` [${tool.name}] handler threw: ${e.message.slice(0, 80)}`);- }-- assert(!threw, `${tool.name} handler did not throw`);- if (!threw && result) {- assert(typeof result === 'object', `${tool.name} returns object`);- assert('success' in result, `${tool.name} result has 'success'`);- assert('data' in result, `${tool.name} result has 'data'`);- assert('degraded' in result, `${tool.name} result has 'degraded'`);- assert('exitCode' in result, `${tool.name} result has 'exitCode'`);- }- }-- // ──────────────────────────────────────────────────────────────────- // PHASE 4 — POSITIVE-CASE data-shape validation (iter 43)- //- // Iter 37 verified the {success, data, degraded, exitCode} envelope.- // It did NOT verify that data.X contains the right keys when success- // is genuinely true — leaving room for iter 42-style bugs where a- // handler returns valid-looking degraded JSON while silently- // misrouting input. This phase invokes each handler with VALID- // inputs and asserts the expected output shape.- //- // Tools that depend on `npx metaharness` (score/genome/mcp-scan/- // threat-model/oia-audit/audit-list/audit-trend) are SKIPPED in this- // phase when the optional dep isn't installed — they're covered by- // the no-metaharness-smoke workflow's drill. The similarity tool- // has no @metaharness/* dep, so its positive case ALWAYS runs.- // ──────────────────────────────────────────────────────────────────- console.log('\nPhase 4 — positive-case data shape (iter 43)');-- const { writeFileSync, mkdtempSync } = await import('node:fs');- const { tmpdir } = await import('node:os');- const { join: pjoin } = await import('node:path');- const tmp = mkdtempSync(pjoin(tmpdir(), 'mcp-positive-'));-- // metaharness_similarity — full positive case (no @metaharness/* needed)- const simTool = tools.find((t) => t.name === 'metaharness_similarity');- if (simTool) {- const aPath = pjoin(tmp, 'a.json');- const bPath = pjoin(tmp, 'b.json');- writeFileSync(aPath, JSON.stringify({- score: { harnessFit: 78, compileConfidence: 92, taskCoverage: 65, toolSafety: 88, memoryUsefulness: 70, estCostPerRunUsd: 0.04, recommendedMode: 'CLI + MCP', archetype: 'compliance-harness', template: 'vertical:legal' },- genome: { repo_type: 'node_mcp_ci', agent_topology: ['x','y','z','w'], risk_score: 0.45, test_confidence: 0.7, publish_readiness: 0.6 },- }));- writeFileSync(bPath, JSON.stringify({- score: { harnessFit: 75, compileConfidence: 90, taskCoverage: 70, toolSafety: 90, memoryUsefulness: 72, estCostPerRunUsd: 0.05, recommendedMode: 'CLI + MCP', archetype: 'compliance-harness', template: 'vertical:support' },- genome: { repo_type: 'node_mcp_ci', agent_topology: ['x','y','z','q','r'], risk_score: 0.40, test_confidence: 0.75, publish_readiness: 0.65 },- }));- const r = await simTool.handler({ aFile: aPath, bFile: bPath });- assert(r.degraded === false, 'similarity positive case: degraded === false');- assert(r.success === true, 'similarity positive case: success === true');- assert(r.exitCode === 0, 'similarity positive case: exitCode === 0');- const d = r.data ?? {};- assert(typeof d.overall === 'number', 'similarity data has numeric `overall`');- assert(typeof d.components === 'object' && d.components !== null,- 'similarity data has `components` object');- assert(typeof d.components?.cosine === 'number',- 'similarity components.cosine numeric');- assert(typeof d.components?.categorical === 'number',- 'similarity components.categorical numeric');- assert(typeof d.components?.jaccard === 'number',- 'similarity components.jaccard numeric');- assert(typeof d.weights === 'object' && d.weights !== null,- 'similarity data has `weights` object');- assert(d.adr === 'ADR-152', 'similarity data tagged adr=ADR-152');- // Regression anchor — same fixtures as iter-35 spike with non-matching topologies- assert(d.overall > 0 && d.overall < 1,- `similarity overall in (0, 1) — got ${d.overall}`);-- // Per-dimension variant- const rPD = await simTool.handler({ aFile: aPath, bFile: bPath, perDimension: true });- assert(typeof rPD.data?.perDimension === 'object',- 'similarity perDimension=true populates breakdown');-- // Alert-below variant exercises non-zero exit- const rAlert = await simTool.handler({ aFile: aPath, bFile: bPath, alertBelow: 0.99 });- assert(rAlert.data?.alert?.triggered === true,- 'similarity alertBelow=0.99 triggers alert');- assert(rAlert.exitCode === 1, 'similarity alertBelow=0.99 → exitCode 1');- // iter 44 — success semantic anchor (was true under the pre-iter-44- // `!degraded` rule; now false because exitCode !== 0 dominates).- assert(rAlert.success === false,- 'similarity alertBelow=0.99 → success === false (iter 44 fix)');- }-- // metaharness_mcp_scan — positive case post iter-50 parser landing.- // Until iter 50, mcp_scan's data field was an alert-only object with- // no structured findings. After iter 50, findings[] is always present- // (parsed from upstream text) and summary{overallSeverity, totalCount}- // accompanies it.- const scanTool = tools.find((t) => t.name === 'metaharness_mcp_scan');- if (scanTool) {- // Run against ruflo itself — guaranteed to produce at least the- // INFO finding the iter-50 parser test verified manually.- const r = await scanTool.handler({ path: '.', failOn: 'high' });- // Either succeeds with structured findings, or gracefully degrades- // if metaharness isn't installed in this environment.- if (!r.degraded) {- assert(r.success === true, 'mcp_scan positive: success === true');- assert(r.exitCode === 0, 'mcp_scan positive: exitCode === 0');- assert(Array.isArray(r.data?.findings),- 'mcp_scan positive: data.findings is an array (iter 50 fix)');- // Cwd-dependent: when scanning a dir without .mcp/servers.json the- // upstream emits no findings. Only verify shape contract when array- // is populated — the array-presence assertion above is the- // load-bearing one for iter 50.- if (r.data?.findings.length > 0) {- const first = r.data.findings[0];- assert(typeof first?.severity === 'string',- 'mcp_scan positive: first finding has string severity');- assert(typeof first?.message === 'string',- 'mcp_scan positive: first finding has string message');- }- // summary may be null if the upstream produced no Result: line —- // verify the field's presence (null OR object) but only deep-check- // when populated.- if (r.data?.summary) {- assert(typeof r.data.summary.totalCount === 'number',- 'mcp_scan positive: data.summary.totalCount is numeric (when summary present)');- }- } else {- console.log(` ⊘ mcp_scan: metaharness absent — graceful skip`);- }- }-- // metaharness_audit_trend — positive case via file inputs- const trendTool = tools.find((t) => t.name === 'metaharness_audit_trend');- if (trendTool) {- const basePath = pjoin(tmp, 'base.json');- const currPath = pjoin(tmp, 'curr.json');- const fingerprint = {- score: { harnessFit: 80, recommendedMode: 'CLI + MCP', archetype: 'typescript-sdk-harness', template: 'vertical:coding' },- genome: { repo_type: 'node_mcp_ci', agent_topology: ['a','b','c'], risk_score: 0.3, test_confidence: 0.85, publish_readiness: 0.9 },- };- writeFileSync(basePath, JSON.stringify({- startedAt: '2026-06-15T00:00:00Z',- composite: { worst: 'clean' },- components: { oiaManifest: {}, threatModel: {}, mcpScan: { json: { findings: [] } } },- fingerprint,- }));- writeFileSync(currPath, JSON.stringify({- startedAt: '2026-06-16T00:00:00Z',- composite: { worst: 'clean' },- components: { oiaManifest: {}, threatModel: {}, mcpScan: { json: { findings: [] } } },- fingerprint,- }));- // audit_trend tool only supports keys, not files at the MCP layer.- // Document its actual wrapper semantics so future-us doesn't get- // surprised:- // - bad keys → script exits 2 with stderr (no JSON payload)- // - runScript() can't parse a {degraded:true} marker, so it- // returns degraded:false / success:true / exitCode:2- // This is a real wrapper bug (success should not be true when- // exit!=0 AND no JSON came back), tracked separately. Asserting- // current behavior here protects against silent semantic shifts.- // iter 46 — file-input path. audit_trend now accepts baselineFile/currentFile.- const rFiles = await trendTool.handler({ baselineFile: basePath, currentFile: currPath });- assert(rFiles.success === true,- 'audit_trend file-input path: success === true (iter 46)');- assert(rFiles.exitCode === 0, 'audit_trend file-input path: exitCode === 0');- assert(typeof rFiles.data?.delta === 'object',- 'audit_trend file-input path: data.delta object present');- assert(rFiles.data?.delta?.structuralDistance?.verdict === 'near-identical',- `audit_trend file-input path: identical fingerprints → near-identical (got ${rFiles.data?.delta?.structuralDistance?.verdict})`);-- // iter 54 — metaharness_drift_from_history positive case- const driftTool = tools.find((t) => t.name === 'metaharness_drift_from_history');- if (driftTool) {- // iter 71 — verify iter-66/67 fast-path flags are now MCP-callable- // Synthesize a baseline file on disk; pass via the new baselineFile input.- const baselinePath = pjoin(tmp, 'drift-baseline.json');- writeFileSync(baselinePath, JSON.stringify({- startedAt: '2026-06-16T00:00:00Z',- composite: { worst: 'clean' },- components: { oiaManifest: {}, threatModel: {}, mcpScan: { json: { findings: [] } } },- fingerprint: {- score: { harnessFit: 82, recommendedMode: 'CLI + MCP', archetype: 'typescript-sdk-harness', template: 'vertical:coding' },- genome: { repo_type: 'node_mcp_ci', agent_topology: ['m', 't'], risk_score: 0.3 },- },- }));- const rFastFast = await driftTool.handler({- path: '.', dryRun: true, threshold: 0.5, baselineFile: baselinePath,- });- if (!rFastFast.degraded) {- assert(rFastFast.data?.timing?.usedBaselineFile === true,- 'drift_from_history MCP-layer: baselineFile fastpath fires (iter 71)');- assert(rFastFast.data?.timing?.skippedAuditList === true,- 'drift_from_history MCP-layer: skippedAuditList=true via baselineFile (iter 71)');- }-- // iter 85 — verify iter-78's alertOnNewSeverity MCP input plumbs- // through. baselineFile has no findings; current ruflo audit has- // 1 INFO finding. With alertOnNewSeverity='info' the gate fires- // and surfaces in the response.- const baselineNoFindings = pjoin(tmp, 'drift-baseline-no-findings.json');- writeFileSync(baselineNoFindings, JSON.stringify({- startedAt: '2026-06-16T00:00:00Z',- composite: { worst: 'clean' },- components: { oiaManifest: {}, threatModel: {}, mcpScan: { json: { findings: [] } } },- fingerprint: {- score: { harnessFit: 82, recommendedMode: 'CLI + MCP', archetype: 'typescript-sdk-harness', template: 'vertical:coding' },- genome: { repo_type: 'node_mcp_ci', agent_topology: ['m', 't'], risk_score: 0.3 },- },- }));- const rSevAlert = await driftTool.handler({- path: '.', dryRun: true, threshold: 0.5,- baselineFile: baselineNoFindings,- alertOnNewSeverity: 'info',- });- if (!rSevAlert.degraded) {- assert(rSevAlert.data?.alert?.newSeverityThreshold === 'info',- 'drift_from_history MCP-layer: alertOnNewSeverity echoed in payload (iter 85)');- // Triggered AND exit code reflects (only if the audit actually had findings)- if (rSevAlert.data?.alert?.triggered === true) {- assert(rSevAlert.exitCode === 1,- `drift_from_history MCP-layer: alertOnNewSeverity exitCode=1 when triggered (got ${rSevAlert.exitCode})`);- assert(rSevAlert.success === false,- 'drift_from_history MCP-layer: success===false when alert fires (iter 44 fix)');- }- }-- const r54 = await driftTool.handler({ path: '.', dryRun: true, threshold: 0.5 });- if (!r54.degraded) {- assert(typeof r54.data === 'object' && r54.data !== null,- 'drift_from_history positive: data is an object');- // Either it produced the structured drift report OR the no-history error- const isOk = r54.data?.command === 'drift-from-history';- const isNoHistory = typeof r54.data?.error === 'string' && r54.data.error.includes('no audit records');- assert(isOk || isNoHistory,- `drift_from_history positive: structured report OR no-history error (got ${JSON.stringify(r54.data).slice(0,80)})`);- if (isOk) {- assert(typeof r54.data.baseline?.key === 'string',- 'drift_from_history: baseline.key is a string');- assert(typeof r54.data.alert?.threshold === 'number',- 'drift_from_history: alert.threshold echoed numerically');- }- } else {- console.log(` ⊘ drift_from_history: degraded (metaharness or memory absent)`);- }- }-- const r = await trendTool.handler({ baselineKey: 'missing-X', currentKey: 'missing-Y' });- assert(r.exitCode === 2,- 'audit_trend bad-keys path exits 2 (script-level guard fires)');- assert(r.data === null || r.data === undefined,- 'audit_trend bad-keys path: data null (no JSON emitted on stderr exit)');- // iter 44 — success semantic anchor. Pre-iter-44 wrapper returned- // success:true for this case (because no degraded marker). Now- // returns false because exitCode !== 0.- assert(r.success === false,- 'audit_trend bad-keys path: success === false (iter 44 fix)');- }-- // Cleanup- try { (await import('node:fs')).rmSync(tmp, { recursive: true, force: true }); } catch { /* ignore */ }-- console.log(`\n${passed} passed, ${failed} failed`);- if (failed > 0) {- console.log('\nFailures:');- for (const f of failures) console.log(` - ${f}`);- process.exit(1);- }- console.log('\n✓ All 15 MCP tools satisfy the runtime contract.');-}--main().catch((e) => {- console.error('test-mcp-tools crashed:', e.message || e);- process.exit(2);-});diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-parallel-pipeline.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-parallel-pipeline.mjsdeleted file mode 100755index 49a721dcfc..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-parallel-pipeline.mjs+++ /dev/null@@ -1,204 +0,0 @@-#!/usr/bin/env node-// test-parallel-pipeline — end-to-end integration test for ADR-150's-// SelfEvolvingRouter parallel-logging pipeline.-//-// Composition under test:-// recordPair() / recordPairOutcome() [iter 11 — TS module]-// → .swarm/router-parallel.jsonl [JSONL trajectory]-// → router-parallel-analyze.mjs [iter 10 — analyzer]-// → 3-criteria AND-gate verdict [ADR-150 review-round-1]-//-// This script bypasses model-router.ts dispatch and calls the recorder-// directly, so it tests the recorder + analyzer composition WITHOUT-// requiring a built CLI dist. Iter-12 dispatch wiring is covered by-// the smoke step 17f source-grep.-//-// USAGE-// node scripts/test-parallel-pipeline.mjs # default-// TEST_PIPELINE_KEEP_FIXTURE=1 node scripts/test-parallel-pipeline.mjs-// # leave temp files for debugging-//-// EXIT CODES-// 0 all assertions passed-// 1 at least one assertion failed-// 2 setup error (e.g. tsc dist not buildable, recorder module missing)--import { spawnSync } from 'node:child_process';-import { mkdtempSync, rmSync, mkdirSync, existsSync, readFileSync, writeFileSync } from 'node:fs';-import { tmpdir } from 'node:os';-import { join, dirname } from 'node:path';-import { fileURLToPath } from 'node:url';--const SCRIPTS_DIR = dirname(fileURLToPath(import.meta.url));--let passed = 0, failed = 0;-const failures = [];--function assert(cond, label) {- if (cond) {- console.log(` ✓ ${label}`);- passed++;- } else {- console.log(` ✗ ${label}`);- failures.push(label);- failed++;- }-}--async function main() {- const fixture = mkdtempSync(join(tmpdir(), 'router-parallel-e2e-'));- const jsonlPath = join(fixture, 'router-parallel.jsonl');- console.log(`# router-parallel pipeline e2e (fixture: ${fixture})\n`);-- // ──────────────────────────────────────────────────────────────────- // PHASE 1 — Synthesize a realistic JSONL trajectory by hand.- //- // We can't easily import the TS recorder without a build step, so we- // emit the same JSONL shape the recorder produces. This isolates the- // analyzer pipeline test from compile state.- // ──────────────────────────────────────────────────────────────────- console.log('Phase 1 — synthesize trajectory');-- const rows = [];- // 40 paired decisions: SER beats bandit on quality (+5%) at +0.5% cost- // and +1% latency — should pass the 3-criteria AND-gate.- for (let i = 0; i < 40; i++) {- const q_actual = 0.78 + Math.random() * 0.04;- const u_actual = 0.005 + Math.random() * 0.001;- const l_actual = 1500 + Math.random() * 200;- const disagree = i % 2 === 0;- rows.push({- v: 1, type: 'pair',- ts: new Date(Date.now() - (40 - i) * 1000).toISOString(),- task_hash: `task-${i.toString(16).padStart(8, '0')}`,- bandit: {- pick: 'sonnet',- predictedQuality: q_actual - 0.02,- predictedCostUsd: u_actual,- backend: 'thompson-bandit',- },- ser: {- pick: disagree ? 'opus' : 'sonnet',- predictedQuality: disagree ? q_actual + 0.10 : q_actual + 0.01,- predictedCostUsd: disagree ? u_actual * 1.005 : u_actual,- backend: disagree ? 'metaharness-router-hybrid' : 'bandit-only',- },- outcome: {- actualModel: 'sonnet',- actualQuality: q_actual,- actualUsd: u_actual,- actualLatencyMs: Math.round(l_actual),- },- });- }-- writeFileSync(jsonlPath, rows.map((r) => JSON.stringify(r)).join('\n') + '\n');- assert(existsSync(jsonlPath), 'fixture JSONL written');- assert(rows.length === 40, '40 pair rows synthesized');-- // ──────────────────────────────────────────────────────────────────- // PHASE 2 — Verify recorder TS module compiles and exports the API.- // ──────────────────────────────────────────────────────────────────- console.log('\nPhase 2 — verify recorder TS module exports');-- const recorderTs = join(SCRIPTS_DIR, '..', '..', '..', 'v3', '@claude-flow', 'cli', 'src', 'ruvector', 'router-parallel-recorder.ts');- const recorderSrc = readFileSync(recorderTs, 'utf-8');-- assert(/export function recordPair\b/.test(recorderSrc), 'recordPair exported');- assert(/export function recordPairOutcome\b/.test(recorderSrc), 'recordPairOutcome exported');- assert(/export function parallelRecorderStatus\b/.test(recorderSrc), 'parallelRecorderStatus exported');- assert(/CLAUDE_FLOW_ROUTER_PARALLEL_LOG/.test(recorderSrc), 'env-gated by CLAUDE_FLOW_ROUTER_PARALLEL_LOG');- // ADR-150 rule #3 — never throw- assert(/never throws|never (throw|block)/i.test(recorderSrc), 'no-throw doc invariant present');- // Try/catch around fs operations- assert(/try \{[\s\S]*?appendFileSync[\s\S]*?\} catch/.test(recorderSrc), 'appendFileSync wrapped in try/catch');-- // ──────────────────────────────────────────────────────────────────- // PHASE 3 — Run the analyzer against the synthesized JSONL.- // ──────────────────────────────────────────────────────────────────- console.log('\nPhase 3 — run analyzer against fixture');-- const analyzer = join(SCRIPTS_DIR, 'router-parallel-analyze.mjs');- const r = spawnSync('node', [analyzer, '--input', jsonlPath, '--format', 'json'], {- encoding: 'utf-8',- timeout: 30_000,- });- assert(r.status === 0, `analyzer exit 0 (got ${r.status})`);-- let payload;- try {- payload = JSON.parse(r.stdout);- } catch (e) {- console.error(' stdout:', r.stdout.slice(0, 400));- console.error(' stderr:', r.stderr.slice(0, 400));- assert(false, `analyzer output parseable as JSON (${e.message})`);- process.exit(2);- }-- assert(payload.ok === true, 'payload.ok === true');- assert(payload.sufficient === true, 'payload.sufficient === true (n>=30)');- assert(payload.sampleSize === 40, `sampleSize === 40 (got ${payload.sampleSize})`);- assert(typeof payload.disagreement?.pct === 'number', 'disagreement.pct numeric');-- // The 3 criteria must each be computed.- assert(typeof payload.criteria?.qualityImprovementPct === 'number', 'criteria.qualityImprovementPct present');- assert(typeof payload.criteria?.usdIncreasePct === 'number', 'criteria.usdIncreasePct present');- assert(typeof payload.criteria?.latencyIncreasePct === 'number', 'criteria.latencyIncreasePct present');-- // Thresholds match ADR-150 review-round-1 exactly.- assert(payload.criteria?.qualityThresholdPct === 2, 'quality threshold = 2%');- assert(payload.criteria?.usdThresholdPct === 1, 'cost threshold = 1%');- assert(payload.criteria?.latencyThresholdPct === 5, 'latency threshold = 5%');-- // For the promotable fixture, all three criteria should pass.- assert(payload.criteria?.qualityPasses === true, 'quality > 2% passes');- assert(payload.criteria?.costPasses === true, 'cost < 1% passes');- assert(payload.criteria?.latencyPasses === true, 'latency < 5% passes');- assert(payload.verdict?.promotable === true, 'verdict.promotable === true');-- // ──────────────────────────────────────────────────────────────────- // PHASE 4 — Strict mode behavior.- // ──────────────────────────────────────────────────────────────────- console.log('\nPhase 4 — verify --strict semantics');-- const strictOk = spawnSync('node', [analyzer, '--input', jsonlPath, '--strict'], { encoding: 'utf-8', timeout: 30_000 });- assert(strictOk.status === 0, '--strict on promotable fixture exits 0');-- // Synthesize a non-promotable fixture (quality gain only +1%, below 2% threshold).- const badPath = join(fixture, 'non-promotable.jsonl');- const badRows = [];- for (let i = 0; i < 40; i++) {- const q = 0.80;- badRows.push({- v: 1, type: 'pair',- ts: new Date().toISOString(),- task_hash: `bad-${i.toString(16).padStart(8, '0')}`,- bandit: { pick: 'sonnet', predictedQuality: q, predictedCostUsd: 0.005, backend: 'thompson-bandit' },- ser: { pick: 'sonnet', predictedQuality: q + 0.005, predictedCostUsd: 0.005, backend: 'bandit-only' },- outcome: { actualModel: 'sonnet', actualQuality: q, actualUsd: 0.005, actualLatencyMs: 1500 },- });- }- writeFileSync(badPath, badRows.map((r) => JSON.stringify(r)).join('\n') + '\n');- const strictBad = spawnSync('node', [analyzer, '--input', badPath, '--strict'], { encoding: 'utf-8', timeout: 30_000 });- assert(strictBad.status === 1, '--strict on NON-promotable fixture exits 1 (got ' + strictBad.status + ')');-- // Cleanup- if (process.env.TEST_PIPELINE_KEEP_FIXTURE !== '1') {- rmSync(fixture, { recursive: true, force: true });- } else {- console.log(`\n(fixture kept at ${fixture})`);- }-- console.log(`\n${passed} passed, ${failed} failed`);- if (failed > 0) {- console.log('\nFailures:');- for (const f of failures) console.log(` - ${f}`);- process.exit(1);- }- console.log('\n✓ End-to-end pipeline test PASSED.');-}--main().catch((e) => {- console.error('test-parallel-pipeline crashed:', e.message || e);- process.exit(2);-});diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-pipeline-roundtrip.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-pipeline-roundtrip.mjsdeleted file mode 100755index f07cd34694..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-pipeline-roundtrip.mjs+++ /dev/null@@ -1,586 +0,0 @@-#!/usr/bin/env node-// test-pipeline-roundtrip.mjs — end-to-end test of the ADR-152 §3.1-// cross-pipeline integration shipped iters 36→46.-//-// THE GAP THIS CLOSES-// Every prior iter test exercised ONE surface in isolation:-// iter 35: spike — synthetic LEGAL/SUPPORT/DEVOPS fixtures-// iter 37: MCP runtime test — fake mem keys-// iter 38: audit-trend — hand-written audit JSON-// iter 39: unit tests — pure-function arithmetic-// iter 41: bench — synthetic payloads-// iter 43: Phase 4 — file-path fixtures-// iter 46: audit_trend file inputs — same fixtures-//-// None of these proved the FULL chain works end-to-end with no-// synthetic data. This test does.-//-// THE PIPELINE BEING TESTED-// 1. oia-audit --dry-run --path . (real run against ruflo)-// 2. The audit record's fingerprint{score,genome}-// 3. audit-trend --baseline {same-record} --current {same-record}-// 4. delta.structuralDistance.verdict === 'near-identical'-// 5. delta.structuralDistance.overall === 1-//-// USAGE-// node scripts/test-pipeline-roundtrip.mjs-// node scripts/test-pipeline-roundtrip.mjs --format json-//-// EXIT CODES-// 0 full chain works-// 1 some assertion failed-// 2 oia-audit degraded (upstream metaharness absent — test cannot run)-//-// ADR-150 ARCHITECTURAL CONSTRAINT BEHAVIOR-// If oia-audit returns {degraded:true} (no upstream metaharness), the-// test exits 2 with a clear message — this is the "test cannot run"-// case, NOT a "test failed" case. CI infrastructure can distinguish.--import { spawnSync } from 'node:child_process';-import { mkdtempSync, writeFileSync, readFileSync, rmSync } from 'node:fs';-import { tmpdir } from 'node:os';-import { join, dirname } from 'node:path';-import { fileURLToPath } from 'node:url';--const SCRIPTS_DIR = dirname(fileURLToPath(import.meta.url));-const REPO_ROOT = dirname(dirname(dirname(SCRIPTS_DIR))); // up out of plugins/ruflo-metaharness/scripts--const ARGS = (() => {- const a = { format: 'table' };- for (let i = 2; i < process.argv.length; i++) {- if (process.argv[i] === '--format') a.format = process.argv[++i];- }- return a;-})();--let passed = 0, failed = 0;-const failures = [];-function assert(cond, label) {- if (cond) { console.log(` ✓ ${label}`); passed++; }- else { console.log(` ✗ ${label}`); failures.push(label); failed++; }-}--function runNode(scriptName, args, timeoutMs = 60_000) {- const p = spawnSync('node', [join(SCRIPTS_DIR, scriptName), ...args], {- encoding: 'utf-8',- timeout: timeoutMs,- cwd: REPO_ROOT,- });- return { stdout: p.stdout || '', stderr: p.stderr || '', status: p.status ?? -1 };-}--// ──────────────────────────────────────────────────────────────────-console.log(`# test-pipeline-roundtrip — ADR-152 §3.1 end-to-end (iter 47)\n`);--const tmp = mkdtempSync(join(tmpdir(), 'pipeline-roundtrip-'));--try {- // ──────────────────────────────────────────────────────────────- // STAGE 1: oia-audit --dry-run against ruflo repo itself- // ──────────────────────────────────────────────────────────────- console.log('Stage 1 — oia-audit --dry-run against ruflo repo');- const auditRun = runNode('oia-audit.mjs', ['--path', REPO_ROOT, '--dry-run', '--format', 'json'], 90_000);-- // Extract the JSON object from stdout (script may emit some prelude)- const auditMatch = /\{[\s\S]*\}/.exec(auditRun.stdout);- if (!auditMatch) {- console.log(` ✗ oia-audit produced no JSON; stderr:\n${auditRun.stderr.slice(0, 500)}`);- process.exit(1);- }- const audit = JSON.parse(auditMatch[0]);-- // If oia-audit reports degraded (no upstream metaharness installed), skip- // — this test cannot run without real score/genome output.- if (audit.degraded === true) {- console.log(` ⊘ oia-audit reports degraded — upstream metaharness absent`);- console.log(` This test exercises real metaharness output; cannot run.`);- console.log(` reason: ${audit.reason}`);- process.exit(2);- }-- assert(typeof audit === 'object' && audit !== null,- 'oia-audit produced a JSON object');- assert(typeof audit.composite === 'object',- 'oia-audit has composite worst-severity');- assert(typeof audit.components === 'object',- 'oia-audit has components bundle');-- // iter 38 — fingerprint must be present- assert(typeof audit.fingerprint === 'object' && audit.fingerprint !== null,- 'oia-audit emits fingerprint field (iter 38)');- if (!audit.fingerprint?.score || !audit.fingerprint?.genome) {- console.log(` ⊘ fingerprint partial; score+genome may have degraded individually`);- console.log(` fingerprint: ${JSON.stringify(audit.fingerprint).slice(0, 200)}`);- process.exit(2);- }- assert(typeof audit.fingerprint.score?.harnessFit === 'number',- 'fingerprint.score has harnessFit');- assert(Array.isArray(audit.fingerprint.genome?.agent_topology),- 'fingerprint.genome has agent_topology array');-- // iter 49 — schema contracts beyond similarity (the OTHER class of- // silent drift). audit-trend reads specific upstream fields:- // - composite.worst (severity rollup)- // - components.threatModel.json.worst (audit-trend.mjs:96-100)- // - components.mcpScan.json.findings (audit-trend.mjs:124-127)- // If upstream renames any of these, audit-trend silently breaks.- // Gating them here forces a CI failure on the next PR after upstream- // schema drift, instead of months later when someone notices the- // severity verdict has been wrong all along.- assert(typeof audit.composite?.worst === 'string',- 'iter 49 — audit.composite.worst is a string');- assert(['clean', 'low', 'medium', 'high'].includes(audit.composite.worst),- `iter 49 — composite.worst in valid severity vocab (got ${audit.composite.worst})`);- // threatModel.json.worst is the upstream field audit-trend reads- if (audit.components?.threatModel && !audit.components.threatModel.degraded) {- assert(typeof audit.components.threatModel.json?.worst === 'string',- 'iter 49 — components.threatModel.json.worst is a string (audit-trend dep)');- }- // mcp-scan.mjs currently emits {rawStdout, durationMs, alert} —- // no structured `findings` array. audit-trend.mjs reads- // `json.findings` (guarded with Array.isArray fallback to []) so it- // doesn't crash, but the introduced/cleared logic is effectively- // a no-op on real output. iter 49 documents this gap rather than- // asserting a contract that doesn't yet hold. If a future iter- // promotes mcp-scan.mjs to emit structured findings, this assertion- // should become a real type-check.- if (audit.components?.mcpScan?.json?.findings !== undefined) {- assert(Array.isArray(audit.components.mcpScan.json.findings),- 'iter 49 — IF mcpScan.json.findings exists THEN it must be an array');- } else {- console.log(` ⊘ mcpScan.json.findings absent (mcp-scan.mjs currently text-only — known iter-49 gap)`);- }-- // ──────────────────────────────────────────────────────────────- // STAGE 2: persist the audit record as both baseline and current- // ──────────────────────────────────────────────────────────────- console.log('\nStage 2 — write audit record to baseline + current paths');- const basePath = join(tmp, 'baseline.json');- const currPath = join(tmp, 'current.json');- writeFileSync(basePath, JSON.stringify(audit));- writeFileSync(currPath, JSON.stringify(audit));- assert(readFileSync(basePath, 'utf-8').length > 100, 'baseline file written');- assert(readFileSync(currPath, 'utf-8').length > 100, 'current file written');-- // ──────────────────────────────────────────────────────────────- // STAGE 3: audit-trend reading the same audit twice- // ──────────────────────────────────────────────────────────────- console.log('\nStage 3 — audit-trend against self (must report near-identical)');- const trendRun = runNode('audit-trend.mjs', [- '--baseline', basePath,- '--current', currPath,- '--format', 'json',- ]);-- const trendMatch = /\{[\s\S]*\}/.exec(trendRun.stdout);- assert(trendMatch !== null, 'audit-trend produced JSON');- const trend = JSON.parse(trendMatch[0]);-- assert(typeof trend.delta?.structuralDistance === 'object',- 'trend exposes delta.structuralDistance');- const sd = trend.delta.structuralDistance;- assert(sd.verdict === 'near-identical',- `self-roundtrip verdict === near-identical (got ${sd.verdict})`);- assert(sd.overall === 1,- `self-roundtrip overall === 1 (got ${sd.overall})`);- assert(sd.distance === 0,- `self-roundtrip distance === 0 (got ${sd.distance})`);-- // ──────────────────────────────────────────────────────────────- // STAGE 4: alert-on-distance-below should NOT trigger on self-match- // ──────────────────────────────────────────────────────────────- console.log('\nStage 4 — distance alert does not trigger on self-match');- const noAlertRun = runNode('audit-trend.mjs', [- '--baseline', basePath,- '--current', currPath,- '--alert-on-distance-below', '0.5',- '--format', 'json',- ]);- assert(noAlertRun.status === 0,- `alert at threshold 0.5 does NOT fire on self-match (exit 0, got ${noAlertRun.status})`);-- // Now flip: any threshold above 1 must trigger- console.log('\nStage 5 — distance alert triggers when threshold > self-match');- const alertRun = runNode('audit-trend.mjs', [- '--baseline', basePath,- '--current', currPath,- '--alert-on-distance-below', '1.01',- '--format', 'json',- ]);- assert(alertRun.status === 1,- `alert at threshold 1.01 fires on self-match (exit 1, got ${alertRun.status})`);-- // ──────────────────────────────────────────────────────────────- // STAGE 6 (iter 49) — non-similarity schema contracts in the trend- //- // audit-trend reads `composite.worst`, `components.threatModel.json.worst`,- // and `components.mcpScan.json.findings`. The trend output's- // delta.worst.verdict on a self-match must be 'unchanged'. If upstream- // renames any of these fields, the verdict silently becomes 'missing'- // or undefined — this assertion catches that BEFORE shipping.- // ──────────────────────────────────────────────────────────────- // ──────────────────────────────────────────────────────────────- // STAGE 7 (iter 51) — drift detection actually FIRES on mutated input- //- // Every prior stage uses the same audit record twice (self-match).- // That proves the chain doesn't FALSELY report drift on identical- // input, but doesn't prove the chain catches REAL drift. This stage- // takes the audit record and synthetically mutates fields the- // similarity module reads, then asserts the chain detects the- // difference.- //- // Mutations applied (all measurable by similarity):- // - harnessFit: unchanged → -20 (cosine signal)- // - taskCoverage: unchanged → -15 (cosine signal)- // - agent_topology: add one → jaccard divergence- //- // Expected outcome:- // - structuralDistance.verdict !== 'near-identical'- // - structuralDistance.overall < 1- // - --alert-on-distance-below 0.95 should fire- // ──────────────────────────────────────────────────────────────- console.log('\nStage 7 — drift detection on mutated audit (iter 51)');- const mutatedPath = join(tmp, 'mutated.json');- const mutated = JSON.parse(JSON.stringify(audit));- // Modify fields the similarity module actually reads. The mutation has- // to be large enough to cross the verdict-bucket threshold (0.95 →- // 'near-identical' boundary). The 9-dim cosine vector is dominated by- // values already clustered around the same range, so single-field- // changes don't move overall much. Mutate across all 3 components:- // - cosine: drop 4 scorecard fields by 25-40 points- // - categorical: swap archetype + template (2 of 4 enums diverge)- // - jaccard: rebuild agent_topology with a different set- mutated.fingerprint.score.harnessFit = Math.max(0, audit.fingerprint.score.harnessFit - 40);- mutated.fingerprint.score.taskCoverage = Math.max(0, audit.fingerprint.score.taskCoverage - 35);- mutated.fingerprint.score.toolSafety = Math.max(0, audit.fingerprint.score.toolSafety - 30);- mutated.fingerprint.score.compileConfidence = Math.max(0, audit.fingerprint.score.compileConfidence - 25);- mutated.fingerprint.score.archetype = 'iter-51-synthetic-archetype';- mutated.fingerprint.score.template = 'iter-51-synthetic-template';- mutated.fingerprint.genome.agent_topology = ['iter-51-marker-a', 'iter-51-marker-b'];- writeFileSync(mutatedPath, JSON.stringify(mutated));-- const driftRun = runNode('audit-trend.mjs', [- '--baseline', basePath,- '--current', mutatedPath,- '--format', 'json',- ]);- const driftMatch = /\{[\s\S]*\}/.exec(driftRun.stdout);- assert(driftMatch !== null, 'drift run produced JSON');- const driftTrend = JSON.parse(driftMatch[0]);- const driftSd = driftTrend.delta?.structuralDistance;- assert(typeof driftSd === 'object', 'drift trend exposes structuralDistance');- assert(driftSd.verdict !== 'near-identical',- `drift detected — verdict !== near-identical (got ${driftSd?.verdict})`);- assert(driftSd.overall < 1,- `drift detected — overall < 1 (got ${driftSd?.overall})`);- assert(driftSd.distance > 0,- `drift detected — distance > 0 (got ${driftSd?.distance})`);-- // Alert chain: --alert-on-distance-below 0.95 must fire IF drift > 0.05- // If the synthetic mutation produced overall ≥ 0.95, lower the threshold.- const threshold = driftSd.overall < 0.95 ? '0.95' : String(driftSd.overall + 0.01);- const alertDriftRun = runNode('audit-trend.mjs', [- '--baseline', basePath,- '--current', mutatedPath,- '--alert-on-distance-below', threshold,- '--format', 'json',- ]);- assert(alertDriftRun.status === 1,- `drift alert at threshold ${threshold} fires on mutated audit (exit 1, got ${alertDriftRun.status})`);-- // ──────────────────────────────────────────────────────────────- console.log('\nStage 6 — non-similarity schema contracts (iter 49)');- assert(typeof trend.delta?.worst === 'object',- 'trend exposes delta.worst (severity-rollup)');- assert(trend.delta.worst.verdict === 'unchanged',- `self-roundtrip severity-verdict === unchanged (got ${trend.delta.worst.verdict})`);- assert(trend.delta.worst.baseline === trend.delta.worst.current,- 'self-roundtrip baseline === current severity');- assert(trend.delta.worst.rankDelta === 0,- `self-roundtrip rankDelta === 0 (got ${trend.delta.worst.rankDelta})`);- // Findings arrays: introduced/cleared must both be 0 on self-match- assert(trend.delta?.findings?.introducedCount === 0,- `self-roundtrip introducedCount === 0 (got ${trend.delta?.findings?.introducedCount})`);- assert(trend.delta?.findings?.clearedCount === 0,- `self-roundtrip clearedCount === 0 (got ${trend.delta?.findings?.clearedCount})`);-- // ──────────────────────────────────────────────────────────────- // STAGE 8 (iter 68) — drift-from-history end-to-end via --baseline-file- //- // Every prior stage tested audit-trend (the underlying primitive).- // None tested drift-from-history (the iter-53 user-facing wrapper).- // This stage runs the iter-67 fastest path: baseline from a file,- // skipping audit-list AND memory roundtrip entirely.- // ──────────────────────────────────────────────────────────────- console.log('\nStage 8 — drift-from-history end-to-end (iter 68)');- const driftFromHistoryRun = runNode('drift-from-history.mjs', [- '--baseline-file', basePath,- '--dry-run',- '--format', 'json',- ], 120_000);- const driftFromHistoryMatch = /\{[\s\S]*\}/.exec(driftFromHistoryRun.stdout);- assert(driftFromHistoryMatch !== null, 'drift-from-history produced JSON');- const dfh = JSON.parse(driftFromHistoryMatch[0]);-- // Iter-66/iter-67 contract: the fastest-path flags are surfaced in timing- assert(dfh.timing?.skippedAuditList === true,- 'drift-from-history --baseline-file → skippedAuditList === true (iter 66)');- assert(dfh.timing?.usedBaselineFile === true,- 'drift-from-history --baseline-file → usedBaselineFile === true (iter 67)');- // Wall-clock fastpath proof: must be under 30s with file inputs- // (vs ~26s minimum for the audit-list-loading slow path)- assert(typeof dfh.timing?.parallelWallMs === 'number' && dfh.timing.parallelWallMs < 30000,- `drift-from-history fastpath wall < 30s (got ${dfh.timing?.parallelWallMs}ms)`);- // Same-file self-match → similarity 1.0- assert(dfh.drift?.structuralDistance?.overall === 1,- `drift-from-history self-match overall === 1 (got ${dfh.drift?.structuralDistance?.overall})`);- assert(dfh.drift?.structuralDistance?.verdict === 'near-identical',- `drift-from-history self-match verdict === near-identical (got ${dfh.drift?.structuralDistance?.verdict})`);- // Alert chain end-to-end- assert(dfh.alert?.triggered === false,- 'drift-from-history self-match alert NOT triggered at default threshold (0.95)');-- // ──────────────────────────────────────────────────────────────- // STAGE 9 (iter 75) — drift-from-history detects drift via fast path- //- // Stage 8 proved the fast path correctly identifies self-match.- // This stage proves it also CATCHES drift — feeds a mutated baseline- // file and asserts the verdict flips. Without this, a regression- // that breaks the fast path's similarity computation would still- // pass Stage 8 (which only checks the identity case).- //- // Mutation: re-uses Stage 7's mutated audit shape, written to a- // separate baseline file. drift-from-history runs fresh oia-audit- // against current state and diffs against the mutated baseline.- // ──────────────────────────────────────────────────────────────- console.log('\nStage 9 — drift-from-history fastpath catches mutation (iter 75)');- // mutatedPath was already populated in Stage 7. Re-use as baseline-file.- const dfhDriftRun = runNode('drift-from-history.mjs', [- '--baseline-file', mutatedPath,- '--dry-run',- '--threshold', '0.95',- '--format', 'json',- ], 120_000);- const dfhDriftMatch = /\{[\s\S]*\}/.exec(dfhDriftRun.stdout);- assert(dfhDriftMatch !== null, 'drift-from-history with mutated baseline produced JSON');- const dfhDrift = JSON.parse(dfhDriftMatch[0]);-- // Fast path still fired- assert(dfhDrift.timing?.usedBaselineFile === true,- 'Stage 9 fastpath: usedBaselineFile === true');-- // Drift detected — same invariants as Stage 7 but via the wrapper- const dfhSd = dfhDrift.drift?.structuralDistance;- assert(typeof dfhSd === 'object', 'Stage 9: structuralDistance present');- assert(dfhSd.verdict !== 'near-identical',- `Stage 9: verdict !== near-identical (got ${dfhSd?.verdict}) — fastpath catches drift`);- assert(dfhSd.overall < 1,- `Stage 9: overall < 1 (got ${dfhSd?.overall})`);- assert(dfhSd.distance > 0,- `Stage 9: distance > 0 (got ${dfhSd?.distance})`);-- // Alert end-to-end via the fast path- // (mutation pushes overall ~0.7, below default 0.95 threshold → triggered)- assert(dfhDrift.alert?.triggered === true,- 'Stage 9: --threshold 0.95 fires on mutated baseline via fastpath');- // Exit code reflects alert- assert(dfhDriftRun.status === 1,- `Stage 9: drift-from-history exit=1 when alert triggered (got ${dfhDriftRun.status})`);-- // ──────────────────────────────────────────────────────────────- // STAGE 10 (iter 76) — introduced/cleared findings diff actually works- //- // Iter 49 documented that mcp-scan emitted text only → audit-trend's- // findings.introducedCount was dead code. Iter 50 added the parser- // so findings ARE populated. But no test verified the diff on a- // REAL finding-set change — Stage 7 mutates only the fingerprint- // (score/genome), leaving mcpScan.json.findings unchanged.- //- // This stage takes the real audit (Stage 1) and mutates ONLY- // mcpScan.json.findings — adds a synthetic finding to the baseline.- // audit-trend should report clearedCount === 1 (the synthetic- // disappeared in the current audit) with severity preserved.- // ──────────────────────────────────────────────────────────────- console.log('\nStage 10 — introduced/cleared findings diff (iter 76 — locks iter-50 fix)');- const findingsBasePath = join(tmp, 'findings-base.json');- const findingsMutated = JSON.parse(JSON.stringify(audit));- // Ensure mcpScan.json.findings exists (it should post-iter-50)- if (!findingsMutated.components?.mcpScan?.json?.findings) {- findingsMutated.components.mcpScan = findingsMutated.components.mcpScan ?? {};- findingsMutated.components.mcpScan.json = findingsMutated.components.mcpScan.json ?? {};- findingsMutated.components.mcpScan.json.findings = [];- }- // Append a synthetic finding that wouldn't appear in a fresh audit.- findingsMutated.components.mcpScan.json.findings.push({- severity: 'medium',- id: 'iter-76-synthetic-finding',- server: 'synthetic-server',- tool: 'synthetic-tool',- message: 'Stage 10 synthetic finding for clearedCount verification',- });- writeFileSync(findingsBasePath, JSON.stringify(findingsMutated));-- // Diff: baseline has the synthetic, current (real audit) doesn't →- // expect clearedCount === 1, introducedCount === 0.- const findingsTrendRun = runNode('audit-trend.mjs', [- '--baseline', findingsBasePath,- '--current', basePath, // basePath = unmodified audit- '--format', 'json',- ], 60_000);- const findingsTrendMatch = /\{[\s\S]*\}/.exec(findingsTrendRun.stdout);- assert(findingsTrendMatch !== null, 'Stage 10: audit-trend produced JSON');- const findingsTrend = JSON.parse(findingsTrendMatch[0]);-- assert(findingsTrend.delta?.findings?.clearedCount === 1,- `Stage 10: clearedCount === 1 (got ${findingsTrend.delta?.findings?.clearedCount}) — iter-50 fix functional`);- assert(findingsTrend.delta?.findings?.introducedCount === 0,- `Stage 10: introducedCount === 0 (got ${findingsTrend.delta?.findings?.introducedCount})`);- // Cleared finding's severity preserved through the diff- const cleared = findingsTrend.delta?.findings?.cleared?.[0];- assert(cleared?.severity === 'medium',- `Stage 10: cleared finding severity preserved (got ${cleared?.severity})`);- assert(cleared?.id === 'iter-76-synthetic-finding',- 'Stage 10: cleared finding id preserved');-- // ──────────────────────────────────────────────────────────────- // STAGE 11 (iter 77) — introducedCount symmetry + dedup discrimination- //- // Stage 10 proved the CLEARED side. Three more cases to lock the- // diff logic completely:- //- // 11a. introducedCount: baseline clean, current has synthetic- // 11b. both-different: baseline has finding A, current has finding B- // → introduced=1, cleared=1- // 11c. identical: baseline + current have SAME finding- // → both counters stay at 0 (dedup works)- // ──────────────────────────────────────────────────────────────- console.log('\nStage 11 — introduced/cleared symmetric + dedup (iter 77)');- const findingA = {- severity: 'medium',- id: 'iter-77-finding-A',- server: 'server-A',- tool: 'tool-A',- message: 'finding A',- };- const findingB = {- severity: 'high',- id: 'iter-77-finding-B',- server: 'server-B',- tool: 'tool-B',- message: 'finding B',- };-- // 11a — introduced- const baseClean = JSON.parse(JSON.stringify(audit));- baseClean.components.mcpScan.json.findings = [];- const currentWithA = JSON.parse(JSON.stringify(audit));- currentWithA.components.mcpScan.json.findings = [findingA];- const baseCleanPath = join(tmp, 'base-clean.json');- const currentWithAPath = join(tmp, 'current-A.json');- writeFileSync(baseCleanPath, JSON.stringify(baseClean));- writeFileSync(currentWithAPath, JSON.stringify(currentWithA));- const trendRun11a = runNode('audit-trend.mjs', [- '--baseline', baseCleanPath, '--current', currentWithAPath, '--format', 'json',- ], 60_000);- const m11a = /\{[\s\S]*\}/.exec(trendRun11a.stdout);- const trend11a = JSON.parse(m11a[0]);- assert(trend11a.delta?.findings?.introducedCount === 1,- `Stage 11a: introducedCount === 1 (got ${trend11a.delta?.findings?.introducedCount})`);- assert(trend11a.delta?.findings?.clearedCount === 0,- `Stage 11a: clearedCount === 0 (got ${trend11a.delta?.findings?.clearedCount})`);- assert(trend11a.delta?.findings?.introduced?.[0]?.id === 'iter-77-finding-A',- 'Stage 11a: introduced finding id preserved');-- // 11b — both different- const baselineWithB = JSON.parse(JSON.stringify(audit));- baselineWithB.components.mcpScan.json.findings = [findingB];- const baselineWithBPath = join(tmp, 'baseline-B.json');- writeFileSync(baselineWithBPath, JSON.stringify(baselineWithB));- const trendRun11b = runNode('audit-trend.mjs', [- '--baseline', baselineWithBPath, '--current', currentWithAPath, '--format', 'json',- ], 60_000);- const m11b = /\{[\s\S]*\}/.exec(trendRun11b.stdout);- const trend11b = JSON.parse(m11b[0]);- assert(trend11b.delta?.findings?.introducedCount === 1,- `Stage 11b: introducedCount === 1 (got ${trend11b.delta?.findings?.introducedCount})`);- assert(trend11b.delta?.findings?.clearedCount === 1,- `Stage 11b: clearedCount === 1 (got ${trend11b.delta?.findings?.clearedCount})`);- // Dedup discriminates: B was cleared, A was introduced- assert(trend11b.delta?.findings?.cleared?.[0]?.id === 'iter-77-finding-B',- 'Stage 11b: dedup correctly identifies B as cleared');- assert(trend11b.delta?.findings?.introduced?.[0]?.id === 'iter-77-finding-A',- 'Stage 11b: dedup correctly identifies A as introduced');-- // 11c — identical findings on both sides- const trendRun11c = runNode('audit-trend.mjs', [- '--baseline', currentWithAPath, '--current', currentWithAPath, '--format', 'json',- ], 60_000);- const m11c = /\{[\s\S]*\}/.exec(trendRun11c.stdout);- const trend11c = JSON.parse(m11c[0]);- assert(trend11c.delta?.findings?.introducedCount === 0,- `Stage 11c: identical findings → introducedCount === 0 (dedup works)`);- assert(trend11c.delta?.findings?.clearedCount === 0,- `Stage 11c: identical findings → clearedCount === 0`);-- // ──────────────────────────────────────────────────────────────- // STAGE 12 (iter 79) — --alert-on-new-severity orthogonal gate- //- // Iter 78 added the gate. Iter 79 wires it into the weekly cron.- // This stage verifies the gate fires correctly through the- // drift-from-history wrapper:- // - baseline has no findings + current has 1 medium finding- // - --threshold 0.5 (similarity stays above)- // - --alert-on-new-severity medium should trigger- //- // Catches the "structural similarity high but new security- // finding" case that iter-78 closed.- // ──────────────────────────────────────────────────────────────- console.log('\nStage 12 — --alert-on-new-severity orthogonal gate (iter 79)');-- // Re-use baseClean (no findings) from Stage 11- // Run drift-from-history with --alert-on-new-severity info- // (real ruflo audit has 1 INFO finding → introduced=1)- const stage12Run = runNode('drift-from-history.mjs', [- '--baseline-file', baseCleanPath,- '--dry-run',- '--threshold', '0.5',- '--alert-on-new-severity', 'info',- '--format', 'json',- ], 120_000);- const m12 = /\{[\s\S]*\}/.exec(stage12Run.stdout);- assert(m12 !== null, 'Stage 12: drift-from-history produced JSON');- const stage12 = JSON.parse(m12[0]);-- // The orthogonal gate fires- assert(stage12.alert?.triggered === true,- 'Stage 12: --alert-on-new-severity info triggers on ruflo current INFO finding');- // Reason mentions severity, not similarity (structural is fine at threshold 0.5)- const reasons = stage12.alert?.reasons ?? [];- const hasSeverityReason = reasons.some((r) => /finding\(s\) at or above/.test(r));- assert(hasSeverityReason,- `Stage 12: reasons mention new-finding severity (got ${JSON.stringify(reasons)})`);- // elevatedFindings populated- assert(Array.isArray(stage12.alert?.elevatedFindings) && stage12.alert.elevatedFindings.length >= 1,- `Stage 12: elevatedFindings non-empty (got ${stage12.alert?.elevatedFindings?.length})`);- // CLI exit reflects the alert- assert(stage12Run.status === 1,- `Stage 12: drift-from-history exit=1 on severity alert (got ${stage12Run.status})`);- // newSeverityThreshold echoed in payload- assert(stage12.alert?.newSeverityThreshold === 'info',- 'Stage 12: alert.newSeverityThreshold echoed');--} finally {- try { rmSync(tmp, { recursive: true, force: true }); } catch { /* ignore */ }-}--// ──────────────────────────────────────────────────────────────────-const summary = { passed, failed, total: passed + failed, failures };--console.log(`\n${passed} passed, ${failed} failed`);-if (ARGS.format === 'json') console.log(JSON.stringify(summary, null, 2));-if (failed > 0) {- console.log('\nFailures:');- for (const f of failures) console.log(` - ${f}`);- process.exit(1);-}-console.log('\n✓ Full ADR-152 §3.1 pipeline works end-to-end with real metaharness output.');diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-similarity.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-similarity.mjsdeleted file mode 100755index 45ec59cd01..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-similarity.mjs+++ /dev/null@@ -1,334 +0,0 @@-#!/usr/bin/env node-// test-similarity.mjs — unit tests for the iter-36 production module-// `_similarity.mjs` (ADR-152 §3.1).-//-// The spike (_spike-similarity.mjs) verifies the two architectural-// invariants on synthetic fixtures. This test exercises each public-// function in isolation: projectToVec, cosine, categoricalAgreement,-// jaccard, similarity, opts.weights override, opts.perDimension shape.-//-// CONTRACT EACH FUNCTION MUST SATISFY-// - input contract documented in _similarity.mjs holds-// - missing optional fields default safely (graceful, never throws)-// - numerical results are deterministic (no floats from Math.random)-// - return shapes match ADR-152 §"return shape"-//-// USAGE-// node scripts/test-similarity.mjs-// node scripts/test-similarity.mjs --format json-//-// EXIT-// 0 all unit tests pass-// 1 at least one test failed--import {- projectToVec, cosine, categoricalAgreement, jaccard, similarity,-} from './_similarity.mjs';-// iter 64 — also test the iter-63 shared severity primitives-import { SEVERITY_RANK, rankSeverity, parseMcpScanText } from './_harness.mjs';--const ARGS = (() => {- const a = { format: 'table' };- for (let i = 2; i < process.argv.length; i++) {- if (process.argv[i] === '--format') a.format = process.argv[++i];- }- return a;-})();--let passed = 0, failed = 0;-const failures = [];--function assert(cond, label) {- if (cond) { console.log(` ✓ ${label}`); passed++; }- else { console.log(` ✗ ${label}`); failures.push(label); failed++; }-}--function approx(a, b, eps = 0.0001) {- return Math.abs(a - b) < eps;-}--// ──────────────────────────────────────────────────────────────────-// FIXTURES — share two harness shapes across all tests-// ──────────────────────────────────────────────────────────────────--const A = {- score: {- harnessFit: 80, compileConfidence: 100, taskCoverage: 70, toolSafety: 90,- memoryUsefulness: 50, estCostPerRunUsd: 0.05, recommendedMode: 'CLI + MCP',- archetype: 'typescript-sdk-harness', template: 'vertical:coding',- },- genome: {- repo_type: 'node_mcp_ci',- agent_topology: ['maintainer', 'tester', 'security'],- risk_score: 0.3, test_confidence: 0.85, publish_readiness: 0.9,- },-};--const B = {- score: {- harnessFit: 60, compileConfidence: 80, taskCoverage: 50, toolSafety: 70,- memoryUsefulness: 30, estCostPerRunUsd: 0.02, recommendedMode: 'CLI',- archetype: 'python-agent-harness', template: 'vertical:devops',- },- genome: {- repo_type: 'python_ops',- agent_topology: ['deployer', 'rollback'],- risk_score: 0.1, test_confidence: 0.6, publish_readiness: 0.5,- },-};--// ──────────────────────────────────────────────────────────────────-console.log(`# test-similarity — _similarity.mjs unit tests (iter 39)\n`);--console.log('Phase 1 — projectToVec');-const vA = projectToVec(A);-assert(Array.isArray(vA), 'returns an array');-assert(vA.length === 9, 'returns 9-dim vector (ADR-152 §Decision Table 1)');-assert(approx(vA[0], 0.80), 'index 0 = harnessFit/100 (80 → 0.80)');-assert(approx(vA[1], 1.00), 'index 1 = compileConfidence/100 (100 → 1.00)');-assert(approx(vA[2], 0.70), 'index 2 = taskCoverage/100');-assert(approx(vA[3], 0.90), 'index 3 = toolSafety/100');-assert(approx(vA[4], 0.50), 'index 4 = memoryUsefulness/100');-assert(approx(vA[5], 0.30), 'index 5 = risk_score (already 0..1)');-assert(approx(vA[6], 0.85), 'index 6 = test_confidence');-assert(approx(vA[7], 0.90), 'index 7 = publish_readiness');-// Missing-field defaults safely (graceful degradation)-const vEmpty = projectToVec({});-assert(vEmpty.length === 9, 'empty input still returns 9-dim');-assert(vEmpty.every((x) => typeof x === 'number'), 'all elements numeric (no NaN propagation)');-const vNoGenome = projectToVec({ score: A.score });-assert(approx(vNoGenome[5], 0), 'missing genome → risk_score=0 default');-assert(approx(vNoGenome[0], 0.80), 'missing genome does not corrupt score-derived indices');--console.log('\nPhase 2 — cosine');-assert(approx(cosine(vA, vA), 1), 'cosine(x, x) === 1');-assert(approx(cosine([1, 0], [0, 1]), 0), 'orthogonal vectors → 0');-assert(approx(cosine([0, 0, 0], [1, 1, 1]), 0), 'zero vector → 0 (graceful divide-by-zero)');-assert(cosine([1, 2], [1, 2, 3]) === 0, 'length mismatch → 0 (graceful)');-assert(cosine(null, vA) === 0, 'null input → 0 (graceful)');-const cosAB = cosine(vA, projectToVec(B));-assert(cosAB >= 0 && cosAB <= 1, 'output bounded to [0, 1] for nonneg vectors');--console.log('\nPhase 3 — categoricalAgreement');-assert(approx(categoricalAgreement(A, A), 1), 'identical input → 1 (all 4 enums match)');-assert(approx(categoricalAgreement(A, B), 0), 'A vs B → 0 (all 4 enums differ)');-assert(approx(categoricalAgreement({}, {}), 0), 'both empty → 0 (no matches counted)');-// Partial match — 2 of 4 fields agree-const partial = {- score: { archetype: A.score.archetype, template: 'different', recommendedMode: A.score.recommendedMode },- genome: { repo_type: 'different' },-};-assert(approx(categoricalAgreement(A, partial), 0.5),- '2-of-4 partial match → 0.5 (archetype + recommendedMode)');--console.log('\nPhase 4 — jaccard');-assert(approx(jaccard(A, A), 1), 'identical topology → 1');-assert(approx(jaccard(A, B), 0), 'disjoint topology → 0');-assert(approx(jaccard({ genome: {} }, { genome: {} }), 1),- 'both empty topology → 1 (set-equality convention)');-const overlap = {- genome: { agent_topology: ['maintainer', 'tester', 'extra'] },-};-// A has {maintainer, tester, security}; overlap has {maintainer, tester, extra}-// |A ∩ B|=2, |A ∪ B|=4 → 2/4 = 0.5-assert(approx(jaccard(A, overlap), 0.5), 'partial topology overlap → |∩|/|∪|');--console.log('\nPhase 5 — similarity composite + return shape');-const sAA = similarity(A, A);-assert(typeof sAA === 'object' && sAA !== null, 'returns object');-assert(typeof sAA.overall === 'number', 'overall is numeric');-assert(approx(sAA.overall, 1), 'similarity(X, X).overall === 1');-assert(typeof sAA.components === 'object', 'components present');-assert(approx(sAA.components.cosine, 1), 'components.cosine === 1 on self-match');-assert(approx(sAA.components.categorical, 1), 'components.categorical === 1');-assert(approx(sAA.components.jaccard, 1), 'components.jaccard === 1');-assert(typeof sAA.weights === 'object', 'weights echoed in return');-assert(approx(sAA.weights.cosine, 0.6), 'default cosine weight = 0.6 (ADR-152)');-assert(approx(sAA.weights.categorical, 0.25), 'default categorical weight = 0.25');-assert(approx(sAA.weights.jaccard, 0.15), 'default jaccard weight = 0.15');-assert(approx(sAA.weights.cosine + sAA.weights.categorical + sAA.weights.jaccard, 1),- 'default weights sum to 1');--console.log('\nPhase 6 — similarity opts.weights override');-const reweighted = similarity(A, B, { weights: { cosine: 0, categorical: 0, jaccard: 1 } });-const jacOnly = jaccard(A, B);-assert(approx(reweighted.overall, jacOnly),- 'opts.weights cosine=0/cat=0/jac=1 → overall === jaccard');-const reweighted2 = similarity(A, A, { weights: { cosine: 0.5, categorical: 0.3, jaccard: 0.2 } });-assert(approx(reweighted2.overall, 1),- 'self-match holds under any weight scheme');--console.log('\nPhase 7 — similarity opts.perDimension shape');-const sPD = similarity(A, B, { perDimension: true });-assert(typeof sPD.perDimension === 'object', 'perDimension included when requested');-assert('numeric.harnessFit' in sPD.perDimension,- 'perDimension exposes each numeric feature by name');-assert('categorical.archetype' in sPD.perDimension,- 'perDimension exposes each categorical field by name');-assert('set.agent_topology' in sPD.perDimension,- 'perDimension exposes the set-typed feature');-const hf = sPD.perDimension['numeric.harnessFit'];-assert(hf.a === 80 && hf.b === 60, 'perDimension preserves raw a/b values');-assert(typeof hf.contribution === 'number', 'perDimension has numeric contribution');-const sNoPD = similarity(A, B);-assert(!('perDimension' in sNoPD), 'perDimension omitted by default');--console.log('\nPhase 8 — round-trip with the iter-35 spike fixtures (regression anchor)');-// Hard-coded spike numbers from `_spike-similarity.mjs` — ANY change-// here means the production module drifted from the spike's frozen-// invariants (catches future weight or normalization changes).-const LEGAL = {- score: { harnessFit: 78, compileConfidence: 92, taskCoverage: 65, toolSafety: 88, memoryUsefulness: 70, estCostPerRunUsd: 0.04, recommendedMode: 'CLI + MCP', archetype: 'compliance-harness', template: 'vertical:legal' },- genome: { repo_type: 'node_mcp_ci', agent_topology: ['contract-analyst', 'redline-reviewer', 'risk-rater', 'compliance-officer'], risk_score: 0.45, test_confidence: 0.7, publish_readiness: 0.6 },-};-const SUPPORT = {- score: { harnessFit: 75, compileConfidence: 90, taskCoverage: 70, toolSafety: 90, memoryUsefulness: 72, estCostPerRunUsd: 0.05, recommendedMode: 'CLI + MCP', archetype: 'compliance-harness', template: 'vertical:support' },- genome: { repo_type: 'node_mcp_ci', agent_topology: ['triager', 'kb-searcher', 'responder', 'risk-rater', 'compliance-officer'], risk_score: 0.40, test_confidence: 0.75, publish_readiness: 0.65 },-};-const sLS = similarity(LEGAL, SUPPORT);-assert(sLS.overall === 0.8296,- `LEGAL × SUPPORT overall must be exactly 0.8296 (got ${sLS.overall})`);-assert(sLS.components.cosine === 0.9987,- `LEGAL × SUPPORT cosine must be 0.9987 (got ${sLS.components.cosine})`);-assert(sLS.components.categorical === 0.75,- `LEGAL × SUPPORT categorical must be 0.75 (got ${sLS.components.categorical})`);-assert(sLS.components.jaccard === 0.2857,- `LEGAL × SUPPORT jaccard must be 0.2857 (got ${sLS.components.jaccard})`);--console.log('\nPhase 9 — iter-63 shared SEVERITY_RANK + rankSeverity()');-// Known severities — full vocab the iter-50 parser produces-assert(SEVERITY_RANK.clean === 0, 'rank.clean === 0');-assert(SEVERITY_RANK.info === 0, 'rank.info === 0 (informational, no harm)');-assert(SEVERITY_RANK.low === 1, 'rank.low === 1');-assert(SEVERITY_RANK.medium === 2, 'rank.medium === 2');-assert(SEVERITY_RANK.warn === 2, 'rank.warn === 2 (warn ≈ medium)');-assert(SEVERITY_RANK.high === 3, 'rank.high === 3');-assert(SEVERITY_RANK.error === 3, 'rank.error === 3 (error ≈ high)');-assert(SEVERITY_RANK.critical === 4, 'rank.critical === 4 (elevated above high)');--// Object.freeze blocks mutation — anti-tamper guard-const before = SEVERITY_RANK.high;-let mutated = false;-try { SEVERITY_RANK.high = 999; mutated = SEVERITY_RANK.high !== before; } catch { /* strict mode throws */ }-assert(!mutated, 'SEVERITY_RANK frozen — mutation does not stick');--// rankSeverity safe accessor-assert(rankSeverity('info') === 0, 'rankSeverity("info") === 0');-assert(rankSeverity('CRITICAL') === 4, 'rankSeverity case-insensitive ("CRITICAL" → 4)');-assert(rankSeverity('Warn') === 2, 'rankSeverity case-insensitive ("Warn" → 2)');-assert(rankSeverity('unknown') === 0, 'rankSeverity("unknown") === 0 (no NaN)');-assert(rankSeverity(null) === 0, 'rankSeverity(null) === 0');-assert(rankSeverity(undefined) === 0, 'rankSeverity(undefined) === 0');-assert(rankSeverity('') === 0, 'rankSeverity("") === 0');-assert(rankSeverity(' high ') === 0,- 'rankSeverity does not strip whitespace (returns 0 for non-normalized input)');--// Rollup pattern mirrors oia-audit's reduce-function rollup(findings) {- return findings.reduce((acc, f) => {- const s = String(f.severity || 'low').toLowerCase();- return rankSeverity(s) > rankSeverity(acc) ? s : acc;- }, 'clean');-}-assert(rollup([{ severity: 'info' }]) === 'clean',- 'rollup info-only stays clean');-assert(rollup([{ severity: 'warn' }]) === 'warn',- 'rollup warn-only elevates to warn (was NaN-ignored pre-iter-63)');-assert(rollup([{ severity: 'critical' }, { severity: 'info' }]) === 'critical',- 'rollup with critical elevates above info');-assert(rollup([{ severity: 'low' }, { severity: 'warn' }, { severity: 'high' }, { severity: 'critical' }]) === 'critical',- 'rollup picks max across mixed severities');-assert(rollup([{ severity: 'unknown-strange-value' }]) === 'clean',- 'rollup with unknown severity stays clean (safe default)');--console.log('\nPhase 10 — iter-50 parseMcpScanText edge cases');--// Empty input — graceful return shape-const empty = parseMcpScanText('');-assert(Array.isArray(empty.findings) && empty.findings.length === 0,- 'parseMcpScanText("") → findings:[]');-assert(empty.summary === null, 'parseMcpScanText("") → summary:null');--// null / undefined safe-const nullParsed = parseMcpScanText(null);-assert(Array.isArray(nullParsed.findings) && nullParsed.findings.length === 0,- 'parseMcpScanText(null) → findings:[]');-const undefParsed = parseMcpScanText(undefined);-assert(Array.isArray(undefParsed.findings) && undefParsed.findings.length === 0,- 'parseMcpScanText(undefined) → findings:[]');--// Single finding — happy path-const single = parseMcpScanText(`harness mcp-scan — /repo-- [INFO] No MCP security issues found--Result: INFO (1 finding, 0 high)-`);-assert(single.findings.length === 1, 'single [INFO] block → 1 finding');-assert(single.findings[0].severity === 'info', 'severity lowercased');-assert(single.findings[0].message === 'No MCP security issues found',- 'message extracted');-assert(single.summary?.overallSeverity === 'info',- 'summary.overallSeverity from Result: line');-assert(single.summary?.totalCount === 1,- 'summary.totalCount === 1 from "(1 finding,"');--// Continuation line — indented text appends to previous finding-const cont = parseMcpScanText(`- [HIGH] Exposed credential path- Detected in .mcp/servers.json line 12- Recommended action: rotate immediately--Result: HIGH (1 finding, 1 high)-`);-assert(cont.findings.length === 1, 'finding with continuation = 1 entry');-assert(cont.findings[0].severity === 'high', 'HIGH lowercased to high');-assert(cont.findings[0].message.includes('Detected in') &&- cont.findings[0].message.includes('rotate immediately'),- 'continuation lines appended to message');--// Multiple findings — distinct entries-const multi = parseMcpScanText(`- [WARN] First issue- [HIGH] Second issue- [CRITICAL] Third issue--Result: HIGH (3 findings, 2 high)-`);-assert(multi.findings.length === 3, 'multiple findings = 3 entries');-assert(multi.findings.map((f) => f.severity).join(',') === 'warn,high,critical',- 'severities preserved in order');-assert(multi.summary?.totalCount === 3, 'multi summary totalCount === 3');--// No Result: line — summary stays null but findings still parsed-const noResult = parseMcpScanText(` [INFO] Lone finding\n`);-assert(noResult.findings.length === 1, 'no Result: line → still parses findings');-assert(noResult.summary === null, 'no Result: line → summary === null');--// Mixed-case severity in source — parser is intentionally strict: regex-// captures `[A-Z]+` so mixed-case 'Warn' WON'T match. This is the-// documented contract — upstream emits all-uppercase markers.-const mixed = parseMcpScanText(' [Warn] Something\n [HIGH] Other\n');-assert(mixed.findings.length === 1,- 'strict regex skips mixed-case [Warn], captures [HIGH] only');-assert(mixed.findings[0].severity === 'high',- 'strict regex captured the uppercase entry');--// ──────────────────────────────────────────────────────────────────-const summary = {- passed, failed,- failures,- total: passed + failed,- graduates: failed === 0,-};--console.log(`\n${passed} passed, ${failed} failed`);-if (ARGS.format === 'json') {- console.log(JSON.stringify(summary, null, 2));-}-if (failed > 0) {- console.log('\nFailures:');- for (const f of failures) console.log(` - ${f}`);- process.exit(1);-}-console.log('\n✓ All _similarity.mjs unit tests pass (ADR-152 §3.1 production contract).');diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-with-openrouter.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-with-openrouter.mjsdeleted file mode 100755index dc0d1fafb5..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/test-with-openrouter.mjs+++ /dev/null@@ -1,229 +0,0 @@-#!/usr/bin/env node-// test-with-openrouter.mjs — runtime test that exercises metaharness-// scaffolding + lifecycle commands using OPENROUTER_API_KEY fetched-// from GCP Secret Manager.-//-// WHAT IT DOES (end-to-end)-// 1. Fetch OPENROUTER_API_KEY from GCP Secret Manager via-// `gcloud secrets versions access latest --secret=OPENROUTER_API_KEY`-// 2. Verify the secret authenticates against OpenRouter by listing-// models (1 HTTP call, ~$0)-// 3. Scaffold a fresh harness into a temp dir via-// `metaharness new --name test-h --template vertical:coding-// --host claude-code --yes`-// 4. Run lifecycle commands against the scaffold:-// - harness doctor (smoke health check)-// - harness validate (full validation; --skip-gcp to avoid-// nested GCP fetches in this test)-// - harness score (5-dim scorecard of the scaffolded-// harness itself)-// - harness genome (7-section report)-// 5. (Optional) make one real LLM call through OpenRouter to a-// cheap model (e.g. openrouter/auto with a 1-token prompt) to-// prove the token works for actual inference-// 6. Clean up the temp dir-//-// COST: ~$0 (1 model-list call + optional <$0.0001 inference call)-//-// USAGE-// node scripts/test-with-openrouter.mjs # full e2e-// node scripts/test-with-openrouter.mjs --skip-inference # no LLM call-// node scripts/test-with-openrouter.mjs --keep-fixtures # leave scaffold for inspection-//-// EXIT CODES-// 0 all checks passed-// 1 at least one assertion failed-// 2 setup error (gcloud not authed, OPENROUTER_API_KEY missing in GCP, etc.)-// 3 cost/safety guard tripped--import { spawnSync, execSync } from 'node:child_process';-import { mkdtempSync, rmSync, mkdirSync, existsSync } from 'node:fs';-import { tmpdir } from 'node:os';-import { join } from 'node:path';--const ARGS = (() => {- const a = { skipInference: false, keep: false, format: 'table' };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--skip-inference') a.skipInference = true;- else if (v === '--keep-fixtures') a.keep = true;- else if (v === '--format') a.format = process.argv[++i];- }- return a;-})();--let passed = 0, failed = 0;-const failures = [];-function assert(cond, label) {- if (cond) { console.log(` ✓ ${label}`); passed++; }- else { console.log(` ✗ ${label}`); failures.push(label); failed++; }-}--function fetchSecretFromGcp(secretName) {- try {- const out = execSync(- `gcloud secrets versions access latest --secret=${secretName}`,- { encoding: 'utf-8', stdio: ['ignore', 'pipe', 'pipe'], timeout: 15_000 },- );- return out.trim();- } catch (e) {- console.error(` ⚠ gcloud secret fetch failed: ${(e.message || '').slice(0, 120)}`);- return null;- }-}--async function listOpenRouterModels(apiKey) {- const resp = await fetch('https://openrouter.ai/api/v1/models', {- headers: { Authorization: `Bearer ${apiKey}` },- });- if (!resp.ok) {- return { ok: false, status: resp.status, body: (await resp.text()).slice(0, 200) };- }- const data = await resp.json();- return { ok: true, modelCount: data.data?.length ?? 0 };-}--async function cheapInferenceCall(apiKey) {- // openrouter/auto picks the cheapest viable model; 5-token prompt;- // max_tokens=1 to bound cost at ~$0.00005.- const resp = await fetch('https://openrouter.ai/api/v1/chat/completions', {- method: 'POST',- headers: {- Authorization: `Bearer ${apiKey}`,- 'Content-Type': 'application/json',- 'HTTP-Referer': 'https://github.com/ruvnet/ruflo',- 'X-Title': 'ruflo-metaharness-test',- },- body: JSON.stringify({- model: 'openrouter/auto',- messages: [{ role: 'user', content: 'OK' }],- max_tokens: 1,- }),- });- if (!resp.ok) return { ok: false, status: resp.status, body: (await resp.text()).slice(0, 200) };- const data = await resp.json();- return { ok: true, model: data.model, usage: data.usage };-}--function runHarness(args, opts = {}) {- const r = spawnSync('npx', ['-y', '-p', 'metaharness@latest', 'harness', ...args], {- stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8',- timeout: opts.timeoutMs ?? 60_000,- env: { ...process.env, ...opts.env },- });- return { exitCode: r.status ?? 1, stdout: r.stdout || '', stderr: r.stderr || '' };-}--function runMetaharness(args, opts = {}) {- const r = spawnSync('npx', ['-y', 'metaharness@latest', ...args], {- stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8',- timeout: opts.timeoutMs ?? 120_000,- cwd: opts.cwd, // metaharness new writes to cwd/<name>; --target is ignored- env: { ...process.env, ...opts.env },- });- return { exitCode: r.status ?? 1, stdout: r.stdout || '', stderr: r.stderr || '' };-}--async function main() {- console.log('# test-with-openrouter — metaharness × GCP × OpenRouter e2e\n');-- // ── 0. Preflight ──────────────────────────────────────────────────- console.log('Phase 0 — preflight');- const gcloudWho = execSync('gcloud config get-value account 2>&1', { encoding: 'utf-8' }).trim();- assert(!!gcloudWho && !/None/.test(gcloudWho), `gcloud authenticated (${gcloudWho || 'none'})`);-- // ── 1. Fetch OPENROUTER_API_KEY ───────────────────────────────────- console.log('\nPhase 1 — fetch OPENROUTER_API_KEY from GCP Secret Manager');- const apiKey = fetchSecretFromGcp('OPENROUTER_API_KEY');- assert(typeof apiKey === 'string' && apiKey.length > 20, 'OPENROUTER_API_KEY fetched (length OK)');- if (!apiKey) {- console.error('Setup error: cannot proceed without OPENROUTER_API_KEY. Skipping further phases.');- process.exit(2);- }- // Echo only length+prefix, never the raw key- console.log(` key length: ${apiKey.length}, prefix: ${apiKey.slice(0, 7)}…`);-- // ── 2. Verify the key authenticates against OpenRouter ────────────- console.log('\nPhase 2 — verify OpenRouter authentication');- const modelsResp = await listOpenRouterModels(apiKey);- assert(modelsResp.ok, `OpenRouter /api/v1/models returns 2xx (got ${modelsResp.ok ? 'ok' : modelsResp.status})`);- if (modelsResp.ok) {- assert(modelsResp.modelCount > 10, `model list non-empty (${modelsResp.modelCount} models)`);- }-- // ── 3. Scaffold a fresh harness ───────────────────────────────────- // CRITICAL: `metaharness new <name>` writes to $CWD/<name> — the- // --target flag is ignored by the CLI (verified 2026-06-16 against- // [email protected]). Run from inside a fresh temp dir so the- // scaffold lands there, not in the ruflo project root.- console.log('\nPhase 3 — scaffold a fresh harness');- const fixture = mkdtempSync(join(tmpdir(), 'ruflo-mh-openrouter-'));- const target = join(fixture, 'test-harness');- console.log(` fixture cwd: ${fixture}`);- console.log(` expected target: ${target}`);- const scaffold = runMetaharness(- ['test-harness', '--template', 'vertical:coding', '--host', 'claude-code'],- { timeoutMs: 180_000, cwd: fixture },- );- assert(scaffold.exitCode === 0, `metaharness new exit 0 (got ${scaffold.exitCode})`);- assert(existsSync(target), `target dir created at ${target}`);-- // ── 4. Run lifecycle commands against the scaffold ────────────────- console.log('\nPhase 4 — lifecycle commands on the scaffold');- // harness doctor — quick smoke- const doc = runHarness(['doctor', target]);- assert(doc.exitCode === 0, `harness doctor exit 0 (got ${doc.exitCode})`);-- // harness score on the scaffold itself- const score = runHarness(['score', target, '--json']);- assert(score.exitCode === 0, `harness score exit 0 (got ${score.exitCode})`);- const scoreJson = (() => {- const m = /\{[\s\S]*\}/.exec(score.stdout);- try { return m ? JSON.parse(m[0]) : null; } catch { return null; }- })();- assert(scoreJson && typeof scoreJson.score === 'number', 'score.json has numeric score');-- // harness genome — exit 0 (ready) or 1 (needs-work) both acceptable.- // Only exit 2 (blocked / scan-error) is a real failure.- const gen = runHarness(['genome', target, '--json']);- assert(gen.exitCode === 0 || gen.exitCode === 1, `harness genome exit 0 or 1 (got ${gen.exitCode})`);-- // harness mcp-scan- const scan = runHarness(['mcp-scan', target]);- // mcp-scan can exit 1 on findings; either 0 or 1 is acceptable here.- assert(scan.exitCode === 0 || scan.exitCode === 1, `harness mcp-scan exit 0 or 1 (got ${scan.exitCode})`);-- // ── 5. (Optional) one real OpenRouter inference call ──────────────- if (!ARGS.skipInference) {- console.log('\nPhase 5 — single OpenRouter inference call (cheapest auto-route, max_tokens=1)');- const inf = await cheapInferenceCall(apiKey);- assert(inf.ok, `OpenRouter inference 2xx (got ${inf.ok ? 'ok' : inf.status})`);- if (inf.ok) {- console.log(` model used: ${inf.model}`);- console.log(` usage: prompt=${inf.usage?.prompt_tokens} completion=${inf.usage?.completion_tokens}`);- }- } else {- console.log('\nPhase 5 — SKIPPED (--skip-inference)');- }-- // ── 6. Cleanup ────────────────────────────────────────────────────- if (!ARGS.keep) {- rmSync(fixture, { recursive: true, force: true });- console.log(`\nFixture cleaned: ${fixture}`);- } else {- console.log(`\nFixture kept at: ${fixture}`);- }-- console.log(`\n${passed} passed, ${failed} failed`);- if (failed > 0) {- console.log('\nFailures:');- for (const f of failures) console.log(` - ${f}`);- process.exit(1);- }- console.log('\n✓ All harness × OpenRouter integration checks passed.');-}--main().catch((e) => {- console.error('test-with-openrouter crashed:', e.message || e);- process.exit(2);-});diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/threat-model.mjs b/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/threat-model.mjsdeleted file mode 100755index 988bdfcbfd..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/scripts/threat-model.mjs+++ /dev/null@@ -1,59 +0,0 @@-#!/usr/bin/env node-// threat-model.mjs — wrapper around `harness threat-model <path>`.-//-// USAGE-// node scripts/threat-model.mjs --path . --fail-on high --format json--import { runHarness, emitDegradedJsonAndExit } from './_harness.mjs';--const SEVERITY_RANK = { clean: 0, low: 1, medium: 2, high: 3 };--const ARGS = (() => {- const a = { path: '.', format: 'json', failOn: 'high' };- for (let i = 2; i < process.argv.length; i++) {- const v = process.argv[i];- if (v === '--path') a.path = process.argv[++i];- else if (v === '--fail-on') a.failOn = String(process.argv[++i] || 'high').toLowerCase();- else if (v === '--format') a.format = process.argv[++i];- }- return a;-})();--function main() {- if (!SEVERITY_RANK.hasOwnProperty(ARGS.failOn)) {- console.error(`threat-model: --fail-on must be one of clean|low|medium|high`);- process.exit(2);- }- const r = runHarness(['threat-model', ARGS.path]);- if (r.degraded) { emitDegradedJsonAndExit(r.reason); return; }- if (r.exitCode !== 0 && r.exitCode !== 1) {- console.error(`threat-model: harness exited ${r.exitCode}`);- if (r.stderr) console.error(r.stderr.slice(0, 400));- process.exit(2);- }- const payload = r.json ?? { rawStdout: r.stdout.slice(0, 400) };- const worst = String(payload?.worst || 'clean').toLowerCase();- const threshold = SEVERITY_RANK[ARGS.failOn];- const triggered = SEVERITY_RANK[worst] >= threshold && threshold > 0;- const alert = {- threshold: ARGS.failOn, worst, triggered,- reason: triggered- ? `worst=${worst} at or above ${ARGS.failOn}`- : `worst=${worst} below ${ARGS.failOn} — OK`,- };-- if (ARGS.format === 'json') {- console.log(JSON.stringify({ ...payload, durationMs: r.durationMs, alert }, null, 2));- } else {- console.log(`# harness threat-model — ${ARGS.path}`);- console.log('');- console.log(`Worst severity: ${worst}`);- console.log(`Findings: ${(payload?.findings || []).length}`);- console.log('');- console.log(alert.triggered ? `⚠ **ALERT**: ${alert.reason}` : `✓ ${alert.reason}`);- }-- if (alert.triggered) process.exit(1);-}--main();diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-bench/SKILL.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-bench/SKILL.mddeleted file mode 100644index 0981031957..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-bench/SKILL.md+++ /dev/null@@ -1,64 +0,0 @@-----name: harness-bench-description: Manage `@metaharness/darwin` bench suites — `bench create <repo>` scaffolds a JSON suite from a repo's test corpus; `bench verify <suite.json>` checks suite well-formedness. Bench suites are the fixed evaluation corpora that `harness-evolve --bench <suite.json>` scores variants against, decoupling evolution from the repo's natural tests. Degrades gracefully when @metaharness/darwin is absent.-argument-hint: "--op create --repo <path> [--out <path>] | --op verify --suite <path>"-allowed-tools: Bash------Surfaces `metaharness-darwin bench <create|verify>` — the supporting verb-for `harness-evolve --bench`. Use when you want evolution scored against a-fixed corpus (independent of `npm test`) so champion fitness is comparable-across commits or across forks of the same harness.--## When to use--- Setting up a new evolution pipeline for a repo whose `npm test` is- flaky, slow, or undersized — scaffold a deterministic bench suite once,- then evolve against it repeatedly.-- CI: `bench verify` the checked-in suite on every PR that touches it- (cheap; ~5s).-- Forking a harness to a new domain: copy and edit the suite to retarget- the evaluation without losing comparability to the parent.--## Algorithm--Implementation: [`scripts/bench.mjs`](../../scripts/bench.mjs).--### `--op create`-1. Resolve `--repo` path; reject if missing.-2. Shell to `metaharness-darwin bench create <repo> [--out <suite.json>]`.-3. Default output path: `<repo>/.metaharness/bench/suite.json` (chosen by upstream).-4. Suite shape (per upstream): array of `{ input, expectedOutput, weight }` tasks- derived from existing test cases.--### `--op verify`-1. Resolve `--suite` path; reject if missing.-2. Shell to `metaharness-darwin bench verify <suite.json>`.-3. Exit 1 if any task malformed (upstream's signal).--## Output shape--```json-{- "success": true,- "data": {- "op": "verify",- "taskCount": 42,- "wellFormed": true,- "durationMs": 870- }-}-```--## Exit codes--| Code | Meaning |-|---|---|-| 0 | OK (or degraded — Darwin absent) |-| 1 | `--op verify` and suite malformed |-| 2 | Config error or upstream invocation failure |--## Graceful degradation--When `@metaharness/darwin` is absent, emits the standard `{degraded: true,-reason: 'metaharness-darwin-not-available'}` payload and exits 0.diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-drift-from-history/SKILL.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-drift-from-history/SKILL.mddeleted file mode 100644index 5e48feb907..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-drift-from-history/SKILL.md+++ /dev/null@@ -1,65 +0,0 @@-----name: harness-drift-from-history-description: One-command drift detection. Composes audit-list + oia-audit + audit-trend into a single primitive — finds the most recent audit in `metaharness-audit` namespace, runs a fresh audit against the current repo, diffs them via ADR-152 §3.1 similarity, and alerts when structural distance crosses `--threshold`. Iter 53 of ADR-150 deep integration.-argument-hint: "[--path .] [--baseline-since 7d] [--threshold 0.95] [--dry-run] [--format json|table]"-allowed-tools: Bash------The natural ops question after running `oia-audit` weekly is "did anything drift?" Before this skill, the answer required a three-step sequence:--```bash-npx ruflo metaharness audit-list --format json # → pick a key by hand-npx ruflo metaharness oia-audit --format json > /tmp/curr.json-npx ruflo metaharness audit-trend \- --baseline-key <picked-key> --current /tmp/curr.json \- --alert-on-distance-below 0.95-```--This skill collapses it into one command:--```bash-npx ruflo metaharness drift-from-history --threshold 0.95-```--## What it does--1. Lists records from `metaharness-audit` namespace via audit-list.mjs-2. Picks the most recent record by `startedAt` (or `--baseline-since 7d` skips anything newer than 7 days)-3. Runs a fresh `oia-audit` against the current path-4. Diffs the two via audit-trend, applying `--alert-on-distance-below ${threshold}`-5. Returns the structured drift report--## Architectural constraint inheritance (ADR-150)--| Constraint | How drift-from-history satisfies it |-|---|---|-| Removable | Pure subprocess composition over existing scripts — no new `@metaharness/*` import |-| Optional | If oia-audit reports `degraded:true`, this skill exits 3 with a degraded payload |-| Graceful | Empty audit history → exit 2 with hint to seed it; never crashes |-| CI-gate | Smoke step 17z16 anchors the dispatcher entry + subcommand listing |--## Exit codes--- 0 — similarity ≥ threshold (or threshold not crossed)-- 1 — drift detected: similarity < threshold (alert fired)-- 2 — config error (no history, audit-list failed)-- 3 — upstream metaharness absent (degraded payload returned)--## Example--```bash-$ npx ruflo metaharness drift-from-history --threshold 0.95-# drift-from-history--Baseline: audit-2026-06-16T22-58-47-840Z-Current: 2026-06-16T23:05:02.231Z--Structural similarity: 1 (near-identical)-Distance: 0--✓ similarity ≥ 0.95 — OK-```--## Implementation--[`scripts/drift-from-history.mjs`](../../scripts/drift-from-history.mjs)diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-evolve/SKILL.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-evolve/SKILL.mddeleted file mode 100644index 11c38c973f..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-evolve/SKILL.md+++ /dev/null@@ -1,92 +0,0 @@-----name: harness-evolve-description: Run `@metaharness/darwin evolve <repo>` to mutate a harness's seven policy surfaces (planner/contextBuilder/reviewer/retryPolicy/toolPolicy/memoryPolicy/scorePolicy), sandbox-score each variant, and promote only measured wins. The model is frozen; the harness evolves. Closes the loop ADR-150 opens (score+genome describe; evolve changes). Degrades gracefully when @metaharness/darwin is absent (ADR-150 + ADR-153 architectural constraints).-argument-hint: "--repo <path> [--generations 3] [--children 3] [--concurrency 2] [--sandbox real|mock|agent] [--selection pareto|quality-diversity|...] [--mutator deterministic|ruvllm] [--confirm]"-allowed-tools: Bash------Surfaces the upstream `metaharness-darwin evolve` CLI as a ruflo skill. The-**write** layer that pairs with ADR-150's read layer (score / genome /-mcp-scan / threat-model / oia-audit). Use when you have a harness whose-readiness scores are flat and you want to discover *which* surface mutation-moves them — without retraining the foundation model.--## When to use--- A `harness-score` result is below target and you don't know which policy- surface is responsible.-- You're seeding a harness for a new vertical and want to find a good- starting configuration empirically rather than hand-tuning.-- You're comparing your hand-tuned harness against an evolved baseline- (treat darwin's champion as the strawman).--## When NOT to use--- For continuous background optimization. Darwin Mode is human-initiated.- Wire it into CI for one-shot exploration, not for autonomous self-modification.-- For ruflo itself in CI. ADR-153 §5 explicitly rejects auto-evolving ruflo- — the CI gate verifies graceful degradation, not convergence.--## Algorithm--Implementation: [`scripts/evolve.mjs`](../../scripts/evolve.mjs).--1. Validate args (`--repo` exists, caps on `--generations` ≤ 50, `--children`- ≤ 20, `--concurrency` ≤ 8, sandbox/selection/mutator are known values).-2. Without `--confirm`: print plan + exit 0 (mirrors `harness-mint` safety- convention; defense in depth over the upstream `safety.ts` checks).-3. With `--confirm`: shell to `npx -y @metaharness/darwin@~0.8.0 metaharness-darwin evolve <repo> ...`- via the shared `_darwin.mjs` async helper. Per-generation progress is- forwarded to stderr; final champion JSON is captured from stdout.-4. Compute timeout from `generations × children × per-variant` (per-variant- ≈ 60s real, ≈ 2s mock). Caller may override with `--timeout-ms`.-5. Honor upstream exit code 99 — propagate as "safety-disqualified", do not- remap. This is a designed-in tripwire (a variant tripped `inspectVariant`- for secrets / shell-out / network / dynamic-eval). See ADR-153 §"Safety model".-6. Optional `--alert-on-no-improvement`: exit 1 when champion ≤ parent.--## The seven mutation surfaces--| Surface | What it owns |-|---|---|-| `planner` | task decomposition / step ordering |-| `contextBuilder` | what gets fed into the prompt |-| `reviewer` | self-critique / output verification |-| `retryPolicy` | when + how to retry on failure |-| `toolPolicy` | which tools the agent may use, under which conditions |-| `memoryPolicy` | what to persist, recall, forget |-| `scorePolicy` | how the agent grades its own output |--One mutation per variant. Multi-surface mutations are not allowed (causal-attribution stays clean).--## Output--Reports land under `<repo>/.metaharness/`:--```-.metaharness/- archive.json # full lineage tree (sampling next gen draws from this)- lineage.json # parent→child edges only- variants/<id>/ # per-variant code (kept for audit)- runs/<id>/ # per-variant sandbox test output- reports/winner.json # final champion + score delta vs parent-```--Skill stdout = JSON `{success, data: {champion, plan, durationMs, improved}}`.--## Exit codes--| Code | Meaning |-|---|---|-| 0 | Evolved OK, or dry-run, or degraded (Darwin absent) |-| 1 | `--alert-on-no-improvement` and champion did not beat parent |-| 2 | Config error or evolution infrastructure failure |-| 99 | Upstream "safety-disqualified" (PROPAGATED, not remapped) |--## Graceful degradation (ADR-150 constraint 3 + ADR-153)--When `@metaharness/darwin` is not installed, the script emits-`{degraded: true, reason: 'metaharness-darwin-not-available', hint: ...}`-and exits 0. ruflo continues to function. CI's-`no-metaharness-smoke.yml`-style job asserts this path.diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-genome/SKILL.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-genome/SKILL.mddeleted file mode 100644index cc7eb0c00a..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-genome/SKILL.md+++ /dev/null@@ -1,54 +0,0 @@-----name: harness-genome-description: 7-section repo readiness report from `metaharness genome <path>`. Returns repo_type / agent_topology / risk_score / mcp_surface / test_confidence / publish_readiness. Pure-read; degrades gracefully (ADR-150).-argument-hint: "[--path .] [--alert-on-risk-above 0.5] [--format table|json]"-allowed-tools: Bash------Companion to `harness-score`. Where score is a 5-dimension numeric-scorecard, genome is a 7-section categorical/numeric report covering-repo type, agent topology recommendations, risk score (0-1), MCP-surface area, test confidence (0-1), and publish readiness (0-1).--## Algorithm--Implementation: [`scripts/genome.mjs`](../../scripts/genome.mjs).--1. Shell out to `npx metaharness genome <path> --json` (60s hard timeout).-2. Parse the shape: `{ repo_type, agent_topology[], risk_score,- mcp_surface, test_confidence, publish_readiness }`.-3. If `--alert-on-risk-above N`: exit 1 when `risk_score > N`.-4. Output JSON (default) or markdown.--## Phase-0 baseline (ruflo, measured 2026-06-16)--```-{- "repo_type": "node_mcp_ci",- "agent_topology": ["maintainer", "tester", "security", "release"],- "risk_score": 0.27,- "mcp_surface": "remote",- "test_confidence": 0.8,- "publish_readiness": 0.9-}-```--Ruflo's `risk_score: 0.27` is low (good). `publish_readiness: 0.9` is-high. The `mcp_surface: "remote"` reflects that ruflo's MCP servers are-hosted, not bundled.--## When to use--- Pre-mint review: "before scaffolding a custom harness from this repo,- should we?" — genome answers it categorically.-- Drift detection: capture genome snapshots over time, diff via- cost-diff-style tooling to spot when `agent_topology` recommendations- drift away from a deliberate architecture choice.-- CI gate: `--alert-on-risk-above 0.5` fails the build when the repo's- risk profile crosses a threshold.--## Pairs with--- `harness-score` — numeric readiness-- `harness-mcp-scan` — static MCP security findings-- `harness-threat-model` — enterprise-review-grade threat modeldiff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-gepa/SKILL.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-gepa/SKILL.mddeleted file mode 100644index 7aa9771f28..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-gepa/SKILL.md+++ /dev/null@@ -1,65 +0,0 @@-----name: harness-gepa-description: Inspect and audit GEPA genomes via the `@metaharness/darwin/gepa` library entry (darwin 0.8.0) — load/validate a genome (default: the shipped cand-6 promotion), render the system prompt a genome compiles to, or classify failure modes in a run transcript. The `gepaOptimize` loop itself is library-only (bring your own evaluator) and not surfaced here — use `harness-evolve` for sandbox-scored evolution. Degrades gracefully when @metaharness/darwin is absent.-argument-hint: "--op genome|validate|render|analyze [--path <genome.json>] [--transcript <t.json>] [--alert-on-invalid]"-allowed-tools: Bash------Surfaces the GEPA (genetic-evolution prompt-adaptation) *library* exports-from `@metaharness/darwin/gepa`. Unlike the other skills in this plugin-there is no CLI binary behind this — the script dynamic-imports the library-(local resolution first, versioned cache install as fallback) and calls the-subprocess-safe subset.--## When to use--- **Adopting an evolved policy**: `--op render` shows the actual system- prompt a genome compiles to — read THAT, not the raw JSON, before- wiring a genome into a harness.-- **Auditing a promotion**: `--op genome` loads + validates the shipped- cand-6 genome (first holdout-confirmed cheap-tier promotion; provenance- ships in the package) or any genome file you point at.-- **CI gate on genome edits**: `--op validate --alert-on-invalid` exits 1- on structural errors.-- **Debugging a bad run**: `--op analyze --transcript run.json` classifies- failure modes (GEPA's failure-class taxonomy) from a transcript array.--## What is deliberately NOT here--`gepaOptimize` — the optimization loop takes an in-process-`evaluate(candidate)` callback ("bring your own evaluator") that cannot-cross a subprocess boundary. Two supported paths instead:--1. **Library consumers**: `import { gepaOptimize, loadCand6Genome } from '@metaharness/darwin/gepa'`-2. **Sandbox-scored evolution**: `harness-evolve` (darwin CLI `evolve`),- which pairs GEPA with its own sandbox evaluators.--## Algorithm--Implementation: [`scripts/gepa.mjs`](../../scripts/gepa.mjs).--1. `import('@metaharness/darwin/gepa')`; on MODULE_NOT_FOUND fall back to a- one-time `npm install --prefix ~/.ruflo/darwin-cache-0.8.0` and import- the cached `dist/gepa/index.js` (versioned dir → pin bumps invalidate).-2. Dispatch `--op`:- - `genome` → `loadGenome(fs, path)` or `loadCand6Genome()` + `validateGenome`- - `validate` → `validateGenome(rawJson)` (raw parse so broken files reach- the validator instead of throwing in the loader)- - `render` → `buildSystemFromGenome(genome, ext?, glob?)`- - `analyze` → `analyzeTranscript(entries)`-3. Emit one JSON object; exit 0 (or 1 under `--alert-on-invalid`, 2 on bad input).--## Examples--```bash-node scripts/gepa.mjs --op genome # cand-6 + validation-node scripts/gepa.mjs --op render | jq -r .system # what does cand-6 SAY?-node scripts/gepa.mjs --op validate --path my-genome.json --alert-on-invalid-node scripts/gepa.mjs --op analyze --transcript run.json-```--## Exit codes--- `0` — op completed (or degraded — darwin not installable)-- `1` — `--alert-on-invalid` and validation found errors-- `2` — config error (unknown op, missing/broken input file)diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-learn/SKILL.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-learn/SKILL.mddeleted file mode 100644index 5b15de7be7..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-learn/SKILL.md+++ /dev/null@@ -1,63 +0,0 @@-----name: harness-learn-description: Run a GEPA learning cycle via `metaharness learn` (upstream ADR-235, [email protected]) — optimizes a harness genome against a SWE-bench-style slice manifest. $0 dry-run by default; `--run` is the explicit spend opt-in. Requires a metaharness repo checkout (`--repo` or $METAHARNESS_REPO) — without one it reports `checkout-required` with clone instructions. Degrades gracefully when metaharness is absent.-argument-hint: "--host <h> --model <m> --slice <manifest> [--repo <checkout>] [--run] [--alert-on-fail]"-allowed-tools: Bash------Surfaces `metaharness learn` — the upstream GEPA learning harness that-evolves harness policy genomes against a scored task corpus instead of-hand-editing prompts. Candidates are scored on held-out slices and only-measured winners promote (the shipped cand-6 genome is the first such-promotion: holdout gold 2/12 → 3/12, zero regressions).--## When to use--- A harness's policy prompt underperforms on a task family and you want a- measured improvement loop rather than manual prompt iteration.-- Pricing a learning run before committing spend — the default dry-run- resolves the slice manifest and reports cost without any model calls.-- After a learn run promotes a genome: pair with `harness-gepa --op render`- to inspect what the promoted policy actually says.--## Preconditions (upstream design)--The learning harness (GEPA + SWE-bench + Docker) is too heavy for the npm-package, so `learn` needs a local clone:--```bash-git clone https://github.com/ruvnet/metaharness.git-node scripts/learn.mjs --repo ./metaharness --host claude-code --model haiku --slice slices/lite.json-```--Without a checkout the script emits `{status: "checkout-required"}` and-exits 0 — a precondition report, not an error (distinct from-`degraded: true`, which means the npm package itself is absent). The-managed-service path (gateway-side learn jobs, no checkout) is upstream's-ADR-235 follow-up and not available yet.--## Algorithm--Implementation: [`scripts/learn.mjs`](../../scripts/learn.mjs).--1. Validate `--repo` exists when given; export it as `$METAHARNESS_REPO`.-2. Shell to `npx -y metaharness@latest learn --host <h> --model <m> --slice <s> [--run]`- via `_harness.mjs` (graceful degradation, hard timeout).-3. Default timeouts: 120s dry-run, 600s with `--run` — real runs on larger- slices need an explicit `--timeout-ms` matched to slice size × model cost.-4. Detect the checkout-required message → structured payload, exit 0.-5. Parse the trailing JSON report when upstream emits one; otherwise return- the raw report text under `rawReport`.--## Cost note--`--run` is the ONLY path that spends. Everything else — dry-run, checkout-probe, degraded path — is $0. The MCP tool (`metaharness_learn`) has a 120s-subprocess budget; run real learning cycles from a terminal via-`ruflo metaharness learn ... --run --timeout-ms <big>`.--## Exit codes--- `0` — report produced (or dry-run, checkout-required, degraded)-- `1` — `--alert-on-fail` and the learn run reported failure-- `2` — config error (bad `--repo` path)diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-mcp-scan/SKILL.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-mcp-scan/SKILL.mddeleted file mode 100644index cbc20b4ebd..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-mcp-scan/SKILL.md+++ /dev/null@@ -1,47 +0,0 @@-----name: harness-mcp-scan-description: Static security scan of a harness's declared MCP surface via `harness mcp-scan <path>`. Reads `.mcp/servers.json` + `.harness/claims.json`. Pure-read, no dispatch. Exits 1 on findings at or above `--fail-on` severity.-argument-hint: "[--path .] [--fail-on low|medium|high] [--format table|json]"-allowed-tools: Bash------Calls `harness mcp-scan` to enumerate every declared MCP server + tool-and flag policy / permission / dependency issues. Never executes any-tool; pure static analysis.--## Algorithm--Implementation: [`scripts/mcp-scan.mjs`](../../scripts/mcp-scan.mjs).--1. Shell `npx -p metaharness@latest harness mcp-scan <path> --json`.-2. Parse `findings[]` with `{ severity, id, server, tool, message }`.-3. `--fail-on <severity>`: exit 1 when any finding is at or above that- level. Default `high`.-4. Output JSON (default) or markdown table.--## Severity rank--| Severity | Rank |-|---|---:|-| low | 1 |-| medium | 2 |-| high | 3 |--`--fail-on high` (default) only fails on HIGH; `--fail-on medium` also-fails on MEDIUM; `--fail-on low` fails on any finding.--## CI integration--```yaml-- name: MCP static scan- run: node plugins/ruflo-metaharness/scripts/mcp-scan.mjs --fail-on high-```--The exit code is the only thing CI watches; the JSON output goes to-artifacts for human review.--## Graceful degradation--When `harness` binary is unavailable (no network, blocked registry),-emits structured `{ degraded: true, reason: 'metaharness-not-available' }`-and exits 0. Ruflo continues — ADR-150 architectural constraint.diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-mint/SKILL.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-mint/SKILL.mddeleted file mode 100644index 566ed20f40..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-mint/SKILL.md+++ /dev/null@@ -1,72 +0,0 @@-----name: harness-mint-description: Scaffold a custom AI agent harness via `metaharness new <name> --template <id> --host <id>`. Defaults to DRY-RUN (no writes) unless --confirm is passed. Refuses to write to the calling repo root or anywhere inside it. Honors ADR-150 architectural constraint + ruflo's "destructive-action confirmation" pattern.-argument-hint: "--name <id> --template <vertical:coding|minimal|…> [--host claude-code|codex|…] [--target /abs/path] [--confirm] [--format table|json]"-allowed-tools: Bash------The one write-capable skill in the plugin. Every other skill is-pure-read. This one calls `metaharness new`, which writes a new-directory tree.--## Safety (load-bearing)--1. **Dry-run by default.** Without `--confirm`, the script prints what- it would do and exits 0 without touching disk.-2. **Refuses project root.** If `--target` resolves to the current- working directory OR any path inside it, the script errors out with- exit 2. Target must be an absolute path OUTSIDE the calling repo- (default is a fresh `/tmp/ruflo-mint-<ts>-<name>/` dir).-3. **Refuses existing target.** Won't overwrite — must scaffold into a- non-existent dir.-4. **Subprocess + 60s timeout.** No library import, no in-process- execution. The mint stays sandboxed from ruflo's runtime.--## Algorithm--Implementation: [`scripts/mint.mjs`](../../scripts/mint.mjs).--1. Validate `--name`, `--template`. Default `--host` to `claude-code`.-2. Resolve `--target` (default: temp dir).-3. Run safety checks (no project-root writes; target must not exist).-4. Without `--confirm`: emit dry-run plan, exit 0.-5. With `--confirm`: shell `npx metaharness new <name> --template <id>- --host <id> --target <abs> --yes`.--## Templates--`minimal`, `vertical:coding`, `vertical:devops`, `vertical:support`,-`vertical:legal`, `vertical:research`, `vertical:trading`, `vertical:health`,-`vertical:education`, `vertical:sales`, `vertical:business`,-`vertical:crm`, `vertical:marketing`, `vertical:advertising`,-`vertical:ai`, `vertical:agentics`, `vertical:ruview`, `vertical:gaming`,-`vertical:repo-maintainer`, `vertical:exotic`.--## Hosts--`claude-code`, `codex`, `pi-dev`, `hermes`, `openclaw`, `rvm`,-`copilot`, `opencode`, `github-actions`.--## Example dry-run--```-$ node scripts/mint.mjs --name my-harness --template vertical:coding --host claude-code-# harness-mint (dry-run)--- action: metaharness new-- name: my-harness-- template: vertical:coding-- host: claude-code-- target: /tmp/ruflo-mint-1718560000-my-harness-- confirm: false-- willWrite: false--Re-run with `--confirm` to actually scaffold.-```--## Why dry-run by default--Ruflo's behavioral rules say "executing actions with care" — destructive-or repo-touching actions need confirmation. The dry-run output makes the-WHAT visible before the WHEN. A human sees `target`, decides, then-adds `--confirm` if happy.diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-oia-audit/SKILL.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-oia-audit/SKILL.mddeleted file mode 100644index 7152debec4..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-oia-audit/SKILL.md+++ /dev/null@@ -1,79 +0,0 @@-----name: harness-oia-audit-description: Composite Phase-2 audit worker (ADR-150). Bundles harness oia-manifest + threat-model + mcp-scan into one timestamped audit record stored in the `metaharness-audit` memory namespace. Designed for cron-scheduled drift detection.-argument-hint: "[--path .] [--dry-run] [--alert-on-worst clean|low|medium|high] [--format table|json]"-allowed-tools: Bash------The 13th worker (ADR-150 Phase 2) — runs three MetaHarness static-surfaces in one shot, computes a composite worst-severity signal, and-persists the audit record to memory so drift over time is visible.--## Algorithm--Implementation: [`scripts/oia-audit.mjs`](../../scripts/oia-audit.mjs).--1. Run `harness oia-manifest <path>` — Open Infrastructure Architecture- layer alignment (L1-L9).-2. Run `harness threat-model <path>` — categorized MCP-surface threat- report with `worst: clean|low|medium|high`.-3. Run `harness mcp-scan <path>` — per-server/tool policy + permissions- + dep findings.-4. Composite worst = `max(threatModel.worst, max(mcpScan.findings.severity))`.-5. Persist payload to memory namespace `metaharness-audit` with key- `audit-<iso-timestamp>` (unless `--dry-run`).-6. `--alert-on-worst <severity>`: exit 1 if composite worst ≥ threshold.--## Graceful degradation--When ALL three components report `metaharness-not-available`, the script-emits the standard degraded payload and exits 0. When only some are-degraded, each individual component carries its own `degraded: true`-flag in the audit record — the audit still runs and persists what it-could gather.--## CI / cron integration--Designed for weekly cron in `.github/workflows/`:--```yaml-on:- schedule:- - cron: '17 4 * * 0' # Sundays at 04:17 UTC-jobs:- oia-audit:- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@v4- - uses: actions/setup-node@v4- - run: node plugins/ruflo-metaharness/scripts/oia-audit.mjs --alert-on-worst high-```--`--alert-on-worst high` fails the job on any HIGH-severity finding;-drift below HIGH is logged but doesn't block.--## Memory namespace--Each audit run stores under `metaharness-audit:audit-<iso-ts>`. To list-recent audits:--```bash-npx @claude-flow/cli@latest memory list --namespace metaharness-audit --limit 10-```--To diff two audits (drift detection):--```bash-A=$(npx ... memory retrieve --key audit-2026-06-01... --namespace metaharness-audit)-B=$(npx ... memory retrieve --key audit-2026-06-15... --namespace metaharness-audit)-# Compare composite.worst, components.threatModel.worst, etc.-```--A future ADR can wire this into a dedicated `cost-diff`-style diff-viewer specifically for audit drift.--## Pairs with--- `harness-threat-model` — the underlying threat-model component-- `harness-mcp-scan` — the underlying MCP-scan component-- `harness-score` + `harness-genome` — readiness metrics (orthogonal to audit)diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-score/SKILL.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-score/SKILL.mddeleted file mode 100644index dc1114d8b5..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-score/SKILL.md+++ /dev/null@@ -1,66 +0,0 @@-----name: harness-score-description: 5-dimension harness readiness scorecard from `metaharness score <path>`. Returns harnessFit / compileConfidence / taskCoverage / toolSafety / memoryUsefulness + estCostPerRunUsd + scaffoldReady. Pure-read; subprocess invocation; degrades gracefully when MetaHarness is absent (ADR-150 architectural constraint).-argument-hint: "[--path .] [--alert-on-fit-below 70] [--format table|json]"-allowed-tools: Bash------Surfaces the upstream `metaharness score` CLI as a ruflo skill. Use when-Claude Code needs to assess whether a repo is ready for harness adoption-before recommending the user run `npx ruflo init` or `harness-mint`.--## Algorithm--Implementation: [`scripts/score.mjs`](../../scripts/score.mjs).--1. Shell out to `npx metaharness score <path> --json` (single subprocess,- 60s hard timeout).-2. Parse the JSON shape: `{ harnessFit, compileConfidence, taskCoverage,- toolSafety, memoryUsefulness, estCostPerRunUsd, recommendedMode,- archetype, template, scaffoldReady, hardConstraints }`.-3. If `--alert-on-fit-below N`: exit 1 when `harnessFit < N`.-4. Output JSON (default) or markdown table.--## Phase-0 baseline (ruflo's own scorecard, measured 2026-06-16)--| Dimension | Value |-|---|---:|-| harnessFit | 82/100 |-| compileConfidence | 100 |-| taskCoverage | 79 |-| toolSafety | 100 |-| memoryUsefulness | 40 |-| estCostPerRunUsd | $0.048 |-| recommendedMode | CLI + MCP |-| archetype | typescript-sdk-harness |-| template | vertical:coding |-| scaffoldReady | true |--Ruflo passes its own readiness check. `memoryUsefulness: 40` is the-weakest dimension — track this as a leading indicator for future memory-work in the AgentDB layer.--## CI integration--```bash-node plugins/ruflo-metaharness/scripts/score.mjs --alert-on-fit-below 70 --format json-```--Exit 1 fails the build. Pair with `harness-genome` for the full-7-section view.--## Graceful degradation (ADR-150 architectural constraint rule #3)--When `metaharness` is not installed and `npx` can't fetch it (offline,-no network, registry unreachable), the script emits:--```json-{- "degraded": true,- "reason": "metaharness-not-available",- "hint": "Install metaharness manually with `npm i -D metaharness` or run `npx metaharness@latest --version` to verify network access."-}-```--and exits 0. Ruflo continues to function — this is the architectural-constraint in action.diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-security-bench/SKILL.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-security-bench/SKILL.mddeleted file mode 100644index e00c1e0bb0..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-security-bench/SKILL.md+++ /dev/null@@ -1,101 +0,0 @@-----name: harness-security-bench-description: Run `@metaharness/darwin security bench` (upstream "Darwin Shield" / ADR-155) — evolves a champion security-detection harness against a 10-vuln / 9-decoy corpus and grades it on TPR/FPR/patch-pass/repro/unsafe vs four baselines (B0 static, B1 LLM-single-pass, B2 fixed-agent, B3 Darwin-champion). Closest reference implementation for ruflo's own ADR-155 nightly self-learning security harness (PR #2417). Degrades gracefully when @metaharness/darwin is absent.-argument-hint: "[--population 2] [--cycles 1] [--seed N] [--alert-on-fail]"-allowed-tools: Bash------Surfaces the upstream `metaharness-darwin security bench` command. **This is-the upstream's own ADR-155 — Darwin Shield — and is the closest reference-implementation for ruflo's nightly self-learning security harness ([#2417](https://github.com/ruvnet/ruflo/pull/2417)).**--## Why this matters for ruflo's ADR-155--ruflo's ADR-155 proposes three learning loops (per-dimension confidence,-severity calibration, auto-fix bid). Loop A trains on accumulated-`(finding, dimension, human_outcome)` tuples — but the gradient signal is-only sound if the underlying detection mechanism converges on a known-good-corpus. Darwin Shield evolves exactly that mechanism on a 10-vuln/9-decoy-ground-truth set. Running this nightly gives us:--- **Empirical floor:** if Darwin Shield's champion can't reach- TPR=1/FPR=0 on the bench corpus, our Loop A's reward signal is noise.-- **Drift detection:** week-over-week champion fitness deltas surface- when the security landscape (or our mutator policy) shifts.-- **Baseline diversity:** the 4 baselines (B0–B3) give us 4 anchor- points to weight per-dimension confidence against.--## Algorithm--Implementation: [`scripts/security-bench.mjs`](../../scripts/security-bench.mjs).--1. Shell to `npx -y @metaharness/darwin@~0.8.0 metaharness-darwin security bench --population N --cycles N [--seed S]`.-2. Default timeout = `3s × 19 evaluations × population × cycles + 30s overhead`.- At default `--population 2 --cycles 1` ≈ 144s; at `--population 4 --cycles 3` ≈ 12 min.-3. Parse the markdown report — overall PASS/FAIL plus per-gate- pass/fail rows (gate examples: "TPR improvement ≥ 25% vs fixed",- "FPR reduction ≥ 40%", "Patch-test pass rate ≥ 80%", "Reproduction- success ≥ 90%", "Unsafe outputs = 0", "Cost increase ≤ 2× fixed",- "Beyond SOTA: champion statistically beats previous champion",- "Compounding: false-positive repeat-rate drop ≥ 35%").-4. Parse the baselines-vs-champion table (4 rows: fitness/TPR/FPR/patchPass/- repro/unsafe/cost per harness).-5. Emit structured JSON. With `--alert-on-fail`, exit 1 when overall = FAIL.--## Output shape--```json-{- "success": true,- "data": {- "overall": { "ok": true, "icon": "✅" },- "gates": {- "total": 11,- "passed": 11,- "failed": 0,- "details": [{ "ok": true, "criterion": "TPR improvement ≥ 25% vs fixed harness", "measured": "+150% (B2 0.4 → B3 1)" }, ...]- },- "baselines": [- { "harness": "static-only", "fitness": 0.5665, "tpr": 0.3, "fpr": 1, "unsafe": 0, ... },- { "harness": "LLM single-pass", "fitness": 0.1365, ... },- { "harness": "fixed agent", "fitness": 0.598, ... },- { "harness": "Darwin champion", "fitness": 0.93275, "tpr": 1, "fpr": 0, ... }- ],- "rawMarkdown": "...",- "shape": { "population": 2, "cycles": 1, "seed": null },- "durationMs": 142000- }-}-```--## Wiring into ADR-155 nightly harness--The ADR-155 nightly workflow (per #2418 task `W1.5`) will spawn this as-one of the active-pentest dimension's calls — its results become a-trajectory record:--```jsonc-{- "dimension": "mcp-pentest",- "subdimension": "darwin-shield-bench",- "champion_fitness": 0.93275,- "champion_tpr": 1, "champion_fpr": 0,- "gates_passed": 11, "gates_failed": 0,- "shape": { "population": 4, "cycles": 3 }-}-```--Loop A learns: if `darwin-shield-bench` consistently passes on the seeded-corpus, weight findings caught only by `mcp-pentest` higher.--## Exit codes--| Code | Meaning |-|---|---|-| 0 | Bench ran (overall PASS or FAIL — distinguish via JSON `overall.ok`), or degraded |-| 1 | `--alert-on-fail` and `overall.ok === false` |-| 2 | Config error or upstream infrastructure failure |--## Graceful degradation--When `@metaharness/darwin` is absent, emits `{degraded: true, reason: 'metaharness-darwin-not-available'}` and exits 0.diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-similarity/SKILL.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-similarity/SKILL.mddeleted file mode 100644index 14a89ba0f4..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-similarity/SKILL.md+++ /dev/null@@ -1,67 +0,0 @@-----name: harness-similarity-description: ADR-152 — weighted similarity between two harness fingerprints (genome + score JSON). Returns overall score in [0,1] plus per-component breakdown (cosine over 9 numerics, categorical agreement over 4 enums, jaccard over agent_topology). Unblocks ADR-151 §3.2 Recommender, §3.3 Drift Detection, §3.5 Plugin Compat. Pure-TS, no `@metaharness/*` dep — preserves ADR-150's four architectural constraints.-argument-hint: "(--a a.json --b b.json | --a-key X --b-key Y) [--per-dimension] [--alert-below 0.5] [--format json|table]"-allowed-tools: Bash------Surfaces the production similarity function from [`scripts/_similarity.mjs`](../../scripts/_similarity.mjs) as a callable skill. Use when an agent needs to:--- decide whether to fork an existing harness vs scaffold a new one-- rank candidate templates against a target repo's genome-- diff two harnesses produced by different teams to find duplicate work-- generate the confidence number that ADR-151 §3.2's Recommender wraps--## Algorithm (from ADR-152 §Decision)--```-overall = 0.60·cosine + 0.25·categorical + 0.15·jaccard-```--- **cosine** — over a 9-dim numerical vector of normalized scorecard + genome dims-- **categorical** — fraction of 4 enum fields that match (`repo_type`, `archetype`, `template`, `recommendedMode`)-- **jaccard** — `|A ∩ B| / |A ∪ B|` over the `agent_topology[]` array--The 3-component design is load-bearing: numerical cosine alone is too coarse (the iter-35 spike showed LEGAL vs DEVOPS at cosine=0.97 despite being unrelated verticals). Categorical + jaccard pull the composite to the correct ordering.--## Reference outputs (iter-35 spike fixtures)--| Pair | overall | cosine | categorical | jaccard |-|---|---:|---:|---:|---:|-| `LEGAL` × `LEGAL` (self) | 1.0000 | 1.0000 | 1.0000 | 1.0000 |-| `LEGAL` × `SUPPORT` | 0.8296 | 0.9987 | 0.7500 | 0.2857 |-| `LEGAL` × `DEVOPS` | 0.5840 | 0.9734 | 0.0000 | 0.0000 |--Both invariants from ADR-152 §"Smallest demonstrable spike" hold:-1. `similarity(X, X) === 1` exactly-2. `similarity(LEGAL, DEVOPS) < similarity(LEGAL, SUPPORT)` (vertical affinity)--## Architectural constraint inheritance (ADR-150)--- **Removable** — pure-TS function, zero static `@metaharness/*` imports.-- **Optional** — no new dep in `package.json`.-- **Graceful** — malformed inputs emit `{ degraded: true, reason }` with exit code 2; never throws.-- **CI-gate** — smoke step 17y locks the contract: module exports, spike fixtures reproduce, CLI dispatcher entry registered, MCP tool registered.--## Usage--```bash-# File inputs-npx ruflo metaharness similarity --a a.json --b b.json--# Memory inputs (records persisted by oia-audit.mjs)-npx ruflo metaharness similarity --a-key harness-X --b-key harness-Y--# Per-dimension breakdown (used by ADR-151 §3.2 Recommender)-npx ruflo metaharness similarity --a a.json --b b.json --per-dimension--# Alert when too-dissimilar (used by ADR-151 §3.3 Drift Detection)-npx ruflo metaharness similarity --a a.json --b b.json --alert-below 0.5-```--## Implementation--Production module: [`scripts/_similarity.mjs`](../../scripts/_similarity.mjs)-CLI skill: [`scripts/similarity.mjs`](../../scripts/similarity.mjs)-MCP tool: `mcp__claude-flow__metaharness_similarity` (registered in `v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts`)-Spike anchor: [`scripts/_spike-similarity.mjs`](../../scripts/_spike-similarity.mjs) (regression suite — invariants locked here)diff --git a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-threat-model/SKILL.md b/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-threat-model/SKILL.mddeleted file mode 100644index 53d746cb11..0000000000--- a/v3/@claude-flow/cli/plugins/ruflo-metaharness/skills/harness-threat-model/SKILL.md+++ /dev/null@@ -1,39 +0,0 @@-----name: harness-threat-model-description: Enterprise-review-grade threat model from `harness threat-model <path>`. Categorizes MCP-surface threats; emits `worst: 'clean'|'low'|'medium'|'high'` + per-threat findings. Pure-read.-argument-hint: "[--path .] [--fail-on clean|low|medium|high] [--format table|json]"-allowed-tools: Bash------The companion to `harness-mcp-scan` for enterprise security reviews.-Where mcp-scan is a per-server static lint, threat-model produces a-categorized report suitable for sharing with an InfoSec team.--## Algorithm--Implementation: [`scripts/threat-model.mjs`](../../scripts/threat-model.mjs).--1. Shell `npx -p metaharness@latest harness threat-model <path> --json`.-2. Parse `{ worst, findings[] }`.-3. `--fail-on <severity>`: exit 1 when `worst >= fail-on`. Default `high`.--## Severity rank--| Severity | Rank |-|---|---:|-| clean | 0 |-| low | 1 |-| medium | 2 |-| high | 3 |--## When to use--- Pre-launch review: include the JSON output in the release-readiness- packet sent to security.-- Periodic audit: schedule via the planned `oia-audit` background- worker (ADR-150 Phase 2) to detect MCP-surface drift.--## Graceful degradation--Same pattern as the other skills: when `harness` is absent, emit-`{ degraded: true }` and exit 0. ADR-150 architectural constraint.diff --git a/v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts b/v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.tsindex 98f8afb04d..1ab11a42f6 100644--- a/v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts+++ b/v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts@@ -37,6 +37,21 @@ function validateScore(value: unknown, defaultVal: number): number {return Math.max(0, Math.min(1, value));}+/**+ * Validate an optional ISO-8601 timestamp param (temporal validity fields).+ * Returns { value } when absent or valid, { error } when present but unparseable.+ */+function validateIsoTimestamp(value: unknown, name: string): { value?: string; error?: string } {+ if (value === undefined || value === null) return {};+ if (typeof value !== 'string' || value.length === 0 || value.length > 64) {+ return { error: `${name} must be a non-empty ISO-8601 timestamp string (max 64 chars)` };+ }+ if (Number.isNaN(Date.parse(value))) {+ return { error: `${name} is not a parseable ISO-8601 timestamp: ${value.substring(0, 64)}` };+ }+ return { value };+}+function sanitizeError(error: unknown): string {if (error instanceof Error) {// Strip filesystem paths from error messages@@ -603,6 +618,18 @@ export const agentdbHierarchicalStore: MCPTool = {enum: ['working', 'episodic', 'semantic'],default: 'working',},+ validFrom: {+ type: 'string',+ description: 'Optional ISO-8601 timestamp from which this fact is valid (temporal validity — Zep/Graphiti-style). Omit for always-valid.',+ },+ validUntil: {+ type: 'string',+ description: 'Optional ISO-8601 timestamp after which this fact is no longer valid. Expired facts are hidden from recall unless includeExpired=true.',+ },+ supersedes: {+ type: 'string',+ description: 'Optional id (or key) of an existing entry this fact supersedes. The old entry is INVALIDATED (stamped validUntil=now + supersededBy=<new id>), not deleted — it stays auditable via recall includeExpired=true.',+ },},required: ['key', 'value'],},@@ -621,8 +648,24 @@ export const agentdbHierarchicalStore: MCPTool = {if (!['working', 'episodic', 'semantic'].includes(tier)) {return { success: false, error: `Invalid tier: ${tier}. Must be working, episodic, or semantic` };}+ // Temporal validity fields (all optional, backward compatible)+ const validFrom = validateIsoTimestamp(params.validFrom, 'validFrom');+ if (validFrom.error) return { success: false, error: validFrom.error };+ const validUntil = validateIsoTimestamp(params.validUntil, 'validUntil');+ if (validUntil.error) return { success: false, error: validUntil.error };+ const supersedes = params.supersedes !== undefined+ ? validateString(params.supersedes, 'supersedes', 1000)+ : undefined;+ if (params.supersedes !== undefined && !supersedes) {+ return { success: false, error: 'supersedes must be a non-empty string (entry id or key, max 1KB)' };+ }const bridge = await getBridge();- const result = await bridge.bridgeHierarchicalStore({ key, value, tier });+ const result = await bridge.bridgeHierarchicalStore({+ key, value, tier,+ validFrom: validFrom.value,+ validUntil: validUntil.value,+ supersedes: supersedes ?? undefined,+ });return result ?? { success: false, error: 'AgentDB bridge not available. Use memory_store/memory_search instead.' };} catch (error) {return { success: false, error: sanitizeError(error) };@@ -641,6 +684,11 @@ export const agentdbHierarchicalRecall: MCPTool = {query: { type: 'string', description: 'Recall query' },tier: { type: 'string', description: 'Filter by tier (working, episodic, semantic)' },topK: { type: 'number', description: 'Number of results (default: 5)' },+ includeExpired: {+ type: 'boolean',+ description: 'Include temporally-invalid entries (superseded, expired, or not-yet-valid). Audit escape hatch — default false.',+ default: false,+ },},required: ['query'],},@@ -660,6 +708,7 @@ export const agentdbHierarchicalRecall: MCPTool = {query,tier: tier ?? undefined,topK: validatePositiveInt(params.topK, 5, MAX_TOP_K),+ includeExpired: params.includeExpired === true,});return result ?? { results: [], error: 'AgentDB bridge not available. Use memory_search instead.' };} catch (error) {diff --git a/v3/@claude-flow/cli/src/mcp-tools/browser-session-tools.ts b/v3/@claude-flow/cli/src/mcp-tools/browser-session-tools.tsindex 1eddd1e029..6d3232785d 100644--- a/v3/@claude-flow/cli/src/mcp-tools/browser-session-tools.ts+++ b/v3/@claude-flow/cli/src/mcp-tools/browser-session-tools.ts@@ -12,7 +12,11 @@* (for trajectory hooks + RVF), and the bridged `memory` namespace (for* AgentDB index). They do not inline a replay engine; replay* enumerates trajectory steps and returns them for the caller to dispatch.- * - Pinned to [email protected] to match `ruflo-ruvector` ADR-0001.+ * - ruvector resolution is local-first: if a locally installed `ruvector`+ * package is found (the CLI already depends on [email protected]), its bin+ * is spawned directly with `node`; otherwise we fall back to+ * `npx -y [email protected]`. The previous 0.2.25 pin forced cold npx+ * downloads of a *second* ruvector version — 4 per browser session.* - Best-effort: missing dependencies (no `ruvector`, no `agent-browser`,* no AgentDB controller) degrade gracefully with a structured error* rather than a process crash.@@ -21,7 +25,11 @@import type { MCPTool, MCPToolResult } from './types.js';import { validateIdentifier, validateText } from './validate-input.js';-const RUVECTOR_PIN = '[email protected]';+// Pin matches the version in this package's own dependency tree so the npx+// fallback never downloads a second ruvector. Subcommand surface verified+// against [email protected] --help: `rvf create/compact/status/derive/segments`+// and `hooks trajectory-begin/step/end` all exist with the flags used below.+const RUVECTOR_PIN = '[email protected]';const RVF_DIR_DEFAULT = '.ruflo/browser-sessions';interface ShellResult {@@ -52,6 +60,58 @@ async function shell(cmd: string, args: string[], opts: { timeout?: number } = {}}+/**+ * Resolve the locally installed ruvector CLI (memoized). Returns the absolute+ * path to its bin script, or null when ruvector is not installed locally.+ * Spawning `node <bin>` directly avoids the ~2-8s cold `npx -y ruvector@…`+ * download that previously hit every ruvector shell-out (4 per session).+ */+let ruvectorCliPromise: Promise<string | null> | null = null;++function resolveLocalRuvectorCli(): Promise<string | null> {+ if (ruvectorCliPromise) return ruvectorCliPromise;+ ruvectorCliPromise = (async () => {+ try {+ const { createRequire } = await import('node:module');+ const path = await import('node:path');+ const { readFile } = await import('node:fs/promises');+ const req = createRequire(import.meta.url);+ const entry = req.resolve('ruvector');+ // Walk up from the resolved entry to the package root (package.json+ // itself may not be exported, so we can't require.resolve it directly).+ let dir = path.dirname(entry);+ for (let i = 0; i < 6; i++) {+ try {+ const pkg = JSON.parse(await readFile(path.join(dir, 'package.json'), 'utf-8')) as {+ name?: string;+ bin?: string | Record<string, string>;+ };+ if (pkg.name === 'ruvector') {+ const bin = typeof pkg.bin === 'string' ? pkg.bin : pkg.bin?.ruvector;+ return bin ? path.join(dir, bin) : null;+ }+ } catch {+ // no package.json at this level — keep walking+ }+ const parent = path.dirname(dir);+ if (parent === dir) break;+ dir = parent;+ }+ } catch {+ // ruvector not installed locally+ }+ return null;+ })();+ return ruvectorCliPromise;+}++/** Run a ruvector CLI command: local install first, npx pin as fallback. */+async function ruvector(args: string[], opts: { timeout?: number } = {}): Promise<ShellResult> {+ const cli = await resolveLocalRuvectorCli();+ if (cli) return shell(process.execPath, [cli, ...args], opts);+ return shell('npx', ['-y', RUVECTOR_PIN, ...args], opts);+}+async function ensureSessionsDir(): Promise<string> {const { mkdir } = await import('node:fs/promises');const path = await import('node:path');@@ -124,15 +184,24 @@ export const browserSessionTools: MCPTool[] = [//// 384 matches the MiniLM-L6 default used elsewhere in the// toolchain (ONNX embedder + AgentDB vector indexes).- const rvf = await shell(- 'npx',- ['-y', RUVECTOR_PIN, 'rvf', 'create', rvfPath, '--dimension', '384'],+ const rvf = await ruvector(+ ['rvf', 'create', rvfPath, '--dimension', '384'],{ timeout: 60000 },);if (!rvf.success) return fail('rvf create failed', { detail: rvf.error, stderr: rvf.stderr, sessionId, rvfPath });- // 2. trajectory-begin- const tb = await shell('npx', ['-y', RUVECTOR_PIN, 'hooks', 'trajectory-begin', '--session-id', sessionId, '--task', input.task as string]);+ // 2. trajectory-begin.+ // Flag names verified against ruvector 0.2.25 AND 0.2.27 --help:+ // trajectory-begin takes `-c/--context` + `-a/--agent` — the+ // `--session-id`/`--task` flags previously passed here were never+ // valid on either version (commander exited with "unknown option"),+ // so every trajectory call failed. Same bug class as the #2015+ // `rvf create --kind` fix documented above. The session id is folded+ // into the context string since ruvector tracks a single current+ // trajectory per project.+ const tb = await ruvector(['hooks', 'trajectory-begin',+ '--context', `${sessionId}: ${input.task as string}`,+ '--agent', 'browser-session']);if (!tb.success) return fail('trajectory-begin failed', { detail: tb.error, stderr: tb.stderr, sessionId, rvfPath });// 3. browser_open via agent-browser@@ -144,11 +213,11 @@ export const browserSessionTools: MCPTool[] = [}}- // 4. log the open as the first trajectory step- await shell('npx', ['-y', RUVECTOR_PIN, 'hooks', 'trajectory-step',- '--session-id', sessionId,- '--action', 'browser_open',- '--args', JSON.stringify({ url: input.url }),+ // 4. log the open as the first trajectory step.+ // trajectory-step takes `--action`/`--result` only (no --session-id /+ // --args on 0.2.25 or 0.2.27) — args are folded into the action string.+ await ruvector(['hooks', 'trajectory-step',+ '--action', `browser_open ${JSON.stringify({ url: input.url })}`,'--result', 'ok']);return ok({@@ -187,14 +256,18 @@ export const browserSessionTools: MCPTool[] = [const verdict = input.verdict as string;if (!['pass', 'fail', 'partial'].includes(verdict)) return fail(`invalid verdict: ${verdict}`);- // 1. trajectory-end- const te = await shell('npx', ['-y', RUVECTOR_PIN, 'hooks', 'trajectory-end',- '--session-id', input.session as string,- '--verdict', verdict]);+ // 1. trajectory-end.+ // trajectory-end takes `--success` + `--quality <0-1>` (no+ // --session-id / --verdict on 0.2.25 or 0.2.27) — the verdict maps to+ // quality: pass=1 (+ --success), partial=0.5, fail=0.+ const teArgs = ['hooks', 'trajectory-end',+ '--quality', verdict === 'pass' ? '1' : verdict === 'partial' ? '0.5' : '0'];+ if (verdict === 'pass') teArgs.push('--success');+ const te = await ruvector(teArgs);if (!te.success) return fail('trajectory-end failed', { detail: te.error, stderr: te.stderr });// 2. rvf compact- const compact = await shell('npx', ['-y', RUVECTOR_PIN, 'rvf', 'compact', input.rvf_path as string]);+ const compact = await ruvector(['rvf', 'compact', input.rvf_path as string]);if (!compact.success) return fail('rvf compact failed', { detail: compact.error, stderr: compact.stderr });// 3. AgentDB index — best-effort via memory store (claude-flow bridges)@@ -246,7 +319,7 @@ export const browserSessionTools: MCPTool[] = [if (!vS.valid) return fail(vS.error || 'invalid session');// 1. Verify RVF container exists- const status = await shell('npx', ['-y', RUVECTOR_PIN, 'rvf', 'status', input.rvf_path as string]);+ const status = await ruvector(['rvf', 'status', input.rvf_path as string]);if (!status.success) return fail('rvf status failed', { detail: status.error, stderr: status.stderr });// 2. Derive child container if requested@@ -258,13 +331,13 @@ export const browserSessionTools: MCPTool[] = [const dir = path.dirname(input.rvf_path as string);replayId = `${input.session}-replay-${Date.now()}`;replayPath = path.join(dir, `${replayId}.rvf`);- const dr = await shell('npx', ['-y', RUVECTOR_PIN, 'rvf', 'derive', input.rvf_path as string, replayPath]);+ const dr = await ruvector(['rvf', 'derive', input.rvf_path as string, replayPath]);if (!dr.success) return fail('rvf derive failed', { detail: dr.error, stderr: dr.stderr });}// 3. Surface the trajectory steps from the segments listing — the caller is// expected to read trajectory.ndjson from the RVF container and dispatch.- const segments = await shell('npx', ['-y', RUVECTOR_PIN, 'rvf', 'segments', input.rvf_path as string]);+ const segments = await ruvector(['rvf', 'segments', input.rvf_path as string]);return ok({sourceSession: input.session,diff --git a/v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts b/v3/@claude-flow/cli/src/mcp-tools/hooks-tools.tsindex e5910092fc..f417603f70 100644--- a/v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts+++ b/v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts@@ -2513,15 +2513,18 @@ export const hooksTrajectoryStart: MCPTool = {properties: {task: { type: 'string', description: 'Task description' },agent: { type: 'string', description: 'Agent type' },+ sessionId: { type: 'string', description: 'Session id for the execution-state tree (default: CLAUDE_FLOW_SESSION_ID or "default")' },},required: ['task'],},handler: async (params: Record<string, unknown>) => {const task = params.task as string;const agent = (params.agent as string) || 'coder';+ const sessionId = (params.sessionId as string) || process.env.CLAUDE_FLOW_SESSION_ID || 'default';{ const v = validateText(task, 'task'); if (!v.valid) return { success: false, error: v.error }; }if (params.agent) { const v = validateIdentifier(params.agent as string, 'agent'); if (!v.valid) return { success: false, error: v.error }; }+ if (params.sessionId) { const v = validateIdentifier(params.sessionId as string, 'sessionId'); if (!v.valid) return { success: false, error: v.error }; }const trajectoryId = `traj-${Date.now()}-${Math.random().toString(36).substring(7)}`;const startedAt = new Date().toISOString();@@ -2537,6 +2540,13 @@ export const hooksTrajectoryStart: MCPTool = {activeTrajectories.set(trajectoryId, trajectory);+ // MAGE-style execution-state-tree mirror (prototype, ruvector/trajectory-tree.ts).+ // Non-fatal by design — the semantic trajectory path below is untouched.+ try {+ const { getTrajectoryTree } = await import('../ruvector/trajectory-tree.js');+ getTrajectoryTree().openTrajectory({ sessionId, trajectoryId, task, agent });+ } catch { /* prototype path — never blocks trajectory recording */ }+// Persist pending trajectory to disk so it survives MCP restartsconst storeFn = await getRealStoreFunction();if (storeFn) {@@ -2601,6 +2611,12 @@ export const hooksTrajectoryStep: MCPTool = {});}+ // MAGE-style execution-state-tree mirror (prototype, non-fatal)+ try {+ const { getTrajectoryTree } = await import('../ruvector/trajectory-tree.js');+ getTrajectoryTree().appendStep({ trajectoryId, stepId, action, quality });+ } catch { /* prototype path — never blocks step recording */ }+// ADR-130 Phase 3: fire-and-forget causal edge write// trajectory context node → step node (relation: "trajectory-caused")if (result) {@@ -2689,6 +2705,12 @@ export const hooksTrajectoryEnd: MCPTool = {activeTrajectories.delete(trajectoryId);}+ // MAGE-style execution-state-tree mirror (prototype, non-fatal)+ try {+ const { getTrajectoryTree } = await import('../ruvector/trajectory-tree.js');+ getTrajectoryTree().closeTrajectory({ trajectoryId, success });+ } catch { /* prototype path — never blocks trajectory finalization */ }+// SONA Learning - process trajectory outcome for routing optimizationlet sonaResult: { learned: boolean; patternKey: string; confidence: number } = {learned: false, patternKey: '', confidence: 0@@ -2995,6 +3017,9 @@ export const hooksPatternSearch: MCPTool = {topK: { type: 'number', description: 'Number of results' },minConfidence: { type: 'number', description: 'Minimum similarity threshold (0-1)' },namespace: { type: 'string', description: 'Namespace to search (default: pattern)' },+ strategy: { type: 'string', enum: ['semantic', 'state-tree'], description: 'Retrieval strategy. Default "semantic" (unchanged behavior). "state-tree" returns the MAGE-style root→current execution-state path for a session instead of embedding search (prototype).' },+ sessionId: { type: 'string', description: 'Session id for strategy="state-tree" (default: CLAUDE_FLOW_SESSION_ID or "default")' },+ depth: { type: 'number', description: 'For strategy="state-tree": max path nodes returned, counted from the current node upward' },},required: ['query'],},@@ -3003,10 +3028,45 @@ export const hooksPatternSearch: MCPTool = {const topK = (params.topK as number) || 5;const minConfidence = (params.minConfidence as number) || 0.3;const namespace = (params.namespace as string) || 'pattern';+ const strategy = (params.strategy as string) || 'semantic';{ const v = validateText(query, 'query'); if (!v.valid) return { success: false, error: v.error }; }if (params.namespace) { const v = validateIdentifier(params.namespace as string, 'namespace'); if (!v.valid) return { success: false, error: v.error }; }+ // Opt-in MAGE-style positional retrieval (prototype). Default stays the+ // semantic vector path below — zero behavior change unless requested.+ if (strategy === 'state-tree') {+ const sessionId = (params.sessionId as string) || process.env.CLAUDE_FLOW_SESSION_ID || 'default';+ if (params.sessionId) { const v = validateIdentifier(params.sessionId as string, 'sessionId'); if (!v.valid) return { success: false, error: v.error }; }+ try {+ const { getTrajectoryTree } = await import('../ruvector/trajectory-tree.js');+ const recall = getTrajectoryTree().recallPath({+ sessionId,+ depth: typeof params.depth === 'number' ? (params.depth as number) : undefined,+ siblingWindow: topK,+ });+ return {+ query,+ strategy: 'state-tree',+ backend: 'state-tree',+ sessionId: recall.sessionId,+ currentId: recall.currentId,+ path: recall.path,+ siblings: recall.siblings,+ note: 'Positional root→current execution-state path (no embedding search). Prototype — see ruvector/trajectory-tree.ts limitations.',+ };+ } catch (error) {+ return {+ query,+ strategy: 'state-tree',+ backend: 'state-tree-unavailable',+ path: [],+ siblings: [],+ error: String(error),+ };+ }+ }+// Phase 3: Try ReasoningBank search via bridge firsttry {const bridge = await import('../memory/memory-bridge.js');@@ -4518,6 +4578,68 @@ export const hooksModelStats: MCPTool = {},};+// Model verify — confidence-gated tier escalation (post-generation).+// The heuristics live in ruvector/output-verifier.ts; this wrapper adds the+// MCP surface and feeds the verdict into the SAME learning stream that+// hooks_model-outcome uses (ModelRouter.recordOutcome → Thompson priors), so+// the router learns from escalations. A dedicated tool (rather than a+// "verify mode" on hooks_model-outcome) was chosen because outcome recording+// is a terminal write while verify is a MID-LOOP decision point that returns+// a verdict the agent acts on — overloading outcome would conflate the two+// and break the route → generate → verify → (escalate) → outcome sequence.+export const hooksModelVerify: MCPTool = {+ name: 'hooks_model-verify',+ description: 'Verify a generated output with CHEAP structural signals ($0, no LLM call) and get an escalation verdict — the post-generation half of confidence-gated tier routing (route → generate → verify → escalate on failure). Checks: empty/truncated output, refusal patterns, degenerate repetition, and real syntax parsing for code/JSON tasks (TypeScript compiler / JSON.parse). Returns {confident, reasons[], suggestedTier, suggestedModel, escalate}. By default the verdict is recorded into the model-routing learning stream (success when confident, escalated when not) so the bandit learns which task shapes the cheap tier fails on. Use when you just generated with the tier hooks_model-route picked and must decide accept-vs-escalate BEFORE acting on the output; accepting cheap-tier output unverified is wrong because structurally unusable results (refusals, truncation, unparseable code) silently propagate downstream, and pre-generation routing alone cannot catch them. Not a semantic-quality judge — it only catches structurally unusable outputs.',+ inputSchema: {+ type: 'object',+ properties: {+ task: { type: 'string', description: 'The task the output was generated for' },+ output: { type: 'string', description: 'The generated output to verify' },+ model: { type: 'string', enum: ['haiku', 'sonnet', 'opus'], description: 'Model that produced the output (drives the escalation ladder; default haiku)' },+ tierUsed: { type: 'number', enum: [1, 2, 3], description: 'Tier that produced the output; derived from model when absent' },+ taskKind: { type: 'string', enum: ['code', 'json', 'text', 'auto'], description: 'Force the task kind; default auto-detect' },+ record: { type: 'boolean', description: 'Record the verdict into the routing learning stream (default true; requires model)' },+ },+ required: ['task', 'output'],+ },+ handler: async (params: Record<string, unknown>) => {+ const task = params.task as string;+ const output = params.output as string;+ const model = params.model as 'haiku' | 'sonnet' | 'opus' | undefined;++ { const v = validateText(task, 'task'); if (!v.valid) return { success: false, error: v.error }; }+ if (typeof output !== 'string') return { success: false, error: 'output must be a string' };++ const { verifyAndEscalate } = await import('../ruvector/output-verifier.js');+ const verdict = await verifyAndEscalate({+ task,+ output,+ model,+ tierUsed: params.tierUsed as 1 | 2 | 3 | undefined,+ taskKind: params.taskKind as 'code' | 'json' | 'text' | 'auto' | undefined,+ });++ // Feed the verdict into the existing outcome/learning stream (same path+ // as hooks_model-outcome) so escalations update the Thompson priors.+ let recorded = false;+ if (params.record !== false && model) {+ const router = await getModelRouterInstance();+ if (router) {+ router.recordOutcome(task, model, verdict.confident ? 'success' : 'escalated');+ recorded = true;+ }+ }++ return {+ ...verdict,+ model: model ?? 'haiku',+ recorded,+ recordedOutcome: recorded ? (verdict.confident ? 'success' : 'escalated') : null,+ timestamp: new Date().toISOString(),+ };+ },+};+// Supported source extensions for codemods.const CODEMOD_EXTENSIONS = new Set(['.js', '.jsx', '.ts', '.tsx', '.mjs', '.cjs', '.mts', '.cts']);const CODEMOD_MAX_FILES = 2000;@@ -4910,6 +5032,7 @@ export const hooksTools: MCPTool[] = [hooksModelRoute,hooksModelOutcome,hooksModelStats,+ hooksModelVerify,// Deterministic Tier-1 codemod execution (ADR-143)hooksCodemod,];diff --git a/v3/@claude-flow/cli/src/mcp-tools/neural-tools.ts b/v3/@claude-flow/cli/src/mcp-tools/neural-tools.tsindex 3de1c95c62..002ce07fb7 100644--- a/v3/@claude-flow/cli/src/mcp-tools/neural-tools.ts+++ b/v3/@claude-flow/cli/src/mcp-tools/neural-tools.ts@@ -17,98 +17,119 @@ import { validateIdentifier, validateText } from './validate-input.js';import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';import { join } from 'node:path';-// Try to import real embeddings.-// Tier 0 (NEW, ADR-089): [email protected] bundled ONNX (no sharp dep, fixes ADR-086's+// Real embeddings — resolved LAZILY on first use.+// Perf (measured 2026-07): the previous top-level-await version of this block+// ran `await import('ruvector')` + `initOnnxEmbedder()` + a probe embed at+// module-import time, adding ~450ms (warm) to ~2800ms (cold) to EVERY CLI+// command, because mcp-client statically imports this module. ensureEmbeddings()+// keeps the exact same tier chain and degraded/fallback semantics, but only+// pays the cost when a handler actually needs an embedding.+// Tier 0 (ADR-089): [email protected] bundled ONNX (no sharp dep, fixes ADR-086's// silent-fallback bug at source; closes the chain described in ruvnet/ruvector#523).// Tier 1: agentic-flow v3 ReasoningBank (was Tier 1 — broken on darwin-arm64 without sharp)// Tier 2-3: @claude-flow/embeddingslet realEmbeddings: { embed: (text: string) => Promise<number[]> } | null = null;let embeddingServiceName: string = 'none';-try {- // Tier 0: [email protected] — bundled all-MiniLM-L6-v2 + parallel worker pool.- // Probe with isOnnxAvailable() and verify an actual embed succeeds (avoids- // the type-load-success-but-runtime-fails trap from ADR-086).- // NOTE: ruvector's embed() returns `{embedding, dimension, timeMs}` — we- // unwrap to plain number[] for the shared interface.- const rv = await import('ruvector').catch(() => null) as any;- if (rv?.embed && typeof rv.embed === 'function' && rv.isOnnxAvailable?.()) {+let embeddingsPromise: Promise<void> | null = null;++/**+ * Memoized lazy initialiser for the embedding provider chain. Safe to call+ * concurrently (single shared promise). If every tier fails to import or+ * probe, `realEmbeddings` stays null and callers use the explicit+ * hash-fallback path — identical degraded semantics to the old eager block.+ */+function ensureEmbeddings(): Promise<void> {+ if (embeddingsPromise) return embeddingsPromise;+ embeddingsPromise = (async () => {try {- if (typeof rv.initOnnxEmbedder === 'function') await rv.initOnnxEmbedder();- const probe = await rv.embed('probe');- // Handle both shapes: ruvector wraps as {embedding, dimension, timeMs};- // some versions returned raw Float32Array.- const probeVec = probe?.embedding ?? probe;- if (probeVec && (Array.isArray(probeVec) || (probeVec as ArrayLike<number>).length > 0)) {- realEmbeddings = {- embed: async (text: string) => {- const r = await rv.embed(text);- const v = r?.embedding ?? r;- return Array.isArray(v) ? v : Array.from(v as ArrayLike<number>);- },- };- embeddingServiceName = '[email protected] (bundled all-MiniLM-L6-v2)';+ // Tier 0: [email protected] — bundled all-MiniLM-L6-v2 + parallel worker pool.+ // Probe with isOnnxAvailable() and verify an actual embed succeeds (avoids+ // the type-load-success-but-runtime-fails trap from ADR-086). The probe now+ // runs on first embed request instead of at import time.+ // NOTE: ruvector's embed() returns `{embedding, dimension, timeMs}` — we+ // unwrap to plain number[] for the shared interface.+ const rv = await import('ruvector').catch(() => null) as any;+ if (rv?.embed && typeof rv.embed === 'function' && rv.isOnnxAvailable?.()) {+ try {+ if (typeof rv.initOnnxEmbedder === 'function') await rv.initOnnxEmbedder();+ const probe = await rv.embed('probe');+ // Handle both shapes: ruvector wraps as {embedding, dimension, timeMs};+ // some versions returned raw Float32Array.+ const probeVec = probe?.embedding ?? probe;+ if (probeVec && (Array.isArray(probeVec) || (probeVec as ArrayLike<number>).length > 0)) {+ realEmbeddings = {+ embed: async (text: string) => {+ const r = await rv.embed(text);+ const v = r?.embedding ?? r;+ return Array.isArray(v) ? v : Array.from(v as ArrayLike<number>);+ },+ };+ embeddingServiceName = '[email protected] (bundled all-MiniLM-L6-v2)';+ }+ } catch {+ // ruvector embed failed at runtime; fall through to next tier+ }}- } catch {- // ruvector embed failed at runtime; fall through to next tier- }- }- // Tier 1: agentic-flow v3 ReasoningBank (kept for backward-compat; may- // silently fall back on darwin-arm64 without sharp — that's the bug- // Tier 0 was added to bypass).- if (!realEmbeddings) {- const rb = await import('agentic-flow/reasoningbank').catch(() => null);- if (rb?.computeEmbedding) {- realEmbeddings = { embed: (text: string) => rb.computeEmbedding(text) };- embeddingServiceName = 'agentic-flow/reasoningbank';- }- }+ // Tier 1: agentic-flow v3 ReasoningBank (kept for backward-compat; may+ // silently fall back on darwin-arm64 without sharp — that's the bug+ // Tier 0 was added to bypass).+ if (!realEmbeddings) {+ const rb = await import('agentic-flow/reasoningbank').catch(() => null);+ if (rb?.computeEmbedding) {+ realEmbeddings = { embed: (text: string) => rb.computeEmbedding(text) };+ embeddingServiceName = 'agentic-flow/reasoningbank';+ }+ }- // Tier 2: @claude-flow/embeddings with agentic-flow provider- if (!realEmbeddings) {- const embeddingsModule = await import('@claude-flow/embeddings').catch(() => null);- if (embeddingsModule?.createEmbeddingService) {- try {- const service = embeddingsModule.createEmbeddingService({ provider: 'agentic-flow' });- realEmbeddings = {- embed: async (text: string) => {- const result = await service.embed(text);- return Array.from(result.embedding);- },- };- embeddingServiceName = 'agentic-flow';- } catch {- // agentic-flow provider not available, try ONNX+ // Tier 2: @claude-flow/embeddings with agentic-flow provider+ if (!realEmbeddings) {+ const embeddingsModule = await import('@claude-flow/embeddings').catch(() => null);+ if (embeddingsModule?.createEmbeddingService) {+ try {+ const service = embeddingsModule.createEmbeddingService({ provider: 'agentic-flow' });+ realEmbeddings = {+ embed: async (text: string) => {+ const result = await service.embed(text);+ return Array.from(result.embedding);+ },+ };+ embeddingServiceName = 'agentic-flow';+ } catch {+ // agentic-flow provider not available, try ONNX+ }+ }}- }- }- // Tier 3: @claude-flow/embeddings with ONNX provider- if (!realEmbeddings) {- const embeddingsModule = await import('@claude-flow/embeddings').catch(() => null);- if (embeddingsModule?.createEmbeddingService) {- try {- const service = embeddingsModule.createEmbeddingService({ provider: 'onnx' });- realEmbeddings = {- embed: async (text: string) => {- const result = await service.embed(text);- return Array.from(result.embedding);- },- };- embeddingServiceName = 'onnx';- } catch {- // ONNX provider not available, fall through to mock+ // Tier 3: @claude-flow/embeddings with ONNX provider+ if (!realEmbeddings) {+ const embeddingsModule = await import('@claude-flow/embeddings').catch(() => null);+ if (embeddingsModule?.createEmbeddingService) {+ try {+ const service = embeddingsModule.createEmbeddingService({ provider: 'onnx' });+ realEmbeddings = {+ embed: async (text: string) => {+ const result = await service.embed(text);+ return Array.from(result.embedding);+ },+ };+ embeddingServiceName = 'onnx';+ } catch {+ // ONNX provider not available, fall through to mock+ }+ }}- }- }- // No Tier 4 mock fallback. If all real-embedder tiers fail to import or- // probe, leave realEmbeddings null and let downstream code use the- // explicit hash-fallback path with a clear _embeddingNote in stats.- // Silently substituting mock embeddings would hide a missing production- // dependency from callers — that's the bug ADR-086 was about.-} catch {- // No embedding provider available, will use fallback+ // No Tier 4 mock fallback. If all real-embedder tiers fail to import or+ // probe, leave realEmbeddings null and let downstream code use the+ // explicit hash-fallback path with a clear _embeddingNote in stats.+ // Silently substituting mock embeddings would hide a missing production+ // dependency from callers — that's the bug ADR-086 was about.+ } catch {+ // No embedding provider available, will use fallback+ }+ })();+ return embeddingsPromise;}// Storage paths@@ -221,8 +242,9 @@ export async function storeNeuralPatterns(items: Array<{metadata?: Record<string, unknown>;}>): Promise<{ stored: number; total: number }> {if (!items || items.length === 0) return { stored: 0, total: 0 };- // realEmbeddings is initialised by the top-level IIFE in this module;- // generateEmbedding() falls back to a hash-based embedding if it isn't.+ // realEmbeddings is initialised lazily by ensureEmbeddings() (invoked from+ // generateEmbedding()); it falls back to a hash-based embedding if no+ // provider is available.const store = loadNeuralStore();let stored = 0;for (const item of items) {@@ -248,6 +270,9 @@ export async function storeNeuralPatterns(items: Array<{// Generate embedding - uses real ML embeddings if available, falls back to deterministic hashasync function generateEmbedding(text?: string, dims: number = 384): Promise<number[]> {+ // Lazily resolve the embedding provider on first real use (perf: keeps+ // ONNX init off the CLI startup path — see ensureEmbeddings()).+ if (text) await ensureEmbeddings();// If real embeddings available and text provided, use themif (realEmbeddings && text) {try {@@ -801,6 +826,9 @@ export const neuralTools: MCPTool[] = [handler: async (input) => {if (input.modelId) { const v = validateIdentifier(input.modelId as string, 'modelId'); if (!v.valid) return { success: false, error: v.error }; }+ // Resolve provider so embeddingProvider in the result matches the old+ // eager-init reporting.+ await ensureEmbeddings();const store = loadNeuralStore();const method = (input.method as string) || 'quantize';const targetReduction = (input.targetSize as number) || 0.5;@@ -912,6 +940,9 @@ export const neuralTools: MCPTool[] = [handler: async (input) => {if (input.modelId) { const v = validateIdentifier(input.modelId as string, 'modelId'); if (!v.valid) return { success: false, error: v.error }; }+ // Resolve provider so _realEmbeddings/embeddingProvider report the same+ // values the old eager-init version produced.+ await ensureEmbeddings();const store = loadNeuralStore();if (input.modelId) {@@ -979,6 +1010,9 @@ export const neuralTools: MCPTool[] = [handler: async (input) => {if (input.modelId) { const v = validateIdentifier(input.modelId as string, 'modelId'); if (!v.valid) return { success: false, error: v.error }; }+ // Resolve provider so embeddingProvider in the result matches the old+ // eager-init reporting.+ await ensureEmbeddings();const store = loadNeuralStore();const target = (input.target as string) || 'balanced';const patterns = Object.values(store.patterns);diff --git a/v3/@claude-flow/cli/src/memory/memory-bridge.ts b/v3/@claude-flow/cli/src/memory/memory-bridge.tsindex 694cee674d..d0f49d902c 100644--- a/v3/@claude-flow/cli/src/memory/memory-bridge.ts+++ b/v3/@claude-flow/cli/src/memory/memory-bridge.ts@@ -2307,10 +2307,22 @@ export async function bridgeHealthCheck(** Real HierarchicalMemory API (agentdb alpha.10+):* store(content, importance?, tier?, options?) → Promise<string>- * Stub API (fallback):- * store(key, value, tier) — synchronous+ * Fallback API (@claude-flow/memory TieredMemoryStore):+ * store(key, value, tier, temporalOptions?) — synchronous, returns+ * { id, key, tier, superseded? }+ *+ * Temporal validity (Zep/Graphiti-style, impl/memory-sota):+ * - validFrom / validUntil (ISO) travel with the entry.+ * - supersedes=<entryId|key> INVALIDATES the old entry (validUntil=now ++ * supersededBy=newId) instead of deleting it. Natively supported by the+ * TieredMemoryStore fallback; on the real agentdb HierarchicalMemory the+ * temporal fields are stored in metadata, and supersede is reported as+ * unsupported (no public update API) rather than silently dropped.*/-export async function bridgeHierarchicalStore(params: { key: string; value: string; tier?: string; importance?: number }): Promise<any> {+export async function bridgeHierarchicalStore(params: {+ key: string; value: string; tier?: string; importance?: number;+ validFrom?: string; validUntil?: string; supersedes?: string;+}): Promise<any> {const registry = await getRegistry();if (!registry) return null;try {@@ -2320,15 +2332,34 @@ export async function bridgeHierarchicalStore(params: { key: string; value: stri// Detect real HierarchicalMemory (has async store returning id) vs stubif (typeof hm.getStats === 'function' && typeof hm.promote === 'function') {- // Real agentdb HierarchicalMemory+ // Real agentdb HierarchicalMemory — temporal fields ride in metadata+ // so bridgeHierarchicalRecall can filter on them.+ const metadata: Record<string, unknown> = { key: params.key };+ if (params.validFrom) metadata.validFrom = params.validFrom;+ if (params.validUntil) metadata.validUntil = params.validUntil;const id = await hm.store(params.value, params.importance || 0.5, tier, {- metadata: { key: params.key },+ metadata,tags: [params.key],});- return { success: true, id, key: params.key, tier };+ const result: any = { success: true, id, key: params.key, tier };+ if (params.supersedes) {+ // No public update/invalidate API on agentdb HierarchicalMemory —+ // surface the limitation honestly instead of silently dropping it.+ result.superseded = null;+ result.warning = 'supersedes is not supported by the native agentdb HierarchicalMemory backend (no update API); the referenced entry was left untouched';+ }+ return result;}- // Stub fallback- hm.store(params.key, params.value, tier);+ // TieredMemoryStore fallback (temporal-aware) / legacy stub+ const storeResult = hm.store(params.key, params.value, tier, {+ validFrom: params.validFrom,+ validUntil: params.validUntil,+ supersedes: params.supersedes,+ });+ if (storeResult && typeof storeResult === 'object') {+ return { success: true, ...storeResult };+ }+ // Legacy stub (returns void) — temporal options were ignoredreturn { success: true, key: params.key, tier };} catch (e: any) { return { success: false, error: e.message }; }}@@ -2342,7 +2373,7 @@ export async function bridgeHierarchicalStore(params: { key: string; value: stri* Stub API (fallback):* recall(query: string, topK: number) → synchronous array*/-export async function bridgeHierarchicalRecall(params: { query: string; tier?: string; topK?: number }): Promise<any> {+export async function bridgeHierarchicalRecall(params: { query: string; tier?: string; topK?: number; includeExpired?: boolean }): Promise<any> {const registry = await getRegistry();if (!registry) return null;try {@@ -2360,11 +2391,33 @@ export async function bridgeHierarchicalRecall(params: { query: string; tier?: smemoryQuery.tier = params.tier;}const results = await hm.recall(memoryQuery);- return { results: results || [], controller: 'hierarchicalMemory' };+ // Temporal filter over metadata (validFrom/validUntil stamped by+ // bridgeHierarchicalStore). Entries without the fields are always+ // valid — legacy behavior unchanged.+ const filtered = params.includeExpired+ ? (results || [])+ : (results || []).filter((r: any) => {+ const meta = r?.metadata || {};+ const now = Date.now();+ if (meta.validFrom) {+ const from = Date.parse(String(meta.validFrom));+ if (!Number.isNaN(from) && from > now) return false;+ }+ if (meta.validUntil) {+ const until = Date.parse(String(meta.validUntil));+ if (!Number.isNaN(until) && until <= now) return false;+ }+ return true;+ });+ return { results: filtered, controller: 'hierarchicalMemory' };}- // Stub fallback — recall(string, number)- const results = hm.recall(params.query, params.topK || 5);+ // TieredMemoryStore fallback — recall(string, number, options?).+ // Temporal filtering happens inside the store; the legacy stub simply+ // ignores the extra argument.+ const results = hm.recall(params.query, params.topK || 5, {+ includeExpired: params.includeExpired === true,+ });const filtered = params.tier? results.filter((r: any) => r.tier === params.tier): results;diff --git a/v3/@claude-flow/cli/src/ruvector/output-verifier.ts b/v3/@claude-flow/cli/src/ruvector/output-verifier.tsnew file mode 100644index 0000000000..fa047d62ee--- /dev/null+++ b/v3/@claude-flow/cli/src/ruvector/output-verifier.ts@@ -0,0 +1,295 @@+/**+ * output-verifier.ts — Confidence-gated tier escalation (post-generation).+ *+ * ADR-026/143 route tasks to a tier BEFORE generation. 2026 SOTA cascade+ * routing adds a post-generation gate: attempt the cheap tier, run a CHEAP+ * verifier over the produced output, and escalate to the next tier only when+ * the verifier is not confident. This module is that verifier.+ *+ * Design constraints (load-bearing):+ * - $0 by default — NO LLM call. Every signal is a structural / lexical+ * check: emptiness, refusal patterns, truncation, delimiter balance,+ * degenerate repetition, and (for code tasks) a real syntax parse via the+ * TypeScript compiler (lazy-imported; degrades to delimiter checks when+ * typescript is not installed) or JSON.parse for JSON output.+ * - Pure with respect to router state — recording the verdict into the+ * bandit's learning stream is the CALLER's job (the hooks_model-verify+ * MCP tool does it via ModelRouter.recordOutcome), keeping this module+ * trivially unit-testable.+ * - Escalation ladder mirrors the tier table: tier 2 (haiku) → tier 3+ * (sonnet), sonnet → opus, opus has no bump (escalate=false even when the+ * verdict is not confident — the caller should retry or surface instead).+ *+ * Verdict semantics: `confident=false` means "cheap signals say this output+ * is likely unusable"; it is NOT a semantic-quality judgment. False+ * negatives (bad output that parses fine) are expected — this gate trades+ * recall for being free.+ *+ * @module ruvector/output-verifier+ */++export type VerifyTier = 1 | 2 | 3;+export type VerifyModel = 'haiku' | 'sonnet' | 'opus';+export type VerifyTaskKind = 'code' | 'json' | 'text' | 'auto';++export interface VerifyInput {+ /** The task the output was generated for. */+ task: string;+ /** The generated output to verify. */+ output: string;+ /** Model that produced the output (drives the escalation ladder). */+ model?: VerifyModel;+ /** Tier that produced the output; derived from `model` when absent. */+ tierUsed?: VerifyTier;+ /** Force the task kind; 'auto' (default) detects from task + output. */+ taskKind?: VerifyTaskKind;+ /** Minimum trimmed output length considered plausible (default 20). */+ minLength?: number;+}++export interface VerifySignal {+ name: string;+ ok: boolean;+ detail?: string;+}++export interface VerifyVerdict {+ confident: boolean;+ /** Fraction of signals that passed (0..1). */+ score: number;+ /** Human-readable failure reasons; empty when confident. */+ reasons: string[];+ /** Every signal evaluated, pass or fail. */+ signals: VerifySignal[];+ /** Tier the caller should use next: unchanged when confident, bumped 2→3 on failure. */+ suggestedTier: VerifyTier;+ /** Concrete next model on the ladder (haiku→sonnet→opus); null when no bump exists. */+ suggestedModel: VerifyModel | null;+ /** True when not confident AND a higher tier exists to escalate to. */+ escalate: boolean;+ /** Detected task kind after 'auto' resolution. */+ taskKind: Exclude<VerifyTaskKind, 'auto'>;+}++const MODEL_TIER: Record<VerifyModel, VerifyTier> = { haiku: 2, sonnet: 3, opus: 3 };+const NEXT_MODEL: Record<VerifyModel, VerifyModel | null> = {+ haiku: 'sonnet',+ sonnet: 'opus',+ opus: null,+};++// Refusal phrasings scanned near the start of the output. Anchored to the+// head so a legitimate answer that *discusses* refusals doesn't trip it.+const REFUSAL_HEAD_CHARS = 240;+const REFUSAL_PATTERNS: RegExp[] = [+ /\bI\s+(?:can(?:no|')t|cannot)\s+(?:help|assist|do|provide|comply|fulfill|complete|write|generate)\b/i,+ /\bI(?:'m| am)\s+(?:sorry|afraid)\b[\s\S]{0,60}\b(?:can(?:no|')t|cannot|unable)\b/i,+ /\bI(?:'m| am)\s+(?:unable|not able)\s+to\b/i,+ /\bI\s+(?:must|have to)\s+(?:decline|refuse)\b/i,+ /\bI\s+won'?t\s+be\s+able\s+to\b/i,+ /\bas an AI(?:\s+(?:language\s+)?model)?[,\s]+I\b/i,+];++// A trailing dangling operator / opener strongly suggests a mid-expression cutoff.+const TRUNCATION_TAIL = /(?:,|&&|\|\||=>|[+*/%=]|\(|\[|\{|\bconst|\blet|\bvar|\bfunction|\breturn|:)\s*$/;++interface ExtractedCode {+ lang: string;+ code: string;+}++/** Pull fenced code blocks out of markdown-ish output. */+export function extractCodeBlocks(output: string): ExtractedCode[] {+ const blocks: ExtractedCode[] = [];+ const re = /```([A-Za-z0-9_-]*)\n([\s\S]*?)```/g;+ let m: RegExpExecArray | null;+ while ((m = re.exec(output)) !== null) {+ blocks.push({ lang: (m[1] || '').toLowerCase(), code: m[2] });+ }+ return blocks;+}++/** Cheap stack-based bracket balance check that skips string/comment-ish content. */+export function bracketsBalanced(code: string): boolean {+ const stack: string[] = [];+ const pairs: Record<string, string> = { ')': '(', ']': '[', '}': '{' };+ let inString: string | null = null;+ let inLineComment = false;+ let inBlockComment = false;+ for (let i = 0; i < code.length; i++) {+ const c = code[i];+ const next = code[i + 1];+ if (inLineComment) { if (c === '\n') inLineComment = false; continue; }+ if (inBlockComment) { if (c === '*' && next === '/') { inBlockComment = false; i++; } continue; }+ if (inString) {+ if (c === '\\') { i++; continue; }+ if (c === inString) inString = null;+ continue;+ }+ if (c === '/' && next === '/') { inLineComment = true; i++; continue; }+ if (c === '/' && next === '*') { inBlockComment = true; i++; continue; }+ if (c === '"' || c === "'" || c === '`') { inString = c; continue; }+ if (c === '(' || c === '[' || c === '{') stack.push(c);+ else if (c === ')' || c === ']' || c === '}') {+ if (stack.pop() !== pairs[c]) return false;+ }+ }+ return stack.length === 0;+}++const CODE_TASK_HINT = /\b(?:code|function|class|implement|refactor|typescript|javascript|python|script|method|api endpoint|unit test)\b/i;+const CODE_OUTPUT_HINT = /(?:^|\n)\s*(?:import\s|export\s|function\s|class\s|const\s|let\s|def\s|return\s)/;++function detectTaskKind(input: VerifyInput): Exclude<VerifyTaskKind, 'auto'> {+ if (input.taskKind && input.taskKind !== 'auto') return input.taskKind;+ if (/\bjson\b/i.test(input.task) && /^[\s]*[[{]/.test(input.output.trim())) return 'json';+ if (extractCodeBlocks(input.output).length > 0) return 'code';+ if (CODE_TASK_HINT.test(input.task) && CODE_OUTPUT_HINT.test(input.output)) return 'code';+ return 'text';+}++/**+ * Syntax-check a JS/TS snippet. Uses the TypeScript compiler when available+ * (transpileModule with reportDiagnostics catches syntactic errors without+ * type-checking — cheap, no program construction). Falls back to bracket+ * balance when typescript is not installed.+ */+async function checkCodeParses(code: string, lang: string): Promise<{ ok: boolean; detail?: string }> {+ if (lang === 'json') {+ try { JSON.parse(code); return { ok: true }; }+ catch (e) { return { ok: false, detail: `JSON.parse failed: ${e instanceof Error ? e.message : String(e)}` }; }+ }+ const jsLike = ['', 'js', 'jsx', 'ts', 'tsx', 'javascript', 'typescript', 'mjs', 'cjs'].includes(lang);+ if (!jsLike) {+ // Non-JS languages: bracket balance is the best free proxy we have.+ return bracketsBalanced(code)+ ? { ok: true, detail: `no parser for lang="${lang}"; delimiter check only` }+ : { ok: false, detail: `unbalanced delimiters in ${lang} block` };+ }+ try {+ const ts = (await import('typescript')).default;+ const result = ts.transpileModule(code, {+ reportDiagnostics: true,+ compilerOptions: { jsx: ts.JsxEmit.Preserve, allowJs: true },+ });+ const syntaxErrors = (result.diagnostics ?? []).filter(d => d.category === ts.DiagnosticCategory.Error);+ if (syntaxErrors.length > 0) {+ const first = syntaxErrors[0];+ const msg = ts.flattenDiagnosticMessageText(first.messageText, ' ');+ return { ok: false, detail: `syntax error: ${msg}` };+ }+ return { ok: true };+ } catch {+ // typescript not installed — graceful degradation, delimiter check only.+ return bracketsBalanced(code)+ ? { ok: true, detail: 'typescript unavailable; delimiter check only' }+ : { ok: false, detail: 'typescript unavailable; unbalanced delimiters' };+ }+}++/** Detect degenerate repetition (same non-trivial line repeated many times in a row). */+function isDegenerate(output: string): boolean {+ const lines = output.split('\n').map(l => l.trim()).filter(l => l.length > 8);+ let run = 1;+ for (let i = 1; i < lines.length; i++) {+ if (lines[i] === lines[i - 1]) {+ run++;+ if (run >= 5) return true;+ } else {+ run = 1;+ }+ }+ return false;+}++/**+ * Compute a confidence verdict for `output` from cheap structural signals,+ * and suggest an escalation target when not confident.+ */+export async function verifyAndEscalate(input: VerifyInput): Promise<VerifyVerdict> {+ const output = input.output ?? '';+ const trimmed = output.trim();+ const minLength = input.minLength ?? 20;+ const taskKind = detectTaskKind(input);+ const model: VerifyModel = input.model ?? 'haiku';+ const tierUsed: VerifyTier = input.tierUsed ?? MODEL_TIER[model] ?? 2;++ const signals: VerifySignal[] = [];+ const reasons: string[] = [];+ const fail = (name: string, detail: string) => {+ signals.push({ name, ok: false, detail });+ reasons.push(`${name}: ${detail}`);+ };+ const pass = (name: string, detail?: string) => signals.push({ name, ok: true, detail });++ // 1. Emptiness+ if (trimmed.length === 0) fail('empty-output', 'output is empty or whitespace-only');+ else pass('empty-output');++ // 2. Plausible length (skip when already flagged empty)+ if (trimmed.length > 0 && trimmed.length < minLength) {+ fail('too-short', `output is ${trimmed.length} chars (< ${minLength})`);+ } else if (trimmed.length > 0) {+ pass('too-short');+ }++ // 3. Refusal patterns near the head+ const head = trimmed.slice(0, REFUSAL_HEAD_CHARS);+ const refusal = REFUSAL_PATTERNS.find(p => p.test(head));+ if (refusal) fail('refusal', `refusal pattern near start of output (${refusal.source.slice(0, 40)}…)`);+ else pass('refusal');++ // 4. Truncation: unclosed code fence, or dangling operator/opener at the tail+ const fenceCount = (output.match(/```/g) ?? []).length;+ if (fenceCount % 2 !== 0) {+ fail('truncation', 'unclosed code fence (odd number of ``` markers)');+ } else if (trimmed.length > 0 && TRUNCATION_TAIL.test(trimmed)) {+ fail('truncation', `output ends mid-expression ("…${trimmed.slice(-24).replace(/\n/g, '\\n')}")`);+ } else {+ pass('truncation');+ }++ // 5. Degenerate repetition+ if (isDegenerate(trimmed)) fail('degenerate-repetition', 'same line repeated 5+ times consecutively');+ else pass('degenerate-repetition');++ // 6. Code / JSON parse checks+ if (taskKind === 'code' || taskKind === 'json') {+ const blocks = extractCodeBlocks(output);+ const targets: ExtractedCode[] = blocks.length > 0+ ? blocks+ : [{ lang: taskKind === 'json' ? 'json' : '', code: output }];+ let allOk = true;+ const details: string[] = [];+ for (const block of targets) {+ const check = await checkCodeParses(block.code, taskKind === 'json' ? 'json' : block.lang);+ if (!check.ok) {+ allOk = false;+ details.push(check.detail ?? 'parse failed');+ } else if (check.detail) {+ details.push(check.detail);+ }+ }+ if (allOk) pass('code-parses', details.join('; ') || undefined);+ else fail('code-parses', details.join('; '));+ }++ const passed = signals.filter(s => s.ok).length;+ const score = signals.length > 0 ? passed / signals.length : 0;+ const confident = reasons.length === 0;++ const nextModel = NEXT_MODEL[model] ?? null;+ const suggestedModel = confident ? null : nextModel;+ const suggestedTier: VerifyTier = confident+ ? tierUsed+ : (nextModel !== null ? (Math.min(3, tierUsed + 1) as VerifyTier) : tierUsed);+ const escalate = !confident && nextModel !== null;++ if (!confident && nextModel === null) {+ reasons.push('already-at-top-tier: no higher tier to escalate to — retry or surface to the user');+ }++ return { confident, score, reasons, signals, suggestedTier, suggestedModel, escalate, taskKind };+}++export default verifyAndEscalate;diff --git a/v3/@claude-flow/cli/src/ruvector/trajectory-tree.ts b/v3/@claude-flow/cli/src/ruvector/trajectory-tree.tsnew file mode 100644index 0000000000..dfb98a129b--- /dev/null+++ b/v3/@claude-flow/cli/src/ruvector/trajectory-tree.ts@@ -0,0 +1,283 @@+/**+ * trajectory-tree.ts — Execution-state-tree retrieval PROTOTYPE (MAGE-style).+ *+ * Research basis: MAGE (arXiv 2606.06090) observes that semantic-similarity+ * retrieval fragments decision trajectories on long-horizon tasks; retrieving+ * by POSITION in a hierarchical execution-state tree (the root→current path)+ * preserves coherence. This module mirrors ruflo's existing trajectory+ * recording (hooks_intelligence_trajectory-start/step/end) into such a tree+ * and offers position-based recall — NO embedding search anywhere.+ *+ * Structure:+ * session root ─ trajectory ─ step+ * └ trajectory (nested: a start while another is open+ * opens UNDER the open one) ─ step …+ *+ * - `trajectory-start` opens a node under the deepest open trajectory of the+ * session (or the session root).+ * - `trajectory-step` appends a step child; the step becomes the "current"+ * position of the session.+ * - `trajectory-end` closes the node; current returns to its parent.+ * - `recallPath({sessionId, depth})` returns the root→current path (the+ * MAGE-style working context) plus the most recent siblings of the current+ * node.+ *+ * PROTOTYPE LIMITATIONS (deliberate — see the feature spec):+ * - Persistence is a single best-effort JSON snapshot at+ * `.claude-flow/intelligence/trajectory-tree.json`, written on every+ * mutation. It sits ALONGSIDE the existing 'trajectories' memory-namespace+ * persistence; nothing is migrated and the semantic path is untouched.+ * - No concurrency control: two MCP server processes sharing a cwd will+ * last-writer-win the snapshot.+ * - No pruning/compaction: long-lived sessions grow the file unboundedly+ * (labels are truncated to 200 chars to bound row size, not row count).+ * - sessionId defaults to CLAUDE_FLOW_SESSION_ID or 'default'; hosts that+ * never set it collapse into one tree.+ * - Retrieval is position-only by design; hybrid position+semantic ranking+ * is future work.+ *+ * @module ruvector/trajectory-tree+ */++import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';+import { dirname, join, resolve } from 'node:path';++export type TreeNodeKind = 'session' | 'trajectory' | 'step';++export interface TreeNode {+ id: string;+ kind: TreeNodeKind;+ /** Task text (trajectory), action text (step), or session id — ≤200 chars. */+ label: string;+ parentId: string | null;+ childIds: string[];+ status: 'open' | 'closed';+ openedAt: string;+ closedAt?: string;+ meta?: Record<string, unknown>;+}++export interface RecallResult {+ sessionId: string;+ /** Root→current node path (the MAGE-style working context). */+ path: TreeNode[];+ /** Most recent siblings of the current node (excluding it), oldest→newest. */+ siblings: TreeNode[];+ /** Id of the current node (deepest position in the session). */+ currentId: string | null;+ strategy: 'state-tree';+}++interface TreeSnapshot {+ v: 1;+ nodes: Record<string, TreeNode>;+ currentBySession: Record<string, string>;+ trajectorySession: Record<string, string>;+}++const DEFAULT_PERSIST_PATH = join('.claude-flow', 'intelligence', 'trajectory-tree.json');+const LABEL_MAX = 200;++function now(): string {+ return new Date().toISOString();+}++function truncate(text: string): string {+ return text.length > LABEL_MAX ? `${text.slice(0, LABEL_MAX - 1)}…` : text;+}++export class TrajectoryTree {+ private nodes = new Map<string, TreeNode>();+ /** sessionId → id of the deepest "current" node (step or open trajectory). */+ private currentBySession = new Map<string, string>();+ /** trajectoryId → sessionId, so step/end calls can omit the session. */+ private trajectorySession = new Map<string, string>();+ private readonly persistPath: string;++ constructor(persistPath?: string) {+ this.persistPath = resolve(persistPath ?? DEFAULT_PERSIST_PATH);+ this.load();+ }++ private sessionRootId(sessionId: string): string {+ return `session:${sessionId}`;+ }++ private ensureSession(sessionId: string): TreeNode {+ const id = this.sessionRootId(sessionId);+ let node = this.nodes.get(id);+ if (!node) {+ node = {+ id,+ kind: 'session',+ label: truncate(sessionId),+ parentId: null,+ childIds: [],+ status: 'open',+ openedAt: now(),+ };+ this.nodes.set(id, node);+ }+ return node;+ }++ /** Deepest OPEN trajectory node on the current path of a session, if any. */+ private deepestOpenTrajectory(sessionId: string): TreeNode | null {+ let cursor = this.nodes.get(this.currentBySession.get(sessionId) ?? '');+ while (cursor) {+ if (cursor.kind === 'trajectory' && cursor.status === 'open') return cursor;+ cursor = cursor.parentId ? this.nodes.get(cursor.parentId) : undefined;+ }+ return null;+ }++ openTrajectory(args: { sessionId: string; trajectoryId: string; task: string; agent?: string }): TreeNode {+ const session = this.ensureSession(args.sessionId);+ const parent = this.deepestOpenTrajectory(args.sessionId) ?? session;+ const node: TreeNode = {+ id: args.trajectoryId,+ kind: 'trajectory',+ label: truncate(args.task),+ parentId: parent.id,+ childIds: [],+ status: 'open',+ openedAt: now(),+ meta: args.agent ? { agent: args.agent } : undefined,+ };+ this.nodes.set(node.id, node);+ parent.childIds.push(node.id);+ this.trajectorySession.set(args.trajectoryId, args.sessionId);+ this.currentBySession.set(args.sessionId, node.id);+ this.save();+ return node;+ }++ appendStep(args: { trajectoryId: string; stepId: string; action: string; quality?: number }): TreeNode | null {+ const trajectory = this.nodes.get(args.trajectoryId);+ if (!trajectory || trajectory.kind !== 'trajectory') return null;+ const sessionId = this.trajectorySession.get(args.trajectoryId);+ // The upstream stepId scheme (`step-${Date.now()}`) can collide within a+ // millisecond — uniquify locally instead of clobbering an existing node.+ let stepId = args.stepId;+ let bump = 1;+ while (this.nodes.has(stepId)) stepId = `${args.stepId}-${bump++}`;+ const node: TreeNode = {+ id: stepId,+ kind: 'step',+ label: truncate(args.action),+ parentId: trajectory.id,+ childIds: [],+ status: 'closed',+ openedAt: now(),+ closedAt: now(),+ meta: args.quality !== undefined ? { quality: args.quality } : undefined,+ };+ this.nodes.set(node.id, node);+ trajectory.childIds.push(node.id);+ if (sessionId) this.currentBySession.set(sessionId, node.id);+ this.save();+ return node;+ }++ closeTrajectory(args: { trajectoryId: string; success?: boolean }): TreeNode | null {+ const trajectory = this.nodes.get(args.trajectoryId);+ if (!trajectory || trajectory.kind !== 'trajectory') return null;+ trajectory.status = 'closed';+ trajectory.closedAt = now();+ if (args.success !== undefined) {+ trajectory.meta = { ...trajectory.meta, success: args.success };+ }+ const sessionId = this.trajectorySession.get(args.trajectoryId);+ if (sessionId && trajectory.parentId) {+ // Current position pops back to the enclosing trajectory / session root.+ this.currentBySession.set(sessionId, trajectory.parentId);+ }+ this.save();+ return trajectory;+ }++ /**+ * MAGE-style positional recall: the exact root→current path for a session,+ * plus the most recent siblings of the current node for local context.+ *+ * @param depth Max number of path nodes returned, counted from the CURRENT+ * node upward (deepest levels win). Default: full path.+ * @param siblingWindow Max recent siblings of the current node. Default 3.+ */+ recallPath(args: { sessionId: string; depth?: number; siblingWindow?: number }): RecallResult {+ const currentId = this.currentBySession.get(args.sessionId) ?? null;+ const path: TreeNode[] = [];+ let cursor = currentId ? this.nodes.get(currentId) : undefined;+ while (cursor) {+ path.unshift(cursor);+ cursor = cursor.parentId ? this.nodes.get(cursor.parentId) : undefined;+ }+ const depth = args.depth && args.depth > 0 ? args.depth : path.length;+ const trimmedPath = path.slice(Math.max(0, path.length - depth));++ const siblingWindow = args.siblingWindow ?? 3;+ let siblings: TreeNode[] = [];+ const current = currentId ? this.nodes.get(currentId) : undefined;+ const parent = current?.parentId ? this.nodes.get(current.parentId) : undefined;+ if (current && parent) {+ siblings = parent.childIds+ .filter(id => id !== current.id)+ .map(id => this.nodes.get(id))+ .filter((n): n is TreeNode => !!n)+ .slice(-siblingWindow);+ }++ return { sessionId: args.sessionId, path: trimmedPath, siblings, currentId, strategy: 'state-tree' };+ }++ get size(): number {+ return this.nodes.size;+ }++ // ── Persistence (best-effort JSON snapshot) ──────────────────────────────++ private load(): void {+ try {+ if (!existsSync(this.persistPath)) return;+ const raw = JSON.parse(readFileSync(this.persistPath, 'utf-8')) as TreeSnapshot;+ if (raw?.v !== 1 || typeof raw.nodes !== 'object') return;+ this.nodes = new Map(Object.entries(raw.nodes));+ this.currentBySession = new Map(Object.entries(raw.currentBySession ?? {}));+ this.trajectorySession = new Map(Object.entries(raw.trajectorySession ?? {}));+ } catch {+ // Corrupt/unreadable snapshot — start fresh; the semantic trajectory+ // persistence in the 'trajectories' namespace is unaffected.+ }+ }++ private save(): void {+ try {+ const snapshot: TreeSnapshot = {+ v: 1,+ nodes: Object.fromEntries(this.nodes),+ currentBySession: Object.fromEntries(this.currentBySession),+ trajectorySession: Object.fromEntries(this.trajectorySession),+ };+ mkdirSync(dirname(this.persistPath), { recursive: true });+ writeFileSync(this.persistPath, JSON.stringify(snapshot), 'utf-8');+ } catch {+ // Best-effort — tree still lives in memory.+ }+ }+}++// ── Singleton (mirrors the lazy-singleton pattern used by model-router) ────++let treeInstance: TrajectoryTree | null = null;++export function getTrajectoryTree(persistPath?: string): TrajectoryTree {+ if (!treeInstance) treeInstance = new TrajectoryTree(persistPath);+ return treeInstance;+}++/** Test/reset hook — drops the singleton so the next get() reloads from disk. */+export function resetTrajectoryTree(): void {+ treeInstance = null;+}++export default TrajectoryTree;diff --git a/v3/@claude-flow/memory/package.json b/v3/@claude-flow/memory/package.jsonindex b46e660f03..940b77e6b7 100644--- a/v3/@claude-flow/memory/package.json+++ b/v3/@claude-flow/memory/package.json@@ -17,7 +17,7 @@"prepublishOnly": "npm run build && node -e \"const m = await import('./dist/index.js'); const required = ['ControllerRegistry','MemoryService','UnifiedMemoryService','PersistentSonaCoordinator','RvfLearningStore','RvfMigrator']; const missing = required.filter(k => !m[k]); if (missing.length) { console.error('Missing exports:', missing); process.exit(1); } const forbidden = ['HnswLite','RvfBackend']; const leaks = forbidden.filter(k => k in m); if (leaks.length) { console.error('Forbidden public exports present (ADR-125):', leaks); process.exit(1); } console.log('All required exports present; ADR-125 surface clean');\""},"dependencies": {- "agentdb": "^3.0.0-alpha.16",+ "agentdb": "^3.0.0-alpha.17","sql.js": "^1.10.3"},"optionalDependencies": {diff --git a/v3/@claude-flow/memory/src/controller-registry.ts b/v3/@claude-flow/memory/src/controller-registry.tsindex ad41fb78e3..a0b60e57af 100644--- a/v3/@claude-flow/memory/src/controller-registry.ts+++ b/v3/@claude-flow/memory/src/controller-registry.ts@@ -25,6 +25,7 @@ import { MemoryGraph } from './memory-graph.js';import type { MemoryGraphConfig } from './memory-graph.js';import { TieredCacheManager } from './cache-manager.js';import type { CacheConfig } from './types.js';+import { TieredMemoryStore } from './tiered-memory.js';// ===== Types =====@@ -1192,45 +1193,14 @@ export class ControllerRegistry extends EventEmitter {/*** Lightweight in-memory tiered store (fallback when HierarchicalMemory* cannot be initialized from agentdb).- * Enforces per-tier size limits to prevent unbounded memory growth.+ *+ * Promoted to the first-class {@link TieredMemoryStore} module, which+ * adds Zep/Graphiti-style temporal validity (validFrom / validUntil /+ * supersededBy) while keeping the legacy duck-typed API:+ * store(key, value, tier) / recall(query, topK) / getTierStats().*/- private createTieredMemoryStub() {- const MAX_PER_TIER = 5000;- const tiers: Record<string, Map<string, { value: string; ts: number }>> = {- working: new Map(),- episodic: new Map(),- semantic: new Map(),- };- return {- store(key: string, value: string, tier = 'working') {- const t = tiers[tier] || tiers.working;- // Evict oldest if at capacity- if (t.size >= MAX_PER_TIER) {- const oldest = t.keys().next().value;- if (oldest !== undefined) t.delete(oldest);- }- t.set(key, { value: value.substring(0, 100_000), ts: Date.now() });- },- recall(query: string, topK = 5) {- const safeTopK = Math.min(Math.max(1, topK), 100);- const q = query.toLowerCase().substring(0, 10_000);- const results: Array<{ key: string; value: string; tier: string; ts: number }> = [];- for (const [tierName, map] of Object.entries(tiers)) {- for (const [key, entry] of map) {- if (key.toLowerCase().includes(q) || entry.value.toLowerCase().includes(q)) {- results.push({ key, value: entry.value, tier: tierName, ts: entry.ts });- if (results.length >= safeTopK * 3) break; // Early exit for large stores- }- }- }- return results.sort((a, b) => b.ts - a.ts).slice(0, safeTopK);- },- getTierStats() {- return Object.fromEntries(- Object.entries(tiers).map(([name, map]) => [name, map.size]),- );- },- };+ private createTieredMemoryStub(): TieredMemoryStore {+ return new TieredMemoryStore();}/**diff --git a/v3/@claude-flow/memory/src/index.ts b/v3/@claude-flow/memory/src/index.tsindex 7d85a4ff04..be44ced100 100644--- a/v3/@claude-flow/memory/src/index.ts+++ b/v3/@claude-flow/memory/src/index.ts@@ -93,6 +93,7 @@ export type {// Utility TypesEmbeddingGenerator,+ BatchEmbeddingGenerator,} from './types.js';// Utility Functions and Constants (runtime values)@@ -177,6 +178,15 @@ export type {RuntimeConfig,} from './controller-registry.js';+// ===== Tiered Memory with Temporal Validity (Zep/Graphiti-style) =====+export { TieredMemoryStore, isTemporallyValid } from './tiered-memory.js';+export type {+ TemporalStoreOptions,+ TieredRecallOptions,+ TieredMemoryEntry,+ TieredStoreResult,+} from './tiered-memory.js';+// ===== Core Components =====export { AgentDBAdapter } from './agentdb-adapter.js';export type { AgentDBAdapterConfig } from './agentdb-adapter.js';diff --git a/v3/@claude-flow/memory/src/migration.test.ts b/v3/@claude-flow/memory/src/migration.test.tsnew file mode 100644index 0000000000..d41f10054e--- /dev/null+++ b/v3/@claude-flow/memory/src/migration.test.ts@@ -0,0 +1,196 @@+/**+ * Tests for MemoryMigrator batch embedding (perf fix).+ *+ * Previously the migrator awaited one embedding per entry inside the batch+ * loop — N sequential inferences per batch. Now it prefers a true batch+ * embedding generator (one call per batch) and otherwise embeds with+ * bounded concurrency. Per-entry error semantics are preserved: one bad+ * entry never fails the batch.+ */++import { describe, it, expect, vi } from 'vitest';+import { mkdtempSync, writeFileSync } from 'node:fs';+import { tmpdir } from 'node:os';+import { join } from 'node:path';+import { MemoryMigrator } from './migration.js';+import type { AgentDBAdapter } from './agentdb-adapter.js';+import type { MemoryEntry } from './types.js';++function writeSourceFile(entries: Array<{ key: string; value: string }>): string {+ const dir = mkdtempSync(join(tmpdir(), 'migration-test-'));+ const file = join(dir, 'source.json');+ writeFileSync(file, JSON.stringify(entries));+ return file;+}++function makeTarget(): { stored: MemoryEntry[]; target: AgentDBAdapter } {+ const stored: MemoryEntry[] = [];+ const target = {+ store: async (entry: MemoryEntry) => {+ stored.push(entry);+ return entry;+ },+ } as unknown as AgentDBAdapter;+ return { stored, target };+}++const embeddingOf = (content: string) => new Float32Array([content.length, 1, 2]);++describe('MemoryMigrator — batch embedding', () => {+ it('uses the batch embedding generator ONCE per batch (not per entry)', async () => {+ const entries = Array.from({ length: 25 }, (_, i) => ({ key: `k${i}`, value: `value ${i}` }));+ const sourcePath = writeSourceFile(entries);+ const { stored, target } = makeTarget();++ const batchCalls: string[][] = [];+ const batchGenerator = async (contents: string[]) => {+ batchCalls.push(contents);+ return contents.map(embeddingOf);+ };++ const migrator = new MemoryMigrator(+ target,+ { source: 'json', sourcePath, batchSize: 10 },+ undefined,+ batchGenerator+ );+ const result = await migrator.migrate();++ expect(result.success).toBe(true);+ expect(result.progress.migrated).toBe(25);+ // 25 entries / batchSize 10 → 3 batch calls, NOT 25 single calls+ expect(batchCalls).toHaveLength(3);+ expect(batchCalls.map((c) => c.length)).toEqual([10, 10, 5]);+ expect(stored.every((e) => e.embedding instanceof Float32Array)).toBe(true);+ });++ it('falls back to bounded concurrency over the single-text generator', async () => {+ const entries = Array.from({ length: 20 }, (_, i) => ({ key: `k${i}`, value: `value ${i}` }));+ const sourcePath = writeSourceFile(entries);+ const { stored, target } = makeTarget();++ let inFlight = 0;+ let maxInFlight = 0;+ const generator = async (content: string) => {+ inFlight++;+ maxInFlight = Math.max(maxInFlight, inFlight);+ await new Promise((r) => setTimeout(r, 2));+ inFlight--;+ return embeddingOf(content);+ };++ const migrator = new MemoryMigrator(+ target,+ { source: 'json', sourcePath, batchSize: 20, embeddingConcurrency: 4 },+ generator+ );+ const result = await migrator.migrate();++ expect(result.progress.migrated).toBe(20);+ expect(maxInFlight).toBeGreaterThan(1); // actually concurrent+ expect(maxInFlight).toBeLessThanOrEqual(4); // but bounded — never unbounded+ expect(stored.every((e) => e.embedding instanceof Float32Array)).toBe(true);+ });++ it('one failing embedding does not fail the batch — entry stored without vector', async () => {+ const entries = [+ { key: 'good-1', value: 'alpha' },+ { key: 'bad', value: 'POISON' },+ { key: 'good-2', value: 'gamma' },+ ];+ const sourcePath = writeSourceFile(entries);+ const { stored, target } = makeTarget();++ const generator = async (content: string) => {+ if (content === 'POISON') throw new Error('embedder choked');+ return embeddingOf(content);+ };++ const warnings: string[] = [];+ const migrator = new MemoryMigrator(+ target,+ { source: 'json', sourcePath, batchSize: 10 },+ generator+ );+ migrator.on('migration:warning', (w: { message: string }) => warnings.push(w.message));++ const result = await migrator.migrate();++ expect(result.progress.migrated).toBe(3); // all three stored+ expect(result.progress.failed).toBe(0);+ const bad = stored.find((e) => e.key === 'bad');+ expect(bad).toBeDefined();+ expect(bad!.embedding).toBeUndefined();+ expect(warnings.some((m) => m.includes('bad'))).toBe(true);+ // Good entries still got vectors+ expect(stored.find((e) => e.key === 'good-1')!.embedding).toBeInstanceOf(Float32Array);+ });++ it('falls back to single-text embedding when the batch call fails', async () => {+ const entries = [+ { key: 'a', value: 'one' },+ { key: 'b', value: 'two' },+ ];+ const sourcePath = writeSourceFile(entries);+ const { stored, target } = makeTarget();++ const batchGenerator = vi.fn(async () => {+ throw new Error('batch backend down');+ });+ const singleGenerator = vi.fn(async (content: string) => embeddingOf(content));++ const migrator = new MemoryMigrator(+ target,+ { source: 'json', sourcePath, batchSize: 10 },+ singleGenerator,+ batchGenerator+ );+ const result = await migrator.migrate();++ expect(result.progress.migrated).toBe(2);+ expect(batchGenerator).toHaveBeenCalledTimes(1);+ expect(singleGenerator).toHaveBeenCalledTimes(2);+ expect(stored.every((e) => e.embedding instanceof Float32Array)).toBe(true);+ });++ it('preserves validation-skip semantics (invalid entries never reach the embedder)', async () => {+ const entries = [+ { key: 'ok', value: 'fine' },+ { value: 'missing key' } as { key: string; value: string }, // invalid+ ];+ const sourcePath = writeSourceFile(entries);+ const { target } = makeTarget();++ const batchGenerator = vi.fn(async (contents: string[]) => contents.map(embeddingOf));+ const migrator = new MemoryMigrator(+ target,+ { source: 'json', sourcePath, batchSize: 10 },+ undefined,+ batchGenerator+ );+ const result = await migrator.migrate();++ expect(result.progress.migrated).toBe(1);+ expect(result.progress.skipped).toBe(1);+ expect(batchGenerator).toHaveBeenCalledTimes(1);+ expect(batchGenerator.mock.calls[0][0]).toEqual(['fine']);+ });++ it('skips embedding entirely when generateEmbeddings=false', async () => {+ const sourcePath = writeSourceFile([{ key: 'k', value: 'v' }]);+ const { stored, target } = makeTarget();+ const batchGenerator = vi.fn(async (contents: string[]) => contents.map(embeddingOf));++ const migrator = new MemoryMigrator(+ target,+ { source: 'json', sourcePath, generateEmbeddings: false },+ undefined,+ batchGenerator+ );+ const result = await migrator.migrate();++ expect(result.progress.migrated).toBe(1);+ expect(batchGenerator).not.toHaveBeenCalled();+ expect(stored[0].embedding).toBeUndefined();+ });+});diff --git a/v3/@claude-flow/memory/src/migration.ts b/v3/@claude-flow/memory/src/migration.tsindex 1a058311c3..6bacee07a8 100644--- a/v3/@claude-flow/memory/src/migration.ts+++ b/v3/@claude-flow/memory/src/migration.ts@@ -20,6 +20,7 @@ import {MemoryType,MemoryEntryInput,EmbeddingGenerator,+ BatchEmbeddingGenerator,createDefaultEntry,} from './types.js';import { AgentDBAdapter } from './agentdb-adapter.js';@@ -32,6 +33,7 @@ const DEFAULT_MIGRATION_CONFIG: Partial<MigrationConfig> = {generateEmbeddings: true,validateData: true,continueOnError: true,+ embeddingConcurrency: 8,};/**@@ -66,17 +68,20 @@ export class MemoryMigrator extends EventEmitter {private config: MigrationConfig;private target: AgentDBAdapter;private embeddingGenerator?: EmbeddingGenerator;+ private batchEmbeddingGenerator?: BatchEmbeddingGenerator;private progress: MigrationProgress;constructor(target: AgentDBAdapter,config: Partial<MigrationConfig>,- embeddingGenerator?: EmbeddingGenerator+ embeddingGenerator?: EmbeddingGenerator,+ batchEmbeddingGenerator?: BatchEmbeddingGenerator) {super();this.target = target;this.config = { ...DEFAULT_MIGRATION_CONFIG, ...config } as MigrationConfig;this.embeddingGenerator = embeddingGenerator;+ this.batchEmbeddingGenerator = batchEmbeddingGenerator;this.progress = this.initializeProgress();}@@ -322,9 +327,14 @@ export class MemoryMigrator extends EventEmitter {// ===== Batch Processing =====private async processBatch(batch: LegacyEntry[]): Promise<void> {+ // Phase 1 — validate + transform (no embedding yet). Per-entry errors+ // keep the same semantics as the previous sequential loop: validation+ // failures are skipped, transform failures are failed, and one bad+ // entry never fails the batch when continueOnError is set.+ const transformed: Array<{ legacy: LegacyEntry; entry: MemoryEntry }> = [];+for (const legacyEntry of batch) {try {- // Validate if enabledif (this.config.validateData) {const validation = this.validateEntry(legacyEntry);if (!validation.valid) {@@ -343,16 +353,40 @@ export class MemoryMigrator extends EventEmitter {}}- // Transform to new format- const newEntry = await this.transformEntry(legacyEntry);+ transformed.push({ legacy: legacyEntry, entry: this.transformEntry(legacyEntry) });+ } catch (error) {+ if (this.config.continueOnError) {+ this.addError(+ legacyEntry.key || 'unknown',+ (error as Error).message,+ 'STORE_ERROR',+ true+ );+ this.progress.failed++;+ } else {+ throw error;+ }+ }+ }++ // Phase 2 — embed the whole batch at once (true batch API) or with+ // bounded concurrency. Previously this awaited one ONNX inference per+ // entry inside the loop — N sequential inferences per batch on the+ // memory_import_claude hot path. Embedding failures remain warnings:+ // the entry is still stored, just without a vector (same as before).+ if (this.config.generateEmbeddings) {+ await this.embedBatch(transformed);+ }- // Store in target- await this.target.store(newEntry);+ // Phase 3 — store, preserving per-entry error handling.+ for (const { legacy, entry } of transformed) {+ try {+ await this.target.store(entry);this.progress.migrated++;} catch (error) {if (this.config.continueOnError) {this.addError(- legacyEntry.key || 'unknown',+ legacy.key || 'unknown',(error as Error).message,'STORE_ERROR',true@@ -365,7 +399,74 @@ export class MemoryMigrator extends EventEmitter {}}- private async transformEntry(legacy: LegacyEntry): Promise<MemoryEntry> {+ /**+ * Generate embeddings for a transformed batch.+ *+ * Strategy:+ * 1. If a {@link BatchEmbeddingGenerator} is available, embed all batch+ * contents in ONE call (single padded forward pass on ONNX backends).+ * 2. If the batch call fails, or only a single-text generator exists,+ * fall back to bounded-concurrency single-text embedding+ * (config.embeddingConcurrency, default 8 — never unbounded).+ *+ * Per-entry failures emit `migration:warning` and leave that entry+ * without an embedding — one bad entry never fails the batch.+ */+ private async embedBatch(+ transformed: Array<{ legacy: LegacyEntry; entry: MemoryEntry }>+ ): Promise<void> {+ if (transformed.length === 0) return;+ if (!this.batchEmbeddingGenerator && !this.embeddingGenerator) return;++ // Preferred path: one true batch call for all contents.+ if (this.batchEmbeddingGenerator) {+ try {+ const embeddings = await this.batchEmbeddingGenerator(+ transformed.map(({ entry }) => entry.content)+ );+ if (embeddings.length !== transformed.length) {+ throw new Error(+ `Batch embedding generator returned ${embeddings.length} vectors for ${transformed.length} inputs`+ );+ }+ for (let i = 0; i < transformed.length; i++) {+ transformed[i].entry.embedding = embeddings[i];+ }+ return;+ } catch (error) {+ this.emit('migration:warning', {+ message: `Batch embedding failed (${(error as Error).message}); falling back to per-entry embedding`,+ });+ // Fall through to the bounded-concurrency path if possible.+ if (!this.embeddingGenerator) return;+ }+ }++ // Fallback: bounded concurrency over the single-text generator.+ const generator = this.embeddingGenerator!;+ const concurrency = Math.max(1, this.config.embeddingConcurrency ?? 8);+ let nextIndex = 0;++ const worker = async (): Promise<void> => {+ while (nextIndex < transformed.length) {+ const i = nextIndex++;+ const { legacy, entry } = transformed[i];+ try {+ entry.embedding = await generator(entry.content);+ } catch (error) {+ this.emit('migration:warning', {+ message: `Failed to generate embedding for ${legacy.key}: ${(error as Error).message}`,+ });+ }+ }+ };++ await Promise.all(+ Array.from({ length: Math.min(concurrency, transformed.length) }, () => worker())+ );+ }++ private transformEntry(legacy: LegacyEntry): MemoryEntry {// Map namespace if configuredlet namespace = legacy.namespace || 'default';if (this.config.namespaceMapping && this.config.namespaceMapping[namespace]) {@@ -415,18 +516,7 @@ export class MemoryMigrator extends EventEmitter {entry.createdAt = createdAt;entry.updatedAt = updatedAt;- // Generate embedding if configured- if (this.config.generateEmbeddings && this.embeddingGenerator) {- try {- entry.embedding = await this.embeddingGenerator(content);- } catch (error) {- // Log but don't fail- this.emit('migration:warning', {- message: `Failed to generate embedding for ${legacy.key}: ${(error as Error).message}`,- });- }- }-+ // Embeddings are generated batch-wise in embedBatch() — not here.return entry;}@@ -631,12 +721,14 @@ export function createMigrator(source: MigrationSource,sourcePath: string,options: Partial<MigrationConfig> = {},- embeddingGenerator?: EmbeddingGenerator+ embeddingGenerator?: EmbeddingGenerator,+ batchEmbeddingGenerator?: BatchEmbeddingGenerator): MemoryMigrator {return new MemoryMigrator(target,{ source, sourcePath, ...options },- embeddingGenerator+ embeddingGenerator,+ batchEmbeddingGenerator);}@@ -647,7 +739,8 @@ export async function migrateMultipleSources(target: AgentDBAdapter,sources: Array<{ source: MigrationSource; path: string }>,options: Partial<MigrationConfig> = {},- embeddingGenerator?: EmbeddingGenerator+ embeddingGenerator?: EmbeddingGenerator,+ batchEmbeddingGenerator?: BatchEmbeddingGenerator): Promise<MigrationResult[]> {const results: MigrationResult[] = [];@@ -657,7 +750,8 @@ export async function migrateMultipleSources(source,sourcePath,options,- embeddingGenerator+ embeddingGenerator,+ batchEmbeddingGenerator);const result = await migrator.migrate();results.push(result);diff --git a/v3/@claude-flow/memory/src/smart-retrieval.test.ts b/v3/@claude-flow/memory/src/smart-retrieval.test.tsindex 6f092545ad..eec12c86be 100644--- a/v3/@claude-flow/memory/src/smart-retrieval.test.ts+++ b/v3/@claude-flow/memory/src/smart-retrieval.test.ts@@ -72,7 +72,10 @@ describe('smartSearch — multi-query fan-out', () => {});it('falls back to a single raw call when multiQuery=false', async () => {- const search = vi.fn<SearchFn>(async () => ({+ // NOTE: no vi.fn<T> generic — the hoisted vitest (1.x) types Mock as+ // Mock<Args extends any[], Returns>, so the vitest-4 single-generic+ // form fails `tsc`. The inferred signature is identical.+ const search: SearchFn = vi.fn(async () => ({results: [makeCandidate({ id: 'x', content: 'only one' })],}));diff --git a/v3/@claude-flow/memory/src/tiered-memory.test.ts b/v3/@claude-flow/memory/src/tiered-memory.test.tsnew file mode 100644index 0000000000..281af40e33--- /dev/null+++ b/v3/@claude-flow/memory/src/tiered-memory.test.ts@@ -0,0 +1,188 @@+/**+ * Tests for TieredMemoryStore temporal validity (Zep/Graphiti-style).+ *+ * Covers: supersede flow (invalidate, not delete), expired filtering,+ * the includeExpired escape hatch, and backward compatibility for legacy+ * entries without temporal fields.+ */++import { describe, it, expect, beforeEach } from 'vitest';+import { TieredMemoryStore, isTemporallyValid } from './tiered-memory.js';++describe('TieredMemoryStore — legacy behavior (backward compatibility)', () => {+ let store: TieredMemoryStore;++ beforeEach(() => {+ store = new TieredMemoryStore();+ });++ it('stores and recalls entries without temporal fields exactly as before', () => {+ store.store('auth-pattern', 'JWT with refresh tokens', 'semantic');+ store.store('scratch', 'temp note', 'working');++ const results = store.recall('jwt', 5);+ expect(results).toHaveLength(1);+ expect(results[0].key).toBe('auth-pattern');+ expect(results[0].tier).toBe('semantic');+ expect(results[0].validFrom).toBeUndefined();+ expect(results[0].validUntil).toBeUndefined();+ expect(results[0].supersededBy).toBeUndefined();+ });++ it('same-key store within a tier overwrites (legacy semantics)', () => {+ store.store('k1', 'first value', 'working');+ store.store('k1', 'second value', 'working');++ const results = store.recall('value', 10);+ expect(results).toHaveLength(1);+ expect(results[0].value).toBe('second value');+ });++ it('defaults invalid tiers to working', () => {+ store.store('k1', 'v1', 'nonsense-tier');+ expect(store.getTierStats().working).toBe(1);+ });++ it('reports per-tier stats plus superseded archive size', () => {+ store.store('a', 'v', 'working');+ store.store('b', 'v', 'episodic');+ const stats = store.getTierStats();+ expect(stats.working).toBe(1);+ expect(stats.episodic).toBe(1);+ expect(stats.semantic).toBe(0);+ expect(stats.superseded).toBe(0);+ });++ it('remove() hard-deletes an active entry by key', () => {+ store.store('gone', 'delete me', 'working');+ expect(store.remove('gone')).toBe(true);+ expect(store.recall('delete me', 5)).toHaveLength(0);+ expect(store.remove('gone')).toBe(false);+ });+});++describe('TieredMemoryStore — supersede flow', () => {+ let store: TieredMemoryStore;++ beforeEach(() => {+ store = new TieredMemoryStore();+ });++ it('invalidates (not deletes) the superseded entry and links supersededBy', () => {+ const oldFact = store.store('ceo', 'The CEO is Alice', 'semantic');+ const newFact = store.store('ceo-2026', 'The CEO is Bob', 'semantic', {+ supersedes: oldFact.id,+ });++ expect(newFact.superseded).not.toBeNull();+ expect(newFact.superseded!.id).toBe(oldFact.id);+ expect(newFact.superseded!.validUntil).toBeTruthy();++ // Default recall: only the new fact is visible+ const current = store.recall('CEO', 10);+ expect(current).toHaveLength(1);+ expect(current[0].key).toBe('ceo-2026');++ // Escape hatch: both facts visible, old one carries the invalidation stamp+ const audit = store.recall('CEO', 10, { includeExpired: true });+ expect(audit).toHaveLength(2);+ const old = audit.find((e) => e.key === 'ceo');+ expect(old).toBeDefined();+ expect(old!.supersededBy).toBe(newFact.id);+ expect(Date.parse(old!.validUntil!)).toBeLessThanOrEqual(Date.now());+ });++ it('resolves supersedes by key when no id matches', () => {+ store.store('policy', 'Old policy text', 'semantic');+ const result = store.store('policy-v2', 'New policy text', 'semantic', {+ supersedes: 'policy',+ });++ expect(result.superseded).not.toBeNull();+ expect(result.superseded!.key).toBe('policy');+ expect(store.recall('policy text', 10)).toHaveLength(1);+ expect(store.recall('policy text', 10, { includeExpired: true })).toHaveLength(2);+ });++ it('superseding with the SAME key preserves the old fact in the archive', () => {+ const oldFact = store.store('config', 'timeout=30', 'semantic');+ store.store('config', 'timeout=60', 'semantic', { supersedes: oldFact.id });++ const current = store.recall('timeout', 10);+ expect(current).toHaveLength(1);+ expect(current[0].value).toBe('timeout=60');++ const audit = store.recall('timeout', 10, { includeExpired: true });+ expect(audit).toHaveLength(2);+ expect(audit.map((e) => e.value).sort()).toEqual(['timeout=30', 'timeout=60']);+ });++ it('returns null superseded when the target does not exist', () => {+ const result = store.store('k', 'v', 'working', { supersedes: 'no-such-entry' });+ expect(result.superseded).toBeNull();+ });+});++describe('TieredMemoryStore — validity-window filtering', () => {+ let store: TieredMemoryStore;++ beforeEach(() => {+ store = new TieredMemoryStore();+ });++ it('filters entries whose validUntil is in the past by default', () => {+ const past = new Date(Date.now() - 60_000).toISOString();+ store.store('expired-fact', 'promo code SAVE20', 'semantic', { validUntil: past });+ store.store('live-fact', 'promo code SAVE30', 'semantic');++ const results = store.recall('promo code', 10);+ expect(results).toHaveLength(1);+ expect(results[0].key).toBe('live-fact');+ });++ it('includeExpired returns expired entries too (audit escape hatch)', () => {+ const past = new Date(Date.now() - 60_000).toISOString();+ store.store('expired-fact', 'promo code SAVE20', 'semantic', { validUntil: past });+ store.store('live-fact', 'promo code SAVE30', 'semantic');++ const results = store.recall('promo code', 10, { includeExpired: true });+ expect(results).toHaveLength(2);+ });++ it('keeps entries whose validUntil is in the future', () => {+ const future = new Date(Date.now() + 3_600_000).toISOString();+ store.store('ttl-fact', 'valid for one hour', 'working', { validUntil: future });++ expect(store.recall('one hour', 5)).toHaveLength(1);+ });++ it('hides not-yet-valid entries (validFrom in the future) by default', () => {+ const future = new Date(Date.now() + 3_600_000).toISOString();+ store.store('scheduled-fact', 'new pricing takes effect', 'semantic', { validFrom: future });++ expect(store.recall('pricing', 5)).toHaveLength(0);+ expect(store.recall('pricing', 5, { includeExpired: true })).toHaveLength(1);+ });++ it('treats unparseable timestamps as absent instead of hiding the entry', () => {+ store.store('weird', 'garbage timestamp entry', 'working', { validUntil: 'not-a-date' });+ expect(store.recall('garbage', 5)).toHaveLength(1);+ });+});++describe('isTemporallyValid', () => {+ const now = Date.parse('2026-07-03T12:00:00Z');++ it('entries without fields are always valid', () => {+ expect(isTemporallyValid({}, now)).toBe(true);+ });++ it('respects validFrom / validUntil boundaries', () => {+ expect(isTemporallyValid({ validFrom: '2026-07-03T13:00:00Z' }, now)).toBe(false);+ expect(isTemporallyValid({ validFrom: '2026-07-03T11:00:00Z' }, now)).toBe(true);+ expect(isTemporallyValid({ validUntil: '2026-07-03T11:00:00Z' }, now)).toBe(false);+ expect(isTemporallyValid({ validUntil: '2026-07-03T13:00:00Z' }, now)).toBe(true);+ // validUntil exactly now → expired (window is half-open)+ expect(isTemporallyValid({ validUntil: '2026-07-03T12:00:00Z' }, now)).toBe(false);+ });+});diff --git a/v3/@claude-flow/memory/src/tiered-memory.ts b/v3/@claude-flow/memory/src/tiered-memory.tsnew file mode 100644index 0000000000..ce89cd28bf--- /dev/null+++ b/v3/@claude-flow/memory/src/tiered-memory.ts@@ -0,0 +1,257 @@+/**+ * Tier-aware in-memory store with Zep/Graphiti-style temporal validity.+ *+ * This is the store backing `agentdb_hierarchical-store` / `-recall` when+ * agentdb's native HierarchicalMemory is unavailable (previously an inline+ * stub in controller-registry.ts). It is promoted to a first-class module+ * so temporal knowledge semantics live in one tested place:+ *+ * - Facts may carry a validity window (`validFrom` / `validUntil`).+ * - Conflicting facts are INVALIDATED, not overwritten: `supersedes`+ * stamps the old entry with `validUntil = now` + `supersededBy = <newId>`+ * and archives it — the history stays queryable.+ * - `recall()` filters invalid entries by default; `includeExpired: true`+ * is the audit escape hatch.+ * - Entries without temporal fields behave exactly as before (always valid).+ *+ * API shape is kept duck-type compatible with the previous stub so the CLI+ * memory-bridge keeps working unchanged:+ * store(key, value, tier) recall(query, topK) getTierStats()+ *+ * IMPORTANT: this class must NOT expose both `getStats` and `promote` —+ * that pair is the bridge's detection signal for the REAL agentdb+ * HierarchicalMemory API.+ *+ * @module @claude-flow/memory/tiered-memory+ */++/** Temporal options accepted by {@link TieredMemoryStore.store}. */+export interface TemporalStoreOptions {+ /** ISO-8601 timestamp from which the fact is valid (default: always). */+ validFrom?: string;+ /** ISO-8601 timestamp after which the fact is no longer valid. */+ validUntil?: string;+ /**+ * Id (or key) of an existing entry this fact supersedes. The old entry+ * is stamped `validUntil = now`, `supersededBy = <new id>` and archived —+ * never deleted.+ */+ supersedes?: string;+}++/** Options accepted by {@link TieredMemoryStore.recall}. */+export interface TieredRecallOptions {+ /**+ * Include entries whose validity window has closed (superseded or+ * expired) and entries not yet valid. Audit escape hatch — default false.+ */+ includeExpired?: boolean;+}++/** A stored tiered-memory entry. */+export interface TieredMemoryEntry {+ id: string;+ key: string;+ value: string;+ tier: string;+ ts: number;+ validFrom?: string;+ validUntil?: string;+ supersededBy?: string;+}++/** Result of a store operation. */+export interface TieredStoreResult {+ id: string;+ key: string;+ tier: string;+ /** Set when `supersedes` matched an existing entry. */+ superseded?: { id: string; key: string; validUntil: string } | null;+}++const VALID_TIERS = ['working', 'episodic', 'semantic'] as const;+const MAX_PER_TIER = 5000;+const MAX_ARCHIVED = 5000;+const MAX_VALUE_LENGTH = 100_000;+const MAX_QUERY_LENGTH = 10_000;++let idCounter = 0;+function nextId(): string {+ idCounter = (idCounter + 1) % Number.MAX_SAFE_INTEGER;+ return `tm_${Date.now().toString(36)}_${idCounter.toString(36)}`;+}++/**+ * Returns true when the entry is valid at `nowMs`.+ * Entries without temporal fields are always valid (legacy behavior).+ * Unparseable timestamps are ignored (treated as absent) rather than+ * silently hiding the entry.+ */+export function isTemporallyValid(+ entry: Pick<TieredMemoryEntry, 'validFrom' | 'validUntil'>,+ nowMs: number = Date.now()+): boolean {+ if (entry.validFrom) {+ const from = Date.parse(entry.validFrom);+ if (!Number.isNaN(from) && from > nowMs) return false; // not yet valid+ }+ if (entry.validUntil) {+ const until = Date.parse(entry.validUntil);+ if (!Number.isNaN(until) && until <= nowMs) return false; // expired/superseded+ }+ return true;+}++/**+ * Tier-aware in-memory store with temporal validity and per-tier size+ * limits to prevent unbounded memory growth.+ */+export class TieredMemoryStore {+ private tiers: Record<string, Map<string, TieredMemoryEntry>> = {+ working: new Map(),+ episodic: new Map(),+ semantic: new Map(),+ };++ /**+ * Superseded entries are moved here so a same-key re-store cannot+ * clobber the historical fact. Bounded FIFO.+ */+ private archived: TieredMemoryEntry[] = [];++ /**+ * Store an entry. Same-key stores within a tier overwrite (legacy+ * behavior); use `options.supersedes` to invalidate-and-keep instead.+ */+ store(+ key: string,+ value: string,+ tier: string = 'working',+ options?: TemporalStoreOptions+ ): TieredStoreResult {+ const tierName = (VALID_TIERS as readonly string[]).includes(tier) ? tier : 'working';+ const t = this.tiers[tierName];++ const id = nextId();+ let superseded: TieredStoreResult['superseded'] = null;++ if (options?.supersedes) {+ superseded = this.supersede(options.supersedes, id);+ }++ // Evict oldest if at capacity+ if (t.size >= MAX_PER_TIER) {+ const oldest = t.keys().next().value;+ if (oldest !== undefined) t.delete(oldest);+ }++ const entry: TieredMemoryEntry = {+ id,+ key,+ value: value.substring(0, MAX_VALUE_LENGTH),+ tier: tierName,+ ts: Date.now(),+ };+ if (options?.validFrom) entry.validFrom = options.validFrom;+ if (options?.validUntil) entry.validUntil = options.validUntil;++ t.set(key, entry);+ return { id, key, tier: tierName, superseded };+ }++ /**+ * Invalidate an existing entry (matched by id first, then by key) by+ * stamping `validUntil = now` + `supersededBy = newId` and moving it to+ * the archive. The entry is NOT deleted — `recall(..., { includeExpired:+ * true })` still returns it.+ */+ supersede(idOrKey: string, newId: string): TieredStoreResult['superseded'] {+ const found = this.findActive(idOrKey);+ if (!found) return null;++ const { map, entry } = found;+ const now = new Date().toISOString();+ entry.validUntil = now;+ entry.supersededBy = newId;++ map.delete(entry.key);+ this.archived.push(entry);+ if (this.archived.length > MAX_ARCHIVED) this.archived.shift();++ return { id: entry.id, key: entry.key, validUntil: now };+ }++ /**+ * Substring recall across tiers, newest first. By default only+ * temporally-valid entries are returned; pass `{ includeExpired: true }`+ * to audit superseded / expired / future-dated facts too.+ */+ recall(query: string, topK = 5, options?: TieredRecallOptions): TieredMemoryEntry[] {+ const safeTopK = Math.min(Math.max(1, topK), 100);+ const q = query.toLowerCase().substring(0, MAX_QUERY_LENGTH);+ const includeExpired = options?.includeExpired === true;+ const now = Date.now();+ const results: TieredMemoryEntry[] = [];++ const consider = (entry: TieredMemoryEntry): boolean => {+ if (!entry.key.toLowerCase().includes(q) && !entry.value.toLowerCase().includes(q)) {+ return false;+ }+ if (!includeExpired && !isTemporallyValid(entry, now)) return false;+ results.push(entry);+ return true;+ };++ outer: for (const map of Object.values(this.tiers)) {+ for (const entry of map.values()) {+ consider(entry);+ if (results.length >= safeTopK * 3) break outer; // early exit for large stores+ }+ }++ if (includeExpired && results.length < safeTopK * 3) {+ for (const entry of this.archived) {+ consider(entry);+ if (results.length >= safeTopK * 3) break;+ }+ }++ return results.sort((a, b) => b.ts - a.ts).slice(0, safeTopK);+ }++ /** Hard-delete an active entry by key (used by hierarchical-delete). */+ remove(key: string): boolean {+ for (const map of Object.values(this.tiers)) {+ if (map.delete(key)) return true;+ }+ return false;+ }++ /** Per-tier active counts plus the superseded-archive size. */+ getTierStats(): Record<string, number> {+ const stats: Record<string, number> = {};+ for (const [name, map] of Object.entries(this.tiers)) {+ stats[name] = map.size;+ }+ stats.superseded = this.archived.length;+ return stats;+ }++ private findActive(+ idOrKey: string+ ): { map: Map<string, TieredMemoryEntry>; entry: TieredMemoryEntry } | null {+ // Prefer id match (exact provenance), fall back to key match.+ for (const map of Object.values(this.tiers)) {+ for (const entry of map.values()) {+ if (entry.id === idOrKey) return { map, entry };+ }+ }+ for (const map of Object.values(this.tiers)) {+ const entry = map.get(idOrKey);+ if (entry) return { map, entry };+ }+ return null;+ }+}++export default TieredMemoryStore;diff --git a/v3/@claude-flow/memory/src/types.ts b/v3/@claude-flow/memory/src/types.tsindex 1ea804a436..bccfd8e07e 100644--- a/v3/@claude-flow/memory/src/types.ts+++ b/v3/@claude-flow/memory/src/types.ts@@ -522,6 +522,13 @@ export interface MigrationConfig {/** Type mapping */typeMapping?: Record<string, MemoryType>;++ /**+ * Max concurrent single-entry embedding calls per migration batch when+ * no batch embedding generator is available (default: 8). Set to 1 to+ * restore fully sequential embedding.+ */+ embeddingConcurrency?: number;}/**@@ -669,6 +676,18 @@ export interface LearningPattern {*/export type EmbeddingGenerator = (content: string) => Promise<Float32Array>;+/**+ * Batch embedding generator function type.+ *+ * Implementations that can run a single padded forward pass over many+ * texts (e.g. transformers.js `tokenizer(texts[])` + one model call)+ * should be exposed through this type — it is dramatically cheaper than+ * N sequential single-text inferences in import/migration hot paths.+ *+ * Contract: MUST return one embedding per input text, in input order.+ */+export type BatchEmbeddingGenerator = (contents: string[]) => Promise<Float32Array[]>;+/*** Generates a unique memory ID*/diff --git a/v3/@claude-flow/plugin-agent-federation/__tests__/fixtures/a2a-agent-card.golden.json b/v3/@claude-flow/plugin-agent-federation/__tests__/fixtures/a2a-agent-card.golden.jsonnew file mode 100644index 0000000000..be02ce8065--- /dev/null+++ b/v3/@claude-flow/plugin-agent-federation/__tests__/fixtures/a2a-agent-card.golden.json@@ -0,0 +1,50 @@+{+ "name": "ruflo-federation/node-golden",+ "description": "Ruflo federation node node-golden — zero-trust cross-installation agent federation (2 agent role(s), PII-gated data flow, compliance-grade audit trail).",+ "supportedInterfaces": [+ {+ "url": "ws://127.0.0.1:9100",+ "protocolBinding": "RUFLO-FEDERATION",+ "protocolVersion": "1.0"+ }+ ],+ "version": "1.0.0-alpha.16",+ "capabilities": {+ "streaming": false,+ "pushNotifications": false,+ "extendedAgentCard": false,+ "extensions": [+ {+ "uri": "urn:ruflo:federation:manifest:v1",+ "description": "ruflo cross-installation federation identity (Ed25519-signed manifest)",+ "required": false,+ "params": {+ "nodeId": "node-golden",+ "publicKey": "aabbccddeeff",+ "endpoint": "ws://127.0.0.1:9100",+ "maxConcurrentSessions": 5,+ "supportedProtocols": ["websocket", "http"],+ "complianceModes": ["hipaa"],+ "manifestSignature": "sig-golden",+ "manifestTimestamp": "2026-07-03T00:00:00.000Z"+ }+ }+ ]+ },+ "defaultInputModes": ["application/json", "text/plain"],+ "defaultOutputModes": ["application/json", "text/plain"],+ "skills": [+ {+ "id": "agent-type:coder",+ "name": "coder",+ "description": "Federated ruflo agent role \"coder\" — dispatchable via cross-installation federation sessions.",+ "tags": ["ruflo", "federation", "agent-role", "coder"]+ },+ {+ "id": "agent-type:reviewer",+ "name": "reviewer",+ "description": "Federated ruflo agent role \"reviewer\" — dispatchable via cross-installation federation sessions.",+ "tags": ["ruflo", "federation", "agent-role", "reviewer"]+ }+ ]+}diff --git a/v3/@claude-flow/plugin-agent-federation/__tests__/unit/a2a-agent-card.test.ts b/v3/@claude-flow/plugin-agent-federation/__tests__/unit/a2a-agent-card.test.tsnew file mode 100644index 0000000000..8b5e87f5b9--- /dev/null+++ b/v3/@claude-flow/plugin-agent-federation/__tests__/unit/a2a-agent-card.test.ts@@ -0,0 +1,246 @@+/**+ * A2A Agent Card adapter tests — generation (FederationManifest → card,+ * golden-file), validation (A2A 1.0 §4.4.1 required fields), and+ * consumption (card → bespoke federation registry shape).+ */++import { describe, it, expect } from 'vitest';+import { readFileSync } from 'node:fs';+import { join, dirname } from 'node:path';+import { fileURLToPath } from 'node:url';+import {+ toAgentCard,+ fromAgentCard,+ validateAgentCard,+ A2A_PROTOCOL_VERSION,+ A2A_WELL_KNOWN_PATH,+ RUFLO_FEDERATION_BINDING,+ RUFLO_FEDERATION_EXTENSION_URI,+ type A2AAgentCard,+} from '../../src/a2a/agent-card.js';+import { DiscoveryService } from '../../src/domain/services/discovery-service.js';+import { TrustLevel } from '../../src/domain/entities/trust-level.js';+import type { FederationManifest } from '../../src/domain/services/discovery-service.js';++const FIXTURES = join(dirname(fileURLToPath(import.meta.url)), '..', 'fixtures');++function goldenCard(): A2AAgentCard {+ return JSON.parse(readFileSync(join(FIXTURES, 'a2a-agent-card.golden.json'), 'utf-8'));+}++function makeManifest(overrides: Partial<FederationManifest> = {}): FederationManifest {+ return {+ nodeId: 'node-golden',+ publicKey: 'aabbccddeeff',+ endpoint: 'ws://127.0.0.1:9100',+ capabilities: {+ agentTypes: ['coder', 'reviewer'],+ maxConcurrentSessions: 5,+ supportedProtocols: ['websocket', 'http'],+ complianceModes: ['hipaa'],+ },+ version: '1.0.0-alpha.16',+ signature: 'sig-golden',+ timestamp: '2026-07-03T00:00:00.000Z',+ ...overrides,+ };+}++describe('A2A constants', () => {+ it('targets A2A protocol 1.0 at the spec well-known path', () => {+ expect(A2A_PROTOCOL_VERSION).toBe('1.0');+ // 0.3.0+ renamed agent.json → agent-card.json; 1.0 keeps agent-card.json+ expect(A2A_WELL_KNOWN_PATH).toBe('/.well-known/agent-card.json');+ });+});++describe('toAgentCard', () => {+ it('matches the golden card byte-for-byte (deep equal)', () => {+ expect(toAgentCard(makeManifest())).toEqual(goldenCard());+ });++ it('produces a card that passes its own spec validation', () => {+ const result = validateAgentCard(toAgentCard(makeManifest()));+ expect(result.errors).toEqual([]);+ expect(result.valid).toBe(true);+ });++ it('includes every A2A 1.0 REQUIRED field', () => {+ const card = toAgentCard(makeManifest());+ // spec §4.4.1 required: name, description, supportedInterfaces, version,+ // capabilities, defaultInputModes, defaultOutputModes, skills+ expect(card.name).toBeTruthy();+ expect(card.description).toBeTruthy();+ expect(card.supportedInterfaces.length).toBeGreaterThan(0);+ expect(card.version).toBeTruthy();+ expect(card.capabilities).toBeTypeOf('object');+ expect(card.defaultInputModes.length).toBeGreaterThan(0);+ expect(card.defaultOutputModes.length).toBeGreaterThan(0);+ expect(Array.isArray(card.skills)).toBe(true);+ });++ it('advertises the federation endpoint as an open-form RUFLO-FEDERATION binding', () => {+ const card = toAgentCard(makeManifest());+ const iface = card.supportedInterfaces[0]!;+ expect(iface.protocolBinding).toBe(RUFLO_FEDERATION_BINDING);+ expect(iface.protocolVersion).toBe(A2A_PROTOCOL_VERSION);+ expect(iface.url).toBe('ws://127.0.0.1:9100');+ });++ it('normalizes a bare host:port endpoint into a URL', () => {+ const card = toAgentCard(makeManifest({ endpoint: '10.0.0.5:9100' }));+ expect(card.supportedInterfaces[0]!.url).toBe('ws://10.0.0.5:9100');+ });++ it('maps every agent type to a spec-valid AgentSkill', () => {+ const card = toAgentCard(makeManifest());+ expect(card.skills.map((s) => s.id)).toEqual(['agent-type:coder', 'agent-type:reviewer']);+ for (const skill of card.skills) {+ expect(skill.name).toBeTruthy();+ expect(skill.description).toBeTruthy();+ expect(skill.tags.length).toBeGreaterThan(0); // tags REQUIRED per §4.4.5+ }+ });++ it('supports name/description/provider/interface overrides', () => {+ const card = toAgentCard(makeManifest(), {+ name: 'My Agent',+ description: 'Custom description',+ provider: { url: 'https://ruv.net', organization: 'ruvnet' },+ additionalInterfaces: [+ { url: 'https://api.example.com/a2a/v1', protocolBinding: 'JSONRPC', protocolVersion: '1.0' },+ ],+ });+ expect(card.name).toBe('My Agent');+ expect(card.description).toBe('Custom description');+ expect(card.provider).toEqual({ url: 'https://ruv.net', organization: 'ruvnet' });+ // additional interfaces come first (preferred per spec ordering)+ expect(card.supportedInterfaces[0]!.protocolBinding).toBe('JSONRPC');+ expect(card.supportedInterfaces[1]!.protocolBinding).toBe(RUFLO_FEDERATION_BINDING);+ });+});++describe('validateAgentCard', () => {+ it('accepts the golden card', () => {+ expect(validateAgentCard(goldenCard()).valid).toBe(true);+ });++ it('rejects non-objects', () => {+ expect(validateAgentCard(null).valid).toBe(false);+ expect(validateAgentCard('card').valid).toBe(false);+ expect(validateAgentCard([]).valid).toBe(false);+ });++ it.each([+ ['name'], ['description'], ['version'],+ ['supportedInterfaces'], ['capabilities'],+ ['defaultInputModes'], ['defaultOutputModes'], ['skills'],+ ])('rejects a card missing required field %s', (field) => {+ const card = { ...goldenCard() } as Record<string, unknown>;+ delete card[field];+ const result = validateAgentCard(card);+ expect(result.valid).toBe(false);+ expect(result.errors.some((e) => e.includes(field))).toBe(true);+ });++ it('rejects interfaces missing url/protocolBinding/protocolVersion', () => {+ const card = { ...goldenCard(), supportedInterfaces: [{ url: 'ws://x' }] };+ const result = validateAgentCard(card);+ expect(result.valid).toBe(false);+ expect(result.errors.join(' ')).toContain('protocolBinding');+ expect(result.errors.join(' ')).toContain('protocolVersion');+ });++ it('rejects skills missing required id/name/description/tags', () => {+ const card = { ...goldenCard(), skills: [{ id: 'x' }] };+ const result = validateAgentCard(card);+ expect(result.valid).toBe(false);+ expect(result.errors.join(' ')).toContain('tags');+ });++ it('tolerates unknown extra fields (forward compatibility)', () => {+ const card = { ...goldenCard(), futureField: { anything: true } };+ expect(validateAgentCard(card).valid).toBe(true);+ });+});++describe('fromAgentCard', () => {+ it('round-trips a ruflo-generated card back to the federation identity', () => {+ const manifest = makeManifest();+ const node = fromAgentCard(toAgentCard(manifest), 'http://127.0.0.1:41241/.well-known/agent-card.json');++ expect(node.nodeId).toBe('node-golden');+ expect(node.publicKey).toBe('aabbccddeeff');+ expect(node.endpoint).toBe('ws://127.0.0.1:9100');+ expect(node.capabilities.agentTypes).toEqual(['coder', 'reviewer']);+ expect(node.capabilities.maxConcurrentSessions).toBe(5);+ expect(node.capabilities.supportedProtocols).toEqual(['websocket', 'http']);+ expect(node.capabilities.complianceModes).toEqual(['hipaa']);+ expect(node.metadata.discoveryMechanism).toBe('a2a-card');+ });++ it('always enters at TrustLevel.UNTRUSTED regardless of card claims', () => {+ const node = fromAgentCard(toAgentCard(makeManifest()));+ expect(node.trustLevel).toBe(TrustLevel.UNTRUSTED);+ expect(node.trustScore).toBe(0);+ });++ it('maps a foreign (non-ruflo) A2A card without the federation extension', () => {+ const foreign: A2AAgentCard = {+ name: 'GeoSpatial Route Planner Agent',+ description: 'Route planning services.',+ supportedInterfaces: [+ { url: 'https://georoute.example.com/a2a/v1', protocolBinding: 'JSONRPC', protocolVersion: '1.0' },+ ],+ version: '1.2.0',+ capabilities: { streaming: true },+ defaultInputModes: ['application/json'],+ defaultOutputModes: ['application/json'],+ skills: [+ { id: 'route-optimizer', name: 'Route Optimizer', description: 'Optimizes routes.', tags: ['maps'] },+ ],+ };+ expect(validateAgentCard(foreign).valid).toBe(true);++ const node = fromAgentCard(foreign, 'https://georoute.example.com/.well-known/agent-card.json');+ expect(node.nodeId).toBe('a2a-geospatial-route-planner-agent');+ expect(node.publicKey).toBe('');+ expect(node.endpoint).toBe('https://georoute.example.com/a2a/v1');+ expect(node.capabilities.agentTypes).toEqual(['route-optimizer']);+ expect(node.capabilities.supportedProtocols).toEqual(['jsonrpc']);+ expect(node.trustLevel).toBe(TrustLevel.UNTRUSTED);+ expect((node.metadata as { a2a?: { sourceUrl?: string } }).a2a?.sourceUrl)+ .toBe('https://georoute.example.com/.well-known/agent-card.json');+ });+});++describe('DiscoveryService.registerExternalPeer', () => {+ function makeDiscovery() {+ return new DiscoveryService({+ signManifest: async () => 'sig',+ verifyManifest: async () => true,+ });+ }++ it('registers an A2A-card peer so it appears in federation discovery', () => {+ const discovery = makeDiscovery();+ const node = fromAgentCard(toAgentCard(makeManifest()));+ discovery.registerExternalPeer(node);++ const peers = discovery.listPeers();+ expect(peers).toHaveLength(1);+ expect(peers[0]!.nodeId).toBe('node-golden');+ expect(peers[0]!.metadata.discoveryMechanism).toBe('a2a-card');+ });++ it('refreshes (not replaces) an existing peer, preserving trust state', () => {+ const discovery = makeDiscovery();+ const first = discovery.registerExternalPeer(fromAgentCard(toAgentCard(makeManifest())));+ first.updateTrustScore(0.7);++ const again = discovery.registerExternalPeer(fromAgentCard(toAgentCard(makeManifest())));+ expect(again).toBe(first);+ expect(again.trustScore).toBe(0.7);+ expect(discovery.listPeers()).toHaveLength(1);+ });+});diff --git a/v3/@claude-flow/plugin-agent-federation/__tests__/unit/a2a-well-known.test.ts b/v3/@claude-flow/plugin-agent-federation/__tests__/unit/a2a-well-known.test.tsnew file mode 100644index 0000000000..b9361d693b--- /dev/null+++ b/v3/@claude-flow/plugin-agent-federation/__tests__/unit/a2a-well-known.test.ts@@ -0,0 +1,199 @@+/**+ * A2A well-known endpoint + consume tests — serving the card at+ * /.well-known/agent-card.json (loopback-only by default, ADR-166) and+ * fetching/validating/registering remote cards into federation discovery.+ */++import { describe, it, expect, afterEach } from 'vitest';+import { readFileSync } from 'node:fs';+import { join, dirname } from 'node:path';+import { fileURLToPath } from 'node:url';+import {+ toAgentCard,+ validateAgentCard,+ A2A_WELL_KNOWN_PATH,+ type A2AAgentCard,+} from '../../src/a2a/agent-card.js';+import {+ startAgentCardServer,+ isLoopbackHost,+ type AgentCardServerHandle,+} from '../../src/a2a/well-known.js';+import {+ fetchAgentCard,+ consumeAgentCard,+ resolveAgentCardUrl,+} from '../../src/a2a/consume.js';+import { DiscoveryService } from '../../src/domain/services/discovery-service.js';+import type { FederationManifest } from '../../src/domain/services/discovery-service.js';++const FIXTURES = join(dirname(fileURLToPath(import.meta.url)), '..', 'fixtures');++function goldenCard(): A2AAgentCard {+ return JSON.parse(readFileSync(join(FIXTURES, 'a2a-agent-card.golden.json'), 'utf-8'));+}++function makeManifest(): FederationManifest {+ return {+ nodeId: 'node-golden',+ publicKey: 'aabbccddeeff',+ endpoint: 'ws://127.0.0.1:9100',+ capabilities: {+ agentTypes: ['coder', 'reviewer'],+ maxConcurrentSessions: 5,+ supportedProtocols: ['websocket', 'http'],+ complianceModes: ['hipaa'],+ },+ version: '1.0.0-alpha.16',+ signature: 'sig-golden',+ timestamp: '2026-07-03T00:00:00.000Z',+ };+}++function makeDiscovery() {+ return new DiscoveryService({+ signManifest: async () => 'sig',+ verifyManifest: async () => true,+ });+}++/** Stub fetch returning a fixed JSON body. */+function stubFetch(body: unknown, status = 200): typeof fetch {+ return (async () =>+ new Response(typeof body === 'string' ? body : JSON.stringify(body), {+ status,+ headers: { 'content-type': 'application/json' },+ })) as typeof fetch;+}++describe('startAgentCardServer', () => {+ let handle: AgentCardServerHandle | null = null;++ afterEach(async () => {+ if (handle) {+ await handle.close();+ handle = null;+ }+ });++ it('serves the card at the A2A well-known path with spec caching headers', async () => {+ const card = toAgentCard(makeManifest());+ handle = await startAgentCardServer({ getCard: () => card, port: 0 });++ expect(handle.url.endsWith(A2A_WELL_KNOWN_PATH)).toBe(true);+ expect(handle.host).toBe('127.0.0.1');++ const res = await fetch(handle.url);+ expect(res.status).toBe(200);+ expect(res.headers.get('content-type')).toBe('application/json');+ expect(res.headers.get('cache-control')).toContain('max-age=');+ expect(res.headers.get('etag')).toBeTruthy();++ const served = await res.json();+ expect(served).toEqual(JSON.parse(JSON.stringify(card)));+ expect(validateAgentCard(served).valid).toBe(true);+ });++ it('returns 304 on matching If-None-Match (spec 8.6 conditional requests)', async () => {+ handle = await startAgentCardServer({ getCard: () => goldenCard(), port: 0 });+ const first = await fetch(handle.url);+ const etag = first.headers.get('etag')!;+ const second = await fetch(handle.url, { headers: { 'if-none-match': etag } });+ expect(second.status).toBe(304);+ });++ it('404s other paths and 405s non-GET methods', async () => {+ handle = await startAgentCardServer({ getCard: () => goldenCard(), port: 0 });+ const base = handle.url.replace(A2A_WELL_KNOWN_PATH, '');++ expect((await fetch(`${base}/`)).status).toBe(404);+ expect((await fetch(`${base}/admin`)).status).toBe(404);+ const post = await fetch(handle.url, { method: 'POST', body: '{}' });+ expect(post.status).toBe(405);+ });++ it('returns 503 while no card is available (surface up, card not published)', async () => {+ handle = await startAgentCardServer({ getCard: () => null, port: 0 });+ expect((await fetch(handle.url)).status).toBe(503);+ });++ it('refuses a non-loopback bind without explicit allowNonLoopback (ADR-166)', async () => {+ await expect(+ startAgentCardServer({ getCard: () => goldenCard(), port: 0, host: '0.0.0.0' }),+ ).rejects.toThrow(/ADR-166/);+ });++ it('classifies loopback hosts correctly', () => {+ expect(isLoopbackHost('127.0.0.1')).toBe(true);+ expect(isLoopbackHost('::1')).toBe(true);+ expect(isLoopbackHost('localhost')).toBe(true);+ expect(isLoopbackHost('0.0.0.0')).toBe(false);+ expect(isLoopbackHost('10.0.0.5')).toBe(false);+ });+});++describe('resolveAgentCardUrl', () => {+ it('appends the well-known path to a bare base URL', () => {+ expect(resolveAgentCardUrl('http://127.0.0.1:4141')).toBe(+ `http://127.0.0.1:4141${A2A_WELL_KNOWN_PATH}`,+ );+ });++ it('leaves an explicit card URL untouched', () => {+ const explicit = 'https://agent.example.com/custom/card.json';+ expect(resolveAgentCardUrl(explicit)).toBe(explicit);+ });+});++describe('fetchAgentCard', () => {+ it('fetches and validates a card via an injected fetch', async () => {+ const { card, sourceUrl } = await fetchAgentCard('http://127.0.0.1:1', {+ fetchImpl: stubFetch(goldenCard()),+ });+ expect(card.name).toBe('ruflo-federation/node-golden');+ expect(sourceUrl).toBe(`http://127.0.0.1:1${A2A_WELL_KNOWN_PATH}`);+ });++ it('rejects a structurally invalid card', async () => {+ await expect(+ fetchAgentCard('http://127.0.0.1:1', { fetchImpl: stubFetch({ name: 'incomplete' }) }),+ ).rejects.toThrow(/invalid A2A agent card/);+ });++ it('rejects non-JSON and non-2xx responses', async () => {+ await expect(+ fetchAgentCard('http://127.0.0.1:1', { fetchImpl: stubFetch('<html>nope</html>') }),+ ).rejects.toThrow(/valid JSON/);+ await expect(+ fetchAgentCard('http://127.0.0.1:1', { fetchImpl: stubFetch(goldenCard(), 500) }),+ ).rejects.toThrow(/HTTP 500/);+ });+});++describe('consumeAgentCard', () => {+ it('registers a fixture card into federation discovery as an UNTRUSTED a2a-card peer', async () => {+ const discovery = makeDiscovery();+ const node = await consumeAgentCard(discovery, 'http://127.0.0.1:1', {+ fetchImpl: stubFetch(goldenCard()),+ });++ expect(node.nodeId).toBe('node-golden');+ expect(node.metadata.discoveryMechanism).toBe('a2a-card');+ expect(discovery.getPeer('node-golden')).toBe(node);+ expect(discovery.listPeers()).toHaveLength(1);+ });++ it('end-to-end: serves a card over loopback HTTP and consumes it into discovery', async () => {+ const card = toAgentCard(makeManifest());+ const handle = await startAgentCardServer({ getCard: () => card, port: 0 });+ try {+ const discovery = makeDiscovery();+ const node = await consumeAgentCard(discovery, `http://127.0.0.1:${handle.port}`);+ expect(node.nodeId).toBe('node-golden');+ expect(node.endpoint).toBe('ws://127.0.0.1:9100');+ expect(discovery.listActivePeers().map((p) => p.nodeId)).toContain('node-golden');+ } finally {+ await handle.close();+ }+ });+});diff --git a/v3/@claude-flow/plugin-agent-federation/__tests__/unit/plugin.test.ts b/v3/@claude-flow/plugin-agent-federation/__tests__/unit/plugin.test.tsindex 876ce09cab..c07babb4b5 100644--- a/v3/@claude-flow/plugin-agent-federation/__tests__/unit/plugin.test.ts+++ b/v3/@claude-flow/plugin-agent-federation/__tests__/unit/plugin.test.ts@@ -232,9 +232,9 @@ describe('AgentFederationPlugin', () => {});describe('registerCLICommands', () => {- it('should return 10 CLI command definitions', () => {+ it('should return 11 CLI command definitions', () => {const commands = plugin.registerCLICommands();- expect(commands).toHaveLength(10);+ expect(commands).toHaveLength(11);});it.each([@@ -247,6 +247,7 @@ describe('AgentFederationPlugin', () => {'federation status','federation audit','federation trust',+ 'federation trust elevate','federation config',] as const)('should include command "%s"', (expectedName) => {const commands = plugin.registerCLICommands();diff --git a/v3/@claude-flow/plugin-agent-federation/src/a2a/agent-card.ts b/v3/@claude-flow/plugin-agent-federation/src/a2a/agent-card.tsnew file mode 100644index 0000000000..79c144c732--- /dev/null+++ b/v3/@claude-flow/plugin-agent-federation/src/a2a/agent-card.ts@@ -0,0 +1,356 @@+/**+ * A2A (Agent2Agent, Linux Foundation) Agent Card adapter — cards only.+ *+ * Maps ruflo's bespoke federation identity (`FederationManifest` /+ * `FederationNode`) to and from a spec-compliant A2A Agent Card so ruflo+ * nodes are discoverable by A2A peers and A2A peers appear in federation+ * discovery. This is an ADAPTER over the existing federation schema, not a+ * rewrite — A2A Tasks/messaging are deliberately out of scope.+ *+ * Spec: A2A Protocol 1.0.0 — https://a2a-protocol.org/latest/specification/+ * (schema source of truth: specification/a2a.proto in a2aproject/A2A).+ * Required AgentCard fields per spec §4.4.1: name, description,+ * supportedInterfaces, version, capabilities, defaultInputModes,+ * defaultOutputModes, skills.+ */++import { FederationNode } from '../domain/entities/federation-node.js';+import { TrustLevel } from '../domain/entities/trust-level.js';+import type { FederationManifest } from '../domain/services/discovery-service.js';++// ---------------------------------------------------------------------------+// Constants+// ---------------------------------------------------------------------------++/** A2A protocol version this adapter targets. */+export const A2A_PROTOCOL_VERSION = '1.0';++/**+ * Well-known URI for Agent Card discovery (A2A 1.0 §8.2 + IANA registration+ * §14). NOTE: earlier drafts used `/.well-known/agent.json`; 0.3.0+ settled+ * on `agent-card.json`.+ */+export const A2A_WELL_KNOWN_PATH = '/.well-known/agent-card.json';++/**+ * Open-form protocol binding string advertising ruflo's federation wire+ * (Ed25519-signed envelopes over WebSocket/QUIC). Spec §4.4.6 explicitly+ * allows non-core bindings: "This is an open form string, to be easily+ * extended for other protocol bindings."+ */+export const RUFLO_FEDERATION_BINDING = 'RUFLO-FEDERATION';++/**+ * Extension URI carrying the bespoke federation identity inside the card+ * (spec §4.6 AgentExtension). Enables lossless round-trip in fromAgentCard.+ */+export const RUFLO_FEDERATION_EXTENSION_URI = 'urn:ruflo:federation:manifest:v1';++// ---------------------------------------------------------------------------+// A2A 1.0 card types (subset used by this adapter — field names per spec JSON+// mapping, i.e. lowerCamelCase of the proto fields)+// ---------------------------------------------------------------------------++export interface A2AAgentInterface {+ readonly url: string;+ readonly protocolBinding: string;+ readonly protocolVersion: string;+ readonly tenant?: string;+}++export interface A2AAgentSkill {+ readonly id: string;+ readonly name: string;+ readonly description: string;+ readonly tags: readonly string[];+ readonly examples?: readonly string[];+ readonly inputModes?: readonly string[];+ readonly outputModes?: readonly string[];+}++export interface A2AAgentExtension {+ readonly uri: string;+ readonly description?: string;+ readonly required?: boolean;+ readonly params?: Record<string, unknown>;+}++export interface A2AAgentCapabilities {+ readonly streaming?: boolean;+ readonly pushNotifications?: boolean;+ readonly extensions?: readonly A2AAgentExtension[];+ readonly extendedAgentCard?: boolean;+}++export interface A2AAgentProvider {+ readonly url: string;+ readonly organization: string;+}++export interface A2AAgentCard {+ readonly name: string;+ readonly description: string;+ readonly supportedInterfaces: readonly A2AAgentInterface[];+ readonly version: string;+ readonly capabilities: A2AAgentCapabilities;+ readonly defaultInputModes: readonly string[];+ readonly defaultOutputModes: readonly string[];+ readonly skills: readonly A2AAgentSkill[];+ readonly provider?: A2AAgentProvider;+ readonly documentationUrl?: string;+ readonly iconUrl?: string;+ readonly securitySchemes?: Record<string, unknown>;+ readonly securityRequirements?: readonly Record<string, readonly string[]>[];+ readonly signatures?: readonly { protected: string; signature: string }[];+}++// ---------------------------------------------------------------------------+// Generation: FederationManifest → A2A Agent Card+// ---------------------------------------------------------------------------++export interface ToAgentCardOptions {+ /** Human-readable agent name; defaults to `ruflo-federation/<nodeId>`. */+ readonly name?: string;+ /** Human-readable description override. */+ readonly description?: string;+ readonly provider?: A2AAgentProvider;+ readonly documentationUrl?: string;+ /**+ * Extra spec-core interfaces to advertise ahead of the federation binding+ * (e.g. a JSONRPC endpoint once A2A messaging lands). First entry is the+ * preferred interface per spec.+ */+ readonly additionalInterfaces?: readonly A2AAgentInterface[];+}++/** Normalize a federation endpoint (ws://host:port, host:port, …) to a URL. */+function endpointToUrl(endpoint: string): string {+ if (/^[a-z][a-z0-9+.-]*:\/\//i.test(endpoint)) return endpoint;+ return `ws://${endpoint}`;+}++/**+ * Generate a spec-compliant A2A Agent Card from a ruflo federation manifest.+ * Every agent type becomes an AgentSkill; the federation endpoint becomes a+ * `RUFLO-FEDERATION` interface; the bespoke identity (nodeId, publicKey,+ * complianceModes, manifest signature) rides in a spec §4.6 extension so+ * `fromAgentCard` can restore it.+ */+export function toAgentCard(+ manifest: FederationManifest,+ options: ToAgentCardOptions = {},+): A2AAgentCard {+ const skills: A2AAgentSkill[] = manifest.capabilities.agentTypes.map((agentType) => ({+ id: `agent-type:${agentType}`,+ name: agentType,+ description: `Federated ruflo agent role "${agentType}" — dispatchable via cross-installation federation sessions.`,+ tags: ['ruflo', 'federation', 'agent-role', agentType],+ }));++ const interfaces: A2AAgentInterface[] = [+ ...(options.additionalInterfaces ?? []),+ {+ url: endpointToUrl(manifest.endpoint),+ protocolBinding: RUFLO_FEDERATION_BINDING,+ protocolVersion: A2A_PROTOCOL_VERSION,+ },+ ];++ const federationExtension: A2AAgentExtension = {+ uri: RUFLO_FEDERATION_EXTENSION_URI,+ description: 'ruflo cross-installation federation identity (Ed25519-signed manifest)',+ required: false,+ params: {+ nodeId: manifest.nodeId,+ publicKey: manifest.publicKey,+ endpoint: manifest.endpoint,+ maxConcurrentSessions: manifest.capabilities.maxConcurrentSessions,+ supportedProtocols: [...manifest.capabilities.supportedProtocols],+ complianceModes: [...manifest.capabilities.complianceModes],+ manifestSignature: manifest.signature,+ manifestTimestamp: manifest.timestamp,+ },+ };++ return {+ name: options.name ?? `ruflo-federation/${manifest.nodeId}`,+ description:+ options.description ??+ `Ruflo federation node ${manifest.nodeId} — zero-trust cross-installation agent federation ` ++ `(${manifest.capabilities.agentTypes.length} agent role(s), PII-gated data flow, compliance-grade audit trail).`,+ supportedInterfaces: interfaces,+ version: manifest.version,+ capabilities: {+ streaming: false,+ pushNotifications: false,+ extendedAgentCard: false,+ extensions: [federationExtension],+ },+ defaultInputModes: ['application/json', 'text/plain'],+ defaultOutputModes: ['application/json', 'text/plain'],+ skills,+ ...(options.provider ? { provider: options.provider } : {}),+ ...(options.documentationUrl ? { documentationUrl: options.documentationUrl } : {}),+ };+}++// ---------------------------------------------------------------------------+// Validation (spec §4.4.1 REQUIRED fields)+// ---------------------------------------------------------------------------++export interface AgentCardValidation {+ readonly valid: boolean;+ readonly errors: readonly string[];+}++/**+ * Structural validation against the A2A 1.0 AgentCard REQUIRED fields.+ * Intentionally strict on required shape, lenient on unknown extra fields+ * (forward compatibility with future spec minors).+ */+export function validateAgentCard(value: unknown): AgentCardValidation {+ const errors: string[] = [];+ if (typeof value !== 'object' || value === null || Array.isArray(value)) {+ return { valid: false, errors: ['card must be a JSON object'] };+ }+ const card = value as Record<string, unknown>;++ const requireString = (field: string) => {+ if (typeof card[field] !== 'string' || (card[field] as string).length === 0) {+ errors.push(`missing or empty required string field: ${field}`);+ }+ };+ requireString('name');+ requireString('description');+ requireString('version');++ const interfaces = card['supportedInterfaces'];+ if (!Array.isArray(interfaces) || interfaces.length === 0) {+ errors.push('supportedInterfaces must be a non-empty array (spec 4.4.1)');+ } else {+ interfaces.forEach((iface, i) => {+ if (typeof iface !== 'object' || iface === null) {+ errors.push(`supportedInterfaces[${i}] must be an object`);+ return;+ }+ for (const f of ['url', 'protocolBinding', 'protocolVersion']) {+ if (typeof (iface as Record<string, unknown>)[f] !== 'string' || !(iface as Record<string, unknown>)[f]) {+ errors.push(`supportedInterfaces[${i}].${f} is required (spec 4.4.6)`);+ }+ }+ });+ }++ if (typeof card['capabilities'] !== 'object' || card['capabilities'] === null || Array.isArray(card['capabilities'])) {+ errors.push('capabilities must be an object (spec 4.4.1)');+ }++ for (const field of ['defaultInputModes', 'defaultOutputModes']) {+ const v = card[field];+ if (!Array.isArray(v) || v.length === 0 || !v.every((x) => typeof x === 'string')) {+ errors.push(`${field} must be a non-empty array of media-type strings (spec 4.4.1)`);+ }+ }++ const skills = card['skills'];+ if (!Array.isArray(skills)) {+ errors.push('skills must be an array (spec 4.4.1)');+ } else {+ skills.forEach((skill, i) => {+ if (typeof skill !== 'object' || skill === null) {+ errors.push(`skills[${i}] must be an object`);+ return;+ }+ const s = skill as Record<string, unknown>;+ for (const f of ['id', 'name', 'description']) {+ if (typeof s[f] !== 'string' || !s[f]) errors.push(`skills[${i}].${f} is required (spec 4.4.5)`);+ }+ if (!Array.isArray(s['tags'])) errors.push(`skills[${i}].tags is required (spec 4.4.5)`);+ });+ }++ return { valid: errors.length === 0, errors };+}++// ---------------------------------------------------------------------------+// Consumption: A2A Agent Card → bespoke federation registry shape+// ---------------------------------------------------------------------------++/** Slugify a card name into a stable nodeId when no extension identity exists. */+function slugify(name: string): string {+ // Linear-time dash trim (no /^-+|-+$/ regex — that anchor+quantifier pattern+ // is polynomial-time on adversarial all-dash input, flagged js/polynomial-redos).+ const collapsed = name.toLowerCase().replace(/[^a-z0-9]+/g, '-');+ let start = 0;+ let end = collapsed.length;+ while (start < end && collapsed.charCodeAt(start) === 45 /* '-' */) start++;+ while (end > start && collapsed.charCodeAt(end - 1) === 45 /* '-' */) end--;+ return collapsed.slice(start, end).slice(0, 64) || 'a2a-peer';+}++function findFederationExtension(card: A2AAgentCard): A2AAgentExtension | undefined {+ return card.capabilities.extensions?.find((e) => e.uri === RUFLO_FEDERATION_EXTENSION_URI);+}++/**+ * Map a validated remote A2A Agent Card into the bespoke federation registry+ * shape (a `FederationNode`) so A2A peers appear in federation discovery.+ *+ * Trust posture: A2A cards are self-describing metadata, NOT authenticated+ * federation manifests — consumed peers always enter at+ * `TrustLevel.UNTRUSTED` regardless of embedded identity claims. Trust is+ * earned afterwards through the normal handshake + TrustEvaluator path.+ */+export function fromAgentCard(card: A2AAgentCard, sourceUrl?: string): FederationNode {+ const ext = findFederationExtension(card);+ const params = (ext?.params ?? {}) as Record<string, unknown>;++ const preferred = card.supportedInterfaces[0];+ const federationIface = card.supportedInterfaces.find(+ (i) => i.protocolBinding === RUFLO_FEDERATION_BINDING,+ );+ const endpoint =+ (typeof params['endpoint'] === 'string' && params['endpoint']) ||+ federationIface?.url ||+ preferred?.url ||+ '';++ const nodeId =+ (typeof params['nodeId'] === 'string' && params['nodeId']) || `a2a-${slugify(card.name)}`;++ const agentTypes = card.skills.map((s) =>+ s.id.startsWith('agent-type:') ? s.id.slice('agent-type:'.length) : s.id,+ );++ const supportedProtocols = Array.isArray(params['supportedProtocols'])+ ? (params['supportedProtocols'] as string[])+ : [...new Set(card.supportedInterfaces.map((i) => i.protocolBinding.toLowerCase()))];++ return FederationNode.create({+ nodeId,+ publicKey: typeof params['publicKey'] === 'string' ? (params['publicKey'] as string) : '',+ endpoint,+ capabilities: {+ agentTypes,+ maxConcurrentSessions:+ typeof params['maxConcurrentSessions'] === 'number'+ ? (params['maxConcurrentSessions'] as number)+ : 1,+ supportedProtocols,+ complianceModes: Array.isArray(params['complianceModes'])+ ? (params['complianceModes'] as string[])+ : [],+ },+ trustLevel: TrustLevel.UNTRUSTED,+ metadata: {+ discoveryMechanism: 'a2a-card',+ version: card.version,+ a2a: {+ cardName: card.name,+ protocolVersion: preferred?.protocolVersion ?? A2A_PROTOCOL_VERSION,+ sourceUrl: sourceUrl ?? null,+ skillCount: card.skills.length,+ },+ },+ });+}diff --git a/v3/@claude-flow/plugin-agent-federation/src/a2a/consume.ts b/v3/@claude-flow/plugin-agent-federation/src/a2a/consume.tsnew file mode 100644index 0000000000..7fe400d8aa--- /dev/null+++ b/v3/@claude-flow/plugin-agent-federation/src/a2a/consume.ts@@ -0,0 +1,102 @@+/**+ * A2A Agent Card consumption — fetch + validate a remote card and map it+ * into the bespoke federation registry so A2A peers appear in federation+ * discovery. Cards only (no A2A Tasks/messaging in this iteration).+ */++import type { DiscoveryService } from '../domain/services/discovery-service.js';+import type { FederationNode } from '../domain/entities/federation-node.js';+import {+ A2A_WELL_KNOWN_PATH,+ fromAgentCard,+ validateAgentCard,+ type A2AAgentCard,+} from './agent-card.js';++export interface FetchAgentCardOptions {+ /** Injectable fetch for tests / restricted environments. Default: globalThis.fetch. */+ readonly fetchImpl?: typeof fetch;+ readonly timeoutMs?: number;+ /** Response size cap in bytes (defense against decompression floods). Default 256 KiB. */+ readonly maxBytes?: number;+}++export interface FetchAgentCardResult {+ readonly card: A2AAgentCard;+ readonly sourceUrl: string;+}++/**+ * Resolve the card URL: a bare base URL (`https://host[:port]` or a path-less+ * URL) gets the A2A well-known path appended; anything already pointing at a+ * JSON document is used as-is.+ */+export function resolveAgentCardUrl(baseOrCardUrl: string): string {+ const url = new URL(baseOrCardUrl);+ if (url.pathname === '/' || url.pathname === '') {+ url.pathname = A2A_WELL_KNOWN_PATH;+ }+ return url.toString();+}++/** Fetch and structurally validate a remote A2A Agent Card. */+export async function fetchAgentCard(+ baseOrCardUrl: string,+ options: FetchAgentCardOptions = {},+): Promise<FetchAgentCardResult> {+ const fetchImpl = options.fetchImpl ?? globalThis.fetch;+ if (typeof fetchImpl !== 'function') {+ throw new Error('fetchAgentCard: no fetch implementation available');+ }+ const sourceUrl = resolveAgentCardUrl(baseOrCardUrl);+ const maxBytes = options.maxBytes ?? 256 * 1024;++ const controller = new AbortController();+ const timer = setTimeout(() => controller.abort(), options.timeoutMs ?? 10_000);+ let text: string;+ try {+ const res = await fetchImpl(sourceUrl, {+ signal: controller.signal,+ headers: { accept: 'application/json' },+ });+ if (!res.ok) {+ throw new Error(`fetchAgentCard: ${sourceUrl} returned HTTP ${res.status}`);+ }+ text = await res.text();+ } finally {+ clearTimeout(timer);+ }+ if (text.length > maxBytes) {+ throw new Error(`fetchAgentCard: card exceeds ${maxBytes} bytes`);+ }++ let parsed: unknown;+ try {+ parsed = JSON.parse(text);+ } catch {+ throw new Error(`fetchAgentCard: ${sourceUrl} did not return valid JSON`);+ }++ const validation = validateAgentCard(parsed);+ if (!validation.valid) {+ throw new Error(+ `fetchAgentCard: invalid A2A agent card from ${sourceUrl}: ${validation.errors.join('; ')}`,+ );+ }+ return { card: parsed as A2AAgentCard, sourceUrl };+}++/**+ * Fetch a remote Agent Card and register the peer in federation discovery.+ * The peer enters at TrustLevel.UNTRUSTED (see fromAgentCard) — the card is+ * self-asserted metadata, and trust is earned through the normal handshake.+ */+export async function consumeAgentCard(+ discovery: DiscoveryService,+ baseOrCardUrl: string,+ options: FetchAgentCardOptions = {},+): Promise<FederationNode> {+ const { card, sourceUrl } = await fetchAgentCard(baseOrCardUrl, options);+ const node = fromAgentCard(card, sourceUrl);+ return discovery.registerExternalPeer(node);+}diff --git a/v3/@claude-flow/plugin-agent-federation/src/a2a/well-known.ts b/v3/@claude-flow/plugin-agent-federation/src/a2a/well-known.tsnew file mode 100644index 0000000000..483b5f35af--- /dev/null+++ b/v3/@claude-flow/plugin-agent-federation/src/a2a/well-known.ts@@ -0,0 +1,119 @@+/**+ * A2A well-known Agent Card endpoint (A2A 1.0 §8.2 discovery + §8.6 caching).+ *+ * Serves `GET /.well-known/agent-card.json` from a minimal `node:http`+ * server. Security posture follows ADR-166 (mcp-bridge unauthenticated-RCE+ * remediation): binds 127.0.0.1 by default and REFUSES a non-loopback bind+ * unless the caller passes `allowNonLoopback: true` explicitly. The endpoint+ * is read-only (GET/HEAD on one exact path), exposes only the public card,+ * and is entirely opt-in — nothing here weakens the federation transport's+ * existing bind or auth behavior.+ */++import { createServer, type Server } from 'node:http';+import { createHash } from 'node:crypto';+import { A2A_WELL_KNOWN_PATH, type A2AAgentCard } from './agent-card.js';++export interface AgentCardServerOptions {+ /** Card supplier — re-invoked per request so a late-published manifest is picked up. */+ readonly getCard: () => A2AAgentCard | null;+ readonly port: number;+ /** Bind host. Default 127.0.0.1 (ADR-166 posture). */+ readonly host?: string;+ /** Serve path. Default A2A_WELL_KNOWN_PATH. */+ readonly path?: string;+ /**+ * Explicit opt-in required to bind anything other than loopback. Without+ * it a non-loopback host is rejected at start (fail-closed).+ */+ readonly allowNonLoopback?: boolean;+ /** Cache-Control max-age seconds (spec §8.6.1). Default 300. */+ readonly cacheMaxAgeSeconds?: number;+}++export interface AgentCardServerHandle {+ readonly url: string;+ readonly host: string;+ readonly port: number;+ close(): Promise<void>;+}++const LOOPBACK_HOSTS = new Set(['127.0.0.1', '::1', 'localhost']);++export function isLoopbackHost(host: string): boolean {+ return LOOPBACK_HOSTS.has(host) || host.startsWith('127.');+}++/**+ * Start the well-known Agent Card HTTP endpoint.+ *+ * Responses:+ * GET/HEAD <path> → 200 application/json (+ Cache-Control, ETag per §8.6)+ * or 503 when no card is available yet+ * other method → 405+ * other path → 404+ */+export function startAgentCardServer(+ options: AgentCardServerOptions,+): Promise<AgentCardServerHandle> {+ const host = options.host ?? '127.0.0.1';+ const path = options.path ?? A2A_WELL_KNOWN_PATH;+ const maxAge = options.cacheMaxAgeSeconds ?? 300;++ if (!isLoopbackHost(host) && options.allowNonLoopback !== true) {+ return Promise.reject(new Error(+ `A2A agent-card server: refusing non-loopback bind ${host} without allowNonLoopback: true (ADR-166)`,+ ));+ }++ const server: Server = createServer((req, res) => {+ const reqPath = (req.url ?? '').split('?')[0];+ if (reqPath !== path) {+ res.writeHead(404, { 'content-type': 'application/json' });+ res.end(JSON.stringify({ error: 'not_found', agentCardPath: path }));+ return;+ }+ if (req.method !== 'GET' && req.method !== 'HEAD') {+ res.writeHead(405, { allow: 'GET, HEAD', 'content-type': 'application/json' });+ res.end(JSON.stringify({ error: 'method_not_allowed' }));+ return;+ }+ const card = options.getCard();+ if (!card) {+ res.writeHead(503, { 'content-type': 'application/json', 'retry-after': '5' });+ res.end(JSON.stringify({ error: 'agent_card_not_ready' }));+ return;+ }+ const body = JSON.stringify(card, null, 2);+ const etag = `"${createHash('sha256').update(body).digest('hex').slice(0, 32)}"`;+ if (req.headers['if-none-match'] === etag) {+ res.writeHead(304, { etag });+ res.end();+ return;+ }+ res.writeHead(200, {+ 'content-type': 'application/json',+ 'cache-control': `public, max-age=${maxAge}`,+ etag,+ });+ res.end(req.method === 'HEAD' ? undefined : body);+ });++ return new Promise((resolvePromise, rejectPromise) => {+ server.once('error', rejectPromise);+ server.listen(options.port, host, () => {+ server.removeListener('error', rejectPromise);+ const addr = server.address();+ const boundPort = typeof addr === 'object' && addr !== null ? addr.port : options.port;+ resolvePromise({+ url: `http://${host}:${boundPort}${path}`,+ host,+ port: boundPort,+ close: () =>+ new Promise<void>((res2, rej2) => {+ server.close((err) => (err ? rej2(err) : res2()));+ }),+ });+ });+ });+}diff --git a/v3/@claude-flow/plugin-agent-federation/src/bin.ts b/v3/@claude-flow/plugin-agent-federation/src/bin.tsindex 4f5ded967f..1a1f29b93b 100644--- a/v3/@claude-flow/plugin-agent-federation/src/bin.ts+++ b/v3/@claude-flow/plugin-agent-federation/src/bin.ts@@ -5,7 +5,7 @@** Auth/config via .env (loaded from CWD or any parent):* FEDERATION_NODE_NAME - this node's identity (default: hostname)- * FEDERATION_BIND_HOST - bind address (default: 0.0.0.0)+ * FEDERATION_BIND_HOST - bind address (default: 127.0.0.1, ADR-166 Phase 3d)* FEDERATION_BIND_PORT - bind port (default: 8443)* FEDERATION_TRUST_LEVEL - default trust tier (default: untrusted)*/diff --git a/v3/@claude-flow/plugin-agent-federation/src/domain/services/discovery-service.ts b/v3/@claude-flow/plugin-agent-federation/src/domain/services/discovery-service.tsindex 23161a6f7a..4c92bfe7b5 100644--- a/v3/@claude-flow/plugin-agent-federation/src/domain/services/discovery-service.ts+++ b/v3/@claude-flow/plugin-agent-federation/src/domain/services/discovery-service.ts@@ -2,7 +2,7 @@ import { FederationNode, type FederationNodeProps } from '../entities/federationimport { TrustLevel } from '../entities/trust-level.js';import type { WgManifestSection } from '../value-objects/wg-config.js';-export type DiscoveryMechanism = 'static' | 'dns-sd' | 'ipfs-registry';+export type DiscoveryMechanism = 'static' | 'dns-sd' | 'ipfs-registry' | 'a2a-card';export interface FederationManifest {readonly nodeId: string;@@ -138,6 +138,25 @@ export class DiscoveryService {return node;}+ /**+ * Register an externally-discovered peer (e.g. mapped from an A2A Agent+ * Card via `fromAgentCard`). Unlike `addStaticPeer` this takes a fully+ * constructed node — the caller owns validation of the external format —+ * and the node keeps whatever trust level it was constructed with+ * (A2A-card peers arrive UNTRUSTED). Existing peers are refreshed, not+ * replaced, so accumulated trust state survives re-discovery.+ */+ registerExternalPeer(node: FederationNode): FederationNode {+ const existing = this.knownPeers.get(node.nodeId);+ if (existing) {+ existing.markSeen();+ return existing;+ }+ this.knownPeers.set(node.nodeId, node);+ this.deps.onPeerDiscovered?.(node);+ return node;+ }+removePeer(nodeId: string): boolean {return this.knownPeers.delete(nodeId);}diff --git a/v3/@claude-flow/plugin-agent-federation/src/index.ts b/v3/@claude-flow/plugin-agent-federation/src/index.tsindex 88cb0d64a4..df5993e4f9 100644--- a/v3/@claude-flow/plugin-agent-federation/src/index.ts+++ b/v3/@claude-flow/plugin-agent-federation/src/index.ts@@ -114,3 +114,35 @@ export {type PolicyEvaluationResult,type PolicyEngineDeps,} from './application/policy-engine.js';++// A2A (Agent2Agent, Linux Foundation) Agent Card adapter — cards only.+export {+ A2A_PROTOCOL_VERSION,+ A2A_WELL_KNOWN_PATH,+ RUFLO_FEDERATION_BINDING,+ RUFLO_FEDERATION_EXTENSION_URI,+ toAgentCard,+ fromAgentCard,+ validateAgentCard,+ type A2AAgentCard,+ type A2AAgentInterface,+ type A2AAgentSkill,+ type A2AAgentCapabilities,+ type A2AAgentExtension,+ type A2AAgentProvider,+ type ToAgentCardOptions,+ type AgentCardValidation,+} from './a2a/agent-card.js';+export {+ startAgentCardServer,+ isLoopbackHost,+ type AgentCardServerOptions,+ type AgentCardServerHandle,+} from './a2a/well-known.js';+export {+ fetchAgentCard,+ consumeAgentCard,+ resolveAgentCardUrl,+ type FetchAgentCardOptions,+ type FetchAgentCardResult,+} from './a2a/consume.js';diff --git a/v3/@claude-flow/plugin-agent-federation/src/plugin.ts b/v3/@claude-flow/plugin-agent-federation/src/plugin.tsindex fb7f067c3f..a07aa7f507 100644--- a/v3/@claude-flow/plugin-agent-federation/src/plugin.ts+++ b/v3/@claude-flow/plugin-agent-federation/src/plugin.ts@@ -51,6 +51,11 @@ type LoadedTransport = AgentTransport & {import { dispatchInbound, canonicalizeEnvelopeForVerify } from './application/inbound-dispatcher.js';import { createMcpTools } from './mcp-tools.js';import { createCliCommands } from './cli-commands.js';+// A2A (Agent2Agent, Linux Foundation) Agent Card adapter — cards only.+// Opt-in via config.a2aCard; serves /.well-known/agent-card.json on a+// 127.0.0.1-default bind (ADR-166 posture preserved).+import { toAgentCard } from './a2a/agent-card.js';+import { startAgentCardServer, type AgentCardServerHandle } from './a2a/well-known.js';export class AgentFederationPlugin implements ClaudeFlowPlugin {readonly name = '@claude-flow/plugin-agent-federation';@@ -66,6 +71,9 @@ export class AgentFederationPlugin implements ClaudeFlowPlugin {// in-process behavior — preserves backward compat for tests that// don't supply a port).private transport: LoadedTransport | null = null;+ // A2A Agent Card well-known endpoint (opt-in via config.a2aCard). Null+ // when the HTTP surface is off — everything else works without it.+ private agentCardServer: AgentCardServerHandle | null = null;async initialize(context: PluginContext): Promise<void> {this.context = context;@@ -407,10 +415,63 @@ export class AgentFederationPlugin implements ClaudeFlowPlugin {);}+ // A2A Agent Card well-known endpoint (opt-in, graceful). Enabled with+ // config.a2aCard = true + config.a2aCardPort. Serves the local node's+ // manifest as a spec-compliant A2A 1.0 card at+ // /.well-known/agent-card.json. Binds 127.0.0.1 unless config.a2aCardHost+ // is set AND config.a2aCardAllowNonLoopback is true (ADR-166: never+ // loosen binding implicitly). A bind failure logs and degrades — the+ // rest of federation is unaffected.+ const a2aEnabled = config['a2aCard'] === true;+ const a2aPort = config['a2aCardPort'] as number | undefined;+ if (a2aEnabled && typeof a2aPort === 'number') {+ try {+ this.agentCardServer = await startAgentCardServer({+ getCard: () => {+ const manifest = discovery.getLocalManifest() ?? {+ nodeId,+ publicKey: publicKeyHex,+ endpoint,+ capabilities: {+ agentTypes: coordConfig.capabilities,+ maxConcurrentSessions: 10,+ supportedProtocols: ['websocket', 'http'],+ complianceModes: complianceMode === 'none' ? [] : [complianceMode],+ },+ version: this.version,+ signature: '',+ timestamp: new Date().toISOString(),+ };+ return toAgentCard(manifest);+ },+ port: a2aPort,+ host: (config['a2aCardHost'] as string | undefined) ?? '127.0.0.1',+ allowNonLoopback: config['a2aCardAllowNonLoopback'] === true,+ });+ context.logger.info(`A2A agent card served at ${this.agentCardServer.url}`);+ } catch (err) {+ context.logger.warn(+ `A2A agent card endpoint unavailable (${err instanceof Error ? err.message : err}); ` ++ 'federation continues without the A2A discovery surface',+ );+ this.agentCardServer = null;+ }+ }+context.logger.info('Agent Federation plugin initialized');}async shutdown(): Promise<void> {+ if (this.agentCardServer) {+ try {+ await this.agentCardServer.close();+ } catch (err) {+ this.context?.logger.warn(+ `A2A agent card server close error: ${err instanceof Error ? err.message : err}`,+ );+ }+ this.agentCardServer = null;+ }if (this.coordinator) {await this.coordinator.shutdown();this.coordinator = null;diff --git a/v3/package-lock.json b/v3/package-lock.jsonindex 578abe14dd..be30862c32 100644--- a/v3/package-lock.json+++ b/v3/package-lock.json@@ -1692,41 +1692,6 @@"url": "https://opencollective.com/express"}},- "@claude-flow/browser/node_modules/side-channel": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",- "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==",- "license": "MIT",- "dependencies": {- "es-errors": "^1.3.0",- "object-inspect": "^1.13.4",- "side-channel-list": "^1.0.1",- "side-channel-map": "^1.0.1",- "side-channel-weakmap": "^1.0.2"- },- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "@claude-flow/browser/node_modules/side-channel-list": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",- "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",- "license": "MIT",- "dependencies": {- "es-errors": "^1.3.0",- "object-inspect": "^1.13.4"- },- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },"@claude-flow/browser/node_modules/type-fest": {"version": "0.20.2","resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",@@ -1771,27 +1736,6 @@"url": "https://opencollective.com/express"}},- "@claude-flow/browser/node_modules/ws": {- "version": "8.21.0",- "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",- "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",- "license": "MIT",- "engines": {- "node": ">=10.0.0"- },- "peerDependencies": {- "bufferutil": "^4.0.1",- "utf-8-validate": ">=5.0.2"- },- "peerDependenciesMeta": {- "bufferutil": {- "optional": true- },- "utf-8-validate": {- "optional": true- }- }- },"@claude-flow/claims": {"version": "3.0.0-alpha.8","license": "MIT",@@ -1891,7 +1835,7 @@}},"@claude-flow/cli": {- "version": "3.16.1",+ "version": "3.17.0","hasInstallScript": true,"license": "MIT","dependencies": {@@ -1921,9 +1865,9 @@"@claude-flow/memory": "^3.0.0-alpha.21","@claude-flow/plugin-gastown-bridge": "^0.1.3","@claude-flow/security": "^3.0.0-alpha.10",- "@metaharness/darwin": "~0.3.1",- "@metaharness/kernel": "~0.1.0",- "@metaharness/redblue": "~0.1.1",+ "@metaharness/darwin": "~0.8.0",+ "@metaharness/kernel": "~0.1.2",+ "@metaharness/redblue": "~0.1.4","@metaharness/router": "~0.3.2","@ruvector/attention": "^0.1.32","@ruvector/attention-darwin-arm64": "0.1.32",@@ -1938,7 +1882,7 @@"agentdb": "^3.0.0-alpha.17","agentic-flow": "^3.0.0-alpha.1","agenticow": "~0.2.3",- "metaharness": "~0.2.6",+ "metaharness": "~0.2.8","ruvector": "^0.2.27"}},@@ -2239,6 +2183,19 @@"sql.js": "^1.10.3"}},+ "@claude-flow/cli/node_modules/@metaharness/darwin": {+ "version": "0.8.0",+ "resolved": "https://registry.npmjs.org/@metaharness/darwin/-/darwin-0.8.0.tgz",+ "integrity": "sha512-Pgefr/es0Btofh7GxQrOAg/i43ZKcLUfeD9rndOAkpA8s3ZYohSmfLerJLNsGOOKc2eTvmmauljl8QEVmKC2dw==",+ "license": "MIT",+ "optional": true,+ "bin": {+ "metaharness-darwin": "dist/cli.js"+ },+ "engines": {+ "node": ">=20.0.0"+ }+ },"@claude-flow/cli/node_modules/@metaharness/kernel": {"version": "0.1.2","resolved": "https://registry.npmjs.org/@metaharness/kernel/-/kernel-0.1.2.tgz",@@ -3743,13 +3700,15 @@}},"@claude-flow/cli/node_modules/metaharness": {- "version": "0.2.7",- "resolved": "https://registry.npmjs.org/metaharness/-/metaharness-0.2.7.tgz",- "integrity": "sha512-tttql9bVtYkqh6DP6riXJQfpuupqGM9qiBXGixZ0b5FSVV9sNziqoDUnwLH9087O3dmOgK2BoY4SciDtqZcm4g==",+ "version": "0.2.8",+ "resolved": "https://registry.npmjs.org/metaharness/-/metaharness-0.2.8.tgz",+ "integrity": "sha512-TFc8fcJR02e4z3ikRMqxmWSqpzPQgGV8S0vd0N2gYUOmtcAnxOfoSmcNbrgGjFrBZDjfCFoZgfIaBlUY+kE1Dg==","license": "MIT","optional": true,"dependencies": {"@metaharness/darwin": "^0.2.2",+ "@metaharness/redblue": "^0.1.1",+ "@metaharness/weight-eft": "^0.1.0","kolorist": "^1.8.0","prompts": "^2.4.2"},@@ -4081,41 +4040,6 @@"url": "https://opencollective.com/express"}},- "@claude-flow/cli/node_modules/side-channel": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",- "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==",- "license": "MIT",- "dependencies": {- "es-errors": "^1.3.0",- "object-inspect": "^1.13.4",- "side-channel-list": "^1.0.1",- "side-channel-map": "^1.0.1",- "side-channel-weakmap": "^1.0.2"- },- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "@claude-flow/cli/node_modules/side-channel-list": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",- "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",- "license": "MIT",- "dependencies": {- "es-errors": "^1.3.0",- "object-inspect": "^1.13.4"- },- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },"@claude-flow/cli/node_modules/type-is": {"version": "2.0.1","resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",@@ -4221,67 +4145,10 @@"node": ">=20.0.0"}},- "@claude-flow/hooks": {- "version": "3.0.0-alpha.7",- "license": "MIT",- "dependencies": {- "@claude-flow/memory": "^3.0.0-alpha.2",- "@claude-flow/neural": "^3.0.0-alpha.2",- "@claude-flow/shared": "^3.0.0-alpha.1",- "zod": "^3.23.0"- },- "bin": {- "claude-flow-hooks": "dist/cli/guidance-cli.js",- "guidance": "dist/cli/guidance-cli.js",- "hooks-daemon": "bin/hooks-daemon.js",- "statusline": "bin/statusline.js"- },- "devDependencies": {- "@types/better-sqlite3": "^7.6.11",- "@types/node": "^20.10.0",- "typescript": "^5.3.0",- "vitest": "^4.1.0"- },- "engines": {- "node": ">=20.0.0"- },- "optionalDependencies": {- "better-sqlite3": "^11.0.0"- },- "peerDependencies": {- "@claude-flow/shared": "^3.0.0-alpha.1"- }- },- "@claude-flow/integration": {- "version": "3.0.0",- "devDependencies": {- "vitest": "^4.1.0"- },- "optionalDependencies": {- "agent-booster": "^0.2.2"- },- "peerDependencies": {- "agentic-flow": "^2.0.0-alpha"- }- },- "@claude-flow/mcp": {- "version": "3.0.0-alpha.9",- "dependencies": {- "ajv": "^8.12.0",- "cors": "^2.8.5",- "express": "^4.18.2",- "helmet": "^7.1.0",- "ws": "^8.14.2"- },- "devDependencies": {- "@types/cors": "^2.8.17",- "@types/express": "^4.17.21",- "@types/ws": "^8.5.10",- "vitest": "^4.1.0"- }- },- "@claude-flow/memory": {+ "@claude-flow/guidance/node_modules/@claude-flow/memory": {"version": "3.0.0-alpha.21",+ "resolved": "https://registry.npmjs.org/@claude-flow/memory/-/memory-3.0.0-alpha.21.tgz",+ "integrity": "sha512-5H5rJOh7nGuzmFazTvJWZIbeZvf+HJjonM98vWijzbL4kQvBDWj6zwhsxQ3wrwJSrs5ALgQQmhxQ7Mr+gagAFw==","cpu": ["x64","arm64"@@ -4295,16 +4162,26 @@"agentdb": "^3.0.0-alpha.16","sql.js": "^1.10.3"},- "devDependencies": {- "@types/better-sqlite3": "^7.6.11",- "@types/sql.js": "^1.4.9",- "vitest": "^4.1.0"- },"optionalDependencies": {"better-sqlite3": "^12.9.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/api-logs": {+ "@claude-flow/guidance/node_modules/@claude-flow/memory/node_modules/better-sqlite3": {+ "version": "12.11.1",+ "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.11.1.tgz",+ "integrity": "sha512-dq9AtApgg5PGFtBzPFSBl3HZQjHok5gaQCM6zh2Yk0aSmDCs1CbnVI8/HgASQkNKsWFpseIO9beg5xxpYhbIfA==",+ "hasInstallScript": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "bindings": "^1.5.0",+ "prebuild-install": "^7.1.1"+ },+ "engines": {+ "node": "20.x || 22.x || 23.x || 24.x || 25.x || 26.x"+ }+ },+ "@claude-flow/guidance/node_modules/@opentelemetry/api-logs": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.218.0.tgz","integrity": "sha512-fmEWp5kXlGEc3i/lR698Hz41DfGyN4Tbe4g7L1AxSc7fF8Xeh/FQ9Quqpa9dVA413Q1Ad43QOLzU4JoXgbFPWw==",@@ -4317,7 +4194,7 @@"node": ">=8.0.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/context-async-hooks": {+ "@claude-flow/guidance/node_modules/@opentelemetry/context-async-hooks": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.7.1.tgz","integrity": "sha512-OPFBYuXEn1E4ja3Y6eeA7O+ZnLBNcXTV5Cgsn1VaqBZ6hC5FnpZPLBNme1LJY8ZtF4aOujPKFoeWN4ik487KuQ==",@@ -4330,7 +4207,7 @@"@opentelemetry/api": ">=1.0.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/core": {+ "@claude-flow/guidance/node_modules/@opentelemetry/core": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.7.1.tgz","integrity": "sha512-QAqIj32AtK6+pEVNG7EOVxHdE06RP+FM5qpiEJ4RtDcFIqKUZHYhl7/7UY5efhwmwNAg7j8QbJVBLxMerc0+gw==",@@ -4346,7 +4223,7 @@"@opentelemetry/api": ">=1.0.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/exporter-metrics-otlp-http": {+ "@claude-flow/guidance/node_modules/@opentelemetry/exporter-metrics-otlp-http": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.218.0.tgz","integrity": "sha512-bV7d2OuMpZu2+gAaxUAhzfZ0h3WVZk8ETQUEE3DNSntbTaMpuITjtm8I0rNyHFdm7Ax57K6ty7SgFXlBmOLIvQ==",@@ -4366,7 +4243,7 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/resources": {+ "@claude-flow/guidance/node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",@@ -4383,7 +4260,7 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/exporter-prometheus": {+ "@claude-flow/guidance/node_modules/@opentelemetry/exporter-prometheus": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.218.0.tgz","integrity": "sha512-RT5oEyu1kddZJ1vt7/BUo5wV+P7hpNAESsR3dUd3+8deHuX7gWNoCOZn+SfDT+hJHlIJ5h/AxiCLXIrutswDJg==",@@ -4402,7 +4279,7 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/resources": {+ "@claude-flow/guidance/node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",@@ -4419,7 +4296,7 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/exporter-trace-otlp-grpc": {+ "@claude-flow/guidance/node_modules/@opentelemetry/exporter-trace-otlp-grpc": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.218.0.tgz","integrity": "sha512-3fXxVQEj9TNAFaCi79JeFKfeLd0sDtInaR3gaZDVlzNSPHtz8PZuCV34JKWjD4XXzT20IdMe8IpX6mRVNDA4Tw==",@@ -4441,7 +4318,7 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/resources": {+ "@claude-flow/guidance/node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",@@ -4458,7 +4335,7 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/exporter-trace-otlp-http": {+ "@claude-flow/guidance/node_modules/@opentelemetry/exporter-trace-otlp-http": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.218.0.tgz","integrity": "sha512-8dqezsmPhtKitIK/eTipZhYl9EX2/gNQ5zUMhaz3uxEURwfkNf8IPvo6yNfrzbxdtpAOybS/+h7wmIWYqFSpiw==",@@ -4478,7 +4355,7 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/resources": {+ "@claude-flow/guidance/node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",@@ -4495,7 +4372,7 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/exporter-trace-otlp-proto": {+ "@claude-flow/guidance/node_modules/@opentelemetry/exporter-trace-otlp-proto": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.218.0.tgz","integrity": "sha512-r1Msf8SNLRmwh9J6XQ5uh82D7CdDWMNHnPB7LAVHjzut0TkSeKc5KcIvr4SvHvfk/xwN5gxC+VLKQ1k0o8PSPw==",@@ -4515,7 +4392,7 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/resources": {+ "@claude-flow/guidance/node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",@@ -4532,7 +4409,7 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/exporter-zipkin": {+ "@claude-flow/guidance/node_modules/@opentelemetry/exporter-zipkin": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.7.1.tgz","integrity": "sha512-mfsD9bKAxcKrh5+y08TPodvClBO0CznBE3p79YAGnO81WI4LrdsGA65T53e4iTSbCalW4WaUpkbeJcbpyIUHfg==",@@ -4551,7 +4428,7 @@"@opentelemetry/api": "^1.0.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/resources": {+ "@claude-flow/guidance/node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",@@ -4568,7 +4445,7 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/instrumentation": {+ "@claude-flow/guidance/node_modules/@opentelemetry/instrumentation": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.218.0.tgz","integrity": "sha512-mIZil8Es+sYDK5m+DQiwAwF57F14TF2YlEqvIjZ/RQWcxDBwRGsKfdK2Tv65OU9meQKCMzSIFS9mxAcnAb6Bkg==",@@ -4586,7 +4463,7 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/otlp-exporter-base": {+ "@claude-flow/guidance/node_modules/@opentelemetry/otlp-exporter-base": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.218.0.tgz","integrity": "sha512-ZwqpkNL5W7RyGJPDZ9g06DvKp8KFTWPJPN12anpMQYSKpTSU0z3EIZuPq9vPGpS8siFyOqDYDAuCwlNO9FqgbA==",@@ -4603,7 +4480,7 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/otlp-grpc-exporter-base": {+ "@claude-flow/guidance/node_modules/@opentelemetry/otlp-grpc-exporter-base": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.218.0.tgz","integrity": "sha512-H/lCGJ536N98VpYJOaWTQOkv4Dx6TnmStK6Rqfu1W7KkFbPAx04hjdYEMZF/YbnHzPUSIK4kM6OE2GKGBTpV9A==",@@ -4622,7 +4499,7 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/otlp-transformer": {+ "@claude-flow/guidance/node_modules/@opentelemetry/otlp-transformer": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.218.0.tgz","integrity": "sha512-CFaKH87WAzjuJ4awowTTLzUvMfaRfiOFG5+qm5S5ncyalRtN4ecQ+YmuANJSCrVPuvZFEkUgKhBPBndxi3rHsQ==",@@ -4643,7 +4520,7 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/resources": {+ "@claude-flow/guidance/node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",@@ -4660,7 +4537,7 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/propagator-b3": {+ "@claude-flow/guidance/node_modules/@opentelemetry/propagator-b3": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.7.1.tgz","integrity": "sha512-RJid6E2CKyeGfKBzXKF21ejabGMHypFkPAh3qZ+NvI+SGjuIye79t3PmiqcDgtRzdKH6ynXzbfslQ8DfpRUg2A==",@@ -4676,7 +4553,7 @@"@opentelemetry/api": ">=1.0.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/propagator-jaeger": {+ "@claude-flow/guidance/node_modules/@opentelemetry/propagator-jaeger": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.7.1.tgz","integrity": "sha512-KMjVBHzP4N60bOzxja76M1F1hZZ43lGPga5ix+mkv9+kk1nx9SbkxSvJsMbuVUxdPQmsPTqGShmhN8ulrMOg6Q==",@@ -4692,7 +4569,7 @@"@opentelemetry/api": ">=1.0.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/sdk-logs": {+ "@claude-flow/guidance/node_modules/@opentelemetry/sdk-logs": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.218.0.tgz","integrity": "sha512-QvnNdugatFTVCJXH0Mcu7GOOJSylA9j127kIezOE4YwTI4YbowRons2K4WZTv5FMS8T4q9P0NdaRHdkSmeAIag==",@@ -4711,7 +4588,7 @@"@opentelemetry/api": ">=1.4.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources": {+ "@claude-flow/guidance/node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",@@ -4728,7 +4605,7 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/sdk-metrics": {+ "@claude-flow/guidance/node_modules/@opentelemetry/sdk-metrics": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.7.1.tgz","integrity": "sha512-MpDJdkiFDs3Pm1RHO3KByuZbuBdJEXEAkiC0+yJdsZGVCdf1RpHR6n+LHDcS7ffmfrt5kVCzJSCfm4z2C7v0uQ==",@@ -4745,7 +4622,7 @@"@opentelemetry/api": ">=1.9.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/resources": {+ "@claude-flow/guidance/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",@@ -4762,7 +4639,7 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/sdk-node": {+ "@claude-flow/guidance/node_modules/@opentelemetry/sdk-node": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.218.0.tgz","integrity": "sha512-tPMjHrLV5gsfNdYqoRHjeGbCAZBXXD9c1Qo/2ut7VwnUABDNh76xNxrT0SEhkIIJuCN45bbN1vZnYL1gY0IkOg==",@@ -4802,7 +4679,7 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/resources": {+ "@claude-flow/guidance/node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",@@ -4819,7 +4696,7 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/sdk-trace-base": {+ "@claude-flow/guidance/node_modules/@opentelemetry/sdk-trace-base": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.7.1.tgz","integrity": "sha512-NAYIlsF8MPUsKqJMiDQJTMPOmlbawC1Iz/omMLygZ1C9am8fTKYjTaI+OZM+WTY3t3Glo0wnOg/6/pac6RGPPw==",@@ -4837,7 +4714,7 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/resources": {+ "@claude-flow/guidance/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",@@ -4854,7 +4731,7 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@opentelemetry/sdk-trace-node": {+ "@claude-flow/guidance/node_modules/@opentelemetry/sdk-trace-node": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.7.1.tgz","integrity": "sha512-pCpQxU68lV+I9s9svqMyVu5iHdDDUnqUpSxqwyCU8A9ejEsSnMPCbearwsUO4yk08ZJzAIUCFuReMdVQvHrdvg==",@@ -4872,27 +4749,27 @@"@opentelemetry/api": ">=1.0.0 <1.10.0"}},- "@claude-flow/memory/node_modules/@ruvector/graph-node": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@ruvector/graph-node/-/graph-node-2.0.2.tgz",- "integrity": "sha512-uFPPTqx1hHsF9p6kAcEnEAEkb8zLf9lw+euPxr1voiRCBHt8L3sUXkeNvz50eHtJjxUW9dm4loIbsYuxao+M0g==",+ "@claude-flow/guidance/node_modules/@ruvector/graph-node": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node/-/graph-node-2.0.4.tgz",+ "integrity": "sha512-pPUbQBF+Otnpd5YNgiQl3eaRsivi6NougS0hSmYbCd5i9gMJrr5u7oXL8pHwL/D9YbNKEkeIclhN6zu1rg5aUA==","license": "MIT","optional": true,"engines": {"node": ">=18.0.0"},"optionalDependencies": {- "@ruvector/graph-node-darwin-arm64": "2.0.2",- "@ruvector/graph-node-darwin-x64": "2.0.2",- "@ruvector/graph-node-linux-arm64-gnu": "2.0.2",- "@ruvector/graph-node-linux-x64-gnu": "2.0.2",- "@ruvector/graph-node-win32-x64-msvc": "2.0.2"+ "@ruvector/graph-node-darwin-arm64": "2.0.4",+ "@ruvector/graph-node-darwin-x64": "2.0.4",+ "@ruvector/graph-node-linux-arm64-gnu": "2.0.4",+ "@ruvector/graph-node-linux-x64-gnu": "2.0.4",+ "@ruvector/graph-node-win32-x64-msvc": "2.0.4"}},- "@claude-flow/memory/node_modules/@ruvector/graph-node-darwin-arm64": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@ruvector/graph-node-darwin-arm64/-/graph-node-darwin-arm64-2.0.2.tgz",- "integrity": "sha512-r1g7wCZIFtR98dBl33fwDr/f+aYsKA7gElhKStKkwpLpJMiY1jPaabvUOhvulRDALMGH3qgvpVc9/ChxLKT+WA==",+ "@claude-flow/guidance/node_modules/@ruvector/graph-node-darwin-arm64": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-darwin-arm64/-/graph-node-darwin-arm64-2.0.4.tgz",+ "integrity": "sha512-9YBCI4JFDNCGSDzSApZng3yjdAb7u3Rq2Fn4yyuGbHy26fEie9TqfFDNQ7d+uK6mPcxDVJDCPnIOKcHnFsyMBQ==","cpu": ["arm64"],@@ -4905,10 +4782,10 @@"node": ">=18.0.0"}},- "@claude-flow/memory/node_modules/@ruvector/graph-node-darwin-x64": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@ruvector/graph-node-darwin-x64/-/graph-node-darwin-x64-2.0.2.tgz",- "integrity": "sha512-tJB6dVDItrCaYLF55jP6DjmCzo8BpmucA0JcV2X23x2Tb6hJ5lS5pm3ujhvPy3A/bzgretYEtfHeAQXf1tOy5A==",+ "@claude-flow/guidance/node_modules/@ruvector/graph-node-darwin-x64": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-darwin-x64/-/graph-node-darwin-x64-2.0.4.tgz",+ "integrity": "sha512-WW07+HmIdbv3jij2tqRWbkJt5m6uR76PXDosIwOkwBjyLbV3Ck5kSW5DONctA6cOQuTEeCcOo9sIKqr3J/f2pQ==","cpu": ["x64"],@@ -4921,10 +4798,10 @@"node": ">=18.0.0"}},- "@claude-flow/memory/node_modules/@ruvector/graph-node-linux-arm64-gnu": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@ruvector/graph-node-linux-arm64-gnu/-/graph-node-linux-arm64-gnu-2.0.2.tgz",- "integrity": "sha512-GvzFtb+JjXjelNhZQl45HQK5zQqW0GrmpvUCIIWEbDtVLgfCbw37UkLvgc1Kf9qxJHFwl5DTWfKLgbyyKdSX9g==",+ "@claude-flow/guidance/node_modules/@ruvector/graph-node-linux-arm64-gnu": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-linux-arm64-gnu/-/graph-node-linux-arm64-gnu-2.0.4.tgz",+ "integrity": "sha512-Z5OatE8CzaVCq5vgGOmowVSKOLxYvO1Dn0rvFL4d63fEvVONDpsVAMkR7rxRGHrgzMZMfpZ9EjZ0vu0KR08tRQ==","cpu": ["arm64"],@@ -4937,10 +4814,10 @@"node": ">=18.0.0"}},- "@claude-flow/memory/node_modules/@ruvector/graph-node-linux-x64-gnu": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@ruvector/graph-node-linux-x64-gnu/-/graph-node-linux-x64-gnu-2.0.2.tgz",- "integrity": "sha512-yaY/jj3PZ5lSfHhTcc2g5hTDg+pzG4Vo5LfiL1ecU+r+jl2zbLsMecb8ldDFibVO3DFuxTjH/I1+bDFo2fC/Qg==",+ "@claude-flow/guidance/node_modules/@ruvector/graph-node-linux-x64-gnu": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-linux-x64-gnu/-/graph-node-linux-x64-gnu-2.0.4.tgz",+ "integrity": "sha512-RAdkLcB1gjEQcIsCxmSGHSOBbnUbCn7If8H9YrOqy5xxvmTVE25tkM49fpRRK3oINWJ9oQDBsAZr7GXKQZoLig==","cpu": ["x64"],@@ -4953,10 +4830,10 @@"node": ">=18.0.0"}},- "@claude-flow/memory/node_modules/@ruvector/graph-node-win32-x64-msvc": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@ruvector/graph-node-win32-x64-msvc/-/graph-node-win32-x64-msvc-2.0.2.tgz",- "integrity": "sha512-f38C7oi4mkVl5a5q61rzITvWXIQGykqCWIKgEhGcEt/bDOX2wYCr1F5/AM+Ixz9pYKFvNNrzjozsafeevHWn0Q==",+ "@claude-flow/guidance/node_modules/@ruvector/graph-node-win32-x64-msvc": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-win32-x64-msvc/-/graph-node-win32-x64-msvc-2.0.4.tgz",+ "integrity": "sha512-+z2uyfiPmbELGjwvo5RfDSjHTJWZWQQDxDYLAnnfqV9a0oM1VklRe34t97pvGg7tdCXgEpnR6yWk3OZRemQUEQ==","cpu": ["x64"],@@ -4969,7 +4846,7 @@"node": ">=18.0.0"}},- "@claude-flow/memory/node_modules/@ruvector/ruvllm": {+ "@claude-flow/guidance/node_modules/@ruvector/ruvllm": {"version": "2.5.6","resolved": "https://registry.npmjs.org/@ruvector/ruvllm/-/ruvllm-2.5.6.tgz","integrity": "sha512-B29ej1aJCNN7UCiIj0wtDMLCe01UWA7KMPTSAriGeey13aNYnstsTD+lz3tkglLSMSdwf9ozQ+N4lVQXvc96+A==",@@ -4994,7 +4871,7 @@"@ruvector/ruvllm-win32-x64-msvc": "2.0.1"}},- "@claude-flow/memory/node_modules/@ruvector/ruvllm-darwin-arm64": {+ "@claude-flow/guidance/node_modules/@ruvector/ruvllm-darwin-arm64": {"version": "2.0.1","resolved": "https://registry.npmjs.org/@ruvector/ruvllm-darwin-arm64/-/ruvllm-darwin-arm64-2.0.1.tgz","integrity": "sha512-giZb+TbErKLgURLC3CSmJKJl0bnJn+jFZk488ppyzrR6YGft6kO329Twnd+TiJNDxVOMgZefwVdsbF9jrUIgAQ==",@@ -5010,7 +4887,7 @@"node": ">= 18"}},- "@claude-flow/memory/node_modules/@ruvector/ruvllm-darwin-x64": {+ "@claude-flow/guidance/node_modules/@ruvector/ruvllm-darwin-x64": {"version": "2.0.1","resolved": "https://registry.npmjs.org/@ruvector/ruvllm-darwin-x64/-/ruvllm-darwin-x64-2.0.1.tgz","integrity": "sha512-DpVKFBXFxVPBiCGBw1AeiwsY1YVWfaCh+Eq0+pVLqD4kwwXKhRIWLnTQcuZVE5Gnt1Ku8MxhH2Zs++vKiuq3mA==",@@ -5026,7 +4903,7 @@"node": ">= 18"}},- "@claude-flow/memory/node_modules/@ruvector/ruvllm-linux-arm64-gnu": {+ "@claude-flow/guidance/node_modules/@ruvector/ruvllm-linux-arm64-gnu": {"version": "2.0.1","resolved": "https://registry.npmjs.org/@ruvector/ruvllm-linux-arm64-gnu/-/ruvllm-linux-arm64-gnu-2.0.1.tgz","integrity": "sha512-+u6Fe/Dsy4Y11m9IUmuoUeFtoUWc1ZVXxGB4JYomNDll63D03a0cpeKKaslgwOfFlfXlrFcs/eDrsYr07tQP5g==",@@ -5042,7 +4919,7 @@"node": ">= 18"}},- "@claude-flow/memory/node_modules/@ruvector/ruvllm-linux-x64-gnu": {+ "@claude-flow/guidance/node_modules/@ruvector/ruvllm-linux-x64-gnu": {"version": "2.0.1","resolved": "https://registry.npmjs.org/@ruvector/ruvllm-linux-x64-gnu/-/ruvllm-linux-x64-gnu-2.0.1.tgz","integrity": "sha512-GH9u/SPUZm9KXjSoQZx5PRtJui0hO/OK+OmRHLZc8+IYrlgona6UQAw6uKHJ3cSEZp9f+XBRYgIrLmsEJW3HXA==",@@ -5058,7 +4935,7 @@"node": ">= 18"}},- "@claude-flow/memory/node_modules/@ruvector/ruvllm-win32-x64-msvc": {+ "@claude-flow/guidance/node_modules/@ruvector/ruvllm-win32-x64-msvc": {"version": "2.0.1","resolved": "https://registry.npmjs.org/@ruvector/ruvllm-win32-x64-msvc/-/ruvllm-win32-x64-msvc-2.0.1.tgz","integrity": "sha512-sRGNOMAcyC5p/nITnR0HLFUEObZ9Mh/T1erNiqhKrNUqIPZM1qAYBgN3xmZp02isdiTilRpxQihz3j4EzGPXIw==",@@ -5074,7 +4951,7 @@"node": ">= 18"}},- "@claude-flow/memory/node_modules/@ruvector/ruvllm/node_modules/chalk": {+ "@claude-flow/guidance/node_modules/@ruvector/ruvllm/node_modules/chalk": {"version": "4.1.2","resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz","integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",@@ -5091,7 +4968,7 @@"url": "https://github.com/chalk/chalk?sponsor=1"}},- "@claude-flow/memory/node_modules/agentdb": {+ "@claude-flow/guidance/node_modules/agentdb": {"version": "3.0.0-alpha.17","resolved": "https://registry.npmjs.org/agentdb/-/agentdb-3.0.0-alpha.17.tgz","integrity": "sha512-LK8drZFQteNkff+ji52vCmIXyE3A3ipzabx+ubBcX0CRgF96GU8m36sWyOfqL7pWRfnYDgkEEEgZmagiNCaz/A==",@@ -5137,34 +5014,7 @@"ruvector-graph-transformer-wasm": "^2.0.4"}},- "@claude-flow/memory/node_modules/agentdb/node_modules/better-sqlite3": {- "version": "11.10.0",- "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-11.10.0.tgz",- "integrity": "sha512-EwhOpyXiOEL/lKzHz9AW1msWFNzGc/z+LzeB3/jnFJpxu+th2yqvzsSWas1v9jgs9+xiXJcD5A8CJxAG2TaghQ==",- "hasInstallScript": true,- "license": "MIT",- "optional": true,- "dependencies": {- "bindings": "^1.5.0",- "prebuild-install": "^7.1.1"- }- },- "@claude-flow/memory/node_modules/better-sqlite3": {- "version": "12.11.1",- "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.11.1.tgz",- "integrity": "sha512-dq9AtApgg5PGFtBzPFSBl3HZQjHok5gaQCM6zh2Yk0aSmDCs1CbnVI8/HgASQkNKsWFpseIO9beg5xxpYhbIfA==",- "hasInstallScript": true,- "license": "MIT",- "optional": true,- "dependencies": {- "bindings": "^1.5.0",- "prebuild-install": "^7.1.1"- },- "engines": {- "node": "20.x || 22.x || 23.x || 24.x || 25.x || 26.x"- }- },- "@claude-flow/memory/node_modules/bl": {+ "@claude-flow/guidance/node_modules/bl": {"version": "4.1.0","resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz","integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",@@ -5176,7 +5026,7 @@"readable-stream": "^3.4.0"}},- "@claude-flow/memory/node_modules/buffer": {+ "@claude-flow/guidance/node_modules/buffer": {"version": "5.7.1","resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz","integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",@@ -5201,14 +5051,14 @@"ieee754": "^1.1.13"}},- "@claude-flow/memory/node_modules/cjs-module-lexer": {+ "@claude-flow/guidance/node_modules/cjs-module-lexer": {"version": "2.2.0","resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz","integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==","license": "MIT","optional": true},- "@claude-flow/memory/node_modules/cli-cursor": {+ "@claude-flow/guidance/node_modules/cli-cursor": {"version": "3.1.0","resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz","integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",@@ -5221,23 +5071,22 @@"node": ">=8"}},- "@claude-flow/memory/node_modules/import-in-the-middle": {- "version": "3.2.0",- "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.2.0.tgz",- "integrity": "sha512-vR2B6HKIhaBjcZr2bLpFiJ1VbzOlRQ7aby4/gw5WPIzToLjqpfWw3VJ4sk1uDchoOODEirvO2jyrSPtUSL5CrQ==",+ "@claude-flow/guidance/node_modules/import-in-the-middle": {+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.3.0.tgz",+ "integrity": "sha512-v4+k+PLt4z6g2ydEcXhfinTJxfgKJDWOW0v0GZNA5n2qToHFObpH4nGLhJdwnXnX4T14oREx/M62dS9GkpmSbQ==","license": "Apache-2.0","optional": true,"dependencies": {- "acorn": "^8.15.0",- "acorn-import-attributes": "^1.9.5","cjs-module-lexer": "^2.2.0",+ "es-module-lexer": "^2.2.0","module-details-from-path": "^1.0.4"},"engines": {"node": ">=18"}},- "@claude-flow/memory/node_modules/is-interactive": {+ "@claude-flow/guidance/node_modules/is-interactive": {"version": "1.0.0","resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz","integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",@@ -5247,7 +5096,7 @@"node": ">=8"}},- "@claude-flow/memory/node_modules/is-unicode-supported": {+ "@claude-flow/guidance/node_modules/is-unicode-supported": {"version": "0.1.0","resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz","integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",@@ -5260,7 +5109,7 @@"url": "https://github.com/sponsors/sindresorhus"}},- "@claude-flow/memory/node_modules/log-symbols": {+ "@claude-flow/guidance/node_modules/log-symbols": {"version": "4.1.0","resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz","integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",@@ -5277,7 +5126,7 @@"url": "https://github.com/sponsors/sindresorhus"}},- "@claude-flow/memory/node_modules/log-symbols/node_modules/chalk": {+ "@claude-flow/guidance/node_modules/log-symbols/node_modules/chalk": {"version": "4.1.2","resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz","integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",@@ -5294,7 +5143,7 @@"url": "https://github.com/chalk/chalk?sponsor=1"}},- "@claude-flow/memory/node_modules/mimic-fn": {+ "@claude-flow/guidance/node_modules/mimic-fn": {"version": "2.1.0","resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz","integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",@@ -5304,7 +5153,7 @@"node": ">=6"}},- "@claude-flow/memory/node_modules/onetime": {+ "@claude-flow/guidance/node_modules/onetime": {"version": "5.1.2","resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz","integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",@@ -5320,7 +5169,7 @@"url": "https://github.com/sponsors/sindresorhus"}},- "@claude-flow/memory/node_modules/ora": {+ "@claude-flow/guidance/node_modules/ora": {"version": "5.4.1","resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz","integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==",@@ -5344,7 +5193,7 @@"url": "https://github.com/sponsors/sindresorhus"}},- "@claude-flow/memory/node_modules/ora/node_modules/chalk": {+ "@claude-flow/guidance/node_modules/ora/node_modules/chalk": {"version": "4.1.2","resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz","integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",@@ -5361,7 +5210,7 @@"url": "https://github.com/chalk/chalk?sponsor=1"}},- "@claude-flow/memory/node_modules/require-in-the-middle": {+ "@claude-flow/guidance/node_modules/require-in-the-middle": {"version": "8.0.1","resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz","integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",@@ -5375,7 +5224,7 @@"node": ">=9.3.0 || >=8.10.0 <9.0.0"}},- "@claude-flow/memory/node_modules/restore-cursor": {+ "@claude-flow/guidance/node_modules/restore-cursor": {"version": "3.1.0","resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz","integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",@@ -5389,214 +5238,77 @@"node": ">=8"}},- "@claude-flow/neural": {- "version": "3.0.0-alpha.9",+ "@claude-flow/hooks": {+ "version": "3.0.0-alpha.7","license": "MIT","dependencies": {- "@claude-flow/memory": "^3.0.0-alpha.16",- "@ruvector/sona": "0.1.5"+ "@claude-flow/memory": "^3.0.0-alpha.2",+ "@claude-flow/neural": "^3.0.0-alpha.2",+ "@claude-flow/shared": "^3.0.0-alpha.1",+ "zod": "^3.23.0"+ },+ "bin": {+ "claude-flow-hooks": "dist/cli/guidance-cli.js",+ "guidance": "dist/cli/guidance-cli.js",+ "hooks-daemon": "bin/hooks-daemon.js",+ "statusline": "bin/statusline.js"+ },+ "devDependencies": {+ "@types/better-sqlite3": "^7.6.11",+ "@types/node": "^20.10.0",+ "typescript": "^5.3.0",+ "vitest": "^4.1.0"},- "optionalDependencies": {- "agentdb": "^2.0.0 || ^3.0.0-alpha.1"- }- },- "@claude-flow/neural/node_modules/@ruvector/graph-node": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@ruvector/graph-node/-/graph-node-2.0.2.tgz",- "integrity": "sha512-uFPPTqx1hHsF9p6kAcEnEAEkb8zLf9lw+euPxr1voiRCBHt8L3sUXkeNvz50eHtJjxUW9dm4loIbsYuxao+M0g==",- "license": "MIT",- "optional": true,"engines": {- "node": ">=18.0.0"+ "node": ">=20.0.0"},"optionalDependencies": {- "@ruvector/graph-node-darwin-arm64": "2.0.2",- "@ruvector/graph-node-darwin-x64": "2.0.2",- "@ruvector/graph-node-linux-arm64-gnu": "2.0.2",- "@ruvector/graph-node-linux-x64-gnu": "2.0.2",- "@ruvector/graph-node-win32-x64-msvc": "2.0.2"- }- },- "@claude-flow/neural/node_modules/@ruvector/graph-node-darwin-arm64": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@ruvector/graph-node-darwin-arm64/-/graph-node-darwin-arm64-2.0.2.tgz",- "integrity": "sha512-r1g7wCZIFtR98dBl33fwDr/f+aYsKA7gElhKStKkwpLpJMiY1jPaabvUOhvulRDALMGH3qgvpVc9/ChxLKT+WA==",- "cpu": [- "arm64"- ],- "license": "MIT",- "optional": true,- "os": [- "darwin"- ],- "engines": {- "node": ">=18.0.0"- }- },- "@claude-flow/neural/node_modules/@ruvector/graph-node-darwin-x64": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@ruvector/graph-node-darwin-x64/-/graph-node-darwin-x64-2.0.2.tgz",- "integrity": "sha512-tJB6dVDItrCaYLF55jP6DjmCzo8BpmucA0JcV2X23x2Tb6hJ5lS5pm3ujhvPy3A/bzgretYEtfHeAQXf1tOy5A==",- "cpu": [- "x64"- ],- "license": "MIT",- "optional": true,- "os": [- "darwin"- ],- "engines": {- "node": ">=18.0.0"+ "better-sqlite3": "^11.0.0"+ },+ "peerDependencies": {+ "@claude-flow/shared": "^3.0.0-alpha.1"}},- "@claude-flow/neural/node_modules/@ruvector/graph-node-linux-arm64-gnu": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@ruvector/graph-node-linux-arm64-gnu/-/graph-node-linux-arm64-gnu-2.0.2.tgz",- "integrity": "sha512-GvzFtb+JjXjelNhZQl45HQK5zQqW0GrmpvUCIIWEbDtVLgfCbw37UkLvgc1Kf9qxJHFwl5DTWfKLgbyyKdSX9g==",+ "@claude-flow/hooks/node_modules/@claude-flow/memory": {+ "version": "3.0.0-alpha.21",+ "resolved": "https://registry.npmjs.org/@claude-flow/memory/-/memory-3.0.0-alpha.21.tgz",+ "integrity": "sha512-5H5rJOh7nGuzmFazTvJWZIbeZvf+HJjonM98vWijzbL4kQvBDWj6zwhsxQ3wrwJSrs5ALgQQmhxQ7Mr+gagAFw==","cpu": [+ "x64","arm64"],- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=18.0.0"- }- },- "@claude-flow/neural/node_modules/@ruvector/graph-node-linux-x64-gnu": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@ruvector/graph-node-linux-x64-gnu/-/graph-node-linux-x64-gnu-2.0.2.tgz",- "integrity": "sha512-yaY/jj3PZ5lSfHhTcc2g5hTDg+pzG4Vo5LfiL1ecU+r+jl2zbLsMecb8ldDFibVO3DFuxTjH/I1+bDFo2fC/Qg==",- "cpu": [- "x64"- ],- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=18.0.0"- }- },- "@claude-flow/neural/node_modules/@ruvector/graph-node-win32-x64-msvc": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/@ruvector/graph-node-win32-x64-msvc/-/graph-node-win32-x64-msvc-2.0.2.tgz",- "integrity": "sha512-f38C7oi4mkVl5a5q61rzITvWXIQGykqCWIKgEhGcEt/bDOX2wYCr1F5/AM+Ixz9pYKFvNNrzjozsafeevHWn0Q==",- "cpu": [- "x64"- ],- "license": "MIT",- "optional": true,"os": [+ "darwin",+ "linux","win32"],- "engines": {- "node": ">=18.0.0"- }- },- "@claude-flow/neural/node_modules/agentdb": {- "version": "3.0.0-alpha.10",- "resolved": "https://registry.npmjs.org/agentdb/-/agentdb-3.0.0-alpha.10.tgz",- "integrity": "sha512-Sk3yRRR44obOHRHKagD9svC5dYksVTMDB96+PeRTWcD9gPRPLhvGhVati8eS8cHW+RxPjfSzuQ7syuzlpY3BvQ==",- "hasInstallScript": true,- "license": "MIT",- "optional": true,"dependencies": {- "@modelcontextprotocol/sdk": "^1.20.1",- "@ruvector/graph-transformer": "^2.0.4",- "ajv": "^8.17.1",- "ruvector": "^0.1.99",- "sql.js": "^1.13.0",- "zod": "^3.25.76"- },- "bin": {- "agentdb": "dist/src/cli/agentdb-cli.js"- },- "engines": {- "node": ">=18.0.0"+ "agentdb": "^3.0.0-alpha.16",+ "sql.js": "^1.10.3"},"optionalDependencies": {- "@ruvector/attention": "^0.1.31",- "@ruvector/gnn": "^0.1.25",- "@ruvector/graph-node": "^2.0.2",- "@ruvector/router": "^0.1.28",- "@ruvector/sona": "^0.1.5",- "chalk": "^5.3.0",- "cli-table3": "^0.6.0",- "commander": "^12.1.0",- "dotenv": "^16.4.7",- "hnswlib-node": "^3.0.0",- "inquirer": "^9.3.8",- "marked-terminal": "^6.0.0",- "ora": "^7.0.0",- "ruvector-attention-wasm": "^0.1.0",- "ruvector-graph-transformer-wasm": "^2.0.4",- "sqlite": "^5.1.1"- },- "peerDependencies": {- "@xenova/transformers": "^2.17.2",- "better-sqlite3": "^11.8.1",- "sqlite3": "^5.1.7"- },- "peerDependenciesMeta": {- "@xenova/transformers": {- "optional": true- },- "better-sqlite3": {- "optional": true- },- "sqlite3": {- "optional": true- }- }- },- "@claude-flow/performance": {- "version": "3.0.0-alpha.6",- "dependencies": {- "@ruvector/attention": "latest",- "@ruvector/sona": "latest"- },- "devDependencies": {- "vitest": "^4.1.0"+ "better-sqlite3": "^12.9.0"}},- "@claude-flow/plugin-agent-federation": {- "version": "1.0.0-alpha.16",+ "@claude-flow/hooks/node_modules/@claude-flow/memory/node_modules/better-sqlite3": {+ "version": "12.11.1",+ "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.11.1.tgz",+ "integrity": "sha512-dq9AtApgg5PGFtBzPFSBl3HZQjHok5gaQCM6zh2Yk0aSmDCs1CbnVI8/HgASQkNKsWFpseIO9beg5xxpYhbIfA==",+ "hasInstallScript": true,"license": "MIT",+ "optional": true,"dependencies": {- "@noble/ed25519": "^2.0.0"- },- "bin": {- "ruflo-federation": "dist/bin.js"- },- "devDependencies": {- "@claude-flow/security": "3.0.0-alpha.10",- "@claude-flow/shared": "3.0.0-alpha.8",- "agentic-flow": "2.0.12-fix.8",- "typescript": "^5.4.0",- "vitest": "^4.1.0"- },- "peerDependencies": {- "agentic-flow": ">=2.0.12-fix.8 <2.0.13",- "midstreamer": ">=0.3.1"+ "bindings": "^1.5.0",+ "prebuild-install": "^7.1.1"},- "peerDependenciesMeta": {- "agentic-flow": {- "optional": true- },- "midstreamer": {- "optional": true- }+ "engines": {+ "node": "20.x || 22.x || 23.x || 24.x || 25.x || 26.x"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/api-logs": {+ "@claude-flow/hooks/node_modules/@opentelemetry/api-logs": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.218.0.tgz","integrity": "sha512-fmEWp5kXlGEc3i/lR698Hz41DfGyN4Tbe4g7L1AxSc7fF8Xeh/FQ9Quqpa9dVA413Q1Ad43QOLzU4JoXgbFPWw==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5606,11 +5318,10 @@"node": ">=8.0.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/context-async-hooks": {+ "@claude-flow/hooks/node_modules/@opentelemetry/context-async-hooks": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.7.1.tgz","integrity": "sha512-OPFBYuXEn1E4ja3Y6eeA7O+ZnLBNcXTV5Cgsn1VaqBZ6hC5FnpZPLBNme1LJY8ZtF4aOujPKFoeWN4ik487KuQ==",- "dev": true,"license": "Apache-2.0","optional": true,"engines": {@@ -5620,11 +5331,10 @@"@opentelemetry/api": ">=1.0.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/core": {+ "@claude-flow/hooks/node_modules/@opentelemetry/core": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.7.1.tgz","integrity": "sha512-QAqIj32AtK6+pEVNG7EOVxHdE06RP+FM5qpiEJ4RtDcFIqKUZHYhl7/7UY5efhwmwNAg7j8QbJVBLxMerc0+gw==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5637,11 +5347,10 @@"@opentelemetry/api": ">=1.0.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-metrics-otlp-http": {+ "@claude-flow/hooks/node_modules/@opentelemetry/exporter-metrics-otlp-http": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.218.0.tgz","integrity": "sha512-bV7d2OuMpZu2+gAaxUAhzfZ0h3WVZk8ETQUEE3DNSntbTaMpuITjtm8I0rNyHFdm7Ax57K6ty7SgFXlBmOLIvQ==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5658,11 +5367,10 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/resources": {+ "@claude-flow/hooks/node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5676,11 +5384,10 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-prometheus": {+ "@claude-flow/hooks/node_modules/@opentelemetry/exporter-prometheus": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.218.0.tgz","integrity": "sha512-RT5oEyu1kddZJ1vt7/BUo5wV+P7hpNAESsR3dUd3+8deHuX7gWNoCOZn+SfDT+hJHlIJ5h/AxiCLXIrutswDJg==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5696,11 +5403,10 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/resources": {+ "@claude-flow/hooks/node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5714,11 +5420,10 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-trace-otlp-grpc": {+ "@claude-flow/hooks/node_modules/@opentelemetry/exporter-trace-otlp-grpc": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.218.0.tgz","integrity": "sha512-3fXxVQEj9TNAFaCi79JeFKfeLd0sDtInaR3gaZDVlzNSPHtz8PZuCV34JKWjD4XXzT20IdMe8IpX6mRVNDA4Tw==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5737,11 +5442,10 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/resources": {+ "@claude-flow/hooks/node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5755,11 +5459,10 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-trace-otlp-http": {+ "@claude-flow/hooks/node_modules/@opentelemetry/exporter-trace-otlp-http": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.218.0.tgz","integrity": "sha512-8dqezsmPhtKitIK/eTipZhYl9EX2/gNQ5zUMhaz3uxEURwfkNf8IPvo6yNfrzbxdtpAOybS/+h7wmIWYqFSpiw==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5776,11 +5479,10 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/resources": {+ "@claude-flow/hooks/node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5794,11 +5496,10 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-trace-otlp-proto": {+ "@claude-flow/hooks/node_modules/@opentelemetry/exporter-trace-otlp-proto": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.218.0.tgz","integrity": "sha512-r1Msf8SNLRmwh9J6XQ5uh82D7CdDWMNHnPB7LAVHjzut0TkSeKc5KcIvr4SvHvfk/xwN5gxC+VLKQ1k0o8PSPw==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5815,11 +5516,10 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/resources": {+ "@claude-flow/hooks/node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5833,11 +5533,10 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-zipkin": {+ "@claude-flow/hooks/node_modules/@opentelemetry/exporter-zipkin": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.7.1.tgz","integrity": "sha512-mfsD9bKAxcKrh5+y08TPodvClBO0CznBE3p79YAGnO81WI4LrdsGA65T53e4iTSbCalW4WaUpkbeJcbpyIUHfg==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5853,11 +5552,10 @@"@opentelemetry/api": "^1.0.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/resources": {+ "@claude-flow/hooks/node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5871,11 +5569,10 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/instrumentation": {+ "@claude-flow/hooks/node_modules/@opentelemetry/instrumentation": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.218.0.tgz","integrity": "sha512-mIZil8Es+sYDK5m+DQiwAwF57F14TF2YlEqvIjZ/RQWcxDBwRGsKfdK2Tv65OU9meQKCMzSIFS9mxAcnAb6Bkg==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5890,11 +5587,10 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/otlp-exporter-base": {+ "@claude-flow/hooks/node_modules/@opentelemetry/otlp-exporter-base": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.218.0.tgz","integrity": "sha512-ZwqpkNL5W7RyGJPDZ9g06DvKp8KFTWPJPN12anpMQYSKpTSU0z3EIZuPq9vPGpS8siFyOqDYDAuCwlNO9FqgbA==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5908,11 +5604,10 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/otlp-grpc-exporter-base": {+ "@claude-flow/hooks/node_modules/@opentelemetry/otlp-grpc-exporter-base": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.218.0.tgz","integrity": "sha512-H/lCGJ536N98VpYJOaWTQOkv4Dx6TnmStK6Rqfu1W7KkFbPAx04hjdYEMZF/YbnHzPUSIK4kM6OE2GKGBTpV9A==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5928,11 +5623,10 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/otlp-transformer": {+ "@claude-flow/hooks/node_modules/@opentelemetry/otlp-transformer": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.218.0.tgz","integrity": "sha512-CFaKH87WAzjuJ4awowTTLzUvMfaRfiOFG5+qm5S5ncyalRtN4ecQ+YmuANJSCrVPuvZFEkUgKhBPBndxi3rHsQ==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5950,11 +5644,10 @@"@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/resources": {+ "@claude-flow/hooks/node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5968,11 +5661,10 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/propagator-b3": {+ "@claude-flow/hooks/node_modules/@opentelemetry/propagator-b3": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.7.1.tgz","integrity": "sha512-RJid6E2CKyeGfKBzXKF21ejabGMHypFkPAh3qZ+NvI+SGjuIye79t3PmiqcDgtRzdKH6ynXzbfslQ8DfpRUg2A==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -5985,11 +5677,10 @@"@opentelemetry/api": ">=1.0.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/propagator-jaeger": {+ "@claude-flow/hooks/node_modules/@opentelemetry/propagator-jaeger": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.7.1.tgz","integrity": "sha512-KMjVBHzP4N60bOzxja76M1F1hZZ43lGPga5ix+mkv9+kk1nx9SbkxSvJsMbuVUxdPQmsPTqGShmhN8ulrMOg6Q==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -6002,11 +5693,10 @@"@opentelemetry/api": ">=1.0.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-logs": {+ "@claude-flow/hooks/node_modules/@opentelemetry/sdk-logs": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.218.0.tgz","integrity": "sha512-QvnNdugatFTVCJXH0Mcu7GOOJSylA9j127kIezOE4YwTI4YbowRons2K4WZTv5FMS8T4q9P0NdaRHdkSmeAIag==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -6022,11 +5712,10 @@"@opentelemetry/api": ">=1.4.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources": {+ "@claude-flow/hooks/node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -6040,11 +5729,10 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-metrics": {+ "@claude-flow/hooks/node_modules/@opentelemetry/sdk-metrics": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.7.1.tgz","integrity": "sha512-MpDJdkiFDs3Pm1RHO3KByuZbuBdJEXEAkiC0+yJdsZGVCdf1RpHR6n+LHDcS7ffmfrt5kVCzJSCfm4z2C7v0uQ==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -6058,11 +5746,10 @@"@opentelemetry/api": ">=1.9.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/resources": {+ "@claude-flow/hooks/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -6076,11 +5763,10 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-node": {+ "@claude-flow/hooks/node_modules/@opentelemetry/sdk-node": {"version": "0.218.0","resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.218.0.tgz","integrity": "sha512-tPMjHrLV5gsfNdYqoRHjeGbCAZBXXD9c1Qo/2ut7VwnUABDNh76xNxrT0SEhkIIJuCN45bbN1vZnYL1gY0IkOg==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -6117,11 +5803,10 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/resources": {+ "@claude-flow/hooks/node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -6135,11 +5820,10 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-trace-base": {+ "@claude-flow/hooks/node_modules/@opentelemetry/sdk-trace-base": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.7.1.tgz","integrity": "sha512-NAYIlsF8MPUsKqJMiDQJTMPOmlbawC1Iz/omMLygZ1C9am8fTKYjTaI+OZM+WTY3t3Glo0wnOg/6/pac6RGPPw==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -6154,11 +5838,10 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/resources": {+ "@claude-flow/hooks/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/resources": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz","integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -6172,11 +5855,10 @@"@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-trace-node": {+ "@claude-flow/hooks/node_modules/@opentelemetry/sdk-trace-node": {"version": "2.7.1","resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.7.1.tgz","integrity": "sha512-pCpQxU68lV+I9s9svqMyVu5iHdDDUnqUpSxqwyCU8A9ejEsSnMPCbearwsUO4yk08ZJzAIUCFuReMdVQvHrdvg==",- "dev": true,"license": "Apache-2.0","optional": true,"dependencies": {@@ -6191,11 +5873,10 @@"@opentelemetry/api": ">=1.0.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@ruvector/graph-node": {+ "@claude-flow/hooks/node_modules/@ruvector/graph-node": {"version": "2.0.4","resolved": "https://registry.npmjs.org/@ruvector/graph-node/-/graph-node-2.0.4.tgz","integrity": "sha512-pPUbQBF+Otnpd5YNgiQl3eaRsivi6NougS0hSmYbCd5i9gMJrr5u7oXL8pHwL/D9YbNKEkeIclhN6zu1rg5aUA==",- "dev": true,"license": "MIT","optional": true,"engines": {@@ -6209,14 +5890,13 @@"@ruvector/graph-node-win32-x64-msvc": "2.0.4"}},- "@claude-flow/plugin-agent-federation/node_modules/@ruvector/graph-node-darwin-arm64": {+ "@claude-flow/hooks/node_modules/@ruvector/graph-node-darwin-arm64": {"version": "2.0.4","resolved": "https://registry.npmjs.org/@ruvector/graph-node-darwin-arm64/-/graph-node-darwin-arm64-2.0.4.tgz","integrity": "sha512-9YBCI4JFDNCGSDzSApZng3yjdAb7u3Rq2Fn4yyuGbHy26fEie9TqfFDNQ7d+uK6mPcxDVJDCPnIOKcHnFsyMBQ==","cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -6226,14 +5906,13 @@"node": ">=18.0.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@ruvector/graph-node-darwin-x64": {+ "@claude-flow/hooks/node_modules/@ruvector/graph-node-darwin-x64": {"version": "2.0.4","resolved": "https://registry.npmjs.org/@ruvector/graph-node-darwin-x64/-/graph-node-darwin-x64-2.0.4.tgz","integrity": "sha512-WW07+HmIdbv3jij2tqRWbkJt5m6uR76PXDosIwOkwBjyLbV3Ck5kSW5DONctA6cOQuTEeCcOo9sIKqr3J/f2pQ==","cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -6243,14 +5922,13 @@"node": ">=18.0.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@ruvector/graph-node-linux-arm64-gnu": {+ "@claude-flow/hooks/node_modules/@ruvector/graph-node-linux-arm64-gnu": {"version": "2.0.4","resolved": "https://registry.npmjs.org/@ruvector/graph-node-linux-arm64-gnu/-/graph-node-linux-arm64-gnu-2.0.4.tgz","integrity": "sha512-Z5OatE8CzaVCq5vgGOmowVSKOLxYvO1Dn0rvFL4d63fEvVONDpsVAMkR7rxRGHrgzMZMfpZ9EjZ0vu0KR08tRQ==","cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -6260,14 +5938,13 @@"node": ">=18.0.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@ruvector/graph-node-linux-x64-gnu": {+ "@claude-flow/hooks/node_modules/@ruvector/graph-node-linux-x64-gnu": {"version": "2.0.4","resolved": "https://registry.npmjs.org/@ruvector/graph-node-linux-x64-gnu/-/graph-node-linux-x64-gnu-2.0.4.tgz","integrity": "sha512-RAdkLcB1gjEQcIsCxmSGHSOBbnUbCn7If8H9YrOqy5xxvmTVE25tkM49fpRRK3oINWJ9oQDBsAZr7GXKQZoLig==","cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -6277,14 +5954,13 @@"node": ">=18.0.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@ruvector/graph-node-win32-x64-msvc": {+ "@claude-flow/hooks/node_modules/@ruvector/graph-node-win32-x64-msvc": {"version": "2.0.4","resolved": "https://registry.npmjs.org/@ruvector/graph-node-win32-x64-msvc/-/graph-node-win32-x64-msvc-2.0.4.tgz","integrity": "sha512-+z2uyfiPmbELGjwvo5RfDSjHTJWZWQQDxDYLAnnfqV9a0oM1VklRe34t97pvGg7tdCXgEpnR6yWk3OZRemQUEQ==","cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -6294,14 +5970,38 @@"node": ">=18.0.0"}},- "@claude-flow/plugin-agent-federation/node_modules/@ruvector/ruvllm-darwin-arm64": {+ "@claude-flow/hooks/node_modules/@ruvector/ruvllm": {+ "version": "2.5.6",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm/-/ruvllm-2.5.6.tgz",+ "integrity": "sha512-B29ej1aJCNN7UCiIj0wtDMLCe01UWA7KMPTSAriGeey13aNYnstsTD+lz3tkglLSMSdwf9ozQ+N4lVQXvc96+A==",+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "dependencies": {+ "chalk": "^4.1.2",+ "commander": "^12.0.0",+ "ora": "^5.4.1"+ },+ "bin": {+ "ruvllm": "bin/cli.js"+ },+ "engines": {+ "node": ">= 18"+ },+ "optionalDependencies": {+ "@ruvector/ruvllm-darwin-arm64": "2.0.1",+ "@ruvector/ruvllm-darwin-x64": "2.0.1",+ "@ruvector/ruvllm-linux-arm64-gnu": "2.0.1",+ "@ruvector/ruvllm-linux-x64-gnu": "2.0.1",+ "@ruvector/ruvllm-win32-x64-msvc": "2.0.1"+ }+ },+ "@claude-flow/hooks/node_modules/@ruvector/ruvllm-darwin-arm64": {"version": "2.0.1","resolved": "https://registry.npmjs.org/@ruvector/ruvllm-darwin-arm64/-/ruvllm-darwin-arm64-2.0.1.tgz","integrity": "sha512-giZb+TbErKLgURLC3CSmJKJl0bnJn+jFZk488ppyzrR6YGft6kO329Twnd+TiJNDxVOMgZefwVdsbF9jrUIgAQ==","cpu": ["arm64"],- "dev": true,"license": "MIT OR Apache-2.0","optional": true,"os": [@@ -6311,14 +6011,13 @@"node": ">= 18"}},- "@claude-flow/plugin-agent-federation/node_modules/@ruvector/ruvllm-darwin-x64": {+ "@claude-flow/hooks/node_modules/@ruvector/ruvllm-darwin-x64": {"version": "2.0.1","resolved": "https://registry.npmjs.org/@ruvector/ruvllm-darwin-x64/-/ruvllm-darwin-x64-2.0.1.tgz","integrity": "sha512-DpVKFBXFxVPBiCGBw1AeiwsY1YVWfaCh+Eq0+pVLqD4kwwXKhRIWLnTQcuZVE5Gnt1Ku8MxhH2Zs++vKiuq3mA==","cpu": ["x64"],- "dev": true,"license": "MIT OR Apache-2.0","optional": true,"os": [@@ -6328,14 +6027,13 @@"node": ">= 18"}},- "@claude-flow/plugin-agent-federation/node_modules/@ruvector/ruvllm-linux-arm64-gnu": {+ "@claude-flow/hooks/node_modules/@ruvector/ruvllm-linux-arm64-gnu": {"version": "2.0.1","resolved": "https://registry.npmjs.org/@ruvector/ruvllm-linux-arm64-gnu/-/ruvllm-linux-arm64-gnu-2.0.1.tgz","integrity": "sha512-+u6Fe/Dsy4Y11m9IUmuoUeFtoUWc1ZVXxGB4JYomNDll63D03a0cpeKKaslgwOfFlfXlrFcs/eDrsYr07tQP5g==","cpu": ["arm64"],- "dev": true,"license": "MIT OR Apache-2.0","optional": true,"os": [@@ -6345,14 +6043,13 @@"node": ">= 18"}},- "@claude-flow/plugin-agent-federation/node_modules/@ruvector/ruvllm-linux-x64-gnu": {+ "@claude-flow/hooks/node_modules/@ruvector/ruvllm-linux-x64-gnu": {"version": "2.0.1","resolved": "https://registry.npmjs.org/@ruvector/ruvllm-linux-x64-gnu/-/ruvllm-linux-x64-gnu-2.0.1.tgz","integrity": "sha512-GH9u/SPUZm9KXjSoQZx5PRtJui0hO/OK+OmRHLZc8+IYrlgona6UQAw6uKHJ3cSEZp9f+XBRYgIrLmsEJW3HXA==","cpu": ["x64"],- "dev": true,"license": "MIT OR Apache-2.0","optional": true,"os": [@@ -6362,14 +6059,13 @@"node": ">= 18"}},- "@claude-flow/plugin-agent-federation/node_modules/@ruvector/ruvllm-win32-x64-msvc": {+ "@claude-flow/hooks/node_modules/@ruvector/ruvllm-win32-x64-msvc": {"version": "2.0.1","resolved": "https://registry.npmjs.org/@ruvector/ruvllm-win32-x64-msvc/-/ruvllm-win32-x64-msvc-2.0.1.tgz","integrity": "sha512-sRGNOMAcyC5p/nITnR0HLFUEObZ9Mh/T1erNiqhKrNUqIPZM1qAYBgN3xmZp02isdiTilRpxQihz3j4EzGPXIw==","cpu": ["x64"],- "dev": true,"license": "MIT OR Apache-2.0","optional": true,"os": [@@ -6379,65 +6075,29 @@"node": ">= 18"}},- "@claude-flow/plugin-agent-federation/node_modules/@ruvector/tiny-dancer": {- "version": "0.1.22",- "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer/-/tiny-dancer-0.1.22.tgz",- "integrity": "sha512-p5EeEk5i0IV1Mic3srmJ/yfZLL7Ip72+QXuuAGs5p0kFUkFfVr1mbAlSo/Tm8Z5/7WQtWlcJ277LBxpbEFjULA==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=18.0.0"- },- "optionalDependencies": {- "@ruvector/tiny-dancer-darwin-arm64": "0.1.22",- "@ruvector/tiny-dancer-darwin-x64": "0.1.22",- "@ruvector/tiny-dancer-linux-arm64-gnu": "0.1.22",- "@ruvector/tiny-dancer-linux-arm64-musl": "0.1.22",- "@ruvector/tiny-dancer-linux-x64-gnu": "0.1.22",- "@ruvector/tiny-dancer-linux-x64-musl": "0.1.22",- "@ruvector/tiny-dancer-win32-arm64-msvc": "0.1.22",- "@ruvector/tiny-dancer-win32-x64-msvc": "0.1.22"- }- },- "@claude-flow/plugin-agent-federation/node_modules/@ruvector/tiny-dancer-linux-x64-gnu": {- "version": "0.1.22",- "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-linux-x64-gnu/-/tiny-dancer-linux-x64-gnu-0.1.22.tgz",- "integrity": "sha512-7Y17JbuEbsyMXY1Iqt13xOM9bSr6niyJqUDwb7LNfXqb3k0M63B6i5D63d8WrGYLrp0Zij99XxHuBaCwrC1+4A==",- "cpu": [- "x64"- ],- "dev": true,+ "@claude-flow/hooks/node_modules/@ruvector/ruvllm/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==","license": "MIT","optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 18"- }- },- "@claude-flow/plugin-agent-federation/node_modules/accepts": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",- "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",- "dev": true,- "license": "MIT","dependencies": {- "mime-types": "^3.0.0",- "negotiator": "^1.0.0"+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"},"engines": {- "node": ">= 0.6"+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"}},- "@claude-flow/plugin-agent-federation/node_modules/agentdb": {+ "@claude-flow/hooks/node_modules/agentdb": {"version": "3.0.0-alpha.17","resolved": "https://registry.npmjs.org/agentdb/-/agentdb-3.0.0-alpha.17.tgz","integrity": "sha512-LK8drZFQteNkff+ji52vCmIXyE3A3ipzabx+ubBcX0CRgF96GU8m36sWyOfqL7pWRfnYDgkEEEgZmagiNCaz/A==",- "dev": true,"hasInstallScript": true,"license": "MIT",- "optional": true,"dependencies": {"@modelcontextprotocol/sdk": "^1.20.1","@opentelemetry/api": "^1.9.0",@@ -6478,37 +6138,122 @@"ruvector-graph-transformer-wasm": "^2.0.4"}},- "@claude-flow/plugin-agent-federation/node_modules/agentdb/node_modules/@ruvector/ruvllm": {- "version": "2.5.6",- "resolved": "https://registry.npmjs.org/@ruvector/ruvllm/-/ruvllm-2.5.6.tgz",- "integrity": "sha512-B29ej1aJCNN7UCiIj0wtDMLCe01UWA7KMPTSAriGeey13aNYnstsTD+lz3tkglLSMSdwf9ozQ+N4lVQXvc96+A==",- "dev": true,- "license": "MIT OR Apache-2.0",+ "@claude-flow/hooks/node_modules/bl": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",+ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",+ "license": "MIT","optional": true,"dependencies": {- "chalk": "^4.1.2",- "commander": "^12.0.0",- "ora": "^5.4.1"+ "buffer": "^5.5.0",+ "inherits": "^2.0.4",+ "readable-stream": "^3.4.0"+ }+ },+ "@claude-flow/hooks/node_modules/buffer": {+ "version": "5.7.1",+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "base64-js": "^1.3.1",+ "ieee754": "^1.1.13"+ }+ },+ "@claude-flow/hooks/node_modules/cjs-module-lexer": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",+ "license": "MIT",+ "optional": true+ },+ "@claude-flow/hooks/node_modules/cli-cursor": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",+ "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "restore-cursor": "^3.1.0"},- "bin": {- "ruvllm": "bin/cli.js"+ "engines": {+ "node": ">=8"+ }+ },+ "@claude-flow/hooks/node_modules/import-in-the-middle": {+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.3.0.tgz",+ "integrity": "sha512-v4+k+PLt4z6g2ydEcXhfinTJxfgKJDWOW0v0GZNA5n2qToHFObpH4nGLhJdwnXnX4T14oREx/M62dS9GkpmSbQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "cjs-module-lexer": "^2.2.0",+ "es-module-lexer": "^2.2.0",+ "module-details-from-path": "^1.0.4"},"engines": {- "node": ">= 18"+ "node": ">=18"+ }+ },+ "@claude-flow/hooks/node_modules/is-interactive": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",+ "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=8"+ }+ },+ "@claude-flow/hooks/node_modules/is-unicode-supported": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",+ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=10"},- "optionalDependencies": {- "@ruvector/ruvllm-darwin-arm64": "2.0.1",- "@ruvector/ruvllm-darwin-x64": "2.0.1",- "@ruvector/ruvllm-linux-arm64-gnu": "2.0.1",- "@ruvector/ruvllm-linux-x64-gnu": "2.0.1",- "@ruvector/ruvllm-win32-x64-msvc": "2.0.1"+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"}},- "@claude-flow/plugin-agent-federation/node_modules/agentdb/node_modules/@ruvector/ruvllm/node_modules/chalk": {+ "@claude-flow/hooks/node_modules/log-symbols": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",+ "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "chalk": "^4.1.0",+ "is-unicode-supported": "^0.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/hooks/node_modules/log-symbols/node_modules/chalk": {"version": "4.1.2","resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz","integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",- "dev": true,"license": "MIT","optional": true,"dependencies": {@@ -6522,29 +6267,2225 @@"url": "https://github.com/chalk/chalk?sponsor=1"}},- "@claude-flow/plugin-agent-federation/node_modules/agentic-flow": {- "version": "2.0.12-fix.8",- "resolved": "https://registry.npmjs.org/agentic-flow/-/agentic-flow-2.0.12-fix.8.tgz",- "integrity": "sha512-pp36lAT7lXF9cyXA7KqUBe8pg7nUrGrhb3hplzTJ1V2B6y7n+jBG8/wH1gTNWk+i1+Zzzgl2zfngmY9u2qEOFg==",- "dev": true,- "hasInstallScript": true,+ "@claude-flow/hooks/node_modules/mimic-fn": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=6"+ }+ },+ "@claude-flow/hooks/node_modules/onetime": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==","license": "MIT",+ "optional": true,"dependencies": {- "@anthropic-ai/claude-agent-sdk": "^0.1.5",- "@anthropic-ai/sdk": "^0.65.0",- "@google/genai": "^1.22.0",- "@ruvector/core": "^0.1.29",- "@ruvector/edge-full": "^0.1.0",- "@ruvector/router": "^0.1.25",- "@ruvector/ruvllm": "^0.2.3",- "@ruvector/tiny-dancer": "^0.1.17",- "@supabase/supabase-js": "^2.78.0",- "@xenova/transformers": "^2.17.2",- "axios": "^1.12.2",- "dotenv": "^16.4.5",- "express": "^5.1.0",- "fastmcp": "^3.19.0",- "glob": "^13.0.0",+ "mimic-fn": "^2.1.0"+ },+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/hooks/node_modules/ora": {+ "version": "5.4.1",+ "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz",+ "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "bl": "^4.1.0",+ "chalk": "^4.1.0",+ "cli-cursor": "^3.1.0",+ "cli-spinners": "^2.5.0",+ "is-interactive": "^1.0.0",+ "is-unicode-supported": "^0.1.0",+ "log-symbols": "^4.1.0",+ "strip-ansi": "^6.0.0",+ "wcwidth": "^1.0.1"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/hooks/node_modules/ora/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "@claude-flow/hooks/node_modules/require-in-the-middle": {+ "version": "8.0.1",+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "debug": "^4.3.5",+ "module-details-from-path": "^1.0.3"+ },+ "engines": {+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"+ }+ },+ "@claude-flow/hooks/node_modules/restore-cursor": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",+ "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "onetime": "^5.1.0",+ "signal-exit": "^3.0.2"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "@claude-flow/integration": {+ "version": "3.0.0",+ "devDependencies": {+ "vitest": "^4.1.0"+ },+ "optionalDependencies": {+ "agent-booster": "^0.2.2"+ },+ "peerDependencies": {+ "agentic-flow": "^2.0.0-alpha"+ }+ },+ "@claude-flow/mcp": {+ "version": "3.0.0-alpha.9",+ "dependencies": {+ "ajv": "^8.12.0",+ "cors": "^2.8.5",+ "express": "^4.18.2",+ "helmet": "^7.1.0",+ "ws": "^8.14.2"+ },+ "devDependencies": {+ "@types/cors": "^2.8.17",+ "@types/express": "^4.17.21",+ "@types/ws": "^8.5.10",+ "vitest": "^4.1.0"+ }+ },+ "@claude-flow/neural": {+ "version": "3.0.0-alpha.9",+ "license": "MIT",+ "dependencies": {+ "@claude-flow/memory": "^3.0.0-alpha.16",+ "@ruvector/sona": "0.1.5"+ },+ "optionalDependencies": {+ "agentdb": "^2.0.0 || ^3.0.0-alpha.1"+ }+ },+ "@claude-flow/neural/node_modules/@claude-flow/memory": {+ "version": "3.0.0-alpha.21",+ "resolved": "https://registry.npmjs.org/@claude-flow/memory/-/memory-3.0.0-alpha.21.tgz",+ "integrity": "sha512-5H5rJOh7nGuzmFazTvJWZIbeZvf+HJjonM98vWijzbL4kQvBDWj6zwhsxQ3wrwJSrs5ALgQQmhxQ7Mr+gagAFw==",+ "cpu": [+ "x64",+ "arm64"+ ],+ "os": [+ "darwin",+ "linux",+ "win32"+ ],+ "dependencies": {+ "agentdb": "^3.0.0-alpha.16",+ "sql.js": "^1.10.3"+ },+ "optionalDependencies": {+ "better-sqlite3": "^12.9.0"+ }+ },+ "@claude-flow/neural/node_modules/@claude-flow/memory/node_modules/better-sqlite3": {+ "version": "12.11.1",+ "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.11.1.tgz",+ "integrity": "sha512-dq9AtApgg5PGFtBzPFSBl3HZQjHok5gaQCM6zh2Yk0aSmDCs1CbnVI8/HgASQkNKsWFpseIO9beg5xxpYhbIfA==",+ "hasInstallScript": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "bindings": "^1.5.0",+ "prebuild-install": "^7.1.1"+ },+ "engines": {+ "node": "20.x || 22.x || 23.x || 24.x || 25.x || 26.x"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/api-logs": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.218.0.tgz",+ "integrity": "sha512-fmEWp5kXlGEc3i/lR698Hz41DfGyN4Tbe4g7L1AxSc7fF8Xeh/FQ9Quqpa9dVA413Q1Ad43QOLzU4JoXgbFPWw==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/api": "^1.3.0"+ },+ "engines": {+ "node": ">=8.0.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/context-async-hooks": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.7.1.tgz",+ "integrity": "sha512-OPFBYuXEn1E4ja3Y6eeA7O+ZnLBNcXTV5Cgsn1VaqBZ6hC5FnpZPLBNme1LJY8ZtF4aOujPKFoeWN4ik487KuQ==",+ "license": "Apache-2.0",+ "optional": true,+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/core": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.7.1.tgz",+ "integrity": "sha512-QAqIj32AtK6+pEVNG7EOVxHdE06RP+FM5qpiEJ4RtDcFIqKUZHYhl7/7UY5efhwmwNAg7j8QbJVBLxMerc0+gw==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/exporter-metrics-otlp-http": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.218.0.tgz",+ "integrity": "sha512-bV7d2OuMpZu2+gAaxUAhzfZ0h3WVZk8ETQUEE3DNSntbTaMpuITjtm8I0rNyHFdm7Ax57K6ty7SgFXlBmOLIvQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-metrics": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/exporter-prometheus": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.218.0.tgz",+ "integrity": "sha512-RT5oEyu1kddZJ1vt7/BUo5wV+P7hpNAESsR3dUd3+8deHuX7gWNoCOZn+SfDT+hJHlIJ5h/AxiCLXIrutswDJg==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-metrics": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/exporter-trace-otlp-grpc": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.218.0.tgz",+ "integrity": "sha512-3fXxVQEj9TNAFaCi79JeFKfeLd0sDtInaR3gaZDVlzNSPHtz8PZuCV34JKWjD4XXzT20IdMe8IpX6mRVNDA4Tw==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@grpc/grpc-js": "^1.14.3",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-grpc-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/exporter-trace-otlp-http": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.218.0.tgz",+ "integrity": "sha512-8dqezsmPhtKitIK/eTipZhYl9EX2/gNQ5zUMhaz3uxEURwfkNf8IPvo6yNfrzbxdtpAOybS/+h7wmIWYqFSpiw==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/exporter-trace-otlp-proto": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.218.0.tgz",+ "integrity": "sha512-r1Msf8SNLRmwh9J6XQ5uh82D7CdDWMNHnPB7LAVHjzut0TkSeKc5KcIvr4SvHvfk/xwN5gxC+VLKQ1k0o8PSPw==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/exporter-zipkin": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.7.1.tgz",+ "integrity": "sha512-mfsD9bKAxcKrh5+y08TPodvClBO0CznBE3p79YAGnO81WI4LrdsGA65T53e4iTSbCalW4WaUpkbeJcbpyIUHfg==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.0.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/instrumentation": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.218.0.tgz",+ "integrity": "sha512-mIZil8Es+sYDK5m+DQiwAwF57F14TF2YlEqvIjZ/RQWcxDBwRGsKfdK2Tv65OU9meQKCMzSIFS9mxAcnAb6Bkg==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/api-logs": "0.218.0",+ "import-in-the-middle": "^3.0.0",+ "require-in-the-middle": "^8.0.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/otlp-exporter-base": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.218.0.tgz",+ "integrity": "sha512-ZwqpkNL5W7RyGJPDZ9g06DvKp8KFTWPJPN12anpMQYSKpTSU0z3EIZuPq9vPGpS8siFyOqDYDAuCwlNO9FqgbA==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-transformer": "0.218.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/otlp-grpc-exporter-base": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.218.0.tgz",+ "integrity": "sha512-H/lCGJ536N98VpYJOaWTQOkv4Dx6TnmStK6Rqfu1W7KkFbPAx04hjdYEMZF/YbnHzPUSIK4kM6OE2GKGBTpV9A==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@grpc/grpc-js": "^1.14.3",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/otlp-transformer": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.218.0.tgz",+ "integrity": "sha512-CFaKH87WAzjuJ4awowTTLzUvMfaRfiOFG5+qm5S5ncyalRtN4ecQ+YmuANJSCrVPuvZFEkUgKhBPBndxi3rHsQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/api-logs": "0.218.0",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-logs": "0.218.0",+ "@opentelemetry/sdk-metrics": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/propagator-b3": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.7.1.tgz",+ "integrity": "sha512-RJid6E2CKyeGfKBzXKF21ejabGMHypFkPAh3qZ+NvI+SGjuIye79t3PmiqcDgtRzdKH6ynXzbfslQ8DfpRUg2A==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/propagator-jaeger": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.7.1.tgz",+ "integrity": "sha512-KMjVBHzP4N60bOzxja76M1F1hZZ43lGPga5ix+mkv9+kk1nx9SbkxSvJsMbuVUxdPQmsPTqGShmhN8ulrMOg6Q==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/sdk-logs": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.218.0.tgz",+ "integrity": "sha512-QvnNdugatFTVCJXH0Mcu7GOOJSylA9j127kIezOE4YwTI4YbowRons2K4WZTv5FMS8T4q9P0NdaRHdkSmeAIag==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/api-logs": "0.218.0",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.4.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/sdk-metrics": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.7.1.tgz",+ "integrity": "sha512-MpDJdkiFDs3Pm1RHO3KByuZbuBdJEXEAkiC0+yJdsZGVCdf1RpHR6n+LHDcS7ffmfrt5kVCzJSCfm4z2C7v0uQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.9.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/sdk-node": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.218.0.tgz",+ "integrity": "sha512-tPMjHrLV5gsfNdYqoRHjeGbCAZBXXD9c1Qo/2ut7VwnUABDNh76xNxrT0SEhkIIJuCN45bbN1vZnYL1gY0IkOg==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/api-logs": "0.218.0",+ "@opentelemetry/configuration": "0.218.0",+ "@opentelemetry/context-async-hooks": "2.7.1",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/exporter-logs-otlp-grpc": "0.218.0",+ "@opentelemetry/exporter-logs-otlp-http": "0.218.0",+ "@opentelemetry/exporter-logs-otlp-proto": "0.218.0",+ "@opentelemetry/exporter-metrics-otlp-grpc": "0.218.0",+ "@opentelemetry/exporter-metrics-otlp-http": "0.218.0",+ "@opentelemetry/exporter-metrics-otlp-proto": "0.218.0",+ "@opentelemetry/exporter-prometheus": "0.218.0",+ "@opentelemetry/exporter-trace-otlp-grpc": "0.218.0",+ "@opentelemetry/exporter-trace-otlp-http": "0.218.0",+ "@opentelemetry/exporter-trace-otlp-proto": "0.218.0",+ "@opentelemetry/exporter-zipkin": "2.7.1",+ "@opentelemetry/instrumentation": "0.218.0",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/propagator-b3": "2.7.1",+ "@opentelemetry/propagator-jaeger": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-logs": "0.218.0",+ "@opentelemetry/sdk-metrics": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1",+ "@opentelemetry/sdk-trace-node": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/sdk-trace-base": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.7.1.tgz",+ "integrity": "sha512-NAYIlsF8MPUsKqJMiDQJTMPOmlbawC1Iz/omMLygZ1C9am8fTKYjTaI+OZM+WTY3t3Glo0wnOg/6/pac6RGPPw==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@opentelemetry/sdk-trace-node": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.7.1.tgz",+ "integrity": "sha512-pCpQxU68lV+I9s9svqMyVu5iHdDDUnqUpSxqwyCU8A9ejEsSnMPCbearwsUO4yk08ZJzAIUCFuReMdVQvHrdvg==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/context-async-hooks": "2.7.1",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"+ }+ },+ "@claude-flow/neural/node_modules/@ruvector/graph-node": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node/-/graph-node-2.0.2.tgz",+ "integrity": "sha512-uFPPTqx1hHsF9p6kAcEnEAEkb8zLf9lw+euPxr1voiRCBHt8L3sUXkeNvz50eHtJjxUW9dm4loIbsYuxao+M0g==",+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=18.0.0"+ },+ "optionalDependencies": {+ "@ruvector/graph-node-darwin-arm64": "2.0.2",+ "@ruvector/graph-node-darwin-x64": "2.0.2",+ "@ruvector/graph-node-linux-arm64-gnu": "2.0.2",+ "@ruvector/graph-node-linux-x64-gnu": "2.0.2",+ "@ruvector/graph-node-win32-x64-msvc": "2.0.2"+ }+ },+ "@claude-flow/neural/node_modules/@ruvector/graph-node-darwin-arm64": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-darwin-arm64/-/graph-node-darwin-arm64-2.0.2.tgz",+ "integrity": "sha512-r1g7wCZIFtR98dBl33fwDr/f+aYsKA7gElhKStKkwpLpJMiY1jPaabvUOhvulRDALMGH3qgvpVc9/ChxLKT+WA==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "@claude-flow/neural/node_modules/@ruvector/graph-node-darwin-x64": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-darwin-x64/-/graph-node-darwin-x64-2.0.2.tgz",+ "integrity": "sha512-tJB6dVDItrCaYLF55jP6DjmCzo8BpmucA0JcV2X23x2Tb6hJ5lS5pm3ujhvPy3A/bzgretYEtfHeAQXf1tOy5A==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "@claude-flow/neural/node_modules/@ruvector/graph-node-linux-arm64-gnu": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-linux-arm64-gnu/-/graph-node-linux-arm64-gnu-2.0.2.tgz",+ "integrity": "sha512-GvzFtb+JjXjelNhZQl45HQK5zQqW0GrmpvUCIIWEbDtVLgfCbw37UkLvgc1Kf9qxJHFwl5DTWfKLgbyyKdSX9g==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "@claude-flow/neural/node_modules/@ruvector/graph-node-linux-x64-gnu": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-linux-x64-gnu/-/graph-node-linux-x64-gnu-2.0.2.tgz",+ "integrity": "sha512-yaY/jj3PZ5lSfHhTcc2g5hTDg+pzG4Vo5LfiL1ecU+r+jl2zbLsMecb8ldDFibVO3DFuxTjH/I1+bDFo2fC/Qg==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "@claude-flow/neural/node_modules/@ruvector/graph-node-win32-x64-msvc": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-win32-x64-msvc/-/graph-node-win32-x64-msvc-2.0.2.tgz",+ "integrity": "sha512-f38C7oi4mkVl5a5q61rzITvWXIQGykqCWIKgEhGcEt/bDOX2wYCr1F5/AM+Ixz9pYKFvNNrzjozsafeevHWn0Q==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "@claude-flow/neural/node_modules/@ruvector/ruvllm": {+ "version": "2.5.6",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm/-/ruvllm-2.5.6.tgz",+ "integrity": "sha512-B29ej1aJCNN7UCiIj0wtDMLCe01UWA7KMPTSAriGeey13aNYnstsTD+lz3tkglLSMSdwf9ozQ+N4lVQXvc96+A==",+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "dependencies": {+ "chalk": "^4.1.2",+ "commander": "^12.0.0",+ "ora": "^5.4.1"+ },+ "bin": {+ "ruvllm": "bin/cli.js"+ },+ "engines": {+ "node": ">= 18"+ },+ "optionalDependencies": {+ "@ruvector/ruvllm-darwin-arm64": "2.0.1",+ "@ruvector/ruvllm-darwin-x64": "2.0.1",+ "@ruvector/ruvllm-linux-arm64-gnu": "2.0.1",+ "@ruvector/ruvllm-linux-x64-gnu": "2.0.1",+ "@ruvector/ruvllm-win32-x64-msvc": "2.0.1"+ }+ },+ "@claude-flow/neural/node_modules/@ruvector/ruvllm-darwin-arm64": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-darwin-arm64/-/ruvllm-darwin-arm64-2.0.1.tgz",+ "integrity": "sha512-giZb+TbErKLgURLC3CSmJKJl0bnJn+jFZk488ppyzrR6YGft6kO329Twnd+TiJNDxVOMgZefwVdsbF9jrUIgAQ==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 18"+ }+ },+ "@claude-flow/neural/node_modules/@ruvector/ruvllm-darwin-x64": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-darwin-x64/-/ruvllm-darwin-x64-2.0.1.tgz",+ "integrity": "sha512-DpVKFBXFxVPBiCGBw1AeiwsY1YVWfaCh+Eq0+pVLqD4kwwXKhRIWLnTQcuZVE5Gnt1Ku8MxhH2Zs++vKiuq3mA==",+ "cpu": [+ "x64"+ ],+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 18"+ }+ },+ "@claude-flow/neural/node_modules/@ruvector/ruvllm-linux-arm64-gnu": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-linux-arm64-gnu/-/ruvllm-linux-arm64-gnu-2.0.1.tgz",+ "integrity": "sha512-+u6Fe/Dsy4Y11m9IUmuoUeFtoUWc1ZVXxGB4JYomNDll63D03a0cpeKKaslgwOfFlfXlrFcs/eDrsYr07tQP5g==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 18"+ }+ },+ "@claude-flow/neural/node_modules/@ruvector/ruvllm-linux-x64-gnu": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-linux-x64-gnu/-/ruvllm-linux-x64-gnu-2.0.1.tgz",+ "integrity": "sha512-GH9u/SPUZm9KXjSoQZx5PRtJui0hO/OK+OmRHLZc8+IYrlgona6UQAw6uKHJ3cSEZp9f+XBRYgIrLmsEJW3HXA==",+ "cpu": [+ "x64"+ ],+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 18"+ }+ },+ "@claude-flow/neural/node_modules/@ruvector/ruvllm-win32-x64-msvc": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-win32-x64-msvc/-/ruvllm-win32-x64-msvc-2.0.1.tgz",+ "integrity": "sha512-sRGNOMAcyC5p/nITnR0HLFUEObZ9Mh/T1erNiqhKrNUqIPZM1qAYBgN3xmZp02isdiTilRpxQihz3j4EzGPXIw==",+ "cpu": [+ "x64"+ ],+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 18"+ }+ },+ "@claude-flow/neural/node_modules/@ruvector/ruvllm/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "@claude-flow/neural/node_modules/agentdb": {+ "version": "3.0.0-alpha.17",+ "resolved": "https://registry.npmjs.org/agentdb/-/agentdb-3.0.0-alpha.17.tgz",+ "integrity": "sha512-LK8drZFQteNkff+ji52vCmIXyE3A3ipzabx+ubBcX0CRgF96GU8m36sWyOfqL7pWRfnYDgkEEEgZmagiNCaz/A==",+ "hasInstallScript": true,+ "license": "MIT",+ "dependencies": {+ "@modelcontextprotocol/sdk": "^1.20.1",+ "@opentelemetry/api": "^1.9.0",+ "@ruvector/graph-transformer": "^2.0.4",+ "ajv": "^8.18.0",+ "jsonwebtoken": "^9.0.2",+ "sql.js": "^1.13.0"+ },+ "bin": {+ "agentdb": "dist/src/cli/agentdb-cli.js"+ },+ "engines": {+ "node": ">=18.0.0"+ },+ "optionalDependencies": {+ "@opentelemetry/resources": "^1.25.0",+ "@opentelemetry/sdk-node": "^0.218.0",+ "@opentelemetry/semantic-conventions": "^1.25.0",+ "@ruvector/attention": "^0.1.2",+ "@ruvector/gnn": "^0.1.23",+ "@ruvector/graph-node": "^2.0.2",+ "@ruvector/router": "^0.1.15",+ "@ruvector/ruvllm": "^2.5.1",+ "@ruvector/rvf": "^0.1.9",+ "@ruvector/rvf-node": "^0.1.7",+ "@ruvector/rvf-solver": "^0.1.7",+ "@ruvector/rvf-wasm": "^0.1.6",+ "@ruvector/sona": "^0.1.4",+ "@xenova/transformers": "^2.17.2",+ "argon2": "^0.44.0",+ "better-sqlite3": "^11.8.1",+ "chalk": "^5.3.0",+ "commander": "^12.1.0",+ "hnswlib-node": "^3.0.0",+ "inquirer": "^9.3.8",+ "ruvector": "^0.1.30",+ "ruvector-attention-wasm": "^0.1.32",+ "ruvector-graph-transformer-wasm": "^2.0.4"+ }+ },+ "@claude-flow/neural/node_modules/bl": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",+ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "buffer": "^5.5.0",+ "inherits": "^2.0.4",+ "readable-stream": "^3.4.0"+ }+ },+ "@claude-flow/neural/node_modules/buffer": {+ "version": "5.7.1",+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "base64-js": "^1.3.1",+ "ieee754": "^1.1.13"+ }+ },+ "@claude-flow/neural/node_modules/cjs-module-lexer": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",+ "license": "MIT",+ "optional": true+ },+ "@claude-flow/neural/node_modules/cli-cursor": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",+ "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "restore-cursor": "^3.1.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "@claude-flow/neural/node_modules/import-in-the-middle": {+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.3.0.tgz",+ "integrity": "sha512-v4+k+PLt4z6g2ydEcXhfinTJxfgKJDWOW0v0GZNA5n2qToHFObpH4nGLhJdwnXnX4T14oREx/M62dS9GkpmSbQ==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "cjs-module-lexer": "^2.2.0",+ "es-module-lexer": "^2.2.0",+ "module-details-from-path": "^1.0.4"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "@claude-flow/neural/node_modules/is-interactive": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",+ "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=8"+ }+ },+ "@claude-flow/neural/node_modules/is-unicode-supported": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",+ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/neural/node_modules/log-symbols": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",+ "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "chalk": "^4.1.0",+ "is-unicode-supported": "^0.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/neural/node_modules/log-symbols/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "@claude-flow/neural/node_modules/mimic-fn": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=6"+ }+ },+ "@claude-flow/neural/node_modules/onetime": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "mimic-fn": "^2.1.0"+ },+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/neural/node_modules/ora": {+ "version": "5.4.1",+ "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz",+ "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "bl": "^4.1.0",+ "chalk": "^4.1.0",+ "cli-cursor": "^3.1.0",+ "cli-spinners": "^2.5.0",+ "is-interactive": "^1.0.0",+ "is-unicode-supported": "^0.1.0",+ "log-symbols": "^4.1.0",+ "strip-ansi": "^6.0.0",+ "wcwidth": "^1.0.1"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/neural/node_modules/ora/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "@claude-flow/neural/node_modules/require-in-the-middle": {+ "version": "8.0.1",+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "debug": "^4.3.5",+ "module-details-from-path": "^1.0.3"+ },+ "engines": {+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"+ }+ },+ "@claude-flow/neural/node_modules/restore-cursor": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",+ "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "onetime": "^5.1.0",+ "signal-exit": "^3.0.2"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "@claude-flow/performance": {+ "version": "3.0.0-alpha.6",+ "dependencies": {+ "@ruvector/attention": "latest",+ "@ruvector/sona": "latest"+ },+ "devDependencies": {+ "vitest": "^4.1.0"+ }+ },+ "@claude-flow/plugin-agent-federation": {+ "version": "1.0.0-alpha.16",+ "license": "MIT",+ "dependencies": {+ "@noble/ed25519": "^2.0.0"+ },+ "bin": {+ "ruflo-federation": "dist/bin.js"+ },+ "devDependencies": {+ "@claude-flow/security": "3.0.0-alpha.10",+ "@claude-flow/shared": "3.0.0-alpha.8",+ "agentic-flow": "2.0.12-fix.8",+ "typescript": "^5.4.0",+ "vitest": "^4.1.0"+ },+ "peerDependencies": {+ "agentic-flow": ">=2.0.12-fix.8 <2.0.13",+ "midstreamer": ">=0.3.1"+ },+ "peerDependenciesMeta": {+ "agentic-flow": {+ "optional": true+ },+ "midstreamer": {+ "optional": true+ }+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/api-logs": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.218.0.tgz",+ "integrity": "sha512-fmEWp5kXlGEc3i/lR698Hz41DfGyN4Tbe4g7L1AxSc7fF8Xeh/FQ9Quqpa9dVA413Q1Ad43QOLzU4JoXgbFPWw==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/api": "^1.3.0"+ },+ "engines": {+ "node": ">=8.0.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/context-async-hooks": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.7.1.tgz",+ "integrity": "sha512-OPFBYuXEn1E4ja3Y6eeA7O+ZnLBNcXTV5Cgsn1VaqBZ6hC5FnpZPLBNme1LJY8ZtF4aOujPKFoeWN4ik487KuQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/core": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.7.1.tgz",+ "integrity": "sha512-QAqIj32AtK6+pEVNG7EOVxHdE06RP+FM5qpiEJ4RtDcFIqKUZHYhl7/7UY5efhwmwNAg7j8QbJVBLxMerc0+gw==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-metrics-otlp-http": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.218.0.tgz",+ "integrity": "sha512-bV7d2OuMpZu2+gAaxUAhzfZ0h3WVZk8ETQUEE3DNSntbTaMpuITjtm8I0rNyHFdm7Ax57K6ty7SgFXlBmOLIvQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-metrics": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-prometheus": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.218.0.tgz",+ "integrity": "sha512-RT5oEyu1kddZJ1vt7/BUo5wV+P7hpNAESsR3dUd3+8deHuX7gWNoCOZn+SfDT+hJHlIJ5h/AxiCLXIrutswDJg==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-metrics": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-trace-otlp-grpc": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.218.0.tgz",+ "integrity": "sha512-3fXxVQEj9TNAFaCi79JeFKfeLd0sDtInaR3gaZDVlzNSPHtz8PZuCV34JKWjD4XXzT20IdMe8IpX6mRVNDA4Tw==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@grpc/grpc-js": "^1.14.3",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-grpc-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-trace-otlp-http": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.218.0.tgz",+ "integrity": "sha512-8dqezsmPhtKitIK/eTipZhYl9EX2/gNQ5zUMhaz3uxEURwfkNf8IPvo6yNfrzbxdtpAOybS/+h7wmIWYqFSpiw==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-trace-otlp-proto": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.218.0.tgz",+ "integrity": "sha512-r1Msf8SNLRmwh9J6XQ5uh82D7CdDWMNHnPB7LAVHjzut0TkSeKc5KcIvr4SvHvfk/xwN5gxC+VLKQ1k0o8PSPw==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-zipkin": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.7.1.tgz",+ "integrity": "sha512-mfsD9bKAxcKrh5+y08TPodvClBO0CznBE3p79YAGnO81WI4LrdsGA65T53e4iTSbCalW4WaUpkbeJcbpyIUHfg==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.0.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/instrumentation": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.218.0.tgz",+ "integrity": "sha512-mIZil8Es+sYDK5m+DQiwAwF57F14TF2YlEqvIjZ/RQWcxDBwRGsKfdK2Tv65OU9meQKCMzSIFS9mxAcnAb6Bkg==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/api-logs": "0.218.0",+ "import-in-the-middle": "^3.0.0",+ "require-in-the-middle": "^8.0.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/otlp-exporter-base": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.218.0.tgz",+ "integrity": "sha512-ZwqpkNL5W7RyGJPDZ9g06DvKp8KFTWPJPN12anpMQYSKpTSU0z3EIZuPq9vPGpS8siFyOqDYDAuCwlNO9FqgbA==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-transformer": "0.218.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/otlp-grpc-exporter-base": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.218.0.tgz",+ "integrity": "sha512-H/lCGJ536N98VpYJOaWTQOkv4Dx6TnmStK6Rqfu1W7KkFbPAx04hjdYEMZF/YbnHzPUSIK4kM6OE2GKGBTpV9A==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@grpc/grpc-js": "^1.14.3",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/otlp-transformer": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.218.0.tgz",+ "integrity": "sha512-CFaKH87WAzjuJ4awowTTLzUvMfaRfiOFG5+qm5S5ncyalRtN4ecQ+YmuANJSCrVPuvZFEkUgKhBPBndxi3rHsQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/api-logs": "0.218.0",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-logs": "0.218.0",+ "@opentelemetry/sdk-metrics": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/propagator-b3": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.7.1.tgz",+ "integrity": "sha512-RJid6E2CKyeGfKBzXKF21ejabGMHypFkPAh3qZ+NvI+SGjuIye79t3PmiqcDgtRzdKH6ynXzbfslQ8DfpRUg2A==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/propagator-jaeger": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.7.1.tgz",+ "integrity": "sha512-KMjVBHzP4N60bOzxja76M1F1hZZ43lGPga5ix+mkv9+kk1nx9SbkxSvJsMbuVUxdPQmsPTqGShmhN8ulrMOg6Q==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-logs": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.218.0.tgz",+ "integrity": "sha512-QvnNdugatFTVCJXH0Mcu7GOOJSylA9j127kIezOE4YwTI4YbowRons2K4WZTv5FMS8T4q9P0NdaRHdkSmeAIag==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/api-logs": "0.218.0",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.4.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-metrics": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.7.1.tgz",+ "integrity": "sha512-MpDJdkiFDs3Pm1RHO3KByuZbuBdJEXEAkiC0+yJdsZGVCdf1RpHR6n+LHDcS7ffmfrt5kVCzJSCfm4z2C7v0uQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.9.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-node": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.218.0.tgz",+ "integrity": "sha512-tPMjHrLV5gsfNdYqoRHjeGbCAZBXXD9c1Qo/2ut7VwnUABDNh76xNxrT0SEhkIIJuCN45bbN1vZnYL1gY0IkOg==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/api-logs": "0.218.0",+ "@opentelemetry/configuration": "0.218.0",+ "@opentelemetry/context-async-hooks": "2.7.1",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/exporter-logs-otlp-grpc": "0.218.0",+ "@opentelemetry/exporter-logs-otlp-http": "0.218.0",+ "@opentelemetry/exporter-logs-otlp-proto": "0.218.0",+ "@opentelemetry/exporter-metrics-otlp-grpc": "0.218.0",+ "@opentelemetry/exporter-metrics-otlp-http": "0.218.0",+ "@opentelemetry/exporter-metrics-otlp-proto": "0.218.0",+ "@opentelemetry/exporter-prometheus": "0.218.0",+ "@opentelemetry/exporter-trace-otlp-grpc": "0.218.0",+ "@opentelemetry/exporter-trace-otlp-http": "0.218.0",+ "@opentelemetry/exporter-trace-otlp-proto": "0.218.0",+ "@opentelemetry/exporter-zipkin": "2.7.1",+ "@opentelemetry/instrumentation": "0.218.0",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/propagator-b3": "2.7.1",+ "@opentelemetry/propagator-jaeger": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-logs": "0.218.0",+ "@opentelemetry/sdk-metrics": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1",+ "@opentelemetry/sdk-trace-node": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-trace-base": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.7.1.tgz",+ "integrity": "sha512-NAYIlsF8MPUsKqJMiDQJTMPOmlbawC1Iz/omMLygZ1C9am8fTKYjTaI+OZM+WTY3t3Glo0wnOg/6/pac6RGPPw==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@opentelemetry/sdk-trace-node": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.7.1.tgz",+ "integrity": "sha512-pCpQxU68lV+I9s9svqMyVu5iHdDDUnqUpSxqwyCU8A9ejEsSnMPCbearwsUO4yk08ZJzAIUCFuReMdVQvHrdvg==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/context-async-hooks": "2.7.1",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@ruvector/graph-node": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node/-/graph-node-2.0.4.tgz",+ "integrity": "sha512-pPUbQBF+Otnpd5YNgiQl3eaRsivi6NougS0hSmYbCd5i9gMJrr5u7oXL8pHwL/D9YbNKEkeIclhN6zu1rg5aUA==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=18.0.0"+ },+ "optionalDependencies": {+ "@ruvector/graph-node-darwin-arm64": "2.0.4",+ "@ruvector/graph-node-darwin-x64": "2.0.4",+ "@ruvector/graph-node-linux-arm64-gnu": "2.0.4",+ "@ruvector/graph-node-linux-x64-gnu": "2.0.4",+ "@ruvector/graph-node-win32-x64-msvc": "2.0.4"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@ruvector/graph-node-darwin-arm64": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-darwin-arm64/-/graph-node-darwin-arm64-2.0.4.tgz",+ "integrity": "sha512-9YBCI4JFDNCGSDzSApZng3yjdAb7u3Rq2Fn4yyuGbHy26fEie9TqfFDNQ7d+uK6mPcxDVJDCPnIOKcHnFsyMBQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@ruvector/graph-node-darwin-x64": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-darwin-x64/-/graph-node-darwin-x64-2.0.4.tgz",+ "integrity": "sha512-WW07+HmIdbv3jij2tqRWbkJt5m6uR76PXDosIwOkwBjyLbV3Ck5kSW5DONctA6cOQuTEeCcOo9sIKqr3J/f2pQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@ruvector/graph-node-linux-arm64-gnu": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-linux-arm64-gnu/-/graph-node-linux-arm64-gnu-2.0.4.tgz",+ "integrity": "sha512-Z5OatE8CzaVCq5vgGOmowVSKOLxYvO1Dn0rvFL4d63fEvVONDpsVAMkR7rxRGHrgzMZMfpZ9EjZ0vu0KR08tRQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@ruvector/graph-node-linux-x64-gnu": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-linux-x64-gnu/-/graph-node-linux-x64-gnu-2.0.4.tgz",+ "integrity": "sha512-RAdkLcB1gjEQcIsCxmSGHSOBbnUbCn7If8H9YrOqy5xxvmTVE25tkM49fpRRK3oINWJ9oQDBsAZr7GXKQZoLig==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@ruvector/graph-node-win32-x64-msvc": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-win32-x64-msvc/-/graph-node-win32-x64-msvc-2.0.4.tgz",+ "integrity": "sha512-+z2uyfiPmbELGjwvo5RfDSjHTJWZWQQDxDYLAnnfqV9a0oM1VklRe34t97pvGg7tdCXgEpnR6yWk3OZRemQUEQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@ruvector/ruvllm-darwin-arm64": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-darwin-arm64/-/ruvllm-darwin-arm64-2.0.1.tgz",+ "integrity": "sha512-giZb+TbErKLgURLC3CSmJKJl0bnJn+jFZk488ppyzrR6YGft6kO329Twnd+TiJNDxVOMgZefwVdsbF9jrUIgAQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 18"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@ruvector/ruvllm-darwin-x64": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-darwin-x64/-/ruvllm-darwin-x64-2.0.1.tgz",+ "integrity": "sha512-DpVKFBXFxVPBiCGBw1AeiwsY1YVWfaCh+Eq0+pVLqD4kwwXKhRIWLnTQcuZVE5Gnt1Ku8MxhH2Zs++vKiuq3mA==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 18"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@ruvector/ruvllm-linux-arm64-gnu": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-linux-arm64-gnu/-/ruvllm-linux-arm64-gnu-2.0.1.tgz",+ "integrity": "sha512-+u6Fe/Dsy4Y11m9IUmuoUeFtoUWc1ZVXxGB4JYomNDll63D03a0cpeKKaslgwOfFlfXlrFcs/eDrsYr07tQP5g==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 18"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@ruvector/ruvllm-linux-x64-gnu": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-linux-x64-gnu/-/ruvllm-linux-x64-gnu-2.0.1.tgz",+ "integrity": "sha512-GH9u/SPUZm9KXjSoQZx5PRtJui0hO/OK+OmRHLZc8+IYrlgona6UQAw6uKHJ3cSEZp9f+XBRYgIrLmsEJW3HXA==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 18"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@ruvector/ruvllm-win32-x64-msvc": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-win32-x64-msvc/-/ruvllm-win32-x64-msvc-2.0.1.tgz",+ "integrity": "sha512-sRGNOMAcyC5p/nITnR0HLFUEObZ9Mh/T1erNiqhKrNUqIPZM1qAYBgN3xmZp02isdiTilRpxQihz3j4EzGPXIw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 18"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@ruvector/tiny-dancer": {+ "version": "0.1.22",+ "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer/-/tiny-dancer-0.1.22.tgz",+ "integrity": "sha512-p5EeEk5i0IV1Mic3srmJ/yfZLL7Ip72+QXuuAGs5p0kFUkFfVr1mbAlSo/Tm8Z5/7WQtWlcJ277LBxpbEFjULA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18.0.0"+ },+ "optionalDependencies": {+ "@ruvector/tiny-dancer-darwin-arm64": "0.1.22",+ "@ruvector/tiny-dancer-darwin-x64": "0.1.22",+ "@ruvector/tiny-dancer-linux-arm64-gnu": "0.1.22",+ "@ruvector/tiny-dancer-linux-arm64-musl": "0.1.22",+ "@ruvector/tiny-dancer-linux-x64-gnu": "0.1.22",+ "@ruvector/tiny-dancer-linux-x64-musl": "0.1.22",+ "@ruvector/tiny-dancer-win32-arm64-msvc": "0.1.22",+ "@ruvector/tiny-dancer-win32-x64-msvc": "0.1.22"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/@ruvector/tiny-dancer-linux-x64-gnu": {+ "version": "0.1.22",+ "resolved": "https://registry.npmjs.org/@ruvector/tiny-dancer-linux-x64-gnu/-/tiny-dancer-linux-x64-gnu-0.1.22.tgz",+ "integrity": "sha512-7Y17JbuEbsyMXY1Iqt13xOM9bSr6niyJqUDwb7LNfXqb3k0M63B6i5D63d8WrGYLrp0Zij99XxHuBaCwrC1+4A==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 18"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/accepts": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",+ "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "mime-types": "^3.0.0",+ "negotiator": "^1.0.0"+ },+ "engines": {+ "node": ">= 0.6"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/agentdb": {+ "version": "3.0.0-alpha.17",+ "resolved": "https://registry.npmjs.org/agentdb/-/agentdb-3.0.0-alpha.17.tgz",+ "integrity": "sha512-LK8drZFQteNkff+ji52vCmIXyE3A3ipzabx+ubBcX0CRgF96GU8m36sWyOfqL7pWRfnYDgkEEEgZmagiNCaz/A==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "@modelcontextprotocol/sdk": "^1.20.1",+ "@opentelemetry/api": "^1.9.0",+ "@ruvector/graph-transformer": "^2.0.4",+ "ajv": "^8.18.0",+ "jsonwebtoken": "^9.0.2",+ "sql.js": "^1.13.0"+ },+ "bin": {+ "agentdb": "dist/src/cli/agentdb-cli.js"+ },+ "engines": {+ "node": ">=18.0.0"+ },+ "optionalDependencies": {+ "@opentelemetry/resources": "^1.25.0",+ "@opentelemetry/sdk-node": "^0.218.0",+ "@opentelemetry/semantic-conventions": "^1.25.0",+ "@ruvector/attention": "^0.1.2",+ "@ruvector/gnn": "^0.1.23",+ "@ruvector/graph-node": "^2.0.2",+ "@ruvector/router": "^0.1.15",+ "@ruvector/ruvllm": "^2.5.1",+ "@ruvector/rvf": "^0.1.9",+ "@ruvector/rvf-node": "^0.1.7",+ "@ruvector/rvf-solver": "^0.1.7",+ "@ruvector/rvf-wasm": "^0.1.6",+ "@ruvector/sona": "^0.1.4",+ "@xenova/transformers": "^2.17.2",+ "argon2": "^0.44.0",+ "better-sqlite3": "^11.8.1",+ "chalk": "^5.3.0",+ "commander": "^12.1.0",+ "hnswlib-node": "^3.0.0",+ "inquirer": "^9.3.8",+ "ruvector": "^0.1.30",+ "ruvector-attention-wasm": "^0.1.32",+ "ruvector-graph-transformer-wasm": "^2.0.4"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/agentdb/node_modules/@ruvector/ruvllm": {+ "version": "2.5.6",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm/-/ruvllm-2.5.6.tgz",+ "integrity": "sha512-B29ej1aJCNN7UCiIj0wtDMLCe01UWA7KMPTSAriGeey13aNYnstsTD+lz3tkglLSMSdwf9ozQ+N4lVQXvc96+A==",+ "dev": true,+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "dependencies": {+ "chalk": "^4.1.2",+ "commander": "^12.0.0",+ "ora": "^5.4.1"+ },+ "bin": {+ "ruvllm": "bin/cli.js"+ },+ "engines": {+ "node": ">= 18"+ },+ "optionalDependencies": {+ "@ruvector/ruvllm-darwin-arm64": "2.0.1",+ "@ruvector/ruvllm-darwin-x64": "2.0.1",+ "@ruvector/ruvllm-linux-arm64-gnu": "2.0.1",+ "@ruvector/ruvllm-linux-x64-gnu": "2.0.1",+ "@ruvector/ruvllm-win32-x64-msvc": "2.0.1"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/agentdb/node_modules/@ruvector/ruvllm/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/agentic-flow": {+ "version": "2.0.12-fix.8",+ "resolved": "https://registry.npmjs.org/agentic-flow/-/agentic-flow-2.0.12-fix.8.tgz",+ "integrity": "sha512-pp36lAT7lXF9cyXA7KqUBe8pg7nUrGrhb3hplzTJ1V2B6y7n+jBG8/wH1gTNWk+i1+Zzzgl2zfngmY9u2qEOFg==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "dependencies": {+ "@anthropic-ai/claude-agent-sdk": "^0.1.5",+ "@anthropic-ai/sdk": "^0.65.0",+ "@google/genai": "^1.22.0",+ "@ruvector/core": "^0.1.29",+ "@ruvector/edge-full": "^0.1.0",+ "@ruvector/router": "^0.1.25",+ "@ruvector/ruvllm": "^0.2.3",+ "@ruvector/tiny-dancer": "^0.1.17",+ "@supabase/supabase-js": "^2.78.0",+ "@xenova/transformers": "^2.17.2",+ "axios": "^1.12.2",+ "dotenv": "^16.4.5",+ "express": "^5.1.0",+ "fastmcp": "^3.19.0",+ "glob": "^13.0.0","gun": "^0.2020.1241","http-proxy-middleware": "^3.0.5","ruvector": "^0.1.85",@@ -6555,585 +8496,1764 @@"yaml": "^2.8.1","zod": "^3.25.76"},- "bin": {- "agentdb": "dist/agentdb/cli/agentdb-cli.js",- "agentic-flow": "dist/cli-proxy.js"+ "bin": {+ "agentdb": "dist/agentdb/cli/agentdb-cli.js",+ "agentic-flow": "dist/cli-proxy.js"+ },+ "engines": {+ "node": ">=18.0.0"+ },+ "optionalDependencies": {+ "@rollup/rollup-darwin-arm64": "^4.59.0",+ "@ruvector/attention": "^0.1.4",+ "@ruvector/sona": "^0.1.4",+ "agentdb": "^3.0.0-alpha.14",+ "better-sqlite3": "^11.10.0",+ "onnxruntime-node": "^1.23.2",+ "sharp": "^0.32.6",+ "sql.js": "^1.11.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/balanced-match": {+ "version": "4.0.4",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/bl": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",+ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "buffer": "^5.5.0",+ "inherits": "^2.0.4",+ "readable-stream": "^3.4.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/body-parser": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz",+ "integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "bytes": "^3.1.2",+ "content-type": "^2.0.0",+ "debug": "^4.4.3",+ "http-errors": "^2.0.1",+ "iconv-lite": "^0.7.2",+ "on-finished": "^2.4.1",+ "qs": "^6.15.2",+ "raw-body": "^3.0.2",+ "type-is": "^2.1.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/body-parser/node_modules/content-type": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz",+ "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/brace-expansion": {+ "version": "5.0.7",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",+ "integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^4.0.2"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/buffer": {+ "version": "5.7.1",+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "base64-js": "^1.3.1",+ "ieee754": "^1.1.13"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/cjs-module-lexer": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",+ "dev": true,+ "license": "MIT",+ "optional": true+ },+ "@claude-flow/plugin-agent-federation/node_modules/cli-cursor": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",+ "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "restore-cursor": "^3.1.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/content-disposition": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz",+ "integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/cookie-signature": {+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",+ "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.6.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/escape-string-regexp": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/express": {+ "version": "5.2.1",+ "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",+ "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "accepts": "^2.0.0",+ "body-parser": "^2.2.1",+ "content-disposition": "^1.0.0",+ "content-type": "^1.0.5",+ "cookie": "^0.7.1",+ "cookie-signature": "^1.2.1",+ "debug": "^4.4.0",+ "depd": "^2.0.0",+ "encodeurl": "^2.0.0",+ "escape-html": "^1.0.3",+ "etag": "^1.8.1",+ "finalhandler": "^2.1.0",+ "fresh": "^2.0.0",+ "http-errors": "^2.0.0",+ "merge-descriptors": "^2.0.0",+ "mime-types": "^3.0.0",+ "on-finished": "^2.4.1",+ "once": "^1.4.0",+ "parseurl": "^1.3.3",+ "proxy-addr": "^2.0.7",+ "qs": "^6.14.0",+ "range-parser": "^1.2.1",+ "router": "^2.2.0",+ "send": "^1.1.0",+ "serve-static": "^2.2.0",+ "statuses": "^2.0.1",+ "type-is": "^2.0.1",+ "vary": "^1.1.2"+ },+ "engines": {+ "node": ">= 18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/finalhandler": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",+ "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "debug": "^4.4.0",+ "encodeurl": "^2.0.0",+ "escape-html": "^1.0.3",+ "on-finished": "^2.4.1",+ "parseurl": "^1.3.3",+ "statuses": "^2.0.1"+ },+ "engines": {+ "node": ">= 18.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/fresh": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",+ "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.8"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/glob": {+ "version": "13.0.6",+ "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",+ "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "minimatch": "^10.2.2",+ "minipass": "^7.1.3",+ "path-scurry": "^2.0.2"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/global-agent": {+ "version": "4.1.3",+ "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-4.1.3.tgz",+ "integrity": "sha512-KUJEViiuFT3I97t+GYMikLPJS2Lfo/S2F+DQuBWzuzaMPnvt5yyZePzArx36fBzpGTxZjIpDbXLeySLgh+k76g==",+ "dev": true,+ "license": "BSD-3-Clause",+ "optional": true,+ "dependencies": {+ "globalthis": "^1.0.2",+ "matcher": "^4.0.0",+ "semver": "^7.3.5",+ "serialize-error": "^8.1.0"+ },+ "engines": {+ "node": ">=10.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/iconv-lite": {+ "version": "0.7.2",+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",+ "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "safer-buffer": ">= 2.1.2 < 3.0.0"+ },+ "engines": {+ "node": ">=0.10.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/import-in-the-middle": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.2.0.tgz",+ "integrity": "sha512-vR2B6HKIhaBjcZr2bLpFiJ1VbzOlRQ7aby4/gw5WPIzToLjqpfWw3VJ4sk1uDchoOODEirvO2jyrSPtUSL5CrQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "acorn": "^8.15.0",+ "acorn-import-attributes": "^1.9.5",+ "cjs-module-lexer": "^2.2.0",+ "module-details-from-path": "^1.0.4"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/is-interactive": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",+ "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=8"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/is-unicode-supported": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",+ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/log-symbols": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",+ "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "chalk": "^4.1.0",+ "is-unicode-supported": "^0.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/log-symbols/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/lru-cache": {+ "version": "11.5.1",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",+ "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": "20 || >=22"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/matcher": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/matcher/-/matcher-4.0.0.tgz",+ "integrity": "sha512-S6x5wmcDmsDRRU/c2dkccDwQPXoFczc5+HpQ2lON8pnvHlnvHAHj5WlLVvw6n6vNyHuVugYrFohYxbS+pvFpKQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "escape-string-regexp": "^4.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/media-typer": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",+ "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.8"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/merge-descriptors": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",+ "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/mime-db": {+ "version": "1.54.0",+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",+ "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.6"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/mime-types": {+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",+ "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "mime-db": "^1.54.0"+ },+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/mimic-fn": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=6"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/minimatch": {+ "version": "10.2.5",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",+ "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "brace-expansion": "^5.0.5"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/minipass": {+ "version": "7.1.3",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",+ "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": ">=16 || 14 >=14.17"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/negotiator": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",+ "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.6"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/onetime": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "mimic-fn": "^2.1.0"+ },+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/onnxruntime-common": {+ "version": "1.27.0",+ "resolved": "https://registry.npmjs.org/onnxruntime-common/-/onnxruntime-common-1.27.0.tgz",+ "integrity": "sha512-3KxL5wIVqa8Ex08jxSzncm9CMgw8CjOFyOQ7SxvG9o0cVLlhTNKXyIQuTbtX4tGPJEf73OER2xrjt4HJSBL4ow==",+ "dev": true,+ "license": "MIT",+ "optional": true+ },+ "@claude-flow/plugin-agent-federation/node_modules/onnxruntime-node": {+ "version": "1.27.0",+ "resolved": "https://registry.npmjs.org/onnxruntime-node/-/onnxruntime-node-1.27.0.tgz",+ "integrity": "sha512-QEzGwrvNBgv4uPVdnbHsOGG4G6T96mdlcFI8aAKPjMU8wOPpVocPXb6k3QGkaZagVTv2G9Bnnbo6Z3JdXr1fQw==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32",+ "darwin",+ "linux"+ ],+ "dependencies": {+ "adm-zip": "^0.5.16",+ "global-agent": "^4.1.3",+ "onnxruntime-common": "1.27.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/ora": {+ "version": "5.4.1",+ "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz",+ "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "bl": "^4.1.0",+ "chalk": "^4.1.0",+ "cli-cursor": "^3.1.0",+ "cli-spinners": "^2.5.0",+ "is-interactive": "^1.0.0",+ "is-unicode-supported": "^0.1.0",+ "log-symbols": "^4.1.0",+ "strip-ansi": "^6.0.0",+ "wcwidth": "^1.0.1"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/ora/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/path-scurry": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",+ "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "lru-cache": "^11.0.0",+ "minipass": "^7.1.2"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/qs": {+ "version": "6.15.3",+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz",+ "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==",+ "dev": true,+ "license": "BSD-3-Clause",+ "dependencies": {+ "es-define-property": "^1.0.1",+ "side-channel": "^1.1.1"+ },+ "engines": {+ "node": ">=0.6"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/require-in-the-middle": {+ "version": "8.0.1",+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "debug": "^4.3.5",+ "module-details-from-path": "^1.0.3"+ },+ "engines": {+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/restore-cursor": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",+ "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "onetime": "^5.1.0",+ "signal-exit": "^3.0.2"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/send": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",+ "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "debug": "^4.4.3",+ "encodeurl": "^2.0.0",+ "escape-html": "^1.0.3",+ "etag": "^1.8.1",+ "fresh": "^2.0.0",+ "http-errors": "^2.0.1",+ "mime-types": "^3.0.2",+ "ms": "^2.1.3",+ "on-finished": "^2.4.1",+ "range-parser": "^1.2.1",+ "statuses": "^2.0.2"+ },+ "engines": {+ "node": ">= 18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/serialize-error": {+ "version": "8.1.0",+ "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz",+ "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "type-fest": "^0.20.2"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/serve-static": {+ "version": "2.2.1",+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",+ "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "encodeurl": "^2.0.0",+ "escape-html": "^1.0.3",+ "parseurl": "^1.3.3",+ "send": "^1.2.0"+ },+ "engines": {+ "node": ">= 18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/type-fest": {+ "version": "0.20.2",+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",+ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",+ "dev": true,+ "license": "(MIT OR CC0-1.0)",+ "optional": true,+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/type-is": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz",+ "integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "content-type": "^2.0.0",+ "media-typer": "^1.1.0",+ "mime-types": "^3.0.0"+ },+ "engines": {+ "node": ">= 18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "@claude-flow/plugin-agent-federation/node_modules/type-is/node_modules/content-type": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz",+ "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"+ }+ },+ "@claude-flow/plugin-iot-cognitum": {+ "version": "1.0.0-alpha.5",+ "license": "MIT",+ "dependencies": {+ "@cognitum-one/sdk": "^0.2.1"+ },+ "bin": {+ "cognitum-iot": "dist/bin.js"+ },+ "devDependencies": {+ "@claude-flow/shared": "3.0.0-alpha.8",+ "typescript": "^5.4.0",+ "vitest": "^4.1.0"+ },+ "peerDependencies": {+ "multicast-dns": "^7.2.5"+ },+ "peerDependenciesMeta": {+ "multicast-dns": {+ "optional": true+ }+ }+ },+ "@claude-flow/plugins": {+ "version": "3.0.0-alpha.7",+ "license": "MIT",+ "dependencies": {+ "events": "^3.3.0"+ },+ "devDependencies": {+ "@types/node": "^20.10.0",+ "typescript": "^5.3.0",+ "vitest": "^4.1.0"+ },+ "engines": {+ "node": ">=20.0.0"+ },+ "peerDependencies": {+ "@claude-flow/hooks": "^3.0.0-alpha.2",+ "@claude-flow/memory": "^3.0.0-alpha.2",+ "@ruvector/learning-wasm": "^0.1.0",+ "@ruvector/wasm": "^0.1.0"+ },+ "peerDependenciesMeta": {+ "@claude-flow/hooks": {+ "optional": true+ },+ "@claude-flow/memory": {+ "optional": true+ },+ "@ruvector/learning-wasm": {+ "optional": true+ },+ "@ruvector/wasm": {+ "optional": true+ }+ }+ },+ "@claude-flow/providers": {+ "version": "3.0.0-alpha.6",+ "license": "MIT",+ "dependencies": {+ "events": "^3.3.0"+ },+ "devDependencies": {+ "@types/node": "^20.0.0",+ "dotenv": "^16.4.5",+ "tsx": "^4.19.0",+ "typescript": "^5.5.0",+ "vitest": "^4.1.0"+ },+ "engines": {+ "node": ">=20.0.0"+ },+ "peerDependencies": {+ "@ruvector/ruvllm": "^0.2.3"+ },+ "peerDependenciesMeta": {+ "@ruvector/ruvllm": {+ "optional": true+ }+ }+ },+ "@claude-flow/security": {+ "version": "3.0.0-alpha.10",+ "dependencies": {+ "@noble/ed25519": "^2.1.0",+ "bcryptjs": "^3.0.3",+ "zod": "^3.22.0"+ },+ "devDependencies": {+ "vitest": "^4.1.0"+ }+ },+ "@claude-flow/shared": {+ "version": "3.0.0-alpha.8",+ "dependencies": {+ "sql.js": "^1.10.3"+ },+ "devDependencies": {+ "@types/cors": "^2.8.17",+ "@types/express": "^4.17.21",+ "@types/node": "^20.0.0",+ "@types/sql.js": "^1.4.9",+ "@types/ws": "^8.5.10",+ "cors": "^2.8.5",+ "express": "^4.21.0",+ "helmet": "^7.1.0",+ "vitest": "^4.1.0",+ "ws": "^8.16.0",+ "zod": "^3.22.4"+ }+ },+ "@claude-flow/swarm": {+ "version": "3.0.0-alpha.7",+ "devDependencies": {+ "vitest": "^4.1.0"+ }+ },+ "@claude-flow/testing": {+ "version": "3.0.0-alpha.6",+ "devDependencies": {+ "@claude-flow/memory": "^3.0.0-alpha.2",+ "@claude-flow/shared": "^3.0.0-alpha.1",+ "@claude-flow/swarm": "^3.0.0-alpha.1",+ "typescript": "^5.3.0",+ "vitest": "^4.1.0"+ },+ "peerDependencies": {+ "@claude-flow/memory": "^3.0.0-alpha.2",+ "@claude-flow/shared": "^3.0.0-alpha.1",+ "@claude-flow/swarm": "^3.0.0-alpha.1",+ "vitest": ">=4.0.16"+ }+ },+ "@claude-flow/testing/node_modules/@claude-flow/memory": {+ "version": "3.0.0-alpha.21",+ "resolved": "https://registry.npmjs.org/@claude-flow/memory/-/memory-3.0.0-alpha.21.tgz",+ "integrity": "sha512-5H5rJOh7nGuzmFazTvJWZIbeZvf+HJjonM98vWijzbL4kQvBDWj6zwhsxQ3wrwJSrs5ALgQQmhxQ7Mr+gagAFw==",+ "cpu": [+ "x64",+ "arm64"+ ],+ "dev": true,+ "os": [+ "darwin",+ "linux",+ "win32"+ ],+ "dependencies": {+ "agentdb": "^3.0.0-alpha.16",+ "sql.js": "^1.10.3"+ },+ "optionalDependencies": {+ "better-sqlite3": "^12.9.0"+ }+ },+ "@claude-flow/testing/node_modules/@claude-flow/memory/node_modules/better-sqlite3": {+ "version": "12.11.1",+ "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.11.1.tgz",+ "integrity": "sha512-dq9AtApgg5PGFtBzPFSBl3HZQjHok5gaQCM6zh2Yk0aSmDCs1CbnVI8/HgASQkNKsWFpseIO9beg5xxpYhbIfA==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "bindings": "^1.5.0",+ "prebuild-install": "^7.1.1"+ },+ "engines": {+ "node": "20.x || 22.x || 23.x || 24.x || 25.x || 26.x"+ }+ },+ "@claude-flow/testing/node_modules/@opentelemetry/api-logs": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.218.0.tgz",+ "integrity": "sha512-fmEWp5kXlGEc3i/lR698Hz41DfGyN4Tbe4g7L1AxSc7fF8Xeh/FQ9Quqpa9dVA413Q1Ad43QOLzU4JoXgbFPWw==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/api": "^1.3.0"+ },+ "engines": {+ "node": ">=8.0.0"+ }+ },+ "@claude-flow/testing/node_modules/@opentelemetry/context-async-hooks": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.7.1.tgz",+ "integrity": "sha512-OPFBYuXEn1E4ja3Y6eeA7O+ZnLBNcXTV5Cgsn1VaqBZ6hC5FnpZPLBNme1LJY8ZtF4aOujPKFoeWN4ik487KuQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"+ }+ },+ "@claude-flow/testing/node_modules/@opentelemetry/core": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.7.1.tgz",+ "integrity": "sha512-QAqIj32AtK6+pEVNG7EOVxHdE06RP+FM5qpiEJ4RtDcFIqKUZHYhl7/7UY5efhwmwNAg7j8QbJVBLxMerc0+gw==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"+ }+ },+ "@claude-flow/testing/node_modules/@opentelemetry/exporter-metrics-otlp-http": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.218.0.tgz",+ "integrity": "sha512-bV7d2OuMpZu2+gAaxUAhzfZ0h3WVZk8ETQUEE3DNSntbTaMpuITjtm8I0rNyHFdm7Ax57K6ty7SgFXlBmOLIvQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-metrics": "2.7.1"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/testing/node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"+ }+ },+ "@claude-flow/testing/node_modules/@opentelemetry/exporter-prometheus": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.218.0.tgz",+ "integrity": "sha512-RT5oEyu1kddZJ1vt7/BUo5wV+P7hpNAESsR3dUd3+8deHuX7gWNoCOZn+SfDT+hJHlIJ5h/AxiCLXIrutswDJg==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-metrics": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/testing/node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {- "node": ">=18.0.0"+ "node": "^18.19.0 || >=20.6.0"},- "optionalDependencies": {- "@rollup/rollup-darwin-arm64": "^4.59.0",- "@ruvector/attention": "^0.1.4",- "@ruvector/sona": "^0.1.4",- "agentdb": "^3.0.0-alpha.14",- "better-sqlite3": "^11.10.0",- "onnxruntime-node": "^1.23.2",- "sharp": "^0.32.6",- "sql.js": "^1.11.0"+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/balanced-match": {- "version": "4.0.4",- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",- "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",+ "@claude-flow/testing/node_modules/@opentelemetry/exporter-trace-otlp-grpc": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.218.0.tgz",+ "integrity": "sha512-3fXxVQEj9TNAFaCi79JeFKfeLd0sDtInaR3gaZDVlzNSPHtz8PZuCV34JKWjD4XXzT20IdMe8IpX6mRVNDA4Tw==","dev": true,- "license": "MIT",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@grpc/grpc-js": "^1.14.3",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-grpc-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"+ },"engines": {- "node": "18 || 20 || >=22"+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/bl": {- "version": "4.1.0",- "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",- "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",+ "@claude-flow/testing/node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==","dev": true,- "license": "MIT",+ "license": "Apache-2.0","optional": true,"dependencies": {- "buffer": "^5.5.0",- "inherits": "^2.0.4",- "readable-stream": "^3.4.0"+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/body-parser": {- "version": "2.3.0",- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz",- "integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==",+ "@claude-flow/testing/node_modules/@opentelemetry/exporter-trace-otlp-http": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.218.0.tgz",+ "integrity": "sha512-8dqezsmPhtKitIK/eTipZhYl9EX2/gNQ5zUMhaz3uxEURwfkNf8IPvo6yNfrzbxdtpAOybS/+h7wmIWYqFSpiw==","dev": true,- "license": "MIT",+ "license": "Apache-2.0",+ "optional": true,"dependencies": {- "bytes": "^3.1.2",- "content-type": "^2.0.0",- "debug": "^4.4.3",- "http-errors": "^2.0.1",- "iconv-lite": "^0.7.2",- "on-finished": "^2.4.1",- "qs": "^6.15.2",- "raw-body": "^3.0.2",- "type-is": "^2.1.0"+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"},"engines": {- "node": ">=18"+ "node": "^18.19.0 || >=20.6.0"},- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/express"+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/body-parser/node_modules/content-type": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz",- "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==",+ "@claude-flow/testing/node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==","dev": true,- "license": "MIT",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },"engines": {- "node": ">=18"+ "node": "^18.19.0 || >=20.6.0"},- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/express"+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/brace-expansion": {- "version": "5.0.7",- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",- "integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",+ "@claude-flow/testing/node_modules/@opentelemetry/exporter-trace-otlp-proto": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.218.0.tgz",+ "integrity": "sha512-r1Msf8SNLRmwh9J6XQ5uh82D7CdDWMNHnPB7LAVHjzut0TkSeKc5KcIvr4SvHvfk/xwN5gxC+VLKQ1k0o8PSPw==","dev": true,- "license": "MIT",+ "license": "Apache-2.0",+ "optional": true,"dependencies": {- "balanced-match": "^4.0.2"+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"},"engines": {- "node": "18 || 20 || >=22"+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/buffer": {- "version": "5.7.1",- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",- "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",+ "@claude-flow/testing/node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==","dev": true,- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/feross"- },- {- "type": "patreon",- "url": "https://www.patreon.com/feross"- },- {- "type": "consulting",- "url": "https://feross.org/support"- }- ],- "license": "MIT",+ "license": "Apache-2.0","optional": true,"dependencies": {- "base64-js": "^1.3.1",- "ieee754": "^1.1.13"+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/cjs-module-lexer": {- "version": "2.2.0",- "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",- "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==",+ "@claude-flow/testing/node_modules/@opentelemetry/exporter-zipkin": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.7.1.tgz",+ "integrity": "sha512-mfsD9bKAxcKrh5+y08TPodvClBO0CznBE3p79YAGnO81WI4LrdsGA65T53e4iTSbCalW4WaUpkbeJcbpyIUHfg==","dev": true,- "license": "MIT",- "optional": true+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.0.0"+ }},- "@claude-flow/plugin-agent-federation/node_modules/cli-cursor": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",- "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",+ "@claude-flow/testing/node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==","dev": true,- "license": "MIT",+ "license": "Apache-2.0","optional": true,"dependencies": {- "restore-cursor": "^3.1.0"+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {- "node": ">=8"+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/content-disposition": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz",- "integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==",+ "@claude-flow/testing/node_modules/@opentelemetry/instrumentation": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.218.0.tgz",+ "integrity": "sha512-mIZil8Es+sYDK5m+DQiwAwF57F14TF2YlEqvIjZ/RQWcxDBwRGsKfdK2Tv65OU9meQKCMzSIFS9mxAcnAb6Bkg==","dev": true,- "license": "MIT",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/api-logs": "0.218.0",+ "import-in-the-middle": "^3.0.0",+ "require-in-the-middle": "^8.0.0"+ },"engines": {- "node": ">=18"+ "node": "^18.19.0 || >=20.6.0"},- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/express"+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/cookie-signature": {- "version": "1.2.2",- "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",- "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",+ "@claude-flow/testing/node_modules/@opentelemetry/otlp-exporter-base": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.218.0.tgz",+ "integrity": "sha512-ZwqpkNL5W7RyGJPDZ9g06DvKp8KFTWPJPN12anpMQYSKpTSU0z3EIZuPq9vPGpS8siFyOqDYDAuCwlNO9FqgbA==",+ "dev": true,+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-transformer": "0.218.0"+ },+ "engines": {+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"+ }+ },+ "@claude-flow/testing/node_modules/@opentelemetry/otlp-grpc-exporter-base": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.218.0.tgz",+ "integrity": "sha512-H/lCGJ536N98VpYJOaWTQOkv4Dx6TnmStK6Rqfu1W7KkFbPAx04hjdYEMZF/YbnHzPUSIK4kM6OE2GKGBTpV9A==","dev": true,- "license": "MIT",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@grpc/grpc-js": "^1.14.3",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/otlp-transformer": "0.218.0"+ },"engines": {- "node": ">=6.6.0"+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/escape-string-regexp": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",+ "@claude-flow/testing/node_modules/@opentelemetry/otlp-transformer": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.218.0.tgz",+ "integrity": "sha512-CFaKH87WAzjuJ4awowTTLzUvMfaRfiOFG5+qm5S5ncyalRtN4ecQ+YmuANJSCrVPuvZFEkUgKhBPBndxi3rHsQ==","dev": true,- "license": "MIT",+ "license": "Apache-2.0","optional": true,+ "dependencies": {+ "@opentelemetry/api-logs": "0.218.0",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-logs": "0.218.0",+ "@opentelemetry/sdk-metrics": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"+ },"engines": {- "node": ">=10"+ "node": "^18.19.0 || >=20.6.0"},- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "peerDependencies": {+ "@opentelemetry/api": "^1.3.0"}},- "@claude-flow/plugin-agent-federation/node_modules/express": {- "version": "5.2.1",- "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",- "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",+ "@claude-flow/testing/node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==","dev": true,- "license": "MIT",+ "license": "Apache-2.0",+ "optional": true,"dependencies": {- "accepts": "^2.0.0",- "body-parser": "^2.2.1",- "content-disposition": "^1.0.0",- "content-type": "^1.0.5",- "cookie": "^0.7.1",- "cookie-signature": "^1.2.1",- "debug": "^4.4.0",- "depd": "^2.0.0",- "encodeurl": "^2.0.0",- "escape-html": "^1.0.3",- "etag": "^1.8.1",- "finalhandler": "^2.1.0",- "fresh": "^2.0.0",- "http-errors": "^2.0.0",- "merge-descriptors": "^2.0.0",- "mime-types": "^3.0.0",- "on-finished": "^2.4.1",- "once": "^1.4.0",- "parseurl": "^1.3.3",- "proxy-addr": "^2.0.7",- "qs": "^6.14.0",- "range-parser": "^1.2.1",- "router": "^2.2.0",- "send": "^1.1.0",- "serve-static": "^2.2.0",- "statuses": "^2.0.1",- "type-is": "^2.0.1",- "vary": "^1.1.2"+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {- "node": ">= 18"+ "node": "^18.19.0 || >=20.6.0"},- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/express"+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/finalhandler": {- "version": "2.1.1",- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",- "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",+ "@claude-flow/testing/node_modules/@opentelemetry/propagator-b3": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.7.1.tgz",+ "integrity": "sha512-RJid6E2CKyeGfKBzXKF21ejabGMHypFkPAh3qZ+NvI+SGjuIye79t3PmiqcDgtRzdKH6ynXzbfslQ8DfpRUg2A==","dev": true,- "license": "MIT",+ "license": "Apache-2.0",+ "optional": true,"dependencies": {- "debug": "^4.4.0",- "encodeurl": "^2.0.0",- "escape-html": "^1.0.3",- "on-finished": "^2.4.1",- "parseurl": "^1.3.3",- "statuses": "^2.0.1"+ "@opentelemetry/core": "2.7.1"},"engines": {- "node": ">= 18.0.0"+ "node": "^18.19.0 || >=20.6.0"},- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/express"+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/fresh": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",- "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",+ "@claude-flow/testing/node_modules/@opentelemetry/propagator-jaeger": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.7.1.tgz",+ "integrity": "sha512-KMjVBHzP4N60bOzxja76M1F1hZZ43lGPga5ix+mkv9+kk1nx9SbkxSvJsMbuVUxdPQmsPTqGShmhN8ulrMOg6Q==","dev": true,- "license": "MIT",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1"+ },"engines": {- "node": ">= 0.8"+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/glob": {- "version": "13.0.6",- "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",- "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",+ "@claude-flow/testing/node_modules/@opentelemetry/sdk-logs": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.218.0.tgz",+ "integrity": "sha512-QvnNdugatFTVCJXH0Mcu7GOOJSylA9j127kIezOE4YwTI4YbowRons2K4WZTv5FMS8T4q9P0NdaRHdkSmeAIag==","dev": true,- "license": "BlueOak-1.0.0",+ "license": "Apache-2.0",+ "optional": true,"dependencies": {- "minimatch": "^10.2.2",- "minipass": "^7.1.3",- "path-scurry": "^2.0.2"+ "@opentelemetry/api-logs": "0.218.0",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {- "node": "18 || 20 || >=22"+ "node": "^18.19.0 || >=20.6.0"},- "funding": {- "url": "https://github.com/sponsors/isaacs"+ "peerDependencies": {+ "@opentelemetry/api": ">=1.4.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/global-agent": {- "version": "4.1.3",- "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-4.1.3.tgz",- "integrity": "sha512-KUJEViiuFT3I97t+GYMikLPJS2Lfo/S2F+DQuBWzuzaMPnvt5yyZePzArx36fBzpGTxZjIpDbXLeySLgh+k76g==",+ "@claude-flow/testing/node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==","dev": true,- "license": "BSD-3-Clause",+ "license": "Apache-2.0","optional": true,"dependencies": {- "globalthis": "^1.0.2",- "matcher": "^4.0.0",- "semver": "^7.3.5",- "serialize-error": "^8.1.0"+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {- "node": ">=10.0"+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/iconv-lite": {- "version": "0.7.2",- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",- "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",+ "@claude-flow/testing/node_modules/@opentelemetry/sdk-metrics": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.7.1.tgz",+ "integrity": "sha512-MpDJdkiFDs3Pm1RHO3KByuZbuBdJEXEAkiC0+yJdsZGVCdf1RpHR6n+LHDcS7ffmfrt5kVCzJSCfm4z2C7v0uQ==","dev": true,- "license": "MIT",+ "license": "Apache-2.0",+ "optional": true,"dependencies": {- "safer-buffer": ">= 2.1.2 < 3.0.0"+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1"},"engines": {- "node": ">=0.10.0"+ "node": "^18.19.0 || >=20.6.0"},- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/express"+ "peerDependencies": {+ "@opentelemetry/api": ">=1.9.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/import-in-the-middle": {- "version": "3.2.0",- "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.2.0.tgz",- "integrity": "sha512-vR2B6HKIhaBjcZr2bLpFiJ1VbzOlRQ7aby4/gw5WPIzToLjqpfWw3VJ4sk1uDchoOODEirvO2jyrSPtUSL5CrQ==",+ "@claude-flow/testing/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==","dev": true,"license": "Apache-2.0","optional": true,"dependencies": {- "acorn": "^8.15.0",- "acorn-import-attributes": "^1.9.5",- "cjs-module-lexer": "^2.2.0",- "module-details-from-path": "^1.0.4"+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {- "node": ">=18"+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/is-interactive": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",- "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",+ "@claude-flow/testing/node_modules/@opentelemetry/sdk-node": {+ "version": "0.218.0",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.218.0.tgz",+ "integrity": "sha512-tPMjHrLV5gsfNdYqoRHjeGbCAZBXXD9c1Qo/2ut7VwnUABDNh76xNxrT0SEhkIIJuCN45bbN1vZnYL1gY0IkOg==","dev": true,- "license": "MIT",+ "license": "Apache-2.0","optional": true,+ "dependencies": {+ "@opentelemetry/api-logs": "0.218.0",+ "@opentelemetry/configuration": "0.218.0",+ "@opentelemetry/context-async-hooks": "2.7.1",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/exporter-logs-otlp-grpc": "0.218.0",+ "@opentelemetry/exporter-logs-otlp-http": "0.218.0",+ "@opentelemetry/exporter-logs-otlp-proto": "0.218.0",+ "@opentelemetry/exporter-metrics-otlp-grpc": "0.218.0",+ "@opentelemetry/exporter-metrics-otlp-http": "0.218.0",+ "@opentelemetry/exporter-metrics-otlp-proto": "0.218.0",+ "@opentelemetry/exporter-prometheus": "0.218.0",+ "@opentelemetry/exporter-trace-otlp-grpc": "0.218.0",+ "@opentelemetry/exporter-trace-otlp-http": "0.218.0",+ "@opentelemetry/exporter-trace-otlp-proto": "0.218.0",+ "@opentelemetry/exporter-zipkin": "2.7.1",+ "@opentelemetry/instrumentation": "0.218.0",+ "@opentelemetry/otlp-exporter-base": "0.218.0",+ "@opentelemetry/propagator-b3": "2.7.1",+ "@opentelemetry/propagator-jaeger": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/sdk-logs": "0.218.0",+ "@opentelemetry/sdk-metrics": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1",+ "@opentelemetry/sdk-trace-node": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },"engines": {- "node": ">=8"+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/is-unicode-supported": {- "version": "0.1.0",- "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",- "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",+ "@claude-flow/testing/node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==","dev": true,- "license": "MIT",+ "license": "Apache-2.0","optional": true,+ "dependencies": {+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"+ },"engines": {- "node": ">=10"+ "node": "^18.19.0 || >=20.6.0"},- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/log-symbols": {- "version": "4.1.0",- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",- "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",+ "@claude-flow/testing/node_modules/@opentelemetry/sdk-trace-base": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.7.1.tgz",+ "integrity": "sha512-NAYIlsF8MPUsKqJMiDQJTMPOmlbawC1Iz/omMLygZ1C9am8fTKYjTaI+OZM+WTY3t3Glo0wnOg/6/pac6RGPPw==","dev": true,- "license": "MIT",+ "license": "Apache-2.0","optional": true,"dependencies": {- "chalk": "^4.1.0",- "is-unicode-supported": "^0.1.0"+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/resources": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {- "node": ">=10"+ "node": "^18.19.0 || >=20.6.0"},- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/log-symbols/node_modules/chalk": {- "version": "4.1.2",- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "@claude-flow/testing/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/resources": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.7.1.tgz",+ "integrity": "sha512-DeT6KKolmC4e/dRQvMQ/RwlnzhaqeiFOXY5ngoOPJ07GgVVKxZOg9EcrNZb5aTzUn+iCrJldAgOfQm1O/QfPAQ==","dev": true,- "license": "MIT",+ "license": "Apache-2.0","optional": true,"dependencies": {- "ansi-styles": "^4.1.0",- "supports-color": "^7.1.0"+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/semantic-conventions": "^1.29.0"},"engines": {- "node": ">=10"+ "node": "^18.19.0 || >=20.6.0"},- "funding": {- "url": "https://github.com/chalk/chalk?sponsor=1"+ "peerDependencies": {+ "@opentelemetry/api": ">=1.3.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/lru-cache": {- "version": "11.5.1",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",- "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",+ "@claude-flow/testing/node_modules/@opentelemetry/sdk-trace-node": {+ "version": "2.7.1",+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.7.1.tgz",+ "integrity": "sha512-pCpQxU68lV+I9s9svqMyVu5iHdDDUnqUpSxqwyCU8A9ejEsSnMPCbearwsUO4yk08ZJzAIUCFuReMdVQvHrdvg==","dev": true,- "license": "BlueOak-1.0.0",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@opentelemetry/context-async-hooks": "2.7.1",+ "@opentelemetry/core": "2.7.1",+ "@opentelemetry/sdk-trace-base": "2.7.1"+ },"engines": {- "node": "20 || >=22"+ "node": "^18.19.0 || >=20.6.0"+ },+ "peerDependencies": {+ "@opentelemetry/api": ">=1.0.0 <1.10.0"}},- "@claude-flow/plugin-agent-federation/node_modules/matcher": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/matcher/-/matcher-4.0.0.tgz",- "integrity": "sha512-S6x5wmcDmsDRRU/c2dkccDwQPXoFczc5+HpQ2lON8pnvHlnvHAHj5WlLVvw6n6vNyHuVugYrFohYxbS+pvFpKQ==",+ "@claude-flow/testing/node_modules/@ruvector/graph-node": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node/-/graph-node-2.0.4.tgz",+ "integrity": "sha512-pPUbQBF+Otnpd5YNgiQl3eaRsivi6NougS0hSmYbCd5i9gMJrr5u7oXL8pHwL/D9YbNKEkeIclhN6zu1rg5aUA==","dev": true,"license": "MIT","optional": true,- "dependencies": {- "escape-string-regexp": "^4.0.0"- },"engines": {- "node": ">=10"+ "node": ">=18.0.0"},- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "optionalDependencies": {+ "@ruvector/graph-node-darwin-arm64": "2.0.4",+ "@ruvector/graph-node-darwin-x64": "2.0.4",+ "@ruvector/graph-node-linux-arm64-gnu": "2.0.4",+ "@ruvector/graph-node-linux-x64-gnu": "2.0.4",+ "@ruvector/graph-node-win32-x64-msvc": "2.0.4"}},- "@claude-flow/plugin-agent-federation/node_modules/media-typer": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",- "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",+ "@claude-flow/testing/node_modules/@ruvector/graph-node-darwin-arm64": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-darwin-arm64/-/graph-node-darwin-arm64-2.0.4.tgz",+ "integrity": "sha512-9YBCI4JFDNCGSDzSApZng3yjdAb7u3Rq2Fn4yyuGbHy26fEie9TqfFDNQ7d+uK6mPcxDVJDCPnIOKcHnFsyMBQ==",+ "cpu": [+ "arm64"+ ],"dev": true,"license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],"engines": {- "node": ">= 0.8"+ "node": ">=18.0.0"}},- "@claude-flow/plugin-agent-federation/node_modules/merge-descriptors": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",- "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",+ "@claude-flow/testing/node_modules/@ruvector/graph-node-darwin-x64": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-darwin-x64/-/graph-node-darwin-x64-2.0.4.tgz",+ "integrity": "sha512-WW07+HmIdbv3jij2tqRWbkJt5m6uR76PXDosIwOkwBjyLbV3Ck5kSW5DONctA6cOQuTEeCcOo9sIKqr3J/f2pQ==",+ "cpu": [+ "x64"+ ],"dev": true,"license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],"engines": {- "node": ">=18"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "node": ">=18.0.0"}},- "@claude-flow/plugin-agent-federation/node_modules/mime-db": {- "version": "1.54.0",- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",- "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",+ "@claude-flow/testing/node_modules/@ruvector/graph-node-linux-arm64-gnu": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-linux-arm64-gnu/-/graph-node-linux-arm64-gnu-2.0.4.tgz",+ "integrity": "sha512-Z5OatE8CzaVCq5vgGOmowVSKOLxYvO1Dn0rvFL4d63fEvVONDpsVAMkR7rxRGHrgzMZMfpZ9EjZ0vu0KR08tRQ==",+ "cpu": [+ "arm64"+ ],"dev": true,"license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],"engines": {- "node": ">= 0.6"+ "node": ">=18.0.0"}},- "@claude-flow/plugin-agent-federation/node_modules/mime-types": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",- "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",+ "@claude-flow/testing/node_modules/@ruvector/graph-node-linux-x64-gnu": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-linux-x64-gnu/-/graph-node-linux-x64-gnu-2.0.4.tgz",+ "integrity": "sha512-RAdkLcB1gjEQcIsCxmSGHSOBbnUbCn7If8H9YrOqy5xxvmTVE25tkM49fpRRK3oINWJ9oQDBsAZr7GXKQZoLig==",+ "cpu": [+ "x64"+ ],"dev": true,"license": "MIT",- "dependencies": {- "mime-db": "^1.54.0"- },+ "optional": true,+ "os": [+ "linux"+ ],"engines": {- "node": ">=18"- },- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/express"+ "node": ">=18.0.0"}},- "@claude-flow/plugin-agent-federation/node_modules/mimic-fn": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",+ "@claude-flow/testing/node_modules/@ruvector/graph-node-win32-x64-msvc": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@ruvector/graph-node-win32-x64-msvc/-/graph-node-win32-x64-msvc-2.0.4.tgz",+ "integrity": "sha512-+z2uyfiPmbELGjwvo5RfDSjHTJWZWQQDxDYLAnnfqV9a0oM1VklRe34t97pvGg7tdCXgEpnR6yWk3OZRemQUEQ==",+ "cpu": [+ "x64"+ ],"dev": true,"license": "MIT","optional": true,+ "os": [+ "win32"+ ],"engines": {- "node": ">=6"+ "node": ">=18.0.0"}},- "@claude-flow/plugin-agent-federation/node_modules/minimatch": {- "version": "10.2.5",- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",- "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",+ "@claude-flow/testing/node_modules/@ruvector/ruvllm": {+ "version": "2.5.6",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm/-/ruvllm-2.5.6.tgz",+ "integrity": "sha512-B29ej1aJCNN7UCiIj0wtDMLCe01UWA7KMPTSAriGeey13aNYnstsTD+lz3tkglLSMSdwf9ozQ+N4lVQXvc96+A==","dev": true,- "license": "BlueOak-1.0.0",+ "license": "MIT OR Apache-2.0",+ "optional": true,"dependencies": {- "brace-expansion": "^5.0.5"+ "chalk": "^4.1.2",+ "commander": "^12.0.0",+ "ora": "^5.4.1"+ },+ "bin": {+ "ruvllm": "bin/cli.js"},"engines": {- "node": "18 || 20 || >=22"+ "node": ">= 18"},- "funding": {- "url": "https://github.com/sponsors/isaacs"+ "optionalDependencies": {+ "@ruvector/ruvllm-darwin-arm64": "2.0.1",+ "@ruvector/ruvllm-darwin-x64": "2.0.1",+ "@ruvector/ruvllm-linux-arm64-gnu": "2.0.1",+ "@ruvector/ruvllm-linux-x64-gnu": "2.0.1",+ "@ruvector/ruvllm-win32-x64-msvc": "2.0.1"}},- "@claude-flow/plugin-agent-federation/node_modules/minipass": {- "version": "7.1.3",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",- "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",+ "@claude-flow/testing/node_modules/@ruvector/ruvllm-darwin-arm64": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-darwin-arm64/-/ruvllm-darwin-arm64-2.0.1.tgz",+ "integrity": "sha512-giZb+TbErKLgURLC3CSmJKJl0bnJn+jFZk488ppyzrR6YGft6kO329Twnd+TiJNDxVOMgZefwVdsbF9jrUIgAQ==",+ "cpu": [+ "arm64"+ ],"dev": true,- "license": "BlueOak-1.0.0",+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "os": [+ "darwin"+ ],"engines": {- "node": ">=16 || 14 >=14.17"+ "node": ">= 18"}},- "@claude-flow/plugin-agent-federation/node_modules/negotiator": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",- "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",+ "@claude-flow/testing/node_modules/@ruvector/ruvllm-darwin-x64": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-darwin-x64/-/ruvllm-darwin-x64-2.0.1.tgz",+ "integrity": "sha512-DpVKFBXFxVPBiCGBw1AeiwsY1YVWfaCh+Eq0+pVLqD4kwwXKhRIWLnTQcuZVE5Gnt1Ku8MxhH2Zs++vKiuq3mA==",+ "cpu": [+ "x64"+ ],"dev": true,- "license": "MIT",+ "license": "MIT OR Apache-2.0",+ "optional": true,+ "os": [+ "darwin"+ ],"engines": {- "node": ">= 0.6"+ "node": ">= 18"}},- "@claude-flow/plugin-agent-federation/node_modules/onetime": {- "version": "5.1.2",- "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",- "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",+ "@claude-flow/testing/node_modules/@ruvector/ruvllm-linux-arm64-gnu": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-linux-arm64-gnu/-/ruvllm-linux-arm64-gnu-2.0.1.tgz",+ "integrity": "sha512-+u6Fe/Dsy4Y11m9IUmuoUeFtoUWc1ZVXxGB4JYomNDll63D03a0cpeKKaslgwOfFlfXlrFcs/eDrsYr07tQP5g==",+ "cpu": [+ "arm64"+ ],"dev": true,- "license": "MIT",+ "license": "MIT OR Apache-2.0","optional": true,- "dependencies": {- "mimic-fn": "^2.1.0"- },+ "os": [+ "linux"+ ],"engines": {- "node": ">=6"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "node": ">= 18"}},- "@claude-flow/plugin-agent-federation/node_modules/onnxruntime-common": {- "version": "1.27.0",- "resolved": "https://registry.npmjs.org/onnxruntime-common/-/onnxruntime-common-1.27.0.tgz",- "integrity": "sha512-3KxL5wIVqa8Ex08jxSzncm9CMgw8CjOFyOQ7SxvG9o0cVLlhTNKXyIQuTbtX4tGPJEf73OER2xrjt4HJSBL4ow==",- "dev": true,- "license": "MIT",- "optional": true- },- "@claude-flow/plugin-agent-federation/node_modules/onnxruntime-node": {- "version": "1.27.0",- "resolved": "https://registry.npmjs.org/onnxruntime-node/-/onnxruntime-node-1.27.0.tgz",- "integrity": "sha512-QEzGwrvNBgv4uPVdnbHsOGG4G6T96mdlcFI8aAKPjMU8wOPpVocPXb6k3QGkaZagVTv2G9Bnnbo6Z3JdXr1fQw==",+ "@claude-flow/testing/node_modules/@ruvector/ruvllm-linux-x64-gnu": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-linux-x64-gnu/-/ruvllm-linux-x64-gnu-2.0.1.tgz",+ "integrity": "sha512-GH9u/SPUZm9KXjSoQZx5PRtJui0hO/OK+OmRHLZc8+IYrlgona6UQAw6uKHJ3cSEZp9f+XBRYgIrLmsEJW3HXA==",+ "cpu": [+ "x64"+ ],"dev": true,- "hasInstallScript": true,- "license": "MIT",+ "license": "MIT OR Apache-2.0","optional": true,"os": [- "win32",- "darwin","linux"],- "dependencies": {- "adm-zip": "^0.5.16",- "global-agent": "^4.1.3",- "onnxruntime-common": "1.27.0"+ "engines": {+ "node": ">= 18"}},- "@claude-flow/plugin-agent-federation/node_modules/ora": {- "version": "5.4.1",- "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz",- "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==",+ "@claude-flow/testing/node_modules/@ruvector/ruvllm-win32-x64-msvc": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@ruvector/ruvllm-win32-x64-msvc/-/ruvllm-win32-x64-msvc-2.0.1.tgz",+ "integrity": "sha512-sRGNOMAcyC5p/nITnR0HLFUEObZ9Mh/T1erNiqhKrNUqIPZM1qAYBgN3xmZp02isdiTilRpxQihz3j4EzGPXIw==",+ "cpu": [+ "x64"+ ],"dev": true,- "license": "MIT",+ "license": "MIT OR Apache-2.0","optional": true,- "dependencies": {- "bl": "^4.1.0",- "chalk": "^4.1.0",- "cli-cursor": "^3.1.0",- "cli-spinners": "^2.5.0",- "is-interactive": "^1.0.0",- "is-unicode-supported": "^0.1.0",- "log-symbols": "^4.1.0",- "strip-ansi": "^6.0.0",- "wcwidth": "^1.0.1"- },+ "os": [+ "win32"+ ],"engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "node": ">= 18"}},- "@claude-flow/plugin-agent-federation/node_modules/ora/node_modules/chalk": {+ "@claude-flow/testing/node_modules/@ruvector/ruvllm/node_modules/chalk": {"version": "4.1.2","resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz","integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",@@ -7151,177 +10271,147 @@"url": "https://github.com/chalk/chalk?sponsor=1"}},- "@claude-flow/plugin-agent-federation/node_modules/path-scurry": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",- "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==",+ "@claude-flow/testing/node_modules/agentdb": {+ "version": "3.0.0-alpha.17",+ "resolved": "https://registry.npmjs.org/agentdb/-/agentdb-3.0.0-alpha.17.tgz",+ "integrity": "sha512-LK8drZFQteNkff+ji52vCmIXyE3A3ipzabx+ubBcX0CRgF96GU8m36sWyOfqL7pWRfnYDgkEEEgZmagiNCaz/A==","dev": true,- "license": "BlueOak-1.0.0",+ "hasInstallScript": true,+ "license": "MIT","dependencies": {- "lru-cache": "^11.0.0",- "minipass": "^7.1.2"- },- "engines": {- "node": "18 || 20 || >=22"+ "@modelcontextprotocol/sdk": "^1.20.1",+ "@opentelemetry/api": "^1.9.0",+ "@ruvector/graph-transformer": "^2.0.4",+ "ajv": "^8.18.0",+ "jsonwebtoken": "^9.0.2",+ "sql.js": "^1.13.0"},- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },- "@claude-flow/plugin-agent-federation/node_modules/qs": {- "version": "6.15.3",- "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz",- "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==",- "dev": true,- "license": "BSD-3-Clause",- "dependencies": {- "es-define-property": "^1.0.1",- "side-channel": "^1.1.1"+ "bin": {+ "agentdb": "dist/src/cli/agentdb-cli.js"},"engines": {- "node": ">=0.6"+ "node": ">=18.0.0"},- "funding": {- "url": "https://github.com/sponsors/ljharb"+ "optionalDependencies": {+ "@opentelemetry/resources": "^1.25.0",+ "@opentelemetry/sdk-node": "^0.218.0",+ "@opentelemetry/semantic-conventions": "^1.25.0",+ "@ruvector/attention": "^0.1.2",+ "@ruvector/gnn": "^0.1.23",+ "@ruvector/graph-node": "^2.0.2",+ "@ruvector/router": "^0.1.15",+ "@ruvector/ruvllm": "^2.5.1",+ "@ruvector/rvf": "^0.1.9",+ "@ruvector/rvf-node": "^0.1.7",+ "@ruvector/rvf-solver": "^0.1.7",+ "@ruvector/rvf-wasm": "^0.1.6",+ "@ruvector/sona": "^0.1.4",+ "@xenova/transformers": "^2.17.2",+ "argon2": "^0.44.0",+ "better-sqlite3": "^11.8.1",+ "chalk": "^5.3.0",+ "commander": "^12.1.0",+ "hnswlib-node": "^3.0.0",+ "inquirer": "^9.3.8",+ "ruvector": "^0.1.30",+ "ruvector-attention-wasm": "^0.1.32",+ "ruvector-graph-transformer-wasm": "^2.0.4"}},- "@claude-flow/plugin-agent-federation/node_modules/require-in-the-middle": {- "version": "8.0.1",- "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",- "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",+ "@claude-flow/testing/node_modules/bl": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",+ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==","dev": true,"license": "MIT","optional": true,"dependencies": {- "debug": "^4.3.5",- "module-details-from-path": "^1.0.3"- },- "engines": {- "node": ">=9.3.0 || >=8.10.0 <9.0.0"+ "buffer": "^5.5.0",+ "inherits": "^2.0.4",+ "readable-stream": "^3.4.0"}},- "@claude-flow/plugin-agent-federation/node_modules/restore-cursor": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",- "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",+ "@claude-flow/testing/node_modules/buffer": {+ "version": "5.7.1",+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==","dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],"license": "MIT","optional": true,"dependencies": {- "onetime": "^5.1.0",- "signal-exit": "^3.0.2"- },- "engines": {- "node": ">=8"+ "base64-js": "^1.3.1",+ "ieee754": "^1.1.13"}},- "@claude-flow/plugin-agent-federation/node_modules/send": {- "version": "1.2.1",- "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",- "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",+ "@claude-flow/testing/node_modules/cjs-module-lexer": {+ "version": "2.2.0",+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz",+ "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==","dev": true,"license": "MIT",- "dependencies": {- "debug": "^4.4.3",- "encodeurl": "^2.0.0",- "escape-html": "^1.0.3",- "etag": "^1.8.1",- "fresh": "^2.0.0",- "http-errors": "^2.0.1",- "mime-types": "^3.0.2",- "ms": "^2.1.3",- "on-finished": "^2.4.1",- "range-parser": "^1.2.1",- "statuses": "^2.0.2"- },- "engines": {- "node": ">= 18"- },- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/express"- }+ "optional": true},- "@claude-flow/plugin-agent-federation/node_modules/serialize-error": {- "version": "8.1.0",- "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz",- "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==",+ "@claude-flow/testing/node_modules/cli-cursor": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",+ "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==","dev": true,"license": "MIT","optional": true,"dependencies": {- "type-fest": "^0.20.2"- },- "engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "@claude-flow/plugin-agent-federation/node_modules/serve-static": {- "version": "2.2.1",- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",- "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",- "dev": true,- "license": "MIT",- "dependencies": {- "encodeurl": "^2.0.0",- "escape-html": "^1.0.3",- "parseurl": "^1.3.3",- "send": "^1.2.0"+ "restore-cursor": "^3.1.0"},"engines": {- "node": ">= 18"- },- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/express"+ "node": ">=8"}},- "@claude-flow/plugin-agent-federation/node_modules/side-channel": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",- "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==",+ "@claude-flow/testing/node_modules/import-in-the-middle": {+ "version": "3.3.0",+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.3.0.tgz",+ "integrity": "sha512-v4+k+PLt4z6g2ydEcXhfinTJxfgKJDWOW0v0GZNA5n2qToHFObpH4nGLhJdwnXnX4T14oREx/M62dS9GkpmSbQ==","dev": true,- "license": "MIT",- "dependencies": {- "es-errors": "^1.3.0",- "object-inspect": "^1.13.4",- "side-channel-list": "^1.0.1",- "side-channel-map": "^1.0.1",- "side-channel-weakmap": "^1.0.2"+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "cjs-module-lexer": "^2.2.0",+ "es-module-lexer": "^2.2.0",+ "module-details-from-path": "^1.0.4"},"engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"+ "node": ">=18"}},- "@claude-flow/plugin-agent-federation/node_modules/side-channel-list": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",- "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",+ "@claude-flow/testing/node_modules/is-interactive": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",+ "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==","dev": true,"license": "MIT",- "dependencies": {- "es-errors": "^1.3.0",- "object-inspect": "^1.13.4"- },+ "optional": true,"engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"+ "node": ">=8"}},- "@claude-flow/plugin-agent-federation/node_modules/type-fest": {- "version": "0.20.2",- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",- "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",+ "@claude-flow/testing/node_modules/is-unicode-supported": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",+ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==","dev": true,- "license": "(MIT OR CC0-1.0)",+ "license": "MIT","optional": true,"engines": {"node": ">=10"@@ -7330,194 +10420,141 @@"url": "https://github.com/sponsors/sindresorhus"}},- "@claude-flow/plugin-agent-federation/node_modules/type-is": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz",- "integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==",+ "@claude-flow/testing/node_modules/log-symbols": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",+ "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==","dev": true,"license": "MIT",+ "optional": true,"dependencies": {- "content-type": "^2.0.0",- "media-typer": "^1.1.0",- "mime-types": "^3.0.0"+ "chalk": "^4.1.0",+ "is-unicode-supported": "^0.1.0"},"engines": {- "node": ">= 18"+ "node": ">=10"},"funding": {- "type": "opencollective",- "url": "https://opencollective.com/express"+ "url": "https://github.com/sponsors/sindresorhus"}},- "@claude-flow/plugin-agent-federation/node_modules/type-is/node_modules/content-type": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz",- "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==",+ "@claude-flow/testing/node_modules/log-symbols/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==","dev": true,"license": "MIT",+ "optional": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },"engines": {- "node": ">=18"+ "node": ">=10"},"funding": {- "type": "opencollective",- "url": "https://opencollective.com/express"+ "url": "https://github.com/chalk/chalk?sponsor=1"}},- "@claude-flow/plugin-agent-federation/node_modules/ws": {- "version": "8.21.0",- "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",- "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",+ "@claude-flow/testing/node_modules/mimic-fn": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==","dev": true,"license": "MIT",+ "optional": true,"engines": {- "node": ">=10.0.0"- },- "peerDependencies": {- "bufferutil": "^4.0.1",- "utf-8-validate": ">=5.0.2"- },- "peerDependenciesMeta": {- "bufferutil": {- "optional": true- },- "utf-8-validate": {- "optional": true- }+ "node": ">=6"}},- "@claude-flow/plugin-iot-cognitum": {- "version": "1.0.0-alpha.5",+ "@claude-flow/testing/node_modules/onetime": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",+ "dev": true,"license": "MIT",+ "optional": true,"dependencies": {- "@cognitum-one/sdk": "^0.2.1"- },- "bin": {- "cognitum-iot": "dist/bin.js"- },- "devDependencies": {- "@claude-flow/shared": "3.0.0-alpha.8",- "typescript": "^5.4.0",- "vitest": "^4.1.0"+ "mimic-fn": "^2.1.0"},- "peerDependencies": {- "multicast-dns": "^7.2.5"+ "engines": {+ "node": ">=6"},- "peerDependenciesMeta": {- "multicast-dns": {- "optional": true- }+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"}},- "@claude-flow/plugins": {- "version": "3.0.0-alpha.7",+ "@claude-flow/testing/node_modules/ora": {+ "version": "5.4.1",+ "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz",+ "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==",+ "dev": true,"license": "MIT",+ "optional": true,"dependencies": {- "events": "^3.3.0"- },- "devDependencies": {- "@types/node": "^20.10.0",- "typescript": "^5.3.0",- "vitest": "^4.1.0"+ "bl": "^4.1.0",+ "chalk": "^4.1.0",+ "cli-cursor": "^3.1.0",+ "cli-spinners": "^2.5.0",+ "is-interactive": "^1.0.0",+ "is-unicode-supported": "^0.1.0",+ "log-symbols": "^4.1.0",+ "strip-ansi": "^6.0.0",+ "wcwidth": "^1.0.1"},"engines": {- "node": ">=20.0.0"- },- "peerDependencies": {- "@claude-flow/hooks": "^3.0.0-alpha.2",- "@claude-flow/memory": "^3.0.0-alpha.2",- "@ruvector/learning-wasm": "^0.1.0",- "@ruvector/wasm": "^0.1.0"+ "node": ">=10"},- "peerDependenciesMeta": {- "@claude-flow/hooks": {- "optional": true- },- "@claude-flow/memory": {- "optional": true- },- "@ruvector/learning-wasm": {- "optional": true- },- "@ruvector/wasm": {- "optional": true- }+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"}},- "@claude-flow/providers": {- "version": "3.0.0-alpha.6",+ "@claude-flow/testing/node_modules/ora/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,"license": "MIT",+ "optional": true,"dependencies": {- "events": "^3.3.0"- },- "devDependencies": {- "@types/node": "^20.0.0",- "dotenv": "^16.4.5",- "tsx": "^4.19.0",- "typescript": "^5.5.0",- "vitest": "^4.1.0"+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"},"engines": {- "node": ">=20.0.0"- },- "peerDependencies": {- "@ruvector/ruvllm": "^0.2.3"+ "node": ">=10"},- "peerDependenciesMeta": {- "@ruvector/ruvllm": {- "optional": true- }+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"}},- "@claude-flow/security": {- "version": "3.0.0-alpha.10",+ "@claude-flow/testing/node_modules/require-in-the-middle": {+ "version": "8.0.1",+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,"dependencies": {- "@noble/ed25519": "^2.1.0",- "bcryptjs": "^3.0.3",- "zod": "^3.22.0"+ "debug": "^4.3.5",+ "module-details-from-path": "^1.0.3"},- "devDependencies": {- "vitest": "^4.1.0"+ "engines": {+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"}},- "@claude-flow/shared": {- "version": "3.0.0-alpha.8",+ "@claude-flow/testing/node_modules/restore-cursor": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",+ "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",+ "dev": true,+ "license": "MIT",+ "optional": true,"dependencies": {- "sql.js": "^1.10.3"- },- "devDependencies": {- "@types/cors": "^2.8.17",- "@types/express": "^4.17.21",- "@types/node": "^20.0.0",- "@types/sql.js": "^1.4.9",- "@types/ws": "^8.5.10",- "cors": "^2.8.5",- "express": "^4.21.0",- "helmet": "^7.1.0",- "vitest": "^4.1.0",- "ws": "^8.16.0",- "zod": "^3.22.4"- }- },- "@claude-flow/swarm": {- "version": "3.0.0-alpha.7",- "devDependencies": {- "vitest": "^4.1.0"- }- },- "@claude-flow/testing": {- "version": "3.0.0-alpha.6",- "devDependencies": {- "@claude-flow/memory": "^3.0.0-alpha.2",- "@claude-flow/shared": "^3.0.0-alpha.1",- "@claude-flow/swarm": "^3.0.0-alpha.1",- "typescript": "^5.3.0",- "vitest": "^4.1.0"+ "onetime": "^5.1.0",+ "signal-exit": "^3.0.2"},- "peerDependencies": {- "@claude-flow/memory": "^3.0.0-alpha.2",- "@claude-flow/shared": "^3.0.0-alpha.1",- "@claude-flow/swarm": "^3.0.0-alpha.1",- "vitest": ">=4.0.16"+ "engines": {+ "node": ">=8"}},"claude-flow": {@@ -7565,25 +10602,22 @@}},"node_modules/@actions/http-client": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.0.tgz",- "integrity": "sha512-1s3tXAfVMSz9a4ZEBkXXRQD4QhY3+GAsWSbaYpeknPOKEeyRiU3lH+bHiLMZdo2x/fIeQ/hscL1wCkDLVM2DZQ==",+ "version": "3.0.2",+ "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz",+ "integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==","license": "MIT","dependencies": {"tunnel": "^0.0.6",- "undici": "^5.28.5"+ "undici": "^6.23.0"}},"node_modules/@actions/http-client/node_modules/undici": {- "version": "5.29.0",- "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",- "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",+ "version": "6.27.0",+ "resolved": "https://registry.npmjs.org/undici/-/undici-6.27.0.tgz",+ "integrity": "sha512-YmfV3YnEDzXRC5lZ2jWtWWHKGUm1zIt8AhesR1tens+HTNv+YZlN/dp6G727LOvMJ8xjP9Be7Y2Sdr96LDm+pg==","license": "MIT",- "dependencies": {- "@fastify/busboy": "^2.0.0"- },"engines": {- "node": ">=14.0"+ "node": ">=18.17"}},"node_modules/@actions/io": {@@ -7828,10 +10862,6 @@"resolved": "@claude-flow/mcp","link": true},- "node_modules/@claude-flow/memory": {- "resolved": "@claude-flow/memory",- "link": true- },"node_modules/@claude-flow/neural": {"resolved": "@claude-flow/neural","link": true@@ -8547,23 +11577,6 @@"node": "^12.22.0 || ^14.17.0 || >=16.0.0"}},- "node_modules/@fastify/busboy": {- "version": "2.1.1",- "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",- "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",- "license": "MIT",- "engines": {- "node": ">=14"- }- },- "node_modules/@gar/promisify": {- "version": "1.1.3",- "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz",- "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==",- "license": "MIT",- "optional": true,- "peer": true- },"node_modules/@google/genai": {"version": "1.43.0","resolved": "https://registry.npmjs.org/@google/genai/-/genai-1.43.0.tgz",@@ -8588,9 +11601,9 @@}},"node_modules/@grpc/grpc-js": {- "version": "1.14.3",- "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.3.tgz",- "integrity": "sha512-Iq8QQQ/7X3Sac15oB6p0FmUg/klxQvXLeileoqrTRGJYLV+/9tubbr9ipz0GKHjmXVsgFPo/+W+2cA8eNcR+XA==",+ "version": "1.14.4",+ "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.4.tgz",+ "integrity": "sha512-k9Dj3DV/itK9D06Y8f190Qgop7/Ui+D0njFV3LHMPwPT75DpXLQohE9Wmz0QElrJnzsjB7KPWiKJbOl7IPDArQ==","license": "Apache-2.0","optional": true,"dependencies": {@@ -8621,9 +11634,9 @@}},"node_modules/@hono/node-server": {- "version": "1.19.9",- "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.9.tgz",- "integrity": "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw==",+ "version": "1.19.14",+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.14.tgz",+ "integrity": "sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw==","license": "MIT","engines": {"node": ">=18.14.1"@@ -9016,29 +12029,6 @@"node": ">=18"}},- "node_modules/@isaacs/balanced-match": {- "version": "4.0.1",- "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz",- "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==",- "license": "MIT",- "peer": true,- "engines": {- "node": "20 || >=22"- }- },- "node_modules/@isaacs/brace-expansion": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz",- "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==",- "license": "MIT",- "peer": true,- "dependencies": {- "@isaacs/balanced-match": "^4.0.1"- },- "engines": {- "node": "20 || >=22"- }- },"node_modules/@isaacs/cliui": {"version": "8.0.2","resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",@@ -9185,28 +12175,28 @@"url": "https://opencollective.com/js-sdsl"}},- "node_modules/@metaharness/darwin": {- "version": "0.3.1",- "resolved": "https://registry.npmjs.org/@metaharness/darwin/-/darwin-0.3.1.tgz",- "integrity": "sha512-gNQQQiSsbcsSXG9g1C7IJoX50Ozw1nIg6Nez40OVKo5PSvlGjDKElBjFng7M7O7bIrlBo0fS9lcP5hjEQXi+iQ==",+ "node_modules/@metaharness/redblue": {+ "version": "0.1.4",+ "resolved": "https://registry.npmjs.org/@metaharness/redblue/-/redblue-0.1.4.tgz",+ "integrity": "sha512-JaAk6bs3xA7Ks5RnAcZoxI3WfzpYL+Bk262SCI07w82BDOA7C6VxwGM63F7b86lRTKUVjTEnSqf7QZ3uyElT/g==","license": "MIT","optional": true,"bin": {- "metaharness-darwin": "dist/cli.js"+ "metaharness-redblue": "dist/cli/index.js",+ "redblue": "dist/cli/index.js"},"engines": {"node": ">=20.0.0"}},- "node_modules/@metaharness/redblue": {- "version": "0.1.4",- "resolved": "https://registry.npmjs.org/@metaharness/redblue/-/redblue-0.1.4.tgz",- "integrity": "sha512-JaAk6bs3xA7Ks5RnAcZoxI3WfzpYL+Bk262SCI07w82BDOA7C6VxwGM63F7b86lRTKUVjTEnSqf7QZ3uyElT/g==",+ "node_modules/@metaharness/weight-eft": {+ "version": "0.1.1",+ "resolved": "https://registry.npmjs.org/@metaharness/weight-eft/-/weight-eft-0.1.1.tgz",+ "integrity": "sha512-GSg0APPAbRK93OzrzlE+R8hfEK+I5+Zhmh0Z28RC9Mk5/MjhPo3shqINO7ye8VPGYHIO4rars9FwCWbe/V4cEQ==","license": "MIT","optional": true,"bin": {- "metaharness-redblue": "dist/cli/index.js",- "redblue": "dist/cli/index.js"+ "weight-eft": "dist/cli.js"},"engines": {"node": ">=20.0.0"@@ -9400,6 +12390,15 @@"url": "https://opencollective.com/express"}},+ "node_modules/@modelcontextprotocol/sdk/node_modules/jose": {+ "version": "6.2.3",+ "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.3.tgz",+ "integrity": "sha512-YYVDInQKFJfR/xa3ojUTl8c2KoTwiL1R5Wg9YCydwH0x0B9grbzlg5HC7mMjCtUJjbQ/YnGEZIhI5tCgfTb4Hw==",+ "license": "MIT",+ "funding": {+ "url": "https://github.com/sponsors/panva"+ }+ },"node_modules/@modelcontextprotocol/sdk/node_modules/media-typer": {"version": "1.1.0","resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",@@ -9580,34 +12579,6 @@"node": ">= 8"}},- "node_modules/@npmcli/fs": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz",- "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "@gar/promisify": "^1.0.1",- "semver": "^7.3.5"- }- },- "node_modules/@npmcli/move-file": {- "version": "1.1.2",- "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz",- "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==",- "deprecated": "This functionality has been moved to @npmcli/fs",- "license": "MIT",- "optional": true,- "peer": true,- "dependencies": {- "mkdirp": "^1.0.4",- "rimraf": "^3.0.2"- },- "engines": {- "node": ">=10"- }- },"node_modules/@octokit/auth-token": {"version": "6.0.0","resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-6.0.0.tgz",@@ -15347,17 +18318,6 @@"integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==","license": "MIT"},- "node_modules/@tootallnate/once": {- "version": "1.1.2",- "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz",- "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==",- "license": "MIT",- "optional": true,- "peer": true,- "engines": {- "node": ">= 6"- }- },"node_modules/@tybys/wasm-util": {"version": "0.10.3","resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz",@@ -15958,14 +18918,6 @@"onnxruntime-node": "1.14.0"}},- "node_modules/abbrev": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",- "license": "ISC",- "optional": true,- "peer": true- },"node_modules/accepts": {"version": "1.3.8","resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",@@ -16027,8 +18979,6 @@"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz","integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==","license": "MIT",- "optional": true,- "peer": true,"dependencies": {"debug": "4"},@@ -16355,9 +19305,9 @@}},"node_modules/agentdb": {- "version": "2.0.0-alpha.3.4",- "resolved": "https://registry.npmjs.org/agentdb/-/agentdb-2.0.0-alpha.3.4.tgz",- "integrity": "sha512-bUqO5o2VpWomh2xGOHdQoX00CGrPcIAH6zDCt5oa0SeJWAO+bbB7SiElb1TxwcrJQKe96HkiSh2T8z4vFypsxg==",+ "version": "2.0.0-alpha.3.7",+ "resolved": "https://registry.npmjs.org/agentdb/-/agentdb-2.0.0-alpha.3.7.tgz",+ "integrity": "sha512-03CUdFgrqw8Mplkvlz66YCKQBSD+l+r8ox4hTZmx56nvkJU8ltKMQJ9h9nz7kvxEbDz2PeZO+SqT45qHNEWRcg==","hasInstallScript": true,"license": "MIT","optional": true,@@ -16366,7 +19316,7 @@"@modelcontextprotocol/sdk": "^1.20.1","@opentelemetry/api": "^1.9.0","@ruvector/attention": "^0.1.2",- "@ruvector/gnn": "^0.1.22",+ "@ruvector/gnn": "0.1.23","@ruvector/graph-node": "^0.1.15","@ruvector/router": "^0.1.15","@ruvector/ruvllm": "^0.2.4",@@ -16408,9 +19358,146 @@"express-rate-limit": "^8.2.1","helmet": "^8.1.0","hnswlib-node": "^3.0.0",- "sharp": "^0.32.6",- "sqlite": "^5.1.1",- "sqlite3": "^5.1.7"+ "sharp": "^0.32.6"+ }+ },+ "node_modules/agentdb/node_modules/@ruvector/gnn": {+ "version": "0.1.23",+ "resolved": "https://registry.npmjs.org/@ruvector/gnn/-/gnn-0.1.23.tgz",+ "integrity": "sha512-LayUtIcpgLQ48O9T1J+ssk5oeGGrHO82aSPWFpzHhnUJd7Jk9jX91d9bCmnGqLGPwsiwkOfh4mZ4rKJ5YAm3CQ==",+ "license": "MIT",+ "optional": true,+ "peer": true,+ "engines": {+ "node": ">= 10"+ },+ "optionalDependencies": {+ "@ruvector/gnn-darwin-arm64": "0.1.23",+ "@ruvector/gnn-darwin-x64": "0.1.23",+ "@ruvector/gnn-linux-arm64-gnu": "0.1.23",+ "@ruvector/gnn-linux-arm64-musl": "0.1.23",+ "@ruvector/gnn-linux-x64-gnu": "0.1.23",+ "@ruvector/gnn-linux-x64-musl": "0.1.23",+ "@ruvector/gnn-win32-x64-msvc": "0.1.23"+ }+ },+ "node_modules/agentdb/node_modules/@ruvector/gnn-darwin-arm64": {+ "version": "0.1.23",+ "resolved": "https://registry.npmjs.org/@ruvector/gnn-darwin-arm64/-/gnn-darwin-arm64-0.1.23.tgz",+ "integrity": "sha512-ZighfK0ysK/JQk23ZfbudsYMLiluIkZecXOh1dVA9JzhJdWsJv0JDZDWdJoqtg3kFpkUfeK3bkW7qE4xH1bA/Q==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "peer": true,+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/agentdb/node_modules/@ruvector/gnn-darwin-x64": {+ "version": "0.1.23",+ "resolved": "https://registry.npmjs.org/@ruvector/gnn-darwin-x64/-/gnn-darwin-x64-0.1.23.tgz",+ "integrity": "sha512-ZVwYx2ASfvZWDExVfPV4fPCU9VwtfxXumr5UQnkuC61rt8SCU0M7lGwQhLh08nzeQNBHvAXXlz6PV2R7aHzskg==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "peer": true,+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/agentdb/node_modules/@ruvector/gnn-linux-arm64-gnu": {+ "version": "0.1.23",+ "resolved": "https://registry.npmjs.org/@ruvector/gnn-linux-arm64-gnu/-/gnn-linux-arm64-gnu-0.1.23.tgz",+ "integrity": "sha512-zwqBVvb1bvnaeLr28lsFdo5KAZ7ajssNYeTlqXj9DskyBFPe1NpWb5/wL6Q3pg/9D3tlutGMeYex3sIg1AqkgQ==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "peer": true,+ "engines": {+ "node": ">= 18"+ }+ },+ "node_modules/agentdb/node_modules/@ruvector/gnn-linux-arm64-musl": {+ "version": "0.1.23",+ "resolved": "https://registry.npmjs.org/@ruvector/gnn-linux-arm64-musl/-/gnn-linux-arm64-musl-0.1.23.tgz",+ "integrity": "sha512-k1UMWvI4nq0B1NpoK6BdPaFtyD7tX1NnHK+z689+N6xNGBAdobw/E1D4cmZQULXg4E75NVX++7NypPqmrj2PPg==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "peer": true,+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/agentdb/node_modules/@ruvector/gnn-linux-x64-gnu": {+ "version": "0.1.23",+ "resolved": "https://registry.npmjs.org/@ruvector/gnn-linux-x64-gnu/-/gnn-linux-x64-gnu-0.1.23.tgz",+ "integrity": "sha512-q4PaqwVW0LIDHfqL05z8KV+0+uFZRI10/82fTCKnQutZNJkCITl2oetBbmtOuA5JxEp3hQJgsOnZOe0eXdw2uQ==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "peer": true,+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/agentdb/node_modules/@ruvector/gnn-linux-x64-musl": {+ "version": "0.1.23",+ "resolved": "https://registry.npmjs.org/@ruvector/gnn-linux-x64-musl/-/gnn-linux-x64-musl-0.1.23.tgz",+ "integrity": "sha512-cxw3HleWD8i2hQpvoXuARuDyZiwksOp3eGdaxEjJUf9GiMi7edL5PsSTiXATy4wCvprM04IUJir2ave/ar/zPg==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "peer": true,+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/agentdb/node_modules/@ruvector/gnn-win32-x64-msvc": {+ "version": "0.1.23",+ "resolved": "https://registry.npmjs.org/@ruvector/gnn-win32-x64-msvc/-/gnn-win32-x64-msvc-0.1.23.tgz",+ "integrity": "sha512-p1Mj4fFzb7jvgX+Gzj1wPYJfKTQ0TquAXKse2RlMFBM5rcVDs2WLImOrIA6pBpm3wamJpCGAaDIHwc9m7fZQiw==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "peer": true,+ "engines": {+ "node": ">= 10"}},"node_modules/agentdb/node_modules/bcrypt": {@@ -16515,6 +19602,16 @@"node": ">= 0.6"}},+ "node_modules/agentic-flow/node_modules/balanced-match": {+ "version": "4.0.4",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },"node_modules/agentic-flow/node_modules/body-parser": {"version": "2.2.1","resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz",@@ -16540,6 +19637,19 @@"url": "https://opencollective.com/express"}},+ "node_modules/agentic-flow/node_modules/brace-expansion": {+ "version": "5.0.7",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",+ "integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "balanced-match": "^4.0.2"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },"node_modules/agentic-flow/node_modules/content-disposition": {"version": "1.0.1","resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",@@ -16736,16 +19846,16 @@}},"node_modules/agentic-flow/node_modules/minimatch": {- "version": "10.1.1",- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz",- "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==",+ "version": "10.2.5",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",+ "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==","license": "BlueOak-1.0.0","peer": true,"dependencies": {- "@isaacs/brace-expansion": "^5.0.0"+ "brace-expansion": "^5.0.5"},"engines": {- "node": "20 || >=22"+ "node": "18 || 20 || >=22"},"funding": {"url": "https://github.com/sponsors/isaacs"@@ -16923,20 +20033,6 @@"linux"]},- "node_modules/agentkeepalive": {- "version": "4.6.0",- "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz",- "integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==",- "license": "MIT",- "optional": true,- "peer": true,- "dependencies": {- "humanize-ms": "^1.2.1"- },- "engines": {- "node": ">= 8.0.0"- }- },"node_modules/aggregate-error": {"version": "5.0.0","resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-5.0.0.tgz",@@ -17030,7 +20126,8 @@"resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz","integrity": "sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==","license": "MIT",- "optional": true+ "optional": true,+ "peer": true},"node_modules/any-promise": {"version": "1.3.0",@@ -17038,14 +20135,6 @@"integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==","license": "MIT"},- "node_modules/aproba": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.1.0.tgz",- "integrity": "sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew==",- "license": "ISC",- "optional": true,- "peer": true- },"node_modules/argon2": {"version": "0.44.0","resolved": "https://registry.npmjs.org/argon2/-/argon2-0.44.0.tgz",@@ -17148,14 +20237,15 @@"license": "MIT"},"node_modules/axios": {- "version": "1.13.6",- "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.6.tgz",- "integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==",+ "version": "1.18.1",+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.18.1.tgz",+ "integrity": "sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==","license": "MIT","dependencies": {- "follow-redirects": "^1.15.11",+ "follow-redirects": "^1.16.0","form-data": "^4.0.5",- "proxy-from-env": "^1.1.0"+ "https-proxy-agent": "^5.0.1",+ "proxy-from-env": "^2.1.0"}},"node_modules/b4a": {@@ -17341,6 +20431,7 @@"integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==","license": "MIT","optional": true,+ "peer": true,"dependencies": {"buffer": "^6.0.3","inherits": "^2.0.4",@@ -17348,9 +20439,9 @@}},"node_modules/body-parser": {- "version": "1.20.4",- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz",- "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==",+ "version": "1.20.5",+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.5.tgz",+ "integrity": "sha512-3grm+/2tUOvu2cjJkvsIxrv/wVpfXQW4PsQHYm7yk4vfpu7Ekl6nEsYBoJUL6qDwZUx8wUhQ8tR2qz+ad9c9OA==","license": "MIT","dependencies": {"bytes": "~3.1.2",@@ -17361,7 +20452,7 @@"http-errors": "~2.0.1","iconv-lite": "~0.4.24","on-finished": "~2.4.1",- "qs": "~6.14.0",+ "qs": "~6.15.1","raw-body": "~2.5.3","type-is": "~1.6.18","unpipe": "~1.0.0"@@ -17386,6 +20477,22 @@"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==","license": "MIT"},+ "node_modules/body-parser/node_modules/qs": {+ "version": "6.15.3",+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz",+ "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==",+ "license": "BSD-3-Clause",+ "dependencies": {+ "es-define-property": "^1.0.1",+ "side-channel": "^1.1.1"+ },+ "engines": {+ "node": ">=0.6"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },"node_modules/body-parser/node_modules/raw-body": {"version": "2.5.3","resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz",@@ -17417,10 +20524,10 @@"license": "MIT"},"node_modules/brace-expansion": {- "version": "1.1.12",- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",- "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",- "devOptional": true,+ "version": "1.1.15",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz",+ "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==",+ "dev": true,"license": "MIT","dependencies": {"balanced-match": "^1.0.0",@@ -17459,6 +20566,7 @@],"license": "MIT","optional": true,+ "peer": true,"dependencies": {"base64-js": "^1.3.1","ieee754": "^1.2.1"@@ -17505,119 +20613,6 @@"node": ">=8"}},- "node_modules/cacache": {- "version": "15.3.0",- "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz",- "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "@npmcli/fs": "^1.0.0",- "@npmcli/move-file": "^1.0.1",- "chownr": "^2.0.0",- "fs-minipass": "^2.0.0",- "glob": "^7.1.4",- "infer-owner": "^1.0.4",- "lru-cache": "^6.0.0",- "minipass": "^3.1.1",- "minipass-collect": "^1.0.2",- "minipass-flush": "^1.0.5",- "minipass-pipeline": "^1.2.2",- "mkdirp": "^1.0.3",- "p-map": "^4.0.0",- "promise-inflight": "^1.0.1",- "rimraf": "^3.0.2",- "ssri": "^8.0.1",- "tar": "^6.0.2",- "unique-filename": "^1.1.1"- },- "engines": {- "node": ">= 10"- }- },- "node_modules/cacache/node_modules/aggregate-error": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",- "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",- "license": "MIT",- "optional": true,- "peer": true,- "dependencies": {- "clean-stack": "^2.0.0",- "indent-string": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/cacache/node_modules/clean-stack": {- "version": "2.2.0",- "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",- "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",- "license": "MIT",- "optional": true,- "peer": true,- "engines": {- "node": ">=6"- }- },- "node_modules/cacache/node_modules/indent-string": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",- "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",- "license": "MIT",- "optional": true,- "peer": true,- "engines": {- "node": ">=8"- }- },- "node_modules/cacache/node_modules/lru-cache": {- "version": "6.0.0",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=10"- }- },- "node_modules/cacache/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/cacache/node_modules/p-map": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",- "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",- "license": "MIT",- "optional": true,- "peer": true,- "dependencies": {- "aggregate-error": "^3.0.0"- },- "engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },"node_modules/call-bind-apply-helpers": {"version": "1.0.2","resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",@@ -17662,6 +20657,7 @@"integrity": "sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==","license": "MIT","optional": true,+ "peer": true,"dependencies": {"ansicolors": "~0.3.2","redeyed": "~2.1.0"@@ -17723,17 +20719,6 @@"url": "https://paulmillr.com/funding/"}},- "node_modules/chownr": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",- "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",- "license": "ISC",- "optional": true,- "peer": true,- "engines": {- "node": ">=10"- }- },"node_modules/cjs-module-lexer": {"version": "1.4.3","resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz",@@ -17763,6 +20748,7 @@"integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==","license": "MIT","optional": true,+ "peer": true,"dependencies": {"restore-cursor": "^4.0.0"},@@ -17984,17 +20970,6 @@"simple-swizzle": "^0.2.2"}},- "node_modules/color-support": {- "version": "1.1.3",- "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",- "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",- "license": "ISC",- "optional": true,- "peer": true,- "bin": {- "color-support": "bin.js"- }- },"node_modules/combined-stream": {"version": "1.0.8","resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",@@ -18030,7 +21005,7 @@"version": "0.0.1","resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz","integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",- "devOptional": true,+ "dev": true,"license": "MIT"},"node_modules/confbox": {@@ -18060,14 +21035,6 @@"node": "^14.18.0 || >=16.10.0"}},- "node_modules/console-control-strings": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",- "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==",- "license": "ISC",- "optional": true,- "peer": true- },"node_modules/content-disposition": {"version": "0.5.4","resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",@@ -18830,14 +21797,6 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/err-code": {- "version": "2.0.3",- "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz",- "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==",- "license": "MIT",- "optional": true,- "peer": true- },"node_modules/error-ex": {"version": "1.3.4","resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz",@@ -18865,6 +21824,13 @@"node": ">= 0.4"}},+ "node_modules/es-module-lexer": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.0.tgz",+ "integrity": "sha512-KLdwQm2NvGLDkQDCGvmiQrhkd0JbMzXthwQAUgWjQuQdBLFa3eiBP5arXZyA+f8x+x7OXgud6bq2rxjGtHV2tw==",+ "devOptional": true,+ "license": "MIT"+ },"node_modules/es-object-atoms": {"version": "1.1.1","resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",@@ -19222,6 +22188,7 @@"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==","license": "BSD-2-Clause","optional": true,+ "peer": true,"bin": {"esparse": "bin/esparse.js","esvalidate": "bin/esvalidate.js"@@ -19460,12 +22427,12 @@}},"node_modules/express-rate-limit": {- "version": "8.2.1",- "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.2.1.tgz",- "integrity": "sha512-PCZEIEIxqwhzw4KF0n7QF4QqruVTcF73O5kFKUnGOyjbCCgizBBiFaYpd/fnBLUMPw/BWw9OsiN7GgrNYr7j6g==",+ "version": "8.5.2",+ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.5.2.tgz",+ "integrity": "sha512-5Kb34ipNX694DH48vN9irak1Qx30nb0PLYHXfJgw4YEjiC3ZEmZJhwOp+VfiCYwFzvFTdB9QkArYS5kXa2cx2A==","license": "MIT","dependencies": {- "ip-address": "10.0.1"+ "ip-address": "^10.2.0"},"engines": {"node": ">= 16"@@ -19541,9 +22508,9 @@"license": "MIT"},"node_modules/fast-uri": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz",- "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==",+ "version": "3.1.3",+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.3.tgz",+ "integrity": "sha512-i70LwGWUduXqzicKXWshooq+sWL1K3WUU5rKZNG/0i3a1OSoX3HqhH5WbWwTmqWfor4urUakGPiRQcleRZTwOg==","funding": [{"type": "github",@@ -19791,9 +22758,9 @@}},"node_modules/file-type": {- "version": "21.3.0",- "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.0.tgz",- "integrity": "sha512-8kPJMIGz1Yt/aPEwOsrR97ZyZaD1Iqm8PClb1nYFclUCkBi0Ma5IsYNQzvSFS9ib51lWyIw5mIT9rWzI/xjpzA==",+ "version": "21.3.4",+ "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.4.tgz",+ "integrity": "sha512-Ievi/yy8DS3ygGvT47PjSfdFoX+2isQueoYP1cntFW1JLYAuS4GD7NUPGg4zv2iZfV52uDyk5w5Z0TdpRS6Q1g==","license": "MIT","dependencies": {"@tokenizer/inflate": "^0.4.1",@@ -19941,9 +22908,9 @@"license": "ISC"},"node_modules/follow-redirects": {- "version": "1.15.11",- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz",- "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==",+ "version": "1.16.0",+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz",+ "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==","funding": [{"type": "individual",@@ -19989,16 +22956,16 @@}},"node_modules/form-data": {- "version": "4.0.5",- "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",- "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",+ "version": "4.0.6",+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz",+ "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==","license": "MIT","dependencies": {"asynckit": "^0.4.0","combined-stream": "^1.0.8","es-set-tostringtag": "^2.1.0",- "hasown": "^2.0.2",- "mime-types": "^2.1.12"+ "hasown": "^2.0.4",+ "mime-types": "^2.1.35"},"engines": {"node": ">= 6"@@ -20094,39 +23061,11 @@"node": ">=14.14"}},- "node_modules/fs-minipass": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",- "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "minipass": "^3.0.0"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/fs-minipass/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },"node_modules/fs.realpath": {"version": "1.0.0","resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz","integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",- "devOptional": true,+ "dev": true,"license": "ISC"},"node_modules/fsevents": {@@ -20365,7 +23304,7 @@"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz","integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==","deprecated": "Glob versions prior to v9 are no longer supported",- "devOptional": true,+ "dev": true,"license": "ISC","dependencies": {"fs.realpath": "^1.0.0",@@ -20488,9 +23427,9 @@}},"node_modules/google-auth-library/node_modules/brace-expansion": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",- "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.1.tgz",+ "integrity": "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==","license": "MIT","dependencies": {"balanced-match": "^1.0.0"@@ -20683,9 +23622,9 @@}},"node_modules/gtoken/node_modules/brace-expansion": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",- "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.1.tgz",+ "integrity": "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==","license": "MIT","dependencies": {"balanced-match": "^1.0.0"@@ -20818,9 +23757,9 @@}},"node_modules/gun/node_modules/ws": {- "version": "7.5.10",- "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",- "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",+ "version": "7.5.11",+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.11.tgz",+ "integrity": "sha512-zS54Oen9bITtp7kp2XM3AydrCIq1D+HwJOuH+c+e4LfpL/lotP5osijd+UoMnxwAam1GN8R4KtLAyIrIcBNpiA==","license": "MIT","engines": {"node": ">=8.3.0"@@ -20908,18 +23847,10 @@"url": "https://github.com/sponsors/ljharb"}},- "node_modules/has-unicode": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",- "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",- "license": "ISC",- "optional": true,- "peer": true- },"node_modules/hasown": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",- "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",+ "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==","license": "MIT","dependencies": {"function-bind": "^1.1.2"@@ -20969,9 +23900,9 @@}},"node_modules/hono": {- "version": "4.12.3",- "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.3.tgz",- "integrity": "sha512-SFsVSjp8sj5UumXOOFlkZOG6XS9SJDKw0TbwFeV+AJ8xlST8kxK5Z/5EYa111UY8732lK2S/xB653ceuaoGwpg==",+ "version": "4.12.27",+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.27.tgz",+ "integrity": "sha512-1yrb/+w6HWQJrUCLkJ2IF5jNIPvvFkblV5RNOYl6bV+OA6p9GLcMpHFFGTosSvHvcAUibuUukRqhlYI4z32C7Q==","license": "MIT","engines": {"node": ">=16.9.0"@@ -21064,14 +23995,6 @@"node": ">= 0.6"}},- "node_modules/http-cache-semantics": {- "version": "4.2.0",- "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz",- "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==",- "license": "BSD-2-Clause",- "optional": true,- "peer": true- },"node_modules/http-errors": {"version": "2.0.1","resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",@@ -21129,9 +24052,9 @@}},"node_modules/http-proxy-middleware": {- "version": "3.0.5",- "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-3.0.5.tgz",- "integrity": "sha512-GLZZm1X38BPY4lkXA01jhwxvDoOkkXqjgVyUzVxiEK4iuRu03PZoYHhHRwxnfhQMDuaxi3vVri0YgSro/1oWqg==",+ "version": "3.0.7",+ "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-3.0.7.tgz",+ "integrity": "sha512-iwbQltVlx8bCrqePUM8C+hllHvdawVhQJaLrj1X7qllkvFQdXFsr16pW/mo9+JDVjN+QO2XUx9jd8SmoFkE5qw==","license": "MIT","dependencies": {"@types/http-proxy": "^1.17.15",@@ -21142,7 +24065,7 @@"micromatch": "^4.0.8"},"engines": {- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"+ "node": "^14.18.0 || ^16.10.0 || >=18.0.0"}},"node_modules/https-proxy-agent": {@@ -21150,8 +24073,6 @@"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz","integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==","license": "MIT",- "optional": true,- "peer": true,"dependencies": {"agent-base": "6","debug": "4"@@ -21178,17 +24099,6 @@"node": ">=18.18.0"}},- "node_modules/humanize-ms": {- "version": "1.2.1",- "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",- "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",- "license": "MIT",- "optional": true,- "peer": true,- "dependencies": {- "ms": "^2.0.0"- }- },"node_modules/iceberg-js": {"version": "0.8.1","resolved": "https://registry.npmjs.org/iceberg-js/-/iceberg-js-0.8.1.tgz",@@ -21306,7 +24216,7 @@"version": "0.1.4","resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz","integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",- "devOptional": true,+ "dev": true,"license": "MIT","engines": {"node": ">=0.8.19"@@ -21336,20 +24246,12 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/infer-owner": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz",- "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==",- "license": "ISC",- "optional": true,- "peer": true- },"node_modules/inflight": {"version": "1.0.6","resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz","integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==","deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",- "devOptional": true,+ "dev": true,"license": "ISC","dependencies": {"once": "^1.3.0",@@ -21568,9 +24470,9 @@}},"node_modules/ip-address": {- "version": "10.0.1",- "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.0.1.tgz",- "integrity": "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==",+ "version": "10.2.0",+ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.2.0.tgz",+ "integrity": "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==","license": "MIT","engines": {"node": ">= 12"@@ -21644,6 +24546,7 @@"integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==","license": "MIT","optional": true,+ "peer": true,"engines": {"node": ">=12"},@@ -21651,14 +24554,6 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/is-lambda": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz",- "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==",- "license": "MIT",- "optional": true,- "peer": true- },"node_modules/is-number": {"version": "7.0.0","resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",@@ -21732,6 +24627,7 @@"integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==","license": "MIT","optional": true,+ "peer": true,"engines": {"node": ">=12"},@@ -21847,10 +24743,12 @@}},"node_modules/jose": {- "version": "6.1.3",- "resolved": "https://registry.npmjs.org/jose/-/jose-6.1.3.tgz",- "integrity": "sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==",+ "version": "5.10.0",+ "resolved": "https://registry.npmjs.org/jose/-/jose-5.10.0.tgz",+ "integrity": "sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==","license": "MIT",+ "optional": true,+ "peer": true,"funding": {"url": "https://github.com/sponsors/panva"}@@ -21979,9 +24877,19 @@"optional": true},"node_modules/js-yaml": {- "version": "4.1.1",- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",- "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz",+ "integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/puzrin"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/nodeca"+ }+ ],"license": "MIT","dependencies": {"argparse": "^2.0.1"@@ -22210,9 +25118,9 @@}},"node_modules/koa-router/node_modules/path-to-regexp": {- "version": "8.3.0",- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",- "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",+ "version": "8.4.2",+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz",+ "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==","license": "MIT","funding": {"type": "opencollective",@@ -22633,9 +25541,9 @@}},"node_modules/lodash-es": {- "version": "4.17.22",- "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.22.tgz",- "integrity": "sha512-XEawp1t0gxSi9x01glktRZ5HDy0HXqrM0x5pXQM98EaI0NxO6jVM7omDOxsuEo5UIASAnm2bRp1Jt/e0a2XU8Q==",+ "version": "4.18.1",+ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz",+ "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==","license": "MIT"},"node_modules/lodash.camelcase": {@@ -22718,6 +25626,7 @@"integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==","license": "MIT","optional": true,+ "peer": true,"dependencies": {"chalk": "^5.0.0","is-unicode-supported": "^1.1.0"@@ -22780,89 +25689,16 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/make-asynchronous/node_modules/type-fest": {- "version": "4.41.0",- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz",- "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==",- "license": "(MIT OR CC0-1.0)",- "engines": {- "node": ">=16"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/make-fetch-happen": {- "version": "9.1.0",- "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz",- "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "agentkeepalive": "^4.1.3",- "cacache": "^15.2.0",- "http-cache-semantics": "^4.1.0",- "http-proxy-agent": "^4.0.1",- "https-proxy-agent": "^5.0.0",- "is-lambda": "^1.0.1",- "lru-cache": "^6.0.0",- "minipass": "^3.1.3",- "minipass-collect": "^1.0.2",- "minipass-fetch": "^1.3.2",- "minipass-flush": "^1.0.5",- "minipass-pipeline": "^1.2.4",- "negotiator": "^0.6.2",- "promise-retry": "^2.0.1",- "socks-proxy-agent": "^6.0.0",- "ssri": "^8.0.0"- },- "engines": {- "node": ">= 10"- }- },- "node_modules/make-fetch-happen/node_modules/http-proxy-agent": {- "version": "4.0.1",- "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz",- "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==",- "license": "MIT",- "optional": true,- "peer": true,- "dependencies": {- "@tootallnate/once": "1",- "agent-base": "6",- "debug": "4"- },- "engines": {- "node": ">= 6"- }- },- "node_modules/make-fetch-happen/node_modules/lru-cache": {- "version": "6.0.0",- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=10"- }- },- "node_modules/make-fetch-happen/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "yallist": "^4.0.0"- },+ "node_modules/make-asynchronous/node_modules/type-fest": {+ "version": "4.41.0",+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz",+ "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==",+ "license": "(MIT OR CC0-1.0)","engines": {- "node": ">=8"+ "node": ">=16"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"}},"node_modules/marked-terminal": {@@ -22871,6 +25707,7 @@"integrity": "sha512-ubWhwcBFHnXsjYNsu+Wndpg0zhY4CahSpPlA70PlO0rR9r2sZpkyU+rkCsOWH+KMEkx847UpALON+HWgxowFtw==","license": "MIT","optional": true,+ "peer": true,"dependencies": {"ansi-escapes": "^6.2.0","cardinal": "^2.1.1",@@ -22892,6 +25729,7 @@"integrity": "sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==","license": "MIT","optional": true,+ "peer": true,"engines": {"node": ">=14.16"},@@ -23070,7 +25908,7 @@"version": "3.1.5","resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz","integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",- "devOptional": true,+ "dev": true,"license": "ISC","dependencies": {"brace-expansion": "^1.1.7"@@ -23097,194 +25935,6 @@"node": ">=8"}},- "node_modules/minipass-collect": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz",- "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "minipass": "^3.0.0"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/minipass-collect/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/minipass-fetch": {- "version": "1.4.1",- "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz",- "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==",- "license": "MIT",- "optional": true,- "peer": true,- "dependencies": {- "minipass": "^3.1.0",- "minipass-sized": "^1.0.3",- "minizlib": "^2.0.0"- },- "engines": {- "node": ">=8"- },- "optionalDependencies": {- "encoding": "^0.1.12"- }- },- "node_modules/minipass-fetch/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/minipass-flush": {- "version": "1.0.5",- "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz",- "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "minipass": "^3.0.0"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/minipass-flush/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/minipass-pipeline": {- "version": "1.2.4",- "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz",- "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "minipass": "^3.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/minipass-pipeline/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/minipass-sized": {- "version": "1.0.3",- "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz",- "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "minipass": "^3.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/minipass-sized/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/minizlib": {- "version": "2.1.2",- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",- "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",- "license": "MIT",- "optional": true,- "peer": true,- "dependencies": {- "minipass": "^3.0.0",- "yallist": "^4.0.0"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/minizlib/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/mkdirp": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",- "license": "MIT",- "optional": true,- "peer": true,- "bin": {- "mkdirp": "bin/cmd.js"- },- "engines": {- "node": ">=10"- }- },"node_modules/mkdirp-classic": {"version": "0.5.3","resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",@@ -23459,32 +26109,6 @@}}},- "node_modules/node-gyp": {- "version": "8.4.1",- "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz",- "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==",- "license": "MIT",- "optional": true,- "peer": true,- "dependencies": {- "env-paths": "^2.2.0",- "glob": "^7.1.4",- "graceful-fs": "^4.2.6",- "make-fetch-happen": "^9.1.0",- "nopt": "^5.0.0",- "npmlog": "^6.0.0",- "rimraf": "^3.0.2",- "semver": "^7.3.5",- "tar": "^6.1.2",- "which": "^2.0.2"- },- "bin": {- "node-gyp": "bin/node-gyp.js"- },- "engines": {- "node": ">= 10.12.0"- }- },"node_modules/node-gyp-build": {"version": "4.8.4","resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz",@@ -23497,79 +26121,6 @@"node-gyp-build-test": "build-test.js"}},- "node_modules/node-gyp/node_modules/are-we-there-yet": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz",- "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==",- "deprecated": "This package is no longer supported.",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "delegates": "^1.0.0",- "readable-stream": "^3.6.0"- },- "engines": {- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"- }- },- "node_modules/node-gyp/node_modules/gauge": {- "version": "4.0.4",- "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz",- "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==",- "deprecated": "This package is no longer supported.",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "aproba": "^1.0.3 || ^2.0.0",- "color-support": "^1.1.3",- "console-control-strings": "^1.1.0",- "has-unicode": "^2.0.1",- "signal-exit": "^3.0.7",- "string-width": "^4.2.3",- "strip-ansi": "^6.0.1",- "wide-align": "^1.1.5"- },- "engines": {- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"- }- },- "node_modules/node-gyp/node_modules/npmlog": {- "version": "6.0.2",- "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz",- "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==",- "deprecated": "This package is no longer supported.",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "are-we-there-yet": "^3.0.0",- "console-control-strings": "^1.1.0",- "gauge": "^4.0.3",- "set-blocking": "^2.0.0"- },- "engines": {- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"- }- },- "node_modules/nopt": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",- "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "abbrev": "1"- },- "bin": {- "nopt": "bin/nopt.js"- },- "engines": {- "node": ">=6"- }- },"node_modules/normalize-package-data": {"version": "8.0.0","resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-8.0.0.tgz",@@ -23597,9 +26148,9 @@}},"node_modules/npm": {- "version": "11.7.0",- "resolved": "https://registry.npmjs.org/npm/-/npm-11.7.0.tgz",- "integrity": "sha512-wiCZpv/41bIobCoJ31NStIWKfAxxYyD1iYnWCtiyns8s5v3+l8y0HCP/sScuH6B5+GhIfda4HQKiqeGZwJWhFw==",+ "version": "11.18.0",+ "resolved": "https://registry.npmjs.org/npm/-/npm-11.18.0.tgz",+ "integrity": "sha512-T67M4L5wNm0cZ7EBLErcEkY1SmzEW/WJ+SADBzsFUY1UdAPfFHXFQtZ6SEXiK0+vzXysCvAsepbMaBTwnrAD+w==","bundleDependencies": ["@isaacs/string-locale-compare","@npmcli/arborist",@@ -23617,7 +26168,6 @@"cacache","chalk","ci-info",- "cli-columns","fastest-levenshtein","fs-minipass","glob",@@ -23678,71 +26228,70 @@],"dependencies": {"@isaacs/string-locale-compare": "^1.1.0",- "@npmcli/arborist": "^9.1.9",- "@npmcli/config": "^10.4.5",+ "@npmcli/arborist": "^9.9.0",+ "@npmcli/config": "^10.12.0","@npmcli/fs": "^5.0.0","@npmcli/map-workspaces": "^5.0.3","@npmcli/metavuln-calculator": "^9.0.3",- "@npmcli/package-json": "^7.0.4",+ "@npmcli/package-json": "^7.0.5","@npmcli/promise-spawn": "^9.0.1","@npmcli/redact": "^4.0.0",- "@npmcli/run-script": "^10.0.3",- "@sigstore/tuf": "^4.0.0",+ "@npmcli/run-script": "^10.0.4",+ "@sigstore/tuf": "^4.0.2","abbrev": "^4.0.0","archy": "~1.0.0",- "cacache": "^20.0.3",+ "cacache": "^20.0.4","chalk": "^5.6.2",- "ci-info": "^4.3.1",- "cli-columns": "^4.0.0",+ "ci-info": "^4.4.0","fastest-levenshtein": "^1.0.16","fs-minipass": "^3.0.3",- "glob": "^13.0.0",+ "glob": "^13.0.6","graceful-fs": "^4.2.11",- "hosted-git-info": "^9.0.2",+ "hosted-git-info": "^9.0.3","ini": "^6.0.0",- "init-package-json": "^8.2.4",- "is-cidr": "^6.0.1",+ "init-package-json": "^8.2.5",+ "is-cidr": "^6.0.4","json-parse-even-better-errors": "^5.0.0","libnpmaccess": "^10.0.3",- "libnpmdiff": "^8.0.12",- "libnpmexec": "^10.1.11",- "libnpmfund": "^7.0.12",+ "libnpmdiff": "^8.1.11",+ "libnpmexec": "^10.3.1",+ "libnpmfund": "^7.0.25","libnpmorg": "^8.0.1",- "libnpmpack": "^9.0.12",- "libnpmpublish": "^11.1.3",+ "libnpmpack": "^9.1.11",+ "libnpmpublish": "^11.2.0","libnpmsearch": "^9.0.1","libnpmteam": "^8.0.2",- "libnpmversion": "^8.0.3",- "make-fetch-happen": "^15.0.3",- "minimatch": "^10.1.1",- "minipass": "^7.1.1",+ "libnpmversion": "^8.0.4",+ "make-fetch-happen": "^15.0.6",+ "minimatch": "^10.2.5",+ "minipass": "^7.1.3","minipass-pipeline": "^1.2.4","ms": "^2.1.2",- "node-gyp": "^12.1.0",+ "node-gyp": "^12.4.0","nopt": "^9.0.0","npm-audit-report": "^7.0.0","npm-install-checks": "^8.0.0","npm-package-arg": "^13.0.2","npm-pick-manifest": "^11.0.3",- "npm-profile": "^12.0.1",+ "npm-profile": "^12.0.2","npm-registry-fetch": "^19.1.1","npm-user-validate": "^4.0.0","p-map": "^7.0.4",- "pacote": "^21.0.4",+ "pacote": "^21.5.1","parse-conflict-json": "^5.0.1","proc-log": "^6.1.0","qrcode-terminal": "^0.12.0","read": "^5.0.1",- "semver": "^7.7.3",+ "semver": "^7.8.5","spdx-expression-parse": "^4.0.0",- "ssri": "^13.0.0",+ "ssri": "^13.0.1","supports-color": "^10.2.2",- "tar": "^7.5.2",+ "tar": "^7.5.19","text-table": "~0.2.0","tiny-relative-date": "^2.0.2","treeverse": "^3.0.0",- "validate-npm-package-name": "^7.0.0",- "which": "^6.0.0"+ "validate-npm-package-name": "^7.0.2",+ "which": "^6.0.1"},"bin": {"npm": "bin/npm-cli.js",@@ -23780,23 +26329,12 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/npm/node_modules/@isaacs/balanced-match": {- "version": "4.0.1",- "inBundle": true,- "license": "MIT",- "engines": {- "node": "20 || >=22"- }- },- "node_modules/npm/node_modules/@isaacs/brace-expansion": {- "version": "5.0.0",+ "node_modules/npm/node_modules/@gar/promise-retry": {+ "version": "1.0.3","inBundle": true,"license": "MIT",- "dependencies": {- "@isaacs/balanced-match": "^4.0.1"- },"engines": {- "node": "20 || >=22"+ "node": "^20.17.0 || >=22.9.0"}},"node_modules/npm/node_modules/@isaacs/fs-minipass": {@@ -23816,7 +26354,7 @@"license": "ISC"},"node_modules/npm/node_modules/@npmcli/agent": {- "version": "4.0.0",+ "version": "4.0.2","inBundle": true,"license": "ISC","dependencies": {@@ -23831,10 +26369,11 @@}},"node_modules/npm/node_modules/@npmcli/arborist": {- "version": "9.1.9",+ "version": "9.9.0","inBundle": true,"license": "ISC","dependencies": {+ "@gar/promise-retry": "^1.0.0","@isaacs/string-locale-compare": "^1.1.0","@npmcli/fs": "^5.0.0","@npmcli/installed-package-contents": "^4.0.0",@@ -23848,7 +26387,7 @@"@npmcli/run-script": "^10.0.0","bin-links": "^6.0.0","cacache": "^20.0.1",- "common-ancestor-path": "^1.0.1",+ "common-ancestor-path": "^2.0.0","hosted-git-info": "^9.0.0","json-stringify-nice": "^1.1.4","lru-cache": "^11.2.1",@@ -23877,7 +26416,7 @@}},"node_modules/npm/node_modules/@npmcli/config": {- "version": "10.4.5",+ "version": "10.12.0","inBundle": true,"license": "ISC","dependencies": {@@ -23906,16 +26445,16 @@}},"node_modules/npm/node_modules/@npmcli/git": {- "version": "7.0.1",+ "version": "7.0.2","inBundle": true,"license": "ISC","dependencies": {+ "@gar/promise-retry": "^1.0.0","@npmcli/promise-spawn": "^9.0.0","ini": "^6.0.0","lru-cache": "^11.2.1","npm-pick-manifest": "^11.0.1","proc-log": "^6.0.0",- "promise-retry": "^2.0.1","semver": "^7.3.5","which": "^6.0.0"},@@ -23984,7 +26523,7 @@}},"node_modules/npm/node_modules/@npmcli/package-json": {- "version": "7.0.4",+ "version": "7.0.5","inBundle": true,"license": "ISC","dependencies": {@@ -23994,7 +26533,7 @@"json-parse-even-better-errors": "^5.0.0","proc-log": "^6.0.0","semver": "^7.5.3",- "validate-npm-package-license": "^3.0.4"+ "spdx-expression-parse": "^4.0.0"},"engines": {"node": "^20.17.0 || >=22.9.0"@@ -24031,7 +26570,7 @@}},"node_modules/npm/node_modules/@npmcli/run-script": {- "version": "10.0.3",+ "version": "10.0.4","inBundle": true,"license": "ISC","dependencies": {@@ -24039,8 +26578,7 @@"@npmcli/package-json": "^7.0.0","@npmcli/promise-spawn": "^9.0.0","node-gyp": "^12.1.0",- "proc-log": "^6.0.0",- "which": "^6.0.0"+ "proc-log": "^6.0.0"},"engines": {"node": "^20.17.0 || >=22.9.0"@@ -24058,7 +26596,7 @@}},"node_modules/npm/node_modules/@sigstore/core": {- "version": "3.0.0",+ "version": "3.2.1","inBundle": true,"license": "Apache-2.0","engines": {@@ -24066,7 +26604,7 @@}},"node_modules/npm/node_modules/@sigstore/protobuf-specs": {- "version": "0.5.0",+ "version": "0.5.1","inBundle": true,"license": "Apache-2.0","engines": {@@ -24074,48 +26612,40 @@}},"node_modules/npm/node_modules/@sigstore/sign": {- "version": "4.0.1",+ "version": "4.1.1","inBundle": true,"license": "Apache-2.0","dependencies": {- "@sigstore/bundle": "^4.0.0",- "@sigstore/core": "^3.0.0",- "@sigstore/protobuf-specs": "^0.5.0",- "make-fetch-happen": "^15.0.2",- "proc-log": "^5.0.0",- "promise-retry": "^2.0.1"- },- "engines": {- "node": "^20.17.0 || >=22.9.0"- }- },- "node_modules/npm/node_modules/@sigstore/sign/node_modules/proc-log": {- "version": "5.0.0",- "inBundle": true,- "license": "ISC",+ "@gar/promise-retry": "^1.0.2",+ "@sigstore/bundle": "^4.0.0",+ "@sigstore/core": "^3.2.0",+ "@sigstore/protobuf-specs": "^0.5.0",+ "make-fetch-happen": "^15.0.4",+ "proc-log": "^6.1.0"+ },"engines": {- "node": "^18.17.0 || >=20.5.0"+ "node": "^20.17.0 || >=22.9.0"}},"node_modules/npm/node_modules/@sigstore/tuf": {- "version": "4.0.0",+ "version": "4.0.2","inBundle": true,"license": "Apache-2.0","dependencies": {"@sigstore/protobuf-specs": "^0.5.0",- "tuf-js": "^4.0.0"+ "tuf-js": "^4.1.0"},"engines": {"node": "^20.17.0 || >=22.9.0"}},"node_modules/npm/node_modules/@sigstore/verify": {- "version": "3.0.0",+ "version": "3.1.1","inBundle": true,"license": "Apache-2.0","dependencies": {"@sigstore/bundle": "^4.0.0",- "@sigstore/core": "^3.0.0",+ "@sigstore/core": "^3.2.1","@sigstore/protobuf-specs": "^0.5.0"},"engines": {@@ -24131,31 +26661,17 @@}},"node_modules/npm/node_modules/@tufjs/models": {- "version": "4.0.0",+ "version": "4.1.0","inBundle": true,"license": "MIT","dependencies": {"@tufjs/canonical-json": "2.0.0",- "minimatch": "^9.0.5"+ "minimatch": "^10.1.1"},"engines": {"node": "^20.17.0 || >=22.9.0"}},- "node_modules/npm/node_modules/@tufjs/models/node_modules/minimatch": {- "version": "9.0.5",- "inBundle": true,- "license": "ISC",- "dependencies": {- "brace-expansion": "^2.0.1"- },- "engines": {- "node": ">=16 || 14 >=14.17"- },- "funding": {- "url": "https://github.com/sponsors/isaacs"- }- },"node_modules/npm/node_modules/abbrev": {"version": "4.0.0","inBundle": true,@@ -24172,14 +26688,6 @@"node": ">= 14"}},- "node_modules/npm/node_modules/ansi-regex": {- "version": "5.0.1",- "inBundle": true,- "license": "MIT",- "engines": {- "node": ">=8"- }- },"node_modules/npm/node_modules/aproba": {"version": "2.1.0","inBundle": true,@@ -24191,12 +26699,15 @@"license": "MIT"},"node_modules/npm/node_modules/balanced-match": {- "version": "1.0.2",+ "version": "4.0.4","inBundle": true,- "license": "MIT"+ "license": "MIT",+ "engines": {+ "node": "18 || 20 || >=22"+ }},"node_modules/npm/node_modules/bin-links": {- "version": "6.0.0",+ "version": "6.0.2","inBundle": true,"license": "ISC","dependencies": {@@ -24222,15 +26733,18 @@}},"node_modules/npm/node_modules/brace-expansion": {- "version": "2.0.2",+ "version": "5.0.7","inBundle": true,"license": "MIT","dependencies": {- "balanced-match": "^1.0.0"+ "balanced-match": "^4.0.2"+ },+ "engines": {+ "node": "18 || 20 || >=22"}},"node_modules/npm/node_modules/cacache": {- "version": "20.0.3",+ "version": "20.0.4","inBundle": true,"license": "ISC","dependencies": {@@ -24243,8 +26757,7 @@"minipass-flush": "^1.0.5","minipass-pipeline": "^1.2.4","p-map": "^7.0.2",- "ssri": "^13.0.0",- "unique-filename": "^5.0.0"+ "ssri": "^13.0.0"},"engines": {"node": "^20.17.0 || >=22.9.0"@@ -24270,7 +26783,7 @@}},"node_modules/npm/node_modules/ci-info": {- "version": "4.3.1",+ "version": "4.4.0","funding": [{"type": "github",@@ -24284,28 +26797,13 @@}},"node_modules/npm/node_modules/cidr-regex": {- "version": "5.0.1",+ "version": "5.0.5","inBundle": true,"license": "BSD-2-Clause",- "dependencies": {- "ip-regex": "5.0.0"- },"engines": {"node": ">=20"}},- "node_modules/npm/node_modules/cli-columns": {- "version": "4.0.0",- "inBundle": true,- "license": "MIT",- "dependencies": {- "string-width": "^4.2.3",- "strip-ansi": "^6.0.1"- },- "engines": {- "node": ">= 10"- }- },"node_modules/npm/node_modules/cmd-shim": {"version": "8.0.0","inBundle": true,@@ -24315,9 +26813,12 @@}},"node_modules/npm/node_modules/common-ancestor-path": {- "version": "1.0.1",+ "version": "2.0.0","inBundle": true,- "license": "ISC"+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": ">= 18"+ }},"node_modules/npm/node_modules/cssesc": {"version": "3.0.0",@@ -24347,27 +26848,13 @@}},"node_modules/npm/node_modules/diff": {- "version": "8.0.2",+ "version": "8.0.4","inBundle": true,"license": "BSD-3-Clause","engines": {"node": ">=0.3.1"}},- "node_modules/npm/node_modules/emoji-regex": {- "version": "8.0.0",- "inBundle": true,- "license": "MIT"- },- "node_modules/npm/node_modules/encoding": {- "version": "0.1.13",- "inBundle": true,- "license": "MIT",- "optional": true,- "dependencies": {- "iconv-lite": "^0.6.2"- }- },"node_modules/npm/node_modules/env-paths": {"version": "2.2.1","inBundle": true,@@ -24376,11 +26863,6 @@"node": ">=6"}},- "node_modules/npm/node_modules/err-code": {- "version": "2.0.3",- "inBundle": true,- "license": "MIT"- },"node_modules/npm/node_modules/exponential-backoff": {"version": "3.1.3","inBundle": true,@@ -24406,16 +26888,16 @@}},"node_modules/npm/node_modules/glob": {- "version": "13.0.0",+ "version": "13.0.6","inBundle": true,"license": "BlueOak-1.0.0","dependencies": {- "minimatch": "^10.1.1",- "minipass": "^7.1.2",- "path-scurry": "^2.0.0"+ "minimatch": "^10.2.2",+ "minipass": "^7.1.3",+ "path-scurry": "^2.0.2"},"engines": {- "node": "20 || >=22"+ "node": "18 || 20 || >=22"},"funding": {"url": "https://github.com/sponsors/isaacs"@@ -24427,7 +26909,7 @@"license": "ISC"},"node_modules/npm/node_modules/hosted-git-info": {- "version": "9.0.2",+ "version": "9.0.3","inBundle": true,"license": "ISC","dependencies": {@@ -24467,7 +26949,7 @@}},"node_modules/npm/node_modules/iconv-lite": {- "version": "0.6.3",+ "version": "0.7.2","inBundle": true,"license": "MIT","optional": true,@@ -24476,6 +26958,10 @@},"engines": {"node": ">=0.10.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/express"}},"node_modules/npm/node_modules/ignore-walk": {@@ -24489,14 +26975,6 @@"node": "^20.17.0 || >=22.9.0"}},- "node_modules/npm/node_modules/imurmurhash": {- "version": "0.1.4",- "inBundle": true,- "license": "MIT",- "engines": {- "node": ">=0.8.19"- }- },"node_modules/npm/node_modules/ini": {"version": "6.0.0","inBundle": true,@@ -24506,7 +26984,7 @@}},"node_modules/npm/node_modules/init-package-json": {- "version": "8.2.4",+ "version": "8.2.5","inBundle": true,"license": "ISC","dependencies": {@@ -24515,7 +26993,6 @@"promzard": "^3.0.1","read": "^5.0.1","semver": "^7.7.2",- "validate-npm-package-license": "^3.0.4","validate-npm-package-name": "^7.0.0"},"engines": {@@ -24523,49 +27000,30 @@}},"node_modules/npm/node_modules/ip-address": {- "version": "10.0.1",+ "version": "10.2.0","inBundle": true,"license": "MIT","engines": {"node": ">= 12"}},- "node_modules/npm/node_modules/ip-regex": {- "version": "5.0.0",- "inBundle": true,- "license": "MIT",- "engines": {- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },"node_modules/npm/node_modules/is-cidr": {- "version": "6.0.1",+ "version": "6.0.4","inBundle": true,"license": "BSD-2-Clause","dependencies": {- "cidr-regex": "5.0.1"+ "cidr-regex": "^5.0.4"},"engines": {"node": ">=20"}},- "node_modules/npm/node_modules/is-fullwidth-code-point": {- "version": "3.0.0",- "inBundle": true,- "license": "MIT",- "engines": {- "node": ">=8"- }- },"node_modules/npm/node_modules/isexe": {- "version": "3.1.1",+ "version": "4.0.0","inBundle": true,- "license": "ISC",+ "license": "BlueOak-1.0.0","engines": {- "node": ">=16"+ "node": ">=20"}},"node_modules/npm/node_modules/json-parse-even-better-errors": {@@ -24615,11 +27073,11 @@}},"node_modules/npm/node_modules/libnpmdiff": {- "version": "8.0.12",+ "version": "8.1.11","inBundle": true,"license": "ISC","dependencies": {- "@npmcli/arborist": "^9.1.9",+ "@npmcli/arborist": "^9.9.0","@npmcli/installed-package-contents": "^4.0.0","binary-extensions": "^3.0.0","diff": "^8.0.2",@@ -24633,18 +27091,18 @@}},"node_modules/npm/node_modules/libnpmexec": {- "version": "10.1.11",+ "version": "10.3.1","inBundle": true,"license": "ISC","dependencies": {- "@npmcli/arborist": "^9.1.9",+ "@gar/promise-retry": "^1.0.0",+ "@npmcli/arborist": "^9.9.0","@npmcli/package-json": "^7.0.0","@npmcli/run-script": "^10.0.0","ci-info": "^4.0.0","npm-package-arg": "^13.0.0","pacote": "^21.0.2","proc-log": "^6.0.0",- "promise-retry": "^2.0.1","read": "^5.0.1","semver": "^7.3.7","signal-exit": "^4.1.0",@@ -24655,11 +27113,11 @@}},"node_modules/npm/node_modules/libnpmfund": {- "version": "7.0.12",+ "version": "7.0.25","inBundle": true,"license": "ISC","dependencies": {- "@npmcli/arborist": "^9.1.9"+ "@npmcli/arborist": "^9.9.0"},"engines": {"node": "^20.17.0 || >=22.9.0"@@ -24678,11 +27136,11 @@}},"node_modules/npm/node_modules/libnpmpack": {- "version": "9.0.12",+ "version": "9.1.11","inBundle": true,"license": "ISC","dependencies": {- "@npmcli/arborist": "^9.1.9",+ "@npmcli/arborist": "^9.9.0","@npmcli/run-script": "^10.0.0","npm-package-arg": "^13.0.0","pacote": "^21.0.2"@@ -24692,7 +27150,7 @@}},"node_modules/npm/node_modules/libnpmpublish": {- "version": "11.1.3",+ "version": "11.2.0","inBundle": true,"license": "ISC","dependencies": {@@ -24733,7 +27191,7 @@}},"node_modules/npm/node_modules/libnpmversion": {- "version": "8.0.3",+ "version": "8.0.4","inBundle": true,"license": "ISC","dependencies": {@@ -24748,19 +27206,21 @@}},"node_modules/npm/node_modules/lru-cache": {- "version": "11.2.2",+ "version": "11.5.1","inBundle": true,- "license": "ISC",+ "license": "BlueOak-1.0.0","engines": {"node": "20 || >=22"}},"node_modules/npm/node_modules/make-fetch-happen": {- "version": "15.0.3",+ "version": "15.0.6","inBundle": true,"license": "ISC","dependencies": {+ "@gar/promise-retry": "^1.0.0","@npmcli/agent": "^4.0.0",+ "@npmcli/redact": "^4.0.0","cacache": "^20.0.1","http-cache-semantics": "^4.1.1","minipass": "^7.0.2",@@ -24769,7 +27229,6 @@"minipass-pipeline": "^1.2.4","negotiator": "^1.0.0","proc-log": "^6.0.0",- "promise-retry": "^2.0.1","ssri": "^13.0.0"},"engines": {@@ -24777,23 +27236,23 @@}},"node_modules/npm/node_modules/minimatch": {- "version": "10.1.1",+ "version": "10.2.5","inBundle": true,"license": "BlueOak-1.0.0","dependencies": {- "@isaacs/brace-expansion": "^5.0.0"+ "brace-expansion": "^5.0.5"},"engines": {- "node": "20 || >=22"+ "node": "18 || 20 || >=22"},"funding": {"url": "https://github.com/sponsors/isaacs"}},"node_modules/npm/node_modules/minipass": {- "version": "7.1.2",+ "version": "7.1.3","inBundle": true,- "license": "ISC",+ "license": "BlueOak-1.0.0","engines": {"node": ">=16 || 14 >=14.17"}@@ -24810,41 +27269,30 @@}},"node_modules/npm/node_modules/minipass-fetch": {- "version": "5.0.0",+ "version": "5.0.2","inBundle": true,"license": "MIT","dependencies": {"minipass": "^7.0.3",- "minipass-sized": "^1.0.3",+ "minipass-sized": "^2.0.0","minizlib": "^3.0.1"},"engines": {"node": "^20.17.0 || >=22.9.0"},"optionalDependencies": {- "encoding": "^0.1.13"+ "iconv-lite": "^0.7.2"}},"node_modules/npm/node_modules/minipass-flush": {- "version": "1.0.5",- "inBundle": true,- "license": "ISC",- "dependencies": {- "minipass": "^3.0.0"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/npm/node_modules/minipass-flush/node_modules/minipass": {- "version": "3.3.6",+ "version": "1.0.6","inBundle": true,- "license": "ISC",+ "license": "BlueOak-1.0.0","dependencies": {- "yallist": "^4.0.0"+ "minipass": "^7.1.3"},"engines": {- "node": ">=8"+ "node": ">=16 || 14 >=14.17"}},"node_modules/npm/node_modules/minipass-pipeline": {@@ -24869,23 +27317,17 @@"node": ">=8"}},- "node_modules/npm/node_modules/minipass-sized": {- "version": "1.0.3",+ "node_modules/npm/node_modules/minipass-pipeline/node_modules/yallist": {+ "version": "4.0.0","inBundle": true,- "license": "ISC",- "dependencies": {- "minipass": "^3.0.0"- },- "engines": {- "node": ">=8"- }+ "license": "ISC"},- "node_modules/npm/node_modules/minipass-sized/node_modules/minipass": {- "version": "3.3.6",+ "node_modules/npm/node_modules/minipass-sized": {+ "version": "2.0.0","inBundle": true,"license": "ISC","dependencies": {- "yallist": "^4.0.0"+ "minipass": "^7.1.2"},"engines": {"node": ">=8"@@ -24924,19 +27366,19 @@}},"node_modules/npm/node_modules/node-gyp": {- "version": "12.1.0",+ "version": "12.4.0","inBundle": true,"license": "MIT","dependencies": {"env-paths": "^2.2.0","exponential-backoff": "^3.1.1","graceful-fs": "^4.2.6",- "make-fetch-happen": "^15.0.0","nopt": "^9.0.0","proc-log": "^6.0.0","semver": "^7.3.5",- "tar": "^7.5.2",+ "tar": "^7.5.4","tinyglobby": "^0.2.12",+ "undici": "^6.25.0","which": "^6.0.0"},"bin": {@@ -25013,7 +27455,7 @@}},"node_modules/npm/node_modules/npm-packlist": {- "version": "10.0.3",+ "version": "10.0.4","inBundle": true,"license": "ISC","dependencies": {@@ -25039,12 +27481,12 @@}},"node_modules/npm/node_modules/npm-profile": {- "version": "12.0.1",+ "version": "12.0.2","inBundle": true,"license": "ISC","dependencies": {"npm-registry-fetch": "^19.0.0",- "proc-log": "^6.0.0"+ "proc-log": "^6.1.0"},"engines": {"node": "^20.17.0 || >=22.9.0"@@ -25088,10 +27530,11 @@}},"node_modules/npm/node_modules/pacote": {- "version": "21.0.4",+ "version": "21.5.1","inBundle": true,"license": "ISC","dependencies": {+ "@gar/promise-retry": "^1.0.0","@npmcli/git": "^7.0.0","@npmcli/installed-package-contents": "^4.0.0","@npmcli/package-json": "^7.0.0",@@ -25105,7 +27548,6 @@"npm-pick-manifest": "^11.0.1","npm-registry-fetch": "^19.0.0","proc-log": "^6.0.0",- "promise-retry": "^2.0.1","sigstore": "^4.0.0","ssri": "^13.0.0","tar": "^7.4.3"@@ -25131,7 +27573,7 @@}},"node_modules/npm/node_modules/path-scurry": {- "version": "2.0.0",+ "version": "2.0.2","inBundle": true,"license": "BlueOak-1.0.0","dependencies": {@@ -25139,14 +27581,14 @@"minipass": "^7.1.2"},"engines": {- "node": "20 || >=22"+ "node": "18 || 20 || >=22"},"funding": {"url": "https://github.com/sponsors/isaacs"}},"node_modules/npm/node_modules/postcss-selector-parser": {- "version": "7.1.0",+ "version": "7.1.4","inBundle": true,"license": "MIT","dependencies": {@@ -25189,18 +27631,6 @@"url": "https://github.com/sponsors/isaacs"}},- "node_modules/npm/node_modules/promise-retry": {- "version": "2.0.1",- "inBundle": true,- "license": "MIT",- "dependencies": {- "err-code": "^2.0.2",- "retry": "^0.12.0"- },- "engines": {- "node": ">=10"- }- },"node_modules/npm/node_modules/promzard": {"version": "3.0.1","inBundle": true,@@ -25238,14 +27668,6 @@"node": "^20.17.0 || >=22.9.0"}},- "node_modules/npm/node_modules/retry": {- "version": "0.12.0",- "inBundle": true,- "license": "MIT",- "engines": {- "node": ">= 4"- }- },"node_modules/npm/node_modules/safer-buffer": {"version": "2.1.2","inBundle": true,@@ -25253,7 +27675,7 @@"optional": true},"node_modules/npm/node_modules/semver": {- "version": "7.7.3",+ "version": "7.8.5","inBundle": true,"license": "ISC","bin": {@@ -25275,16 +27697,16 @@}},"node_modules/npm/node_modules/sigstore": {- "version": "4.0.0",+ "version": "4.1.1","inBundle": true,"license": "Apache-2.0","dependencies": {"@sigstore/bundle": "^4.0.0",- "@sigstore/core": "^3.0.0",+ "@sigstore/core": "^3.2.1","@sigstore/protobuf-specs": "^0.5.0",- "@sigstore/sign": "^4.0.0",- "@sigstore/tuf": "^4.0.0",- "@sigstore/verify": "^3.0.0"+ "@sigstore/sign": "^4.1.1",+ "@sigstore/tuf": "^4.0.2",+ "@sigstore/verify": "^3.1.1"},"engines": {"node": "^20.17.0 || >=22.9.0"@@ -25300,11 +27722,11 @@}},"node_modules/npm/node_modules/socks": {- "version": "2.8.7",+ "version": "2.8.9","inBundle": true,"license": "MIT","dependencies": {- "ip-address": "^10.0.1",+ "ip-address": "^10.1.1","smart-buffer": "^4.2.0"},"engines": {@@ -25325,24 +27747,6 @@"node": ">= 14"}},- "node_modules/npm/node_modules/spdx-correct": {- "version": "3.2.0",- "inBundle": true,- "license": "Apache-2.0",- "dependencies": {- "spdx-expression-parse": "^3.0.0",- "spdx-license-ids": "^3.0.0"- }- },- "node_modules/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse": {- "version": "3.0.1",- "inBundle": true,- "license": "MIT",- "dependencies": {- "spdx-exceptions": "^2.1.0",- "spdx-license-ids": "^3.0.0"- }- },"node_modules/npm/node_modules/spdx-exceptions": {"version": "2.5.0","inBundle": true,@@ -25358,43 +27762,19 @@}},"node_modules/npm/node_modules/spdx-license-ids": {- "version": "3.0.22",+ "version": "3.0.23","inBundle": true,"license": "CC0-1.0"},"node_modules/npm/node_modules/ssri": {- "version": "13.0.0",+ "version": "13.0.1","inBundle": true,"license": "ISC","dependencies": {"minipass": "^7.0.3"},"engines": {- "node": "^20.17.0 || >=22.9.0"- }- },- "node_modules/npm/node_modules/string-width": {- "version": "4.2.3",- "inBundle": true,- "license": "MIT",- "dependencies": {- "emoji-regex": "^8.0.0",- "is-fullwidth-code-point": "^3.0.0",- "strip-ansi": "^6.0.1"- },- "engines": {- "node": ">=8"- }- },- "node_modules/npm/node_modules/strip-ansi": {- "version": "6.0.1",- "inBundle": true,- "license": "MIT",- "dependencies": {- "ansi-regex": "^5.0.1"- },- "engines": {- "node": ">=8"+ "node": "^20.17.0 || >=22.9.0"}},"node_modules/npm/node_modules/supports-color": {@@ -25409,7 +27789,7 @@}},"node_modules/npm/node_modules/tar": {- "version": "7.5.2",+ "version": "7.5.19","inBundle": true,"license": "BlueOak-1.0.0","dependencies": {@@ -25423,14 +27803,6 @@"node": ">=18"}},- "node_modules/npm/node_modules/tar/node_modules/yallist": {- "version": "5.0.0",- "inBundle": true,- "license": "BlueOak-1.0.0",- "engines": {- "node": ">=18"- }- },"node_modules/npm/node_modules/text-table": {"version": "0.2.0","inBundle": true,@@ -25442,12 +27814,12 @@"license": "MIT"},"node_modules/npm/node_modules/tinyglobby": {- "version": "0.2.15",+ "version": "0.2.17","inBundle": true,"license": "MIT","dependencies": {"fdir": "^6.5.0",- "picomatch": "^4.0.3"+ "picomatch": "^4.0.4"},"engines": {"node": ">=12.0.0"@@ -25473,7 +27845,7 @@}},"node_modules/npm/node_modules/tinyglobby/node_modules/picomatch": {- "version": "4.0.3",+ "version": "4.0.4","inBundle": true,"license": "MIT","engines": {@@ -25492,38 +27864,24 @@}},"node_modules/npm/node_modules/tuf-js": {- "version": "4.0.0",+ "version": "4.1.0","inBundle": true,"license": "MIT","dependencies": {- "@tufjs/models": "4.0.0",- "debug": "^4.4.1",- "make-fetch-happen": "^15.0.0"- },- "engines": {- "node": "^20.17.0 || >=22.9.0"- }- },- "node_modules/npm/node_modules/unique-filename": {- "version": "5.0.0",- "inBundle": true,- "license": "ISC",- "dependencies": {- "unique-slug": "^6.0.0"+ "@tufjs/models": "4.1.0",+ "debug": "^4.4.3",+ "make-fetch-happen": "^15.0.1"},"engines": {"node": "^20.17.0 || >=22.9.0"}},- "node_modules/npm/node_modules/unique-slug": {- "version": "6.0.0",+ "node_modules/npm/node_modules/undici": {+ "version": "6.27.0","inBundle": true,- "license": "ISC",- "dependencies": {- "imurmurhash": "^0.1.4"- },+ "license": "MIT","engines": {- "node": "^20.17.0 || >=22.9.0"+ "node": ">=18.17"}},"node_modules/npm/node_modules/util-deprecate": {@@ -25531,26 +27889,8 @@"inBundle": true,"license": "MIT"},- "node_modules/npm/node_modules/validate-npm-package-license": {- "version": "3.0.4",- "inBundle": true,- "license": "Apache-2.0",- "dependencies": {- "spdx-correct": "^3.0.0",- "spdx-expression-parse": "^3.0.0"- }- },- "node_modules/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse": {- "version": "3.0.1",- "inBundle": true,- "license": "MIT",- "dependencies": {- "spdx-exceptions": "^2.1.0",- "spdx-license-ids": "^3.0.0"- }- },"node_modules/npm/node_modules/validate-npm-package-name": {- "version": "7.0.0",+ "version": "7.0.2","inBundle": true,"license": "ISC","engines": {@@ -25566,11 +27906,11 @@}},"node_modules/npm/node_modules/which": {- "version": "6.0.0",+ "version": "6.0.1","inBundle": true,"license": "ISC","dependencies": {- "isexe": "^3.1.1"+ "isexe": "^4.0.0"},"bin": {"node-which": "bin/which.js"@@ -25580,11 +27920,10 @@}},"node_modules/npm/node_modules/write-file-atomic": {- "version": "7.0.0",+ "version": "7.0.1","inBundle": true,"license": "ISC","dependencies": {- "imurmurhash": "^0.1.4","signal-exit": "^4.0.1"},"engines": {@@ -25592,9 +27931,12 @@}},"node_modules/npm/node_modules/yallist": {- "version": "4.0.0",+ "version": "5.0.0","inBundle": true,- "license": "ISC"+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": ">=18"+ }},"node_modules/object-assign": {"version": "4.1.1",@@ -25751,6 +28093,7 @@"integrity": "sha512-0TUxTiFJWv+JnjWm4o9yvuskpEJLXTcng8MJuKd+SzAzp2o+OP3HWqNhB4OdJRt1Vsd9/mR0oyaEYlOnL7XIRw==","license": "MIT","optional": true,+ "peer": true,"dependencies": {"chalk": "^5.3.0","cli-cursor": "^4.0.0",@@ -25775,6 +28118,7 @@"integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==","license": "MIT","optional": true,+ "peer": true,"engines": {"node": ">=12"},@@ -25787,7 +28131,8 @@"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz","integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==","license": "MIT",- "optional": true+ "optional": true,+ "peer": true},"node_modules/ora/node_modules/string-width": {"version": "6.1.0",@@ -25795,6 +28140,7 @@"integrity": "sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==","license": "MIT","optional": true,+ "peer": true,"dependencies": {"eastasianwidth": "^0.2.0","emoji-regex": "^10.2.1",@@ -25813,6 +28159,7 @@"integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==","license": "MIT","optional": true,+ "peer": true,"dependencies": {"ansi-regex": "^6.0.1"},@@ -26056,7 +28403,7 @@"version": "1.0.1","resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz","integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",- "devOptional": true,+ "dev": true,"license": "MIT","engines": {"node": ">=0.10.0"@@ -26096,9 +28443,9 @@}},"node_modules/path-to-regexp": {- "version": "0.1.12",- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",- "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",+ "version": "0.1.13",+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz",+ "integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==","license": "MIT"},"node_modules/path-type": {@@ -26161,9 +28508,9 @@"license": "ISC"},"node_modules/picomatch": {- "version": "2.3.1",- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",+ "version": "2.3.2",+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",+ "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==","license": "MIT","engines": {"node": ">=8.6"@@ -26547,29 +28894,6 @@"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==","license": "MIT"},- "node_modules/promise-inflight": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",- "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==",- "license": "ISC",- "optional": true,- "peer": true- },- "node_modules/promise-retry": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz",- "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==",- "license": "MIT",- "optional": true,- "peer": true,- "dependencies": {- "err-code": "^2.0.2",- "retry": "^0.12.0"- },- "engines": {- "node": ">=10"- }- },"node_modules/prompts": {"version": "2.4.2","resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz",@@ -26616,10 +28940,13 @@}},"node_modules/proxy-from-env": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",- "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",- "license": "MIT"+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz",+ "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==",+ "license": "MIT",+ "engines": {+ "node": ">=10"+ }},"node_modules/pump": {"version": "3.0.3",@@ -26880,6 +29207,7 @@"integrity": "sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==","license": "MIT","optional": true,+ "peer": true,"dependencies": {"esprima": "~4.0.0"}@@ -26983,6 +29311,7 @@"integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==","license": "MIT","optional": true,+ "peer": true,"dependencies": {"onetime": "^5.1.0","signal-exit": "^3.0.2"@@ -27000,6 +29329,7 @@"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==","license": "MIT","optional": true,+ "peer": true,"engines": {"node": ">=6"}@@ -27010,6 +29340,7 @@"integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==","license": "MIT","optional": true,+ "peer": true,"dependencies": {"mimic-fn": "^2.1.0"},@@ -27020,17 +29351,6 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/retry": {- "version": "0.12.0",- "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",- "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",- "license": "MIT",- "optional": true,- "peer": true,- "engines": {- "node": ">= 4"- }- },"node_modules/reusify": {"version": "1.1.0","resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",@@ -27047,7 +29367,7 @@"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz","integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==","deprecated": "Rimraf versions prior to v4 are no longer supported",- "devOptional": true,+ "dev": true,"license": "ISC","dependencies": {"glob": "^7.1.3"@@ -27174,9 +29494,9 @@}},"node_modules/router/node_modules/path-to-regexp": {- "version": "8.3.0",- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",- "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",+ "version": "8.4.2",+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz",+ "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==","license": "MIT","funding": {"type": "opencollective",@@ -27903,14 +30223,6 @@"node": ">= 0.8.0"}},- "node_modules/set-blocking": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",- "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",- "license": "ISC",- "optional": true,- "peer": true- },"node_modules/setprototypeof": {"version": "1.2.0","resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",@@ -28001,14 +30313,14 @@"peer": true},"node_modules/side-channel": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",- "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",+ "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==","license": "MIT","dependencies": {"es-errors": "^1.3.0",- "object-inspect": "^1.13.3",- "side-channel-list": "^1.0.0",+ "object-inspect": "^1.13.4",+ "side-channel-list": "^1.0.1","side-channel-map": "^1.0.1","side-channel-weakmap": "^1.0.2"},@@ -28020,13 +30332,13 @@}},"node_modules/side-channel-list": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",- "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",+ "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==","license": "MIT","dependencies": {"es-errors": "^1.3.0",- "object-inspect": "^1.13.3"+ "object-inspect": "^1.13.4"},"engines": {"node": ">= 0.4"@@ -28261,50 +30573,6 @@"node": ">=8"}},- "node_modules/smart-buffer": {- "version": "4.2.0",- "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",- "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",- "license": "MIT",- "optional": true,- "peer": true,- "engines": {- "node": ">= 6.0.0",- "npm": ">= 3.0.0"- }- },- "node_modules/socks": {- "version": "2.8.7",- "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz",- "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==",- "license": "MIT",- "optional": true,- "peer": true,- "dependencies": {- "ip-address": "^10.0.1",- "smart-buffer": "^4.2.0"- },- "engines": {- "node": ">= 10.0.0",- "npm": ">= 3.0.0"- }- },- "node_modules/socks-proxy-agent": {- "version": "6.2.1",- "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz",- "integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==",- "license": "MIT",- "optional": true,- "peer": true,- "dependencies": {- "agent-base": "^6.0.2",- "debug": "^4.3.3",- "socks": "^2.6.2"- },- "engines": {- "node": ">= 10"- }- },"node_modules/source-map": {"version": "0.6.1","resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",@@ -28376,75 +30644,6 @@"integrity": "sha512-NXYh+kFqLiYRCNAaHD0PcbjFgXyjuolEKLMk5vRt2DgPENtF1kkNzzMlg42dUk5wIsH8MhUzsRhaUxIisoSlZQ==","license": "MIT"},- "node_modules/sqlite": {- "version": "5.1.1",- "resolved": "https://registry.npmjs.org/sqlite/-/sqlite-5.1.1.tgz",- "integrity": "sha512-oBkezXa2hnkfuJwUo44Hl9hS3er+YFtueifoajrgidvqsJRQFpc5fKoAkAor1O5ZnLoa28GBScfHXs8j0K358Q==",- "license": "MIT",- "optional": true- },- "node_modules/sqlite3": {- "version": "5.1.7",- "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.7.tgz",- "integrity": "sha512-GGIyOiFaG+TUra3JIfkI/zGP8yZYLPQ0pl1bH+ODjiX57sPhrLU5sQJn1y9bDKZUFYkX1crlrPfSYt0BKKdkog==",- "hasInstallScript": true,- "license": "BSD-3-Clause",- "optional": true,- "peer": true,- "dependencies": {- "bindings": "^1.5.0",- "node-addon-api": "^7.0.0",- "prebuild-install": "^7.1.1",- "tar": "^6.1.11"- },- "optionalDependencies": {- "node-gyp": "8.x"- },- "peerDependencies": {- "node-gyp": "8.x"- },- "peerDependenciesMeta": {- "node-gyp": {- "optional": true- }- }- },- "node_modules/sqlite3/node_modules/node-addon-api": {- "version": "7.1.1",- "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz",- "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",- "license": "MIT",- "optional": true,- "peer": true- },- "node_modules/ssri": {- "version": "8.0.1",- "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",- "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "minipass": "^3.1.1"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/ssri/node_modules/minipass": {- "version": "3.3.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },"node_modules/stackback": {"version": "0.0.2","resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",@@ -28467,6 +30666,7 @@"integrity": "sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==","license": "MIT","optional": true,+ "peer": true,"dependencies": {"bl": "^5.0.0"},@@ -28747,25 +30947,6 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/tar": {- "version": "6.2.1",- "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",- "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "chownr": "^2.0.0",- "fs-minipass": "^2.0.0",- "minipass": "^5.0.0",- "minizlib": "^2.1.1",- "mkdirp": "^1.0.3",- "yallist": "^4.0.0"- },- "engines": {- "node": ">=10"- }- },"node_modules/tar-fs": {"version": "2.1.4","resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz",@@ -29367,9 +31548,9 @@}},"node_modules/undici": {- "version": "7.18.2",- "resolved": "https://registry.npmjs.org/undici/-/undici-7.18.2.tgz",- "integrity": "sha512-y+8YjDFzWdQlSE9N5nzKMT3g4a5UBX1HKowfdXh0uvAnTaqqwqB92Jt4UXBAeKekDs5IaDKyJFR4X1gYVCgXcw==",+ "version": "7.28.0",+ "resolved": "https://registry.npmjs.org/undici/-/undici-7.28.0.tgz",+ "integrity": "sha512-cRZYrTDwWznlnRiPjggAGxZXanty6M8RV1ff8Wm4LWXBp7/IG8v5DnOm74DtUBp9OONpK75YlPnIjQqX0dBDtA==","license": "MIT","engines": {"node": ">=20.18.1"@@ -29402,28 +31583,6 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/unique-filename": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz",- "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "unique-slug": "^2.0.0"- }- },- "node_modules/unique-slug": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz",- "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "imurmurhash": "^0.1.4"- }- },"node_modules/unique-string": {"version": "3.0.0","resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz",@@ -29727,13 +31886,6 @@}}},- "node_modules/vitest/node_modules/es-module-lexer": {- "version": "2.2.0",- "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.2.0.tgz",- "integrity": "sha512-3lGxdTXCLfe1MYfTz1y2ksAAUM4NAOP6rPEjxGJVKO7TZ5+tvHCaQWGpC4Y3IXvW3ece0Cz1cIP4FWBxOnGCTQ==",- "dev": true,- "license": "MIT"- },"node_modules/vitest/node_modules/picomatch": {"version": "4.0.4","resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",@@ -29854,17 +32006,6 @@"node": ">=8"}},- "node_modules/wide-align": {- "version": "1.1.5",- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",- "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",- "license": "ISC",- "optional": true,- "peer": true,- "dependencies": {- "string-width": "^1.0.2 || 2 || 3 || 4"- }- },"node_modules/word-wrap": {"version": "1.2.5","resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",@@ -29920,9 +32061,9 @@"license": "ISC"},"node_modules/ws": {- "version": "8.19.0",- "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",- "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",+ "version": "8.21.0",+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",+ "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==","license": "MIT","engines": {"node": ">=10.0.0"@@ -29992,18 +32133,10 @@"node": ">=10"}},- "node_modules/yallist": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",- "license": "ISC",- "optional": true,- "peer": true- },"node_modules/yaml": {- "version": "2.8.2",- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz",- "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==",+ "version": "2.9.0",+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz",+ "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==","license": "ISC","bin": {"yaml": "bin.mjs"diff --git a/v3/pnpm-lock.yaml b/v3/pnpm-lock.yamlindex ccfb110f2a..b7df38c311 100644--- a/v3/pnpm-lock.yaml+++ b/v3/pnpm-lock.yaml@@ -403,8 +403,8 @@ importers:'@claude-flow/memory':dependencies:agentdb:- specifier: ^3.0.0-alpha.16- version: 3.0.0-alpha.16(@types/[email protected])([email protected])+ specifier: ^3.0.0-alpha.17+ version: 3.0.0-alpha.17(@types/[email protected])([email protected])sql.js:specifier: ^1.10.3version: 1.13.0@@ -7033,52 +7033,6 @@ packages:- supports-colordev: false- resolution: {integrity: sha512-hx5KildnxQ/mZaOaOKGHDe7OlDJmHoRV7sy5b4PpfjtHAE9dU0vzM7tpemZKPhnaRA89jxpKTutbnhux/JzgLg==}- engines: {node: '>=18.0.0'}- hasBin: true- requiresBuild: true- dependencies:- '@modelcontextprotocol/sdk': 1.27.1([email protected])- '@opentelemetry/api': 1.9.1- '@ruvector/graph-transformer': 2.0.4- ajv: 8.18.0- jsonwebtoken: 9.0.3- sql.js: 1.14.1- optionalDependencies:- '@opentelemetry/resources': 1.30.1(@opentelemetry/[email protected])- '@opentelemetry/sdk-node': 0.218.0(@opentelemetry/[email protected])- '@opentelemetry/semantic-conventions': 1.40.0- '@ruvector/attention': 0.1.32- '@ruvector/gnn': 0.1.25- '@ruvector/graph-node': 2.0.3- '@ruvector/router': 0.1.30- '@ruvector/ruvllm': 2.5.6- '@ruvector/rvf': 0.1.9- '@ruvector/rvf-node': 0.1.8- '@ruvector/rvf-solver': 0.1.8- '@ruvector/rvf-wasm': 0.1.6- '@ruvector/sona': 0.1.7- '@xenova/transformers': 2.17.2- argon2: 0.44.0- better-sqlite3: 11.10.0- chalk: 5.6.2- commander: 12.1.0- hnswlib-node: 3.0.0- inquirer: 9.3.8(@types/[email protected])- ruvector: 0.1.100([email protected])- ruvector-attention-wasm: 0.1.32- ruvector-graph-transformer-wasm: 2.0.4- transitivePeerDependencies:- - '@cfworker/json-schema'- - '@types/node'- - bare-abort-controller- - bare-buffer- - react-native-b4a- - supports-color- - zod- dev: false-resolution: {integrity: sha512-LK8drZFQteNkff+ji52vCmIXyE3A3ipzabx+ubBcX0CRgF96GU8m36sWyOfqL7pWRfnYDgkEEEgZmagiNCaz/A==}engines: {node: '>=18.0.0'}@@ -7123,7 +7077,6 @@ packages:- react-native-b4a- supports-color- zod- optional: true/[email protected](@modelcontextprotocol/[email protected]):resolution: {integrity: sha512-h3d1KNUFkmdFdtjwn792/MPqYrEf7OId2LIIXlJDGM4epx0Vcm5FQ+ROrjxWDE04xgG3AHQ5dNynxPTDdkC7RA==}