@vm0/cli 9.176.1 → 9.176.4
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-TPUYVLNY.js → chunk-JQ72VVQC.js} +278 -309
- package/{chunk-TPUYVLNY.js.map → chunk-JQ72VVQC.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +41 -70
- package/zero.js.map +1 -1
package/index.js
CHANGED
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
source_default,
|
|
68
68
|
volumeConfigSchema,
|
|
69
69
|
withErrorHandler
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-JQ72VVQC.js";
|
|
71
71
|
import {
|
|
72
72
|
__toESM,
|
|
73
73
|
init_esm_shims
|
|
@@ -400,7 +400,7 @@ function getConfigPath() {
|
|
|
400
400
|
return join(os.homedir(), ".vm0", "config.json");
|
|
401
401
|
}
|
|
402
402
|
var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
|
|
403
|
-
console.log(source_default.bold(`VM0 CLI v${"9.176.
|
|
403
|
+
console.log(source_default.bold(`VM0 CLI v${"9.176.4"}`));
|
|
404
404
|
console.log();
|
|
405
405
|
const config = await loadConfig();
|
|
406
406
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -4293,7 +4293,7 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
4293
4293
|
options.autoUpdate = false;
|
|
4294
4294
|
}
|
|
4295
4295
|
if (options.autoUpdate !== false) {
|
|
4296
|
-
await startSilentUpgrade("9.176.
|
|
4296
|
+
await startSilentUpgrade("9.176.4");
|
|
4297
4297
|
}
|
|
4298
4298
|
try {
|
|
4299
4299
|
let result;
|
|
@@ -4395,7 +4395,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4395
4395
|
withErrorHandler(
|
|
4396
4396
|
async (identifier, prompt, options) => {
|
|
4397
4397
|
if (options.autoUpdate !== false) {
|
|
4398
|
-
await startSilentUpgrade("9.176.
|
|
4398
|
+
await startSilentUpgrade("9.176.4");
|
|
4399
4399
|
}
|
|
4400
4400
|
const { name, version } = parseIdentifier(identifier);
|
|
4401
4401
|
let composeId;
|
|
@@ -6189,13 +6189,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6189
6189
|
if (latestVersion === null) {
|
|
6190
6190
|
throw new Error("Could not check for updates. Please try again later.");
|
|
6191
6191
|
}
|
|
6192
|
-
if (latestVersion === "9.176.
|
|
6193
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.176.
|
|
6192
|
+
if (latestVersion === "9.176.4") {
|
|
6193
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.176.4"})`));
|
|
6194
6194
|
return;
|
|
6195
6195
|
}
|
|
6196
6196
|
console.log(
|
|
6197
6197
|
source_default.yellow(
|
|
6198
|
-
`Current version: ${"9.176.
|
|
6198
|
+
`Current version: ${"9.176.4"} -> Latest version: ${latestVersion}`
|
|
6199
6199
|
)
|
|
6200
6200
|
);
|
|
6201
6201
|
console.log();
|
|
@@ -6222,7 +6222,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6222
6222
|
const success = await performUpgrade(packageManager);
|
|
6223
6223
|
if (success) {
|
|
6224
6224
|
console.log(
|
|
6225
|
-
source_default.green(`\u2713 Upgraded from ${"9.176.
|
|
6225
|
+
source_default.green(`\u2713 Upgraded from ${"9.176.4"} to ${latestVersion}`)
|
|
6226
6226
|
);
|
|
6227
6227
|
return;
|
|
6228
6228
|
}
|
|
@@ -6289,7 +6289,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
6289
6289
|
|
|
6290
6290
|
// src/index.ts
|
|
6291
6291
|
var program = new Command();
|
|
6292
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.176.
|
|
6292
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.176.4");
|
|
6293
6293
|
program.addCommand(authCommand);
|
|
6294
6294
|
program.addCommand(infoCommand);
|
|
6295
6295
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -143,9 +143,8 @@ import {
|
|
|
143
143
|
uploadWebFile,
|
|
144
144
|
upsertZeroOrgModelProvider,
|
|
145
145
|
withErrorHandler,
|
|
146
|
-
zeroAgentCustomSkillNameSchema
|
|
147
|
-
|
|
148
|
-
} from "./chunk-TPUYVLNY.js";
|
|
146
|
+
zeroAgentCustomSkillNameSchema
|
|
147
|
+
} from "./chunk-JQ72VVQC.js";
|
|
149
148
|
import {
|
|
150
149
|
__toESM,
|
|
151
150
|
init_esm_shims
|
|
@@ -2450,16 +2449,21 @@ var zeroCreditCommand = new Command().name("credit").description("Create a Strip
|
|
|
2450
2449
|
const origin = await getPlatformOrigin();
|
|
2451
2450
|
const successUrl = `${origin}/?settings=usage&credit=success`;
|
|
2452
2451
|
const cancelUrl = `${origin}/?settings=usage&credit=canceled`;
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
}
|
|
2458
|
-
if (autoRecharge
|
|
2452
|
+
if (options.autoRecharge !== true && (options.autoRechargeThreshold !== void 0 || options.autoRechargeAmount !== void 0)) {
|
|
2453
|
+
throw new Error(
|
|
2454
|
+
"--auto-recharge-threshold and --auto-recharge-amount require --auto-recharge"
|
|
2455
|
+
);
|
|
2456
|
+
}
|
|
2457
|
+
if (options.autoRecharge === true && (options.autoRechargeThreshold === void 0 || options.autoRechargeAmount === void 0)) {
|
|
2459
2458
|
throw new Error(
|
|
2460
2459
|
"--auto-recharge requires --auto-recharge-threshold and --auto-recharge-amount"
|
|
2461
2460
|
);
|
|
2462
2461
|
}
|
|
2462
|
+
const autoRecharge = options.autoRecharge === true ? {
|
|
2463
|
+
enabled: true,
|
|
2464
|
+
threshold: options.autoRechargeThreshold,
|
|
2465
|
+
amount: options.autoRechargeAmount
|
|
2466
|
+
} : void 0;
|
|
2463
2467
|
const result = await createZeroCreditCheckout({
|
|
2464
2468
|
credits,
|
|
2465
2469
|
successUrl,
|
|
@@ -9886,7 +9890,7 @@ function toGenerationTarget(value) {
|
|
|
9886
9890
|
}
|
|
9887
9891
|
return value;
|
|
9888
9892
|
}
|
|
9889
|
-
function selectResourceCandidates() {
|
|
9893
|
+
function selectResourceCandidates(target) {
|
|
9890
9894
|
return {
|
|
9891
9895
|
registryVersion: RESOURCE_REGISTRY_VERSION,
|
|
9892
9896
|
source: {
|
|
@@ -9905,7 +9909,7 @@ function selectResourceCandidates() {
|
|
|
9905
9909
|
],
|
|
9906
9910
|
candidates: {
|
|
9907
9911
|
skills: filterByKind("skill"),
|
|
9908
|
-
templates:
|
|
9912
|
+
templates: listTemplates(target),
|
|
9909
9913
|
designSystems: filterByKind("design-system"),
|
|
9910
9914
|
imageStyles: filterByKind("image-style"),
|
|
9911
9915
|
audioStyles: filterByKind("audio-style"),
|
|
@@ -11025,11 +11029,11 @@ function outputDirForSite(site) {
|
|
|
11025
11029
|
return `./generated/mockups/${site}`;
|
|
11026
11030
|
}
|
|
11027
11031
|
function createHtmlArtifactAuthoringPacket(options) {
|
|
11028
|
-
const site = options.
|
|
11032
|
+
const site = options.siteSlug ?? slugify(options.slugSource ?? options.prompt);
|
|
11029
11033
|
const outputDir2 = outputDirForSite(site);
|
|
11030
11034
|
const hostCommand = `zero host ${outputDir2} --site ${site}${options.kind === "website" ? " --spa" : ""}`;
|
|
11031
11035
|
const title = titleForKind(options.kind);
|
|
11032
|
-
const candidateSlice = selectResourceCandidates();
|
|
11036
|
+
const candidateSlice = selectResourceCandidates(options.kind);
|
|
11033
11037
|
const selectionSchema = {
|
|
11034
11038
|
skills: "string[]",
|
|
11035
11039
|
template: "string",
|
|
@@ -11212,7 +11216,7 @@ function createArtifactGenerateCommand(config) {
|
|
|
11212
11216
|
).option(
|
|
11213
11217
|
"--all",
|
|
11214
11218
|
"When listing providers (no --prompt given), include unavailable or not-yet-authorized connectors"
|
|
11215
|
-
).option("--site <slug>", "Hosted site slug
|
|
11219
|
+
).option("--site-slug <slug>", "Hosted site slug override").option("--title <text>", "Requested artifact title or name").option(
|
|
11216
11220
|
"--design-system <id>",
|
|
11217
11221
|
"Design system id from the registry (see Design Systems below). Accepts either 'apple' or 'design-system:apple'."
|
|
11218
11222
|
).option(
|
|
@@ -11288,7 +11292,7 @@ ${formatRegistryListing(templates, `${config.target} templates`)}`;
|
|
|
11288
11292
|
kind: toGenerationTarget(config.target),
|
|
11289
11293
|
prompt,
|
|
11290
11294
|
slugSource: options.title,
|
|
11291
|
-
|
|
11295
|
+
siteSlug: options.siteSlug,
|
|
11292
11296
|
details: [...config.details(options), ...extraDetails],
|
|
11293
11297
|
artifactRules: config.artifactRules
|
|
11294
11298
|
});
|
|
@@ -11306,8 +11310,7 @@ function standardDetails(kind) {
|
|
|
11306
11310
|
return (options) => {
|
|
11307
11311
|
return [
|
|
11308
11312
|
`Artifact kind: ${kind}`,
|
|
11309
|
-
`Requested title/name: ${options.title ?? "not specified"}
|
|
11310
|
-
`Audience: ${options.audience ?? "not specified"}`
|
|
11313
|
+
`Requested title/name: ${options.title ?? "not specified"}`
|
|
11311
11314
|
];
|
|
11312
11315
|
};
|
|
11313
11316
|
}
|
|
@@ -11318,7 +11321,7 @@ var reportCommand = createArtifactGenerateCommand({
|
|
|
11318
11321
|
description: "Generate an HTML report from a prompt",
|
|
11319
11322
|
usageCommand: "zero generate report",
|
|
11320
11323
|
examples: ` Generate report: zero generate report --prompt "A Q2 usage report for the API team"
|
|
11321
|
-
Stable hosted slug: zero generate report --site api-usage-q2 --prompt "A Q2 usage report"
|
|
11324
|
+
Stable hosted slug: zero generate report --site-slug api-usage-q2 --prompt "A Q2 usage report"
|
|
11322
11325
|
List providers: zero generate report`,
|
|
11323
11326
|
details: standardDetails("report"),
|
|
11324
11327
|
artifactRules: [
|
|
@@ -11335,7 +11338,7 @@ var docsDesignCommand = createArtifactGenerateCommand({
|
|
|
11335
11338
|
description: "Generate a documentation design from a prompt",
|
|
11336
11339
|
usageCommand: "zero generate docs-design",
|
|
11337
11340
|
examples: ` Generate docs design: zero generate docs-design --prompt "Docs for adding artifact targets"
|
|
11338
|
-
Stable hosted slug: zero generate docs-design --site artifact-target-docs --prompt "Artifact target docs"
|
|
11341
|
+
Stable hosted slug: zero generate docs-design --site-slug artifact-target-docs --prompt "Artifact target docs"
|
|
11339
11342
|
List providers: zero generate docs-design`,
|
|
11340
11343
|
details: standardDetails("docs-design"),
|
|
11341
11344
|
artifactRules: [
|
|
@@ -11352,7 +11355,7 @@ var posterCommand = createArtifactGenerateCommand({
|
|
|
11352
11355
|
description: "Generate an HTML poster from a prompt",
|
|
11353
11356
|
usageCommand: "zero generate poster",
|
|
11354
11357
|
examples: ` Generate poster: zero generate poster --prompt "A launch poster for artifact targets"
|
|
11355
|
-
Stable hosted slug: zero generate poster --site artifact-poster --prompt "A launch poster"
|
|
11358
|
+
Stable hosted slug: zero generate poster --site-slug artifact-poster --prompt "A launch poster"
|
|
11356
11359
|
List providers: zero generate poster`,
|
|
11357
11360
|
details: standardDetails("poster"),
|
|
11358
11361
|
artifactRules: [
|
|
@@ -11369,7 +11372,7 @@ var dashboardDesignCommand = createArtifactGenerateCommand({
|
|
|
11369
11372
|
description: "Generate a dashboard design from a prompt",
|
|
11370
11373
|
usageCommand: "zero generate dashboard-design",
|
|
11371
11374
|
examples: ` Generate dash design: zero generate dashboard-design --prompt "An ops dashboard for generation runs"
|
|
11372
|
-
Stable hosted slug: zero generate dashboard-design --site generation-ops --prompt "A generation ops dashboard"
|
|
11375
|
+
Stable hosted slug: zero generate dashboard-design --site-slug generation-ops --prompt "A generation ops dashboard"
|
|
11373
11376
|
List providers: zero generate dashboard-design`,
|
|
11374
11377
|
details: standardDetails("dashboard-design"),
|
|
11375
11378
|
artifactRules: [
|
|
@@ -11386,7 +11389,7 @@ var mobileAppDesignCommand = createArtifactGenerateCommand({
|
|
|
11386
11389
|
description: "Generate a mobile app design prototype from a prompt",
|
|
11387
11390
|
usageCommand: "zero generate mobile-app-design",
|
|
11388
11391
|
examples: ` Generate mobile UI: zero generate mobile-app-design --prompt "A mobile review screen for generation artifacts"
|
|
11389
|
-
Stable hosted slug: zero generate mobile-app-design --site generation-mobile-review --prompt "A mobile review screen"
|
|
11392
|
+
Stable hosted slug: zero generate mobile-app-design --site-slug generation-mobile-review --prompt "A mobile review screen"
|
|
11390
11393
|
List providers: zero generate mobile-app-design`,
|
|
11391
11394
|
details: standardDetails("mobile-app-design"),
|
|
11392
11395
|
artifactRules: [
|
|
@@ -11459,7 +11462,7 @@ function createPresentationGenerateCommand(config) {
|
|
|
11459
11462
|
).option(
|
|
11460
11463
|
"--all",
|
|
11461
11464
|
"When listing providers (no --prompt given), include unavailable or not-yet-authorized connectors"
|
|
11462
|
-
).option("--
|
|
11465
|
+
).option("--slides <count>", "Slide count: 4-20", parseSlideCount, 8).option(
|
|
11463
11466
|
"--images <count>",
|
|
11464
11467
|
`Generated image count: 0-${PRESENTATION_MAX_IMAGES}`,
|
|
11465
11468
|
parseImageCount,
|
|
@@ -11467,10 +11470,7 @@ function createPresentationGenerateCommand(config) {
|
|
|
11467
11470
|
).option(
|
|
11468
11471
|
"--image-model <model>",
|
|
11469
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"
|
|
11470
|
-
).option(
|
|
11471
|
-
"--theme <theme>",
|
|
11472
|
-
"Theme: editorial supports ink, coral, forest; swiss supports ikb, lemon, lime, mono"
|
|
11473
|
-
).option("--audience <text>", "Audience context").option("--title <text>", "Requested deck title").option(
|
|
11473
|
+
).option("--title <text>", "Requested deck title").option("--site-slug <slug>", "Hosted site slug override").option(
|
|
11474
11474
|
"--design-system <id>",
|
|
11475
11475
|
"Design system id from the registry (see Design Systems below). Accepts either 'apple' or 'design-system:apple'."
|
|
11476
11476
|
).option(
|
|
@@ -11541,13 +11541,11 @@ ${formatRegistryListing(templates, "presentation templates")}`;
|
|
|
11541
11541
|
kind: "presentation",
|
|
11542
11542
|
prompt,
|
|
11543
11543
|
slugSource: options.title,
|
|
11544
|
+
siteSlug: options.siteSlug,
|
|
11544
11545
|
details: [
|
|
11545
|
-
`Style: ${options.style}`,
|
|
11546
11546
|
`Slide count: ${options.slides}`,
|
|
11547
11547
|
`Suggested generated visual count: ${options.images}`,
|
|
11548
11548
|
`Image model preference if visuals are generated separately: ${options.imageModel ?? "default"}`,
|
|
11549
|
-
`Theme: ${options.theme ?? "agent decides from style"}`,
|
|
11550
|
-
`Audience: ${options.audience ?? "not specified"}`,
|
|
11551
11549
|
`Requested deck title: ${options.title ?? "not specified"}`,
|
|
11552
11550
|
`Selected design system: ${resolvedDesignSystem ? `${resolvedDesignSystem.id} (${resolvedDesignSystem.name})` : "agent decides"}`,
|
|
11553
11551
|
`Selected template: ${resolvedTemplate ? `${resolvedTemplate.id} (${resolvedTemplate.name})` : "agent decides"}`
|
|
@@ -11576,8 +11574,8 @@ var presentationCommand = createPresentationGenerateCommand({
|
|
|
11576
11574
|
usageCommand: "zero generate presentation",
|
|
11577
11575
|
examples: ` Generate deck: zero generate presentation --prompt "A strategy deck for reducing support volume"
|
|
11578
11576
|
Pipe prompt: cat brief.txt | zero generate presentation
|
|
11579
|
-
|
|
11580
|
-
|
|
11577
|
+
Generated visuals: zero generate presentation --slides 10 --images 8 --image-model gpt-image-1.5 --prompt "A product launch narrative"
|
|
11578
|
+
Stable hosted slug: zero generate presentation --site-slug api-migration-plan --prompt "API migration plan"
|
|
11581
11579
|
List providers: zero generate presentation`
|
|
11582
11580
|
});
|
|
11583
11581
|
|
|
@@ -11902,20 +11900,9 @@ var videoCommand = createVideoGenerateCommand({
|
|
|
11902
11900
|
|
|
11903
11901
|
// src/commands/zero/generate/website.ts
|
|
11904
11902
|
init_esm_shims();
|
|
11905
|
-
var WEBSITE_TEMPLATE_DIRECTIONS = ["auto", "launch", "profile"];
|
|
11906
11903
|
var WEBSITE_MAX_IMAGES = 3;
|
|
11907
11904
|
var WEBSITE_TARGET = "website";
|
|
11908
11905
|
var WEBSITE_USAGE_COMMAND = "zero generate website";
|
|
11909
|
-
function parseTemplateDirection(value) {
|
|
11910
|
-
if (WEBSITE_TEMPLATE_DIRECTIONS.some((direction) => {
|
|
11911
|
-
return direction === value;
|
|
11912
|
-
})) {
|
|
11913
|
-
return value;
|
|
11914
|
-
}
|
|
11915
|
-
throw new InvalidArgumentError(
|
|
11916
|
-
"template-direction must be auto, launch, or profile"
|
|
11917
|
-
);
|
|
11918
|
-
}
|
|
11919
11906
|
function parseImageCount2(value) {
|
|
11920
11907
|
const imageCount = Number(value);
|
|
11921
11908
|
if (!Number.isInteger(imageCount)) {
|
|
@@ -11960,11 +11947,6 @@ var websiteCommand = new Command().name("website").description("Prepare website
|
|
|
11960
11947
|
).option(
|
|
11961
11948
|
"--all",
|
|
11962
11949
|
"When listing providers (no --prompt given), include unavailable or not-yet-authorized connectors"
|
|
11963
|
-
).option(
|
|
11964
|
-
"--template-direction <direction>",
|
|
11965
|
-
"High-level website direction: auto, launch, or profile",
|
|
11966
|
-
parseTemplateDirection,
|
|
11967
|
-
"auto"
|
|
11968
11950
|
).option(
|
|
11969
11951
|
"--template <id>",
|
|
11970
11952
|
"Template id from the registry, scoped to website (see Templates below). Accepts either short id or full 'template:<id>'."
|
|
@@ -11979,16 +11961,15 @@ var websiteCommand = new Command().name("website").description("Prepare website
|
|
|
11979
11961
|
).option(
|
|
11980
11962
|
"--image-model <model>",
|
|
11981
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"
|
|
11982
|
-
).option("--site <slug>", "Hosted site slug
|
|
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", () => {
|
|
11983
11965
|
const designSystems = listDesignSystems();
|
|
11984
11966
|
const templates = listTemplates(WEBSITE_TARGET);
|
|
11985
11967
|
return `
|
|
11986
11968
|
Examples:
|
|
11987
11969
|
Generate site: zero generate website --prompt "A launch site for a developer observability tool"
|
|
11988
|
-
Pick direction: zero generate website --template-direction profile --images 2 --image-model gpt-image-1.5 --prompt "Portfolio for a robotics photographer"
|
|
11989
11970
|
Pick template: zero generate website --template saas-landing --prompt "Launch site for a billing API"
|
|
11990
11971
|
Pick design system: zero generate website --design-system stripe --prompt "Pricing page for a SaaS"
|
|
11991
|
-
Stable hosted slug: zero generate website --site api-migration-demo --prompt "An internal migration microsite"
|
|
11972
|
+
Stable hosted slug: zero generate website --site-slug api-migration-demo --prompt "An internal migration microsite"
|
|
11992
11973
|
Pipe prompt: cat brief.txt | zero generate website
|
|
11993
11974
|
List providers: zero generate website
|
|
11994
11975
|
|
|
@@ -12041,13 +12022,11 @@ ${formatRegistryListing(templates, "website templates")}`;
|
|
|
12041
12022
|
kind: "website",
|
|
12042
12023
|
prompt,
|
|
12043
12024
|
slugSource: options.title,
|
|
12044
|
-
|
|
12025
|
+
siteSlug: options.siteSlug,
|
|
12045
12026
|
details: [
|
|
12046
|
-
`Template direction: ${options.templateDirection}`,
|
|
12047
12027
|
`Suggested generated visual count: ${options.images}`,
|
|
12048
12028
|
`Image model preference if visuals are generated separately: ${options.imageModel ?? "default"}`,
|
|
12049
12029
|
`Requested title/site name: ${options.title ?? "not specified"}`,
|
|
12050
|
-
`Audience: ${options.audience ?? "not specified"}`,
|
|
12051
12030
|
`Selected design system: ${resolvedDesignSystem ? `${resolvedDesignSystem.id} (${resolvedDesignSystem.name})` : "agent decides"}`,
|
|
12052
12031
|
`Selected template: ${resolvedTemplate ? `${resolvedTemplate.id} (${resolvedTemplate.name})` : "agent decides"}`
|
|
12053
12032
|
],
|
|
@@ -12200,9 +12179,7 @@ function buildGenerateHelpText() {
|
|
|
12200
12179
|
' Generate report: zero generate report --prompt "A Q2 usage report"',
|
|
12201
12180
|
' Generate docs: zero generate docs-design --prompt "A setup guide"',
|
|
12202
12181
|
' Generate video: zero generate video --prompt "A cinematic city shot"',
|
|
12203
|
-
|
|
12204
|
-
' Generate site: zero generate website --prompt "A launch site"'
|
|
12205
|
-
] : [],
|
|
12182
|
+
' Generate site: zero generate website --prompt "A launch site"',
|
|
12206
12183
|
' Generate speech: zero generate voice --prompt "Hello"',
|
|
12207
12184
|
"",
|
|
12208
12185
|
" List image providers: zero generate image",
|
|
@@ -12220,10 +12197,7 @@ Notes:
|
|
|
12220
12197
|
}
|
|
12221
12198
|
var generateCommand = new Command().name("generate").description(
|
|
12222
12199
|
"Generate assets via vm0's built-in pipelines or get connector skill-invocation guidance"
|
|
12223
|
-
).addCommand(imageCommand).addCommand(presentationCommand).addCommand(reportCommand).addCommand(docsDesignCommand).addCommand(posterCommand).addCommand(dashboardDesignCommand).addCommand(mobileAppDesignCommand).addCommand(videoCommand).addCommand(
|
|
12224
|
-
websiteCommand,
|
|
12225
|
-
zeroTokenAllowsFeatureSwitch("hostedSites" /* HostedSites */) ? {} : { hidden: true }
|
|
12226
|
-
).addCommand(voiceCommand).addCommand(audioCommand).addCommand(textCommand).addCommand(codeCommand).addCommand(documentCommand).addHelpText("after", buildGenerateHelpText);
|
|
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);
|
|
12227
12201
|
|
|
12228
12202
|
// src/commands/zero/web/index.ts
|
|
12229
12203
|
init_esm_shims();
|
|
@@ -12948,7 +12922,7 @@ var COMMAND_CAPABILITY_MAP = {
|
|
|
12948
12922
|
run: "agent-run:write",
|
|
12949
12923
|
schedule: "schedule:read",
|
|
12950
12924
|
doctor: null,
|
|
12951
|
-
credit:
|
|
12925
|
+
credit: "billing:write",
|
|
12952
12926
|
model: null,
|
|
12953
12927
|
"model-provider": null,
|
|
12954
12928
|
logs: "agent-run:read",
|
|
@@ -12961,7 +12935,7 @@ var COMMAND_CAPABILITY_MAP = {
|
|
|
12961
12935
|
whoami: null,
|
|
12962
12936
|
"developer-support": null,
|
|
12963
12937
|
"computer-use": "computer-use:write",
|
|
12964
|
-
generate:
|
|
12938
|
+
generate: null,
|
|
12965
12939
|
web: null,
|
|
12966
12940
|
host: "host:write",
|
|
12967
12941
|
maps: "maps:read"
|
|
@@ -12997,9 +12971,6 @@ var DEFAULT_COMMANDS = [
|
|
|
12997
12971
|
];
|
|
12998
12972
|
function shouldHideCommand(name, payload) {
|
|
12999
12973
|
if (!payload) return false;
|
|
13000
|
-
if (name === "generate") {
|
|
13001
|
-
return !payload.capabilities.includes("file:write") && !zeroTokenAllowsFeatureSwitch("hostedSites" /* HostedSites */, payload);
|
|
13002
|
-
}
|
|
13003
12974
|
const requiredCap = COMMAND_CAPABILITY_MAP[name];
|
|
13004
12975
|
if (requiredCap === void 0) return true;
|
|
13005
12976
|
if (requiredCap === null) return false;
|
|
@@ -13013,8 +12984,8 @@ function shouldHideCommand(name, payload) {
|
|
|
13013
12984
|
function buildZeroHelpText(payload = decodeZeroTokenPayload()) {
|
|
13014
12985
|
const examples = [
|
|
13015
12986
|
" Check a connector? zero doctor check-connector --env-name <ENV_NAME>",
|
|
13016
|
-
" Check credits? zero doctor credit",
|
|
13017
|
-
" Buy credits? zero credit 20000",
|
|
12987
|
+
...payload && !payload.capabilities.includes("billing:read") ? [] : [" Check credits? zero doctor credit"],
|
|
12988
|
+
...shouldHideCommand("credit", payload) ? [] : [" Buy credits? zero credit 20000"],
|
|
13018
12989
|
" Send a Slack message? zero slack message send --help",
|
|
13019
12990
|
" Upload GitHub? zero github upload-file --help",
|
|
13020
12991
|
" Download GitHub? zero github download-file --help",
|
|
@@ -13032,7 +13003,7 @@ function buildZeroHelpText(payload = decodeZeroTokenPayload()) {
|
|
|
13032
13003
|
" Manage custom skills? zero skill --help",
|
|
13033
13004
|
" List generators? zero generate --help",
|
|
13034
13005
|
' Generate image? zero generate image --prompt "..."',
|
|
13035
|
-
|
|
13006
|
+
' Generate website? zero generate website --prompt "..."',
|
|
13036
13007
|
' Generate voice? zero generate voice --prompt "..."',
|
|
13037
13008
|
...shouldHideCommand("host", payload) ? [] : [" Host a static site? zero host ./dist --site my-site --spa"],
|
|
13038
13009
|
...shouldHideCommand("maps", payload) ? [] : [
|
|
@@ -13055,7 +13026,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
13055
13026
|
var program = new Command();
|
|
13056
13027
|
program.name("zero").description(
|
|
13057
13028
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
13058
|
-
).version("9.176.
|
|
13029
|
+
).version("9.176.4").addHelpText("after", () => {
|
|
13059
13030
|
return buildZeroHelpText();
|
|
13060
13031
|
});
|
|
13061
13032
|
if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {
|