@vm0/cli 9.176.3 → 9.176.5

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/zero.js CHANGED
@@ -143,9 +143,8 @@ import {
143
143
  uploadWebFile,
144
144
  upsertZeroOrgModelProvider,
145
145
  withErrorHandler,
146
- zeroAgentCustomSkillNameSchema,
147
- zeroTokenAllowsFeatureSwitch
148
- } from "./chunk-PK542UZ7.js";
146
+ zeroAgentCustomSkillNameSchema
147
+ } from "./chunk-4XXIJOZP.js";
149
148
  import {
150
149
  __toESM,
151
150
  init_esm_shims
@@ -6575,8 +6574,10 @@ var DATA_URL_PATTERN = /^data:([^;,]+);base64,(.*)$/s;
6575
6574
  var COMPUTER_USE_HELP_TEXT = `
6576
6575
  Workflow:
6577
6576
  1. Start the Zero Desktop app and make sure Computer Use is online.
6578
- 2. Run "zero computer-use list-apps" to find the target app name or bundle id.
6579
- 3. Run "zero computer-use get-app-state --app <app>" to get a screenshot,
6577
+ 2. Run "zero computer-use list-apps" to find the target app's bundleId.
6578
+ --app accepts a bundle id only (e.g. com.google.Chrome); the name is for
6579
+ display. Apps listed without a bundleId cannot be targeted.
6580
+ 3. Run "zero computer-use get-app-state --app <bundleId>" to get a screenshot,
6580
6581
  snapshotId, visible element indexes, and accessibility state.
6581
6582
  4. Prefer element actions with --snapshot-id and --element-index. Use --x/--y
6582
6583
  only when the target is visible in the returned screenshot but has no useful
@@ -6590,8 +6591,11 @@ Notes:
6590
6591
  Write commands are sent to the connected Desktop host and may wait for local
6591
6592
  approval before they run. Coordinate fallbacks use screenshot coordinates from
6592
6593
  get-app-state; pass the matching --snapshot-id when acting on a prior snapshot.
6593
- type-text sends literal keyboard input to the target app's current focus. Use
6594
- set-value when you need deterministic accessibility value assignment.
6594
+ type-text sends literal keyboard input to the target app's current focus. It
6595
+ first verifies the focused element is editable and fails with
6596
+ element_not_editable when it is not (for example a focused table or list), so
6597
+ click into a text field before typing. Use set-value when you need
6598
+ deterministic accessibility value assignment.
6595
6599
  press-key accepts xdotool-style names such as shift+semicolon, Control_L+J,
6596
6600
  ctrl+alt+n, and BackSpace, plus existing macOS-style forms such as Command+L.
6597
6601
  type-text and press-key accept the same --snapshot-id as the element actions:
@@ -6604,22 +6608,22 @@ Examples:
6604
6608
  zero computer-use list-apps
6605
6609
 
6606
6610
  Inspect Safari state:
6607
- zero computer-use get-app-state --app Safari
6611
+ zero computer-use get-app-state --app com.apple.Safari
6608
6612
 
6609
6613
  Click element index 7 from snapshot desktop_abc:
6610
- zero computer-use click --app Safari --snapshot-id desktop_abc --element-index 7
6614
+ zero computer-use click --app com.apple.Safari --snapshot-id desktop_abc --element-index 7
6611
6615
 
6612
6616
  Click screenshot coordinate (320, 240) from snapshot desktop_abc:
6613
- zero computer-use click --app Safari --snapshot-id desktop_abc --x 320 --y 240
6617
+ zero computer-use click --app com.apple.Safari --snapshot-id desktop_abc --x 320 --y 240
6614
6618
 
6615
6619
  Type text into the snapshot desktop_abc window in Safari:
6616
- zero computer-use type-text --app Safari --snapshot-id desktop_abc --text "Hello"
6620
+ zero computer-use type-text --app com.apple.Safari --snapshot-id desktop_abc --text "Hello"
6617
6621
 
6618
6622
  Press a keyboard shortcut in the snapshot desktop_abc window:
6619
- zero computer-use press-key --app Safari --snapshot-id desktop_abc --key shift+semicolon
6623
+ zero computer-use press-key --app com.apple.Safari --snapshot-id desktop_abc --key shift+semicolon
6620
6624
 
6621
6625
  Open an app without activating the current foreground app:
6622
- zero computer-use open-app --app Things`;
6626
+ zero computer-use open-app --app com.culturedcode.ThingsMac`;
6623
6627
  function sleep2(ms) {
6624
6628
  return new Promise((resolve2) => {
6625
6629
  setTimeout(resolve2, ms);
@@ -6825,7 +6829,10 @@ function addTargetOptions(command) {
6825
6829
  return command.option("--timeout <seconds>", "Maximum time to wait", "30");
6826
6830
  }
6827
6831
  function appOption(command) {
6828
- return command.requiredOption("--app <name>", "Target app name or bundle id");
6832
+ return command.requiredOption(
6833
+ "--app <bundleId>",
6834
+ "Target app bundle id (e.g. com.google.Chrome); run list-apps to find it"
6835
+ );
6829
6836
  }
6830
6837
  var listAppsCommand = addTargetOptions(
6831
6838
  new Command().name("list-apps").description("List apps available to the Desktop Computer Use host").action(
@@ -9891,7 +9898,7 @@ function toGenerationTarget(value) {
9891
9898
  }
9892
9899
  return value;
9893
9900
  }
9894
- function selectResourceCandidates() {
9901
+ function selectResourceCandidates(target) {
9895
9902
  return {
9896
9903
  registryVersion: RESOURCE_REGISTRY_VERSION,
9897
9904
  source: {
@@ -9910,7 +9917,7 @@ function selectResourceCandidates() {
9910
9917
  ],
9911
9918
  candidates: {
9912
9919
  skills: filterByKind("skill"),
9913
- templates: filterByKind("template"),
9920
+ templates: listTemplates(target),
9914
9921
  designSystems: filterByKind("design-system"),
9915
9922
  imageStyles: filterByKind("image-style"),
9916
9923
  audioStyles: filterByKind("audio-style"),
@@ -10069,6 +10076,7 @@ init_esm_shims();
10069
10076
  function toConnectorGenerationType(generationType) {
10070
10077
  switch (generationType) {
10071
10078
  case "voice":
10079
+ case "music":
10072
10080
  return "audio";
10073
10081
  case "dashboard-design":
10074
10082
  case "docs-design":
@@ -10190,62 +10198,6 @@ var BUILT_IN_GENERATION_PROVIDERS = {
10190
10198
  reason: "available without connector setup"
10191
10199
  }
10192
10200
  ],
10193
- presentation: [
10194
- {
10195
- label: "Built-in",
10196
- model: "gpt-5.5",
10197
- command: "zero generate presentation --provider built-in -h",
10198
- reason: "available without connector setup"
10199
- }
10200
- ],
10201
- report: [
10202
- {
10203
- label: "Built-in",
10204
- model: "gpt-5.5",
10205
- command: "zero generate report --provider built-in -h",
10206
- reason: "available without connector setup"
10207
- }
10208
- ],
10209
- "docs-design": [
10210
- {
10211
- label: "Built-in",
10212
- model: "gpt-5.5",
10213
- command: "zero generate docs-design --provider built-in -h",
10214
- reason: "available without connector setup"
10215
- }
10216
- ],
10217
- poster: [
10218
- {
10219
- label: "Built-in",
10220
- model: "gpt-5.5",
10221
- command: "zero generate poster --provider built-in -h",
10222
- reason: "available without connector setup"
10223
- }
10224
- ],
10225
- "dashboard-design": [
10226
- {
10227
- label: "Built-in",
10228
- model: "gpt-5.5",
10229
- command: "zero generate dashboard-design --provider built-in -h",
10230
- reason: "available without connector setup"
10231
- }
10232
- ],
10233
- "mobile-app-design": [
10234
- {
10235
- label: "Built-in",
10236
- model: "gpt-5.5",
10237
- command: "zero generate mobile-app-design --provider built-in -h",
10238
- reason: "available without connector setup"
10239
- }
10240
- ],
10241
- website: [
10242
- {
10243
- label: "Built-in",
10244
- model: "gpt-5.5",
10245
- command: "zero generate website --provider built-in -h",
10246
- reason: "available without connector setup"
10247
- }
10248
- ],
10249
10201
  video: [
10250
10202
  {
10251
10203
  label: "Built-in",
@@ -10300,37 +10252,37 @@ var BUILT_IN_GENERATION_COMMANDS = {
10300
10252
  },
10301
10253
  presentation: {
10302
10254
  label: "Built-in presentation generation",
10303
- command: "zero generate presentation --provider built-in -h",
10255
+ command: "zero generate presentation -h",
10304
10256
  models: "gpt-5.5"
10305
10257
  },
10306
10258
  report: {
10307
10259
  label: "Built-in report generation",
10308
- command: "zero generate report --provider built-in -h",
10260
+ command: "zero generate report -h",
10309
10261
  models: "gpt-5.5"
10310
10262
  },
10311
10263
  "docs-design": {
10312
10264
  label: "Built-in docs design generation",
10313
- command: "zero generate docs-design --provider built-in -h",
10265
+ command: "zero generate docs-design -h",
10314
10266
  models: "gpt-5.5"
10315
10267
  },
10316
10268
  poster: {
10317
10269
  label: "Built-in poster generation",
10318
- command: "zero generate poster --provider built-in -h",
10270
+ command: "zero generate poster -h",
10319
10271
  models: "gpt-5.5"
10320
10272
  },
10321
10273
  "dashboard-design": {
10322
10274
  label: "Built-in dashboard design generation",
10323
- command: "zero generate dashboard-design --provider built-in -h",
10275
+ command: "zero generate dashboard-design -h",
10324
10276
  models: "gpt-5.5"
10325
10277
  },
10326
10278
  "mobile-app-design": {
10327
10279
  label: "Built-in mobile app design generation",
10328
- command: "zero generate mobile-app-design --provider built-in -h",
10280
+ command: "zero generate mobile-app-design -h",
10329
10281
  models: "gpt-5.5"
10330
10282
  },
10331
10283
  website: {
10332
10284
  label: "Built-in website generation",
10333
- command: "zero generate website --provider built-in -h",
10285
+ command: "zero generate website -h",
10334
10286
  models: "gpt-5.5"
10335
10287
  },
10336
10288
  voice: {
@@ -10348,22 +10300,6 @@ var GENERATION_CONTEXT = {
10348
10300
  ]
10349
10301
  }
10350
10302
  };
10351
- var GENERATION_TYPE_ORDER = [
10352
- "image",
10353
- "video",
10354
- "audio",
10355
- "voice",
10356
- "text",
10357
- "code",
10358
- "document",
10359
- "presentation",
10360
- "website",
10361
- "report",
10362
- "docs-design",
10363
- "poster",
10364
- "dashboard-design",
10365
- "mobile-app-design"
10366
- ];
10367
10303
  var GENERATION_TYPE_LABELS = {
10368
10304
  audio: "Audio",
10369
10305
  code: "Code",
@@ -10372,6 +10308,7 @@ var GENERATION_TYPE_LABELS = {
10372
10308
  "docs-design": "Docs design",
10373
10309
  image: "Image",
10374
10310
  "mobile-app-design": "Mobile app design",
10311
+ music: "Music",
10375
10312
  poster: "Poster",
10376
10313
  presentation: "Presentation",
10377
10314
  report: "Report",
@@ -10383,21 +10320,22 @@ var GENERATION_TYPE_LABELS = {
10383
10320
  function getConnectorGenerationType(generationType) {
10384
10321
  switch (generationType) {
10385
10322
  case "voice":
10323
+ case "music":
10386
10324
  return "audio";
10387
10325
  case "dashboard-design":
10388
10326
  case "docs-design":
10389
10327
  case "mobile-app-design":
10390
10328
  case "poster":
10329
+ case "presentation":
10391
10330
  case "report":
10331
+ case "website":
10392
10332
  return null;
10393
10333
  case "audio":
10394
10334
  case "code":
10395
10335
  case "document":
10396
10336
  case "image":
10397
- case "presentation":
10398
10337
  case "text":
10399
10338
  case "video":
10400
- case "website":
10401
10339
  return generationType;
10402
10340
  }
10403
10341
  }
@@ -10410,18 +10348,6 @@ function getBuiltInCommand(generationType) {
10410
10348
  function getGenerationContext(generationType) {
10411
10349
  return GENERATION_CONTEXT[generationType] ?? null;
10412
10350
  }
10413
- function getAvailableGenerationTypes() {
10414
- const available = /* @__PURE__ */ new Set();
10415
- for (const type of CONNECTOR_TYPE_KEYS) {
10416
- for (const generationType of getConnectorGenerationTypes(type)) {
10417
- available.add(generationType);
10418
- }
10419
- }
10420
- return GENERATION_TYPE_ORDER.filter((type) => {
10421
- const connectorGenerationType = getConnectorGenerationType(type);
10422
- return getBuiltInProviders(type).length > 0 || connectorGenerationType !== null && available.has(connectorGenerationType);
10423
- });
10424
- }
10425
10351
  function getGenerationConnectors(generationType) {
10426
10352
  return CONNECTOR_TYPE_KEYS.map((type) => {
10427
10353
  return [type, CONNECTOR_TYPES[type]];
@@ -10651,28 +10577,6 @@ async function runLister(generationType, options = {}) {
10651
10577
  const other = candidates.filter((candidate) => {
10652
10578
  return candidate.status !== "ready";
10653
10579
  });
10654
- const builtInProviders = getBuiltInProviders(generationType);
10655
- if (options.json) {
10656
- console.log(
10657
- JSON.stringify(
10658
- {
10659
- generationType,
10660
- connectorGenerationType,
10661
- availableTypes: getAvailableGenerationTypes(),
10662
- agentId: agentId ?? null,
10663
- choices: ready,
10664
- otherCandidates: other,
10665
- builtInCommand: getBuiltInCommand(generationType),
10666
- generationContext: getGenerationContext(generationType),
10667
- builtInProvider: builtInProviders[0] ?? null,
10668
- builtInProviders
10669
- },
10670
- null,
10671
- 2
10672
- )
10673
- );
10674
- return;
10675
- }
10676
10580
  renderText({
10677
10581
  generationType,
10678
10582
  agentId,
@@ -10701,8 +10605,7 @@ async function dispatchGenerate(options) {
10701
10605
  const resolvedPrompt = resolvePrompt(options.prompt);
10702
10606
  if (resolvedPrompt === null) {
10703
10607
  await runLister(options.generationType, {
10704
- all: options.all,
10705
- json: options.json
10608
+ all: options.all
10706
10609
  });
10707
10610
  return { outcome: "handled" };
10708
10611
  }
@@ -10838,7 +10741,7 @@ function createImageGenerateCommand(config) {
10838
10741
  ).option(
10839
10742
  "--skip-style",
10840
10743
  "Opt out of styled image generation for this invocation"
10841
- ).option("--json", "Print metadata as JSON").addHelpText("after", () => {
10744
+ ).addHelpText("after", () => {
10842
10745
  const styles = listImageStyles();
10843
10746
  return `
10844
10747
  Examples:
@@ -10894,8 +10797,7 @@ ${formatRegistryListing(styles, "image styles")}`;
10894
10797
  generationType: config.generationType,
10895
10798
  provider: options.provider,
10896
10799
  prompt: options.prompt,
10897
- all: options.all,
10898
- json: options.json
10800
+ all: options.all
10899
10801
  });
10900
10802
  if (dispatch.outcome === "handled") return;
10901
10803
  const prompt = dispatch.prompt;
@@ -10923,10 +10825,6 @@ ${formatRegistryListing(styles, "image styles")}`;
10923
10825
  `Mask image URL: ${options.maskImageUrl ?? "none"}`
10924
10826
  ]
