@vm0/cli 9.70.0 → 9.70.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 +623 -33
  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.70.0",
48
+ release: "9.70.2",
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.70.0",
67
+ version: "9.70.2",
68
68
  command: process.argv.slice(2).join(" ")
69
69
  });
70
70
  Sentry.setContext("runtime", {
@@ -675,7 +675,7 @@ function getConfigPath() {
675
675
  return join2(homedir2(), ".vm0", "config.json");
676
676
  }
677
677
  var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
678
- console.log(chalk4.bold(`VM0 CLI v${"9.70.0"}`));
678
+ console.log(chalk4.bold(`VM0 CLI v${"9.70.2"}`));
679
679
  console.log();
680
680
  const config = await loadConfig();
681
681
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -3371,6 +3371,7 @@ var storedChatMessageSchema2 = z18.object({
3371
3371
  role: z18.enum(["user", "assistant"]),
3372
3372
  content: z18.string(),
3373
3373
  runId: z18.string().optional(),
3374
+ error: z18.string().optional(),
3374
3375
  createdAt: z18.string()
3375
3376
  });
3376
3377
  var unsavedRunSchema = z18.object({
@@ -4420,12 +4421,46 @@ var CONNECTOR_TYPES_DEF = {
4420
4421
  authorizationUrl: "https://slack.com/oauth/v2/authorize",
4421
4422
  tokenUrl: "https://slack.com/api/oauth.v2.access",
4422
4423
  scopes: [
4424
+ // Channels
4423
4425
  "channels:read",
4424
4426
  "channels:history",
4427
+ // Messaging
4425
4428
  "chat:write",
4429
+ // Users
4426
4430
  "users:read",
4427
4431
  "users:read.email",
4428
- "files:read"
4432
+ // Files
4433
+ "files:read",
4434
+ "files:write",
4435
+ // Direct messages (high priority)
4436
+ "im:history",
4437
+ "im:write",
4438
+ // Reactions (high priority)
4439
+ "reactions:read",
4440
+ "reactions:write",
4441
+ // Search (high priority)
4442
+ "search:read",
4443
+ // Private channels (high priority)
4444
+ "groups:read",
4445
+ "groups:history",
4446
+ // Reminders (medium priority)
4447
+ "reminders:read",
4448
+ "reminders:write",
4449
+ // Pins (medium priority)
4450
+ "pins:read",
4451
+ "pins:write",
4452
+ // User groups (medium priority)
4453
+ "usergroups:read",
4454
+ // Multi-person DMs (medium priority)
4455
+ "mpim:history",
4456
+ // Do Not Disturb (low priority)
4457
+ "dnd:read",
4458
+ // Bookmarks (low priority)
4459
+ "bookmarks:read",
4460
+ // Team info (low priority)
4461
+ "team:read",
4462
+ // Custom emoji (low priority)
4463
+ "emoji:read"
4429
4464
  ],
4430
4465
  environmentMapping: {
4431
4466
  SLACK_TOKEN: "$secrets.SLACK_ACCESS_TOKEN"
@@ -4807,6 +4842,33 @@ var CONNECTOR_TYPES_DEF = {
4807
4842
  },
4808
4843
  defaultAuthMethod: "api-token"
4809
4844
  },
4845
+ cloudinary: {
4846
+ label: "Cloudinary",
4847
+ helpText: "Connect your Cloudinary account to manage images, videos, and media assets with CDN delivery and transformations",
4848
+ authMethods: {
4849
+ "api-token": {
4850
+ label: "API Credentials",
4851
+ helpText: "1. Log in to the [Cloudinary Console](https://console.cloudinary.com/settings/api-keys)\n2. Go to **Settings** \u2192 **API Keys**\n3. Copy your **Cloud Name**, **API Key**, and **API Secret**",
4852
+ secrets: {
4853
+ CLOUDINARY_TOKEN: {
4854
+ label: "API Key",
4855
+ required: true
4856
+ },
4857
+ CLOUDINARY_API_SECRET: {
4858
+ label: "API Secret",
4859
+ required: true
4860
+ },
4861
+ CLOUDINARY_CLOUD_NAME: {
4862
+ label: "Cloud Name",
4863
+ required: true,
4864
+ type: "variable",
4865
+ placeholder: "your-cloud-name"
4866
+ }
4867
+ }
4868
+ }
4869
+ },
4870
+ defaultAuthMethod: "api-token"
4871
+ },
4810
4872
  cronlytic: {
4811
4873
  label: "Cronlytic",
4812
4874
  helpText: "Connect your Cronlytic account to monitor cron jobs and scheduled tasks",
@@ -4828,6 +4890,22 @@ var CONNECTOR_TYPES_DEF = {
4828
4890
  },
4829
4891
  defaultAuthMethod: "api-token"
4830
4892
  },
4893
+ "customer-io": {
4894
+ label: "Customer.io",
4895
+ helpText: "Connect your Customer.io account to send behavioral emails, SMS, and push notifications triggered by user events",
4896
+ authMethods: {
4897
+ "api-token": {
4898
+ label: "API Token",
4899
+ secrets: {
4900
+ CUSTOMERIO_APP_TOKEN: {
4901
+ label: "App API Key",
4902
+ required: true
4903
+ }
4904
+ }
4905
+ }
4906
+ },
4907
+ defaultAuthMethod: "api-token"
4908
+ },
4831
4909
  dify: {
4832
4910
  label: "Dify",
4833
4911
  helpText: "Connect your Dify account to build and manage AI-powered workflows, chatbots, and agentic applications",
@@ -5378,6 +5456,24 @@ var CONNECTOR_TYPES_DEF = {
5378
5456
  }
5379
5457
  }
5380
5458
  },
5459
+ calendly: {
5460
+ label: "Calendly",
5461
+ helpText: "Connect your Calendly account to access scheduling data, event types, and invitee information",
5462
+ authMethods: {
5463
+ "api-token": {
5464
+ label: "Personal Access Token",
5465
+ helpText: "1. Log in to [Calendly](https://calendly.com)\n2. Go to **Integrations > API & Webhooks**\n3. Generate a Personal Access Token\n4. Copy the token",
5466
+ secrets: {
5467
+ CALENDLY_TOKEN: {
5468
+ label: "Personal Access Token",
5469
+ required: true,
5470
+ placeholder: "your-calendly-token"
5471
+ }
5472
+ }
5473
+ }
5474
+ },
5475
+ defaultAuthMethod: "api-token"
5476
+ },
5381
5477
  canva: {
5382
5478
  label: "Canva",
5383
5479
  featureFlag: "canvaConnector" /* CanvaConnector */,
@@ -5421,6 +5517,24 @@ var CONNECTOR_TYPES_DEF = {
5421
5517
  }
5422
5518
  }
5423
5519
  },
5520
+ "cal-com": {
5521
+ label: "Cal.com",
5522
+ helpText: "Connect your Cal.com account to manage scheduling, bookings, and calendar events",
5523
+ authMethods: {
5524
+ "api-token": {
5525
+ label: "API Token",
5526
+ helpText: "1. Log in to [Cal.com](https://app.cal.com)\n2. Go to **Settings** \u2192 **Developer** \u2192 **API Keys**\n3. Click **Create API Key**\n4. Copy the generated key",
5527
+ secrets: {
5528
+ CALCOM_TOKEN: {
5529
+ label: "API Token",
5530
+ required: true,
5531
+ placeholder: "cal_live_xxxxxxxx"
5532
+ }
5533
+ }
5534
+ }
5535
+ },
5536
+ defaultAuthMethod: "api-token"
5537
+ },
5424
5538
  xero: {
5425
5539
  label: "Xero",
5426
5540
  helpText: "Connect your Xero account to access accounting data, invoices, and contacts",
@@ -6756,6 +6870,23 @@ var CONNECTOR_TYPES_DEF = {
6756
6870
  }
6757
6871
  },
6758
6872
  defaultAuthMethod: "api-token"
6873
+ },
6874
+ v0: {
6875
+ label: "v0",
6876
+ helpText: "Connect your v0 account to generate and iterate on React and Next.js UI components with AI",
6877
+ authMethods: {
6878
+ "api-token": {
6879
+ label: "API Token",
6880
+ secrets: {
6881
+ V0_TOKEN: {
6882
+ label: "API Token",
6883
+ required: true,
6884
+ placeholder: "v0-..."
6885
+ }
6886
+ }
6887
+ }
6888
+ },
6889
+ defaultAuthMethod: "api-token"
6759
6890
  }
6760
6891
  };
6761
6892
  var CONNECTOR_TYPES = CONNECTOR_TYPES_DEF;
@@ -6766,9 +6897,11 @@ var connectorTypeSchema = z22.enum([
6766
6897
  "axiom",
6767
6898
  "airtable",
6768
6899
  "asana",
6900
+ "calendly",
6769
6901
  "canva",
6770
6902
  "clickup",
6771
6903
  "cloudflare",
6904
+ "cloudinary",
6772
6905
  "close",
6773
6906
  "github",
6774
6907
  "gmail",
@@ -6876,7 +7009,10 @@ var connectorTypeSchema = z22.enum([
6876
7009
  "minio",
6877
7010
  "pdforge",
6878
7011
  "slack-webhook",
6879
- "wix"
7012
+ "wix",
7013
+ "cal-com",
7014
+ "v0",
7015
+ "customer-io"
6880
7016
  ]);
6881
7017
  function getConnectorEnvironmentMapping(type2) {
6882
7018
  const config = CONNECTOR_TYPES[type2];
@@ -7904,6 +8040,460 @@ var zeroAgentInstructionsContract = c26.router({
7904
8040
  }
7905
8041
  });
7906
8042
 
8043
+ // ../../packages/core/src/contracts/zero-connectors.ts
8044
+ import { z as z31 } from "zod";
8045
+ var c27 = initContract();
8046
+ var zeroConnectorsMainContract = c27.router({
8047
+ list: {
8048
+ method: "GET",
8049
+ path: "/api/zero/connectors",
8050
+ headers: authHeadersSchema,
8051
+ responses: {
8052
+ 200: connectorListResponseSchema,
8053
+ 401: apiErrorSchema,
8054
+ 500: apiErrorSchema
8055
+ },
8056
+ summary: "List all connectors (zero proxy)"
8057
+ }
8058
+ });
8059
+ var zeroConnectorsByTypeContract = c27.router({
8060
+ delete: {
8061
+ method: "DELETE",
8062
+ path: "/api/zero/connectors/:type",
8063
+ headers: authHeadersSchema,
8064
+ pathParams: z31.object({ type: connectorTypeSchema }),
8065
+ responses: {
8066
+ 204: c27.noBody(),
8067
+ 401: apiErrorSchema,
8068
+ 404: apiErrorSchema
8069
+ },
8070
+ summary: "Disconnect a connector (zero proxy)"
8071
+ }
8072
+ });
8073
+ var zeroConnectorScopeDiffContract = c27.router({
8074
+ getScopeDiff: {
8075
+ method: "GET",
8076
+ path: "/api/zero/connectors/:type/scope-diff",
8077
+ headers: authHeadersSchema,
8078
+ pathParams: z31.object({ type: connectorTypeSchema }),
8079
+ responses: {
8080
+ 200: scopeDiffResponseSchema,
8081
+ 401: apiErrorSchema,
8082
+ 404: apiErrorSchema
8083
+ },
8084
+ summary: "Get scope diff for a connector"
8085
+ }
8086
+ });
8087
+
8088
+ // ../../packages/core/src/contracts/zero-org.ts
8089
+ var c28 = initContract();
8090
+ var zeroOrgContract = c28.router({
8091
+ get: {
8092
+ method: "GET",
8093
+ path: "/api/zero/org",
8094
+ headers: authHeadersSchema,
8095
+ responses: {
8096
+ 200: orgResponseSchema,
8097
+ 401: apiErrorSchema,
8098
+ 404: apiErrorSchema
8099
+ },
8100
+ summary: "Get current org (zero proxy)"
8101
+ }
8102
+ });
8103
+
8104
+ // ../../packages/core/src/contracts/zero-composes.ts
8105
+ import { z as z32 } from "zod";
8106
+ var c29 = initContract();
8107
+ var zeroComposesMainContract = c29.router({
8108
+ getByName: {
8109
+ method: "GET",
8110
+ path: "/api/zero/composes",
8111
+ headers: authHeadersSchema,
8112
+ query: z32.object({
8113
+ name: z32.string().min(1, "Missing name query parameter"),
8114
+ org: z32.string().optional()
8115
+ }),
8116
+ responses: {
8117
+ 200: composeResponseSchema,
8118
+ 400: apiErrorSchema,
8119
+ 401: apiErrorSchema,
8120
+ 403: apiErrorSchema
8121
+ },
8122
+ summary: "Get agent compose by name (zero proxy)"
8123
+ }
8124
+ });
8125
+ var zeroComposesByIdContract = c29.router({
8126
+ getById: {
8127
+ method: "GET",
8128
+ path: "/api/zero/composes/:id",
8129
+ headers: authHeadersSchema,
8130
+ pathParams: z32.object({
8131
+ id: z32.string().min(1, "Compose ID is required")
8132
+ }),
8133
+ responses: {
8134
+ 200: composeResponseSchema,
8135
+ 401: apiErrorSchema,
8136
+ 403: apiErrorSchema,
8137
+ 404: apiErrorSchema
8138
+ },
8139
+ summary: "Get agent compose by ID (zero proxy)"
8140
+ },
8141
+ delete: {
8142
+ method: "DELETE",
8143
+ path: "/api/zero/composes/:id",
8144
+ headers: authHeadersSchema,
8145
+ pathParams: z32.object({
8146
+ id: z32.string().uuid("Compose ID is required")
8147
+ }),
8148
+ body: c29.noBody(),
8149
+ responses: {
8150
+ 204: c29.noBody(),
8151
+ 401: apiErrorSchema,
8152
+ 403: apiErrorSchema,
8153
+ 404: apiErrorSchema,
8154
+ 409: apiErrorSchema
8155
+ },
8156
+ summary: "Delete agent compose (zero proxy)"
8157
+ }
8158
+ });
8159
+ var zeroComposesListContract = c29.router({
8160
+ list: {
8161
+ method: "GET",
8162
+ path: "/api/zero/composes/list",
8163
+ headers: authHeadersSchema,
8164
+ query: z32.object({
8165
+ org: z32.string().optional()
8166
+ }),
8167
+ responses: {
8168
+ 200: z32.object({
8169
+ composes: z32.array(composeListItemSchema)
8170
+ }),
8171
+ 400: apiErrorSchema,
8172
+ 401: apiErrorSchema,
8173
+ 403: apiErrorSchema
8174
+ },
8175
+ summary: "List all agent composes (zero proxy)"
8176
+ }
8177
+ });
8178
+
8179
+ // ../../packages/core/src/contracts/zero-runs.ts
8180
+ import { z as z33 } from "zod";
8181
+ var zeroRunRequestSchema = unifiedRunRequestSchema.omit({
8182
+ triggerSource: true
8183
+ });
8184
+ var c30 = initContract();
8185
+ var zeroRunsMainContract = c30.router({
8186
+ create: {
8187
+ method: "POST",
8188
+ path: "/api/zero/runs",
8189
+ headers: authHeadersSchema,
8190
+ body: zeroRunRequestSchema,
8191
+ responses: {
8192
+ 201: createRunResponseSchema,
8193
+ 400: apiErrorSchema,
8194
+ 401: apiErrorSchema,
8195
+ 403: apiErrorSchema,
8196
+ 404: apiErrorSchema
8197
+ },
8198
+ summary: "Create and execute agent run (zero proxy)"
8199
+ }
8200
+ });
8201
+ var zeroRunsByIdContract = c30.router({
8202
+ getById: {
8203
+ method: "GET",
8204
+ path: "/api/zero/runs/:id",
8205
+ headers: authHeadersSchema,
8206
+ pathParams: z33.object({
8207
+ id: z33.string().min(1, "Run ID is required")
8208
+ }),
8209
+ responses: {
8210
+ 200: getRunResponseSchema,
8211
+ 400: apiErrorSchema,
8212
+ 401: apiErrorSchema,
8213
+ 404: apiErrorSchema
8214
+ },
8215
+ summary: "Get agent run by ID (zero proxy)"
8216
+ }
8217
+ });
8218
+ var zeroRunsCancelContract = c30.router({
8219
+ cancel: {
8220
+ method: "POST",
8221
+ path: "/api/zero/runs/:id/cancel",
8222
+ headers: authHeadersSchema,
8223
+ pathParams: z33.object({
8224
+ id: z33.string().min(1, "Run ID is required")
8225
+ }),
8226
+ body: z33.undefined(),
8227
+ responses: {
8228
+ 200: cancelRunResponseSchema,
8229
+ 400: apiErrorSchema,
8230
+ 401: apiErrorSchema,
8231
+ 403: apiErrorSchema,
8232
+ 404: apiErrorSchema
8233
+ },
8234
+ summary: "Cancel a pending or running run (zero proxy)"
8235
+ }
8236
+ });
8237
+ var zeroRunsQueueContract = c30.router({
8238
+ getQueue: {
8239
+ method: "GET",
8240
+ path: "/api/zero/runs/queue",
8241
+ headers: authHeadersSchema,
8242
+ responses: {
8243
+ 200: queueResponseSchema,
8244
+ 401: apiErrorSchema,
8245
+ 403: apiErrorSchema
8246
+ },
8247
+ summary: "Get org run queue status (zero proxy)"
8248
+ }
8249
+ });
8250
+ var zeroRunAgentEventsContract = c30.router({
8251
+ getAgentEvents: {
8252
+ method: "GET",
8253
+ path: "/api/zero/runs/:id/telemetry/agent",
8254
+ headers: authHeadersSchema,
8255
+ pathParams: z33.object({
8256
+ id: z33.string().min(1, "Run ID is required")
8257
+ }),
8258
+ query: z33.object({
8259
+ since: z33.coerce.number().optional(),
8260
+ limit: z33.coerce.number().min(1).max(100).default(5),
8261
+ order: z33.enum(["asc", "desc"]).default("desc")
8262
+ }),
8263
+ responses: {
8264
+ 200: agentEventsResponseSchema,
8265
+ 401: apiErrorSchema,
8266
+ 404: apiErrorSchema
8267
+ },
8268
+ summary: "Get agent events with pagination (zero proxy)"
8269
+ }
8270
+ });
8271
+
8272
+ // ../../packages/core/src/contracts/zero-schedules.ts
8273
+ import { z as z34 } from "zod";
8274
+ var c31 = initContract();
8275
+ var zeroSchedulesMainContract = c31.router({
8276
+ deploy: {
8277
+ method: "POST",
8278
+ path: "/api/zero/schedules",
8279
+ headers: authHeadersSchema,
8280
+ body: deployScheduleRequestSchema,
8281
+ responses: {
8282
+ 200: deployScheduleResponseSchema,
8283
+ 201: deployScheduleResponseSchema,
8284
+ 400: apiErrorSchema,
8285
+ 401: apiErrorSchema,
8286
+ 403: apiErrorSchema,
8287
+ 404: apiErrorSchema
8288
+ },
8289
+ summary: "Deploy schedule (zero proxy)"
8290
+ },
8291
+ list: {
8292
+ method: "GET",
8293
+ path: "/api/zero/schedules",
8294
+ headers: authHeadersSchema,
8295
+ responses: {
8296
+ 200: scheduleListResponseSchema,
8297
+ 401: apiErrorSchema,
8298
+ 403: apiErrorSchema
8299
+ },
8300
+ summary: "List all schedules (zero proxy)"
8301
+ }
8302
+ });
8303
+ var zeroSchedulesByNameContract = c31.router({
8304
+ delete: {
8305
+ method: "DELETE",
8306
+ path: "/api/zero/schedules/:name",
8307
+ headers: authHeadersSchema,
8308
+ pathParams: z34.object({
8309
+ name: z34.string().min(1, "Schedule name required")
8310
+ }),
8311
+ query: z34.object({
8312
+ composeId: z34.string().uuid("Compose ID required")
8313
+ }),
8314
+ responses: {
8315
+ 204: c31.noBody(),
8316
+ 401: apiErrorSchema,
8317
+ 403: apiErrorSchema,
8318
+ 404: apiErrorSchema
8319
+ },
8320
+ summary: "Delete schedule (zero proxy)"
8321
+ }
8322
+ });
8323
+ var zeroSchedulesEnableContract = c31.router({
8324
+ enable: {
8325
+ method: "POST",
8326
+ path: "/api/zero/schedules/:name/enable",
8327
+ headers: authHeadersSchema,
8328
+ pathParams: z34.object({
8329
+ name: z34.string().min(1, "Schedule name required")
8330
+ }),
8331
+ body: z34.object({
8332
+ composeId: z34.string().uuid("Compose ID required")
8333
+ }),
8334
+ responses: {
8335
+ 200: scheduleResponseSchema,
8336
+ 400: apiErrorSchema,
8337
+ 401: apiErrorSchema,
8338
+ 403: apiErrorSchema,
8339
+ 404: apiErrorSchema
8340
+ },
8341
+ summary: "Enable schedule (zero proxy)"
8342
+ },
8343
+ disable: {
8344
+ method: "POST",
8345
+ path: "/api/zero/schedules/:name/disable",
8346
+ headers: authHeadersSchema,
8347
+ pathParams: z34.object({
8348
+ name: z34.string().min(1, "Schedule name required")
8349
+ }),
8350
+ body: z34.object({
8351
+ composeId: z34.string().uuid("Compose ID required")
8352
+ }),
8353
+ responses: {
8354
+ 200: scheduleResponseSchema,
8355
+ 400: apiErrorSchema,
8356
+ 401: apiErrorSchema,
8357
+ 403: apiErrorSchema,
8358
+ 404: apiErrorSchema
8359
+ },
8360
+ summary: "Disable schedule (zero proxy)"
8361
+ }
8362
+ });
8363
+
8364
+ // ../../packages/core/src/contracts/zero-model-providers.ts
8365
+ import { z as z35 } from "zod";
8366
+ var c32 = initContract();
8367
+ var zeroModelProvidersMainContract = c32.router({
8368
+ list: {
8369
+ method: "GET",
8370
+ path: "/api/zero/model-providers",
8371
+ headers: authHeadersSchema,
8372
+ responses: {
8373
+ 200: modelProviderListResponseSchema,
8374
+ 401: apiErrorSchema,
8375
+ 500: apiErrorSchema
8376
+ },
8377
+ summary: "List org-level model providers"
8378
+ },
8379
+ upsert: {
8380
+ method: "POST",
8381
+ path: "/api/zero/model-providers",
8382
+ headers: authHeadersSchema,
8383
+ body: upsertModelProviderRequestSchema,
8384
+ responses: {
8385
+ 200: upsertModelProviderResponseSchema,
8386
+ 201: upsertModelProviderResponseSchema,
8387
+ 400: apiErrorSchema,
8388
+ 401: apiErrorSchema,
8389
+ 403: apiErrorSchema,
8390
+ 500: apiErrorSchema
8391
+ },
8392
+ summary: "Create or update an org-level model provider (admin only)"
8393
+ }
8394
+ });
8395
+ var zeroModelProvidersByTypeContract = c32.router({
8396
+ delete: {
8397
+ method: "DELETE",
8398
+ path: "/api/zero/model-providers/:type",
8399
+ headers: authHeadersSchema,
8400
+ pathParams: z35.object({
8401
+ type: modelProviderTypeSchema
8402
+ }),
8403
+ responses: {
8404
+ 204: c32.noBody(),
8405
+ 401: apiErrorSchema,
8406
+ 403: apiErrorSchema,
8407
+ 404: apiErrorSchema,
8408
+ 500: apiErrorSchema
8409
+ },
8410
+ summary: "Delete an org-level model provider (admin only)"
8411
+ }
8412
+ });
8413
+ var zeroModelProvidersDefaultContract = c32.router({
8414
+ setDefault: {
8415
+ method: "POST",
8416
+ path: "/api/zero/model-providers/:type/default",
8417
+ headers: authHeadersSchema,
8418
+ pathParams: z35.object({
8419
+ type: modelProviderTypeSchema
8420
+ }),
8421
+ body: z35.undefined(),
8422
+ responses: {
8423
+ 200: modelProviderResponseSchema,
8424
+ 401: apiErrorSchema,
8425
+ 403: apiErrorSchema,
8426
+ 404: apiErrorSchema,
8427
+ 500: apiErrorSchema
8428
+ },
8429
+ summary: "Set org-level model provider as default (admin only)"
8430
+ }
8431
+ });
8432
+
8433
+ // ../../packages/core/src/contracts/zero-user-preferences.ts
8434
+ var c33 = initContract();
8435
+ var zeroUserPreferencesContract = c33.router({
8436
+ get: {
8437
+ method: "GET",
8438
+ path: "/api/zero/user-preferences",
8439
+ headers: authHeadersSchema,
8440
+ responses: {
8441
+ 200: userPreferencesResponseSchema,
8442
+ 401: apiErrorSchema,
8443
+ 500: apiErrorSchema
8444
+ },
8445
+ summary: "Get user preferences"
8446
+ },
8447
+ update: {
8448
+ method: "POST",
8449
+ path: "/api/zero/user-preferences",
8450
+ headers: authHeadersSchema,
8451
+ body: updateUserPreferencesRequestSchema,
8452
+ responses: {
8453
+ 200: userPreferencesResponseSchema,
8454
+ 400: apiErrorSchema,
8455
+ 401: apiErrorSchema,
8456
+ 500: apiErrorSchema
8457
+ },
8458
+ summary: "Update user preferences"
8459
+ }
8460
+ });
8461
+
8462
+ // ../../packages/core/src/contracts/zero-secrets.ts
8463
+ var c34 = initContract();
8464
+ var zeroSecretsContract = c34.router({
8465
+ set: {
8466
+ method: "POST",
8467
+ path: "/api/zero/secrets",
8468
+ headers: authHeadersSchema,
8469
+ body: setSecretRequestSchema,
8470
+ responses: {
8471
+ 200: secretResponseSchema,
8472
+ 201: secretResponseSchema,
8473
+ 400: apiErrorSchema,
8474
+ 401: apiErrorSchema,
8475
+ 500: apiErrorSchema
8476
+ },
8477
+ summary: "Create or update a secret"
8478
+ }
8479
+ });
8480
+ var zeroVariablesContract = c34.router({
8481
+ set: {
8482
+ method: "POST",
8483
+ path: "/api/zero/variables",
8484
+ headers: authHeadersSchema,
8485
+ body: setVariableRequestSchema,
8486
+ responses: {
8487
+ 200: variableResponseSchema,
8488
+ 201: variableResponseSchema,
8489
+ 400: apiErrorSchema,
8490
+ 401: apiErrorSchema,
8491
+ 500: apiErrorSchema
8492
+ },
8493
+ summary: "Create or update a variable"
8494
+ }
8495
+ });
8496
+
7907
8497
  // ../../packages/core/src/storage-names.ts
7908
8498
  function getInstructionsStorageName(agentName) {
7909
8499
  return `agent-instructions@${agentName}`;
@@ -8955,8 +9545,8 @@ async function resolveSkills(skillUrls) {
8955
9545
  }
8956
9546
 
8957
9547
  // src/lib/domain/yaml-validator.ts
8958
- import { z as z31 } from "zod";
8959
- var cliAgentNameSchema = z31.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
9548
+ import { z as z36 } from "zod";
9549
+ var cliAgentNameSchema = z36.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
8960
9550
  /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?$/,
8961
9551
  "Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens"
8962
9552
  );
@@ -8970,7 +9560,7 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
8970
9560
  resolveSkillRef(skillRef);
8971
9561
  } catch (error) {
8972
9562
  ctx.addIssue({
8973
- code: z31.ZodIssueCode.custom,
9563
+ code: z36.ZodIssueCode.custom,
8974
9564
  message: error instanceof Error ? error.message : `Invalid skill reference: ${skillRef}`,
8975
9565
  path: ["skills", i]
8976
9566
  });
@@ -8980,15 +9570,15 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
8980
9570
  }
8981
9571
  }
8982
9572
  );
