@vm0/cli 9.138.2 → 9.139.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-5GETKYXH.js → chunk-JAP6YHEP.js} +123 -35
- package/{chunk-5GETKYXH.js.map → chunk-JAP6YHEP.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +59 -4
- package/zero.js.map +1 -1
package/index.js
CHANGED
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
source_default,
|
|
66
66
|
volumeConfigSchema,
|
|
67
67
|
withErrorHandler
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-JAP6YHEP.js";
|
|
69
69
|
import {
|
|
70
70
|
__toESM,
|
|
71
71
|
init_esm_shims
|
|
@@ -398,7 +398,7 @@ function getConfigPath() {
|
|
|
398
398
|
return join(homedir(), ".vm0", "config.json");
|
|
399
399
|
}
|
|
400
400
|
var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
|
|
401
|
-
console.log(source_default.bold(`VM0 CLI v${"9.
|
|
401
|
+
console.log(source_default.bold(`VM0 CLI v${"9.139.0"}`));
|
|
402
402
|
console.log();
|
|
403
403
|
const config = await loadConfig();
|
|
404
404
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -4291,7 +4291,7 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
4291
4291
|
options.autoUpdate = false;
|
|
4292
4292
|
}
|
|
4293
4293
|
if (options.autoUpdate !== false) {
|
|
4294
|
-
await startSilentUpgrade("9.
|
|
4294
|
+
await startSilentUpgrade("9.139.0");
|
|
4295
4295
|
}
|
|
4296
4296
|
try {
|
|
4297
4297
|
let result;
|
|
@@ -4383,7 +4383,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4383
4383
|
withErrorHandler(
|
|
4384
4384
|
async (identifier, prompt, options) => {
|
|
4385
4385
|
if (options.autoUpdate !== false) {
|
|
4386
|
-
await startSilentUpgrade("9.
|
|
4386
|
+
await startSilentUpgrade("9.139.0");
|
|
4387
4387
|
}
|
|
4388
4388
|
const { name, version } = parseIdentifier(identifier);
|
|
4389
4389
|
let composeId;
|
|
@@ -6170,13 +6170,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6170
6170
|
if (latestVersion === null) {
|
|
6171
6171
|
throw new Error("Could not check for updates. Please try again later.");
|
|
6172
6172
|
}
|
|
6173
|
-
if (latestVersion === "9.
|
|
6174
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.
|
|
6173
|
+
if (latestVersion === "9.139.0") {
|
|
6174
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.139.0"})`));
|
|
6175
6175
|
return;
|
|
6176
6176
|
}
|
|
6177
6177
|
console.log(
|
|
6178
6178
|
source_default.yellow(
|
|
6179
|
-
`Current version: ${"9.
|
|
6179
|
+
`Current version: ${"9.139.0"} -> Latest version: ${latestVersion}`
|
|
6180
6180
|
)
|
|
6181
6181
|
);
|
|
6182
6182
|
console.log();
|
|
@@ -6203,7 +6203,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6203
6203
|
const success = await performUpgrade(packageManager);
|
|
6204
6204
|
if (success) {
|
|
6205
6205
|
console.log(
|
|
6206
|
-
source_default.green(`\u2713 Upgraded from ${"9.
|
|
6206
|
+
source_default.green(`\u2713 Upgraded from ${"9.139.0"} to ${latestVersion}`)
|
|
6207
6207
|
);
|
|
6208
6208
|
return;
|
|
6209
6209
|
}
|
|
@@ -6270,7 +6270,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
6270
6270
|
|
|
6271
6271
|
// src/index.ts
|
|
6272
6272
|
var program = new Command();
|
|
6273
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
6273
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.139.0");
|
|
6274
6274
|
program.addCommand(authCommand);
|
|
6275
6275
|
program.addCommand(infoCommand);
|
|
6276
6276
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
enableZeroSchedule,
|
|
36
36
|
extractSecretNamesFromApis,
|
|
37
37
|
findMatchingPermissions,
|
|
38
|
+
generateWebVoice,
|
|
38
39
|
getActiveOrg,
|
|
39
40
|
getApiUrl,
|
|
40
41
|
getAuthMethodsForType,
|
|
@@ -126,7 +127,7 @@ import {
|
|
|
126
127
|
upsertZeroOrgModelProvider,
|
|
127
128
|
withErrorHandler,
|
|
128
129
|
zeroAgentCustomSkillNameSchema
|
|
129
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-JAP6YHEP.js";
|
|
130
131
|
import {
|
|
131
132
|
__toESM,
|
|
132
133
|
init_esm_shims
|
|
@@ -6892,13 +6893,67 @@ Notes:
|
|
|
6892
6893
|
)
|
|
6893
6894
|
);
|
|
6894
6895
|
|
|
6896
|
+
// src/commands/zero/web/voice.ts
|
|
6897
|
+
init_esm_shims();
|
|
6898
|
+
import { readFileSync as readFileSync10 } from "fs";
|
|
6899
|
+
function readText(options) {
|
|
6900
|
+
if (options.text?.trim()) {
|
|
6901
|
+
return options.text.trim();
|
|
6902
|
+
}
|
|
6903
|
+
if (process.stdin.isTTY === false) {
|
|
6904
|
+
const text = readFileSync10("/dev/stdin", "utf8").trim();
|
|
6905
|
+
if (text.length > 0) {
|
|
6906
|
+
return text;
|
|
6907
|
+
}
|
|
6908
|
+
}
|
|
6909
|
+
throw new Error("--text is required", {
|
|
6910
|
+
cause: new Error('Usage: zero web voice --text "Hello"')
|
|
6911
|
+
});
|
|
6912
|
+
}
|
|
6913
|
+
var voiceCommand = new Command().name("voice").description("Generate a billed speech audio file from text").option("--text <text>", "Text to speak; can also be piped via stdin").option("--voice <voice>", "OpenAI voice to use", "marin").option("--instructions <text>", "Voice style instructions").option("--json", "Print metadata as JSON").addHelpText(
|
|
6914
|
+
"after",
|
|
6915
|
+
`
|
|
6916
|
+
Examples:
|
|
6917
|
+
Generate speech: zero web voice --text "Hello from vm0"
|
|
6918
|
+
Pipe text: cat script.txt | zero web voice
|
|
6919
|
+
Pick a voice: zero web voice --text "Ship it" --voice cedar
|
|
6920
|
+
|
|
6921
|
+
Output:
|
|
6922
|
+
Prints the generated /f/ audio file URL and metadata
|
|
6923
|
+
|
|
6924
|
+
Notes:
|
|
6925
|
+
- Authenticates via ZERO_TOKEN (requires file:write capability)
|
|
6926
|
+
- Charges org credits after successful audio generation
|
|
6927
|
+
- Uses gpt-4o-mini-tts with WAV output`
|
|
6928
|
+
).action(
|
|
6929
|
+
withErrorHandler(async (options) => {
|
|
6930
|
+
const text = readText(options);
|
|
6931
|
+
const result = await generateWebVoice({
|
|
6932
|
+
text,
|
|
6933
|
+
voice: options.voice,
|
|
6934
|
+
instructions: options.instructions
|
|
6935
|
+
});
|
|
6936
|
+
if (options.json) {
|
|
6937
|
+
console.log(JSON.stringify(result));
|
|
6938
|
+
return;
|
|
6939
|
+
}
|
|
6940
|
+
console.log(source_default.green(`\u2713 Voice generated: ${result.url}`));
|
|
6941
|
+
console.log(source_default.dim(` File: ${result.filename}`));
|
|
6942
|
+
console.log(source_default.dim(` Duration: ${result.durationSeconds}s`));
|
|
6943
|
+
console.log(source_default.dim(` Credits charged: ${result.creditsCharged}`));
|
|
6944
|
+
console.log(source_default.dim(` Model: ${result.model}`));
|
|
6945
|
+
console.log(source_default.dim(` Voice: ${result.voice}`));
|
|
6946
|
+
})
|
|
6947
|
+
);
|
|
6948
|
+
|
|
6895
6949
|
// src/commands/zero/web/index.ts
|
|
6896
|
-
var zeroWebCommand = new Command().name("web").description("Upload and
|
|
6950
|
+
var zeroWebCommand = new Command().name("web").description("Upload, download, and generate files via the web chat endpoint").addCommand(downloadFileCommand3).addCommand(voiceCommand).addCommand(uploadFileCommand3).addHelpText(
|
|
6897
6951
|
"after",
|
|
6898
6952
|
`
|
|
6899
6953
|
Examples:
|
|
6900
6954
|
Upload a file: zero web upload-file -f /tmp/report.pdf
|
|
6901
|
-
Download a file: zero web download-file <file-id> -o /tmp/out.pdf
|
|
6955
|
+
Download a file: zero web download-file <file-id> -o /tmp/out.pdf
|
|
6956
|
+
Generate speech: zero web voice --text "Hello"`
|
|
6902
6957
|
);
|
|
6903
6958
|
|
|
6904
6959
|
// src/zero.ts
|
|
@@ -6963,7 +7018,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
6963
7018
|
var program = new Command();
|
|
6964
7019
|
program.name("zero").description(
|
|
6965
7020
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
6966
|
-
).version("9.
|
|
7021
|
+
).version("9.139.0").addHelpText(
|
|
6967
7022
|
"after",
|
|
6968
7023
|
`
|
|
6969
7024
|
Examples:
|