@genspark/cli 1.11.2 → 1.13.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 (79) hide show
  1. package/README.md +217 -27
  2. package/dist/client.d.ts +67 -2
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +328 -3
  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/developer-preflight.d.ts +17 -0
  9. package/dist/commands/developer-preflight.d.ts.map +1 -0
  10. package/dist/commands/developer-preflight.js +131 -0
  11. package/dist/commands/developer-preflight.js.map +1 -0
  12. package/dist/commands/developer-project.d.ts +5 -0
  13. package/dist/commands/developer-project.d.ts.map +1 -0
  14. package/dist/commands/developer-project.js +140 -0
  15. package/dist/commands/developer-project.js.map +1 -0
  16. package/dist/commands/genspark-code-skills.d.ts +23 -0
  17. package/dist/commands/genspark-code-skills.d.ts.map +1 -0
  18. package/dist/commands/genspark-code-skills.js +49 -0
  19. package/dist/commands/genspark-code-skills.js.map +1 -0
  20. package/dist/commands/hosted-local.d.ts +10 -0
  21. package/dist/commands/hosted-local.d.ts.map +1 -0
  22. package/dist/commands/hosted-local.js +116 -0
  23. package/dist/commands/hosted-local.js.map +1 -0
  24. package/dist/commands/local-command-routing.d.ts +8 -0
  25. package/dist/commands/local-command-routing.d.ts.map +1 -0
  26. package/dist/commands/local-command-routing.js +33 -0
  27. package/dist/commands/local-command-routing.js.map +1 -0
  28. package/dist/commands/local-preview.d.ts +5 -0
  29. package/dist/commands/local-preview.d.ts.map +1 -0
  30. package/dist/commands/local-preview.js +35 -0
  31. package/dist/commands/local-preview.js.map +1 -0
  32. package/dist/commands/pi-config.d.ts +30 -0
  33. package/dist/commands/pi-config.d.ts.map +1 -0
  34. package/dist/commands/pi-config.js +72 -0
  35. package/dist/commands/pi-config.js.map +1 -0
  36. package/dist/config.d.ts +1 -1
  37. package/dist/config.d.ts.map +1 -1
  38. package/dist/config.js +12 -1
  39. package/dist/config.js.map +1 -1
  40. package/dist/confirm.d.ts +59 -3
  41. package/dist/confirm.d.ts.map +1 -1
  42. package/dist/confirm.js +91 -11
  43. package/dist/confirm.js.map +1 -1
  44. package/dist/developer-contract.d.ts +24 -0
  45. package/dist/developer-contract.d.ts.map +1 -0
  46. package/dist/developer-contract.js +64 -0
  47. package/dist/developer-contract.js.map +1 -0
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +286 -25
  50. package/dist/index.js.map +1 -1
  51. package/dist/local-source.d.ts +22 -0
  52. package/dist/local-source.d.ts.map +1 -0
  53. package/dist/local-source.js +204 -0
  54. package/dist/local-source.js.map +1 -0
  55. package/dist/project-binding.d.ts +31 -0
  56. package/dist/project-binding.d.ts.map +1 -0
  57. package/dist/project-binding.js +141 -0
  58. package/dist/project-binding.js.map +1 -0
  59. package/dist/types.d.ts +21 -0
  60. package/dist/types.d.ts.map +1 -1
  61. package/docs/confirmation.md +113 -6
  62. package/docs/skills.md +3 -2
  63. package/package.json +4 -2
  64. package/skills/gsk-aidrive/SKILL.md +25 -5
  65. package/skills/gsk-audio-generation/SKILL.md +1 -1
  66. package/skills/gsk-claw-share-link/SKILL.md +1 -1
  67. package/skills/gsk-genteam/SKILL.md +7 -8
  68. package/skills/gsk-gmail/SKILL.md +7 -7
  69. package/skills/gsk-google-calendar/SKILL.md +4 -5
  70. package/skills/gsk-google-chat/SKILL.md +2 -4
  71. package/skills/gsk-google-drive/SKILL.md +4 -2
  72. package/skills/gsk-microsoft-teams/SKILL.md +3 -7
  73. package/skills/gsk-onedrive/SKILL.md +4 -2
  74. package/skills/gsk-outlook-calendar/SKILL.md +4 -5
  75. package/skills/gsk-outlook-email/SKILL.md +7 -7
  76. package/skills/gsk-sb-brain/SKILL.md +61 -0
  77. package/skills/gsk-second-brain/SKILL.md +158 -0
  78. package/skills/gsk-shared/SKILL.md +20 -0
  79. package/skills/gsk-slack/SKILL.md +4 -4
