feat(gmail): add --include-labels flag to gmail list (#64)#65
Merged
feat(gmail): add --include-labels flag to gmail list (#64)#65
Conversation
Lean triage output (#38): - Grouped JSON format: auto_handled/needs_input/batch_stats - NOISE items reduced to thread_id + reason only - Compact matches array (non-null only) - ~80% token reduction in triage agent output Cache label list (#39): - Fetch labels once at session start, write to scratchpad - Label-resolver accepts cached labels_file parameter - Saves ~4k tokens + 2-3s per label operation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Smart auto-labeling (#37): - Triage agent receives cached label names, outputs suggested_label per email - Archive auto-applies suggested label ("Archived with label: X") Prompt standardization: - All prompt files now have YAML frontmatter (name, model, agent_type) - Model/agent_type defined in prompt, referenced by SKILL.md User context: - Sub-agents receive user identity for better classification and role assessment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New morning-enrich.sh script adds deterministic tags to emails after pre-filtering and before AI classification: - noise_signal, vip_sender, starred, is_thread, calendar_match Triage agent uses pre-computed tags directly, reducing reasoning load. Pipeline: prefetch → prefilter → enrich → classify → triage Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use Gmail queries instead of labels field (not in gws gmail list output) - Fix macOS sed compatibility: [[:space:]] instead of \s - Fix VIP sender parsing from YAML config Related: #64 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Surface Gmail label IDs in list output by extracting the union of all message labels per thread. Opt-in via --include-labels to avoid breaking existing consumers. Updates morning scripts to use labels from inbox data instead of 2 extra API calls, saving ~2-3s per session. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update README command table with --include-labels flag, bump gws to v1.10.0 and gws-morning to v0.6.0, update SKILL.md prefetch docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--include-labelsflag togws gmail listthat includes the union of all Gmail label IDs per thread in the output (sorted, deterministic)morning-prefetch.shto pass--include-labelsandmorning-enrich.shto extract promotions/starred from inbox labels instead of making 2 extra API calls (~2-3s savings per session)Test plan
go build ./...compilesgo test ./cmd/ -run TestGmail— all Gmail tests pass (including newTestGmailListCommand_IncludeLabelsFlagandTestGmailList_IncludeLabels_MockServer)go run . gmail list --max 3 --include-labels— verifylabelsfield appearsgo run . gmail list --max 3— verifylabelsfield does NOT appearCloses #64
🤖 Generated with Claude Code