@genspark/cli 1.12.0 → 1.13.1

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 (67) hide show
  1. package/README.md +132 -5
  2. package/dist/client.d.ts +77 -2
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +379 -3
  5. package/dist/client.js.map +1 -1
  6. package/dist/commands/developer-preflight.d.ts +17 -0
  7. package/dist/commands/developer-preflight.d.ts.map +1 -0
  8. package/dist/commands/developer-preflight.js +131 -0
  9. package/dist/commands/developer-preflight.js.map +1 -0
  10. package/dist/commands/developer-project.d.ts +5 -0
  11. package/dist/commands/developer-project.d.ts.map +1 -0
  12. package/dist/commands/developer-project.js +140 -0
  13. package/dist/commands/developer-project.js.map +1 -0
  14. package/dist/commands/genspark-code-skills.d.ts +23 -0
  15. package/dist/commands/genspark-code-skills.d.ts.map +1 -0
  16. package/dist/commands/genspark-code-skills.js +49 -0
  17. package/dist/commands/genspark-code-skills.js.map +1 -0
  18. package/dist/commands/genteam-download.d.ts +34 -0
  19. package/dist/commands/genteam-download.d.ts.map +1 -0
  20. package/dist/commands/genteam-download.js +95 -0
  21. package/dist/commands/genteam-download.js.map +1 -0
  22. package/dist/commands/hosted-local.d.ts +10 -0
  23. package/dist/commands/hosted-local.d.ts.map +1 -0
  24. package/dist/commands/hosted-local.js +116 -0
  25. package/dist/commands/hosted-local.js.map +1 -0
  26. package/dist/commands/local-command-routing.d.ts +8 -0
  27. package/dist/commands/local-command-routing.d.ts.map +1 -0
  28. package/dist/commands/local-command-routing.js +33 -0
  29. package/dist/commands/local-command-routing.js.map +1 -0
  30. package/dist/commands/local-preview.d.ts +5 -0
  31. package/dist/commands/local-preview.d.ts.map +1 -0
  32. package/dist/commands/local-preview.js +35 -0
  33. package/dist/commands/local-preview.js.map +1 -0
  34. package/dist/config.d.ts +1 -1
  35. package/dist/config.d.ts.map +1 -1
  36. package/dist/config.js +1 -1
  37. package/dist/config.js.map +1 -1
  38. package/dist/developer-contract.d.ts +24 -0
  39. package/dist/developer-contract.d.ts.map +1 -0
  40. package/dist/developer-contract.js +64 -0
  41. package/dist/developer-contract.js.map +1 -0
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +358 -19
  44. package/dist/index.js.map +1 -1
  45. package/dist/local-source.d.ts +22 -0
  46. package/dist/local-source.d.ts.map +1 -0
  47. package/dist/local-source.js +204 -0
  48. package/dist/local-source.js.map +1 -0
  49. package/dist/project-binding.d.ts +31 -0
  50. package/dist/project-binding.d.ts.map +1 -0
  51. package/dist/project-binding.js +141 -0
  52. package/dist/project-binding.js.map +1 -0
  53. package/dist/types.d.ts +14 -0
  54. package/dist/types.d.ts.map +1 -1
  55. package/docs/skills.md +1 -1
  56. package/package.json +4 -2
  57. package/skills/gsk-aidrive/SKILL.md +94 -24
  58. package/skills/gsk-audio-generation/SKILL.md +1 -1
  59. package/skills/gsk-claw-share-link/SKILL.md +1 -1
  60. package/skills/gsk-genteam/SKILL.md +1 -1
  61. package/skills/gsk-google-calendar/SKILL.md +2 -1
  62. package/skills/gsk-meeting/SKILL.md +1 -0
  63. package/skills/gsk-outlook-calendar/SKILL.md +2 -1
  64. package/skills/gsk-sb-brain/SKILL.md +13 -82
  65. package/skills/gsk-second-brain/SKILL.md +179 -0
  66. package/skills/gsk-shared/SKILL.md +18 -0
  67. package/skills/gsk-slack/SKILL.md +8 -7
