@genspark/cli 1.7.1 → 1.8.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.
@@ -0,0 +1,252 @@
1
+ /**
2
+ * Interactive approval for hosted destructive actions (`gsk hosted *`).
3
+ *
4
+ * Destructive hosted submissions return a transport-ok envelope whose domain
5
+ * payload is `code: "pending_approval"` — the action sits server-side until
6
+ * the user approves/rejects it (normally via the web project banner) or it
7
+ * expires. When gsk itself runs in an interactive terminal, round-tripping
8
+ * the user through the web UI is pointless: prompt y/n on stderr, then drive
9
+ * `hosted_action_approve` / `hosted_action_reject` / the `hosted_action_wait`
10
+ * loop directly.
11
+ *
12
+ * This is deliberately the CLI's first per-tool special case, so it is kept
13
+ * isolated here: every decision lives in a pure, unit-testable function; the
14
+ * readline shell at the bottom is the only impure part, and index.ts only
15
+ * gates on shouldPromptForApproval(). stdout stays machine-parseable — all
16
+ * prompt/progress lines go to stderr, and the caller prints exactly one
17
+ * transport envelope: the LAST one received (terminal wait result, reject
18
+ * ack, or the untouched original pending stub).
19
+ *
20
+ * Domain codes mirror backend/hosted_deploy_skill/responses.py (the
21
+ * approve/reject codes land in the same PR as this file).
22
+ */
23
+ const CODE_PENDING_APPROVAL = 'pending_approval';
24
+ const CODE_STILL_PENDING = 'still_pending';
25
+ // approve responses that mean "the action will execute — wait for it".
26
+ // already_approved happens when the web banner won the race; not an error.
27
+ const APPROVE_THEN_WAIT_CODES = new Set(['approved', 'already_approved']);
28
+ // Belt-and-braces cap on client-driven wait calls. The server enforces its
29
+ // own budget (still_pending flips to retryable=false at max_attempts), so
30
+ // this only guards against a misbehaving server keeping us looping forever.
31
+ const MAX_CLIENT_WAIT_CALLS = 10;
32
+ /** Domain envelope (`data` slot) of a transport-ok response, else null. */
33
+ function domainOf(envelope) {
34
+ if (envelope.status !== 'ok')
35
+ return null;
36
+ const data = envelope.data;
37
+ if (!data || typeof data !== 'object' || Array.isArray(data))
38
+ return null;
39
+ return data;
40
+ }
41
+ /** `data.result` payload when it is an object, else an empty object. */
42
+ function domainResult(data) {
43
+ const result = data?.result;
44
+ if (!result || typeof result !== 'object' || Array.isArray(result))
45
+ return {};
46
+ return result;
47
+ }
48
+ /**
49
+ * Recognize a pending-approval submission envelope. Requires the
50
+ * `pending_action_id` — without it the flow could not approve anything,
51
+ * so such an envelope just prints as-is.
52
+ */
53
+ export function extractPendingApproval(envelope) {
54
+ const data = domainOf(envelope);
55
+ if (!data || data.code !== CODE_PENDING_APPROVAL)
56
+ return null;
57
+ const result = domainResult(data);
58
+ const id = result.pending_action_id;
59
+ if (typeof id !== 'string' || id.length === 0)
60
+ return null;
61
+ return {
62
+ id,
63
+ summary: typeof result.summary === 'string' ? result.summary : '',
64
+ diffPreview: result.diff_preview,
65
+ expiresAt: typeof result.expires_at === 'string' ? result.expires_at : undefined,
66
+ };
67
+ }
68
+ /**
69
+ * Gate for the interactive flow: a pending-approval envelope, an
70
+ * interactive terminal on BOTH stdin and stdout (stdout piped to a file
71
+ * or another process must keep today's print-and-exit behavior even if
72
+ * stdin is a TTY), and no --no-input.
73
+ */
74
+ export function shouldPromptForApproval(envelope, isInteractiveTty, noInput) {
75
+ return (isInteractiveTty && !noInput && extractPendingApproval(envelope) !== null);
76
+ }
77
+ /** y/yes → approve, n/no → reject, anything else (incl. Enter) → leave. */
78
+ export function classifyAnswer(raw) {
79
+ const answer = raw.trim().toLowerCase();
80
+ if (answer === 'y' || answer === 'yes')
81
+ return 'approve';
82
+ if (answer === 'n' || answer === 'no')
83
+ return 'reject';
84
+ return 'leave';
85
+ }
86
+ /**
87
+ * After hosted_action_approve: `wait` when the action is (already) approved
88
+ * and will execute; `present` for everything else — terminal translations
89
+ * (action_expired / action_rejected), cli_approve_disabled, not-found, and
90
+ * transport errors are all final answers the user just needs to see.
91
+ */
92
+ export function decideAfterApprove(envelope) {
93
+ const code = domainOf(envelope)?.code;
94
+ return typeof code === 'string' && APPROVE_THEN_WAIT_CODES.has(code)
95
+ ? 'wait'
96
+ : 'present';
97
+ }
98
+ /**
99
+ * Reduce one hosted_action_wait envelope to the next loop step.
100
+ *
101
+ * - terminal codes (completed / execution_failed / action_rejected /
102
+ * action_expired), unknown codes and transport errors → present as-is;
103
+ * - still_pending with server budget left (retryable=true) → continue;
104
+ * - still_pending with the budget spent → exhausted: stop looping, tell the
105
+ * user on stderr what to run next, and still present the envelope.
106
+ */
107
+ export function nextWaitStep(envelope, actionId) {
108
+ const data = domainOf(envelope);
109
+ if (!data || data.code !== CODE_STILL_PENDING)
110
+ return { kind: 'present' };
111
+ const result = domainResult(data);
112
+ const attempt = typeof result.attempt === 'number' ? result.attempt : null;
113
+ const maxAttempts = typeof result.max_attempts === 'number' ? result.max_attempts : null;
114
+ const attemptLabel = attempt !== null && maxAttempts !== null
115
+ ? ` (attempt ${attempt}/${maxAttempts})`
116
+ : '';
117
+ const budgetSpent = attempt !== null && maxAttempts !== null && attempt >= maxAttempts;
118
+ if (data.retryable !== true || budgetSpent) {
119
+ return {
120
+ kind: 'exhausted',
121
+ notice: `Wait budget exhausted${attemptLabel} — the action has not reached ` +
122
+ `a terminal state. Check later with ` +
123
+ `\`gsk hosted action_status --id ${actionId}\`.`,
124
+ };
125
+ }
126
+ return {
127
+ kind: 'continue',
128
+ progress: `Still waiting for the execution result${attemptLabel}...`,
129
+ };
130
+ }
131
+ // Summary and string diff previews embed request-controlled text (e.g. the
132
+ // --sql argument) and reach the terminal verbatim at the consent prompt: raw
133
+ // ESC/CR/BS/BEL survive the JSON round-trip, letting injected content rewrite
134
+ // what the human sees before typing y. Strip C0 controls + DEL, keep TAB.
135
+ const CONTROL_CHARS = /[\u0000-\u0008\u000a-\u001f\u007f]/g;
136
+ function stripControlChars(text) {
137
+ return text.replace(CONTROL_CHARS, '');
138
+ }
139
+ // Backend hosted envelopes serialize expires_at as naive UTC (utc_datetime
140
+ // strips tzinfo, so there is no offset suffix); Date.parse reads offset-less
141
+ // strings as LOCAL time, which misreports expiry on any non-UTC terminal.
142
+ function parseUtcTimestamp(raw) {
143
+ return Date.parse(/(?:Z|[+-]\d{2}:?\d{2})$/.test(raw) ? raw : `${raw}Z`);
144
+ }
145
+ /**
146
+ * stderr banner shown before the y/n prompt. Pure so the expiry math is
147
+ * testable; `nowMs` defaults to the real clock at the call site.
148
+ */
149
+ export function pendingPromptLines(info, nowMs) {
150
+ const lines = ['', 'This action requires approval before it runs:'];
151
+ if (info.summary)
152
+ lines.push(` ${stripControlChars(info.summary)}`);
153
+ if (info.diffPreview !== undefined && info.diffPreview !== null) {
154
+ const preview = typeof info.diffPreview === 'string'
155
+ ? info.diffPreview
156
+ : JSON.stringify(info.diffPreview, null, 2);
157
+ lines.push(' Diff preview:');
158
+ for (const previewLine of preview.split('\n')) {
159
+ lines.push(` ${stripControlChars(previewLine)}`);
160
+ }
161
+ }
162
+ if (info.expiresAt) {
163
+ const expiresMs = parseUtcTimestamp(info.expiresAt);
164
+ if (Number.isNaN(expiresMs)) {
165
+ lines.push(` Expires at ${info.expiresAt}`);
166
+ }
167
+ else if (expiresMs <= nowMs) {
168
+ lines.push(` Expires at ${info.expiresAt} (already expired)`);
169
+ }
170
+ else {
171
+ const totalMinutes = Math.round((expiresMs - nowMs) / 60000);
172
+ const remaining = totalMinutes < 1 ? 'less than a minute' : `~${totalMinutes} min`;
173
+ lines.push(` Expires at ${info.expiresAt} (in ${remaining})`);
174
+ }
175
+ }
176
+ return lines;
177
+ }
178
+ /**
179
+ * Full decision flow for one pending-approval envelope. Returns the ONE
180
+ * transport envelope the caller must print to stdout — always the last
181
+ * one received (or the untouched original when the user leaves it pending).
182
+ */
183
+ export async function runPendingApprovalFlow(pendingEnvelope, io) {
184
+ const info = extractPendingApproval(pendingEnvelope);
185
+ if (!info)
186
+ return pendingEnvelope;
187
+ for (const line of pendingPromptLines(info, io.now()))
188
+ io.notify(line);
189
+ const answer = classifyAnswer(await io.ask('Approve this action? [y/n, Enter = leave pending] '));
190
+ if (answer === 'leave') {
191
+ io.notify('Left pending — approve it from the web project page, or run:');
192
+ io.notify(` gsk hosted action_approve --id ${info.id}`);
193
+ return pendingEnvelope;
194
+ }
195
+ if (answer === 'reject') {
196
+ return io.executeTool('hosted_action_reject', { id: info.id });
197
+ }
198
+ const approveEnvelope = await io.executeTool('hosted_action_approve', {
199
+ id: info.id,
200
+ });
201
+ if (decideAfterApprove(approveEnvelope) === 'present') {
202
+ return approveEnvelope;
203
+ }
204
+ io.notify('Approved — waiting for the execution result...');
205
+ let waitEnvelope = approveEnvelope;
206
+ for (let call = 0; call < MAX_CLIENT_WAIT_CALLS; call++) {
207
+ waitEnvelope = await io.executeTool('hosted_action_wait', { id: info.id });
208
+ const step = nextWaitStep(waitEnvelope, info.id);
209
+ if (step.kind === 'continue') {
210
+ io.notify(step.progress);
211
+ continue;
212
+ }
213
+ if (step.kind === 'exhausted')
214
+ io.notify(step.notice);
215
+ return waitEnvelope;
216
+ }
217
+ // Server never flipped retryable off within the client cap — stop anyway.
218
+ io.notify(`Stopped after ${MAX_CLIENT_WAIT_CALLS} wait calls without a terminal ` +
219
+ `state. Check later with \`gsk hosted action_status --id ${info.id}\`.`);
220
+ return waitEnvelope;
221
+ }
222
+ /**
223
+ * Thin TTY shell around runPendingApprovalFlow: readline over
224
+ * stdin/stderr (NEVER stdout — it must stay one machine-parseable JSON
225
+ * document). Only called when shouldPromptForApproval() returned true.
226
+ */
227
+ export async function runInteractiveApprovalFlow(pendingEnvelope, executeTool) {
228
+ const readline = await import('node:readline/promises');
229
+ const rl = readline.createInterface({
230
+ input: process.stdin,
231
+ output: process.stderr,
232
+ });
233
+ // readline/promises never settles a pending question() once the interface
234
+ // closes (stdin EOF / Ctrl+D) — the event loop would drain and the process
235
+ // would exit 0 with NO envelope on stdout. Race 'close' and treat EOF as
236
+ // the empty answer ("leave pending"). Closing right after the one answer
237
+ // also releases raw-mode stdin, so Ctrl+C works during the approve→wait
238
+ // loop; close() is idempotent, the finally covers the never-asked path.
239
+ const closedAsLeave = new Promise(resolve => rl.once('close', () => resolve('')));
240
+ try {
241
+ return await runPendingApprovalFlow(pendingEnvelope, {
242
+ executeTool,
243
+ ask: question => Promise.race([rl.question(question), closedAsLeave]).finally(() => rl.close()),
244
+ notify: line => console.error(line),
245
+ now: () => Date.now(),
246
+ });
247
+ }
248
+ finally {
249
+ rl.close();
250
+ }
251
+ }
252
+ //# sourceMappingURL=pendingApproval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pendingApproval.js","sourceRoot":"","sources":["../src/pendingApproval.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,MAAM,qBAAqB,GAAG,kBAAkB,CAAA;AAChD,MAAM,kBAAkB,GAAG,eAAe,CAAA;AAE1C,uEAAuE;AACvE,2EAA2E;AAC3E,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC,CAAA;AAEzE,2EAA2E;AAC3E,0EAA0E;AAC1E,4EAA4E;AAC5E,MAAM,qBAAqB,GAAG,EAAE,CAAA;AAEhC,2EAA2E;AAC3E,SAAS,QAAQ,CAAC,QAAqB;IACrC,IAAI,QAAQ,CAAC,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IACzC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAA;IAC1B,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAA;IACzE,OAAO,IAA+B,CAAA;AACxC,CAAC;AAED,wEAAwE;AACxE,SAAS,YAAY,CACnB,IAAoC;IAEpC,MAAM,MAAM,GAAG,IAAI,EAAE,MAAM,CAAA;IAC3B,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,EAAE,CAAA;IAC7E,OAAO,MAAiC,CAAA;AAC1C,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CAAA;IACZ,CAAC;AACH,CAAC"}
package/dist/types.d.ts CHANGED
@@ -9,6 +9,8 @@ export interface GlobalOptions {
9
9
  output: 'json' | 'text';
10
10
  projectId?: string;
11
11
  refresh?: boolean;
12
+ /** --no-input: never prompt interactively (hosted approval y/n etc.). */
13
+ noInput?: boolean;
12
14
  }