@@ -29,12 +29,13 @@ gsk outlook_calendar [options]
29
29
 
30
30
  | Flag | Required | Description |
31
31
  |------|----------|-------------|
32
- | `<action>` (positional) | Yes | Action to perform. 'list': List upcoming calendar events. Returns at most 'limit' (default 20) events; the response sets truncated=true when more events exist in the window; 'free_busy': Query free/busy availability for people (any org member) in a time window (find open meeting slots); 'create': Create a new calendar event. By default this returns a LOCAL DRAFT only — nothing lands in the calendar until the user confirms it in the Genspark UI. Callers without a confirmation UI (e.g. gsk) must pass --skip_confirmation to create the event directly; 'respond': RSVP (accept / decline / tentative) to an existing invite. Supports --comment and --proposed_new_time (Outlook-only counter-proposal); 'modify': Modify (Graph PATCH /me/events/{id}) an existing event in place without delete+create; 'delete': Delete a calendar event. 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. (string, one of: list, free_busy, create, respond, modify, delete) |
32
+ | `<action>` (positional) | Yes | Action to perform. 'list': List upcoming calendar events. Returns at most 'limit' (default 20) events; the response sets truncated=true when more events exist in the window; 'free_busy': Query free/busy availability for people (any org member) in a time window (find open meeting slots); 'create': Create a new calendar event. By default this returns a LOCAL DRAFT only — nothing lands in the calendar until the user confirms it in the Genspark UI. Callers without a confirmation UI (e.g. gsk) must confirm the create (gsk: `--yes`) to write the event directly. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes).; 'respond': RSVP (accept / decline / tentative) to an existing invite. Supports --comment and --proposed_new_time (Outlook-only counter-proposal); 'modify': Modify (Graph PATCH /me/events/{id}) an existing event in place without delete+create; 'delete': Delete a calendar event. Confirmation-gated: on a CLI with client-side confirmation the command runs as a single call after the [y/N] prompt (or --yes). (string, one of: list, free_busy, create, respond, modify, delete) |
33
33
  | `--filter_query` | No | [list] Text to filter calendar events by subject. Empty for listing all events in the time range. (string) |
34
34
  | `--time_min` | No | [list] Optional. Start time for the calendar view (ISO 8601 timestamp). Defaults to 30 days ago. (string) |
35
35
  | `--time_max` | No | [list] Optional. End time for the calendar view (ISO 8601 timestamp). Defaults to 60 days from now. (string) |
36
36
  | `--from_account` | No | [list] Optional: Email address of the Outlook account to use. Use this when the user has multiple Outlook accounts connected. If not specified, uses the default Outlook account. \| [create] Optional: Email address of the Outlook account to use. Use this when the user has multiple Outlook accounts connected. If not specified, uses the default Outlook account. \| [respond] Optional: Email address of the Outlook account to use. Defaults to the user's primary Outlook account. \| [modify] Optional: Email address of the Outlook account to use. \| [delete] Optional: Email address of the Outlook account to use. Use this when the user has multiple Outlook accounts connected. If not specified, uses the default Outlook account. (string) |
37
- | `--limit` | No | [list] Optional. Maximum number of events to return. Defaults to 20. (integer) |
37
+ | `--full_description` | No | [list] Return complete readable descriptions instead of 500-character previews. Defaults to false. When true, limit defaults to 5 and must be at most 5; narrow filter_query and time_min/time_max to the desired event. (boolean, default: `False`) |
38
+ | `--limit` | No | [list] Optional. Maximum number of events to return. Defaults to 20 (5 with full_description=true). (integer) |
38
39
  | `--start_time` | No | [free_busy] Window start, ISO 8601 date-time WITHOUT offset (e.g. '2026-07-20T09:00:00') — interpreted in 'timezone'. \| [create] Start time of the event in ISO 8601 format, must include correct timezone offset (e.g., 'yyyy-mm-ddThh:mm:ss+hh:mm') \| [modify] New start time (ISO 8601 with timezone offset). Pass with --end_time when rescheduling. (string) |
39
40
  | `--end_time` | No | [free_busy] Window end, ISO 8601 (same rule). \| [create] End time of the event in ISO 8601 format, must include correct timezone offset (e.g., 'yyyy-mm-ddThh:mm:ss-hh:mm') \| [modify] New end time (ISO 8601 with timezone offset). Required if start_time is given. (string) |
