@genspark/cli 1.7.1 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,98 @@
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
+ import type { ApiResponse } from './types.js';
24
+ export interface PendingApprovalInfo {
25
+ id: string;
26
+ summary: string;
27
+ diffPreview?: unknown;
28
+ expiresAt?: string;
29
+ }
30
+ /**
31
+ * Recognize a pending-approval submission envelope. Requires the
32
+ * `pending_action_id` — without it the flow could not approve anything,
33
+ * so such an envelope just prints as-is.
34
+ */
35
+ export declare function extractPendingApproval(envelope: ApiResponse): PendingApprovalInfo | null;
36
+ /**
37
+ * Gate for the interactive flow: a pending-approval envelope, an
38
+ * interactive terminal on BOTH stdin and stdout (stdout piped to a file
39
+ * or another process must keep today's print-and-exit behavior even if
40
+ * stdin is a TTY), and no --no-input.
41
+ */
42
+ export declare function shouldPromptForApproval(envelope: ApiResponse, isInteractiveTty: boolean, noInput: boolean): boolean;
43
+ export type ApprovalAnswer = 'approve' | 'reject' | 'leave';
44
+ /** y/yes → approve, n/no → reject, anything else (incl. Enter) → leave. */
45
+ export declare function classifyAnswer(raw: string): ApprovalAnswer;
46
+ /**
47
+ * After hosted_action_approve: `wait` when the action is (already) approved
48
+ * and will execute; `present` for everything else — terminal translations
49
+ * (action_expired / action_rejected), cli_approve_disabled, not-found, and
50
+ * transport errors are all final answers the user just needs to see.
51
+ */
52
+ export declare function decideAfterApprove(envelope: ApiResponse): 'wait' | 'present';
53
+ export type WaitStep = {
54
+ kind: 'present';
55
+ } | {
56
+ kind: 'continue';
57
+ progress: string;
58
+ } | {
59
+ kind: 'exhausted';
60
+ notice: string;
61
+ };
62
+ /**
63
+ * Reduce one hosted_action_wait envelope to the next loop step.
64
+ *
65
+ * - terminal codes (completed / execution_failed / action_rejected /
66
+ * action_expired), unknown codes and transport errors → present as-is;
67
+ * - still_pending with server budget left (retryable=true) → continue;
68
+ * - still_pending with the budget spent → exhausted: stop looping, tell the
69
+ * user on stderr what to run next, and still present the envelope.
70
+ */
71
+ export declare function nextWaitStep(envelope: ApiResponse, actionId: string): WaitStep;
72
+ /**
73
+ * stderr banner shown before the y/n prompt. Pure so the expiry math is
74
+ * testable; `nowMs` defaults to the real clock at the call site.
75
+ */
76
+ export declare function pendingPromptLines(info: PendingApprovalInfo, nowMs: number): string[];
77
+ /** The side-effect surface of the flow — faked in unit tests. */
78
+ export interface ApprovalIo {
79
+ executeTool(toolName: string, args: Record<string, unknown>): Promise<ApiResponse>;
80
+ /** Ask on stderr, resolve with the raw answer line. */
81
+ ask(question: string): Promise<string>;
82
+ /** One human-facing progress/banner line on stderr. */
83
+ notify(line: string): void;
84
+ now(): number;
85
+ }
86
+ /**
87
+ * Full decision flow for one pending-approval envelope. Returns the ONE
88
+ * transport envelope the caller must print to stdout — always the last
89
+ * one received (or the untouched original when the user leaves it pending).
90
+ */
91
+ export declare function runPendingApprovalFlow(pendingEnvelope: ApiResponse, io: ApprovalIo): Promise<ApiResponse>;
92
+ /**
93
+ * Thin TTY shell around runPendingApprovalFlow: readline over
94
+ * stdin/stderr (NEVER stdout — it must stay one machine-parseable JSON
95
+ * document). Only called when shouldPromptForApproval() returned true.
96
+ */
97
+ export declare function runInteractiveApprovalFlow(pendingEnvelope: ApiResponse, executeTool: (toolName: string, args: Record<string, unknown>) => Promise<ApiResponse>): Promise<ApiResponse>;
98
+ //# sourceMappingURL=pendingApproval.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pendingApproval.d.ts","sourceRoot":"","sources":["../src/pendingApproval.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AA+B7C,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,WAAW,GACpB,mBAAmB,GAAG,IAAI,CAa5B;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,WAAW,EACrB,gBAAgB,EAAE,OAAO,EACzB,OAAO,EAAE,OAAO,GACf,OAAO,CAIT;AAED,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE3D,2EAA2E;AAC3E,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAK1D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAK5E;AAED,MAAM,MAAM,QAAQ,GAChB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAEzC;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,WAAW,EACrB,QAAQ,EAAE,MAAM,GACf,QAAQ,CA2BV;AAmBD;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,mBAAmB,EACzB,KAAK,EAAE,MAAM,GACZ,MAAM,EAAE,CA2BV;AAED,iEAAiE;AACjE,MAAM,WAAW,UAAU;IACzB,WAAW,CACT,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,WAAW,CAAC,CAAA;IACvB,uDAAuD;IACvD,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACtC,uDAAuD;IACvD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,GAAG,IAAI,MAAM,CAAA;CACd;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAC1C,eAAe,EAAE,WAAW,EAC5B,EAAE,EAAE,UAAU,GACb,OAAO,CAAC,WAAW,CAAC,CA4CtB;AAED;;;;GAIG;AACH,wBAAsB,0BAA0B,CAC9C,eAAe,EAAE,WAAW,EAC5B,WAAW,EAAE,CACX,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC1B,OAAO,CAAC,WAAW,CAAC,GACxB,OAAO,CAAC,WAAW,CAAC,CA4BtB"}
@@ -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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AG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAA;IACvD,MAAM,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC;QAClC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAA;IACF,0EAA0E;IAC1E,2EAA2E;IAC3E,yEAAyE;IACzE,yEAAyE;IACzE,wEAAwE;IACxE,wEAAwE;IACxE,MAAM,aAAa,GAAG,IAAI,OAAO,CAAS,OAAO,CAAC,EAAE,CAClD,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CACpC,CAAA;IACD,IAAI,CAAC;QACH,OAAO,MAAM,sBAAsB,CAAC,eAAe,EAAE;YACnD,WAAW;YACX,GAAG,EAAE,QAAQ,CAAC,EAAE,CACd,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAChE,EAAE,CAAC,KAAK,EAAE,CACX;YACH,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;YACnC,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;SACtB,CAAC,CAAA;IACJ,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,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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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. |
@@ -41,13 +41,13 @@
41
41
  | [gsk-onedrive](../skills/gsk-onedrive/SKILL.md) | OneDrive file operations. Actions: list, search, read, upload, share. |
