29 Commits

Author SHA1 Message Date
googleworkspace-bot 7ba65cf3a9 chore: release versions (#20) v0.2.0 2026-03-03 18:37:15 -07:00
Justin Poehnelt 90adcb4379 fix: harden URL encoding and input validation for AI/LLM callers (#21)
* refactor: replace manual urlencoded() with reqwest .query() builder

Remove duplicate hand-rolled urlencoded() functions from workflows.rs
and calendar.rs. All query parameters are now passed via reqwest's
.query() API, which handles percent-encoding correctly and completely.

* fix: percent-encode path parameters to prevent path traversal

Use percent_encoding::utf8_percent_encode for calendar_id, cal.id,
message_id, and file_id before interpolating into URL path segments.
Addresses code review feedback on security regression.

* fix: add shared URL safety helpers for path params

Add encode_path_segment() for single-segment IDs and
validate_resource_name() for multi-segment resource names.

encode_path_segment: percent-encodes all non-alphanumeric chars,
used for calendar IDs, file IDs, and message IDs.

validate_resource_name: rejects path traversal (..) and control
chars while preserving intentional / structure, used for Chat
space names, task list IDs, and subscription names. Returns clear
error messages for LLM callers.

* test: add AI edge case tests for URL safety helpers

Cover query/fragment injection, double-encoding, unicode, spaces,
path traversal via encoding, control chars (CR/tab), and clear
error message assertions for LLM callers.

* fix: warn on stderr when API calls fail silently

- Daily briefing calendar events fetch
- Daily briefing tasks fetch
- Daily summary calendar events fetch
- Daily summary unread email count fetch

Addresses PR review feedback about confusing silent failures,
especially for LLM callers that cannot see visual cues.

* fix: harden input validation for AI/LLM callers

- Add src/validate.rs with validate_safe_output_dir, validate_msg_format,
  and validate_safe_dir_path helpers
- Validate --output-dir against path traversal in gmail +watch and
  events +subscribe
- Validate --msg-format against allowlist in gmail +watch
- Validate --dir against path traversal in script +push
- Add clap value_parser constraint for --msg-format
- Document input validation patterns in AGENTS.md

Closes #23

* chore: add changesets for PR #21 commits

* test: add comprehensive test coverage for input validation handlers

* docs: document input validation and URL safety patterns in AGENTS.md and CONTRIBUTING.md

* fix: address PR review comments — reject ?/# in resource names, validate subscription arg, remove redundant validate_msg_format

* fix: store validated PathBuf, remove dead code, delete duplicate SubscribeConfig

Addresses review comments:
- Store validated PathBuf from validate_safe_output_dir instead of
  discarding it (output_dir is now Option<PathBuf>)
- Remove duplicate SubscribeConfig from events/mod.rs
- Delete unused validate_msg_format (clap value_parser handles this)
- Remove all #[allow(dead_code)] annotations

* fix: per-segment traversal check in validate_resource_name, fix docs

* fix: harden security validation and deduplicate logic

---------

Co-authored-by: jpoehnelt-bot <jpoehnelt-bot@users.noreply.github.com>
2026-03-03 18:36:41 -07:00
Justin Poehnelt 76643573b3 test: add test for missing error paths in load_client_config (#19) 2026-03-03 17:20:56 -07:00
Justin Poehnelt e71ce292b2 fix: Gemini extension installation issue and update docs (#16)
* Fix Gemini extension installation issue and update docs

- Removed redundant authentication settings from `gemini-extension.json`.
- Added Gemini extension installation section to `README.md`.
- Added Gemini agent rules of engagement to `CONTEXT.md`.
- Added a changeset file for the patch.

Co-authored-by: jpoehnelt <3392975+jpoehnelt@users.noreply.github.com>

* docs: simplify gemini part

Removed installation section and optimization tips for gws in the README.

* fix: remove template sanitization settings from config

Removed settings related to template sanitization.

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: jpoehnelt <3392975+jpoehnelt@users.noreply.github.com>
2026-03-03 15:03:32 -08:00
Justin Poehnelt c11d3c452d test: Add test for EncryptedTokenStorage::new (#17) 2026-03-03 15:03:10 -08:00
Justin Poehnelt b0d0b95d07 feat: skills expansion (#18)
* wip

* feat: replace admin recipes with 50 consumer-focused recipes

- Remove all admin/security/IT recipes (offboard-user, audit-user-login, etc.)
- Remove enterprise-only recipes (initiate-litigation-hold)
- Replace dangerous recipes (setup-email-forwarding -> create-gmail-filter)
- Remove recipes overlapping with gws-workflow-* helpers
- Remove thin 2-step recipes better served as helpers
- Add 50 curated consumer recipes for Gmail, Drive, Docs, Calendar, Sheets
- Update README: link to docs/skills.md, update skill count to 100+
- Fix clippy needless_borrow warnings in generate_skills.rs
- Fix lefthook.yml: run fmt/clippy sequentially (parallel causes races)

---------

Co-authored-by: jpoehnelt-bot <jpoehnelt-bot@users.noreply.github.com>
2026-03-03 15:02:34 -08:00
googleworkspace-bot 62868840b5 chore: release versions (#15) v0.1.5 2026-03-03 13:58:16 -07:00
Justin Poehnelt d29f41ecf7 fix(docs): improve README typography and spacing (#14)
* fix(docs): improve README typography and spacing

- Remove center alignment for tagline and badges to match left-aligned body
- Add `<br>` after badges for visual separation before install block
- Increase whitespace above install block to emphasize it
- Add an empty line above `> [!IMPORTANT]` block to decouple it from previous paragraph

Co-authored-by: jpoehnelt <3392975+jpoehnelt@users.noreply.github.com>

* Update README.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* docs: improve README typography and layout

- Remove center alignment from tagline and badges
- Add space below badges
- Adjust spacing around install code block (remove borders, add empty line above)
- Add empty line above IMPORTANT callout

Co-authored-by: jpoehnelt <3392975+jpoehnelt@users.noreply.github.com>

* docs: refine copy after install code block

- Change "When Google adds an API endpoint" to "When Google Workspace adds an API endpoint or method" to be more accurate.

Co-authored-by: jpoehnelt <3392975+jpoehnelt@users.noreply.github.com>

* docs: remove horizontal borders from README

Per user request, removed all remaining Markdown horizontal rules (`---`) throughout `README.md` to create a cleaner, borderless design. All previous typography and spacing improvements remain intact.

Co-authored-by: jpoehnelt <3392975+jpoehnelt@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: jpoehnelt <3392975+jpoehnelt@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-03 12:53:14 -08:00
googleworkspace-bot d93a621a74 chore: release versions (#12) v0.1.4 2026-03-03 12:15:04 -08:00
Justin Poehnelt d990dcc119 docs: make README banner full-width and add changeset (#13)
Co-authored-by: jpoehnelt-bot <jpoehnelt-bot@users.noreply.github.com>
2026-03-03 12:55:03 -07:00
Justin Poehnelt adb2cfa8dc fix: decrypt token cache before extracting refresh token (#11) 2026-03-03 11:49:55 -08:00
Justin Poehnelt a73ff26522 docs: improve readme 2026-03-03 11:59:56 -07:00
googleworkspace-bot 1f9a37871d chore: release versions (#10) v0.1.3 2026-03-03 11:14:56 -07:00
Justin Poehnelt c714f4b9c9 fix: use correct npm-scope/npm-package config keys for cargo-dist (#9)
* fix: use correct npm-scope/npm-package config keys for cargo-dist

* chore: add changeset

* docs: add changeset instructions to AGENTS.md
2026-03-03 11:13:33 -07:00
googleworkspace-bot 827b9da8a1 chore: release versions (#8) v0.1.2 2026-03-03 10:48:41 -07:00
Justin Poehnelt 3cd4d522b2 fix: sync Cargo.toml version with changesets (#7) 2026-03-03 09:46:45 -08:00
Justin Poehnelt fd99954627 fix: use custom tag-release script for private packages 2026-03-03 10:24:27 -07:00
googleworkspace-bot 86ceb2f822 chore: release versions (#6) v0.1.1 2026-03-03 09:21:46 -08:00
Justin Poehnelt 4d4cabeb16 ci: add concurrency controls to cancel stale PR runs 2026-03-03 10:13:44 -07:00
Justin Poehnelt 30d929b218 docs: fix gif, readme, etc (#5) 2026-03-03 09:11:29 -08:00
Justin Poehnelt 8ab58d670f ci: disable Windows Defender for cargo dirs 2026-03-03 10:10:40 -07:00
Justin Poehnelt ceacdbae09 ci: fix release 2026-03-03 10:07:42 -07:00
Justin Poehnelt a0ad08950d ci: speed up builds with rust-cache, sccache, and artifact reuse (#3) 2026-03-03 09:01:42 -08:00
Justin Poehnelt 4ed67adb64 ci: Configure custom npm registry URL and prevent its overwriting in the release workflow. 2026-03-03 09:32:50 -07:00
Justin Poehnelt db0016bbe5 ci: use npm registry 2026-03-02 22:21:12 -07:00
Justin Poehnelt 835335d85b fix: use changeset tag instead of publish, defer npm publishing to cargo-dist (#2)
* fix: use changeset tag instead of publish, defer npm publishing to cargo-dist

* fix: quote label names containing colons in labeler.yml

* chore: delete labeler
2026-03-02 16:49:37 -08:00
Justin Poehnelt 30484cec4d docs: Add development warning and update demo GIF link in README. 2026-03-02 17:32:15 -07:00
Justin Poehnelt f75bf6dcf7 feat: implement cli (#1) 2026-03-02 17:26:21 -07:00
Justin Poehnelt f6d850ceeb chore: init repo 2026-03-02 12:57:02 -07:00