@genspark/cli 1.11.2 → 1.12.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.
Files changed (40) hide show
  1. package/README.md +89 -25
  2. package/dist/client.d.ts +4 -0
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +7 -0
  5. package/dist/client.js.map +1 -1
  6. package/dist/commands/chat-events.d.ts +1 -1
  7. package/dist/commands/chat-events.js +1 -1
  8. package/dist/commands/pi-config.d.ts +30 -0
  9. package/dist/commands/pi-config.d.ts.map +1 -0
  10. package/dist/commands/pi-config.js +72 -0
  11. package/dist/commands/pi-config.js.map +1 -0
  12. package/dist/config.d.ts +1 -1
  13. package/dist/config.d.ts.map +1 -1
  14. package/dist/config.js +12 -1
  15. package/dist/config.js.map +1 -1
  16. package/dist/confirm.d.ts +59 -3
  17. package/dist/confirm.d.ts.map +1 -1
  18. package/dist/confirm.js +91 -11
  19. package/dist/confirm.js.map +1 -1
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +195 -14
  22. package/dist/index.js.map +1 -1
  23. package/dist/types.d.ts +7 -0
  24. package/dist/types.d.ts.map +1 -1
  25. package/docs/confirmation.md +113 -6
  26. package/docs/skills.md +3 -2
  27. package/package.json +1 -1
  28. package/skills/gsk-aidrive/SKILL.md +19 -3
  29. package/skills/gsk-genteam/SKILL.md +7 -8
  30. package/skills/gsk-gmail/SKILL.md +7 -7
  31. package/skills/gsk-google-calendar/SKILL.md +2 -4
  32. package/skills/gsk-google-chat/SKILL.md +2 -4
  33. package/skills/gsk-google-drive/SKILL.md +4 -2
  34. package/skills/gsk-microsoft-teams/SKILL.md +3 -7
  35. package/skills/gsk-onedrive/SKILL.md +4 -2
  36. package/skills/gsk-outlook-calendar/SKILL.md +2 -4
  37. package/skills/gsk-outlook-email/SKILL.md +7 -7
  38. package/skills/gsk-sb-brain/SKILL.md +130 -0
  39. package/skills/gsk-shared/SKILL.md +2 -0
  40. package/skills/gsk-slack/SKILL.md +4 -4
@@ -33,7 +33,7 @@ gsk outlook [options]
33
33
 
34
34
  | Flag | Required | Description |
35
35
  |------|----------|-------------|
36
- | `<action>` (positional) | Yes | Action to perform. 'search': Search emails by query; 'read': Read a specific email by ID; 'list_folders': List structured Outlook mail folders; 'create_folder': Create an Outlook mail folder. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes). Older CLIs require --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, and re-running the identical command executes.; 'list_rules': List Outlook inbox rules; 'create_rule': Create an Outlook inbox rule. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes). Older CLIs require --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, and re-running the identical command executes.; 'delete_rule': Delete an Outlook inbox rule. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes). Older CLIs require --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, and re-running the identical command executes.; 'list_emails': List structured emails with explicit body coverage; 'list_email_changes': List folder-scoped email upserts and tombstones with body coverage using a delta cursor; 'send': Compose and send an email. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes). Older CLIs require --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, and re-running the identical command executes.; 'draft': Save an email to the Drafts folder without sending; 'reply': Reply to an existing email. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes). Older CLIs require --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, and re-running the identical command executes.; 'reply_draft': Create a reply draft without sending; 'forward': Forward an email to new recipients. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes). Older CLIs require --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, and re-running the identical command executes.; 'delete': Delete an email. Auto-approved: executes on the FIRST call — no [y/N] prompt and no pending_confirmation step. Do NOT re-run the command; a second call performs the operation again (e.g. sends a duplicate message).; 'archive': Archive an email; 'move': Move an email to a different folder. Auto-approved: executes on the FIRST call — no [y/N] prompt and no pending_confirmation step. Do NOT re-run the command; a second call performs the operation again (e.g. sends a duplicate message).; 'mark_as_read': Mark an email as read or unread; 'add_category': Add a category to an email; 'remove_category': Remove a category from an email; 'get_attachment': Download an email attachment; 'group_list': List Microsoft 365 groups; 'group_search': Search group emails; 'group_read': Read a group email; 'group_reply': Reply to a group email (string, one of: search, read, list_folders, create_folder, list_rules, create_rule, delete_rule, list_emails, list_email_changes, send, draft, reply, reply_draft, forward, delete, archive, move, mark_as_read, add_category, remove_category, get_attachment, group_list, group_search, group_read, group_reply) |
36
+ | `<action>` (positional) | Yes | Action to perform. 'search': Search emails by query; 'read': Read a specific email by ID; 'list_folders': List structured Outlook mail folders; 'create_folder': Create an Outlook mail folder. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'list_rules': List Outlook inbox rules; 'create_rule': Create an Outlook inbox rule. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'delete_rule': Delete an Outlook inbox rule. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'list_emails': List structured emails with explicit body coverage; 'list_email_changes': List folder-scoped email upserts and tombstones with body coverage using a delta cursor; 'send': Compose and send an email. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'draft': Save an email to the Drafts folder without sending; 'reply': Reply to an existing email. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'reply_draft': Create a reply draft without sending; 'forward': Forward an email to new recipients. 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 an email. Auto-approved: executes on the FIRST call — no [y/N] prompt and no pending_confirmation step. Do NOT re-run the command; a second call performs the operation again (e.g. sends a duplicate message).; 'archive': Archive one or more emails (pass message_ids to archive a whole set in one call); 'move': Move an email to a different folder. Auto-approved: executes on the FIRST call — no [y/N] prompt and no pending_confirmation step. Do NOT re-run the command; a second call performs the operation again (e.g. sends a duplicate message).; 'mark_as_read': Mark an email as read or unread; 'add_category': Add a category to an email; 'remove_category': Remove a category from an email; 'get_attachment': Download an email attachment; 'group_list': List Microsoft 365 groups; 'group_search': Search group emails; 'group_read': Read a group email; 'group_reply': Reply to a group email (string, one of: search, read, list_folders, create_folder, list_rules, create_rule, delete_rule, list_emails, list_email_changes, send, draft, reply, reply_draft, forward, delete, archive, move, mark_as_read, add_category, remove_category, get_attachment, group_list, group_search, group_read, group_reply) |
37
37
  | `--queryString` | No | [search] The search query using KQL (Keyword Query Language). Examples: - Simple: 'project meeting' - From Sender: 'from:boss@example.com' - With Subject: 'subject:"Weekly Report"' - Unread Emails: 'isRead=false' - Has Attachments: 'hasAttachments=true' - Cc Recipient: 'cc:user@example.com' - Important: 'importance:high' - Complex: 'from:admin@co.com AND (subject:urgent OR body:critical)' Note: Use after_date/before_date params for date filtering (recommended), or use KQL syntax like 'received:2024-06-01..2024-06-30' in queryString. (string) |
