@genspark/cli 1.11.2 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +217 -27
- package/dist/client.d.ts +67 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +328 -3
- package/dist/client.js.map +1 -1
- package/dist/commands/chat-events.d.ts +1 -1
- package/dist/commands/chat-events.js +1 -1
- package/dist/commands/developer-preflight.d.ts +17 -0
- package/dist/commands/developer-preflight.d.ts.map +1 -0
- package/dist/commands/developer-preflight.js +131 -0
- package/dist/commands/developer-preflight.js.map +1 -0
- package/dist/commands/developer-project.d.ts +5 -0
- package/dist/commands/developer-project.d.ts.map +1 -0
- package/dist/commands/developer-project.js +140 -0
- package/dist/commands/developer-project.js.map +1 -0
- package/dist/commands/genspark-code-skills.d.ts +23 -0
- package/dist/commands/genspark-code-skills.d.ts.map +1 -0
- package/dist/commands/genspark-code-skills.js +49 -0
- package/dist/commands/genspark-code-skills.js.map +1 -0
- package/dist/commands/hosted-local.d.ts +10 -0
- package/dist/commands/hosted-local.d.ts.map +1 -0
- package/dist/commands/hosted-local.js +116 -0
- package/dist/commands/hosted-local.js.map +1 -0
- package/dist/commands/local-command-routing.d.ts +8 -0
- package/dist/commands/local-command-routing.d.ts.map +1 -0
- package/dist/commands/local-command-routing.js +33 -0
- package/dist/commands/local-command-routing.js.map +1 -0
- package/dist/commands/local-preview.d.ts +5 -0
- package/dist/commands/local-preview.d.ts.map +1 -0
- package/dist/commands/local-preview.js +35 -0
- package/dist/commands/local-preview.js.map +1 -0
- package/dist/commands/pi-config.d.ts +30 -0
- package/dist/commands/pi-config.d.ts.map +1 -0
- package/dist/commands/pi-config.js +72 -0
- package/dist/commands/pi-config.js.map +1 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +12 -1
- package/dist/config.js.map +1 -1
- package/dist/confirm.d.ts +59 -3
- package/dist/confirm.d.ts.map +1 -1
- package/dist/confirm.js +91 -11
- package/dist/confirm.js.map +1 -1
- package/dist/developer-contract.d.ts +24 -0
- package/dist/developer-contract.d.ts.map +1 -0
- package/dist/developer-contract.js +64 -0
- package/dist/developer-contract.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +286 -25
- package/dist/index.js.map +1 -1
- package/dist/local-source.d.ts +22 -0
- package/dist/local-source.d.ts.map +1 -0
- package/dist/local-source.js +204 -0
- package/dist/local-source.js.map +1 -0
- package/dist/project-binding.d.ts +31 -0
- package/dist/project-binding.d.ts.map +1 -0
- package/dist/project-binding.js +141 -0
- package/dist/project-binding.js.map +1 -0
- package/dist/types.d.ts +21 -0
- package/dist/types.d.ts.map +1 -1
- package/docs/confirmation.md +113 -6
- package/docs/skills.md +3 -2
- package/package.json +4 -2
- package/skills/gsk-aidrive/SKILL.md +25 -5
- package/skills/gsk-audio-generation/SKILL.md +1 -1
- package/skills/gsk-claw-share-link/SKILL.md +1 -1
- package/skills/gsk-genteam/SKILL.md +7 -8
- package/skills/gsk-gmail/SKILL.md +7 -7
- package/skills/gsk-google-calendar/SKILL.md +4 -5
- package/skills/gsk-google-chat/SKILL.md +2 -4
- package/skills/gsk-google-drive/SKILL.md +4 -2
- package/skills/gsk-microsoft-teams/SKILL.md +3 -7
- package/skills/gsk-onedrive/SKILL.md +4 -2
- package/skills/gsk-outlook-calendar/SKILL.md +4 -5
- package/skills/gsk-outlook-email/SKILL.md +7 -7
- package/skills/gsk-sb-brain/SKILL.md +61 -0
- package/skills/gsk-second-brain/SKILL.md +158 -0
- package/skills/gsk-shared/SKILL.md +20 -0
- package/skills/gsk-slack/SKILL.md +4 -4
package/README.md
CHANGED
|
@@ -77,6 +77,115 @@ gsk img "A beautiful sunset over mountains" -o ./sunset.png
|
|
|
77
77
|
gsk crawl "https://example.com/article"
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
+
## Local developer projects, previews, and source deployments
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
gsk project create --kind web --name "Example" --yes
|
|
84
|
+
gsk project bind <project-id>
|
|
85
|
+
gsk project status
|
|
86
|
+
gsk preflight --kind web --operation preview
|
|
87
|
+
gsk preflight --kind web --operation hosted-deploy
|
|
88
|
+
gsk service-url --local --port 3000
|
|
89
|
+
gsk get_service_url --local --port 3000
|
|
90
|
+
gsk hosted deploy-local --source .
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Create explicitly asks for confirmation; `--yes` confirms creation in automation.
|
|
94
|
+
It never retries creation after a network error. Check your project list and
|
|
95
|
+
bind the returned/existing project before trying to create another one.
|
|
96
|
+
Binding and status use the server's owner-authorized developer endpoint.
|
|
97
|
+
|
|
98
|
+
The nearest ancestor `.gsk/project.json` binds a checkout:
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{"version":1,"project_id":"example-id","kind":"web","base_url":"https://www.genspark.ai"}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Only these four fields are allowed. No command above writes credentials or
|
|
105
|
+
changes global project configuration. Project selection is **`--project-id` >
|
|
106
|
+
`GSK_PROJECT_ID` > nearest binding > legacy global config**. The active server
|
|
107
|
+
still comes from `--base-url`, `GSK_BASE_URL`, or global config; a binding for a
|
|
108
|
+
different server blocks cloud operations even with an explicit project ID.
|
|
109
|
+
Invalid bindings fail visibly. A different existing/inherited binding is never
|
|
110
|
+
silently overwritten: use another checkout or explicitly remove the old binding.
|
|
111
|
+
Concurrent writers use atomic create-if-absent publication.
|
|
112
|
+
|
|
113
|
+
Preview requires explicit `--local`, runs before schema fetching or update checks,
|
|
114
|
+
and needs no login. Ports must be decimal integers in 1–65535. A bounded TCP probe
|
|
115
|
+
of `127.0.0.1` returns `{status, local_only:true, url, reachable, probe, message}`;
|
|
116
|
+
TCP reachability does not imply HTTP/application health. There is no public tunnel
|
|
117
|
+
and no fallback from a failed remote URL request to localhost.
|
|
118
|
+
|
|
119
|
+
Preflight operations are `preview`, `hosted-deploy`, `github`, `cloudflare`,
|
|
120
|
+
`shopify`, and `android`. Checks are advisory and operation-specific: web preview
|
|
121
|
+
does not require Flutter, and platform hosting does not require local Wrangler
|
|
122
|
+
or Shopify authorization. Missing login, malformed binding, and unavailable
|
|
123
|
+
platform checks preserve local check results with actionable status. Local
|
|
124
|
+
provider login (`gh auth login`, `wrangler login`, `shopify auth login`) is
|
|
125
|
+
separate from platform connectors and `sandbox_auth_*` remote sandbox setup.
|
|
126
|
+
|
|
127
|
+
`hosted deploy-local` streams a private temporary ZIP snapshot, uploads it, then
|
|
128
|
+
submits its validated receipt to the existing `hosted_deploy` approval flow.
|
|
129
|
+
It does **not** approve the action, including with `--yes`. Review the returned
|
|
130
|
+
pending action/source digest in the project and approve explicitly. The CLI
|
|
131
|
+
does not run build scripts. Source must include the Wrangler configuration and
|
|
132
|
+
entry points required by the backend's hosted build pipeline.
|
|
133
|
+
|
|
134
|
+
Packaging rejects symlinks, non-regular files, traversal, unsafe paths, and
|
|
135
|
+
case/Unicode-normalization collisions. Exclusions apply at every depth:
|
|
136
|
+
`.env*`, `.git`, `node_modules`, `.wrangler`, `.gsk`, `.genspark-code`, local
|
|
137
|
+
credential/config directories and files (including `.ssh`, `.aws`, `.azure`,
|
|
138
|
+
`.config`, `.npmrc`, `.netrc`, `credentials.json`, private keys), plus the active
|
|
139
|
+
custom CLI config file if it is inside the source tree. Limits are
|
|
140
|
+
20,000 visited non-excluded entries, 250 MiB ZIP, and 500 MiB expanded source.
|
|
141
|
+
Source changes detected while packaging abort the upload.
|
|
142
|
+
|
|
143
|
+
The receipt is saved before submission to `.gsk/pending-source-<uuid>.json`.
|
|
144
|
+
This file is retained after submission as a recovery record, not proof of action
|
|
145
|
+
status. On a dropped response, inspect hosted actions in the project before
|
|
146
|
+
resubmitting. Upload and submission are never automatically retried. No remote
|
|
147
|
+
source is substituted when an upload/receipt/server capability fails.
|
|
148
|
+
|
|
149
|
+
### Developer API contract
|
|
150
|
+
|
|
151
|
+
All paths below are relative to `<base_url>/api/tool_cli`; calls use existing
|
|
152
|
+
`ApiClient` token auth (`X-Api-Key`), `X-GSK-CLI-Caps`, and selected `X-Project-ID`.
|
|
153
|
+
|
|
154
|
+
| Request | Response |
|
|
155
|
+
| --- | --- |
|
|
156
|
+
| `POST /developer/projects` JSON `{kind,name}` | `{project:{project_id,kind,name,url}}` |
|
|
157
|
+
| `GET /developer/projects/{id}` (owner-authorized) | `{project:{project_id,kind,name,url}}` |
|
|
158
|
+
| `GET /developer/preflight?kind=...&operation=...&project_id=...` (project ID omitted when unbound) | `{checks:[{name,status,code,message,action_url?}],project?:{project_id,kind,name,url}}` |
|
|
159
|
+
| `POST /hosted/source`, raw `application/zip`, required `X-Project-ID` | HTTP 201 `{local_source:receipt}` |
|
|
160
|
+
| Existing `executeTool('hosted_deploy', {local_source:receipt})` | Existing tool envelope/pending approval |
|
|
161
|
+
|
|
162
|
+
Check `status` is `ready`, `action_required`, `unknown`, or `not_applicable`.
|
|
163
|
+
Project/check response objects permit additional server fields but only the
|
|
164
|
+
documented project/check fields are consumed. Source receipts are passed unchanged:
|
|
165
|
+
`{version:1,owner_cogen_id,project_id,object_key,sha256,size_bytes,expanded_bytes,
|
|
166
|
+
file_count,created_at,expires_at}` (timestamps: integer Unix seconds). The CLI
|
|
167
|
+
checks project ID, digest, sizes/count, required receipt fields, and expiry before
|
|
168
|
+
submitting. Backend ownership/digest/expiry validation remains authoritative.
|
|
169
|
+
|
|
170
|
+
The CLI advertises `cli-local-source-v1`; its tools cache is isolated from older
|
|
171
|
+
capability views. The static `hosted` parent is seeded so existing grouped hosted
|
|
172
|
+
metadata and legacy flat commands coexist. No new hosted group metadata is needed
|
|
173
|
+
on old servers. Any future metadata that shadows a static command must be gated
|
|
174
|
+
to supporting capabilities, not sent to old binaries.
|
|
175
|
+
|
|
176
|
+
Backend source writes default off. HTTP 503 explains that supported writers must
|
|
177
|
+
be enabled only after all readers/executors converge; 404/405 reports an unsupported
|
|
178
|
+
server. Release requires verified backend endpoint support and reader rollout.
|
|
179
|
+
There is no client-side bypass or remote-source fallback.
|
|
180
|
+
|
|
181
|
+
### Local verification
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
npm test
|
|
185
|
+
# Optional published-client shared-HOME matrix against mocked HTTP transport:
|
|
186
|
+
GSK_COMPAT_CLI=/path/to/published/@genspark/cli/dist/index.js npm test
|
|
187
|
+
```
|
|
188
|
+
|
|
80
189
|
## Authentication
|
|
81
190
|
|
|
82
191
|
Log in with your Genspark account:
|
|
@@ -143,7 +252,7 @@ Config is loaded from three sources (highest priority first):
|
|
|
143
252
|
| `--output <format>` | — | `json` | Output format: `json` or `text` |
|
|
144
253
|
| `--refresh` | — | — | Force refresh cached tool schemas |
|
|
145
254
|
| `-y, --yes` | — | — | Assume "yes" at confirmation prompts (see [Confirmation prompts](#confirmation-prompts)) |
|
|
146
|
-
| `--no-input` | — | — | Never prompt interactively; confirmation-required actions fail with exit code 2 |
|
|
255
|
+
| `--no-input` | — | — | Never prompt interactively; confirmation-required actions fail with exit code 2 on a gated action/value |
|
|
147
256
|
| `--config <path>` | `GSK_CONFIG` | `~/.genspark-tool-cli/config.json` | Config profile path |
|
|
148
257
|
|
|
149
258
|
## Confirmation prompts
|
|
@@ -167,14 +276,33 @@ About to execute gmail send. Proceed? [y/N] y
|
|
|
167
276
|
- `--yes` / `-y` skips the prompt (like `apt-get -y`). Interactive-only
|
|
168
277
|
actions (`slack send`/`react`/`upload`/`invite` and `google_drive share`,
|
|
169
278
|
Marketplace policy) reject `--yes` and always prompt.
|
|
170
|
-
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
279
|
+
- `--skip_confirmation true` / `--auto_skip_confirmation` are **deprecated**
|
|
280
|
+
on this CLI: use `--yes`. They are no longer listed in `--help` (the
|
|
281
|
+
server omits them from the schema for CLIs that send the
|
|
282
|
+
`cli-yes-only-v1` capability, i.e. this version; earlier 1.9–1.11.x CLIs
|
|
283
|
+
keep the legacy view and their `--skip_confirmation` flags keep
|
|
284
|
+
working), but they still parse
|
|
285
|
+
as hidden flags and `--args-file` keys on confirmation-gated actions, are
|
|
286
|
+
forwarded verbatim, and the server honors them as before — so existing
|
|
287
|
+
unattended scripts keep working, with one `[DEPRECATED] ... use --yes`
|
|
288
|
+
line on stderr per run. On interactive-only actions they are ignored
|
|
289
|
+
(server-stripped) and the prompt still runs. See
|
|
290
|
+
[docs/confirmation.md](docs/confirmation.md#deprecated-skip-parameters).
|
|
291
|
+
- Every confirmation-gated command's `--help` (e.g. `gsk gmail send --help`)
|
|
292
|
+
ends with a `Confirmation:` note naming `--yes` and `--no-input`; the
|
|
293
|
+
two flags themselves are global (`gsk --help`).
|
|
294
|
+
- Actions that dispatch on an argument (genteam `members`/`pins`/
|
|
295
|
+
`invite_link`/`dm`/`tasks` on `--op`, teams `api` on `--method`) prompt
|
|
296
|
+
only for their write values; the read values the server declares (e.g.
|
|
297
|
+
`--op list`, `--method GET`, spelled exactly — or `--method` omitted for
|
|
298
|
+
teams `api`, whose server default is GET) run without a prompt and
|
|
299
|
+
therefore also work with `--args-file -`. See
|
|
300
|
+
[docs/confirmation.md](docs/confirmation.md#per-operation-actions).
|
|
175
301
|
- `--no-input` (or `--args-file -`, which consumes stdin) makes
|
|
176
302
|
confirmation-required actions fail with exit code 2 without calling the
|
|
177
|
-
server;
|
|
303
|
+
server — for a gated action or value; server-declared read values such
|
|
304
|
+
as `--op list` / `--method GET` run without a prompt. Pass `--yes` for
|
|
305
|
+
scripted runs of the gated ones.
|
|
178
306
|
- If the server responds `pending_confirmation` anyway, the local schema
|
|
179
307
|
cache is stale — run `gsk --refresh ls` and retry.
|
|
180
308
|
|
|
@@ -227,6 +355,7 @@ The generated models include per-model reasoning variants, selectable with OpenC
|
|
|
227
355
|
|--------|-------------------|
|
|
228
356
|
| DeepSeek V4 Pro / Flash / Pro 0813 (text), including listed Baseten Pro | `none`, `low`, `high`, `max` |
|
|
229
357
|
| GLM-5.3 / GLM-5.3 Flash | `low`, `high`, `max` |
|
|
358
|
+
| Kimi K3 | `low`, `high`, `max` |
|
|
230
359
|
| GPT-5.2 / 5.4 (including mini/nano) / 5.5 | `none`, `low`, `medium`, `high`, `xhigh` |
|
|
231
360
|
| GPT-5.6 | `none`, `low`, `medium`, `high`, `xhigh`, `max` |
|
|
232
361
|
| GPT-6 Astra | `low`, `medium`, `high`, `xhigh`, `max` |
|
|
@@ -236,13 +365,40 @@ The generated models include per-model reasoning variants, selectable with OpenC
|
|
|
236
365
|
| Gemini 3 Flash / 3.1 Flash Lite / 3.5 Flash / 3.6 Flash | `minimal`, `low`, `medium`, `high` |
|
|
237
366
|
| MiniMax M3 | `none` (off), `thinking` (always think); no selection keeps adaptive mode |
|
|
238
367
|
|
|
239
|
-
Model access gates still apply. Models without a verified end-to-end effort contract (including
|
|
368
|
+
Model access gates still apply. Models without a verified end-to-end effort contract (including GLM-5.2, Grok 4.6 and DeepSeek vision-exp) do not gain speculative levels. MiniMax modes are not reasoning-depth levels. Gemini uses native `thinkingConfig.thinkingLevel`, not `reasoning_effort`.
|
|
240
369
|
|
|
241
370
|
The server owns this catalog; regenerating overwrites the output file, so preserve custom settings first. No CLI package update is needed for catalog changes. For rollout, deploy the LiteLLM effort-forwarding hook before the backend catalog/validation change, then regenerate configs; this avoids advertising levels while an older proxy still pins or drops them. This command does not deploy either service.
|
|
242
371
|
|
|
372
|
+
### init-pi
|
|
373
|
+
|
|
374
|
+
Generate config for [Pi](https://pi.dev) (`@earendil-works/pi-coding-agent`), pre-configured to use Genspark's LLM proxy with your API key. Pi reads two files under `~/.pi/agent/`, so the command writes both:
|
|
375
|
+
|
|
376
|
+
- `models.json` — the `genspark-llm-proxy` (OpenAI-compatible) and `genspark-gemini-proxy` providers, with the same catalog, context windows, output limits, credit cost, and reasoning ladder OpenCode receives.
|
|
377
|
+
- `settings.json` — `defaultProvider` / `defaultModel`.
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
# Write both files to ~/.pi/agent/
|
|
381
|
+
gsk init-pi
|
|
382
|
+
|
|
383
|
+
# Specify a different default model
|
|
384
|
+
gsk init-pi --model claude-opus-4-8
|
|
385
|
+
|
|
386
|
+
# Write to a custom directory
|
|
387
|
+
gsk init-pi -o ./pi-config
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
| Option | Default | Description |
|
|
391
|
+
|--------|---------|-------------|
|
|
392
|
+
| `--model <name>` | Server-selected | Default model for Pi |
|
|
393
|
+
| `-o, --out <dir>` | `~/.pi/agent` | Output directory for `models.json` + `settings.json` |
|
|
394
|
+
|
|
395
|
+
Unlike `init-opencode` (whose single file belongs entirely to GSK), both Pi files are shared: `models.json` also holds your own providers and `settings.json` every other Pi setting. `init-pi` **merges** — it upserts the two Genspark providers and the default model, leaving everything else intact. Re-running picks up new models without touching your config.
|
|
396
|
+
|
|
397
|
+
Pi exposes reasoning through its thinking-level picker: levels the model does not support are hidden. `MiniMax M3` exposes `off` and `high`; all other models follow the OpenCode table above (Pi's `off` ⇄ the provider's `none` effort). Cost is emitted as Genspark credits per 1M tokens, the same number OpenCode's fork displays; Pi labels that footer as USD, so treat it as an estimate — the billed figure arrives in-band on each call.
|
|
398
|
+
|
|
243
399
|
### init-skills
|
|
244
400
|
|
|
245
|
-
Sync GSK skill documents into the current project for AI agent discovery. Copies all skill docs and generates a `CONTEXT.md` entry point that AI agents (Claude Code, Gemini, etc.) can load automatically.
|
|
401
|
+
Sync GSK skill documents into the current project for AI agent discovery. Copies all skill docs and generates a `CONTEXT.md` entry point that AI agents (Claude Code, Gemini, Pi, etc.) can load automatically.
|
|
246
402
|
|
|
247
403
|
```bash
|
|
248
404
|
# Copy skills to .gsk/skills/ and generate CONTEXT.md
|
|
@@ -251,7 +407,7 @@ gsk init-skills
|
|
|
251
407
|
# Also generate .claude/ config for Claude Code
|
|
252
408
|
gsk init-skills --agent claude
|
|
253
409
|
|
|
254
|
-
# Generate config for all supported agents (Claude, Gemini)
|
|
410
|
+
# Generate config for all supported agents (Claude, Gemini, Pi)
|
|
255
411
|
gsk init-skills --agent all
|
|
256
412
|
|
|
257
413
|
# Custom output directory
|
|
@@ -261,7 +417,27 @@ gsk init-skills -o ./docs/gsk-skills
|
|
|
261
417
|
| Option | Default | Description |
|
|
262
418
|
|--------|---------|-------------|
|
|
263
419
|
| `-o, --out <dir>` | `.gsk/skills` (cwd) | Output directory for skills |
|
|
264
|
-
| `--agent <type>` | — | Generate agent config: `claude`, `gemini`, or `all` |
|
|
420
|
+
| `--agent <type>` | — | Generate agent config: `claude`, `gemini`, `pi`, or `all` |
|
|
421
|
+
|
|
422
|
+
`--agent pi` writes (`pi` auto-loads it) `AGENTS.md` referencing `CONTEXT.md`; `--agent claude` writes/appends `CLAUDE.md` and `--agent gemini` writes `gemini-extension.json`.
|
|
423
|
+
|
|
424
|
+
### init-genspark-code-skills
|
|
425
|
+
|
|
426
|
+
Fetch the genspark-code (code sandbox) skill documents into the current project for AI agent discovery. Covers the full developer-skill set a sandbox can install — web / Cloudflare / Flutter / Shopify / HTML5-game development, hosted deployment, and GitHub workflows. The bundle is served by the backend (`/api/tool_cli/genspark-code-skills`), so newly edited skill docs reach released CLIs without a package update.
|
|
427
|
+
|
|
428
|
+
```bash
|
|
429
|
+
# Copy skills to .genspark-code/skills/
|
|
430
|
+
gsk init-genspark-code-skills
|
|
431
|
+
|
|
432
|
+
# Custom output directory
|
|
433
|
+
gsk init-genspark-code-skills -o ./docs/genspark-code-skills
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
| Option | Default | Description |
|
|
437
|
+
|--------|---------|-------------|
|
|
438
|
+
| `-o, --out <dir>` | `.genspark-code/skills` (cwd) | Output directory for skills |
|
|
439
|
+
|
|
440
|
+
There is no `--agent` flag: an existing `CONTEXT.md` from `gsk init-skills` is left untouched. A built-in whose requirement the caller doesn't satisfy — the org-only `gsk-hosted-org-member` for a non-member — is omitted, so an agent never sees docs for a capability the server would refuse.
|
|
265
441
|
|
|
266
442
|
### Search & Crawl
|
|
267
443
|
|
|
@@ -369,26 +545,31 @@ gsk video "Camera pan around the subject" -m "kling/v1.6/standard" -i ./photo.jp
|
|
|
369
545
|
|
|
370
546
|
### audio_generation (alias: `audio`)
|
|
371
547
|
|
|
372
|
-
Generate audio: TTS, music, or sound effects.
|
|
548
|
+
Generate audio: TTS, music, or sound effects. Each model takes its own `params`
|
|
549
|
+
object — run `gsk model-info <model>` first for the `params_schema`, the
|
|
550
|
+
available speakers and the prompting guide. A miss on `model-info` answers with
|
|
551
|
+
the closest catalog ids.
|
|
373
552
|
|
|
374
553
|
```bash
|
|
375
|
-
# Text-to-speech
|
|
376
|
-
gsk
|
|
377
|
-
gsk audio "Hello, welcome to Genspark!" -m
|
|
554
|
+
# Text-to-speech with Gemini 3.1 Flash TTS (the current Gemini TTS id; speakers go in --params)
|
|
555
|
+
gsk model-info google/gemini-3.1-flash-tts-preview
|
|
556
|
+
gsk audio "Speaker1: Hello, welcome to Genspark!" -m google/gemini-3.1-flash-tts-preview \
|
|
557
|
+
-p '{"speakers":[{"speaker":"Speaker1","voice_name":"Kore"}]}' -o ./hello.mp3
|
|
378
558
|
|
|
379
|
-
#
|
|
380
|
-
gsk audio "
|
|
559
|
+
# Song with lyrics
|
|
560
|
+
gsk audio "Upbeat synth-pop, female vocal" -m minimax/music-3.0 \
|
|
561
|
+
-p '{"lyrics":"[Verse]\nCity lights are calling..."}' -o ./song.mp3
|
|
381
562
|
|
|
382
563
|
# Sound effect
|
|
383
|
-
gsk audio "Door creaking slowly open" -m "
|
|
564
|
+
gsk audio "Door creaking slowly open" -m elevenlabs/sound-effects -p '{"duration":4}' -o ./door.mp3
|
|
384
565
|
```
|
|
385
566
|
|
|
386
567
|
| Option | Default | Description |
|
|
387
568
|
|--------|---------|-------------|
|
|
388
|
-
| `-m, --model <name>` |
|
|
389
|
-
| `-
|
|
390
|
-
| `-
|
|
391
|
-
| `-l, --lyrics <text>` | — | Lyrics for song
|
|
569
|
+
| `-m, --model <name>` | `fal-ai/elevenlabs/tts/multilingual-v2` | Model id, e.g., `google/gemini-3.1-flash-tts-preview`, `elevenlabs/v3-tts`, `fal-ai/minimax/speech-2.8-hd` |
|
|
570
|
+
| `-p, --params <json>` | — | Model-specific parameters following the model's `params_schema` (speakers, speed/pitch/volume, duration, lyrics, ...) |
|
|
571
|
+
| `-d, --duration <sec>` | — | Duration in seconds for sound-effect/music models (prefer `params`) |
|
|
572
|
+
| `-l, --lyrics <text>` | — | Lyrics for song models (prefer `params`) |
|
|
392
573
|
| `-o, --output-file <path>` | — | Download the generated file to a local path |
|
|
393
574
|
|
|
394
575
|
### File Transfer
|
|
@@ -485,6 +666,14 @@ gsk drive upload --file_content "Hello World" --upload_path "/notes/hello.txt"
|
|
|
485
666
|
# Upload a local file directly to AI-Drive (streaming, supports 100MB+ files)
|
|
486
667
|
gsk drive upload --local_file ./report.pdf --upload_path /docs/report.pdf
|
|
487
668
|
gsk drive upload --local_file ./video.mp4 --upload_path /videos/demo.mp4
|
|
669
|
+
|
|
670
|
+
# Share a My Drive file with a GenTeam channel (posts its card; --post_card false opens it silently)
|
|
671
|
+
gsk drive share -p "/docs/report.pdf" --to "channel:<server_id>:<channel_id>" --permission edit
|
|
672
|
+
gsk drive unshare -p "/docs/report.pdf" --to "channel:<server_id>:<channel_id>"
|
|
673
|
+
|
|
674
|
+
# Share a Team Drive file with a channel: pick the drive with --source (from `ls --workspace shared_drive`),
|
|
675
|
+
# then name the entry by path relative to that source (or --id); you must manage sharing there
|
|
676
|
+
gsk drive share --workspace shared_drive --source "<source_id>" -p "/bug/clip.mov" --to "channel:<server_id>:<channel_id>"
|
|
488
677
|
gsk drive upload --local_file ./photo.png # upload_path defaults to /photo.png
|
|
489
678
|
gsk drive upload --local_file ./doc.pdf --upload_path /docs/doc.pdf --override # overwrite existing
|
|
490
679
|
|
|
@@ -1159,7 +1348,9 @@ gsk mesh forward -L 8080:localhost:80 workstation # browse its local web app a
|
|
|
1159
1348
|
|
|
1160
1349
|
| Model | Description |
|
|
1161
1350
|
|-------|-------------|
|
|
1162
|
-
| `google/gemini-
|
|
1351
|
+
| `google/gemini-3.1-flash-tts-preview` | Gemini 3.1 Flash TTS. Expressive narration with inline audio tags (`[whispers]`, `[excited]`) and up to 2 speakers via `Speaker1: text, Speaker2: text` prefixes |
|
|
1352
|
+
| `bytedance/seed-audio-1.0` | ByteDance Seed-Audio 1.0. Top speech quality plus narration and radio-drama scenes from a description; clones a voice from up to 3 reference clips |
|
|
1353
|
+
| `alibaba/qwen-audio-3-tts` | Qwen Audio 3.0 TTS (Flash). Fast, low-cost multilingual TTS with 45 preset voices |
|
|
1163
1354
|
| `elevenlabs/v3-tts` | Advanced multilingual TTS with multi-speaker dialogue support. Supports emotional tags like `[excited]`, `[whispers]`, `[laughs]` |
|
|
1164
1355
|
| `fal-ai/elevenlabs/tts/multilingual-v2` | High-quality multilingual TTS. Preferred for English |
|
|
1165
1356
|
| `fal-ai/minimax/speech-2.8-hd` | High-quality multilingual TTS. Preferred for Chinese, Cantonese, Japanese, Korean. One speaker per generation |
|
|
@@ -1176,10 +1367,9 @@ gsk mesh forward -L 8080:localhost:80 workstation # browse its local web app a
|
|
|
1176
1367
|
|-------|-------------|
|
|
1177
1368
|
| `elevenlabs/music` | ElevenLabs music generation with vocals/singing. Lyrics auto-generated (no custom lyrics). Duration: 10s-5min |
|
|
1178
1369
|
| `CassetteAI/music-generator` | Background music generation. Duration: 10-180 seconds |
|
|
1179
|
-
| `mureka
|
|
1180
|
-
| `
|
|
1181
|
-
| `
|
|
1182
|
-
| `fal-ai/minimax-music/v2.6` | Song generation with lyrics using MiniMax Music 2.6. Supports markers (Verse), (Chorus), (Bridge), etc. Requires style prompt and lyrics |
|
|
1370
|
+
| `mureka` | Mureka music, `params.mode` picks the product: `song` (default, vocals over `lyrics`, style prompt or reference track), `instrumental` (vocal-free from the prompt), `remix` (re-sing an existing `source_audio_file` mp3/m4a 10-350s with new `lyrics`) |
|
|
1371
|
+
| `google/lyria-music` | Google Lyria 3 text-to-music (`sub_model`: `lyria-3-clip` 30s clip or `lyria-3-pro` full song). 44.1kHz stereo, vocals with lyrics in multiple languages |
|
|
1372
|
+
| `minimax/music-3.0` | MiniMax Music 3.0 song generation with lyrics (`is_instrumental` for tracks without vocals). Supports (Verse), (Chorus), (Bridge) markers |
|
|
1183
1373
|
|
|
1184
1374
|
**Voice Cloning & Transformation**
|
|
1185
1375
|
|
package/dist/client.d.ts
CHANGED
|
@@ -1,20 +1,67 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* API Client for Genspark Tool CLI
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { DeveloperProject, DeveloperPreflight } from './developer-contract.js';
|
|
5
|
+
import type { GlobalOptions, ApiResponse, ToolListResponse, UserInfo, FileUploadUrlRequest, FileUploadUrlResponse, FileDownloadRequest, FileDownloadResponse, GensparkCodeSkillsResponse } from './types.js';
|
|
5
6
|
/**
|
|
6
7
|
* Make an unauthenticated request to the backend.
|
|
7
8
|
* Used for device-flow auth endpoints that don't require an API key.
|
|
8
9
|
*/
|
|
9
10
|
export declare function unauthenticatedRequest<T>(baseUrl: string, endpoint: string, method?: 'GET' | 'POST', body?: unknown): Promise<T>;
|
|
11
|
+
/** Hard ceiling on one automatic rate-limit wait (ms). */
|
|
12
|
+
export declare const MAX_RATE_LIMIT_WAIT_MS = 65000;
|
|
13
|
+
export interface RateLimitDenial {
|
|
14
|
+
/** Seconds the server told us to wait. */
|
|
15
|
+
retryAfter: number;
|
|
16
|
+
message: string;
|
|
17
|
+
instructionForAgent?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Read a 429 denial out of a response, or return null if it isn't one.
|
|
21
|
+
*
|
|
22
|
+
* The server sends both a standard `Retry-After` header and a `retry_after`
|
|
23
|
+
* field in the NDJSON envelope; the header wins because a proxy may answer
|
|
24
|
+
* without our body at all, and the body is the fallback for the reverse.
|
|
25
|
+
* Both are ignored unless they parse to a positive finite number — a `0`
|
|
26
|
+
* or a garbled value would otherwise license the immediate retry this
|
|
27
|
+
* exists to stop (#61436).
|
|
28
|
+
*/
|
|
29
|
+
export declare function parseRateLimitDenial(status: number, headers: Headers, bodyText: string): RateLimitDenial | null;
|
|
30
|
+
/** Milliseconds to sleep for a denial, capped and jittered. */
|
|
31
|
+
export declare function rateLimitWaitMs(denial: RateLimitDenial): number;
|
|
10
32
|
/**
|
|
11
33
|
* Error carrying the HTTP status behind a failed API call, so callers can
|
|
12
34
|
* branch on auth failures (401/403) without parsing message strings.
|
|
13
35
|
*/
|
|
14
36
|
export declare class ApiHttpError extends Error {
|
|
15
37
|
readonly httpStatus?: number;
|
|
16
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Parsed `{detail: {code, message}}` from a structured developer error, when
|
|
40
|
+
* the body carried one (e.g. `project_kind_mismatch`). Lets callers branch on
|
|
41
|
+
* the server's own code instead of scraping the message string.
|
|
42
|
+
*/
|
|
43
|
+
readonly serverDetail?: {
|
|
44
|
+
code?: string;
|
|
45
|
+
message?: string;
|
|
46
|
+
};
|
|
47
|
+
constructor(message: string, httpStatus?: number, serverDetail?: {
|
|
48
|
+
code?: string;
|
|
49
|
+
message?: string;
|
|
50
|
+
});
|
|
17
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Parse a developer API error body. The backend returns structured
|
|
54
|
+
* `{"detail": {"code", "message"}}` for application errors (missing project,
|
|
55
|
+
* kind mismatch, ...); a route that does not exist on this server answers with
|
|
56
|
+
* a plain `{"detail": "Not Found"}` instead. `structured` is what tells the two
|
|
57
|
+
* apart, so a real 404 like `project_not_found` is never reported as an
|
|
58
|
+
* unsupported server.
|
|
59
|
+
*/
|
|
60
|
+
export declare function parseDeveloperErrorDetail(body: string): {
|
|
61
|
+
structured: boolean;
|
|
62
|
+
code?: string;
|
|
63
|
+
message?: string;
|
|
64
|
+
};
|
|
18
65
|
/** True when the error is an HTTP-level auth rejection (401/403). */
|
|
19
66
|
export declare function isAuthError(err: unknown): boolean;
|
|
20
67
|
export declare class ApiClient {
|
|
@@ -40,6 +87,16 @@ export declare class ApiClient {
|
|
|
40
87
|
* tool executions, which all go through the streaming path).
|
|
41
88
|
*/
|
|
42
89
|
private baseHeaders;
|
|
90
|
+
/** Make one bounded request; creation and source writes must never be retried. */
|
|
91
|
+
private developerRequest;
|
|
92
|
+
/** Explicitly create a project once, using the existing token identity. */
|
|
93
|
+
createDeveloperProject(kind: string, name: string): Promise<DeveloperProject>;
|
|
94
|
+
/** Fetch a project through the server's owner-only developer route. */
|
|
95
|
+
getDeveloperProject(id: string): Promise<DeveloperProject>;
|
|
96
|
+
/** Read advisory account checks without creating a project or sandbox. */
|
|
97
|
+
developerPreflight(kind: string, operation: string): Promise<DeveloperPreflight>;
|
|
98
|
+
/** Stream a ZIP to the selected project and return its unmodified source receipt. */
|
|
99
|
+
uploadHostedSource(filename: string, size: number): Promise<Record<string, unknown>>;
|
|
43
100
|
private request;
|
|
44
101
|
/**
|
|
45
102
|
* Simple JSON request (non-streaming) for endpoints that return plain JSON.
|
|
@@ -102,6 +159,14 @@ export declare class ApiClient {
|
|
|
102
159
|
* Get OpenCode configuration JSON
|
|
103
160
|
*/
|
|
104
161
|
getOpencodeConfig(model?: string): Promise<Record<string, unknown>>;
|
|
162
|
+
/**
|
|
163
|
+
* Get the genspark-code (code sandbox) skill bundle
|
|
164
|
+
*/
|
|
165
|
+
getGensparkCodeSkills(): Promise<GensparkCodeSkillsResponse>;
|
|
166
|
+
/**
|
|
167
|
+
* Get Pi (pi.dev) config bundle: `{ models, settings, genspark }`.
|
|
168
|
+
*/
|
|
169
|
+
getPiConfig(model?: string): Promise<Record<string, unknown>>;
|
|
105
170
|
/**
|
|
106
171
|
* Streaming NDJSON request that processes lines as they arrive.
|
|
107
172
|
* Calls onMessage for each intermediate message (heartbeat, delta, tool_call)
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
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