@genspark/cli 1.13.1 → 1.14.0

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.
@@ -91,10 +91,11 @@ Decide where the thing lives, then use that door once:
91
91
  |---|---|
92
92
  | Something they knew, wrote, received or decided | `gsk sb-brain grep -q <short keyword>` across sources, or `-s <source>` when they named one. Then `read -s <hit.source> --repo_id <hit.repo_id> -p <hit.path>` the best hit. `grep` is a fixed string, case-insensitive; not a regex |
93
93
  | Themselves, their preferences, open loops | `read -s memo -p System/memory/Memory.md` first |
94
- | A file in My Drive | `gsk drive find -q <name>` (or `ls -p <folder>`), then `get_readable_url --id <entry>` and read the bytes yourself, or `download --id <entry> <local-path>` when a parser needs the file on disk (Office, PDF). `get_readable_url` is your read lane, never a link for people |
95
- | A file or folder in a Team Drive | `ls --workspace shared_drive` to see the drives, then `--source <source_id>` with `ls`/`find`/`get_readable_url` |
96
- | Something shared to them | `ls --workspace shared_with_me`, pick the row, reuse its `source_id` |
97
- | A pasted Drive link or share card | `gsk drive get_readable_url --url <link>` for files, `gsk drive ls --url <link>` for folders; the resolver follows live shortcuts |
94
+ | A known Drive file | `gsk drive read --id <entry>` or `read --path <path>`; preserve a selected `--source`. Discover only an unknown filename with `find --scope all -q <name>` |
95
+ | A topic inside a selected Drive folder | `gsk drive search --query <topic> --query_scope subtree` with the selected `--id`, `--path` or `--source` |
96
+ | A Drive folder's contents | `gsk drive tree` with the selected address; existing overviews help navigation |
97
+ | An unknown Team Drive or shared source | `ls --workspace shared_drive` or `ls --workspace shared_with_me`, then reuse its `source_id` with `read`/`search`/`tree` |
98
+ | A pasted Drive link or share card | `gsk drive read --url <link>` for files, `gsk drive tree --url <link>` for folders; the resolver follows live shortcuts |
98
99
  | A document card in a GenTeam conversation | `de attachment-view --ref "<the card row's attachment_ref>" --target <channel>` on any member's turn while its share is open to the conversation; when that refuses, the three steps in §4 on your creator's turn: the link from the message text, `gsk drive ls --url <link>`, then `get_readable_url` (or `download` for Office and PDF) |
99
100
  | A folder card in a GenTeam conversation | `de attachment-list --ref "<the card row's attachment_ref>" --target <channel>` lists its children (`--entry <folder id>` for a sub-folder, `--after <entry id>` for the next page); `de attachment-view --ref "<the card ref>" --entry <child id> --target <channel>` reads one child — both on any member's turn while its share is open to the conversation |
100
101
  | An attachment in the current conversation | The conversation's own attachment path, not the Drive |
@@ -102,6 +103,49 @@ Decide where the thing lives, then use that door once:
102
103
 