13
15
  export interface ApiResponse<T = unknown> {
14
16
  status: 'ok' | 'error';
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACtC,MAAM,EAAE,IAAI,GAAG,OAAO,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,CAAC,GAAG,IAAI,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IAI9C,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAGD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAKD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,E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E,MAAM,GAAG,IAAI,CAAA;IACnB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAGD,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAGD,MAAM,WAAW,mBAAmB;IAClC,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;CACrB"}
package/docs/skills.md CHANGED
@@ -18,7 +18,7 @@
18
18
  | [gsk-claw-share-link](../skills/gsk-claw-share-link/SKILL.md) | Generate a time-limited share URL for a file on a Genspark Claw VM. Use when the user is not in the web UI and you ne... |
19
19
  | [gsk-crawler](../skills/gsk-crawler/SKILL.md) | Crawl and extract content from web pages. Supports HTML, PDF, and documents. |
20
20
  | [gsk-create-task](../skills/gsk-create-task/SKILL.md) | Create and execute tasks using specialized AI agents. Supports super_agent, podcasts, docs, slides, deep_research, we... |
21
- | [gsk-genteam](../skills/gsk-genteam/SKILL.md) | GenTeam (Genspark team workspace) operations as the calling user. Actions: join, channels, agents, read, search, send... |
21
+ | [gsk-genteam](../skills/gsk-genteam/SKILL.md) | GenTeam (Genspark team workspace) operations as the calling user. Actions: join, channels, agents, read, threads, dow... |
22
22
  | [gsk-get-model-info](../skills/gsk-get-model-info/SKILL.md) | Detailed generation-model info: capabilities, params_schema, available speakers and prompting guides (audio/video/ima... |
23
23
  | [gsk-get-service-url](../skills/gsk-get-service-url/SKILL.md) | Get the public HTTPS URL for a service running on the sandbox. Use this to access web servers, APIs, or applications ... |
24
24
  | [gsk-github](../skills/gsk-github/SKILL.md) | GitHub operations. Actions: list_repos, search_issues, create_issue, update_issue. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genspark/cli",
3
- "version": "1.7.1",
3
+ "version": "1.8.0",
4
4
  "description": "CLI tool for Genspark Tool API - search, crawl, analyze images, generate media",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -2,8 +2,9 @@
2
2
  name: gsk-genteam
3
3
  version: 1.0.0
4
4
  description: 'GenTeam (Genspark team workspace) operations as the calling user. Actions:
5
- join, channels, agents, read, search, send, react, create_channel, update_channel,
6
- invite_link, members, tasks.'
5
+ join, channels, agents, read, threads, download, search, send, react, delete, update,
6
+ create_channel, update_channel, invite_link, members, tasks, mark_read, forward,
7
+ pins, dm.'
7
8
  metadata:
8
9
  category: general
9
10
  requires:
@@ -16,7 +17,7 @@ metadata:
16
17
 
17
18
  **PREREQUISITE:** Read `../gsk-shared/SKILL.md` for auth, global flags, and security rules.
18
19
 
19
- GenTeam (Genspark team workspace) operations as the calling user. Actions: join, channels, agents, read, search, send, react, create_channel, update_channel, invite_link, members, tasks.
20
+ GenTeam (Genspark team workspace) operations as the calling user. Actions: join, channels, agents, read, threads, download, search, send, react, delete, update, create_channel, update_channel, invite_link, members, tasks, mark_read, forward, pins, dm.
20
21
 
21
22
  ## Usage
22
23
 
@@ -28,16 +29,19 @@ gsk genteam [options]
28
29
 
29
30
  | Flag | Required | Description |
30
31
  |------|----------|-------------|
31
- | `<action>` (positional) | Yes | Action to perform. 'join': Join a GenTeam workspace or group chat from an invite link; 'channels': List the caller's workspaces, or one workspace's group chats by server_slug; 'agents': List a workspace's agents visible to the caller by server_slug; each id is a mention target for send; 'read': Read recent messages from a group chat, DM, or thread; 'search': Search a workspace by server_slug, or one group chat, DM, or thread by channel_id; 'send': Send a message (text, attachment, or thread reply) to a group chat or DM as the caller; supports native @mentions (humans and agents) and native quote replies. Held for confirmation: the first call returns pending_confirmation (nothing is posted); re-run the identical call to confirm and send; 'react': Emoji-react to a message in a group chat, DM, or thread (or remove your own reaction); 'create_channel': Create a group chat in a workspace; the caller becomes its manager and auto-joins; 'update_channel': Edit a group chat's display name, description, or member permission switches (manager only); 'invite_link': Create, list, or revoke the invite links that genteam_join consumes (workspace or group chat scoped); 'members': List, add, or remove group chat members (humans and agents) by actor id; op=list also reads a DM's or thread's roster; 'tasks': Task board: list a group chat's, DM's, or workspace's tasks, get one task with its event history, claim/unclaim it, or change its status (string, one of: join, channels, agents, read, search, send, react, create_channel, update_channel, invite_link, members, tasks) |
32
+ | `<action>` (positional) | Yes | Action to perform. 'join': Join a GenTeam workspace or group chat from an invite link; 'channels': List the caller's workspaces, or one workspace's group chats by server_slug; 'agents': List a workspace's agents visible to the caller by server_slug; each id is a mention target for send; 'read': Read recent messages from a group chat, DM, or thread; around_message_id fetches the window around one message (e.g. a search hit); a thread is also addressable by its root message id via parent_message_id; 'threads': List a group chat's or DM's threads (thread channel id, root comet_message_id, caller_is_participant, reply count / last activity); channel membership is the only requirement; 'download': Download one message attachment (attachments[].attachment_ref from read output) to a fetchable file-wrapper URL; 'search': Search a workspace by server_slug, or one group chat, DM, or thread by channel_id; 'send': Send a message (text, attachment, or thread reply) to a group chat or DM as the caller; a thread reply is also addressable by its root message id via parent_message_id. Supports native @mentions (humans and agents) and native quote replies. Held for confirmation: the first call returns pending_confirmation (nothing is posted); re-run the identical call to confirm and send. Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'react': Emoji-react to a message in a group chat, DM, or thread (or remove your own reaction). Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'delete': Delete one of YOUR OWN messages in a group chat, DM, or thread (author-only, the same gate the app enforces). Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'update': Edit the text of one of YOUR OWN messages (the caption on an attachment message); attachments and existing @mentions are preserved (author-only, the same gate the app enforces). Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'create_channel': Create a group chat in a workspace; the caller becomes its manager and auto-joins. Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'update_channel': Edit a group chat's display name, description, or member permission switches (manager only). Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'invite_link': Create, list, or revoke the invite links that genteam_join consumes (workspace or group chat scoped). Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'members': List, add, or remove group chat members (humans and agents) by actor id; op=list also reads a DM's or thread's roster. Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'tasks': Task board: list a group chat's, DM's, or workspace's tasks, get one task with its event history, create a task from a message, claim/unclaim it, assign it to one of the caller's agents (op=candidates lists them), rename it, or change its status. Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'mark_read': Mark a group chat, DM, or thread read (clears the caller's unread count), or back to unread with unread=true; 'forward': Forward one message to another group chat or DM you can post to, with the app's forward semantics (original author attribution and preview; optional note above the forwarded card). Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'pins': List a group chat's pinned messages, or pin/unpin one by its comet_message_id (any active member may, the same rule the app enforces; a thread id addresses its parent group chat's pins). Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'dm': List the caller's DMs in a workspace (op=list: peer actor_type + actor_id per row), or open a DM with a human contact or agent (op=open: returns the app's deterministic channel_id, reusing an existing DM; held for confirmation). Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes. (string, one of: join, channels, agents, read, threads, download, search, send, react, delete, update, create_channel, update_channel, invite_link, members, tasks, mark_read, forward, pins, dm) |
32
33
  | `--invite_url` | No | [join] Full invite link URL, including the token query parameter. (string) |
33
34
  | `--invite_id` | No | [join] Invite link id (alternative to invite_url; requires token). \| [invite_link] Invite link id to revoke (from op=list or the create result). (string) |
34
35
  | `--token` | No | [join] Invite link token (alternative to invite_url; requires invite_id). (string) |
35
- | `--server_slug` | No | [channels] Workspace slug (from the workspace list or a GenTeam URL path segment). \| [agents] Workspace slug (from genteam_list_channels or a GenTeam URL path segment). \| [search] Workspace slug (from genteam_list_channels or a GenTeam URL path segment). Required unless channel_id is given. \| [create_channel] Workspace slug (from genteam_list_channels or a GenTeam URL path segment). \| [invite_link] Workspace slug; required unless channel_id is given. \| [tasks] list: workspace slug (from genteam_list_channels) for the caller's workspace-wide board. (string) |
36
+ | `--server_slug` | No | [channels] Workspace slug (from the workspace list or a GenTeam URL path segment). \| [agents] Workspace slug (from genteam_list_channels or a GenTeam URL path segment). \| [search] Workspace slug (from genteam_list_channels or a GenTeam URL path segment). Required unless channel_id is given. \| [create_channel] Workspace slug (from genteam_list_channels or a GenTeam URL path segment). \| [invite_link] Workspace slug; required unless channel_id is given. \| [tasks] list: workspace slug (from genteam_list_channels) for the caller's workspace-wide board. \| [dm] Workspace slug (from genteam_list_channels or a GenTeam URL path segment). (string) |
36
37
  | `--mine` | No | [agents] When true, return only agents the caller created. Default false. (boolean) |
37
- | `--channel_id` | No | [read] Group chat, DM, or thread id (group chats and DMs from genteam_list_channels; thread ids arrive in context, e.g. genteam_tasks output). \| [search] Group chat, DM, or thread to search within (group chats and DMs from genteam_list_channels; thread ids arrive in context, e.g. genteam_tasks output). \| [send] Target group chat, DM, or thread id (group chats and DMs from genteam_list_channels; thread ids arrive in context, e.g. genteam_tasks output). \| [react] Group chat, DM, or thread id the message lives in (group chats and DMs from genteam_list_channels; thread ids arrive in context, e.g. genteam_tasks output). \| [update_channel] Group chat id (from genteam_list_channels). \| [invite_link] Group chat id — scopes create/list to that group chat's join links. \| [members] Group chat id (from genteam_list_channels); op=list also accepts a DM or thread id. \| [tasks] list: group chat or DM board target (from genteam_list_channels). Mutually exclusive with server_slug. (string) |
38
+ | `--channel_id` | No | [read] Group chat, DM, or thread id (group chats and DMs from genteam_list_channels; thread ids from genteam_threads or genteam_tasks output). Optional when parent_message_id is passed. \| [threads] Group chat or DM id whose threads to list (from genteam_list_channels). \| [download] Group chat, DM, or thread id the attachment's message lives in (the channel_id on the read output's attachment row). \| [search] Group chat, DM, or thread to search within (group chats and DMs from genteam_list_channels; thread ids from genteam_threads or genteam_tasks output). \| [send] Target group chat, DM, or thread id (group chats and DMs from genteam_list_channels; thread ids arrive in context, e.g. genteam_tasks output). Optional when parent_message_id is passed. \| [react] Group chat, DM, or thread id the message lives in (group chats and DMs from genteam_list_channels; thread ids arrive in context, e.g. genteam_tasks output). \| [delete] Group chat, DM, or thread id the message lives in (group chats and DMs from genteam_list_channels; thread ids arrive in context, e.g. genteam_tasks output). \| [update] Group chat, DM, or thread id the message lives in (group chats and DMs from genteam_list_channels; thread ids arrive in context, e.g. genteam_tasks output). \| [update_channel] Group chat id (from genteam_list_channels). \| [invite_link] Group chat id — scopes create/list to that group chat's join links. \| [members] Group chat id (from genteam_list_channels); op=list also accepts a DM or thread id. \| [tasks] list: group chat or DM board target (from genteam_list_channels). Mutually exclusive with server_slug. create/candidates: the group chat or DM whose board is targeted (required). \| [mark_read] Group chat, DM, or thread id (group chats and DMs from genteam_list_channels; thread ids arrive in context, e.g. genteam_tasks output). \| [forward] Group chat, DM, or thread id the message lives in (from genteam_list_channels; thread ids arrive in context, e.g. genteam_read output). \| [pins] Group chat id (from genteam_list_channels); a thread id resolves to its parent group chat's pins. (string) |
39
+ | `--parent_message_id` | No | [read] comet_message_id of a thread's root message: read that message's thread without knowing the thread channel id. If channel_id is also passed it must agree (the thread itself, or the group chat/DM containing the root message). \| [send] comet_message_id of a thread's root message: post this message as a reply in that message's thread without knowing the thread channel id. If channel_id is also passed it must agree (the thread itself, or the group chat/DM containing the root message). (string) |
38
40
  | `--limit` | No | [read] Messages to return (1..200). Default 20. \| [search] Workspace mode only: max hits per group (default 8). Conversation mode pages are a fixed 20 per request. \| [tasks] list (channel_id mode): page size, 1..100 (default 20). (integer) |
