@vm0/cli 9.157.0 → 9.158.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30012,7 +30012,7 @@ var require_proxy_agent = __commonJS({
30012
30012
  });
30013
30013
  }
30014
30014
  dispatch(opts, handler) {
30015
- const headers = buildHeaders4(opts.headers);
30015
+ const headers = buildHeaders5(opts.headers);
30016
30016
  throwIfProxyAuthIsSent(headers);
30017
30017
  if (headers && !("host" in headers) && !("Host" in headers)) {
30018
30018
  const { host } = new URL3(opts.origin);
@@ -30048,7 +30048,7 @@ var require_proxy_agent = __commonJS({
30048
30048
  await this[kClient].destroy();
30049
30049
  }
30050
30050
  };
30051
- function buildHeaders4(headers) {
30051
+ function buildHeaders5(headers) {
30052
30052
  if (Array.isArray(headers)) {
30053
30053
  const headersPair = {};
30054
30054
  for (let i = 0; i < headers.length; i += 2) {
@@ -74083,7 +74083,7 @@ if (DSN) {
74083
74083
  init2({
74084
74084
  dsn: DSN,
74085
74085
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
74086
- release: "9.157.0",
74086
+ release: "9.158.0",
74087
74087
  sendDefaultPii: false,
74088
74088
  tracesSampleRate: 0,
74089
74089
  shutdownTimeout: 500,
@@ -74102,7 +74102,7 @@ if (DSN) {
74102
74102
  }
74103
74103
  });
74104
74104
  setContext("cli", {
74105
- version: "9.157.0",
74105
+ version: "9.158.0",
74106
74106
  command: process.argv.slice(2).join(" ")
74107
74107
  });
74108
74108
  setContext("runtime", {
@@ -74342,7 +74342,8 @@ var FEATURE_SWITCHES = {
74342
74342
  ["pwaOfflineCache" /* PwaOfflineCache */]: {
74343
74343
  maintainer: "ethan@vm0.ai",
74344
74344
  description: "Enable PWA offline caching (static asset cache-first, offline fallback page, and service worker updateViaCache: none)",
74345
- enabled: false
74345
+ enabled: false,
74346
+ enabledOrgIdHashes: STAFF_ORG_ID_HASHES
74346
74347
  },
74347
74348
  ["mailchimpConnector" /* MailchimpConnector */]: {
74348
74349
  maintainer: "ethan@vm0.ai",
@@ -74380,10 +74381,17 @@ var FEATURE_SWITCHES = {
74380
74381
  enabled: false,
74381
74382
  enabledOrgIdHashes: STAFF_ORG_ID_HASHES
74382
74383
  },
74384
+ ["desktopLocalAgent" /* DesktopLocalAgent */]: {
74385
+ maintainer: "lancy@vm0.ai",
74386
+ description: "Enable the Desktop-owned Local Agent page, folder selection, and native host lifecycle",
74387
+ enabled: false,
74388
+ enabledOrgIdHashes: STAFF_ORG_ID_HASHES
74389
+ },
74383
74390
  ["lab" /* Lab */]: {
74384
74391
  maintainer: "ethan@vm0.ai",
74385
74392
  description: "Show the Lab page for toggling experimental features",
74386
- enabled: false
74393
+ enabled: false,
74394
+ enabledOrgIdHashes: STAFF_ORG_ID_HASHES
74387
74395
  },
74388
74396
  ["auditLink" /* AuditLink */]: {
74389
74397
  maintainer: "ethan@vm0.ai",
@@ -74408,8 +74416,7 @@ var FEATURE_SWITCHES = {
74408
74416
  ["chatHeaderNewButton" /* ChatHeaderNewButton */]: {
74409
74417
  maintainer: "ethan@vm0.ai",
74410
74418
  description: "Replace the Invite people button in the agent chat page header with a New button that creates a new chat thread",
74411
- enabled: false,
74412
- enabledOrgIdHashes: STAFF_ORG_ID_HASHES
74419
+ enabled: false
74413
74420
  },
74414
74421
  ["agentPhoneAppUi" /* AgentPhoneAppUi */]: {
74415
74422
  maintainer: "linghan@vm0.ai",
@@ -74420,8 +74427,7 @@ var FEATURE_SWITCHES = {
74420
74427
  ["chatMessageStartButton" /* ChatMessageStartButton */]: {
74421
74428
  maintainer: "linghan@vm0.ai",
74422
74429
  description: "Show an icon button in assistant message group actions that scrolls back to the start of that message group.",
74423
- enabled: false,
74424
- enabledOrgIdHashes: STAFF_ORG_ID_HASHES
74430
+ enabled: false
74425
74431
  },
74426
74432
  ["goal" /* Goal */]: {
74427
74433
  maintainer: "ethan@vm0.ai",
@@ -74432,8 +74438,7 @@ var FEATURE_SWITCHES = {
74432
74438
  ["chatThreadRename" /* ChatThreadRename */]: {
74433
74439
  maintainer: "ethan@vm0.ai",
74434
74440
  description: "Adds a Rename chat item to the sidebar thread kebab menu. When the user renames a thread, automated title generation is suppressed for that thread.",
74435
- enabled: false,
74436
- enabledOrgIdHashes: STAFF_ORG_ID_HASHES
74441
+ enabled: false
74437
74442
  },
74438
74443
  ["docsSite" /* DocsSite */]: {
74439
74444
  maintainer: "linghan@vm0.ai",
@@ -74475,8 +74480,8 @@ var FEATURE_SWITCHES = {
74475
74480
  },
74476
74481
  ["storedSecretKmsRead" /* StoredSecretKmsRead */]: {
74477
74482
  maintainer: "ethan@vm0.ai",
74478
- description: "Prefer AWS KMS material when reading stored-secret envelopes. Disabled keeps reading the legacy AES branch during rollout. Read path is independent of StoredSecretKmsWrite \u2014 enable read only after dual-write has been on long enough to backfill existing rows.",
74479
- enabled: false
74483
+ description: "Prefer AWS KMS material when reading stored-secret envelopes. Legacy AES remains as a fallback for old or explicitly legacy-only rows.",
74484
+ enabled: true
74480
74485
  },
74481
74486
  ["storedSecretKmsWrite" /* StoredSecretKmsWrite */]: {
74482
74487
  maintainer: "ethan@vm0.ai",
@@ -97460,6 +97465,13 @@ var github = {
97460
97465
  oauth: {
97461
97466
  authorizationUrl: "https://github.com/login/oauth/authorize",
97462
97467
  tokenUrl: "https://github.com/login/oauth/access_token",
97468
+ client: {
97469
+ clientRegistration: "static",
97470
+ clientType: "confidential",
97471
+ tokenEndpointAuthMethod: "client_secret_post",
97472
+ clientIdEnv: "GH_OAUTH_CLIENT_ID",
97473
+ clientSecretEnv: "GH_OAUTH_CLIENT_SECRET"
97474
+ },
97463
97475
  scopes: ["repo", "project", "workflow"]
97464
97476
  }
97465
97477
  }
@@ -97496,6 +97508,13 @@ var gmail = {
97496
97508
  oauth: {
97497
97509
  authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth",
97498
97510
  tokenUrl: "https://oauth2.googleapis.com/token",
97511
+ client: {
97512
+ clientRegistration: "static",
97513
+ clientType: "confidential",
97514
+ tokenEndpointAuthMethod: "client_secret_post",
97515
+ clientIdEnv: "GOOGLE_OAUTH_CLIENT_ID",
97516
+ clientSecretEnv: "GOOGLE_OAUTH_CLIENT_SECRET"
97517
+ },
97499
97518
  scopes: ["https://www.googleapis.com/auth/gmail.modify"]
97500
97519
  }
97501
97520
  }
@@ -97532,6 +97551,13 @@ var notion = {
97532
97551
  oauth: {
97533
97552
  authorizationUrl: "https://api.notion.com/v1/oauth/authorize",
97534
97553
  tokenUrl: "https://api.notion.com/v1/oauth/token",
97554
+ client: {
97555
+ clientRegistration: "static",
97556
+ clientType: "confidential",
97557
+ tokenEndpointAuthMethod: "client_secret_basic",
97558
+ clientIdEnv: "NOTION_OAUTH_CLIENT_ID",
97559
+ clientSecretEnv: "NOTION_OAUTH_CLIENT_SECRET"
97560
+ },
97535
97561
  scopes: []
97536
97562
  }
97537
97563
  }
@@ -97567,6 +97593,13 @@ var x = {
97567
97593
  oauth: {
97568
97594
  authorizationUrl: "https://twitter.com/i/oauth2/authorize",
97569
97595
  tokenUrl: "https://api.twitter.com/2/oauth2/token",
97596
+ client: {
97597
+ clientRegistration: "static",
97598
+ clientType: "confidential",
97599
+ tokenEndpointAuthMethod: "client_secret_basic",
97600
+ clientIdEnv: "X_OAUTH_CLIENT_ID",
97601
+ clientSecretEnv: "X_OAUTH_CLIENT_SECRET"
97602
+ },
97570
97603
  // https://docs.x.com/fundamentals/authentication/oauth-2-0/authorization-code
97571
97604
  scopes: [
97572
97605
  "tweet.read",
@@ -97648,6 +97681,13 @@ var googleDrive = {
97648
97681
  oauth: {
97649
97682
  authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth",
97650
97683
  tokenUrl: "https://oauth2.googleapis.com/token",
97684
+ client: {
97685
+ clientRegistration: "static",
97686
+ clientType: "confidential",
97687
+ tokenEndpointAuthMethod: "client_secret_post",
97688
+ clientIdEnv: "GOOGLE_OAUTH_CLIENT_ID",
97689
+ clientSecretEnv: "GOOGLE_OAUTH_CLIENT_SECRET"
97690
+ },
97651
97691
  scopes: [
97652
97692
  "https://www.googleapis.com/auth/drive",
97653
97693
  "https://www.googleapis.com/auth/userinfo.email"
@@ -97683,6 +97723,13 @@ var slack = {
97683
97723
  oauth: {
97684
97724
  authorizationUrl: "https://slack.com/oauth/v2/authorize",
97685
97725
  tokenUrl: "https://slack.com/api/oauth.v2.access",
97726
+ client: {
97727
+ clientRegistration: "static",
97728
+ clientType: "confidential",
97729
+ tokenEndpointAuthMethod: "client_secret_post",
97730
+ clientIdEnv: "SLACK_CLIENT_ID",
97731
+ clientSecretEnv: "SLACK_CLIENT_SECRET"
97732
+ },
97686
97733
  // Note: Slack does not approve `search:read` or user `*:history`
97687
97734
  // scopes outside of RTS / MCP applications. The personal connector
97688
97735
  // intentionally omits them. Bot-side history access is provided
@@ -97756,6 +97803,13 @@ var googleSheets = {
97756
97803
  oauth: {
97757
97804
  authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth",
97758
97805
  tokenUrl: "https://oauth2.googleapis.com/token",
97806
+ client: {
97807
+ clientRegistration: "static",
97808
+ clientType: "confidential",
97809
+ tokenEndpointAuthMethod: "client_secret_post",
97810
+ clientIdEnv: "GOOGLE_OAUTH_CLIENT_ID",
97811
+ clientSecretEnv: "GOOGLE_OAUTH_CLIENT_SECRET"
97812
+ },
97759
97813
  scopes: [
97760
97814
  "https://www.googleapis.com/auth/spreadsheets",
97761
97815
  "https://www.googleapis.com/auth/userinfo.email"
@@ -97795,6 +97849,13 @@ var googleCalendar = {
97795
97849
  oauth: {
97796
97850
  authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth",
97797
97851
  tokenUrl: "https://oauth2.googleapis.com/token",
97852
+ client: {
97853
+ clientRegistration: "static",
97854
+ clientType: "confidential",
97855
+ tokenEndpointAuthMethod: "client_secret_post",
97856
+ clientIdEnv: "GOOGLE_OAUTH_CLIENT_ID",
97857
+ clientSecretEnv: "GOOGLE_OAUTH_CLIENT_SECRET"
97858
+ },
97798
97859
  scopes: [
97799
97860
  "https://www.googleapis.com/auth/calendar",
97800
97861
  "https://www.googleapis.com/auth/userinfo.email"
@@ -97833,6 +97894,13 @@ var googleDocs = {
97833
97894
  oauth: {
97834
97895
  authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth",
97835
97896
  tokenUrl: "https://oauth2.googleapis.com/token",
97897
+ client: {
97898
+ clientRegistration: "static",
97899
+ clientType: "confidential",
97900
+ tokenEndpointAuthMethod: "client_secret_post",
97901
+ clientIdEnv: "GOOGLE_OAUTH_CLIENT_ID",
97902
+ clientSecretEnv: "GOOGLE_OAUTH_CLIENT_SECRET"
97903
+ },
97836
97904
  scopes: [
97837
97905
  "https://www.googleapis.com/auth/documents",
97838
97906
  "https://www.googleapis.com/auth/userinfo.email"
@@ -97872,6 +97940,13 @@ var linear = {
97872
97940
  oauth: {
97873
97941
  authorizationUrl: "https://linear.app/oauth/authorize",
97874
97942
  tokenUrl: "https://api.linear.app/oauth/token",
97943
+ client: {
97944
+ clientRegistration: "static",
97945
+ clientType: "confidential",
97946
+ tokenEndpointAuthMethod: "client_secret_post",
97947
+ clientIdEnv: "LINEAR_OAUTH_CLIENT_ID",
97948
+ clientSecretEnv: "LINEAR_OAUTH_CLIENT_SECRET"
97949
+ },
97875
97950
  scopes: [
97876
97951
  "read",
97877
97952
  "write",
@@ -97909,6 +97984,13 @@ var intervalsIcu = {
97909
97984
  oauth: {
97910
97985
  authorizationUrl: "https://intervals.icu/oauth/authorize",
97911
97986
  tokenUrl: "https://intervals.icu/api/oauth/token",
97987
+ client: {
97988
+ clientRegistration: "static",
97989
+ clientType: "confidential",
97990
+ tokenEndpointAuthMethod: "client_secret_post",
97991
+ clientIdEnv: "INTERVALS_ICU_OAUTH_CLIENT_ID",
97992
+ clientSecretEnv: "INTERVALS_ICU_OAUTH_CLIENT_SECRET"
97993
+ },
97912
97994
  scopes: ["ACTIVITY", "WELLNESS", "CALENDAR", "SETTINGS", "LIBRARY"]
97913
97995
  }
97914
97996
  }
@@ -97939,6 +98021,13 @@ var vercel = {
97939
98021
  defaultAuthMethod: "oauth",
97940
98022
  oauth: {
97941
98023
  tokenUrl: "https://api.vercel.com/v2/oauth/access_token",
98024
+ client: {
98025
+ clientRegistration: "static",
98026
+ clientType: "confidential",
98027
+ tokenEndpointAuthMethod: "client_secret_post",
98028
+ clientIdEnv: "VERCEL_OAUTH_CLIENT_ID",
98029
+ clientSecretEnv: "VERCEL_OAUTH_CLIENT_SECRET"
98030
+ },
97942
98031
  scopes: []
97943
98032
  }
97944
98033
  }
@@ -97974,6 +98063,13 @@ var strava = {
97974
98063
  oauth: {
97975
98064
  authorizationUrl: "https://www.strava.com/oauth/authorize",
97976
98065
  tokenUrl: "https://www.strava.com/oauth/token",
98066
+ client: {
98067
+ clientRegistration: "static",
98068
+ clientType: "confidential",
98069
+ tokenEndpointAuthMethod: "client_secret_post",
98070
+ clientIdEnv: "STRAVA_OAUTH_CLIENT_ID",
98071
+ clientSecretEnv: "STRAVA_OAUTH_CLIENT_SECRET"
98072
+ },
97977
98073
  scopes: [
97978
98074
  "read",
97979
98075
  "profile:read_all",
@@ -98014,6 +98110,13 @@ var googleMeet = {
98014
98110
  oauth: {
98015
98111
  authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth",
98016
98112
  tokenUrl: "https://oauth2.googleapis.com/token",
98113
+ client: {
98114
+ clientRegistration: "static",
98115
+ clientType: "confidential",
98116
+ tokenEndpointAuthMethod: "client_secret_post",
98117
+ clientIdEnv: "GOOGLE_OAUTH_CLIENT_ID",
98118
+ clientSecretEnv: "GOOGLE_OAUTH_CLIENT_SECRET"
98119
+ },
98017
98120
  scopes: [
98018
98121
  "https://www.googleapis.com/auth/meetings.space.created",
98019
98122
  // Use meetings.space.readonly (not meetings.conferencerecords.readonly) — confirmed
@@ -98057,6 +98160,13 @@ var hubspot = {
98057
98160
  oauth: {
98058
98161
  authorizationUrl: "https://app.hubspot.com/oauth/authorize",
98059
98162
  tokenUrl: "https://api.hubapi.com/oauth/v1/token",
98163
+ client: {
98164
+ clientRegistration: "static",
98165
+ clientType: "confidential",
98166
+ tokenEndpointAuthMethod: "client_secret_post",
98167
+ clientIdEnv: "HUBSPOT_OAUTH_CLIENT_ID",
98168
+ clientSecretEnv: "HUBSPOT_OAUTH_CLIENT_SECRET"
98169
+ },
98060
98170
  scopes: [
98061
98171
  "crm.objects.contacts.read",
98062
98172
  "crm.objects.contacts.write",
@@ -98125,6 +98235,13 @@ var sentry = {
98125
98235
  oauth: {
98126
98236
  authorizationUrl: "https://sentry.io/oauth/authorize/",
98127
98237
  tokenUrl: "https://sentry.io/oauth/token/",
98238
+ client: {
98239
+ clientRegistration: "static",
98240
+ clientType: "confidential",
98241
+ tokenEndpointAuthMethod: "client_secret_post",
98242
+ clientIdEnv: "SENTRY_OAUTH_CLIENT_ID",
98243
+ clientSecretEnv: "SENTRY_OAUTH_CLIENT_SECRET"
98244
+ },
98128
98245
  scopes: [
98129
98246
  "org:read",
98130
98247
  "project:read",
@@ -98163,6 +98280,13 @@ var todoist = {
98163
98280
  oauth: {
98164
98281
  authorizationUrl: "https://todoist.com/oauth/authorize",
98165
98282
  tokenUrl: "https://todoist.com/oauth/access_token",
98283
+ client: {
98284
+ clientRegistration: "static",
98285
+ clientType: "confidential",
98286
+ tokenEndpointAuthMethod: "client_secret_post",
98287
+ clientIdEnv: "TODOIST_OAUTH_CLIENT_ID",
98288
+ clientSecretEnv: "TODOIST_OAUTH_CLIENT_SECRET"
98289
+ },
98166
98290
  scopes: ["data:read_write", "data:delete", "project:delete"]
98167
98291
  }
98168
98292
  }
@@ -98198,6 +98322,13 @@ var xero = {
98198
98322
  oauth: {
98199
98323
  authorizationUrl: "https://login.xero.com/identity/connect/authorize",
98200
98324
  tokenUrl: "https://identity.xero.com/connect/token",
98325
+ client: {
98326
+ clientRegistration: "static",
98327
+ clientType: "confidential",
98328
+ tokenEndpointAuthMethod: "client_secret_post",
98329
+ clientIdEnv: "XERO_OAUTH_CLIENT_ID",
98330
+ clientSecretEnv: "XERO_OAUTH_CLIENT_SECRET"
98331
+ },
98201
98332
  scopes: [
98202
98333
  "openid",
98203
98334
  "profile",
@@ -98256,6 +98387,13 @@ var airtable = {
98256
98387
  oauth: {
98257
98388
  authorizationUrl: "https://airtable.com/oauth2/v1/authorize",
98258
98389
  tokenUrl: "https://airtable.com/oauth2/v1/token",
98390
+ client: {
98391
+ clientRegistration: "static",
98392
+ clientType: "confidential",
98393
+ tokenEndpointAuthMethod: "client_secret_basic",
98394
+ clientIdEnv: "AIRTABLE_OAUTH_CLIENT_ID",
98395
+ clientSecretEnv: "AIRTABLE_OAUTH_CLIENT_SECRET"
98396
+ },
98259
98397
  scopes: [
98260
98398
  "data.records:read",
98261
98399
  "data.records:write",
@@ -98300,6 +98438,13 @@ var docusign = {
98300
98438
  oauth: {
98301
98439
  authorizationUrl: "https://account-d.docusign.com/oauth/auth",
98302
98440
  tokenUrl: "https://account-d.docusign.com/oauth/token",
98441
+ client: {
98442
+ clientRegistration: "static",
98443
+ clientType: "confidential",
98444
+ tokenEndpointAuthMethod: "client_secret_basic",
98445
+ clientIdEnv: "DOCUSIGN_OAUTH_CLIENT_ID",
98446
+ clientSecretEnv: "DOCUSIGN_OAUTH_CLIENT_SECRET"
98447
+ },
98303
98448
  scopes: ["signature", "extended", "openid"]
98304
98449
  }
98305
98450
  }
@@ -98337,6 +98482,13 @@ var googleAds = {
98337
98482
  oauth: {
98338
98483
  authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth",
98339
98484
  tokenUrl: "https://oauth2.googleapis.com/token",
98485
+ client: {
98486
+ clientRegistration: "static",
98487
+ clientType: "confidential",
98488
+ tokenEndpointAuthMethod: "client_secret_post",
98489
+ clientIdEnv: "GOOGLE_OAUTH_CLIENT_ID",
98490
+ clientSecretEnv: "GOOGLE_OAUTH_CLIENT_SECRET"
98491
+ },
98340
98492
  scopes: [
98341
98493
  "https://www.googleapis.com/auth/adwords",
98342
98494
  "https://www.googleapis.com/auth/userinfo.email"
@@ -98410,6 +98562,13 @@ var gumroad = {
98410
98562
  oauth: {
98411
98563
  authorizationUrl: "https://gumroad.com/oauth/authorize",
98412
98564
  tokenUrl: "https://gumroad.com/oauth/token",
98565
+ client: {
98566
+ clientRegistration: "static",
98567
+ clientType: "confidential",
98568
+ tokenEndpointAuthMethod: "client_secret_post",
98569
+ clientIdEnv: "GUMROAD_OAUTH_CLIENT_ID",
98570
+ clientSecretEnv: "GUMROAD_OAUTH_CLIENT_SECRET"
98571
+ },
98413
98572
  scopes: [
98414
98573
  "view_profile",
98415
98574
  "edit_products",
@@ -98452,6 +98611,13 @@ var spotify = {
98452
98611
  oauth: {
98453
98612
  authorizationUrl: "https://accounts.spotify.com/authorize",
98454
98613
  tokenUrl: "https://accounts.spotify.com/api/token",
98614
+ client: {
98615
+ clientRegistration: "static",
98616
+ clientType: "confidential",
98617
+ tokenEndpointAuthMethod: "client_secret_basic",
98618
+ clientIdEnv: "SPOTIFY_OAUTH_CLIENT_ID",
98619
+ clientSecretEnv: "SPOTIFY_OAUTH_CLIENT_SECRET"
98620
+ },
98455
98621
  scopes: [
98456
98622
  "ugc-image-upload",
98457
98623
  "user-read-playback-state",
@@ -98593,6 +98759,13 @@ var ahrefs = {
98593
98759
  oauth: {
98594
98760
  authorizationUrl: "https://app.ahrefs.com/api/auth",
98595
98761
  tokenUrl: "https://app.ahrefs.com/api/token",
98762
+ client: {
98763
+ clientRegistration: "static",
98764
+ clientType: "confidential",
98765
+ tokenEndpointAuthMethod: "client_secret_post",
98766
+ clientIdEnv: "AHREFS_OAUTH_CLIENT_ID",
98767
+ clientSecretEnv: "AHREFS_OAUTH_CLIENT_SECRET"
98768
+ },
98596
98769
  scopes: ["api"]
98597
98770
  }
98598
98771
  }
@@ -98778,6 +98951,13 @@ var asana = {
98778
98951
  oauth: {
98779
98952
  authorizationUrl: "https://app.asana.com/-/oauth_authorize",
98780
98953
  tokenUrl: "https://app.asana.com/-/oauth_token",
98954
+ client: {
98955
+ clientRegistration: "static",
98956
+ clientType: "confidential",
98957
+ tokenEndpointAuthMethod: "client_secret_post",
98958
+ clientIdEnv: "ASANA_OAUTH_CLIENT_ID",
98959
+ clientSecretEnv: "ASANA_OAUTH_CLIENT_SECRET"
98960
+ },
98781
98961
  scopes: []
98782
98962
  }
98783
98963
  }
@@ -99363,6 +99543,13 @@ var canva = {
99363
99543
  oauth: {
99364
99544
  authorizationUrl: "https://www.canva.com/api/oauth/authorize",
99365
99545
  tokenUrl: "https://api.canva.com/rest/v1/oauth/token",
99546
+ client: {
99547
+ clientRegistration: "static",
99548
+ clientType: "confidential",
99549
+ tokenEndpointAuthMethod: "client_secret_basic",
99550
+ clientIdEnv: "CANVA_OAUTH_CLIENT_ID",
99551
+ clientSecretEnv: "CANVA_OAUTH_CLIENT_SECRET"
99552
+ },
99366
99553
  scopes: [
99367
99554
  "asset:read",
99368
99555
  "asset:write",
@@ -99551,6 +99738,13 @@ var close2 = {
99551
99738
  oauth: {
99552
99739
  authorizationUrl: "https://app.close.com/oauth2/authorize/",
99553
99740
  tokenUrl: "https://api.close.com/oauth2/token/",
99741
+ client: {
99742
+ clientRegistration: "static",
99743
+ clientType: "confidential",
99744
+ tokenEndpointAuthMethod: "client_secret_post",
99745
+ clientIdEnv: "CLOSE_OAUTH_CLIENT_ID",
99746
+ clientSecretEnv: "CLOSE_OAUTH_CLIENT_SECRET"
99747
+ },
99554
99748
  scopes: ["all.full_access", "offline_access"]
99555
99749
  }
99556
99750
  }
@@ -99809,6 +100003,13 @@ var deel = {
99809
100003
  oauth: {
99810
100004
  authorizationUrl: "https://app.deel.com/oauth2/authorize",
99811
100005
  tokenUrl: "https://app.deel.com/oauth2/tokens",
100006
+ client: {
100007
+ clientRegistration: "static",
100008
+ clientType: "confidential",
100009
+ tokenEndpointAuthMethod: "client_secret_basic",
100010
+ clientIdEnv: "DEEL_OAUTH_CLIENT_ID",
100011
+ clientSecretEnv: "DEEL_OAUTH_CLIENT_SECRET"
100012
+ },
99812
100013
  scopes: [
99813
100014
  "contracts:read",
99814
100015
  "people:read",
@@ -100111,6 +100312,13 @@ var dropbox = {
100111
100312
  oauth: {
100112
100313
  authorizationUrl: "https://www.dropbox.com/oauth2/authorize",
100113
100314
  tokenUrl: "https://api.dropboxapi.com/oauth2/token",
100315
+ client: {
100316
+ clientRegistration: "static",
100317
+ clientType: "confidential",
100318
+ tokenEndpointAuthMethod: "client_secret_post",
100319
+ clientIdEnv: "DROPBOX_OAUTH_CLIENT_ID",
100320
+ clientSecretEnv: "DROPBOX_OAUTH_CLIENT_SECRET"
100321
+ },
100114
100322
  scopes: [
100115
100323
  "account_info.read",
100116
100324
  "files.metadata.read",
@@ -100416,6 +100624,13 @@ var figma = {
100416
100624
  oauth: {
100417
100625
  authorizationUrl: "https://www.figma.com/oauth",
100418
100626
  tokenUrl: "https://api.figma.com/v1/oauth/token",
100627
+ client: {
100628
+ clientRegistration: "static",
100629
+ clientType: "confidential",
100630
+ tokenEndpointAuthMethod: "client_secret_basic",
100631
+ clientIdEnv: "FIGMA_OAUTH_CLIENT_ID",
100632
+ clientSecretEnv: "FIGMA_OAUTH_CLIENT_SECRET"
100633
+ },
100419
100634
  scopes: [
100420
100635
  "current_user:read",
100421
100636
  "file_content:read",
@@ -100577,6 +100792,13 @@ var garminConnect = {
100577
100792
  oauth: {
100578
100793
  authorizationUrl: "https://connect.garmin.com/oauth2Confirm",
100579
100794
  tokenUrl: "https://diauth.garmin.com/di-oauth2-service/oauth/token",
100795
+ client: {
100796
+ clientRegistration: "static",
100797
+ clientType: "confidential",
100798
+ tokenEndpointAuthMethod: "client_secret_post",
100799
+ clientIdEnv: "GARMIN_CONNECT_OAUTH_CLIENT_ID",
100800
+ clientSecretEnv: "GARMIN_CONNECT_OAUTH_CLIENT_SECRET"
100801
+ },
100580
100802
  scopes: []
100581
100803
  }
100582
100804
  }
@@ -101525,6 +101747,13 @@ var mailchimp = {
101525
101747
  oauth: {
101526
101748
  authorizationUrl: "https://login.mailchimp.com/oauth2/authorize",
101527
101749
  tokenUrl: "https://login.mailchimp.com/oauth2/token",
101750
+ client: {
101751
+ clientRegistration: "static",
101752
+ clientType: "confidential",
101753
+ tokenEndpointAuthMethod: "client_secret_post",
101754
+ clientIdEnv: "MAILCHIMP_OAUTH_CLIENT_ID",
101755
+ clientSecretEnv: "MAILCHIMP_OAUTH_CLIENT_SECRET"
101756
+ },
101528
101757
  scopes: []
101529
101758
  }
101530
101759
  }
@@ -101736,6 +101965,13 @@ var mercury = {
101736
101965
  oauth: {
101737
101966
  authorizationUrl: "https://oauth2.mercury.com/oauth2/auth",
101738
101967
  tokenUrl: "https://oauth2.mercury.com/oauth2/token",
101968
+ client: {
101969
+ clientRegistration: "static",
101970
+ clientType: "confidential",
101971
+ tokenEndpointAuthMethod: "client_secret_post",
101972
+ clientIdEnv: "MERCURY_OAUTH_CLIENT_ID",
101973
+ clientSecretEnv: "MERCURY_OAUTH_CLIENT_SECRET"
101974
+ },
101739
101975
  scopes: ["offline_access"]
101740
101976
  }
101741
101977
  }
@@ -101768,6 +102004,13 @@ var metaAds = {
101768
102004
  oauth: {
101769
102005
  authorizationUrl: "https://www.facebook.com/v22.0/dialog/oauth",
101770
102006
  tokenUrl: "https://graph.facebook.com/v22.0/oauth/access_token",
102007
+ client: {
102008
+ clientRegistration: "static",
102009
+ clientType: "confidential",
102010
+ tokenEndpointAuthMethod: "client_secret_post",
102011
+ clientIdEnv: "META_ADS_OAUTH_CLIENT_ID",
102012
+ clientSecretEnv: "META_ADS_OAUTH_CLIENT_SECRET"
102013
+ },
101771
102014
  scopes: ["ads_management", "ads_read", "business_management"]
101772
102015
  }
101773
102016
  }
@@ -101971,6 +102214,13 @@ var monday = {
101971
102214
  oauth: {
101972
102215
  authorizationUrl: "https://auth.monday.com/oauth2/authorize",
101973
102216
  tokenUrl: "https://auth.monday.com/oauth2/token",
102217
+ client: {
102218
+ clientRegistration: "static",
102219
+ clientType: "confidential",
102220
+ tokenEndpointAuthMethod: "client_secret_post",
102221
+ clientIdEnv: "MONDAY_OAUTH_CLIENT_ID",
102222
+ clientSecretEnv: "MONDAY_OAUTH_CLIENT_SECRET"
102223
+ },
101974
102224
  scopes: [
101975
102225
  "me:read",
101976
102226
  "boards:read",
@@ -102128,6 +102378,13 @@ var neon = {
102128
102378
  oauth: {
102129
102379
  authorizationUrl: "https://oauth2.neon.tech/oauth2/auth",
102130
102380
  tokenUrl: "https://oauth2.neon.tech/oauth2/token",
102381
+ client: {
102382
+ clientRegistration: "static",
102383
+ clientType: "confidential",
102384
+ tokenEndpointAuthMethod: "client_secret_post",
102385
+ clientIdEnv: "NEON_OAUTH_CLIENT_ID",
102386
+ clientSecretEnv: "NEON_OAUTH_CLIENT_SECRET"
102387
+ },
102131
102388
  scopes: [
102132
102389
  "openid",
102133
102390
  "offline_access",
@@ -102312,6 +102569,13 @@ var outlookCalendar = {
102312
102569
  oauth: {
102313
102570
  authorizationUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
102314
102571
  tokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token",
102572
+ client: {
102573
+ clientRegistration: "static",
102574
+ clientType: "confidential",
102575
+ tokenEndpointAuthMethod: "client_secret_post",
102576
+ clientIdEnv: "MICROSOFT_OAUTH_CLIENT_ID",
102577
+ clientSecretEnv: "MICROSOFT_OAUTH_CLIENT_SECRET"
102578
+ },
102315
102579
  scopes: ["Calendars.ReadWrite", "User.Read", "offline_access"]
102316
102580
  }
102317
102581
  }
@@ -102348,6 +102612,13 @@ var outlookMail = {
102348
102612
  oauth: {
102349
102613
  authorizationUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
102350
102614
  tokenUrl: "https://login.microsoftonline.com/common/oauth2/v2.0/token",
102615
+ client: {
102616
+ clientRegistration: "static",
102617
+ clientType: "confidential",
102618
+ tokenEndpointAuthMethod: "client_secret_post",
102619
+ clientIdEnv: "MICROSOFT_OAUTH_CLIENT_ID",
102620
+ clientSecretEnv: "MICROSOFT_OAUTH_CLIENT_SECRET"
102621
+ },
102351
102622
  scopes: ["Mail.ReadWrite", "Mail.Send", "User.Read", "offline_access"]
102352
102623
  }
102353
102624
  }
@@ -102695,6 +102966,13 @@ var posthog = {
102695
102966
  oauth: {
102696
102967
  authorizationUrl: "https://us.posthog.com/oauth/authorize",
102697
102968
  tokenUrl: "https://us.posthog.com/oauth/token",
102969
+ client: {
102970
+ clientRegistration: "static",
102971
+ clientType: "confidential",
102972
+ tokenEndpointAuthMethod: "client_secret_post",
102973
+ clientIdEnv: "POSTHOG_OAUTH_CLIENT_ID",
102974
+ clientSecretEnv: "POSTHOG_OAUTH_CLIENT_SECRET"
102975
+ },
102698
102976
  scopes: [
102699
102977
  "openid",
102700
102978
  "profile",
@@ -102992,6 +103270,13 @@ var reddit = {
102992
103270
  oauth: {
102993
103271
  authorizationUrl: "https://www.reddit.com/api/v1/authorize",
102994
103272
  tokenUrl: "https://www.reddit.com/api/v1/access_token",
103273
+ client: {
103274
+ clientRegistration: "static",
103275
+ clientType: "confidential",
103276
+ tokenEndpointAuthMethod: "client_secret_basic",
103277
+ clientIdEnv: "REDDIT_OAUTH_CLIENT_ID",
103278
+ clientSecretEnv: "REDDIT_OAUTH_CLIENT_SECRET"
103279
+ },
102995
103280
  scopes: ["identity", "read"]
102996
103281
  }
102997
103282
  }
@@ -103742,6 +104027,13 @@ var stripe = {
103742
104027
  oauth: {
103743
104028
  authorizationUrl: "https://connect.stripe.com/oauth/authorize",
103744
104029
  tokenUrl: "https://connect.stripe.com/oauth/token",
104030
+ client: {
104031
+ clientRegistration: "static",
104032
+ clientType: "confidential",
104033
+ tokenEndpointAuthMethod: "client_secret_post",
104034
+ clientIdEnv: "STRIPE_OAUTH_CLIENT_ID",
104035
+ clientSecretEnv: "STRIPE_OAUTH_CLIENT_SECRET"
104036
+ },
103745
104037
  scopes: ["read_write"]
103746
104038
  }
103747
104039
  }
@@ -103789,6 +104081,13 @@ var supabase = {
103789
104081
  oauth: {
103790
104082
  authorizationUrl: "https://api.supabase.com/v1/oauth/authorize",
103791
104083
  tokenUrl: "https://api.supabase.com/v1/oauth/token",
104084
+ client: {
104085
+ clientRegistration: "static",
104086
+ clientType: "confidential",
104087
+ tokenEndpointAuthMethod: "client_secret_basic",
104088
+ clientIdEnv: "SUPABASE_OAUTH_CLIENT_ID",
104089
+ clientSecretEnv: "SUPABASE_OAUTH_CLIENT_SECRET"
104090
+ },
103792
104091
  scopes: [
103793
104092
  "organizations:read",
103794
104093
  "projects:read",
@@ -103920,6 +104219,13 @@ var testOauth = {
103920
104219
  // the preview-URL host changes per deploy.
103921
104220
  authorizationUrl: "/api/test/oauth-provider/authorize",
103922
104221
  tokenUrl: "/api/test/oauth-provider/token",
104222
+ client: {
104223
+ clientRegistration: "static",
104224
+ clientType: "confidential",
104225
+ tokenEndpointAuthMethod: "client_secret_post",
104226
+ clientId: "test-oauth-client",
104227
+ clientSecret: "test-oauth-secret"
104228
+ },
103923
104229
  scopes: ["read"]
103924
104230
  }
103925
104231
  }
@@ -104199,6 +104505,13 @@ var webflow = {
104199
104505
  oauth: {
104200
104506
  authorizationUrl: "https://webflow.com/oauth/authorize",
104201
104507
  tokenUrl: "https://api.webflow.com/oauth/access_token",
104508
+ client: {
104509
+ clientRegistration: "static",
104510
+ clientType: "confidential",
104511
+ tokenEndpointAuthMethod: "client_secret_post",
104512
+ clientIdEnv: "WEBFLOW_OAUTH_CLIENT_ID",
104513
+ clientSecretEnv: "WEBFLOW_OAUTH_CLIENT_SECRET"
104514
+ },
104202
104515
  scopes: [
104203
104516
  "authorized_user:read",
104204
104517
  "sites:read",
@@ -104504,6 +104817,13 @@ var zoom = {
104504
104817
  oauth: {
104505
104818
  authorizationUrl: "https://zoom.us/oauth/authorize",
104506
104819
  tokenUrl: "https://zoom.us/oauth/token",
104820
+ client: {
104821
+ clientRegistration: "static",
104822
+ clientType: "confidential",
104823
+ tokenEndpointAuthMethod: "client_secret_basic",
104824
+ clientIdEnv: "ZOOM_OAUTH_CLIENT_ID",
104825
+ clientSecretEnv: "ZOOM_OAUTH_CLIENT_SECRET"
104826
+ },
104507
104827
  // Granular scopes (Zoom's "resource:action:target" format). Covers the
104508
104828
  // core read/write flows documented in the zoom skill: users, meetings,
104509
104829
  // past-meeting data, cloud recordings, and webinars.
@@ -105945,6 +106265,8 @@ init_esm_shims();
105945
106265
  // ../../packages/api-contracts/src/contracts/runners.ts
105946
106266
  init_esm_shims();
105947
106267
  var c20 = initContract();
106268
+ var MIN_EPOCH_MS_TIMESTAMP = 1e12;
106269
+ var apiStartTimeSchema = external_exports.number().int().min(MIN_EPOCH_MS_TIMESTAMP);
105948
106270
  var runnerGroupSchema = external_exports.string().regex(
105949
106271
  /^[a-z0-9-]+\/[a-z0-9-]+$/,
105950
106272
  "Runner group must be in vm0/<name> format (e.g., vm0/production)"
@@ -106030,8 +106352,8 @@ var storedExecutionContextSchema = external_exports.object({
106030
106352
  debugNoMockCodex: external_exports.boolean().optional(),
106031
106353
  // Capture HTTP request headers, request bodies, and response bodies in network logs
106032
106354
  captureNetworkBodies: external_exports.boolean().optional(),
106033
- // Dispatch timestamp for E2E timing metrics
106034
- apiStartTime: external_exports.number().optional(),
106355
+ // Dispatch timestamp for E2E timing metrics, as Unix epoch milliseconds
106356
+ apiStartTime: apiStartTimeSchema.optional(),
106035
106357
  // User's timezone preference (IANA format, e.g., "Asia/Shanghai")
106036
106358
  userTimezone: external_exports.string().optional(),
106037
106359
  // Firewall for proxy-side token replacement (complete config, all permissions)
@@ -106078,8 +106400,8 @@ var executionContextSchema = external_exports.object({
106078
106400
  debugNoMockCodex: external_exports.boolean().optional(),
106079
106401
  // Capture HTTP request headers, request bodies, and response bodies in network logs
106080
106402
  captureNetworkBodies: external_exports.boolean().optional(),
106081
- // Dispatch timestamp for E2E timing metrics
106082
- apiStartTime: external_exports.number().optional(),
106403
+ // Dispatch timestamp for E2E timing metrics, as Unix epoch milliseconds
106404
+ apiStartTime: apiStartTimeSchema.optional(),
106083
106405
  // User's timezone preference (IANA format, e.g., "Asia/Shanghai")
106084
106406
  userTimezone: external_exports.string().optional(),
106085
106407
  // Firewall for proxy-side token replacement (complete config, all permissions)
@@ -107667,92 +107989,586 @@ init_esm_shims();
107667
107989
  // ../../packages/api-contracts/src/contracts/zero-computer-use.ts
107668
107990
  init_esm_shims();
107669
107991
  var c25 = initContract();
107670
- var registerResponseSchema = external_exports.object({
107992
+ var computerUseHostStatusSchema = external_exports.enum(["online", "offline"]);
107993
+ var computerUseReadCommandKindSchema = external_exports.enum([
107994
+ "apps.list",
107995
+ "app.state"
107996
+ ]);
107997
+ var computerUseWriteCommandKindSchema = external_exports.enum([
107998
+ "app.open",
107999
+ "element.click",
108000
+ "element.scroll",
108001
+ "element.set_value",
108002
+ "element.perform_action",
108003
+ "keyboard.type_text",
108004
+ "keyboard.press_key"
108005
+ ]);
108006
+ var computerUseCommandKindSchema = external_exports.enum([
108007
+ ...computerUseReadCommandKindSchema.options,
108008
+ ...computerUseWriteCommandKindSchema.options
108009
+ ]);
108010
+ var computerUseCommandStatusSchema = external_exports.enum([
108011
+ "pending_approval",
108012
+ "queued",
108013
+ "running",
108014
+ "succeeded",
108015
+ "failed"
108016
+ ]);
108017
+ var computerUseCommandErrorCodeSchema = external_exports.enum([
108018
+ "no_host",
108019
+ "permission_denied",
108020
+ "accessibility_unavailable",
108021
+ "screen_recording_unavailable",
108022
+ "unsupported_command",
108023
+ "timeout"
108024
+ ]);
108025
+ var hostNameSchema = external_exports.string().trim().min(1).max(128);
108026
+ var hostVersionSchema = external_exports.string().trim().min(1).max(64);
108027
+ var hostOsVersionSchema = external_exports.string().trim().min(1).max(128);
108028
+ var hostIdPathParamsSchema = external_exports.object({
108029
+ hostId: external_exports.string().min(1)
108030
+ });
108031
+ var commandIdPathParamsSchema = external_exports.object({
108032
+ commandId: external_exports.string().min(1)
108033
+ });
108034
+ var supportedCapabilitiesSchema = external_exports.array(external_exports.string().trim().min(1).max(128)).max(50);
108035
+ var appNameSchema = external_exports.string().trim().min(1).max(256);
108036
+ var snapshotIdSchema = external_exports.string().trim().min(1).max(256);
108037
+ var elementIdSchema = external_exports.string().trim().min(1).max(256);
108038
+ var computerUsePermissionsSchema = external_exports.object({
108039
+ accessibility: external_exports.boolean(),
108040
+ screenRecording: external_exports.boolean()
108041
+ });
108042
+ var computerUseRuntimeBodySchema = external_exports.object({
108043
+ hostName: hostNameSchema,
108044
+ appVersion: hostVersionSchema,
108045
+ osVersion: hostOsVersionSchema,
108046
+ supportedCapabilities: supportedCapabilitiesSchema.default([]),
108047
+ permissions: computerUsePermissionsSchema
108048
+ });
108049
+ var computerUseCommandTargetShape = {
108050
+ hostId: external_exports.string().min(1).optional(),
108051
+ hostName: hostNameSchema.optional(),
108052
+ timeoutMs: external_exports.number().int().min(1e3).max(6e4).default(15e3)
108053
+ };
108054
+ var computerUseCommandPayloadShape = {
108055
+ app: appNameSchema.optional(),
108056
+ snapshotId: snapshotIdSchema.optional(),
108057
+ elementId: elementIdSchema.optional(),
108058
+ x: external_exports.number().int().min(0).optional(),
108059
+ y: external_exports.number().int().min(0).optional(),
108060
+ button: external_exports.enum(["left", "right", "middle"]).optional(),
108061
+ clickCount: external_exports.number().int().min(1).max(3).optional(),
108062
+ direction: external_exports.enum(["up", "down", "left", "right"]).optional(),
108063
+ pages: external_exports.number().positive().max(25).optional(),
108064
+ value: external_exports.string().min(1).max(64e3).optional(),
108065
+ text: external_exports.string().min(1).max(64e3).optional(),
108066
+ key: external_exports.string().trim().min(1).max(256).optional(),
108067
+ action: external_exports.string().trim().min(1).max(256).optional()
108068
+ };
108069
+ var computerUseCommandCreateBodySchema = external_exports.object({
108070
+ kind: computerUseReadCommandKindSchema,
108071
+ ...computerUseCommandTargetShape,
108072
+ ...computerUseCommandPayloadShape
108073
+ }).superRefine((body, ctx) => {
108074
+ if (body.kind === "app.state" && !body.app) {
108075
+ ctx.addIssue({
108076
+ code: "custom",
108077
+ path: ["app"],
108078
+ message: "app.state requires app"
108079
+ });
108080
+ }
108081
+ });
108082
+ var computerUseWriteCommandCreateBaseSchema = external_exports.object({
108083
+ kind: computerUseWriteCommandKindSchema,
108084
+ ...computerUseCommandTargetShape,
108085
+ ...computerUseCommandPayloadShape
108086
+ });
108087
+ function requireComputerUseField(ctx, field, message) {
108088
+ ctx.addIssue({ code: "custom", path: [field], message });
108089
+ }
108090
+ function validateElementClickCommand(body, ctx) {
108091
+ const hasPoint = body.x !== void 0 && body.y !== void 0;
108092
+ if (!body.elementId && !hasPoint) {
108093
+ requireComputerUseField(
108094
+ ctx,
108095
+ "elementId",
108096
+ "element.click requires elementId or x/y"
108097
+ );
108098
+ }
108099
+ if (body.x === void 0 !== (body.y === void 0)) {
108100
+ requireComputerUseField(
108101
+ ctx,
108102
+ "x",
108103
+ "element.click coordinates require both x and y"
108104
+ );
108105
+ }
108106
+ }
108107
+ function validateElementScrollCommand(body, ctx) {
108108
+ if (!body.elementId) {
108109
+ requireComputerUseField(
108110
+ ctx,
108111
+ "elementId",
108112
+ "element.scroll requires elementId"
108113
+ );
108114
+ }
108115
+ if (!body.direction) {
108116
+ requireComputerUseField(
108117
+ ctx,
108118
+ "direction",
108119
+ "element.scroll requires direction"
108120
+ );
108121
+ }
108122
+ }
108123
+ function validateElementSetValueCommand(body, ctx) {
108124
+ if (!body.elementId) {
108125
+ requireComputerUseField(
108126
+ ctx,
108127
+ "elementId",
108128
+ "element.set_value requires elementId"
108129
+ );
108130
+ }
108131
+ if (!body.value) {
108132
+ requireComputerUseField(ctx, "value", "element.set_value requires value");
108133
+ }
108134
+ }
108135
+ function validateElementActionCommand(body, ctx) {
108136
+ if (!body.elementId) {
108137
+ requireComputerUseField(
108138
+ ctx,
108139
+ "elementId",
108140
+ "element.perform_action requires elementId"
108141
+ );
108142
+ }
108143
+ if (!body.action) {
108144
+ requireComputerUseField(
108145
+ ctx,
108146
+ "action",
108147
+ "element.perform_action requires action"
108148
+ );
108149
+ }
108150
+ }
108151
+ function validateComputerUseWriteCommand(body, ctx) {
108152
+ if (!body.app) {
108153
+ requireComputerUseField(ctx, "app", `${body.kind} requires app`);
108154
+ return;
108155
+ }
108156
+ switch (body.kind) {
108157
+ case "app.open":
108158
+ return;
108159
+ case "element.click":
108160
+ validateElementClickCommand(body, ctx);
108161
+ return;
108162
+ case "element.scroll":
108163
+ validateElementScrollCommand(body, ctx);
108164
+ return;
108165
+ case "element.set_value":
108166
+ validateElementSetValueCommand(body, ctx);
108167
+ return;
108168
+ case "element.perform_action":
108169
+ validateElementActionCommand(body, ctx);
108170
+ return;
108171
+ case "keyboard.type_text":
108172
+ if (!body.text) {
108173
+ requireComputerUseField(
108174
+ ctx,
108175
+ "text",
108176
+ "keyboard.type_text requires text"
108177
+ );
108178
+ }
108179
+ return;
108180
+ case "keyboard.press_key":
108181
+ if (!body.key) {
108182
+ requireComputerUseField(ctx, "key", "keyboard.press_key requires key");
108183
+ }
108184
+ }
108185
+ }
108186
+ var computerUseWriteCommandCreateBodySchema = computerUseWriteCommandCreateBaseSchema.superRefine(
108187
+ validateComputerUseWriteCommand
108188
+ );
108189
+ var computerUseCommandErrorSchema = external_exports.object({
108190
+ code: computerUseCommandErrorCodeSchema,
108191
+ message: external_exports.string()
108192
+ });
108193
+ var computerUseCommandResultSchema = external_exports.record(external_exports.string(), external_exports.unknown());
108194
+ var computerUseHostSchema = external_exports.object({
107671
108195
  id: external_exports.string(),
107672
- domain: external_exports.string(),
107673
- token: external_exports.string(),
107674
- ngrokToken: external_exports.string(),
107675
- endpointPrefix: external_exports.string()
108196
+ displayName: external_exports.string(),
108197
+ appVersion: external_exports.string(),
108198
+ osVersion: external_exports.string(),
108199
+ supportedCapabilities: external_exports.array(external_exports.string()),
108200
+ permissions: computerUsePermissionsSchema,
108201
+ status: computerUseHostStatusSchema,
108202
+ lastSeenAt: external_exports.string(),
108203
+ createdAt: external_exports.string()
107676
108204
  });
107677
- var hostResponseSchema = external_exports.object({
107678
- domain: external_exports.string(),
107679
- token: external_exports.string()
108205
+ var computerUseHostStartResponseSchema = external_exports.object({
108206
+ hostId: external_exports.string(),
108207
+ hostToken: external_exports.string()
107680
108208
  });
107681
- var zeroComputerUseRegisterContract = c25.router({
107682
- register: {
108209
+ var computerUseHeartbeatResponseSchema = external_exports.object({
108210
+ ok: external_exports.literal(true),
108211
+ hostId: external_exports.string()
108212
+ });
108213
+ var computerUseHostListResponseSchema = external_exports.object({
108214
+ hosts: external_exports.array(computerUseHostSchema)
108215
+ });
108216
+ var computerUseHostDeleteResponseSchema = external_exports.object({
108217
+ ok: external_exports.literal(true)
108218
+ });
108219
+ var computerUseCommandCreateResponseSchema = external_exports.object({
108220
+ commandId: external_exports.string(),
108221
+ status: external_exports.enum(["queued", "pending_approval"])
108222
+ });
108223
+ var computerUseCommandResponseSchema = external_exports.object({
108224
+ id: external_exports.string(),
108225
+ kind: computerUseCommandKindSchema,
108226
+ status: computerUseCommandStatusSchema,
108227
+ hostId: external_exports.string().nullable(),
108228
+ hostName: external_exports.string().nullable(),
108229
+ payload: external_exports.record(external_exports.string(), external_exports.unknown()),
108230
+ result: computerUseCommandResultSchema.optional(),
108231
+ error: computerUseCommandErrorSchema.optional(),
108232
+ timeoutMs: external_exports.number().int().nullable(),
108233
+ createdAt: external_exports.string(),
108234
+ claimedAt: external_exports.string().nullable(),
108235
+ completedAt: external_exports.string().nullable()
108236
+ });
108237
+ var computerUseCommandApprovalBodySchema = external_exports.object({
108238
+ decision: external_exports.enum(["approve", "deny"]),
108239
+ message: external_exports.string().max(512).optional()
108240
+ });
108241
+ var computerUseCommandApprovalResponseSchema = external_exports.object({
108242
+ commandId: external_exports.string(),
108243
+ status: external_exports.enum(["queued", "failed"])
108244
+ });
108245
+ var computerUseHostCommandNextBodySchema = external_exports.object({
108246
+ supportedCapabilities: supportedCapabilitiesSchema.default([])
108247
+ });
108248
+ var computerUseHostCommandNextResponseSchema = external_exports.discriminatedUnion(
108249
+ "status",
108250
+ [
108251
+ external_exports.object({ status: external_exports.literal("idle") }),
108252
+ external_exports.object({
108253
+ status: external_exports.literal("command"),
108254
+ command: computerUseCommandResponseSchema
108255
+ })
108256
+ ]
108257
+ );
108258
+ var computerUseHostCommandCompleteBodySchema = external_exports.discriminatedUnion(
108259
+ "status",
108260
+ [
108261
+ external_exports.object({
108262
+ status: external_exports.literal("succeeded"),
108263
+ result: computerUseCommandResultSchema
108264
+ }),
108265
+ external_exports.object({
108266
+ status: external_exports.literal("failed"),
108267
+ error: computerUseCommandErrorSchema
108268
+ })
108269
+ ]
108270
+ );
108271
+ var computerUseCommandCompleteResponseSchema = external_exports.object({
108272
+ ok: external_exports.literal(true)
108273
+ });
108274
+ var computerUseAuditEventSchema = external_exports.object({
108275
+ id: external_exports.string(),
108276
+ commandId: external_exports.string(),
108277
+ runId: external_exports.string().nullable(),
108278
+ hostId: external_exports.string().nullable(),
108279
+ kind: computerUseWriteCommandKindSchema,
108280
+ app: external_exports.string().nullable(),
108281
+ event: external_exports.enum(["created", "approved", "denied", "completed"]),
108282
+ approvalOutcome: external_exports.enum(["approved", "denied"]).nullable(),
108283
+ redactedResult: external_exports.record(external_exports.string(), external_exports.unknown()).nullable(),
108284
+ error: external_exports.record(external_exports.string(), external_exports.unknown()).nullable(),
108285
+ createdAt: external_exports.string()
108286
+ });
108287
+ var computerUseAuditEventListResponseSchema = external_exports.object({
108288
+ auditEvents: external_exports.array(computerUseAuditEventSchema)
108289
+ });
108290
+ var zeroComputerUseHostsContract = c25.router({
108291
+ start: {
107683
108292
  method: "POST",
107684
- path: "/api/zero/computer-use/register",
108293
+ path: "/api/zero/computer-use/hosts/start",
107685
108294
  headers: authHeadersSchema,
107686
- body: c25.noBody(),
108295
+ body: computerUseRuntimeBodySchema,
107687
108296
  responses: {
107688
- 200: registerResponseSchema,
108297
+ 200: computerUseHostStartResponseSchema,
107689
108298
  401: apiErrorSchema,
107690
- 403: apiErrorSchema,
107691
- 409: apiErrorSchema
108299
+ 403: apiErrorSchema
107692
108300
  },
107693
- summary: "Register a computer-use host"
107694
- }
107695
- });
107696
- var zeroComputerUseUnregisterContract = c25.router({
107697
- unregister: {
108301
+ summary: "Start or reactivate a desktop computer-use host"
108302
+ },
108303
+ list: {
108304
+ method: "GET",
108305
+ path: "/api/zero/computer-use/hosts",
108306
+ headers: authHeadersSchema,
108307
+ responses: {
108308
+ 200: computerUseHostListResponseSchema,
108309
+ 401: apiErrorSchema,
108310
+ 403: apiErrorSchema
108311
+ },
108312
+ summary: "List linked desktop computer-use hosts"
108313
+ },
108314
+ delete: {
107698
108315
  method: "DELETE",
107699
- path: "/api/zero/computer-use/unregister",
108316
+ path: "/api/zero/computer-use/hosts/:hostId",
107700
108317
  headers: authHeadersSchema,
107701
- body: c25.noBody(),
108318
+ pathParams: hostIdPathParamsSchema,
107702
108319
  responses: {
107703
- 204: c25.noBody(),
108320
+ 200: computerUseHostDeleteResponseSchema,
107704
108321
  401: apiErrorSchema,
107705
108322
  403: apiErrorSchema,
107706
108323
  404: apiErrorSchema
107707
108324
  },
107708
- summary: "Unregister a computer-use host"
108325
+ summary: "Delete a desktop computer-use host"
108326
+ }
108327
+ });
108328
+ var zeroComputerUseHeartbeatContract = c25.router({
108329
+ heartbeat: {
108330
+ method: "POST",
108331
+ path: "/api/zero/computer-use/heartbeat",
108332
+ headers: authHeadersSchema,
108333
+ body: computerUseRuntimeBodySchema,
108334
+ responses: {
108335
+ 200: computerUseHeartbeatResponseSchema,
108336
+ 401: apiErrorSchema
108337
+ },
108338
+ summary: "Refresh a desktop computer-use host heartbeat"
107709
108339
  }
107710
108340
  });
107711
- var zeroComputerUseHostContract = c25.router({
107712
- getHost: {
108341
+ var zeroComputerUseCommandContract = c25.router({
108342
+ create: {
108343
+ method: "POST",
108344
+ path: "/api/zero/computer-use/commands",
108345
+ headers: authHeadersSchema,
108346
+ body: computerUseCommandCreateBodySchema,
108347
+ responses: {
108348
+ 200: computerUseCommandCreateResponseSchema,
108349
+ 400: apiErrorSchema,
108350
+ 401: apiErrorSchema,
108351
+ 403: apiErrorSchema,
108352
+ 404: apiErrorSchema,
108353
+ 409: apiErrorSchema
108354
+ },
108355
+ summary: "Create a read-only desktop computer-use command"
108356
+ },
108357
+ get: {
107713
108358
  method: "GET",
107714
- path: "/api/zero/computer-use/host",
108359
+ path: "/api/zero/computer-use/commands/:commandId",
107715
108360
  headers: authHeadersSchema,
108361
+ pathParams: commandIdPathParamsSchema,
107716
108362
  responses: {
107717
- 200: hostResponseSchema,
108363
+ 200: computerUseCommandResponseSchema,
107718
108364
  401: apiErrorSchema,
107719
108365
  403: apiErrorSchema,
107720
108366
  404: apiErrorSchema
107721
108367
  },
107722
- summary: "Get computer-use host for the current user"
108368
+ summary: "Get a desktop computer-use command result"
108369
+ }
108370
+ });
108371
+ var zeroComputerUseWriteCommandContract = c25.router({
108372
+ create: {
108373
+ method: "POST",
108374
+ path: "/api/zero/computer-use/write-commands",
108375
+ headers: authHeadersSchema,
108376
+ body: computerUseWriteCommandCreateBodySchema,
108377
+ responses: {
108378
+ 200: computerUseCommandCreateResponseSchema,
108379
+ 400: apiErrorSchema,
108380
+ 401: apiErrorSchema,
108381
+ 403: apiErrorSchema,
108382
+ 404: apiErrorSchema,
108383
+ 409: apiErrorSchema
108384
+ },
108385
+ summary: "Create an approved-write desktop computer-use command"
108386
+ }
108387
+ });
108388
+ var zeroComputerUseCommandApprovalContract = c25.router({
108389
+ decide: {
108390
+ method: "POST",
108391
+ path: "/api/zero/computer-use/commands/:commandId/approval",
108392
+ headers: authHeadersSchema,
108393
+ pathParams: commandIdPathParamsSchema,
108394
+ body: computerUseCommandApprovalBodySchema,
108395
+ responses: {
108396
+ 200: computerUseCommandApprovalResponseSchema,
108397
+ 401: apiErrorSchema,
108398
+ 403: apiErrorSchema,
108399
+ 404: apiErrorSchema,
108400
+ 409: apiErrorSchema
108401
+ },
108402
+ summary: "Approve or deny a pending desktop computer-use write command"
108403
+ }
108404
+ });
108405
+ var zeroComputerUseHostCommandsContract = c25.router({
108406
+ next: {
108407
+ method: "POST",
108408
+ path: "/api/zero/computer-use/host/commands/next",
108409
+ headers: authHeadersSchema,
108410
+ body: computerUseHostCommandNextBodySchema,
108411
+ responses: {
108412
+ 200: computerUseHostCommandNextResponseSchema,
108413
+ 401: apiErrorSchema
108414
+ },
108415
+ summary: "Claim the next approved desktop computer-use command"
108416
+ },
108417
+ complete: {
108418
+ method: "POST",
108419
+ path: "/api/zero/computer-use/host/commands/:commandId/complete",
108420
+ headers: authHeadersSchema,
108421
+ pathParams: commandIdPathParamsSchema,
108422
+ body: computerUseHostCommandCompleteBodySchema,
108423
+ responses: {
108424
+ 200: computerUseCommandCompleteResponseSchema,
108425
+ 400: apiErrorSchema,
108426
+ 401: apiErrorSchema,
108427
+ 404: apiErrorSchema,
108428
+ 409: apiErrorSchema
108429
+ },
108430
+ summary: "Complete a desktop computer-use command"
108431
+ }
108432
+ });
108433
+ var zeroComputerUseAuditEventsContract = c25.router({
108434
+ list: {
108435
+ method: "GET",
108436
+ path: "/api/zero/computer-use/audit-events",
108437
+ headers: authHeadersSchema,
108438
+ query: external_exports.object({
108439
+ limit: external_exports.coerce.number().int().positive().max(200).default(50),
108440
+ commandId: external_exports.string().optional(),
108441
+ hostId: external_exports.string().optional(),
108442
+ runId: external_exports.string().optional()
108443
+ }),
108444
+ responses: {
108445
+ 200: computerUseAuditEventListResponseSchema,
108446
+ 401: apiErrorSchema,
108447
+ 403: apiErrorSchema
108448
+ },
108449
+ summary: "List desktop computer-use write command audit events"
107723
108450
  }
107724
108451
  });
107725
108452
 
107726
108453
  // src/lib/api/domains/zero-computer-use.ts
107727
- async function registerComputerUseHost() {
107728
- const config4 = await getClientConfig();
107729
- const client = initClient(zeroComputerUseRegisterContract, config4);
107730
- const result = await client.register({});
108454
+ function normalizeConfiguredUrl(value) {
108455
+ return value.startsWith("http") ? value : `https://${value}`;
108456
+ }
108457
+ function resolveComputerUseApiBaseUrl(baseUrl) {
108458
+ const override = process.env.VM0_API_BACKEND_URL;
108459
+ if (override) {
108460
+ return normalizeConfiguredUrl(override).replace(/\/$/, "");
108461
+ }
108462
+ const url2 = new URL(baseUrl);
108463
+ if (url2.hostname === "www.vm0.ai" || url2.hostname === "app.vm0.ai") {
108464
+ url2.hostname = "api.vm0.ai";
108465
+ }
108466
+ return url2.toString().replace(/\/$/, "");
108467
+ }
108468
+ function buildHeaders2(token) {
108469
+ const headers = {};
108470
+ if (token) {
108471
+ headers.Authorization = `Bearer ${token}`;
108472
+ }
108473
+ const bypassSecret = process.env.VERCEL_AUTOMATION_BYPASS_SECRET;
108474
+ if (bypassSecret) {
108475
+ headers["x-vercel-protection-bypass"] = bypassSecret;
108476
+ }
108477
+ return headers;
108478
+ }
108479
+ async function getComputerUseClientConfig() {
108480
+ const baseUrl = resolveComputerUseApiBaseUrl(await getBaseUrl());
108481
+ const token = await getActiveToken();
108482
+ if (!token) {
108483
+ throw new ApiRequestError("Not authenticated", "UNAUTHORIZED", 401);
108484
+ }
108485
+ return {
108486
+ baseUrl,
108487
+ baseHeaders: buildHeaders2(token),
108488
+ jsonQuery: false
108489
+ };
108490
+ }
108491
+ function commandBody(params) {
108492
+ return {
108493
+ kind: params.kind,
108494
+ timeoutMs: params.timeoutMs ?? 15e3,
108495
+ ...params.hostId ? { hostId: params.hostId } : {},
108496
+ ...params.hostName ? { hostName: params.hostName } : {},
108497
+ ...params.app ? { app: params.app } : {},
108498
+ ...params.snapshotId ? { snapshotId: params.snapshotId } : {},
108499
+ ...params.elementId ? { elementId: params.elementId } : {},
108500
+ ...params.x !== void 0 ? { x: params.x } : {},
108501
+ ...params.y !== void 0 ? { y: params.y } : {},
108502
+ ...params.button ? { button: params.button } : {},
108503
+ ...params.clickCount !== void 0 ? { clickCount: params.clickCount } : {},
108504
+ ...params.direction ? { direction: params.direction } : {},
108505
+ ...params.pages !== void 0 ? { pages: params.pages } : {},
108506
+ ...params.value !== void 0 ? { value: params.value } : {},
108507
+ ...params.text !== void 0 ? { text: params.text } : {},
108508
+ ...params.key ? { key: params.key } : {},
108509
+ ...params.action ? { action: params.action } : {}
108510
+ };
108511
+ }
108512
+ async function createComputerUseReadCommand(params) {
108513
+ const config4 = await getComputerUseClientConfig();
108514
+ const client = initClient(zeroComputerUseCommandContract, config4);
108515
+ const result = await client.create({ body: commandBody(params) });
107731
108516
  if (result.status === 200) {
107732
108517
  return result.body;
107733
108518
  }
107734
- handleError(result, "Failed to register computer-use host");
108519
+ handleError(result, "Failed to create computer-use command");
107735
108520
  }
107736
- async function unregisterComputerUseHost() {
107737
- const config4 = await getClientConfig();
107738
- const client = initClient(zeroComputerUseUnregisterContract, config4);
107739
- const result = await client.unregister({});
107740
- if (result.status === 204) {
107741
- return;
108521
+ async function createComputerUseWriteCommand(params) {
108522
+ const config4 = await getComputerUseClientConfig();
108523
+ const client = initClient(zeroComputerUseWriteCommandContract, config4);
108524
+ const result = await client.create({ body: commandBody(params) });
108525
+ if (result.status === 200) {
108526
+ return result.body;
107742
108527
  }
107743
- handleError(result, "Failed to unregister computer-use host");
108528
+ handleError(result, "Failed to create computer-use write command");
107744
108529
  }
107745
- async function getComputerUseHost() {
107746
- const config4 = await getClientConfig();
107747
- const client = initClient(zeroComputerUseHostContract, config4);
107748
- const result = await client.getHost({ headers: {} });
108530
+ async function getComputerUseCommand(commandId) {
108531
+ const config4 = await getComputerUseClientConfig();
108532
+ const client = initClient(zeroComputerUseCommandContract, config4);
108533
+ const result = await client.get({ params: { commandId } });
107749
108534
  if (result.status === 200) {
107750
108535
  return result.body;
107751
108536
  }
107752
- if (result.status === 404) {
107753
- return null;
108537
+ handleError(result, "Failed to get computer-use command");
108538
+ }
108539
+ async function listComputerUseHosts() {
108540
+ const config4 = await getComputerUseClientConfig();
108541
+ const client = initClient(zeroComputerUseHostsContract, config4);
108542
+ const result = await client.list({ headers: {} });
108543
+ if (result.status === 200) {
108544
+ return result.body;
107754
108545
  }
107755
- handleError(result, "Failed to get computer-use host");
108546
+ handleError(result, "Failed to list computer-use hosts");
108547
+ }
108548
+ async function deleteComputerUseHost(hostId) {
108549
+ const config4 = await getComputerUseClientConfig();
108550
+ const client = initClient(zeroComputerUseHostsContract, config4);
108551
+ const result = await client.delete({ params: { hostId } });
108552
+ if (result.status === 200) {
108553
+ return result.body;
108554
+ }
108555
+ handleError(result, "Failed to revoke computer-use host");
108556
+ }
108557
+ async function listComputerUseAuditEvents(params) {
108558
+ const config4 = await getComputerUseClientConfig();
108559
+ const client = initClient(zeroComputerUseAuditEventsContract, config4);
108560
+ const result = await client.list({
108561
+ query: {
108562
+ limit: params.limit ?? 50,
108563
+ ...params.commandId ? { commandId: params.commandId } : {},
108564
+ ...params.hostId ? { hostId: params.hostId } : {},
108565
+ ...params.runId ? { runId: params.runId } : {}
108566
+ }
108567
+ });
108568
+ if (result.status === 200) {
108569
+ return result.body;
108570
+ }
108571
+ handleError(result, "Failed to list computer-use audit events");
107756
108572
  }
107757
108573
 
107758
108574
  // src/lib/api/domains/zero-local-agent.ts
@@ -107824,7 +108640,7 @@ var localAgentJobStatusSchema = external_exports.enum([
107824
108640
  "failed"
107825
108641
  ]);
107826
108642
  var localAgentHostStatusSchema = external_exports.enum(["online", "closed"]);
107827
- var hostNameSchema = external_exports.string().trim().min(1).max(128);
108643
+ var hostNameSchema2 = external_exports.string().trim().min(1).max(128);
107828
108644
  var supportedBackendsSchema = external_exports.array(localAgentBackendSchema).min(1).max(2);
107829
108645
  var promptSchema = external_exports.string().trim().min(1).max(6e4);
107830
108646
  var localAgentRealtimeSubscriptionSchema = external_exports.object({
@@ -107926,7 +108742,7 @@ var zeroLocalAgentDeviceStartContract = c27.router({
107926
108742
  method: "POST",
107927
108743
  path: "/api/zero/local-agent/device/start",
107928
108744
  body: external_exports.object({
107929
- hostName: hostNameSchema,
108745
+ hostName: hostNameSchema2,
107930
108746
  supportedBackends: supportedBackendsSchema
107931
108747
  }),
107932
108748
  responses: {
@@ -107976,7 +108792,7 @@ var zeroLocalAgentHeartbeatContract = c27.router({
107976
108792
  path: "/api/zero/local-agent/heartbeat",
107977
108793
  headers: authHeadersSchema,
107978
108794
  body: external_exports.object({
107979
- hostName: hostNameSchema,
108795
+ hostName: hostNameSchema2,
107980
108796
  supportedBackends: supportedBackendsSchema,
107981
108797
  realtimeConnected: external_exports.boolean().optional()
107982
108798
  }),
@@ -108059,7 +108875,7 @@ var zeroLocalAgentHostsContract = c27.router({
108059
108875
  path: "/api/zero/local-agent/hosts/start",
108060
108876
  headers: authHeadersSchema,
108061
108877
  body: external_exports.object({
108062
- hostName: hostNameSchema,
108878
+ hostName: hostNameSchema2,
108063
108879
  supportedBackends: supportedBackendsSchema,
108064
108880
  hostId: external_exports.string().min(1).optional()
108065
108881
  }),
@@ -108151,13 +108967,13 @@ var zeroLocalAgentHostJobsContract = c27.router({
108151
108967
  });
108152
108968
 
108153
108969
  // src/lib/api/domains/zero-local-agent.ts
108154
- function normalizeConfiguredUrl(value) {
108970
+ function normalizeConfiguredUrl2(value) {
108155
108971
  return value.startsWith("http") ? value : `https://${value}`;
108156
108972
  }
108157
108973
  function resolveLocalAgentApiBaseUrl(baseUrl) {
108158
108974
  const override = process.env.VM0_API_BACKEND_URL;
108159
108975
  if (override) {
108160
- return normalizeConfiguredUrl(override).replace(/\/$/, "");
108976
+ return normalizeConfiguredUrl2(override).replace(/\/$/, "");
108161
108977
  }
108162
108978
  const url2 = new URL(baseUrl);
108163
108979
  if (url2.hostname === "www.vm0.ai" || url2.hostname === "app.vm0.ai") {
@@ -108165,7 +108981,7 @@ function resolveLocalAgentApiBaseUrl(baseUrl) {
108165
108981
  }
108166
108982
  return url2.toString().replace(/\/$/, "");
108167
108983
  }
108168
- function buildHeaders2(token) {
108984
+ function buildHeaders3(token) {
108169
108985
  const headers = {};
108170
108986
  if (token) {
108171
108987
  headers.Authorization = `Bearer ${token}`;
@@ -108189,7 +109005,7 @@ async function getLocalAgentClientConfig() {
108189
109005
  };
108190
109006
  }
108191
109007
  function buildBearerHeaders(token) {
108192
- return buildHeaders2(token);
109008
+ return buildHeaders3(token);
108193
109009
  }
108194
109010
  async function sendLocalAgentHeartbeat(params) {
108195
109011
  const baseUrl = resolveLocalAgentApiBaseUrl(await getBaseUrl());
@@ -108377,7 +109193,7 @@ var localBrowserCommandErrorCodeSchema = external_exports.enum([
108377
109193
  "timeout",
108378
109194
  "unsupported_command"
108379
109195
  ]);
108380
- var hostNameSchema2 = external_exports.string().trim().min(1).max(128);
109196
+ var hostNameSchema3 = external_exports.string().trim().min(1).max(128);
108381
109197
  var browserSchema = external_exports.string().trim().min(1).max(64);
108382
109198
  var extensionVersionSchema = external_exports.string().trim().min(1).max(64);
108383
109199
  var tabIdSchema = external_exports.string().trim().min(1).max(128);
@@ -108386,12 +109202,12 @@ var targetUrlSchema = external_exports.string().trim().url().max(2048).refine((v
108386
109202
  return protocol === "http:" || protocol === "https:";
108387
109203
  }, "URL must use http or https");
108388
109204
  var cssSelectorSchema = external_exports.string().trim().min(1).max(1024);
108389
- var supportedCapabilitiesSchema = external_exports.array(external_exports.string().trim().min(1).max(128)).max(50);
109205
+ var supportedCapabilitiesSchema2 = external_exports.array(external_exports.string().trim().min(1).max(128)).max(50);
108390
109206
  var localBrowserRuntimeBodySchema = external_exports.object({
108391
- hostName: hostNameSchema2,
109207
+ hostName: hostNameSchema3,
108392
109208
  browser: browserSchema,
108393
109209
  extensionVersion: extensionVersionSchema,
108394
- supportedCapabilities: supportedCapabilitiesSchema.default([])
109210
+ supportedCapabilities: supportedCapabilitiesSchema2.default([])
108395
109211
  });
108396
109212
  var localBrowserRealtimeSubscriptionSchema = external_exports.object({
108397
109213
  channelName: external_exports.string(),
@@ -108466,7 +109282,7 @@ var localBrowserHostDeleteResponseSchema = external_exports.object({
108466
109282
  var localBrowserCommandTargetShape = {
108467
109283
  tabId: tabIdSchema.optional(),
108468
109284
  hostId: external_exports.string().min(1).optional(),
108469
- hostName: hostNameSchema2.optional(),
109285
+ hostName: hostNameSchema3.optional(),
108470
109286
  timeoutMs: external_exports.number().int().min(1e3).max(6e4).default(15e3)
108471
109287
  };
108472
109288
  var localBrowserCommandCreateBodySchema = external_exports.object({
@@ -108865,7 +109681,7 @@ var zeroLocalBrowserHostCommandsContract = c28.router({
108865
109681
  path: "/api/zero/local-browser/host/commands/next",
108866
109682
  headers: authHeadersSchema,
108867
109683
  body: external_exports.object({
108868
- supportedCapabilities: supportedCapabilitiesSchema.default([])
109684
+ supportedCapabilities: supportedCapabilitiesSchema2.default([])
108869
109685
  }),
108870
109686
  responses: {
108871
109687
  200: localBrowserHostCommandNextResponseSchema,
@@ -108894,13 +109710,13 @@ var zeroLocalBrowserHostCommandsContract = c28.router({
108894
109710
  });
108895
109711
 
108896
109712
  // src/lib/api/domains/zero-local-browser.ts
108897
- function normalizeConfiguredUrl2(value) {
109713
+ function normalizeConfiguredUrl3(value) {
108898
109714
  return value.startsWith("http") ? value : `https://${value}`;
108899
109715
  }
108900
109716
  function resolveLocalBrowserApiBaseUrl(baseUrl) {
108901
109717
  const override = process.env.VM0_API_BACKEND_URL;
108902
109718
  if (override) {
108903
- return normalizeConfiguredUrl2(override).replace(/\/$/, "");
109719
+ return normalizeConfiguredUrl3(override).replace(/\/$/, "");
108904
109720
  }
108905
109721
  const url2 = new URL(baseUrl);
108906
109722
  if (url2.hostname === "www.vm0.ai" || url2.hostname === "app.vm0.ai") {
@@ -108908,7 +109724,7 @@ function resolveLocalBrowserApiBaseUrl(baseUrl) {
108908
109724
  }
108909
109725
  return url2.toString().replace(/\/$/, "");
108910
109726
  }
108911
- function buildHeaders3(token) {
109727
+ function buildHeaders4(token) {
108912
109728
  const headers = {};
108913
109729
  if (token) {
108914
109730
  headers.Authorization = `Bearer ${token}`;
@@ -108927,7 +109743,7 @@ async function getLocalBrowserClientConfig() {
108927
109743
  }
108928
109744
  return {
108929
109745
  baseUrl,
108930
- baseHeaders: buildHeaders3(token),
109746
+ baseHeaders: buildHeaders4(token),
108931
109747
  jsonQuery: false
108932
109748
  };
108933
109749
  }
@@ -124915,16 +125731,27 @@ var healthAuthContract = c29.router({
124915
125731
  // ../../packages/api-contracts/src/contracts/desktop-auth.ts
124916
125732
  init_esm_shims();
124917
125733
  var c30 = initContract();
125734
+ var desktopAuthCallbackSchemes = [
125735
+ "ai.vm0.zero.desktop",
125736
+ "ai.vm0.zero.desktop.dev"
125737
+ ];
125738
+ var defaultDesktopAuthCallbackScheme = desktopAuthCallbackSchemes[0];
125739
+ var desktopAuthCallbackSchemeSchema = external_exports.enum(
125740
+ desktopAuthCallbackSchemes
125741
+ );
124918
125742
  var desktopAuthHandoffContract = c30.router({
124919
125743
  create: {
124920
125744
  method: "POST",
124921
125745
  path: "/api/desktop-auth/handoff",
124922
125746
  headers: authHeadersSchema,
124923
- body: external_exports.object({}).optional(),
125747
+ body: external_exports.object({
125748
+ callbackScheme: desktopAuthCallbackSchemeSchema.optional()
125749
+ }).optional(),
124924
125750
  responses: {
124925
125751
  200: external_exports.object({
124926
125752
  callbackUrl: external_exports.string()
124927
125753
  }),
125754
+ 400: apiErrorSchema,
124928
125755
  401: apiErrorSchema,
124929
125756
  403: apiErrorSchema,
124930
125757
  500: apiErrorSchema
@@ -131213,9 +132040,12 @@ export {
131213
132040
  searchLogs,
131214
132041
  requestDeveloperSupportConsent,
131215
132042
  submitDeveloperSupport,
131216
- registerComputerUseHost,
131217
- unregisterComputerUseHost,
131218
- getComputerUseHost,
132043
+ createComputerUseReadCommand,
132044
+ createComputerUseWriteCommand,
132045
+ getComputerUseCommand,
132046
+ listComputerUseHosts,
132047
+ deleteComputerUseHost,
132048
+ listComputerUseAuditEvents,
131219
132049
  createLocalBrowserReadCommand,
131220
132050
  createLocalBrowserWriteCommand,
131221
132051
  getLocalBrowserReadCommand,
@@ -131279,4 +132109,4 @@ undici/lib/web/fetch/body.js:
131279
132109
  undici/lib/web/websocket/frame.js:
131280
132110
  (*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
131281
132111
  */
131282
- //# sourceMappingURL=chunk-D6CWF2IH.js.map
132112
+ //# sourceMappingURL=chunk-AUKY6FBC.js.map