@vm0/cli 9.66.0 → 9.67.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/index.js +33 -34
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -45,7 +45,7 @@ if (DSN) {
|
|
|
45
45
|
Sentry.init({
|
|
46
46
|
dsn: DSN,
|
|
47
47
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
48
|
-
release: "9.
|
|
48
|
+
release: "9.67.0",
|
|
49
49
|
sendDefaultPii: false,
|
|
50
50
|
tracesSampleRate: 0,
|
|
51
51
|
shutdownTimeout: 500,
|
|
@@ -64,7 +64,7 @@ if (DSN) {
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
Sentry.setContext("cli", {
|
|
67
|
-
version: "9.
|
|
67
|
+
version: "9.67.0",
|
|
68
68
|
command: process.argv.slice(2).join(" ")
|
|
69
69
|
});
|
|
70
70
|
Sentry.setContext("runtime", {
|
|
@@ -675,7 +675,7 @@ function getConfigPath() {
|
|
|
675
675
|
return join2(homedir2(), ".vm0", "config.json");
|
|
676
676
|
}
|
|
677
677
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
678
|
-
console.log(chalk4.bold(`VM0 CLI v${"9.
|
|
678
|
+
console.log(chalk4.bold(`VM0 CLI v${"9.67.0"}`));
|
|
679
679
|
console.log();
|
|
680
680
|
const config = await loadConfig();
|
|
681
681
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -3281,6 +3281,8 @@ var storedExecutionContextSchema = z18.object({
|
|
|
3281
3281
|
var executionContextSchema = z18.object({
|
|
3282
3282
|
runId: z18.uuid(),
|
|
3283
3283
|
prompt: z18.string(),
|
|
3284
|
+
// System prompt appended to agent instructions (passed as --append-system-prompt to Claude CLI)
|
|
3285
|
+
appendSystemPrompt: z18.string().optional(),
|
|
3284
3286
|
agentComposeVersionId: z18.string().nullable(),
|
|
3285
3287
|
vars: z18.record(z18.string(), z18.string()).nullable(),
|
|
3286
3288
|
checkpointId: z18.uuid().nullable(),
|
|
@@ -9607,11 +9609,6 @@ function mergeSkillVariables(agent, variables) {
|
|
|
9607
9609
|
agent.environment = environment;
|
|
9608
9610
|
}
|
|
9609
9611
|
}
|
|
9610
|
-
function getAppUrl(apiUrl) {
|
|
9611
|
-
const url = new URL(apiUrl);
|
|
9612
|
-
url.hostname = url.hostname.replace("www", "app");
|
|
9613
|
-
return url.origin;
|
|
9614
|
-
}
|
|
9615
9612
|
async function checkAndPromptMissingItems(config, options) {
|
|
9616
9613
|
const requiredSecrets = getSecretsFromComposeContent(config);
|
|
9617
9614
|
const requiredVars = getVarsFromComposeContent(config);
|
|
@@ -9641,27 +9638,18 @@ async function checkAndPromptMissingItems(config, options) {
|
|
|
9641
9638
|
if (missingSecrets.length === 0 && missingVars.length === 0) {
|
|
9642
9639
|
return { missingSecrets: [], missingVars: [] };
|
|
9643
9640
|
}
|
|
9644
|
-
const apiUrl = await getApiUrl();
|
|
9645
|
-
const appUrl = getAppUrl(apiUrl);
|
|
9646
|
-
const params = new URLSearchParams();
|
|
9647
|
-
if (missingSecrets.length > 0) {
|
|
9648
|
-
params.set("secrets", missingSecrets.join(","));
|
|
9649
|
-
}
|
|
9650
|
-
if (missingVars.length > 0) {
|
|
9651
|
-
params.set("vars", missingVars.join(","));
|
|
9652
|
-
}
|
|
9653
|
-
const setupUrl = `${appUrl}/environment-variables-setup?${params.toString()}`;
|
|
9654
9641
|
if (!options.json) {
|
|
9655
9642
|
console.log();
|
|
9656
|
-
console.log(
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
)
|
|
9661
|
-
|
|
9643
|
+
console.log(chalk6.yellow("\u26A0 Missing secrets/variables detected:"));
|
|
9644
|
+
if (missingSecrets.length > 0) {
|
|
9645
|
+
console.log(chalk6.yellow(` Secrets: ${missingSecrets.join(", ")}`));
|
|
9646
|
+
}
|
|
9647
|
+
if (missingVars.length > 0) {
|
|
9648
|
+
console.log(chalk6.yellow(` Variables: ${missingVars.join(", ")}`));
|
|
9649
|
+
}
|
|
9662
9650
|
console.log();
|
|
9663
9651
|
}
|
|
9664
|
-
return { missingSecrets, missingVars
|
|
9652
|
+
return { missingSecrets, missingVars };
|
|
9665
9653
|
}
|
|
9666
9654
|
async function finalizeCompose(config, agent, variables, options) {
|
|
9667
9655
|
const confirmed = await displayAndConfirmVariables(variables, options);
|
|
@@ -9688,7 +9676,6 @@ async function finalizeCompose(config, agent, variables, options) {
|
|
|
9688
9676
|
if (missingItems.missingSecrets.length > 0 || missingItems.missingVars.length > 0) {
|
|
9689
9677
|
result.missingSecrets = missingItems.missingSecrets;
|
|
9690
9678
|
result.missingVars = missingItems.missingVars;
|
|
9691
|
-
result.setupUrl = missingItems.setupUrl;
|
|
9692
9679
|
}
|
|
9693
9680
|
}
|
|
9694
9681
|
if (!options.json) {
|
|
@@ -9806,7 +9793,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
9806
9793
|
options.autoUpdate = false;
|
|
9807
9794
|
}
|
|
9808
9795
|
if (options.autoUpdate !== false) {
|
|
9809
|
-
await startSilentUpgrade("9.
|
|
9796
|
+
await startSilentUpgrade("9.67.0");
|
|
9810
9797
|
}
|
|
9811
9798
|
try {
|
|
9812
9799
|
let result;
|
|
@@ -10621,11 +10608,14 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
10621
10608
|
).option(
|
|
10622
10609
|
"--model-provider <type>",
|
|
10623
10610
|
"Override model provider (e.g., anthropic-api-key)"
|
|
10611
|
+
).option(
|
|
10612
|
+
"--append-system-prompt <text>",
|
|
10613
|
+
"Append text to the agent's system prompt"
|
|
10624
10614
|
).option("--verbose", "Show full tool inputs and outputs").option("--check-env", "Validate secrets and vars before running").addOption(new Option2("--debug-no-mock-claude").hideHelp()).addOption(new Option2("--no-auto-update").hideHelp()).action(
|
|
10625
10615
|
withErrorHandler(
|
|
10626
10616
|
async (identifier, prompt, options) => {
|
|
10627
10617
|
if (options.autoUpdate !== false) {
|
|
10628
|
-
await startSilentUpgrade("9.
|
|
10618
|
+
await startSilentUpgrade("9.67.0");
|
|
10629
10619
|
}
|
|
10630
10620
|
const { org, name, version } = parseIdentifier(identifier);
|
|
10631
10621
|
let composeId;
|
|
@@ -10677,6 +10667,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
10677
10667
|
volumeVersions: Object.keys(options.volumeVersion).length > 0 ? options.volumeVersion : void 0,
|
|
10678
10668
|
conversationId: options.conversation,
|
|
10679
10669
|
modelProvider: options.modelProvider,
|
|
10670
|
+
appendSystemPrompt: options.appendSystemPrompt,
|
|
10680
10671
|
checkEnv: options.checkEnv || void 0,
|
|
10681
10672
|
debugNoMockClaude: options.debugNoMockClaude || void 0
|
|
10682
10673
|
});
|
|
@@ -10724,6 +10715,9 @@ var resumeCommand = new Command9().name("resume").description("Resume an agent r
|
|
|
10724
10715
|
).option(
|
|
10725
10716
|
"--model-provider <type>",
|
|
10726
10717
|
"Override model provider (e.g., anthropic-api-key)"
|
|
10718
|
+
).option(
|
|
10719
|
+
"--append-system-prompt <text>",
|
|
10720
|
+
"Append text to the agent's system prompt"
|
|
10727
10721
|
).option("--verbose", "Show full tool inputs and outputs").option("--check-env", "Validate secrets and vars before running").addOption(new Option3("--debug-no-mock-claude").hideHelp()).action(
|
|
10728
10722
|
withErrorHandler(
|
|
10729
10723
|
async (checkpointId, prompt, options, command) => {
|
|
@@ -10746,6 +10740,7 @@ var resumeCommand = new Command9().name("resume").description("Resume an agent r
|
|
|
10746
10740
|
secrets: loadedSecrets,
|
|
10747
10741
|
volumeVersions: Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0,
|
|
10748
10742
|
modelProvider: options.modelProvider || allOpts.modelProvider,
|
|
10743
|
+
appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
|
|
10749
10744
|
checkEnv: options.checkEnv || allOpts.checkEnv || void 0,
|
|
10750
10745
|
debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude || void 0
|
|
10751
10746
|
});
|
|
@@ -10786,6 +10781,9 @@ var continueCommand = new Command10().name("continue").description(
|
|
|
10786
10781
|
).option(
|
|
10787
10782
|
"--model-provider <type>",
|
|
10788
10783
|
"Override model provider (e.g., anthropic-api-key)"
|
|
10784
|
+
).option(
|
|
10785
|
+
"--append-system-prompt <text>",
|
|
10786
|
+
"Append text to the agent's system prompt"
|
|
10789
10787
|
).option("--verbose", "Show full tool inputs and outputs").option("--check-env", "Validate secrets and vars before running").addOption(new Option4("--debug-no-mock-claude").hideHelp()).action(
|
|
10790
10788
|
withErrorHandler(
|
|
10791
10789
|
async (agentSessionId, prompt, options, command) => {
|
|
@@ -10808,6 +10806,7 @@ var continueCommand = new Command10().name("continue").description(
|
|
|
10808
10806
|
vars: Object.keys(vars).length > 0 ? vars : void 0,
|
|
10809
10807
|
secrets: loadedSecrets,
|
|
10810
10808
|
modelProvider: options.modelProvider || allOpts.modelProvider,
|
|
10809
|
+
appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
|
|
10811
10810
|
checkEnv: options.checkEnv || allOpts.checkEnv || void 0,
|
|
10812
10811
|
debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude || void 0
|
|
10813
10812
|
});
|
|
@@ -12345,7 +12344,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
12345
12344
|
withErrorHandler(
|
|
12346
12345
|
async (prompt, options) => {
|
|
12347
12346
|
if (options.autoUpdate !== false) {
|
|
12348
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
12347
|
+
const shouldExit = await checkAndUpgrade("9.67.0", prompt);
|
|
12349
12348
|
if (shouldExit) {
|
|
12350
12349
|
process.exit(0);
|
|
12351
12350
|
}
|
|
@@ -17690,13 +17689,13 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17690
17689
|
if (latestVersion === null) {
|
|
17691
17690
|
throw new Error("Could not check for updates. Please try again later.");
|
|
17692
17691
|
}
|
|
17693
|
-
if (latestVersion === "9.
|
|
17694
|
-
console.log(chalk86.green(`\u2713 Already up to date (${"9.
|
|
17692
|
+
if (latestVersion === "9.67.0") {
|
|
17693
|
+
console.log(chalk86.green(`\u2713 Already up to date (${"9.67.0"})`));
|
|
17695
17694
|
return;
|
|
17696
17695
|
}
|
|
17697
17696
|
console.log(
|
|
17698
17697
|
chalk86.yellow(
|
|
17699
|
-
`Current version: ${"9.
|
|
17698
|
+
`Current version: ${"9.67.0"} -> Latest version: ${latestVersion}`
|
|
17700
17699
|
)
|
|
17701
17700
|
);
|
|
17702
17701
|
console.log();
|
|
@@ -17723,7 +17722,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17723
17722
|
const success = await performUpgrade(packageManager);
|
|
17724
17723
|
if (success) {
|
|
17725
17724
|
console.log(
|
|
17726
|
-
chalk86.green(`\u2713 Upgraded from ${"9.
|
|
17725
|
+
chalk86.green(`\u2713 Upgraded from ${"9.67.0"} to ${latestVersion}`)
|
|
17727
17726
|
);
|
|
17728
17727
|
return;
|
|
17729
17728
|
}
|
|
@@ -17737,7 +17736,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17737
17736
|
|
|
17738
17737
|
// src/index.ts
|
|
17739
17738
|
var program = new Command95();
|
|
17740
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
17739
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.67.0");
|
|
17741
17740
|
program.addCommand(authCommand);
|
|
17742
17741
|
program.addCommand(infoCommand);
|
|
17743
17742
|
program.addCommand(composeCommand);
|