@vm0/cli 9.176.4 → 9.177.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/zero.js CHANGED
@@ -144,7 +144,7 @@ import {
144
144
  upsertZeroOrgModelProvider,
145
145
  withErrorHandler,
146
146
  zeroAgentCustomSkillNameSchema
147
- } from "./chunk-JQ72VVQC.js";
147
+ } from "./chunk-IL6D4DEA.js";
148
148
  import {
149
149
  __toESM,
150
150
  init_esm_shims
@@ -6574,8 +6574,10 @@ var DATA_URL_PATTERN = /^data:([^;,]+);base64,(.*)$/s;
6574
6574
  var COMPUTER_USE_HELP_TEXT = `
6575
6575
  Workflow:
6576
6576
  1. Start the Zero Desktop app and make sure Computer Use is online.
6577
- 2. Run "zero computer-use list-apps" to find the target app name or bundle id.
6578
- 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,
6579
6581
  snapshotId, visible element indexes, and accessibility state.
6580
6582
  4. Prefer element actions with --snapshot-id and --element-index. Use --x/--y
6581
6583
  only when the target is visible in the returned screenshot but has no useful
@@ -6589,8 +6591,11 @@ Notes:
6589
6591
  Write commands are sent to the connected Desktop host and may wait for local
6590
6592
  approval before they run. Coordinate fallbacks use screenshot coordinates from
6591
6593
  get-app-state; pass the matching --snapshot-id when acting on a prior snapshot.
6592
- type-text sends literal keyboard input to the target app's current focus. Use
6593
- 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.
6594
6599
  press-key accepts xdotool-style names such as shift+semicolon, Control_L+J,
6595
6600
  ctrl+alt+n, and BackSpace, plus existing macOS-style forms such as Command+L.
6596
6601
  type-text and press-key accept the same --snapshot-id as the element actions:
@@ -6603,22 +6608,22 @@ Examples:
6603
6608
  zero computer-use list-apps
6604
6609
 
6605
6610
  Inspect Safari state:
6606
- zero computer-use get-app-state --app Safari
6611
+ zero computer-use get-app-state --app com.apple.Safari
6607
6612
 
6608
6613
  Click element index 7 from snapshot desktop_abc:
6609
- 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
6610
6615
 
6611
6616
  Click screenshot coordinate (320, 240) from snapshot desktop_abc:
6612
- 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
6613
6618
 
6614
6619
  Type text into the snapshot desktop_abc window in Safari:
6615
- 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"
6616
6621
 
6617
6622
  Press a keyboard shortcut in the snapshot desktop_abc window:
6618
- 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
6619
6624
 
6620
6625
  Open an app without activating the current foreground app:
6621
- zero computer-use open-app --app Things`;
6626
+ zero computer-use open-app --app com.culturedcode.ThingsMac`;
6622
6627
  function sleep2(ms) {
6623
6628
  return new Promise((resolve2) => {
6624
6629
  setTimeout(resolve2, ms);
@@ -6824,7 +6829,10 @@ function addTargetOptions(command) {
6824
6829
  return command.option("--timeout <seconds>", "Maximum time to wait", "30");
6825
6830
  }
6826
6831
  function appOption(command) {
6827
- 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
+ );
6828
6836
  }
6829
6837
  var listAppsCommand = addTargetOptions(
6830
6838
  new Command().name("list-apps").description("List apps available to the Desktop Computer Use host").action(
@@ -10068,6 +10076,7 @@ init_esm_shims();
10068
10076
  function toConnectorGenerationType(generationType) {
10069
10077
  switch (generationType) {
10070
10078
  case "voice":
10079
+ case "music":
10071
10080
  return "audio";
10072
10081
  case "dashboard-design":
10073
10082
  case "docs-design":
@@ -10189,62 +10198,6 @@ var BUILT_IN_GENERATION_PROVIDERS = {
10189
10198
  reason: "available without connector setup"
10190
10199
  }
10191
10200
  ],
10192
- presentation: [
10193
- {
10194
- label: "Built-in",
10195
- model: "gpt-5.5",
10196
- command: "zero generate presentation --provider built-in -h",
10197
- reason: "available without connector setup"
10198
- }
10199
- ],
10200
- report: [
10201
- {
10202
- label: "Built-in",
10203
- model: "gpt-5.5",
10204
- command: "zero generate report --provider built-in -h",
10205
- reason: "available without connector setup"
10206
- }
10207
- ],
10208
- "docs-design": [
10209
- {
10210
- label: "Built-in",
10211
- model: "gpt-5.5",
10212
- command: "zero generate docs-design --provider built-in -h",
10213
- reason: "available without connector setup"
10214
- }
10215
- ],
10216
- poster: [
10217
- {
10218
- label: "Built-in",
10219
- model: "gpt-5.5",
10220
- command: "zero generate poster --provider built-in -h",
10221
- reason: "available without connector setup"
10222
- }
10223
- ],
10224
- "dashboard-design": [
10225
- {
10226
- label: "Built-in",
10227
- model: "gpt-5.5",
10228
- command: "zero generate dashboard-design --provider built-in -h",
10229
- reason: "available without connector setup"
10230
- }
10231
- ],
10232
- "mobile-app-design": [
10233
- {
10234
- label: "Built-in",
10235
- model: "gpt-5.5",
10236
- command: "zero generate mobile-app-design --provider built-in -h",
10237
- reason: "available without connector setup"
10238
- }
10239
- ],
10240
- website: [
10241
- {
10242
- label: "Built-in",
10243
- model: "gpt-5.5",
10244
- command: "zero generate website --provider built-in -h",
10245
- reason: "available without connector setup"
10246
- }
10247
- ],
10248
10201
  video: [
10249
10202
  {
10250
10203
  label: "Built-in",
@@ -10299,39 +10252,44 @@ var BUILT_IN_GENERATION_COMMANDS = {
10299
10252
  },
10300
10253
  presentation: {
10301
10254
  label: "Built-in presentation generation",
10302
- command: "zero generate presentation --provider built-in -h",
10255
+ command: "zero generate presentation -h",
10303
10256
  models: "gpt-5.5"
10304
10257
  },
10305
10258
  report: {
10306
10259
  label: "Built-in report generation",
10307
- command: "zero generate report --provider built-in -h",
10260
+ command: "zero generate report -h",
10308
10261
  models: "gpt-5.5"
10309
10262
  },
10310
10263
  "docs-design": {
10311
10264
  label: "Built-in docs design generation",
10312
- command: "zero generate docs-design --provider built-in -h",
10265
+ command: "zero generate docs-design -h",
10313
10266
  models: "gpt-5.5"
10314
10267
  },
10315
10268
  poster: {
10316
10269
  label: "Built-in poster generation",
10317
- command: "zero generate poster --provider built-in -h",
10270
+ command: "zero generate poster -h",
10318
10271
  models: "gpt-5.5"
10319
10272
  },
10320
10273
  "dashboard-design": {
10321
10274
  label: "Built-in dashboard design generation",
10322
- command: "zero generate dashboard-design --provider built-in -h",
10275
+ command: "zero generate dashboard-design -h",
10323
10276
  models: "gpt-5.5"
10324
10277
  },
10325
10278
  "mobile-app-design": {
10326
10279
  label: "Built-in mobile app design generation",
10327
- command: "zero generate mobile-app-design --provider built-in -h",
10280
+ command: "zero generate mobile-app-design -h",
10328
10281
  models: "gpt-5.5"
10329
10282
  },
10330
10283
  website: {
10331
10284
  label: "Built-in website generation",
10332
- command: "zero generate website --provider built-in -h",
10285
+ command: "zero generate website -h",
10333
10286
  models: "gpt-5.5"
10334
10287
  },
10288
+ sprite: {
10289
+ label: "Built-in sprite asset generation",
10290
+ command: "zero generate sprite -h",
10291
+ models: "gpt-image-2 (recommended) via built-in image generation"
10292
+ },
10335
10293
  voice: {
10336
10294
  label: "Built-in voice generation",
10337
10295
  command: "zero generate voice --provider built-in -h",
@@ -10347,22 +10305,6 @@ var GENERATION_CONTEXT = {
10347
10305
  ]
10348
10306
  }
10349
10307
  };
10350
- var GENERATION_TYPE_ORDER = [
10351
- "image",
10352
- "video",
10353
- "audio",
10354
- "voice",
10355
- "text",
10356
- "code",
10357
- "document",
10358
- "presentation",
10359
- "website",
10360
- "report",
10361
- "docs-design",
10362
- "poster",
10363
- "dashboard-design",
10364
- "mobile-app-design"
10365
- ];
10366
10308
  var GENERATION_TYPE_LABELS = {
10367
10309
  audio: "Audio",
10368
10310
  code: "Code",
@@ -10371,9 +10313,11 @@ var GENERATION_TYPE_LABELS = {
10371
10313
  "docs-design": "Docs design",
10372
10314
  image: "Image",
10373
10315
  "mobile-app-design": "Mobile app design",
10316
+ music: "Music",
10374
10317
  poster: "Poster",
10375
10318
  presentation: "Presentation",
10376
10319
  report: "Report",
10320
+ sprite: "Sprite",
10377
10321
  text: "Text",
10378
10322
  video: "Video",
10379
10323
  voice: "Voice",
@@ -10382,21 +10326,23 @@ var GENERATION_TYPE_LABELS = {
10382
10326
  function getConnectorGenerationType(generationType) {
10383
10327
  switch (generationType) {
10384
10328
  case "voice":
10329
+ case "music":
10385
10330
  return "audio";
10386
10331
  case "dashboard-design":
10387
10332
  case "docs-design":
10388
10333
  case "mobile-app-design":
10389
10334
  case "poster":
10335
+ case "presentation":
10390
10336
  case "report":
10337
+ case "sprite":
10338
+ case "website":
10391
10339
  return null;
10392
10340
  case "audio":
10393
10341
  case "code":
10394
10342
  case "document":
10395
10343
  case "image":
10396
- case "presentation":
10397
10344
  case "text":
10398
10345
  case "video":
10399
- case "website":
10400
10346
  return generationType;
10401
10347
  }
10402
10348
  }
@@ -10409,18 +10355,6 @@ function getBuiltInCommand(generationType) {
10409
10355
  function getGenerationContext(generationType) {
10410
10356
  return GENERATION_CONTEXT[generationType] ?? null;
10411
10357
  }
10412
- function getAvailableGenerationTypes() {
10413
- const available = /* @__PURE__ */ new Set();
10414
- for (const type of CONNECTOR_TYPE_KEYS) {
10415
- for (const generationType of getConnectorGenerationTypes(type)) {
10416
- available.add(generationType);
10417
- }
10418
- }
10419
- return GENERATION_TYPE_ORDER.filter((type) => {
10420
- const connectorGenerationType = getConnectorGenerationType(type);
10421
- return getBuiltInProviders(type).length > 0 || connectorGenerationType !== null && available.has(connectorGenerationType);
10422
- });
10423
- }
10424
10358
  function getGenerationConnectors(generationType) {
10425
10359
  return CONNECTOR_TYPE_KEYS.map((type) => {
10426
10360
  return [type, CONNECTOR_TYPES[type]];
@@ -10650,28 +10584,6 @@ async function runLister(generationType, options = {}) {
10650
10584
  const other = candidates.filter((candidate) => {
10651
10585
  return candidate.status !== "ready";
10652
10586
  });
10653
- const builtInProviders = getBuiltInProviders(generationType);
10654
- if (options.json) {
10655
- console.log(
10656
- JSON.stringify(
10657
- {
10658
- generationType,
10659
- connectorGenerationType,
10660
- availableTypes: getAvailableGenerationTypes(),
10661
- agentId: agentId ?? null,
10662
- choices: ready,
10663
- otherCandidates: other,
10664
- builtInCommand: getBuiltInCommand(generationType),
10665
- generationContext: getGenerationContext(generationType),
10666
- builtInProvider: builtInProviders[0] ?? null,
10667
- builtInProviders
10668
- },
10669
- null,
10670
- 2
10671
- )
10672
- );
10673
- return;
10674
- }
10675
10587
  renderText({
10676
10588
  generationType,
10677
10589
  agentId,
@@ -10700,8 +10612,7 @@ async function dispatchGenerate(options) {
10700
10612
  const resolvedPrompt = resolvePrompt(options.prompt);
10701
10613
  if (resolvedPrompt === null) {
10702
10614
  await runLister(options.generationType, {
10703
- all: options.all,
10704
- json: options.json
10615
+ all: options.all
10705
10616
  });
10706
10617
  return { outcome: "handled" };
10707
10618
  }
@@ -10837,7 +10748,7 @@ function createImageGenerateCommand(config) {
10837
10748
  ).option(
10838
10749
  "--skip-style",
10839
10750
  "Opt out of styled image generation for this invocation"
10840
- ).option("--json", "Print metadata as JSON").addHelpText("after", () => {
10751
+ ).addHelpText("after", () => {
10841
10752
  const styles = listImageStyles();
10842
10753
  return `
10843
10754
  Examples:
@@ -10893,8 +10804,7 @@ ${formatRegistryListing(styles, "image styles")}`;
10893
10804
  generationType: config.generationType,
10894
10805
  provider: options.provider,
10895
10806
  prompt: options.prompt,
10896
- all: options.all,
10897
- json: options.json
10807
+ all: options.all
10898
10808
  });
10899
10809
  if (dispatch.outcome === "handled") return;
10900
10810
  const prompt = dispatch.prompt;
@@ -10922,10 +10832,6 @@ ${formatRegistryListing(styles, "image styles")}`;
10922
10832
  `Mask image URL: ${options.maskImageUrl ?? "none"}`
10923
10833
  ]
