actor-or-aggregation-and-context-dissolve.ts 658 B

123456789101112
  1. // Aggregation rules in one shape: seed feeds a two-actor pick (inexact, {a,b}) AND
  2. // feeds `a` directly (exact). The two site edges that collapse onto seed->a merge
  3. // with exact = OR over contributors (exact, count=2); the seed->b sibling stays
  4. // inexact (count=1). The context edge between the two asks of overlapping actor sets
  5. // dissolves (sharing an actor is being the same node here).
  6. const a = agent("a");
  7. const b = agent("b");
  8. const seed = await agent("seed").ask<string>("s");
  9. const chosen = seed.length > 3 ? a : b;
  10. const m = await chosen.ask<string>(`use ${seed}`);
  11. const direct = await a.ask<string>(`also ${seed}`);
  12. return `${m} ${direct}`;