38
38
  | `--after_date` | No | [search] Filter emails received on or after this date (inclusive). Format: YYYY-MM-DD (e.g., '2024-01-01'). Works for both enterprise and personal accounts. (string) |
39
39
  | `--before_date` | No | [search] Filter emails received before this date (exclusive). Format: YYYY-MM-DD (e.g., '2024-01-31'). Works for both enterprise and personal accounts. (string) |
@@ -73,23 +73,21 @@ gsk outlook [options]
73
73
  | `--bcc` | No | [send] Optional: A list of email addresses for BCC recipients. \| [draft] BCC recipient(s), comma-separated. \| [reply] Optional: A list of email addresses for BCC recipients. \| [reply_draft] Optional: A list of email addresses for BCC recipients. \| [forward] Optional: A list of email addresses for BCC recipients. (array) |
74
74
  | `--from_mailbox` | No | [send] Optional: The email address to send from (e.g., team@company.com). If not specified, the email will be sent from the current user's mailbox. Requires 'Mail.Send.Shared' permission for shared/group mailboxes. \| [reply] Optional: The email address to send the reply from (e.g., team@genspark.ai). If not specified, the reply will be sent from the current user's mailbox. Requires 'Mail.Send.Shared' permission for shared/group mailboxes. \| [reply_draft] Optional: The email address to create the draft from (e.g., team@genspark.ai). If not specified, the draft will be created in the current user's mailbox. Requires 'Mail.Send.Shared' permission for shared/group mailboxes. \| [forward] Optional: The email address to send from (e.g., team@genspark.ai). If not specified, forwards from the current user's mailbox. Requires 'Mail.Send.Shared' permission for shared/group mailboxes. (string) |
75
75
  | `--content_type` | No | [send] Content type of the body. Default: text/html (recommended) **CRITICAL**: body field format MUST match this parameter: - 'text/plain': body should be plain text - 'text/html': body MUST be valid HTML (not Markdown) Always convert Markdown to HTML before passing to this tool. \| [reply] Content type of the reply body. Default: text/html (recommended) **CRITICAL**: body field format MUST match this parameter: - 'text/plain': body should be plain text - 'text/html': body MUST be valid HTML (not Markdown) Always convert Markdown to HTML before passing to this tool. \| [forward] Content type of the body. Default: text/html \| [group_reply] The format of the content. Use 'text/plain' for plain text or 'text/html' for HTML content. Default is 'text/plain'. (string, one of: text/plain, text/html) |