10924
10834
  });
10925
- if (options.json) {
10926
- console.log(JSON.stringify(packet));
10927
- return;
10928
- }
10929
10835
  console.log(packet.instructions);
10930
10836
  return;
10931
10837
  }
@@ -10953,10 +10859,6 @@ ${formatRegistryListing(styles, "image styles")}`;
10953
10859
  inputFidelity,
10954
10860
  imagePromptStrength
10955
10861
  });
10956
- if (options.json) {
10957
- console.log(JSON.stringify(result));
10958
- return;
10959
- }
10960
10862
  console.log(source_default.green(`\u2713 Image generated: ${result.url}`));
10961
10863
  console.log(source_default.dim(` File: ${result.filename}`));
10962
10864
  console.log(source_default.dim(` Size: ${result.imageSize}`));
@@ -11210,19 +11112,13 @@ function unknownTemplateError(id, usageCommand, target) {
11210
11112
  return new Error(message);
11211
11113
  }
11212
11114
  function createArtifactGenerateCommand(config) {
11213
- return new Command().name(config.name).description(config.description).option("--prompt <text>", "Artifact prompt; can also be piped via stdin").option(
11214
- "--provider <name>",
11215
- "Provider: 'built-in' to run vm0's pipeline, or a connector name to get its skill-invocation guidance"
11216
- ).option(
11217
- "--all",
11218
- "When listing providers (no --prompt given), include unavailable or not-yet-authorized connectors"
11219
- ).option("--site-slug <slug>", "Hosted site slug override").option("--title <text>", "Requested artifact title or name").option(
11115
+ 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(
11220
11116
  "--design-system <id>",
11221
11117
  "Design system id from the registry (see Design Systems below). Accepts either 'apple' or 'design-system:apple'."
11222
11118
  ).option(
11223
11119
  "--template <id>",
11224
11120
  `Template id from the registry, scoped to ${config.target} (see Templates below). Accepts either short id or full 'template:<id>'.`
11225
- ).option("--json", "Print metadata as JSON").addHelpText("after", () => {
11121
+ ).addHelpText("after", () => {
11226
11122
  const designSystems = listDesignSystems();
11227
11123
  const templates = listTemplates(config.target);
11228
11124
  return `
