(no title)
bluesnowmonkey | 21 days ago
On the agent side, it just gets tools: send email, reply to email, list inbox, read message. Those tools call the AgentMail API. So the fake implements the same interface.. same send/reply/list/read methods, but recording calls instead of making HTTP requests. You can pre-populate inboxes with test messages, simulate "username taken" errors, etc.
AgentMail is actually one of the simpler fakes because there's no internal state to maintain. Sending a message doesn't affect what you'd read back from your own inbox. Some of the other fakes (like the database or file storage) need to actually simulate state in memory so writes are visible to subsequent reads. This one is closer to a stub.
No comments yet.