[PR #2] [MERGED] feat(email): add gog.gmail.* commands and email.triage #3

Closed
opened 2026-02-15 18:15:36 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/openclaw/lobster/pull/2
Author: @vignesh07
Created: 1/22/2026
Status: Merged
Merged: 1/22/2026
Merged by: @vignesh07

Base: mainHead: feat/email-triage-v1


📝 Commits (2)

  • a9f2608 feat(email): add gog.gmail.* commands and email.triage
  • b46a1c9 fix(gog): translate --query and unwrap gog v0.9 gmail.search JSON

📊 Changes

7 files changed (+457 additions, -0 deletions)

View changed files

📝 src/commands/registry.ts (+6 -0)
src/commands/stdlib/email_triage.ts (+105 -0)
src/commands/stdlib/gog_gmail_search.ts (+92 -0)
src/commands/stdlib/gog_gmail_send.ts (+109 -0)
test/email_triage.test.ts (+91 -0)
test/fixtures/gog_gmail_search.json (+29 -0)
test/fixtures/mock-gog.mjs (+25 -0)

📄 Description

Summary

Adds the first email workflow primitives to Lobster:

  • gog.gmail.search — fetch Gmail threads via gog gmail search (JSON)
  • gog.gmail.send — send draft messages via gog (supports --dryRun)
  • email.triage — read-only, deterministic bucketing + summary

This enables pipelines like:

lobster "gog.gmail.search --query 'newer_than:1d' --max 20 | email.triage | json"

Notes

  • email.triage is read-only (it does not send). The recommended flow is: triage → agent drafts replies → approve → gog.gmail.send.
  • gog compatibility:
    • Lobster keeps a --query flag for ergonomics, but gog v0.9.x expects the query as a positional argument (gog gmail search <query> ...). We translate accordingly.
    • gog gmail search --json returns { threads: [...] } (sometimes wrapped in an array); gog.gmail.search unwraps/flat-maps this so downstream commands receive per-thread items.

Testing

  • pnpm test (builds + runs dist/test/*.test.js, includes an end-to-end mock gog fixture)
  • pnpm lint

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/openclaw/lobster/pull/2 **Author:** [@vignesh07](https://github.com/vignesh07) **Created:** 1/22/2026 **Status:** ✅ Merged **Merged:** 1/22/2026 **Merged by:** [@vignesh07](https://github.com/vignesh07) **Base:** `main` ← **Head:** `feat/email-triage-v1` --- ### 📝 Commits (2) - [`a9f2608`](https://github.com/openclaw/lobster/commit/a9f2608b284603566d375de5e5ad16213022140c) feat(email): add gog.gmail.* commands and email.triage - [`b46a1c9`](https://github.com/openclaw/lobster/commit/b46a1c921d589ed365a55b4ecc1110f5ab9289fc) fix(gog): translate --query and unwrap gog v0.9 gmail.search JSON ### 📊 Changes **7 files changed** (+457 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/commands/registry.ts` (+6 -0) ➕ `src/commands/stdlib/email_triage.ts` (+105 -0) ➕ `src/commands/stdlib/gog_gmail_search.ts` (+92 -0) ➕ `src/commands/stdlib/gog_gmail_send.ts` (+109 -0) ➕ `test/email_triage.test.ts` (+91 -0) ➕ `test/fixtures/gog_gmail_search.json` (+29 -0) ➕ `test/fixtures/mock-gog.mjs` (+25 -0) </details> ### 📄 Description ### Summary Adds the first email workflow primitives to Lobster: - `gog.gmail.search` — fetch Gmail threads via `gog gmail search` (JSON) - `gog.gmail.send` — send draft messages via `gog` (supports `--dryRun`) - `email.triage` — read-only, deterministic bucketing + summary This enables pipelines like: ```sh lobster "gog.gmail.search --query 'newer_than:1d' --max 20 | email.triage | json" ``` ### Notes - `email.triage` is **read-only** (it does not send). The recommended flow is: triage → agent drafts replies → approve → `gog.gmail.send`. - gog compatibility: - Lobster keeps a `--query` flag for ergonomics, but `gog` v0.9.x expects the query as a positional argument (`gog gmail search <query> ...`). We translate accordingly. - `gog gmail search --json` returns `{ threads: [...] }` (sometimes wrapped in an array); `gog.gmail.search` unwraps/flat-maps this so downstream commands receive per-thread items. ### Testing - `pnpm test` (builds + runs `dist/test/*.test.js`, includes an end-to-end mock `gog` fixture) - `pnpm lint` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 18:15:36 -05:00
yindo closed this issue 2026-02-15 18:15:36 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/lobster#3