@vm0/cli 9.75.0 → 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 +603 -75
  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.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.0",
69
+ version: "9.75.2",
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
 
@@ -12800,6 +13091,16 @@ var zeroAgentsMainContract = c27.router({
12800
13091
  422: apiErrorSchema
12801
13092
  },
12802
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"
12803
13104
  }
12804
13105
  });
12805
13106
  var zeroAgentsByNameContract = c27.router({
@@ -12829,6 +13130,19 @@ var zeroAgentsByNameContract = c27.router({
12829
13130
  422: apiErrorSchema
12830
13131
  },
12831
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"
12832
13146
  }
12833
13147
  });
12834
13148
  var zeroAgentInstructionsContract = c27.router({
@@ -12992,9 +13306,25 @@ var zeroOrgDeleteContract = c29.router({
12992
13306
  }
12993
13307
  });
12994
13308
 
12995
- // ../../packages/core/src/contracts/zero-org-members.ts
13309
+ // ../../packages/core/src/contracts/zero-org-list.ts
12996
13310
  var c30 = initContract();
12997
- var zeroOrgMembersContract = c30.router({
13311
+ var zeroOrgListContract = c30.router({
13312
+ list: {
13313
+ method: "GET",
13314
+ path: "/api/zero/org/list",
13315
+ headers: authHeadersSchema,
13316
+ responses: {
13317
+ 200: orgListResponseSchema,
13318
+ 401: apiErrorSchema,
13319
+ 500: apiErrorSchema
13320
+ },
13321
+ summary: "List all accessible orgs for the authenticated user"
13322
+ }
13323
+ });
13324
+
13325
+ // ../../packages/core/src/contracts/zero-org-members.ts
13326
+ var c31 = initContract();
13327
+ var zeroOrgMembersContract = c31.router({
12998
13328
  members: {
12999
13329
  method: "GET",
13000
13330
  path: "/api/zero/org/members",
@@ -13038,7 +13368,7 @@ var zeroOrgMembersContract = c30.router({
13038
13368
  summary: "Remove a member from the org (zero proxy)"
13039
13369
  }
13040
13370
  });
13041
- var zeroOrgInviteContract = c30.router({
13371
+ var zeroOrgInviteContract = c31.router({
13042
13372
  invite: {
13043
13373
  method: "POST",
13044
13374
  path: "/api/zero/org/invite",
@@ -13057,8 +13387,8 @@ var zeroOrgInviteContract = c30.router({
13057
13387
 
13058
13388
  // ../../packages/core/src/contracts/zero-composes.ts
13059
13389
  import { z as z34 } from "zod";
13060
- var c31 = initContract();
13061
- var zeroComposesMainContract = c31.router({
13390
+ var c32 = initContract();
13391
+ var zeroComposesMainContract = c32.router({
13062
13392
  getByName: {
13063
13393
  method: "GET",
13064
13394
  path: "/api/zero/composes",
@@ -13076,7 +13406,7 @@ var zeroComposesMainContract = c31.router({
13076
13406
  summary: "Get agent compose by name (zero proxy)"
13077
13407
  }
13078
13408
  });
13079
- var zeroComposesByIdContract = c31.router({
13409
+ var zeroComposesByIdContract = c32.router({
13080
13410
  getById: {
13081
13411
  method: "GET",
13082
13412
  path: "/api/zero/composes/:id",
@@ -13099,9 +13429,9 @@ var zeroComposesByIdContract = c31.router({
13099
13429
  pathParams: z34.object({
13100
13430
  id: z34.string().uuid("Compose ID is required")
13101
13431
  }),
13102
- body: c31.noBody(),
13432
+ body: c32.noBody(),
13103
13433
  responses: {
13104
- 204: c31.noBody(),
13434
+ 204: c32.noBody(),
13105
13435
  401: apiErrorSchema,
13106
13436
  403: apiErrorSchema,
13107
13437
  404: apiErrorSchema,
@@ -13110,7 +13440,7 @@ var zeroComposesByIdContract = c31.router({
13110
13440
  summary: "Delete agent compose (zero proxy)"
13111
13441
  }
13112
13442
  });
13113
- var zeroComposesListContract = c31.router({
13443
+ var zeroComposesListContract = c32.router({
13114
13444
  list: {
13115
13445
  method: "GET",
13116
13446
  path: "/api/zero/composes/list",
@@ -13142,8 +13472,8 @@ var zeroRunRequestSchema = unifiedRunRequestSchema.omit({
13142
13472
  vars: true,
13143
13473
  secrets: true
13144
13474
  });
13145
- var c32 = initContract();
13146
- var zeroRunsMainContract = c32.router({
13475
+ var c33 = initContract();
13476
+ var zeroRunsMainContract = c33.router({
13147
13477
  create: {
13148
13478
  method: "POST",
13149
13479
  path: "/api/zero/runs",
@@ -13159,7 +13489,7 @@ var zeroRunsMainContract = c32.router({
13159
13489
  summary: "Create and execute agent run (zero proxy)"
13160
13490
  }
13161
13491
  });
13162
- var zeroRunsByIdContract = c32.router({
13492
+ var zeroRunsByIdContract = c33.router({
13163
13493
  getById: {
13164
13494
  method: "GET",
13165
13495
  path: "/api/zero/runs/:id",
@@ -13176,7 +13506,7 @@ var zeroRunsByIdContract = c32.router({
13176
13506
  summary: "Get agent run by ID (zero proxy)"
13177
13507
  }
13178
13508
  });
13179
- var zeroRunsCancelContract = c32.router({
13509
+ var zeroRunsCancelContract = c33.router({
13180
13510
  cancel: {
13181
13511
  method: "POST",
13182
13512
  path: "/api/zero/runs/:id/cancel",
@@ -13195,7 +13525,7 @@ var zeroRunsCancelContract = c32.router({
13195
13525
  summary: "Cancel a pending or running run (zero proxy)"
13196
13526
  }
13197
13527
  });
13198
- var zeroRunsQueueContract = c32.router({
13528
+ var zeroRunsQueueContract = c33.router({
13199
13529
  getQueue: {
13200
13530
  method: "GET",
13201
13531
  path: "/api/zero/runs/queue",
@@ -13208,7 +13538,7 @@ var zeroRunsQueueContract = c32.router({
13208
13538
  summary: "Get org run queue status (zero proxy)"
13209
13539
  }
13210
13540
  });
13211
- var zeroRunAgentEventsContract = c32.router({
13541
+ var zeroRunAgentEventsContract = c33.router({
13212
13542
  getAgentEvents: {
13213
13543
  method: "GET",
13214
13544
  path: "/api/zero/runs/:id/telemetry/agent",
@@ -13232,8 +13562,8 @@ var zeroRunAgentEventsContract = c32.router({
13232
13562
 
13233
13563
  // ../../packages/core/src/contracts/zero-schedules.ts
13234
13564
  import { z as z36 } from "zod";
13235
- var c33 = initContract();
13236
- var zeroSchedulesMainContract = c33.router({
13565
+ var c34 = initContract();
13566
+ var zeroSchedulesMainContract = c34.router({
13237
13567
  deploy: {
13238
13568
  method: "POST",
13239
13569
  path: "/api/zero/schedules",
@@ -13261,7 +13591,7 @@ var zeroSchedulesMainContract = c33.router({
13261
13591
  summary: "List all schedules (zero proxy)"
13262
13592
  }
13263
13593
  });
13264
- var zeroSchedulesByNameContract = c33.router({
13594
+ var zeroSchedulesByNameContract = c34.router({
13265
13595
  delete: {
13266
13596
  method: "DELETE",
13267
13597
  path: "/api/zero/schedules/:name",
@@ -13273,7 +13603,7 @@ var zeroSchedulesByNameContract = c33.router({
13273
13603
  composeId: z36.string().uuid("Compose ID required")
13274
13604
  }),
13275
13605
  responses: {
13276
- 204: c33.noBody(),
13606
+ 204: c34.noBody(),
13277
13607
  401: apiErrorSchema,
13278
13608
  403: apiErrorSchema,
13279
13609
  404: apiErrorSchema
@@ -13281,7 +13611,7 @@ var zeroSchedulesByNameContract = c33.router({
13281
13611
  summary: "Delete schedule (zero proxy)"
13282
13612
  }
13283
13613
  });
13284
- var zeroSchedulesEnableContract = c33.router({
13614
+ var zeroSchedulesEnableContract = c34.router({
13285
13615
  enable: {
13286
13616
  method: "POST",
13287
13617
  path: "/api/zero/schedules/:name/enable",
@@ -13324,8 +13654,8 @@ var zeroSchedulesEnableContract = c33.router({
13324
13654
 
13325
13655
  // ../../packages/core/src/contracts/zero-model-providers.ts
13326
13656
  import { z as z37 } from "zod";
13327
- var c34 = initContract();
13328
- var zeroModelProvidersMainContract = c34.router({
13657
+ var c35 = initContract();
13658
+ var zeroModelProvidersMainContract = c35.router({
13329
13659
  list: {
13330
13660
  method: "GET",
13331
13661
  path: "/api/zero/model-providers",
@@ -13353,7 +13683,7 @@ var zeroModelProvidersMainContract = c34.router({
13353
13683
  summary: "Create or update an org-level model provider (admin only)"
13354
13684
  }
13355
13685
  });
13356
- var zeroModelProvidersByTypeContract = c34.router({
13686
+ var zeroModelProvidersByTypeContract = c35.router({
13357
13687
  delete: {
13358
13688
  method: "DELETE",
13359
13689
  path: "/api/zero/model-providers/:type",
@@ -13362,7 +13692,7 @@ var zeroModelProvidersByTypeContract = c34.router({
13362
13692
  type: modelProviderTypeSchema
13363
13693
  }),
13364
13694
  responses: {
13365
- 204: c34.noBody(),
13695
+ 204: c35.noBody(),
13366
13696
  401: apiErrorSchema,
13367
13697
  403: apiErrorSchema,
13368
13698
  404: apiErrorSchema,
@@ -13371,7 +13701,7 @@ var zeroModelProvidersByTypeContract = c34.router({
13371
13701
  summary: "Delete an org-level model provider (admin only)"
13372
13702
  }
13373
13703
  });
13374
- var zeroModelProvidersDefaultContract = c34.router({
13704
+ var zeroModelProvidersDefaultContract = c35.router({
13375
13705
  setDefault: {
13376
13706
  method: "POST",
13377
13707
  path: "/api/zero/model-providers/:type/default",
@@ -13390,7 +13720,7 @@ var zeroModelProvidersDefaultContract = c34.router({
13390
13720
  summary: "Set org-level model provider as default (admin only)"
13391
13721
  }
13392
13722
  });
13393
- var zeroModelProvidersUpdateModelContract = c34.router({
13723
+ var zeroModelProvidersUpdateModelContract = c35.router({
13394
13724
  updateModel: {
13395
13725
  method: "PATCH",
13396
13726
  path: "/api/zero/model-providers/:type/model",
@@ -13411,8 +13741,8 @@ var zeroModelProvidersUpdateModelContract = c34.router({
13411
13741
  });
13412
13742
 
13413
13743
  // ../../packages/core/src/contracts/zero-user-preferences.ts
13414
- var c35 = initContract();
13415
- var zeroUserPreferencesContract = c35.router({
13744
+ var c36 = initContract();
13745
+ var zeroUserPreferencesContract = c36.router({
13416
13746
  get: {
13417
13747
  method: "GET",
13418
13748
  path: "/api/zero/user-preferences",
@@ -13440,8 +13770,20 @@ var zeroUserPreferencesContract = c35.router({
13440
13770
  });
13441
13771
 
13442
13772
  // ../../packages/core/src/contracts/zero-secrets.ts
13443
- var c36 = initContract();
13444
- var zeroSecretsContract = c36.router({
13773
+ import { z as z38 } from "zod";
13774
+ var c37 = initContract();
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
+ },
13445
13787
  set: {
13446
13788
  method: "POST",
13447
13789
  path: "/api/zero/secrets",
@@ -13457,7 +13799,35 @@ var zeroSecretsContract = c36.router({
13457
13799
  summary: "Create or update a secret"
13458
13800
  }
13459
13801
  });
13460
- var zeroVariablesContract = c36.router({
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
+ });
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
+ },
13461
13831
  set: {
13462
13832
  method: "POST",
13463
13833
  path: "/api/zero/variables",
@@ -13473,17 +13843,34 @@ var zeroVariablesContract = c36.router({
13473
13843
  summary: "Create or update a variable"
13474
13844
  }
13475
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
+ });
13476
13863
 
13477
13864
  // ../../packages/core/src/contracts/zero-sessions.ts
13478
- import { z as z38 } from "zod";
13479
- var c37 = initContract();
13480
- var zeroSessionsByIdContract = c37.router({
13865
+ import { z as z39 } from "zod";
13866
+ var c38 = initContract();
13867
+ var zeroSessionsByIdContract = c38.router({
13481
13868
  getById: {
13482
13869
  method: "GET",
13483
13870
  path: "/api/zero/sessions/:id",
13484
13871
  headers: authHeadersSchema,
13485
- pathParams: z38.object({
13486
- id: z38.string().min(1, "Session ID is required")
13872
+ pathParams: z39.object({
13873
+ id: z39.string().min(1, "Session ID is required")
13487
13874
  }),
13488
13875
  responses: {
13489
13876
  200: sessionResponseSchema,
@@ -13496,24 +13883,24 @@ var zeroSessionsByIdContract = c37.router({
13496
13883
  });
13497
13884
 
13498
13885
  // ../../packages/core/src/contracts/integrations.ts
13499
- import { z as z39 } from "zod";
13500
- var c38 = initContract();
13501
- var integrationsSlackMessageContract = c38.router({
13886
+ import { z as z40 } from "zod";
13887
+ var c39 = initContract();
13888
+ var integrationsSlackMessageContract = c39.router({
13502
13889
  sendMessage: {
13503
13890
  method: "POST",
13504
13891
  path: "/api/agent/integrations/slack/message",
13505
13892
  headers: authHeadersSchema,
13506
- body: z39.object({
13507
- channel: z39.string().min(1, "Channel ID is required"),
13508
- text: z39.string().optional(),
13509
- threadTs: z39.string().optional(),
13510
- 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()
13511
13898
  }),
13512
13899
  responses: {
13513
- 200: z39.object({
13514
- ok: z39.literal(true),
13515
- ts: z39.string().optional(),
13516
- channel: z39.string().optional()
13900
+ 200: z40.object({
13901
+ ok: z40.literal(true),
13902
+ ts: z40.string().optional(),
13903
+ channel: z40.string().optional()
13517
13904
  }),
13518
13905
  400: apiErrorSchema,
13519
13906
  401: apiErrorSchema,
@@ -13524,6 +13911,147 @@ var integrationsSlackMessageContract = c38.router({
13524
13911
  }
13525
13912
  });
13526
13913
 
13914
+ // ../../packages/core/src/contracts/zero-billing.ts
13915
+ import { z as z41 } from "zod";
13916
+ var c40 = initContract();
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(),
13928
+ autoRecharge: autoRechargeSchema
13929
+ });
13930
+ var checkoutResponseSchema = z41.object({
13931
+ url: z41.string()
13932
+ });
13933
+ var portalResponseSchema = z41.object({
13934
+ url: z41.string()
13935
+ });
13936
+ var checkoutRequestSchema = z41.object({
13937
+ tier: z41.enum(["pro", "team"]),
13938
+ successUrl: z41.string().url(),
13939
+ cancelUrl: z41.string().url()
13940
+ });
13941
+ var portalRequestSchema = z41.object({
13942
+ returnUrl: z41.string().min(1)
13943
+ });
13944
+ var autoRechargeUpdateRequestSchema = z41.object({
13945
+ enabled: z41.boolean(),
13946
+ threshold: z41.number().int().positive().optional(),
13947
+ amount: z41.number().int().min(1e3).optional()
13948
+ });
13949
+ var zeroBillingStatusContract = c40.router({
13950
+ get: {
13951
+ method: "GET",
13952
+ path: "/api/zero/billing/status",
13953
+ headers: authHeadersSchema,
13954
+ responses: {
13955
+ 200: billingStatusResponseSchema,
13956
+ 401: apiErrorSchema,
13957
+ 500: apiErrorSchema
13958
+ },
13959
+ summary: "Get billing status for current org"
13960
+ }
13961
+ });
13962
+ var zeroBillingCheckoutContract = c40.router({
13963
+ create: {
13964
+ method: "POST",
13965
+ path: "/api/zero/billing/checkout",
13966
+ headers: authHeadersSchema,
13967
+ body: checkoutRequestSchema,
13968
+ responses: {
13969
+ 200: checkoutResponseSchema,
13970
+ 400: apiErrorSchema,
13971
+ 401: apiErrorSchema,
13972
+ 500: apiErrorSchema,
13973
+ 503: apiErrorSchema
13974
+ },
13975
+ summary: "Create Stripe checkout session"
13976
+ }
13977
+ });
13978
+ var zeroBillingPortalContract = c40.router({
13979
+ create: {
13980
+ method: "POST",
13981
+ path: "/api/zero/billing/portal",
13982
+ headers: authHeadersSchema,
13983
+ body: portalRequestSchema,
13984
+ responses: {
13985
+ 200: portalResponseSchema,
13986
+ 400: apiErrorSchema,
13987
+ 401: apiErrorSchema,
13988
+ 500: apiErrorSchema,
13989
+ 503: apiErrorSchema
13990
+ },
13991
+ summary: "Create Stripe billing portal session"
13992
+ }
13993
+ });
13994
+ var zeroBillingAutoRechargeContract = c40.router({
13995
+ get: {
13996
+ method: "GET",
13997
+ path: "/api/zero/billing/auto-recharge",
13998
+ headers: authHeadersSchema,
13999
+ responses: {
14000
+ 200: autoRechargeSchema,
14001
+ 401: apiErrorSchema,
14002
+ 500: apiErrorSchema
14003
+ },
14004
+ summary: "Get auto-recharge configuration"
14005
+ },
14006
+ update: {
14007
+ method: "PUT",
14008
+ path: "/api/zero/billing/auto-recharge",
14009
+ headers: authHeadersSchema,
14010
+ body: autoRechargeUpdateRequestSchema,
14011
+ responses: {
14012
+ 200: autoRechargeSchema,
14013
+ 400: apiErrorSchema,
14014
+ 401: apiErrorSchema,
14015
+ 403: apiErrorSchema,
14016
+ 500: apiErrorSchema
14017
+ },
14018
+ summary: "Update auto-recharge configuration"
14019
+ }
14020
+ });
14021
+
14022
+ // ../../packages/core/src/contracts/zero-usage.ts
14023
+ import { z as z42 } from "zod";
14024
+ var c41 = initContract();
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()
14038
+ }).nullable(),
14039
+ members: z42.array(memberUsageSchema)
14040
+ });
14041
+ var zeroUsageMembersContract = c41.router({
14042
+ get: {
14043
+ method: "GET",
14044
+ path: "/api/zero/usage/members",
14045
+ headers: authHeadersSchema,
14046
+ responses: {
14047
+ 200: usageMembersResponseSchema,
14048
+ 401: apiErrorSchema,
14049
+ 500: apiErrorSchema
14050
+ },
14051
+ summary: "Get per-member usage for current billing period"
14052
+ }
14053
+ });
14054
+
13527
14055
  // ../../packages/core/src/storage-names.ts
13528
14056
  function getInstructionsStorageName(agentName) {
13529
14057
  return `agent-instructions@${agentName}`;
@@ -14163,7 +14691,7 @@ function getConfigPath() {
14163
14691
  return join2(homedir2(), ".vm0", "config.json");
14164
14692
  }
14165
14693
  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"}`));
14694
+ console.log(chalk4.bold(`VM0 CLI v${"9.75.2"}`));
14167
14695
  console.log();
14168
14696
  const config = await loadConfig();
14169
14697
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -14923,8 +15451,8 @@ async function resolveSkills(skillUrls) {
14923
15451
  }
14924
15452
 
14925
15453
  // 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(
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(
14928
15456
  /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?$/,
14929
15457
  "Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens"
14930
15458
  );
@@ -14938,7 +15466,7 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
14938
15466
  resolveSkillRef(skillRef);
14939
15467
  } catch (error) {
14940
15468
  ctx.addIssue({
14941
- code: z40.ZodIssueCode.custom,
15469
+ code: z43.ZodIssueCode.custom,
14942
15470
  message: error instanceof Error ? error.message : `Invalid skill reference: ${skillRef}`,
14943
15471
  path: ["skills", i]
14944
15472
  });
@@ -14948,15 +15476,15 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
14948
15476
  }
14949
15477
  }
14950
15478
  );
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()
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()
14955
15483
  }).superRefine((config, ctx) => {
14956
15484
  const agentKeys = Object.keys(config.agents);
14957
15485
  if (agentKeys.length === 0) {
14958
15486
  ctx.addIssue({
14959
- code: z40.ZodIssueCode.custom,
15487
+ code: z43.ZodIssueCode.custom,
14960
15488
  message: "agents must have at least one agent defined",
14961
15489
  path: ["agents"]
14962
15490
  });
@@ -14964,7 +15492,7 @@ var cliComposeSchema = z40.object({
14964
15492
  }
14965
15493
  if (agentKeys.length > 1) {
14966
15494
  ctx.addIssue({
14967
- code: z40.ZodIssueCode.custom,
15495
+ code: z43.ZodIssueCode.custom,
14968
15496
  message: "Multiple agents not supported yet. Only one agent allowed.",
14969
15497
  path: ["agents"]
14970
15498
  });
@@ -14976,7 +15504,7 @@ var cliComposeSchema = z40.object({
14976
15504
  if (agentVolumes && agentVolumes.length > 0) {
14977
15505
  if (!config.volumes) {
14978
15506
  ctx.addIssue({
14979
- code: z40.ZodIssueCode.custom,
15507
+ code: z43.ZodIssueCode.custom,
14980
15508
  message: "Agent references volumes but no volumes section defined. Each volume must have explicit name and version.",
14981
15509
  path: ["volumes"]
14982
15510
  });
@@ -14986,7 +15514,7 @@ var cliComposeSchema = z40.object({
14986
15514
  const parts = volDeclaration.split(":");
14987
15515
  if (parts.length !== 2) {
14988
15516
  ctx.addIssue({
14989
- code: z40.ZodIssueCode.custom,
15517
+ code: z43.ZodIssueCode.custom,
14990
15518
  message: `Invalid volume declaration: ${volDeclaration}. Expected format: volume-key:/mount/path`,
14991
15519
  path: ["agents", agentName, "volumes"]
14992
15520
  });
@@ -14995,7 +15523,7 @@ var cliComposeSchema = z40.object({
14995
15523
  const volumeKey = parts[0].trim();
14996
15524
  if (!config.volumes[volumeKey]) {
14997
15525
  ctx.addIssue({
14998
- code: z40.ZodIssueCode.custom,
15526
+ code: z43.ZodIssueCode.custom,
14999
15527
  message: `Volume "${volumeKey}" is not defined in volumes section. Each volume must have explicit name and version.`,
15000
15528
  path: ["volumes", volumeKey]
15001
15529
  });
@@ -16194,7 +16722,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
16194
16722
  options.autoUpdate = false;
16195
16723
  }
16196
16724
  if (options.autoUpdate !== false) {
16197
- await startSilentUpgrade("9.75.0");
16725
+ await startSilentUpgrade("9.75.2");
16198
16726
  }
16199
16727
  try {
16200
16728
  let result;
@@ -17029,7 +17557,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
17029
17557
  withErrorHandler(
17030
17558
  async (identifier, prompt, options) => {
17031
17559
  if (options.autoUpdate !== false) {
17032
- await startSilentUpgrade("9.75.0");
17560
+ await startSilentUpgrade("9.75.2");
17033
17561
  }
17034
17562
  const { org, name, version } = parseIdentifier(identifier);
17035
17563
  let composeId;
@@ -18785,7 +19313,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
18785
19313
  withErrorHandler(
18786
19314
  async (prompt, options) => {
18787
19315
  if (options.autoUpdate !== false) {
18788
- const shouldExit = await checkAndUpgrade("9.75.0", prompt);
19316
+ const shouldExit = await checkAndUpgrade("9.75.2", prompt);
18789
19317
  if (shouldExit) {
18790
19318
  process.exit(0);
18791
19319
  }
@@ -21147,7 +21675,7 @@ var listCommand9 = new Command65().name("list").alias("ls").description("List al
21147
21675
  );
21148
21676
  return;
21149
21677
  }
21150
- const nameWidth = Math.max(4, ...data.composes.map((c39) => c39.name.length));
21678
+ const nameWidth = Math.max(4, ...data.composes.map((c42) => c42.name.length));
21151
21679
  const header = ["NAME".padEnd(nameWidth), "VERSION", "UPDATED"].join(
21152
21680
  " "
21153
21681
  );
@@ -21745,7 +22273,7 @@ async function gatherFrequency(optionFrequency, existingFrequency) {
21745
22273
  if (!isInteractive()) {
21746
22274
  throw new Error("--frequency is required (daily|weekly|monthly|once|loop)");
21747
22275
  }
21748
- const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c39) => c39.value === existingFrequency) : 0;
22276
+ const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c42) => c42.value === existingFrequency) : 0;
21749
22277
  frequency = await promptSelect(
21750
22278
  "Schedule frequency",
21751
22279
  FREQUENCY_CHOICES,
@@ -21770,7 +22298,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
21770
22298
  throw new Error("--day is required for weekly/monthly");
21771
22299
  }
21772
22300
  if (frequency === "weekly") {
21773
- const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c39) => c39.value === existingDay) : 0;
22301
+ const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c42) => c42.value === existingDay) : 0;
21774
22302
  const day2 = await promptSelect(
21775
22303
  "Day of week",
21776
22304
  DAY_OF_WEEK_CHOICES,
@@ -23071,7 +23599,7 @@ import chalk75 from "chalk";
23071
23599
  var listCommand13 = new Command85().name("list").alias("ls").description("List all connectors and their status").action(
23072
23600
  withErrorHandler(async () => {
23073
23601
  const result = await listConnectors();
23074
- const connectedMap = new Map(result.connectors.map((c39) => [c39.type, c39]));
23602
+ const connectedMap = new Map(result.connectors.map((c42) => [c42.type, c42]));
23075
23603
  const allTypesRaw = Object.keys(CONNECTOR_TYPES);
23076
23604
  const allTypes = [];
23077
23605
  for (const type2 of allTypesRaw) {
@@ -23338,13 +23866,13 @@ var upgradeCommand = new Command90().name("upgrade").description("Upgrade vm0 CL
23338
23866
  if (latestVersion === null) {
23339
23867
  throw new Error("Could not check for updates. Please try again later.");
23340
23868
  }
23341
- if (latestVersion === "9.75.0") {
23342
- console.log(chalk79.green(`\u2713 Already up to date (${"9.75.0"})`));
23869
+ if (latestVersion === "9.75.2") {
23870
+ console.log(chalk79.green(`\u2713 Already up to date (${"9.75.2"})`));
23343
23871
  return;
23344
23872
  }
23345
23873
  console.log(
23346
23874
  chalk79.yellow(
23347
- `Current version: ${"9.75.0"} -> Latest version: ${latestVersion}`
23875
+ `Current version: ${"9.75.2"} -> Latest version: ${latestVersion}`
23348
23876
  )
23349
23877
  );
23350
23878
  console.log();
@@ -23371,7 +23899,7 @@ var upgradeCommand = new Command90().name("upgrade").description("Upgrade vm0 CL
23371
23899
  const success = await performUpgrade(packageManager);
23372
23900
  if (success) {
23373
23901
  console.log(
23374
- chalk79.green(`\u2713 Upgraded from ${"9.75.0"} to ${latestVersion}`)
23902
+ chalk79.green(`\u2713 Upgraded from ${"9.75.2"} to ${latestVersion}`)
23375
23903
  );
23376
23904
  return;
23377
23905
  }
@@ -23451,7 +23979,7 @@ var zeroCommand = new Command92("zero").description(
23451
23979
 
23452
23980
  // src/index.ts
23453
23981
  var program = new Command93();
23454
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.75.0");
23982
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.75.2");
23455
23983
  program.addCommand(authCommand);
23456
23984
  program.addCommand(infoCommand);
23457
23985
  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.2",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",