After running for some time, the Gmail watcher in Clawd was failing with:
08:57:37 [gmail-watcher] [gog] watch: handle push failed: googleapi: Error 404: Requested entity was not found., notFound
Addressed by treating this 404 as stale so watch handling triggers a resync.
In addition, we now keep processing the entire push when one message ID no longer exists (fetching it returns 404), instead of failing the whole webhook.
Filter creation requires the gmail.settings.sharing scope. Without it,
users get a 403 insufficientPermissions error when trying to create
filters via `gog gmail settings filters create`.
Fixes#68
Adds gog drive drives command that calls the Google Drive API drives.list
endpoint to enumerate all shared drives (Team Drives) the user has access to.
Supports:
- --max/--limit for pagination
- --page for continuation
- --query/-q for filtering shared drives
- --json for scripted output
- Standard table output with ID, NAME, CREATED columns
API Reference: https://developers.google.com/drive/api/v3/reference/drives/list
* fix(paths): expand ~ in user-provided file paths
When users specify paths with ~ (e.g., --out ~/Downloads/file.pdf) and
the path is quoted in the shell command, the tilde is not expanded by
the shell. This caused files to be written to a literal ~/Downloads
directory instead of the user's home directory.
Add config.ExpandPath() function that expands ~ at the beginning of
paths to the user's home directory. Apply this fix to all user-provided
file paths across:
- gmail attachment download (--out)
- drive download/export (--out)
- drive upload (localPath argument)
- auth token export (--out)
- auth credentials/import/keep (input paths)
- gmail thread attachments (--out-dir)
- gmail send/drafts (--attach)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(lint): address wrapcheck and wsl issues
* fix(calendar): support ISO 8601 time format and add 'list' alias
- Add parsing for ISO 8601 datetime with numeric timezone without colon
(e.g., 2026-01-09T16:38:41-0800), which is the format produced by
macOS `date +%Y-%m-%dT%H:%M:%S%z`
- Add 'list' as an alias for 'events' subcommand for more intuitive CLI
usage (gog calendar list instead of gog calendar events)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore(changelog): note PR #56
* chore(lint): dedupe file string
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Google Calendar API requires an explicit TimeZone field on EventDateTime
when creating recurring events. Without it, the API returns:
'Missing time zone definition for start time.'
This change extracts the timezone from the RFC3339 offset in the --from/--to
values and maps common US offsets to IANA timezone names.
Fixes recurring event creation via:
gog calendar create primary --summary 'Test' \
--from '2026-01-08T11:00:00-05:00' \
--to '2026-01-08T11:30:00-05:00' \
--rrule 'RRULE:FREQ=DAILY;INTERVAL=28'
Body extraction compared exact MIME types; parts often include params like
"text/plain; charset=utf-8", so multipart/alternative returned empty body
(null in JSON). Normalize MIME types (lowercase/trim/strip params) so
plain/html parts are found, preferring plain text. Also accept padded
base64url defensively.