aft-bridge: drop unused `undici` dependency (leftover from the Rust URL-fetch migration)
@cortexkit/aft-bridge declares undici as a runtime dependency but nothing in the package imports it any more. It is a leftover from the "Migrate URL fetching to Rust" work, and it makes every downstream lockfile carry a vulnerable copy of undici (GHSA-4qv8-2p9j-2685 plus 7 other advisories).
Where it is declared
packages/aft-bridge/package.json:34—"undici": "^7.25.0"underdependenciespackages/opencode-plugin/package.json:48— same, underdependenciespackages/pi-plugin/package.jsondoes not declare it
History — it was used, then the code was deleted and the dependency was not
4de4f288c(fix(opencode-plugin): pin URL fetch DNS resolution) addedundicito the opencode-plugin for a DNS-pinnedfetchinpackages/opencode-plugin/src/shared/url-fetch.ts.b090b8875(refactor: extract @cortexkit/aft-bridge shared package) moved that file intopackages/aft-bridge/src/url-fetch.ts, together with the dependency.15f1cd0ae(fix(aft-bridge): pin undici@7 to avoid Bun load-time crash) narrowed^8.2.0to^7.25.0, because undici@8 callswebidl.util.markAsUncloneableat module load time, which crashes Bun (the OpenCode TUI) with"__require is not a function".1a1a43463(Migrate URL fetching to Rust, 2026-05-25) deletedpackages/aft-bridge/src/url-fetch.ts, its unit test and the re-export fromsrc/index.ts— but leftundiciin bothpackage.jsonfiles.
So undici has been dead since 1a1a43463, and the ^7 range only exists as a workaround for a Bun load-time crash in code that no longer exists.
Verification on the current tree
rg -n undici packages/aft-bridge/src packages/aft-bridge/distmatches nothing outsidepackage.json; neitherProxyAgentnorsetGlobalDispatcherappears anywhere in the package.packages/opencode-plugin/srchas noundiciimport either, andsrc/shared/url-fetch.tsno longer exists.- The remaining network calls use the global
fetch(packages/aft-bridge/src/downloader.ts:243,packages/aft-bridge/src/onnx-runtime.ts:804), i.e. Node's built-in fetch, not the npm package. @cortexkit/subc-clienthas no runtime dependencies at all.scripts/windows-vm/run-guest.ps1:164still documents "aft-bridge is plaintscand importsundiciat runtime", which has been stale since1a1a43463.
Impact
^7.25.0 resolves to 7.29.1 in a fresh install, which is affected by (fix is >= 7.30.1):
- GHSA-4qv8-2p9j-2685 — DoS via unbounded memory in the EventSource parser
- GHSA-f72v-6w45-q472 — Subresource Integrity bypass via non-lowercase algorithm tokens
- GHSA-xjj6-f33q-929c — DoS via unhandled error on excessive content-encodings
- GHSA-4w7w-5xrc-9h26 — cache poisoning / cross-user disclosure via cross-origin redirects
- GHSA-2m5v-pch6-74hx — TLS certificate validation bypass via dropped tls options in Agent
- GHSA-qrxm-fqhp-jwvm — DoS via TLS 1.2 certificate-changing renegotiation
- GHSA-9fm3-97px-rjf6 — WebSocket client DoS via unbounded automatic PONG buffering
- GHSA-55wc-3pg8-jfw6 — DoS via unhandled exception in the decompress interceptor
Downstream consumers have to add pnpm.overrides / resolutions pins, or live with permanent Dependabot alerts for a package that is never loaded.
Suggested fix
Remove undici from packages/aft-bridge/package.json and packages/opencode-plugin/package.json, and update the stale comment in scripts/windows-vm/run-guest.ps1. If a DNS-pinned fetch comes back later, the dependency should be re-added with a current version — the ^7 pin should not be carried over, since undici@8's Bun incompatibility was specific to the removed code path.