actor-agent-to-workspace.ts 620 B

1234567891011
  1. // An agent's output becomes a file PATH (flows into a files.read argument), and the
  2. // file content flows into a second agent. The only fixture exercising the
  3. // actor -> workspace projection direction. Expect actor#namer -> workspace and
  4. // workspace -> actor#reader: the two agents communicate via the workspace even
  5. // though the world-read launders the direct path -> content site edge.
  6. const namer = agent("namer");
  7. const path = await namer.ask<string>("which file?");
  8. const content = await files.read(path);
  9. const reader = agent("reader");
  10. const out = await reader.ask<string>(`content: ${content}`);
  11. return out;