@vm0/cli 9.32.0 → 9.33.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 +582 -504
  2. 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.32.0",
48
+ release: "9.33.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.32.0",
67
+ version: "9.33.0",
68
68
  command: process.argv.slice(2).join(" ")
69
69
  });
70
70
  Sentry.setContext("runtime", {
@@ -75,7 +75,7 @@ if (DSN) {
75
75
  }
76
76
 
77
77
  // src/index.ts
78
- import { Command as Command76 } from "commander";
78
+ import { Command as Command77 } from "commander";
79
79
 
80
80
  // src/commands/auth/index.ts
81
81
  import { Command as Command5 } from "commander";
@@ -605,7 +605,7 @@ async function waitForSilentUpgrade(timeout = TIMEOUT_MS) {
605
605
  // src/commands/info/index.ts
606
606
  var CONFIG_PATH = join2(homedir2(), ".vm0", "config.json");
607
607
  var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
608
- console.log(chalk7.bold(`VM0 CLI v${"9.32.0"}`));
608
+ console.log(chalk7.bold(`VM0 CLI v${"9.33.0"}`));
609
609
  console.log();
610
610
  const config = await loadConfig();
611
611
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -740,7 +740,7 @@ var runnerGroupSchema = z3.string().regex(
740
740
  var jobSchema = z3.object({
741
741
  runId: z3.string().uuid(),
742
742
  prompt: z3.string(),
743
- agentComposeVersionId: z3.string(),
743
+ agentComposeVersionId: z3.string().nullable(),
744
744
  vars: z3.record(z3.string(), z3.string()).nullable(),
745
745
  secretNames: z3.array(z3.string()).nullable(),
746
746
  checkpointId: z3.string().uuid().nullable()
@@ -799,7 +799,7 @@ var storedExecutionContextSchema = z3.object({
799
799
  var executionContextSchema = z3.object({
800
800
  runId: z3.string().uuid(),
801
801
  prompt: z3.string(),
802
- agentComposeVersionId: z3.string(),
802
+ agentComposeVersionId: z3.string().nullable(),
803
803
  vars: z3.record(z3.string(), z3.string()).nullable(),
804
804
  secretNames: z3.array(z3.string()).nullable(),
805
805
  checkpointId: z3.string().uuid().nullable(),
@@ -1013,6 +1013,27 @@ var composesByIdContract = c2.router({
1013
1013
  404: apiErrorSchema
1014
1014
  },
1015
1015
  summary: "Get agent compose by ID"
1016
+ },
1017
+ /**
1018
+ * DELETE /api/agent/composes/:id
1019
+ * Delete agent compose and all associated resources (versions, schedules, permissions, etc.)
1020
+ * Returns 409 Conflict if agent has running or pending runs
1021
+ */
1022
+ delete: {
1023
+ method: "DELETE",
1024
+ path: "/api/agent/composes/:id",
1025
+ headers: authHeadersSchema,
1026
+ pathParams: z4.object({
1027
+ id: z4.string().uuid("Compose ID is required")
1028
+ }),
1029
+ body: c2.noBody(),
1030
+ responses: {
1031
+ 204: c2.noBody(),
1032
+ 401: apiErrorSchema,
1033
+ 404: apiErrorSchema,
1034
+ 409: apiErrorSchema
1035
+ },
1036
+ summary: "Delete agent compose"
1016
1037
  }
1017
1038
  });
1018
1039
  var composesVersionsContract = c2.router({
@@ -1113,7 +1134,7 @@ var createRunResponseSchema = z5.object({
1113
1134
  });
1114
1135
  var getRunResponseSchema = z5.object({
1115
1136
  runId: z5.string(),
1116
- agentComposeVersionId: z5.string(),
1137
+ agentComposeVersionId: z5.string().nullable(),
1117
1138
  status: runStatusSchema,
1118
1139
  prompt: z5.string(),
1119
1140
  vars: z5.record(z5.string(), z5.string()).optional(),
@@ -4520,6 +4541,17 @@ async function createOrUpdateCompose(body) {
4520
4541
  }
4521
4542
  handleError(result, "Failed to create compose");
4522
4543
  }
4544
+ async function deleteCompose(id) {
4545
+ const config = await getClientConfig();
4546
+ const client = initClient(composesByIdContract, config);
4547
+ const result = await client.delete({
4548
+ params: { id }
4549
+ });
4550
+ if (result.status === 204) {
4551
+ return;
4552
+ }
4553
+ handleError(result, "Failed to delete agent");
4554
+ }
4523
4555
 
4524
4556
  // src/lib/api/domains/runs.ts
4525
4557
  import { initClient as initClient2 } from "@ts-rest/core";
@@ -6233,7 +6265,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
6233
6265
  options.autoUpdate = false;
6234
6266
  }
6235
6267
  if (options.autoUpdate !== false) {
6236
- await startSilentUpgrade("9.32.0");
6268
+ await startSilentUpgrade("9.33.0");
6237
6269
  }
6238
6270
  try {
6239
6271
  let result;
@@ -8430,7 +8462,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
8430
8462
  async (identifier, prompt, options) => {
8431
8463
  try {
8432
8464
  if (options.autoUpdate !== false) {
8433
- await startSilentUpgrade("9.32.0");
8465
+ await startSilentUpgrade("9.33.0");
8434
8466
  }
8435
8467
  const { scope, name, version } = parseIdentifier(identifier);
8436
8468
  if (scope && !options.experimentalSharedAgent) {
@@ -10006,7 +10038,7 @@ var cookAction = new Command27().name("cook").description("Quick start: prepare,
10006
10038
  ).option("-y, --yes", "Skip confirmation prompts").option("-v, --verbose", "Show full tool inputs and outputs").addOption(new Option5("--debug-no-mock-claude").hideHelp()).addOption(new Option5("--no-auto-update").hideHelp()).action(
10007
10039
  async (prompt, options) => {
10008
10040
  if (options.autoUpdate !== false) {
10009
- const shouldExit = await checkAndUpgrade("9.32.0", prompt);
10041
+ const shouldExit = await checkAndUpgrade("9.33.0", prompt);
10010
10042
  if (shouldExit) {
10011
10043
  process.exit(0);
10012
10044
  }
@@ -10572,7 +10604,7 @@ var setCommand = new Command33().name("set").description("Set your scope slug").
10572
10604
  var scopeCommand = new Command34().name("scope").description("Manage your scope (namespace for agents)").addCommand(statusCommand4).addCommand(setCommand);
10573
10605
 
10574
10606
  // src/commands/agent/index.ts
10575
- import { Command as Command43 } from "commander";
10607
+ import { Command as Command44 } from "commander";
10576
10608
 
10577
10609
  // src/commands/agent/clone.ts
10578
10610
  import { Command as Command35 } from "commander";
@@ -10694,10 +10726,56 @@ var cloneCommand3 = new Command35().name("clone").description("Clone agent compo
10694
10726
  }
10695
10727
  });
10696
10728
 
10697
- // src/commands/agent/list.ts
10729
+ // src/commands/agent/delete.ts
10698
10730
  import { Command as Command36 } from "commander";
10699
10731
  import chalk41 from "chalk";
10700
- var listCommand4 = new Command36().name("list").alias("ls").description("List all agent composes").action(
10732
+ var deleteCommand = new Command36().name("delete").alias("rm").description("Delete an agent").argument("<name>", "Agent name to delete").option("-y, --yes", "Skip confirmation prompt").action(async (name, options) => {
10733
+ try {
10734
+ const compose = await getComposeByName(name);
10735
+ if (!compose) {
10736
+ console.error(chalk41.red(`\u2717 Agent '${name}' not found`));
10737
+ console.error(chalk41.dim(" Run: vm0 agent list"));
10738
+ process.exit(1);
10739
+ }
10740
+ if (!options.yes) {
10741
+ if (!isInteractive()) {
10742
+ console.error(
10743
+ chalk41.red("\u2717 --yes flag is required in non-interactive mode")
10744
+ );
10745
+ process.exit(1);
10746
+ }
10747
+ const confirmed = await promptConfirm(`Delete agent '${name}'?`, false);
10748
+ if (!confirmed) {
10749
+ console.log(chalk41.dim("Cancelled"));
10750
+ return;
10751
+ }
10752
+ }
10753
+ await deleteCompose(compose.id);
10754
+ console.log(chalk41.green(`\u2713 Agent '${name}' deleted`));
10755
+ } catch (error) {
10756
+ if (error instanceof Error) {
10757
+ if (error.message.includes("Not authenticated")) {
10758
+ console.error(chalk41.red("\u2717 Not authenticated"));
10759
+ console.error(chalk41.dim(" Run: vm0 auth login"));
10760
+ } else if (error.message.includes("currently running")) {
10761
+ console.error(
10762
+ chalk41.red("\u2717 Cannot delete agent: agent is currently running")
10763
+ );
10764
+ console.error(chalk41.dim(" Run: vm0 run list"));
10765
+ } else {
10766
+ console.error(chalk41.red(`\u2717 ${error.message}`));
10767
+ }
10768
+ } else {
10769
+ console.error(chalk41.red("\u2717 An unexpected error occurred"));
10770
+ }
10771
+ process.exit(1);
10772
+ }
10773
+ });
10774
+
10775
+ // src/commands/agent/list.ts
10776
+ import { Command as Command37 } from "commander";
10777
+ import chalk42 from "chalk";
10778
+ var listCommand4 = new Command37().name("list").alias("ls").description("List all agent composes").action(
10701
10779
  withErrorHandler(async () => {
10702
10780
  const response = await httpGet("/api/agent/composes/list");
10703
10781
  if (!response.ok) {
@@ -10706,9 +10784,9 @@ var listCommand4 = new Command36().name("list").alias("ls").description("List al
10706
10784
  }
10707
10785
  const data = await response.json();
10708
10786
  if (data.composes.length === 0) {
10709
- console.log(chalk41.dim("No agent composes found"));
10787
+ console.log(chalk42.dim("No agent composes found"));
10710
10788
  console.log(
10711
- chalk41.dim(" Create one with: vm0 compose <agent-compose.yaml>")
10789
+ chalk42.dim(" Create one with: vm0 compose <agent-compose.yaml>")
10712
10790
  );
10713
10791
  return;
10714
10792
  }
@@ -10716,9 +10794,9 @@ var listCommand4 = new Command36().name("list").alias("ls").description("List al
10716
10794
  const header = ["NAME".padEnd(nameWidth), "VERSION", "UPDATED"].join(
10717
10795
  " "
10718
10796
  );
10719
- console.log(chalk41.dim(header));
10797
+ console.log(chalk42.dim(header));
10720
10798
  for (const compose of data.composes) {
10721
- const versionShort = compose.headVersionId ? compose.headVersionId.slice(0, 8) : chalk41.dim("-");
10799
+ const versionShort = compose.headVersionId ? compose.headVersionId.slice(0, 8) : chalk42.dim("-");
10722
10800
  const row = [
10723
10801
  compose.name.padEnd(nameWidth),
10724
10802
  versionShort,
@@ -10730,8 +10808,8 @@ var listCommand4 = new Command36().name("list").alias("ls").description("List al
10730
10808
  );
10731
10809
 
10732
10810
  // src/commands/agent/status.ts
10733
- import { Command as Command37 } from "commander";
10734
- import chalk42 from "chalk";
10811
+ import { Command as Command38 } from "commander";
10812
+ import chalk43 from "chalk";
10735
10813
 
10736
10814
  // src/lib/domain/source-derivation.ts
10737
10815
  import * as fs9 from "fs/promises";
@@ -10855,27 +10933,27 @@ function formatVariableSources(sources) {
10855
10933
  if (sources.secrets.length > 0) {
10856
10934
  console.log(` Secrets:`);
10857
10935
  for (const secret of sources.secrets) {
10858
- const sourceInfo = chalk42.dim(`(${secret.source})`);
10936
+ const sourceInfo = chalk43.dim(`(${secret.source})`);
10859
10937
  console.log(` - ${secret.name.padEnd(20)} ${sourceInfo}`);
10860
10938
  }
10861
10939
  }
10862
10940
  if (sources.vars.length > 0) {
10863
10941
  console.log(` Vars:`);
10864
10942
  for (const v of sources.vars) {
10865
- const sourceInfo = chalk42.dim(`(${v.source})`);
10943
+ const sourceInfo = chalk43.dim(`(${v.source})`);
10866
10944
  console.log(` - ${v.name.padEnd(20)} ${sourceInfo}`);
10867
10945
  }
10868
10946
  }
10869
10947
  if (sources.credentials.length > 0) {
10870
10948
  console.log(` Credentials:`);
10871
10949
  for (const cred of sources.credentials) {
10872
- const sourceInfo = chalk42.dim(`(${cred.source})`);
10950
+ const sourceInfo = chalk43.dim(`(${cred.source})`);
10873
10951
  console.log(` - ${cred.name.padEnd(20)} ${sourceInfo}`);
10874
10952
  }
10875
10953
  }
10876
10954
  }
10877
10955
  function formatAgentDetails(agentName, agent, agentSources, volumeConfigs) {
10878
- console.log(` ${chalk42.cyan(agentName)}:`);
10956
+ console.log(` ${chalk43.cyan(agentName)}:`);
10879
10957
  console.log(` Framework: ${agent.framework}`);
10880
10958
  if (agent.image) {
10881
10959
  console.log(` Image: ${agent.image}`);
@@ -10894,16 +10972,16 @@ function formatAgentDetails(agentName, agent, agentSources, volumeConfigs) {
10894
10972
  }
10895
10973
  }
10896
10974
  function formatComposeOutput(name, versionId, content, variableSources) {
10897
- console.log(chalk42.bold("Name:") + ` ${name}`);
10898
- console.log(chalk42.bold("Version:") + ` ${versionId}`);
10975
+ console.log(chalk43.bold("Name:") + ` ${name}`);
10976
+ console.log(chalk43.bold("Version:") + ` ${versionId}`);
10899
10977
  console.log();
10900
- console.log(chalk42.bold("Agents:"));
10978
+ console.log(chalk43.bold("Agents:"));
10901
10979
  for (const [agentName, agent] of Object.entries(content.agents)) {
10902
10980
  const agentSources = variableSources?.get(agentName);
10903
10981
  formatAgentDetails(agentName, agent, agentSources, content.volumes);
10904
10982
  }
10905
10983
  }
10906
- var statusCommand5 = new Command37().name("status").description("Show status of agent compose").argument(
10984
+ var statusCommand5 = new Command38().name("status").description("Show status of agent compose").argument(
10907
10985
  "<name[:version]>",
10908
10986
  "Agent name with optional version (e.g., my-agent:latest or my-agent:a1b2c3d4)"
10909
10987
  ).option("--no-sources", "Skip fetching skills to determine variable sources").action(async (argument, options) => {
@@ -10920,8 +10998,8 @@ var statusCommand5 = new Command37().name("status").description("Show status of
10920
10998
  }
10921
10999
  const compose = await getComposeByName(name);
10922
11000
  if (!compose) {
10923
- console.error(chalk42.red(`\u2717 Agent compose not found: ${name}`));
10924
- console.error(chalk42.dim(" Run: vm0 agent list"));
11001
+ console.error(chalk43.red(`\u2717 Agent compose not found: ${name}`));
11002
+ console.error(chalk43.dim(" Run: vm0 agent list"));
10925
11003
  process.exit(1);
10926
11004
  }
10927
11005
  let resolvedVersionId = compose.headVersionId;
@@ -10932,9 +11010,9 @@ var statusCommand5 = new Command37().name("status").description("Show status of
10932
11010
  resolvedVersionId = versionInfo.versionId;
10933
11011
  } catch (error) {
10934
11012
  if (error instanceof Error && error.message.includes("not found")) {
10935
- console.error(chalk42.red(`\u2717 Version not found: ${version}`));
11013
+ console.error(chalk43.red(`\u2717 Version not found: ${version}`));
10936
11014
  console.error(
10937
- chalk42.dim(
11015
+ chalk43.dim(
10938
11016
  ` HEAD version: ${compose.headVersionId?.slice(0, 8)}`
10939
11017
  )
10940
11018
  );
@@ -10947,7 +11025,7 @@ var statusCommand5 = new Command37().name("status").description("Show status of
10947
11025
  }
10948
11026
  }
10949
11027
  if (!resolvedVersionId || !compose.content) {
10950
- console.error(chalk42.red(`\u2717 No version found for: ${name}`));
11028
+ console.error(chalk43.red(`\u2717 No version found for: ${name}`));
10951
11029
  process.exit(1);
10952
11030
  }
10953
11031
  const content = compose.content;
@@ -10958,7 +11036,7 @@ var statusCommand5 = new Command37().name("status").description("Show status of
10958
11036
  });
10959
11037
  } catch {
10960
11038
  console.error(
10961
- chalk42.yellow(
11039
+ chalk43.yellow(
10962
11040
  "\u26A0 Warning: Failed to fetch skill sources, showing basic info"
10963
11041
  )
10964
11042
  );
@@ -10970,12 +11048,12 @@ var statusCommand5 = new Command37().name("status").description("Show status of
10970
11048
  variableSources
10971
11049
  );
10972
11050
  } catch (error) {
10973
- console.error(chalk42.red("\u2717 Failed to get agent compose status"));
11051
+ console.error(chalk43.red("\u2717 Failed to get agent compose status"));
10974
11052
  if (error instanceof Error) {
10975
11053
  if (error.message.includes("Not authenticated")) {
10976
- console.error(chalk42.dim(" Run: vm0 auth login"));
11054
+ console.error(chalk43.dim(" Run: vm0 auth login"));
10977
11055
  } else {
10978
- console.error(chalk42.dim(` ${error.message}`));
11056
+ console.error(chalk43.dim(` ${error.message}`));
10979
11057
  }
10980
11058
  }
10981
11059
  process.exit(1);
@@ -10983,9 +11061,9 @@ var statusCommand5 = new Command37().name("status").description("Show status of
10983
11061
  });
10984
11062
 
10985
11063
  // src/commands/agent/public.ts
10986
- import { Command as Command38 } from "commander";
10987
- import chalk43 from "chalk";
10988
- var publicCommand = new Command38().name("public").description("Make an agent public (accessible to all authenticated users)").argument("<name>", "Agent name").option(
11064
+ import { Command as Command39 } from "commander";
11065
+ import chalk44 from "chalk";
11066
+ var publicCommand = new Command39().name("public").description("Make an agent public (accessible to all authenticated users)").argument("<name>", "Agent name").option(
10989
11067
  "--experimental-shared-agent",
10990
11068
  "Enable experimental agent sharing feature"
10991
11069
  ).action(
@@ -10993,18 +11071,18 @@ var publicCommand = new Command38().name("public").description("Make an agent pu
10993
11071
  async (name, options) => {
10994
11072
  if (!options.experimentalSharedAgent) {
10995
11073
  console.error(
10996
- chalk43.red(
11074
+ chalk44.red(
10997
11075
  "\u2717 This command requires --experimental-shared-agent flag"
10998
11076
  )
10999
11077
  );
11000
11078
  console.error();
11001
11079
  console.error(
11002
- chalk43.dim(" Agent sharing is an experimental feature.")
11080
+ chalk44.dim(" Agent sharing is an experimental feature.")
11003
11081
  );
11004
11082
  console.error();
11005
11083
  console.error("Example:");
11006
11084
  console.error(
11007
- chalk43.cyan(
11085
+ chalk44.cyan(
11008
11086
  ` vm0 agent public ${name} --experimental-shared-agent`
11009
11087
  )
11010
11088
  );
@@ -11012,7 +11090,7 @@ var publicCommand = new Command38().name("public").description("Make an agent pu
11012
11090
  }
11013
11091
  const compose = await getComposeByName(name);
11014
11092
  if (!compose) {
11015
- console.error(chalk43.red(`\u2717 Agent not found: ${name}`));
11093
+ console.error(chalk44.red(`\u2717 Agent not found: ${name}`));
11016
11094
  process.exit(1);
11017
11095
  }
11018
11096
  const scope = await getScope();
@@ -11023,7 +11101,7 @@ var publicCommand = new Command38().name("public").description("Make an agent pu
11023
11101
  if (!response.ok) {
11024
11102
  const error = await response.json();
11025
11103
  if (response.status === 409) {
11026
- console.log(chalk43.yellow(`Agent "${name}" is already public`));
11104
+ console.log(chalk44.yellow(`Agent "${name}" is already public`));
11027
11105
  return;
11028
11106
  }
11029
11107
  throw new Error(
@@ -11031,11 +11109,11 @@ var publicCommand = new Command38().name("public").description("Make an agent pu
11031
11109
  );
11032
11110
  }
11033
11111
  const fullName = `${scope.slug}/${name}`;
11034
- console.log(chalk43.green(`\u2713 Agent "${name}" is now public`));
11112
+ console.log(chalk44.green(`\u2713 Agent "${name}" is now public`));
11035
11113
  console.log();
11036
11114
  console.log("Others can now run your agent with:");
11037
11115
  console.log(
11038
- chalk43.cyan(
11116
+ chalk44.cyan(
11039
11117
  ` vm0 run ${fullName} --experimental-shared-agent "your prompt"`
11040
11118
  )
11041
11119
  );
@@ -11044,9 +11122,9 @@ var publicCommand = new Command38().name("public").description("Make an agent pu
11044
11122
  );
11045
11123
 
11046
11124
  // src/commands/agent/private.ts
11047
- import { Command as Command39 } from "commander";
11048
- import chalk44 from "chalk";
11049
- var privateCommand = new Command39().name("private").description("Make an agent private (remove public access)").argument("<name>", "Agent name").option(
11125
+ import { Command as Command40 } from "commander";
11126
+ import chalk45 from "chalk";
11127
+ var privateCommand = new Command40().name("private").description("Make an agent private (remove public access)").argument("<name>", "Agent name").option(
11050
11128
  "--experimental-shared-agent",
11051
11129
  "Enable experimental agent sharing feature"
11052
11130
  ).action(
@@ -11054,18 +11132,18 @@ var privateCommand = new Command39().name("private").description("Make an agent
11054
11132
  async (name, options) => {
11055
11133
  if (!options.experimentalSharedAgent) {
11056
11134
  console.error(
11057
- chalk44.red(
11135
+ chalk45.red(
11058
11136
  "\u2717 This command requires --experimental-shared-agent flag"
11059
11137
  )
11060
11138
  );
11061
11139
  console.error();
11062
11140
  console.error(
11063
- chalk44.dim(" Agent sharing is an experimental feature.")
11141
+ chalk45.dim(" Agent sharing is an experimental feature.")
11064
11142
  );
11065
11143
  console.error();
11066
11144
  console.error("Example:");
11067
11145
  console.error(
11068
- chalk44.cyan(
11146
+ chalk45.cyan(
11069
11147
  ` vm0 agent private ${name} --experimental-shared-agent`
11070
11148
  )
11071
11149
  );
@@ -11073,7 +11151,7 @@ var privateCommand = new Command39().name("private").description("Make an agent
11073
11151
  }
11074
11152
  const compose = await getComposeByName(name);
11075
11153
  if (!compose) {
11076
- console.error(chalk44.red(`\u2717 Agent not found: ${name}`));
11154
+ console.error(chalk45.red(`\u2717 Agent not found: ${name}`));
11077
11155
  process.exit(1);
11078
11156
  }
11079
11157
  const response = await httpDelete(
@@ -11082,22 +11160,22 @@ var privateCommand = new Command39().name("private").description("Make an agent
11082
11160
  if (!response.ok) {
11083
11161
  const error = await response.json();
11084
11162
  if (response.status === 404) {
11085
- console.log(chalk44.yellow(`Agent "${name}" is already private`));
11163
+ console.log(chalk45.yellow(`Agent "${name}" is already private`));
11086
11164
  return;
11087
11165
  }
11088
11166
  throw new Error(
11089
11167
  error.error?.message || "Failed to make agent private"
11090
11168
  );
11091
11169
  }
11092
- console.log(chalk44.green(`\u2713 Agent "${name}" is now private`));
11170
+ console.log(chalk45.green(`\u2713 Agent "${name}" is now private`));
11093
11171
  }
11094
11172
  )
11095
11173
  );
11096
11174
 
11097
11175
  // src/commands/agent/share.ts
11098
- import { Command as Command40 } from "commander";
11099
- import chalk45 from "chalk";
11100
- var shareCommand = new Command40().name("share").description("Share an agent with a user by email").argument("<name>", "Agent name").requiredOption("--email <email>", "Email address to share with").option(
11176
+ import { Command as Command41 } from "commander";
11177
+ import chalk46 from "chalk";
11178
+ var shareCommand = new Command41().name("share").description("Share an agent with a user by email").argument("<name>", "Agent name").requiredOption("--email <email>", "Email address to share with").option(
11101
11179
  "--experimental-shared-agent",
11102
11180
  "Enable experimental agent sharing feature"
11103
11181
  ).action(
@@ -11105,18 +11183,18 @@ var shareCommand = new Command40().name("share").description("Share an agent wit
11105
11183
  async (name, options) => {
11106
11184
  if (!options.experimentalSharedAgent) {
11107
11185
  console.error(
11108
- chalk45.red(
11186
+ chalk46.red(
11109
11187
  "\u2717 This command requires --experimental-shared-agent flag"
11110
11188
  )
11111
11189
  );
11112
11190
  console.error();
11113
11191
  console.error(
11114
- chalk45.dim(" Agent sharing is an experimental feature.")
11192
+ chalk46.dim(" Agent sharing is an experimental feature.")
11115
11193
  );
11116
11194
  console.error();
11117
11195
  console.error("Example:");
11118
11196
  console.error(
11119
- chalk45.cyan(
11197
+ chalk46.cyan(
11120
11198
  ` vm0 agent share ${name} --email ${options.email} --experimental-shared-agent`
11121
11199
  )
11122
11200
  );
@@ -11124,7 +11202,7 @@ var shareCommand = new Command40().name("share").description("Share an agent wit
11124
11202
  }
11125
11203
  const compose = await getComposeByName(name);
11126
11204
  if (!compose) {
11127
- console.error(chalk45.red(`\u2717 Agent not found: ${name}`));
11205
+ console.error(chalk46.red(`\u2717 Agent not found: ${name}`));
11128
11206
  process.exit(1);
11129
11207
  }
11130
11208
  const scope = await getScope();
@@ -11136,7 +11214,7 @@ var shareCommand = new Command40().name("share").description("Share an agent wit
11136
11214
  const error = await response.json();
11137
11215
  if (response.status === 409) {
11138
11216
  console.log(
11139
- chalk45.yellow(
11217
+ chalk46.yellow(
11140
11218
  `Agent "${name}" is already shared with ${options.email}`
11141
11219
  )
11142
11220
  );
@@ -11146,12 +11224,12 @@ var shareCommand = new Command40().name("share").description("Share an agent wit
11146
11224
  }
11147
11225
  const fullName = `${scope.slug}/${name}`;
11148
11226
  console.log(
11149
- chalk45.green(`\u2713 Agent "${name}" shared with ${options.email}`)
11227
+ chalk46.green(`\u2713 Agent "${name}" shared with ${options.email}`)
11150
11228
  );
11151
11229
  console.log();
11152
11230
  console.log("They can now run your agent with:");
11153
11231
  console.log(
11154
- chalk45.cyan(
11232
+ chalk46.cyan(
11155
11233
  ` vm0 run ${fullName} --experimental-shared-agent "your prompt"`
11156
11234
  )
11157
11235
  );
@@ -11160,9 +11238,9 @@ var shareCommand = new Command40().name("share").description("Share an agent wit
11160
11238
  );
11161
11239
 
11162
11240
  // src/commands/agent/unshare.ts
11163
- import { Command as Command41 } from "commander";
11164
- import chalk46 from "chalk";
11165
- var unshareCommand = new Command41().name("unshare").description("Remove sharing from a user").argument("<name>", "Agent name").requiredOption("--email <email>", "Email address to unshare").option(
11241
+ import { Command as Command42 } from "commander";
11242
+ import chalk47 from "chalk";
11243
+ var unshareCommand = new Command42().name("unshare").description("Remove sharing from a user").argument("<name>", "Agent name").requiredOption("--email <email>", "Email address to unshare").option(
11166
11244
  "--experimental-shared-agent",
11167
11245
  "Enable experimental agent sharing feature"
11168
11246
  ).action(
@@ -11170,18 +11248,18 @@ var unshareCommand = new Command41().name("unshare").description("Remove sharing
11170
11248
  async (name, options) => {
11171
11249
  if (!options.experimentalSharedAgent) {
11172
11250
  console.error(
11173
- chalk46.red(
11251
+ chalk47.red(
11174
11252
  "\u2717 This command requires --experimental-shared-agent flag"
11175
11253
  )
11176
11254
  );
11177
11255
  console.error();
11178
11256
  console.error(
11179
- chalk46.dim(" Agent sharing is an experimental feature.")
11257
+ chalk47.dim(" Agent sharing is an experimental feature.")
11180
11258
  );
11181
11259
  console.error();
11182
11260
  console.error("Example:");
11183
11261
  console.error(
11184
- chalk46.cyan(
11262
+ chalk47.cyan(
11185
11263
  ` vm0 agent unshare ${name} --email ${options.email} --experimental-shared-agent`
11186
11264
  )
11187
11265
  );
@@ -11189,7 +11267,7 @@ var unshareCommand = new Command41().name("unshare").description("Remove sharing
11189
11267
  }
11190
11268
  const compose = await getComposeByName(name);
11191
11269
  if (!compose) {
11192
- console.error(chalk46.red(`\u2717 Agent not found: ${name}`));
11270
+ console.error(chalk47.red(`\u2717 Agent not found: ${name}`));
11193
11271
  process.exit(1);
11194
11272
  }
11195
11273
  const response = await httpDelete(
@@ -11199,7 +11277,7 @@ var unshareCommand = new Command41().name("unshare").description("Remove sharing
11199
11277
  const error = await response.json();
11200
11278
  if (response.status === 404) {
11201
11279
  console.log(
11202
- chalk46.yellow(
11280
+ chalk47.yellow(
11203
11281
  `Agent "${name}" is not shared with ${options.email}`
11204
11282
  )
11205
11283
  );
@@ -11208,16 +11286,16 @@ var unshareCommand = new Command41().name("unshare").description("Remove sharing
11208
11286
  throw new Error(error.error?.message || "Failed to unshare agent");
11209
11287
  }
11210
11288
  console.log(
11211
- chalk46.green(`\u2713 Removed sharing of "${name}" from ${options.email}`)
11289
+ chalk47.green(`\u2713 Removed sharing of "${name}" from ${options.email}`)
11212
11290
  );
11213
11291
  }
11214
11292
  )
11215
11293
  );
11216
11294
 
11217
11295
  // src/commands/agent/permission.ts
11218
- import { Command as Command42 } from "commander";
11219
- import chalk47 from "chalk";
11220
- var permissionCommand = new Command42().name("permission").description("List all permissions for an agent").argument("<name>", "Agent name").option(
11296
+ import { Command as Command43 } from "commander";
11297
+ import chalk48 from "chalk";
11298
+ var permissionCommand = new Command43().name("permission").description("List all permissions for an agent").argument("<name>", "Agent name").option(
11221
11299
  "--experimental-shared-agent",
11222
11300
  "Enable experimental agent sharing feature"
11223
11301
  ).action(
@@ -11225,18 +11303,18 @@ var permissionCommand = new Command42().name("permission").description("List all
11225
11303
  async (name, options) => {
11226
11304
  if (!options.experimentalSharedAgent) {
11227
11305
  console.error(
11228
- chalk47.red(
11306
+ chalk48.red(
11229
11307
  "\u2717 This command requires --experimental-shared-agent flag"
11230
11308
  )
11231
11309
  );
11232
11310
  console.error();
11233
11311
  console.error(
11234
- chalk47.dim(" Agent sharing is an experimental feature.")
11312
+ chalk48.dim(" Agent sharing is an experimental feature.")
11235
11313
  );
11236
11314
  console.error();
11237
11315
  console.error("Example:");
11238
11316
  console.error(
11239
- chalk47.cyan(
11317
+ chalk48.cyan(
11240
11318
  ` vm0 agent permission ${name} --experimental-shared-agent`
11241
11319
  )
11242
11320
  );
@@ -11244,7 +11322,7 @@ var permissionCommand = new Command42().name("permission").description("List all
11244
11322
  }
11245
11323
  const compose = await getComposeByName(name);
11246
11324
  if (!compose) {
11247
- console.error(chalk47.red(`\u2717 Agent not found: ${name}`));
11325
+ console.error(chalk48.red(`\u2717 Agent not found: ${name}`));
11248
11326
  process.exit(1);
11249
11327
  }
11250
11328
  const response = await httpGet(
@@ -11256,16 +11334,16 @@ var permissionCommand = new Command42().name("permission").description("List all
11256
11334
  }
11257
11335
  const data = await response.json();
11258
11336
  if (data.permissions.length === 0) {
11259
- console.log(chalk47.dim("No permissions set (private agent)"));
11337
+ console.log(chalk48.dim("No permissions set (private agent)"));
11260
11338
  return;
11261
11339
  }
11262
11340
  console.log(
11263
- chalk47.dim(
11341
+ chalk48.dim(
11264
11342
  "TYPE EMAIL PERMISSION GRANTED"
11265
11343
  )
11266
11344
  );
11267
11345
  console.log(
11268
- chalk47.dim(
11346
+ chalk48.dim(
11269
11347
  "------- ----------------------------- ---------- ----------"
11270
11348
  )
11271
11349
  );
@@ -11281,11 +11359,11 @@ var permissionCommand = new Command42().name("permission").description("List all
11281
11359
  );
11282
11360
 
11283
11361
  // src/commands/agent/index.ts
11284
- var agentCommand = new Command43().name("agent").description("Manage agent composes").addCommand(cloneCommand3).addCommand(listCommand4).addCommand(statusCommand5).addCommand(publicCommand).addCommand(privateCommand).addCommand(shareCommand).addCommand(unshareCommand).addCommand(permissionCommand);
11362
+ var agentCommand = new Command44().name("agent").description("Manage agent composes").addCommand(cloneCommand3).addCommand(deleteCommand).addCommand(listCommand4).addCommand(statusCommand5).addCommand(publicCommand).addCommand(privateCommand).addCommand(shareCommand).addCommand(unshareCommand).addCommand(permissionCommand);
11285
11363
 
11286
11364
  // src/commands/init/index.ts
11287
- import { Command as Command44 } from "commander";
11288
- import chalk48 from "chalk";
11365
+ import { Command as Command45 } from "commander";
11366
+ import chalk49 from "chalk";
11289
11367
  import path15 from "path";
11290
11368
  import { existsSync as existsSync11 } from "fs";
11291
11369
  import { writeFile as writeFile7 } from "fs/promises";
@@ -11323,14 +11401,14 @@ function checkExistingFiles() {
11323
11401
  if (existsSync11(AGENTS_MD_FILE)) existingFiles.push(AGENTS_MD_FILE);
11324
11402
  return existingFiles;
11325
11403
  }
11326
- var initCommand3 = new Command44().name("init").description("Initialize a new VM0 project in the current directory").option("-f, --force", "Overwrite existing files").option("-n, --name <name>", "Agent name (required in non-interactive mode)").action(async (options) => {
11404
+ var initCommand3 = new Command45().name("init").description("Initialize a new VM0 project in the current directory").option("-f, --force", "Overwrite existing files").option("-n, --name <name>", "Agent name (required in non-interactive mode)").action(async (options) => {
11327
11405
  const existingFiles = checkExistingFiles();
11328
11406
  if (existingFiles.length > 0 && !options.force) {
11329
11407
  for (const file of existingFiles) {
11330
- console.error(chalk48.red(`\u2717 ${file} already exists`));
11408
+ console.error(chalk49.red(`\u2717 ${file} already exists`));
11331
11409
  }
11332
11410
  console.error();
11333
- console.error(`To overwrite: ${chalk48.cyan("vm0 init --force")}`);
11411
+ console.error(`To overwrite: ${chalk49.cyan("vm0 init --force")}`);
11334
11412
  process.exit(1);
11335
11413
  }
11336
11414
  let agentName;
@@ -11338,9 +11416,9 @@ var initCommand3 = new Command44().name("init").description("Initialize a new VM
11338
11416
  agentName = options.name.trim();
11339
11417
  } else if (!isInteractive()) {
11340
11418
  console.error(
11341
- chalk48.red("\u2717 --name flag is required in non-interactive mode")
11419
+ chalk49.red("\u2717 --name flag is required in non-interactive mode")
11342
11420
  );
11343
- console.error(chalk48.dim(" Usage: vm0 init --name <agent-name>"));
11421
+ console.error(chalk49.dim(" Usage: vm0 init --name <agent-name>"));
11344
11422
  process.exit(1);
11345
11423
  } else {
11346
11424
  const dirName = path15.basename(process.cwd());
@@ -11356,47 +11434,47 @@ var initCommand3 = new Command44().name("init").description("Initialize a new VM
11356
11434
  }
11357
11435
  );
11358
11436
  if (name === void 0) {
11359
- console.log(chalk48.dim("Cancelled"));
11437
+ console.log(chalk49.dim("Cancelled"));
11360
11438
  return;
11361
11439
  }
11362
11440
  agentName = name;
11363
11441
  }
11364
11442
  if (!agentName || !validateAgentName(agentName)) {
11365
- console.error(chalk48.red("\u2717 Invalid agent name"));
11443
+ console.error(chalk49.red("\u2717 Invalid agent name"));
11366
11444
  console.error(
11367
- chalk48.dim(" Must be 3-64 characters, alphanumeric and hyphens only")
11445
+ chalk49.dim(" Must be 3-64 characters, alphanumeric and hyphens only")
11368
11446
  );
11369
- console.error(chalk48.dim(" Must start and end with letter or number"));
11447
+ console.error(chalk49.dim(" Must start and end with letter or number"));
11370
11448
  process.exit(1);
11371
11449
  }
11372
11450
  await writeFile7(VM0_YAML_FILE, generateVm0Yaml(agentName));
11373
11451
  const vm0Status = existingFiles.includes(VM0_YAML_FILE) ? " (overwritten)" : "";
11374
- console.log(chalk48.green(`\u2713 Created ${VM0_YAML_FILE}${vm0Status}`));
11452
+ console.log(chalk49.green(`\u2713 Created ${VM0_YAML_FILE}${vm0Status}`));
11375
11453
  await writeFile7(AGENTS_MD_FILE, generateAgentsMd());
11376
11454
  const agentsStatus = existingFiles.includes(AGENTS_MD_FILE) ? " (overwritten)" : "";
11377
- console.log(chalk48.green(`\u2713 Created ${AGENTS_MD_FILE}${agentsStatus}`));
11455
+ console.log(chalk49.green(`\u2713 Created ${AGENTS_MD_FILE}${agentsStatus}`));
11378
11456
  console.log();
11379
11457
  console.log("Next steps:");
11380
11458
  console.log(
11381
- ` 1. Set up model provider (one-time): ${chalk48.cyan("vm0 model-provider setup")}`
11459
+ ` 1. Set up model provider (one-time): ${chalk49.cyan("vm0 model-provider setup")}`
11382
11460
  );
11383
11461
  console.log(
11384
- ` 2. Edit ${chalk48.cyan("AGENTS.md")} to customize your agent's workflow`
11462
+ ` 2. Edit ${chalk49.cyan("AGENTS.md")} to customize your agent's workflow`
11385
11463
  );
11386
11464
  console.log(
11387
- ` Or install Claude plugin: ${chalk48.cyan(`vm0 setup-claude && claude "/vm0-agent let's build an agent"`)}`
11465
+ ` Or install Claude plugin: ${chalk49.cyan(`vm0 setup-claude && claude "/vm0-agent let's build an agent"`)}`
11388
11466
  );
11389
11467
  console.log(
11390
- ` 3. Run your agent: ${chalk48.cyan(`vm0 cook "let's start working"`)}`
11468
+ ` 3. Run your agent: ${chalk49.cyan(`vm0 cook "let's start working"`)}`
11391
11469
  );
11392
11470
  });
11393
11471
 
11394
11472
  // src/commands/schedule/index.ts
11395
- import { Command as Command51 } from "commander";
11473
+ import { Command as Command52 } from "commander";
11396
11474
 
11397
11475
  // src/commands/schedule/setup.ts
11398
- import { Command as Command45 } from "commander";
11399
- import chalk49 from "chalk";
11476
+ import { Command as Command46 } from "commander";
11477
+ import chalk50 from "chalk";
11400
11478
 
11401
11479
  // src/lib/domain/schedule-utils.ts
11402
11480
  import { parse as parseYaml5 } from "yaml";
@@ -11618,7 +11696,7 @@ async function gatherFrequency(optionFrequency, existingFrequency) {
11618
11696
  }
11619
11697
  if (!isInteractive()) {
11620
11698
  console.error(
11621
- chalk49.red("\u2717 --frequency is required (daily|weekly|monthly|once)")
11699
+ chalk50.red("\u2717 --frequency is required (daily|weekly|monthly|once)")
11622
11700
  );
11623
11701
  process.exit(1);
11624
11702
  }
@@ -11638,7 +11716,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
11638
11716
  const day2 = parseDayOption(optionDay, frequency);
11639
11717
  if (day2 === void 0) {
11640
11718
  console.error(
11641
- chalk49.red(
11719
+ chalk50.red(
11642
11720
  `\u2717 Invalid day: ${optionDay}. Use mon-sun for weekly or 1-31 for monthly.`
11643
11721
  )
11644
11722
  );
@@ -11647,7 +11725,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
11647
11725
  return day2;
11648
11726
  }
11649
11727
  if (!isInteractive()) {
11650
- console.error(chalk49.red("\u2717 --day is required for weekly/monthly"));
11728
+ console.error(chalk50.red("\u2717 --day is required for weekly/monthly"));
11651
11729
  process.exit(1);
11652
11730
  }
11653
11731
  if (frequency === "weekly") {
@@ -11666,7 +11744,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
11666
11744
  if (!dayStr) return null;
11667
11745
  const day = parseInt(dayStr, 10);
11668
11746
  if (isNaN(day) || day < 1 || day > 31) {
11669
- console.error(chalk49.red("\u2717 Day must be between 1 and 31"));
11747
+ console.error(chalk50.red("\u2717 Day must be between 1 and 31"));
11670
11748
  process.exit(1);
11671
11749
  }
11672
11750
  return day;
@@ -11675,13 +11753,13 @@ async function gatherRecurringTime(optionTime, existingTime) {
11675
11753
  if (optionTime) {
11676
11754
  const validation = validateTimeFormat(optionTime);
11677
11755
  if (validation !== true) {
11678
- console.error(chalk49.red(`\u2717 Invalid time: ${validation}`));
11756
+ console.error(chalk50.red(`\u2717 Invalid time: ${validation}`));
11679
11757
  process.exit(1);
11680
11758
  }
11681
11759
  return optionTime;
11682
11760
  }
11683
11761
  if (!isInteractive()) {
11684
- console.error(chalk49.red("\u2717 --time is required (HH:MM format)"));
11762
+ console.error(chalk50.red("\u2717 --time is required (HH:MM format)"));
11685
11763
  process.exit(1);
11686
11764
  }
11687
11765
  return await promptText(
@@ -11694,7 +11772,7 @@ async function gatherOneTimeSchedule(optionDay, optionTime, existingTime) {
11694
11772
  if (optionDay && optionTime) {
11695
11773
  if (!validateDateFormat(optionDay)) {
11696
11774
  console.error(
11697
- chalk49.red(
11775
+ chalk50.red(
11698
11776
  `\u2717 Invalid date format: ${optionDay}. Use YYYY-MM-DD format.`
11699
11777
  )
11700
11778
  );
@@ -11702,16 +11780,16 @@ async function gatherOneTimeSchedule(optionDay, optionTime, existingTime) {
11702
11780
  }
11703
11781
  if (!validateTimeFormat(optionTime)) {
11704
11782
  console.error(
11705
- chalk49.red(`\u2717 Invalid time format: ${optionTime}. Use HH:MM format.`)
11783
+ chalk50.red(`\u2717 Invalid time format: ${optionTime}. Use HH:MM format.`)
11706
11784
  );
11707
11785
  process.exit(1);
11708
11786
  }
11709
11787
  return `${optionDay} ${optionTime}`;
11710
11788
  }
11711
11789
  if (!isInteractive()) {
11712
- console.error(chalk49.red("\u2717 One-time schedules require interactive mode"));
11790
+ console.error(chalk50.red("\u2717 One-time schedules require interactive mode"));
11713
11791
  console.error(
11714
- chalk49.dim(" Or provide --day (YYYY-MM-DD) and --time (HH:MM) flags")
11792
+ chalk50.dim(" Or provide --day (YYYY-MM-DD) and --time (HH:MM) flags")
11715
11793
  );
11716
11794
  process.exit(1);
11717
11795
  }
@@ -11742,7 +11820,7 @@ async function gatherTimezone(optionTimezone, existingTimezone) {
11742
11820
  async function gatherPromptText(optionPrompt, existingPrompt) {
11743
11821
  if (optionPrompt) return optionPrompt;
11744
11822
  if (!isInteractive()) {
11745
- console.error(chalk49.red("\u2717 --prompt is required"));
11823
+ console.error(chalk50.red("\u2717 --prompt is required"));
11746
11824
  process.exit(1);
11747
11825
  }
11748
11826
  return await promptText(
@@ -11753,8 +11831,8 @@ async function gatherPromptText(optionPrompt, existingPrompt) {
11753
11831
  async function resolveAgent(agentName) {
11754
11832
  const compose = await getComposeByName(agentName);
11755
11833
  if (!compose) {
11756
- console.error(chalk49.red(`\u2717 Agent not found: ${agentName}`));
11757
- console.error(chalk49.dim(" Make sure the agent is composed first"));
11834
+ console.error(chalk50.red(`\u2717 Agent not found: ${agentName}`));
11835
+ console.error(chalk50.dim(" Make sure the agent is composed first"));
11758
11836
  process.exit(1);
11759
11837
  }
11760
11838
  return {
@@ -11799,7 +11877,7 @@ async function buildAndDeploy(params) {
11799
11877
  }
11800
11878
  console.log(
11801
11879
  `
11802
- Deploying schedule for agent ${chalk49.cyan(params.agentName)}...`
11880
+ Deploying schedule for agent ${chalk50.cyan(params.agentName)}...`
11803
11881
  );
11804
11882
  const deployResult = await deploySchedule({
11805
11883
  name: params.scheduleName,
@@ -11815,56 +11893,56 @@ Deploying schedule for agent ${chalk49.cyan(params.agentName)}...`
11815
11893
  function displayDeployResult(agentName, deployResult) {
11816
11894
  if (deployResult.created) {
11817
11895
  console.log(
11818
- chalk49.green(`\u2713 Created schedule for agent ${chalk49.cyan(agentName)}`)
11896
+ chalk50.green(`\u2713 Created schedule for agent ${chalk50.cyan(agentName)}`)
11819
11897
  );
11820
11898
  } else {
11821
11899
  console.log(
11822
- chalk49.green(`\u2713 Updated schedule for agent ${chalk49.cyan(agentName)}`)
11900
+ chalk50.green(`\u2713 Updated schedule for agent ${chalk50.cyan(agentName)}`)
11823
11901
  );
11824
11902
  }
11825
- console.log(chalk49.dim(` Timezone: ${deployResult.schedule.timezone}`));
11903
+ console.log(chalk50.dim(` Timezone: ${deployResult.schedule.timezone}`));
11826
11904
  if (deployResult.schedule.cronExpression) {
11827
- console.log(chalk49.dim(` Cron: ${deployResult.schedule.cronExpression}`));
11905
+ console.log(chalk50.dim(` Cron: ${deployResult.schedule.cronExpression}`));
11828
11906
  if (deployResult.schedule.nextRunAt) {
11829
11907
  const nextRun = formatInTimezone(
11830
11908
  deployResult.schedule.nextRunAt,
11831
11909
  deployResult.schedule.timezone
11832
11910
  );
11833
- console.log(chalk49.dim(` Next run: ${nextRun}`));
11911
+ console.log(chalk50.dim(` Next run: ${nextRun}`));
11834
11912
  }
11835
11913
  } else if (deployResult.schedule.atTime) {
11836
11914
  const atTimeFormatted = formatInTimezone(
11837
11915
  deployResult.schedule.atTime,
11838
11916
  deployResult.schedule.timezone
11839
11917
  );
11840
- console.log(chalk49.dim(` At: ${atTimeFormatted}`));
11918
+ console.log(chalk50.dim(` At: ${atTimeFormatted}`));
11841
11919
  }
11842
11920
  }
11843
11921
  async function tryEnableSchedule(scheduleName, composeId, agentName) {
11844
11922
  try {
11845
11923
  await enableSchedule({ name: scheduleName, composeId });
11846
11924
  console.log(
11847
- chalk49.green(`\u2713 Enabled schedule for agent ${chalk49.cyan(agentName)}`)
11925
+ chalk50.green(`\u2713 Enabled schedule for agent ${chalk50.cyan(agentName)}`)
11848
11926
  );
11849
11927
  } catch (error) {
11850
- console.error(chalk49.yellow("\u26A0 Failed to enable schedule"));
11928
+ console.error(chalk50.yellow("\u26A0 Failed to enable schedule"));
11851
11929
  if (error instanceof ApiRequestError) {
11852
11930
  if (error.code === "SCHEDULE_PAST") {
11853
- console.error(chalk49.dim(" Scheduled time has already passed"));
11931
+ console.error(chalk50.dim(" Scheduled time has already passed"));
11854
11932
  } else {
11855
- console.error(chalk49.dim(` ${error.message}`));
11933
+ console.error(chalk50.dim(` ${error.message}`));
11856
11934
  }
11857
11935
  } else if (error instanceof Error) {
11858
- console.error(chalk49.dim(` ${error.message}`));
11936
+ console.error(chalk50.dim(` ${error.message}`));
11859
11937
  }
11860
11938
  console.log(
11861
- ` To enable manually: ${chalk49.cyan(`vm0 schedule enable ${agentName}`)}`
11939
+ ` To enable manually: ${chalk50.cyan(`vm0 schedule enable ${agentName}`)}`
11862
11940
  );
11863
11941
  }
11864
11942
  }
11865
11943
  function showEnableHint(agentName) {
11866
11944
  console.log();
11867
- console.log(` To enable: ${chalk49.cyan(`vm0 schedule enable ${agentName}`)}`);
11945
+ console.log(` To enable: ${chalk50.cyan(`vm0 schedule enable ${agentName}`)}`);
11868
11946
  }
11869
11947
  async function handleScheduleEnabling(params) {
11870
11948
  const { scheduleName, composeId, agentName, enableFlag, shouldPromptEnable } = params;
@@ -11885,12 +11963,12 @@ async function handleScheduleEnabling(params) {
11885
11963
  showEnableHint(agentName);
11886
11964
  }
11887
11965
  }
11888
- var setupCommand = new Command45().name("setup").description("Create or edit a schedule for an agent").argument("<agent-name>", "Agent name to configure schedule for").option("-f, --frequency <type>", "Frequency: daily|weekly|monthly|once").option("-t, --time <HH:MM>", "Time to run (24-hour format)").option("-d, --day <day>", "Day of week (mon-sun) or day of month (1-31)").option("-z, --timezone <tz>", "IANA timezone").option("-p, --prompt <text>", "Prompt to run").option("--artifact-name <name>", "Artifact name", "artifact").option("-e, --enable", "Enable schedule immediately after creation").action(
11966
+ var setupCommand = new Command46().name("setup").description("Create or edit a schedule for an agent").argument("<agent-name>", "Agent name to configure schedule for").option("-f, --frequency <type>", "Frequency: daily|weekly|monthly|once").option("-t, --time <HH:MM>", "Time to run (24-hour format)").option("-d, --day <day>", "Day of week (mon-sun) or day of month (1-31)").option("-z, --timezone <tz>", "IANA timezone").option("-p, --prompt <text>", "Prompt to run").option("--artifact-name <name>", "Artifact name", "artifact").option("-e, --enable", "Enable schedule immediately after creation").action(
11889
11967
  withErrorHandler(async (agentName, options) => {
11890
11968
  const { composeId, scheduleName } = await resolveAgent(agentName);
11891
11969
  const existingSchedule = await findExistingSchedule(agentName);
11892
11970
  console.log(
11893
- chalk49.dim(
11971
+ chalk50.dim(
11894
11972
  existingSchedule ? `Editing existing schedule for agent ${agentName}` : `Creating new schedule for agent ${agentName}`
11895
11973
  )
11896
11974
  );
@@ -11900,12 +11978,12 @@ var setupCommand = new Command45().name("setup").description("Create or edit a s
11900
11978
  defaults.frequency
11901
11979
  );
11902
11980
  if (!frequency) {
11903
- console.log(chalk49.dim("Cancelled"));
11981
+ console.log(chalk50.dim("Cancelled"));
11904
11982
  return;
11905
11983
  }
11906
11984
  const timing = await gatherTiming(frequency, options, defaults);
11907
11985
  if (!timing) {
11908
- console.log(chalk49.dim("Cancelled"));
11986
+ console.log(chalk50.dim("Cancelled"));
11909
11987
  return;
11910
11988
  }
11911
11989
  const { day, time, atTime } = timing;
@@ -11914,7 +11992,7 @@ var setupCommand = new Command45().name("setup").description("Create or edit a s
11914
11992
  existingSchedule?.timezone
11915
11993
  );
11916
11994
  if (!timezone) {
11917
- console.log(chalk49.dim("Cancelled"));
11995
+ console.log(chalk50.dim("Cancelled"));
11918
11996
  return;
11919
11997
  }
11920
11998
  const promptText_ = await gatherPromptText(
@@ -11922,7 +12000,7 @@ var setupCommand = new Command45().name("setup").description("Create or edit a s
11922
12000
  existingSchedule?.prompt
11923
12001
  );
11924
12002
  if (!promptText_) {
11925
- console.log(chalk49.dim("Cancelled"));
12003
+ console.log(chalk50.dim("Cancelled"));
11926
12004
  return;
11927
12005
  }
11928
12006
  const deployResult = await buildAndDeploy({
@@ -11950,15 +12028,15 @@ var setupCommand = new Command45().name("setup").description("Create or edit a s
11950
12028
  );
11951
12029
 
11952
12030
  // src/commands/schedule/list.ts
11953
- import { Command as Command46 } from "commander";
11954
- import chalk50 from "chalk";
11955
- var listCommand5 = new Command46().name("list").alias("ls").description("List all schedules").action(
12031
+ import { Command as Command47 } from "commander";
12032
+ import chalk51 from "chalk";
12033
+ var listCommand5 = new Command47().name("list").alias("ls").description("List all schedules").action(
11956
12034
  withErrorHandler(async () => {
11957
12035
  const result = await listSchedules();
11958
12036
  if (result.schedules.length === 0) {
11959
- console.log(chalk50.dim("No schedules found"));
12037
+ console.log(chalk51.dim("No schedules found"));
11960
12038
  console.log(
11961
- chalk50.dim(" Create one with: vm0 schedule setup <agent-name>")
12039
+ chalk51.dim(" Create one with: vm0 schedule setup <agent-name>")
11962
12040
  );
11963
12041
  return;
11964
12042
  }
@@ -11978,10 +12056,10 @@ var listCommand5 = new Command46().name("list").alias("ls").description("List al
11978
12056
  "STATUS".padEnd(8),
11979
12057
  "NEXT RUN"
11980
12058
  ].join(" ");
11981
- console.log(chalk50.dim(header));
12059
+ console.log(chalk51.dim(header));
11982
12060
  for (const schedule of result.schedules) {
11983
12061
  const trigger = schedule.cronExpression ? `${schedule.cronExpression} (${schedule.timezone})` : schedule.atTime || "-";
11984
- const status = schedule.enabled ? chalk50.green("enabled") : chalk50.yellow("disabled");
12062
+ const status = schedule.enabled ? chalk51.green("enabled") : chalk51.yellow("disabled");
11985
12063
  const nextRun = schedule.enabled ? formatRelativeTime2(schedule.nextRunAt) : "-";
11986
12064
  const row = [
11987
12065
  schedule.composeName.padEnd(agentWidth),
@@ -11996,45 +12074,45 @@ var listCommand5 = new Command46().name("list").alias("ls").description("List al
11996
12074
  );
11997
12075
 
11998
12076
  // src/commands/schedule/status.ts
11999
- import { Command as Command47 } from "commander";
12000
- import chalk51 from "chalk";
12077
+ import { Command as Command48 } from "commander";
12078
+ import chalk52 from "chalk";
12001
12079
  function formatDateTimeStyled(dateStr) {
12002
- if (!dateStr) return chalk51.dim("-");
12080
+ if (!dateStr) return chalk52.dim("-");
12003
12081
  const formatted = formatDateTime(dateStr);
12004
- return formatted.replace(/\(([^)]+)\)$/, chalk51.dim("($1)"));
12082
+ return formatted.replace(/\(([^)]+)\)$/, chalk52.dim("($1)"));
12005
12083
  }
12006
12084
  function formatTrigger(schedule) {
12007
12085
  if (schedule.cronExpression) {
12008
12086
  return schedule.cronExpression;
12009
12087
  }
12010
12088
  if (schedule.atTime) {
12011
- return `${schedule.atTime} ${chalk51.dim("(one-time)")}`;
12089
+ return `${schedule.atTime} ${chalk52.dim("(one-time)")}`;
12012
12090
  }
12013
- return chalk51.dim("-");
12091
+ return chalk52.dim("-");
12014
12092
  }
12015
12093
  function formatRunStatus2(status) {
12016
12094
  switch (status) {
12017
12095
  case "completed":
12018
- return chalk51.green(status);
12096
+ return chalk52.green(status);
12019
12097
  case "failed":
12020
12098
  case "timeout":
12021
- return chalk51.red(status);
12099
+ return chalk52.red(status);
12022
12100
  case "running":
12023
- return chalk51.cyan(status);
12101
+ return chalk52.cyan(status);
12024
12102
  case "pending":
12025
- return chalk51.yellow(status);
12103
+ return chalk52.yellow(status);
12026
12104
  default:
12027
12105
  return status;
12028
12106
  }
12029
12107
  }
12030
12108
  function printRunConfiguration(schedule) {
12031
- const statusText = schedule.enabled ? chalk51.green("enabled") : chalk51.yellow("disabled");
12109
+ const statusText = schedule.enabled ? chalk52.green("enabled") : chalk52.yellow("disabled");
12032
12110
  console.log(`${"Status:".padEnd(16)}${statusText}`);
12033
12111
  console.log(
12034
- `${"Agent:".padEnd(16)}${schedule.composeName} ${chalk51.dim(`(${schedule.scopeSlug})`)}`
12112
+ `${"Agent:".padEnd(16)}${schedule.composeName} ${chalk52.dim(`(${schedule.scopeSlug})`)}`
12035
12113
  );
12036
12114
  const promptPreview = schedule.prompt.length > 60 ? schedule.prompt.slice(0, 57) + "..." : schedule.prompt;
12037
- console.log(`${"Prompt:".padEnd(16)}${chalk51.dim(promptPreview)}`);
12115
+ console.log(`${"Prompt:".padEnd(16)}${chalk52.dim(promptPreview)}`);
12038
12116
  if (schedule.vars && Object.keys(schedule.vars).length > 0) {
12039
12117
  console.log(
12040
12118
  `${"Variables:".padEnd(16)}${Object.keys(schedule.vars).join(", ")}`
@@ -12071,7 +12149,7 @@ async function printRecentRuns(name, composeId, limit) {
12071
12149
  console.log();
12072
12150
  console.log("Recent Runs:");
12073
12151
  console.log(
12074
- chalk51.dim("RUN ID STATUS CREATED")
12152
+ chalk52.dim("RUN ID STATUS CREATED")
12075
12153
  );
12076
12154
  for (const run of runs) {
12077
12155
  const id = run.id;
@@ -12082,24 +12160,24 @@ async function printRecentRuns(name, composeId, limit) {
12082
12160
  }
12083
12161
  } catch {
12084
12162
  console.log();
12085
- console.log(chalk51.dim("Recent Runs: (unable to fetch)"));
12163
+ console.log(chalk52.dim("Recent Runs: (unable to fetch)"));
12086
12164
  }
12087
12165
  }
12088
12166
  function handleStatusError(error, agentName) {
12089
- console.error(chalk51.red("\u2717 Failed to get schedule status"));
12167
+ console.error(chalk52.red("\u2717 Failed to get schedule status"));
12090
12168
  if (error instanceof Error) {
12091
12169
  if (error.message.includes("Not authenticated")) {
12092
- console.error(chalk51.dim(" Run: vm0 auth login"));
12170
+ console.error(chalk52.dim(" Run: vm0 auth login"));
12093
12171
  } else if (error.message.includes("not found") || error.message.includes("Not found") || error.message.includes("No schedule found")) {
12094
- console.error(chalk51.dim(` No schedule found for agent "${agentName}"`));
12095
- console.error(chalk51.dim(" Run: vm0 schedule list"));
12172
+ console.error(chalk52.dim(` No schedule found for agent "${agentName}"`));
12173
+ console.error(chalk52.dim(" Run: vm0 schedule list"));
12096
12174
  } else {
12097
- console.error(chalk51.dim(` ${error.message}`));
12175
+ console.error(chalk52.dim(` ${error.message}`));
12098
12176
  }
12099
12177
  }
12100
12178
  process.exit(1);
12101
12179
  }
12102
- var statusCommand6 = new Command47().name("status").description("Show detailed status of a schedule").argument("<agent-name>", "Agent name").option(
12180
+ var statusCommand6 = new Command48().name("status").description("Show detailed status of a schedule").argument("<agent-name>", "Agent name").option(
12103
12181
  "-l, --limit <number>",
12104
12182
  "Number of recent runs to show (0 to hide)",
12105
12183
  "5"
@@ -12109,8 +12187,8 @@ var statusCommand6 = new Command47().name("status").description("Show detailed s
12109
12187
  const { name, composeId } = resolved;
12110
12188
  const schedule = await getScheduleByName({ name, composeId });
12111
12189
  console.log();
12112
- console.log(`Schedule for agent: ${chalk51.cyan(agentName)}`);
12113
- console.log(chalk51.dim("\u2501".repeat(50)));
12190
+ console.log(`Schedule for agent: ${chalk52.cyan(agentName)}`);
12191
+ console.log(chalk52.dim("\u2501".repeat(50)));
12114
12192
  printRunConfiguration(schedule);
12115
12193
  printTimeSchedule(schedule);
12116
12194
  const parsed = parseInt(options.limit, 10);
@@ -12126,24 +12204,24 @@ var statusCommand6 = new Command47().name("status").description("Show detailed s
12126
12204
  });
12127
12205
 
12128
12206
  // src/commands/schedule/delete.ts
12129
- import { Command as Command48 } from "commander";
12130
- import chalk52 from "chalk";
12131
- var deleteCommand = new Command48().name("delete").alias("rm").description("Delete a schedule").argument("<agent-name>", "Agent name").option("-f, --force", "Skip confirmation prompt").action(async (agentName, options) => {
12207
+ import { Command as Command49 } from "commander";
12208
+ import chalk53 from "chalk";
12209
+ var deleteCommand2 = new Command49().name("delete").alias("rm").description("Delete a schedule").argument("<agent-name>", "Agent name").option("-f, --force", "Skip confirmation prompt").action(async (agentName, options) => {
12132
12210
  try {
12133
12211
  const resolved = await resolveScheduleByAgent(agentName);
12134
12212
  if (!options.force) {
12135
12213
  if (!isInteractive()) {
12136
12214
  console.error(
12137
- chalk52.red("\u2717 --force required in non-interactive mode")
12215
+ chalk53.red("\u2717 --force required in non-interactive mode")
12138
12216
  );
12139
12217
  process.exit(1);
12140
12218
  }
12141
12219
  const confirmed = await promptConfirm(
12142
- `Delete schedule for agent ${chalk52.cyan(agentName)}?`,
12220
+ `Delete schedule for agent ${chalk53.cyan(agentName)}?`,
12143
12221
  false
12144
12222
  );
12145
12223
  if (!confirmed) {
12146
- console.log(chalk52.dim("Cancelled"));
12224
+ console.log(chalk53.dim("Cancelled"));
12147
12225
  return;
12148
12226
  }
12149
12227
  }
@@ -12152,20 +12230,20 @@ var deleteCommand = new Command48().name("delete").alias("rm").description("Dele
12152
12230
  composeId: resolved.composeId
12153
12231
  });
12154
12232
  console.log(
12155
- chalk52.green(`\u2713 Deleted schedule for agent ${chalk52.cyan(agentName)}`)
12233
+ chalk53.green(`\u2713 Deleted schedule for agent ${chalk53.cyan(agentName)}`)
12156
12234
  );
12157
12235
  } catch (error) {
12158
- console.error(chalk52.red("\u2717 Failed to delete schedule"));
12236
+ console.error(chalk53.red("\u2717 Failed to delete schedule"));
12159
12237
  if (error instanceof Error) {
12160
12238
  if (error.message.includes("Not authenticated")) {
12161
- console.error(chalk52.dim(" Run: vm0 auth login"));
12239
+ console.error(chalk53.dim(" Run: vm0 auth login"));
12162
12240
  } else if (error.message.toLowerCase().includes("not found") || error.message.includes("No schedule found")) {
12163
12241
  console.error(
12164
- chalk52.dim(` No schedule found for agent "${agentName}"`)
12242
+ chalk53.dim(` No schedule found for agent "${agentName}"`)
12165
12243
  );
12166
- console.error(chalk52.dim(" Run: vm0 schedule list"));
12244
+ console.error(chalk53.dim(" Run: vm0 schedule list"));
12167
12245
  } else {
12168
- console.error(chalk52.dim(` ${error.message}`));
12246
+ console.error(chalk53.dim(` ${error.message}`));
12169
12247
  }
12170
12248
  }
12171
12249
  process.exit(1);
@@ -12173,9 +12251,9 @@ var deleteCommand = new Command48().name("delete").alias("rm").description("Dele
12173
12251
  });
12174
12252
 
12175
12253
  // src/commands/schedule/enable.ts
12176
- import { Command as Command49 } from "commander";
12177
- import chalk53 from "chalk";
12178
- var enableCommand = new Command49().name("enable").description("Enable a schedule").argument("<agent-name>", "Agent name").action(async (agentName) => {
12254
+ import { Command as Command50 } from "commander";
12255
+ import chalk54 from "chalk";
12256
+ var enableCommand = new Command50().name("enable").description("Enable a schedule").argument("<agent-name>", "Agent name").action(async (agentName) => {
12179
12257
  try {
12180
12258
  const resolved = await resolveScheduleByAgent(agentName);
12181
12259
  await enableSchedule({
@@ -12183,34 +12261,34 @@ var enableCommand = new Command49().name("enable").description("Enable a schedul
12183
12261
  composeId: resolved.composeId
12184
12262
  });
12185
12263
  console.log(
12186
- chalk53.green(`\u2713 Enabled schedule for agent ${chalk53.cyan(agentName)}`)
12264
+ chalk54.green(`\u2713 Enabled schedule for agent ${chalk54.cyan(agentName)}`)
12187
12265
  );
12188
12266
  } catch (error) {
12189
- console.error(chalk53.red("\u2717 Failed to enable schedule"));
12267
+ console.error(chalk54.red("\u2717 Failed to enable schedule"));
12190
12268
  if (error instanceof ApiRequestError) {
12191
12269
  if (error.code === "SCHEDULE_PAST") {
12192
- console.error(chalk53.dim(" Scheduled time has already passed"));
12193
- console.error(chalk53.dim(` Run: vm0 schedule setup ${agentName}`));
12270
+ console.error(chalk54.dim(" Scheduled time has already passed"));
12271
+ console.error(chalk54.dim(` Run: vm0 schedule setup ${agentName}`));
12194
12272
  } else if (error.code === "NOT_FOUND") {
12195
12273
  console.error(
12196
- chalk53.dim(` No schedule found for agent "${agentName}"`)
12274
+ chalk54.dim(` No schedule found for agent "${agentName}"`)
12197
12275
  );
12198
- console.error(chalk53.dim(" Run: vm0 schedule list"));
12276
+ console.error(chalk54.dim(" Run: vm0 schedule list"));
12199
12277
  } else if (error.code === "UNAUTHORIZED") {
12200
- console.error(chalk53.dim(" Run: vm0 auth login"));
12278
+ console.error(chalk54.dim(" Run: vm0 auth login"));
12201
12279
  } else {
12202
- console.error(chalk53.dim(` ${error.message}`));
12280
+ console.error(chalk54.dim(` ${error.message}`));
12203
12281
  }
12204
12282
  } else if (error instanceof Error) {
12205
12283
  if (error.message.includes("Not authenticated")) {
12206
- console.error(chalk53.dim(" Run: vm0 auth login"));
12284
+ console.error(chalk54.dim(" Run: vm0 auth login"));
12207
12285
  } else if (error.message.includes("No schedule found")) {
12208
12286
  console.error(
12209
- chalk53.dim(` No schedule found for agent "${agentName}"`)
12287
+ chalk54.dim(` No schedule found for agent "${agentName}"`)
12210
12288
  );
12211
- console.error(chalk53.dim(" Run: vm0 schedule list"));
12289
+ console.error(chalk54.dim(" Run: vm0 schedule list"));
12212
12290
  } else {
12213
- console.error(chalk53.dim(` ${error.message}`));
12291
+ console.error(chalk54.dim(` ${error.message}`));
12214
12292
  }
12215
12293
  }
12216
12294
  process.exit(1);
@@ -12218,9 +12296,9 @@ var enableCommand = new Command49().name("enable").description("Enable a schedul
12218
12296
  });
12219
12297
 
12220
12298
  // src/commands/schedule/disable.ts
12221
- import { Command as Command50 } from "commander";
12222
- import chalk54 from "chalk";
12223
- var disableCommand = new Command50().name("disable").description("Disable a schedule").argument("<agent-name>", "Agent name").action(async (agentName) => {
12299
+ import { Command as Command51 } from "commander";
12300
+ import chalk55 from "chalk";
12301
+ var disableCommand = new Command51().name("disable").description("Disable a schedule").argument("<agent-name>", "Agent name").action(async (agentName) => {
12224
12302
  try {
12225
12303
  const resolved = await resolveScheduleByAgent(agentName);
12226
12304
  await disableSchedule({
@@ -12228,20 +12306,20 @@ var disableCommand = new Command50().name("disable").description("Disable a sche
12228
12306
  composeId: resolved.composeId
12229
12307
  });
12230
12308
  console.log(
12231
- chalk54.green(`\u2713 Disabled schedule for agent ${chalk54.cyan(agentName)}`)
12309
+ chalk55.green(`\u2713 Disabled schedule for agent ${chalk55.cyan(agentName)}`)
12232
12310
  );
12233
12311
  } catch (error) {
12234
- console.error(chalk54.red("\u2717 Failed to disable schedule"));
12312
+ console.error(chalk55.red("\u2717 Failed to disable schedule"));
12235
12313
  if (error instanceof Error) {
12236
12314
  if (error.message.includes("Not authenticated")) {
12237
- console.error(chalk54.dim(" Run: vm0 auth login"));
12315
+ console.error(chalk55.dim(" Run: vm0 auth login"));
12238
12316
  } else if (error.message.toLowerCase().includes("not found") || error.message.includes("No schedule found")) {
12239
12317
  console.error(
12240
- chalk54.dim(` No schedule found for agent "${agentName}"`)
12318
+ chalk55.dim(` No schedule found for agent "${agentName}"`)
12241
12319
  );
12242
- console.error(chalk54.dim(" Run: vm0 schedule list"));
12320
+ console.error(chalk55.dim(" Run: vm0 schedule list"));
12243
12321
  } else {
12244
- console.error(chalk54.dim(` ${error.message}`));
12322
+ console.error(chalk55.dim(` ${error.message}`));
12245
12323
  }
12246
12324
  }
12247
12325
  process.exit(1);
@@ -12249,11 +12327,11 @@ var disableCommand = new Command50().name("disable").description("Disable a sche
12249
12327
  });
12250
12328
 
12251
12329
  // src/commands/schedule/index.ts
12252
- var scheduleCommand = new Command51().name("schedule").description("Manage agent schedules").addCommand(setupCommand).addCommand(listCommand5).addCommand(statusCommand6).addCommand(deleteCommand).addCommand(enableCommand).addCommand(disableCommand);
12330
+ var scheduleCommand = new Command52().name("schedule").description("Manage agent schedules").addCommand(setupCommand).addCommand(listCommand5).addCommand(statusCommand6).addCommand(deleteCommand2).addCommand(enableCommand).addCommand(disableCommand);
12253
12331
 
12254
12332
  // src/commands/usage/index.ts
12255
- import { Command as Command52 } from "commander";
12256
- import chalk55 from "chalk";
12333
+ import { Command as Command53 } from "commander";
12334
+ import chalk56 from "chalk";
12257
12335
 
12258
12336
  // src/lib/utils/duration-formatter.ts
12259
12337
  function formatDuration(ms) {
@@ -12326,7 +12404,7 @@ function fillMissingDates(daily, startDate, endDate) {
12326
12404
  result.sort((a, b) => b.date.localeCompare(a.date));
12327
12405
  return result;
12328
12406
  }
12329
- var usageCommand = new Command52().name("usage").description("View usage statistics").option("--since <date>", "Start date (ISO format or relative: 7d, 30d)").option(
12407
+ var usageCommand = new Command53().name("usage").description("View usage statistics").option("--since <date>", "Start date (ISO format or relative: 7d, 30d)").option(
12330
12408
  "--until <date>",
12331
12409
  "End date (ISO format or relative, defaults to now)"
12332
12410
  ).action(async (options) => {
@@ -12340,7 +12418,7 @@ var usageCommand = new Command52().name("usage").description("View usage statist
12340
12418
  endDate = new Date(untilMs);
12341
12419
  } catch {
12342
12420
  console.error(
12343
- chalk55.red(
12421
+ chalk56.red(
12344
12422
  "\u2717 Invalid --until format. Use ISO (2026-01-01) or relative (7d, 30d)"
12345
12423
  )
12346
12424
  );
@@ -12355,7 +12433,7 @@ var usageCommand = new Command52().name("usage").description("View usage statist
12355
12433
  startDate = new Date(sinceMs);
12356
12434
  } catch {
12357
12435
  console.error(
12358
- chalk55.red(
12436
+ chalk56.red(
12359
12437
  "\u2717 Invalid --since format. Use ISO (2026-01-01) or relative (7d, 30d)"
12360
12438
  )
12361
12439
  );
@@ -12365,13 +12443,13 @@ var usageCommand = new Command52().name("usage").description("View usage statist
12365
12443
  startDate = new Date(endDate.getTime() - DEFAULT_RANGE_MS);
12366
12444
  }
12367
12445
  if (startDate >= endDate) {
12368
- console.error(chalk55.red("\u2717 --since must be before --until"));
12446
+ console.error(chalk56.red("\u2717 --since must be before --until"));
12369
12447
  process.exit(1);
12370
12448
  }
12371
12449
  const rangeMs = endDate.getTime() - startDate.getTime();
12372
12450
  if (rangeMs > MAX_RANGE_MS) {
12373
12451
  console.error(
12374
- chalk55.red(
12452
+ chalk56.red(
12375
12453
  "\u2717 Time range exceeds maximum of 30 days. Use --until to specify an end date"
12376
12454
  )
12377
12455
  );
@@ -12388,19 +12466,19 @@ var usageCommand = new Command52().name("usage").description("View usage statist
12388
12466
  );
12389
12467
  console.log();
12390
12468
  console.log(
12391
- chalk55.bold(
12469
+ chalk56.bold(
12392
12470
  `Usage Summary (${formatDateRange(usage.period.start, usage.period.end)})`
12393
12471
  )
12394
12472
  );
12395
12473
  console.log();
12396
- console.log(chalk55.dim("DATE RUNS RUN TIME"));
12474
+ console.log(chalk56.dim("DATE RUNS RUN TIME"));
12397
12475
  for (const day of filledDaily) {
12398
12476
  const dateDisplay = formatDateDisplay(day.date).padEnd(10);
12399
12477
  const runsDisplay = String(day.run_count).padStart(6);
12400
12478
  const timeDisplay = formatDuration(day.run_time_ms);
12401
12479
  console.log(`${dateDisplay}${runsDisplay} ${timeDisplay}`);
12402
12480
  }
12403
- console.log(chalk55.dim("\u2500".repeat(29)));
12481
+ console.log(chalk56.dim("\u2500".repeat(29)));
12404
12482
  const totalRunsDisplay = String(usage.summary.total_runs).padStart(6);
12405
12483
  const totalTimeDisplay = formatDuration(usage.summary.total_run_time_ms);
12406
12484
  console.log(
@@ -12410,72 +12488,72 @@ var usageCommand = new Command52().name("usage").description("View usage statist
12410
12488
  } catch (error) {
12411
12489
  if (error instanceof Error) {
12412
12490
  if (error.message.includes("Not authenticated")) {
12413
- console.error(chalk55.red("\u2717 Not authenticated"));
12414
- console.error(chalk55.dim(" Run: vm0 auth login"));
12491
+ console.error(chalk56.red("\u2717 Not authenticated"));
12492
+ console.error(chalk56.dim(" Run: vm0 auth login"));
12415
12493
  } else {
12416
- console.error(chalk55.red(`\u2717 ${error.message}`));
12494
+ console.error(chalk56.red(`\u2717 ${error.message}`));
12417
12495
  }
12418
12496
  } else {
12419
- console.error(chalk55.red("\u2717 An unexpected error occurred"));
12497
+ console.error(chalk56.red("\u2717 An unexpected error occurred"));
12420
12498
  }
12421
12499
  process.exit(1);
12422
12500
  }
12423
12501
  });
12424
12502
 
12425
12503
  // src/commands/secret/index.ts
12426
- import { Command as Command56 } from "commander";
12504
+ import { Command as Command57 } from "commander";
12427
12505
 
12428
12506
  // src/commands/secret/list.ts
12429
- import { Command as Command53 } from "commander";
12430
- import chalk56 from "chalk";
12431
- var listCommand6 = new Command53().name("list").alias("ls").description("List all secrets").action(
12507
+ import { Command as Command54 } from "commander";
12508
+ import chalk57 from "chalk";
12509
+ var listCommand6 = new Command54().name("list").alias("ls").description("List all secrets").action(
12432
12510
  withErrorHandler(async () => {
12433
12511
  const result = await listSecrets();
12434
12512
  if (result.secrets.length === 0) {
12435
- console.log(chalk56.dim("No secrets found"));
12513
+ console.log(chalk57.dim("No secrets found"));
12436
12514
  console.log();
12437
12515
  console.log("To add a secret:");
12438
- console.log(chalk56.cyan(" vm0 secret set MY_API_KEY --body <value>"));
12516
+ console.log(chalk57.cyan(" vm0 secret set MY_API_KEY --body <value>"));
12439
12517
  return;
12440
12518
  }
12441
- console.log(chalk56.bold("Secrets:"));
12519
+ console.log(chalk57.bold("Secrets:"));
12442
12520
  console.log();
12443
12521
  for (const secret of result.secrets) {
12444
12522
  let typeIndicator = "";
12445
12523
  let derivedLine = null;
12446
12524
  if (secret.type === "model-provider") {
12447
- typeIndicator = chalk56.dim(" [model-provider]");
12525
+ typeIndicator = chalk57.dim(" [model-provider]");
12448
12526
  } else if (secret.type === "connector") {
12449
12527
  const derived = getConnectorDerivedNames(secret.name);
12450
12528
  if (derived) {
12451
- typeIndicator = chalk56.dim(` [${derived.connectorLabel} connector]`);
12452
- derivedLine = chalk56.dim(
12529
+ typeIndicator = chalk57.dim(` [${derived.connectorLabel} connector]`);
12530
+ derivedLine = chalk57.dim(
12453
12531
  `Available as: ${derived.envVarNames.join(", ")}`
12454
12532
  );
12455
12533
  } else {
12456
- typeIndicator = chalk56.dim(" [connector]");
12534
+ typeIndicator = chalk57.dim(" [connector]");
12457
12535
  }
12458
12536
  }
12459
- console.log(` ${chalk56.cyan(secret.name)}${typeIndicator}`);
12537
+ console.log(` ${chalk57.cyan(secret.name)}${typeIndicator}`);
12460
12538
  if (derivedLine) {
12461
12539
  console.log(` ${derivedLine}`);
12462
12540
  }
12463
12541
  if (secret.description) {
12464
- console.log(` ${chalk56.dim(secret.description)}`);
12542
+ console.log(` ${chalk57.dim(secret.description)}`);
12465
12543
  }
12466
12544
  console.log(
12467
- ` ${chalk56.dim(`Updated: ${new Date(secret.updatedAt).toLocaleString()}`)}`
12545
+ ` ${chalk57.dim(`Updated: ${new Date(secret.updatedAt).toLocaleString()}`)}`
12468
12546
  );
12469
12547
  console.log();
12470
12548
  }
12471
- console.log(chalk56.dim(`Total: ${result.secrets.length} secret(s)`));
12549
+ console.log(chalk57.dim(`Total: ${result.secrets.length} secret(s)`));
12472
12550
  })
12473
12551
  );
12474
12552
 
12475
12553
  // src/commands/secret/set.ts
12476
- import { Command as Command54 } from "commander";
12477
- import chalk57 from "chalk";
12478
- var setCommand2 = new Command54().name("set").description("Create or update a secret").argument("<name>", "Secret name (uppercase, e.g., MY_API_KEY)").option(
12554
+ import { Command as Command55 } from "commander";
12555
+ import chalk58 from "chalk";
12556
+ var setCommand2 = new Command55().name("set").description("Create or update a secret").argument("<name>", "Secret name (uppercase, e.g., MY_API_KEY)").option(
12479
12557
  "-b, --body <value>",
12480
12558
  "Secret value (required in non-interactive mode)"
12481
12559
  ).option("-d, --description <description>", "Optional description").action(
@@ -12492,12 +12570,12 @@ var setCommand2 = new Command54().name("set").description("Create or update a se
12492
12570
  value = prompted;
12493
12571
  } else {
12494
12572
  console.error(
12495
- chalk57.red("\u2717 --body is required in non-interactive mode")
12573
+ chalk58.red("\u2717 --body is required in non-interactive mode")
12496
12574
  );
12497
12575
  console.error();
12498
12576
  console.error("Usage:");
12499
12577
  console.error(
12500
- chalk57.cyan(` vm0 secret set ${name} --body "your-secret-value"`)
12578
+ chalk58.cyan(` vm0 secret set ${name} --body "your-secret-value"`)
12501
12579
  );
12502
12580
  process.exit(1);
12503
12581
  }
@@ -12506,29 +12584,29 @@ var setCommand2 = new Command54().name("set").description("Create or update a se
12506
12584
  value,
12507
12585
  description: options.description
12508
12586
  });
12509
- console.log(chalk57.green(`\u2713 Secret "${secret.name}" saved`));
12587
+ console.log(chalk58.green(`\u2713 Secret "${secret.name}" saved`));
12510
12588
  console.log();
12511
12589
  console.log("Use in vm0.yaml:");
12512
- console.log(chalk57.cyan(` environment:`));
12513
- console.log(chalk57.cyan(` ${name}: \${{ secrets.${name} }}`));
12590
+ console.log(chalk58.cyan(` environment:`));
12591
+ console.log(chalk58.cyan(` ${name}: \${{ secrets.${name} }}`));
12514
12592
  } catch (error) {
12515
12593
  if (error instanceof Error) {
12516
12594
  if (error.message.includes("Not authenticated")) {
12517
12595
  console.error(
12518
- chalk57.red("\u2717 Not authenticated. Run: vm0 auth login")
12596
+ chalk58.red("\u2717 Not authenticated. Run: vm0 auth login")
12519
12597
  );
12520
12598
  } else if (error.message.includes("must contain only uppercase")) {
12521
- console.error(chalk57.red(`\u2717 ${error.message}`));
12599
+ console.error(chalk58.red(`\u2717 ${error.message}`));
12522
12600
  console.error();
12523
12601
  console.error("Examples of valid secret names:");
12524
- console.error(chalk57.dim(" MY_API_KEY"));
12525
- console.error(chalk57.dim(" GITHUB_TOKEN"));
12526
- console.error(chalk57.dim(" AWS_ACCESS_KEY_ID"));
12602
+ console.error(chalk58.dim(" MY_API_KEY"));
12603
+ console.error(chalk58.dim(" GITHUB_TOKEN"));
12604
+ console.error(chalk58.dim(" AWS_ACCESS_KEY_ID"));
12527
12605
  } else {
12528
- console.error(chalk57.red(`\u2717 ${error.message}`));
12606
+ console.error(chalk58.red(`\u2717 ${error.message}`));
12529
12607
  }
12530
12608
  } else {
12531
- console.error(chalk57.red("\u2717 An unexpected error occurred"));
12609
+ console.error(chalk58.red("\u2717 An unexpected error occurred"));
12532
12610
  }
12533
12611
  process.exit(1);
12534
12612
  }
@@ -12536,20 +12614,20 @@ var setCommand2 = new Command54().name("set").description("Create or update a se
12536
12614
  );
12537
12615
 
12538
12616
  // src/commands/secret/delete.ts
12539
- import { Command as Command55 } from "commander";
12540
- import chalk58 from "chalk";
12541
- var deleteCommand2 = new Command55().name("delete").description("Delete a secret").argument("<name>", "Secret name to delete").option("-y, --yes", "Skip confirmation prompt").action(async (name, options) => {
12617
+ import { Command as Command56 } from "commander";
12618
+ import chalk59 from "chalk";
12619
+ var deleteCommand3 = new Command56().name("delete").description("Delete a secret").argument("<name>", "Secret name to delete").option("-y, --yes", "Skip confirmation prompt").action(async (name, options) => {
12542
12620
  try {
12543
12621
  try {
12544
12622
  await getSecret(name);
12545
12623
  } catch {
12546
- console.error(chalk58.red(`\u2717 Secret "${name}" not found`));
12624
+ console.error(chalk59.red(`\u2717 Secret "${name}" not found`));
12547
12625
  process.exit(1);
12548
12626
  }
12549
12627
  if (!options.yes) {
12550
12628
  if (!isInteractive()) {
12551
12629
  console.error(
12552
- chalk58.red("\u2717 --yes flag is required in non-interactive mode")
12630
+ chalk59.red("\u2717 --yes flag is required in non-interactive mode")
12553
12631
  );
12554
12632
  process.exit(1);
12555
12633
  }
@@ -12558,72 +12636,72 @@ var deleteCommand2 = new Command55().name("delete").description("Delete a secret
12558
12636
  false
12559
12637
  );
12560
12638
  if (!confirmed) {
12561
- console.log(chalk58.dim("Cancelled"));
12639
+ console.log(chalk59.dim("Cancelled"));
12562
12640
  return;
12563
12641
  }
12564
12642
  }
12565
12643
  await deleteSecret(name);
12566
- console.log(chalk58.green(`\u2713 Secret "${name}" deleted`));
12644
+ console.log(chalk59.green(`\u2713 Secret "${name}" deleted`));
12567
12645
  } catch (error) {
12568
12646
  if (error instanceof Error) {
12569
12647
  if (error.message.includes("Not authenticated")) {
12570
- console.error(chalk58.red("\u2717 Not authenticated. Run: vm0 auth login"));
12648
+ console.error(chalk59.red("\u2717 Not authenticated. Run: vm0 auth login"));
12571
12649
  } else {
12572
- console.error(chalk58.red(`\u2717 ${error.message}`));
12650
+ console.error(chalk59.red(`\u2717 ${error.message}`));
12573
12651
  }
12574
12652
  } else {
12575
- console.error(chalk58.red("\u2717 An unexpected error occurred"));
12653
+ console.error(chalk59.red("\u2717 An unexpected error occurred"));
12576
12654
  }
12577
12655
  process.exit(1);
12578
12656
  }
12579
12657
  });
12580
12658
 
12581
12659
  // src/commands/secret/index.ts
12582
- var secretCommand = new Command56().name("secret").description("Manage stored secrets for agent runs").addCommand(listCommand6).addCommand(setCommand2).addCommand(deleteCommand2);
12660
+ var secretCommand = new Command57().name("secret").description("Manage stored secrets for agent runs").addCommand(listCommand6).addCommand(setCommand2).addCommand(deleteCommand3);
12583
12661
 
12584
12662
  // src/commands/variable/index.ts
12585
- import { Command as Command60 } from "commander";
12663
+ import { Command as Command61 } from "commander";
12586
12664
 
12587
12665
  // src/commands/variable/list.ts
12588
- import { Command as Command57 } from "commander";
12589
- import chalk59 from "chalk";
12666
+ import { Command as Command58 } from "commander";
12667
+ import chalk60 from "chalk";
12590
12668
  function truncateValue(value, maxLength = 60) {
12591
12669
  if (value.length <= maxLength) {
12592
12670
  return value;
12593
12671
  }
12594
12672
  return value.slice(0, maxLength - 15) + "... [truncated]";
12595
12673
  }
12596
- var listCommand7 = new Command57().name("list").alias("ls").description("List all variables").action(
12674
+ var listCommand7 = new Command58().name("list").alias("ls").description("List all variables").action(
12597
12675
  withErrorHandler(async () => {
12598
12676
  const result = await listVariables();
12599
12677
  if (result.variables.length === 0) {
12600
- console.log(chalk59.dim("No variables found"));
12678
+ console.log(chalk60.dim("No variables found"));
12601
12679
  console.log();
12602
12680
  console.log("To add a variable:");
12603
- console.log(chalk59.cyan(" vm0 variable set MY_VAR <value>"));
12681
+ console.log(chalk60.cyan(" vm0 variable set MY_VAR <value>"));
12604
12682
  return;
12605
12683
  }
12606
- console.log(chalk59.bold("Variables:"));
12684
+ console.log(chalk60.bold("Variables:"));
12607
12685
  console.log();
12608
12686
  for (const variable of result.variables) {
12609
12687
  const displayValue = truncateValue(variable.value);
12610
- console.log(` ${chalk59.cyan(variable.name)} = ${displayValue}`);
12688
+ console.log(` ${chalk60.cyan(variable.name)} = ${displayValue}`);
12611
12689
  if (variable.description) {
12612
- console.log(` ${chalk59.dim(variable.description)}`);
12690
+ console.log(` ${chalk60.dim(variable.description)}`);
12613
12691
  }
12614
12692
  console.log(
12615
- ` ${chalk59.dim(`Updated: ${new Date(variable.updatedAt).toLocaleString()}`)}`
12693
+ ` ${chalk60.dim(`Updated: ${new Date(variable.updatedAt).toLocaleString()}`)}`
12616
12694
  );
12617
12695
  console.log();
12618
12696
  }
12619
- console.log(chalk59.dim(`Total: ${result.variables.length} variable(s)`));
12697
+ console.log(chalk60.dim(`Total: ${result.variables.length} variable(s)`));
12620
12698
  })
12621
12699
  );
12622
12700
 
12623
12701
  // src/commands/variable/set.ts
12624
- import { Command as Command58 } from "commander";
12625
- import chalk60 from "chalk";
12626
- var setCommand3 = new Command58().name("set").description("Create or update a variable").argument("<name>", "Variable name (uppercase, e.g., MY_VAR)").argument("<value>", "Variable value").option("-d, --description <description>", "Optional description").action(
12702
+ import { Command as Command59 } from "commander";
12703
+ import chalk61 from "chalk";
12704
+ var setCommand3 = new Command59().name("set").description("Create or update a variable").argument("<name>", "Variable name (uppercase, e.g., MY_VAR)").argument("<value>", "Variable value").option("-d, --description <description>", "Optional description").action(
12627
12705
  async (name, value, options) => {
12628
12706
  try {
12629
12707
  const variable = await setVariable({
@@ -12631,29 +12709,29 @@ var setCommand3 = new Command58().name("set").description("Create or update a va
12631
12709
  value,
12632
12710
  description: options.description
12633
12711
  });
12634
- console.log(chalk60.green(`\u2713 Variable "${variable.name}" saved`));
12712
+ console.log(chalk61.green(`\u2713 Variable "${variable.name}" saved`));
12635
12713
  console.log();
12636
12714
  console.log("Use in vm0.yaml:");
12637
- console.log(chalk60.cyan(` environment:`));
12638
- console.log(chalk60.cyan(` ${name}: \${{ vars.${name} }}`));
12715
+ console.log(chalk61.cyan(` environment:`));
12716
+ console.log(chalk61.cyan(` ${name}: \${{ vars.${name} }}`));
12639
12717
  } catch (error) {
12640
12718
  if (error instanceof Error) {
12641
12719
  if (error.message.includes("Not authenticated")) {
12642
12720
  console.error(
12643
- chalk60.red("\u2717 Not authenticated. Run: vm0 auth login")
12721
+ chalk61.red("\u2717 Not authenticated. Run: vm0 auth login")
12644
12722
  );
12645
12723
  } else if (error.message.includes("must contain only uppercase")) {
12646
- console.error(chalk60.red(`\u2717 ${error.message}`));
12724
+ console.error(chalk61.red(`\u2717 ${error.message}`));
12647
12725
  console.error();
12648
12726
  console.error("Examples of valid variable names:");
12649
- console.error(chalk60.dim(" MY_VAR"));
12650
- console.error(chalk60.dim(" API_URL"));
12651
- console.error(chalk60.dim(" DEBUG_MODE"));
12727
+ console.error(chalk61.dim(" MY_VAR"));
12728
+ console.error(chalk61.dim(" API_URL"));
12729
+ console.error(chalk61.dim(" DEBUG_MODE"));
12652
12730
  } else {
12653
- console.error(chalk60.red(`\u2717 ${error.message}`));
12731
+ console.error(chalk61.red(`\u2717 ${error.message}`));
12654
12732
  }
12655
12733
  } else {
12656
- console.error(chalk60.red("\u2717 An unexpected error occurred"));
12734
+ console.error(chalk61.red("\u2717 An unexpected error occurred"));
12657
12735
  }
12658
12736
  process.exit(1);
12659
12737
  }
@@ -12661,15 +12739,15 @@ var setCommand3 = new Command58().name("set").description("Create or update a va
12661
12739
  );
12662
12740
 
12663
12741
  // src/commands/variable/delete.ts
12664
- import { Command as Command59 } from "commander";
12665
- import chalk61 from "chalk";
12666
- var deleteCommand3 = new Command59().name("delete").description("Delete a variable").argument("<name>", "Variable name to delete").option("-y, --yes", "Skip confirmation prompt").action(async (name, options) => {
12742
+ import { Command as Command60 } from "commander";
12743
+ import chalk62 from "chalk";
12744
+ var deleteCommand4 = new Command60().name("delete").description("Delete a variable").argument("<name>", "Variable name to delete").option("-y, --yes", "Skip confirmation prompt").action(async (name, options) => {
12667
12745
  try {
12668
12746
  try {
12669
12747
  await getVariable(name);
12670
12748
  } catch (error) {
12671
12749
  if (error instanceof Error && error.message.toLowerCase().includes("not found")) {
12672
- console.error(chalk61.red(`\u2717 Variable "${name}" not found`));
12750
+ console.error(chalk62.red(`\u2717 Variable "${name}" not found`));
12673
12751
  process.exit(1);
12674
12752
  }
12675
12753
  throw error;
@@ -12677,7 +12755,7 @@ var deleteCommand3 = new Command59().name("delete").description("Delete a variab
12677
12755
  if (!options.yes) {
12678
12756
  if (!isInteractive()) {
12679
12757
  console.error(
12680
- chalk61.red("\u2717 --yes flag is required in non-interactive mode")
12758
+ chalk62.red("\u2717 --yes flag is required in non-interactive mode")
12681
12759
  );
12682
12760
  process.exit(1);
12683
12761
  }
@@ -12686,43 +12764,43 @@ var deleteCommand3 = new Command59().name("delete").description("Delete a variab
12686
12764
  false
12687
12765
  );
12688
12766
  if (!confirmed) {
12689
- console.log(chalk61.dim("Cancelled"));
12767
+ console.log(chalk62.dim("Cancelled"));
12690
12768
  return;
12691
12769
  }
12692
12770
  }
12693
12771
  await deleteVariable(name);
12694
- console.log(chalk61.green(`\u2713 Variable "${name}" deleted`));
12772
+ console.log(chalk62.green(`\u2713 Variable "${name}" deleted`));
12695
12773
  } catch (error) {
12696
12774
  if (error instanceof Error) {
12697
12775
  if (error.message.includes("Not authenticated")) {
12698
- console.error(chalk61.red("\u2717 Not authenticated. Run: vm0 auth login"));
12776
+ console.error(chalk62.red("\u2717 Not authenticated. Run: vm0 auth login"));
12699
12777
  } else {
12700
- console.error(chalk61.red(`\u2717 ${error.message}`));
12778
+ console.error(chalk62.red(`\u2717 ${error.message}`));
12701
12779
  }
12702
12780
  } else {
12703
- console.error(chalk61.red("\u2717 An unexpected error occurred"));
12781
+ console.error(chalk62.red("\u2717 An unexpected error occurred"));
12704
12782
  }
12705
12783
  process.exit(1);
12706
12784
  }
12707
12785
  });
12708
12786
 
12709
12787
  // src/commands/variable/index.ts
12710
- var variableCommand = new Command60().name("variable").description("Manage stored variables for agent runs").addCommand(listCommand7).addCommand(setCommand3).addCommand(deleteCommand3);
12788
+ var variableCommand = new Command61().name("variable").description("Manage stored variables for agent runs").addCommand(listCommand7).addCommand(setCommand3).addCommand(deleteCommand4);
12711
12789
 
12712
12790
  // src/commands/model-provider/index.ts
12713
- import { Command as Command65 } from "commander";
12791
+ import { Command as Command66 } from "commander";
12714
12792
 
12715
12793
  // src/commands/model-provider/list.ts
12716
- import { Command as Command61 } from "commander";
12717
- import chalk62 from "chalk";
12718
- var listCommand8 = new Command61().name("list").alias("ls").description("List all model providers").action(
12794
+ import { Command as Command62 } from "commander";
12795
+ import chalk63 from "chalk";
12796
+ var listCommand8 = new Command62().name("list").alias("ls").description("List all model providers").action(
12719
12797
  withErrorHandler(async () => {
12720
12798
  const result = await listModelProviders();
12721
12799
  if (result.modelProviders.length === 0) {
12722
- console.log(chalk62.dim("No model providers configured"));
12800
+ console.log(chalk63.dim("No model providers configured"));
12723
12801
  console.log();
12724
12802
  console.log("To add a model provider:");
12725
- console.log(chalk62.cyan(" vm0 model-provider setup"));
12803
+ console.log(chalk63.cyan(" vm0 model-provider setup"));
12726
12804
  return;
12727
12805
  }
12728
12806
  const byFramework = result.modelProviders.reduce(
@@ -12736,16 +12814,16 @@ var listCommand8 = new Command61().name("list").alias("ls").description("List al
12736
12814
  },
12737
12815
  {}
12738
12816
  );
12739
- console.log(chalk62.bold("Model Providers:"));
12817
+ console.log(chalk63.bold("Model Providers:"));
12740
12818
  console.log();
12741
12819
  for (const [framework, providers] of Object.entries(byFramework)) {
12742
- console.log(` ${chalk62.cyan(framework)}:`);
12820
+ console.log(` ${chalk63.cyan(framework)}:`);
12743
12821
  for (const provider of providers) {
12744
- const defaultTag = provider.isDefault ? chalk62.green(" (default)") : "";
12745
- const modelTag = provider.selectedModel ? chalk62.dim(` [${provider.selectedModel}]`) : "";
12822
+ const defaultTag = provider.isDefault ? chalk63.green(" (default)") : "";
12823
+ const modelTag = provider.selectedModel ? chalk63.dim(` [${provider.selectedModel}]`) : "";
12746
12824
  console.log(` ${provider.type}${defaultTag}${modelTag}`);
12747
12825
  console.log(
12748
- chalk62.dim(
12826
+ chalk63.dim(
12749
12827
  ` Updated: ${new Date(provider.updatedAt).toLocaleString()}`
12750
12828
  )
12751
12829
  );
@@ -12753,22 +12831,22 @@ var listCommand8 = new Command61().name("list").alias("ls").description("List al
12753
12831
  console.log();
12754
12832
  }
12755
12833
  console.log(
12756
- chalk62.dim(`Total: ${result.modelProviders.length} provider(s)`)
12834
+ chalk63.dim(`Total: ${result.modelProviders.length} provider(s)`)
12757
12835
  );
12758
12836
  })
12759
12837
  );
12760
12838
 
12761
12839
  // src/commands/model-provider/setup.ts
12762
- import { Command as Command62 } from "commander";
12763
- import chalk63 from "chalk";
12840
+ import { Command as Command63 } from "commander";
12841
+ import chalk64 from "chalk";
12764
12842
  import prompts2 from "prompts";
12765
12843
  function validateProviderType(typeStr) {
12766
12844
  if (!Object.keys(MODEL_PROVIDER_TYPES).includes(typeStr)) {
12767
- console.error(chalk63.red(`\u2717 Invalid type "${typeStr}"`));
12845
+ console.error(chalk64.red(`\u2717 Invalid type "${typeStr}"`));
12768
12846
  console.error();
12769
12847
  console.error("Valid types:");
12770
12848
  for (const [t, config] of Object.entries(MODEL_PROVIDER_TYPES)) {
12771
- console.error(` ${chalk63.cyan(t)} - ${config.label}`);
12849
+ console.error(` ${chalk64.cyan(t)} - ${config.label}`);
12772
12850
  }
12773
12851
  process.exit(1);
12774
12852
  }
@@ -12780,11 +12858,11 @@ function validateModel(type2, modelStr) {
12780
12858
  return modelStr;
12781
12859
  }
12782
12860
  if (models && !models.includes(modelStr)) {
12783
- console.error(chalk63.red(`\u2717 Invalid model "${modelStr}"`));
12861
+ console.error(chalk64.red(`\u2717 Invalid model "${modelStr}"`));
12784
12862
  console.error();
12785
12863
  console.error("Valid models:");
12786
12864
  for (const m of models) {
12787
- console.error(` ${chalk63.cyan(m)}`);
12865
+ console.error(` ${chalk64.cyan(m)}`);
12788
12866
  }
12789
12867
  process.exit(1);
12790
12868
  }
@@ -12793,12 +12871,12 @@ function validateModel(type2, modelStr) {
12793
12871
  function validateAuthMethod(type2, authMethodStr) {
12794
12872
  const authMethods = getAuthMethodsForType(type2);
12795
12873
  if (!authMethods || !(authMethodStr in authMethods)) {
12796
- console.error(chalk63.red(`\u2717 Invalid auth method "${authMethodStr}"`));
12874
+ console.error(chalk64.red(`\u2717 Invalid auth method "${authMethodStr}"`));
12797
12875
  console.error();
12798
12876
  console.error("Valid auth methods:");
12799
12877
  if (authMethods) {
12800
12878
  for (const [method, config] of Object.entries(authMethods)) {
12801
- console.error(` ${chalk63.cyan(method)} - ${config.label}`);
12879
+ console.error(` ${chalk64.cyan(method)} - ${config.label}`);
12802
12880
  }
12803
12881
  }
12804
12882
  process.exit(1);
@@ -12808,7 +12886,7 @@ function validateAuthMethod(type2, authMethodStr) {
12808
12886
  function parseSecrets(type2, authMethod, secretArgs) {
12809
12887
  const secretsConfig = getSecretsForAuthMethod(type2, authMethod);
12810
12888
  if (!secretsConfig) {
12811
- console.error(chalk63.red(`\u2717 Invalid auth method "${authMethod}"`));
12889
+ console.error(chalk64.red(`\u2717 Invalid auth method "${authMethod}"`));
12812
12890
  process.exit(1);
12813
12891
  }
12814
12892
  const secretNames = Object.keys(secretsConfig);
@@ -12816,19 +12894,19 @@ function parseSecrets(type2, authMethod, secretArgs) {
12816
12894
  if (secretArgs.length === 1 && firstArg && !firstArg.includes("=")) {
12817
12895
  if (secretNames.length !== 1) {
12818
12896
  console.error(
12819
- chalk63.red("\u2717 Must use KEY=VALUE format for multi-secret auth methods")
12897
+ chalk64.red("\u2717 Must use KEY=VALUE format for multi-secret auth methods")
12820
12898
  );
12821
12899
  console.error();
12822
12900
  console.error("Required secrets:");
12823
12901
  for (const [name, fieldConfig] of Object.entries(secretsConfig)) {
12824
12902
  const requiredNote = fieldConfig.required ? " (required)" : "";
12825
- console.error(` ${chalk63.cyan(name)}${requiredNote}`);
12903
+ console.error(` ${chalk64.cyan(name)}${requiredNote}`);
12826
12904
  }
12827
12905
  process.exit(1);
12828
12906
  }
12829
12907
  const firstSecretName = secretNames[0];
12830
12908
  if (!firstSecretName) {
12831
- console.error(chalk63.red("\u2717 No secrets defined for this auth method"));
12909
+ console.error(chalk64.red("\u2717 No secrets defined for this auth method"));
12832
12910
  process.exit(1);
12833
12911
  }
12834
12912
  return { [firstSecretName]: firstArg };
@@ -12837,7 +12915,7 @@ function parseSecrets(type2, authMethod, secretArgs) {
12837
12915
  for (const arg of secretArgs) {
12838
12916
  const eqIndex = arg.indexOf("=");
12839
12917
  if (eqIndex === -1) {
12840
- console.error(chalk63.red(`\u2717 Invalid secret format "${arg}"`));
12918
+ console.error(chalk64.red(`\u2717 Invalid secret format "${arg}"`));
12841
12919
  console.error();
12842
12920
  console.error("Use KEY=VALUE format (e.g., AWS_REGION=us-east-1)");
12843
12921
  process.exit(1);
@@ -12851,17 +12929,17 @@ function parseSecrets(type2, authMethod, secretArgs) {
12851
12929
  function validateSecrets(type2, authMethod, secrets) {
12852
12930
  const secretsConfig = getSecretsForAuthMethod(type2, authMethod);
12853
12931
  if (!secretsConfig) {
12854
- console.error(chalk63.red(`\u2717 Invalid auth method "${authMethod}"`));
12932
+ console.error(chalk64.red(`\u2717 Invalid auth method "${authMethod}"`));
12855
12933
  process.exit(1);
12856
12934
  }
12857
12935
  for (const [name, fieldConfig] of Object.entries(secretsConfig)) {
12858
12936
  if (fieldConfig.required && !secrets[name]) {
12859
- console.error(chalk63.red(`\u2717 Missing required secret: ${name}`));
12937
+ console.error(chalk64.red(`\u2717 Missing required secret: ${name}`));
12860
12938
  console.error();
12861
12939
  console.error("Required secrets:");
12862
12940
  for (const [n, fc] of Object.entries(secretsConfig)) {
12863
12941
  if (fc.required) {
12864
- console.error(` ${chalk63.cyan(n)} - ${fc.label}`);
12942
+ console.error(` ${chalk64.cyan(n)} - ${fc.label}`);
12865
12943
  }
12866
12944
  }
12867
12945
  process.exit(1);
@@ -12869,12 +12947,12 @@ function validateSecrets(type2, authMethod, secrets) {
12869
12947
  }
12870
12948
  for (const name of Object.keys(secrets)) {
12871
12949
  if (!(name in secretsConfig)) {
12872
- console.error(chalk63.red(`\u2717 Unknown secret: ${name}`));
12950
+ console.error(chalk64.red(`\u2717 Unknown secret: ${name}`));
12873
12951
  console.error();
12874
12952
  console.error("Valid secrets:");
12875
12953
  for (const [n, fc] of Object.entries(secretsConfig)) {
12876
12954
  const requiredNote = fc.required ? " (required)" : " (optional)";
12877
- console.error(` ${chalk63.cyan(n)}${requiredNote}`);
12955
+ console.error(` ${chalk64.cyan(n)}${requiredNote}`);
12878
12956
  }
12879
12957
  process.exit(1);
12880
12958
  }
@@ -12897,7 +12975,7 @@ function handleNonInteractiveMode(options) {
12897
12975
  const defaultAuthMethod = getDefaultAuthMethod(type2);
12898
12976
  const authMethods = getAuthMethodsForType(type2);
12899
12977
  if (!defaultAuthMethod || !authMethods) {
12900
- console.error(chalk63.red(`\u2717 Provider "${type2}" requires --auth-method`));
12978
+ console.error(chalk64.red(`\u2717 Provider "${type2}" requires --auth-method`));
12901
12979
  process.exit(1);
12902
12980
  }
12903
12981
  const authMethodNames = Object.keys(authMethods);
@@ -12905,7 +12983,7 @@ function handleNonInteractiveMode(options) {
12905
12983
  authMethod = authMethodNames[0];
12906
12984
  } else {
12907
12985
  console.error(
12908
- chalk63.red(
12986
+ chalk64.red(
12909
12987
  `\u2717 --auth-method is required for "${type2}" (multiple auth methods available)`
12910
12988
  )
12911
12989
  );
@@ -12914,13 +12992,13 @@ function handleNonInteractiveMode(options) {
12914
12992
  for (const [method, config] of Object.entries(authMethods)) {
12915
12993
  const defaultNote = method === defaultAuthMethod ? " (default)" : "";
12916
12994
  console.error(
12917
- ` ${chalk63.cyan(method)} - ${config.label}${defaultNote}`
12995
+ ` ${chalk64.cyan(method)} - ${config.label}${defaultNote}`
12918
12996
  );
12919
12997
  }
12920
12998
  console.error();
12921
12999
  console.error("Example:");
12922
13000
  console.error(
12923
- chalk63.cyan(
13001
+ chalk64.cyan(
12924
13002
  ` vm0 model-provider setup --type ${type2} --auth-method ${authMethodNames[0]} --secret KEY=VALUE`
12925
13003
  )
12926
13004
  );
@@ -12940,7 +13018,7 @@ function handleNonInteractiveMode(options) {
12940
13018
  const secretArgs = options.secret;
12941
13019
  const firstArg = secretArgs[0];
12942
13020
  if (!firstArg) {
12943
- console.error(chalk63.red("\u2717 Secret is required"));
13021
+ console.error(chalk64.red("\u2717 Secret is required"));
12944
13022
  process.exit(1);
12945
13023
  }
12946
13024
  let secret;
@@ -12989,7 +13067,7 @@ async function promptForModelSelection(type2) {
12989
13067
  if (selected === "__custom__") {
12990
13068
  const placeholder = getCustomModelPlaceholder(type2);
12991
13069
  if (placeholder) {
12992
- console.log(chalk63.dim(`Example: ${placeholder}`));
13070
+ console.log(chalk64.dim(`Example: ${placeholder}`));
12993
13071
  }
12994
13072
  const customResponse = await prompts2(
12995
13073
  {
@@ -13034,13 +13112,13 @@ function isSensitiveSecret(name) {
13034
13112
  async function promptForSecrets(type2, authMethod) {
13035
13113
  const secretsConfig = getSecretsForAuthMethod(type2, authMethod);
13036
13114
  if (!secretsConfig) {
13037
- console.error(chalk63.red(`\u2717 Invalid auth method "${authMethod}"`));
13115
+ console.error(chalk64.red(`\u2717 Invalid auth method "${authMethod}"`));
13038
13116
  process.exit(1);
13039
13117
  }
13040
13118
  const secrets = {};
13041
13119
  for (const [name, fieldConfig] of Object.entries(secretsConfig)) {
13042
13120
  if (fieldConfig.helpText) {
13043
- console.log(chalk63.dim(fieldConfig.helpText));
13121
+ console.log(chalk64.dim(fieldConfig.helpText));
13044
13122
  }
13045
13123
  const isSensitive = isSensitiveSecret(name);
13046
13124
  const placeholder = "placeholder" in fieldConfig ? fieldConfig.placeholder : "";
@@ -13075,11 +13153,11 @@ async function promptForSecrets(type2, authMethod) {
13075
13153
  }
13076
13154
  async function handleInteractiveMode() {
13077
13155
  if (!isInteractive()) {
13078
- console.error(chalk63.red("\u2717 Interactive mode requires a TTY"));
13156
+ console.error(chalk64.red("\u2717 Interactive mode requires a TTY"));
13079
13157
  console.error();
13080
13158
  console.error("Use non-interactive mode:");
13081
13159
  console.error(
13082
- chalk63.cyan(' vm0 model-provider setup --type <type> --secret "<value>"')
13160
+ chalk64.cyan(' vm0 model-provider setup --type <type> --secret "<value>"')
13083
13161
  );
13084
13162
  process.exit(1);
13085
13163
  }
@@ -13094,7 +13172,7 @@ async function handleInteractiveMode() {
13094
13172
  title = `${title} \u2713`;
13095
13173
  }
13096
13174
  if (isExperimental) {
13097
- title = `${title} ${chalk63.dim("(experimental)")}`;
13175
+ title = `${title} ${chalk64.dim("(experimental)")}`;
13098
13176
  }
13099
13177
  return {
13100
13178
  title,
@@ -13141,7 +13219,7 @@ async function handleInteractiveMode() {
13141
13219
  }
13142
13220
  const config = MODEL_PROVIDER_TYPES[type2];
13143
13221
  console.log();
13144
- console.log(chalk63.dim(config.helpText));
13222
+ console.log(chalk64.dim(config.helpText));
13145
13223
  console.log();
13146
13224
  if (hasAuthMethods(type2)) {
13147
13225
  const authMethod = await promptForAuthMethod(type2);
@@ -13182,13 +13260,13 @@ async function promptSetAsDefault(type2, framework, isDefault) {
13182
13260
  );
13183
13261
  if (response.setDefault) {
13184
13262
  await setModelProviderDefault(type2);
13185
- console.log(chalk63.green(`\u2713 Default for ${framework} set to "${type2}"`));
13263
+ console.log(chalk64.green(`\u2713 Default for ${framework} set to "${type2}"`));
13186
13264
  }
13187
13265
  }
13188
13266
  function collectSecrets(value, previous) {
13189
13267
  return previous.concat([value]);
13190
13268
  }
13191
- var setupCommand2 = new Command62().name("setup").description("Configure a model provider").option("-t, --type <type>", "Provider type (for non-interactive mode)").option(
13269
+ var setupCommand2 = new Command63().name("setup").description("Configure a model provider").option("-t, --type <type>", "Provider type (for non-interactive mode)").option(
13192
13270
  "-s, --secret <value>",
13193
13271
  "Secret value (can be used multiple times, supports VALUE or KEY=VALUE format)",
13194
13272
  collectSecrets,
@@ -13209,7 +13287,7 @@ var setupCommand2 = new Command62().name("setup").description("Configure a model
13209
13287
  model: options.model
13210
13288
  });
13211
13289
  } else if (options.type || secretArgs.length > 0) {
13212
- console.error(chalk63.red("\u2717 Both --type and --secret are required"));
13290
+ console.error(chalk64.red("\u2717 Both --type and --secret are required"));
13213
13291
  process.exit(1);
13214
13292
  } else {
13215
13293
  const result = await handleInteractiveMode();
@@ -13227,11 +13305,11 @@ var setupCommand2 = new Command62().name("setup").description("Configure a model
13227
13305
  const modelNote2 = provider2.selectedModel ? ` with model: ${provider2.selectedModel}` : "";
13228
13306
  if (!hasModelSelection(input.type)) {
13229
13307
  console.log(
13230
- chalk63.green(`\u2713 Model provider "${input.type}" unchanged`)
13308
+ chalk64.green(`\u2713 Model provider "${input.type}" unchanged`)
13231
13309
  );
13232
13310
  } else {
13233
13311
  console.log(
13234
- chalk63.green(
13312
+ chalk64.green(
13235
13313
  `\u2713 Model provider "${input.type}" updated${defaultNote2}${modelNote2}`
13236
13314
  )
13237
13315
  );
@@ -13256,7 +13334,7 @@ var setupCommand2 = new Command62().name("setup").description("Configure a model
13256
13334
  const defaultNote = provider.isDefault ? ` (default for ${provider.framework})` : "";
13257
13335
  const modelNote = provider.selectedModel ? ` with model: ${provider.selectedModel}` : "";
13258
13336
  console.log(
13259
- chalk63.green(
13337
+ chalk64.green(
13260
13338
  `\u2713 Model provider "${input.type}" ${action}${defaultNote}${modelNote}`
13261
13339
  )
13262
13340
  );
@@ -13272,82 +13350,82 @@ var setupCommand2 = new Command62().name("setup").description("Configure a model
13272
13350
  );
13273
13351
 
13274
13352
  // src/commands/model-provider/delete.ts
13275
- import { Command as Command63 } from "commander";
13276
- import chalk64 from "chalk";
13277
- var deleteCommand4 = new Command63().name("delete").description("Delete a model provider").argument("<type>", "Model provider type to delete").action(async (type2) => {
13353
+ import { Command as Command64 } from "commander";
13354
+ import chalk65 from "chalk";
13355
+ var deleteCommand5 = new Command64().name("delete").description("Delete a model provider").argument("<type>", "Model provider type to delete").action(async (type2) => {
13278
13356
  try {
13279
13357
  if (!Object.keys(MODEL_PROVIDER_TYPES).includes(type2)) {
13280
- console.error(chalk64.red(`\u2717 Invalid type "${type2}"`));
13358
+ console.error(chalk65.red(`\u2717 Invalid type "${type2}"`));
13281
13359
  console.log();
13282
13360
  console.log("Valid types:");
13283
13361
  for (const [t, config] of Object.entries(MODEL_PROVIDER_TYPES)) {
13284
- console.log(` ${chalk64.cyan(t)} - ${config.label}`);
13362
+ console.log(` ${chalk65.cyan(t)} - ${config.label}`);
13285
13363
  }
13286
13364
  process.exit(1);
13287
13365
  }
13288
13366
  await deleteModelProvider(type2);
13289
- console.log(chalk64.green(`\u2713 Model provider "${type2}" deleted`));
13367
+ console.log(chalk65.green(`\u2713 Model provider "${type2}" deleted`));
13290
13368
  } catch (error) {
13291
13369
  if (error instanceof Error) {
13292
13370
  if (error.message.includes("not found")) {
13293
- console.error(chalk64.red(`\u2717 Model provider "${type2}" not found`));
13371
+ console.error(chalk65.red(`\u2717 Model provider "${type2}" not found`));
13294
13372
  } else if (error.message.includes("Not authenticated")) {
13295
- console.error(chalk64.red("\u2717 Not authenticated. Run: vm0 auth login"));
13373
+ console.error(chalk65.red("\u2717 Not authenticated. Run: vm0 auth login"));
13296
13374
  } else {
13297
- console.error(chalk64.red(`\u2717 ${error.message}`));
13375
+ console.error(chalk65.red(`\u2717 ${error.message}`));
13298
13376
  }
13299
13377
  } else {
13300
- console.error(chalk64.red("\u2717 An unexpected error occurred"));
13378
+ console.error(chalk65.red("\u2717 An unexpected error occurred"));
13301
13379
  }
13302
13380
  process.exit(1);
13303
13381
  }
13304
13382
  });
13305
13383
 
13306
13384
  // src/commands/model-provider/set-default.ts
13307
- import { Command as Command64 } from "commander";
13308
- import chalk65 from "chalk";
13309
- var setDefaultCommand = new Command64().name("set-default").description("Set a model provider as default for its framework").argument("<type>", "Model provider type to set as default").action(async (type2) => {
13385
+ import { Command as Command65 } from "commander";
13386
+ import chalk66 from "chalk";
13387
+ var setDefaultCommand = new Command65().name("set-default").description("Set a model provider as default for its framework").argument("<type>", "Model provider type to set as default").action(async (type2) => {
13310
13388
  try {
13311
13389
  if (!Object.keys(MODEL_PROVIDER_TYPES).includes(type2)) {
13312
- console.error(chalk65.red(`\u2717 Invalid type "${type2}"`));
13390
+ console.error(chalk66.red(`\u2717 Invalid type "${type2}"`));
13313
13391
  console.log();
13314
13392
  console.log("Valid types:");
13315
13393
  for (const [t, config] of Object.entries(MODEL_PROVIDER_TYPES)) {
13316
- console.log(` ${chalk65.cyan(t)} - ${config.label}`);
13394
+ console.log(` ${chalk66.cyan(t)} - ${config.label}`);
13317
13395
  }
13318
13396
  process.exit(1);
13319
13397
  }
13320
13398
  const provider = await setModelProviderDefault(type2);
13321
13399
  console.log(
13322
- chalk65.green(
13400
+ chalk66.green(
13323
13401
  `\u2713 Default for ${provider.framework} set to "${provider.type}"`
13324
13402
  )
13325
13403
  );
13326
13404
  } catch (error) {
13327
13405
  if (error instanceof Error) {
13328
13406
  if (error.message.includes("not found")) {
13329
- console.error(chalk65.red(`\u2717 Model provider "${type2}" not found`));
13407
+ console.error(chalk66.red(`\u2717 Model provider "${type2}" not found`));
13330
13408
  } else if (error.message.includes("Not authenticated")) {
13331
- console.error(chalk65.red("\u2717 Not authenticated. Run: vm0 auth login"));
13409
+ console.error(chalk66.red("\u2717 Not authenticated. Run: vm0 auth login"));
13332
13410
  } else {
13333
- console.error(chalk65.red(`\u2717 ${error.message}`));
13411
+ console.error(chalk66.red(`\u2717 ${error.message}`));
13334
13412
  }
13335
13413
  } else {
13336
- console.error(chalk65.red("\u2717 An unexpected error occurred"));
13414
+ console.error(chalk66.red("\u2717 An unexpected error occurred"));
13337
13415
  }
13338
13416
  process.exit(1);
13339
13417
  }
13340
13418
  });
13341
13419
 
13342
13420
  // src/commands/model-provider/index.ts
13343
- var modelProviderCommand = new Command65().name("model-provider").description("Manage model providers for agent runs").addCommand(listCommand8).addCommand(setupCommand2).addCommand(deleteCommand4).addCommand(setDefaultCommand);
13421
+ var modelProviderCommand = new Command66().name("model-provider").description("Manage model providers for agent runs").addCommand(listCommand8).addCommand(setupCommand2).addCommand(deleteCommand5).addCommand(setDefaultCommand);
13344
13422
 
13345
13423
  // src/commands/connector/index.ts
13346
- import { Command as Command70 } from "commander";
13424
+ import { Command as Command71 } from "commander";
13347
13425
 
13348
13426
  // src/commands/connector/connect.ts
13349
- import { Command as Command66 } from "commander";
13350
- import chalk66 from "chalk";
13427
+ import { Command as Command67 } from "commander";
13428
+ import chalk67 from "chalk";
13351
13429
  import { initClient as initClient12 } from "@ts-rest/core";
13352
13430
  function delay2(ms) {
13353
13431
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -13366,18 +13444,18 @@ async function getHeaders2() {
13366
13444
  }
13367
13445
  return headers;
13368
13446
  }
13369
- var connectCommand = new Command66().name("connect").description("Connect a third-party service (e.g., GitHub)").argument("<type>", "Connector type (e.g., github)").action(async (type2) => {
13447
+ var connectCommand = new Command67().name("connect").description("Connect a third-party service (e.g., GitHub)").argument("<type>", "Connector type (e.g., github)").action(async (type2) => {
13370
13448
  try {
13371
13449
  const parseResult = connectorTypeSchema.safeParse(type2);
13372
13450
  if (!parseResult.success) {
13373
- console.error(chalk66.red(`\u2717 Unknown connector type: ${type2}`));
13451
+ console.error(chalk67.red(`\u2717 Unknown connector type: ${type2}`));
13374
13452
  console.error("Available connectors: github");
13375
13453
  process.exit(1);
13376
13454
  }
13377
13455
  const connectorType = parseResult.data;
13378
13456
  const apiUrl = await getApiUrl();
13379
13457
  const headers = await getHeaders2();
13380
- console.log(`Connecting ${chalk66.cyan(type2)}...`);
13458
+ console.log(`Connecting ${chalk67.cyan(type2)}...`);
13381
13459
  const sessionsClient = initClient12(connectorSessionsContract, {
13382
13460
  baseUrl: apiUrl,
13383
13461
  baseHeaders: headers,
@@ -13390,14 +13468,14 @@ var connectCommand = new Command66().name("connect").description("Connect a thir
13390
13468
  if (createResult.status !== 200) {
13391
13469
  const errorBody = createResult.body;
13392
13470
  console.error(
13393
- chalk66.red(`\u2717 Failed to create session: ${errorBody.error?.message}`)
13471
+ chalk67.red(`\u2717 Failed to create session: ${errorBody.error?.message}`)
13394
13472
  );
13395
13473
  process.exit(1);
13396
13474
  }
13397
13475
  const session = createResult.body;
13398
13476
  const verificationUrl = `${apiUrl}${session.verificationUrl}`;
13399
- console.log(chalk66.green("\nSession created"));
13400
- console.log(chalk66.cyan(`
13477
+ console.log(chalk67.green("\nSession created"));
13478
+ console.log(chalk67.cyan(`
13401
13479
  To connect, visit: ${verificationUrl}`));
13402
13480
  console.log(
13403
13481
  `
@@ -13424,7 +13502,7 @@ The session expires in ${Math.floor(session.expiresIn / 60)} minutes.`
13424
13502
  if (statusResult.status !== 200) {
13425
13503
  const errorBody = statusResult.body;
13426
13504
  console.error(
13427
- chalk66.red(
13505
+ chalk67.red(
13428
13506
  `
13429
13507
  \u2717 Failed to check status: ${errorBody.error?.message}`
13430
13508
  )
@@ -13434,17 +13512,17 @@ The session expires in ${Math.floor(session.expiresIn / 60)} minutes.`
13434
13512
  const status = statusResult.body;
13435
13513
  switch (status.status) {
13436
13514
  case "complete":
13437
- console.log(chalk66.green(`
13515
+ console.log(chalk67.green(`
13438
13516
 
13439
13517
  ${type2} connected successfully!`));
13440
13518
  return;
13441
13519
  case "expired":
13442
- console.error(chalk66.red("\n\u2717 Session expired, please try again"));
13520
+ console.error(chalk67.red("\n\u2717 Session expired, please try again"));
13443
13521
  process.exit(1);
13444
13522
  break;
13445
13523
  case "error":
13446
13524
  console.error(
13447
- chalk66.red(
13525
+ chalk67.red(
13448
13526
  `
13449
13527
  \u2717 Connection failed: ${status.errorMessage || "Unknown error"}`
13450
13528
  )
@@ -13452,29 +13530,29 @@ ${type2} connected successfully!`));
13452
13530
  process.exit(1);
13453
13531
  break;
13454
13532
  case "pending":
13455
- process.stdout.write(chalk66.dim("."));
13533
+ process.stdout.write(chalk67.dim("."));
13456
13534
  break;
13457
13535
  }
13458
13536
  }
13459
- console.error(chalk66.red("\n\u2717 Session timed out, please try again"));
13537
+ console.error(chalk67.red("\n\u2717 Session timed out, please try again"));
13460
13538
  process.exit(1);
13461
13539
  } catch (error) {
13462
13540
  if (error instanceof Error) {
13463
- console.error(chalk66.red(`\u2717 ${error.message}`));
13541
+ console.error(chalk67.red(`\u2717 ${error.message}`));
13464
13542
  if (error.cause instanceof Error) {
13465
- console.error(chalk66.dim(` Cause: ${error.cause.message}`));
13543
+ console.error(chalk67.dim(` Cause: ${error.cause.message}`));
13466
13544
  }
13467
13545
  } else {
13468
- console.error(chalk66.red("\u2717 An unexpected error occurred"));
13546
+ console.error(chalk67.red("\u2717 An unexpected error occurred"));
13469
13547
  }
13470
13548
  process.exit(1);
13471
13549
  }
13472
13550
  });
13473
13551
 
13474
13552
  // src/commands/connector/list.ts
13475
- import { Command as Command67 } from "commander";
13476
- import chalk67 from "chalk";
13477
- var listCommand9 = new Command67().name("list").alias("ls").description("List all connectors and their status").action(
13553
+ import { Command as Command68 } from "commander";
13554
+ import chalk68 from "chalk";
13555
+ var listCommand9 = new Command68().name("list").alias("ls").description("List all connectors and their status").action(
13478
13556
  withErrorHandler(async () => {
13479
13557
  const result = await listConnectors();
13480
13558
  const connectedMap = new Map(result.connectors.map((c24) => [c24.type, c24]));
@@ -13487,42 +13565,42 @@ var listCommand9 = new Command67().name("list").alias("ls").description("List al
13487
13565
  statusText.padEnd(statusWidth),
13488
13566
  "ACCOUNT"
13489
13567
  ].join(" ");
13490
- console.log(chalk67.dim(header));
13568
+ console.log(chalk68.dim(header));
13491
13569
  for (const type2 of allTypes) {
13492
13570
  const connector = connectedMap.get(type2);
13493
- const status = connector ? chalk67.green("\u2713".padEnd(statusWidth)) : chalk67.dim("-".padEnd(statusWidth));
13494
- const account = connector?.externalUsername ? `@${connector.externalUsername}` : chalk67.dim("-");
13571
+ const status = connector ? chalk68.green("\u2713".padEnd(statusWidth)) : chalk68.dim("-".padEnd(statusWidth));
13572
+ const account = connector?.externalUsername ? `@${connector.externalUsername}` : chalk68.dim("-");
13495
13573
  const row = [type2.padEnd(typeWidth), status, account].join(" ");
13496
13574
  console.log(row);
13497
13575
  }
13498
13576
  console.log();
13499
- console.log(chalk67.dim("To connect a service:"));
13500
- console.log(chalk67.dim(" vm0 connector connect <type>"));
13577
+ console.log(chalk68.dim("To connect a service:"));
13578
+ console.log(chalk68.dim(" vm0 connector connect <type>"));
13501
13579
  })
13502
13580
  );
13503
13581
 
13504
13582
  // src/commands/connector/status.ts
13505
- import { Command as Command68 } from "commander";
13506
- import chalk68 from "chalk";
13583
+ import { Command as Command69 } from "commander";
13584
+ import chalk69 from "chalk";
13507
13585
  var LABEL_WIDTH = 16;
13508
- var statusCommand7 = new Command68().name("status").description("Show detailed status of a connector").argument("<type>", "Connector type (e.g., github)").action(
13586
+ var statusCommand7 = new Command69().name("status").description("Show detailed status of a connector").argument("<type>", "Connector type (e.g., github)").action(
13509
13587
  withErrorHandler(async (type2) => {
13510
13588
  const parseResult = connectorTypeSchema.safeParse(type2);
13511
13589
  if (!parseResult.success) {
13512
- console.error(chalk68.red(`\u2717 Unknown connector type: ${type2}`));
13590
+ console.error(chalk69.red(`\u2717 Unknown connector type: ${type2}`));
13513
13591
  console.error();
13514
13592
  console.error("Available connectors:");
13515
13593
  for (const [t, config] of Object.entries(CONNECTOR_TYPES)) {
13516
- console.error(` ${chalk68.cyan(t)} - ${config.label}`);
13594
+ console.error(` ${chalk69.cyan(t)} - ${config.label}`);
13517
13595
  }
13518
13596
  process.exit(1);
13519
13597
  }
13520
13598
  const connector = await getConnector(parseResult.data);
13521
- console.log(`Connector: ${chalk68.cyan(type2)}`);
13599
+ console.log(`Connector: ${chalk69.cyan(type2)}`);
13522
13600
  console.log();
13523
13601
  if (connector) {
13524
13602
  console.log(
13525
- `${"Status:".padEnd(LABEL_WIDTH)}${chalk68.green("connected")}`
13603
+ `${"Status:".padEnd(LABEL_WIDTH)}${chalk69.green("connected")}`
13526
13604
  );
13527
13605
  console.log(
13528
13606
  `${"Account:".padEnd(LABEL_WIDTH)}@${connector.externalUsername}`
@@ -13544,78 +13622,78 @@ var statusCommand7 = new Command68().name("status").description("Show detailed s
13544
13622
  );
13545
13623
  }
13546
13624
  console.log();
13547
- console.log(chalk68.dim("To disconnect:"));
13548
- console.log(chalk68.dim(` vm0 connector disconnect ${type2}`));
13625
+ console.log(chalk69.dim("To disconnect:"));
13626
+ console.log(chalk69.dim(` vm0 connector disconnect ${type2}`));
13549
13627
  } else {
13550
13628
  console.log(
13551
- `${"Status:".padEnd(LABEL_WIDTH)}${chalk68.dim("not connected")}`
13629
+ `${"Status:".padEnd(LABEL_WIDTH)}${chalk69.dim("not connected")}`
13552
13630
  );
13553
13631
  console.log();
13554
- console.log(chalk68.dim("To connect:"));
13555
- console.log(chalk68.dim(` vm0 connector connect ${type2}`));
13632
+ console.log(chalk69.dim("To connect:"));
13633
+ console.log(chalk69.dim(` vm0 connector connect ${type2}`));
13556
13634
  }
13557
13635
  })
13558
13636
  );
13559
13637
 
13560
13638
  // src/commands/connector/disconnect.ts
13561
- import { Command as Command69 } from "commander";
13562
- import chalk69 from "chalk";
13563
- var disconnectCommand = new Command69().name("disconnect").description("Disconnect a third-party service").argument("<type>", "Connector type to disconnect (e.g., github)").action(async (type2) => {
13639
+ import { Command as Command70 } from "commander";
13640
+ import chalk70 from "chalk";
13641
+ var disconnectCommand = new Command70().name("disconnect").description("Disconnect a third-party service").argument("<type>", "Connector type to disconnect (e.g., github)").action(async (type2) => {
13564
13642
  try {
13565
13643
  const parseResult = connectorTypeSchema.safeParse(type2);
13566
13644
  if (!parseResult.success) {
13567
- console.error(chalk69.red(`\u2717 Unknown connector type: ${type2}`));
13645
+ console.error(chalk70.red(`\u2717 Unknown connector type: ${type2}`));
13568
13646
  console.error();
13569
13647
  console.error("Available connectors:");
13570
13648
  for (const [t, config] of Object.entries(CONNECTOR_TYPES)) {
13571
- console.error(` ${chalk69.cyan(t)} - ${config.label}`);
13649
+ console.error(` ${chalk70.cyan(t)} - ${config.label}`);
13572
13650
  }
13573
13651
  process.exit(1);
13574
13652
  }
13575
13653
  await deleteConnector(parseResult.data);
13576
- console.log(chalk69.green(`\u2713 Disconnected ${type2}`));
13654
+ console.log(chalk70.green(`\u2713 Disconnected ${type2}`));
13577
13655
  } catch (error) {
13578
13656
  if (error instanceof Error) {
13579
13657
  if (error.message.includes("not found")) {
13580
- console.error(chalk69.red(`\u2717 Connector "${type2}" is not connected`));
13658
+ console.error(chalk70.red(`\u2717 Connector "${type2}" is not connected`));
13581
13659
  } else if (error.message.includes("Not authenticated")) {
13582
- console.error(chalk69.red("\u2717 Not authenticated. Run: vm0 auth login"));
13660
+ console.error(chalk70.red("\u2717 Not authenticated. Run: vm0 auth login"));
13583
13661
  } else {
13584
- console.error(chalk69.red(`\u2717 ${error.message}`));
13662
+ console.error(chalk70.red(`\u2717 ${error.message}`));
13585
13663
  if (error.cause instanceof Error) {
13586
- console.error(chalk69.dim(` Cause: ${error.cause.message}`));
13664
+ console.error(chalk70.dim(` Cause: ${error.cause.message}`));
13587
13665
  }
13588
13666
  }
13589
13667
  } else {
13590
- console.error(chalk69.red("\u2717 An unexpected error occurred"));
13668
+ console.error(chalk70.red("\u2717 An unexpected error occurred"));
13591
13669
  }
13592
13670
  process.exit(1);
13593
13671
  }
13594
13672
  });
13595
13673
 
13596
13674
  // src/commands/connector/index.ts
13597
- var connectorCommand = new Command70().name("connector").description("Manage third-party service connections").addCommand(listCommand9).addCommand(statusCommand7).addCommand(connectCommand).addCommand(disconnectCommand);
13675
+ var connectorCommand = new Command71().name("connector").description("Manage third-party service connections").addCommand(listCommand9).addCommand(statusCommand7).addCommand(connectCommand).addCommand(disconnectCommand);
13598
13676
 
13599
13677
  // src/commands/onboard/index.ts
13600
- import { Command as Command71 } from "commander";
13601
- import chalk73 from "chalk";
13678
+ import { Command as Command72 } from "commander";
13679
+ import chalk74 from "chalk";
13602
13680
  import { mkdir as mkdir8 } from "fs/promises";
13603
13681
  import { existsSync as existsSync12 } from "fs";
13604
13682
 
13605
13683
  // src/lib/ui/welcome-box.ts
13606
- import chalk70 from "chalk";
13684
+ import chalk71 from "chalk";
13607
13685
  var gradientColors = [
13608
- chalk70.hex("#FFAB5E"),
13686
+ chalk71.hex("#FFAB5E"),
13609
13687
  // Line 1 - lightest
13610
- chalk70.hex("#FF9642"),
13688
+ chalk71.hex("#FF9642"),
13611
13689
  // Line 2
13612
- chalk70.hex("#FF8228"),
13690
+ chalk71.hex("#FF8228"),
13613
13691
  // Line 3
13614
- chalk70.hex("#FF6D0A"),
13692
+ chalk71.hex("#FF6D0A"),
13615
13693
  // Line 4
13616
- chalk70.hex("#E85D00"),
13694
+ chalk71.hex("#E85D00"),
13617
13695
  // Line 5
13618
- chalk70.hex("#CC4E00")
13696
+ chalk71.hex("#CC4E00")
13619
13697
  // Line 6 - darkest
13620
13698
  ];
13621
13699
  var vm0LogoLines = [
@@ -13637,15 +13715,15 @@ function renderVm0Banner() {
13637
13715
  function renderOnboardWelcome() {
13638
13716
  renderVm0Banner();
13639
13717
  console.log(` Build agentic workflows using natural language.`);
13640
- console.log(` ${chalk70.dim("Currently in beta, enjoy it free")}`);
13718
+ console.log(` ${chalk71.dim("Currently in beta, enjoy it free")}`);
13641
13719
  console.log(
13642
- ` ${chalk70.dim("Star us on GitHub: https://github.com/vm0-ai/vm0")}`
13720
+ ` ${chalk71.dim("Star us on GitHub: https://github.com/vm0-ai/vm0")}`
13643
13721
  );
13644
13722
  console.log();
13645
13723
  }
13646
13724
 
13647
13725
  // src/lib/ui/step-runner.ts
13648
- import chalk71 from "chalk";
13726
+ import chalk72 from "chalk";
13649
13727
  function createStepRunner(options = true) {
13650
13728
  const opts = typeof options === "boolean" ? { interactive: options } : options;
13651
13729
  const interactive = opts.interactive ?? true;
@@ -13660,25 +13738,25 @@ function createStepRunner(options = true) {
13660
13738
  }
13661
13739
  for (const [i, step] of completedSteps.entries()) {
13662
13740
  if (step.failed) {
13663
- console.log(chalk71.red(`\u2717 ${step.label}`));
13741
+ console.log(chalk72.red(`\u2717 ${step.label}`));
13664
13742
  } else {
13665
- console.log(chalk71.green(`\u25CF ${step.label}`));
13743
+ console.log(chalk72.green(`\u25CF ${step.label}`));
13666
13744
  }
13667
13745
  const isLastStep = i === completedSteps.length - 1;
13668
13746
  if (!isLastStep || !isFinal) {
13669
- console.log(chalk71.dim("\u2502"));
13747
+ console.log(chalk72.dim("\u2502"));
13670
13748
  }
13671
13749
  }
13672
13750
  }
13673
13751
  async function executeStep(label, fn, isFinal) {
13674
13752
  let stepFailed = false;
13675
- console.log(chalk71.yellow(`\u25CB ${label}`));
13753
+ console.log(chalk72.yellow(`\u25CB ${label}`));
13676
13754
  const ctx = {
13677
13755
  connector() {
13678
- console.log(chalk71.dim("\u2502"));
13756
+ console.log(chalk72.dim("\u2502"));
13679
13757
  },
13680
13758
  detail(message) {
13681
- console.log(`${chalk71.dim("\u2502")} ${message}`);
13759
+ console.log(`${chalk72.dim("\u2502")} ${message}`);
13682
13760
  },
13683
13761
  async prompt(promptFn) {
13684
13762
  return await promptFn();
@@ -13695,12 +13773,12 @@ function createStepRunner(options = true) {
13695
13773
  redrawCompletedSteps(isFinal);
13696
13774
  } else {
13697
13775
  if (stepFailed) {
13698
- console.log(chalk71.red(`\u2717 ${label}`));
13776
+ console.log(chalk72.red(`\u2717 ${label}`));
13699
13777
  } else {
13700
- console.log(chalk71.green(`\u25CF ${label}`));
13778
+ console.log(chalk72.green(`\u25CF ${label}`));
13701
13779
  }
13702
13780
  if (!isFinal) {
13703
- console.log(chalk71.dim("\u2502"));
13781
+ console.log(chalk72.dim("\u2502"));
13704
13782
  }
13705
13783
  }
13706
13784
  }
@@ -13860,7 +13938,7 @@ async function setupModelProvider(type2, secret, options) {
13860
13938
 
13861
13939
  // src/lib/domain/onboard/claude-setup.ts
13862
13940
  import { spawn as spawn3 } from "child_process";
13863
- import chalk72 from "chalk";
13941
+ import chalk73 from "chalk";
13864
13942
  var MARKETPLACE_NAME = "vm0-skills";
13865
13943
  var MARKETPLACE_REPO = "vm0-ai/vm0-skills";
13866
13944
  var PLUGIN_ID = "vm0@vm0-skills";
@@ -13897,12 +13975,12 @@ async function runClaudeCommand(args, cwd) {
13897
13975
  }
13898
13976
  function handlePluginError(error, context) {
13899
13977
  const displayContext = context ?? "Claude plugin";
13900
- console.error(chalk72.red(`\u2717 Failed to install ${displayContext}`));
13978
+ console.error(chalk73.red(`\u2717 Failed to install ${displayContext}`));
13901
13979
  if (error instanceof Error) {
13902
- console.error(chalk72.red(`\u2717 ${error.message}`));
13980
+ console.error(chalk73.red(`\u2717 ${error.message}`));
13903
13981
  }
13904
13982
  console.error(
13905
- chalk72.dim("Please ensure Claude CLI is installed and accessible.")
13983
+ chalk73.dim("Please ensure Claude CLI is installed and accessible.")
13906
13984
  );
13907
13985
  process.exit(1);
13908
13986
  }
@@ -13945,7 +14023,7 @@ async function updateMarketplace() {
13945
14023
  ]);
13946
14024
  if (!result.success) {
13947
14025
  console.warn(
13948
- chalk72.yellow(
14026
+ chalk73.yellow(
13949
14027
  `Warning: Could not update marketplace: ${result.error ?? "unknown error"}`
13950
14028
  )
13951
14029
  );
@@ -13983,7 +14061,7 @@ async function handleAuthentication(ctx) {
13983
14061
  return;
13984
14062
  }
13985
14063
  if (!ctx.interactive) {
13986
- console.error(chalk73.red("\u2717 Not authenticated"));
14064
+ console.error(chalk74.red("\u2717 Not authenticated"));
13987
14065
  console.error("Run 'vm0 auth login' first or set VM0_TOKEN");
13988
14066
  process.exit(1);
13989
14067
  }
@@ -13991,19 +14069,19 @@ async function handleAuthentication(ctx) {
13991
14069
  onInitiating: () => {
13992
14070
  },
13993
14071
  onDeviceCodeReady: (url, code, expiresIn) => {
13994
- step.detail(`Copy code: ${chalk73.cyan.bold(code)}`);
13995
- step.detail(`Open: ${chalk73.cyan(url)}`);
13996
- step.detail(chalk73.dim(`Expires in ${expiresIn} minutes`));
14072
+ step.detail(`Copy code: ${chalk74.cyan.bold(code)}`);
14073
+ step.detail(`Open: ${chalk74.cyan(url)}`);
14074
+ step.detail(chalk74.dim(`Expires in ${expiresIn} minutes`));
13997
14075
  },
13998
14076
  onPolling: () => {
13999
14077
  },
14000
14078
  onSuccess: () => {
14001
14079
  },
14002
14080
  onError: (error) => {
14003
- console.error(chalk73.red(`
14081
+ console.error(chalk74.red(`
14004
14082
  \u2717 ${error.message}`));
14005
14083
  if (error.cause instanceof Error) {
14006
- console.error(chalk73.dim(` Cause: ${error.cause.message}`));
14084
+ console.error(chalk74.dim(` Cause: ${error.cause.message}`));
14007
14085
  }
14008
14086
  process.exit(1);
14009
14087
  }
@@ -14017,7 +14095,7 @@ async function handleModelProvider(ctx) {
14017
14095
  return;
14018
14096
  }
14019
14097
  if (!ctx.interactive) {
14020
- console.error(chalk73.red("\u2717 No model provider configured"));
14098
+ console.error(chalk74.red("\u2717 No model provider configured"));
14021
14099
  console.error("Run 'vm0 model-provider setup' first");
14022
14100
  process.exit(1);
14023
14101
  }
@@ -14038,14 +14116,14 @@ async function handleModelProvider(ctx) {
14038
14116
  const selectedChoice = choices.find((c24) => c24.type === providerType);
14039
14117
  if (selectedChoice?.helpText) {
14040
14118
  for (const line of selectedChoice.helpText.split("\n")) {
14041
- step.detail(chalk73.dim(line));
14119
+ step.detail(chalk74.dim(line));
14042
14120
  }
14043
14121
  }
14044
14122
  const secret = await step.prompt(
14045
14123
  () => promptPassword(`Enter your ${selectedChoice?.secretLabel ?? "secret"}:`)
14046
14124
  );
14047
14125
  if (!secret) {
14048
- console.log(chalk73.dim("Cancelled"));
14126
+ console.log(chalk74.dim("Cancelled"));
14049
14127
  process.exit(0);
14050
14128
  }
14051
14129
  let selectedModel;
@@ -14064,7 +14142,7 @@ async function handleModelProvider(ctx) {
14064
14142
  () => promptSelect("Select model:", modelChoices)
14065
14143
  );
14066
14144
  if (modelSelection === void 0) {
14067
- console.log(chalk73.dim("Cancelled"));
14145
+ console.log(chalk74.dim("Cancelled"));
14068
14146
  process.exit(0);
14069
14147
  }
14070
14148
  selectedModel = modelSelection === "" ? void 0 : modelSelection;
@@ -14074,7 +14152,7 @@ async function handleModelProvider(ctx) {
14074
14152
  });
14075
14153
  const modelNote = result.provider.selectedModel ? ` with model: ${result.provider.selectedModel}` : "";
14076
14154
  step.detail(
14077
- chalk73.green(
14155
+ chalk74.green(
14078
14156
  `${providerType} ${result.created ? "created" : "updated"}${result.isDefault ? ` (default for ${result.framework})` : ""}${modelNote}`
14079
14157
  )
14080
14158
  );
@@ -14105,7 +14183,7 @@ async function handleAgentCreation(ctx) {
14105
14183
  agentName = inputName;
14106
14184
  if (existsSync12(agentName)) {
14107
14185
  step.detail(
14108
- chalk73.yellow(`${agentName}/ already exists, choose another name`)
14186
+ chalk74.yellow(`${agentName}/ already exists, choose another name`)
14109
14187
  );
14110
14188
  } else {
14111
14189
  folderExists = false;
@@ -14114,22 +14192,22 @@ async function handleAgentCreation(ctx) {
14114
14192
  } else {
14115
14193
  if (!validateAgentName(agentName)) {
14116
14194
  console.error(
14117
- chalk73.red(
14195
+ chalk74.red(
14118
14196
  "Invalid agent name: must be 3-64 chars, alphanumeric + hyphens"
14119
14197
  )
14120
14198
  );
14121
14199
  process.exit(1);
14122
14200
  }
14123
14201
  if (existsSync12(agentName)) {
14124
- console.error(chalk73.red(`\u2717 ${agentName}/ already exists`));
14202
+ console.error(chalk74.red(`\u2717 ${agentName}/ already exists`));
14125
14203
  console.error();
14126
14204
  console.error("Remove it first or choose a different name:");
14127
- console.error(chalk73.cyan(` rm -rf ${agentName}`));
14205
+ console.error(chalk74.cyan(` rm -rf ${agentName}`));
14128
14206
  process.exit(1);
14129
14207
  }
14130
14208
  }
14131
14209
  await mkdir8(agentName, { recursive: true });
14132
- step.detail(chalk73.green(`Created ${agentName}/`));
14210
+ step.detail(chalk74.green(`Created ${agentName}/`));
14133
14211
  });
14134
14212
  return agentName;
14135
14213
  }
@@ -14145,7 +14223,7 @@ async function handlePluginInstallation(ctx, agentName) {
14145
14223
  shouldInstall = confirmed ?? true;
14146
14224
  }
14147
14225
  if (!shouldInstall) {
14148
- step.detail(chalk73.dim("Skipped"));
14226
+ step.detail(chalk74.dim("Skipped"));
14149
14227
  return;
14150
14228
  }
14151
14229
  const scope = "project";
@@ -14153,7 +14231,7 @@ async function handlePluginInstallation(ctx, agentName) {
14153
14231
  const agentDir = `${process.cwd()}/${agentName}`;
14154
14232
  const result = await installVm0Plugin(scope, agentDir);
14155
14233
  step.detail(
14156
- chalk73.green(`Installed ${result.pluginId} (scope: ${result.scope})`)
14234
+ chalk74.green(`Installed ${result.pluginId} (scope: ${result.scope})`)
14157
14235
  );
14158
14236
  pluginInstalled = true;
14159
14237
  } catch (error) {
@@ -14164,18 +14242,18 @@ async function handlePluginInstallation(ctx, agentName) {
14164
14242
  }
14165
14243
  function printNextSteps(agentName, pluginInstalled) {
14166
14244
  console.log();
14167
- console.log(chalk73.bold("Next step:"));
14245
+ console.log(chalk74.bold("Next step:"));
14168
14246
  console.log();
14169
14247
  if (pluginInstalled) {
14170
14248
  console.log(
14171
- ` ${chalk73.cyan(`cd ${agentName} && claude "/${PRIMARY_SKILL_NAME} let's build an agent"`)}`
14249
+ ` ${chalk74.cyan(`cd ${agentName} && claude "/${PRIMARY_SKILL_NAME} let's build an agent"`)}`
14172
14250
  );
14173
14251
  } else {
14174
- console.log(` ${chalk73.cyan(`cd ${agentName} && vm0 init`)}`);
14252
+ console.log(` ${chalk74.cyan(`cd ${agentName} && vm0 init`)}`);
14175
14253
  }
14176
14254
  console.log();
14177
14255
  }
14178
- var onboardCommand = new Command71().name("onboard").description("Guided setup for new VM0 users").option("-y, --yes", "Skip confirmation prompts").option("--name <name>", `Agent name (default: ${DEFAULT_AGENT_NAME})`).action(async (options) => {
14256
+ var onboardCommand = new Command72().name("onboard").description("Guided setup for new VM0 users").option("-y, --yes", "Skip confirmation prompts").option("--name <name>", `Agent name (default: ${DEFAULT_AGENT_NAME})`).action(async (options) => {
14179
14257
  try {
14180
14258
  const interactive = isInteractive();
14181
14259
  if (interactive) {
@@ -14198,33 +14276,33 @@ var onboardCommand = new Command71().name("onboard").description("Guided setup f
14198
14276
  printNextSteps(agentName, pluginInstalled);
14199
14277
  } catch (error) {
14200
14278
  if (error instanceof Error) {
14201
- console.error(chalk73.red(`\u2717 ${error.message}`));
14279
+ console.error(chalk74.red(`\u2717 ${error.message}`));
14202
14280
  if (error.cause instanceof Error) {
14203
- console.error(chalk73.dim(` Cause: ${error.cause.message}`));
14281
+ console.error(chalk74.dim(` Cause: ${error.cause.message}`));
14204
14282
  }
14205
14283
  } else {
14206
- console.error(chalk73.red("\u2717 An unexpected error occurred"));
14284
+ console.error(chalk74.red("\u2717 An unexpected error occurred"));
14207
14285
  }
14208
14286
  process.exit(1);
14209
14287
  }
14210
14288
  });
14211
14289
 
14212
14290
  // src/commands/setup-claude/index.ts
14213
- import { Command as Command72 } from "commander";
14214
- import chalk74 from "chalk";
14215
- var setupClaudeCommand = new Command72().name("setup-claude").description("Install VM0 Claude Plugin").option("--agent-dir <dir>", "Agent directory to run install in").option("--scope <scope>", "Installation scope (user or project)", "project").action(
14291
+ import { Command as Command73 } from "commander";
14292
+ import chalk75 from "chalk";
14293
+ var setupClaudeCommand = new Command73().name("setup-claude").description("Install VM0 Claude Plugin").option("--agent-dir <dir>", "Agent directory to run install in").option("--scope <scope>", "Installation scope (user or project)", "project").action(
14216
14294
  withErrorHandler(async (options) => {
14217
- console.log(chalk74.dim("Installing VM0 Claude Plugin..."));
14295
+ console.log(chalk75.dim("Installing VM0 Claude Plugin..."));
14218
14296
  const scope = options.scope === "user" ? "user" : "project";
14219
14297
  const result = await installVm0Plugin(scope, options.agentDir);
14220
14298
  console.log(
14221
- chalk74.green(`\u2713 Installed ${result.pluginId} (scope: ${result.scope})`)
14299
+ chalk75.green(`\u2713 Installed ${result.pluginId} (scope: ${result.scope})`)
14222
14300
  );
14223
14301
  console.log();
14224
14302
  console.log("Next step:");
14225
14303
  const cdPrefix = options.agentDir ? `cd ${options.agentDir} && ` : "";
14226
14304
  console.log(
14227
- chalk74.cyan(
14305
+ chalk75.cyan(
14228
14306
  ` ${cdPrefix}claude "/${PRIMARY_SKILL_NAME} let's build a workflow"`
14229
14307
  )
14230
14308
  );
@@ -14232,39 +14310,39 @@ var setupClaudeCommand = new Command72().name("setup-claude").description("Insta
14232
14310
  );
14233
14311
 
14234
14312
  // src/commands/dashboard/index.ts
14235
- import { Command as Command73 } from "commander";
14236
- import chalk75 from "chalk";
14237
- var dashboardCommand = new Command73().name("dashboard").description("Quick reference for common query commands").action(() => {
14313
+ import { Command as Command74 } from "commander";
14314
+ import chalk76 from "chalk";
14315
+ var dashboardCommand = new Command74().name("dashboard").description("Quick reference for common query commands").action(() => {
14238
14316
  console.log();
14239
- console.log(chalk75.bold("VM0 Dashboard"));
14317
+ console.log(chalk76.bold("VM0 Dashboard"));
14240
14318
  console.log();
14241
- console.log(chalk75.bold("Agents"));
14242
- console.log(chalk75.dim(" List agents: ") + "vm0 agent list");
14319
+ console.log(chalk76.bold("Agents"));
14320
+ console.log(chalk76.dim(" List agents: ") + "vm0 agent list");
14243
14321
  console.log();
14244
- console.log(chalk75.bold("Runs"));
14245
- console.log(chalk75.dim(" Recent runs: ") + "vm0 run list");
14246
- console.log(chalk75.dim(" View run logs: ") + "vm0 logs <run-id>");
14322
+ console.log(chalk76.bold("Runs"));
14323
+ console.log(chalk76.dim(" Recent runs: ") + "vm0 run list");
14324
+ console.log(chalk76.dim(" View run logs: ") + "vm0 logs <run-id>");
14247
14325
  console.log();
14248
- console.log(chalk75.bold("Schedules"));
14249
- console.log(chalk75.dim(" List schedules: ") + "vm0 schedule list");
14326
+ console.log(chalk76.bold("Schedules"));
14327
+ console.log(chalk76.dim(" List schedules: ") + "vm0 schedule list");
14250
14328
  console.log();
14251
- console.log(chalk75.bold("Account"));
14252
- console.log(chalk75.dim(" Usage stats: ") + "vm0 usage");
14253
- console.log(chalk75.dim(" List secrets: ") + "vm0 secret list");
14254
- console.log(chalk75.dim(" List variables: ") + "vm0 variable list");
14329
+ console.log(chalk76.bold("Account"));
14330
+ console.log(chalk76.dim(" Usage stats: ") + "vm0 usage");
14331
+ console.log(chalk76.dim(" List secrets: ") + "vm0 secret list");
14332
+ console.log(chalk76.dim(" List variables: ") + "vm0 variable list");
14255
14333
  console.log();
14256
14334
  console.log(
14257
- chalk75.dim("Not logged in? Run: ") + chalk75.cyan("vm0 auth login")
14335
+ chalk76.dim("Not logged in? Run: ") + chalk76.cyan("vm0 auth login")
14258
14336
  );
14259
14337
  console.log();
14260
14338
  });
14261
14339
 
14262
14340
  // src/commands/dev-tool/index.ts
14263
- import { Command as Command75 } from "commander";
14341
+ import { Command as Command76 } from "commander";
14264
14342
 
14265
14343
  // src/commands/dev-tool/compose.ts
14266
- import { Command as Command74 } from "commander";
14267
- import chalk76 from "chalk";
14344
+ import { Command as Command75 } from "commander";
14345
+ import chalk77 from "chalk";
14268
14346
  import { initClient as initClient13 } from "@ts-rest/core";
14269
14347
  function sleep2(ms) {
14270
14348
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -14316,7 +14394,7 @@ async function pollUntilComplete(jobId, intervalMs, timeoutMs, jsonMode) {
14316
14394
  const job = await getComposeJobStatus(jobId);
14317
14395
  if (!jsonMode) {
14318
14396
  console.log(
14319
- chalk76.dim(`[${timestamp()}] Polling... status=${job.status}`)
14397
+ chalk77.dim(`[${timestamp()}] Polling... status=${job.status}`)
14320
14398
  );
14321
14399
  }
14322
14400
  if (job.status === "completed" || job.status === "failed") {
@@ -14326,7 +14404,7 @@ async function pollUntilComplete(jobId, intervalMs, timeoutMs, jsonMode) {
14326
14404
  }
14327
14405
  throw new Error(`Timeout after ${timeoutMs / 1e3} seconds`);
14328
14406
  }
14329
- var composeCommand2 = new Command74().name("compose").description("Test server-side GitHub compose API").argument("<github-url>", "GitHub URL to compose from").option("--overwrite", "Overwrite existing compose", false).option(
14407
+ var composeCommand2 = new Command75().name("compose").description("Test server-side GitHub compose API").argument("<github-url>", "GitHub URL to compose from").option("--overwrite", "Overwrite existing compose", false).option(
14330
14408
  "--interval <seconds>",
14331
14409
  "Polling interval in seconds",
14332
14410
  (v) => parseInt(v, 10),
@@ -14375,7 +14453,7 @@ var composeCommand2 = new Command74().name("compose").description("Test server-s
14375
14453
  githubUrl,
14376
14454
  options.overwrite
14377
14455
  );
14378
- console.log(`Job ID: ${chalk76.cyan(jobId)}`);
14456
+ console.log(`Job ID: ${chalk77.cyan(jobId)}`);
14379
14457
  console.log();
14380
14458
  if (initialStatus === "completed" || initialStatus === "failed") {
14381
14459
  const finalJob2 = await getComposeJobStatus(jobId);
@@ -14396,21 +14474,21 @@ var composeCommand2 = new Command74().name("compose").description("Test server-s
14396
14474
  );
14397
14475
  function displayResult(job) {
14398
14476
  if (job.status === "completed" && job.result) {
14399
- console.log(chalk76.green("\u2713 Compose completed!"));
14400
- console.log(` Compose ID: ${chalk76.cyan(job.result.composeId)}`);
14401
- console.log(` Name: ${chalk76.cyan(job.result.composeName)}`);
14402
- console.log(` Version: ${chalk76.cyan(job.result.versionId.slice(0, 8))}`);
14477
+ console.log(chalk77.green("\u2713 Compose completed!"));
14478
+ console.log(` Compose ID: ${chalk77.cyan(job.result.composeId)}`);
14479
+ console.log(` Name: ${chalk77.cyan(job.result.composeName)}`);
14480
+ console.log(` Version: ${chalk77.cyan(job.result.versionId.slice(0, 8))}`);
14403
14481
  if (job.result.warnings.length > 0) {
14404
14482
  console.log();
14405
- console.log(chalk76.yellow(" Warnings:"));
14483
+ console.log(chalk77.yellow(" Warnings:"));
14406
14484
  for (const warning of job.result.warnings) {
14407
- console.log(chalk76.yellow(` - ${warning}`));
14485
+ console.log(chalk77.yellow(` - ${warning}`));
14408
14486
  }
14409
14487
  }
14410
14488
  } else if (job.status === "failed") {
14411
- console.error(chalk76.red("\u2717 Compose failed"));
14489
+ console.error(chalk77.red("\u2717 Compose failed"));
14412
14490
  if (job.error) {
14413
- console.error(` Error: ${chalk76.red(job.error)}`);
14491
+ console.error(` Error: ${chalk77.red(job.error)}`);
14414
14492
  }
14415
14493
  } else {
14416
14494
  console.log(`Status: ${job.status}`);
@@ -14418,11 +14496,11 @@ function displayResult(job) {
14418
14496
  }
14419
14497
 
14420
14498
  // src/commands/dev-tool/index.ts
14421
- var devToolCommand = new Command75().name("dev-tool").description("Developer tools for testing and debugging").addCommand(composeCommand2);
14499
+ var devToolCommand = new Command76().name("dev-tool").description("Developer tools for testing and debugging").addCommand(composeCommand2);
14422
14500
 
14423
14501
  // src/index.ts
14424
- var program = new Command76();
14425
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.32.0");
14502
+ var program = new Command77();
14503
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.33.0");
14426
14504
  program.addCommand(authCommand);
14427
14505
  program.addCommand(infoCommand);
14428
14506
  program.addCommand(composeCommand);