76
- | `--skip_confirmation` | No | [send] If true, skip user confirmation and send immediately. Default is false (require confirmation before sending). \| [reply] If true, skip user confirmation and send immediately. Default is false (require confirmation before sending). \| [forward] If true, skip user confirmation and send immediately. Default is false (require confirmation before sending). \| [delete] If true, skip user confirmation and delete immediately. Default is false (require confirmation before deleting). \| [move] If true, skip user confirmation and move immediately. Default is false (require confirmation before moving). (boolean, default: `False`) |
77
- | `--auto_skip_confirmation` | No | [send] Set to true ONLY if the workflow step has [AUTO_SKIP_CONFIRMATION] marker. This indicates the node is configured to always skip confirmation. \| [reply] Set to true ONLY if the workflow step has [AUTO_SKIP_CONFIRMATION] marker. This indicates the node is configured to always skip confirmation. \| [forward] Set to true ONLY if the workflow step has [AUTO_SKIP_CONFIRMATION] marker. This indicates the node is configured to always skip confirmation. \| [delete] Set to true ONLY if the workflow step has [AUTO_SKIP_CONFIRMATION] marker. This indicates the node is configured to always skip confirmation. \| [move] Set to true ONLY if the workflow step has [AUTO_SKIP_CONFIRMATION] marker. This indicates the node is configured to always skip confirmation. (boolean, default: `False`) |
78
76
  | `--client_send_id` | No | [send] Optional stable idempotency key. Normally generated automatically for scheduled and interactive sends. (string) |
79
77
  | `--force_resend` | No | [send] Set true only when the user explicitly wants another copy of an otherwise identical email. This bypasses the 10-minute interactive-send deduplication window. (boolean, default: `False`) |
80
78
  | `--attachments` | No | [send] Optional file attachments. Each item is either a local file path (read inline by the gsk CLI — the bytes ride in the request body as base64 and are not persisted to blob storage) or an already-hosted URL (file-wrapper URL or other public https). Files are delivered as real email attachments (not links): inline base64 for items ≤3 MB, Microsoft Graph upload session for larger Outlook attachments. CLI alias: --attach / --attachment (repeatable). CLI inline cap: 5 MiB per local file — larger files must be uploaded via 'gsk upload' first and passed as a URL. Per-message raw-payload cap: 18 MiB for Gmail (Gmail's 25 MB send cap is on the base64-encoded RFC 822 message; 18 MiB raw leaves headroom for ~33% encoding overhead) and 150 MB for Outlook (via Graph upload session). \| [draft] Optional file attachments. Each item is either a local file path (read inline by the gsk CLI — the bytes ride in the request body as base64 and are not persisted to blob storage) or an already-hosted URL (file-wrapper URL or other public https). Files are delivered as real email attachments (not links): inline base64 for items ≤3 MB, Microsoft Graph upload session for larger Outlook attachments. CLI alias: --attach / --attachment (repeatable). CLI inline cap: 5 MiB per local file — larger files must be uploaded via 'gsk upload' first and passed as a URL. Per-message raw-payload cap: 18 MiB for Gmail (Gmail's 25 MB send cap is on the base64-encoded RFC 822 message; 18 MiB raw leaves headroom for ~33% encoding overhead) and 150 MB for Outlook (via Graph upload session). \| [reply] Optional file attachments. Each item is either a local file path (read inline by the gsk CLI — the bytes ride in the request body as base64 and are not persisted to blob storage) or an already-hosted URL (file-wrapper URL or other public https). Files are delivered as real email attachments (not links): inline base64 for items ≤3 MB, Microsoft Graph upload session for larger Outlook attachments. CLI alias: --attach / --attachment (repeatable). CLI inline cap: 5 MiB per local file — larger files must be uploaded via 'gsk upload' first and passed as a URL. Per-message raw-payload cap: 18 MiB for Gmail (Gmail's 25 MB send cap is on the base64-encoded RFC 822 message; 18 MiB raw leaves headroom for ~33% encoding overhead) and 150 MB for Outlook (via Graph upload session). \| [reply_draft] Optional file attachments. Each item is either a local file path (read inline by the gsk CLI — the bytes ride in the request body as base64 and are not persisted to blob storage) or an already-hosted URL (file-wrapper URL or other public https). Files are delivered as real email attachments (not links): inline base64 for items ≤3 MB, Microsoft Graph upload session for larger Outlook attachments. CLI alias: --attach / --attachment (repeatable). CLI inline cap: 5 MiB per local file — larger files must be uploaded via 'gsk upload' first and passed as a URL. Per-message raw-payload cap: 18 MiB for Gmail (Gmail's 25 MB send cap is on the base64-encoded RFC 822 message; 18 MiB raw leaves headroom for ~33% encoding overhead) and 150 MB for Outlook (via Graph upload session). \| [forward] Optional file attachments. Each item is either a local file path (read inline by the gsk CLI — the bytes ride in the request body as base64 and are not persisted to blob storage) or an already-hosted URL (file-wrapper URL or other public https). Files are delivered as real email attachments (not links): inline base64 for items ≤3 MB, Microsoft Graph upload session for larger Outlook attachments. CLI alias: --attach / --attachment (repeatable). CLI inline cap: 5 MiB per local file — larger files must be uploaded via 'gsk upload' first and passed as a URL. Per-message raw-payload cap: 18 MiB for Gmail (Gmail's 25 MB send cap is on the base64-encoded RFC 822 message; 18 MiB raw leaves headroom for ~33% encoding overhead) and 150 MB for Outlook (via Graph upload session). \| [group_reply] Optional file attachments. Each item is either a local file path (read inline by the gsk CLI — the bytes ride in the request body as base64 and are not persisted to blob storage) or an already-hosted URL (file-wrapper URL or other public https). Files are delivered as real email attachments (not links): inline base64 for items ≤3 MB, Microsoft Graph upload session for larger Outlook attachments. CLI alias: --attach / --attachment (repeatable). CLI inline cap: 5 MiB per local file — larger files must be uploaded via 'gsk upload' first and passed as a URL. Per-message raw-payload cap: 18 MiB for Gmail (Gmail's 25 MB send cap is on the base64-encoded RFC 822 message; 18 MiB raw leaves headroom for ~33% encoding overhead) and 150 MB for Outlook (via Graph upload session). (array) |
