@vm0/cli 9.161.9 → 9.162.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/{chunk-JXO3PHAE.js → chunk-I3LF3KZW.js} +5148 -3649
- package/{chunk-JXO3PHAE.js.map → chunk-I3LF3KZW.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +375 -65
- package/zero.js.map +1 -1
package/zero.js
CHANGED
|
@@ -154,7 +154,7 @@ import {
|
|
|
154
154
|
zeroAgentCustomSkillNameSchema,
|
|
155
155
|
zeroLocalAgentCommand,
|
|
156
156
|
zeroTokenAllowsFeatureSwitch
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-I3LF3KZW.js";
|
|
158
158
|
import {
|
|
159
159
|
__commonJS,
|
|
160
160
|
__require,
|
|
@@ -30366,6 +30366,46 @@ var BUILT_IN_GENERATION_PROVIDERS = {
|
|
|
30366
30366
|
reason: "available without connector setup"
|
|
30367
30367
|
}
|
|
30368
30368
|
],
|
|
30369
|
+
report: [
|
|
30370
|
+
{
|
|
30371
|
+
label: "Built-in",
|
|
30372
|
+
model: "gpt-5.5",
|
|
30373
|
+
command: "zero built-in generate report -h",
|
|
30374
|
+
reason: "available without connector setup"
|
|
30375
|
+
}
|
|
30376
|
+
],
|
|
30377
|
+
"docs-design": [
|
|
30378
|
+
{
|
|
30379
|
+
label: "Built-in",
|
|
30380
|
+
model: "gpt-5.5",
|
|
30381
|
+
command: "zero built-in generate docs-design -h",
|
|
30382
|
+
reason: "available without connector setup"
|
|
30383
|
+
}
|
|
30384
|
+
],
|
|
30385
|
+
poster: [
|
|
30386
|
+
{
|
|
30387
|
+
label: "Built-in",
|
|
30388
|
+
model: "gpt-5.5",
|
|
30389
|
+
command: "zero built-in generate poster -h",
|
|
30390
|
+
reason: "available without connector setup"
|
|
30391
|
+
}
|
|
30392
|
+
],
|
|
30393
|
+
"dashboard-design": [
|
|
30394
|
+
{
|
|
30395
|
+
label: "Built-in",
|
|
30396
|
+
model: "gpt-5.5",
|
|
30397
|
+
command: "zero built-in generate dashboard-design -h",
|
|
30398
|
+
reason: "available without connector setup"
|
|
30399
|
+
}
|
|
30400
|
+
],
|
|
30401
|
+
"mobile-app-design": [
|
|
30402
|
+
{
|
|
30403
|
+
label: "Built-in",
|
|
30404
|
+
model: "gpt-5.5",
|
|
30405
|
+
command: "zero built-in generate mobile-app-design -h",
|
|
30406
|
+
reason: "available without connector setup"
|
|
30407
|
+
}
|
|
30408
|
+
],
|
|
30369
30409
|
website: [
|
|
30370
30410
|
{
|
|
30371
30411
|
label: "Built-in",
|
|
@@ -30431,6 +30471,31 @@ var BUILT_IN_GENERATION_COMMANDS = {
|
|
|
30431
30471
|
command: "zero built-in generate presentation -h",
|
|
30432
30472
|
models: "gpt-5.5"
|
|
30433
30473
|
},
|
|
30474
|
+
report: {
|
|
30475
|
+
label: "Built-in report generation",
|
|
30476
|
+
command: "zero built-in generate report -h",
|
|
30477
|
+
models: "gpt-5.5"
|
|
30478
|
+
},
|
|
30479
|
+
"docs-design": {
|
|
30480
|
+
label: "Built-in docs design generation",
|
|
30481
|
+
command: "zero built-in generate docs-design -h",
|
|
30482
|
+
models: "gpt-5.5"
|
|
30483
|
+
},
|
|
30484
|
+
poster: {
|
|
30485
|
+
label: "Built-in poster generation",
|
|
30486
|
+
command: "zero built-in generate poster -h",
|
|
30487
|
+
models: "gpt-5.5"
|
|
30488
|
+
},
|
|
30489
|
+
"dashboard-design": {
|
|
30490
|
+
label: "Built-in dashboard design generation",
|
|
30491
|
+
command: "zero built-in generate dashboard-design -h",
|
|
30492
|
+
models: "gpt-5.5"
|
|
30493
|
+
},
|
|
30494
|
+
"mobile-app-design": {
|
|
30495
|
+
label: "Built-in mobile app design generation",
|
|
30496
|
+
command: "zero built-in generate mobile-app-design -h",
|
|
30497
|
+
models: "gpt-5.5"
|
|
30498
|
+
},
|
|
30434
30499
|
website: {
|
|
30435
30500
|
label: "Built-in website generation",
|
|
30436
30501
|
command: "zero built-in generate website -h",
|
|
@@ -30451,31 +30516,65 @@ var GENERATION_TYPE_ORDER = [
|
|
|
30451
30516
|
"code",
|
|
30452
30517
|
"document",
|
|
30453
30518
|
"presentation",
|
|
30454
|
-
"website"
|
|
30519
|
+
"website",
|
|
30520
|
+
"report",
|
|
30521
|
+
"docs-design",
|
|
30522
|
+
"poster",
|
|
30523
|
+
"dashboard-design",
|
|
30524
|
+
"mobile-app-design"
|
|
30455
30525
|
];
|
|
30456
30526
|
var GENERATION_TYPE_LABELS = {
|
|
30457
30527
|
audio: "Audio",
|
|
30458
30528
|
code: "Code",
|
|
30529
|
+
"dashboard-design": "Dashboard design",
|
|
30459
30530
|
document: "Document",
|
|
30531
|
+
"docs-design": "Docs design",
|
|
30460
30532
|
image: "Image",
|
|
30533
|
+
"mobile-app-design": "Mobile app design",
|
|
30534
|
+
poster: "Poster",
|
|
30461
30535
|
presentation: "Presentation",
|
|
30536
|
+
report: "Report",
|
|
30462
30537
|
text: "Text",
|
|
30463
30538
|
video: "Video",
|
|
30464
30539
|
voice: "Voice",
|
|
30465
30540
|
website: "Website"
|
|
30466
30541
|
};
|
|
30467
30542
|
function getConnectorGenerationType(generationType) {
|
|
30468
|
-
|
|
30469
|
-
|
|
30543
|
+
switch (generationType) {
|
|
30544
|
+
case "voice":
|
|
30545
|
+
return "audio";
|
|
30546
|
+
case "dashboard-design":
|
|
30547
|
+
case "docs-design":
|
|
30548
|
+
case "mobile-app-design":
|
|
30549
|
+
case "poster":
|
|
30550
|
+
case "report":
|
|
30551
|
+
return null;
|
|
30552
|
+
case "audio":
|
|
30553
|
+
case "code":
|
|
30554
|
+
case "document":
|
|
30555
|
+
case "image":
|
|
30556
|
+
case "presentation":
|
|
30557
|
+
case "text":
|
|
30558
|
+
case "video":
|
|
30559
|
+
case "website":
|
|
30560
|
+
return generationType;
|
|
30470
30561
|
}
|
|
30471
|
-
return generationType;
|
|
30472
30562
|
}
|
|
30473
30563
|
function getBuiltInProviders(generationType) {
|
|
30564
|
+
if (isOpenDesignArtifactGenerationType(generationType) && !zeroTokenAllowsFeatureSwitch("openDesignGenerate" /* OpenDesignGenerate */)) {
|
|
30565
|
+
return [];
|
|
30566
|
+
}
|
|
30474
30567
|
return BUILT_IN_GENERATION_PROVIDERS[generationType] ?? [];
|
|
30475
30568
|
}
|
|
30476
30569
|
function getBuiltInCommand(generationType) {
|
|
30570
|
+
if (isOpenDesignArtifactGenerationType(generationType) && !zeroTokenAllowsFeatureSwitch("openDesignGenerate" /* OpenDesignGenerate */)) {
|
|
30571
|
+
return null;
|
|
30572
|
+
}
|
|
30477
30573
|
return BUILT_IN_GENERATION_COMMANDS[generationType] ?? null;
|
|
30478
30574
|
}
|
|
30575
|
+
function isOpenDesignArtifactGenerationType(generationType) {
|
|
30576
|
+
return generationType === "dashboard-design" || generationType === "docs-design" || generationType === "mobile-app-design" || generationType === "poster" || generationType === "report";
|
|
30577
|
+
}
|
|
30479
30578
|
function getAvailableGenerationTypes() {
|
|
30480
30579
|
const available = /* @__PURE__ */ new Set();
|
|
30481
30580
|
for (const type of CONNECTOR_TYPE_KEYS) {
|
|
@@ -30484,7 +30583,8 @@ function getAvailableGenerationTypes() {
|
|
|
30484
30583
|
}
|
|
30485
30584
|
}
|
|
30486
30585
|
return GENERATION_TYPE_ORDER.filter((type) => {
|
|
30487
|
-
|
|
30586
|
+
const connectorGenerationType = getConnectorGenerationType(type);
|
|
30587
|
+
return getBuiltInProviders(type).length > 0 || connectorGenerationType !== null && available.has(connectorGenerationType);
|
|
30488
30588
|
});
|
|
30489
30589
|
}
|
|
30490
30590
|
function parseGenerationType(value) {
|
|
@@ -30684,7 +30784,7 @@ var generateCommand = new Command().name("generate").description("Show generatio
|
|
|
30684
30784
|
);
|
|
30685
30785
|
const configuredTypes = new Set(connectorList.configuredTypes);
|
|
30686
30786
|
const authorizedTypes = enabledTypes ? new Set(enabledTypes) : null;
|
|
30687
|
-
const candidates = getGenerationConnectors(connectorGenerationType).map(
|
|
30787
|
+
const candidates = connectorGenerationType ? getGenerationConnectors(connectorGenerationType).map(
|
|
30688
30788
|
([connectorType, config]) => {
|
|
30689
30789
|
return toCandidate({
|
|
30690
30790
|
type: connectorType,
|
|
@@ -30696,7 +30796,7 @@ var generateCommand = new Command().name("generate").description("Show generatio
|
|
|
30696
30796
|
platformOrigin
|
|
30697
30797
|
});
|
|
30698
30798
|
}
|
|
30699
|
-
);
|
|
30799
|
+
) : [];
|
|
30700
30800
|
const ready = candidates.filter((candidate) => {
|
|
30701
30801
|
return candidate.status === "ready";
|
|
30702
30802
|
});
|
|
@@ -32389,28 +32489,36 @@ init_esm_shims();
|
|
|
32389
32489
|
init_esm_shims();
|
|
32390
32490
|
import { basename, join } from "path";
|
|
32391
32491
|
import { tmpdir } from "os";
|
|
32392
|
-
function
|
|
32393
|
-
|
|
32394
|
-
const
|
|
32395
|
-
|
|
32396
|
-
|
|
32397
|
-
|
|
32398
|
-
|
|
32492
|
+
function filenameFromUrl(fileUrl) {
|
|
32493
|
+
if (URL.canParse(fileUrl)) {
|
|
32494
|
+
const segment = new URL(fileUrl).pathname.split("/").filter(Boolean).pop();
|
|
32495
|
+
if (!segment) {
|
|
32496
|
+
return "file";
|
|
32497
|
+
}
|
|
32498
|
+
try {
|
|
32499
|
+
return decodeURIComponent(segment);
|
|
32500
|
+
} catch {
|
|
32501
|
+
return segment;
|
|
32502
|
+
}
|
|
32399
32503
|
}
|
|
32504
|
+
return basename(fileUrl) || "file";
|
|
32505
|
+
}
|
|
32506
|
+
function defaultOutPath(fileUrl, filename) {
|
|
32507
|
+
return join(tmpdir(), `github-${filename || filenameFromUrl(fileUrl)}`);
|
|
32400
32508
|
}
|
|
32401
|
-
var downloadFileCommand = new Command().name("download-file").description("Download a
|
|
32509
|
+
var downloadFileCommand = new Command().name("download-file").description("Download a file from a GitHub context block").argument("<url>", "URL from a [GitHub file] block").option(
|
|
32402
32510
|
"-o, --out <path>",
|
|
32403
|
-
"Output path for the downloaded file (default: /tmp/github-<url-basename>)"
|
|
32511
|
+
"Output path for the downloaded file (default: /tmp/github-<filename-or-url-basename>)"
|
|
32404
32512
|
).option("--filename <name>", "Filename hint from the [GitHub file] block").addHelpText(
|
|
32405
32513
|
"after",
|
|
32406
32514
|
`
|
|
32407
32515
|
Examples:
|
|
32408
|
-
Download to default temp path: zero github download-file https://github.com/user-attachments/assets/abc123
|
|
32516
|
+
Download to default temp path: zero github download-file https://github.com/user-attachments/assets/abc123 --filename screenshot.png
|
|
32409
32517
|
Download to explicit path: zero github download-file https://github.com/user-attachments/assets/abc123 -o /tmp/screenshot.png
|
|
32410
32518
|
|
|
32411
32519
|
Output:
|
|
32412
32520
|
Prints a JSON object to stdout on success:
|
|
32413
|
-
{"path":"/tmp/github-
|
|
32521
|
+
{"path":"/tmp/github-screenshot.png","mimetype":"image/png","size":12345}
|
|
32414
32522
|
|
|
32415
32523
|
How to read the downloaded file:
|
|
32416
32524
|
- Images (png/jpg/gif/webp/svg): open the file path with your image viewing tool
|
|
@@ -32420,12 +32528,12 @@ How to read the downloaded file:
|
|
|
32420
32528
|
- PDF/text/csv/json/markdown: read the file directly
|
|
32421
32529
|
|
|
32422
32530
|
Notes:
|
|
32423
|
-
-
|
|
32424
|
-
- Streams the file bytes directly to disk`
|
|
32531
|
+
- The URL comes from a [GitHub file] block
|
|
32532
|
+
- Streams the GitHub file bytes through VM0 directly to disk`
|
|
32425
32533
|
).action(
|
|
32426
32534
|
withErrorHandler(
|
|
32427
32535
|
async (fileUrl, options) => {
|
|
32428
|
-
const outPath = options.out ?? defaultOutPath(fileUrl);
|
|
32536
|
+
const outPath = options.out ?? defaultOutPath(fileUrl, options.filename);
|
|
32429
32537
|
const result = await downloadGithubFile(
|
|
32430
32538
|
fileUrl,
|
|
32431
32539
|
outPath,
|
|
@@ -34540,8 +34648,6 @@ async function runReadCommand(kind, options, payload = {}) {
|
|
|
34540
34648
|
const created = await createComputerUseReadCommand({
|
|
34541
34649
|
kind,
|
|
34542
34650
|
timeoutMs: timeoutSeconds * 1e3,
|
|
34543
|
-
...options.host ? { hostName: options.host } : {},
|
|
34544
|
-
...options.hostId ? { hostId: options.hostId } : {},
|
|
34545
34651
|
...payload
|
|
34546
34652
|
});
|
|
34547
34653
|
await waitForCommand(created.commandId, timeoutSeconds);
|
|
@@ -34551,14 +34657,12 @@ async function runWriteCommand(kind, options, payload) {
|
|
|
34551
34657
|
const created = await createComputerUseWriteCommand({
|
|
34552
34658
|
kind,
|
|
34553
34659
|
timeoutMs: timeoutSeconds * 1e3,
|
|
34554
|
-
...options.host ? { hostName: options.host } : {},
|
|
34555
|
-
...options.hostId ? { hostId: options.hostId } : {},
|
|
34556
34660
|
...payload
|
|
34557
34661
|
});
|
|
34558
34662
|
await waitForCommand(created.commandId, timeoutSeconds);
|
|
34559
34663
|
}
|
|
34560
34664
|
function addTargetOptions(command) {
|
|
34561
|
-
return command.option("--
|
|
34665
|
+
return command.option("--timeout <seconds>", "Maximum time to wait", "30");
|
|
34562
34666
|
}
|
|
34563
34667
|
function appOption(command) {
|
|
34564
34668
|
return command.requiredOption("--app <name>", "Target app name or bundle id");
|
|
@@ -34572,7 +34676,9 @@ var listAppsCommand = addTargetOptions(
|
|
|
34572
34676
|
);
|
|
34573
34677
|
var getAppStateCommand = appOption(
|
|
34574
34678
|
addTargetOptions(
|
|
34575
|
-
new Command().name("get-app-state").description(
|
|
34679
|
+
new Command().name("get-app-state").description(
|
|
34680
|
+
"Get screenshot and accessibility state without activating an app"
|
|
34681
|
+
).action(
|
|
34576
34682
|
withErrorHandler(async (options) => {
|
|
34577
34683
|
await runReadCommand("app.state", options, { app: options.app });
|
|
34578
34684
|
})
|
|
@@ -34581,7 +34687,9 @@ var getAppStateCommand = appOption(
|
|
|
34581
34687
|
);
|
|
34582
34688
|
var clickCommand = appOption(
|
|
34583
34689
|
addTargetOptions(
|
|
34584
|
-
new Command().name("click").description(
|
|
34690
|
+
new Command().name("click").description(
|
|
34691
|
+
"Click an accessibility element or background screenshot coordinate"
|
|
34692
|
+
).option("--snapshot-id <id>", "Snapshot id returned by get-app-state").option("--element <id>", "Element id from get-app-state").option("--element-index <index>", "Element index from get-app-state").option("--x <points>", "Screenshot x coordinate fallback").option("--y <points>", "Screenshot y coordinate fallback").option("--button <button>", "Mouse button", "left").option("--click-count <count>", "Number of clicks", "1").action(
|
|
34585
34693
|
withErrorHandler(async (options) => {
|
|
34586
34694
|
const x = parseOptionalNonNegativeInteger(options.x, "x");
|
|
34587
34695
|
const y = parseOptionalNonNegativeInteger(options.y, "y");
|
|
@@ -34649,7 +34757,7 @@ var typeTextCommand = appOption(
|
|
|
34649
34757
|
);
|
|
34650
34758
|
var pressKeyCommand = appOption(
|
|
34651
34759
|
addTargetOptions(
|
|
34652
|
-
new Command().name("press-key").description("
|
|
34760
|
+
new Command().name("press-key").description("Send a background key or key combination to the target app").requiredOption(
|
|
34653
34761
|
"--key <key>",
|
|
34654
34762
|
"Key or key combination to press, for example Command+K or Control+K"
|
|
34655
34763
|
).action(
|
|
@@ -34678,7 +34786,7 @@ var performActionCommand = appOption(
|
|
|
34678
34786
|
);
|
|
34679
34787
|
var openAppCommand = appOption(
|
|
34680
34788
|
addTargetOptions(
|
|
34681
|
-
new Command().name("open-app").description("Open
|
|
34789
|
+
new Command().name("open-app").description("Open an app on the Desktop host without activating it").action(
|
|
34682
34790
|
withErrorHandler(async (options) => {
|
|
34683
34791
|
await runWriteCommand("app.open", options, { app: options.app });
|
|
34684
34792
|
})
|
|
@@ -34898,16 +35006,13 @@ var imageCommand = createImageGenerateCommand({
|
|
|
34898
35006
|
Image-to-image: zero built-in generate image --model flux-pro-1.1 --image-url https://example.com/mockup.png --prompt "Turn this mockup into a polished product shot"`
|
|
34899
35007
|
});
|
|
34900
35008
|
|
|
34901
|
-
// src/commands/zero/built-in/generate/
|
|
35009
|
+
// src/commands/zero/built-in/generate/open-design-artifacts.ts
|
|
34902
35010
|
init_esm_shims();
|
|
34903
35011
|
|
|
34904
|
-
// src/commands/zero/shared/
|
|
35012
|
+
// src/commands/zero/shared/open-design-artifact-generate.ts
|
|
34905
35013
|
init_esm_shims();
|
|
34906
35014
|
import { readFileSync as readFileSync14 } from "fs";
|
|
34907
35015
|
|
|
34908
|
-
// src/commands/zero/shared/html-artifact-authoring.ts
|
|
34909
|
-
init_esm_shims();
|
|
34910
|
-
|
|
34911
35016
|
// src/commands/zero/shared/open-design-registry.ts
|
|
34912
35017
|
init_esm_shims();
|
|
34913
35018
|
var OPEN_DESIGN_REPO = "vm0-ai/open-design";
|
|
@@ -34927,7 +35032,13 @@ var OPEN_DESIGN_REGISTRY = [
|
|
|
34927
35032
|
name: "Data Report",
|
|
34928
35033
|
description: "Turns source-backed data, rankings, metrics, or lists into a concise analytical report.",
|
|
34929
35034
|
source: source("skills/data-report/SKILL.md"),
|
|
34930
|
-
targets: [
|
|
35035
|
+
targets: [
|
|
35036
|
+
"presentation",
|
|
35037
|
+
"website",
|
|
35038
|
+
"dashboard-design",
|
|
35039
|
+
"report",
|
|
35040
|
+
"docs-design"
|
|
35041
|
+
],
|
|
34931
35042
|
tags: ["analysis", "data", "report", "ranking", "sources", "table"],
|
|
34932
35043
|
triggers: ["report", "top 10", "ranking", "metrics", "analysis"],
|
|
34933
35044
|
bestFor: ["source-backed reports", "ranked lists", "data summaries"],
|
|
@@ -34940,7 +35051,7 @@ var OPEN_DESIGN_REGISTRY = [
|
|
|
34940
35051
|
name: "Article Magazine",
|
|
34941
35052
|
description: "Shapes research or editorial material into a magazine-like narrative with strong hierarchy.",
|
|
34942
35053
|
source: source("skills/article-magazine/SKILL.md"),
|
|
34943
|
-
targets: ["presentation", "website", "poster", "report", "docs"],
|
|
35054
|
+
targets: ["presentation", "website", "poster", "report", "docs-design"],
|
|
34944
35055
|
tags: ["editorial", "magazine", "article", "narrative", "research"],
|
|
34945
35056
|
triggers: ["magazine", "editorial", "story", "essay", "briefing"],
|
|
34946
35057
|
bestFor: [
|
|
@@ -34957,7 +35068,7 @@ var OPEN_DESIGN_REGISTRY = [
|
|
|
34957
35068
|
name: "Design Brief",
|
|
34958
35069
|
description: "Converts a product, brand, or feature request into a structured design brief.",
|
|
34959
35070
|
source: source("skills/design-brief/SKILL.md"),
|
|
34960
|
-
targets: ["presentation", "website", "mobile-app", "docs"],
|
|
35071
|
+
targets: ["presentation", "website", "mobile-app-design", "docs-design"],
|
|
34961
35072
|
tags: ["design", "brief", "product", "brand", "requirements"],
|
|
34962
35073
|
triggers: ["design brief", "brand", "product direction", "requirements"],
|
|
34963
35074
|
bestFor: ["product design briefs", "brand-driven websites"],
|
|
@@ -34970,7 +35081,7 @@ var OPEN_DESIGN_REGISTRY = [
|
|
|
34970
35081
|
name: "Dashboard",
|
|
34971
35082
|
description: "Dense operational dashboard layout for KPIs, lists, filters, and repeated scanning.",
|
|
34972
35083
|
source: source("design-templates/dashboard"),
|
|
34973
|
-
targets: ["website", "dashboard", "report"],
|
|
35084
|
+
targets: ["website", "dashboard-design", "report"],
|
|
34974
35085
|
tags: ["dashboard", "analytics", "kpi", "metrics", "operations", "table"],
|
|
34975
35086
|
triggers: ["dashboard", "analytics", "monitoring", "metrics", "ops"],
|
|
34976
35087
|
bestFor: ["metric-heavy pages", "status surfaces", "operational summaries"],
|
|
@@ -34998,7 +35109,7 @@ var OPEN_DESIGN_REGISTRY = [
|
|
|
34998
35109
|
name: "Docs Page",
|
|
34999
35110
|
description: "Documentation-style page layout for structured explanations, navigation, and examples.",
|
|
35000
35111
|
source: source("design-templates/docs-page"),
|
|
35001
|
-
targets: ["website", "docs", "report"],
|
|
35112
|
+
targets: ["website", "docs-design", "report"],
|
|
35002
35113
|
tags: ["docs", "explanation", "guide", "structured", "reference"],
|
|
35003
35114
|
triggers: ["docs", "documentation", "guide", "explain", "how to"],
|
|
35004
35115
|
bestFor: ["technical explainers", "product docs", "implementation notes"],
|
|
@@ -35006,6 +35117,27 @@ var OPEN_DESIGN_REGISTRY = [
|
|
|
35006
35117
|
status: "curated",
|
|
35007
35118
|
priority: 26
|
|
35008
35119
|
},
|
|
35120
|
+
{
|
|
35121
|
+
id: "od:template:mobile-app",
|
|
35122
|
+
kind: "template",
|
|
35123
|
+
name: "Mobile App Design",
|
|
35124
|
+
description: "Single-screen mobile UI design rendered in a realistic iPhone device frame.",
|
|
35125
|
+
source: source("design-templates/mobile-app"),
|
|
35126
|
+
targets: ["mobile-app-design"],
|
|
35127
|
+
tags: ["mobile", "app", "ios", "design", "prototype", "phone"],
|
|
35128
|
+
triggers: [
|
|
35129
|
+
"mobile app",
|
|
35130
|
+
"ios app",
|
|
35131
|
+
"android app",
|
|
35132
|
+
"phone screen",
|
|
35133
|
+
"app ui",
|
|
35134
|
+
"app mockup"
|
|
35135
|
+
],
|
|
35136
|
+
bestFor: ["mobile UI mockups", "single-screen app design reviews"],
|
|
35137
|
+
compatibleWith: ["od:skill:design-brief", "od:design-system:apple"],
|
|
35138
|
+
status: "curated",
|
|
35139
|
+
priority: 38
|
|
35140
|
+
},
|
|
35009
35141
|
{
|
|
35010
35142
|
id: "od:template:html-ppt-graphify-dark-graph",
|
|
35011
35143
|
kind: "template",
|
|
@@ -35050,7 +35182,7 @@ var OPEN_DESIGN_REGISTRY = [
|
|
|
35050
35182
|
name: "Weekly Update",
|
|
35051
35183
|
description: "Compact update deck/page structure for highlights, risks, next steps, and metrics.",
|
|
35052
35184
|
source: source("design-templates/weekly-update"),
|
|
35053
|
-
targets: ["presentation", "report", "docs"],
|
|
35185
|
+
targets: ["presentation", "report", "docs-design"],
|
|
35054
35186
|
tags: ["update", "status", "briefing", "report", "metrics"],
|
|
35055
35187
|
triggers: ["weekly", "status", "update", "briefing"],
|
|
35056
35188
|
bestFor: ["team updates", "status reports", "progress summaries"],
|
|
@@ -35078,7 +35210,7 @@ var OPEN_DESIGN_REGISTRY = [
|
|
|
35078
35210
|
name: "Dashboard",
|
|
35079
35211
|
description: "Quiet, dense interface system for dashboards, tables, filters, and repeat workflows.",
|
|
35080
35212
|
source: source("design-systems/dashboard"),
|
|
35081
|
-
targets: ["website", "dashboard", "report"],
|
|
35213
|
+
targets: ["website", "dashboard-design", "report"],
|
|
35082
35214
|
tags: ["dashboard", "neutral", "dense", "table", "operations", "charts"],
|
|
35083
35215
|
triggers: ["dashboard", "analytics", "metrics", "ops", "report"],
|
|
35084
35216
|
bestFor: ["operational UIs", "data reports", "admin surfaces"],
|
|
@@ -35091,7 +35223,7 @@ var OPEN_DESIGN_REGISTRY = [
|
|
|
35091
35223
|
name: "Trading Terminal",
|
|
35092
35224
|
description: "Dark dense market-terminal aesthetic for charts, feeds, tables, and high information density.",
|
|
35093
35225
|
source: source("design-systems/trading-terminal"),
|
|
35094
|
-
targets: ["presentation", "website", "dashboard", "report"],
|
|
35226
|
+
targets: ["presentation", "website", "dashboard-design", "report"],
|
|
35095
35227
|
tags: ["dark", "terminal", "finance", "data", "charts", "dense"],
|
|
35096
35228
|
triggers: ["dark", "terminal", "trading", "chart", "graph"],
|
|
35097
35229
|
bestFor: ["dark analytical reports", "graph-heavy dashboards"],
|
|
@@ -35104,7 +35236,7 @@ var OPEN_DESIGN_REGISTRY = [
|
|
|
35104
35236
|
name: "Warm Editorial",
|
|
35105
35237
|
description: "Warm editorial design system for readable narrative pages, zines, and reports.",
|
|
35106
35238
|
source: source("design-systems/warm-editorial"),
|
|
35107
|
-
targets: ["presentation", "website", "poster", "report", "docs"],
|
|
35239
|
+
targets: ["presentation", "website", "poster", "report", "docs-design"],
|
|
35108
35240
|
tags: ["warm", "editorial", "magazine", "narrative", "readable"],
|
|
35109
35241
|
triggers: ["editorial", "magazine", "zine", "warm", "story"],
|
|
35110
35242
|
bestFor: ["narrative reports", "editorial decks", "long-form pages"],
|
|
@@ -35117,7 +35249,7 @@ var OPEN_DESIGN_REGISTRY = [
|
|
|
35117
35249
|
name: "Editorial",
|
|
35118
35250
|
description: "Clean editorial design system with strong typography, media framing, and section rhythm.",
|
|
35119
35251
|
source: source("design-systems/editorial"),
|
|
35120
|
-
targets: ["presentation", "website", "poster", "report", "docs"],
|
|
35252
|
+
targets: ["presentation", "website", "poster", "report", "docs-design"],
|
|
35121
35253
|
tags: ["editorial", "typography", "media", "brand", "article"],
|
|
35122
35254
|
triggers: ["editorial", "article", "brand", "landing", "magazine"],
|
|
35123
35255
|
bestFor: ["brand sites", "article-style reports", "visual narratives"],
|
|
@@ -35130,14 +35262,39 @@ var OPEN_DESIGN_REGISTRY = [
|
|
|
35130
35262
|
name: "Mono",
|
|
35131
35263
|
description: "Minimal monospace-oriented system for documentation, technical pages, and precise reports.",
|
|
35132
35264
|
source: source("design-systems/mono"),
|
|
35133
|
-
targets: ["website", "docs", "report"],
|
|
35265
|
+
targets: ["website", "docs-design", "report"],
|
|
35134
35266
|
tags: ["mono", "docs", "technical", "minimal", "structured"],
|
|
35135
35267
|
triggers: ["docs", "technical", "reference", "minimal", "api"],
|
|
35136
35268
|
bestFor: ["technical documentation", "implementation reports"],
|
|
35137
35269
|
status: "curated",
|
|
35138
35270
|
priority: 20
|
|
35271
|
+
},
|
|
35272
|
+
{
|
|
35273
|
+
id: "od:design-system:apple",
|
|
35274
|
+
kind: "design-system",
|
|
35275
|
+
name: "Apple",
|
|
35276
|
+
description: "Apple-inspired interface system for polished mobile and product UI design.",
|
|
35277
|
+
source: source("design-systems/apple"),
|
|
35278
|
+
targets: ["mobile-app-design", "website"],
|
|
35279
|
+
tags: ["apple", "mobile", "ios", "clean", "product"],
|
|
35280
|
+
triggers: ["mobile", "ios", "iphone", "app design", "app ui"],
|
|
35281
|
+
bestFor: ["phone-framed product mocks", "consumer mobile UI"],
|
|
35282
|
+
status: "curated",
|
|
35283
|
+
priority: 34
|
|
35139
35284
|
}
|
|
35140
35285
|
];
|
|
35286
|
+
function toOpenDesignTarget(value) {
|
|
35287
|
+
if (value === "dashboard") {
|
|
35288
|
+
return "dashboard-design";
|
|
35289
|
+
}
|
|
35290
|
+
if (value === "docs") {
|
|
35291
|
+
return "docs-design";
|
|
35292
|
+
}
|
|
35293
|
+
if (value === "mobile-app") {
|
|
35294
|
+
return "mobile-app-design";
|
|
35295
|
+
}
|
|
35296
|
+
return value;
|
|
35297
|
+
}
|
|
35141
35298
|
function normalizeText(value) {
|
|
35142
35299
|
return value.toLowerCase();
|
|
35143
35300
|
}
|
|
@@ -35220,6 +35377,7 @@ function selectOpenDesignCandidates(options) {
|
|
|
35220
35377
|
}
|
|
35221
35378
|
|
|
35222
35379
|
// src/commands/zero/shared/html-artifact-authoring.ts
|
|
35380
|
+
init_esm_shims();
|
|
35223
35381
|
function slugify(value) {
|
|
35224
35382
|
const slug = value.toLowerCase().replace(/[^a-z0-9]+/gu, "-").replace(/^-+|-+$/gu, "").replace(/-{2,}/gu, "-").slice(0, 48).replace(/-+$/u, "");
|
|
35225
35383
|
return slug.length >= 3 ? slug : "html-artifact";
|
|
@@ -35228,12 +35386,12 @@ function titleForKind(kind) {
|
|
|
35228
35386
|
const titles = {
|
|
35229
35387
|
presentation: "HTML presentation",
|
|
35230
35388
|
website: "hosted website",
|
|
35231
|
-
dashboard: "dashboard",
|
|
35232
|
-
"mobile-app": "mobile app prototype",
|
|
35389
|
+
"dashboard-design": "dashboard design prototype",
|
|
35390
|
+
"mobile-app-design": "mobile app design prototype",
|
|
35233
35391
|
poster: "poster",
|
|
35234
35392
|
"intro-video": "intro video storyboard",
|
|
35235
35393
|
report: "report",
|
|
35236
|
-
docs: "documentation
|
|
35394
|
+
"docs-design": "documentation design prototype"
|
|
35237
35395
|
};
|
|
35238
35396
|
return titles[kind];
|
|
35239
35397
|
}
|
|
@@ -35354,7 +35512,152 @@ function createHtmlArtifactAuthoringPacket(options) {
|
|
|
35354
35512
|
};
|
|
35355
35513
|
}
|
|
35356
35514
|
|
|
35515
|
+
// src/commands/zero/shared/open-design-artifact-generate.ts
|
|
35516
|
+
function readPrompt2(options, usageCommand) {
|
|
35517
|
+
if (options.prompt?.trim()) {
|
|
35518
|
+
return options.prompt.trim();
|
|
35519
|
+
}
|
|
35520
|
+
if (process.stdin.isTTY === false) {
|
|
35521
|
+
const prompt = readFileSync14("/dev/stdin", "utf8").trim();
|
|
35522
|
+
if (prompt.length > 0) {
|
|
35523
|
+
return prompt;
|
|
35524
|
+
}
|
|
35525
|
+
}
|
|
35526
|
+
throw new Error("--prompt is required", {
|
|
35527
|
+
cause: new Error(`Usage: ${usageCommand} --prompt "A product report"`)
|
|
35528
|
+
});
|
|
35529
|
+
}
|
|
35530
|
+
function createOpenDesignArtifactGenerateCommand(config) {
|
|
35531
|
+
return new Command().name(config.name).description(config.description).option("--prompt <text>", "Artifact prompt; can also be piped via stdin").option("--site <slug>", "Hosted site slug; defaults to generated name").option("--title <text>", "Requested artifact title or name").option("--audience <text>", "Audience context").option("--json", "Print metadata as JSON").addHelpText(
|
|
35532
|
+
"after",
|
|
35533
|
+
`
|
|
35534
|
+
Examples:
|
|
35535
|
+
${config.examples}
|
|
35536
|
+
|
|
35537
|
+
Output:
|
|
35538
|
+
Prints an Open Design resource-selection packet for the current agent. The
|
|
35539
|
+
agent authors a static HTML artifact and hosts it with zero host.
|
|
35540
|
+
|
|
35541
|
+
Notes:
|
|
35542
|
+
- Authenticates via ZERO_TOKEN
|
|
35543
|
+
- OpenDesign path is gated by the openDesignGenerate feature switch`
|
|
35544
|
+
).action(
|
|
35545
|
+
withErrorHandler(async (options) => {
|
|
35546
|
+
if (!zeroTokenAllowsFeatureSwitch("openDesignGenerate" /* OpenDesignGenerate */)) {
|
|
35547
|
+
throw new Error(
|
|
35548
|
+
`${config.usageCommand} requires the openDesignGenerate feature switch`
|
|
35549
|
+
);
|
|
35550
|
+
}
|
|
35551
|
+
const prompt = readPrompt2(options, config.usageCommand);
|
|
35552
|
+
const packet = createHtmlArtifactAuthoringPacket({
|
|
35553
|
+
kind: toOpenDesignTarget(config.target),
|
|
35554
|
+
prompt,
|
|
35555
|
+
slugSource: options.title,
|
|
35556
|
+
site: options.site,
|
|
35557
|
+
details: config.details(options),
|
|
35558
|
+
artifactRules: config.artifactRules
|
|
35559
|
+
});
|
|
35560
|
+
if (options.json) {
|
|
35561
|
+
console.log(JSON.stringify(packet));
|
|
35562
|
+
return;
|
|
35563
|
+
}
|
|
35564
|
+
console.log(packet.instructions);
|
|
35565
|
+
})
|
|
35566
|
+
);
|
|
35567
|
+
}
|
|
35568
|
+
|
|
35569
|
+
// src/commands/zero/built-in/generate/open-design-artifacts.ts
|
|
35570
|
+
function standardDetails(kind) {
|
|
35571
|
+
return (options) => {
|
|
35572
|
+
return [
|
|
35573
|
+
`Artifact kind: ${kind}`,
|
|
35574
|
+
`Requested title/name: ${options.title ?? "not specified"}`,
|
|
35575
|
+
`Audience: ${options.audience ?? "not specified"}`
|
|
35576
|
+
];
|
|
35577
|
+
};
|
|
35578
|
+
}
|
|
35579
|
+
var reportCommand = createOpenDesignArtifactGenerateCommand({
|
|
35580
|
+
name: "report",
|
|
35581
|
+
target: "report",
|
|
35582
|
+
description: "Generate an Open Design HTML report from a prompt",
|
|
35583
|
+
usageCommand: "zero built-in generate report",
|
|
35584
|
+
examples: ` Generate report: zero built-in generate report --prompt "A Q2 usage report for the API team"
|
|
35585
|
+
Stable hosted slug: zero built-in generate report --site api-usage-q2 --prompt "A Q2 usage report"`,
|
|
35586
|
+
details: standardDetails("report"),
|
|
35587
|
+
artifactRules: [
|
|
35588
|
+
"Produce an analytical report, not a marketing page.",
|
|
35589
|
+
"Use concrete metrics, tables, chart-like visuals, and a clear findings section.",
|
|
35590
|
+
"Keep source assumptions visible when the prompt does not provide real data.",
|
|
35591
|
+
"Verify the report is readable at desktop and mobile widths."
|
|
35592
|
+
]
|
|
35593
|
+
});
|
|
35594
|
+
var docsDesignCommand = createOpenDesignArtifactGenerateCommand({
|
|
35595
|
+
name: "docs-design",
|
|
35596
|
+
target: "docs-design",
|
|
35597
|
+
description: "Generate an Open Design documentation design from a prompt",
|
|
35598
|
+
usageCommand: "zero built-in generate docs-design",
|
|
35599
|
+
examples: ` Generate docs design: zero built-in generate docs-design --prompt "Docs for adding OpenDesign artifact targets"
|
|
35600
|
+
Stable hosted slug: zero built-in generate docs-design --site opendesign-target-docs --prompt "OpenDesign target docs"`,
|
|
35601
|
+
details: standardDetails("docs-design"),
|
|
35602
|
+
artifactRules: [
|
|
35603
|
+
"Produce a documentation design mockup, not a production documentation system.",
|
|
35604
|
+
"Include navigation, article structure, code or command examples when relevant, and clear section anchors as static design content.",
|
|
35605
|
+
"Use restrained documentation styling optimized for long-form reading.",
|
|
35606
|
+
"Verify the page works at mobile and desktop widths."
|
|
35607
|
+
]
|
|
35608
|
+
});
|
|
35609
|
+
var posterCommand = createOpenDesignArtifactGenerateCommand({
|
|
35610
|
+
name: "poster",
|
|
35611
|
+
target: "poster",
|
|
35612
|
+
description: "Generate an Open Design HTML poster from a prompt",
|
|
35613
|
+
usageCommand: "zero built-in generate poster",
|
|
35614
|
+
examples: ` Generate poster: zero built-in generate poster --prompt "A launch poster for OpenDesign artifact targets"
|
|
35615
|
+
Stable hosted slug: zero built-in generate poster --site opendesign-poster --prompt "A launch poster"`,
|
|
35616
|
+
details: standardDetails("poster"),
|
|
35617
|
+
artifactRules: [
|
|
35618
|
+
"Produce a poster-style HTML artifact with strong hierarchy and composition.",
|
|
35619
|
+
"Treat this as an HTML poster surface; do not imply a raster image was generated unless image assets are actually created.",
|
|
35620
|
+
"Make the poster responsive enough to inspect on mobile and desktop.",
|
|
35621
|
+
"Keep text deliberate and avoid placeholder copy."
|
|
35622
|
+
]
|
|
35623
|
+
});
|
|
35624
|
+
var dashboardDesignCommand = createOpenDesignArtifactGenerateCommand({
|
|
35625
|
+
name: "dashboard-design",
|
|
35626
|
+
target: "dashboard-design",
|
|
35627
|
+
description: "Generate an Open Design dashboard design from a prompt",
|
|
35628
|
+
usageCommand: "zero built-in generate dashboard-design",
|
|
35629
|
+
examples: ` Generate dash design: zero built-in generate dashboard-design --prompt "An ops dashboard for generation runs"
|
|
35630
|
+
Stable hosted slug: zero built-in generate dashboard-design --site generation-ops --prompt "A generation ops dashboard"`,
|
|
35631
|
+
details: standardDetails("dashboard-design"),
|
|
35632
|
+
artifactRules: [
|
|
35633
|
+
"Produce a dashboard design mockup, not a live operational dashboard.",
|
|
35634
|
+
"Include scannable KPIs, chart-like visuals, lists or tables, and realistic empty/loading/error states as static design content.",
|
|
35635
|
+
"Prioritize dense, repeat-use UI over decorative sections.",
|
|
35636
|
+
"Verify the dashboard does not overflow at desktop and mobile widths."
|
|
35637
|
+
]
|
|
35638
|
+
});
|
|
35639
|
+
var mobileAppDesignCommand = createOpenDesignArtifactGenerateCommand({
|
|
35640
|
+
name: "mobile-app-design",
|
|
35641
|
+
target: "mobile-app-design",
|
|
35642
|
+
description: "Generate an Open Design mobile app design prototype from a prompt",
|
|
35643
|
+
usageCommand: "zero built-in generate mobile-app-design",
|
|
35644
|
+
examples: ` Generate mobile UI: zero built-in generate mobile-app-design --prompt "A mobile review screen for generation artifacts"
|
|
35645
|
+
Stable hosted slug: zero built-in generate mobile-app-design --site generation-mobile-review --prompt "A mobile review screen"`,
|
|
35646
|
+
details: standardDetails("mobile-app-design"),
|
|
35647
|
+
artifactRules: [
|
|
35648
|
+
"Produce a design prototype, not a runnable or installable mobile app.",
|
|
35649
|
+
"Render the design inside a realistic phone frame with status bar, device chrome, and home indicator when possible.",
|
|
35650
|
+
"Focus on one mobile screen and one primary job.",
|
|
35651
|
+
"Use mobile-appropriate tap targets, type sizes, and spacing."
|
|
35652
|
+
]
|
|
35653
|
+
});
|
|
35654
|
+
|
|
35655
|
+
// src/commands/zero/built-in/generate/presentation.ts
|
|
35656
|
+
init_esm_shims();
|
|
35657
|
+
|
|
35357
35658
|
// src/commands/zero/shared/presentation-generate.ts
|
|
35659
|
+
init_esm_shims();
|
|
35660
|
+
import { readFileSync as readFileSync15 } from "fs";
|
|
35358
35661
|
var PRESENTATION_MAX_IMAGES = 8;
|
|
35359
35662
|
function parseSlideCount(value) {
|
|
35360
35663
|
const slideCount = Number(value);
|
|
@@ -35375,12 +35678,12 @@ function parseImageCount(value) {
|
|
|
35375
35678
|
}
|
|
35376
35679
|
return imageCount;
|
|
35377
35680
|
}
|
|
35378
|
-
function
|
|
35681
|
+
function readPrompt3(options, usageCommand) {
|
|
35379
35682
|
if (options.prompt?.trim()) {
|
|
35380
35683
|
return options.prompt.trim();
|
|
35381
35684
|
}
|
|
35382
35685
|
if (process.stdin.isTTY === false) {
|
|
35383
|
-
const prompt =
|
|
35686
|
+
const prompt = readFileSync15("/dev/stdin", "utf8").trim();
|
|
35384
35687
|
if (prompt.length > 0) {
|
|
35385
35688
|
return prompt;
|
|
35386
35689
|
}
|
|
@@ -35421,7 +35724,7 @@ Notes:
|
|
|
35421
35724
|
- OpenDesign path is gated by the openDesignGenerate feature switch`
|
|
35422
35725
|
).action(
|
|
35423
35726
|
withErrorHandler(async (options) => {
|
|
35424
|
-
const prompt =
|
|
35727
|
+
const prompt = readPrompt3(options, config.usageCommand);
|
|
35425
35728
|
if (zeroTokenAllowsFeatureSwitch("openDesignGenerate" /* OpenDesignGenerate */)) {
|
|
35426
35729
|
const packet = createHtmlArtifactAuthoringPacket({
|
|
35427
35730
|
kind: "presentation",
|
|
@@ -35498,7 +35801,7 @@ init_esm_shims();
|
|
|
35498
35801
|
|
|
35499
35802
|
// src/commands/zero/shared/video-generate.ts
|
|
35500
35803
|
init_esm_shims();
|
|
35501
|
-
import { readFileSync as
|
|
35804
|
+
import { readFileSync as readFileSync16 } from "fs";
|
|
35502
35805
|
var FRAME_ASPECT_RATIO_TOLERANCE = 0.02;
|
|
35503
35806
|
var JPEG_START_OF_FRAME_MARKERS = /* @__PURE__ */ new Set([
|
|
35504
35807
|
192,
|
|
@@ -35692,12 +35995,12 @@ async function validateVideoOptions(options) {
|
|
|
35692
35995
|
)
|
|
35693
35996
|
]);
|
|
35694
35997
|
}
|
|
35695
|
-
function
|
|
35998
|
+
function readPrompt4(options, usageCommand) {
|
|
35696
35999
|
if (options.prompt?.trim()) {
|
|
35697
36000
|
return options.prompt.trim();
|
|
35698
36001
|
}
|
|
35699
36002
|
if (process.stdin.isTTY === false) {
|
|
35700
|
-
const prompt =
|
|
36003
|
+
const prompt = readFileSync16("/dev/stdin", "utf8").trim();
|
|
35701
36004
|
if (prompt.length > 0) {
|
|
35702
36005
|
return prompt;
|
|
35703
36006
|
}
|
|
@@ -35762,7 +36065,7 @@ Models:
|
|
|
35762
36065
|
4k output, negative prompts, and optional audio.`
|
|
35763
36066
|
).action(
|
|
35764
36067
|
withErrorHandler(async (options) => {
|
|
35765
|
-
const prompt =
|
|
36068
|
+
const prompt = readPrompt4(options, config.usageCommand);
|
|
35766
36069
|
await validateVideoOptions(options);
|
|
35767
36070
|
const result = await generateWebVideo({
|
|
35768
36071
|
prompt,
|
|
@@ -35813,7 +36116,7 @@ var videoCommand = createVideoGenerateCommand({
|
|
|
35813
36116
|
// src/commands/zero/built-in/generate/website.ts
|
|
35814
36117
|
init_esm_shims();
|
|
35815
36118
|
import { mkdtemp, rm } from "fs/promises";
|
|
35816
|
-
import { readFileSync as
|
|
36119
|
+
import { readFileSync as readFileSync17 } from "fs";
|
|
35817
36120
|
import { join as join8 } from "path";
|
|
35818
36121
|
import { tmpdir as tmpdir5 } from "os";
|
|
35819
36122
|
|
|
@@ -36868,12 +37171,12 @@ function parseImageCount2(value) {
|
|
|
36868
37171
|
}
|
|
36869
37172
|
return imageCount;
|
|
36870
37173
|
}
|
|
36871
|
-
function
|
|
37174
|
+
function readPrompt5(options) {
|
|
36872
37175
|
if (options.prompt?.trim()) {
|
|
36873
37176
|
return options.prompt.trim();
|
|
36874
37177
|
}
|
|
36875
37178
|
if (process.stdin.isTTY === false) {
|
|
36876
|
-
const prompt =
|
|
37179
|
+
const prompt = readFileSync17("/dev/stdin", "utf8").trim();
|
|
36877
37180
|
if (prompt.length > 0) {
|
|
36878
37181
|
return prompt;
|
|
36879
37182
|
}
|
|
@@ -36920,7 +37223,7 @@ Notes:
|
|
|
36920
37223
|
- OpenDesign path is gated by the openDesignGenerate feature switch`
|
|
36921
37224
|
).action(
|
|
36922
37225
|
withErrorHandler(async (options) => {
|
|
36923
|
-
const prompt =
|
|
37226
|
+
const prompt = readPrompt5(options);
|
|
36924
37227
|
if (zeroTokenAllowsFeatureSwitch("openDesignGenerate" /* OpenDesignGenerate */)) {
|
|
36925
37228
|
const packet = createHtmlArtifactAuthoringPacket({
|
|
36926
37229
|
kind: "website",
|
|
@@ -37045,13 +37348,13 @@ init_esm_shims();
|
|
|
37045
37348
|
|
|
37046
37349
|
// src/commands/zero/shared/voice-generate.ts
|
|
37047
37350
|
init_esm_shims();
|
|
37048
|
-
import { readFileSync as
|
|
37351
|
+
import { readFileSync as readFileSync18 } from "fs";
|
|
37049
37352
|
function readText(options, usageCommand) {
|
|
37050
37353
|
if (options.text?.trim()) {
|
|
37051
37354
|
return options.text.trim();
|
|
37052
37355
|
}
|
|
37053
37356
|
if (process.stdin.isTTY === false) {
|
|
37054
|
-
const text =
|
|
37357
|
+
const text = readFileSync18("/dev/stdin", "utf8").trim();
|
|
37055
37358
|
if (text.length > 0) {
|
|
37056
37359
|
return text;
|
|
37057
37360
|
}
|
|
@@ -37110,6 +37413,10 @@ function buildGenerateHelpText() {
|
|
|
37110
37413
|
const examples = [
|
|
37111
37414
|
' Generate image: zero built-in generate image --prompt "A watercolor fox"',
|
|
37112
37415
|
' Generate deck: zero built-in generate presentation --prompt "A product roadmap"',
|
|
37416
|
+
...zeroTokenAllowsFeatureSwitch("openDesignGenerate" /* OpenDesignGenerate */) ? [
|
|
37417
|
+
' Generate report: zero built-in generate report --prompt "A Q2 usage report"',
|
|
37418
|
+
' Generate docs: zero built-in generate docs-design --prompt "A setup guide"'
|
|
37419
|
+
] : [],
|
|
37113
37420
|
' Generate video: zero built-in generate video --prompt "A cinematic city shot"',
|
|
37114
37421
|
...zeroTokenAllowsFeatureSwitch("hostedSites" /* HostedSites */) ? [
|
|
37115
37422
|
' Generate site: zero built-in generate website --prompt "A launch site"'
|
|
@@ -37120,7 +37427,10 @@ function buildGenerateHelpText() {
|
|
|
37120
37427
|
Examples:
|
|
37121
37428
|
${examples.join("\n")}`;
|
|
37122
37429
|
}
|
|
37123
|
-
var
|
|
37430
|
+
var openDesignCommandOptions = zeroTokenAllowsFeatureSwitch(
|
|
37431
|
+
"openDesignGenerate" /* OpenDesignGenerate */
|
|
37432
|
+
) ? {} : { hidden: true };
|
|
37433
|
+
var generateCommand2 = new Command().name("generate").description("Generate assets with built-in vm0 services").addCommand(imageCommand).addCommand(presentationCommand).addCommand(reportCommand, openDesignCommandOptions).addCommand(docsDesignCommand, openDesignCommandOptions).addCommand(posterCommand, openDesignCommandOptions).addCommand(dashboardDesignCommand, openDesignCommandOptions).addCommand(mobileAppDesignCommand, openDesignCommandOptions).addCommand(videoCommand).addCommand(
|
|
37124
37434
|
websiteCommand,
|
|
37125
37435
|
zeroTokenAllowsFeatureSwitch("hostedSites" /* HostedSites */) ? {} : { hidden: true }
|
|
37126
37436
|
).addCommand(voiceCommand).addHelpText("after", buildGenerateHelpText);
|
|
@@ -38027,7 +38337,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
38027
38337
|
var program = new Command();
|
|
38028
38338
|
program.name("zero").description(
|
|
38029
38339
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
38030
|
-
).version("9.
|
|
38340
|
+
).version("9.162.0").addHelpText("after", () => {
|
|
38031
38341
|
return buildZeroHelpText();
|
|
38032
38342
|
});
|
|
38033
38343
|
if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {
|