From ad376e1c68d714233fd041afc24757d413702a45 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 25 Nov 2026 18:28:41 +0000 Subject: [PATCH 1/2] Release v1.44.0 Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_016GB34RWVbYYwb6ihVx6xzh --- .claude-plugin/plugin.json | 2 +- CLAUDE.md | 6 +++--- Makefile | 2 +- RELEASES.md | 21 +++++++++++++++++++++ cmd/skills_test.go | 8 ++++---- plugins/gws/.codex-plugin/plugin.json | 2 +- skills/auth/SKILL.md | 2 +- skills/calendar/SKILL.md | 2 +- skills/chat/SKILL.md | 2 +- skills/contacts/SKILL.md | 2 +- skills/docs/SKILL.md | 2 +- skills/drive/SKILL.md | 2 +- skills/events/SKILL.md | 2 +- skills/forms/SKILL.md | 2 +- skills/gmail/SKILL.md | 2 +- skills/groups/SKILL.md | 2 +- skills/gws-setup/SKILL.md | 2 +- skills/keep/SKILL.md | 2 +- skills/search/SKILL.md | 2 +- skills/sheets/SKILL.md | 2 +- skills/slides/SKILL.md | 2 +- skills/tasks/SKILL.md | 2 +- 22 files changed, 47 insertions(+), 26 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 346844aa..45d880a8 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "gws", - "version": "1.43.1", + "version": "1.44.0", "description": "Unofficial Google Workspace CLI skills (Gmail, Calendar, Drive, Docs, Sheets, Slides, Tasks, Chat, Forms, Contacts, Groups, Keep, Workspace Events, Search) and optional read-only session context hooks.", "author": { "name": "Omri Ariav", diff --git a/CLAUDE.md b/CLAUDE.md index bb9d4325..478621c9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,9 +17,9 @@ | Service | Commands | |---------|----------| -| `auth` | login, logout, status (OAuth default; `auth_mode` supports service-account-dwd and service-account-app) | +| `auth` | login (`--readonly`, `--add`), logout, status (OAuth default; `auth_mode` supports service-account-dwd and service-account-app; `GWS_ACCESS_TOKEN` supplies an external token) | | `gmail` | list, read, links, thread, send, reply, forward, labels, label, archive, trash, event-id, untrash, delete, batch-modify, batch-delete, trash-thread, untrash-thread, delete-thread, label-info, create-label, update-label, delete-label, drafts, draft, create-draft, update-draft, send-draft, delete-draft, attachment | -| `calendar` | list, events, create, update, delete, rsvp, get, quick-add, instances, move, get-calendar, create-calendar, update-calendar, delete-calendar, clear, subscribe, unsubscribe, calendar-info, update-subscription, acl, share, unshare, update-acl, freebusy, colors, settings | +| `calendar` | list, events, create, update, delete, rsvp, get, quick-add, instances, move, get-calendar, create-calendar, update-calendar, delete-calendar, clear, subscribe, unsubscribe, calendar-info, update-subscription, acl, share, unshare, update-acl, freebusy, suggest-time, colors, settings | | `tasks` | lists, list, list-info, create, create-list, update, update-list, delete-list, get, delete, complete, reopen, move, clear | | `drive` | list, search, info, download, upload, create-folder, move, delete, copy, convert, comments, approvals, approval, start-approval, approve, decline, reassign-approval, cancel-approval, comment-approval, permissions, share, unshare, permission, update-permission, revisions, revision, delete-revision, replies, reply, get-reply, delete-reply, comment, add-comment, delete-comment, resolve-comment, unresolve-comment, export, empty-trash, update, shared-drives, shared-drive, create-drive, delete-drive, update-drive, about, changes, activity | | `docs` | read, info, create, append, insert, replace, replace-content, delete, add-table, format, set-paragraph-style, add-list, remove-list, trash, add-tab, delete-tab, rename-tab, add-image, insert-table-row, delete-table-row, insert-table-col, delete-table-col, merge-cells, unmerge-cells, pin-rows, page-break, section-break, add-header, delete-header, add-footer, delete-footer, add-named-range, delete-named-range, add-footnote, delete-object, replace-image, replace-named-range, update-style, update-section-style, update-table-cell-style, update-table-col-properties, update-table-row-style | @@ -52,7 +52,7 @@ go run ./cmd/gws # or go run . ## Current Version -**v1.43.1** - Skill audit and version consistency: every source skill version now tracks the release version (enforced by test), with gws-events cross-references and service-account-app boundary clarifications in the chat and drive skills. +**v1.44.0** - Agent-safety release: least-privilege login (`auth login --readonly` / `--add`), external access tokens (`GWS_ACCESS_TOKEN`), `--schema` / `--show-scopes` introspection, an opt-in confirmation gate for sensitive commands (`GWS_CONFIRM_SENSITIVE`, `--yes`), `calendar suggest-time`, and OS-held locking for login state and token refresh. ## Roadmap diff --git a/Makefile b/Makefile index c774a75a..cc1af5de 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ PKG := ./cmd/gws BUILD_DIR := ./bin # Version info -VERSION ?= 1.43.1 +VERSION ?= 1.44.0 COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown") BUILD_DATE := $(shell date -u +"%Y-%m-%dT%H:%M:%SZ") LDFLAGS := -ldflags "-X github.com/omriariav/workspace-cli/cmd.Version=$(VERSION) \ diff --git a/RELEASES.md b/RELEASES.md index 1f4dc47d..bd7b86f0 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,5 +1,26 @@ # Releases +## v1.44.0 + +**Agent Safety: Least-Privilege Login, External Tokens, Introspection, Confirmation Gate, Suggest-Time** + +- **Least-privilege login** ([#225](https://github.com/omriariav/workspace-cli/issues/225)): `gws auth login --readonly` requests only read-only scopes, and `--add --services X` extends the stored authorization instead of replacing it (same account required; previously granted scopes are re-requested and verified). `gws auth status` reports per-service access (`full`, `readonly`, `partial`, `partial-readonly`). Insufficient-scope errors carry a hint naming the login that grants the missing access. +- **Introspection** ([#226](https://github.com/omriariav/workspace-cli/issues/226)): global `--schema` and `--show-scopes` print JSON describing a command (flags, subcommands, whether the confirmation gate covers it, the scopes `gws auth login` requests for its service) and exit without calling any API or needing credentials. +- **External access token** ([#227](https://github.com/omriariav/workspace-cli/issues/227)): `GWS_ACCESS_TOKEN` / `--access-token` supply an externally managed OAuth token, used as-is (no refresh, nothing stored). A supplied-but-empty token is an error, never a fallback to the stored login. While one is set, the Chat space-cache commands and `auth logout` refuse to run, `chat members` skips its name cache, and session hooks add no Workspace context. +- **Confirmation gate** ([#228](https://github.com/omriariav/workspace-cli/issues/228)): opt-in via `GWS_CONFIRM_SENSITIVE` / `confirm_sensitive`. Commands that send, share, delete or destroy data show the invocation and ask before running; `--yes` skips the prompt; without a terminal they fail with `confirmation required`. A setting that cannot be understood, or a config file that cannot be loaded, stops sensitive commands rather than switching the gate off. Off by default. +- **`gws calendar suggest-time`** ([#229](https://github.com/omriariav/workspace-cli/issues/229)): finds free meeting slots across calendars and attendees inside working hours. Unreadable calendars fail the command unless `--allow-partial` is given. +- **Token refresh and locking**: refreshes of the stored login are serialized across processes with an OS-held lock (`flock` / `LockFileEx`), including refresh-token rotation; older gws versions sharing the config directory are still excluded through the existing `.lock` file. An expired token is no longer refreshed when the lock cannot be taken (for example a read-only config directory): the command fails with a message saying so. +- **`gws auth logout`** returns `"revoked": true` only when Google confirmed the revocation, and `"revoked": false` with instructions otherwise. `gws auth status` reports a token Google rejects as not authenticated. +- **README**: retitled as the unofficial Go CLI for Google Workspace, with a comparison against Google's `gwscli` and `googleworkspace/cli` and a Disclaimer section. +- New direct dependencies `golang.org/x/term` and `golang.org/x/sys` (both already in the module graph). +- All of the above shipped in [#230](https://github.com/omriariav/workspace-cli/pull/230). + +**Upgrade notes** + +- A blank `GWS_ACCESS_TOKEN=` in a shell profile now makes every command fail until it is unset. +- With a malformed `config.yaml`, sensitive commands are refused until the file is fixed, `GWS_CONFIRM_SENSITIVE` is set, or `--yes` is given. +- Upgrade every gws binary that shares a config directory: the refresh guarantee holds only between copies of this version or later. + ## v1.43.1 **Skill Audit, Uniform Skill Versions, Canonical Release Procedure** diff --git a/cmd/skills_test.go b/cmd/skills_test.go index 04b34833..6208f4d4 100644 --- a/cmd/skills_test.go +++ b/cmd/skills_test.go @@ -215,8 +215,8 @@ func TestCodexPluginJSON_Valid(t *testing.T) { if name, ok := manifest["name"].(string); !ok || name != "gws" { t.Errorf("expected Codex plugin name 'gws', got '%v'", manifest["name"]) } - if version, ok := manifest["version"].(string); !ok || version != "1.43.1" { - t.Errorf("expected Codex plugin version '1.43.1', got '%v'", manifest["version"]) + if version, ok := manifest["version"].(string); !ok || version != "1.44.0" { + t.Errorf("expected Codex plugin version '1.44.0', got '%v'", manifest["version"]) } if skills, ok := manifest["skills"].(string); !ok || skills != "./skills/" { t.Errorf("expected Codex plugin skills path './skills/', got '%v'", manifest["skills"]) @@ -244,8 +244,8 @@ func TestPluginHookManifestsUseOneEntrypointPerEvent(t *testing.T) { if hooks, ok := claudePlugin["hooks"].(string); !ok || hooks != "./hooks/hooks.json" { t.Fatalf("Claude plugin hooks must reference ./hooks/hooks.json, got %v", claudePlugin["hooks"]) } - if version, ok := claudePlugin["version"].(string); !ok || version != "1.43.1" { - t.Fatalf("Claude plugin version must match the released 1.43.1 baseline, got %v", claudePlugin["version"]) + if version, ok := claudePlugin["version"].(string); !ok || version != "1.44.0" { + t.Fatalf("Claude plugin version must match the released 1.44.0 baseline, got %v", claudePlugin["version"]) } claudeHooksPath := filepath.Join("..", "hooks", "hooks.json") claudeData, err := os.ReadFile(claudeHooksPath) diff --git a/plugins/gws/.codex-plugin/plugin.json b/plugins/gws/.codex-plugin/plugin.json index 3fb73e45..0fd17391 100644 --- a/plugins/gws/.codex-plugin/plugin.json +++ b/plugins/gws/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "gws", - "version": "1.43.1", + "version": "1.44.0", "description": "Unofficial Google Workspace CLI skills for Codex. Teaches Codex how to use gws for Gmail, Calendar, Drive, Docs, Sheets, Slides, Tasks, Chat, Forms, Contacts, Groups, Keep, Workspace Events, and Search.", "author": { "name": "Omri Ariav", diff --git a/skills/auth/SKILL.md b/skills/auth/SKILL.md index 2042a36a..cfbf1afc 100644 --- a/skills/auth/SKILL.md +++ b/skills/auth/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-auth -version: 1.43.1 +version: 1.44.0 description: "Google Workspace CLI authentication setup and management. Use when users need to set up OAuth credentials, authenticate with Google APIs, or troubleshoot authentication issues. Triggers: gws auth, google workspace setup, oauth, credentials, client id, api setup." metadata: short-description: Google Workspace CLI authentication diff --git a/skills/calendar/SKILL.md b/skills/calendar/SKILL.md index a3162d07..fe3a2c7b 100644 --- a/skills/calendar/SKILL.md +++ b/skills/calendar/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-calendar -version: 1.43.1 +version: 1.44.0 description: "Google Calendar CLI operations via gws. Use when users need to list calendars, view events, create/update/delete events, RSVP to invitations, manage calendar CRUD, subscriptions, ACL, free/busy queries, colors, and settings. Triggers: calendar, events, meetings, schedule, rsvp, invite, share, freebusy." metadata: short-description: Google Calendar CLI operations diff --git a/skills/chat/SKILL.md b/skills/chat/SKILL.md index d1acd65f..35ec760f 100644 --- a/skills/chat/SKILL.md +++ b/skills/chat/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-chat -version: 1.43.1 +version: 1.44.0 description: "Google Chat CLI operations via gws. Use when users need to list/create/manage chat spaces, read/send messages, manage members, track read state, handle attachments, or monitor space events. Triggers: google chat, gchat, chat spaces, chat messages." metadata: short-description: Google Chat CLI operations diff --git a/skills/contacts/SKILL.md b/skills/contacts/SKILL.md index 7d2ae101..4a7ab5af 100644 --- a/skills/contacts/SKILL.md +++ b/skills/contacts/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-contacts -version: 1.43.1 +version: 1.44.0 description: "Google Contacts CLI operations via gws. Use when users need to list, search, view, create, or delete contacts. Triggers: contacts, google contacts, people api, contact management." metadata: short-description: Google Contacts CLI operations diff --git a/skills/docs/SKILL.md b/skills/docs/SKILL.md index 67e3dec1..e1c8e3ca 100644 --- a/skills/docs/SKILL.md +++ b/skills/docs/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-docs -version: 1.43.1 +version: 1.44.0 description: "Google Docs CLI operations via gws. Use when users need to read, create, or edit Google Docs documents. Triggers: google docs, document, gdoc, word processing." metadata: short-description: Google Docs CLI operations diff --git a/skills/drive/SKILL.md b/skills/drive/SKILL.md index 6feb9ddd..3d907f2a 100644 --- a/skills/drive/SKILL.md +++ b/skills/drive/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-drive -version: 1.43.1 +version: 1.44.0 description: "Google Drive CLI operations via gws. Use when users need to list, search, upload, download, manage files/folders, permissions, approvals, revisions, comments, shared drives, and more. Triggers: drive, files, upload, download, folders, google drive, file management, permissions, approvals, share, shared drives." metadata: short-description: Google Drive CLI operations diff --git a/skills/events/SKILL.md b/skills/events/SKILL.md index 409c7079..98da138a 100644 --- a/skills/events/SKILL.md +++ b/skills/events/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-events -version: 1.43.1 +version: 1.44.0 description: "Google Workspace Events API operations via gws. Use when users need to create or manage event subscriptions for Chat, Drive, or Meet resources (Pub/Sub delivery), renew or reactivate subscriptions, or decode Pub/Sub CloudEvent notifications. Triggers: workspace events, event subscription, subscribe to chat events, drive events, meet events, pubsub notifications, cloudevent." metadata: short-description: Google Workspace Events subscriptions diff --git a/skills/forms/SKILL.md b/skills/forms/SKILL.md index b48c44c8..d510a617 100644 --- a/skills/forms/SKILL.md +++ b/skills/forms/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-forms -version: 1.43.1 +version: 1.44.0 description: "Google Forms CLI operations via gws. Use when users need to get form metadata, retrieve form responses, create forms, or update forms. Triggers: google forms, form responses, survey, form data, create form, update form." metadata: short-description: Google Forms CLI operations diff --git a/skills/gmail/SKILL.md b/skills/gmail/SKILL.md index bc90b1b5..f434f850 100644 --- a/skills/gmail/SKILL.md +++ b/skills/gmail/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-gmail -version: 1.43.1 +version: 1.44.0 description: "Google Gmail CLI operations via gws. Use when users need to list emails, read messages, send email, manage labels, drafts, attachments, batch operations, or trash messages. Triggers: gmail, email, inbox, send email, mail, labels, archive, trash, drafts, attachments." metadata: short-description: Google Gmail CLI operations diff --git a/skills/groups/SKILL.md b/skills/groups/SKILL.md index 8c5553df..f06fe16a 100644 --- a/skills/groups/SKILL.md +++ b/skills/groups/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-groups -version: 1.43.1 +version: 1.44.0 description: "Google Groups CLI operations via gws. Use when users need to list groups or view group members. Triggers: groups, google groups, admin directory, group members." metadata: short-description: Google Groups CLI operations diff --git a/skills/gws-setup/SKILL.md b/skills/gws-setup/SKILL.md index c98a8709..3d56231e 100644 --- a/skills/gws-setup/SKILL.md +++ b/skills/gws-setup/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-setup -version: 1.43.1 +version: 1.44.0 description: "Safely inspect, preview, and explicitly configure optional GWS authentication and session-context hooks. Use for gws setup, gws hooks, time context, Workspace context, or hook configuration." metadata: short-description: Safe GWS hook setup diff --git a/skills/keep/SKILL.md b/skills/keep/SKILL.md index 56e899fd..58befe5b 100644 --- a/skills/keep/SKILL.md +++ b/skills/keep/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-keep -version: 1.43.1 +version: 1.44.0 description: "Google Keep CLI operations via gws. Use when users need to list, view, or create Google Keep notes. Triggers: keep, google keep, notes, sticky notes." metadata: short-description: Google Keep CLI operations diff --git a/skills/search/SKILL.md b/skills/search/SKILL.md index b7fdb6fa..309895a7 100644 --- a/skills/search/SKILL.md +++ b/skills/search/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-search -version: 1.43.1 +version: 1.44.0 description: "Google Custom Search CLI operations via gws. Use when users need to perform web searches using Google Programmable Search Engine. Triggers: google search, custom search, web search." metadata: short-description: Google Custom Search CLI operations diff --git a/skills/sheets/SKILL.md b/skills/sheets/SKILL.md index 60909df7..8bd927a3 100644 --- a/skills/sheets/SKILL.md +++ b/skills/sheets/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-sheets -version: 1.43.1 +version: 1.44.0 description: "Google Sheets CLI operations via gws. Use when users need to read, write, or manage Google Sheets spreadsheets including cell values, rows, columns, sheets, sorting, merging, formatting, and find-replace. Triggers: sheets, spreadsheet, google sheets, cells, rows, columns, formulas, formatting." metadata: short-description: Google Sheets CLI operations diff --git a/skills/slides/SKILL.md b/skills/slides/SKILL.md index e4636152..1033fefc 100644 --- a/skills/slides/SKILL.md +++ b/skills/slides/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-slides -version: 1.43.1 +version: 1.44.0 description: "Google Slides CLI operations via gws. Use when users need to create, read, or edit Google Slides presentations. Triggers: slides, presentation, google slides, deck." metadata: short-description: Google Slides CLI operations diff --git a/skills/tasks/SKILL.md b/skills/tasks/SKILL.md index 022874aa..aa48b6a7 100644 --- a/skills/tasks/SKILL.md +++ b/skills/tasks/SKILL.md @@ -1,6 +1,6 @@ --- name: gws-tasks -version: 1.43.1 +version: 1.44.0 description: "Google Tasks CLI operations via gws. Use when users need to manage task lists, view/create/update/delete tasks, move tasks, or clear completed. Triggers: google tasks, task list, todo, task management." metadata: short-description: Google Tasks CLI operations From 5ba418103263c1bb4f5355aee3f099caa1a6bdeb Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 25 Nov 2026 18:30:22 +0000 Subject: [PATCH 2/2] docs(releases): say which commands a blank GWS_ACCESS_TOKEN affects Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_016GB34RWVbYYwb6ihVx6xzh --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index bd7b86f0..8a6b3229 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -17,7 +17,7 @@ **Upgrade notes** -- A blank `GWS_ACCESS_TOKEN=` in a shell profile now makes every command fail until it is unset. +- A blank `GWS_ACCESS_TOKEN=` in a shell profile now makes commands fail with a "set but empty" error until it is unset. Not affected: `gws version`, shell completion, `--help`, and the `--schema` / `--show-scopes` introspection flags, which are answered before the check. - With a malformed `config.yaml`, sensitive commands are refused until the file is fixed, `GWS_CONFIRM_SENSITIVE` is set, or `--yes` is given. - Upgrade every gws binary that shares a config directory: the refresh guarantee holds only between copies of this version or later.