@genspark/cli 1.7.0 → 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.
Files changed (39) hide show
  1. package/README.md +21 -9
  2. package/dist/commands/aidrive-download.d.ts +7 -0
  3. package/dist/commands/aidrive-download.d.ts.map +1 -1
  4. package/dist/commands/aidrive-download.js +17 -1
  5. package/dist/commands/aidrive-download.js.map +1 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +87 -44
  8. package/dist/index.js.map +1 -1
  9. package/dist/pendingApproval.d.ts +98 -0
  10. package/dist/pendingApproval.d.ts.map +1 -0
  11. package/dist/pendingApproval.js +252 -0
  12. package/dist/pendingApproval.js.map +1 -0
  13. package/dist/types.d.ts +2 -0
  14. package/dist/types.d.ts.map +1 -1
  15. package/docs/skills.md +4 -4
  16. package/package.json +1 -1
  17. package/skills/gsk-aidrive/SKILL.md +38 -24
  18. package/skills/gsk-batch-crawl-url-and-answer/SKILL.md +7 -7
  19. package/skills/gsk-genteam/SKILL.md +40 -23
  20. package/skills/gsk-github/SKILL.md +1 -1
  21. package/skills/gsk-gmail/SKILL.md +3 -2
  22. package/skills/gsk-google-calendar/SKILL.md +1 -1
  23. package/skills/gsk-google-chat/SKILL.md +4 -2
  24. package/skills/gsk-google-docs/SKILL.md +1 -1
  25. package/skills/gsk-google-drive/SKILL.md +2 -2
  26. package/skills/gsk-google-sheets/SKILL.md +1 -1
  27. package/skills/gsk-google-slides/SKILL.md +1 -1
  28. package/skills/gsk-hub/SKILL.md +1 -1
  29. package/skills/gsk-meeting/SKILL.md +8 -2
  30. package/skills/gsk-microsoft-teams/SKILL.md +6 -5
  31. package/skills/gsk-notion/SKILL.md +1 -1
  32. package/skills/gsk-onedrive/SKILL.md +2 -2
  33. package/skills/gsk-outlook-calendar/SKILL.md +1 -1
  34. package/skills/gsk-outlook-email/SKILL.md +4 -2
  35. package/skills/gsk-phone-call/SKILL.md +19 -11
  36. package/skills/gsk-sharepoint/SKILL.md +2 -2
  37. package/skills/gsk-slack/SKILL.md +4 -3
  38. package/skills/gsk-video-generation/SKILL.md +3 -3
  39. package/skills/gsk-youtube/SKILL.md +11 -4
@@ -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,MAA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AAC,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":[],"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,UA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;IACnB,IAAI,EAAE,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
@@ -8,17 +8,17 @@
8
8
 
9
9
  | Skill | Description |
10
10
  |-------|-------------|
11
- | [gsk-aidrive](../skills/gsk-aidrive/SKILL.md) | AI-Drive file storage and management. Actions: ls, find, mkdir, rm, move, get_readable_url, download, download_video,... |
11
+ | [gsk-aidrive](../skills/gsk-aidrive/SKILL.md) | AI-Drive file storage and management, plus the generic web downloader: download_video / download_audio / download_fil... |
12
12
  | [gsk-analyze-media](../skills/gsk-analyze-media/SKILL.md) | Analyze various types of media content including images, audio, and video. Returns per-file JSON with the analysis an... |
13
13
  | [gsk-audio-generation](../skills/gsk-audio-generation/SKILL.md) | Generate audio (TTS, sound effects, music) with per-model params; query get_model_info for each model's params_schema. |