39
41
  | `--before_message_id` | No | [read] Message id cursor: return messages strictly older than this id. (string) |
40
42
  | `--after_message_id` | No | [read] Message id cursor: return messages strictly newer than this id. Mutually exclusive with before_message_id. (string) |
43
+ | `--around_message_id` | No | [read] Anchor message id (comet_message_id from search, read, or threads output): return the visible window around it — roughly half of limit older, the anchor itself, and half newer. Errors if the anchor is not in this conversation. Mutually exclusive with before_message_id and after_message_id. (string) |
44
+ | `--attachment_ref` | No | [download] Attachment reference '{comet_message_id}:{index}' from genteam_read output (attachments[].attachment_ref). (string) |
41
45
  | `--query` | No | [search] Search keywords. (string) |
42
46
  | `--scope` | No | [search] Workspace mode: everything (default), messages, tasks, members, channels, or agents. Conversation mode: messages (default), contacts, or files. (string) |
43
47
  | `--cursor` | No | [search] Conversation mode only: opaque paging cursor echoed by the previous page. \| [tasks] list (channel_id mode): opaque paging cursor echoed by the previous page as next_cursor. (string) |
@@ -46,29 +50,36 @@ gsk genteam [options]
46
50
  | `--file_name` | No | [send] Display file name for the attachment; defaults to the name derived from file_path. (string) |