@@ -11232,7 +11128,7 @@ ${config.examples}
11232
11128
  Output:
11233
11129
  Prints a source-selection packet for the current agent. The
11234
11130
  agent authors a static HTML artifact and hosts it with zero host. With no
11235
- --prompt and no piped input, prints the provider menu instead.
11131
+ --prompt and no piped input, prints the generation choices instead.
11236
11132
 
11237
11133
  Notes:
11238
11134
  - Authenticates via ZERO_TOKEN
@@ -11246,10 +11142,7 @@ ${formatRegistryListing(templates, `${config.target} templates`)}`;
11246
11142
  withErrorHandler(async (options) => {
11247
11143
  const dispatch = await dispatchGenerate({
11248
11144
  generationType: config.generationType,
11249
- provider: options.provider,
11250
- prompt: options.prompt,
11251
- all: options.all,
11252
- json: options.json
11145
+ prompt: options.prompt
11253
11146
  });
11254
11147
  if (dispatch.outcome === "handled") return;
11255
11148
  const prompt = dispatch.prompt;
@@ -11296,10 +11189,6 @@ ${formatRegistryListing(templates, `${config.target} templates`)}`;
11296
11189
  details: [...config.details(options), ...extraDetails],
11297
11190
  artifactRules: config.artifactRules
11298
11191
  });
11299
- if (options.json) {
11300
- console.log(JSON.stringify(packet));
11301
- return;
11302
- }
11303
11192
  console.log(packet.instructions);
11304
11193
  })
11305
11194
  );