40
41
  | `--schedules` | No | [free_busy] Email addresses to check. Default: the signed-in user's own address. (array) |
@@ -53,8 +54,6 @@ gsk outlook_calendar [options]
53
54
  | `--importance` | No | [create] Event importance (low, normal, high) \| [modify] Event importance: low / normal / high. (string) |
54
55
  | `--sensitivity` | No | [create] Event sensitivity (normal, personal, private, confidential) \| [modify] Event sensitivity: normal / personal / private / confidential. (string) |
55
56
  | `--show_as` | No | [create] Show as status (free, tentative, busy, oof, workingElsewhere, unknown) \| [modify] Show-as status: free / tentative / busy / oof / workingElsewhere / unknown. (string) |
56
- | `--skip_confirmation` | No | [create] If true, create the event directly in Outlook Calendar instead of returning a local draft. Required when the caller has no UI to review/confirm a draft (e.g. sandbox agents shelling out via gsk). (boolean, default: `False`) |
57
- | `--auto_skip_confirmation` | No | [create] 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`) |
58
57
  | `--is_all_day` | No | [create] Whether to create an all-day busy/block event. (boolean, default: `False`) |
59
58
  | `--all_day` | No | [create] Alias for is_all_day. (boolean, default: `False`) |
60
59
  | `--skip_conflict_check` | No | [create] Set true ONLY after the user has explicitly confirmed they want to book despite a conflict/warning surfaced by a prior needs_confirmation result. Leave false (default) normally. (boolean, default: `False`) |
@@ -69,7 +68,7 @@ gsk outlook_calendar [options]
69
68
 
70
69
  ## Write Confirmation
71
70
 
72
- Confirmation-gated actions: `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.
71
+ Confirmation-gated actions: `create`, `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`.
73
72
 
74
73
  ## See Also
75
74
 