47
51
  | `--mentions` | No | [send] Members to @mention — humans or agents: agent ids (agent_…, from genteam_list_agents), human member ids (UUID), or exact display names (must be unambiguous in the target conversation). Each must already be a member of the target conversation. Mention chips render natively. Humans are notified; agents wake unless creator-only mode blocks the sender. Read any owner_only_mentions advisory in the reply before expecting an answer. A canonical @[name](id) token is auto-prepended to the body for each mention, skipped when the body already contains that member's token — so do NOT also write the token inline for the same member (it would be redundant, not doubled). (array) |
48
52
  | `--quote_message_id` | No | [send] comet_message_id of an existing message in this conversation (from genteam_read) to quote — renders as the app's native quote block. Text sends only. (string) |
49
- | `--operation_id` | No | [send] Idempotency key with two roles in the double-call confirmation flow: while the send is pending_confirmation, re-running the IDENTICAL call (same operation_id and arguments) is the confirmation itself and performs the send; after a successful send, retries with the same operation_id return the already-sent message instead of posting a duplicate. (string) |
53
+ | `--operation_id` | No | [send] Idempotency key with two roles in the double-call confirmation flow: while the send is pending_confirmation, re-running the IDENTICAL call (same operation_id and arguments) is the confirmation itself and performs the send; after a successful send, retries with the same operation_id return the already-sent message instead of posting a duplicate. \| [forward] Optional idempotency key (8-64 chars of [A-Za-z0-9_-]). After a successful forward, retries with the same operation_id return the already-forwarded message instead of posting a duplicate. Without it a re-run posts a duplicate forward. (string) |
50
54
  | `--skip_sent_via_tag` | No | [send] Messages sent through this tool carry a small 'via API' source tag next to the sender name. Set true to send this one message without the tag. (boolean) |
