emission-graph-same-actor-self-edge.ts 544 B

123456789
  1. // One actor, three asks; data flows from ask#1 into ask#2 only. Expected: actor-graph
  2. // SELF-EDGE critic -> critic (count 1, exact) from ask#1 -> ask#2; ask#3 has only
  3. // CONTEXT in-edges, so source completion must still give it source -> ask#3 (context
  4. // edges are not data); context edges dissolve in the projection.
  5. const critic = agent("critic");
  6. const first = await critic.ask<string>("assess");
  7. const second = await critic.ask<string>(`refine ${first}`);
  8. const third = await critic.ask<string>("wrap up");
  9. return `${second} ${third}`;