@vm0/cli 9.75.0 → 9.75.1

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 +510 -62
  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.0",
50
+ release: "9.75.1",
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.0",
69
+ version: "9.75.1",
70
70
  command: process.argv.slice(2).join(" ")
71
71
  });
72
72
  Sentry.setContext("runtime", {
@@ -7508,6 +7508,202 @@ var confluenceFirewall = {
7508
7508
  ]
7509
7509
  };
7510
7510
 
7511
+ // ../../packages/core/src/firewalls/figma.generated.ts
7512
+ var figmaFirewall = {
7513
+ name: "figma",
7514
+ description: "Figma API",
7515
+ placeholders: {
7516
+ FIGMA_TOKEN: "figd_Vm0PlaceHolder00000000000000000000000000"
7517
+ },
7518
+ apis: [
7519
+ {
7520
+ base: "https://api.figma.com",
7521
+ auth: {
7522
+ headers: {
7523
+ Authorization: "Bearer ${{ secrets.FIGMA_TOKEN }}"
7524
+ }
7525
+ },
7526
+ permissions: [
7527
+ {
7528
+ name: "unrestricted",
7529
+ description: "Allow all endpoints",
7530
+ rules: ["ANY /{path*}"]
7531
+ },
7532
+ {
7533
+ name: "current_user:read",
7534
+ description: "Read your name, email, and profile image.",
7535
+ rules: ["GET /v1/me"]
7536
+ },
7537
+ {
7538
+ name: "file_comments:read",
7539
+ description: "Read the comments for files.",
7540
+ rules: [
7541
+ "GET /v1/files/{file_key}/comments",
7542
+ "GET /v1/files/{file_key}/comments/{comment_id}/reactions"
7543
+ ]
7544
+ },
7545
+ {
7546
+ name: "file_comments:write",
7547
+ description: "Post and delete comments and comment reactions in files.",
7548
+ rules: [
7549
+ "POST /v1/files/{file_key}/comments",
7550
+ "DELETE /v1/files/{file_key}/comments/{comment_id}",
7551
+ "POST /v1/files/{file_key}/comments/{comment_id}/reactions",
7552
+ "DELETE /v1/files/{file_key}/comments/{comment_id}/reactions"
7553
+ ]
7554
+ },
7555
+ {
7556
+ name: "file_content:read",
7557
+ description: "Read the contents of files, such as nodes and the editor type.",
7558
+ rules: [
7559
+ "GET /v1/files/{file_key}",
7560
+ "GET /v1/files/{file_key}/images",
7561
+ "GET /v1/files/{file_key}/nodes",
7562
+ "GET /v1/images/{file_key}"
7563
+ ]
7564
+ },
7565
+ {
7566
+ name: "file_dev_resources:read",
7567
+ description: "Read dev resources in files.",
7568
+ rules: ["GET /v1/files/{file_key}/dev_resources"]
7569
+ },
7570
+ {
7571
+ name: "file_dev_resources:write",
7572
+ description: "Write to dev resources in files.",
7573
+ rules: [
7574
+ "POST /v1/dev_resources",
7575
+ "PUT /v1/dev_resources",
7576
+ "DELETE /v1/files/{file_key}/dev_resources/{dev_resource_id}"
7577
+ ]
7578
+ },
7579
+ {
7580
+ name: "file_metadata:read",
7581
+ description: "Read metadata of files.",
7582
+ rules: ["GET /v1/files/{file_key}/meta"]
7583
+ },
7584
+ {
7585
+ name: "file_variables:read",
7586
+ description: "Read variables in Figma file. Note: this is only available to members in Enterprise organizations.",
7587
+ rules: [
7588
+ "GET /v1/files/{file_key}/variables/local",
7589
+ "GET /v1/files/{file_key}/variables/published"
7590
+ ]
7591
+ },
7592
+ {
7593
+ name: "file_variables:write",
7594
+ description: "Write to variables in Figma file. Note: this is only available to members in Enterprise organizations.",
7595
+ rules: ["POST /v1/files/{file_key}/variables"]
7596
+ },
7597
+ {
7598
+ name: "file_versions:read",
7599
+ description: "Read the version history for files you can access.",
7600
+ rules: ["GET /v1/files/{file_key}/versions"]
7601
+ },
7602
+ {
7603
+ name: "files:read",
7604
+ description: "Deprecated. Read files, projects, users, versions, comments, components & styles, and webhooks.",
7605
+ rules: [
7606
+ "GET /v1/component_sets/{key}",
7607
+ "GET /v1/components/{key}",
7608
+ "GET /v1/files/{file_key}",
7609
+ "GET /v1/files/{file_key}/comments",
7610
+ "GET /v1/files/{file_key}/comments/{comment_id}/reactions",
7611
+ "GET /v1/files/{file_key}/component_sets",
7612
+ "GET /v1/files/{file_key}/components",
7613
+ "GET /v1/files/{file_key}/images",
7614
+ "GET /v1/files/{file_key}/meta",
7615
+ "GET /v1/files/{file_key}/nodes",
7616
+ "GET /v1/files/{file_key}/styles",
7617
+ "GET /v1/files/{file_key}/versions",
7618
+ "GET /v1/images/{file_key}",
7619
+ "GET /v1/me",
7620
+ "GET /v1/projects/{project_id}/files",
7621
+ "GET /v1/styles/{key}",
7622
+ "GET /v1/teams/{team_id}/component_sets",
7623
+ "GET /v1/teams/{team_id}/components",
7624
+ "GET /v1/teams/{team_id}/projects",
7625
+ "GET /v1/teams/{team_id}/styles",
7626
+ "GET /v2/teams/{team_id}/webhooks",
7627
+ "GET /v2/webhooks/{webhook_id}",
7628
+ "GET /v2/webhooks/{webhook_id}/requests"
7629
+ ]
7630
+ },
7631
+ {
7632
+ name: "library_analytics:read",
7633
+ description: "Read library analytics data.",
7634
+ rules: [
7635
+ "GET /v1/analytics/libraries/{file_key}/component/actions",
7636
+ "GET /v1/analytics/libraries/{file_key}/component/usages",
7637
+ "GET /v1/analytics/libraries/{file_key}/style/actions",
7638
+ "GET /v1/analytics/libraries/{file_key}/style/usages",
7639
+ "GET /v1/analytics/libraries/{file_key}/variable/actions",
7640
+ "GET /v1/analytics/libraries/{file_key}/variable/usages"
7641
+ ]
7642
+ },
7643
+ {
7644
+ name: "library_assets:read",
7645
+ description: "Read data of individual published components and styles.",
7646
+ rules: [
7647
+ "GET /v1/component_sets/{key}",
7648
+ "GET /v1/components/{key}",
7649
+ "GET /v1/styles/{key}"
7650
+ ]
7651
+ },
7652
+ {
7653
+ name: "library_content:read",
7654
+ description: "Read published components and styles of files.",
7655
+ rules: [
7656
+ "GET /v1/files/{file_key}/component_sets",
7657
+ "GET /v1/files/{file_key}/components",
7658
+ "GET /v1/files/{file_key}/styles"
7659
+ ]
7660
+ },
7661
+ {
7662
+ name: "org:activity_log_read",
7663
+ description: "Read activity logs in the organization.",
7664
+ rules: ["GET /v1/activity_logs"]
7665
+ },
7666
+ {
7667
+ name: "projects:read",
7668
+ description: "List projects and files in projects.",
7669
+ rules: [
7670
+ "GET /v1/projects/{project_id}/files",
7671
+ "GET /v1/teams/{team_id}/projects"
7672
+ ]
7673
+ },
7674
+ {
7675
+ name: "team_library_content:read",
7676
+ description: "Read published components and styles of teams.",
7677
+ rules: [
7678
+ "GET /v1/teams/{team_id}/component_sets",
7679
+ "GET /v1/teams/{team_id}/components",
7680
+ "GET /v1/teams/{team_id}/styles"
7681
+ ]
7682
+ },
7683
+ {
7684
+ name: "webhooks:read",
7685
+ description: "Read metadata of webhooks.",
7686
+ rules: [
7687
+ "GET /v2/teams/{team_id}/webhooks",
7688
+ "GET /v2/webhooks",
7689
+ "GET /v2/webhooks/{webhook_id}",
7690
+ "GET /v2/webhooks/{webhook_id}/requests"
7691
+ ]
7692
+ },
7693
+ {
7694
+ name: "webhooks:write",
7695
+ description: "Create and manage webhooks.",
7696
+ rules: [
7697
+ "POST /v2/webhooks",
7698
+ "PUT /v2/webhooks/{webhook_id}",
7699
+ "DELETE /v2/webhooks/{webhook_id}"
7700
+ ]
7701
+ }
7702
+ ]
7703
+ }
7704
+ ]
7705
+ };
7706
+
7511
7707
  // ../../packages/core/src/firewalls/github.generated.ts
7512
7708
  var githubFirewall = {
7513
7709
  name: "github",
@@ -11329,6 +11525,99 @@ var jiraFirewall = {
11329
11525
  ]
11330
11526
  };
11331
11527
 
11528
+ // ../../packages/core/src/firewalls/notion.generated.ts
11529
+ var notionFirewall = {
11530
+ name: "notion",
11531
+ description: "Notion API",
11532
+ placeholders: {
11533
+ NOTION_TOKEN: "ntn_00000000000Vm0PlaceHolder000000000000000000Aaa"
11534
+ },
11535
+ apis: [
11536
+ {
11537
+ base: "https://api.notion.com/v1",
11538
+ auth: {
11539
+ headers: {
11540
+ Authorization: "Bearer ${{ secrets.NOTION_TOKEN }}"
11541
+ }
11542
+ },
11543
+ permissions: [
11544
+ {
11545
+ name: "unrestricted",
11546
+ description: "Allow all endpoints",
11547
+ rules: ["ANY /{path*}"]
11548
+ },
11549
+ {
11550
+ name: "insert_comments",
11551
+ description: "Create comments",
11552
+ rules: ["POST /comments"]
11553
+ },
11554
+ {
11555
+ name: "insert_content",
11556
+ description: "Create pages, databases, blocks, data sources, and upload files",
11557
+ rules: [
11558
+ "PATCH /blocks/{block_id}/children",
11559
+ "POST /data_sources",
11560
+ "POST /databases",
11561
+ "POST /file_uploads",
11562
+ "POST /file_uploads/{file_upload_id}/complete",
11563
+ "POST /file_uploads/{file_upload_id}/send",
11564
+ "POST /pages",
11565
+ "POST /views",
11566
+ "POST /views/{view_id}/queries"
11567
+ ]
11568
+ },
11569
+ {
11570
+ name: "read_comments",
11571
+ description: "Read comments",
11572
+ rules: ["GET /comments", "GET /comments/{comment_id}"]
11573
+ },
11574
+ {
11575
+ name: "read_content",
11576
+ description: "Read pages, databases, blocks, data sources, and files",
11577
+ rules: [
11578
+ "GET /blocks/{block_id}",
11579
+ "GET /blocks/{block_id}/children",
11580
+ "GET /data_sources/{data_source_id}",
11581
+ "POST /data_sources/{data_source_id}/query",
11582
+ "GET /data_sources/{data_source_id}/templates",
11583
+ "GET /databases/{database_id}",
11584
+ "GET /file_uploads",
11585
+ "GET /file_uploads/{file_upload_id}",
11586
+ "GET /pages/{page_id}",
11587
+ "GET /pages/{page_id}/markdown",
11588
+ "GET /pages/{page_id}/properties/{property_id}",
11589
+ "POST /search",
11590
+ "GET /views",
11591
+ "GET /views/{view_id}",
11592
+ "GET /views/{view_id}/queries/{query_id}"
11593
+ ]
11594
+ },
11595
+ {
11596
+ name: "read_users",
11597
+ description: "Read user information",
11598
+ rules: ["GET /users", "GET /users/me", "GET /users/{user_id}"]
11599
+ },
11600
+ {
11601
+ name: "update_content",
11602
+ description: "Update and delete pages, databases, blocks, and data sources",
11603
+ rules: [
11604
+ "PATCH /blocks/{block_id}",
11605
+ "DELETE /blocks/{block_id}",
11606
+ "PATCH /data_sources/{data_source_id}",
11607
+ "PATCH /databases/{database_id}",
11608
+ "PATCH /pages/{page_id}",
11609
+ "PATCH /pages/{page_id}/markdown",
11610
+ "POST /pages/{page_id}/move",
11611
+ "PATCH /views/{view_id}",
11612
+ "DELETE /views/{view_id}",
11613
+ "DELETE /views/{view_id}/queries/{query_id}"
11614
+ ]
11615
+ }
11616
+ ]
11617
+ }
11618
+ ]
11619
+ };
11620
+
11332
11621
  // ../../packages/core/src/firewalls/slack.generated.ts
11333
11622
  var slackFirewall = {
11334
11623
  name: "slack",
@@ -12160,6 +12449,7 @@ var slackFirewall = {
12160
12449
  // ../../packages/core/src/firewalls/index.ts
12161
12450
  var builtinFirewalls = {
12162
12451
  confluence: confluenceFirewall,
12452
+ figma: figmaFirewall,
12163
12453
  github: githubFirewall,
12164
12454
  gmail: gmailFirewall,
12165
12455
  "google-calendar": googleCalendarFirewall,
@@ -12167,6 +12457,7 @@ var builtinFirewalls = {
12167
12457
  "google-drive": googleDriveFirewall,
12168
12458
  "google-sheets": googleSheetsFirewall,
12169
12459
  jira: jiraFirewall,
12460
+ notion: notionFirewall,
12170
12461
  slack: slackFirewall
12171
12462
  };
12172
12463
 
@@ -12992,9 +13283,25 @@ var zeroOrgDeleteContract = c29.router({
12992
13283
  }
12993
13284
  });
12994
13285
 
12995
- // ../../packages/core/src/contracts/zero-org-members.ts
13286
+ // ../../packages/core/src/contracts/zero-org-list.ts
12996
13287
  var c30 = initContract();
12997
- var zeroOrgMembersContract = c30.router({
13288
+ var zeroOrgListContract = c30.router({
13289
+ list: {
13290
+ method: "GET",
13291
+ path: "/api/zero/org/list",
13292
+ headers: authHeadersSchema,
13293
+ responses: {
13294
+ 200: orgListResponseSchema,
13295
+ 401: apiErrorSchema,
13296
+ 500: apiErrorSchema
13297
+ },
13298
+ summary: "List all accessible orgs for the authenticated user"
13299
+ }
13300
+ });
13301
+
13302
+ // ../../packages/core/src/contracts/zero-org-members.ts
13303
+ var c31 = initContract();
13304
+ var zeroOrgMembersContract = c31.router({
12998
13305
  members: {
12999
13306
  method: "GET",
13000
13307
  path: "/api/zero/org/members",
@@ -13038,7 +13345,7 @@ var zeroOrgMembersContract = c30.router({
13038
13345
  summary: "Remove a member from the org (zero proxy)"
13039
13346
  }
13040
13347
  });
13041
- var zeroOrgInviteContract = c30.router({
13348
+ var zeroOrgInviteContract = c31.router({
13042
13349
  invite: {
13043
13350
  method: "POST",
13044
13351
  path: "/api/zero/org/invite",
@@ -13057,8 +13364,8 @@ var zeroOrgInviteContract = c30.router({
13057
13364
 
13058
13365
  // ../../packages/core/src/contracts/zero-composes.ts
13059
13366
  import { z as z34 } from "zod";
13060
- var c31 = initContract();
13061
- var zeroComposesMainContract = c31.router({
13367
+ var c32 = initContract();
13368
+ var zeroComposesMainContract = c32.router({
13062
13369
  getByName: {
13063
13370
  method: "GET",
13064
13371
  path: "/api/zero/composes",
@@ -13076,7 +13383,7 @@ var zeroComposesMainContract = c31.router({
13076
13383
  summary: "Get agent compose by name (zero proxy)"
13077
13384
  }
13078
13385
  });
13079
- var zeroComposesByIdContract = c31.router({
13386
+ var zeroComposesByIdContract = c32.router({
13080
13387
  getById: {
13081
13388
  method: "GET",
13082
13389
  path: "/api/zero/composes/:id",
@@ -13099,9 +13406,9 @@ var zeroComposesByIdContract = c31.router({
13099
13406
  pathParams: z34.object({
13100
13407
  id: z34.string().uuid("Compose ID is required")
13101
13408
  }),
13102
- body: c31.noBody(),
13409
+ body: c32.noBody(),
13103
13410
  responses: {
13104
- 204: c31.noBody(),
13411
+ 204: c32.noBody(),
13105
13412
  401: apiErrorSchema,
13106
13413
  403: apiErrorSchema,
13107
13414
  404: apiErrorSchema,
@@ -13110,7 +13417,7 @@ var zeroComposesByIdContract = c31.router({
13110
13417
  summary: "Delete agent compose (zero proxy)"
13111
13418
  }
13112
13419
  });
13113
- var zeroComposesListContract = c31.router({
13420
+ var zeroComposesListContract = c32.router({
13114
13421
  list: {
13115
13422
  method: "GET",
13116
13423
  path: "/api/zero/composes/list",
@@ -13142,8 +13449,8 @@ var zeroRunRequestSchema = unifiedRunRequestSchema.omit({
13142
13449
  vars: true,
13143
13450
  secrets: true
13144
13451
  });
13145
- var c32 = initContract();
13146
- var zeroRunsMainContract = c32.router({
13452
+ var c33 = initContract();
13453
+ var zeroRunsMainContract = c33.router({
13147
13454
  create: {
13148
13455
  method: "POST",
13149
13456
  path: "/api/zero/runs",
@@ -13159,7 +13466,7 @@ var zeroRunsMainContract = c32.router({
13159
13466
  summary: "Create and execute agent run (zero proxy)"
13160
13467
  }
13161
13468
  });
13162
- var zeroRunsByIdContract = c32.router({
13469
+ var zeroRunsByIdContract = c33.router({
13163
13470
  getById: {
13164
13471
  method: "GET",
13165
13472
  path: "/api/zero/runs/:id",
@@ -13176,7 +13483,7 @@ var zeroRunsByIdContract = c32.router({
13176
13483
  summary: "Get agent run by ID (zero proxy)"
13177
13484
  }
13178
13485
  });
13179
- var zeroRunsCancelContract = c32.router({
13486
+ var zeroRunsCancelContract = c33.router({
13180
13487
  cancel: {
13181
13488
  method: "POST",
13182
13489
  path: "/api/zero/runs/:id/cancel",
@@ -13195,7 +13502,7 @@ var zeroRunsCancelContract = c32.router({
13195
13502
  summary: "Cancel a pending or running run (zero proxy)"
13196
13503
  }
13197
13504
  });
13198
- var zeroRunsQueueContract = c32.router({
13505
+ var zeroRunsQueueContract = c33.router({
13199
13506
  getQueue: {
13200
13507
  method: "GET",
13201
13508
  path: "/api/zero/runs/queue",
@@ -13208,7 +13515,7 @@ var zeroRunsQueueContract = c32.router({
13208
13515
  summary: "Get org run queue status (zero proxy)"
13209
13516
  }
13210
13517
  });
13211
- var zeroRunAgentEventsContract = c32.router({
13518
+ var zeroRunAgentEventsContract = c33.router({
13212
13519
  getAgentEvents: {
13213
13520
  method: "GET",
13214
13521
  path: "/api/zero/runs/:id/telemetry/agent",
@@ -13232,8 +13539,8 @@ var zeroRunAgentEventsContract = c32.router({
13232
13539
 
13233
13540
  // ../../packages/core/src/contracts/zero-schedules.ts
13234
13541
  import { z as z36 } from "zod";
13235
- var c33 = initContract();
13236
- var zeroSchedulesMainContract = c33.router({
13542
+ var c34 = initContract();
13543
+ var zeroSchedulesMainContract = c34.router({
13237
13544
  deploy: {
13238
13545
  method: "POST",
13239
13546
  path: "/api/zero/schedules",
@@ -13261,7 +13568,7 @@ var zeroSchedulesMainContract = c33.router({
13261
13568
  summary: "List all schedules (zero proxy)"
13262
13569
  }
13263
13570
  });
13264
- var zeroSchedulesByNameContract = c33.router({
13571
+ var zeroSchedulesByNameContract = c34.router({
13265
13572
  delete: {
13266
13573
  method: "DELETE",
13267
13574
  path: "/api/zero/schedules/:name",
@@ -13273,7 +13580,7 @@ var zeroSchedulesByNameContract = c33.router({
13273
13580
  composeId: z36.string().uuid("Compose ID required")
13274
13581
  }),
13275
13582
  responses: {
13276
- 204: c33.noBody(),
13583
+ 204: c34.noBody(),
13277
13584
  401: apiErrorSchema,
13278
13585
  403: apiErrorSchema,
13279
13586
  404: apiErrorSchema
@@ -13281,7 +13588,7 @@ var zeroSchedulesByNameContract = c33.router({
13281
13588
  summary: "Delete schedule (zero proxy)"
13282
13589
  }
13283
13590
  });
13284
- var zeroSchedulesEnableContract = c33.router({
13591
+ var zeroSchedulesEnableContract = c34.router({
13285
13592
  enable: {
13286
13593
  method: "POST",
13287
13594
  path: "/api/zero/schedules/:name/enable",
@@ -13324,8 +13631,8 @@ var zeroSchedulesEnableContract = c33.router({
13324
13631
 
13325
13632
  // ../../packages/core/src/contracts/zero-model-providers.ts
13326
13633
  import { z as z37 } from "zod";
13327
- var c34 = initContract();
13328
- var zeroModelProvidersMainContract = c34.router({
13634
+ var c35 = initContract();
13635
+ var zeroModelProvidersMainContract = c35.router({
13329
13636
  list: {
13330
13637
  method: "GET",
13331
13638
  path: "/api/zero/model-providers",
@@ -13353,7 +13660,7 @@ var zeroModelProvidersMainContract = c34.router({
13353
13660
  summary: "Create or update an org-level model provider (admin only)"
13354
13661
  }
13355
13662
  });
13356
- var zeroModelProvidersByTypeContract = c34.router({
13663
+ var zeroModelProvidersByTypeContract = c35.router({
13357
13664
  delete: {
13358
13665
  method: "DELETE",
13359
13666
  path: "/api/zero/model-providers/:type",
@@ -13362,7 +13669,7 @@ var zeroModelProvidersByTypeContract = c34.router({
13362
13669
  type: modelProviderTypeSchema
13363
13670
  }),
13364
13671
  responses: {
13365
- 204: c34.noBody(),
13672
+ 204: c35.noBody(),
13366
13673
  401: apiErrorSchema,
13367
13674
  403: apiErrorSchema,
13368
13675
  404: apiErrorSchema,
@@ -13371,7 +13678,7 @@ var zeroModelProvidersByTypeContract = c34.router({
13371
13678
  summary: "Delete an org-level model provider (admin only)"
13372
13679
  }
13373
13680
  });
13374
- var zeroModelProvidersDefaultContract = c34.router({
13681
+ var zeroModelProvidersDefaultContract = c35.router({
13375
13682
  setDefault: {
13376
13683
  method: "POST",
13377
13684
  path: "/api/zero/model-providers/:type/default",
@@ -13390,7 +13697,7 @@ var zeroModelProvidersDefaultContract = c34.router({
13390
13697
  summary: "Set org-level model provider as default (admin only)"
13391
13698
  }
13392
13699
  });
13393
- var zeroModelProvidersUpdateModelContract = c34.router({
13700
+ var zeroModelProvidersUpdateModelContract = c35.router({
13394
13701
  updateModel: {
13395
13702
  method: "PATCH",
13396
13703
  path: "/api/zero/model-providers/:type/model",
@@ -13411,8 +13718,8 @@ var zeroModelProvidersUpdateModelContract = c34.router({
13411
13718
  });
13412
13719
 
13413
13720
  // ../../packages/core/src/contracts/zero-user-preferences.ts
13414
- var c35 = initContract();
13415
- var zeroUserPreferencesContract = c35.router({
13721
+ var c36 = initContract();
13722
+ var zeroUserPreferencesContract = c36.router({
13416
13723
  get: {
13417
13724
  method: "GET",
13418
13725
  path: "/api/zero/user-preferences",
@@ -13440,8 +13747,8 @@ var zeroUserPreferencesContract = c35.router({
13440
13747
  });
13441
13748
 
13442
13749
  // ../../packages/core/src/contracts/zero-secrets.ts
13443
- var c36 = initContract();
13444
- var zeroSecretsContract = c36.router({
13750
+ var c37 = initContract();
13751
+ var zeroSecretsContract = c37.router({
13445
13752
  set: {
13446
13753
  method: "POST",
13447
13754
  path: "/api/zero/secrets",
@@ -13457,7 +13764,7 @@ var zeroSecretsContract = c36.router({
13457
13764
  summary: "Create or update a secret"
13458
13765
  }
13459
13766
  });
13460
- var zeroVariablesContract = c36.router({
13767
+ var zeroVariablesContract = c37.router({
13461
13768
  set: {
13462
13769
  method: "POST",
13463
13770
  path: "/api/zero/variables",
@@ -13476,8 +13783,8 @@ var zeroVariablesContract = c36.router({
13476
13783
 
13477
13784
  // ../../packages/core/src/contracts/zero-sessions.ts
13478
13785
  import { z as z38 } from "zod";
13479
- var c37 = initContract();
13480
- var zeroSessionsByIdContract = c37.router({
13786
+ var c38 = initContract();
13787
+ var zeroSessionsByIdContract = c38.router({
13481
13788
  getById: {
13482
13789
  method: "GET",
13483
13790
  path: "/api/zero/sessions/:id",
@@ -13497,8 +13804,8 @@ var zeroSessionsByIdContract = c37.router({
13497
13804
 
13498
13805
  // ../../packages/core/src/contracts/integrations.ts
13499
13806
  import { z as z39 } from "zod";
13500
- var c38 = initContract();
13501
- var integrationsSlackMessageContract = c38.router({
13807
+ var c39 = initContract();
13808
+ var integrationsSlackMessageContract = c39.router({
13502
13809
  sendMessage: {
13503
13810
  method: "POST",
13504
13811
  path: "/api/agent/integrations/slack/message",
@@ -13524,6 +13831,147 @@ var integrationsSlackMessageContract = c38.router({
13524
13831
  }
13525
13832
  });
13526
13833
 
13834
+ // ../../packages/core/src/contracts/zero-billing.ts
13835
+ import { z as z40 } from "zod";
13836
+ 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(),
13848
+ autoRecharge: autoRechargeSchema
13849
+ });
13850
+ var checkoutResponseSchema = z40.object({
13851
+ url: z40.string()
13852
+ });
13853
+ var portalResponseSchema = z40.object({
13854
+ url: z40.string()
13855
+ });
13856
+ var checkoutRequestSchema = z40.object({
13857
+ tier: z40.enum(["pro", "team"]),
13858
+ successUrl: z40.string().url(),
13859
+ cancelUrl: z40.string().url()
13860
+ });
13861
+ var portalRequestSchema = z40.object({
13862
+ returnUrl: z40.string().min(1)
13863
+ });
13864
+ var autoRechargeUpdateRequestSchema = z40.object({
13865
+ enabled: z40.boolean(),
13866
+ threshold: z40.number().int().positive().optional(),
13867
+ amount: z40.number().int().min(1e3).optional()
13868
+ });
13869
+ var zeroBillingStatusContract = c40.router({
13870
+ get: {
13871
+ method: "GET",
13872
+ path: "/api/zero/billing/status",
13873
+ headers: authHeadersSchema,
13874
+ responses: {
13875
+ 200: billingStatusResponseSchema,
13876
+ 401: apiErrorSchema,
13877
+ 500: apiErrorSchema
13878
+ },
13879
+ summary: "Get billing status for current org"
13880
+ }
13881
+ });
13882
+ var zeroBillingCheckoutContract = c40.router({
13883
+ create: {
13884
+ method: "POST",
13885
+ path: "/api/zero/billing/checkout",
13886
+ headers: authHeadersSchema,
13887
+ body: checkoutRequestSchema,
13888
+ responses: {
13889
+ 200: checkoutResponseSchema,
13890
+ 400: apiErrorSchema,
13891
+ 401: apiErrorSchema,
13892
+ 500: apiErrorSchema,
13893
+ 503: apiErrorSchema
13894
+ },
13895
+ summary: "Create Stripe checkout session"
13896
+ }
13897
+ });
13898
+ var zeroBillingPortalContract = c40.router({
13899
+ create: {
13900
+ method: "POST",
13901
+ path: "/api/zero/billing/portal",
13902
+ headers: authHeadersSchema,
13903
+ body: portalRequestSchema,
13904
+ responses: {
13905
+ 200: portalResponseSchema,
13906
+ 400: apiErrorSchema,
13907
+ 401: apiErrorSchema,
13908
+ 500: apiErrorSchema,
13909
+ 503: apiErrorSchema
13910
+ },
13911
+ summary: "Create Stripe billing portal session"
13912
+ }
13913
+ });
13914
+ var zeroBillingAutoRechargeContract = c40.router({
13915
+ get: {
13916
+ method: "GET",
13917
+ path: "/api/zero/billing/auto-recharge",
13918
+ headers: authHeadersSchema,
13919
+ responses: {
13920
+ 200: autoRechargeSchema,
13921
+ 401: apiErrorSchema,
13922
+ 500: apiErrorSchema
13923
+ },
13924
+ summary: "Get auto-recharge configuration"
13925
+ },
13926
+ update: {
13927
+ method: "PUT",
13928
+ path: "/api/zero/billing/auto-recharge",
13929
+ headers: authHeadersSchema,
13930
+ body: autoRechargeUpdateRequestSchema,
13931
+ responses: {
13932
+ 200: autoRechargeSchema,
13933
+ 400: apiErrorSchema,
13934
+ 401: apiErrorSchema,
13935
+ 403: apiErrorSchema,
13936
+ 500: apiErrorSchema
13937
+ },
13938
+ summary: "Update auto-recharge configuration"
13939
+ }
13940
+ });
13941
+
13942
+ // ../../packages/core/src/contracts/zero-usage.ts
13943
+ import { z as z41 } from "zod";
13944
+ 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()
13958
+ }).nullable(),
13959
+ members: z41.array(memberUsageSchema)
13960
+ });
13961
+ var zeroUsageMembersContract = c41.router({
13962
+ get: {
13963
+ method: "GET",
13964
+ path: "/api/zero/usage/members",
13965
+ headers: authHeadersSchema,
13966
+ responses: {
13967
+ 200: usageMembersResponseSchema,
13968
+ 401: apiErrorSchema,
13969
+ 500: apiErrorSchema
13970
+ },
13971
+ summary: "Get per-member usage for current billing period"
13972
+ }
13973
+ });
13974
+
13527
13975
  // ../../packages/core/src/storage-names.ts
13528
13976
  function getInstructionsStorageName(agentName) {
13529
13977
  return `agent-instructions@${agentName}`;
@@ -14163,7 +14611,7 @@ function getConfigPath() {
14163
14611
  return join2(homedir2(), ".vm0", "config.json");
14164
14612
  }
14165
14613
  var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
14166
- console.log(chalk4.bold(`VM0 CLI v${"9.75.0"}`));
14614
+ console.log(chalk4.bold(`VM0 CLI v${"9.75.1"}`));
14167
14615
  console.log();
14168
14616
  const config = await loadConfig();
14169
14617
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -14923,8 +15371,8 @@ async function resolveSkills(skillUrls) {
14923
15371
  }
14924
15372
 
14925
15373
  // src/lib/domain/yaml-validator.ts
14926
- import { z as z40 } from "zod";
14927
- var cliAgentNameSchema = z40.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
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(
14928
15376
  /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?$/,
14929
15377
  "Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens"
14930
15378
  );
@@ -14938,7 +15386,7 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
14938
15386
  resolveSkillRef(skillRef);
14939
15387
  } catch (error) {
14940
15388
  ctx.addIssue({
14941
- code: z40.ZodIssueCode.custom,
15389
+ code: z42.ZodIssueCode.custom,
14942
15390
  message: error instanceof Error ? error.message : `Invalid skill reference: ${skillRef}`,
14943
15391
  path: ["skills", i]
14944
15392
  });
@@ -14948,15 +15396,15 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
14948
15396
  }
14949
15397
  }
14950
15398
  );
14951
- var cliComposeSchema = z40.object({
14952
- version: z40.string().min(1, "Missing config.version"),
14953
- agents: z40.record(cliAgentNameSchema, cliAgentDefinitionSchema),
14954
- volumes: z40.record(z40.string(), volumeConfigSchema).optional()
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()
14955
15403
  }).superRefine((config, ctx) => {
14956
15404
  const agentKeys = Object.keys(config.agents);
14957
15405
  if (agentKeys.length === 0) {
14958
15406
  ctx.addIssue({
14959
- code: z40.ZodIssueCode.custom,
15407
+ code: z42.ZodIssueCode.custom,
14960
15408
  message: "agents must have at least one agent defined",
14961
15409
  path: ["agents"]
14962
15410
  });
@@ -14964,7 +15412,7 @@ var cliComposeSchema = z40.object({
14964
15412
  }
14965
15413
  if (agentKeys.length > 1) {
14966
15414
  ctx.addIssue({
14967
- code: z40.ZodIssueCode.custom,
15415
+ code: z42.ZodIssueCode.custom,
14968
15416
  message: "Multiple agents not supported yet. Only one agent allowed.",
14969
15417
  path: ["agents"]
14970
15418
  });
@@ -14976,7 +15424,7 @@ var cliComposeSchema = z40.object({
14976
15424
  if (agentVolumes && agentVolumes.length > 0) {
14977
15425
  if (!config.volumes) {
14978
15426
  ctx.addIssue({
14979
- code: z40.ZodIssueCode.custom,
15427
+ code: z42.ZodIssueCode.custom,
14980
15428
  message: "Agent references volumes but no volumes section defined. Each volume must have explicit name and version.",
14981
15429
  path: ["volumes"]
14982
15430
  });
@@ -14986,7 +15434,7 @@ var cliComposeSchema = z40.object({
14986
15434
  const parts = volDeclaration.split(":");
14987
15435
  if (parts.length !== 2) {
14988
15436
  ctx.addIssue({
14989
- code: z40.ZodIssueCode.custom,
15437
+ code: z42.ZodIssueCode.custom,
14990
15438
  message: `Invalid volume declaration: ${volDeclaration}. Expected format: volume-key:/mount/path`,
14991
15439
  path: ["agents", agentName, "volumes"]
14992
15440
  });
@@ -14995,7 +15443,7 @@ var cliComposeSchema = z40.object({
14995
15443
  const volumeKey = parts[0].trim();
14996
15444
  if (!config.volumes[volumeKey]) {
14997
15445
  ctx.addIssue({
14998
- code: z40.ZodIssueCode.custom,
15446
+ code: z42.ZodIssueCode.custom,
14999
15447
  message: `Volume "${volumeKey}" is not defined in volumes section. Each volume must have explicit name and version.`,
15000
15448
  path: ["volumes", volumeKey]
15001
15449
  });
@@ -16194,7 +16642,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
16194
16642
  options.autoUpdate = false;
16195
16643
  }
16196
16644
  if (options.autoUpdate !== false) {
16197
- await startSilentUpgrade("9.75.0");
16645
+ await startSilentUpgrade("9.75.1");
16198
16646
  }
16199
16647
  try {
16200
16648
  let result;
@@ -17029,7 +17477,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
17029
17477
  withErrorHandler(
17030
17478
  async (identifier, prompt, options) => {
17031
17479
  if (options.autoUpdate !== false) {
17032
- await startSilentUpgrade("9.75.0");
17480
+ await startSilentUpgrade("9.75.1");
17033
17481
  }
17034
17482
  const { org, name, version } = parseIdentifier(identifier);
17035
17483
  let composeId;
@@ -18785,7 +19233,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
18785
19233
  withErrorHandler(
18786
19234
  async (prompt, options) => {
18787
19235
  if (options.autoUpdate !== false) {
18788
- const shouldExit = await checkAndUpgrade("9.75.0", prompt);
19236
+ const shouldExit = await checkAndUpgrade("9.75.1", prompt);
18789
19237
  if (shouldExit) {
18790
19238
  process.exit(0);
18791
19239
  }
@@ -21147,7 +21595,7 @@ var listCommand9 = new Command65().name("list").alias("ls").description("List al
21147
21595
  );
21148
21596
  return;
21149
21597
  }
21150
- const nameWidth = Math.max(4, ...data.composes.map((c39) => c39.name.length));
21598
+ const nameWidth = Math.max(4, ...data.composes.map((c42) => c42.name.length));
21151
21599
  const header = ["NAME".padEnd(nameWidth), "VERSION", "UPDATED"].join(
21152
21600
  " "
21153
21601
  );
@@ -21745,7 +22193,7 @@ async function gatherFrequency(optionFrequency, existingFrequency) {
21745
22193
  if (!isInteractive()) {
21746
22194
  throw new Error("--frequency is required (daily|weekly|monthly|once|loop)");
21747
22195
  }
21748
- const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c39) => c39.value === existingFrequency) : 0;
22196
+ const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c42) => c42.value === existingFrequency) : 0;
21749
22197
  frequency = await promptSelect(
21750
22198
  "Schedule frequency",
21751
22199
  FREQUENCY_CHOICES,
@@ -21770,7 +22218,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
21770
22218
  throw new Error("--day is required for weekly/monthly");
21771
22219
  }
21772
22220
  if (frequency === "weekly") {
21773
- const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c39) => c39.value === existingDay) : 0;
22221
+ const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c42) => c42.value === existingDay) : 0;
21774
22222
  const day2 = await promptSelect(
21775
22223
  "Day of week",
21776
22224
  DAY_OF_WEEK_CHOICES,
@@ -23071,7 +23519,7 @@ import chalk75 from "chalk";
23071
23519
  var listCommand13 = new Command85().name("list").alias("ls").description("List all connectors and their status").action(
23072
23520
  withErrorHandler(async () => {
23073
23521
  const result = await listConnectors();
23074
- const connectedMap = new Map(result.connectors.map((c39) => [c39.type, c39]));
23522
+ const connectedMap = new Map(result.connectors.map((c42) => [c42.type, c42]));
23075
23523
  const allTypesRaw = Object.keys(CONNECTOR_TYPES);
23076
23524
  const allTypes = [];
23077
23525
  for (const type2 of allTypesRaw) {
@@ -23338,13 +23786,13 @@ var upgradeCommand = new Command90().name("upgrade").description("Upgrade vm0 CL
23338
23786
  if (latestVersion === null) {
23339
23787
  throw new Error("Could not check for updates. Please try again later.");
23340
23788
  }
23341
- if (latestVersion === "9.75.0") {
23342
- console.log(chalk79.green(`\u2713 Already up to date (${"9.75.0"})`));
23789
+ if (latestVersion === "9.75.1") {
23790
+ console.log(chalk79.green(`\u2713 Already up to date (${"9.75.1"})`));
23343
23791
  return;
23344
23792
  }
23345
23793
  console.log(
23346
23794
  chalk79.yellow(
23347
- `Current version: ${"9.75.0"} -> Latest version: ${latestVersion}`
23795
+ `Current version: ${"9.75.1"} -> Latest version: ${latestVersion}`
23348
23796
  )
23349
23797
  );
23350
23798
  console.log();
@@ -23371,7 +23819,7 @@ var upgradeCommand = new Command90().name("upgrade").description("Upgrade vm0 CL
23371
23819
  const success = await performUpgrade(packageManager);
23372
23820
  if (success) {
23373
23821
  console.log(
23374
- chalk79.green(`\u2713 Upgraded from ${"9.75.0"} to ${latestVersion}`)
23822
+ chalk79.green(`\u2713 Upgraded from ${"9.75.1"} to ${latestVersion}`)
23375
23823
  );
23376
23824
  return;
23377
23825
  }
@@ -23451,7 +23899,7 @@ var zeroCommand = new Command92("zero").description(
23451
23899
 
23452
23900
  // src/index.ts
23453
23901
  var program = new Command93();
23454
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.75.0");
23902
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.75.1");
23455
23903
  program.addCommand(authCommand);
23456
23904
  program.addCommand(infoCommand);
23457
23905
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.75.0",
3
+ "version": "9.75.1",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",