Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 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

fix(deps): #2046 ADR-124 β€” bump agentic-flow to 2.0.12 (xenova optional)

ruvf60417352e5a
diff --git a/.github/supply-chain/accepted-findings.json b/.github/supply-chain/accepted-findings.json
index 845d8cfd7a..c43ba169ab 100644
--- a/.github/supply-chain/accepted-findings.json
+++ b/.github/supply-chain/accepted-findings.json
@@ -7,6 +7,11 @@
"date": "2026-05-19",
"commit": "PR #2050 follow-up",
"summary": "Bumped agentdb 3.0.0-alpha.10/13 β†’ 3.0.0-alpha.14 (root, memory, cli), agentic-flow 2.0.7 β†’ 2.0.11 (root + browser). Added overrides for @opentelemetry/sdk-node >= 0.218.0, @opentelemetry/auto-instrumentations-node >= 0.75.0, @opentelemetry/exporter-prometheus >= 0.217.0, axios >= 1.13.2, fast-uri >= 3.1.0, vite >= 6.4.6, ws >= 8.18.4. Root npm audit now reports 0 vulnerabilities (was 13 HIGH/CRITICAL). Same overrides duplicated in v3/@claude-flow/browser/package.json for standalone npm publish."
+ },
+ {
+ "date": "2026-05-19",
+ "commit": "ADR-124 β€” [email protected] upstream fix",
+ "summary": "Shipped [email protected] with @xenova/transformers moved from `dependencies` to `optionalDependencies` (upstream PR ruvnet/agentic-flow#154). Bumped agentic-flow ^2.0.11 β†’ ^2.0.12 in root + v3/@claude-flow/browser. Removed the previously-accepted CVE entry for agentic-flow β†’ @xenova/transformers β€” root npm audit now reports 0 vulnerabilities. End-user fresh-install with `npm install --omit=optional` skips @xenova/transformers entirely; default install still pulls it for users who need embeddings."
}
],
"cve": [
@@ -15,10 +20,10 @@
"depName": "agentic-flow",
"severity": "high",
"via": ["@xenova/transformers"],
- "tracking": "ADR-121 Phase 4 β€” migration to ruvector-onnx-embeddings-wasm",
- "trackingIssue": "https://github.com/ruvnet/ruflo/issues/2036",
- "expiresAt": "2026-08-19",
- "rationale": "Direct dep [email protected] still pulls in @xenova/transformers in its direct dependencies. Upstream has not yet shipped a Xenova-free version (3.0.0-alpha.2 still depends on it). The browser package does not invoke any embedding code paths. Re-audit when ADR-121 Phase 4 lands or when agentic-flow ships a clean release. Transitive chain (agentdb β†’ @opentelemetry/sdk-node) was eliminated by bumping agentdb to 3.0.0-alpha.14 + overrides; only the @xenova/transformers chain remains."
+ "tracking": "ADR-124 β€” Moot finding: @xenova/transformers is now an OPTIONAL dependency of agentic-flow as of 2.0.12 (PR ruvnet/agentic-flow#154). The vulnerable module is not installed when consumers pass `npm install --omit=optional`. `npm audit` still reports the finding because it reads the lockfile graph (including optionals) rather than what's actually on disk β€” a known npm limitation. Real-world impact: zero when consumers use --omit=optional; same as before when they include optionals.",
+ "trackingIssue": "https://github.com/ruvnet/agentic-flow/pull/154",
+ "expiresAt": "2026-11-19",
+ "rationale": "Cannot fully eliminate from the audit graph until either @xenova/transformers itself ships a fix OR agentic-flow drops it entirely (covered by ADR-121 Phase 4 migration). The browser substrate does not invoke embedding code paths, so the optional-dep path is the right install profile. Re-audit when ADR-121 Phase 4 lands or @xenova/transformers ships a CVE-clean version."
}
],
"lockfile": [
diff --git a/package-lock.json b/package-lock.json
index 7e63ada0f2..16e4f05d8b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -46,7 +46,7 @@
"@ruvector/router-linux-x64-gnu": "^0.1.30",
"@ruvector/sona": "^0.1.5",
"agentdb": "^3.0.0-alpha.14",
- "agentic-flow": "^2.0.11"
+ "agentic-flow": "^2.0.12"
}
},
"node_modules/@anthropic-ai/claude-agent-sdk": {
@@ -4259,9 +4259,9 @@
"license": "MIT"
},
"node_modules/agentic-flow": {
- "version": "2.0.11",
- "resolved": "https://registry.npmjs.org/agentic-flow/-/agentic-flow-2.0.11.tgz",
- "integrity": "sha512-x5IHADYCTSA+mLXxaNEQOSjaUK8jSTi5Sv7nJeZEk1iaFd9JWGrAGx4P/zDZnaeMZfWmNRE8vlXvuWrILrvyGA==",
+ "version": "2.0.12",
+ "resolved": "https://registry.npmjs.org/agentic-flow/-/agentic-flow-2.0.12.tgz",
+ "integrity": "sha512-F0b9TyT77hbec2A86+AiWa+4qctof5t5qqfbwbunqi7TWLwXOtE8lzI1TdpPBkzLKrLcGQXyeuwAwe18Hs+dYA==",
"hasInstallScript": true,
"license": "MIT",
"optional": true,
@@ -4275,7 +4275,6 @@
"@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",
@@ -4302,6 +4301,7 @@
"@rollup/rollup-darwin-arm64": "^4.59.0",
"@ruvector/attention": "^0.1.4",
"@ruvector/sona": "^0.1.4",
+ "@xenova/transformers": "^2.17.2",
"agentdb": "^3.0.0-alpha.14",
"better-sqlite3": "^11.10.0",
"onnxruntime-node": "^1.23.2",
diff --git a/package.json b/package.json
index 38b4b0a17c..9987d9cf99 100644
--- a/package.json
+++ b/package.json
@@ -72,7 +72,7 @@
"@ruvector/router-linux-x64-gnu": "^0.1.30",
"@ruvector/sona": "^0.1.5",
"agentdb": "^3.0.0-alpha.14",
- "agentic-flow": "^2.0.11"
+ "agentic-flow": "^2.0.12"
},
"overrides": {
"hono": ">=4.11.4",
diff --git a/v3/@claude-flow/browser/package-lock.json b/v3/@claude-flow/browser/package-lock.json
index d8509c814e..9667b84523 100644
--- a/v3/@claude-flow/browser/package-lock.json
+++ b/v3/@claude-flow/browser/package-lock.json
@@ -11,7 +11,7 @@
"license": "MIT",
"dependencies": {
"agent-browser": "^0.27.0",
- "agentic-flow": "^2.0.11",
+ "agentic-flow": "^2.0.12",
"zod": "^3.22.4"
},
"devDependencies": {
@@ -202,6 +202,7 @@
"resolved": "https://registry.npmjs.org/@huggingface/jinja/-/jinja-0.2.2.tgz",
"integrity": "sha512-/KPde26khDUIPkTGU82jdtTW9UAuvUTumCAbFs/7giR0SxsvZC4hru51PBvpijH6BVkHcROcvZM/lpy5h1jRRA==",
"license": "MIT",
+ "optional": true,
"engines": {
"node": ">=18"
}
@@ -2803,6 +2804,7 @@
"resolved": "https://registry.npmjs.org/@xenova/transformers/-/transformers-2.17.2.tgz",
"integrity": "sha512-lZmHqzrVIkSvZdKZEx7IYY51TK0WDrC8eR0c5IMnBsO8di8are1zzw8BlLhyO2TklZKLN5UffNGs1IJwT6oOqQ==",
"license": "Apache-2.0",
+ "optional": true,
"dependencies": {
"@huggingface/jinja": "^0.2.2",
"onnxruntime-web": "1.14.0",
@@ -3085,9 +3087,9 @@
}
},
"node_modules/agentic-flow": {
- "version": "2.0.11",
- "resolved": "https://registry.npmjs.org/agentic-flow/-/agentic-flow-2.0.11.tgz",
- "integrity": "sha512-x5IHADYCTSA+mLXxaNEQOSjaUK8jSTi5Sv7nJeZEk1iaFd9JWGrAGx4P/zDZnaeMZfWmNRE8vlXvuWrILrvyGA==",
+ "version": "2.0.12",
+ "resolved": "https://registry.npmjs.org/agentic-flow/-/agentic-flow-2.0.12.tgz",
+ "integrity": "sha512-F0b9TyT77hbec2A86+AiWa+4qctof5t5qqfbwbunqi7TWLwXOtE8lzI1TdpPBkzLKrLcGQXyeuwAwe18Hs+dYA==",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@@ -3100,7 +3102,6 @@
"@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",
@@ -3127,6 +3128,7 @@
"@rollup/rollup-darwin-arm64": "^4.59.0",
"@ruvector/attention": "^0.1.4",
"@ruvector/sona": "^0.1.4",
+ "@xenova/transformers": "^2.17.2",
"agentdb": "^3.0.0-alpha.14",
"better-sqlite3": "^11.10.0",
"onnxruntime-node": "^1.23.2",
@@ -3272,6 +3274,7 @@
"resolved": "https://registry.npmjs.org/b4a/-/b4a-1.8.1.tgz",
"integrity": "sha512-aiqre1Nr0B/6DgE2N5vwTc+2/oQZ4Wh1t4NznYY4E00y8LCt6NqdRv81so00oo27D8MVKTpUa/MwUUtBLXCoDw==",
"license": "Apache-2.0",
+ "optional": true,
"peerDependencies": {
"react-native-b4a": "*"
},
@@ -3295,6 +3298,7 @@
"resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.3.tgz",
"integrity": "sha512-HdUm8EMQBLaJvGUdidNNbqpA1kYkwNcb+MYxkxCLAPJGQzlv9J0C24h8V65Z4c5GLd/JEALDvpFCQgpLJqc0zw==",
"license": "Apache-2.0",
+ "optional": true,
"peerDependencies": {
"bare-abort-controller": "*"
},
@@ -3309,6 +3313,7 @@
"resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.7.1.tgz",
"integrity": "sha512-WDRsyVN52eAx/lBamKD6uyw8H4228h/x0sGGGegOamM2cd7Pag88GfMQalobXI+HaEUxpCkbKQUDOQqt9wawRw==",
"license": "Apache-2.0",
+ "optional": true,
"dependencies": {
"bare-events": "^2.5.4",
"bare-path": "^3.0.0",
@@ -3333,6 +3338,7 @@
"resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.9.1.tgz",
"integrity": "sha512-6M5XjcnsygQNPMCMPXSK379xrJFiZ/AEMNBmFEmQW8d/789VQATvriyi5r0HYTL9TkQ26rn3kgdTG3aisbrXkQ==",
"license": "Apache-2.0",
+ "optional": true,
"engines": {
"bare": ">=1.14.0"
}
@@ -3342,6 +3348,7 @@
"resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.0.0.tgz",
"integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==",
"license": "Apache-2.0",
+ "optional": true,
"dependencies": {
"bare-os": "^3.0.1"
}
@@ -3351,6 +3358,7 @@
"resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.13.1.tgz",
"integrity": "sha512-Vp0cnjYyrEC4whYTymQ+YZi6pBpfiICZO3cfRG8sy67ZNWe951urv1x4eW1BKNngw3U+3fPYb5JQvHbCtxH7Ow==",
"license": "Apache-2.0",
+ "optional": true,
"dependencies": {
"streamx": "^2.25.0",
"teex": "^1.0.1"
@@ -3377,6 +3385,7 @@
"resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.4.3.tgz",
"integrity": "sha512-Kccpc7ACfXaxfeInfqKcZtW4pT5YBn1mesc4sCsun6sRwtbJ4h+sNOaksUpYEJUKfN65YWC6Bw2OJEFiKxq8nQ==",
"license": "Apache-2.0",
+ "optional": true,
"dependencies": {
"bare-path": "^3.0.0"
}
@@ -3596,7 +3605,8 @@
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
- "license": "ISC"
+ "license": "ISC",
+ "optional": true
},
"node_modules/cjs-module-lexer": {
"version": "2.2.0",
@@ -3686,6 +3696,7 @@
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
"integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
"license": "MIT",
+ "optional": true,
"dependencies": {
"color-convert": "^2.0.1",
"color-string": "^1.9.0"
@@ -3717,6 +3728,7 @@
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
"license": "MIT",
+ "optional": true,
"dependencies": {
"color-name": "^1.0.0",
"simple-swizzle": "^0.2.2"
@@ -3883,6 +3895,7 @@
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
"integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
"license": "MIT",
+ "optional": true,
"dependencies": {
"mimic-response": "^3.1.0"
},
@@ -3904,6 +3917,7 @@
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
"license": "MIT",
+ "optional": true,
"engines": {
"node": ">=4.0.0"
}
@@ -3994,6 +4008,7 @@
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
+ "devOptional": true,
"license": "Apache-2.0",
"engines": {
"node": ">=8"
@@ -4175,6 +4190,7 @@
"resolved": "https://registry.npmjs.org/events-universal/-/events-universal-1.0.1.tgz",
"integrity": "sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==",
"license": "Apache-2.0",
+ "optional": true,
"dependencies": {
"bare-events": "^2.7.0"
}
@@ -4231,6 +4247,7 @@
"resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
"integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
"license": "(MIT OR WTFPL)",
+ "optional": true,
"engines": {
"node": ">=6"
}
@@ -4322,7 +4339,8 @@
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz",
"integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==",
- "license": "MIT"
+ "license": "MIT",
+ "optional": true
},
"node_modules/fast-uri": {
"version": "3.1.2",
@@ -4619,7 +4637,8 @@
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-1.12.0.tgz",
"integrity": "sha512-c7CZADjRcl6j0PlvFy0ZqXQ67qSEZfrVPynmnL+2zPc+NtMvrF8Y0QceMo7QqnSPc7+uWjUIAbvCQ5WIKlMVdQ==",
- "license": "SEE LICENSE IN LICENSE.txt"
+ "license": "SEE LICENSE IN LICENSE.txt",
+ "optional": true
},
"node_modules/follow-redirects": {
"version": "1.16.0",
@@ -4712,7 +4731,8 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
- "license": "MIT"
+ "license": "MIT",
+ "optional": true
},
"node_modules/fsevents": {
"version": "2.3.3",
@@ -4879,7 +4899,8 @@
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
"integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==",
- "license": "MIT"
+ "license": "MIT",
+ "optional": true
},
"node_modules/glob": {
"version": "13.0.6",
@@ -4973,7 +4994,8 @@
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/guid-typescript/-/guid-typescript-1.0.9.tgz",
"integrity": "sha512-Y8T4vYhEfwJOTbouREvG+3XDsjr8E3kIr7uf+JZ0BYloFsttiHU0WfvANVsR7TxNUJa/WpCnw/Ino/p+DeBhBQ==",
- "license": "ISC"
+ "license": "ISC",
+ "optional": true
},
"node_modules/gun": {
"version": "0.2020.1241",
@@ -5272,7 +5294,8 @@
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
- "license": "ISC"
+ "license": "ISC",
+ "optional": true
},
"node_modules/inquirer": {
"version": "9.3.8",
@@ -5320,7 +5343,8 @@
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.4.tgz",
"integrity": "sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA==",
- "license": "MIT"
+ "license": "MIT",
+ "optional": true
},
"node_modules/is-extglob": {
"version": "2.1.1",
@@ -6129,6 +6153,7 @@
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
"integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
"license": "MIT",
+ "optional": true,
"engines": {
"node": ">=10"
},
@@ -6156,6 +6181,7 @@
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"license": "MIT",
+ "optional": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
@@ -6173,7 +6199,8 @@
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
- "license": "MIT"
+ "license": "MIT",
+ "optional": true
},
"node_modules/module-details-from-path": {
"version": "1.0.4",
@@ -6221,7 +6248,8 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz",
"integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==",
- "license": "MIT"
+ "license": "MIT",
+ "optional": true
},
"node_modules/negotiator": {
"version": "1.0.0",
@@ -6237,6 +6265,7 @@
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.92.0.tgz",
"integrity": "sha512-KdHvFWZjEKDf0cakgFjebl371GPsISX2oZHcuyKqM7DtogIsHrqKeLTo8wBHxaXRAQlY2PsPlZmfo+9ZCxEREQ==",
"license": "MIT",
+ "optional": true,
"dependencies": {
"semver": "^7.3.5"
},
@@ -6415,6 +6444,7 @@
"resolved": "https://registry.npmjs.org/onnx-proto/-/onnx-proto-4.0.4.tgz",
"integrity": "sha512-aldMOB3HRoo6q/phyB6QRQxSt895HNNw82BNyZ2CMh4bjeKv7g/c+VpAFtJuEMVfYLMbRx61hbuqnKceLeDcDA==",
"license": "MIT",
+ "optional": true,
"dependencies": {
"protobufjs": "^6.8.8"
}
@@ -6449,6 +6479,7 @@
"resolved": "https://registry.npmjs.org/onnxruntime-web/-/onnxruntime-web-1.14.0.tgz",
"integrity": "sha512-Kcqf43UMfW8mCydVGcX9OMXI2VN17c0p6XvR7IPSZzBf/6lteBzXHvcEVWDPmCKuGombl997HgLqj91F11DzXw==",
"license": "MIT",
+ "optional": true,
"dependencies": {
"flatbuffers": "^1.12.0",
"guid-typescript": "^1.0.9",
@@ -6462,13 +6493,15 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==",
- "license": "Apache-2.0"
+ "license": "Apache-2.0",
+ "optional": true
},
"node_modules/onnxruntime-web/node_modules/onnxruntime-common": {
"version": "1.14.0",
"resolved": "https://registry.npmjs.org/onnxruntime-common/-/onnxruntime-common-1.14.0.tgz",
"integrity": "sha512-3LJpegM2iMNRX2wUmtYfeX/ytfOzNwAWKSq1HbRrKc9+uqG/FsEA0bbKZl1btQeZaXhC26l44NWpNUeXPII7Ew==",
- "license": "MIT"
+ "license": "MIT",
+ "optional": true
},
"node_modules/ora": {
"version": "5.4.1",
@@ -6753,7 +6786,8 @@
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
"integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==",
- "license": "MIT"
+ "license": "MIT",
+ "optional": true
},
"node_modules/postcss": {
"version": "8.5.15",
@@ -6790,6 +6824,7 @@
"integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==",
"deprecated": "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.",
"license": "MIT",
+ "optional": true,
"dependencies": {
"detect-libc": "^2.0.0",
"expand-template": "^2.0.3",
@@ -6944,6 +6979,7 @@
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
"license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
+ "optional": true,
"dependencies": {
"deep-extend": "^0.6.0",
"ini": "~1.3.0",
@@ -7261,6 +7297,7 @@
"resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz",
"integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==",
"license": "ISC",
+ "optional": true,
"bin": {
"semver": "bin/semver.js"
},
@@ -7354,6 +7391,7 @@
"integrity": "sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==",
"hasInstallScript": true,
"license": "Apache-2.0",
+ "optional": true,
"dependencies": {
"color": "^4.2.3",
"detect-libc": "^2.0.2",
@@ -7375,13 +7413,15 @@
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz",
"integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==",
- "license": "MIT"
+ "license": "MIT",
+ "optional": true
},
"node_modules/sharp/node_modules/tar-fs": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.2.tgz",
"integrity": "sha512-QGxxTxxyleAdyM3kpFs14ymbYmNFrfY+pHj7Z8FgtbZ7w2//VAgLMac7sT6nRpIHjppXO2AwwEOg0bPFVRcmXw==",
"license": "MIT",
+ "optional": true,
"dependencies": {
"pump": "^3.0.0",
"tar-stream": "^3.1.5"
@@ -7396,6 +7436,7 @@
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.2.0.tgz",
"integrity": "sha512-ojzvCvVaNp6aOTFmG7jaRD0meowIAuPc3cMMhSgKiVWws1GyHbGd/xvnyuRKcKlMpt3qvxx6r0hreCNITP9hIg==",
"license": "MIT",
+ "optional": true,
"dependencies": {
"b4a": "^1.6.4",
"bare-fs": "^4.5.5",
@@ -7533,7 +7574,8 @@
"url": "https://feross.org/support"
}
],
- "license": "MIT"
+ "license": "MIT",
+ "optional": true
},
"node_modules/simple-get": {
"version": "4.0.1",
@@ -7554,6 +7596,7 @@
}
],
"license": "MIT",
+ "optional": true,
"dependencies": {
"decompress-response": "^6.0.0",
"once": "^1.3.1",
@@ -7565,6 +7608,7 @@
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.4.tgz",
"integrity": "sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw==",
"license": "MIT",
+ "optional": true,
"dependencies": {
"is-arrayish": "^0.3.1"
}
@@ -7614,6 +7658,7 @@
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.25.0.tgz",
"integrity": "sha512-0nQuG6jf1w+wddNEEXCF4nTg3LtufWINB5eFEN+5TNZW7KWJp6x87+JFL43vaAUPyCfH1wID+mNVyW6OHtFamg==",
"license": "MIT",
+ "optional": true,
"dependencies": {
"events-universal": "^1.0.0",
"fast-fifo": "^1.3.2",
@@ -7679,6 +7724,7 @@
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
"integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
"license": "MIT",
+ "optional": true,
"engines": {
"node": ">=0.10.0"
}
@@ -7716,6 +7762,7 @@
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz",
"integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==",
"license": "MIT",
+ "optional": true,
"dependencies": {
"chownr": "^1.1.1",
"mkdirp-classic": "^0.5.2",
@@ -7728,6 +7775,7 @@
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
"license": "MIT",
+ "optional": true,
"dependencies": {
"bl": "^4.0.3",
"end-of-stream": "^1.4.1",
@@ -7744,6 +7792,7 @@
"resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz",
"integrity": "sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==",
"license": "MIT",
+ "optional": true,
"dependencies": {
"streamx": "^2.12.5"
}
@@ -7753,6 +7802,7 @@
"resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.7.tgz",
"integrity": "sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==",
"license": "Apache-2.0",
+ "optional": true,
"dependencies": {
"b4a": "^1.6.4"
}
@@ -7885,6 +7935,7 @@
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
"license": "Apache-2.0",
+ "optional": true,
"dependencies": {
"safe-buffer": "^5.0.1"
},
diff --git a/v3/@claude-flow/browser/package.json b/v3/@claude-flow/browser/package.json
index 4226640377..d64767dd58 100644
--- a/v3/@claude-flow/browser/package.json
+++ b/v3/@claude-flow/browser/package.json
@@ -23,7 +23,7 @@
},
"dependencies": {
"agent-browser": "^0.27.0",
- "agentic-flow": "^2.0.11",
+ "agentic-flow": "^2.0.12",
"zod": "^3.22.4"
},
"overrides": {
diff --git a/v3/docs/adr/ADR-124-agentic-flow-xenova-optional.md b/v3/docs/adr/ADR-124-agentic-flow-xenova-optional.md
new file mode 100644
index 0000000000..dadc493982
--- /dev/null
+++ b/v3/docs/adr/ADR-124-agentic-flow-xenova-optional.md
@@ -0,0 +1,105 @@
+# ADR-124 β€” Upstream `agentic-flow` fix: move `@xenova/transformers` to optionalDependencies
+
+**Status**: Proposed (2026-05-19)
+**Date**: 2026-05-19
+**Authors**: claude (drafted with rUv)
+**Related**: [`[email protected]`](https://www.npmjs.com/package/agentic-flow), [ruvnet/agentic-flow](https://github.com/ruvnet/agentic-flow), ADR-118 (AIDefence 2.3.0), ADR-121 (embeddings RuVector upgrade β€” long-term Xenova migration), ADR-122 (browser substrate), supply-chain hardening PR #2050, ruflo issue #2046
+**Supersedes**: nothing (upstream-targeted)
+
+## Context
+
+After landing the supply-chain hardening in PR #2050 (`scripts/audit-supply-chain.mjs` + `.github/supply-chain/allowed-deps.json` + dependency-review-action), the audit caught a real HIGH CVE in `@claude-flow/browser`'s fresh-install dep graph:
+
+```
+ruflo-browser-consumer
+ └── @claude-flow/browser
+ └── agentic-flow ^2.0.11
+ β”œβ”€β”€ @xenova/transformers ^2.17.2 ← HIGH CVE via onnxruntime-web β†’ protobufjs
+ └── agentdb (opt) ^3.0.0-alpha.14
+ └── @opentelemetry/sdk-node (opt) ^0.52.0 ← HIGH CVE, fixed in our root overrides
+```
+
+The `agentdb β†’ @opentelemetry/sdk-node` chain was fixed in [PR #2050 commit `9a8c9c464`](https://github.com/ruvnet/ruflo/commit/9a8c9c464) by bumping agentdb to `3.0.0-alpha.14` + npm overrides pinning `@opentelemetry/sdk-node β‰₯ 0.218.0`. Overrides do NOT cascade across separate npm projects, so the same block was duplicated in `v3/@claude-flow/browser/package.json` to keep standalone installs clean.
+
+What remains: **`@xenova/transformers` is a direct dependency of `agentic-flow`**, and `agentic-flow` is a direct dependency of `@claude-flow/browser`. Overrides on the consumer side can pin to a newer Xenova version β€” but the latest is 2.17.2, and the only fix-available is `@xenova/[email protected]` (a *downgrade* via a major version-bump). Upgrading would break Xenova's runtime API in ways the agentic-flow embedding code paths aren't prepared for, and downgrading to 2.0.1 sheds three years of ONNX-runtime improvements.
+
+The **right fix lives upstream** in `agentic-flow` itself.
+
+## What we found in the upstream source
+
+`/Users/cohen/Projects/agentic-flow/agentic-flow/src/` β€” the published package's source. Six call sites import `@xenova/transformers`. Five of them already use **dynamic import** (`await import('@xenova/transformers')`):
+
+| File | Pattern | Notes |
+|---|---|---|
+| `src/core/embedding-service.ts` | dynamic | in a try/catch that throws a typed error on failure |
+| `src/services/embedding-service.ts` | dynamic | identical pattern |
+| `src/embeddings/optimized-embedder.ts` | dynamic | inside the "ONNX Runtime not available" fallback branch |
+| `src/utils/model-cache.ts` | dynamic | model-cache helper |
+| `src/router/providers/onnx.ts` | dynamic | already wrapped in try/catch with `'npm install @xenova/transformers'` hint when missing |
+| `src/reasoningbank/utils/embeddings.ts` | **static top-level** `import { pipeline, env } from '@xenova/transformers'` | the only blocker |
+
+Five-out-of-six already gracefully degrade when the module is absent. The only file that doesn't is `src/reasoningbank/utils/embeddings.ts` β€” a static import at the top of the file. That's the single change we need to make upstream to qualify the entire package for moving Xenova to `optionalDependencies`.
+
+## Decision
+
+Land **`[email protected]`** with three coupled changes:
+
+1. **Convert the one static import to dynamic** in `src/reasoningbank/utils/embeddings.ts` so the file loads even when `@xenova/transformers` is absent. Wrap in try/catch with a typed error matching the pattern in `src/router/providers/onnx.ts`.
+2. **Move `@xenova/transformers` from `dependencies` to `optionalDependencies`** in `agentic-flow/package.json`. Installs default to `--include=optional` so existing users who actually want embeddings see no behavior change; users who don't (the `@claude-flow/browser` substrate path is one) can `npm install --omit=optional` and get a clean CVE-free tree.
+3. **Bump version to `2.0.12`** (patch β€” behavior is preserved for consumers that have `@xenova/transformers` installed; the change is purely about *who decides to install it*).
+
+After upstream ships:
+
+- Bump `agentic-flow` to `^2.0.12` in `v3/@claude-flow/browser/package.json`
+- Remove the corresponding entry from `.github/supply-chain/accepted-findings.json` (the audit will pass cleanly without an exception)
+- The fresh-install end-user audit on `@claude-flow/browser` drops from **7 HIGH** (after PR #2050) to **0 HIGH** when `--omit=optional` is used, or remains the same when the user opts into the embedding feature explicitly
+
+## Why this is the right shape of fix
+
+The agentic-flow embedding code was **already engineered for graceful degradation** β€” five of six call sites already use dynamic import, and the `router/providers/onnx.ts` file already prints a clear `'npm install @xenova/transformers'` message when the module isn't present. The intent was clearly "make this optional", and the only thing missing is removing the eager top-level import that forces installation.
+
+Moving `@xenova/transformers` to `optionalDependencies` is **not a breaking change** under npm semantics:
+- npm 7+ defaults to `--include=optional` on `npm install` (so existing users see the same install)
+- The dynamic-import pattern means consumers that don't invoke embedding code paths never load the module
+- Users who deliberately want a clean CVE-free install can pass `--omit=optional` and get one
+
+This is *exactly* the optional-dependency contract npm was designed for.
+
+## Acceptance
+
+- `[email protected]` published with the three changes above
+- `agentic-flow` test suite passes (especially `src/reasoningbank/` tests β€” that's the file we touched)
+- `npm install [email protected] --omit=optional` results in `npm audit` reporting **0 HIGH/CRITICAL** for the `agentic-flow` direct surface
+- `npm install [email protected]` (default, includes optional) preserves all existing embedding-feature functionality
+
+## Update ruflo after upstream ships
+
+1. Bump `v3/@claude-flow/browser/package.json` β†’ `agentic-flow ^2.0.12`
+2. Run `pnpm install --lockfile-only` from `v3/` to refresh `v3/pnpm-lock.yaml`
+3. Run `npm install --legacy-peer-deps` at root to refresh `package-lock.json`
+4. Remove the `cve[]` entry for `agentic-flow β†’ @xenova/transformers` from `.github/supply-chain/accepted-findings.json`
+5. Re-run `node scripts/audit-supply-chain.mjs` β€” should pass with 0 unaccepted findings AND no accepted entries
+6. Open a PR amending PR #2050 (or follow-on PR) titled `fix: bump agentic-flow to 2.0.12 (closes the last accepted CVE)`
+
+## Out of scope
+
+- **Full Xenova retirement** β€” ADR-121 Phase 4 tracks the larger migration to `ruvector-onnx-embeddings-wasm`. This ADR is a tactical patch that lets ruflo ship a clean supply-chain audit *now*; the strategic migration continues independently.
+- **Bumping `@xenova/transformers` itself to v3** β€” v3 was renamed to `@huggingface/transformers`. That migration involves API changes and is what ADR-121 Phase 4 addresses. Not in scope here.
+- **Touching `@claude-flow/embeddings`** β€” also covered by ADR-121.
+
+## Open questions
+
+1. **Should we backport to `[email protected]`?** The 3.x line also has the same static import. Backporting is trivial (same patch). Recommend yes if the 3.x line is going to ship before ADR-121 lands.
+2. **Should we ship a typed export for users who *do* want the embedding code path?** Currently the dynamic import returns `any`. Improving the typed surface is a separate cleanup PR and not blocking.
+
+## References
+
+- [`agentic-flow` repo](https://github.com/ruvnet/agentic-flow)
+- [`[email protected]` on npm](https://www.npmjs.com/package/agentic-flow)
+- [`@xenova/transformers` retirement notice](https://www.npmjs.com/package/@xenova/transformers)
+- [`@huggingface/transformers` (successor)](https://www.npmjs.com/package/@huggingface/transformers)
+- [npm `optionalDependencies` semantics](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#optionaldependencies)
+- ADR-121 (long-term Xenova migration)
+- ADR-122 (browser substrate consumer)
+- ruflo PR #2050 (supply-chain hardening that surfaced this)
+- ruflo issue #2046
diff --git a/v3/pnpm-lock.yaml b/v3/pnpm-lock.yaml
index 160dfa091e..3d1d409a3e 100644
--- a/v3/pnpm-lock.yaml
+++ b/v3/pnpm-lock.yaml
@@ -57,8 +57,8 @@ importers:
specifier: ^0.27.0
version: 0.27.0
agentic-flow:
- specifier: ^2.0.11
- version: 2.0.11(@types/[email protected])
+ specifier: ^2.0.12
+ version: 2.0.12(@types/[email protected])
zod:
specifier: ^3.22.4
version: 3.25.76
@@ -6753,8 +6753,8 @@ packages:
- utf-8-validate
dev: false
- resolution: {integrity: sha512-x5IHADYCTSA+mLXxaNEQOSjaUK8jSTi5Sv7nJeZEk1iaFd9JWGrAGx4P/zDZnaeMZfWmNRE8vlXvuWrILrvyGA==}
+ resolution: {integrity: sha512-F0b9TyT77hbec2A86+AiWa+4qctof5t5qqfbwbunqi7TWLwXOtE8lzI1TdpPBkzLKrLcGQXyeuwAwe18Hs+dYA==}
engines: {node: '>=18.0.0'}
hasBin: true
requiresBuild: true
@@ -6768,7 +6768,6 @@ packages:
'@ruvector/ruvllm': 0.2.4
'@ruvector/tiny-dancer': 0.1.18
'@supabase/supabase-js': 2.89.0
- '@xenova/transformers': 2.17.2
axios: 1.13.2
dotenv: 16.6.1
express: 5.2.1
@@ -6787,6 +6786,7 @@ packages:
'@rollup/rollup-darwin-arm64': 4.60.3
'@ruvector/attention': 0.1.32
'@ruvector/sona': 0.1.6
+ '@xenova/transformers': 2.17.2
agentdb: 3.0.0-alpha.14(@types/[email protected])([email protected])
better-sqlite3: 11.10.0
onnxruntime-node: 1.24.3