Add Google Developer Expert agent with OAuth 2.0 and Google API integration#11
Draft
Add Google Developer Expert agent with OAuth 2.0 and Google API integration#11
Conversation
Co-authored-by: huan <1361891+huan@users.noreply.github.com>
Co-authored-by: huan <1361891+huan@users.noreply.github.com>
Co-authored-by: huan <1361891+huan@users.noreply.github.com>
Co-authored-by: huan <1361891+huan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Google Developer Expert agent with Drive API features
Add Google Developer Expert agent with OAuth 2.0 and Google API integration
Dec 24, 2025
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.
Implements a production-ready agent for secure Google API access (Gmail, Docs, Drive) with zero-trust token management that prevents OAuth credentials from reaching the LLM context.
Security Architecture
Zero plaintext in pRing 0: OAuth tokens are sealed via
pwosCryptoimmediately upon receipt, stored aspwenc:v1:...in/vault/google/*, and only decrypted in TypeScript at API call time.Components
OAuth Infrastructure (21KB TypeScript)
oauth-auth.ts: Authorization code flow with PKCE, local callback serveroauth-token.ts: Token lifecycle (get, refresh, validate, revoke)API Wrappers (25KB TypeScript)
gmail-api.ts: list, get, send, search, labels, threadsgdocs-api.ts: get, create, update, list documentsgdrive-api.ts: list, upload, download, search, folder managementAgent & Skill (51KB)
google-expert.md: Agent persona with interaction patternsSKILL.md: Complete usage guide with OAuth workflowsDESIGN.md: Architecture rationale and threat modelTESTING.md: Verification proceduresskill.test.ts: RFC 0012 compliance testsExample Usage
Implementation Notes
All tools follow PromptWare OS microkernel patterns:
--help,--description≤1024 chars)pwosSyscallToken refresh is transparent: API wrappers detect 401 errors, call
oauth-token.ts refresh, and retry the original request.Files: 11 total (1 agent, 5 tools, 5 docs)
Size: 3,922 lines (~116KB)
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.