* refactor: consolidate tool approval into single param-aware method
Replace the two confusing approval methods (requires_approval() and
requires_approval_for()) with a single requires_approval(&self, params)
returning a 3-variant ApprovalRequirement enum (Never, UnlessAutoApproved,
Always). This enables param-aware approval decisions: HTTP calls without
auth headers now skip approval entirely, while authenticated requests
always require it. Shell tool merges its destructive-command detection
into the same method.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* feat: add credential injection to built-in HTTP tool
Wire the WASM credential injection system into the built-in HTTP tool
so credentials are auto-injected at the boundary (zero-exposure model).
- Add SharedCredentialRegistry: thread-safe, append-only registry of
credential mappings populated by WASM tools at registration time
- Add credential_detect module with broad auth detection for headers
(12 exact + 5 substring matches), header values (7 auth scheme
prefixes), and URL query params (17 exact + 5 substring matches)
- HttpTool now accepts optional credential registry + secrets store,
auto-injects matching credentials in execute(), and uses broader
auth detection in requires_approval()
- ToolRegistry passes credential registry to HttpTool at startup and
populates it when WASM tools register
- Remove old hardcoded AUTH_HEADER_NAMES / has_auth_headers in favor
of the new params_contain_manual_credentials()
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: address PR #274 review comments (query param injection, lock poisoning, visibility)
- Fix injected query params not being sent on outbound HTTP requests by
also calling .query() on the RequestBuilder alongside parsed_url mutation
- Recover from poisoned RwLock in SharedCredentialRegistry instead of
silently ignoring failures, with tracing::warn for visibility
- Narrow inject_credential and host_matches_pattern to pub(crate) to
avoid committing to them as stable public API
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
* Add Google Calendar and Gmail WASM tools, and /add-tool skill
Scaffold two new WASM tools that share a single Google OAuth token:
- google-calendar: list/get/create/update/delete calendar events
- gmail: list/search/get/send/draft/reply/trash emails
Both tools use the sandboxed WIT interface with strict HTTP allowlists,
credential injection, and rate limiting. OAuth config requests only
the minimum scopes needed (calendar.events, gmail.modify, gmail.compose).
Also adds the /add-tool skill for scaffolding future WASM or built-in
tools with all boilerplate wired up.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* Document WASM vs MCP server decision guide in CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* Add Google Drive WASM tool with full file and sharing management
Supports 12 actions: list/get/download/upload/update files, create
folders, delete/trash, share/list/remove permissions, and list shared
drives. Works with both personal and organizational drives via the
corpora parameter. Uses shared google_oauth_token for auth.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* Add Google Sheets, Docs, and Slides WASM tools
Three new Google Workspace tools sharing google_oauth_token:
- Sheets: create spreadsheets, read/write/append values, manage sheets, format cells
- Docs: create/read/edit documents, text formatting, paragraphs, tables, lists
- Slides: create/edit presentations, shapes, images, text formatting, thumbnails, templates
Also adds tools-src/TOOLS.md tracking implementation status.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* Add Telegram WASM tool with direct MTProto over HTTPS
Replace TDLight Docker dependency with pure-Rust grammers crates
for direct encrypted MTProto communication to Telegram's web
transport endpoints. No middleware, no Docker needed.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* Gitignore Cargo.lock files in WASM tools
Library crates should not commit lock files. Consolidate per-tool
.gitignore into a single one at wasm-tools/ level.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* Flatten tools-src/wasm-tools/ into tools-src/
All tools are WASM, the extra nesting added no value. Moves all tool
crates up one level, updates WIT paths and documentation references.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* Fix Slack tool: add OAuth auth, URL encoding, pin wit-bindgen
- Add OAuth 2.0 auth section to Slack capabilities with proper scopes
and manual fallback instructions
- URL-encode query parameters in GET requests to prevent injection
- Remove dead SlackApiError struct
- Pin wit-bindgen to =0.36 across all WASM tools for Rust 1.86 compat
- Update add-tool template with pinned version
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>