103
104
  Always `read` or fetch a file before quoting or acting on it. If nothing relevant comes back, try one variant (shorter prefix, nickname, the user's other language), then say what you covered. Conflicting sources: surface both with dates.
104
105
 
106
+ For a topical question, stop collecting once original evidence covers the
107
+ requested facts. Read another file or range to close a named gap or resolve a
108
+ conflict, not just for completeness. A request for a full-document summary still
109
+ requires every range. Do not expand the source root again after locating the
110
+ relevant files unless the evidence is insufficient.
111
+
112
+ Batch `read --ids` accepts at most **6 files**, sharing a **16 KB text budget**
113
+ (with response metadata bounded separately); `char_limit` is not a promise of
114
+ 24 KB per file or per batch. Use small batches and follow each file's own
115
+ `next_read`. Pass these limits and source identifiers to delegated readers too.
116
+
117
+ Choose the next evidence-gathering or editing step once and execute it. Revisit
118
+ the plan only when a result, constraint or user request changes it. Reuse facts,
119
+ file identifiers and guides already available in this conversation.
120
+ For an overview of a large folder, track which file groups support each topic
121
+ and fill uncovered groups before claiming complete coverage. Reading selected
122
+ concept summaries alone is sampling, not reading every file in the folder.
123
+
124
+ For Drive, follow `../gsk-aidrive/SKILL.md` for read ranges, search cursors and
125
+ coverage. Existing overview helps choose vocabulary and a starting folder; it
126
+ is not source evidence and must not exclude relevant sibling folders. Missing
127
+ or stale overview does not block search. Request up to 6 useful overviews with `--ids` per call; missing/stale summaries enqueue asynchronously. Continue search/read without polling. Use summaries to plan the next search/read, then read original text for exact facts or uncovered details. Folder summaries can use names and child summaries; they do not prove every descendant was read.
128
+ `coverage=complete`/`source_complete` describe the index; `contains_full_document`
129
+ describes this response. A full summary needs all ranges from offset 0: follow
130
+ the returned `next_read` fields as flags to `gsk drive read` until exhausted and
131
+ `source_complete` is true. On older servers, use `--id` with `next_offset` and
132
+ `source_version`; do not combine multi-file `--ids` with a shared offset.
133
+ Use `--char_limit`/`--limit`/`--byte_limit` to bound output; do not truncate JSON
134
+ with `head` and lose coverage or continuation. Context query results are directly
135
+ in `data`; `get_readable_url` uses `session_state.aidrive_result.readable_url`.
136
+ For `index_pending`, reuse `retry_read` as flags to `gsk drive read` once; it waits
137
+ within a bounded server budget, so do not add a shell sleep. Use `gsk --refresh`
138
+ for that retry the first time you see `wait_seconds`, so a cached CLI schema
139
+ recognizes the new flag. Older servers return
140
+ only `retry_after_seconds`: wait that interval and retry once. If still unavailable
141
+ or incomplete, use `get_readable_url --id <entry>` or `download` and an appropriate
142
+ parser, stating the actual coverage. Use `--id`, not restore's `--entry_id`.
143
+ If a new action/flag is rejected, retry once with `gsk --refresh`; an older server
144
+ may still need the byte-read fallback. Active Office content uses `wo-peer` (§7).
145
+ Permission refusals are not a reason to try another read lane.
146
+ Cite `[title](returned url)` verbatim for Drive evidence. Never prefix that
147
+ URL with `memo:`, which opens a vault note instead of the Drive source.
148
+
105
149
  ## 6. Writing
106
150
 
107
151
  Decide WHERE before you write, in this order:
@@ -115,8 +159,8 @@ Commands:
115
159
  - Notes: `gsk sb-git commit` — full file content, `expected_parent` set.
116
160
  - New My Drive files: `gsk drive upload --local_file <file> --upload_path <path> --on-conflict error`. Never keep the `/My Drive` spelling in the path; that literal would create a `My Drive/` folder. If the path exists, resolve whether the user meant that existing entry (§7) or a genuinely new file with a distinct name. Do not retry with overwrite or let automatic renaming turn an update into a duplicate.
117
161
  - Team Drive or a shared source: add `--workspace shared_drive|shared_with_me --source <source_id>`. The source drive owns the bytes and quota. GenTeam channel drives take files at the root only.
118
- - `upload` replies carry the new entry's `url` and `item.id`; you need the id for the link below. On an older runtime whose reply lacks them, `find -q <name>` in the destination to recover the id.
119
- - The `<drive>` part of a link: for My Drive it is the user's own id — `gsk me` returns it as `cogen_id`; run it once per session. For a Team Drive or shared source it is the `drive_id` on that source's row (the part of `source_id` before the colon).
162
+ - `upload` replies carry the new entry's `url` and `item.id`; return that URL directly. A `read` result's `url` is also ready to cite. Do not run `gsk me`, `find`, or reconstruct a link when the result already supplies its URL. Only on an older runtime whose reply lacks it, recover the id with `find -q <name>` in the destination.
163
+ - Only when a URL is missing, the `<drive>` part of a link is the user's own id for My Drive — reuse a known owner; otherwise `gsk me` returns it as `cogen_id`. For a Team Drive or shared source it is the `drive_id` on that source's row (the part of `source_id` before the colon).
120
164
 
121
165
  **The link you hand back.** For anything in Drive, the only link for people is the entry's share link:
122
166
 
@@ -126,6 +170,8 @@ Commands:
126
170
 
127
171
  When a `gsk drive` reply already carries one, hand that `url` back as it is: `share`, `access` and `link` replies print `Link: ...`, and shortcut rows in `ls`/`find` show one. It may start with `/aidrive/s/` instead of `/second-brain/s/` — the same landing for an account whose Second Brain drive surface is not rolled out yet; both forms open, so never rewrite one into the other. Build the link yourself only when no reply gave you one (a file you just uploaded, a `find` hit), from the `<drive>` rule above and the row's `id`.
128
172
 
173
+ A reply's `Open folder` / `browse_url` opens the containing folder by the same entry-link scheme; use it only when the user wants the folder. For an uploaded or read file, prefer its `Link` / `url`. Only the caller's Drive home uses a home-page URL. Do not reconstruct folder links with `?path=` or file links with `#p_fid=`.
174
+
129
175
  Never hand out a `get_readable_url` (a signed download that opens nothing), a `/aidrive/files/...` folder page, or an editor route (`/second-brain/doc?id=...` is an in-app destination, not a share link). For Notes, hand back the `memo:` link.
130
176
 
131
177
  **Handing a file to a GenTeam conversation.** Choose one delivery for each result, within the current turn's permissions:
@@ -164,7 +210,7 @@ Then one round: one focused `grep` (or one `find` for files) and one `read` of t
164
210
  - A PDF is produced by exporting a paginated web document (`gsk doc export -f pdf`) and uploading it; PDF content cannot be edited in place from an agent. `download_file --file_url` can import one.
165
211
  - `upload` replies carry `url` and `item.id` since 2026-09-15; on an older runtime recover the id with `find`.
166
212
  - `doc-search` indexes My Drive only. It is switched on for internal accounts only.
167
- - `gsk drive` has no verb that returns a file's content; reading is `get_readable_url` plus a fetch, and the source owner's download switch governs it. A view-only share with downloads off opens in the browser and not from an agent.
213
+ - `gsk drive read` returns persisted indexed text, not the live Office room. Pending or partial extraction is not complete evidence; use the reading guidance in §5. Byte downloads remain subject to the source owner's download policy.
168
214
  - In GenTeam, `gsk drive` is creator-turn only, DM roots are discoverable without granting access to referenced sources, and `wo-peer` is on PATH only when your creator is enabled for it (`gk_sb_collab_peer`) — without it, Office documents cannot be changed from there. Since 2026-09-18 a member's turn may change a card shared editable to the conversation through the room (the room acts as that member); everything else in the room stays creator-turn only. A document shared into a DM grants the person, not the conversation; the recipient finds it under `shared_with_me`.
169
215
 
170
216
  Each line disappears as the platform closes it. If a limit below is gone, this skill is stale — say so.
@@ -213,13 +213,15 @@ The `gsk drive upload` command supports streaming local files directly to AI Dri
213
213
  # Upload a local file to AI Drive (streaming, supports 100MB+ files)
214
214
  gsk drive upload --local_file ./report.pdf --upload_path /docs/report.pdf
215
215
  gsk drive upload --local_file ./photo.png # defaults to /photo.png
216
- gsk drive upload --local_file ./doc.pdf --upload_path /docs/doc.pdf --override
216
+ gsk drive upload --local_file ./doc.pdf --upload_path /docs/doc.pdf --overwrite true # edit in place: same id, same link
217
+ gsk drive upload --local_file ./report.pdf --upload_path /docs/report.pdf --to ann@example.com # upload and share; reply carries the link
217
218
  ```
218
219
 
219
220
  | Flag | Description |
220
221
  |------|-------------|
221
222
  | `--local_file <path>` | Local file path to upload (streaming, no size limit) |
222
- | `--override` | Overwrite existing file at the destination path |
223
+ | `--overwrite true` | Replace the existing file at the destination path in place; the file keeps its id and share link (`--override` is the older spelling) |
224
+ | `--to`, `--general_access` | Share the uploaded file right away (My Drive); the reply's `url` opens for those people |
223
225
 
224
226
  ## Connectors (integrations)
225
227
 
@@ -35,6 +35,7 @@ gsk slack [options]
35
35
  | `--title` | No | [send] Optional title for the message. If provided, creates a rich formatted message with a header. \| [upload] Optional title shown on the Slack file card. Defaults to the file name. (string) |
36
36
  | `--fields` | No | [send] Optional array of field objects with 'title' and 'value' keys to create a structured message layout. (array) |
37
37
  | `--thread_ts` | No | [send] Optional thread timestamp to reply in a thread. \| [read] Timestamp ('ts') of a thread's parent message. When set, returns that thread's replies instead of the channel timeline. \| [upload] Optional thread timestamp — share the file as a reply in this thread instead of the conversation root. (string) |
38
+ | `--workspace` | No | Optional. Which linked Slack workspace to act in: its team id (e.g. 'T0123ABCD') or its workspace name. Omit to use the default (most recently connected) workspace. The lookup action with lookup_type='workspaces' lists the choices. (string) |
38
39
  | `--query` | No | [search] The search query. You can use modifiers like 'in:#channel', 'from:@user', 'has:link', 'before:yyyy-mm-dd'. \| [search_files] Search terms; Slack modifiers such as 'in:#channel', 'from:@user', 'before:yyyy-mm-dd' are honored. (string) |
39
40
  | `--count` | No | [search] The maximum number of messages to return. Default is 100. \| [search_files] Maximum files to return (default 20, max 100). (integer) |
40
41
  | `--sort` | No | [search] Sort order of results. 'score' for relevance or 'timestamp' for time. Default is 'score'. \| [search_files] 'score' (relevance, default) or 'timestamp' (newest first). (string) |
@@ -43,7 +44,7 @@ gsk slack [options]
43
44
  | `--limit` | No | [read] Maximum messages to return (default 20, max 100). \| [lookup] Maximum number of results to return. Default: 50 (integer) |
44
45
  | `--cursor` | No | [read] Pagination cursor from a previous call's next_cursor to fetch older messages. (string) |
45
46
  | `--file_id` | No | [download_file] Slack file id (starts with 'F'), from a message's files list (read action) or a search_files hit. (string) |
46
- | `--lookup_type` | No | [lookup] What to look up: 'users' for team members, 'channels' for channels/conversations, 'all' for both. (string, one of: users, channels, all) |
47
+ | `--lookup_type` | No | [lookup] What to look up: 'users' for team members, 'channels' for channels/conversations, 'all' for both, 'workspaces' for the Slack workspaces linked to this account (their team_id feeds the 'workspace' parameter). (string, one of: users, channels, all, workspaces) |
47
48
  | `--search_query` | No | [lookup] Optional search query to filter results by name. Case-insensitive partial match on name, display name, or real name. (string) |
48
49
  | `--include_bots` | No | [lookup] Whether to include bot users in results. Default: false (boolean) |
49
50
  | `--timestamp` | No | [react] The message's 'ts' value (e.g. '1752600000.000100'). \| [update] The message's 'ts' value (e.g. '1752600000.000100'). Must be a message the connected user authored. \| [delete] The message's 'ts' value (e.g. '1752600000.000100'). Must be a message the connected user authored. \| [permalink] The message's 'ts' value (e.g. '1752600000.000100'). (string) |