51
- | `--skip_confirmation` | No | [send] If true, skip user confirmation and send immediately. Default is false (require confirmation before sending: the first call returns pending_confirmation and an identical re-run confirms). On LLM agent paths the flag is only honored after the user actually confirmed. \| [react] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). \| [create_channel] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). \| [update_channel] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). \| [invite_link] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). \| [members] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). \| [tasks] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). (boolean, default: `False`) |
52
- | `--auto_skip_confirmation` | No | [send] Set by the workflow engine when the node is configured to skip confirmation. \| [react] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. \| [create_channel] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. \| [update_channel] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. \| [invite_link] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. \| [members] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. \| [tasks] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. (boolean) |
53
- | `--message_id` | No | [react] comet_message_id of the message to react to (from genteam_read). (string) |
55
+ | `--skip_confirmation` | No | [send] If true, skip user confirmation and send immediately. Default is false (require confirmation before sending: the first call returns pending_confirmation and an identical re-run confirms). On LLM agent paths the flag is only honored after the user actually confirmed. \| [react] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). \| [delete] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). \| [update] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). \| [create_channel] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). \| [update_channel] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). \| [invite_link] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). \| [members] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). \| [tasks] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). \| [forward] If true, skip user confirmation and forward immediately. Default is false (require confirmation before posting: the first call returns pending_confirmation and an identical re-run confirms). \| [pins] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). \| [dm] If true, skip user confirmation and apply immediately. Default is false (require confirmation before applying). (boolean, default: `False`) |
56
+ | `--auto_skip_confirmation` | No | [send] Set by the workflow engine when the node is configured to skip confirmation. \| [react] 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. \| [update] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. \| [create_channel] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. \| [update_channel] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. \| [invite_link] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. \| [members] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. \| [tasks] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. \| [forward] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. \| [pins] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. \| [dm] Internal: set by workflow nodes configured with skip_confirmation=true. Default: false. (boolean) |
57
+ | `--message_id` | No | [react] comet_message_id of the message to react to (from genteam_read). \| [delete] comet_message_id of YOUR OWN message to delete (from genteam_read). \| [update] comet_message_id of YOUR OWN message to edit (from genteam_read). \| [mark_read] Optional comet_message_id (from genteam_read). Marking read: the highest message to mark read (inclusive); omit to mark the whole conversation read. Marking unread: the first message to show as unread (group chats and DMs only — threads take no anchor); omit to anchor at the latest message. \| [forward] comet_message_id of the message to forward (from genteam_read of the source conversation). \| [pins] pin/unpin: comet_message_id of the target message (from genteam_read or op=list output). (string) |
54
58
  | `--emoji` | No | [react] The emoji as a unicode character itself, e.g. '👍' or '🎉' (not ':thumbsup:'). (string) |