10925
10827
  });
10926
- if (options.json) {
10927
- console.log(JSON.stringify(packet));
10928
- return;
10929
- }
10930
10828
  console.log(packet.instructions);
10931
10829
  return;
10932
10830
  }
@@ -10954,10 +10852,6 @@ ${formatRegistryListing(styles, "image styles")}`;
10954
10852
  inputFidelity,
10955
10853
  imagePromptStrength
10956
10854
  });
10957
- if (options.json) {
10958
- console.log(JSON.stringify(result));
10959
- return;
10960
- }
10961
10855
  console.log(source_default.green(`\u2713 Image generated: ${result.url}`));
10962
10856
  console.log(source_default.dim(` File: ${result.filename}`));
10963
10857
  console.log(source_default.dim(` Size: ${result.imageSize}`));
@@ -11030,11 +10924,11 @@ function outputDirForSite(site) {
11030
10924
  return `./generated/mockups/${site}`;
11031
10925
  }
11032
10926
  function createHtmlArtifactAuthoringPacket(options) {
11033
- const site = options.site ?? slugify(options.slugSource ?? options.prompt);
10927
+ const site = options.siteSlug ?? slugify(options.slugSource ?? options.prompt);
11034
10928
  const outputDir2 = outputDirForSite(site);
11035
10929
  const hostCommand = `zero host ${outputDir2} --site ${site}${options.kind === "website" ? " --spa" : ""}`;
11036
10930
  const title = titleForKind(options.kind);
11037
- const candidateSlice = selectResourceCandidates();
10931
+ const candidateSlice = selectResourceCandidates(options.kind);
11038
10932
  const selectionSchema = {
11039
10933
  skills: "string[]",
11040
10934
  template: "string",
@@ -11211,19 +11105,13 @@ function unknownTemplateError(id, usageCommand, target) {
11211
11105
  return new Error(message);
11212
11106
  }
11213
11107
  function createArtifactGenerateCommand(config) {
11214
- return new Command().name(config.name).description(config.description).option("--prompt <text>", "Artifact prompt; can also be piped via stdin").option(
11215
- "--provider <name>",
11216
- "Provider: 'built-in' to run vm0's pipeline, or a connector name to get its skill-invocation guidance"
11217
- ).option(
11218
- "--all",
11219
- "When listing providers (no --prompt given), include unavailable or not-yet-authorized connectors"
11220
- ).option("--site <slug>", "Hosted site slug; defaults to generated name").option("--title <text>", "Requested artifact title or name").option("--audience <text>", "Audience context").option(
11108
+ return new Command().name(config.name).description(config.description).option("--prompt <text>", "Artifact prompt; can also be piped via stdin").option("--site-slug <slug>", "Hosted site slug override").option("--title <text>", "Requested artifact title or name").option(
11221
11109
  "--design-system <id>",
11222
11110
  "Design system id from the registry (see Design Systems below). Accepts either 'apple' or 'design-system:apple'."
11223
11111
  ).option(
11224
11112
  "--template <id>",
11225
11113
  `Template id from the registry, scoped to ${config.target} (see Templates below). Accepts either short id or full 'template:<id>'.`
11226
- ).option("--json", "Print metadata as JSON").addHelpText("after", () => {
11114
+ ).addHelpText("after", () => {
11227
11115
  const designSystems = listDesignSystems();
11228
11116
  const templates = listTemplates(config.target);
11229
11117
  return `
