claude-flow 3.7.0-alpha.37 → 3.7.0-alpha.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,3 +2,8 @@
2
2
  {"type":"edit","file":"/Users/cohen/Projects/ruflo/.claude/worktrees/adr-120-impl/v3/@claude-flow/plugin-agent-federation/src/plugin.ts","timestamp":1778811717647}
3
3
  {"type":"edit","file":"/Users/cohen/Projects/ruflo/.claude/worktrees/adr-120-impl/v3/@claude-flow/plugin-agent-federation/src/plugin.ts","timestamp":1778811748835}
4
4
  {"type":"edit","file":"/Users/cohen/Projects/ruflo/.claude/worktrees/adr-120-impl/scripts/audit-fix-invariants.mjs","timestamp":1778812020486}
5
+ {"type":"edit","file":"/Users/cohen/Projects/ruflo/.claude/worktrees/adr-120-impl/v3/@claude-flow/plugin-agent-federation/src/transport/midstream-aware-loader.ts","timestamp":1778813516149}
6
+ {"type":"edit","file":"/Users/cohen/Projects/ruflo/.claude/worktrees/adr-120-impl/v3/@claude-flow/plugin-agent-federation/src/transport/midstream-aware-loader.ts","timestamp":1778813543278}
7
+ {"type":"edit","file":"/Users/cohen/Projects/ruflo/.claude/worktrees/adr-120-impl/v3/crates/ruflo-federation-peer/Cargo.toml","timestamp":1778813684390}
8
+ {"type":"edit","file":"/Users/cohen/Projects/ruflo/.claude/worktrees/adr-120-impl/v3/crates/ruflo-federation-peer/src/lib.rs","timestamp":1778813749904}
9
+ {"type":"edit","file":"/Users/cohen/Projects/ruflo/.claude/worktrees/adr-120-impl/v3/crates/ruflo-federation-peer/src/bin.rs","timestamp":1778813766829}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "3.7.0-alpha.36",
3
+ "version": "3.7.0-alpha.37",
4
4
  "description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ruflo",
3
- "version": "3.7.0-alpha.36",
3
+ "version": "3.7.0-alpha.37",
4
4
  "description": "Ruflo - Enterprise AI agent orchestration platform. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
5
5
  "main": "bin/ruflo.js",
6
6
  "type": "module",
@@ -237,6 +237,33 @@ const INVARIANTS = [
237
237
  substring: 'loadFederationTransport',
238
238
  why: 'plugin.ts dispatches through the midstream-aware loader. Reverting to the bare loadQuicTransport import bypasses the ADR-120 preference layer entirely.',
239
239
  },
240
+
241
+ // ADR-120 Step 3 — ruflo-federation-peer Rust crate composes the
242
+ // QUIC transport (midstreamer-quic) with the AIMDS 3-gate pipeline.
243
+ {
244
+ issue: 'ADR-120',
245
+ file: 'v3/crates/ruflo-federation-peer/Cargo.toml',
246
+ substring: 'name = "ruflo-federation-peer"',
247
+ why: 'Step 3 crate name pin. The crate composes midstreamer-quic + aimds-* into a single Rust process per federation peer.',
248
+ },
249
+ {
250
+ issue: 'ADR-120',
251
+ file: 'v3/crates/ruflo-federation-peer/Cargo.toml',
252
+ substring: 'midstreamer-quic = { version = "0.2.1"',
253
+ why: 'Step 3 crate pins midstreamer-quic@0.2.1 (the published upstream version with the strictly-better security posture — OS trust store via rustls-platform-verifier).',
254
+ },
255
+ {
256
+ issue: 'ADR-120',
257
+ file: 'v3/crates/ruflo-federation-peer/src/lib.rs',
258
+ substring: 'pub trait TransportProvider',
259
+ why: 'Step 3 trait surface: TransportProvider abstracts the QUIC backend so the Peer dispatch loop is testable without the upstream Rust deps materialized.',
260
+ },
261
+ {
262
+ issue: 'ADR-120',
263
+ file: 'v3/crates/ruflo-federation-peer/src/lib.rs',
264
+ substring: 'pub trait SafetyGate',
265
+ why: 'Step 3 trait surface: SafetyGate abstracts the AIMDS 3-gate pipeline so the Peer dispatch loop is testable without the upstream aimds-* deps materialized.',
266
+ },
240
267
  ];
241
268
 
242
269
  const offenders = [];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.7.0-alpha.36",
3
+ "version": "3.7.0-alpha.37",
4
4
  "type": "module",
5
5
  "description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
6
6
  "main": "dist/src/index.js",
