@vm0/cli 9.109.0 → 9.110.1
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-WJ6BDJIT.js → chunk-2XRAJ4IJ.js} +46 -14
- package/{chunk-WJ6BDJIT.js.map → chunk-2XRAJ4IJ.js.map} +1 -1
- package/index.js +10 -10
- package/package.json +1 -1
- package/zero.js +54 -6
- package/zero.js.map +1 -1
package/index.js
CHANGED
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
source_default,
|
|
71
71
|
volumeConfigSchema,
|
|
72
72
|
withErrorHandler
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-2XRAJ4IJ.js";
|
|
74
74
|
|
|
75
75
|
// src/index.ts
|
|
76
76
|
init_esm_shims();
|
|
@@ -463,7 +463,7 @@ function getConfigPath() {
|
|
|
463
463
|
return join(homedir(), ".vm0", "config.json");
|
|
464
464
|
}
|
|
465
465
|
var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
|
|
466
|
-
console.log(source_default.bold(`VM0 CLI v${"9.
|
|
466
|
+
console.log(source_default.bold(`VM0 CLI v${"9.110.1"}`));
|
|
467
467
|
console.log();
|
|
468
468
|
const config = await loadConfig();
|
|
469
469
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -4492,7 +4492,7 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
4492
4492
|
options.autoUpdate = false;
|
|
4493
4493
|
}
|
|
4494
4494
|
if (options.autoUpdate !== false) {
|
|
4495
|
-
await startSilentUpgrade("9.
|
|
4495
|
+
await startSilentUpgrade("9.110.1");
|
|
4496
4496
|
}
|
|
4497
4497
|
try {
|
|
4498
4498
|
let result;
|
|
@@ -4572,7 +4572,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4572
4572
|
withErrorHandler(
|
|
4573
4573
|
async (identifier, prompt, options) => {
|
|
4574
4574
|
if (options.autoUpdate !== false) {
|
|
4575
|
-
await startSilentUpgrade("9.
|
|
4575
|
+
await startSilentUpgrade("9.110.1");
|
|
4576
4576
|
}
|
|
4577
4577
|
const { name, version } = parseIdentifier(identifier);
|
|
4578
4578
|
let composeId;
|
|
@@ -6313,7 +6313,7 @@ var cookAction = new Command().name("cook").description("Quick start: prepare, c
|
|
|
6313
6313
|
withErrorHandler(
|
|
6314
6314
|
async (prompt, options) => {
|
|
6315
6315
|
if (options.autoUpdate !== false) {
|
|
6316
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
6316
|
+
const shouldExit = await checkAndUpgrade("9.110.1", prompt);
|
|
6317
6317
|
if (shouldExit) {
|
|
6318
6318
|
process.exit(0);
|
|
6319
6319
|
}
|
|
@@ -7080,13 +7080,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
7080
7080
|
if (latestVersion === null) {
|
|
7081
7081
|
throw new Error("Could not check for updates. Please try again later.");
|
|
7082
7082
|
}
|
|
7083
|
-
if (latestVersion === "9.
|
|
7084
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.
|
|
7083
|
+
if (latestVersion === "9.110.1") {
|
|
7084
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.110.1"})`));
|
|
7085
7085
|
return;
|
|
7086
7086
|
}
|
|
7087
7087
|
console.log(
|
|
7088
7088
|
source_default.yellow(
|
|
7089
|
-
`Current version: ${"9.
|
|
7089
|
+
`Current version: ${"9.110.1"} -> Latest version: ${latestVersion}`
|
|
7090
7090
|
)
|
|
7091
7091
|
);
|
|
7092
7092
|
console.log();
|
|
@@ -7113,7 +7113,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
7113
7113
|
const success = await performUpgrade(packageManager);
|
|
7114
7114
|
if (success) {
|
|
7115
7115
|
console.log(
|
|
7116
|
-
source_default.green(`\u2713 Upgraded from ${"9.
|
|
7116
|
+
source_default.green(`\u2713 Upgraded from ${"9.110.1"} to ${latestVersion}`)
|
|
7117
7117
|
);
|
|
7118
7118
|
return;
|
|
7119
7119
|
}
|
|
@@ -7180,7 +7180,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
7180
7180
|
|
|
7181
7181
|
// src/index.ts
|
|
7182
7182
|
var program = new Command();
|
|
7183
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
7183
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.110.1");
|
|
7184
7184
|
program.addCommand(authCommand);
|
|
7185
7185
|
program.addCommand(infoCommand);
|
|
7186
7186
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
upsertZeroOrgModelProvider,
|
|
129
129
|
withErrorHandler,
|
|
130
130
|
zeroAgentCustomSkillNameSchema
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-2XRAJ4IJ.js";
|
|
132
132
|
|
|
133
133
|
// src/zero.ts
|
|
134
134
|
init_esm_shims();
|
|
@@ -5761,12 +5761,22 @@ init_esm_shims();
|
|
|
5761
5761
|
|
|
5762
5762
|
// src/commands/zero/phone/call.ts
|
|
5763
5763
|
init_esm_shims();
|
|
5764
|
+
import * as fs from "fs";
|
|
5765
|
+
function isErrnoException(err) {
|
|
5766
|
+
return err instanceof Error && "code" in err;
|
|
5767
|
+
}
|
|
5764
5768
|
var callCommand = new Command().name("call").description("Initiate an outbound phone call").argument(
|
|
5765
5769
|
"<to-number>",
|
|
5766
5770
|
"Phone number to call (E.164 format, e.g. +14155551234)"
|
|
5767
5771
|
).option("--greeting <message>", "Initial greeting when the recipient answers").option(
|
|
5772
|
+
"--greeting-file <path>",
|
|
5773
|
+
"Read greeting from a file (use instead of --greeting)"
|
|
5774
|
+
).option(
|
|
5768
5775
|
"--system-prompt <prompt>",
|
|
5769
5776
|
"Override the agent's system prompt for this call"
|
|
5777
|
+
).option(
|
|
5778
|
+
"--prompt-file <path>",
|
|
5779
|
+
"Read system prompt from a file (use instead of --system-prompt)"
|
|
5770
5780
|
).action(
|
|
5771
5781
|
withErrorHandler(
|
|
5772
5782
|
async (toNumber, options) => {
|
|
@@ -5778,10 +5788,48 @@ var callCommand = new Command().name("call").description("Initiate an outbound p
|
|
|
5778
5788
|
);
|
|
5779
5789
|
process.exit(1);
|
|
5780
5790
|
}
|
|
5791
|
+
if (options.systemPrompt && options.promptFile) {
|
|
5792
|
+
console.error(
|
|
5793
|
+
source_default.red("Cannot use both --system-prompt and --prompt-file")
|
|
5794
|
+
);
|
|
5795
|
+
process.exit(1);
|
|
5796
|
+
}
|
|
5797
|
+
if (options.greeting && options.greetingFile) {
|
|
5798
|
+
console.error(
|
|
5799
|
+
source_default.red("Cannot use both --greeting and --greeting-file")
|
|
5800
|
+
);
|
|
5801
|
+
process.exit(1);
|
|
5802
|
+
}
|
|
5803
|
+
let systemPrompt = options.systemPrompt;
|
|
5804
|
+
if (options.promptFile) {
|
|
5805
|
+
try {
|
|
5806
|
+
systemPrompt = fs.readFileSync(options.promptFile, "utf-8");
|
|
5807
|
+
} catch (err) {
|
|
5808
|
+
if (isErrnoException(err) && err.code === "ENOENT") {
|
|
5809
|
+
console.error(source_default.red(`File not found: ${options.promptFile}`));
|
|
5810
|
+
process.exit(1);
|
|
5811
|
+
}
|
|
5812
|
+
throw err;
|
|
5813
|
+
}
|
|
5814
|
+
}
|
|
5815
|
+
let greeting = options.greeting;
|
|
5816
|
+
if (options.greetingFile) {
|
|
5817
|
+
try {
|
|
5818
|
+
greeting = fs.readFileSync(options.greetingFile, "utf-8");
|
|
5819
|
+
} catch (err) {
|
|
5820
|
+
if (isErrnoException(err) && err.code === "ENOENT") {
|
|
5821
|
+
console.error(
|
|
5822
|
+
source_default.red(`File not found: ${options.greetingFile}`)
|
|
5823
|
+
);
|
|
5824
|
+
process.exit(1);
|
|
5825
|
+
}
|
|
5826
|
+
throw err;
|
|
5827
|
+
}
|
|
5828
|
+
}
|
|
5781
5829
|
const result = await createPhoneCall({
|
|
5782
5830
|
toNumber,
|
|
5783
|
-
greeting
|
|
5784
|
-
systemPrompt
|
|
5831
|
+
greeting,
|
|
5832
|
+
systemPrompt
|
|
5785
5833
|
});
|
|
5786
5834
|
console.log(source_default.green("Call initiated"));
|
|
5787
5835
|
console.log(` ${"Call ID:".padEnd(12)}${source_default.cyan(result.callId)}`);
|
|
@@ -5905,7 +5953,7 @@ var voiceChatContextGetCommand = new Command().name("get").description("Read sha
|
|
|
5905
5953
|
|
|
5906
5954
|
// src/commands/zero/voice-chat/context/append.ts
|
|
5907
5955
|
init_esm_shims();
|
|
5908
|
-
import { readFileSync as
|
|
5956
|
+
import { readFileSync as readFileSync7 } from "fs";
|
|
5909
5957
|
var voiceChatContextAppendCommand = new Command().name("append").description("Append an event to voice-chat shared context").argument("<session-id>", "Voice-chat session ID").requiredOption(
|
|
5910
5958
|
"--source <source>",
|
|
5911
5959
|
"Event source (system|user|talker|worker)"
|
|
@@ -5923,7 +5971,7 @@ Examples:
|
|
|
5923
5971
|
async (sessionId, options) => {
|
|
5924
5972
|
let content = options.content;
|
|
5925
5973
|
if (!content && process.stdin.isTTY === false) {
|
|
5926
|
-
content =
|
|
5974
|
+
content = readFileSync7("/dev/stdin", "utf8").trim();
|
|
5927
5975
|
}
|
|
5928
5976
|
const data = await appendVoiceChatContextEvent(sessionId, {
|
|
5929
5977
|
source: options.source,
|
|
@@ -6002,7 +6050,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
6002
6050
|
var program = new Command();
|
|
6003
6051
|
program.name("zero").description(
|
|
6004
6052
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
6005
|
-
).version("9.
|
|
6053
|
+
).version("9.110.1").addHelpText(
|
|
6006
6054
|
"after",
|
|
6007
6055
|
`
|
|
6008
6056
|
Examples:
|