81
79
  | `--body_type` | No | [draft] Body format: 'html' (default) or 'text'. (string) |
82
80
  | `--from_address` | No | [draft] Optional 'From:' identity to send AS — Gmail verified alias, Outlook proxyAddress / mail-enabled group, or a granted SendAs / on-behalf address. Must be an address the from-account is authorized to send as (see 'send_as' on /api/ai-inbox/mailbox/accounts). For Gmail this becomes the draft's MIME 'From:' header; for Outlook the saved draft stays as the from-account and the alias is applied by the eventual send call. (string) |
83
81
  | `--prompt` | No | [draft] Optional instruction describing the email to write, in the sender's own voice using their Email Brain (persona plus their handling and writing rules) — e.g. 'ask Ana to move the review to Friday, apologize for the short notice'. Use INSTEAD of 'body' to have the body written for you, or TOGETHER WITH 'body' to revise that text per the instruction (everything the instruction does not ask to change is preserved). Recipients and attachments are never inferred from the instruction — pass them explicitly. Omit to commit 'body' exactly as given. (string) |
84
- | `--message_id` | No | [reply] The Outlook message ID to reply to. \| [forward] The Outlook message ID to forward. \| [delete] The Outlook message ID to delete \| [archive] The Outlook message ID to archive \| [move] The Outlook message ID to move \| [mark_as_read] (Deprecated, use message_ids) A single Outlook message ID to mark \| [add_category] The Outlook message ID to add category to \| [remove_category] The Outlook message ID to remove category from \| [get_attachment] The Outlook message ID containing the attachment (string) |
82
+ | `--message_id` | No | [reply] The Outlook message ID to reply to. \| [forward] The Outlook message ID to forward. \| [delete] The Outlook message ID to delete \| [archive] (Deprecated, use message_ids) A single Outlook message ID to archive \| [move] The Outlook message ID to move \| [mark_as_read] (Deprecated, use message_ids) A single Outlook message ID to mark \| [add_category] The Outlook message ID to add category to \| [remove_category] The Outlook message ID to remove category from \| [get_attachment] The Outlook message ID containing the attachment (string) |
85
83
  | `--reply_all` | No | [reply] Optional: If true (default), reply to all original recipients (TO and CC). If false, reply only to the original sender. (boolean, default: `True`) |
86
84
  | `--include_original` | No | [reply] Optional: Whether to include the original email content as a quote in the reply. Defaults to true. \| [reply_draft] Optional: Whether to include the original email content as a quote in the draft. Defaults to true. \| [forward] Whether to append the original message as a Gmail-style '---------- Forwarded message ----------' quoted block under the forwarder's note so the recipient sees the original verbatim. Default: true. Set to false only when the caller already embedded their own forwarded block in `body` (e.g. the `.genmail` editor send path). (boolean, default: `True`) |
87
85
  | `--original_email_id` | No | [reply_draft] The ID of the original email to reply to. Required to create a proper reply draft with quoted content. (string) |
88
86
  | `--reply_type` | No | [reply_draft] Type of reply: 'reply' sends only to the original sender, 'reply_all' sends to all recipients of the original email. Default: 'reply_all'. Used to determine default recipients if 'to'/'cc' are not provided. (string, one of: reply, reply_all) |
89
87
  | `--include_attachments` | No | [forward] Whether to include original email attachments in the forward. Default: true (boolean, default: `True`) |
90
88
  | `--permanent` | No | [delete] Whether to permanently delete the message. Default: false (move to Deleted Items) (boolean) |
89
+ | `--message_ids` | No | [archive] The Outlook message ID(s) to archive. Can be a single ID string or an array of IDs. \| [mark_as_read] The Outlook message ID(s) to mark. Can be a single ID string or an array of IDs. |
91
90
  | `--create_if_not_exists` | No | [move] Whether to create the folder if it doesn't exist. Default: true (boolean) |
92
- | `--message_ids` | No | [mark_as_read] The Outlook message ID(s) to mark. Can be a single ID string or an array of IDs. |
93
91
  | `--is_read` | No | [mark_as_read] Set to true to mark as read, false to mark as unread. Default: true (boolean) |
