@vm0/cli 9.150.7 → 9.150.8
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-VKCZANPE.js → chunk-KNOQ5PTH.js} +533 -238
- package/{chunk-VKCZANPE.js.map → chunk-KNOQ5PTH.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +124 -9
- package/zero.js.map +1 -1
package/index.js
CHANGED
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
source_default,
|
|
69
69
|
volumeConfigSchema,
|
|
70
70
|
withErrorHandler
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-KNOQ5PTH.js";
|
|
72
72
|
import {
|
|
73
73
|
__toESM,
|
|
74
74
|
init_esm_shims
|
|
@@ -387,7 +387,7 @@ function getConfigPath() {
|
|
|
387
387
|
return join(os.homedir(), ".vm0", "config.json");
|
|
388
388
|
}
|
|
389
389
|
var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
|
|
390
|
-
console.log(source_default.bold(`VM0 CLI v${"9.150.
|
|
390
|
+
console.log(source_default.bold(`VM0 CLI v${"9.150.8"}`));
|
|
391
391
|
console.log();
|
|
392
392
|
const config = await loadConfig();
|
|
393
393
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -4280,7 +4280,7 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
4280
4280
|
options.autoUpdate = false;
|
|
4281
4281
|
}
|
|
4282
4282
|
if (options.autoUpdate !== false) {
|
|
4283
|
-
await startSilentUpgrade("9.150.
|
|
4283
|
+
await startSilentUpgrade("9.150.8");
|
|
4284
4284
|
}
|
|
4285
4285
|
try {
|
|
4286
4286
|
let result;
|
|
@@ -4372,7 +4372,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4372
4372
|
withErrorHandler(
|
|
4373
4373
|
async (identifier, prompt, options) => {
|
|
4374
4374
|
if (options.autoUpdate !== false) {
|
|
4375
|
-
await startSilentUpgrade("9.150.
|
|
4375
|
+
await startSilentUpgrade("9.150.8");
|
|
4376
4376
|
}
|
|
4377
4377
|
const { name, version } = parseIdentifier(identifier);
|
|
4378
4378
|
let composeId;
|
|
@@ -6165,13 +6165,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6165
6165
|
if (latestVersion === null) {
|
|
6166
6166
|
throw new Error("Could not check for updates. Please try again later.");
|
|
6167
6167
|
}
|
|
6168
|
-
if (latestVersion === "9.150.
|
|
6169
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.150.
|
|
6168
|
+
if (latestVersion === "9.150.8") {
|
|
6169
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.150.8"})`));
|
|
6170
6170
|
return;
|
|
6171
6171
|
}
|
|
6172
6172
|
console.log(
|
|
6173
6173
|
source_default.yellow(
|
|
6174
|
-
`Current version: ${"9.150.
|
|
6174
|
+
`Current version: ${"9.150.8"} -> Latest version: ${latestVersion}`
|
|
6175
6175
|
)
|
|
6176
6176
|
);
|
|
6177
6177
|
console.log();
|
|
@@ -6198,7 +6198,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6198
6198
|
const success = await performUpgrade(packageManager);
|
|
6199
6199
|
if (success) {
|
|
6200
6200
|
console.log(
|
|
6201
|
-
source_default.green(`\u2713 Upgraded from ${"9.150.
|
|
6201
|
+
source_default.green(`\u2713 Upgraded from ${"9.150.8"} to ${latestVersion}`)
|
|
6202
6202
|
);
|
|
6203
6203
|
return;
|
|
6204
6204
|
}
|
|
@@ -6265,7 +6265,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
6265
6265
|
|
|
6266
6266
|
// src/index.ts
|
|
6267
6267
|
var program = new Command();
|
|
6268
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.150.
|
|
6268
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.150.8");
|
|
6269
6269
|
program.addCommand(authCommand);
|
|
6270
6270
|
program.addCommand(infoCommand);
|
|
6271
6271
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
extractSecretNamesFromApis,
|
|
40
40
|
findMatchingPermissions,
|
|
41
41
|
generateWebImage,
|
|
42
|
+
generateWebPresentation,
|
|
42
43
|
generateWebVideo,
|
|
43
44
|
generateWebVoice,
|
|
44
45
|
getActiveOrg,
|
|
@@ -129,7 +130,7 @@ import {
|
|
|
129
130
|
withErrorHandler,
|
|
130
131
|
zeroAgentCustomSkillNameSchema,
|
|
131
132
|
zeroRemoteAgentCommand
|
|
132
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-KNOQ5PTH.js";
|
|
133
134
|
import {
|
|
134
135
|
__toESM,
|
|
135
136
|
init_esm_shims
|
|
@@ -2539,6 +2540,14 @@ var BUILT_IN_GENERATION_PROVIDERS = {
|
|
|
2539
2540
|
reason: "available without connector setup"
|
|
2540
2541
|
}
|
|
2541
2542
|
],
|
|
2543
|
+
presentation: [
|
|
2544
|
+
{
|
|
2545
|
+
label: "Built-in",
|
|
2546
|
+
model: "gpt-5.5",
|
|
2547
|
+
command: "zero built-in generate presentation -h",
|
|
2548
|
+
reason: "available without connector setup"
|
|
2549
|
+
}
|
|
2550
|
+
],
|
|
2542
2551
|
video: [
|
|
2543
2552
|
{
|
|
2544
2553
|
label: "Built-in",
|
|
@@ -7298,12 +7307,116 @@ var imageCommand = createImageGenerateCommand({
|
|
|
7298
7307
|
Pick size/quality: zero built-in generate image --prompt "A poster" --size 1024x1536 --quality high`
|
|
7299
7308
|
});
|
|
7300
7309
|
|
|
7310
|
+
// src/commands/zero/built-in/generate/presentation.ts
|
|
7311
|
+
init_esm_shims();
|
|
7312
|
+
|
|
7313
|
+
// src/commands/zero/shared/presentation-generate.ts
|
|
7314
|
+
init_esm_shims();
|
|
7315
|
+
import { readFileSync as readFileSync13 } from "fs";
|
|
7316
|
+
function parseSlideCount(value) {
|
|
7317
|
+
const slideCount = Number(value);
|
|
7318
|
+
if (!Number.isInteger(slideCount)) {
|
|
7319
|
+
throw new InvalidArgumentError("slides must be an integer");
|
|
7320
|
+
}
|
|
7321
|
+
return slideCount;
|
|
7322
|
+
}
|
|
7323
|
+
function parseImageCount(value) {
|
|
7324
|
+
const imageCount = Number(value);
|
|
7325
|
+
if (!Number.isInteger(imageCount)) {
|
|
7326
|
+
throw new InvalidArgumentError("images must be an integer");
|
|
7327
|
+
}
|
|
7328
|
+
return imageCount;
|
|
7329
|
+
}
|
|
7330
|
+
function readPrompt2(options, usageCommand) {
|
|
7331
|
+
if (options.prompt?.trim()) {
|
|
7332
|
+
return options.prompt.trim();
|
|
7333
|
+
}
|
|
7334
|
+
if (process.stdin.isTTY === false) {
|
|
7335
|
+
const prompt = readFileSync13("/dev/stdin", "utf8").trim();
|
|
7336
|
+
if (prompt.length > 0) {
|
|
7337
|
+
return prompt;
|
|
7338
|
+
}
|
|
7339
|
+
}
|
|
7340
|
+
throw new Error("--prompt is required", {
|
|
7341
|
+
cause: new Error(
|
|
7342
|
+
`Usage: ${usageCommand} --prompt "A product roadmap deck"`
|
|
7343
|
+
)
|
|
7344
|
+
});
|
|
7345
|
+
}
|
|
7346
|
+
function createPresentationGenerateCommand(config) {
|
|
7347
|
+
return new Command().name(config.name).description("Generate a billed HTML presentation from a prompt").option(
|
|
7348
|
+
"--prompt <text>",
|
|
7349
|
+
"Presentation prompt; can also be piped via stdin"
|
|
7350
|
+
).option("--style <style>", "Style: editorial or swiss", "editorial").option("--slides <count>", "Slide count: 4-20", parseSlideCount, 8).option(
|
|
7351
|
+
"--images <count>",
|
|
7352
|
+
"Generated image count: 0-8",
|
|
7353
|
+
parseImageCount,
|
|
7354
|
+
2
|
|
7355
|
+
).option(
|
|
7356
|
+
"--theme <theme>",
|
|
7357
|
+
"Theme: editorial supports ink, coral, forest; swiss supports ikb, lemon, lime, mono"
|
|
7358
|
+
).option("--audience <text>", "Audience context").option("--title <text>", "Requested deck title").option("--json", "Print metadata as JSON").addHelpText(
|
|
7359
|
+
"after",
|
|
7360
|
+
`
|
|
7361
|
+
Examples:
|
|
7362
|
+
${config.examples}
|
|
7363
|
+
|
|
7364
|
+
Output:
|
|
7365
|
+
Prints the generated /f/ HTML presentation URL and metadata
|
|
7366
|
+
|
|
7367
|
+
Notes:
|
|
7368
|
+
- Authenticates via ZERO_TOKEN (requires file:write capability)
|
|
7369
|
+
- Charges org credits after successful presentation generation
|
|
7370
|
+
- Uses OpenAI gpt-5.5 through the Responses API`
|
|
7371
|
+
).action(
|
|
7372
|
+
withErrorHandler(async (options) => {
|
|
7373
|
+
const prompt = readPrompt2(options, config.usageCommand);
|
|
7374
|
+
const result = await generateWebPresentation({
|
|
7375
|
+
prompt,
|
|
7376
|
+
style: options.style,
|
|
7377
|
+
slideCount: options.slides,
|
|
7378
|
+
imageCount: options.images,
|
|
7379
|
+
theme: options.theme,
|
|
7380
|
+
audience: options.audience,
|
|
7381
|
+
title: options.title
|
|
7382
|
+
});
|
|
7383
|
+
if (options.json) {
|
|
7384
|
+
console.log(JSON.stringify(result));
|
|
7385
|
+
return;
|
|
7386
|
+
}
|
|
7387
|
+
console.log(source_default.green(`\u2713 Presentation generated: ${result.url}`));
|
|
7388
|
+
console.log(source_default.dim(` File: ${result.filename}`));
|
|
7389
|
+
console.log(source_default.dim(` Title: ${result.title}`));
|
|
7390
|
+
console.log(source_default.dim(` Slides: ${result.slideCount}`));
|
|
7391
|
+
console.log(source_default.dim(` Images: ${result.imageCount}`));
|
|
7392
|
+
console.log(source_default.dim(` Style: ${result.style}`));
|
|
7393
|
+
console.log(source_default.dim(` Theme: ${result.theme}`));
|
|
7394
|
+
console.log(source_default.dim(` Credits charged: ${result.creditsCharged}`));
|
|
7395
|
+
console.log(source_default.dim(` Text credits: ${result.textCreditsCharged}`));
|
|
7396
|
+
console.log(
|
|
7397
|
+
source_default.dim(` Image credits: ${result.imageCreditsCharged}`)
|
|
7398
|
+
);
|
|
7399
|
+
console.log(source_default.dim(` Model: ${result.model}`));
|
|
7400
|
+
})
|
|
7401
|
+
);
|
|
7402
|
+
}
|
|
7403
|
+
|
|
7404
|
+
// src/commands/zero/built-in/generate/presentation.ts
|
|
7405
|
+
var presentationCommand = createPresentationGenerateCommand({
|
|
7406
|
+
name: "presentation",
|
|
7407
|
+
usageCommand: "zero built-in generate presentation",
|
|
7408
|
+
examples: ` Generate deck: zero built-in generate presentation --prompt "A strategy deck for reducing support volume"
|
|
7409
|
+
Pipe prompt: cat brief.txt | zero built-in generate presentation
|
|
7410
|
+
Swiss style: zero built-in generate presentation --style swiss --theme ikb --slides 10 --images 3 --prompt "A product launch narrative"
|
|
7411
|
+
Audience context: zero built-in generate presentation --audience "engineering leadership" --prompt "API migration plan"`
|
|
7412
|
+
});
|
|
7413
|
+
|
|
7301
7414
|
// src/commands/zero/built-in/generate/video.ts
|
|
7302
7415
|
init_esm_shims();
|
|
7303
7416
|
|
|
7304
7417
|
// src/commands/zero/shared/video-generate.ts
|
|
7305
7418
|
init_esm_shims();
|
|
7306
|
-
import { readFileSync as
|
|
7419
|
+
import { readFileSync as readFileSync14 } from "fs";
|
|
7307
7420
|
function parseSeed(value) {
|
|
7308
7421
|
const seed = Number(value);
|
|
7309
7422
|
if (!Number.isInteger(seed) || seed < 0 || !Number.isSafeInteger(seed)) {
|
|
@@ -7311,12 +7424,12 @@ function parseSeed(value) {
|
|
|
7311
7424
|
}
|
|
7312
7425
|
return seed;
|
|
7313
7426
|
}
|
|
7314
|
-
function
|
|
7427
|
+
function readPrompt3(options, usageCommand) {
|
|
7315
7428
|
if (options.prompt?.trim()) {
|
|
7316
7429
|
return options.prompt.trim();
|
|
7317
7430
|
}
|
|
7318
7431
|
if (process.stdin.isTTY === false) {
|
|
7319
|
-
const prompt =
|
|
7432
|
+
const prompt = readFileSync14("/dev/stdin", "utf8").trim();
|
|
7320
7433
|
if (prompt.length > 0) {
|
|
7321
7434
|
return prompt;
|
|
7322
7435
|
}
|
|
@@ -7353,7 +7466,7 @@ Notes:
|
|
|
7353
7466
|
- Uses fal video models with configured usage pricing`
|
|
7354
7467
|
).action(
|
|
7355
7468
|
withErrorHandler(async (options) => {
|
|
7356
|
-
const prompt =
|
|
7469
|
+
const prompt = readPrompt3(options, config.usageCommand);
|
|
7357
7470
|
const result = await generateWebVideo({
|
|
7358
7471
|
prompt,
|
|
7359
7472
|
model: options.model,
|
|
@@ -7400,13 +7513,13 @@ init_esm_shims();
|
|
|
7400
7513
|
|
|
7401
7514
|
// src/commands/zero/shared/voice-generate.ts
|
|
7402
7515
|
init_esm_shims();
|
|
7403
|
-
import { readFileSync as
|
|
7516
|
+
import { readFileSync as readFileSync15 } from "fs";
|
|
7404
7517
|
function readText(options, usageCommand) {
|
|
7405
7518
|
if (options.text?.trim()) {
|
|
7406
7519
|
return options.text.trim();
|
|
7407
7520
|
}
|
|
7408
7521
|
if (process.stdin.isTTY === false) {
|
|
7409
|
-
const text =
|
|
7522
|
+
const text = readFileSync15("/dev/stdin", "utf8").trim();
|
|
7410
7523
|
if (text.length > 0) {
|
|
7411
7524
|
return text;
|
|
7412
7525
|
}
|
|
@@ -7461,11 +7574,12 @@ var voiceCommand = createVoiceGenerateCommand({
|
|
|
7461
7574
|
});
|
|
7462
7575
|
|
|
7463
7576
|
// src/commands/zero/built-in/generate/index.ts
|
|
7464
|
-
var generateCommand2 = new Command().name("generate").description("Generate assets with built-in vm0 services").addCommand(imageCommand).addCommand(videoCommand).addCommand(voiceCommand).addHelpText(
|
|
7577
|
+
var generateCommand2 = new Command().name("generate").description("Generate assets with built-in vm0 services").addCommand(imageCommand).addCommand(presentationCommand).addCommand(videoCommand).addCommand(voiceCommand).addHelpText(
|
|
7465
7578
|
"after",
|
|
7466
7579
|
`
|
|
7467
7580
|
Examples:
|
|
7468
7581
|
Generate image: zero built-in generate image --prompt "A watercolor fox"
|
|
7582
|
+
Generate deck: zero built-in generate presentation --prompt "A product roadmap"
|
|
7469
7583
|
Generate video: zero built-in generate video --prompt "A cinematic city shot"
|
|
7470
7584
|
Generate speech: zero built-in generate voice --text "Hello"`
|
|
7471
7585
|
);
|
|
@@ -7476,6 +7590,7 @@ var zeroBuiltInCommand = new Command().name("built-in").description("Use built-i
|
|
|
7476
7590
|
`
|
|
7477
7591
|
Examples:
|
|
7478
7592
|
Generate image: zero built-in generate image --prompt "A watercolor fox"
|
|
7593
|
+
Generate deck: zero built-in generate presentation --prompt "A product roadmap"
|
|
7479
7594
|
Generate video: zero built-in generate video --prompt "A cinematic city shot"
|
|
7480
7595
|
Generate speech: zero built-in generate voice --text "Hello"`
|
|
7481
7596
|
);
|
|
@@ -7634,7 +7749,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
7634
7749
|
var program = new Command();
|
|
7635
7750
|
program.name("zero").description(
|
|
7636
7751
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
7637
|
-
).version("9.150.
|
|
7752
|
+
).version("9.150.8").addHelpText(
|
|
7638
7753
|
"after",
|
|
7639
7754
|
`
|
|
7640
7755
|
Examples:
|