42
42
  | [gsk-outlook-calendar](../skills/gsk-outlook-calendar/SKILL.md) | Outlook Calendar operations. Actions: list, free_busy, create, respond, modify, delete. |
43
43
  | [gsk-outlook-contacts](../skills/gsk-outlook-contacts/SKILL.md) | Outlook Contacts operations. Actions: search. |
44
- | [gsk-outlook-email](../skills/gsk-outlook-email/SKILL.md) | Outlook Email operations. Actions: search, read, list_folders, list_emails, list_email_changes, send, draft, reply, r... |
44
+ | [gsk-outlook-email](../skills/gsk-outlook-email/SKILL.md) | Outlook Email operations. Actions: search, read, list_folders, create_folder, list_emails, list_email_changes, list_r... |
45
45
  | [gsk-phone-call](../skills/gsk-phone-call/SKILL.md) | Make a real AI phone call on the user's behalf. Validates prerequisites (membership, phone setup, credits), resolves ... |
46
46
  | [gsk-salesforce](../skills/gsk-salesforce/SKILL.md) | Salesforce DX CLI (`sf`) operations in a pre-authenticated sandbox. Actions: run (forwards any `sf` subcommand). |
47
47
  | [gsk-scholar-search](../skills/gsk-scholar-search/SKILL.md) | Search scholarly articles and academic papers. Returns matching papers with titles, authors, venues, and citation cou... |
48
48
  | [gsk-sharepoint](../skills/gsk-sharepoint/SKILL.md) | SharePoint site and file operations. Actions: list, search, read_content, read_file, upload. |
49
49
  | [gsk-sharepoint-upload](../skills/gsk-sharepoint-upload/SKILL.md) | Upload a file to a SharePoint document library. |
50
- | [gsk-slack](../skills/gsk-slack/SKILL.md) | Slack messaging operations. Actions: send, search, read, lookup, react, upload, update, delete, permalink, connect_in... |
50
+ | [gsk-slack](../skills/gsk-slack/SKILL.md) | Slack messaging operations. Actions: send, search, read, lookup, react, upload, update, delete, permalink. |
51
51
  | [gsk-social-instagram](../skills/gsk-social-instagram/SKILL.md) | Search and retrieve data from Instagram: posts, users, comments, and connections. |
52
52
  | [gsk-social-reddit](../skills/gsk-social-reddit/SKILL.md) | Search and retrieve data from Reddit: posts, comments, users, and subreddits. |
53
53
  | [gsk-social-twitter](../skills/gsk-social-twitter/SKILL.md) | Search and retrieve data from Twitter/X: posts, users, comments, retweets, and more. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genspark/cli",
3
- "version": "1.7.1",
3
+ "version": "1.8.1",
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",
@@ -50,15 +50,15 @@ gsk drive [options]
50
50
  | `--general_access` | No | Who else can open it, for share without a recipient: restricted, org, or link. (string, one of: restricted, org, link) |
