Add Hey CLI as alternative email backend for Postman (#14)

* Add Hey CLI support as alternative email backend

The Postman agent now supports two email backends:
- Hey (hey CLI) for Hey.com accounts with pre-sorted mailboxes
- GWS (gws CLI) for Gmail/Google Workspace accounts

Hey's mailbox model (Imbox, Feed, Paper Trail, Reply Later,
Set Aside, Bubble Up) is mapped to triage behaviours so the
agent leverages Hey's existing sorting. Calendar operations
remain on GWS.

All MCP function references replaced with CLI equivalents.
No user-specific details in the agent file.

* Update agents in postman.md by removing two roles

Removed descriptions for Food Coach and Wellness Guide agents from the postman documentation.

* Add Hey CLI as email backend across all docs, skills, and references

- Resolve all merge conflicts in postman.md keeping GWS + MCP + Hey
- Apply all 7 review comments from PR #14 (complete mailbox list,
  concrete email_backend setting, consistent template placeholders,
  Hey ID clarification, productivity features disclaimer, deadline
  body scanning, remove user-specific agent references)
- Add Hey CLI alongside GWS/MCP in: README, CLAUDE.md, TERMS_OF_USE,
  DISCLAIMERS, getting-started, gws-setup-guide (renamed sections),
  agents-registry, agents.md, onboarding skill, launchme.sh
- Update all 4 Postman-related skills (email-triage, deadline-radar,
  meeting-prep, weekly-agenda) with Hey CLI commands and backend
  detection
- Expand security section to cover Hey CLI injection vectors
- Keep MCP as read-only fallback for all backends

* Address Copilot review: fix typos, injection rules, platform compat, install hooks

- Fix hey imbox --json typo → hey box imbox --json
- Fix after:{{yesterday}} → newer_than:2d for consistent 48h scan
- Reconcile shell injection rules with hey reply/compose -m (user-approved
  text only, with safe quoting guidance)
- Separate email write ops (GWS/Hey) from calendar write ops (GWS only)
  in TERMS_OF_USE and DISCLAIMERS
- Replace grep -P with POSIX-compatible tab detection in validate-frontmatter
- Add hooks/ and settings.json installation to launchme.sh and updateme.sh
  so .claude/hooks/ paths in settings.json resolve correctly

---------

Co-authored-by: gnekt <dima9610@gmail.com>
This commit is contained in:
lh
2026-03-27 14:51:06 +00:00
committed by GitHub
parent 547fe06450
commit f66f4f6566
21 changed files with 971 additions and 95 deletions

View File

@@ -1,8 +1,54 @@
# Setting Up Google Workspace CLI for the Postman Agent
# Setting Up Email Backends for the Postman Agent
The Postman agent supports three email backends. You can use one or more:
| Backend | Email Provider | Access Level | Calendar |
|---------|---------------|-------------|----------|
| **GWS CLI** (`gws`) | Gmail / Google Workspace | Full read/write | Yes (Google Calendar) |
| **Hey CLI** (`hey`) | Hey.com | Full read/write | No (Hey has its own productivity tools, not Google Calendar) |
| **MCP connectors** | Gmail | Read-only + drafts | Read-only (Google Calendar) |
If you have both Gmail and Hey.com, you can use `gws` and `hey` simultaneously. Set your preferred primary backend in `Meta/user-profile.md` with `email_backend: hey` or `email_backend: gws` (default: `gws`).
---
## Option A: Hey CLI (for Hey.com users)
### Step 1: Install Hey CLI
```bash
# See https://github.com/basecamp/hey-cli for the latest instructions
gem install hey-cli
```
### Step 2: Authenticate
```bash
hey auth login
```
### Step 3: Verify
```bash
hey auth status --json
hey box imbox --json --limit 1
```
If both return JSON, you're good. The Postman will auto-detect `hey` on PATH.
### Troubleshooting Hey
- **`hey: command not found`**: ensure the gem bin directory is on your PATH. Check with `gem environment` and add `<gem_dir>/bin` to PATH.
- **Auth expired**: run `hey auth refresh` or `hey auth login`.
- **General issues**: run `hey doctor` for diagnostics.
---
## Option B: Google Workspace CLI (for Gmail users)
The Postman agent uses the [Google Workspace CLI](https://github.com/googleworkspace/cli) (`gws`) to interact with Gmail and Google Calendar. This gives the agent full read/write access — searching, reading, archiving, deleting, labelling emails, and creating/modifying calendar events.
## Why gws instead of MCP?
### Why gws instead of MCP?
The Anthropic-hosted MCP servers for Gmail and Calendar are read-only (plus draft creation). They cannot archive, delete, label, or send emails. The Google Workspace CLI wraps the full Google API surface, giving the Postman agent the ability to actually manage your inbox — not just read it.