@1kbirds/chidori-mock-gmail
v0.1.0
Published
Gmail mock app and tools for Chidori TypeScript agents.
Readme
@1kbirds/chidori-mock-gmail
In-memory Gmail mock for agent testing. The package provides:
- A deterministic in-memory mailbox service.
- A googleapis-like Gmail client facade.
- A REST-style Gmail API adapter.
- A React Gmail review UI.
- Seed data for inbox, sent mail, drafts, attachments, labels, and threads.
Supported Surface
SDK-style methods:
users.getProfileusers.labels.list/get/create/update/deleteusers.messages.list/get/insert/send/modify/trash/untrash/deleteusers.threads.list/get/modify/trashusers.drafts.list/get/create/update/send/delete
REST-style paths:
GET /gmail/v1/users/me/profileGET|POST /gmail/v1/users/me/labelsGET|PUT|PATCH|DELETE /gmail/v1/users/me/labels/:idGET|POST /gmail/v1/users/me/messagesPOST /gmail/v1/users/me/messages/sendGET|DELETE /gmail/v1/users/me/messages/:idPOST /gmail/v1/users/me/messages/:id/modifyPOST /gmail/v1/users/me/messages/:id/trashPOST /gmail/v1/users/me/messages/:id/untrashGET /gmail/v1/users/me/threadsGET /gmail/v1/users/me/threads/:idPOST /gmail/v1/users/me/threads/:id/modifyPOST /gmail/v1/users/me/threads/:id/trashGET|POST /gmail/v1/users/me/draftsGET|PUT|DELETE /gmail/v1/users/me/drafts/:idPOST /gmail/v1/users/me/drafts/:id/send
Search Support
The first implementation supports common query terms:
- Plain text across headers, snippet, and body.
from:emailto:emailsubject:textlabel:LABEL_IDis:unreadis:readin:inboxin:sentin:trash
Review
Run verification:
npm run build
npm testStart the React review app:
npm run dev:gmailThen open http://127.0.0.1:5175/.
Manual review should confirm:
- Seeded inbox, sent messages, drafts, trash, labels, threads, and attachments render.
- Search filters visible messages.
- Reading unread mail clears
UNREAD. - Compose can save a draft or send a message.
- Drafts can be edited and sent.
- Archive removes
INBOXfrom a thread. - Trash moves a thread to
TRASH. - Reset restores deterministic seeded state.
Fidelity Notes
The mock intentionally keeps all state in memory. It focuses on common Gmail workflows agents need to rehearse: reading, searching, drafting, sending, labeling, archiving, trashing, and reviewing threads. MIME parsing, OAuth, history diffs, watch notifications, batch requests, import/upload semantics, and exact Gmail search parity are deferred.