94
92
  | `--category_name` | No | [add_category] The category name to add. Common categories include: Red category, Orange category, Yellow category, Green category, Blue category, Purple category \| [remove_category] The category name to remove (string) |
95
93
  | `--filename` | No | [get_attachment] The filename of the attachment to retrieve. Use '*' to get all attachments. (string) |
@@ -105,9 +103,11 @@ gsk outlook [options]
105
103
 
106
104
  ## Write Confirmation
107
105
 
108
- Confirmation-gated actions: `create_folder`, `create_rule`, `delete_rule`, `send`, `reply`, `forward` (plus write methods through `api` where present). A CLI with client-side confirmation prompts `[y/N]` (or honors `--yes`) and executes in a single call; the rest of this section is the double-call contract for older CLIs. Completing that confirmation REQUIRES a persistent project: pass `--project-id <id>` or set `GSK_PROJECT_ID` on both calls. Without one, a gated call fails immediately with `confirmation_requires_project` instead of an uncompletable pending. A response carrying `status: "pending_confirmation"` (or a similar needs-confirmation payload) is NOT a failure — it executes nothing and summarizes what would happen. To complete the write, re-run the IDENTICAL command (same project id): the pending record (15-minute TTL) is matched and the operation executes; success clears the record (a further identical call pends again) and a failed execution keeps it, so the retry arc stays open. Where the Flags table lists `--skip_confirmation` for an action, passing `--skip_confirmation true` is honored on the CLI and executes in one call; gated actions without that flag complete ONLY via the double-call.
106
+ Confirmation-gated actions: `create_folder`, `create_rule`, `delete_rule`, `send`, `reply`, `forward`. The CLI shows a preview and asks `[y/N]` on stderr before the single server call; pass `--yes` (`-y`) for unattended runs. `--no-input` (or `--args-file -`, which consumes stdin) makes a gated call exit 2 with no server call instead of hanging. Never re-run a command to 'confirm' it — every call is a real execution. `--skip_confirmation true` / `--auto_skip_confirmation` are deprecated on this CLI (still accepted, warn on stderr): use `--yes`.
109
107
 
110
- Auto-approved actions: `delete`, `move` — the server skips the confirmation gate, so the operation executes on the FIRST call with no `[y/N]` prompt and no `pending_confirmation` step. Do NOT re-run the command expecting a confirmation arc: a second call performs the operation again (e.g. sends a duplicate message).
108
+ Interactive-only actions: `create_folder`, `create_rule`, `delete_rule` (the action excludes the skip params, e.g. Marketplace policy on Slack) — `--yes` is ignored and a real `[y/N]` answer is required.
109
+
110
+ Auto-approved actions: `delete`, `move` — the server skips the confirmation gate, so the operation executes on the FIRST call with no `[y/N]` prompt and no confirmation step. Do NOT re-run the command expecting a confirmation arc: a second call performs the operation again (e.g. sends a duplicate message).
111
111
 
112
112
  ## See Also
