@vm0/cli 6.4.0 → 7.0.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.
Files changed (2) hide show
  1. package/index.js +9 -79
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -424,9 +424,6 @@ var appStringSchema = z3.string().superRefine((val, ctx) => {
424
424
  });
425
425
  }
426
426
  });
427
- var nonEmptyStringArraySchema = z3.array(
428
- z3.string().min(1, "Array entries cannot be empty strings")
429
- );
430
427
  var agentDefinitionSchema = z3.object({
431
428
  description: z3.string().optional(),
432
429
  /**
@@ -471,17 +468,7 @@ var agentDefinitionSchema = z3.object({
471
468
  * Requires experimental_runner to be configured.
472
469
  * When enabled, filters outbound traffic by domain/IP rules.
473
470
  */
474
- experimental_firewall: experimentalFirewallSchema.optional(),
475
- /**
476
- * Array of secret names to inject from the scope's secret store.
477
- * Each entry must be a non-empty string.
478
- */
479
- experimental_secrets: nonEmptyStringArraySchema.optional(),
480
- /**
481
- * Array of variable names to inject from the scope's variable store.
482
- * Each entry must be a non-empty string.
483
- */
484
- experimental_vars: nonEmptyStringArraySchema.optional()
471
+ experimental_firewall: experimentalFirewallSchema.optional()
485
472
  });