@@ -68,14 +68,20 @@ async function probeMidstreamerTransport(
68
68
  let mod: unknown;
69
69
  try {
70
70
  // Lazy + indirect so bundlers don't try to resolve at compile time.
71
- // The `'midstreamer'` package name is what `ruvnet/midstream`
72
- // publishes (the README calls it `@midstream/wasm` but that's a
73
- // packaging desync; install name wins see ADR-119).
71
+ // Prefer the `midstreamer/quic` sub-path (added in midstreamer@0.3.1
72
+ // per upstream ruvnet/midstream#81) which exposes
73
+ // `loadQuicTransport` directly without WASM init. Fall back to the
74
+ // root `midstreamer` package for older versions that put the QUIC
75
+ // surface on the default export.
74
76
  const dynamicImport: (s: string) => Promise<unknown> = new Function(
75
77
  's',
76
78
  'return import(s)',
77
79
  ) as (s: string) => Promise<unknown>;
78
- mod = await dynamicImport('midstreamer');
80
+ try {
81
+ mod = await dynamicImport('midstreamer/quic');
82
+ } catch {
83
+ mod = await dynamicImport('midstreamer');
84
+ }
79
85
  } catch {
80
86
  return null;
81
87
  }
@@ -84,27 +90,48 @@ async function probeMidstreamerTransport(
84
90
  loadQuicTransport?: (c?: QuicTransportConfig) => Promise<AgentTransport>;
85
91
  isNative?: () => boolean;
86
92
  isStub?: () => boolean;
93
+ default?: {
94
+ loadQuicTransport?: (c?: QuicTransportConfig) => Promise<AgentTransport>;
95
+ isNative?: () => boolean;
96
+ isStub?: () => boolean;
97
+ };
87
98
  };
88
99
 
89
- // Refuse to use the WASM stub. ADR-119 documented the current shipped
100
+ // CommonJS sub-path exposes its API via `module.exports = {...};
101
+ // module.exports.default = module.exports;` — so we also accept the
102
+ // `.default` form. ESM imports flatten the named exports directly.
103
+ const surface = (typeof candidate.loadQuicTransport === 'function'
104
+ ? candidate
105
+ : candidate.default) as {
106
+ loadQuicTransport?: (c?: QuicTransportConfig) => Promise<AgentTransport>;
107
+ isNative?: () => boolean;
108
+ isStub?: () => boolean;
109
+ } | undefined;
110
+ if (!surface) {
111
+ return null;
112
+ }
113
+
114
+ // Refuse to use the WASM stub. ADR-119 documented the previous
90
115
  // QuicMultistream as a counter-tracking stub with no real UDP, TLS,
91
116
  // or protocol — using it would silently downgrade the federation
92
- // path. When midstream@0.3.0 ships real QUIC (ADR-120, Step 1),
93
- // either `isNative()` returns true OR `isStub()` is absent.
94
- if (typeof candidate.isStub === 'function' && candidate.isStub()) {
117
+ // path. midstreamer@0.3.1+ ships a real QUIC transport via
118
+ // `midstreamer/quic` (ADR-120, Step 1 upstream PR ruvnet/midstream#81)
119
+ // and reports `isNative() === true`. Older versions either expose
120
+ // `isStub()` returning true or omit both probes.
121
+ if (typeof surface.isStub === 'function' && surface.isStub()) {
95
122
  return { transport: null as unknown as AgentTransport, reason: 'midstreamer module reports isStub() === true; refusing to bind a stub QUIC backend (ADR-119)' };
96
123
  }
97
124
 
98
- if (typeof candidate.loadQuicTransport !== 'function') {
125
+ if (typeof surface.loadQuicTransport !== 'function') {
99
126
  return null;
100
127
  }
101
128
 
102
- if (typeof candidate.isNative === 'function' && !candidate.isNative()) {
129
+ if (typeof surface.isNative === 'function' && !surface.isNative()) {
103
130
  return null;
104
131
  }
105
132
 
106
133
  try {
107
- const transport = await candidate.loadQuicTransport(config);
134
+ const transport = await surface.loadQuicTransport(config);
108
135
  return { transport };
109
136
  } catch (err) {
110
137
  return {
@@ -0,0 +1,3 @@
1
+ {"type":"edit","file":"/Users/cohen/Projects/ruflo/.claude/worktrees/adr-120-impl/v3/crates/ruflo-federation-peer/src/lib.rs","timestamp":1778813827456}
2
+ {"type":"edit","file":"/Users/cohen/Projects/ruflo/.claude/worktrees/adr-120-impl/.github/workflows/federation-peer-rust.yml","timestamp":1778813879982}
3
+ {"type":"edit","file":"/Users/cohen/Projects/ruflo/.claude/worktrees/adr-120-impl/scripts/audit-fix-invariants.mjs","timestamp":1778813935154}