@@ -0,0 +1,179 @@
1
+ ---
2
+ name: gsk-second-brain
3
+ version: 0.2.0
4
+ description: "What the user's Second Brain is (Notes + Drive, theirs and their team's), where each kind of thing lives, how to read, write and edit it through `gsk sb-brain`, `gsk sb-git` and `gsk drive`, and how a document card in a GenTeam conversation is read. Read this before any Second Brain task; the per-command references (gsk-sb-brain, gsk-aidrive) hold the flags."
5
+ metadata:
6
+ category: foundation
7
+ requires:
8
+ bins:
9
+ - gsk
10
+ ---
11
+
12
+ # gsk-second-brain
13
+
14
+ **PREREQUISITE:** Read `../gsk-shared/SKILL.md` for auth, global flags, and security rules.
15
+
16
+ This skill is the map. It tells you what the Second Brain is, where things live, and which command reaches which part. Flags and actions live in the two command references it points to:
17
+
18
+ - `../gsk-sb-brain/SKILL.md` — reading Notes
19
+ - `../gsk-aidrive/SKILL.md` — reading and writing Drive
20
+
21
+ ## 1. What the Second Brain is
22
+
23
+ The user's Second Brain has two halves:
24
+
25
+ | Half | What it holds | Read with | Write with |
26
+ |---|---|---|---|
27
+ | **Notes** | What the user knew, wrote, received or decided: their notes and uploads, archived mail, meeting notes, Notion imports, past Genspark conversations, and the memory you keep about them | `gsk sb-brain` | `gsk sb-git commit` |
28
+ | **Drive** | Their files: documents, decks, sheets, PDFs, media, folders | `gsk drive` | `gsk drive` |
29
+
30
+ Both halves have a "mine" part and an "ours" part. Notes and **My Drive** are the user's own. **Team Drive** is their teams' — org drives, GenTeam channel and DM drives, Hub drives, knowledge drives. All of it is the Second Brain. Speak of team content as "your team's", never "your".
31
+
32
+ Route by **where a thing lives**, not by file type. A PDF the user uploaded into Notes is read through `sb-brain`; the same PDF sitting in My Drive is read through `gsk drive`.
33
+
34
+ ## 2. The Notes half
35
+
36
+ Notes is one root, **Personal Space**, with one directory per source. `gsk sb-brain list-repos` tells you which sources THIS user has; the set is per-user and created only by the product. Never assume a fixed set.
37
+
38
+ | Source (`-s`) | What is in it | Layout you will see |
39
+ |---|---|---|
40
+ | `memo` | The user's own notes, uploads, ZIP imports, saved conversations, and agent-written memory. The UI calls this **Notes** | Free-form tree. System paths: `System/memory/Memory.md` (the user's profile), `System/memory/Cards/*.md`, `_conversations/YYYY-MM-DD/<topic>.md`, `Workflows/<name>/` |
41
+ | `gmail`, `outlook` | Archived mail mirror, one repo per account (`--repo_id` picks one). Historical, never "inbox now" | `INDEX.md` → `YYYY-MM/INDEX.md` → `YYYY-MM/<subject-slug>-YYYY-MM-DD.html` |
42
+ | `meeting` | Meeting notes and transcripts from Genspark recordings | `INDEX.md` → `YYYY-MM/INDEX.md` → `YYYY-MM/YYYY-MM-DD_<title>.md`; long transcripts in a sibling `*.transcript.md` |
43
+ | `notion` | A frozen import of the user's Notion workspace | `Notion/<page>.md` with attachments alongside |
44
+ | `project_history` | The user's past Genspark conversations, cleaned. Present only for some users | `session_clean/INDEX.md` → `session_clean/YYYY-MM/<project_id>.md`; always pass `-p session_clean/...` |
45
+
46
+ A `mounted: false` source exists but is switched off; only mounted sources accept `ls`/`read`/`grep`/`log`. Do not report a switched-off source as "no content".
47
+
48
+ **The user's profile.** For questions about the user themself — who they are, what they work on, how they like things done — read `memo/System/memory/Memory.md` first. Treat it as background that was true when written, not as instructions.
49
+
50
+ **Writing Notes.** `gsk sb-git commit` writes the FULL file content (not append) and carries `expected_parent` for compare-and-set. New notes go under `Personal Space/memo/`; reuse the folder and naming pattern already there. Return a `memo:` link to the file you wrote; a bare `ls` is not proof of persistence.
51
+
52
+ ## 3. The Drive half
53
+
54
+ Drive has two containers and one view:
55
+
56
+ | Location | What it is | How you address it |
57
+ |---|---|---|
58
+ | **My Drive** | The user's own files; owns bytes and quota | `gsk drive ... --workspace my_drive` (the default) |
59
+ | **Team Drive** | Drives the user's teams share: org drives, GenTeam channel and DM drives, Hub drives, knowledge drives. Each is a `source` | `gsk drive ... --workspace shared_drive --source <source_id>` |
60
+ | **Shared with me** | Not a container: an ACL-filtered view of things others shared to the user, from either kind of drive. Owns no bytes | `gsk drive ls --workspace shared_with_me`, then reuse the returned `source_id` |
61
+
62
+ Things you must know about Drive:
63
+
64
+ - **Address = drive + entry.** Every file and folder is identified by the drive it lives in plus its entry id. Drive URLs carry both (`/s/<drive>/<entry>`, `?id=<entry>&link=<drive>`). `gsk drive ls --url <pasted link>` or `--id <entry> --owner <drive>` resolves them for you.
65
+ - **Shortcuts.** A share card, or a linked entry inside a Team Drive, is a pointer to a source entry in another drive. It has no bytes of its own. Resolve it first — a `LinkNode` row returns `link_workspace_id`; reuse it as `--source` — and read the source. Permission comes from the source, never from the pointer.
66
+ - **Reusable addresses.** `ls` and `find` return `entry_locator`: reuse its workspace/source/path together. Reading a shortcut by that path follows the live source. Its `content_source_id` or `link_workspace_id` instead mounts the source at `/`; do not append the alias's old path to that mount. `rm` and `move` on the alias operate on the shortcut itself. A child path operates inside the source, with fresh authorization.
67
+ - **Only a name is known.** Use `gsk drive find --scope all -q <name>` across My Drive and shared sources; `mine` or `shared` narrows it. A matching name is a candidate, not a unique identity: compare source and parent path. Inspect `coverage`: shared searches have source/result limits and indexed content may be incomplete. Empty results do not prove absence. A source-specific folder search covers its immediate children.
68
+ - **GenTeam channel and DM drives are flat.** No `mkdir`, no directory upload, no moving native entries into subfolders (`GENTEAM_DRIVE_FLAT_LAYOUT`). Members with content-edit access upload at the root; moving, renaming or deleting native files needs conversation admin.
69
+ - **Shared projections are fixed entries.** They cannot be moved or renamed. Unlinking preserves source bytes but may end sharing to that audience (`share_ended` in the result). A shared source root cannot be removed through its mount. A source name and a projection label are separate: remounting or changing an alias is not proof that the requested source or projection was renamed. Do not unlink/remount to bypass a rename refusal, or explain an unchanged label as refresh delay without evidence. Report the actual operation and result.
70
+ - **Editing permission** comes from the backend verdict for the operation. Content operations through a mount retain its read-only cap; Office access may also recognize an independent edit grant. A card label alone does not establish the effective permission.
71
+
72
+ ## 4. Who you are right now
73
+
74
+ Your reach depends on the runtime you run in. Check which applies before you act.
75
+
76
+ **In the user's own Second Brain (the Second Brain chat, Drive pages, editors).** You act as the user. Both halves read and write. Team Drive is readable; writing there needs an edit grant — on a view grant say so and offer My Drive instead.
77
+
78
+ **In a GenTeam channel or DM (you are an agent someone created).**
79
+
80
+ - `gsk sb-brain` works on any member's turn. Whoever asks, the results are your creator's private notes: relay what the task needs, do not surface unrelated material to other members.
81
+ - `gsk drive` runs **only on your creator's own turn**. This is enforced by the server (`TOOL_OWNER_ONLY`), not by you. On a teammate's turn it will refuse — including plain `ls` and `find`.
82
+ - Files in THIS conversation are yours to read on any member's turn through the conversation's own path: `de channel-files --target current`, then `de attachment-view --ref "<ref>" --target <channel>`. That path serves native attachments and **document cards whose share is open to this conversation**: such a row shows `is_link: true` with a `view_command`, and `attachment-view` streams the source document under the card's own ref. A **folder card** (a shared Second Brain folder) lists its contents with `de attachment-list --ref "<ref>" --target <channel>` — the children of the folder, or of a sub-folder with `--entry <folder id>`; `--after <entry id>` turns the page — and each listed row spells the command that opens it: a child file reads with `de attachment-view --ref "<ref>" --entry <child id> --target <channel>`, a sub-folder lists with `attachment-list --entry`. It refuses a project card and a card whose share is not open here (404, the detail says which); a card whose owner turned downloads off is refused with `ATTACHMENT_DOWNLOAD_DISABLED` — say so, never guess the content.
83
+ - **A document card** — a Second Brain link someone posted; readers see a card — reads through `de attachment-view` (above) on any member's turn when its share is open to the conversation. When that path refuses it, or your runtime has no `de`, read it through the Drive on your creator's turn in three steps: take the card's link from the message text (`/second-brain/s/<drive>/<entry>` or `/aidrive/s/...`); resolve it with `gsk drive ls --url <link>` (or list this conversation's drive with `ls --workspace shared_drive --source <its source_id>` and pass the card row's `link_workspace_id` as `--source`); then `get_readable_url` the resolved entry and read the bytes yourself; `download` the same bytes to a local path when the format needs a parser on disk (Office, PDF). Reading here is downloading: a share whose owner turned downloads off cannot be read either way — say so. A card whose target is a project (the row's `link_target_kind`) is read with `gsk read-project <link_target_id>`. A folder card is listed with `de attachment-list` (above) on any member's turn while its share is open to the conversation; traversing it through the Drive stays the creator-turn alternative. A DM card remains a reference requiring the reader's own source grant. Never substitute the creator's private access for a teammate's request or guess content from a card's name.
84
+ - When `gsk drive` refuses, say plainly that reading or writing the Drive from this conversation needs the creator to ask. Do not fall back to scanning chat for a substitute, and do not write a copy somewhere else.
85
+
86
+ ## 5. Reading
87
+
88
+ Decide where the thing lives, then use that door once:
89
+
90
+ | The user asks about... | Do this |
91
+ |---|---|
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
+ | 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 |
98
+ | 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
+ | 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
+ | An attachment in the current conversation | The conversation's own attachment path, not the Drive |
101
+ | Meaning-based search across their Drive documents | `gsk doc-search query -q <question>` when it is available to you. Today it covers My Drive only |
102
+
103
+ 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
+ ## 6. Writing
106
+
107
+ Decide WHERE before you write, in this order:
108
+
109
+ 1. **The turn is anchored** — a `[Page context: ...]` or `[Mentioned files: /My Drive/...]` note names a file, folder or drive. Write back to that surface. A derived piece lands as a sibling in the same folder.
110
+ 2. **The user named a destination** — "save it to my Drive", "put it in the team drive", a folder name. Do that. A Team Drive write needs an edit grant.
111
+ 3. **Otherwise Notes is the write home.** New notes go under `Personal Space/memo/`, filed like a secretary would: reuse the existing folder and naming pattern, Title Case with spaces.
112
+
113
+ Commands:
114
+
115
+ - Notes: `gsk sb-git commit` — full file content, `expected_parent` set.
116
+ - 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
+ - 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).
120
+
121
+ **The link you hand back.** For anything in Drive, the only link for people is the entry's share link:
122
+
123
+ ```
124
+ /second-brain/s/<drive>/<entry>
125
+ ```
126
+
127
+ 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
+
129
+ 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
+
131
+ **Handing a file to a GenTeam conversation.** Choose one delivery for each result, within the current turn's permissions:
132
+
133
+ - For a new local artifact or an explicitly requested export/copy: attach it once (`de message-send --target <channel> --attachment <local-path>`). It lands in the conversation's drive as a native file and everyone there can open it. This works on any member's turn for content you are authorized to read; it never bypasses creator-only Drive access.
134
+ - On your creator's turn, for a Drive entry that should stay one document: `gsk drive share --id <entry> --to channel:<server_id>:<channel_id>` opens it to the members and posts its card (`--post_card false` opens it without a message). `<server_id>` is the workspace id (`gsk genteam channels` lists it beside the slug) and `<channel_id>` the conversation id. A DM is a person, not a channel: the tool refuses `channel:` for a DM — share to that person by email instead.
135
+
136
+ After a successful share posts its card, delivery is complete: do not also attach the downloaded original or generated local file, upload it into the conversation, or send a second link-only message. A short completion summary can refer to the posted card. If card posting fails, report that separately from any successful access grant; use the returned share link once, without attaching a copy or repeating the grant. When editing an entry already shared here, update it in place and acknowledge the change; do not re-share or re-attach it by default. Only an explicit request for an additional export/copy calls for another attachment.
137
+
138
+ Never change an entry's `general_access` (`link`, `org`) to hand out a link. The share link opens for whoever already has access; widening access is the user's decision, never a delivery step.
139
+
140
+ **A new Office file.** A doc / Word / DOCX, a sheet / Excel / XLSX, or a deck the user wants as a file is a Drive file, not a project deliverable. Author the real file first (the `docx` / `xlsx` skill when your runtime packs them; a deck is built as web slides and exported with `gsk slide export <deck> -f pptx -o <deck>.pptx`; a PDF is a paginated web document published and exported with `gsk doc export <name> -f pdf -o <name>.pdf`), then `gsk drive upload --local_file <file> --upload_path /<name>.<ext> --on-conflict error` into the folder the write router above picked — the My Drive root when nothing anchors or names a place. Hand back the entry's link: the reply's `url`, or build it from the reply's `item.id`; when sending it to GenTeam, follow the single-delivery rule above. This first upload creates a new entry; it is never the edit path for an existing document. Never publish it to the project as a render card or a deliverable instead, and never write a note in its place; if the upload fails, say why.
141
+
142
+ ## 7. Editing an existing document
143
+
144
+ - **Every existing Office document** (`docx`, `xlsx`, `pptx`, in My Drive or shared): edit it through the `wo-peer` collaboration room on its source id. Never download, edit locally and overwrite it. An empty presence probe, a closed editor or `wo-peer close` does not make file replacement safe: room state can persist after users leave. Use the room for text, images, formatting, sheets and slides. If it is unavailable, return the proposed change as text and say the document was not updated.
145
+ - **A shared Office document:** when using Drive, resolve the source first; in GenTeam use the card route below. `get_readable_url` returns `collaboration.file_id` and `collaboration.link_workspace_id`; use `wo-peer open <file_id> --context <context>` (`--link-workspace-id` is an alias). This joins the native file's room and preserves the permission context for saving. A shortcut ID is not a room ID; an editor token is not proof that an edit was acknowledged or persisted.
146
+ - **In a GenTeam conversation** the room lane is `wo-peer` as well, on PATH when your creator is enabled for it (`gk_sb_collab_peer`): use `de channel-files` to get the card row's `link_target_id` as `<f_id>` (else the `<entry>` segment of its share link) and its `link_workspace_id`, then run `wo-peer open <f_id> --context <link_workspace_id>`. This card route does not require a creator-only `gsk drive` call. `wo-peer probe <f_id> --context <link_workspace_id>` is optional presence information, never a choice between room editing and overwrite. Omit `--context` only when the row shows none; `~/.gsk/skills/wo-peer/SKILL.md` has the GenTeam section. Two lanes, and the backend picks per call: on your creator's turn, any document your creator may edit; on a member's turn, only a card shared *editable* to this conversation — the room then acts as that member, with the authority they have in the browser. Every `wo-peer call` is re-checked for the current turn: `TOOL_OWNER_ONLY` means neither lane admits this turn (a teammate's turn on a document not shared editable here) — tell them, do not retry; "open under another person's authority" means run `open` again for this turn. Without `wo-peer` on PATH, existing Office files cannot be edited from here: say so and hand the change back as text in your reply.
147
+ - **A Markdown file in Drive:** there is no live co-editing through `wo-peer`. Do not apply an edit by replacing the whole file with an upload; return the proposed text and explain that it has not been applied. This does not change Notes writes through `sb-git` with `expected_parent`.
148
+ - **Replacing a standalone media or archive asset** (an image, audio/video file or ZIP): when the user explicitly asks to replace that exact asset, resolve its native source entry, record its id, and reuse that source's workspace/source/path with `gsk drive upload --local_file <replacement> --upload_path <resolved native path> --on-conflict overwrite`. This replaces the asset's bytes, subject to the existing write permissions and creator-turn gate. Never upload against a projection/alias path. Verify the returned `item.id` matches the original source id before claiming an in-place update; report a refusal or unexpected new id without retrying as a renamed copy. This lane excludes Office, Markdown, PDF and other documents; an image inside a document is edited through the document's room.
149
+ - **Anything you cannot edit:** say why — this turn is not authorized, view-only grant, no room in this runtime, no editor for this type. Never create a new copy in place of the update.
150
+
151
+ ## 8. When to open the brain
152
+
153
+ Most requests are self-contained; do not open the brain for them. Open it on one of three signals:
154
+
155
+ 1. **A memory question.** "Did I ever", "what did we decide about X", "what did <person> say", "find my notes on Y", "the deck I uploaded".
156
+ 2. **An explicit pointer.** The user says to check their notes, mail, meetings, files, Drive, or Second Brain.
157
+ 3. **An unresolved name.** A person, customer, project, file or term used as if you should know it, that the conversation does not explain.
158
+
159
+ Then one round: one focused `grep` (or one `find` for files) and one `read` of the best hit; answer only what it supports. Widen only when the user asks or pushes back on a negative, and keep the scope they gave ("search all my meetings" stays in `-s meeting`). A calculation, a rewrite of pasted text, or a public-web question never needs the brain. Your runtime's own prompt may ask for more on its surface — the Second Brain chat reads the user's `Memory.md` before answering anything about them — and it wins there.
160
+
161
+ ## 9. Known limits, as of 2026-09-18
162
+
163
+ - Drive Markdown has no live co-editing; whole-file upload can lose concurrent changes, so return proposed edits as text (§7).
164
+ - 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
+ - `upload` replies carry `url` and `item.id` since 2026-09-15; on an older runtime recover the id with `find`.
166
+ - `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.
168
+ - 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
+
170
+ Each line disappears as the platform closes it. If a limit below is gone, this skill is stale — say so.
171
+
172
+ ## Provenance
173
+
174
+ - 2026-08-26: a signed download URL handed out as "the link" read as "the link does not open". Rule: only the entry's share link (`/second-brain/s/<drive>/<entry>`) for people, never a download URL.
175
+ - 2026-09-08: an upload over an open shared docx failed; the agent read it as read-only and dropped a v0.5 copy in the root. Rule: open editor means the room; never a copy.
176
+ - 2026-09-15: a diary asked to be saved as a doc came back as a render_doc web page in the chat's project, with nothing in My Drive. Rule: a new Office file is a Drive upload, never a project deliverable.
177
+ - 2026-09-11: a GenTeam agent asked to edit a shared document wrote a new file instead. Rule: resolve the shortcut, check who you are, explain a refusal.
178
+ - 2026-09-17: asked what the document cards in a channel said, a GenTeam agent pointed `de attachment-view` at them and reported "share link, not a file". Since 2026-09-18 that path follows a card whose share is open to the conversation and names the reason when it refuses (not open here, a folder or project, downloads off). Rule: relay the refusal as given; fall back to the Drive read (§4) only where your runtime has `gsk`.
179
+ - 2026-09-17: asked for "a link I can open", an agent set the new file's `general_access` to `link`, then `org`. Rule: hand back the share link; never widen access to deliver it.
@@ -187,6 +187,24 @@ gsk init-skills -o ./docs/gsk-skills
187
187
  - `.claude/settings.json` — Claude Code context includes (when `--agent claude`)
188
188
  - `gemini-extension.json` — Gemini extension config (when `--agent gemini`)
189
189
 
190
+ ### init-genspark-code-skills
191
+
192
+ Fetch the genspark-code (code sandbox) skill documents into the current project for AI agent discovery. Covers the full developer-skill set a sandbox can install — web / Cloudflare / Flutter / Shopify / HTML5-game development, hosted deployment, and GitHub workflows. The bundle is served by the backend, so newly edited skill docs reach released CLIs without a package update.
193
+
194
+ ```bash
195
+ # Copy skills to .genspark-code/skills/
196
+ gsk init-genspark-code-skills
197
+
198
+ # Custom output directory
199
+ gsk init-genspark-code-skills -o ./docs/genspark-code-skills
200
+ ```
201
+
202
+ | Flag | Default | Description |
203
+ |------|---------|-------------|
204
+ | `-o, --out <dir>` | `.genspark-code/skills` | Output directory for skills |
205
+
206
+ A built-in whose requirement the caller doesn't satisfy — the org-only `gsk-hosted-org-member` for a non-member — is omitted, so an agent never sees docs for a capability the server would refuse. Unlike `init-skills`, this command does not generate or touch `CONTEXT.md`.
207
+
190
208
  ### AI Drive: local file upload
191
209
 
192
210
  The `gsk drive upload` command supports streaming local files directly to AI Drive via `--local_file`. This is a CLI-only feature (not in the backend API).
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: gsk-slack
3
3
  version: 1.0.0
4
- description: 'Slack messaging operations. Actions: send, search, read, lookup, react,
5
- upload, update, delete, permalink.'
4
+ description: 'Slack messaging operations. Actions: send, search, search_files, read,
5
+ download_file, lookup, react, upload, update, delete, permalink.'
6
6
  metadata:
7
7
  category: general
8
8
  requires:
@@ -17,7 +17,7 @@ metadata:
17
17
 
18
18
  > **Note:** a unified `gsk connector` flow is rolling out (see `../gsk-connector/SKILL.md`: `gsk connector tools <id>` / `gsk connector call <id> -t <tool>`) and may not be enabled for every account yet. THIS command remains fully supported — use it directly, and it stays the fallback whenever `gsk connector` is unavailable.
19
19
 
20
- Slack messaging operations. Actions: send, search, read, lookup, react, upload, update, delete, permalink.
20
+ Slack messaging operations. Actions: send, search, search_files, read, download_file, lookup, react, upload, update, delete, permalink.
21
21
 
22
22
  ## Usage
23
23
 
@@ -29,19 +29,20 @@ gsk slack [options]
29
29
 
30
30
  | Flag | Required | Description |
31
31
  |------|----------|-------------|
32
- | `<action>` (positional) | Yes | Action to perform. 'send': Send a message to a channel or user. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'search': Search messages by keyword; 'read': Read recent message history of a channel (or one thread), including each message's emoji reactions; 'lookup': Look up users, channels, or groups; 'react': Emoji-react to a message (or remove your reaction). Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'invite': Invite workspace members into a channel. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'upload': Upload a file into a channel, group, or DM. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'update': Edit one of the user's own messages. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'delete': Delete one of the user's own messages. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'permalink': Get the permanent link for a message (string, one of: send, search, read, lookup, react, invite, upload, update, delete, permalink) |
32
+ | `<action>` (positional) | Yes | Action to perform. 'send': Send a message to a channel or user. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'search': Search messages by keyword; 'search_files': Search files shared in Slack by keyword; each hit's id feeds download_file; 'read': Read recent message history of a channel (or one thread), including each message's emoji reactions and uploaded files; 'download_file': Download one file shared in Slack by its id; returns a file URL; 'lookup': Look up users, channels, or groups; 'react': Emoji-react to a message (or remove your reaction). Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'invite': Invite workspace members into a channel. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'upload': Upload a file into a channel, group, or DM. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'update': Edit one of the user's own messages. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'delete': Delete one of the user's own messages. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'permalink': Get the permanent link for a message (string, one of: send, search, search_files, read, download_file, lookup, react, invite, upload, update, delete, permalink) |
33
33
  | `--message` | No | [send] The message content to send. Supports Slack markdown formatting. To @mention someone, embed '<@USER_ID>' (e.g. '<@U01234567>') in the text — a plain '@Name' renders as literal text and notifies nobody. User IDs come from the lookup action. 'content' is accepted as an alias for this parameter. (string) |
34
34
  | `--recipient` | No | [send] Optional recipient: 'self' (default), channel ID (e.g., 'C01234567'), or user ID (e.g., 'U01234567'). If not specified, sends to yourself. (string) |
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
- | `--query` | No | [search] The search query. You can use modifiers like 'in:#channel', 'from:@user', 'has:link', 'before:yyyy-mm-dd'. (string) |
39
- | `--count` | No | [search] The maximum number of messages to return. Default is 100. (integer) |
40
- | `--sort` | No | [search] Sort order of results. 'score' for relevance or 'timestamp' for time. Default is 'score'. (string) |
38
+ | `--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
+ | `--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
+ | `--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) |
41
41
  | `--question` | No | [search] A specific question to answer based on the search results. (string) |
