Commit Graph

618 Commits

Author SHA1 Message Date
Peter Steinberger
56755e94ec
fix: remove stale classroom nolint 2026-05-05 08:55:21 +01:00
Peter Steinberger
c65c88304b
fix: satisfy lint after refactor 2026-05-05 08:52:50 +01:00
Peter Steinberger
917e4b98b4
refactor(cmd): split drive command modules 2026-05-05 08:49:02 +01:00
Peter Steinberger
ad59efba58
refactor(cmd): reuse paged list helper 2026-05-05 08:48:59 +01:00
Peter Steinberger
4a2a72fa4e
test(cmd): share google service fixtures 2026-05-05 08:48:54 +01:00
Peter Steinberger
20afed7f4b
refactor(cmd): share raw response helpers 2026-05-05 08:30:06 +01:00
Peter Steinberger
62a7257aba
feat(contacts): add dedupe preview (#555)
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>
2026-05-05 06:37:36 +01:00
Peter Steinberger
e9c496efd5
feat(drive): add read-only reporting commands (#554)
Co-authored-by: Rohan Patnaik <rohan-patnaik@users.noreply.github.com>
2026-05-05 05:36:55 +01:00
Peter Steinberger
e8e1ac4635
feat(gmail): export filters as WebUI XML (#553)
* feat(gmail): export filters as WebUI XML

* fix(gmail): satisfy filter export lint
2026-05-05 04:02:53 +01:00
Peter Steinberger
b836495775
feat(sheets): add conditional formatting and banding
Adds Google Sheets conditional formatting and alternating color banding commands, with force-guarded clears, docs, regression tests, and live Google smoke verification.\n\nCo-authored-by: gobang <50824182+codBang@users.noreply.github.com>
2026-05-05 02:14:13 +01:00
Peter Steinberger
aa7c0a2f90
feat(sheets): clear table data rows
Adds header-safe table data row clearing for Google Sheets tables, including --force enforcement, footer-skip range calculation, docs, tests, and live Google smoke verification.
2026-05-04 23:14:42 +01:00
Peter Steinberger
5d3b1c0980
feat(sheets): append table rows
Adds table-aware row appends for Google Sheets tables, including docs, generated command page, width validation, and live Google smoke verification.
2026-05-04 10:09:36 +01:00
Peter Steinberger
322695f78c
feat(sheets): add table basics
Adds Google Sheets table list/get/create/delete commands, local table column type validation, generated command docs, and a dedicated Sheets tables docs page.\n\nCo-authored-by: Pedro Henrique Gomes Venturott <27008096+Pedrohgv@users.noreply.github.com>
2026-05-04 09:41:02 +01:00
Peter Steinberger
b4d6f559c3
feat(docs): add rich text formatting commands 2026-05-04 08:28:38 +01:00
Peter Steinberger
7b288cc922
feat(raw): add lossless API dump commands
Co-authored-by: Ali Karbassi <ali@karbassi.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-04 07:55:15 +01:00
Peter Steinberger
33284f03bb
feat(gmail): add sanitized content reads
Co-authored-by: urasmutlu <urasmutlu@gmail.com>
2026-05-04 07:04:45 +01:00
Drew Burchfield
46900109e0
fix(safety): compile baked policy to code to resist binary tampering
Compile baked safety-profile policies into generated hash switches so the raw allow/deny rule strings are no longer embedded as a patchable YAML blob.

Verification before merge:
- `go test ./cmd/bake-safety-profile ./internal/safetyprofile ./internal/cmd`
- `make lint`
- `./build-safe.sh safety-profiles/agent-safe.yaml -o bin/gog-agent-safe-review`
- `./build-safe.sh safety-profiles/readonly.yaml -o bin/gog-readonly-review`
- runtime block checks for agent-safe and readonly baked binaries

Co-authored-by: drewburchfield <drewburchfield@gmail.com>
2026-05-04 05:55:05 +01:00
Peter Steinberger
6fd874075e
feat(calendar): add event ownership transfer 2026-05-04 05:50:28 +01:00
Peter Steinberger
c453cbd5a0
feat(calendar): add meet updates 2026-05-04 05:28:02 +01:00
Peter Steinberger
6867fe850c
feat(docs): add tab-aware editing fixes
Co-authored-by: Don Bowman <5131923+donbowman@users.noreply.github.com>
Co-authored-by: JoseLuis Vilar <13889217+chopenhauer@users.noreply.github.com>
2026-05-04 05:22:49 +01:00
Peter Steinberger
6af52a406b
fix(version): infer module version for source installs
Co-authored-by: Josh Avant <830519+joshavant@users.noreply.github.com>
2026-05-04 05:22:43 +01:00
Peter Steinberger
7ab00e691b
fix(calendar): accept events list selector forms 2026-05-04 05:22:39 +01:00
Peter Steinberger
f26af3adba
feat(safety): add baked safety profiles (#536)
* feat(safety): add baked safety profiles

Co-authored-by: Drew Burchfield <1084679+drewburchfield@users.noreply.github.com>

* fix(safety): narrow readonly profile parent allows

* fix(safety): verify basename safe-build outputs

* fix(backup): promote Gmail checkpoints into final manifest

* docs(safety): explain baked safety profiles

* feat(safety): filter profiled help and schema

* fix(safety): avoid help filter shadow warnings

* fix(backup): make plaintext export resilient

* docs(changelog): mention safety help filtering

* fix(backup): satisfy export lint checks

---------

Co-authored-by: Drew Burchfield <1084679+drewburchfield@users.noreply.github.com>
2026-04-29 03:35:18 +01:00
Peter Steinberger
e98f44d665
fix(tracking): rotate email tracking keys 2026-04-28 10:22:55 +01:00
Peter Steinberger
0a5d06e98b
fix(auth): tolerate unreadable file keyring tokens 2026-04-28 09:15:19 +01:00
Peter Steinberger
77a16d10ef
feat(gmail): append send-as signatures 2026-04-28 08:40:43 +01:00
Peter Steinberger
4d585b1680
fix(auth): guard manual auth token storage 2026-04-28 08:12:43 +01:00
Peter Steinberger
1eaad2556c
feat(backup): add markdown Gmail export 2026-04-28 07:29:27 +01:00
Peter Steinberger
539de113c1
fix(gmail): reject label slash collisions 2026-04-28 06:38:02 +01:00
Peter Steinberger
1763b3905f
fix(docs): harden tab export landing
Co-authored-by: Ben Lewis <johnbenjaminlewis@gmail.com>
2026-04-28 06:30:38 +01:00
Ben Lewis
26e01cfa97
feat(cli): add --tab flag for per-tab Google Doc export
Add experimental --tab flag to `gog docs export` and `gog drive download`
that exports a single tab from a Google Doc by title or ID. Uses the
undocumented per-tab Docs export endpoint with a custom redirect policy
that rejects non-Google redirects to detect auth failures early.

(cherry picked from commit 5a741be7ce0df13f75a10bc7a70df9fbab9475da)
2026-04-28 06:09:41 +01:00
Peter Steinberger
4bd3172aa1
test(gmail): cover nested label names 2026-04-28 05:32:25 +01:00
Peter Steinberger
8f6791f9f9
refactor(googleapi): expose authenticated HTTP client
Co-authored-by: Ben Lewis <johnbenjaminlewis@gmail.com>
2026-04-28 05:08:14 +01:00
Peter Steinberger
7ee069d88d
feat(backup): push gmail checkpoints asynchronously 2026-04-28 04:52:13 +01:00
Peter Steinberger
532601a0f1
fix(auth): preserve accounts across Google email renames 2026-04-28 04:01:06 +01:00
Peter Steinberger
d6111be738
fix(backup): split gmail checkpoints by plaintext size 2026-04-28 04:01:00 +01:00
Peter Steinberger
7b9197ebd1
feat(auth): add auth doctor diagnostics 2026-04-28 02:49:38 +01:00
Peter Steinberger
b58964cc89
fix(backup): shrink gmail checkpoint shards 2026-04-28 02:29:31 +01:00
Peter Steinberger
8e4f5acebb
fix(drive): support stdout downloads 2026-04-28 02:26:43 +01:00
Peter Steinberger
e30d870b3f
feat(contacts): export vCards
Co-authored-by: Dinakar Sarbada <dinakars777@users.noreply.github.com>
2026-04-28 02:01:07 +01:00
Peter Steinberger
9d7ca4ec5f
feat(backup): checkpoint long gmail fetches 2026-04-28 01:41:58 +01:00
Peter Steinberger
e6b6046bb1
fix(slides): harden text edit commands 2026-04-28 01:18:26 +01:00
Chris Sanchez
d047a0325f
feat(slides): add insert-text and replace-text commands
Thin wrappers around presentations.batchUpdate for surgical text edits on
an existing deck.

- insert-text inserts text into a page element by objectId, with
  --insertion-index, --replace (emits DeleteText+InsertText), and
  stdin support via '-'.
- replace-text runs ReplaceAllText across the deck, with --match-case
  and repeatable --page for slide-scoped replacements.

Both honor the global --dry-run (prints the batchUpdate request body as
JSON without calling the API) and --json (emits the full
BatchUpdatePresentationResponse). Plain output gives a one-line
confirmation with revisionId + replies/replaced count. Style mirrors
existing update-notes and replace-slide commands.
2026-04-28 01:10:16 +01:00
Peter Steinberger
0d93cb2a05
refactor(slides): share speaker notes helpers 2026-04-28 01:09:34 +01:00
Peter Steinberger
65db353926
fix(docs): format markdown append writes
Co-authored-by: Eric Liu <eric@ericxliu.me>
2026-04-27 23:36:18 +01:00
Peter Steinberger
6e0af2c463
test(gmail): cover html body-format search 2026-04-27 22:42:45 +01:00
Alex Hillman
d08771e66d
feat(gmail): add --body-format flag to messages search
Supports "text" (default, existing behavior) and "html" to prefer
the HTML MIME part over plaintext. Useful for newsletter ingestion
where the HTML body contains the rich formatted content.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit cb5499ed7b4d20a863de1aef07c58c94ecd9a9fe)
2026-04-27 22:38:57 +01:00
Peter Steinberger
617293d213
fix(docs): resolve tab titles before mutations 2026-04-27 22:32:31 +01:00
Sheng
80039c8071
feat(drive): add --drive and --parent flags to drive search
Users had no CLI-native way to scope a Drive search to a specific
shared drive or folder. Workarounds required either raw query syntax
(which only matches direct children) or direct API calls bypassing
gog entirely, defeating the purpose of the CLI.

This adds two new flags to 'drive search':

  --drive <driveId>    Scopes search to a specific shared drive using
                       corpora=drive&driveId=X. This is the Drive API's
                       proper pattern for within-drive recursive search.
                       Mutually exclusive with --no-all-drives.

  --parent <folderId>  Wraps the query with "'<folderId>' in parents"
                       to scope results to direct children of a folder
                       (matching 'drive ls --parent' semantics).
                       Mutually exclusive with --raw-query (users with
                       raw queries can include the clause themselves).

Implementation:
  * driveFilesListCallWithDriveSupport takes a new driveID argument;
    when non-empty it sets Corpora("drive").DriveId(X), overriding
    the generic Corpora("allDrives") path.
  * driveFileListOptions gains a driveID field.
  * DriveSearchCmd validates flag combinations up front.

Behavior change:
  * No-args search behavior unchanged — existing users see no change.
  * The sole caller of driveFilesListCallWithDriveSupport passes the
    new driveID from options, preserving current corpora=allDrives
    behavior by default.

Tests added:
  * TestDriveSearchCmd_WithDrive — verifies corpora=drive+driveId wire
  * TestDriveSearchCmd_WithParent — verifies query clause injection
  * TestDriveSearchCmd_DriveAndParent_Combine — verifies the common
    combo of scoping by shared drive + folder works together
  * TestDriveSearchCmd_DriveAndNoAllDrives_Conflicts
  * TestDriveSearchCmd_ParentAndRawQuery_Conflicts

(cherry picked from commit 581fbc9fc23a1f78d0773c6897ca84bdeb77dabc)
2026-04-27 22:24:18 +01:00
Ben Lewis
50f506dd3a
refactor(cli): deprecate --tab-id in favor of --tab
Rename the --tab-id flag to --tab on all docs editing commands (write,
update, insert, delete, find-replace) to match the convention already
used by cat, structure, sed, and the new export command. The old
--tab-id flag is preserved as a hidden alias that emits a deprecation
warning to stderr.

Also switches the internal helpers (docsTargetEndIndex,
loadDocsTargetDocument) from findTabByID to findTab so that --tab
resolves by title as well as ID. Removes the now-unused findTabByID.

(cherry picked from commit 50e69365539483b8b17f697d1391656b324a67af)
2026-04-27 22:24:18 +01:00