55
59
  | `--remove` | No | [react] true removes YOUR OWN existing reaction instead of adding one. Default: false. (boolean, default: `False`) |
60
+ | `--text` | No | [update] The full replacement text (not a diff). Replaces the message body, or the caption on an attachment message. (string) |
56
61
  | `--name` | No | [create_channel] Group chat slug: lowercase letters, digits, '-' and '_', max 30 chars (e.g. 'release-train'). Immutable after creation — URLs and mentions depend on it; only display_name can change later. (string) |
57
62
  | `--display_name` | No | [create_channel] Optional human-readable group chat name (max 80 chars). \| [update_channel] New human-readable group chat name (max 80 chars); empty string clears the override. (string) |
58
- | `--description` | No | [create_channel] Optional group chat description (max 500 chars). \| [update_channel] New group chat description (max 500 chars); empty string clears it. (string) |
63
+ | `--description` | No | [create_channel] Optional group chat description (max 500 chars). \| [update_channel] New group chat description (max 500 chars); empty string clears it. \| [tasks] create: optional task description (max 4000 chars). (string) |
59
64
  | `--member_invite_enabled` | No | [update_channel] Whether ordinary members may create invite links for this group chat. (boolean) |
60
65
  | `--member_agent_add_enabled` | No | [update_channel] Whether ordinary members may add their own agents to this group chat. (boolean) |
61
- | `--op` | No | [invite_link] Operation to perform. \| [members] Operation to perform. \| [tasks] Operation to perform. (string, one of: create, list, revoke) |
66
+ | `--op` | No | [invite_link] Operation to perform. \| [members] Operation to perform. \| [tasks] Operation to perform. \| [pins] Operation to perform. \| [dm] Operation to perform. (string, one of: create, list, revoke) |
62
67
  | `--max_uses` | No | [invite_link] create: how many joins the link allows (default per workspace size). (integer) |
63
68
  | `--expires_days` | No | [invite_link] create: link validity in days (default per workspace size). (integer) |
64
- | `--actor_type` | No | [members] add/remove: whether the target is a human or an agent. (string, one of: human, agent) |
65
- | `--actor_id` | No | [members] add/remove: the member id — a cogen UUID for humans, an agent_… id for agents. (string) |
66
- | `--task_id` | No | [tasks] get/claim/unclaim/status: the task id (task_…, from op=list). (string) |
69
+ | `--actor_type` | No | [members] add/remove: whether the target is a human or an agent. \| [dm] open: whether the DM target is a human or an agent. (string, one of: human, agent) |
70
+ | `--actor_id` | No | [members] add/remove: the member id — a cogen UUID for humans, an agent_… id for agents. \| [dm] open: the DM target — a cogen UUID for humans, an agent_… id for agents (from op=list, genteam_members, or genteam_list_agents). (string) |
71
+ | `--task_id` | No | [tasks] get/claim/unclaim/status/assign/rename: the task id (task_…, from op=list). (string) |
72
+ | `--source_message_id` | No | [tasks] create: the message the task anchors to (message id from genteam_read_channel or genteam_search). Creating again from the same message returns the existing task (created=false). (string) |
73
+ | `--title` | No | [tasks] create: optional title (defaults to a snapshot of the source message). rename: the new title (required, max 400 chars). (string) |
74
+ | `--assignee_id` | No | [tasks] assign: the agent to assign (agent id from op=candidates; only agents the caller created and that are active channel members are assignable). (string) |
67
75
  | `--status` | No | [tasks] op=list: status filter — active (default, = not done), all, or a comma list of todo, in_progress, in_review, done. op=status: the new status (one of those four). (string) |
