@vm0/cli 9.66.0 → 9.68.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 +38 -35
- 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.68.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.68.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.68.0"}`));
|
|
679
679
|
console.log();
|
|
680
680
|
const config = await loadConfig();
|
|
681
681
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -1321,7 +1321,9 @@ var unifiedRunRequestSchema = z7.object({
|
|
|
1321
1321
|
// Environment validation flag - when true, validates secrets/vars before running
|
|
1322
1322
|
checkEnv: z7.boolean().optional(),
|
|
1323
1323
|
// Required
|
|
1324
|
-
prompt: z7.string().min(1, "Missing prompt")
|
|
1324
|
+
prompt: z7.string().min(1, "Missing prompt"),
|
|
1325
|
+
// Optional system prompt to append to the agent's system prompt
|
|
1326
|
+
appendSystemPrompt: z7.string().optional()
|
|
1325
1327
|
});
|
|
1326
1328
|
var createRunResponseSchema = z7.object({
|
|
1327
1329
|
runId: z7.string(),
|
|
@@ -1337,6 +1339,7 @@ var getRunResponseSchema = z7.object({
|
|
|
1337
1339
|
agentComposeVersionId: z7.string().nullable(),
|
|
1338
1340
|
status: runStatusSchema,
|
|
1339
1341
|
prompt: z7.string(),
|
|
1342
|
+
appendSystemPrompt: z7.string().nullable(),
|
|
1340
1343
|
vars: z7.record(z7.string(), z7.string()).optional(),
|
|
1341
1344
|
sandboxId: z7.string().optional(),
|
|
1342
1345
|
result: z7.object({
|
|
@@ -1383,6 +1386,7 @@ var runListItemSchema = z7.object({
|
|
|
1383
1386
|
agentName: z7.string(),
|
|
1384
1387
|
status: runStatusSchema,
|
|
1385
1388
|
prompt: z7.string(),
|
|
1389
|
+
appendSystemPrompt: z7.string().nullable(),
|
|
1386
1390
|
createdAt: z7.string(),
|
|
1387
1391
|
startedAt: z7.string().nullable()
|
|
1388
1392
|
});
|
|
@@ -3206,6 +3210,7 @@ var runnerGroupSchema = z18.string().regex(
|
|
|
3206
3210
|
var jobSchema = z18.object({
|
|
3207
3211
|
runId: z18.uuid(),
|
|
3208
3212
|
prompt: z18.string(),
|
|
3213
|
+
appendSystemPrompt: z18.string().nullable(),
|
|
3209
3214
|
agentComposeVersionId: z18.string().nullable(),
|
|
3210
3215
|
vars: z18.record(z18.string(), z18.string()).nullable(),
|
|
3211
3216
|
checkpointId: z18.uuid().nullable(),
|
|
@@ -3281,6 +3286,7 @@ var storedExecutionContextSchema = z18.object({
|
|
|
3281
3286
|
var executionContextSchema = z18.object({
|
|
3282
3287
|
runId: z18.uuid(),
|
|
3283
3288
|
prompt: z18.string(),
|
|
3289
|
+
appendSystemPrompt: z18.string().nullable(),
|
|
3284
3290
|
agentComposeVersionId: z18.string().nullable(),
|
|
3285
3291
|
vars: z18.record(z18.string(), z18.string()).nullable(),
|
|
3286
3292
|
checkpointId: z18.uuid().nullable(),
|
|
@@ -9607,11 +9613,6 @@ function mergeSkillVariables(agent, variables) {
|
|
|
9607
9613
|
agent.environment = environment;
|
|
9608
9614
|
}
|
|
9609
9615
|
}
|
|
9610
|
-
function getAppUrl(apiUrl) {
|
|
9611
|
-
const url = new URL(apiUrl);
|
|
9612
|
-
url.hostname = url.hostname.replace("www", "app");
|
|
9613
|
-
return url.origin;
|
|
9614
|
-
}
|
|
9615
9616
|
async function checkAndPromptMissingItems(config, options) {
|
|
9616
9617
|
const requiredSecrets = getSecretsFromComposeContent(config);
|
|
9617
9618
|
const requiredVars = getVarsFromComposeContent(config);
|
|
@@ -9641,27 +9642,18 @@ async function checkAndPromptMissingItems(config, options) {
|
|
|
9641
9642
|
if (missingSecrets.length === 0 && missingVars.length === 0) {
|
|
9642
9643
|
return { missingSecrets: [], missingVars: [] };
|
|
9643
9644
|
}
|
|
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
9645
|
if (!options.json) {
|
|
9655
9646
|
console.log();
|
|
9656
|
-
console.log(
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
)
|
|
9661
|
-
|
|
9647
|
+
console.log(chalk6.yellow("\u26A0 Missing secrets/variables detected:"));
|
|
9648
|
+
if (missingSecrets.length > 0) {
|
|
9649
|
+
console.log(chalk6.yellow(` Secrets: ${missingSecrets.join(", ")}`));
|
|
9650
|
+
}
|
|
9651
|
+
if (missingVars.length > 0) {
|
|
9652
|
+
console.log(chalk6.yellow(` Variables: ${missingVars.join(", ")}`));
|
|
9653
|
+
}
|
|
9662
9654
|
console.log();
|
|
9663
9655
|
}
|
|
9664
|
-
return { missingSecrets, missingVars
|
|
9656
|
+
return { missingSecrets, missingVars };
|
|
9665
9657
|
}
|
|
9666
9658
|
async function finalizeCompose(config, agent, variables, options) {
|
|
9667
9659
|
const confirmed = await displayAndConfirmVariables(variables, options);
|
|
@@ -9688,7 +9680,6 @@ async function finalizeCompose(config, agent, variables, options) {
|
|
|
9688
9680
|
if (missingItems.missingSecrets.length > 0 || missingItems.missingVars.length > 0) {
|
|
9689
9681
|
result.missingSecrets = missingItems.missingSecrets;
|
|
9690
9682
|
result.missingVars = missingItems.missingVars;
|
|
9691
|
-
result.setupUrl = missingItems.setupUrl;
|
|
9692
9683
|
}
|
|
9693
9684
|
}
|
|
9694
9685
|
if (!options.json) {
|
|
@@ -9806,7 +9797,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
9806
9797
|
options.autoUpdate = false;
|
|
9807
9798
|
}
|
|
9808
9799
|
if (options.autoUpdate !== false) {
|
|
9809
|
-
await startSilentUpgrade("9.
|
|
9800
|
+
await startSilentUpgrade("9.68.0");
|
|
9810
9801
|
}
|
|
9811
9802
|
try {
|
|
9812
9803
|
let result;
|
|
@@ -10621,11 +10612,14 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
10621
10612
|
).option(
|
|
10622
10613
|
"--model-provider <type>",
|
|
10623
10614
|
"Override model provider (e.g., anthropic-api-key)"
|
|
10615
|
+
).option(
|
|
10616
|
+
"--append-system-prompt <text>",
|
|
10617
|
+
"Append text to the agent's system prompt"
|
|
10624
10618
|
).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
10619
|
withErrorHandler(
|
|
10626
10620
|
async (identifier, prompt, options) => {
|
|
10627
10621
|
if (options.autoUpdate !== false) {
|
|
10628
|
-
await startSilentUpgrade("9.
|
|
10622
|
+
await startSilentUpgrade("9.68.0");
|
|
10629
10623
|
}
|
|
10630
10624
|
const { org, name, version } = parseIdentifier(identifier);
|
|
10631
10625
|
let composeId;
|
|
@@ -10677,6 +10671,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
10677
10671
|
volumeVersions: Object.keys(options.volumeVersion).length > 0 ? options.volumeVersion : void 0,
|
|
10678
10672
|
conversationId: options.conversation,
|
|
10679
10673
|
modelProvider: options.modelProvider,
|
|
10674
|
+
appendSystemPrompt: options.appendSystemPrompt,
|
|
10680
10675
|
checkEnv: options.checkEnv || void 0,
|
|
10681
10676
|
debugNoMockClaude: options.debugNoMockClaude || void 0
|
|
10682
10677
|
});
|
|
@@ -10724,6 +10719,9 @@ var resumeCommand = new Command9().name("resume").description("Resume an agent r
|
|
|
10724
10719
|
).option(
|
|
10725
10720
|
"--model-provider <type>",
|
|
10726
10721
|
"Override model provider (e.g., anthropic-api-key)"
|
|
10722
|
+
).option(
|
|
10723
|
+
"--append-system-prompt <text>",
|
|
10724
|
+
"Append text to the agent's system prompt"
|
|
10727
10725
|
).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
10726
|
withErrorHandler(
|
|
10729
10727
|
async (checkpointId, prompt, options, command) => {
|
|
@@ -10746,6 +10744,7 @@ var resumeCommand = new Command9().name("resume").description("Resume an agent r
|
|
|
10746
10744
|
secrets: loadedSecrets,
|
|
10747
10745
|
volumeVersions: Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0,
|
|
10748
10746
|
modelProvider: options.modelProvider || allOpts.modelProvider,
|
|
10747
|
+
appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
|
|
10749
10748
|
checkEnv: options.checkEnv || allOpts.checkEnv || void 0,
|
|
10750
10749
|
debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude || void 0
|
|
10751
10750
|
});
|
|
@@ -10786,6 +10785,9 @@ var continueCommand = new Command10().name("continue").description(
|
|
|
10786
10785
|
).option(
|
|
10787
10786
|
"--model-provider <type>",
|
|
10788
10787
|
"Override model provider (e.g., anthropic-api-key)"
|
|
10788
|
+
).option(
|
|
10789
|
+
"--append-system-prompt <text>",
|
|
10790
|
+
"Append text to the agent's system prompt"
|
|
10789
10791
|
).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
10792
|
withErrorHandler(
|
|
10791
10793
|
async (agentSessionId, prompt, options, command) => {
|
|
@@ -10808,6 +10810,7 @@ var continueCommand = new Command10().name("continue").description(
|
|
|
10808
10810
|
vars: Object.keys(vars).length > 0 ? vars : void 0,
|
|
10809
10811
|
secrets: loadedSecrets,
|
|
10810
10812
|
modelProvider: options.modelProvider || allOpts.modelProvider,
|
|
10813
|
+
appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
|
|
10811
10814
|
checkEnv: options.checkEnv || allOpts.checkEnv || void 0,
|
|
10812
10815
|
debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude || void 0
|
|
10813
10816
|
});
|
|
@@ -12345,7 +12348,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
12345
12348
|
withErrorHandler(
|
|
12346
12349
|
async (prompt, options) => {
|
|
12347
12350
|
if (options.autoUpdate !== false) {
|
|
12348
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
12351
|
+
const shouldExit = await checkAndUpgrade("9.68.0", prompt);
|
|
12349
12352
|
if (shouldExit) {
|
|
12350
12353
|
process.exit(0);
|
|
12351
12354
|
}
|
|
@@ -17690,13 +17693,13 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17690
17693
|
if (latestVersion === null) {
|
|
17691
17694
|
throw new Error("Could not check for updates. Please try again later.");
|
|
17692
17695
|
}
|
|
17693
|
-
if (latestVersion === "9.
|
|
17694
|
-
console.log(chalk86.green(`\u2713 Already up to date (${"9.
|
|
17696
|
+
if (latestVersion === "9.68.0") {
|
|
17697
|
+
console.log(chalk86.green(`\u2713 Already up to date (${"9.68.0"})`));
|
|
17695
17698
|
return;
|
|
17696
17699
|
}
|
|
17697
17700
|
console.log(
|
|
17698
17701
|
chalk86.yellow(
|
|
17699
|
-
`Current version: ${"9.
|
|
17702
|
+
`Current version: ${"9.68.0"} -> Latest version: ${latestVersion}`
|
|
17700
17703
|
)
|
|
17701
17704
|
);
|
|
17702
17705
|
console.log();
|
|
@@ -17723,7 +17726,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17723
17726
|
const success = await performUpgrade(packageManager);
|
|
17724
17727
|
if (success) {
|
|
17725
17728
|
console.log(
|
|
17726
|
-
chalk86.green(`\u2713 Upgraded from ${"9.
|
|
17729
|
+
chalk86.green(`\u2713 Upgraded from ${"9.68.0"} to ${latestVersion}`)
|
|
17727
17730
|
);
|
|
17728
17731
|
return;
|
|
17729
17732
|
}
|
|
@@ -17737,7 +17740,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
|
|
|
17737
17740
|
|
|
17738
17741
|
// src/index.ts
|
|
17739
17742
|
var program = new Command95();
|
|
17740
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
17743
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.68.0");
|
|
17741
17744
|
program.addCommand(authCommand);
|
|
17742
17745
|
program.addCommand(infoCommand);
|
|
17743
17746
|
program.addCommand(composeCommand);
|