Repository navigation
Add verified Gmail drafts and agent-guided self-hosted OAuth setup - #1
Open
soleil-colza wants to merge 3 commits into
Open
soleil-colza wants to merge 3 commits into
soleil-colza wants to merge 3 commits into
Conversation
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.
Some Gmail connectors strip tracking images from HTML input, so a successful draft creation is not proof that the pixel was saved. Add a draft-only TypeScript CLI that registers the message, embeds its pixel in raw MIME, creates the Gmail draft directly, and verifies the saved HTML. Human review and Send stay in Gmail.
The supported self-hosted setup uses the owner's Google Cloud project and Desktop OAuth client, Google's official OAuth SDK with PKCE/state, and OS credential storage. Google credentials stay local. English/Japanese agent setup guides and cf/Wrangler prompts cover project creation, consent, safe credential handling, recovery, testing, quotas, and costs without enabling GCP billing or paid services. A compatible existing MIME-capable Gmail connector remains an optional shortcut that avoids separate OAuth setup.
The CLI has no send command. It retains operation journals and draft IDs to avoid blindly repeating uncertain Gmail writes. Worker behavior, APIs and SQL schema are unchanged. Standard CLI drafts are unarmed until human send confirmation; immediate tracking is an explicit option with owner-preview risks. Native Gmail compose insertion and automatic Sent detection are not implemented, and future Managed hosting alone would not provide them. Architecture notes distinguish a future Sent watcher from a Workspace-specific SMTP gateway.
Validation:
text/htmlandbase64_url_contentpreserved the exact HTML including the pixel in Gmail raw read-back. That separate connector trial did not verify sending or recipient opens.Limits: proxy caches, MPP and sender views still prevent reliable human-read attribution. The
gmail.composegrant includes send permission even though the CLI cannot send. Windows/Linux credential stores and a public managed OAuth application have not been verified in live trials.