fanout-over-join.ts 561 B

123456789
  1. // Two relay stages composed: a fan-out feeds a join whose result feeds a second
  2. // fan-out feeding a second join. Exercises additive relay routing across two
  3. // map/Promise.all stages. In the actor projection both relays drop but the additive
  4. // direct edges keep connectivity: workspace -> a, a -> b, a -> sink, b -> sink.
  5. const paths = await files.glob("src/**/*.ts");
  6. const first = await Promise.all(paths.map((p) => agent("a").ask<string>(p)));
  7. const second = first.map((r) => agent("b").ask<string>(r));
  8. const out = await Promise.all(second);
  9. return out;