@vm0/cli 9.114.1 → 9.115.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/{chunk-KFF4XQ5R.js → chunk-ONKLFZRY.js} +63 -19
- package/{chunk-KFF4XQ5R.js.map → chunk-ONKLFZRY.js.map} +1 -1
- package/index.js +60 -15
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/zero.js +4 -3
- package/zero.js.map +1 -1
package/index.js
CHANGED
|
@@ -50,6 +50,7 @@ import {
|
|
|
50
50
|
loadConfig,
|
|
51
51
|
loadValues,
|
|
52
52
|
paginate,
|
|
53
|
+
parseArtifact,
|
|
53
54
|
parseGitHubTreeUrl,
|
|
54
55
|
parseGitHubUrl,
|
|
55
56
|
parseIdentifier,
|
|
@@ -70,7 +71,7 @@ import {
|
|
|
70
71
|
source_default,
|
|
71
72
|
volumeConfigSchema,
|
|
72
73
|
withErrorHandler
|
|
73
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-ONKLFZRY.js";
|
|
74
75
|
|
|
75
76
|
// src/index.ts
|
|
76
77
|
init_esm_shims();
|
|
@@ -463,7 +464,7 @@ function getConfigPath() {
|
|
|
463
464
|
return join(homedir(), ".vm0", "config.json");
|
|
464
465
|
}
|
|
465
466
|
var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
|
|
466
|
-
console.log(source_default.bold(`VM0 CLI v${"9.
|
|
467
|
+
console.log(source_default.bold(`VM0 CLI v${"9.115.0"}`));
|
|
467
468
|
console.log();
|
|
468
469
|
const config = await loadConfig();
|
|
469
470
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -4492,7 +4493,7 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
4492
4493
|
options.autoUpdate = false;
|
|
4493
4494
|
}
|
|
4494
4495
|
if (options.autoUpdate !== false) {
|
|
4495
|
-
await startSilentUpgrade("9.
|
|
4496
|
+
await startSilentUpgrade("9.115.0");
|
|
4496
4497
|
}
|
|
4497
4498
|
try {
|
|
4498
4499
|
let result;
|
|
@@ -4539,9 +4540,19 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4539
4540
|
"Secrets for ${{ secrets.xxx }} (repeatable, falls back to --env-file or env vars)",
|
|
4540
4541
|
collectKeyValue,
|
|
4541
4542
|
{}
|
|
4542
|
-
).option(
|
|
4543
|
-
"--artifact
|
|
4544
|
-
"Artifact
|
|
4543
|
+
).option(
|
|
4544
|
+
"--artifact <name[:version]>",
|
|
4545
|
+
"Artifact storage (format: name or name:version)"
|
|
4546
|
+
).addOption(
|
|
4547
|
+
new Option(
|
|
4548
|
+
"--artifact-name <name>",
|
|
4549
|
+
"[deprecated: use --artifact] Artifact storage name"
|
|
4550
|
+
).hideHelp()
|
|
4551
|
+
).addOption(
|
|
4552
|
+
new Option(
|
|
4553
|
+
"--artifact-version <hash>",
|
|
4554
|
+
"[deprecated: use --artifact] Artifact version hash"
|
|
4555
|
+
).hideHelp()
|
|
4545
4556
|
).option(
|
|
4546
4557
|
"--volume-version <name=version>",
|
|
4547
4558
|
"Volume version override (repeatable, format: volumeName=version)",
|
|
@@ -4572,7 +4583,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4572
4583
|
withErrorHandler(
|
|
4573
4584
|
async (identifier, prompt, options) => {
|
|
4574
4585
|
if (options.autoUpdate !== false) {
|
|
4575
|
-
await startSilentUpgrade("9.
|
|
4586
|
+
await startSilentUpgrade("9.115.0");
|
|
4576
4587
|
}
|
|
4577
4588
|
const { name, version } = parseIdentifier(identifier);
|
|
4578
4589
|
let composeId;
|
|
@@ -4612,14 +4623,32 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4612
4623
|
secretNames,
|
|
4613
4624
|
options.envFile
|
|
4614
4625
|
);
|
|
4626
|
+
let artifactName = options.artifactName;
|
|
4627
|
+
let artifactVersion = options.artifactVersion;
|
|
4628
|
+
if (options.artifact) {
|
|
4629
|
+
if (options.artifactName || options.artifactVersion) {
|
|
4630
|
+
throw new Error(
|
|
4631
|
+
"Cannot use --artifact with --artifact-name or --artifact-version. Use --artifact <name[:version]> instead."
|
|
4632
|
+
);
|
|
4633
|
+
}
|
|
4634
|
+
const parsed = parseArtifact(options.artifact);
|
|
4635
|
+
artifactName = parsed.artifactName;
|
|
4636
|
+
artifactVersion = parsed.artifactVersion;
|
|
4637
|
+
} else if (options.artifactName) {
|
|
4638
|
+
console.error(
|
|
4639
|
+
source_default.yellow(
|
|
4640
|
+
"\u26A0 --artifact-name is deprecated, use --artifact <name[:version]> instead"
|
|
4641
|
+
)
|
|
4642
|
+
);
|
|
4643
|
+
}
|
|
4615
4644
|
const response = await createRun({
|
|
4616
4645
|
// Use agentComposeVersionId if resolved, otherwise use agentComposeId (resolves to HEAD)
|
|
4617
4646
|
...agentComposeVersionId ? { agentComposeVersionId } : { agentComposeId: composeId },
|
|
4618
4647
|
prompt,
|
|
4619
4648
|
vars,
|
|
4620
4649
|
secrets,
|
|
4621
|
-
artifactName
|
|
4622
|
-
artifactVersion
|
|
4650
|
+
artifactName,
|
|
4651
|
+
artifactVersion,
|
|
4623
4652
|
memoryName: options.memory,
|
|
4624
4653
|
volumeVersions: Object.keys(options.volumeVersion).length > 0 ? options.volumeVersion : void 0,
|
|
4625
4654
|
conversationId: options.conversation,
|
|
@@ -4674,6 +4703,9 @@ var resumeCommand = new Command().name("resume").description("Resume an agent ru
|
|
|
4674
4703
|
"Volume version override (repeatable)",
|
|
4675
4704
|
collectVolumeVersions,
|
|
4676
4705
|
{}
|
|
4706
|
+
).option(
|
|
4707
|
+
"--artifact <name[:version]>",
|
|
4708
|
+
"Artifact storage (format: name or name:version)"
|
|
4677
4709
|
).option(
|
|
4678
4710
|
"--append-system-prompt <text>",
|
|
4679
4711
|
"Append text to the agent's system prompt"
|
|
@@ -4704,11 +4736,16 @@ var resumeCommand = new Command().name("resume").description("Resume an agent ru
|
|
|
4704
4736
|
const requiredSecretNames = checkpointInfo.agentComposeSnapshot.secretNames || [];
|
|
4705
4737
|
const envFile = options.envFile || allOpts.envFile;
|
|
4706
4738
|
const loadedSecrets = loadValues(secrets, requiredSecretNames, envFile);
|
|
4739
|
+
const artifactParsed = parseArtifact(
|
|
4740
|
+
options.artifact || allOpts.artifact
|
|
4741
|
+
);
|
|
4707
4742
|
const response = await createRun({
|
|
4708
4743
|
checkpointId,
|
|
4709
4744
|
prompt,
|
|
4710
4745
|
vars: Object.keys(vars).length > 0 ? vars : void 0,
|
|
4711
4746
|
secrets: loadedSecrets,
|
|
4747
|
+
artifactName: artifactParsed?.artifactName,
|
|
4748
|
+
artifactVersion: artifactParsed?.artifactVersion,
|
|
4712
4749
|
volumeVersions: Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0,
|
|
4713
4750
|
appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
|
|
4714
4751
|
disallowedTools: options.disallowedTools || allOpts.disallowedTools,
|
|
@@ -4753,6 +4790,9 @@ var continueCommand = new Command().name("continue").description(
|
|
|
4753
4790
|
"Secrets for ${{ secrets.xxx }} (repeatable, falls back to --env-file or env vars)",
|
|
4754
4791
|
collectKeyValue,
|
|
4755
4792
|
{}
|
|
4793
|
+
).option(
|
|
4794
|
+
"--artifact <name[:version]>",
|
|
4795
|
+
"Artifact storage (format: name or name:version)"
|
|
4756
4796
|
).option(
|
|
4757
4797
|
"--append-system-prompt <text>",
|
|
4758
4798
|
"Append text to the agent's system prompt"
|
|
@@ -4784,11 +4824,16 @@ var continueCommand = new Command().name("continue").description(
|
|
|
4784
4824
|
const requiredSecretNames = sessionInfo.secretNames || [];
|
|
4785
4825
|
const envFile = options.envFile || allOpts.envFile;
|
|
4786
4826
|
const loadedSecrets = loadValues(secrets, requiredSecretNames, envFile);
|
|
4827
|
+
const artifactParsed = parseArtifact(
|
|
4828
|
+
options.artifact || allOpts.artifact
|
|
4829
|
+
);
|
|
4787
4830
|
const response = await createRun({
|
|
4788
4831
|
sessionId: agentSessionId,
|
|
4789
4832
|
prompt,
|
|
4790
4833
|
vars: Object.keys(vars).length > 0 ? vars : void 0,
|
|
4791
4834
|
secrets: loadedSecrets,
|
|
4835
|
+
artifactName: artifactParsed?.artifactName,
|
|
4836
|
+
artifactVersion: artifactParsed?.artifactVersion,
|
|
4792
4837
|
appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
|
|
4793
4838
|
disallowedTools: options.disallowedTools || allOpts.disallowedTools,
|
|
4794
4839
|
tools: options.tools || allOpts.tools,
|
|
@@ -6313,7 +6358,7 @@ var cookAction = new Command().name("cook").description("Quick start: prepare, c
|
|
|
6313
6358
|
withErrorHandler(
|
|
6314
6359
|
async (prompt, options) => {
|
|
6315
6360
|
if (options.autoUpdate !== false) {
|
|
6316
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
6361
|
+
const shouldExit = await checkAndUpgrade("9.115.0", prompt);
|
|
6317
6362
|
if (shouldExit) {
|
|
6318
6363
|
process.exit(0);
|
|
6319
6364
|
}
|
|
@@ -7080,13 +7125,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
7080
7125
|
if (latestVersion === null) {
|
|
7081
7126
|
throw new Error("Could not check for updates. Please try again later.");
|
|
7082
7127
|
}
|
|
7083
|
-
if (latestVersion === "9.
|
|
7084
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.
|
|
7128
|
+
if (latestVersion === "9.115.0") {
|
|
7129
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.115.0"})`));
|
|
7085
7130
|
return;
|
|
7086
7131
|
}
|
|
7087
7132
|
console.log(
|
|
7088
7133
|
source_default.yellow(
|
|
7089
|
-
`Current version: ${"9.
|
|
7134
|
+
`Current version: ${"9.115.0"} -> Latest version: ${latestVersion}`
|
|
7090
7135
|
)
|
|
7091
7136
|
);
|
|
7092
7137
|
console.log();
|
|
@@ -7113,7 +7158,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
7113
7158
|
const success = await performUpgrade(packageManager);
|
|
7114
7159
|
if (success) {
|
|
7115
7160
|
console.log(
|
|
7116
|
-
source_default.green(`\u2713 Upgraded from ${"9.
|
|
7161
|
+
source_default.green(`\u2713 Upgraded from ${"9.115.0"} to ${latestVersion}`)
|
|
7117
7162
|
);
|
|
7118
7163
|
return;
|
|
7119
7164
|
}
|
|
@@ -7180,7 +7225,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
7180
7225
|
|
|
7181
7226
|
// src/index.ts
|
|
7182
7227
|
var program = new Command();
|
|
7183
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
7228
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.115.0");
|
|
7184
7229
|
program.addCommand(authCommand);
|
|
7185
7230
|
program.addCommand(infoCommand);
|
|
7186
7231
|
program.addCommand(composeCommand);
|