@vm0/cli 9.124.1 → 9.124.3
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-MV2U6V7H.js → chunk-ISA6IES3.js} +49 -11
- package/{chunk-MV2U6V7H.js.map → chunk-ISA6IES3.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +53 -34
- 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-ISA6IES3.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.124.
|
|
401
|
+
console.log(source_default.bold(`VM0 CLI v${"9.124.3"}`));
|
|
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.124.
|
|
4294
|
+
await startSilentUpgrade("9.124.3");
|
|
4295
4295
|
}
|
|
4296
4296
|
try {
|
|
4297
4297
|
let result;
|
|
@@ -4381,7 +4381,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4381
4381
|
withErrorHandler(
|
|
4382
4382
|
async (identifier, prompt, options) => {
|
|
4383
4383
|
if (options.autoUpdate !== false) {
|
|
4384
|
-
await startSilentUpgrade("9.124.
|
|
4384
|
+
await startSilentUpgrade("9.124.3");
|
|
4385
4385
|
}
|
|
4386
4386
|
const { name, version } = parseIdentifier(identifier);
|
|
4387
4387
|
let composeId;
|
|
@@ -6393,13 +6393,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6393
6393
|
if (latestVersion === null) {
|
|
6394
6394
|
throw new Error("Could not check for updates. Please try again later.");
|
|
6395
6395
|
}
|
|
6396
|
-
if (latestVersion === "9.124.
|
|
6397
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.124.
|
|
6396
|
+
if (latestVersion === "9.124.3") {
|
|
6397
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.124.3"})`));
|
|
6398
6398
|
return;
|
|
6399
6399
|
}
|
|
6400
6400
|
console.log(
|
|
6401
6401
|
source_default.yellow(
|
|
6402
|
-
`Current version: ${"9.124.
|
|
6402
|
+
`Current version: ${"9.124.3"} -> Latest version: ${latestVersion}`
|
|
6403
6403
|
)
|
|
6404
6404
|
);
|
|
6405
6405
|
console.log();
|
|
@@ -6426,7 +6426,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6426
6426
|
const success = await performUpgrade(packageManager);
|
|
6427
6427
|
if (success) {
|
|
6428
6428
|
console.log(
|
|
6429
|
-
source_default.green(`\u2713 Upgraded from ${"9.124.
|
|
6429
|
+
source_default.green(`\u2713 Upgraded from ${"9.124.3"} to ${latestVersion}`)
|
|
6430
6430
|
);
|
|
6431
6431
|
return;
|
|
6432
6432
|
}
|
|
@@ -6493,7 +6493,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
6493
6493
|
|
|
6494
6494
|
// src/index.ts
|
|
6495
6495
|
var program = new Command();
|
|
6496
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.124.
|
|
6496
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.124.3");
|
|
6497
6497
|
program.addCommand(authCommand);
|
|
6498
6498
|
program.addCommand(infoCommand);
|
|
6499
6499
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -126,7 +126,7 @@ import {
|
|
|
126
126
|
upsertZeroOrgModelProvider,
|
|
127
127
|
withErrorHandler,
|
|
128
128
|
zeroAgentCustomSkillNameSchema
|
|
129
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-ISA6IES3.js";
|
|
130
130
|
import {
|
|
131
131
|
__toESM,
|
|
132
132
|
init_esm_shims
|
|
@@ -2968,6 +2968,7 @@ init_esm_shims();
|
|
|
2968
2968
|
|
|
2969
2969
|
// src/commands/zero/schedule/setup.ts
|
|
2970
2970
|
init_esm_shims();
|
|
2971
|
+
import { readFileSync as readFileSync3 } from "fs";
|
|
2971
2972
|
var FREQUENCY_CHOICES = [
|
|
2972
2973
|
{ title: "Daily", value: "daily", description: "Run every day" },
|
|
2973
2974
|
{
|
|
@@ -3194,10 +3195,16 @@ async function gatherTimezone(optionTimezone, existingTimezone) {
|
|
|
3194
3195
|
}
|
|
3195
3196
|
return await promptText("Timezone", existingTimezone || defaultTimezone);
|
|
3196
3197
|
}
|
|
3197
|
-
async function gatherPromptText(optionPrompt, existingPrompt) {
|
|
3198
|
+
async function gatherPromptText(optionPrompt, optionPromptFile, existingPrompt) {
|
|
3199
|
+
if (optionPrompt && optionPromptFile) {
|
|
3200
|
+
throw new Error("Cannot use --prompt and --prompt-file together");
|
|
3201
|
+
}
|
|
3202
|
+
if (optionPromptFile) {
|
|
3203
|
+
return readFileSync3(optionPromptFile, "utf-8");
|
|
3204
|
+
}
|
|
3198
3205
|
if (optionPrompt) return optionPrompt;
|
|
3199
3206
|
if (!isInteractive()) {
|
|
3200
|
-
throw new Error("--prompt is required");
|
|
3207
|
+
throw new Error("--prompt or --prompt-file is required");
|
|
3201
3208
|
}
|
|
3202
3209
|
return await promptText(
|
|
3203
3210
|
"Prompt to run",
|
|
@@ -3384,7 +3391,10 @@ async function handleScheduleEnabling(params) {
|
|
|
3384
3391
|
showEnableHint(agentName);
|
|
3385
3392
|
}
|
|
3386
3393
|
}
|
|
3387
|
-
var setupCommand2 = new Command().name("setup").description("Create or edit a schedule for a zero agent").argument("<agent-id>", "Agent ID").option("-n, --name <schedule-name>", 'Schedule name (default: "default")').option("-f, --frequency <type>", "Frequency: daily|weekly|monthly|once|loop").option("-t, --time <HH:MM>", "Time to run (24-hour format)").option("-d, --day <day>", "Day of week (mon-sun) or day of month (1-31)").option("-i, --interval <seconds>", "Interval in seconds for loop mode").option("-z, --timezone <tz>", "IANA timezone").option("-p, --prompt <text>", "Prompt to run").option(
|
|
3394
|
+
var setupCommand2 = new Command().name("setup").description("Create or edit a schedule for a zero agent").argument("<agent-id>", "Agent ID").option("-n, --name <schedule-name>", 'Schedule name (default: "default")').option("-f, --frequency <type>", "Frequency: daily|weekly|monthly|once|loop").option("-t, --time <HH:MM>", "Time to run (24-hour format)").option("-d, --day <day>", "Day of week (mon-sun) or day of month (1-31)").option("-i, --interval <seconds>", "Interval in seconds for loop mode").option("-z, --timezone <tz>", "IANA timezone").option("-p, --prompt <text>", "Prompt to run").option(
|
|
3395
|
+
"--prompt-file <path>",
|
|
3396
|
+
"Read prompt from file (cannot be used with --prompt)"
|
|
3397
|
+
).option("-e, --enable", "Enable schedule immediately after creation").option(
|
|
3388
3398
|
"--model-provider <id>",
|
|
3389
3399
|
"Model provider UUID, or 'default' to inherit from agent/org"
|
|
3390
3400
|
).option(
|
|
@@ -3399,6 +3409,7 @@ Examples:
|
|
|
3399
3409
|
Monthly on the 1st: zero schedule setup <agent-id> -f monthly -d 1 -t 08:00 -p "monthly review"
|
|
3400
3410
|
One-time: zero schedule setup <agent-id> -f once -d 2026-04-01 -t 14:00 -p "one-off task"
|
|
3401
3411
|
Loop every 5 minutes: zero schedule setup <agent-id> -f loop -i 300 -p "poll for updates"
|
|
3412
|
+
Prompt from file: zero schedule setup <agent-id> -f daily -t 09:00 --prompt-file ./prompt.md
|
|
3402
3413
|
Create and enable: zero schedule setup <agent-id> -f daily -t 09:00 -p "run report" --enable
|
|
3403
3414
|
Override model: zero schedule setup <agent-id> -f daily -t 09:00 -p "..." --model-provider <id> --model MiniMax-M2.7
|
|
3404
3415
|
Reset model override: zero schedule setup <agent-id> -f daily -t 09:00 -p "..." --model-provider default --model default
|
|
@@ -3453,6 +3464,7 @@ Notes:
|
|
|
3453
3464
|
}
|
|
3454
3465
|
const promptText_ = await gatherPromptText(
|
|
3455
3466
|
options.prompt,
|
|
3467
|
+
options.promptFile,
|
|
3456
3468
|
existingSchedule?.prompt
|
|
3457
3469
|
);
|
|
3458
3470
|
if (!promptText_) {
|
|
@@ -3564,12 +3576,16 @@ function formatTrigger(schedule) {
|
|
|
3564
3576
|
}
|
|
3565
3577
|
return source_default.dim("-");
|
|
3566
3578
|
}
|
|
3567
|
-
function printRunConfiguration(schedule) {
|
|
3579
|
+
function printRunConfiguration(schedule, showFullPrompt) {
|
|
3568
3580
|
const statusText = schedule.enabled ? source_default.green("enabled") : source_default.yellow("disabled");
|
|
3569
3581
|
console.log(`${"Status:".padEnd(16)}${statusText}`);
|
|
3570
3582
|
console.log(`${"Agent:".padEnd(16)}${schedule.agentId}`);
|
|
3571
|
-
|
|
3572
|
-
|
|
3583
|
+
if (showFullPrompt) {
|
|
3584
|
+
console.log(`${"Prompt:".padEnd(16)}${source_default.dim(schedule.prompt)}`);
|
|
3585
|
+
} else {
|
|
3586
|
+
const promptPreview = schedule.prompt.length > 60 ? schedule.prompt.slice(0, 57) + "..." : schedule.prompt;
|
|
3587
|
+
console.log(`${"Prompt:".padEnd(16)}${source_default.dim(promptPreview)}`);
|
|
3588
|
+
}
|
|
3573
3589
|
if (schedule.vars && Object.keys(schedule.vars).length > 0) {
|
|
3574
3590
|
console.log(
|
|
3575
3591
|
`${"Variables:".padEnd(16)}${Object.keys(schedule.vars).join(", ")}`
|
|
@@ -3601,25 +3617,28 @@ function printTimeSchedule(schedule) {
|
|
|
3601
3617
|
var statusCommand3 = new Command().name("status").description("Show detailed status of a zero schedule").argument("<agent-id>", "Agent ID").option(
|
|
3602
3618
|
"-n, --name <schedule-name>",
|
|
3603
3619
|
"Schedule name (required when agent has multiple schedules)"
|
|
3604
|
-
).addHelpText(
|
|
3620
|
+
).option("-p, --prompt", "Show full prompt content without truncation").addHelpText(
|
|
3605
3621
|
"after",
|
|
3606
3622
|
`
|
|
3607
3623
|
Examples:
|
|
3608
3624
|
zero schedule status <agent-id>
|
|
3609
|
-
zero schedule status <agent-id> -n my-schedule
|
|
3625
|
+
zero schedule status <agent-id> -n my-schedule
|
|
3626
|
+
zero schedule status <agent-id> --prompt`
|
|
3610
3627
|
).action(
|
|
3611
|
-
withErrorHandler(
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3628
|
+
withErrorHandler(
|
|
3629
|
+
async (agentName, options) => {
|
|
3630
|
+
const schedule = await resolveZeroScheduleByAgent(
|
|
3631
|
+
agentName,
|
|
3632
|
+
options.name
|
|
3633
|
+
);
|
|
3634
|
+
console.log();
|
|
3635
|
+
console.log(`Schedule for agent: ${source_default.cyan(agentName)}`);
|
|
3636
|
+
console.log(source_default.dim("\u2501".repeat(50)));
|
|
3637
|
+
printRunConfiguration(schedule, options.prompt ?? false);
|
|
3638
|
+
printTimeSchedule(schedule);
|
|
3639
|
+
console.log();
|
|
3640
|
+
}
|
|
3641
|
+
)
|
|
3623
3642
|
);
|
|
3624
3643
|
|
|
3625
3644
|
// src/commands/zero/schedule/delete.ts
|
|
@@ -3865,7 +3884,7 @@ init_esm_shims();
|
|
|
3865
3884
|
|
|
3866
3885
|
// src/commands/zero/chat/message/send.ts
|
|
3867
3886
|
init_esm_shims();
|
|
3868
|
-
import { readFileSync as
|
|
3887
|
+
import { readFileSync as readFileSync4 } from "fs";
|
|
3869
3888
|
var sendCommand = new Command().name("send").description("Send a message to a web chat thread").option("-t, --thread <id>", "Existing chat thread ID").option("-a, --agent <agentId>", "Agent ID (creates a new thread)").option("--text <message>", "Message text").option("--title <title>", "Thread title (only with --agent)").addHelpText(
|
|
3870
3889
|
"after",
|
|
3871
3890
|
`
|
|
@@ -3896,7 +3915,7 @@ Notes:
|
|
|
3896
3915
|
});
|
|
3897
3916
|
}
|
|
3898
3917
|
if (!text && process.stdin.isTTY === false) {
|
|
3899
|
-
text =
|
|
3918
|
+
text = readFileSync4("/dev/stdin", "utf8").trim();
|
|
3900
3919
|
}
|
|
3901
3920
|
if (!text) {
|
|
3902
3921
|
throw new Error("--text is required", {
|
|
@@ -3945,7 +3964,7 @@ init_esm_shims();
|
|
|
3945
3964
|
|
|
3946
3965
|
// src/commands/zero/slack/message/send.ts
|
|
3947
3966
|
init_esm_shims();
|
|
3948
|
-
import { readFileSync as
|
|
3967
|
+
import { readFileSync as readFileSync5 } from "fs";
|
|
3949
3968
|
var sendCommand2 = new Command().name("send").description("Send a message to a Slack channel or DM a user").option("-c, --channel <id>", "Channel ID").option("-u, --user <id>", 'Slack user ID for DM (use "me" for yourself)').option("-t, --text <message>", "Message text").option("--thread <ts>", "Thread timestamp for replies").option("--blocks <json>", "Block Kit JSON string").addHelpText(
|
|
3950
3969
|
"after",
|
|
3951
3970
|
`
|
|
@@ -3979,7 +3998,7 @@ Notes:
|
|
|
3979
3998
|
});
|
|
3980
3999
|
}
|
|
3981
4000
|
if (!text && process.stdin.isTTY === false) {
|
|
3982
|
-
text =
|
|
4001
|
+
text = readFileSync5("/dev/stdin", "utf8").trim();
|
|
3983
4002
|
}
|
|
3984
4003
|
let blocks;
|
|
3985
4004
|
if (blocksStr) {
|
|
@@ -4023,7 +4042,7 @@ Examples:
|
|
|
4023
4042
|
|
|
4024
4043
|
// src/commands/zero/slack/upload-file.ts
|
|
4025
4044
|
init_esm_shims();
|
|
4026
|
-
import { statSync, readFileSync as
|
|
4045
|
+
import { statSync, readFileSync as readFileSync6 } from "fs";
|
|
4027
4046
|
import { basename } from "path";
|
|
4028
4047
|
var uploadFileCommand = new Command().name("upload-file").description("Upload a file to a Slack channel as the bot").requiredOption("-f, --file <path>", "Local file path to upload").requiredOption("-c, --channel <id>", "Slack channel ID").option("--thread <ts>", "Thread timestamp to post as a reply").option("--title <title>", "Display title for the file").option("--comment <text>", "Initial comment to accompany the file").addHelpText(
|
|
4029
4048
|
"after",
|
|
@@ -4054,7 +4073,7 @@ Notes:
|
|
|
4054
4073
|
filename,
|
|
4055
4074
|
length: fileSize
|
|
4056
4075
|
});
|
|
4057
|
-
const fileContent =
|
|
4076
|
+
const fileContent = readFileSync6(options.file);
|
|
4058
4077
|
const uploadResponse = await fetch(uploadUrl, {
|
|
4059
4078
|
method: "POST",
|
|
4060
4079
|
body: fileContent
|
|
@@ -4376,7 +4395,7 @@ init_esm_shims();
|
|
|
4376
4395
|
|
|
4377
4396
|
// src/lib/skill-directory.ts
|
|
4378
4397
|
init_esm_shims();
|
|
4379
|
-
import { readFileSync as
|
|
4398
|
+
import { readFileSync as readFileSync7, readdirSync } from "fs";
|
|
4380
4399
|
import { join as join2 } from "path";
|
|
4381
4400
|
var IGNORED_NAMES = /* @__PURE__ */ new Set(["node_modules", ".git", ".DS_Store"]);
|
|
4382
4401
|
function readSkillDirectory(dirPath) {
|
|
@@ -4391,7 +4410,7 @@ function readSkillDirectory(dirPath) {
|
|
|
4391
4410
|
} else {
|
|
4392
4411
|
files.push({
|
|
4393
4412
|
path: relPath,
|
|
4394
|
-
content:
|
|
4413
|
+
content: readFileSync7(join2(dir, entry.name), "utf-8")
|
|
4395
4414
|
});
|
|
4396
4415
|
}
|
|
4397
4416
|
}
|
|
@@ -6203,7 +6222,7 @@ var voiceChatContextGetCommand = new Command().name("get").description("Read sha
|
|
|
6203
6222
|
|
|
6204
6223
|
// src/commands/zero/voice-chat/context/append.ts
|
|
6205
6224
|
init_esm_shims();
|
|
6206
|
-
import { readFileSync as
|
|
6225
|
+
import { readFileSync as readFileSync9 } from "fs";
|
|
6207
6226
|
var voiceChatContextAppendCommand = new Command().name("append").description("Append an event to voice-chat shared context").argument("<session-id>", "Voice-chat session ID").requiredOption(
|
|
6208
6227
|
"--source <source>",
|
|
6209
6228
|
"Event source (system|user|fast-brain|slow-brain)"
|
|
@@ -6221,7 +6240,7 @@ Examples:
|
|
|
6221
6240
|
async (sessionId, options) => {
|
|
6222
6241
|
let content = options.content;
|
|
6223
6242
|
if (!content && process.stdin.isTTY === false) {
|
|
6224
|
-
content =
|
|
6243
|
+
content = readFileSync9("/dev/stdin", "utf8").trim();
|
|
6225
6244
|
}
|
|
6226
6245
|
const data = await appendVoiceChatContextEvent(sessionId, {
|
|
6227
6246
|
source: options.source,
|
|
@@ -6235,7 +6254,7 @@ Examples:
|
|
|
6235
6254
|
|
|
6236
6255
|
// src/commands/zero/voice-chat/context/prepare.ts
|
|
6237
6256
|
init_esm_shims();
|
|
6238
|
-
import { readFileSync as
|
|
6257
|
+
import { readFileSync as readFileSync10 } from "fs";
|
|
6239
6258
|
var voiceChatContextPrepareCommand = new Command().name("prepare").description("Submit preparation directive content for a voice-chat run").option(
|
|
6240
6259
|
"--content <content>",
|
|
6241
6260
|
"Directive content (reads from stdin if not provided)"
|
|
@@ -6249,7 +6268,7 @@ Examples:
|
|
|
6249
6268
|
withErrorHandler(async (options) => {
|
|
6250
6269
|
let content = options.content;
|
|
6251
6270
|
if (!content && process.stdin.isTTY === false) {
|
|
6252
|
-
content =
|
|
6271
|
+
content = readFileSync10("/dev/stdin", "utf8").trim();
|
|
6253
6272
|
}
|
|
6254
6273
|
if (!content) {
|
|
6255
6274
|
throw new Error(
|
|
@@ -6380,7 +6399,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
6380
6399
|
var program = new Command();
|
|
6381
6400
|
program.name("zero").description(
|
|
6382
6401
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
6383
|
-
).version("9.124.
|
|
6402
|
+
).version("9.124.3").addHelpText(
|
|
6384
6403
|
"after",
|
|
6385
6404
|
`
|
|
6386
6405
|
Examples:
|