Commit Graph

192 Commits

Author SHA1 Message Date
Peter Steinberger
22cf640a07 fix: reuse sheets format helpers (#72) (thanks @nilzzzzzz)
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-01-16 09:56:25 +00:00
Nils Czernig
08398cc0f2 feat(sheets): add format command 2026-01-16 09:52:44 +00:00
Peter Steinberger
39767c7407 fix(gmail): gate notfound on 404 (#70) (thanks @antons) 2026-01-16 09:38:13 +00:00
Anton Sotkov
9a0f127cf5 fix(gmail): handle stale watch 404s
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.
2026-01-16 09:37:11 +00:00
Ryan H
0447664fcd fix(gmail): add settings.sharing scope for filter operations
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
2026-01-16 09:08:11 +00:00
Peter Steinberger
29813305b9 chore: update deps + tests (0.6.2 Unreleased) 2026-01-15 17:26:19 +00:00
Peter Steinberger
c94b6d4417 feat(drive): add drives subcommand (#67) (thanks @pasogott) 2026-01-15 17:14:01 +00:00
sheeek
7f764eb143 test(drive): add unit tests for drives subcommand
Tests cover:
- Text and JSON output modes
- Empty drives list handling
- Query parameter filtering
- Pagination token hint
2026-01-15 17:11:19 +00:00
sheeek
174de114fc feat(drive): add 'drives' subcommand to list shared drives
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
2026-01-15 17:11:19 +00:00
Thomas Einwaller
5b23c67da4 made show-assigned for tasks default 2026-01-15 16:30:36 +00:00
Peter Steinberger
22c88f9e72 test: fix stdin body lint
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-01-15 09:51:51 +00:00
Peter Steinberger
750881b8d2 feat(gmail): add --body-file support 2026-01-15 09:51:19 +00:00
Peter Steinberger
3c131fb1e3 feat(auth): support Workspace service accounts (#54) (thanks @pvieito) 2026-01-11 02:09:05 +01:00
Peter Steinberger
bdace30a35 test(auth): cover sheets scope matrix
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-01-11 00:13:17 +01:00
Peter Steinberger
11562321ec fix(auth): include drive scope for sheets export
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-01-11 00:06:04 +01:00
Peter Steinberger
2bb6a8b37c feat(auth): add --readonly and --drive-scope (#58) (thanks @jeremys)
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-01-10 23:57:15 +01:00
Peter Steinberger
7899c4feae fix(gmail): preserve draft To on update (#57) (thanks @antons) 2026-01-10 23:26:32 +01:00
Anton Sotkov
4e92b5972b feat(gmail): allow drafts without a recipient 2026-01-10 13:34:26 +02:00
salmonumbrella
07ffcb5d84
fix(paths): expand ~ in user-provided file paths (#56)
* 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>
2026-01-10 02:19:30 +00:00
Peter Steinberger
8e878fe485 fix(cli): avoid vet shadow
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-01-10 03:13:12 +01:00
Peter Steinberger
ecef6a0f10 fix(cli): infer default account 2026-01-10 03:12:21 +01:00
Peter Steinberger
e05b08992c fix(gmail): avoid err shadow in drafts update 2026-01-09 22:54:51 +01:00
Peter Steinberger
95e883dc8f fix(gmail): preserve draft thread headers on update (#55) (thanks @antons) 2026-01-09 22:47:52 +01:00
Anton Sotkov
a528467dcd refactor(drafts): share compose core 2026-01-09 22:46:04 +01:00
Anton Sotkov
21fbf16390 feat(gmail): add drafts update command 2026-01-09 22:46:04 +01:00
Peter Steinberger
b44d1d5d97 feat(auth): add groups service 2026-01-09 21:05:05 +01:00
Peter Steinberger
4af0cb83f1 fix(auth): verify account matches authorized email 2026-01-09 17:30:19 +01:00
Peter Steinberger
b14c0ce908 fix(auth): filter non-token keys in auth tokens list 2026-01-09 16:43:14 +01:00
Peter Steinberger
bfe101a45f fix(lint): satisfy wsl/err113 2026-01-09 13:26:52 +01:00
Peter Steinberger
334570fa8e fix(auth): skip keychain access for file backend 2026-01-09 11:29:36 +01:00
Peter Steinberger
962ccf3353 feat(auth): hint keyring file password 2026-01-09 10:52:52 +01:00
Peter Steinberger
abb3e63638 test(gmail): prevent watch serve CI hang 2026-01-09 10:35:25 +01:00
Peter Steinberger
dacfa8a178 fix(cli): keyring config UX + make gog args 2026-01-09 10:32:33 +01:00
Peter Steinberger
fde7e6ffd4 ci: fix fmt-check and lint 2026-01-09 10:09:53 +01:00
Peter Steinberger
269f8e5a1f feat(auth): add keyring backend config command 2026-01-09 10:05:40 +01:00
Peter Steinberger
ba41885b1c test: raise coverage to 85% 2026-01-09 09:18:16 +01:00
Peter Steinberger
00dcff3f20 fix(calendar): infer timeZone for recurring events (#53, thanks @visionik) 2026-01-09 05:58:01 +01:00
Jonathan Taylor
6ec670d0df fix(calendar): add timezone to EventDateTime for recurring events
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'
2026-01-09 05:53:40 +01:00
Peter Steinberger
47c06796b0 fix(lint): tidy cmd/ui lint findings (#35)
Thanks @salmonumbrella.

Co-authored-by: salmonumbrella <salmonumbrella@users.noreply.github.com>
2026-01-09 04:34:31 +01:00
Peter Steinberger
c1ebd60210 test: expand coverage and tracking regressions (#35)
Thanks @salmonumbrella.

Co-authored-by: salmonumbrella <salmonumbrella@users.noreply.github.com>
2026-01-09 04:21:16 +01:00
Peter Steinberger
29181a3890 chore(tracking): lint cleanup 2026-01-09 01:53:42 +01:00
Peter Steinberger
120a5aa066 refactor(tracking): extract deploy helpers 2026-01-09 01:53:42 +01:00
Peter Steinberger
e3ffd7240f chore: changelog + test hardening (#52, thanks @antons)
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-01-09 01:13:23 +01:00
Anton Sotkov
edb8200cc1 fix(gmail): normalize MIME types in multipart bodies
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.
2026-01-09 01:11:01 +01:00
Peter Steinberger
74f7c15d66 fix(gmail): avoid nil tracking config 2026-01-09 00:01:48 +01:00
Peter Steinberger
818c4b2af3 fix(gmail): handle reply info pointer 2026-01-09 00:01:05 +01:00
Peter Steinberger
af6e659f72 refactor(tracking): reduce send complexity 2026-01-09 00:00:22 +01:00
Peter Steinberger
5e65fc9626 Merge branch 'land/pr-35' 2026-01-08 23:56:58 +01:00
Peter Steinberger
18a6e3c97f feat(tracking): per-account setup + track-split 2026-01-08 23:52:57 +01:00
Peter Steinberger
a9fc01a5e7 refactor(input): improve prompts and EOF handling 2026-01-08 21:26:28 +01:00