actor-may-pick-inside-fanout.ts 664 B

1234567891011
  1. // Composes may-projection + fan-out containment + aggregation in one shape: a ternary
  2. // receiver (actors {a,b}) asked per-element inside a fan-out, with a,b created
  3. // OUTSIDE (idiom B: no family). world-read -> ask fans to workspace->a, workspace->b
  4. // (inexact); ask -> sink fans to a->sink, b->sink (inexact); relays drop;
  5. // workspace->sink is endpoint-endpoint and is filtered. Verifies the ask's
  6. // per-element `within` is intentionally NOT projected onto externally-created lanes.
  7. const files1 = await files.glob("*.md");
  8. const a = agent("a");
  9. const b = agent("b");
  10. const out = files1.map((f) => (f.length > 3 ? a : b).ask<string>(`x ${f}`));
  11. return out;