@vm0/cli 9.75.1 → 9.75.2

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 +157 -77
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -47,7 +47,7 @@ if (DSN) {
47
47
  Sentry.init({
48
48
  dsn: DSN,
49
49
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
50
- release: "9.75.1",
50
+ release: "9.75.2",
51
51
  sendDefaultPii: false,
52
52
  tracesSampleRate: 0,
53
53
  shutdownTimeout: 500,
@@ -66,7 +66,7 @@ if (DSN) {
66
66
  }
67
67
  });
68
68
  Sentry.setContext("cli", {
69
- version: "9.75.1",
69
+ version: "9.75.2",
70
70
  command: process.argv.slice(2).join(" ")
71
71
  });
72
72
  Sentry.setContext("runtime", {
@@ -13091,6 +13091,16 @@ var zeroAgentsMainContract = c27.router({
13091
13091
  422: apiErrorSchema
13092
13092
  },
13093
13093
  summary: "Create zero agent"
13094
+ },
13095
+ list: {
13096
+ method: "GET",
13097
+ path: "/api/zero/agents",
13098
+ headers: authHeadersSchema,
13099
+ responses: {
13100
+ 200: z31.array(zeroAgentResponseSchema),
13101
+ 401: apiErrorSchema
13102
+ },
13103
+ summary: "List zero agents"
13094
13104
  }
13095
13105
  });
13096
13106
  var zeroAgentsByNameContract = c27.router({
@@ -13120,6 +13130,19 @@ var zeroAgentsByNameContract = c27.router({
13120
13130
  422: apiErrorSchema
13121
13131
  },
13122
13132
  summary: "Update zero agent"
13133
+ },
13134
+ delete: {
13135
+ method: "DELETE",
13136
+ path: "/api/zero/agents/:name",
13137
+ headers: authHeadersSchema,
13138
+ pathParams: z31.object({ name: z31.string() }),
13139
+ body: c27.noBody(),
13140
+ responses: {
13141
+ 204: c27.noBody(),
13142
+ 401: apiErrorSchema,
13143
+ 404: apiErrorSchema
13144
+ },
13145
+ summary: "Delete zero agent by name"
13123
13146
  }
13124
13147
  });
13125
13148
  var zeroAgentInstructionsContract = c27.router({
@@ -13747,8 +13770,20 @@ var zeroUserPreferencesContract = c36.router({
13747
13770
  });
13748
13771
 
13749
13772
  // ../../packages/core/src/contracts/zero-secrets.ts
13773
+ import { z as z38 } from "zod";
13750
13774
  var c37 = initContract();
13751
13775
  var zeroSecretsContract = c37.router({
13776
+ list: {
13777
+ method: "GET",
13778
+ path: "/api/zero/secrets",
13779
+ headers: authHeadersSchema,
13780
+ responses: {
13781
+ 200: secretListResponseSchema,
13782
+ 401: apiErrorSchema,
13783
+ 500: apiErrorSchema
13784
+ },
13785
+ summary: "List all secrets (metadata only)"
13786
+ },
13752
13787
  set: {
13753
13788
  method: "POST",
13754
13789
  path: "/api/zero/secrets",
@@ -13764,7 +13799,35 @@ var zeroSecretsContract = c37.router({
13764
13799
  summary: "Create or update a secret"
13765
13800
  }
13766
13801
  });
13802
+ var zeroSecretsByNameContract = c37.router({
13803
+ delete: {
13804
+ method: "DELETE",
13805
+ path: "/api/zero/secrets/:name",
13806
+ headers: authHeadersSchema,
13807
+ pathParams: z38.object({
13808
+ name: secretNameSchema
13809
+ }),
13810
+ responses: {
13811
+ 204: c37.noBody(),
13812
+ 401: apiErrorSchema,
13813
+ 404: apiErrorSchema,
13814
+ 500: apiErrorSchema
13815
+ },
13816
+ summary: "Delete a secret by name"
13817
+ }
13818
+ });
13767
13819
  var zeroVariablesContract = c37.router({
13820
+ list: {
13821
+ method: "GET",
13822
+ path: "/api/zero/variables",
13823
+ headers: authHeadersSchema,
13824
+ responses: {
13825
+ 200: variableListResponseSchema,
13826
+ 401: apiErrorSchema,
13827
+ 500: apiErrorSchema
13828
+ },
13829
+ summary: "List all variables (includes values)"
13830
+ },
13768
13831
  set: {
13769
13832
  method: "POST",
13770
13833
  path: "/api/zero/variables",
@@ -13780,17 +13843,34 @@ var zeroVariablesContract = c37.router({
13780
13843
  summary: "Create or update a variable"
13781
13844
  }
13782
13845
  });
13846
+ var zeroVariablesByNameContract = c37.router({
13847
+ delete: {
13848
+ method: "DELETE",
13849
+ path: "/api/zero/variables/:name",
13850
+ headers: authHeadersSchema,
13851
+ pathParams: z38.object({
13852
+ name: variableNameSchema
13853
+ }),
13854
+ responses: {
13855
+ 204: c37.noBody(),
13856
+ 401: apiErrorSchema,
13857
+ 404: apiErrorSchema,
13858
+ 500: apiErrorSchema
13859
+ },
13860
+ summary: "Delete a variable by name"
13861
+ }
13862
+ });
13783
13863
 
13784
13864
  // ../../packages/core/src/contracts/zero-sessions.ts
13785
- import { z as z38 } from "zod";
13865
+ import { z as z39 } from "zod";
13786
13866
  var c38 = initContract();
13787
13867
  var zeroSessionsByIdContract = c38.router({
13788
13868
  getById: {
13789
13869
  method: "GET",
13790
13870
  path: "/api/zero/sessions/:id",
13791
13871
  headers: authHeadersSchema,
13792
- pathParams: z38.object({
13793
- id: z38.string().min(1, "Session ID is required")
13872
+ pathParams: z39.object({
13873
+ id: z39.string().min(1, "Session ID is required")
13794
13874
  }),
13795
13875
  responses: {
13796
13876
  200: sessionResponseSchema,
@@ -13803,24 +13883,24 @@ var zeroSessionsByIdContract = c38.router({
13803
13883
  });
13804
13884
 
13805
13885
  // ../../packages/core/src/contracts/integrations.ts
13806
- import { z as z39 } from "zod";
13886
+ import { z as z40 } from "zod";
13807
13887
  var c39 = initContract();
13808
13888
  var integrationsSlackMessageContract = c39.router({
13809
13889
  sendMessage: {
13810
13890
  method: "POST",
13811
13891
  path: "/api/agent/integrations/slack/message",
13812
13892
  headers: authHeadersSchema,
13813
- body: z39.object({
13814
- channel: z39.string().min(1, "Channel ID is required"),
13815
- text: z39.string().optional(),
13816
- threadTs: z39.string().optional(),
13817
- blocks: z39.array(z39.object({ type: z39.string() }).passthrough()).optional()
13893
+ body: z40.object({
13894
+ channel: z40.string().min(1, "Channel ID is required"),
13895
+ text: z40.string().optional(),
13896
+ threadTs: z40.string().optional(),
13897
+ blocks: z40.array(z40.object({ type: z40.string() }).passthrough()).optional()
13818
13898
  }),
13819
13899
  responses: {
13820
- 200: z39.object({
13821
- ok: z39.literal(true),
13822
- ts: z39.string().optional(),
13823
- channel: z39.string().optional()
13900
+ 200: z40.object({
13901
+ ok: z40.literal(true),
13902
+ ts: z40.string().optional(),
13903
+ channel: z40.string().optional()
13824
13904
  }),
13825
13905
  400: apiErrorSchema,
13826
13906
  401: apiErrorSchema,
@@ -13832,39 +13912,39 @@ var integrationsSlackMessageContract = c39.router({
13832
13912
  });
13833
13913
 
13834
13914
  // ../../packages/core/src/contracts/zero-billing.ts
13835
- import { z as z40 } from "zod";
13915
+ import { z as z41 } from "zod";
13836
13916
  var c40 = initContract();
13837
- var autoRechargeSchema = z40.object({
13838
- enabled: z40.boolean(),
13839
- threshold: z40.number().nullable(),
13840
- amount: z40.number().nullable()
13841
- });
13842
- var billingStatusResponseSchema = z40.object({
13843
- tier: z40.string(),
13844
- credits: z40.number(),
13845
- subscriptionStatus: z40.string().nullable(),
13846
- currentPeriodEnd: z40.string().nullable(),
13847
- hasSubscription: z40.boolean(),
13917
+ var autoRechargeSchema = z41.object({
13918
+ enabled: z41.boolean(),
13919
+ threshold: z41.number().nullable(),
13920
+ amount: z41.number().nullable()
13921
+ });
13922
+ var billingStatusResponseSchema = z41.object({
13923
+ tier: z41.string(),
13924
+ credits: z41.number(),
13925
+ subscriptionStatus: z41.string().nullable(),
13926
+ currentPeriodEnd: z41.string().nullable(),
13927
+ hasSubscription: z41.boolean(),
13848
13928
  autoRecharge: autoRechargeSchema
13849
13929
  });
13850
- var checkoutResponseSchema = z40.object({
13851
- url: z40.string()
13930
+ var checkoutResponseSchema = z41.object({
13931
+ url: z41.string()
13852
13932
  });
13853
- var portalResponseSchema = z40.object({
13854
- url: z40.string()
13933
+ var portalResponseSchema = z41.object({
13934
+ url: z41.string()
13855
13935
  });
13856
- var checkoutRequestSchema = z40.object({
13857
- tier: z40.enum(["pro", "team"]),
13858
- successUrl: z40.string().url(),
13859
- cancelUrl: z40.string().url()
13936
+ var checkoutRequestSchema = z41.object({
13937
+ tier: z41.enum(["pro", "team"]),
13938
+ successUrl: z41.string().url(),
13939
+ cancelUrl: z41.string().url()
13860
13940
  });
13861
- var portalRequestSchema = z40.object({
13862
- returnUrl: z40.string().min(1)
13941
+ var portalRequestSchema = z41.object({
13942
+ returnUrl: z41.string().min(1)
13863
13943
  });
13864
- var autoRechargeUpdateRequestSchema = z40.object({
13865
- enabled: z40.boolean(),
13866
- threshold: z40.number().int().positive().optional(),
13867
- amount: z40.number().int().min(1e3).optional()
13944
+ var autoRechargeUpdateRequestSchema = z41.object({
13945
+ enabled: z41.boolean(),
13946
+ threshold: z41.number().int().positive().optional(),
13947
+ amount: z41.number().int().min(1e3).optional()
13868
13948
  });
13869
13949
  var zeroBillingStatusContract = c40.router({
13870
13950
  get: {
@@ -13940,23 +14020,23 @@ var zeroBillingAutoRechargeContract = c40.router({
13940
14020
  });
13941
14021
 
13942
14022
  // ../../packages/core/src/contracts/zero-usage.ts
13943
- import { z as z41 } from "zod";
14023
+ import { z as z42 } from "zod";
13944
14024
  var c41 = initContract();
13945
- var memberUsageSchema = z41.object({
13946
- userId: z41.string(),
13947
- email: z41.string(),
13948
- inputTokens: z41.number(),
13949
- outputTokens: z41.number(),
13950
- cacheReadInputTokens: z41.number(),
13951
- cacheCreationInputTokens: z41.number(),
13952
- creditsCharged: z41.number()
13953
- });
13954
- var usageMembersResponseSchema = z41.object({
13955
- period: z41.object({
13956
- start: z41.string(),
13957
- end: z41.string()
14025
+ var memberUsageSchema = z42.object({
14026
+ userId: z42.string(),
14027
+ email: z42.string(),
14028
+ inputTokens: z42.number(),
14029
+ outputTokens: z42.number(),
14030
+ cacheReadInputTokens: z42.number(),
14031
+ cacheCreationInputTokens: z42.number(),
14032
+ creditsCharged: z42.number()
14033
+ });
14034
+ var usageMembersResponseSchema = z42.object({
14035
+ period: z42.object({
14036
+ start: z42.string(),
14037
+ end: z42.string()
13958
14038
  }).nullable(),
13959
- members: z41.array(memberUsageSchema)
14039
+ members: z42.array(memberUsageSchema)
13960
14040
  });
13961
14041
  var zeroUsageMembersContract = c41.router({
13962
14042
  get: {
@@ -14611,7 +14691,7 @@ function getConfigPath() {
14611
14691
  return join2(homedir2(), ".vm0", "config.json");
14612
14692
  }
14613
14693
  var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
14614
- console.log(chalk4.bold(`VM0 CLI v${"9.75.1"}`));
14694
+ console.log(chalk4.bold(`VM0 CLI v${"9.75.2"}`));
14615
14695
  console.log();
14616
14696
  const config = await loadConfig();
14617
14697
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -15371,8 +15451,8 @@ async function resolveSkills(skillUrls) {
15371
15451
  }
15372
15452
 
15373
15453
  // src/lib/domain/yaml-validator.ts
15374
- import { z as z42 } from "zod";
15375
- var cliAgentNameSchema = z42.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
15454
+ import { z as z43 } from "zod";
15455
+ var cliAgentNameSchema = z43.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
15376
15456
  /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?$/,
15377
15457
  "Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens"
15378
15458
  );
@@ -15386,7 +15466,7 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
15386
15466
  resolveSkillRef(skillRef);
15387
15467
  } catch (error) {
15388
15468
  ctx.addIssue({
15389
- code: z42.ZodIssueCode.custom,
15469
+ code: z43.ZodIssueCode.custom,
15390
15470
  message: error instanceof Error ? error.message : `Invalid skill reference: ${skillRef}`,
15391
15471
  path: ["skills", i]
15392
15472
  });
@@ -15396,15 +15476,15 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
15396
15476
  }
15397
15477
  }
15398
15478
  );
15399
- var cliComposeSchema = z42.object({
15400
- version: z42.string().min(1, "Missing config.version"),
15401
- agents: z42.record(cliAgentNameSchema, cliAgentDefinitionSchema),
15402
- volumes: z42.record(z42.string(), volumeConfigSchema).optional()
15479
+ var cliComposeSchema = z43.object({
15480
+ version: z43.string().min(1, "Missing config.version"),
15481
+ agents: z43.record(cliAgentNameSchema, cliAgentDefinitionSchema),
15482
+ volumes: z43.record(z43.string(), volumeConfigSchema).optional()
15403
15483
  }).superRefine((config, ctx) => {
15404
15484
  const agentKeys = Object.keys(config.agents);
15405
15485
  if (agentKeys.length === 0) {
15406
15486
  ctx.addIssue({
15407
- code: z42.ZodIssueCode.custom,
15487
+ code: z43.ZodIssueCode.custom,
15408
15488
  message: "agents must have at least one agent defined",
15409
15489
  path: ["agents"]
15410
15490
  });
@@ -15412,7 +15492,7 @@ var cliComposeSchema = z42.object({
15412
15492
  }
15413
15493
  if (agentKeys.length > 1) {
15414
15494
  ctx.addIssue({
15415
- code: z42.ZodIssueCode.custom,
15495
+ code: z43.ZodIssueCode.custom,
15416
15496
  message: "Multiple agents not supported yet. Only one agent allowed.",
15417
15497
  path: ["agents"]
15418
15498
  });
@@ -15424,7 +15504,7 @@ var cliComposeSchema = z42.object({
15424
15504
  if (agentVolumes && agentVolumes.length > 0) {
15425
15505
  if (!config.volumes) {
15426
15506
  ctx.addIssue({
15427
- code: z42.ZodIssueCode.custom,
15507
+ code: z43.ZodIssueCode.custom,
15428
15508
  message: "Agent references volumes but no volumes section defined. Each volume must have explicit name and version.",
15429
15509
  path: ["volumes"]
15430
15510
  });
@@ -15434,7 +15514,7 @@ var cliComposeSchema = z42.object({
15434
15514
  const parts = volDeclaration.split(":");
15435
15515
  if (parts.length !== 2) {
15436
15516
  ctx.addIssue({
15437
- code: z42.ZodIssueCode.custom,
15517
+ code: z43.ZodIssueCode.custom,
15438
15518
  message: `Invalid volume declaration: ${volDeclaration}. Expected format: volume-key:/mount/path`,
15439
15519
  path: ["agents", agentName, "volumes"]
15440
15520
  });
@@ -15443,7 +15523,7 @@ var cliComposeSchema = z42.object({
15443
15523
  const volumeKey = parts[0].trim();
15444
15524
  if (!config.volumes[volumeKey]) {
15445
15525
  ctx.addIssue({
15446
- code: z42.ZodIssueCode.custom,
15526
+ code: z43.ZodIssueCode.custom,
15447
15527
  message: `Volume "${volumeKey}" is not defined in volumes section. Each volume must have explicit name and version.`,
15448
15528
  path: ["volumes", volumeKey]
15449
15529
  });
@@ -16642,7 +16722,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
16642
16722
  options.autoUpdate = false;
16643
16723
  }
16644
16724
  if (options.autoUpdate !== false) {
16645
- await startSilentUpgrade("9.75.1");
16725
+ await startSilentUpgrade("9.75.2");
16646
16726
  }
16647
16727
  try {
16648
16728
  let result;
@@ -17477,7 +17557,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
17477
17557
  withErrorHandler(
17478
17558
  async (identifier, prompt, options) => {
17479
17559
  if (options.autoUpdate !== false) {
17480
- await startSilentUpgrade("9.75.1");
17560
+ await startSilentUpgrade("9.75.2");
17481
17561
  }
17482
17562
  const { org, name, version } = parseIdentifier(identifier);
17483
17563
  let composeId;
@@ -19233,7 +19313,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
19233
19313
  withErrorHandler(
19234
19314
  async (prompt, options) => {
19235
19315
  if (options.autoUpdate !== false) {
19236
- const shouldExit = await checkAndUpgrade("9.75.1", prompt);
19316
+ const shouldExit = await checkAndUpgrade("9.75.2", prompt);
19237
19317
  if (shouldExit) {
19238
19318
  process.exit(0);
19239
19319
  }
@@ -23786,13 +23866,13 @@ var upgradeCommand = new Command90().name("upgrade").description("Upgrade vm0 CL
23786
23866
  if (latestVersion === null) {
23787
23867
  throw new Error("Could not check for updates. Please try again later.");
23788
23868
  }
23789
- if (latestVersion === "9.75.1") {
23790
- console.log(chalk79.green(`\u2713 Already up to date (${"9.75.1"})`));
23869
+ if (latestVersion === "9.75.2") {
23870
+ console.log(chalk79.green(`\u2713 Already up to date (${"9.75.2"})`));
23791
23871
  return;
23792
23872
  }
23793
23873
  console.log(
23794
23874
  chalk79.yellow(
23795
- `Current version: ${"9.75.1"} -> Latest version: ${latestVersion}`
23875
+ `Current version: ${"9.75.2"} -> Latest version: ${latestVersion}`
23796
23876
  )
23797
23877
  );
23798
23878
  console.log();
@@ -23819,7 +23899,7 @@ var upgradeCommand = new Command90().name("upgrade").description("Upgrade vm0 CL
23819
23899
  const success = await performUpgrade(packageManager);
23820
23900
  if (success) {
23821
23901
  console.log(
23822
- chalk79.green(`\u2713 Upgraded from ${"9.75.1"} to ${latestVersion}`)
23902
+ chalk79.green(`\u2713 Upgraded from ${"9.75.2"} to ${latestVersion}`)
23823
23903
  );
23824
23904
  return;
23825
23905
  }
@@ -23899,7 +23979,7 @@ var zeroCommand = new Command92("zero").description(
23899
23979
 
23900
23980
  // src/index.ts
23901
23981
  var program = new Command93();
23902
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.75.1");
23982
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.75.2");
23903
23983
  program.addCommand(authCommand);
23904
23984
  program.addCommand(infoCommand);
23905
23985
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.75.1",
3
+ "version": "9.75.2",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",