8983
- var cliComposeSchema = z31.object({
8984
- version: z31.string().min(1, "Missing config.version"),
8985
- agents: z31.record(cliAgentNameSchema, cliAgentDefinitionSchema),
8986
- volumes: z31.record(z31.string(), volumeConfigSchema).optional()
9573
+ var cliComposeSchema = z36.object({
9574
+ version: z36.string().min(1, "Missing config.version"),
9575
+ agents: z36.record(cliAgentNameSchema, cliAgentDefinitionSchema),
9576
+ volumes: z36.record(z36.string(), volumeConfigSchema).optional()
8987
9577
  }).superRefine((config, ctx) => {
8988
9578
  const agentKeys = Object.keys(config.agents);
8989
9579
  if (agentKeys.length === 0) {
8990
9580
  ctx.addIssue({
8991
- code: z31.ZodIssueCode.custom,
9581
+ code: z36.ZodIssueCode.custom,
8992
9582
  message: "agents must have at least one agent defined",
8993
9583
  path: ["agents"]
8994
9584
  });
@@ -8996,7 +9586,7 @@ var cliComposeSchema = z31.object({
8996
9586
  }
8997
9587
  if (agentKeys.length > 1) {
8998
9588
  ctx.addIssue({
8999
- code: z31.ZodIssueCode.custom,
9589
+ code: z36.ZodIssueCode.custom,
9000
9590
  message: "Multiple agents not supported yet. Only one agent allowed.",
9001
9591
  path: ["agents"]
9002
9592
  });
@@ -9008,7 +9598,7 @@ var cliComposeSchema = z31.object({
9008
9598
  if (agentVolumes && agentVolumes.length > 0) {
9009
9599
  if (!config.volumes) {
9010
9600
  ctx.addIssue({
9011
- code: z31.ZodIssueCode.custom,
9601
+ code: z36.ZodIssueCode.custom,
9012
9602
  message: "Agent references volumes but no volumes section defined. Each volume must have explicit name and version.",
9013
9603
  path: ["volumes"]
9014
9604
  });
@@ -9018,7 +9608,7 @@ var cliComposeSchema = z31.object({
9018
9608
  const parts = volDeclaration.split(":");
9019
9609
  if (parts.length !== 2) {
9020
9610
  ctx.addIssue({
9021
- code: z31.ZodIssueCode.custom,
9611
+ code: z36.ZodIssueCode.custom,
9022
9612
  message: `Invalid volume declaration: ${volDeclaration}. Expected format: volume-key:/mount/path`,
9023
9613
  path: ["agents", agentName, "volumes"]
9024
9614
  });
@@ -9027,7 +9617,7 @@ var cliComposeSchema = z31.object({
9027
9617
  const volumeKey = parts[0].trim();
9028
9618
  if (!config.volumes[volumeKey]) {
9029
9619
  ctx.addIssue({
9030
- code: z31.ZodIssueCode.custom,
9620
+ code: z36.ZodIssueCode.custom,
9031
9621
  message: `Volume "${volumeKey}" is not defined in volumes section. Each volume must have explicit name and version.`,
9032
9622
  path: ["volumes", volumeKey]
9033
9623
  });
@@ -10226,7 +10816,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
10226
10816
  options.autoUpdate = false;
10227
10817
  }
10228
10818
  if (options.autoUpdate !== false) {
10229
- await startSilentUpgrade("9.70.0");
10819
+ await startSilentUpgrade("9.70.2");
10230
10820
  }
10231
10821
  try {
10232
10822
  let result;
@@ -11051,7 +11641,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
11051
11641
  withErrorHandler(
11052
11642
  async (identifier, prompt, options) => {
11053
11643
  if (options.autoUpdate !== false) {
11054
- await startSilentUpgrade("9.70.0");
11644
+ await startSilentUpgrade("9.70.2");
11055
11645
  }
11056
11646
  const { org, name, version } = parseIdentifier(identifier);
11057
11647
  let composeId;
@@ -12789,7 +13379,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
12789
13379
  withErrorHandler(
12790
13380
  async (prompt, options) => {
12791
13381
  if (options.autoUpdate !== false) {
12792
- const shouldExit = await checkAndUpgrade("9.70.0", prompt);
13382
+ const shouldExit = await checkAndUpgrade("9.70.2", prompt);
12793
13383
  if (shouldExit) {
12794
13384
  process.exit(0);
12795
13385
  }
@@ -15141,7 +15731,7 @@ var listCommand9 = new Command65().name("list").alias("ls").description("List al
15141
15731
  );
15142
15732
  return;
15143
15733
  }
15144
- const nameWidth = Math.max(4, ...data.composes.map((c27) => c27.name.length));
15734
+ const nameWidth = Math.max(4, ...data.composes.map((c35) => c35.name.length));
15145
15735
  const header = ["NAME".padEnd(nameWidth), "VERSION", "UPDATED"].join(
15146
15736
  " "
15147
15737
  );
@@ -15742,7 +16332,7 @@ async function gatherFrequency(optionFrequency, existingFrequency) {
15742
16332
  if (!isInteractive()) {
15743
16333
  throw new Error("--frequency is required (daily|weekly|monthly|once|loop)");
15744
16334
  }
15745
- const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c27) => c27.value === existingFrequency) : 0;
16335
+ const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c35) => c35.value === existingFrequency) : 0;
15746
16336
  frequency = await promptSelect(
15747
16337
  "Schedule frequency",
15748
16338
  FREQUENCY_CHOICES,
@@ -15767,7 +16357,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
15767
16357
  throw new Error("--day is required for weekly/monthly");
15768
16358
  }
15769
16359
  if (frequency === "weekly") {
15770
- const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c27) => c27.value === existingDay) : 0;
16360
+ const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c35) => c35.value === existingDay) : 0;
15771
16361
  const day2 = await promptSelect(
15772
16362
  "Day of week",
15773
16363
  DAY_OF_WEEK_CHOICES,
@@ -17217,7 +17807,7 @@ import chalk76 from "chalk";
17217
17807
  var listCommand13 = new Command86().name("list").alias("ls").description("List all connectors and their status").action(
17218
17808
  withErrorHandler(async () => {
17219
17809
  const result = await listConnectors();
17220
- const connectedMap = new Map(result.connectors.map((c27) => [c27.type, c27]));
17810
+ const connectedMap = new Map(result.connectors.map((c35) => [c35.type, c35]));
17221
17811
  const allTypesRaw = Object.keys(CONNECTOR_TYPES);
17222
17812
  const allTypes = [];
17223
17813
  for (const type2 of allTypesRaw) {
@@ -17778,16 +18368,16 @@ async function handleModelProvider(ctx) {
17778
18368
  const providerType = await step.prompt(
17779
18369
  () => promptSelect(
17780
18370
  "Select provider type:",
17781
- choices.map((c27) => ({
17782
- title: c27.label,
17783
- value: c27.type
18371
+ choices.map((c35) => ({
18372
+ title: c35.label,
18373
+ value: c35.type
17784
18374
  }))
17785
18375
  )
17786
18376
  );
17787
18377
  if (!providerType) {
17788
18378
  process.exit(0);
17789
18379
  }
17790
- const selectedChoice = choices.find((c27) => c27.type === providerType);
18380
+ const selectedChoice = choices.find((c35) => c35.type === providerType);
17791
18381
  if (selectedChoice?.helpText) {
17792
18382
  for (const line of selectedChoice.helpText.split("\n")) {
17793
18383
  step.detail(chalk82.dim(line));
@@ -18141,13 +18731,13 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
18141
18731
  if (latestVersion === null) {
18142
18732
  throw new Error("Could not check for updates. Please try again later.");
18143
18733
  }
18144
- if (latestVersion === "9.70.0") {
18145
- console.log(chalk86.green(`\u2713 Already up to date (${"9.70.0"})`));
18734
+ if (latestVersion === "9.70.2") {
18735
+ console.log(chalk86.green(`\u2713 Already up to date (${"9.70.2"})`));
18146
18736
  return;
18147
18737
  }
18148
18738
  console.log(
18149
18739
  chalk86.yellow(
18150
- `Current version: ${"9.70.0"} -> Latest version: ${latestVersion}`
18740
+ `Current version: ${"9.70.2"} -> Latest version: ${latestVersion}`
18151
18741
  )
18152
18742
  );
18153
18743
  console.log();
@@ -18174,7 +18764,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
18174
18764
  const success = await performUpgrade(packageManager);
18175
18765
  if (success) {
18176
18766
  console.log(
18177
- chalk86.green(`\u2713 Upgraded from ${"9.70.0"} to ${latestVersion}`)
18767
+ chalk86.green(`\u2713 Upgraded from ${"9.70.2"} to ${latestVersion}`)
18178
18768
  );
18179
18769
  return;
18180
18770
  }
@@ -18248,7 +18838,7 @@ var whoamiCommand = new Command95().name("whoami").description("Show current ide
18248
18838
 
18249
18839
  // src/index.ts
18250
18840
  var program = new Command96();
18251
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.70.0");
18841
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.70.2");
18252
18842
  program.addCommand(authCommand);
18253
18843
  program.addCommand(infoCommand);
18254
18844
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.70.0",
3
+ "version": "9.70.2",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",