68
76
  | `--reason` | No | [tasks] op=status: optional note recorded on the status-change event. (string) |
69
77
  | `--involvement` | No | [tasks] list (channel_id mode): me narrows to tasks the caller has a tie to (assignee, requester, creator, or thread participant). Default all. (string, one of: all, me) |
70
78
  | `--assignee` | No | [tasks] list: assignee filter — current (the caller), unassigned, agent:<id>, or human:<cogen_id>. (string) |
71
79
  | `--requester` | No | [tasks] list: requester/owner filter — same forms as assignee. (string) |
80
+ | `--unread` | No | [mark_read] true marks the conversation back to unread (Slack-style 'come back later') instead of read. Default: false. (boolean, default: `False`) |
81
+ | `--target_channel_id` | No | [forward] Group chat or DM to forward into (from genteam_list_channels). Threads are not valid targets — the app forwards into channels and DMs only. (string) |
82
+ | `--note` | No | [forward] Optional message of your own shown above the forwarded card (plain text). (string) |
72
83
 
73
84
  ## Local File Support
74
85
 
@@ -76,7 +87,7 @@ Parameters that accept URLs (`--invite_url`) also accept local file paths. The C
76
87
 
77
88
  ## Write Confirmation (double-call)
78
89
 
79
- Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. 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: 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` right after a pending response is honored; gated actions without that flag complete ONLY via the double-call.
90
+ Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. Completing the 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.
80
91
 
81
92
  ## See Also
82
93
 
@@ -58,7 +58,7 @@ gsk github [options]
58
58
 
59
59
  ## Write Confirmation (double-call)
60
60
 
61
- Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. 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: 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` right after a pending response is honored; gated actions without that flag complete ONLY via the double-call.
61
+ Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. Completing the 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.
62
62
 
63
63
  ## See Also
64
64
 
@@ -30,7 +30,7 @@ gsk gmail [options]
30
30
 
31
31
  | Flag | Required | Description |
32
32
  |------|----------|-------------|
33
- | `<action>` (positional) | Yes | Action to perform. 'search': Search emails by query; 'read': Read a specific email by ID; 'send': Compose and send an email; 'draft': Save an email to the Drafts folder without sending; 'reply': Reply to an existing email; 'forward': Forward an email to new recipients; 'delete': Delete an email; 'archive': Archive an email; 'move': Move an email to a different label/folder; 'mark_as_read': Mark an email as read or unread; 'add_label': Add a label to an email; 'remove_label': Remove a label from an email; 'create_label': Create a new Gmail label; 'get_attachment': Download an email attachment; 'list_send_as': List available send-as aliases; 'get_vacation': Get the vacation (out-of-office) auto-reply settings; 'update_vacation': Enable, disable, or update the vacation (out-of-office) auto-reply; 'get_signature': Get the signature of a send-as address; 'update_signature': Set or clear the signature of a send-as address (string, one of: search, read, send, draft, reply, forward, delete, archive, move, mark_as_read, add_label, remove_label, create_label, get_attachment, list_send_as, get_vacation, update_vacation, get_signature, update_signature) |
33
+ | `<action>` (positional) | Yes | Action to perform. 'search': Search emails by query; 'read': Read a specific email by ID; 'send': Compose and send an email. Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'draft': Save an email to the Drafts folder without sending; 'reply': Reply to an existing email. Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'forward': Forward an email to new recipients. Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'delete': Delete an email. Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'archive': Archive an email; 'move': Move an email to a different label/folder. Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'mark_as_read': Mark an email as read or unread; 'add_label': Add a label to an email; 'remove_label': Remove a label from an email; 'create_label': Create a new Gmail label; 'get_attachment': Download an email attachment; 'list_send_as': List available send-as aliases; 'get_vacation': Get the vacation (out-of-office) auto-reply settings; 'update_vacation': Enable, disable, or update the vacation (out-of-office) auto-reply. Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'get_signature': Get the signature of a send-as address; 'update_signature': Set or clear the signature of a send-as address. Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes. (string, one of: search, read, send, draft, reply, forward, delete, archive, move, mark_as_read, add_label, remove_label, create_label, get_attachment, list_send_as, get_vacation, update_vacation, get_signature, update_signature) |
34
34
  | `--query` | No | [search] Query to filter emails using Gmail search syntax. Examples:\n- Simple: 'meeting'\n- From Sender: 'from:boss@example.com'\n- Subject: 'subject:report'\n- In Folder: 'in:spam', 'in:inbox', 'in:trash', 'in:sent'\n- Label: 'label:important'\n- Unread: 'is:unread'\n- Unread in Spam: 'in:spam is:unread'\n- Has Attachment: 'has:attachment'\n- Date Range: 'after:2024/01/01 before:2024/01/31'\n- Newer Than: 'newer_than:7d' (7 days)\n- Older Than: 'older_than:1m' (1 month)\nNote: Some queries like 'is:recent' are invalid. (string) |
35
35
  | `--after_date` | No | [search] Filter emails received after this date (inclusive). Format: YYYY/MM/DD (e.g., '2024/01/01'). This is equivalent to adding 'after:YYYY/MM/DD' to the query. (string) |
36
36
  | `--before_date` | No | [search] Filter emails received before this date (exclusive). Format: YYYY/MM/DD (e.g., '2024/01/31'). This is equivalent to adding 'before:YYYY/MM/DD' to the query. (string) |
@@ -55,6 +55,7 @@ gsk gmail [options]
55
55
  | `--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`) |
56
56
  | `--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`) |
57
57
  | `--client_send_id` | No | [send] Optional stable idempotency key. When provided, stored in X-Genspark-Client-Send-Id and mirrored into a provider-safe Message-ID digest. Scheduled agent retries use it for internal deduplication. Usually auto-resolved from the active scheduled-action context — the LLM only needs to pass this when it wants to derive its own key (e.g. plan fan-out). (string) |
58
+ | `--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`) |
58
59
  | `--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). \| [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). (array) |
59
60
  | `--body_type` | No | [draft] Body format: 'html' (default) or 'text'. (string) |
60
61
  | `--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) |
@@ -86,7 +87,7 @@ gsk gmail [options]
86
87
 
87
88
  ## Write Confirmation (double-call)
88
89
 
