handoff-mayset-two-cards.ts 567 B

12345678910111213
  1. // A dynamically selected receiver inside a phase: the may-set copies land on two cards
  2. // (one per candidate lane), each holding its copy of the ask; the same-lane loop back edge
  3. // dissolves, the workspace → either card hand-off survives with the read's type.
  4. const fast = agent("fast");
  5. const slow = agent("slow");
  6. phase("triage");
  7. const logs = await files.glob("*.log");
  8. let verdicts: string[] = [];
  9. for (const f of logs) {
  10. const who = f.endsWith(".big.log") ? slow : fast;
  11. verdicts = [...verdicts, await who.ask<string>(`triage ${f}`)];
  12. }
  13. return verdicts;