@@ -11233,7 +11121,7 @@ ${config.examples}
11233
11121
  Output:
11234
11122
  Prints a source-selection packet for the current agent. The
11235
11123
  agent authors a static HTML artifact and hosts it with zero host. With no
11236
- --prompt and no piped input, prints the provider menu instead.
11124
+ --prompt and no piped input, prints the generation choices instead.
11237
11125
 
11238
11126
  Notes:
11239
11127
  - Authenticates via ZERO_TOKEN
@@ -11247,10 +11135,7 @@ ${formatRegistryListing(templates, `${config.target} templates`)}`;
11247
11135
  withErrorHandler(async (options) => {
11248
11136
  const dispatch = await dispatchGenerate({
11249
11137
  generationType: config.generationType,
11250
- provider: options.provider,
11251
- prompt: options.prompt,
11252
- all: options.all,
11253
- json: options.json
11138
+ prompt: options.prompt
11254
11139
  });
11255
11140
  if (dispatch.outcome === "handled") return;
11256
11141
  const prompt = dispatch.prompt;
@@ -11293,14 +11178,10 @@ ${formatRegistryListing(templates, `${config.target} templates`)}`;
11293
11178
  kind: toGenerationTarget(config.target),
11294
11179
  prompt,
11295
11180
  slugSource: options.title,