89
- Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. 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: 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` right after a pending response is honored; gated actions without that flag complete ONLY via the double-call.
90
+ Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. Completing the 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.
90
91
 
91
92
  ## See Also
92
93
 
@@ -63,7 +63,7 @@ gsk google_calendar [options]
63
63
 
64
64
  ## Write Confirmation (double-call)
65
65
 
66
- Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. 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: 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` right after a pending response is honored; gated actions without that flag complete ONLY via the double-call.
66
+ Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. Completing the 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.
67
67
 
68
68
  ## See Also
69
69
 
@@ -30,7 +30,7 @@ gsk google_chat [options]
30
30
 
31
31
  | Flag | Required | Description |
32
32
  |------|----------|-------------|
33
- | `<action>` (positional) | Yes | Action to perform. 'list_spaces': List spaces (rooms, group chats, and DMs); 'read': Read recent messages from a space; 'send': Send a message to a space (recipients see a Genspark app label next to the sender's name — Google adds it, it cannot be hidden); 'upload': Upload a file (local path, file-wrapper URL, AI Drive path, or text content) to a space as a message attachment; 'update': Edit the text of one of your own messages; 'delete': Delete one of your own messages; 'react': Add or remove an emoji reaction on a message (unicode emoji; remove affects your own reaction only); 'list_members': List all members of a space (full roster) (string, one of: list_spaces, read, send, upload, update, delete, react, list_members) |
33
+ | `<action>` (positional) | Yes | Action to perform. 'list_spaces': List spaces (rooms, group chats, and DMs); 'read': Read recent messages from a space; 'send': Send a message to a space (recipients see a Genspark app label next to the sender's name — Google adds it, it cannot be hidden). Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'upload': Upload a file (local path, file-wrapper URL, AI Drive path, or text content) to a space as a message attachment. Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'update': Edit the text of one of your own messages. Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'delete': Delete one of your own messages. Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'react': Add or remove an emoji reaction on a message (unicode emoji; remove affects your own reaction only). Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes.; 'list_members': List all members of a space (full roster) (string, one of: list_spaces, read, send, upload, update, delete, react, list_members) |
34
34
  | `--search_query` | No | [list_spaces] Optional case-insensitive filter on the space display name. (string) |
35
35
  | `--limit` | No | [list_spaces] Maximum number of spaces to return (1-200). Default: 50 \| [read] Maximum number of messages to return (1-100). Default: 25 (integer) |
36
36
  | `--space` | No | [read] Space resource name, e.g. 'spaces/AAAAxxxx'. \| [send] Space resource name, e.g. 'spaces/AAAAxxxx'. \| [upload] Space resource name, e.g. 'spaces/AAAAxxxx'. \| [list_members] Space resource name, e.g. 'spaces/AAAAxxxx'. (string) |
@@ -48,7 +48,7 @@ gsk google_chat [options]
48
48
 
49
49
  ## Write Confirmation (double-call)
50
50
 
51
- Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. 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: 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` right after a pending response is honored; gated actions without that flag complete ONLY via the double-call.
51
+ Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. Completing the 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.
52
52
 
53
53
  ## See Also
54
54
 
@@ -43,7 +43,7 @@ gsk docs [options]
43
43
 
44
44
  ## Write Confirmation (double-call)
45
45
 
46
- Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. 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: 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` right after a pending response is honored; gated actions without that flag complete ONLY via the double-call.
46
+ Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. Completing the 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.
47
47
 
48
48
  ## See Also
49
49
 
@@ -30,7 +30,7 @@ gsk gdrive [options]
30
30
 
31
31
  | Flag | Required | Description |
32
32
  |------|----------|-------------|
33
- | `<action>` (positional) | Yes | Action to perform. 'list': List files directly inside a Google Drive folder; 'search': Search files by name, type, or owner; 'read': Read and extract content from a file; 'upload': Upload a new file to Google Drive, or overwrite an existing one in place by passing its file_id (the ID, link, and shares are preserved); 'share': Grant access to a file (specific emails or anyone-with-link; app-created/opened files only under drive.file) (string, one of: list, search, read, upload, share) |
33
+ | `<action>` (positional) | Yes | Action to perform. 'list': List files directly inside a Google Drive folder; 'search': Search files by name, type, or owner; 'read': Read and extract content from a file; 'upload': Upload a new file to Google Drive, or overwrite an existing one in place by passing its file_id (the ID, link, and shares are preserved); 'share': Grant access to a file (specific emails or anyone-with-link; app-created/opened files only under drive.file). Confirmation-gated: requires --project-id / GSK_PROJECT_ID — the first call returns pending_confirmation, re-running the identical command executes. (string, one of: list, search, read, upload, share) |
34
34
  | `--folder_id` | No | [list] Google Drive folder ID or folder URL. \| [search] Search within a specific folder for 'search' action. Accepts a folder ID or Google Drive folder URL. \| [upload] Google Drive folder ID to upload to. Optional, uploads to root if not specified. Ignored when 'file_id' is set. (string) |
35
35
  | `--folder_url` | No | [list] Google Drive folder URL. \| [search] Google Drive folder URL to list/search within. (string) |
36
36
  | `--mime_type` | No | [list] Optional MIME type filter. \| [search] Filter by MIME type for 'search' (e.g., 'application/pdf'). \| [upload] The MIME type of the file (optional, will be auto-detected from file_name extension). Examples: 'text/plain', 'text/csv', 'application/json', 'image/png'. (string) |
@@ -59,7 +59,7 @@ Parameters that accept URLs (`--folder_url`, `--file_url`) also accept local fil
59
59
 
60
60
  ## Write Confirmation (double-call)
61
61
 
62
- Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. 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: 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` right after a pending response is honored; gated actions without that flag complete ONLY via the double-call.
62
+ Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. Completing the 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.
63
63
 
64
64
  ## See Also
65
65
 
@@ -52,7 +52,7 @@ Parameters that accept URLs (`--from_url`) also accept local file paths. The CLI
52
52
 
53
53
  ## Write Confirmation (double-call)
54
54
 
55
- Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. 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: 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` right after a pending response is honored; gated actions without that flag complete ONLY via the double-call.
55
+ Write actions (send / create / update / delete / react / upload, and write methods through `api` where present) may be confirmation-gated. Completing the 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.
56
56
 
57
57
  ## See Also
58
58