486
473
  var agentComposeContentSchema = z3.object({
487
474
  version: z3.string().min(1, "Version is required"),
@@ -641,7 +628,7 @@ var unifiedRunRequestSchema = z4.object({
641
628
  volumeVersions: z4.record(z4.string(), z4.string()).optional(),
642
629
  // Debug flag to force real Claude in mock environments (internal use only)
643
630
  debugNoMockClaude: z4.boolean().optional(),
644
- // Model provider for automatic LLM credential injection
631
+ // Model provider for automatic credential injection
645
632
  modelProvider: z4.string().optional(),
646
633
  // Required
647
634
  prompt: z4.string().min(1, "Missing prompt")
@@ -4066,33 +4053,6 @@ function getSecretsFromComposeContent(content) {
4066
4053
  const grouped = groupVariablesBySource(refs);
4067
4054
  return new Set(grouped.secrets.map((r) => r.name));
4068
4055
  }
4069
- function transformExperimentalShorthand(agent) {
4070
- const experimentalSecrets = agent.experimental_secrets;
4071
- const experimentalVars = agent.experimental_vars;
4072
- if (!experimentalSecrets && !experimentalVars) {
4073
- return;
4074
- }
4075
- const environment = agent.environment || {};
4076
- if (experimentalSecrets) {
4077
- for (const secretName of experimentalSecrets) {
4078
- if (!(secretName in environment)) {
4079
- environment[secretName] = "${{ secrets." + secretName + " }}";
4080
- }
4081
- }
4082
- delete agent.experimental_secrets;
4083
- }
4084
- if (experimentalVars) {
4085
- for (const varName of experimentalVars) {
4086
- if (!(varName in environment)) {
4087
- environment[varName] = "${{ vars." + varName + " }}";
4088
- }
4089
- }
4090
- delete agent.experimental_vars;
4091
- }
4092
- if (Object.keys(environment).length > 0) {
4093
- agent.environment = environment;
4094
- }
4095
- }
4096
4056
  var composeCommand = new Command().name("compose").description("Create or update agent compose").argument("<config-file>", "Path to config YAML file").option("-y, --yes", "Skip confirmation prompts for skill requirements").action(async (configFile, options) => {
4097
4057
  try {
4098
4058
  if (!existsSync3(configFile)) {
@@ -4117,9 +4077,6 @@ var composeCommand = new Command().name("compose").description("Create or update
4117
4077
  }
4118
4078
  const cfg = config;
4119
4079
  const agentsConfig = cfg.agents;
4120
- for (const agentConfig of Object.values(agentsConfig)) {
4121
- transformExperimentalShorthand(agentConfig);
4122
- }
4123
4080
  for (const [name, agentConfig] of Object.entries(agentsConfig)) {
4124
4081
  const image = agentConfig.image;
4125
4082
  if (image) {
@@ -6166,7 +6123,7 @@ var mainRunCommand = new Command2().name("run").description("Execute an agent").
6166
6123
  "Use realtime event streaming instead of polling (experimental)"
6167
6124
  ).option(
6168
6125
  "--model-provider <type>",
6169
- "Override model provider for LLM credentials (e.g., anthropic-api-key)"
6126
+ "Override model provider (e.g., anthropic-api-key)"
6170
6127
  ).addOption(new Option("--debug-no-mock-claude").hideHelp()).action(
6171
6128
  // eslint-disable-next-line complexity -- TODO: refactor complex function
6172
6129
  async (identifier, prompt, options) => {
@@ -6351,7 +6308,7 @@ var resumeCommand = new Command3().name("resume").description("Resume an agent r
6351
6308
  "Use realtime event streaming instead of polling (experimental)"
6352
6309
  ).option(
6353
6310
  "--model-provider <type>",
6354
- "Override model provider for LLM credentials (e.g., anthropic-api-key)"
6311
+ "Override model provider (e.g., anthropic-api-key)"
6355
6312
  ).addOption(new Option2("--debug-no-mock-claude").hideHelp()).action(
6356
6313
  // eslint-disable-next-line complexity -- TODO: refactor complex function
6357
6314
  async (checkpointId, prompt, options, command) => {
@@ -6472,7 +6429,7 @@ var continueCommand = new Command4().name("continue").description(
6472
6429
  "Use realtime event streaming instead of polling (experimental)"
6473
6430
  ).option(
6474
6431
  "--model-provider <type>",
6475
- "Override model provider for LLM credentials (e.g., anthropic-api-key)"
6432
+ "Override model provider (e.g., anthropic-api-key)"
6476
6433
  ).addOption(new Option3("--debug-no-mock-claude").hideHelp()).action(
6477
6434
  // eslint-disable-next-line complexity -- TODO: refactor complex function
6478
6435
  async (agentSessionId, prompt, options, command) => {
@@ -7889,7 +7846,7 @@ cookCmd.argument("[prompt]", "Prompt for the agent").option("-y, --yes", "Skip c
7889
7846
  // eslint-disable-next-line complexity -- TODO: refactor complex function
7890
7847
  async (prompt, options) => {
7891
7848
  if (!options.noAutoUpdate) {
7892
- const shouldExit = await checkAndUpgrade("6.4.0", prompt);
7849
+ const shouldExit = await checkAndUpgrade("7.0.0", prompt);
7893
7850
  if (shouldExit) {
7894
7851
  process.exit(0);
7895
7852
  }
@@ -9175,25 +9132,6 @@ function extractSecretsAndVars(config) {
9175
9132
  for (const ref of grouped.vars) {
9176
9133
  vars.add(ref.name);
9177
9134
  }
9178
- const cfg = config;
9179
- const agents = cfg.agents;
9180
- if (agents) {
9181
- const agentConfig = Object.values(agents)[0];
9182
- if (agentConfig) {
9183
- const expSecrets = agentConfig.experimental_secrets;
9184
- const expVars = agentConfig.experimental_vars;
9185
- if (expSecrets) {
9186
- for (const s of expSecrets) {
9187
- secrets.add(s);
9188
- }
9189
- }
9190
- if (expVars) {
9191
- for (const v of expVars) {
9192
- vars.add(v);
9193
- }
9194
- }
9195
- }
9196
- }
9197
9135
  secrets.add("VM0_TOKEN");
9198
9136
  return {
9199
9137
  secrets: Array.from(secrets).sort(),
@@ -9579,12 +9517,6 @@ function extractVarsAndSecrets() {
9579
9517
  if (!agent) {
9580
9518
  return result;
9581
9519
  }
9582
- if (agent.experimental_vars) {
9583
- result.vars.push(...agent.experimental_vars);
9584
- }
9585
- if (agent.experimental_secrets) {
9586
- result.secrets.push(...agent.experimental_secrets);
9587
- }
9588
9520
  if (agent.environment) {
9589
9521
  for (const value of Object.values(agent.environment)) {
9590
9522
  const varsMatches = value.matchAll(/\$\{\{\s*vars\.(\w+)\s*\}\}/g);
@@ -10700,9 +10632,7 @@ var listCommand5 = new Command38().name("list").alias("ls").description("List al
10700
10632
  console.log(chalk40.dim("No credentials found."));
10701
10633
  console.log();
10702
10634
  console.log("To add a credential:");
10703
- console.log(
10704
- chalk40.cyan(" vm0 experimental-credential set MY_API_KEY <value>")
10705
- );
10635
+ console.log(chalk40.cyan(" vm0 credential set MY_API_KEY <value>"));
10706
10636
  return;
10707
10637
  }
10708
10638
  console.log(chalk40.bold("Credentials:"));
@@ -10825,7 +10755,7 @@ var deleteCommand2 = new Command40().name("delete").description("Delete a creden
10825
10755
  });
10826
10756
 
10827
10757
  // src/commands/credential/index.ts
10828
- var credentialCommand = new Command41().name("experimental-credential").description("[Experimental] Manage stored credentials for agent runs").addCommand(listCommand5).addCommand(setCommand2).addCommand(deleteCommand2);
10758
+ var credentialCommand = new Command41().name("credential").description("Manage stored credentials for agent runs").addCommand(listCommand5).addCommand(setCommand2).addCommand(deleteCommand2);
10829
10759
 
10830
10760
  // src/commands/model-provider/index.ts
10831
10761
  import { Command as Command46 } from "commander";
@@ -11089,7 +11019,7 @@ var modelProviderCommand = new Command46().name("model-provider").description("M
11089
11019
 
11090
11020
  // src/index.ts
11091
11021
  var program = new Command47();
11092
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("6.4.0");
11022
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("7.0.0");
11093
11023
  program.command("info").description("Display environment information").action(async () => {
11094
11024
  console.log(chalk47.bold("System Information:"));
11095
11025
  console.log(`Node Version: ${process.version}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "6.4.0",
3
+ "version": "7.0.0",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",