@@ -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,61 @@
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
+ **THEN READ:** `../gsk-second-brain/SKILL.md` — it says what this command is part of and when to reach for it. This file keeps the flags.
25
+
26
+ 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.
27
+
28
+ ## Usage
29
+
30
+ ```bash
31
+ gsk sb-brain [options]
32
+ ```
33
+
34
+ ## What this command reads
35
+
36
+ `gsk sb-brain` opens the **Notes** half of the user's Second Brain — their
37
+ notes, archived mail, meeting notes, Notion import, and past Genspark
38
+ conversations. The map of the whole Second Brain (Notes + Drive, which door
39
+ opens which part, how to read, write and edit) is `../gsk-second-brain/SKILL.md`;
40
+ read it first. Two details that belong to this command alone:
41
+
42
+ - `grep` is a fixed string, case-insensitive — not a regex. Use a short
43
+ distinctive keyword; a long phrase must match a single line exactly.
44
+ - `read` takes the hit's `repo_id` (`--repo_id <hit.repo_id>`); without it a
45
+ source with several repos (two mailboxes) opens the first one.
46
+
47
+ ## Flags
48
+
49
+ | Flag | Required | Description |
50
+ |------|----------|-------------|
51
+ | `<action>` (positional) | Yes | Action to perform. (string, one of: list-repos, ls, read, grep, log) |
52
+ | `-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) |
53
+ | `-p`, `--path` | No | File or directory path within the source repo. Used by ls (optional, defaults to root), read (required) and grep (optional directory prefix that confines the search). (string) |
54
+ | `-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) |
55
+ | `--ref` | No | Git ref (branch or commit SHA). Defaults to main. (string) |
56
+ | `--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) |
57
+ | `--limit` | No | Max results for log (default 20). (integer) |
58
+
59
+ ## See Also
60
+
61
+ - [gsk-shared](../gsk-shared/SKILL.md) — Authentication and global flags
@@ -0,0 +1,158 @@
1
+ ---
2
+ name: gsk-second-brain
3
+ version: 0.1.0
4
+ description: "What the user's Second Brain is (Notes + Drive, theirs and their team's), where each kind of thing lives, and how to read, write and edit it through `gsk sb-brain`, `gsk sb-git` and `gsk drive`. 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 --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
+ - **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.
67
+ - **Editing permission** on a shared entry is the smaller of the live permission on the drive it sits in and the cap the sharer chose.
68
+
69
+ ## 4. Who you are right now
70
+
71
+ Your reach depends on the runtime you run in. Check which applies before you act.
72
+
73
+ **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.
74
+
75
+ **In a GenTeam channel or DM (you are an agent someone created).**
76
+
77
+ - `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.
78
+ - `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`.
79
+ - 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>`. Folders and share cards are listed by name only there.
80
+ - 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.
81
+
82
+ ## 5. Reading
83
+
84
+ Decide where the thing lives, then use that door once:
85
+
86
+ | The user asks about... | Do this |
87
+ |---|---|
88
+ | 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 |
89
+ | Themselves, their preferences, open loops | `read -s memo -p System/memory/Memory.md` first |
90
+ | A file in My Drive | `gsk drive find -q <name>` (or `ls -p <folder>`), then `get_readable_url --id <entry>` and fetch the bytes yourself. `get_readable_url` is your read lane, never a link for people |
91
+ | 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` |
92
+ | Something shared to them | `ls --workspace shared_with_me`, pick the row, reuse its `source_id` |
93
+ | A pasted Drive link or share card | `gsk drive --url <link>`; if it resolves to a shortcut, follow `link_workspace_id` to the source before reading |
94
+ | An attachment in the current conversation | The conversation's own attachment path, not the Drive |
95
+ | 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 |
96
+
97
+ 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.
98
+
99
+ ## 6. Writing
100
+
101
+ Decide WHERE before you write, in this order:
102
+
103
+ 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.
104
+ 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.
105
+ 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.
106
+
107
+ Commands:
108
+
109
+ - Notes: `gsk sb-git commit` — full file content, `expected_parent` set.
110
+ - My Drive: `gsk drive upload --upload_path <path> --overwrite true`. Never keep the `/My Drive` spelling in the path; that literal would create a `My Drive/` folder.
111
+ - 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.
112
+ - Upload does not return the new entry's id today. `find -q <name>` in the destination afterwards to get it; you need the id for the link below.
113
+ - 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).
114
+
115
+ **The link you hand back.** For anything in Drive, the only link for people is the entry's share link:
116
+
117
+ ```
118
+ /second-brain/s/<drive>/<entry>
119
+ ```
120
+
121
+ 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`.
122
+
123
+ 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.
124
+
125
+ **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>` 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`. 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.
126
+
127
+ ## 7. Editing an existing document
128
+
129
+ - **An Office document open in an editor** (`docx`, `xlsx`, `pptx`, with a `[Page context: ... office document open (AI Drive entry id <id>)]` anchor): edit it through the `wo-peer` collaboration room on that id when your runtime has `wo-peer`. Never upload over it. A failed upload there means the room is the only lane, not that the file is read-only.
130
+ - **A Markdown file in Drive:** there is no live co-editing. Fetch the latest bytes right before you change them, apply the change, `upload --overwrite true` to the same path. This replaces the whole file; if the user may be typing in it, tell them before you write.
131
+ - **Anything you cannot edit:** say why — creator-only turn, view-only grant, no room in this runtime, no editor for this type. Never create a new copy in place of the update.
132
+
133
+ ## 8. When to open the brain
134
+
135
+ Most requests are self-contained; do not open the brain for them. Open it on one of three signals:
136
+
137
+ 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".
138
+ 2. **An explicit pointer.** The user says to check their notes, mail, meetings, files, Drive, or Second Brain.
139
+ 3. **An unresolved name.** A person, customer, project, file or term used as if you should know it, that the conversation does not explain.
140
+
141
+ 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.
142
+
143
+ ## 9. Known limits, as of 2026-09-15
144
+
145
+ - Markdown has no live co-editing; the last writer wins.
146
+ - 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.
147
+ - `upload` replies carry `url` and `item.id` since 2026-09-15; on an older runtime recover the id with `find`.
148
+ - `doc-search` indexes My Drive only.
149
+ - In GenTeam, `gsk drive` is creator-turn only, DM drives are not listed, and share cards in `de channel-files` show a name without a target.
150
+
151
+ Each line disappears as the platform closes it. If a limit below is gone, this skill is stale — say so.
152
+
153
+ ## Provenance
154
+
155
+ - 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.
156
+ - 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.
157
+ - 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.
158
+ - 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.
@@ -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
@@ -185,6 +187,24 @@ gsk init-skills -o ./docs/gsk-skills
185
187
  - `.claude/settings.json` — Claude Code context includes (when `--agent claude`)
186
188
  - `gemini-extension.json` — Gemini extension config (when `--agent gemini`)
187
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
+
188
208
  ### AI Drive: local file upload
189
209
 
190
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).
@@ -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