113
113
 
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: gsk-sb-brain
3
+ version: 1.0.0
4
+ description: 'Unified read-only access to the user''s Second Brain — notes, emails,
5
+ meetings, and connected knowledge sources. Identify repos by source name (memo,
6
+ gmail, outlook, meeting, notion) instead of repo IDs. Actions: list-repos, ls, read,
7
+ grep, log. Typical flow: list-repos → see available sources; grep -q <pattern> →
8
+ search across all sources (or -s <source> for one); read -s <hit.source> --repo_id
9
+ <hit.repo_id> -p <hit.path> → open the exact file a grep or ls hit returned. list-repos
10
+ also returns a content description and physical clone URL for each visible source.
11
+ Read-only; does not modify files.'
12
+ metadata:
13
+ category: general
14
+ requires:
15
+ bins:
16
+ - gsk
17
+ cliHelp: gsk sb-brain --help
18
+ ---
19
+
20
+ # gsk-sb-brain
21
+
22
+ **PREREQUISITE:** Read `../gsk-shared/SKILL.md` for auth, global flags, and security rules.
23
+
24
+ Unified read-only access to the user's Second Brain — notes, emails, meetings, and connected knowledge sources. Identify repos by source name (memo, gmail, outlook, meeting, notion) instead of repo IDs. Actions: list-repos, ls, read, grep, log. Typical flow: list-repos → see available sources; grep -q <pattern> → search across all sources (or -s <source> for one); read -s <hit.source> --repo_id <hit.repo_id> -p <hit.path> → open the exact file a grep or ls hit returned. list-repos also returns a content description and physical clone URL for each visible source. Read-only; does not modify files.
25
+
26
+ ## Usage
27
+
28
+ ```bash
29
+ gsk sb-brain [options]
30
+ ```
31
+
32
+ ## What the Second Brain is
33
+
34
+ The user's **Second Brain** is their durable, cross-session memory on Genspark. It is one brain behind several doors, and `gsk sb-brain` opens exactly one of them. This document is the default guidance; when the product you run in states its own rules for sources, triggers, retries, citation format, or disclosure, those rules win.
35
+
36
+ | Door | What is behind it | How you reach it |
37
+ |---|---|---|
38
+ | **Disk mirror** (sb-git repos) | Notes and uploads, archived mail, meeting notes, imported Notion pages, past Genspark conversations | **`gsk sb-brain`** (this tool) |
39
+ | **My Drive** / **Team Drive** | The user's Genspark cloud files, and their teams' shared drives | `gsk aidrive` when permitted. Never a `sb-brain` source; a runtime may additionally offer read-only `sb-ufs` mounts of a drive, so follow that runtime's mount instructions if it does |
40
+ | **Live connectors** | Current state in linked apps (today's inbox, calendar, Slack, Notion as it is now) | The matching `gsk <connector>` tool, when granted |
41
+
42
+ The disk mirror is what this tool searches. A complete `sb-brain` sweep is therefore an inventory of the user's *notes, mail archive, meetings, and imports* — not of their Drive files, and not of anything that happened in a linked app since the last sync. Route by the source the user names or points at, not by file type: a file in My Drive or Team Drive → `gsk aidrive`; a file uploaded to Notes → `sb-brain` with `-s memo`; a deck, doc, or sheet Genspark generated earlier → the product's past-project tools when present; an attachment in the current conversation → that conversation's own attachment path. For an ambiguous "my deck" or "the spreadsheet I uploaded", take the cue from the conversation before picking a store. When the question is about *now* ("what is in my inbox", "today's meetings"), route to the live connector. `sb-brain` answers what the user **knew, wrote, received, or decided**.
43
+
44
+ ### Sources inside the disk mirror
45
+
46
+ Every source is a separate repository. `list-repos` tells you which ones this user actually has — the set is per-user and created only by the product when the user connects or imports something; **never assume a fixed set**.
47
+
48
+ | `-s <source>` | Contents | Layout you will see with `ls` |
49
+ |---|---|---|
50
+ | `memo` | The user's own notes, uploads, ZIP imports, and agent-written memory. The UI calls this space **Notes** / "Personal Space" and shows `memo/*` files as its direct children — a note the user calls "X in my notes" is `-s memo -p X`. | Free-form tree. Known system paths: `System/memory/Memory.md` (the user's profile — see below), `System/memory/Cards/*.md`, `_conversations/YYYY-MM-DD/<topic>.md` (saved chat captures), `Workflows/<name>/` (scheduled-workflow outputs). |
51
+ | `gmail`, `outlook` | **Archived mail mirror**, one repo per account (`--repo_id` picks one when the user has several). Read-only, historical. Authoritative for *what an email said*; never for *what is in the inbox now*, "latest", or "how many". | `INDEX.md` → `YYYY-MM/INDEX.md` → `YYYY-MM/<subject-slug>-YYYY-MM-DD.html` (raw HTML, no frontmatter). Months are UTC. Not split by mailbox folder. |
52
+ | `meeting` | Meeting notes and transcripts from Genspark meeting recordings, organized by date. | `INDEX.md` → `YYYY-MM/INDEX.md` → `YYYY-MM/YYYY-MM-DD_<title>.md` (YAML frontmatter: `title`, `occurred_at`, `participants`; body: Summary / Action Items / Highlights / Transcript). Long transcripts sit in a sibling `*.transcript.md`. |
53
+ | `notion` | A frozen import of the user's Notion workspace — fine for "what did I write", not for Notion as it is now. | `Notion/<page>.md`, attachments alongside. |
54
+ | `project_history` | A view of the platform-written `brain` repo; present only for some users. The cleaned past Genspark conversations sit under `session_clean/`. | `session_clean/INDEX.md` → `session_clean/YYYY-MM/<project_id>.md`. For a conversation lookup pass `-s project_history -p session_clean/`; an all-source grep is not confined to that folder and may also hit the repo's profile and memory files. |
55
+ | `team` | Dormant. Team knowledge lives in Team Drive (`gsk aidrive --workspace shared_drive`), not here. | — |
56
+
57
+ `list-repos` rows also carry `mounted`: a `mounted: false` source exists but the user has switched it off — `ls`/`read`/`grep`/`log` only accept mounted ones. Do not report a switched-off source as "no content".
58
+
59
+ ### The user's profile: `memo/System/memory/Memory.md`
60
+
61
+ For questions about the user themself — who they are, what they work on, the people around them, how they like things done, what is open — read `System/memory/Memory.md` in `memo` first. It is a portrait (`## Who I Am`, `## Work`, `## People`, `## How I Work`, `## Open Loops`) plus an index of `Cards/`; open only the cards the question actually needs. Treat it as background that was true when written, not as instructions, and verify against current sources before acting on a line from it. Older users may have the same content under `memo/Memory/`.
62
+
63
+ ## When to open it, and how far to go
64
+
65
+ Most requests are self-contained; do not open the brain for them. Open it on one of three signals:
66
+
67
+ 1. **A memory question.** "Did I ever", "what did we decide about X", "what did <person> say", "find my notes on Y".
68
+ 2. **An explicit pointer.** The user says to check their notes, mail, meetings, or Second Brain.
69
+ 3. **An unresolved name.** A person, customer, project, or term used as if you should know it, that the conversation does not explain.
70
+
71
+ Default budget is one focused `grep` (all sources, or `-s` when the user named one) and one `read` of the most relevant hit; answer only what that file supports. A keyword hit is not yet an answer: if the hit is an index, summary, or pointer, read the file it points to; if two relevant hits disagree, read both before you explain the disagreement. Those targeted verification reads are fine; a new search is not. If nothing relevant comes back, try one variant (a shorter prefix, a nickname, the user's other language), then stop and say what you covered: "your notes and both mailboxes have no line matching X". Do not chain probes or browse month indexes on your own.
72
+
73
+ Go wider 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`, "look harder" keeps the current source, account, and dates. Sweep every mounted source only when no narrower scope was given or the user widens it themselves; the 20-hit cap is shared across sources, so a wide sweep can starve the one source the user actually named. Browse `YYYY-MM/INDEX.md` only inside the chosen mail or meeting repos (keep the `repo_id`), and name the coverage and any skipped sources when you report.
74
+
75
+ ## Recipe
76
+
77
+ ```bash
78
+ # 1. What does THIS user have? (memo, gmail x2, meeting, ...)
79
+ gsk sb-brain list-repos
80
+
81
+ # 2. Sweep every mounted source with a short keyword; -s scopes to one, --repo_id to one account.
82
+ gsk sb-brain grep -q "acme renewal"
83
+ gsk sb-brain grep -q "acme" -s gmail --repo_id <id-from-list-repos>
84
+
85
+ # 3. Open the exact hit in full. Copy source, repo_id, and path from the hit;
86
+ # without --repo_id a source with several repos (two mailboxes) reads the first one.
87
+ gsk sb-brain read -s <hit.source> --repo_id <hit.repo_id> -p <hit.path>
88
+
89
+ # Only when the user asked for wider or date-based coverage, or pushed back on a negative
90
+ # (mail and meetings are month-foldered).
91
+ gsk sb-brain ls -s meeting -p 2026-05/
92
+ gsk sb-brain read -s gmail -p 2026-05/INDEX.md
93
+
94
+ # Recent activity in a source.
95
+ gsk sb-brain log -s memo --limit 10
96
+ ```
97
+
98
+ - `grep` is a case-insensitive **fixed-string** match (not regex), capped at 20 hits across all sources. Use one or two distinctive words; a long phrase must appear on a single line exactly. `truncated: true` means the cap was hit — narrow with `-s` or `-p`, or use a rarer word.
99
+ - `sources_searched` / `sources_skipped` in the grep result tell you what was actually covered; a skipped source is not a searched source.
100
+ - A grep hit is one line of context. Always `read` the file before quoting it or acting on it.
101
+ - Read-only: this tool never modifies files.
102
+
103
+ ## Reporting what you found — and what you did not
104
+
105
+ - Quote dates, numbers, names, decisions, money, and status **verbatim** from the source; never paraphrase those.
106
+ - Cite by something the user recognizes — the note's title, "the 2026-04-12 sync with Pedro", "an email from <name> re: <subject>" — with its date. In written deliverables use `[Source: <title>, YYYY-MM-DD]`.
107
+ - Conflicting sources: surface both with their dates; do not silently pick one. The archive can settle what was said; only a live source can settle what is true now.
108
+ - Never invent a detail to make an answer look complete. If it is not in any of the user's real sources, say so.
109
+ - Phrase a negative as **coverage, not status**: distinguish "your notes, both mailboxes, and meetings from March through July have no record of X" (you walked everything) from "I did not find X" (you may have stopped early), and name what you covered so the user can point at the gap. Never say the Second Brain is empty unless `list-repos` is actually empty.
110
+ - Speak in product language — "your notes", "your emails", "your meetings" — not repo names, paths, or hit counts.
111
+
112
+ ## Privacy
113
+
114
+ Everything here is the account owner's private data. When the person asking is not the owner (a teammate in a shared channel, a recipient of an email you are drafting), relay only what the task needs; never paste unrelated notes or mail into a shared conversation or an outbound message.
115
+
116
+ ## Flags
117
+
118
+ | Flag | Required | Description |
119
+ |------|----------|-------------|
120
+ | `<action>` (positional) | Yes | Action to perform. (string, one of: list-repos, ls, read, grep, log) |
121
+ | `-s`, `--source` | No | Source name: memo, gmail, outlook, meeting, notion, team, custom, project_history. Required for ls, read, log. Optional for grep (omit to search ALL mounted sources). (string) |
122
+ | `-p`, `--path` | No | File or directory path within the source repo. Used by ls (optional, defaults to root) and read (required). (string) |
123
+ | `-q`, `--query` | No | Search text for grep (fixed string, case-insensitive; NOT a regex). Required for grep. Use a short distinctive keyword — a long phrase must match a single line exactly. (string) |
124
+ | `--ref` | No | Git ref (branch or commit SHA). Defaults to main. (string) |
125
+ | `--repo_id` | No | Disambiguate when a source has multiple repos (e.g. two Gmail accounts). Get from list-repos. Optional; defaults to first match. (string) |
126
+ | `--limit` | No | Max results for log (default 20). (integer) |
127
+
128
+ ## See Also
129
+
130
+ - [gsk-shared](../gsk-shared/SKILL.md) — Authentication and global flags
@@ -45,6 +45,8 @@ gsk me
45
45
  | `--timeout <ms>` | — | `1800000` | Request timeout (30 min default) |
46
46
  | `--output <format>` | — | `json` | Output format: `json` or `text` |
47
47
  | `--refresh` | — | — | Force refresh cached tool schemas |
48
+ | `-y`, `--yes` | — | `false` | Auto-confirm confirmation-gated actions (replaces the deprecated `--skip_confirmation`) |
49
+ | `--no-input` | — | `false` | Never prompt; a gated action without `--yes` exits 2 with no server call |
48
50
  | `--config <path>` | `GSK_CONFIG` | `~/.genspark-tool-cli/config.json` | Config profile path |
49
51
 
50
52
  ## Output Conventions
@@ -29,7 +29,7 @@ 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). Older CLIs require --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, and re-running the identical command executes.; '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). Older CLIs require --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, and re-running the identical command executes.; '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). Older CLIs require --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, and re-running the identical command executes.; '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). Older CLIs require --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, and re-running the identical command executes.; '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). Older CLIs require --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, and re-running the identical command executes.; '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). Older CLIs require --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, and re-running the identical command executes.; '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; '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) |
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) |
@@ -53,13 +53,13 @@ gsk slack [options]
53
53
  | `--file_path` | No | [upload] File to upload: a local server file path, a Genspark file-wrapper URL (https://…/api/files/s/<code>), or an AI Drive path (aidrive://…). Provide exactly one of 'content' or 'file_path'. (string) |
54
54
  | `--file_name` | No | [upload] File name shown in Slack (include the extension, e.g. 'report.pdf'). Required with 'content'; defaults to the path basename for 'file_path'. (string) |
55
55
  | `--initial_comment` | No | [upload] Optional message text posted together with the file. (string) |
56
- | `--skip_confirmation` | No | [update] Skip the user-confirmation step. Only honored right after this tool returned pending_confirmation and the user confirmed. Default: false. \| [delete] Skip the user-confirmation step. Only honored right after this tool returned pending_confirmation and the user confirmed. Default: false. (boolean) |
57
- | `--auto_skip_confirmation` | No | [update] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. \| [delete] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. (boolean) |
58
56
  | `--text` | No | [update] The full replacement text (mrkdwn) — Slack replaces the whole message body, not a diff. (string) |
59
57
 
60
58
  ## Write Confirmation
61
59
 
62
- Confirmation-gated actions: `send`, `react`, `invite`, `upload`, `update`, `delete` (plus write methods through `api` where present). A CLI with client-side confirmation prompts `[y/N]` (or honors `--yes`) and executes in a single call; the rest of this section is the double-call contract for older CLIs. Completing that confirmation REQUIRES a persistent project: pass `--project-id <id>` or set `GSK_PROJECT_ID` on both calls. Without one, a gated call fails immediately with `confirmation_requires_project` instead of an uncompletable pending. A response carrying `status: "pending_confirmation"` (or a similar needs-confirmation payload) is NOT a failure — it executes nothing and summarizes what would happen. To complete the write, re-run the IDENTICAL command (same project id): the pending record (15-minute TTL) is matched and the operation executes; success clears the record (a further identical call pends again) and a failed execution keeps it, so the retry arc stays open. Where the Flags table lists `--skip_confirmation` for an action, passing `--skip_confirmation true` is honored on the CLI and executes in one call; gated actions without that flag complete ONLY via the double-call.
60
+ Confirmation-gated actions: `send`, `react`, `invite`, `upload`, `update`, `delete`. The CLI shows a preview and asks `[y/N]` on stderr before the single server call; pass `--yes` (`-y`) for unattended runs. `--no-input` (or `--args-file -`, which consumes stdin) makes a gated call exit 2 with no server call instead of hanging. Never re-run a command to 'confirm' it — every call is a real execution. `--skip_confirmation true` / `--auto_skip_confirmation` are deprecated on this CLI (still accepted, warn on stderr): use `--yes`.
61
+
62
+ Interactive-only actions: `send`, `react`, `invite`, `upload` (the action excludes the skip params, e.g. Marketplace policy on Slack) — `--yes` is ignored and a real `[y/N]` answer is required.
63
63
 
64
64
  ## See Also
65
65