51
51
  | `--organization_id` | No | Which organization to share with, when you belong to more than one and use to=org or to=group:<uid>. (string) |
52
52
  | `--expires_at` | No | Optional ISO-8601 UTC instant after which the access stops, e.g. 2026-12-31T00:00:00+00:00. (string) |
53
- | `-p`, `--path` | No | Path to file or folder for ls, mkdir, rm, move, get_readable_url. For link: the existing source path in My Drive. For unlink: the LinkNode path in the selected managed source. For compress: folder path to compress. For decompress: archive file path to extract. For find: directory to search within (default '/' searches everywhere). (string) |
54
- | `-q`, `--query` | No | Filename search keyword for find. Matches files and directories whose name contains the keyword. Case-insensitive. Supports partial matches. (string) |
53
+ | `-p`, `--path` | No | Path to file or folder for ls, mkdir, rm, move, get_readable_url. For link: the existing source path in My Drive. For unlink: the LinkNode path in the selected managed source. For compress: folder path to compress. For decompress: archive file path to extract. For find: which directory to search. Omit it to search the whole of My Drive, or the root of the selected shared source. Naming a directory searches THAT DIRECTORY ONLY and does not descend into its subfolders — and a shared folder's own root is one such directory. To cover a subtree, find in each subfolder in turn. (string) |
54
+ | `-q`, `--query` | No | Search keyword for find. Case-insensitive substring matching on the entry name, and on stored search metadata for typed links. A multi-word query matches entries containing EVERY word, in any order — 'budget 2025' finds '2025 budget'. Words are split on spaces only, so a space-free script (Chinese, Japanese) stays one term. (string) |
55
55
  | `-f`, `--filter_type` | No | Filter by entry type for ls (improves performance): all (default), file, directory. Use 'file' when only need files. (string, one of: all, file, directory) |
56
56
  | `--file_type` | No | Filter by file MIME type for ls (improves performance): all (default), audio, video, image. Combine with filter_type='file' for best results. (string, one of: all, audio, video, image) |
57
- | `--target_path` | No | Destination entry path for move; destination directory for restore (the original filename is retained); destination directory inside the selected Shared Drive source for link. (string) |
57
+ | `--target_path` | No | Destination entry path for move; destination directory for restore (the original filename is retained); destination directory inside the selected Team Drive source for link. (string) |
58
58
  | `--entry_id` | No | Stable entry id, required by restore. (string) |
59
59
  | `--target_folder` | No | Destination folder for download_video, download_audio, and download_file (string) |
60
- | `--video_url` | No | Video URL to save into Drive with download_video (string) |
61
- | `--audio_url` | No | Audio/video URL to save into Drive with download_audio (string) |
60
+ | `--video_url` | No | Video URL to save into Drive with download_video. YouTube: billed 1 credit per MB of the delivered file (min 1 credit); downloads estimated over 1 GB are rejected up front. (string) |
61
+ | `--audio_url` | No | Audio/video URL to save into Drive with download_audio. YouTube: billed 1 credit per MB of the delivered file (min 1 credit); downloads estimated over 1 GB are rejected up front. (string) |
62
62
  | `--file_url` | No | External file URL to save into Drive with download_file (string) |
63
63
  | `--file_name` | No | Filename for download_file (for example annual_report.pdf); inferred when omitted (string) |
64
64
  | `--file_content` | No | Content to upload to AI Drive. Can be plain text or base64-encoded binary data. For text files (txt, md, json, csv, etc.), provide plain text content. For binary files, provide base64-encoded content with 'base64:' prefix. Size limit: 1MB without confirmation, 5MB absolute maximum. (string) |
@@ -72,6 +72,10 @@ gsk drive [options]
72
72
  - Upload a file or directory with `gsk drive upload --local_file <local-path> --upload_path /destination` (add `--override` to replace existing files). For shared locations, also pass `--workspace shared_with_me|shared_drive --source <source_id>`. The source drive owns the uploaded bytes and quota.
73
73
  - Download to this machine with `gsk drive download <drive-path> [local-path]`; this is distinct from `download_file`, which saves an external URL into Drive.
74
74
 
75
+ ## YouTube Downloads
76
+
77
+ `download_video` / `download_audio` with a YouTube URL bill 1 credit per MB of the delivered file (min 1 credit); requests estimated over 1 GB are rejected up front. Time-range clipping is not supported for YouTube — provider clip downloads are broken, so download the full video and trim it locally.
78
+
75
79
  ## Local File Support
76
80
 
77
81
  Parameters that accept URLs (`--video_url`, `--audio_url`, `--file_url`) also accept local file paths. The CLI automatically uploads local files before sending to the API.
@@ -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