@vm0/cli 4.26.1 → 4.27.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 +77 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -12370,7 +12370,7 @@ var agentDefinitionSchema = external_exports.object({
|
|
|
12370
12370
|
* is routed through mitmproxy -> VM0 Proxy for decryption.
|
|
12371
12371
|
* Default: false (plaintext secrets in env vars)
|
|
12372
12372
|
*/
|
|
12373
|
-
|
|
12373
|
+
experimental_network_security: external_exports.boolean().optional().default(false),
|
|
12374
12374
|
/**
|
|
12375
12375
|
* Path to instructions file (e.g., AGENTS.md).
|
|
12376
12376
|
* Auto-uploaded as volume and mounted at /home/user/.claude/CLAUDE.md
|
|
@@ -14038,6 +14038,50 @@ function validateAgentCompose(config2) {
|
|
|
14038
14038
|
}
|
|
14039
14039
|
}
|
|
14040
14040
|
}
|
|
14041
|
+
if (agent.experimental_secrets !== void 0) {
|
|
14042
|
+
if (!Array.isArray(agent.experimental_secrets)) {
|
|
14043
|
+
return {
|
|
14044
|
+
valid: false,
|
|
14045
|
+
error: "agent.experimental_secrets must be an array of strings"
|
|
14046
|
+
};
|
|
14047
|
+
}
|
|
14048
|
+
for (const item of agent.experimental_secrets) {
|
|
14049
|
+
if (typeof item !== "string") {
|
|
14050
|
+
return {
|
|
14051
|
+
valid: false,
|
|
14052
|
+
error: "Each entry in experimental_secrets must be a string"
|
|
14053
|
+
};
|
|
14054
|
+
}
|
|
14055
|
+
if (item.length === 0) {
|
|
14056
|
+
return {
|
|
14057
|
+
valid: false,
|
|
14058
|
+
error: "experimental_secrets entries cannot be empty strings"
|
|
14059
|
+
};
|
|
14060
|
+
}
|
|
14061
|
+
}
|
|
14062
|
+
}
|
|
14063
|
+
if (agent.experimental_vars !== void 0) {
|
|
14064
|
+
if (!Array.isArray(agent.experimental_vars)) {
|
|
14065
|
+
return {
|
|
14066
|
+
valid: false,
|
|
14067
|
+
error: "agent.experimental_vars must be an array of strings"
|
|
14068
|
+
};
|
|
14069
|
+
}
|
|
14070
|
+
for (const item of agent.experimental_vars) {
|
|
14071
|
+
if (typeof item !== "string") {
|
|
14072
|
+
return {
|
|
14073
|
+
valid: false,
|
|
14074
|
+
error: "Each entry in experimental_vars must be a string"
|
|
14075
|
+
};
|
|
14076
|
+
}
|
|
14077
|
+
if (item.length === 0) {
|
|
14078
|
+
return {
|
|
14079
|
+
valid: false,
|
|
14080
|
+
error: "experimental_vars entries cannot be empty strings"
|
|
14081
|
+
};
|
|
14082
|
+
}
|
|
14083
|
+
}
|
|
14084
|
+
}
|
|
14041
14085
|
const agentVolumes = agent.volumes;
|
|
14042
14086
|
if (agentVolumes && Array.isArray(agentVolumes) && agentVolumes.length > 0) {
|
|
14043
14087
|
const volumesSection = cfg.volumes;
|
|
@@ -14482,6 +14526,33 @@ async function uploadSkill(skillUrl) {
|
|
|
14482
14526
|
}
|
|
14483
14527
|
|
|
14484
14528
|
// src/commands/compose.ts
|
|
14529
|
+
function transformExperimentalShorthand(agent) {
|
|
14530
|
+
const experimentalSecrets = agent.experimental_secrets;
|
|
14531
|
+
const experimentalVars = agent.experimental_vars;
|
|
14532
|
+
if (!experimentalSecrets && !experimentalVars) {
|
|
14533
|
+
return;
|
|
14534
|
+
}
|
|
14535
|
+
const environment = agent.environment || {};
|
|
14536
|
+
if (experimentalSecrets) {
|
|
14537
|
+
for (const secretName of experimentalSecrets) {
|
|
14538
|
+
if (!(secretName in environment)) {
|
|
14539
|
+
environment[secretName] = "${{ secrets." + secretName + " }}";
|
|
14540
|
+
}
|
|
14541
|
+
}
|
|
14542
|
+
delete agent.experimental_secrets;
|
|
14543
|
+
}
|
|
14544
|
+
if (experimentalVars) {
|
|
14545
|
+
for (const varName of experimentalVars) {
|
|
14546
|
+
if (!(varName in environment)) {
|
|
14547
|
+
environment[varName] = "${{ vars." + varName + " }}";
|
|
14548
|
+
}
|
|
14549
|
+
}
|
|
14550
|
+
delete agent.experimental_vars;
|
|
14551
|
+
}
|
|
14552
|
+
if (Object.keys(environment).length > 0) {
|
|
14553
|
+
agent.environment = environment;
|
|
14554
|
+
}
|
|
14555
|
+
}
|
|
14485
14556
|
var composeCommand = new Command().name("compose").description("Create or update agent compose").argument("<config-file>", "Path to config YAML file").action(async (configFile) => {
|
|
14486
14557
|
try {
|
|
14487
14558
|
if (!existsSync3(configFile)) {
|
|
@@ -14506,6 +14577,9 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
14506
14577
|
}
|
|
14507
14578
|
const cfg = config2;
|
|
14508
14579
|
const agentsConfig = cfg.agents;
|
|
14580
|
+
for (const agentConfig of Object.values(agentsConfig)) {
|
|
14581
|
+
transformExperimentalShorthand(agentConfig);
|
|
14582
|
+
}
|
|
14509
14583
|
for (const [name, agentConfig] of Object.entries(agentsConfig)) {
|
|
14510
14584
|
const image = agentConfig.image;
|
|
14511
14585
|
if (image) {
|
|
@@ -16723,7 +16797,7 @@ async function autoPullArtifact(runOutput, artifactDir) {
|
|
|
16723
16797
|
}
|
|
16724
16798
|
var cookCmd = new Command13().name("cook").description("One-click agent preparation and execution from vm0.yaml");
|
|
16725
16799
|
cookCmd.argument("[prompt]", "Prompt for the agent").action(async (prompt) => {
|
|
16726
|
-
const shouldExit = await checkAndUpgrade("4.
|
|
16800
|
+
const shouldExit = await checkAndUpgrade("4.27.0", prompt);
|
|
16727
16801
|
if (shouldExit) {
|
|
16728
16802
|
process.exit(0);
|
|
16729
16803
|
}
|
|
@@ -17863,7 +17937,7 @@ var initCommand3 = new Command23().name("init").description("Initialize a new VM
|
|
|
17863
17937
|
|
|
17864
17938
|
// src/index.ts
|
|
17865
17939
|
var program = new Command24();
|
|
17866
|
-
program.name("vm0").description("VM0 CLI - A modern build tool").version("4.
|
|
17940
|
+
program.name("vm0").description("VM0 CLI - A modern build tool").version("4.27.0");
|
|
17867
17941
|
program.command("info").description("Display environment information").action(async () => {
|
|
17868
17942
|
console.log(chalk25.bold("System Information:"));
|
|
17869
17943
|
console.log(`Node Version: ${process.version}`);
|