@vm0/cli 9.87.0 → 9.87.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-JOVCRTRX.js → chunk-QAFCEPXB.js} +177 -29
- package/chunk-QAFCEPXB.js.map +1 -0
- package/index.js +10 -10
- package/package.json +1 -1
- package/zero.js +32 -17
- package/zero.js.map +1 -1
- package/chunk-JOVCRTRX.js.map +0 -1
package/index.js
CHANGED
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
showNextSteps,
|
|
61
61
|
volumeConfigSchema,
|
|
62
62
|
withErrorHandler
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-QAFCEPXB.js";
|
|
64
64
|
|
|
65
65
|
// src/index.ts
|
|
66
66
|
import { Command as Command44 } from "commander";
|
|
@@ -445,7 +445,7 @@ function getConfigPath() {
|
|
|
445
445
|
return join(homedir(), ".vm0", "config.json");
|
|
446
446
|
}
|
|
447
447
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
448
|
-
console.log(chalk3.bold(`VM0 CLI v${"9.87.
|
|
448
|
+
console.log(chalk3.bold(`VM0 CLI v${"9.87.1"}`));
|
|
449
449
|
console.log();
|
|
450
450
|
const config = await loadConfig();
|
|
451
451
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -1548,7 +1548,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
1548
1548
|
options.autoUpdate = false;
|
|
1549
1549
|
}
|
|
1550
1550
|
if (options.autoUpdate !== false) {
|
|
1551
|
-
await startSilentUpgrade("9.87.
|
|
1551
|
+
await startSilentUpgrade("9.87.1");
|
|
1552
1552
|
}
|
|
1553
1553
|
try {
|
|
1554
1554
|
let result;
|
|
@@ -1625,7 +1625,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
1625
1625
|
withErrorHandler(
|
|
1626
1626
|
async (identifier, prompt, options) => {
|
|
1627
1627
|
if (options.autoUpdate !== false) {
|
|
1628
|
-
await startSilentUpgrade("9.87.
|
|
1628
|
+
await startSilentUpgrade("9.87.1");
|
|
1629
1629
|
}
|
|
1630
1630
|
const { org, name, version } = parseIdentifier(identifier);
|
|
1631
1631
|
let composeId;
|
|
@@ -3394,7 +3394,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
3394
3394
|
withErrorHandler(
|
|
3395
3395
|
async (prompt, options) => {
|
|
3396
3396
|
if (options.autoUpdate !== false) {
|
|
3397
|
-
const shouldExit = await checkAndUpgrade("9.87.
|
|
3397
|
+
const shouldExit = await checkAndUpgrade("9.87.1", prompt);
|
|
3398
3398
|
if (shouldExit) {
|
|
3399
3399
|
process.exit(0);
|
|
3400
3400
|
}
|
|
@@ -4134,13 +4134,13 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
|
|
|
4134
4134
|
if (latestVersion === null) {
|
|
4135
4135
|
throw new Error("Could not check for updates. Please try again later.");
|
|
4136
4136
|
}
|
|
4137
|
-
if (latestVersion === "9.87.
|
|
4138
|
-
console.log(chalk33.green(`\u2713 Already up to date (${"9.87.
|
|
4137
|
+
if (latestVersion === "9.87.1") {
|
|
4138
|
+
console.log(chalk33.green(`\u2713 Already up to date (${"9.87.1"})`));
|
|
4139
4139
|
return;
|
|
4140
4140
|
}
|
|
4141
4141
|
console.log(
|
|
4142
4142
|
chalk33.yellow(
|
|
4143
|
-
`Current version: ${"9.87.
|
|
4143
|
+
`Current version: ${"9.87.1"} -> Latest version: ${latestVersion}`
|
|
4144
4144
|
)
|
|
4145
4145
|
);
|
|
4146
4146
|
console.log();
|
|
@@ -4167,7 +4167,7 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
|
|
|
4167
4167
|
const success = await performUpgrade(packageManager);
|
|
4168
4168
|
if (success) {
|
|
4169
4169
|
console.log(
|
|
4170
|
-
chalk33.green(`\u2713 Upgraded from ${"9.87.
|
|
4170
|
+
chalk33.green(`\u2713 Upgraded from ${"9.87.1"} to ${latestVersion}`)
|
|
4171
4171
|
);
|
|
4172
4172
|
return;
|
|
4173
4173
|
}
|
|
@@ -4235,7 +4235,7 @@ var whoamiCommand = new Command43().name("whoami").description("Show current ide
|
|
|
4235
4235
|
|
|
4236
4236
|
// src/index.ts
|
|
4237
4237
|
var program = new Command44();
|
|
4238
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.87.
|
|
4238
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.87.1");
|
|
4239
4239
|
program.addCommand(authCommand);
|
|
4240
4240
|
program.addCommand(infoCommand);
|
|
4241
4241
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
updateZeroUserPreferences,
|
|
92
92
|
upsertZeroOrgModelProvider,
|
|
93
93
|
withErrorHandler
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-QAFCEPXB.js";
|
|
95
95
|
|
|
96
96
|
// src/zero.ts
|
|
97
97
|
import { Command as Command61 } from "commander";
|
|
@@ -2452,28 +2452,41 @@ async function gatherPromptText(optionPrompt, existingPrompt) {
|
|
|
2452
2452
|
existingPrompt || "let's start working."
|
|
2453
2453
|
);
|
|
2454
2454
|
}
|
|
2455
|
-
async function gatherNotificationPreferences(optionNotifyEmail, optionNotifySlack, existingSchedule) {
|
|
2455
|
+
async function gatherNotificationPreferences(optionNotifyEmail, optionNotifySlack, optionNotifySlackChannelId, existingSchedule) {
|
|
2456
2456
|
if (optionNotifyEmail !== void 0 && optionNotifySlack !== void 0) {
|
|
2457
2457
|
return {
|
|
2458
2458
|
notifyEmail: optionNotifyEmail,
|
|
2459
|
-
notifySlack: optionNotifySlack
|
|
2459
|
+
notifySlack: optionNotifySlack,
|
|
2460
|
+
notifySlackChannelId: optionNotifySlackChannelId
|
|
2460
2461
|
};
|
|
2461
2462
|
}
|
|
2462
2463
|
if (!isInteractive()) {
|
|
2463
2464
|
return {
|
|
2464
2465
|
notifyEmail: optionNotifyEmail,
|
|
2465
|
-
notifySlack: optionNotifySlack
|
|
2466
|
+
notifySlack: optionNotifySlack,
|
|
2467
|
+
notifySlackChannelId: optionNotifySlackChannelId
|
|
2466
2468
|
};
|
|
2467
2469
|
}
|
|
2468
2470
|
const notifyEmail = optionNotifyEmail ?? await promptConfirm(
|
|
2469
2471
|
"Enable email notifications?",
|
|
2470
|
-
existingSchedule?.notifyEmail ??
|
|
2472
|
+
existingSchedule?.notifyEmail ?? false
|
|
2471
2473
|
);
|
|
2472
2474
|
const notifySlack = optionNotifySlack ?? await promptConfirm(
|
|
2473
2475
|
"Enable Slack notifications?",
|
|
2474
|
-
existingSchedule?.notifySlack ??
|
|
2476
|
+
existingSchedule?.notifySlack ?? false
|
|
2475
2477
|
);
|
|
2476
|
-
|
|
2478
|
+
let notifySlackChannelId = optionNotifySlackChannelId;
|
|
2479
|
+
if (notifySlackChannelId === void 0 && notifySlack) {
|
|
2480
|
+
const defaultChannel = existingSchedule?.notifySlackChannelId ?? "";
|
|
2481
|
+
const channelInput = await promptText(
|
|
2482
|
+
"Slack channel ID (leave empty for DM)",
|
|
2483
|
+
defaultChannel
|
|
2484
|
+
);
|
|
2485
|
+
if (channelInput) {
|
|
2486
|
+
notifySlackChannelId = channelInput;
|
|
2487
|
+
}
|
|
2488
|
+
}
|
|
2489
|
+
return { notifyEmail, notifySlack, notifySlackChannelId };
|
|
2477
2490
|
}
|
|
2478
2491
|
async function gatherInterval(optionInterval, existingInterval) {
|
|
2479
2492
|
if (optionInterval) {
|
|
@@ -2568,12 +2581,14 @@ Deploying schedule for agent ${chalk33.cyan(params.agentName)}...`
|
|
|
2568
2581
|
intervalSeconds: params.intervalSeconds,
|
|
2569
2582
|
timezone: params.timezone,
|
|
2570
2583
|
prompt: params.prompt,
|
|
2571
|
-
artifactName: params.artifactName,
|
|
2572
2584
|
...params.notifyEmail !== void 0 && {
|
|
2573
2585
|
notifyEmail: params.notifyEmail
|
|
2574
2586
|
},
|
|
2575
2587
|
...params.notifySlack !== void 0 && {
|
|
2576
2588
|
notifySlack: params.notifySlack
|
|
2589
|
+
},
|
|
2590
|
+
...params.notifySlackChannelId !== void 0 && {
|
|
2591
|
+
notifySlackChannelId: params.notifySlackChannelId
|
|
2577
2592
|
}
|
|
2578
2593
|
});
|
|
2579
2594
|
return deployResult;
|
|
@@ -2653,7 +2668,10 @@ async function handleScheduleEnabling(params) {
|
|
|
2653
2668
|
showEnableHint(agentName);
|
|
2654
2669
|
}
|
|
2655
2670
|
}
|
|
2656
|
-
var setupCommand2 = new Command40().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("
|
|
2671
|
+
var setupCommand2 = new Command40().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("-e, --enable", "Enable schedule immediately after creation").option("--notify-email", "Enable email notifications (default: false)").option("--no-notify-email", "Disable email notifications").option("--notify-slack", "Enable Slack notifications (default: false)").option("--no-notify-slack", "Disable Slack notifications").option(
|
|
2672
|
+
"--notify-slack-channel-id <channel-id>",
|
|
2673
|
+
"Slack channel ID for notifications (default: DM)"
|
|
2674
|
+
).addHelpText(
|
|
2657
2675
|
"after",
|
|
2658
2676
|
`
|
|
2659
2677
|
Examples:
|
|
@@ -2717,9 +2735,10 @@ Notes:
|
|
|
2717
2735
|
console.log(chalk33.dim("Cancelled"));
|
|
2718
2736
|
return;
|
|
2719
2737
|
}
|
|
2720
|
-
const { notifyEmail, notifySlack } = await gatherNotificationPreferences(
|
|
2738
|
+
const { notifyEmail, notifySlack, notifySlackChannelId } = await gatherNotificationPreferences(
|
|
2721
2739
|
options.notifyEmail,
|
|
2722
2740
|
options.notifySlack,
|
|
2741
|
+
options.notifySlackChannelId,
|
|
2723
2742
|
existingSchedule
|
|
2724
2743
|
);
|
|
2725
2744
|
const deployResult = await buildAndDeploy({
|
|
@@ -2733,9 +2752,9 @@ Notes:
|
|
|
2733
2752
|
intervalSeconds,
|
|
2734
2753
|
timezone,
|
|
2735
2754
|
prompt: promptText_,
|
|
2736
|
-
artifactName: options.artifactName,
|
|
2737
2755
|
notifyEmail,
|
|
2738
|
-
notifySlack
|
|
2756
|
+
notifySlack,
|
|
2757
|
+
notifySlackChannelId
|
|
2739
2758
|
});
|
|
2740
2759
|
displayDeployResult(scheduleName, deployResult);
|
|
2741
2760
|
const shouldPromptEnable = deployResult.created || existingSchedule !== void 0 && !existingSchedule.enabled;
|
|
@@ -2841,10 +2860,6 @@ function printRunConfiguration(schedule) {
|
|
|
2841
2860
|
if (schedule.secretNames && schedule.secretNames.length > 0) {
|
|
2842
2861
|
console.log(`${"Secrets:".padEnd(16)}${schedule.secretNames.join(", ")}`);
|
|
2843
2862
|
}
|
|
2844
|
-
if (schedule.artifactName) {
|
|
2845
|
-
const artifactInfo = schedule.artifactVersion ? `${schedule.artifactName}:${schedule.artifactVersion}` : schedule.artifactName;
|
|
2846
|
-
console.log(`${"Artifact:".padEnd(16)}${artifactInfo}`);
|
|
2847
|
-
}
|
|
2848
2863
|
if (schedule.volumeVersions && Object.keys(schedule.volumeVersions).length > 0) {
|
|
2849
2864
|
console.log(
|
|
2850
2865
|
`${"Volumes:".padEnd(16)}${Object.keys(schedule.volumeVersions).join(", ")}`
|
|
@@ -3508,7 +3523,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
3508
3523
|
var program = new Command61();
|
|
3509
3524
|
program.name("zero").description(
|
|
3510
3525
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
3511
|
-
).version("9.87.
|
|
3526
|
+
).version("9.87.1").addHelpText(
|
|
3512
3527
|
"after",
|
|
3513
3528
|
`
|
|
3514
3529
|
Examples:
|