14
14
  | [gsk-audio-processing](../skills/gsk-audio-processing/SKILL.md) | Process audio: separate vocals/voice from music or extract any stem by text prompt (e.g. 'singing voice', 'piano', 'd... |
15
15
  | [gsk-audio-transcribe](../skills/gsk-audio-transcribe/SKILL.md) | Transcribe audio files to text with word-level timestamps. |
16
- | [gsk-batch-crawl-url-and-answer](../skills/gsk-batch-crawl-url-and-answer/SKILL.md) | Crawl multiple URLs in parallel and answer specific questions from each. More efficient than calling crawler multiple... |
16
+ | [gsk-batch-crawl-url-and-answer](../skills/gsk-batch-crawl-url-and-answer/SKILL.md) | Crawl multiple URLs in parallel and answer specific questions from each. Returns extracted answers with quotes, NOT t... |
17
17
  | [gsk-batch-understand-videos](../skills/gsk-batch-understand-videos/SKILL.md) | Process multiple YouTube videos in parallel: fetch each transcript and answer per-video questions. Input: list of {vi... |
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. |
@@ -35,7 +35,7 @@
35
35
  | [gsk-image-search](../skills/gsk-image-search/SKILL.md) | Search for images on the web. Returns image URLs, titles, and source information. |
36
36
  | [gsk-inbox-contacts](../skills/gsk-inbox-contacts/SKILL.md) | Unified contact lookup across all connected email accounts (Gmail + Outlook). Searches synced address-book contacts A... |
37
37
  | [gsk-maps-search](../skills/gsk-maps-search/SKILL.md) | Search maps for places, local businesses, distances between locations, and directions. Use ONLY for geographical/loca... |
38
- | [gsk-meeting](../skills/gsk-meeting/SKILL.md) | Meeting notes operations. Actions: list, search, get. |
38
+ | [gsk-meeting](../skills/gsk-meeting/SKILL.md) | Meeting notes operations. Actions: list, search, get. Covers the user's meeting/voice notes from ALL capture apps: no... |
39
39
  | [gsk-microsoft-teams](../skills/gsk-microsoft-teams/SKILL.md) | Microsoft Teams operations. Actions: send, list_channels, list_chats, read_chat, list_channel_messages, list_channel_... |
40
40
  | [gsk-notion](../skills/gsk-notion/SKILL.md) | Notion page operations. Actions: search, read, create. |
41
41
  | [gsk-onedrive](../skills/gsk-onedrive/SKILL.md) | OneDrive file operations. Actions: list, search, read, upload, share. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genspark/cli",
3
- "version": "1.7.0",
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",
@@ -1,13 +1,19 @@
1
1
  ---
2
2
  name: gsk-aidrive
3
3
  version: 1.0.0
4
- description: 'AI-Drive file storage and management. Actions: ls, find, mkdir, rm,
5
- move, get_readable_url, download, download_video, download_audio, download_file,
6
- upload. `ls` lists ONE directory (non-recursive) — to locate files by name anywhere
7
- in the drive, use `find` (one indexed query) instead of walking directories with
8
- repeated `ls`. `download <ai-drive-path> [local-path]` copies a drive file OUT to
4
+ description: 'AI-Drive file storage and management, plus the generic web downloader:
5
+ download_video / download_audio / download_file fetch a URL (YouTube, social media,
6
+ direct file links) server-side into the drive and return a download link. Canonical
7
+ actions: ls, find, mkdir, rm, move, get_readable_url, download, download_video,
8
+ download_audio, download_file, compress, decompress, share, unshare, access, link,
9
+ unlink, upload, list_trash, restore. `rm` moves native entries to recoverable trash
10
+ and unlinks delegated aliases without touching their source. `ls` reads one directory;
11
+ use indexed `find` to locate names across the drive. `shared_with_me` is a view
12
+ across source containers; ls it first and reuse a returned `source_id`. A delegated
13
+ LinkNode row returns `link_workspace_id`; reuse it as `--source` to mount the live
14
+ source entry. `download <ai-drive-path> [local-path]` copies a drive file OUT to
9
15
  local disk (the path may be spelled `aidrive://...`); `download_file --file_url
10
- <url>` goes the OPPOSITE direction, saving an external URL INTO the drive.'
16
+ <url>` goes the opposite direction, saving an external URL INTO the drive.'
11
17
  metadata:
12
18
  category: general
13
19
  requires:
@@ -20,7 +26,7 @@ metadata:
20
26
 
21
27
  **PREREQUISITE:** Read `../gsk-shared/SKILL.md` for auth, global flags, and security rules.
22
28
 
23
- AI-Drive file storage and management. Actions: ls, find, mkdir, rm, move, get_readable_url, download, download_video, download_audio, download_file, upload. `ls` lists ONE directory (non-recursive) — to locate files by name anywhere in the drive, use `find` (one indexed query) instead of walking directories with repeated `ls`. `download <ai-drive-path> [local-path]` copies a drive file OUT to local disk (the path may be spelled `aidrive://...`); `download_file --file_url <url>` goes the OPPOSITE direction, saving an external URL INTO the drive.
29
+ AI-Drive file storage and management, plus the generic web downloader: download_video / download_audio / download_file fetch a URL (YouTube, social media, direct file links) server-side into the drive and return a download link. Canonical actions: ls, find, mkdir, rm, move, get_readable_url, download, download_video, download_audio, download_file, compress, decompress, share, unshare, access, link, unlink, upload, list_trash, restore. `rm` moves native entries to recoverable trash and unlinks delegated aliases without touching their source. `ls` reads one directory; use indexed `find` to locate names across the drive. `shared_with_me` is a view across source containers; ls it first and reuse a returned `source_id`. A delegated LinkNode row returns `link_workspace_id`; reuse it as `--source` to mount the live source entry. `download <ai-drive-path> [local-path]` copies a drive file OUT to local disk (the path may be spelled `aidrive://...`); `download_file --file_url <url>` goes the opposite direction, saving an external URL INTO the drive.
24
30
 
25
31
  ## Usage
26
32
 
@@ -34,30 +40,38 @@ gsk drive [options]
34
40
 
35
41
  | Flag | Required | Description |
36
42
  |------|----------|-------------|
37
- | `<action>` (positional) | Yes | Action to perform (string, one of: ls, find, mkdir, rm, move, get_readable_url, download, download_video, download_audio, download_file, upload) |
38
- | `--workspace` | No | AI Drive workspace. personal (default) is your own Drive, shared reaches folders other people shared with you, and public_brain is the system-owned Ask Org public knowledge workspace when you have editor access. (string, one of: personal, public_brain, shared, default: `personal`) |
39
- | `--share` | No | Which shared folder to work in, by name or id. Only for workspace=shared; omit it with ls to list everything shared with you. (string) |
40
- | `--to` | No | Who to share with, for the share/unshare actions: an email address, or 'org' / 'group:<uid>' for a whole organization or one of its groups. (string) |
41
- | `--permission` | No | What the recipient may do: view or edit (share action). The link audience can only ever view. (string, one of: view, edit, default: `view`) |
42
- | `--general_access` | No | Who else can open it, for the share action without a recipient: restricted, org, or link. (string, one of: restricted, org, link) |
43
+ | `<action>` (positional) | Yes | Action to perform (string, one of: ls, find, mkdir, rm, move, get_readable_url, download, download_video, download_audio, download_file, compress, decompress, share, unshare, access, link, unlink, upload, list_trash, restore) |
44
+ | `--workspace` | No | AI Drive location. my_drive owns your bytes and quota; shared_drive selects managed org, GenTeam, Hub, or authorized knowledge drives; shared_with_me is an ACL-filtered view across both kinds of container and owns no bytes or quota. (string, one of: my_drive, shared_with_me, shared_drive, default: `my_drive`) |
45
+ | `--source` | No | Stable source_id returned by ls in shared_with_me or shared_drive. It identifies the storage-owning drive and entry; names are accepted only when unique. (string) |
46
+ | `--share` | No | Deprecated alias for source, retained for older gsk scripts. (string) |
47
+ | `--to` | No | Who to share with, for share/unshare: an email address; My Drive also accepts 'org' / 'group:<uid>'. Managed Drive sources use email or general_access. (string) |
48
+ | `--permission` | No | What the recipient or delegated mount may do: view or edit (share/link). The public link audience can only ever view. (string, one of: view, edit, default: `view`) |
49
+ | `--link_name` | No | Optional destination alias for link. The source entry's current name is used when omitted. (string) |
50
+ | `--general_access` | No | Who else can open it, for share without a recipient: restricted, org, or link. (string, one of: restricted, org, link) |
43
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) |
44
52
  | `--expires_at` | No | Optional ISO-8601 UTC instant after which the access stops, e.g. 2026-12-31T00:00:00+00:00. (string) |
45
- | `-p`, `--path` | No | Path to file or folder for actions: ls, mkdir, rm, move, get_readable_url. For compress: folder path to compress. For decompress: archive file path to decompress. For find: directory to search within (default '/' searches everywhere). (string) |
46
- | `-q`, `--query` | No | Filename search keyword for find action. Matches files and directories whose name contains the keyword. Case-insensitive. Supports partial matches. (string) |
47
- | `-f`, `--filter_type` | No | Filter by entry type for ls action (improves performance): all (default), file, directory. Use 'file' when only need files. (string, one of: all, file, directory) |
48
- | `--file_type` | No | Filter by file MIME type for ls action (improves performance): all (default), audio, video, image. Combine with filter_type='file' for best results. (string, one of: all, audio, video, image) |
49
- | `--target_path` | No | Destination path, for move action only (string) |
50
- | `--target_folder` | No | Destination folder, for download_video, download_audio and download_file actions (string) |
51
- | `--video_url` | No | URL of video to download, for download_video action (string) |
52
- | `--audio_url` | No | URL of audio/video to download audio from, for download_audio action (string) |
53
- | `--file_url` | No | URL of file to download, for download_file action (string) |
54
- | `--file_name` | No | User-friendly filename with appropriate extension (e.g. annual_report.pdf) for download_file action. If not provided, system will auto-generate filename (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) |
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
+ | `--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) |
58
+ | `--entry_id` | No | Stable entry id, required by restore. (string) |
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) |
62
+ | `--file_url` | No | External file URL to save into Drive with download_file (string) |
63
+ | `--file_name` | No | Filename for download_file (for example annual_report.pdf); inferred when omitted (string) |
55
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) |
56
- | `--upload_path` | No | Target path for upload action (must start with '/' and include filename). To upload a new version of an existing file, reuse the same path with overwrite=true instead of creating v2/_final name variants; give genuinely new artifacts (e.g. each run of a recurring workflow) their own path. Create parent directories with mkdir action first if they don't exist. (string) |
65
+ | `--upload_path` | No | Target path for upload action (must start with '/' and include filename). To upload a new version of an existing file, reuse the same path with overwrite=true instead of creating v2/_final name variants; give genuinely new artifacts (e.g. each run of a recurring workflow) their own path. Create parent directories with mkdir first if they don't exist. (string) |
57
66
  | `--overwrite` | No | Set to true to overwrite the existing file at upload_path (upload action only; default false fails if the path exists). (boolean) |
58
67
  | `--content_type` | No | MIME type of the content. If not provided, will be auto-detected from filename. Common types: text/plain, text/markdown, application/json, text/csv (string) |
59
68
  | `--confirmed` | No | Set to true to confirm upload when: (1) file size > 1MB, or (2) content contains potentially sensitive patterns. If confirmation is required but not provided, upload will fail with a warning. (boolean) |
60
69
 
70
+ ## Local Drive Transfers
71
+
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
+ - 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
+
61
75
  ## Local File Support
62
76
 
63
77
  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,29 +2,29 @@
2
2
  name: gsk-batch-crawl-url-and-answer
3
3
  version: 1.0.0
4
4
  description: 'Crawl multiple URLs in parallel and answer specific questions from each.
5
- More efficient than calling crawler multiple times. Input: list of {url, questions_to_answer}
6
- jobs.'
5
+ Returns extracted answers with quotes, NOT the original page text — use crawler
6
+ when the original content is needed. Input: list of {url, questions_to_answer} jobs.'
7
7
  metadata:
8
8
  category: general
9
9
  requires:
10
10
  bins:
11
11
  - gsk
12
- cliHelp: gsk batch-crawl --help
12
+ cliHelp: gsk crawl-and-answer --help
13
13
  ---
14
14
 
15
15
  # gsk-batch-crawl-url-and-answer
16
16
 
17
17
  **PREREQUISITE:** Read `../gsk-shared/SKILL.md` for auth, global flags, and security rules.
18
18
 
19
- Crawl multiple URLs in parallel and answer specific questions from each. More efficient than calling crawler multiple times. Input: list of {url, questions_to_answer} jobs.
19
+ Crawl multiple URLs in parallel and answer specific questions from each. Returns extracted answers with quotes, NOT the original page text — use crawler when the original content is needed. Input: list of {url, questions_to_answer} jobs.
20
20
 
21
21
  ## Usage
22
22
 
23
23
  ```bash
24
- gsk batch-crawl [options]
24
+ gsk crawl-and-answer [options]
25
25
  ```
26
26
 
27
- **Aliases:** `batch-crawl`
27
+ **Aliases:** `crawl-and-answer`, `batch-crawl`
28
28
 
29
29
  ## When to Use
30
30
 
@@ -35,7 +35,7 @@ Some sites block automated access. Prefer official or otherwise reliable sources
35
35
  ## Example
36
36
 
37
37
  ```bash
38
- gsk batch-crawl '[{"url":"https://openai.com/pricing","questions_to_answer":["What are the pricing tiers?"]},{"url":"https://www.anthropic.com/pricing","questions_to_answer":["Which models are listed?"]}]'
38
+ gsk crawl-and-answer '[{"url":"https://openai.com/pricing","questions_to_answer":["What are the pricing tiers?"]},{"url":"https://www.anthropic.com/pricing","questions_to_answer":["Which models are listed?"]}]'
39
39
  ```
40
40
 
41
41
  ## Flags