@@ -11322,7 +11211,7 @@ var reportCommand = createArtifactGenerateCommand({
11322
11211
  usageCommand: "zero generate report",
11323
11212
  examples: ` Generate report: zero generate report --prompt "A Q2 usage report for the API team"
11324
11213
  Stable hosted slug: zero generate report --site-slug api-usage-q2 --prompt "A Q2 usage report"
11325
- List providers: zero generate report`,
11214
+ Show choices: zero generate report`,
11326
11215
  details: standardDetails("report"),
11327
11216
  artifactRules: [
11328
11217
  "Produce an analytical report, not a marketing page.",
@@ -11339,7 +11228,7 @@ var docsDesignCommand = createArtifactGenerateCommand({
11339
11228
  usageCommand: "zero generate docs-design",
11340
11229
  examples: ` Generate docs design: zero generate docs-design --prompt "Docs for adding artifact targets"
11341
11230
  Stable hosted slug: zero generate docs-design --site-slug artifact-target-docs --prompt "Artifact target docs"
11342
- List providers: zero generate docs-design`,
11231
+ Show choices: zero generate docs-design`,
11343
11232
  details: standardDetails("docs-design"),
11344
11233
  artifactRules: [
11345
11234
  "Produce a documentation design mockup, not a production documentation system.",
@@ -11356,7 +11245,7 @@ var posterCommand = createArtifactGenerateCommand({
11356
11245
  usageCommand: "zero generate poster",
11357
11246
  examples: ` Generate poster: zero generate poster --prompt "A launch poster for artifact targets"
11358
11247
  Stable hosted slug: zero generate poster --site-slug artifact-poster --prompt "A launch poster"
11359
- List providers: zero generate poster`,
11248
+ Show choices: zero generate poster`,
11360
11249
  details: standardDetails("poster"),
11361
11250
  artifactRules: [
11362
11251
  "Produce a poster-style HTML artifact with strong hierarchy and composition.",
@@ -11373,7 +11262,7 @@ var dashboardDesignCommand = createArtifactGenerateCommand({
11373
11262
  usageCommand: "zero generate dashboard-design",
11374
11263
  examples: ` Generate dash design: zero generate dashboard-design --prompt "An ops dashboard for generation runs"
11375
11264
  Stable hosted slug: zero generate dashboard-design --site-slug generation-ops --prompt "A generation ops dashboard"
11376
- List providers: zero generate dashboard-design`,
11265
+ Show choices: zero generate dashboard-design`,
11377
11266
  details: standardDetails("dashboard-design"),
11378
11267
  artifactRules: [
11379
11268
  "Produce a dashboard design mockup, not a live operational dashboard.",
@@ -11390,7 +11279,7 @@ var mobileAppDesignCommand = createArtifactGenerateCommand({
11390
11279
  usageCommand: "zero generate mobile-app-design",
11391
11280
  examples: ` Generate mobile UI: zero generate mobile-app-design --prompt "A mobile review screen for generation artifacts"
11392
11281
  Stable hosted slug: zero generate mobile-app-design --site-slug generation-mobile-review --prompt "A mobile review screen"
11393
- List providers: zero generate mobile-app-design`,
11282
+ Show choices: zero generate mobile-app-design`,
11394
11283
  details: standardDetails("mobile-app-design"),
11395
11284
  artifactRules: [
11396
11285
  "Produce a design prototype, not a runnable or installable mobile app.",
@@ -11405,7 +11294,6 @@ init_esm_shims();
11405
11294
 
11406
11295
  // src/commands/zero/shared/presentation-generate.ts
11407
11296
  init_esm_shims();
11408
- var PRESENTATION_MAX_IMAGES = 8;
11409
11297
  var PRESENTATION_TARGET = "presentation";
11410
11298
  function parseSlideCount(value) {
11411
11299
  const slideCount = Number(value);
@@ -11414,18 +11302,6 @@ function parseSlideCount(value) {
11414
11302
  }
11415
11303
  return slideCount;
11416
11304
  }
11417
- function parseImageCount(value) {
11418
- const imageCount = Number(value);
11419
- if (!Number.isInteger(imageCount)) {
11420
- throw new InvalidArgumentError("images must be an integer");
11421
- }
11422
- if (!Number.isSafeInteger(imageCount) || imageCount < 0 || imageCount > PRESENTATION_MAX_IMAGES) {
11423
- throw new InvalidArgumentError(
11424
- `images must be between 0 and ${PRESENTATION_MAX_IMAGES}`
11425
- );
11426
- }
11427
- return imageCount;
11428
- }
11429
11305
  function unknownDesignSystemError2(id, usageCommand) {
11430
11306
  const designSystems = listDesignSystems();
11431
11307
  const message = [
@@ -11456,27 +11332,13 @@ function createPresentationGenerateCommand(config) {
11456
11332
  return new Command().name(config.name).description("Generate an HTML presentation from a prompt").option(
11457
11333
  "--prompt <text>",
11458
11334
  "Presentation prompt; can also be piped via stdin"
11459
- ).option(
11460
- "--provider <name>",
11461
- "Provider: 'built-in' to run vm0's pipeline, or a connector name to get its skill-invocation guidance"
11462
- ).option(
11463
- "--all",
11464
- "When listing providers (no --prompt given), include unavailable or not-yet-authorized connectors"
11465
- ).option("--slides <count>", "Slide count: 4-20", parseSlideCount, 8).option(
11466
- "--images <count>",
11467
- `Generated image count: 0-${PRESENTATION_MAX_IMAGES}`,
11468
- parseImageCount,
11469
- 2
11470
- ).option(
11471
- "--image-model <model>",
11472
- "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"
11473
- ).option("--title <text>", "Requested deck title").option("--site-slug <slug>", "Hosted site slug override").option(
11335
+ ).option("--site-slug <slug>", "Hosted site slug override").option("--title <text>", "Requested deck title").option(
11474
11336
  "--design-system <id>",
11475
11337
  "Design system id from the registry (see Design Systems below). Accepts either 'apple' or 'design-system:apple'."
11476
11338
  ).option(
11477
11339
  "--template <id>",
11478
11340
  "Template id from the registry, scoped to presentation (see Templates below). Accepts either 'html-ppt-pitch-deck' or 'template:html-ppt-pitch-deck'."
11479
- ).option("--json", "Print metadata as JSON").addHelpText("after", () => {
11341
+ ).option("--slides <count>", "Slide count: 4-20", parseSlideCount, 8).addHelpText("after", () => {
11480
11342
  const designSystems = listDesignSystems();
11481
11343
  const templates = listTemplates(PRESENTATION_TARGET);
11482
11344
  return `
@@ -11499,10 +11361,7 @@ ${formatRegistryListing(templates, "presentation templates")}`;
11499
11361
  withErrorHandler(async (options) => {
11500
11362
  const dispatch = await dispatchGenerate({
11501
11363
  generationType: config.generationType,
11502
- provider: options.provider,
11503
- prompt: options.prompt,
11504
- all: options.all,
11505
- json: options.json
11364
+ prompt: options.prompt
11506
11365
  });
11507
11366
  if (dispatch.outcome === "handled") return;
11508
11367
  const prompt = dispatch.prompt;
@@ -11544,8 +11403,6 @@ ${formatRegistryListing(templates, "presentation templates")}`;
11544
11403
  siteSlug: options.siteSlug,
11545
11404
  details: [
11546
11405
  `Slide count: ${options.slides}`,
11547
- `Suggested generated visual count: ${options.images}`,
11548
- `Image model preference if visuals are generated separately: ${options.imageModel ?? "default"}`,
11549
11406
  `Requested deck title: ${options.title ?? "not specified"}`,
11550
11407
  `Selected design system: ${resolvedDesignSystem ? `${resolvedDesignSystem.id} (${resolvedDesignSystem.name})` : "agent decides"}`,
11551
11408
  `Selected template: ${resolvedTemplate ? `${resolvedTemplate.id} (${resolvedTemplate.name})` : "agent decides"}`
@@ -11558,10 +11415,6 @@ ${formatRegistryListing(templates, "presentation templates")}`;
11558
11415
  "Keep slide text readable from across a room; avoid memo-like walls of text."
11559
11416
  ]
11560
11417
  });
11561
- if (options.json) {
11562
- console.log(JSON.stringify(packet));
11563
- return;
11564
- }
11565
11418
  console.log(packet.instructions);
11566
11419
  })
11567
11420
  );
@@ -11574,11 +11427,314 @@ var presentationCommand = createPresentationGenerateCommand({
11574
11427
  usageCommand: "zero generate presentation",
11575
11428
  examples: ` Generate deck: zero generate presentation --prompt "A strategy deck for reducing support volume"
11576
11429
  Pipe prompt: cat brief.txt | zero generate presentation
11577
- Generated visuals: zero generate presentation --slides 10 --images 8 --image-model gpt-image-1.5 --prompt "A product launch narrative"
11430
+ Pick slide count: zero generate presentation --slides 10 --prompt "A product launch narrative"
11578
11431
  Stable hosted slug: zero generate presentation --site-slug api-migration-plan --prompt "API migration plan"
11579
- List providers: zero generate presentation`
11432
+ Show choices: zero generate presentation`
11580
11433
  });
11581
11434
 
11435
+ // src/commands/zero/generate/sprite.ts
11436
+ init_esm_shims();
11437
+
11438
+ // src/commands/zero/shared/sprite-authoring.ts
11439
+ init_esm_shims();
11440
+ var SPRITE_SKILL = {
11441
+ repo: "0x0funky/agent-sprite-forge",
11442
+ ref: "main",
11443
+ skillPath: "skills/generate2dsprite/SKILL.md",
11444
+ references: [
11445
+ "skills/generate2dsprite/references/prompt-rules.md",
11446
+ "skills/generate2dsprite/references/modes.md"
11447
+ ],
11448
+ script: "skills/generate2dsprite/scripts/generate2dsprite.py"
11449
+ };
11450
+ var CORE_INVARIANTS = [
11451
+ "Every raw sprite image must come from built-in image generation. Never draw raw sprite art with Three.js, Canvas, SVG, HTML/CSS, PIL shapes, procedural geometry, placeholder primitives, or code-rendered screenshots. Code may only assemble layout guides, postprocess generated images, or display finished assets at runtime.",
11452
+ "Background is 100% solid flat magenta `#FF00FF` with no gradient, so the local processor can chroma-key it to transparency. Keep this rule unless the user explicitly wants a different processing workflow.",
11453
+ "No text, labels, UI, speech bubbles, borders, or frames between cells. Generate the exact requested grid count only.",
11454
+ "Keep the same asset identity, the same bounding box, and the same pixel scale across every frame.",
11455
+ "Containment: the entire subject fits fully inside each cell with magenta margin on all four sides. No limb, weapon, tail, wing tip, orb, spark, or trail may cross a cell edge.",
11456
+ "Do not use raw single-row sheets (1x4, 1x6, 1x8, 1xN) for any body subject \u2014 players, heroes, creatures, NPCs, enemies, summons, or animated props. Use centered multi-row grids: 4 frames -> 2x2, 6 -> 2x3, 8 -> 2x4, 9 -> 3x3, 12 -> 3x4 or 4x3, 16 -> 4x4.",
11457
+ "For controllable heroes and main characters, attack/shoot/cast body sheets are body-only by default and must preserve idle/run body scale and the feet/bottom anchor. Generate slash arcs, weapon trails, muzzle flashes, projectiles, dust, and impacts as separate fx/projectile/impact sheets unless the runtime explicitly supports wider per-action cells plus per-action origins.",
11458
+ "For map prop packs, classify props first. Square 2x2/3x3/4x4 packs are only for compact props. Floors, platforms, bridges, walls, ladders, gates, doors, long hazards, wide/tall props, collision-bearing objects, and tileset/strip pieces use one-by-one generation, 1x3/1x4 strips, custom wide cells, or a tileset-like atlas instead.",
11459
+ "Mixed-action atlases (4x4, 5x5, custom) are a deterministic delivery step assembled from separate per-action sheets after each passes QC \u2014 never one raw mixed-action image. Raw multi-cell grids are valid only for one coherent action family, canonical directional locomotion, prop packs, or tileset-like atlases."
11460
+ ];
11461
+ var WORKFLOW = [
11462
+ "1. Resolve the upstream skill below, then infer or confirm the asset plan. Pick the smallest useful output and do not pad unrelated actions into one raw sheet.",
11463
+ "2. Write the art prompt by hand using the skill's prompt-rules. Lock the art style, the exact sheet shape, the solid magenta background, the identity, and the containment rules. Do not delegate prompt writing to a script.",
11464
+ "3. Generate each raw sheet with built-in image generation using the recommended model below. If a reference is involved, make it visible to the model first (view a local file before generating); never pass a bare filesystem path as the visual reference.",
11465
+ "4. Postprocess each raw sheet locally with the skill's processor script: magenta cleanup, frame extraction, alignment, shared-scale normalization, component filtering, QC metadata, transparent sheet export, and GIF export.",
11466
+ "5. QC each sheet: no frame touches a cell edge, scale is consistent, detached FX did not become noise, the sheet reads as one coherent animation, and hero/player body height matches the accepted idle/run scale within ~10-15%. Reprocess or regenerate if it fails.",
11467
+ "6. Return the bundle for the resolved plan (single sheet, unit/spell/combat bundle, line bundle, or hero action bundle with separate FX assets and an optional assembled engine atlas after per-action QC)."
11468
+ ];
11469
+ var EXPECTED_OUTPUTS = [
11470
+ "`raw-sheet.png` (and one raw sheet per action for bundles)",
11471
+ "`raw-sheet-clean.png` (magenta cleaned)",
11472
+ "`sheet-transparent.png`",
11473
+ "per-frame PNGs",
11474
+ "`animation.gif` (per direction/action where applicable)",
11475
+ "`prompt-used.txt`",
11476
+ "`pipeline-meta.json`"
11477
+ ];
11478
+ function createSpriteAuthoringPacket(options) {
11479
+ const { prompt, plan } = options;
11480
+ const outputDir2 = `./generated/sprites/${plan.name}`;
11481
+ const planEntries = [
11482
+ ["Asset type", plan.assetType],
11483
+ ["Action", plan.action],
11484
+ ["View", plan.view],
11485
+ ["Sheet / grid", plan.sheet],
11486
+ ["Frames", plan.frames],
11487
+ ["Bundle", plan.bundle],
11488
+ ["Art style", plan.artStyle],
11489
+ ["Anchor", plan.anchor],
11490
+ ["Margin", plan.margin],
11491
+ ["Effect policy", plan.effectPolicy],
11492
+ ["Reference", plan.reference]
11493
+ ];
11494
+ const instructions = [
11495
+ "# Zero generate sprite",
11496
+ "",
11497
+ "This is a federated generation source-selection packet for the current agent.",
11498
+ "Zero is not generating these sprites on the server. You resolve the sprite skill below, write the art prompt yourself, generate each raw sheet with built-in image generation, then run the skill's local processor for chroma-key cleanup, frame extraction, alignment, QC, and transparent/GIF export.",
11499
+ "",
11500
+ "## User Prompt",
11501
+ prompt,
11502
+ "",
11503
+ "## Sprite Plan",
11504
+ "These parameters were resolved from the command. `agent decides` means the flag was not set \u2014 infer the best value from the prompt and the skill's modes reference; do not force the user to spell it out.",
11505
+ "",
11506
+ ...planEntries.map(([label, value]) => {
11507
+ return `- ${label}: ${value}`;
11508
+ }),
11509
+ `- Output name: ${plan.name}`,
11510
+ "",
11511
+ "## Recommended Model",
11512
+ `- Use \`${plan.model}\` for every raw sheet via built-in image generation (\`zero generate image --provider built-in --model ${plan.model} --skip-style --prompt "..."\`, or the in-context image tool).`,
11513
+ "- gpt-image-2 is recommended for sprite sheets: it accepts flexible WIDTHxHEIGHT sizes and high quality for crisp, evenly-spaced grids. It does not emit transparent backgrounds, which is expected here \u2014 the solid magenta background is chroma-keyed by the local processor.",
11514
+ "- Pick a sheet-friendly square or grid-aligned size (for example 1024x1024 for 2x2/3x3/4x4) so each cell stays evenly spaced.",
11515
+ "",
11516
+ "## Workflow Skill",
11517
+ "Resolve this skill before authoring; it is the authority for sprite prompt patterns, sheet/bundle selection, and the postprocessing primitive.",
11518
+ "",
11519
+ `- Repo: \`${SPRITE_SKILL.repo}@${SPRITE_SKILL.ref}\``,
11520
+ `- Skill: \`${SPRITE_SKILL.skillPath}\``,
11521
+ `- References: ${SPRITE_SKILL.references.map((ref) => {
11522
+ return `\`${ref}\``;
11523
+ }).join(", ")}`,
11524
+ `- Processor script: \`${SPRITE_SKILL.script}\``,
11525
+ "- For map props that must match a tile map, prefer the sibling `generate2dmap` skill in the same repo.",
11526
+ "- If a source file cannot be fetched, state that limitation and fall back to the core invariants below.",
11527
+ "",
11528
+ "## Core Invariants",
11529
+ ...CORE_INVARIANTS.map((rule) => {
11530
+ return `- ${rule}`;
11531
+ }),
11532
+ "",
11533
+ "## Workflow",
11534
+ ...WORKFLOW,
11535
+ "",
11536
+ "## Output Contract",
11537
+ `- Write the bundle under \`${outputDir2}/\`.`,
11538
+ "- Keep the original generated images and produce, per sheet:",
11539
+ ...EXPECTED_OUTPUTS.map((item) => {
11540
+ return ` - ${item}`;
11541
+ }),
11542
+ "- For bundles, create one subfolder per asset and keep the per-action FX/projectile/impact sheets separate.",
11543
+ "",
11544
+ "## Verification",
11545
+ "- Confirm each transparent sheet and its frames are nonblank and free of magenta fringing.",
11546
+ "- Confirm no frame touches a cell edge and that scale and identity stay consistent across frames.",
11547
+ "- For hero/player body actions, confirm body height matches the accepted idle/run scale within ~10-15%.",
11548
+ "- Report the output directory, the final assets, and the resolved plan."
11549
+ ].join("\n");
11550
+ return {
11551
+ type: "generation-source-selection",
11552
+ kind: "sprite",
11553
+ prompt,
11554
+ plan,
11555
+ model: plan.model,
11556
+ outputDir: outputDir2,
11557
+ skill: SPRITE_SKILL,
11558
+ instructions
11559
+ };
11560
+ }
11561
+
11562
+ // src/commands/zero/generate/sprite.ts
11563
+ var SPRITE_USAGE_COMMAND = "zero generate sprite";
11564
+ var DEFAULT_MODEL = "gpt-image-2";
11565
+ var AGENT_DECIDES = "agent decides";
11566
+ var ASSET_TYPES = [
11567
+ "player",
11568
+ "npc",
11569
+ "creature",
11570
+ "character",
11571
+ "spell",
11572
+ "projectile",
11573
+ "impact",
11574
+ "prop",
11575
+ "summon",
11576
+ "fx"
11577
+ ];
11578
+ var ACTIONS = [
11579
+ "single",
11580
+ "idle",
11581
+ "cast",
11582
+ "attack",
11583
+ "shoot",
11584
+ "jump",
11585
+ "hurt",
11586
+ "combat",
11587
+ "walk",
11588
+ "run",
11589
+ "hover",
11590
+ "charge",
11591
+ "projectile",
11592
+ "impact",
11593
+ "explode",
11594
+ "death"
11595
+ ];
11596
+ var VIEWS = ["topdown", "side", "3-4"];
11597
+ var SHEETS = [
11598
+ "auto",
11599
+ "2x2",
11600
+ "2x3",
11601
+ "2x4",
11602
+ "3x3",
11603
+ "3x4",
11604
+ "4x4",
11605
+ "5x5",
11606
+ "strip-1x3",
11607
+ "strip-1x4",
11608
+ "custom"
11609
+ ];
11610
+ var BUNDLES = [
11611
+ "single",
11612
+ "unit",
11613
+ "spell",
11614
+ "combat",
11615
+ "line",
11616
+ "hero-action",
11617
+ "engine-atlas"
11618
+ ];
11619
+ var ART_STYLES = [
11620
+ "pixel-art",
11621
+ "clean-hd",
11622
+ "pixel-inspired",
11623
+ "retro-pixel",
11624
+ "map-style",
11625
+ "project-native"
11626
+ ];
11627
+ var ANCHORS = ["center", "bottom", "feet"];
11628
+ var MARGINS = ["tight", "normal", "safe"];
11629
+ var EFFECT_POLICIES = ["all", "largest"];
11630
+ function validateEnum(flag, value, allowed) {
11631
+ if (value !== void 0 && !allowed.includes(value)) {
11632
+ throw new Error(
11633
+ `${flag} must be one of: ${allowed.join(", ")} (got "${value}")`
11634
+ );
11635
+ }
11636
+ }
11637
+ function resolveFrames(value) {
11638
+ if (value === void 0) {
11639
+ return AGENT_DECIDES;
11640
+ }
11641
+ if (value === "auto") {
11642
+ return value;
11643
+ }
11644
+ const frames = Number(value);
11645
+ if (!Number.isInteger(frames) || frames < 1 || frames > 64) {
11646
+ throw new Error("--frames must be 'auto' or an integer from 1 to 64");
11647
+ }
11648
+ return String(frames);
11649
+ }
11650
+ function slugify2(value) {
11651
+ const slug = value.toLowerCase().replace(/[^a-z0-9]+/gu, "-").replace(/^-+|-+$/gu, "").replace(/-{2,}/gu, "-").slice(0, 48).replace(/-+$/u, "");
11652
+ return slug.length >= 3 ? slug : "sprite";
11653
+ }
11654
+ var spriteCommand = new Command().name("sprite").description(
11655
+ "Prepare 2D game sprite/asset authoring instructions from a prompt"
11656
+ ).option("--prompt <text>", "Sprite prompt/theme; can also be piped via stdin").option("--asset-type <type>", `Asset type: ${ASSET_TYPES.join(", ")}`).option("--action <action>", `Animation/action: ${ACTIONS.join(", ")}`).option(
11657
+ "--view <view>",
11658
+ `Camera view: ${VIEWS.join(", ")} (3-4 means 3/4 view)`
11659
+ ).option("--sheet <grid>", `Sheet/grid shape: ${SHEETS.join(", ")}`, "auto").option("--frames <count>", "Frame count: 'auto' or an integer (1-64)").option("--bundle <preset>", `Bundle preset: ${BUNDLES.join(", ")}`).option(
11660
+ "--art-style <style>",
11661
+ `Sprite art style (the sprite analog of 'zero generate image --style'): ${ART_STYLES.join(", ")}`
11662
+ ).option("--anchor <anchor>", `Frame anchor: ${ANCHORS.join(", ")}`).option("--margin <margin>", `Safe-area margin: ${MARGINS.join(", ")}`).option(
11663
+ "--effect-policy <policy>",
11664
+ `Detached-FX component policy: ${EFFECT_POLICIES.join(", ")}`
11665
+ ).option(
11666
+ "--reference <url>",
11667
+ "Reference image URL for identity/style consistency"
11668
+ ).option(
11669
+ "--model <model>",
11670
+ "Recommended image model for raw sheets",
11671
+ DEFAULT_MODEL
11672
+ ).option("--name <slug>", "Output bundle name/slug").addHelpText(
11673
+ "after",
11674
+ `
11675
+ Examples:
11676
+ Generate sprite: ${SPRITE_USAGE_COMMAND} --prompt "A green slime monster idle loop"
11677
+ Pick asset + action: ${SPRITE_USAGE_COMMAND} --asset-type creature --action idle --sheet 3x3 --prompt "A fire dragon boss"
11678
+ Hero action bundle: ${SPRITE_USAGE_COMMAND} --asset-type player --bundle hero-action --view side --prompt "A knight with idle, run, attack, jump"
11679
+ 4-direction walk: ${SPRITE_USAGE_COMMAND} --asset-type player --action walk --view topdown --sheet 4x4 --prompt "A 16-bit RPG villager"
11680
+ Pixel art style: ${SPRITE_USAGE_COMMAND} --art-style pixel-art --prompt "A retro fireball projectile" --sheet 2x2
11681
+ Match a reference: ${SPRITE_USAGE_COMMAND} --reference https://example.com/hero.png --action attack --prompt "Attack animation for this hero"
11682
+ Pipe prompt: cat brief.txt | ${SPRITE_USAGE_COMMAND}
11683
+ Show choices: ${SPRITE_USAGE_COMMAND}
11684
+
11685
+ Output:
11686
+ Prints a sprite source-selection packet for the current agent: the resolved
11687
+ plan, the recommended image model, the upstream sprite skill to resolve, and
11688
+ the hard containment rules for grids, identity, and FX.
11689
+ With no --prompt and no piped input, prints the generation choices instead.
11690
+
11691
+ Notes:
11692
+ - The agent generates each raw sheet with built-in image generation
11693
+ (gpt-image-2 recommended) on a solid magenta background, then runs the
11694
+ sprite skill's local processor for chroma-key cleanup, frame extraction,
11695
+ alignment, QC, and transparent/GIF export.
11696
+ - Raw sprite art must originate from image generation, never from code-drawn
11697
+ primitives (Three.js/Canvas/SVG/HTML/PIL).
11698
+ - Unset flags resolve to "agent decides"; the agent infers them from the
11699
+ prompt and the skill's modes reference.`
11700
+ ).action(
11701
+ withErrorHandler(async (options) => {
11702
+ validateEnum("--asset-type", options.assetType, ASSET_TYPES);
11703
+ validateEnum("--action", options.action, ACTIONS);
11704
+ validateEnum("--view", options.view, VIEWS);
11705
+ validateEnum("--sheet", options.sheet, SHEETS);
11706
+ validateEnum("--bundle", options.bundle, BUNDLES);
11707
+ validateEnum("--art-style", options.artStyle, ART_STYLES);
11708
+ validateEnum("--anchor", options.anchor, ANCHORS);
11709
+ validateEnum("--margin", options.margin, MARGINS);
11710
+ validateEnum("--effect-policy", options.effectPolicy, EFFECT_POLICIES);
11711
+ const frames = resolveFrames(options.frames);
11712
+ const dispatch = await dispatchGenerate({
11713
+ generationType: "sprite",
11714
+ prompt: options.prompt
11715
+ });
11716
+ if (dispatch.outcome === "handled") return;
11717
+ const prompt = dispatch.prompt;
11718
+ const plan = {
11719
+ assetType: options.assetType ?? AGENT_DECIDES,
11720
+ action: options.action ?? AGENT_DECIDES,
11721
+ view: options.view ?? AGENT_DECIDES,
11722
+ sheet: options.sheet ?? "auto",
11723
+ frames,
11724
+ bundle: options.bundle ?? AGENT_DECIDES,
11725
+ artStyle: options.artStyle ?? AGENT_DECIDES,
11726
+ anchor: options.anchor ?? AGENT_DECIDES,
11727
+ margin: options.margin ?? AGENT_DECIDES,
11728
+ effectPolicy: options.effectPolicy ?? AGENT_DECIDES,
11729
+ reference: options.reference ?? "none",
11730
+ model: options.model,
11731
+ name: slugify2(options.name ?? prompt)
11732
+ };
11733
+ const packet = createSpriteAuthoringPacket({ prompt, plan });
11734
+ console.log(packet.instructions);
11735
+ })
11736
+ );
11737
+
11582
11738
  // src/commands/zero/generate/video.ts
11583
11739
  init_esm_shims();
11584
11740
 
@@ -11811,7 +11967,7 @@ function createVideoGenerateCommand(config) {
11811
11967
  "Reference audio URL for Dreamina Seedance 2.0",
11812
11968
  collectUrl,
11813
11969
  []
11814
- ).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(
11970
+ ).option("--first-frame-image-url <url>", "First frame image URL").option("--last-frame-image-url <url>", "Last frame image URL").addHelpText(
11815
11971
  "after",
11816
11972
  `
11817
11973
  Examples:
@@ -11843,8 +11999,7 @@ Models:
11843
11999
  generationType: config.generationType,
11844
12000
  provider: options.provider,
11845
12001
  prompt: options.prompt,
11846
- all: options.all,
11847
- json: options.json
12002
+ all: options.all
11848
12003
  });
11849
12004
  if (dispatch.outcome === "handled") return;
11850
12005
  const prompt = dispatch.prompt;
@@ -11866,10 +12021,6 @@ Models:
11866
12021
  firstFrameImageUrl: options.firstFrameImageUrl,
11867
12022
  lastFrameImageUrl: options.lastFrameImageUrl
11868
12023
  });
11869
- if (options.json) {
11870
- console.log(JSON.stringify(result));
11871
- return;
11872
- }
11873
12024
  console.log(source_default.green(`\u2713 Video generated: ${result.url}`));
11874
12025
  console.log(source_default.dim(` File: ${result.filename}`));
11875
12026
  console.log(source_default.dim(` Duration: ${result.duration}`));
@@ -11900,21 +12051,8 @@ var videoCommand = createVideoGenerateCommand({
11900
12051
 
11901
12052
  // src/commands/zero/generate/website.ts
11902
12053
  init_esm_shims();
11903
- var WEBSITE_MAX_IMAGES = 3;
11904
12054
  var WEBSITE_TARGET = "website";
11905
12055
  var WEBSITE_USAGE_COMMAND = "zero generate website";
11906
- function parseImageCount2(value) {
11907
- const imageCount = Number(value);
11908
- if (!Number.isInteger(imageCount)) {
11909
- throw new InvalidArgumentError("images must be an integer");
11910
- }
11911
- if (!Number.isSafeInteger(imageCount) || imageCount < 0 || imageCount > WEBSITE_MAX_IMAGES) {
11912
- throw new InvalidArgumentError(
11913
- `images must be between 0 and ${WEBSITE_MAX_IMAGES}`
11914
- );
11915
- }
11916
- return imageCount;
11917
- }
11918
12056
  function unknownDesignSystemError3(id) {
11919
12057
  const designSystems = listDesignSystems();
11920
12058
  const message = [
@@ -11941,27 +12079,13 @@ function unknownTemplateError3(id) {
11941
12079
  ].join("\n");
11942
12080
  return new Error(message);
11943
12081
  }
11944
- 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(
11945
- "--provider <name>",
11946
- "Provider: 'built-in' to run vm0's pipeline, or a connector name to get its skill-invocation guidance"
11947
- ).option(
11948
- "--all",
11949
- "When listing providers (no --prompt given), include unavailable or not-yet-authorized connectors"
11950
- ).option(
11951
- "--template <id>",
11952
- "Template id from the registry, scoped to website (see Templates below). Accepts either short id or full 'template:<id>'."
11953
- ).option(
12082
+ 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(
11954
12083
  "--design-system <id>",
11955
12084
  "Design system id from the registry (see Design Systems below). Accepts either 'apple' or 'design-system:apple'."
11956
12085
  ).option(
11957
- "--images <count>",
11958
- `Generated website image count: 0-${WEBSITE_MAX_IMAGES}`,
11959
- parseImageCount2,
11960
- 1
11961
- ).option(
11962
- "--image-model <model>",
11963
- "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"
11964
- ).option("--site-slug <slug>", "Hosted site slug override").option("--title <text>", "Requested site title or name").option("--json", "Print metadata as JSON").addHelpText("after", () => {
12086
+ "--template <id>",
12087
+ "Template id from the registry, scoped to website (see Templates below). Accepts either short id or full 'template:<id>'."
12088
+ ).addHelpText("after", () => {
11965
12089
  const designSystems = listDesignSystems();
11966
12090
  const templates = listTemplates(WEBSITE_TARGET);
11967
12091
  return `
@@ -11971,11 +12095,11 @@ Examples:
11971
12095
  Pick design system: zero generate website --design-system stripe --prompt "Pricing page for a SaaS"
11972
12096
  Stable hosted slug: zero generate website --site-slug api-migration-demo --prompt "An internal migration microsite"
11973
12097
  Pipe prompt: cat brief.txt | zero generate website
11974
- List providers: zero generate website
12098
+ Show choices: zero generate website
11975
12099
 
11976
12100
  Output:
11977
12101
  Prints a source-selection packet for the current agent.
11978
- With no --prompt and no piped input, prints the provider menu instead.
12102
+ With no --prompt and no piped input, prints the generation choices instead.
11979
12103
 
11980
12104
  Notes:
11981
12105
  - Authenticates via ZERO_TOKEN
@@ -11990,10 +12114,7 @@ ${formatRegistryListing(templates, "website templates")}`;
11990
12114
  withErrorHandler(async (options) => {
11991
12115
  const dispatch = await dispatchGenerate({
11992
12116
  generationType: "website",
11993
- provider: options.provider,
11994
- prompt: options.prompt,
11995
- all: options.all,
11996
- json: options.json
12117
+ prompt: options.prompt
11997
12118
  });
11998
12119
  if (dispatch.outcome === "handled") return;
11999
12120
  const prompt = dispatch.prompt;
@@ -12024,8 +12145,6 @@ ${formatRegistryListing(templates, "website templates")}`;
12024
12145
  slugSource: options.title,
12025
12146
  siteSlug: options.siteSlug,
12026
12147
  details: [
12027
- `Suggested generated visual count: ${options.images}`,
12028
- `Image model preference if visuals are generated separately: ${options.imageModel ?? "default"}`,
12029
12148
  `Requested title/site name: ${options.title ?? "not specified"}`,
12030
12149
  `Selected design system: ${resolvedDesignSystem ? `${resolvedDesignSystem.id} (${resolvedDesignSystem.name})` : "agent decides"}`,
12031
12150
  `Selected template: ${resolvedTemplate ? `${resolvedTemplate.id} (${resolvedTemplate.name})` : "agent decides"}`
@@ -12037,10 +12156,6 @@ ${formatRegistryListing(templates, "website templates")}`;
12037
12156
  "Use responsive HTML/CSS and verify the page works at mobile and desktop widths."
12038
12157
  ]
12039
12158
  });
12040
- if (options.json) {
12041
- console.log(JSON.stringify(packet));
12042
- return;
12043
- }
12044
12159
  console.log(packet.instructions);
12045
12160
  })
12046
12161
  );
@@ -12057,7 +12172,7 @@ function createVoiceGenerateCommand(config) {
12057
12172
  ).option(
12058
12173
  "--all",
12059
12174
  "When listing providers (no --prompt given), include unavailable or not-yet-authorized connectors"
12060
- ).option("--voice <voice>", "OpenAI voice to use", "marin").option("--instructions <text>", "Voice style instructions").option("--json", "Print metadata as JSON").addHelpText(
12175
+ ).option("--voice <voice>", "OpenAI voice to use", "marin").option("--instructions <text>", "Voice style instructions").addHelpText(
12061
12176
  "after",
12062
12177
  `
12063
12178
  Examples:
@@ -12077,8 +12192,7 @@ Notes:
12077
12192
  generationType: config.generationType,
12078
12193
  provider: options.provider,
12079
12194
  prompt: options.prompt ?? options.text,
12080
- all: options.all,
12081
- json: options.json
12195
+ all: options.all
12082
12196
  });
12083
12197
  if (dispatch.outcome === "handled") return;
12084
12198
  const text = dispatch.prompt;
@@ -12087,10 +12201,6 @@ Notes:
12087
12201
  voice: options.voice,
12088
12202
  instructions: options.instructions
12089
12203
  });
12090
- if (options.json) {
12091
- console.log(JSON.stringify(result));
12092
- return;
12093
- }
12094
12204
  console.log(source_default.green(`\u2713 Voice generated: ${result.url}`));
12095
12205
  console.log(source_default.dim(` File: ${result.filename}`));
12096
12206
  console.log(source_default.dim(` Duration: ${result.durationSeconds}s`));
@@ -12119,7 +12229,7 @@ function createListerOnlyCommand(config) {
12119
12229
  return new Command().name(config.name).description(config.description).option(
12120
12230
  "--provider <name>",
12121
12231
  "Connector name; prints that connector's skill-invocation guidance"
12122
- ).option("--all", "Include unavailable or not-yet-authorized connectors").option("--json", "Print the provider list as JSON").addHelpText(
12232
+ ).option("--all", "Include unavailable or not-yet-authorized connectors").addHelpText(
12123
12233
  "after",
12124
12234
  `
12125
12235
  Notes:
@@ -12144,18 +12254,17 @@ Notes:
12144
12254
  return;
12145
12255
  }
12146
12256
  await runLister(config.generationType, {
12147
- all: options.all,
12148
- json: options.json
12257
+ all: options.all
12149
12258
  });
12150
12259
  })
12151
12260
  );
12152
12261
  }
12153
12262
 
12154
12263
  // src/commands/zero/generate/index.ts
12155
- var audioCommand = createListerOnlyCommand({
12156
- name: "audio",
12157
- generationType: "audio",
12158
- description: "List connectors that provide audio generation (alias of voice for non-speech audio)"
12264
+ var musicCommand = createListerOnlyCommand({
12265
+ name: "music",
12266
+ generationType: "music",
12267
+ description: "List connectors that provide music generation"
12159
12268
  });
12160
12269
  var textCommand = createListerOnlyCommand({
12161
12270
  name: "text",
@@ -12180,9 +12289,12 @@ function buildGenerateHelpText() {
12180
12289
  ' Generate docs: zero generate docs-design --prompt "A setup guide"',
12181
12290
  ' Generate video: zero generate video --prompt "A cinematic city shot"',
12182
12291
  ' Generate site: zero generate website --prompt "A launch site"',
12292
+ ' Generate sprite: zero generate sprite --prompt "A slime monster idle loop"',
12183
12293
  ' Generate speech: zero generate voice --prompt "Hello"',
12294
+ " Show music choices: zero generate music",
12184
12295
  "",
12185
- " List image providers: zero generate image",
12296
+ " Show image choices: zero generate image",
12297
+ " Show report choices: zero generate report",
12186
12298
  " Use a connector: zero generate video --provider heygen",
12187
12299
  " Force built-in: zero generate image --provider built-in --model gpt-image-1.5 --prompt ..."
12188
12300
  ];
@@ -12191,13 +12303,13 @@ Examples:
12191
12303
  ${examples.join("\n")}
12192
12304
 
12193
12305
  Notes:
12194
- - Run "zero generate <type>" with no --prompt to list every provider available for that type.
12195
- - --provider built-in (default when --prompt is provided) runs the vm0-hosted pipeline.
12196
- - --provider <connector-name> prints how to invoke that connector's skill instead.`;
12306
+ - Run "zero generate <type>" with no --prompt to list generation choices for that type.
12307
+ - Media and connector-backed generation types may expose --provider for vm0 or connector execution guidance.
12308
+ - HTML artifact types use registry-backed --design-system and --template selection.`;
12197
12309
  }
12198
12310
  var generateCommand = new Command().name("generate").description(
12199
12311
  "Generate assets via vm0's built-in pipelines or get connector skill-invocation guidance"
12200
- ).addCommand(imageCommand).addCommand(presentationCommand).addCommand(reportCommand).addCommand(docsDesignCommand).addCommand(posterCommand).addCommand(dashboardDesignCommand).addCommand(mobileAppDesignCommand).addCommand(videoCommand).addCommand(websiteCommand).addCommand(voiceCommand).addCommand(audioCommand).addCommand(textCommand).addCommand(codeCommand).addCommand(documentCommand).addHelpText("after", buildGenerateHelpText);
12312
+ ).addCommand(imageCommand).addCommand(presentationCommand).addCommand(reportCommand).addCommand(docsDesignCommand).addCommand(posterCommand).addCommand(dashboardDesignCommand).addCommand(mobileAppDesignCommand).addCommand(videoCommand).addCommand(websiteCommand).addCommand(spriteCommand).addCommand(voiceCommand).addCommand(musicCommand).addCommand(textCommand).addCommand(codeCommand).addCommand(documentCommand).addHelpText("after", buildGenerateHelpText);
12201
12313
 
12202
12314
  // src/commands/zero/web/index.ts
12203
12315
  init_esm_shims();
@@ -13026,7 +13138,7 @@ function registerZeroCommands(prog, commands) {
13026
13138
  var program = new Command();
13027
13139
  program.name("zero").description(
13028
13140
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
13029
- ).version("9.176.4").addHelpText("after", () => {
13141
+ ).version("9.177.0").addHelpText("after", () => {
13030
13142
  return buildZeroHelpText();
13031
13143
  });
13032
13144
  if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {