fix(federation): cap agentic-flow peer to <2.0.13 (#2364)

agentic-flow@2.0.13 dropped the ./transport/loader subpath from its
exports map. The federation plugin imports
'agentic-flow/transport/loader' for loadQuicTransport, AgentMessage,
QuicTransportConfig, and WebSocketFallbackTransport. With 2.0.13
resolved, that subpath throws ERR_PACKAGE_PATH_NOT_EXPORTED.

Runtime impact is bounded — midstream-aware-loader.ts wraps the dynamic
import in try/catch and returns null on failure, so the plugin falls
back to the midstream-native path rather than crashing. But the peer
range previously said ">=2.0.12-fix.8" which silently accepted 2.0.13;
tighten to ">=2.0.12-fix.8 <2.0.13" so npm install warns about the
incompatibility instead of letting it surface as a runtime fallback.

Type imports continue to work because the devDependency is still pinned
to 2.0.12-fix.8 for typecheck.

This is the in-repo half of the fix. Upstream agentic-flow needs to
either restore ./transport/loader to its exports map (Option A in the
issue body) or publish migration notes for callers (Option B). The
peer cap will widen again once upstream resolves either way.

Closes #2364.

Co-Authored-By: RuFlo <ruv@ruv.net>
This commit is contained in:
ruvnet committed 2026-06-12 08:54:25 -04:00
1 parent d1e558b48e
commit d687753cc2
1 file changed
+1 -1
@@ -24,7 +24,7 @@
"@noble/ed25519": "^2.0.0"
},
"peerDependencies": {
"agentic-flow": ">=2.0.12-fix.8",
"agentic-flow": ">=2.0.12-fix.8 <2.0.13",
"midstreamer": ">=0.3.1"
},
"peerDependenciesMeta": {