Adds a read-only contacts dedupe preview command with JSON/table output, generated command docs, README/spec docs, and changelog credit for the extracted idea from #116.\n\nCo-authored-by: Rohan Patnaik <rohan-patnaik@users.noreply.github.com>
Add `gog gmail forward` / `gog gmail fwd` with optional notes, verified send-as selection, forwarded headers, thread metadata, and attachment carry-over.
Hardening in this landing pass:
- include forward/fwd in Gmail no-send guard paths
- enforce per-account no-send before any Gmail API fetch/send work
- de-duplicate forwarded header formatting and test service setup
- update README, spec, and changelog
Validation:
- make fmt
- go test ./internal/cmd -run Forward\|NoSend
- make lint && make test && make build
- make ci
- clawdbot live smoke: read-only gmail search/thread get, forward dry-run with real message id, --gmail-no-send forward blocked before send
Co-authored-by: Spencer Reed <spencer.cavendish.reed@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Adds `gog calendar create-calendar` / `new-calendar` for secondary Google Calendar creation with summary, description, timezone, and location.
Landing polish:
- removed unrelated `.byline` cache files from the PR branch
- validates IANA timezone names locally
- dry-run no longer opens the Calendar service
- includes location in text output
- added request/body, text, dry-run, and validation tests
- README/spec/CHANGELOG entries
Local verification:
- go test ./internal/cmd -run TestCalendarCreateCalendarCmd
- make lint
- make test
- make build
- make ci
- live Calendar smoke with clawdbot@gmail.com: created secondary calendar, verified summary/timezone/location, deleted it via the same auth path
Thanks @alexknowshtml.
Co-authored-by: Alex Hillman <alex@indyhall.org>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds `gog slides thumbnail` / `thumb` for rendered slide thumbnail URLs and optional PNG/JPEG downloads.
Landing polish:
- supports `--out` with `--output` alias
- uses shared output-file helper for expansion, parent creation, and private perms
- preserves close/write errors
- adds missing presentation-id test plus docs/spec/CHANGELOG
Local verification:
- go test ./internal/cmd -run TestSlidesThumbnail
- make lint
- make test
- make build
- make ci
- live Slides smoke with clawdbot@gmail.com: created deck, listed slide, downloaded medium PNG thumbnail, verified PNG bytes, trashed deck
Thanks @gianpaj.
Co-authored-by: gianpaj <gianpa@gmail.com>
Adds Markdown upload conversion to Google Docs via `--convert` / `--convert-to doc`, strips leading YAML frontmatter by default, and provides `--keep-frontmatter` for the opt-out path.
Landing polish:
- byte-based frontmatter stripping with BOM/CRLF coverage
- Drive upload media tests for stripped and preserved frontmatter
- README/spec/CHANGELOG coverage
Local verification:
- focused `go test ./internal/cmd -run ...`
- make lint
- make test
- make build
- make ci
- live Drive smoke with clawdbot@gmail.com: converted Markdown upload, Markdown export verified no frontmatter, opt-out verified preserved content, both files trashed
Thanks @johnbenjaminlewis.
Co-authored-by: Ben Lewis <johnbenjaminlewis@gmail.com>
Adds `gog auth credentials remove [<client>|all]` with token/domain cleanup, JSON output, dry-run support, docs, and regression tests.
Local verification:
- make fmt
- make lint
- make test
- make build
- make ci
Thanks @yamagucci.
Co-authored-by: takashiyamaguchi <yama0628taka@gmail.com>
* fix(gmail): decode ISO-2022-JP bodies
* fix(gmail): include cc/bcc in get output
* feat(calendar): allow selecting calendars in events
* test(gmail): add edge case tests for ISO-2022-JP decoding
Add tests for edge cases in ISO-2022-JP body decoding:
- Mixed ASCII and Japanese text (e.g., "Hello こんにちは World")
- Empty content with ISO-2022-JP charset header
- Malformed ISO-2022-JP sequences (graceful degradation)
- Truncated escape sequences
These tests verify the graceful fallback behavior in decodeBodyCharset
which returns original data if decoding fails.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(calendar): validate unknown calendar names in resolveCalendarIDs
When a calendar name doesn't match any known calendar (not in bySummary
or byID maps), return an error listing the unrecognized names instead
of treating them as raw calendar IDs which causes cryptic Google API
errors.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(calendar): validate unknown and ambiguous calendar name resolutions
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Add Drive upload conversion with auto detection (--convert) and explicit targets (--convert-to), preserve explicit --name values, and improve conversion behavior tests/docs for PR #240.
Co-authored-by: Daniel Weber <daniel@suno.com>
* fix(gmail): fallback to send-as list for display name
* refactor(gmail): remove dead code in primarySendAsDisplayNameFromList
The condition `primary == nil && sa.IsPrimary` inside the email-matching
block can never be true because `primary` is already unconditionally set
to `sa` when `sa.IsPrimary` is true earlier in the same loop iteration.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test(gmail): add --from display name fallback to list test
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat(auth): persist manual oauth state
* feat(cli): add remote manual auth flow
* fix(auth): enforce remote manual auth state
* fix(auth): satisfy lint for manual auth flow
* fix(auth): harden remote manual auth state cache
* chore: update changelog for remote manual auth (#187) (thanks @salmonumbrella)
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* feat(drive): add --domain flag to share command
Allow sharing files/folders with an entire Google Workspace domain
(e.g. `gog drive share <id> --domain=example.com --role=writer`).
This creates a "domain" type permission in the Drive API, enabling
the "Anyone in <org> with the link" sharing mode.
Also updates `permissions` output to display domain names.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(drive): add --to target for share (#192) (thanks @Danielkweber)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* feat(gmail): add timezone support for date output
Add --timezone and --local flags to gmail search and watch serve commands
to control how dates are displayed. By default uses local timezone.
Users can specify any IANA timezone (e.g., America/New_York, UTC).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test(gmail): fix execute test for timezone changes
Update TestExecute_GmailSearch_JSON to use explicit --timezone UTC flag
and expect the correctly converted time (22:04 UTC from 15:04 -0700).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat(gmail): add -z short flag for --timezone
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test(gmail): add unit tests for resolveOutputLocation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* docs(gmail): clarify timezone flag help text
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test(gmail): add timezone conversion tests for formatGmailDateInLocation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat(config): add default_timezone setting
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat(gmail): support GOG_TIMEZONE env var and config for timezone
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat(config): add gog config command for timezone and settings
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat(calendar): respect GOG_TIMEZONE and config for timezone
Update calendar time command to follow the same timezone priority as gmail:
1. --timezone flag (explicit)
2. GOG_TIMEZONE env var
3. Config file default_timezone
4. Fall back to Google Calendar's timezone (calendar-specific fallback)
Add getConfiguredTimezone helper that returns nil when no explicit timezone
is configured, allowing calendar commands to use their own fallback behavior.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test(gmail): add tests for GOG_TIMEZONE env var and getConfiguredTimezone
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(config): warn on invalid timezone instead of error
When default_timezone in config is invalid, print a warning to stderr
and fall back to local timezone instead of returning a hard error.
Invalid flag/env var still returns errors (user mistake in current
session), but invalid config should not break the CLI (stale config).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor(gmail): remove unused formatGmailDate, add nolint directive
- Remove unused formatGmailDate wrapper function (all callers use
formatGmailDateInLocation directly with explicit location)
- Add nolint:nilnil directive to getConfiguredTimezone with explanation
that nil return signals caller to use its own fallback
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(timezone): honor --timezone local
* refactor(cli): unify config/timezone helpers
* test(cmd): isolate config env in timezone tests
* refactor(config): centralize config key metadata
* fix(config): drop unused key spec lookup
* fix(config): standardize config key errors
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
- Add comprehensive unit tests for classroom helper functions
(date/time parsing, error wrapping, profile helpers)
- Add profileEmail() helper for nil-safe email extraction
- Fix nil pointer guards for Profile access (12 locations in
courses, rosters, and guardians)
- Add --topic filter for coursework and materials list commands
- Update docs/spec.md with new filter options
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>