compound-assign.ts 296 B

1234567
  1. // Compound assignment: `report += a` must write a's taint back into report so the
  2. // downstream ask that reads report depends on it.
  3. const a = await agent("alpha").ask<string>("start");
  4. let report = "intro";
  5. report += a;
  6. const b = await agent("beta").ask<string>(`Report: ${report}`);
  7. return b;