42
42
  | `--channel` | No | [read] Conversation ID (channel 'C…', private group 'G…', or DM 'D…') or a channel name (e.g. '#general' or 'general'). IDs come from the lookup action. \| [react] Conversation ID containing the message (channel 'C…', private group 'G…', or DM 'D…'). \| [invite] Conversation ID of the channel to invite into (public 'C…' or private group 'G…'). \| [upload] Target conversation ID (channel 'C…', private group 'G…', or DM 'D…') the file is shared into. \| [update] Conversation ID containing the message (channel 'C…', private group 'G…', or DM 'D…'). \| [delete] Conversation ID containing the message (channel 'C…', private group 'G…', or DM 'D…'). \| [permalink] Conversation ID containing the message (channel 'C…', private group 'G…', or DM 'D…'). (string) |
43
43
  | `--limit` | No | [read] Maximum messages to return (default 20, max 100). \| [lookup] Maximum number of results to return. Default: 50 (integer) |
44
44
  | `--cursor` | No | [read] Pagination cursor from a previous call's next_cursor to fetch older messages. (string) |
45
+ | `--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) |
45
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) |
46
47
  | `--search_query` | No | [lookup] Optional search query to filter results by name. Case-insensitive partial match on name, display name, or real name. (string) |
47
48
  | `--include_bots` | No | [lookup] Whether to include bot users in results. Default: false (boolean) |