@vm0/cli 9.115.0 → 9.116.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-ONKLFZRY.js → chunk-N3EY4HQ3.js} +39 -3
- package/{chunk-ONKLFZRY.js.map → chunk-N3EY4HQ3.js.map} +1 -1
- package/index.js +39 -15
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/zero.js +2 -2
package/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
clearConfig,
|
|
15
15
|
collectKeyValue,
|
|
16
16
|
collectVolumeVersions,
|
|
17
|
+
collectVolumes,
|
|
17
18
|
commitStorage,
|
|
18
19
|
configureGlobalProxyFromEnv,
|
|
19
20
|
createOrUpdateCompose,
|
|
@@ -71,7 +72,7 @@ import {
|
|
|
71
72
|
source_default,
|
|
72
73
|
volumeConfigSchema,
|
|
73
74
|
withErrorHandler
|
|
74
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-N3EY4HQ3.js";
|
|
75
76
|
|
|
76
77
|
// src/index.ts
|
|
77
78
|
init_esm_shims();
|
|
@@ -464,7 +465,7 @@ function getConfigPath() {
|
|
|
464
465
|
return join(homedir(), ".vm0", "config.json");
|
|
465
466
|
}
|
|
466
467
|
var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
|
|
467
|
-
console.log(source_default.bold(`VM0 CLI v${"9.
|
|
468
|
+
console.log(source_default.bold(`VM0 CLI v${"9.116.0"}`));
|
|
468
469
|
console.log();
|
|
469
470
|
const config = await loadConfig();
|
|
470
471
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -4493,7 +4494,7 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
4493
4494
|
options.autoUpdate = false;
|
|
4494
4495
|
}
|
|
4495
4496
|
if (options.autoUpdate !== false) {
|
|
4496
|
-
await startSilentUpgrade("9.
|
|
4497
|
+
await startSilentUpgrade("9.116.0");
|
|
4497
4498
|
}
|
|
4498
4499
|
try {
|
|
4499
4500
|
let result;
|
|
@@ -4558,6 +4559,11 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4558
4559
|
"Volume version override (repeatable, format: volumeName=version)",
|
|
4559
4560
|
collectVolumeVersions,
|
|
4560
4561
|
{}
|
|
4562
|
+
).option(
|
|
4563
|
+
"--volume <volume>",
|
|
4564
|
+
"Mount a volume (repeatable, format: name:/path or name:version:/path)",
|
|
4565
|
+
collectVolumes,
|
|
4566
|
+
[]
|
|
4561
4567
|
).option("--memory <name>", "Memory storage name").option(
|
|
4562
4568
|
"--conversation <id>",
|
|
4563
4569
|
"Resume from conversation ID (for fine-grained control)"
|
|
@@ -4583,7 +4589,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4583
4589
|
withErrorHandler(
|
|
4584
4590
|
async (identifier, prompt, options) => {
|
|
4585
4591
|
if (options.autoUpdate !== false) {
|
|
4586
|
-
await startSilentUpgrade("9.
|
|
4592
|
+
await startSilentUpgrade("9.116.0");
|
|
4587
4593
|
}
|
|
4588
4594
|
const { name, version } = parseIdentifier(identifier);
|
|
4589
4595
|
let composeId;
|
|
@@ -4611,7 +4617,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4611
4617
|
agentComposeVersionId = versionInfo.versionId;
|
|
4612
4618
|
} catch (error) {
|
|
4613
4619
|
throw new Error(`Version not found: ${version}`, {
|
|
4614
|
-
cause: error
|
|
4620
|
+
cause: error
|
|
4615
4621
|
});
|
|
4616
4622
|
}
|
|
4617
4623
|
}
|
|
@@ -4641,6 +4647,8 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4641
4647
|
)
|
|
4642
4648
|
);
|
|
4643
4649
|
}
|
|
4650
|
+
const volumeVersions = Object.keys(options.volumeVersion).length > 0 ? options.volumeVersion : void 0;
|
|
4651
|
+
const additionalVolumes = options.volume.length > 0 ? options.volume : void 0;
|
|
4644
4652
|
const response = await createRun({
|
|
4645
4653
|
// Use agentComposeVersionId if resolved, otherwise use agentComposeId (resolves to HEAD)
|
|
4646
4654
|
...agentComposeVersionId ? { agentComposeVersionId } : { agentComposeId: composeId },
|
|
@@ -4650,7 +4658,8 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4650
4658
|
artifactName,
|
|
4651
4659
|
artifactVersion,
|
|
4652
4660
|
memoryName: options.memory,
|
|
4653
|
-
volumeVersions
|
|
4661
|
+
volumeVersions,
|
|
4662
|
+
additionalVolumes,
|
|
4654
4663
|
conversationId: options.conversation,
|
|
4655
4664
|
appendSystemPrompt: options.appendSystemPrompt,
|
|
4656
4665
|
disallowedTools: options.disallowedTools,
|
|
@@ -4706,6 +4715,11 @@ var resumeCommand = new Command().name("resume").description("Resume an agent ru
|
|
|
4706
4715
|
).option(
|
|
4707
4716
|
"--artifact <name[:version]>",
|
|
4708
4717
|
"Artifact storage (format: name or name:version)"
|
|
4718
|
+
).option(
|
|
4719
|
+
"--volume <volume>",
|
|
4720
|
+
"Mount a volume (repeatable, format: name:/path or name:version:/path)",
|
|
4721
|
+
collectVolumes,
|
|
4722
|
+
[]
|
|
4709
4723
|
).option(
|
|
4710
4724
|
"--append-system-prompt <text>",
|
|
4711
4725
|
"Append text to the agent's system prompt"
|
|
@@ -4739,14 +4753,18 @@ var resumeCommand = new Command().name("resume").description("Resume an agent ru
|
|
|
4739
4753
|
const artifactParsed = parseArtifact(
|
|
4740
4754
|
options.artifact || allOpts.artifact
|
|
4741
4755
|
);
|
|
4756
|
+
const resolvedVars = Object.keys(vars).length > 0 ? vars : void 0;
|
|
4757
|
+
const volumeVersions = Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0;
|
|
4758
|
+
const additionalVolumes = allOpts.volume.length > 0 ? allOpts.volume : void 0;
|
|
4742
4759
|
const response = await createRun({
|
|
4743
4760
|
checkpointId,
|
|
4744
4761
|
prompt,
|
|
4745
|
-
vars:
|
|
4762
|
+
vars: resolvedVars,
|
|
4746
4763
|
secrets: loadedSecrets,
|
|
4747
4764
|
artifactName: artifactParsed?.artifactName,
|
|
4748
4765
|
artifactVersion: artifactParsed?.artifactVersion,
|
|
4749
|
-
volumeVersions
|
|
4766
|
+
volumeVersions,
|
|
4767
|
+
additionalVolumes,
|
|
4750
4768
|
appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
|
|
4751
4769
|
disallowedTools: options.disallowedTools || allOpts.disallowedTools,
|
|
4752
4770
|
tools: options.tools || allOpts.tools,
|
|
@@ -4754,7 +4772,7 @@ var resumeCommand = new Command().name("resume").description("Resume an agent ru
|
|
|
4754
4772
|
permissionPolicies: parsePermissionPolicies(
|
|
4755
4773
|
options.permissionPolicies || allOpts.permissionPolicies
|
|
4756
4774
|
),
|
|
4757
|
-
debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude
|
|
4775
|
+
debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude
|
|
4758
4776
|
});
|
|
4759
4777
|
if (response.status === "failed") {
|
|
4760
4778
|
throw new Error(
|
|
@@ -4793,6 +4811,11 @@ var continueCommand = new Command().name("continue").description(
|
|
|
4793
4811
|
).option(
|
|
4794
4812
|
"--artifact <name[:version]>",
|
|
4795
4813
|
"Artifact storage (format: name or name:version)"
|
|
4814
|
+
).option(
|
|
4815
|
+
"--volume <volume>",
|
|
4816
|
+
"Mount a volume (repeatable, format: name:/path or name:version:/path)",
|
|
4817
|
+
collectVolumes,
|
|
4818
|
+
[]
|
|
4796
4819
|
).option(
|
|
4797
4820
|
"--append-system-prompt <text>",
|
|
4798
4821
|
"Append text to the agent's system prompt"
|
|
@@ -4834,6 +4857,7 @@ var continueCommand = new Command().name("continue").description(
|
|
|
4834
4857
|
secrets: loadedSecrets,
|
|
4835
4858
|
artifactName: artifactParsed?.artifactName,
|
|
4836
4859
|
artifactVersion: artifactParsed?.artifactVersion,
|
|
4860
|
+
additionalVolumes: allOpts.volume.length > 0 ? allOpts.volume : void 0,
|
|
4837
4861
|
appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
|
|
4838
4862
|
disallowedTools: options.disallowedTools || allOpts.disallowedTools,
|
|
4839
4863
|
tools: options.tools || allOpts.tools,
|
|
@@ -6358,7 +6382,7 @@ var cookAction = new Command().name("cook").description("Quick start: prepare, c
|
|
|
6358
6382
|
withErrorHandler(
|
|
6359
6383
|
async (prompt, options) => {
|
|
6360
6384
|
if (options.autoUpdate !== false) {
|
|
6361
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
6385
|
+
const shouldExit = await checkAndUpgrade("9.116.0", prompt);
|
|
6362
6386
|
if (shouldExit) {
|
|
6363
6387
|
process.exit(0);
|
|
6364
6388
|
}
|
|
@@ -7125,13 +7149,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
7125
7149
|
if (latestVersion === null) {
|
|
7126
7150
|
throw new Error("Could not check for updates. Please try again later.");
|
|
7127
7151
|
}
|
|
7128
|
-
if (latestVersion === "9.
|
|
7129
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.
|
|
7152
|
+
if (latestVersion === "9.116.0") {
|
|
7153
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.116.0"})`));
|
|
7130
7154
|
return;
|
|
7131
7155
|
}
|
|
7132
7156
|
console.log(
|
|
7133
7157
|
source_default.yellow(
|
|
7134
|
-
`Current version: ${"9.
|
|
7158
|
+
`Current version: ${"9.116.0"} -> Latest version: ${latestVersion}`
|
|
7135
7159
|
)
|
|
7136
7160
|
);
|
|
7137
7161
|
console.log();
|
|
@@ -7158,7 +7182,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
7158
7182
|
const success = await performUpgrade(packageManager);
|
|
7159
7183
|
if (success) {
|
|
7160
7184
|
console.log(
|
|
7161
|
-
source_default.green(`\u2713 Upgraded from ${"9.
|
|
7185
|
+
source_default.green(`\u2713 Upgraded from ${"9.116.0"} to ${latestVersion}`)
|
|
7162
7186
|
);
|
|
7163
7187
|
return;
|
|
7164
7188
|
}
|
|
@@ -7225,7 +7249,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
7225
7249
|
|
|
7226
7250
|
// src/index.ts
|
|
7227
7251
|
var program = new Command();
|
|
7228
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
7252
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.116.0");
|
|
7229
7253
|
program.addCommand(authCommand);
|
|
7230
7254
|
program.addCommand(infoCommand);
|
|
7231
7255
|
program.addCommand(composeCommand);
|