gws-axi 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +52 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@ Agent-ergonomic CLI for Google Workspace — Gmail, Calendar, Docs, Drive, and S
4
4
 
5
5
  Designed for use by AI agents. Every response is structured, every error names a specific fix, and write operations lock to the explicit account when multiple are authenticated — so two agents in parallel sessions can't silently touch the wrong mailbox.
6
6
 
7
- > **Status (v0.3):** **Calendar is complete** — all 9 subcommands (5 reads + 4 writes) are implemented. Gmail, Docs, Drive, and Slides are scaffolded stubs that exercise auth + account resolution but return `NOT_IMPLEMENTED` on their concrete operations. Auth, doctor (with live per-account API probes), and multi-account management are stable.
7
+ > **Status:** Read coverage is in across all five services — Calendar, Gmail, Docs, Drive, and Slides — and Calendar has full write support (`create`, `update`, `delete`, `respond`). Gmail writes (`send`, `draft`, `modify`) and Docs writes (`append`, `insert-text`, `delete-range`) are the next frontier. Auth (including a single-developer `auth publish` walkthrough that retires the 7-day Testing-token expiry), doctor with live per-account API probes, and multi-account write-protection are stable.
8
8
 
9
9
  ## Requirements
10
10
 
@@ -84,7 +84,9 @@ Every subcommand supports `--help`. The bare `gws-axi` command prints current st
84
84
  ```bash
85
85
  gws-axi # home view — current state + suggestions
86
86
  gws-axi auth accounts # list authenticated Google accounts
87
- gws-axi auth login --account <email> # add another account (prepare + --wait)
87
+ gws-axi auth login --account <email> # add another account (blocks on callback)
88
+ gws-axi auth login --account <email> --no-wait # agent-friendly split: prepare now, run --wait separately
89
+ gws-axi auth publish # walk Testing → Production to retire 7-day token expiry
88
90
  gws-axi auth use <email> # set the default account
89
91
  gws-axi doctor # prerequisites + setup + live API probes
90
92
  ```
@@ -119,6 +121,51 @@ gws-axi calendar respond <event-id> --response accepted
119
121
 
120
122
  Writes default `--send-updates` to `none` so agent-created events don't spam attendees. Pass `--send-updates all` for production-style invite behavior.
121
123
 
124
+ ### Gmail
125
+
126
+ ```bash
127
+ gws-axi gmail search # in:inbox by default
128
+ gws-axi gmail search --query "from:alice has:attachment"
129
+ gws-axi gmail search --page <token> # paginate
130
+ gws-axi gmail read <thread-or-message-id> # whole thread, text/plain preferred
131
+ gws-axi gmail read <id> --message-only # just one message
132
+ gws-axi gmail read <id> --out ./thread.md # write the full thread to a markdown file
133
+ gws-axi gmail labels # list labels with IDs
134
+ gws-axi gmail download <message-id> <attachment-id> # fetch attachment bytes
135
+ ```
136
+
137
+ Bodies are decoded per declared `Content-Type` charset (UTF-8, latin-1, ascii, utf-16). HTML-only messages convert to markdown via turndown. Address headers parse with `addressparser` so display names with commas don't get split.
138
+
139
+ ### Docs
140
+
141
+ ```bash
142
+ gws-axi docs read <documentId> # full Doc as markdown
143
+ gws-axi docs read <documentId> --out ./doc.md # write to a file
144
+ gws-axi docs find <documentId> --query "deadline" # search inside one Doc
145
+ gws-axi docs comments <documentId> # threaded comments + suggestions
146
+ gws-axi docs download <documentId> --format pdf # native export (pdf, docx, odt, txt, html, epub, rtf)
147
+ ```
148
+
149
+ Non-native files (uploaded `.docx`, `.pdf`, etc.) get pointed at `docs download` automatically rather than failing with a cryptic Google API error.
150
+
151
+ ### Drive
152
+
153
+ ```bash
154
+ gws-axi drive ls # top of My Drive
155
+ gws-axi drive ls <folder-id> --recursive # depth-unbounded; bounded by --limit instead
156
+ gws-axi drive get <fileId> # metadata for one file
157
+ gws-axi drive search --query "name contains 'budget'"
158
+ gws-axi drive permissions <fileId> # who has access
159
+ ```
160
+
161
+ ### Slides
162
+
163
+ ```bash
164
+ gws-axi slides get <presentationId> # deck metadata + slide list
165
+ gws-axi slides page <presentationId> <slideId> # one slide's content
166
+ gws-axi slides summarize <presentationId> # all slides condensed to text per slide
167
+ ```
168
+
122
169
  ### Multi-account with write protection
123
170
 
124
171
  gws-axi supports multiple Google accounts under one OAuth client. When two or more are authenticated, write operations require `--account <email>` explicitly — silent wrong-account mutations are impossible:
@@ -151,9 +198,9 @@ help[2]:
151
198
 
152
199
  ## Known issues & roadmap
153
200
 
154
- - **Testing-mode tokens expire every 7 days.** Google's OAuth policy for unpublished apps. Re-run `gws-axi auth login --account <email>` + `auth login --wait` when it happens. A future `gws-axi auth publish` helper will walk single-developer verification to eliminate this.
155
- - **Gmail, Docs, Drive, Slides**: not yet implemented. Stubs exercise auth + account resolution so write-protection errors still surface correctly; actual operations return `NOT_IMPLEMENTED`. Gmail is next.
156
- - **Tests**: not yet — coming alongside Gmail.
201
+ - **Gmail writes** (`send`, `draft`, `modify`, label add/remove): scaffolded as `NOT_IMPLEMENTED`. Coming next.
202
+ - **Docs writes** (`append`, `insert-text`, `delete-range`, etc.): scaffolded as `NOT_IMPLEMENTED`. Coming alongside Gmail writes.
203
+ - **Testing-mode tokens** still expire every 7 days *if* you haven't published your OAuth app yet. Run `gws-axi auth publish` for the walkthrough — it covers the single-developer Production flow and removes the expiry once you've re-auth'd each account.
157
204
 
158
205
  ## Contributing
159
206
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gws-axi",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "AXI-compliant Google Workspace CLI — token-efficient TOON output, agent-guided auth setup, unified interface for Gmail, Calendar, Docs, Drive, Slides",
5
5
  "type": "module",
6
6
  "repository": {