11296
- site: options.site,
11181
+ siteSlug: options.siteSlug,
11297
11182
  details: [...config.details(options), ...extraDetails],
11298
11183
  artifactRules: config.artifactRules
11299
11184
  });
11300
- if (options.json) {
11301
- console.log(JSON.stringify(packet));
11302
- return;
11303
- }
11304
11185
  console.log(packet.instructions);
11305
11186
  })
11306
11187
  );
@@ -11311,8 +11192,7 @@ function standardDetails(kind) {
11311
11192
  return (options) => {
11312
11193
  return [
11313
11194
  `Artifact kind: ${kind}`,
11314
- `Requested title/name: ${options.title ?? "not specified"}`,
11315
- `Audience: ${options.audience ?? "not specified"}`
11195
+ `Requested title/name: ${options.title ?? "not specified"}`
11316
11196
  ];
11317
11197
  };
11318
11198
  }
@@ -11323,8 +11203,8 @@ var reportCommand = createArtifactGenerateCommand({
11323
11203
  description: "Generate an HTML report from a prompt",
11324
11204
  usageCommand: "zero generate report",
11325
11205
  examples: ` Generate report: zero generate report --prompt "A Q2 usage report for the API team"
11326
- Stable hosted slug: zero generate report --site api-usage-q2 --prompt "A Q2 usage report"
11327
- List providers: zero generate report`,
11206
+ Stable hosted slug: zero generate report --site-slug api-usage-q2 --prompt "A Q2 usage report"
11207
+ Show choices: zero generate report`,
11328
11208
  details: standardDetails("report"),
11329
11209
  artifactRules: [
11330
11210
  "Produce an analytical report, not a marketing page.",
@@ -11340,8 +11220,8 @@ var docsDesignCommand = createArtifactGenerateCommand({
11340
11220
  description: "Generate a documentation design from a prompt",
11341
11221
  usageCommand: "zero generate docs-design",
11342
11222
  examples: ` Generate docs design: zero generate docs-design --prompt "Docs for adding artifact targets"
11343
- Stable hosted slug: zero generate docs-design --site artifact-target-docs --prompt "Artifact target docs"
11344
- List providers: zero generate docs-design`,
11223
+ Stable hosted slug: zero generate docs-design --site-slug artifact-target-docs --prompt "Artifact target docs"
11224
+ Show choices: zero generate docs-design`,
11345
11225
  details: standardDetails("docs-design"),
11346
11226
  artifactRules: [
11347
11227
  "Produce a documentation design mockup, not a production documentation system.",
@@ -11357,8 +11237,8 @@ var posterCommand = createArtifactGenerateCommand({
11357
11237
  description: "Generate an HTML poster from a prompt",
11358
11238
  usageCommand: "zero generate poster",
11359
11239
  examples: ` Generate poster: zero generate poster --prompt "A launch poster for artifact targets"
11360
- Stable hosted slug: zero generate poster --site artifact-poster --prompt "A launch poster"
11361
- List providers: zero generate poster`,
11240
+ Stable hosted slug: zero generate poster --site-slug artifact-poster --prompt "A launch poster"
11241
+ Show choices: zero generate poster`,
11362
11242
  details: standardDetails("poster"),
11363
11243
  artifactRules: [
11364
11244
  "Produce a poster-style HTML artifact with strong hierarchy and composition.",
@@ -11374,8 +11254,8 @@ var dashboardDesignCommand = createArtifactGenerateCommand({
11374
11254
  description: "Generate a dashboard design from a prompt",
11375
11255
  usageCommand: "zero generate dashboard-design",
11376
11256
  examples: ` Generate dash design: zero generate dashboard-design --prompt "An ops dashboard for generation runs"
11377
- Stable hosted slug: zero generate dashboard-design --site generation-ops --prompt "A generation ops dashboard"
11378
- List providers: zero generate dashboard-design`,
11257
+ Stable hosted slug: zero generate dashboard-design --site-slug generation-ops --prompt "A generation ops dashboard"
11258
+ Show choices: zero generate dashboard-design`,
11379
11259
  details: standardDetails("dashboard-design"),
11380
11260
  artifactRules: [
11381
11261
  "Produce a dashboard design mockup, not a live operational dashboard.",
@@ -11391,8 +11271,8 @@ var mobileAppDesignCommand = createArtifactGenerateCommand({
11391
11271
  description: "Generate a mobile app design prototype from a prompt",
11392
11272
  usageCommand: "zero generate mobile-app-design",
11393
11273
  examples: ` Generate mobile UI: zero generate mobile-app-design --prompt "A mobile review screen for generation artifacts"
11394
- Stable hosted slug: zero generate mobile-app-design --site generation-mobile-review --prompt "A mobile review screen"
11395
- List providers: zero generate mobile-app-design`,
11274
+ Stable hosted slug: zero generate mobile-app-design --site-slug generation-mobile-review --prompt "A mobile review screen"
11275
+ Show choices: zero generate mobile-app-design`,
11396
11276
  details: standardDetails("mobile-app-design"),
11397
11277
  artifactRules: [
11398
11278
  "Produce a design prototype, not a runnable or installable mobile app.",
@@ -11407,7 +11287,6 @@ init_esm_shims();
11407
11287
 
11408
11288
  // src/commands/zero/shared/presentation-generate.ts
11409
11289
  init_esm_shims();
11410
- var PRESENTATION_MAX_IMAGES = 8;
11411
11290
  var PRESENTATION_TARGET = "presentation";
11412
11291
  function parseSlideCount(value) {
11413
11292
  const slideCount = Number(value);
@@ -11416,18 +11295,6 @@ function parseSlideCount(value) {
11416
11295
  }
11417
11296
  return slideCount;
11418
11297
  }
11419
- function parseImageCount(value) {
11420
- const imageCount = Number(value);
11421
- if (!Number.isInteger(imageCount)) {
11422
- throw new InvalidArgumentError("images must be an integer");
11423
- }
11424
- if (!Number.isSafeInteger(imageCount) || imageCount < 0 || imageCount > PRESENTATION_MAX_IMAGES) {
11425
- throw new InvalidArgumentError(
11426
- `images must be between 0 and ${PRESENTATION_MAX_IMAGES}`
11427
- );
11428
- }
11429
- return imageCount;
11430
- }
11431
11298
  function unknownDesignSystemError2(id, usageCommand) {
11432
11299
  const designSystems = listDesignSystems();
11433
11300
  const message = [
@@ -11458,30 +11325,13 @@ function createPresentationGenerateCommand(config) {
11458
11325
  return new Command().name(config.name).description("Generate an HTML presentation from a prompt").option(
11459
11326
  "--prompt <text>",
11460
11327
  "Presentation prompt; can also be piped via stdin"
11461
- ).option(
11462
- "--provider <name>",
11463
- "Provider: 'built-in' to run vm0's pipeline, or a connector name to get its skill-invocation guidance"
11464
- ).option(
11465
- "--all",
11466
- "When listing providers (no --prompt given), include unavailable or not-yet-authorized connectors"
11467
- ).option("--style <style>", "Style: editorial or swiss", "editorial").option("--slides <count>", "Slide count: 4-20", parseSlideCount, 8).option(
11468
- "--images <count>",
11469
- `Generated image count: 0-${PRESENTATION_MAX_IMAGES}`,
11470
- parseImageCount,
11471
- 2
11472
- ).option(
11473
- "--image-model <model>",
11474
- "Image model for generated visuals (default: gpt-image-1): gpt-image-2, gpt-image-1.5, gpt-image-1, gpt-image-1-mini, flux-pro-1.1, flux-pro-1.1-ultra, qwen-image, or seedream4"
11475
- ).option(
11476
- "--theme <theme>",
11477
- "Theme: editorial supports ink, coral, forest; swiss supports ikb, lemon, lime, mono"
11478
- ).option("--audience <text>", "Audience context").option("--title <text>", "Requested deck title").option(
11328
+ ).option("--site-slug <slug>", "Hosted site slug override").option("--title <text>", "Requested deck title").option(
11479
11329
  "--design-system <id>",
11480
11330
  "Design system id from the registry (see Design Systems below). Accepts either 'apple' or 'design-system:apple'."
11481
11331
  ).option(
11482
11332
  "--template <id>",
11483
11333
  "Template id from the registry, scoped to presentation (see Templates below). Accepts either 'html-ppt-pitch-deck' or 'template:html-ppt-pitch-deck'."
11484
- ).option("--json", "Print metadata as JSON").addHelpText("after", () => {
11334
+ ).option("--slides <count>", "Slide count: 4-20", parseSlideCount, 8).addHelpText("after", () => {
11485
11335
  const designSystems = listDesignSystems();
11486
11336
  const templates = listTemplates(PRESENTATION_TARGET);
11487
11337
  return `
@@ -11504,10 +11354,7 @@ ${formatRegistryListing(templates, "presentation templates")}`;
11504
11354
  withErrorHandler(async (options) => {
11505
11355
  const dispatch = await dispatchGenerate({
11506
11356
  generationType: config.generationType,
11507
- provider: options.provider,
11508
- prompt: options.prompt,
11509
- all: options.all,
11510
- json: options.json
11357
+ prompt: options.prompt
11511
11358
  });
11512
11359
  if (dispatch.outcome === "handled") return;
11513
11360
  const prompt = dispatch.prompt;
@@ -11546,13 +11393,9 @@ ${formatRegistryListing(templates, "presentation templates")}`;
11546
11393
  kind: "presentation",
11547
11394
  prompt,
11548
11395
  slugSource: options.title,
11396
+ siteSlug: options.siteSlug,
11549
11397
  details: [
11550
- `Style: ${options.style}`,
11551
11398
  `Slide count: ${options.slides}`,
11552
- `Suggested generated visual count: ${options.images}`,
11553
- `Image model preference if visuals are generated separately: ${options.imageModel ?? "default"}`,
11554
- `Theme: ${options.theme ?? "agent decides from style"}`,
11555
- `Audience: ${options.audience ?? "not specified"}`,
11556
11399
  `Requested deck title: ${options.title ?? "not specified"}`,
11557
11400
  `Selected design system: ${resolvedDesignSystem ? `${resolvedDesignSystem.id} (${resolvedDesignSystem.name})` : "agent decides"}`,
11558
11401
  `Selected template: ${resolvedTemplate ? `${resolvedTemplate.id} (${resolvedTemplate.name})` : "agent decides"}`
@@ -11565,10 +11408,6 @@ ${formatRegistryListing(templates, "presentation templates")}`;
11565
11408
  "Keep slide text readable from across a room; avoid memo-like walls of text."
11566
11409
  ]
11567
11410
  });
11568
- if (options.json) {
11569
- console.log(JSON.stringify(packet));
11570
- return;
11571
- }
11572
11411
  console.log(packet.instructions);
11573
11412
  })
11574
11413
  );
@@ -11581,9 +11420,9 @@ var presentationCommand = createPresentationGenerateCommand({
11581
11420
  usageCommand: "zero generate presentation",
11582
11421
  examples: ` Generate deck: zero generate presentation --prompt "A strategy deck for reducing support volume"
11583
11422
  Pipe prompt: cat brief.txt | zero generate presentation
11584
- Swiss style: zero generate presentation --style swiss --theme ikb --slides 10 --images 8 --image-model gpt-image-1.5 --prompt "A product launch narrative"
11585
- Audience context: zero generate presentation --audience "engineering leadership" --prompt "API migration plan"
11586
- List providers: zero generate presentation`
11423
+ Pick slide count: zero generate presentation --slides 10 --prompt "A product launch narrative"
11424
+ Stable hosted slug: zero generate presentation --site-slug api-migration-plan --prompt "API migration plan"
11425
+ Show choices: zero generate presentation`
11587
11426
  });
11588
11427
 
11589
11428
  // src/commands/zero/generate/video.ts
@@ -11818,7 +11657,7 @@ function createVideoGenerateCommand(config) {
11818
11657
  "Reference audio URL for Dreamina Seedance 2.0",
11819
11658
  collectUrl,
11820
11659
  []
11821
- ).option("--first-frame-image-url <url>", "First frame image URL").option("--last-frame-image-url <url>", "Last frame image URL").option("--json", "Print metadata as JSON").addHelpText(
11660
+ ).option("--first-frame-image-url <url>", "First frame image URL").option("--last-frame-image-url <url>", "Last frame image URL").addHelpText(
11822
11661
  "after",
11823
11662
  `
11824
11663
  Examples:
@@ -11850,8 +11689,7 @@ Models:
11850
11689
  generationType: config.generationType,
11851
11690
  provider: options.provider,
11852
11691
  prompt: options.prompt,
11853
- all: options.all,
11854
- json: options.json
11692
+ all: options.all
11855
11693
  });
11856
11694
  if (dispatch.outcome === "handled") return;
11857
11695
  const prompt = dispatch.prompt;
@@ -11873,10 +11711,6 @@ Models:
11873
11711
  firstFrameImageUrl: options.firstFrameImageUrl,
11874
11712
  lastFrameImageUrl: options.lastFrameImageUrl
11875
11713
  });
11876
- if (options.json) {
11877
- console.log(JSON.stringify(result));
11878
- return;
11879
- }
11880
11714
  console.log(source_default.green(`\u2713 Video generated: ${result.url}`));
11881
11715
  console.log(source_default.dim(` File: ${result.filename}`));
11882
11716
  console.log(source_default.dim(` Duration: ${result.duration}`));
@@ -11907,32 +11741,8 @@ var videoCommand = createVideoGenerateCommand({
11907
11741
 
11908
11742
  // src/commands/zero/generate/website.ts
11909
11743
  init_esm_shims();
11910
- var WEBSITE_TEMPLATE_DIRECTIONS = ["auto", "launch", "profile"];
11911
- var WEBSITE_MAX_IMAGES = 3;
11912
11744
  var WEBSITE_TARGET = "website";
11913
11745
  var WEBSITE_USAGE_COMMAND = "zero generate website";
11914
- function parseTemplateDirection(value) {
11915
- if (WEBSITE_TEMPLATE_DIRECTIONS.some((direction) => {
11916
- return direction === value;
11917
- })) {
11918
- return value;
11919
- }
11920
- throw new InvalidArgumentError(
11921
- "template-direction must be auto, launch, or profile"
11922
- );
11923
- }
11924
- function parseImageCount2(value) {
11925
- const imageCount = Number(value);
11926
- if (!Number.isInteger(imageCount)) {
11927
- throw new InvalidArgumentError("images must be an integer");
11928
- }
11929
- if (!Number.isSafeInteger(imageCount) || imageCount < 0 || imageCount > WEBSITE_MAX_IMAGES) {
11930
- throw new InvalidArgumentError(
11931
- `images must be between 0 and ${WEBSITE_MAX_IMAGES}`
11932
- );
11933
- }
11934
- return imageCount;
11935
- }
11936
11746
  function unknownDesignSystemError3(id) {
11937
11747
  const designSystems = listDesignSystems();
11938
11748
  const message = [
@@ -11959,47 +11769,27 @@ function unknownTemplateError3(id) {
11959
11769
  ].join("\n");
11960
11770
  return new Error(message);
11961
11771
  }
11962
- var websiteCommand = new Command().name("website").description("Prepare website authoring instructions from a prompt").option("--prompt <text>", "Website prompt; can also be piped via stdin").option(
11963
- "--provider <name>",
11964
- "Provider: 'built-in' to run vm0's pipeline, or a connector name to get its skill-invocation guidance"
11965
- ).option(
11966
- "--all",
11967
- "When listing providers (no --prompt given), include unavailable or not-yet-authorized connectors"
11968
- ).option(
11969
- "--template-direction <direction>",
11970
- "High-level website direction: auto, launch, or profile",
11971
- parseTemplateDirection,
11972
- "auto"
11973
- ).option(
11974
- "--template <id>",
11975
- "Template id from the registry, scoped to website (see Templates below). Accepts either short id or full 'template:<id>'."
11976
- ).option(
11772
+ var websiteCommand = new Command().name("website").description("Prepare website authoring instructions from a prompt").option("--prompt <text>", "Website prompt; can also be piped via stdin").option("--site-slug <slug>", "Hosted site slug override").option("--title <text>", "Requested site title or name").option(
11977
11773
  "--design-system <id>",
11978
11774
  "Design system id from the registry (see Design Systems below). Accepts either 'apple' or 'design-system:apple'."
11979
11775
  ).option(
11980
- "--images <count>",
11981
- `Generated website image count: 0-${WEBSITE_MAX_IMAGES}`,
11982
- parseImageCount2,
11983
- 1
11984
- ).option(
11985
- "--image-model <model>",
11986
- "Image model for generated visuals (default: gpt-image-1): gpt-image-2, gpt-image-1.5, gpt-image-1, gpt-image-1-mini, flux-pro-1.1, flux-pro-1.1-ultra, qwen-image, or seedream4"
11987
- ).option("--site <slug>", "Hosted site slug; defaults to the generated name").option("--title <text>", "Requested site title or name").option("--audience <text>", "Audience context").option("--json", "Print metadata as JSON").addHelpText("after", () => {
11776
+ "--template <id>",
11777
+ "Template id from the registry, scoped to website (see Templates below). Accepts either short id or full 'template:<id>'."
11778
+ ).addHelpText("after", () => {
11988
11779
  const designSystems = listDesignSystems();
11989
11780
  const templates = listTemplates(WEBSITE_TARGET);
11990
11781
  return `
11991
11782
  Examples:
11992
11783
  Generate site: zero generate website --prompt "A launch site for a developer observability tool"
11993
- Pick direction: zero generate website --template-direction profile --images 2 --image-model gpt-image-1.5 --prompt "Portfolio for a robotics photographer"
11994
11784
  Pick template: zero generate website --template saas-landing --prompt "Launch site for a billing API"
11995
11785
  Pick design system: zero generate website --design-system stripe --prompt "Pricing page for a SaaS"
11996
- Stable hosted slug: zero generate website --site api-migration-demo --prompt "An internal migration microsite"
11786
+ Stable hosted slug: zero generate website --site-slug api-migration-demo --prompt "An internal migration microsite"
11997
11787
  Pipe prompt: cat brief.txt | zero generate website
11998
- List providers: zero generate website
11788
+ Show choices: zero generate website
11999
11789
 
12000
11790
  Output:
12001
11791
  Prints a source-selection packet for the current agent.
12002
- With no --prompt and no piped input, prints the provider menu instead.
11792
+ With no --prompt and no piped input, prints the generation choices instead.
12003
11793
 
12004
11794
  Notes:
12005
11795
  - Authenticates via ZERO_TOKEN
@@ -12014,10 +11804,7 @@ ${formatRegistryListing(templates, "website templates")}`;
12014
11804
  withErrorHandler(async (options) => {
12015
11805
  const dispatch = await dispatchGenerate({
12016
11806
  generationType: "website",
12017
- provider: options.provider,
12018
- prompt: options.prompt,
12019
- all: options.all,
12020
- json: options.json
11807
+ prompt: options.prompt
12021
11808
  });
12022
11809
  if (dispatch.outcome === "handled") return;
12023
11810
  const prompt = dispatch.prompt;
@@ -12046,13 +11833,9 @@ ${formatRegistryListing(templates, "website templates")}`;
12046
11833
  kind: "website",
12047
11834
  prompt,
12048
11835
  slugSource: options.title,
12049
- site: options.site,
11836
+ siteSlug: options.siteSlug,
12050
11837
  details: [
12051
- `Template direction: ${options.templateDirection}`,
12052
- `Suggested generated visual count: ${options.images}`,
12053
- `Image model preference if visuals are generated separately: ${options.imageModel ?? "default"}`,
12054
11838
  `Requested title/site name: ${options.title ?? "not specified"}`,
12055
- `Audience: ${options.audience ?? "not specified"}`,
12056
11839
  `Selected design system: ${resolvedDesignSystem ? `${resolvedDesignSystem.id} (${resolvedDesignSystem.name})` : "agent decides"}`,
12057
11840
  `Selected template: ${resolvedTemplate ? `${resolvedTemplate.id} (${resolvedTemplate.name})` : "agent decides"}`
12058
11841
  ],
@@ -12063,10 +11846,6 @@ ${formatRegistryListing(templates, "website templates")}`;
12063
11846
  "Use responsive HTML/CSS and verify the page works at mobile and desktop widths."
12064
11847
  ]
12065
11848
  });
12066
- if (options.json) {
12067
- console.log(JSON.stringify(packet));
12068
- return;
12069
- }
12070
11849
  console.log(packet.instructions);
12071
11850
  })
12072
11851
  );
@@ -12083,7 +11862,7 @@ function createVoiceGenerateCommand(config) {
12083
11862
  ).option(
12084
11863
  "--all",
12085
11864
  "When listing providers (no --prompt given), include unavailable or not-yet-authorized connectors"
12086
- ).option("--voice <voice>", "OpenAI voice to use", "marin").option("--instructions <text>", "Voice style instructions").option("--json", "Print metadata as JSON").addHelpText(
11865
+ ).option("--voice <voice>", "OpenAI voice to use", "marin").option("--instructions <text>", "Voice style instructions").addHelpText(
12087
11866
  "after",
12088
11867
  `
12089
11868
  Examples:
@@ -12103,8 +11882,7 @@ Notes:
12103
11882
  generationType: config.generationType,
12104
11883
  provider: options.provider,
12105
11884
  prompt: options.prompt ?? options.text,
12106
- all: options.all,
12107
- json: options.json
11885
+ all: options.all
12108
11886
  });
12109
11887
  if (dispatch.outcome === "handled") return;
12110
11888
  const text = dispatch.prompt;
@@ -12113,10 +11891,6 @@ Notes:
12113
11891
  voice: options.voice,
12114
11892
  instructions: options.instructions
12115
11893
  });
12116
- if (options.json) {
12117
- console.log(JSON.stringify(result));
12118
- return;
12119
- }
12120
11894
  console.log(source_default.green(`\u2713 Voice generated: ${result.url}`));
12121
11895
  console.log(source_default.dim(` File: ${result.filename}`));
12122
11896
  console.log(source_default.dim(` Duration: ${result.durationSeconds}s`));
@@ -12145,7 +11919,7 @@ function createListerOnlyCommand(config) {
12145
11919
  return new Command().name(config.name).description(config.description).option(
12146
11920
  "--provider <name>",
12147
11921
  "Connector name; prints that connector's skill-invocation guidance"
12148
- ).option("--all", "Include unavailable or not-yet-authorized connectors").option("--json", "Print the provider list as JSON").addHelpText(
11922
+ ).option("--all", "Include unavailable or not-yet-authorized connectors").addHelpText(
12149
11923
  "after",
12150
11924
  `
12151
11925
  Notes:
@@ -12170,18 +11944,17 @@ Notes:
12170
11944
  return;
12171
11945
  }
12172
11946
  await runLister(config.generationType, {
12173
- all: options.all,
12174
- json: options.json
11947
+ all: options.all
12175
11948
  });
12176
11949
  })
12177
11950
  );
12178
11951
  }
12179
11952
 
12180
11953
  // src/commands/zero/generate/index.ts
12181
- var audioCommand = createListerOnlyCommand({
12182
- name: "audio",
12183
- generationType: "audio",
12184
- description: "List connectors that provide audio generation (alias of voice for non-speech audio)"
11954
+ var musicCommand = createListerOnlyCommand({
11955
+ name: "music",
11956
+ generationType: "music",
11957
+ description: "List connectors that provide music generation"
12185
11958
  });
12186
11959
  var textCommand = createListerOnlyCommand({
12187
11960
  name: "text",
@@ -12205,12 +11978,12 @@ function buildGenerateHelpText() {
12205
11978
  ' Generate report: zero generate report --prompt "A Q2 usage report"',
12206
11979
  ' Generate docs: zero generate docs-design --prompt "A setup guide"',
12207
11980
  ' Generate video: zero generate video --prompt "A cinematic city shot"',
12208
- ...zeroTokenAllowsFeatureSwitch("hostedSites" /* HostedSites */) ? [
12209
- ' Generate site: zero generate website --prompt "A launch site"'
12210
- ] : [],
11981
+ ' Generate site: zero generate website --prompt "A launch site"',
12211
11982
  ' Generate speech: zero generate voice --prompt "Hello"',
11983
+ " Show music choices: zero generate music",
12212
11984
  "",
12213
- " List image providers: zero generate image",
11985
+ " Show image choices: zero generate image",
11986
+ " Show report choices: zero generate report",
12214
11987
  " Use a connector: zero generate video --provider heygen",
12215
11988
  " Force built-in: zero generate image --provider built-in --model gpt-image-1.5 --prompt ..."
12216
11989
  ];
@@ -12219,16 +11992,13 @@ Examples:
12219
11992
  ${examples.join("\n")}
12220
11993
 
12221
11994
  Notes:
12222
- - Run "zero generate <type>" with no --prompt to list every provider available for that type.
12223
- - --provider built-in (default when --prompt is provided) runs the vm0-hosted pipeline.
12224
- - --provider <connector-name> prints how to invoke that connector's skill instead.`;
11995
+ - Run "zero generate <type>" with no --prompt to list generation choices for that type.
11996
+ - Media and connector-backed generation types may expose --provider for vm0 or connector execution guidance.
11997
+ - HTML artifact types use registry-backed --design-system and --template selection.`;
12225
11998
  }
12226
11999
  var generateCommand = new Command().name("generate").description(
12227
12000
  "Generate assets via vm0's built-in pipelines or get connector skill-invocation guidance"
12228
- ).addCommand(imageCommand).addCommand(presentationCommand).addCommand(reportCommand).addCommand(docsDesignCommand).addCommand(posterCommand).addCommand(dashboardDesignCommand).addCommand(mobileAppDesignCommand).addCommand(videoCommand).addCommand(
12229
- websiteCommand,
12230
- zeroTokenAllowsFeatureSwitch("hostedSites" /* HostedSites */) ? {} : { hidden: true }
12231
- ).addCommand(voiceCommand).addCommand(audioCommand).addCommand(textCommand).addCommand(codeCommand).addCommand(documentCommand).addHelpText("after", buildGenerateHelpText);
12001
+ ).addCommand(imageCommand).addCommand(presentationCommand).addCommand(reportCommand).addCommand(docsDesignCommand).addCommand(posterCommand).addCommand(dashboardDesignCommand).addCommand(mobileAppDesignCommand).addCommand(videoCommand).addCommand(websiteCommand).addCommand(voiceCommand).addCommand(musicCommand).addCommand(textCommand).addCommand(codeCommand).addCommand(documentCommand).addHelpText("after", buildGenerateHelpText);
12232
12002
 
12233
12003
  // src/commands/zero/web/index.ts
12234
12004
  init_esm_shims();
@@ -12966,7 +12736,7 @@ var COMMAND_CAPABILITY_MAP = {
12966
12736
  whoami: null,
12967
12737
  "developer-support": null,
12968
12738
  "computer-use": "computer-use:write",
12969
- generate: "file:write",
12739
+ generate: null,
12970
12740
  web: null,
12971
12741
  host: "host:write",
12972
12742
  maps: "maps:read"
@@ -13002,9 +12772,6 @@ var DEFAULT_COMMANDS = [
13002
12772
  ];
13003
12773
  function shouldHideCommand(name, payload) {
13004
12774
  if (!payload) return false;
13005
- if (name === "generate") {
13006
- return !payload.capabilities.includes("file:write") && !zeroTokenAllowsFeatureSwitch("hostedSites" /* HostedSites */, payload);
13007
- }
13008
12775
  const requiredCap = COMMAND_CAPABILITY_MAP[name];
13009
12776
  if (requiredCap === void 0) return true;
13010
12777
  if (requiredCap === null) return false;
@@ -13037,7 +12804,7 @@ function buildZeroHelpText(payload = decodeZeroTokenPayload()) {
13037
12804
  " Manage custom skills? zero skill --help",
13038
12805
  " List generators? zero generate --help",
13039
12806
  ' Generate image? zero generate image --prompt "..."',
13040
- ...zeroTokenAllowsFeatureSwitch("hostedSites" /* HostedSites */, payload) ? [' Generate website? zero generate website --prompt "..."'] : [],
12807
+ ' Generate website? zero generate website --prompt "..."',
13041
12808
  ' Generate voice? zero generate voice --prompt "..."',
13042
12809
  ...shouldHideCommand("host", payload) ? [] : [" Host a static site? zero host ./dist --site my-site --spa"],
13043
12810
  ...shouldHideCommand("maps", payload) ? [] : [
@@ -13060,7 +12827,7 @@ function registerZeroCommands(prog, commands) {
13060
12827
  var program = new Command();
13061
12828
  program.name("zero").description(
13062
12829
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
13063
- ).version("9.176.3").addHelpText("after", () => {
12830
+ ).version("9.176.5").addHelpText("after", () => {
13064
12831
  return buildZeroHelpText();
13065
12832
  });
13066
12833
  if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {