@scalar/cli 2.13.2 → 2.15.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.
Files changed (95) hide show
  1. package/README.md +75 -9
  2. package/chunks/{action-MHBMWRU4.js → action-2BGAMGXU.js} +7 -6
  3. package/chunks/{action-KCJTUKNF.js → action-2HPMP473.js} +4 -4
  4. package/chunks/{action-6WWWTCCB.js → action-2UZWKMSJ.js} +14 -14
  5. package/chunks/{action-O4WDOJVV.js → action-3KP3WVPZ.js} +8 -7
  6. package/chunks/{action-D7D3YH2N.js → action-3QQSKGM3.js} +16 -15
  7. package/chunks/{action-RDG3SJ2G.js → action-3W4IC7QL.js} +17 -16
  8. package/chunks/{action-E7EK6TJJ.js → action-4HXB3YQR.js} +12 -11
  9. package/chunks/{action-4U36CMZG.js → action-57SV3ZBM.js} +7 -6
  10. package/chunks/{action-BIEKRF2X.js → action-6HFH7DAW.js} +7 -6
  11. package/chunks/{action-3OYAJ5F6.js → action-777R7LOG.js} +20 -18
  12. package/chunks/{action-YH3KB4NR.js → action-7LK4RUDP.js} +39 -36
  13. package/chunks/{action-ZSUVSURQ.js → action-APBLB3IU.js} +7 -6
  14. package/chunks/{action-JOKVK5PP.js → action-B2WWTOF6.js} +8 -8
  15. package/chunks/{action-VK6HFIZ5.js → action-ENDUKGWS.js} +16 -15
  16. package/chunks/{action-3QTDQRAO.js → action-G2WBTXOK.js} +18 -16
  17. package/chunks/{action-HGPGL624.js → action-HDT7EO7W.js} +18 -17
  18. package/chunks/{action-2LFAO27S.js → action-HOCCP353.js} +11 -10
  19. package/chunks/{action-BVORONSB.js → action-IU2AVNOW.js} +23 -21
  20. package/chunks/{action-Q7OD2QHZ.js → action-IUAYC2SC.js} +8 -7
  21. package/chunks/{action-ZYQEUYF7.js → action-JNH4DCZX.js} +4 -4
  22. package/chunks/{action-6LNC6MMJ.js → action-LD5B5QQ4.js} +26 -24
  23. package/chunks/{action-YXAOA3TJ.js → action-MBAAYXKK.js} +17 -16
  24. package/chunks/{action-WMOLIVXC.js → action-MJHLG7AE.js} +24 -22
  25. package/chunks/{action-AQCSAFDU.js → action-NZJ4Z64U.js} +16 -15
  26. package/chunks/{action-WJMC3TDN.js → action-P2RPH5R2.js} +7 -7
  27. package/chunks/{action-XZDNARAW.js → action-PDSSIW2A.js} +21 -20
  28. package/chunks/{action-MHJOOGII.js → action-PNSWHIHC.js} +10 -10
  29. package/chunks/{action-4DEIYLOW.js → action-QJMRAFOF.js} +16 -15
  30. package/chunks/{action-S7NCRXKS.js → action-T7SD3ETN.js} +19 -18
  31. package/chunks/{action-IN7SNSSI.js → action-TR2T2UYB.js} +7 -6
  32. package/chunks/{action-V2B42324.js → action-TY4BZEMN.js} +14 -14
  33. package/chunks/{action-NY2R6VH2.js → action-U2RJ3ZAU.js} +4 -4
  34. package/chunks/{action-FIKVZPFG.js → action-WOLNPEUQ.js} +10 -8
  35. package/chunks/{action-LKMBK3MO.js → action-ZTLOQZTT.js} +12 -11
  36. package/chunks/actions-D5OHPBWC.js +327 -0
  37. package/chunks/{actions-K2RSZCU4.js → actions-RI42JY6H.js} +37 -15
  38. package/chunks/{agent-YNVT6RJ6.js → agent-NA3QFKJX.js} +5 -5
  39. package/chunks/{asyncapi-XLHXPF2X.js → asyncapi-YBTWMTW6.js} +23 -18
  40. package/chunks/{build.action-TAMUO3F2.js → build.action-4YDNDBXC.js} +18 -17
  41. package/chunks/{chunk-ORHGCCJR.js → chunk-2KSOARE4.js} +2 -2
  42. package/chunks/{chunk-KAKAN5X3.js → chunk-42MIV6WF.js} +2 -2
  43. package/chunks/{chunk-5ENKYZA4.js → chunk-4S3DGMMZ.js} +1 -1
  44. package/chunks/chunk-5D3T63G4.js +14 -0
  45. package/chunks/{chunk-DRXJRWZA.js → chunk-6BQHLHBE.js} +4 -2
  46. package/chunks/chunk-7FGJIUDN.js +27 -0
  47. package/chunks/{chunk-NEB25B57.js → chunk-7FS7BAUX.js} +3 -3
  48. package/chunks/{chunk-JA7EIRUB.js → chunk-7PNOYE6B.js} +1 -1
  49. package/chunks/{chunk-KVK4LNTB.js → chunk-ANP5XF26.js} +8108 -3716
  50. package/chunks/{chunk-MQNTUZ2B.js → chunk-BLY2CF4S.js} +3 -1
  51. package/chunks/{chunk-I2JLVALT.js → chunk-BMQFEKHA.js} +120 -15
  52. package/chunks/{chunk-4T5XUXTP.js → chunk-BOCMOHQA.js} +3 -1
  53. package/chunks/chunk-BY4NGQ5D.js +15 -0
  54. package/chunks/{chunk-RQOKASNF.js → chunk-DLYMDGFW.js} +2 -2
  55. package/chunks/{chunk-VMRXSVEE.js → chunk-DWJMPHLY.js} +3 -1
  56. package/chunks/{chunk-2XWUFFEZ.js → chunk-E24BNP6E.js} +1 -1
  57. package/chunks/{chunk-NDCXYF5Q.js → chunk-EOTD7HAV.js} +1 -1
  58. package/chunks/{chunk-TWTUSPPI.js → chunk-ERZ3HYB5.js} +2 -96
  59. package/chunks/{chunk-66POUWQA.js → chunk-G5WWW7VD.js} +3 -3
  60. package/chunks/{chunk-AP2O742I.js → chunk-GOKHFNB2.js} +2 -2
  61. package/chunks/{chunk-RAJM56L7.js → chunk-HIDIW2FN.js} +1 -1
  62. package/chunks/{chunk-LK2ZIDHH.js → chunk-IDGT5RAQ.js} +1 -1
  63. package/chunks/chunk-IPUJEBMI.js +9 -0
  64. package/chunks/{chunk-XG6WXQFN.js → chunk-IPWJEGPD.js} +2 -2
  65. package/chunks/{chunk-UPYLTC2Z.js → chunk-KOLEQNLG.js} +1 -1
  66. package/chunks/{chunk-QHR5X4FO.js → chunk-MGGMCT77.js} +1 -1
  67. package/chunks/{chunk-ZO7KDO3C.js → chunk-PIDLENYN.js} +7192 -6436
  68. package/chunks/{chunk-3CZG44E4.js → chunk-QMERQSPM.js} +2 -2
  69. package/chunks/{chunk-JQJSNCGD.js → chunk-QXOUDBFK.js} +4 -4
  70. package/chunks/{chunk-KYJLZCM3.js → chunk-RRYUCZYO.js} +2 -2
  71. package/chunks/{chunk-7UKLAB2Q.js → chunk-SHRUJFQI.js} +30 -8
  72. package/chunks/{chunk-Z2NUKRKG.js → chunk-T76K7QNX.js} +3 -3
  73. package/chunks/{chunk-OBJCYCIV.js → chunk-TR5U7G7T.js} +2 -1
  74. package/chunks/{chunk-UXCQFVXG.js → chunk-TW2UASEW.js} +2 -2
  75. package/chunks/{chunk-PFUJVZFI.js → chunk-UM3WZUGF.js} +4 -12
  76. package/chunks/{chunk-G7DFH6WK.js → chunk-USVU6AC2.js} +21 -5
  77. package/chunks/chunk-VBHPHAGS.js +114 -0
  78. package/chunks/{chunk-3MKTCEUX.js → chunk-W7P6VTCG.js} +25 -2
  79. package/chunks/{chunk-DDTGQKVB.js → chunk-Y6GKZ2FM.js} +1 -1
  80. package/chunks/{chunk-PFP35UAF.js → chunk-Z6HOHGUJ.js} +18 -1
  81. package/chunks/{create.action-UX5TVHST.js → create.action-52K3XAYN.js} +18 -17
  82. package/chunks/{delete.action-UMVF2N4A.js → delete.action-3NMOQPIR.js} +18 -17
  83. package/chunks/{delete.action-C3ZGIXJX.js → delete.action-47LPLTOX.js} +18 -17
  84. package/chunks/diff.action-5TLC2EHT.js +325 -0
  85. package/chunks/{get.action-KFLT4UUT.js → get.action-BCMLG7C7.js} +22 -27
  86. package/chunks/{get.action-KIEUFN4D.js → get.action-TOZ474GO.js} +17 -16
  87. package/chunks/{list.action-QK5DK5X3.js → list.action-6ZWEENT6.js} +21 -20
  88. package/chunks/{list.action-F3M4XJFC.js → list.action-CMAA5KTY.js} +17 -16
  89. package/chunks/{publish.action-GZ2TSAPE.js → publish.action-U3VIU5LZ.js} +39 -36
  90. package/chunks/{update.action-OTRO76PF.js → update.action-QZOP25ME.js} +18 -17
  91. package/chunks/{update.action-DNINDNBT.js → update.action-UQHZYVTP.js} +19 -18
  92. package/index.js +339 -219
  93. package/package.json +13 -12
  94. package/skills/scalar-cli/SKILL.md +9 -1
  95. package/template.md +72 -7
@@ -2,10 +2,10 @@ import { createRequire as $$cR } from "node:module"; const require = $$cR(import
2
2
  import {
3
3
  findConfig,
4
4
  parseConfig
5
- } from "./chunk-ZO7KDO3C.js";
5
+ } from "./chunk-PIDLENYN.js";
6
6
  import {
7
7
  ConfigVersion
8
- } from "./chunk-4T5XUXTP.js";
8
+ } from "./chunk-BOCMOHQA.js";
9
9
  import {
10
10
  output
11
11
  } from "./chunk-T5HJUAWB.js";
@@ -1,17 +1,17 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  BaseCollections
4
- } from "./chunk-7UKLAB2Q.js";
4
+ } from "./chunk-SHRUJFQI.js";
5
5
  import {
6
6
  sdkTrackedApiVersionSpec
7
- } from "./chunk-KVK4LNTB.js";
7
+ } from "./chunk-ANP5XF26.js";
8
8
  import {
9
9
  managedDocSchema
10
- } from "./chunk-ORHGCCJR.js";
10
+ } from "./chunk-2KSOARE4.js";
11
11
  import {
12
12
  err,
13
13
  ok
14
- } from "./chunk-5ENKYZA4.js";
14
+ } from "./chunk-4S3DGMMZ.js";
15
15
 
16
16
  // src/domains/sdk/inspect-sdk.ts
17
17
  var sdkMetadata = (sdk, builds) => {
@@ -1,12 +1,12 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  safeNormalize
4
- } from "./chunk-PFUJVZFI.js";
4
+ } from "./chunk-BY4NGQ5D.js";
5
5
  import {
6
6
  inputFailure,
7
7
  readUrl,
8
8
  safeInput
9
- } from "./chunk-2XWUFFEZ.js";
9
+ } from "./chunk-E24BNP6E.js";
10
10
  import {
11
11
  isUrl
12
12
  } from "./chunk-4ORL4MST.js";
@@ -5,36 +5,36 @@ import {
5
5
  loginPortalSchema,
6
6
  managedSchema,
7
7
  workspaceSchema
8
- } from "./chunk-NEB25B57.js";
8
+ } from "./chunk-7FS7BAUX.js";
9
9
  import {
10
10
  userSchema
11
- } from "./chunk-PFP35UAF.js";
11
+ } from "./chunk-Z6HOHGUJ.js";
12
12
  import {
13
13
  sdkSchema
14
- } from "./chunk-NDCXYF5Q.js";
14
+ } from "./chunk-EOTD7HAV.js";
15
15
  import {
16
16
  FEEDBACK_PATH_MAX_LENGTH,
17
17
  helpfulReasons,
18
18
  siteDeploySchema,
19
19
  unhelpfulReasons
20
- } from "./chunk-3MKTCEUX.js";
20
+ } from "./chunk-W7P6VTCG.js";
21
21
  import {
22
22
  teamSchema
23
- } from "./chunk-DRXJRWZA.js";
23
+ } from "./chunk-6BQHLHBE.js";
24
24
  import {
25
25
  activeDeploymentSchema,
26
26
  publishRecordSchema,
27
27
  themeSchema
28
- } from "./chunk-4T5XUXTP.js";
28
+ } from "./chunk-BOCMOHQA.js";
29
29
  import {
30
30
  managedDocSchema,
31
31
  ruleSchema
32
- } from "./chunk-ORHGCCJR.js";
32
+ } from "./chunk-2KSOARE4.js";
33
33
  import {
34
34
  docInstanceOriginSchema,
35
35
  docInstanceSchema,
36
36
  docVersionRecordSchema
37
- } from "./chunk-JA7EIRUB.js";
37
+ } from "./chunk-7PNOYE6B.js";
38
38
  import {
39
39
  brandedUid,
40
40
  emailSchema,
@@ -55,6 +55,25 @@ var scalarAdminSchema = entitySchema.extend({
55
55
  role: zod_default.enum(["admin", "super-admin"])
56
56
  }).meta({ id: "scalar-admin" });
57
57
 
58
+ // ../../packages/entities/dist/credits/report.js
59
+ var agentCreditReportSchema = entitySchema.extend({
60
+ teamUid: nanoidSchema,
61
+ /** The Stripe subscription the usage was reported against. */
62
+ subscriptionId: external_exports.string(),
63
+ /** The end of the usage period the invoice bills; 0 for a baseline. */
64
+ periodEnd: timestampSchema,
65
+ /** The agent's lifetime micro-credit counter when the report was made. */
66
+ counter: external_exports.number().int().min(0),
67
+ /** Micro-credits sent to Stripe; 0 for a baseline or a period with no usage. */
68
+ delta: external_exports.number().int().min(0),
69
+ /**
70
+ * `pending` from just before the meter event is sent until Stripe accepts
71
+ * it. A `pending` report is resent with the same meter-event identifier,
72
+ * which Stripe deduplicates within 24 hours.
73
+ */
74
+ status: external_exports.enum(["pending", "sent"])
75
+ }).meta({ id: "agent-credit-report" });
76
+
58
77
  // ../../packages/entities/dist/deploys/ai-catalog.js
59
78
  function isOriginPath(value) {
60
79
  try {
@@ -169,6 +188,8 @@ var BaseCollections = {
169
188
  BitbucketUsers: "bitbucket-users",
170
189
  ForgejoUsers: "forgejo-users",
171
190
  VcsLinkStates: "vcs-link-states",
191
+ VcsCredentials: "vcs-credentials",
192
+ VcsCredentialKeys: "vcs-credential-keys",
172
193
  LoginAttempts: "login-attempts",
173
194
  Teams: "team",
174
195
  Deploys: "deploys",
@@ -206,6 +227,7 @@ var BaseCollections = {
206
227
  WebhookDeliveries: (teamUid) => `team/${teamUid}/webhook-deliveries`,
207
228
  WebhookSecrets: (teamUid) => `team/${teamUid}/webhook-secrets`,
208
229
  WebhookEventClaims: "webhook-event-claims",
230
+ AgentCreditReports: "agent-credit-reports",
209
231
  OauthStates: "oauth-states",
210
232
  Waitlist: "waitlist",
211
233
  BannedUsers: "banned-users",
@@ -1,13 +1,13 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  BaseCollections
4
- } from "./chunk-7UKLAB2Q.js";
4
+ } from "./chunk-SHRUJFQI.js";
5
5
  import {
6
6
  getDatabaseClient
7
- } from "./chunk-AP2O742I.js";
7
+ } from "./chunk-GOKHFNB2.js";
8
8
  import {
9
9
  publishRecordSchema
10
- } from "./chunk-4T5XUXTP.js";
10
+ } from "./chunk-BOCMOHQA.js";
11
11
 
12
12
  // src/domains/project/deployments/get-deployments.ts
13
13
  function orderDeployments(records) {
@@ -1,7 +1,7 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  version
4
- } from "./chunk-VMRXSVEE.js";
4
+ } from "./chunk-DWJMPHLY.js";
5
5
 
6
6
  // src/config.ts
7
7
  import { portNumbers } from "get-port";
@@ -11,6 +11,7 @@ var config = {
11
11
  sandbox: process.env.SANDBOX_URL ?? "https://sandbox.scalar.com",
12
12
  registry: process.env.REGISTRY_URL ?? "https://registry.scalar.com"
13
13
  },
14
+ mcpUrl: process.env.MCP_URL ?? "https://mcp.scalar.com",
14
15
  services: {
15
16
  api: process.env.BASE_URL ?? "https://services.scalar.com"
16
17
  },
@@ -1,10 +1,10 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  config
4
- } from "./chunk-OBJCYCIV.js";
4
+ } from "./chunk-TR5U7G7T.js";
5
5
  import {
6
6
  RegistryAsset
7
- } from "./chunk-ORHGCCJR.js";
7
+ } from "./chunk-2KSOARE4.js";
8
8
 
9
9
  // src/domains/registry/helpers/links.ts
10
10
  function registryUrl(path) {
@@ -1,24 +1,16 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
+ import {
3
+ safeNormalize
4
+ } from "./chunk-BY4NGQ5D.js";
2
5
  import {
3
6
  detectManagedDocType
4
- } from "./chunk-ORHGCCJR.js";
5
-
6
- // src/domains/document/helpers/safe-normalize.ts
7
- import { normalize } from "@scalar/json-magic/helpers/normalize";
8
- var safeNormalize = (value) => {
9
- try {
10
- return normalize(value);
11
- } catch {
12
- return void 0;
13
- }
14
- };
7
+ } from "./chunk-2KSOARE4.js";
15
8
 
16
9
  // src/domains/document/helpers/document-type.ts
17
10
  var isAsyncApiDocument = (document) => detectManagedDocType(document) === "asyncapi";
18
11
  var isAsyncApiContent = (content) => content.includes("asyncapi") && isAsyncApiDocument(safeNormalize(content));
19
12
 
20
13
  export {
21
- safeNormalize,
22
14
  isAsyncApiDocument,
23
15
  isAsyncApiContent
24
16
  };
@@ -3,13 +3,13 @@ import {
3
3
  mcpEnvironmentSchema,
4
4
  mcpGroupSecretMappingSchema,
5
5
  mcpGroupSecretsSchema
6
- } from "./chunk-3MKTCEUX.js";
6
+ } from "./chunk-W7P6VTCG.js";
7
7
  import {
8
8
  billingPlanSchema
9
- } from "./chunk-DRXJRWZA.js";
9
+ } from "./chunk-6BQHLHBE.js";
10
10
  import {
11
11
  sharedProjectSchema
12
- } from "./chunk-4T5XUXTP.js";
12
+ } from "./chunk-BOCMOHQA.js";
13
13
  import {
14
14
  SCALAR_AGENT_KEY_HEADER,
15
15
  agentDocsProjectSchema,
@@ -28,7 +28,7 @@ import {
28
28
  mcpServerSchema,
29
29
  mcpServerVersionSchema,
30
30
  monthlyUsageSchema
31
- } from "./chunk-JA7EIRUB.js";
31
+ } from "./chunk-7PNOYE6B.js";
32
32
  import {
33
33
  environmentSlugSchema
34
34
  } from "./chunk-Q26DFKTY.js";
@@ -70,7 +70,11 @@ var mcpConsumerKindSchema = external_exports.enum([
70
70
  "docs_agent_token",
71
71
  "anonymous"
72
72
  ]);
73
- var mcpToolKindSchema = external_exports.enum(["generic", "curated"]);
73
+ var mcpToolKindSchema = external_exports.enum([
74
+ "generic",
75
+ "curated",
76
+ "template-prompt"
77
+ ]);
74
78
  var mcpToolCategorySchema = external_exports.enum(["openapi", "docs"]);
75
79
  var mcpExportDatasetSchema = external_exports.enum([
76
80
  "tools",
@@ -592,6 +596,18 @@ var internalRoutes = {
592
596
  response: external_exports.object({ updated: external_exports.boolean() }),
593
597
  responses: { 404: agentApiErrorSchema, 409: agentApiErrorSchema },
594
598
  summary: "Set or release the custom domain of an MCP server"
599
+ },
600
+ /**
601
+ * A team's lifetime agent-credit usage. Core reads it when Stripe drafts an
602
+ * invoice that bills a usage period and reports the difference since its
603
+ * last report.
604
+ */
605
+ getCreditUsageTotal: {
606
+ method: "GET",
607
+ path: (p) => `/internal/usage/credit-total/${p.teamUid}`,
608
+ params: external_exports.object({ teamUid: external_exports.string().min(1) }),
609
+ response: external_exports.object({ microCredits: external_exports.number().int().min(0) }),
610
+ summary: "A team's lifetime agent-credit usage"
595
611
  }
596
612
  };
597
613
 
@@ -0,0 +1,114 @@
1
+ import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
+ import {
3
+ MCP_DOWNLOAD_PATH_PREFIX
4
+ } from "./chunk-7PNOYE6B.js";
5
+
6
+ // ../../packages/entities/dist/agent/mcp-edge-routes.js
7
+ var MCP_BUILD_PATTERN = "[0-9a-f]{7,64}";
8
+ var VERSION_WORDS = [
9
+ "dev",
10
+ "development",
11
+ "test",
12
+ "staging",
13
+ "production",
14
+ "beta",
15
+ "alpha",
16
+ "current",
17
+ "active"
18
+ ];
19
+ var VERSION_LABEL = `(?:(?:(?:[a-z][a-z0-9]*-)*(?:[vV]?[0-9]+(?:[.][0-9]+){0,4}(?:-[0-9A-Za-z.-]+)?|[0-9a-f]{7,40})|${VERSION_WORDS.join("|")})(?:[+]${MCP_BUILD_PATTERN})?|latest)`;
20
+ var ORIGIN_VERSION_LABEL = `[^/@+]+(?:[+]${MCP_BUILD_PATTERN})?`;
21
+ var TOKEN_SEGMENT = "[A-Za-z0-9_-]+";
22
+ var DOWNLOAD_PATTERN = `^${MCP_DOWNLOAD_PATH_PREFIX}/${TOKEN_SEGMENT}[.]${TOKEN_SEGMENT}(?:[.]${TOKEN_SEGMENT})?$`;
23
+ var READ = ["GET", "HEAD"];
24
+ var DASHBOARD_POST = [
25
+ "POST",
26
+ "OPTIONS"
27
+ ];
28
+ var MCP_AUTH_SERVER_ROUTES = [
29
+ { path: "/_scalar/oauth/authorize", methods: READ },
30
+ { path: "/_scalar/oauth/continue", methods: [...READ, "POST"] },
31
+ { path: "/_scalar/oauth/consent", methods: ["POST"] },
32
+ { path: "/_scalar/oauth/register", methods: ["POST", "OPTIONS"] },
33
+ { path: "/_scalar/oauth/token", methods: ["POST", "OPTIONS"] },
34
+ { path: "/_scalar/oauth/revoke", methods: ["POST", "OPTIONS"] },
35
+ { path: "/_scalar/oauth/signout", methods: READ },
36
+ { path: "/_scalar/oauth/email/start", methods: ["POST"] },
37
+ { path: "/_scalar/oauth/email/link", methods: [...READ, "POST"] },
38
+ { path: "/_scalar/oauth/platform/password", methods: DASHBOARD_POST },
39
+ { path: "/_scalar/oauth/platform/password/proof", methods: DASHBOARD_POST },
40
+ {
41
+ path: "/_scalar/oauth/platform/password/reset/start",
42
+ methods: DASHBOARD_POST
43
+ },
44
+ {
45
+ path: "/_scalar/oauth/platform/password/reset/complete",
46
+ methods: DASHBOARD_POST
47
+ },
48
+ {
49
+ path: "/_scalar/oauth/platform/password/change",
50
+ methods: DASHBOARD_POST
51
+ },
52
+ { path: "/_scalar/oauth/platform/proof", methods: ["POST"] },
53
+ { path: "/_scalar/oauth/idp/:provider/start", methods: READ },
54
+ { path: "/_scalar/oauth/idp/:provider/begin", methods: READ },
55
+ { path: "/_scalar/oauth/idp/callback", methods: READ },
56
+ { path: "/_scalar/oauth/idp/return", methods: READ },
57
+ {
58
+ path: "/_scalar/oauth/idp/github/verify-email",
59
+ methods: [...READ, "POST"]
60
+ },
61
+ { path: "/_scalar/oauth/saml/start", methods: READ },
62
+ { path: "/_scalar/oauth/saml/begin", methods: READ },
63
+ { path: "/_scalar/oauth/saml/acs", methods: ["POST"] }
64
+ ];
65
+ var PROBE_PATTERN = [
66
+ "[.](?:php|aspx?|jsp|action|cgi)(?:/|$)",
67
+ "^/[.]git(?:/|$)",
68
+ "^/[.]env(?:[./]|$)",
69
+ "^/wp-(?:admin|login|content|includes|config|cron)(?:[./]|$)",
70
+ "^/(?:actuator|heapdump|jmx-console|phpmyadmin)(?:/|$)",
71
+ "^/nuclei[.]svg$",
72
+ "^/oast[.]me(?:/|$)",
73
+ "[{][{]"
74
+ ].join("|");
75
+ var PREFLIGHT = [
76
+ `any(http.request.headers["origin"][*] ne "")`,
77
+ `any(http.request.headers["access-control-request-method"][*] ne "")`
78
+ ].join(" and ");
79
+ var NOT_ACCEPTABLE_BODY = JSON.stringify({
80
+ jsonrpc: "2.0",
81
+ error: {
82
+ code: -32e3,
83
+ message: "Not Acceptable: Client must accept both application/json and text/event-stream"
84
+ },
85
+ id: null
86
+ });
87
+ var UNSUPPORTED_MEDIA_TYPE_BODY = JSON.stringify({
88
+ jsonrpc: "2.0",
89
+ error: {
90
+ code: -32e3,
91
+ message: "Unsupported Media Type: Content-Type must be application/json"
92
+ },
93
+ id: null
94
+ });
95
+
96
+ // ../../packages/urls/dist/mcp/address.js
97
+ var DEFAULT_ENVIRONMENT = "production";
98
+ var BUILD_SEGMENT = new RegExp(`^${MCP_BUILD_PATTERN}$`);
99
+ function buildSuffix(build) {
100
+ return build ? `+${build}` : "";
101
+ }
102
+ function withEnvironmentSuffix(version, environment) {
103
+ return environment === DEFAULT_ENVIRONMENT ? version : `${version}-${environment}`;
104
+ }
105
+ function buildMcpAddressUrl({ baseUrl, namespace, slug, environment = DEFAULT_ENVIRONMENT, version, build }) {
106
+ const base = `${baseUrl.replace(/\/+$/, "")}/@${namespace}/${slug}`;
107
+ if (version && version !== "latest")
108
+ return `${base}@${withEnvironmentSuffix(version, environment)}${buildSuffix(build)}`;
109
+ return environment === DEFAULT_ENVIRONMENT ? base : `${base}?env=${encodeURIComponent(environment)}`;
110
+ }
111
+
112
+ export {
113
+ buildMcpAddressUrl
114
+ };
@@ -5,7 +5,7 @@ import {
5
5
  mcpEnvironmentPolicies,
6
6
  mcpServerChannelSchema,
7
7
  secretNameSchema
8
- } from "./chunk-JA7EIRUB.js";
8
+ } from "./chunk-7PNOYE6B.js";
9
9
  import {
10
10
  environmentSlugSchema
11
11
  } from "./chunk-Q26DFKTY.js";
@@ -190,6 +190,25 @@ var mcpCustomizationSchema = external_exports.object({
190
190
  */
191
191
  logo: external_exports.url({ protocol: /^https?$/ }).max(2048).nullish()
192
192
  }).meta({ id: "mcp-customization" });
193
+ var MCP_INSTRUCTIONS_MAX_LENGTH = 16384;
194
+ var MCP_TEMPLATE_PROMPTS_MAX = 50;
195
+ var MCP_TEMPLATE_PROMPT_ARGUMENTS_MAX = 10;
196
+ var MCP_TEMPLATE_PROMPT_DESCRIPTION_MAX_LENGTH = 1024;
197
+ var MCP_TEMPLATE_PROMPT_TEMPLATE_MAX_LENGTH = 65536;
198
+ var mcpTemplatePromptNameSchema = external_exports.string().regex(/^[a-z][a-z0-9_]*$/).max(108);
199
+ var mcpTemplatePromptArgumentNameSchema = external_exports.string().regex(/^[a-z][a-z0-9_]*$/).max(64);
200
+ var mcpTemplatePromptSchema = external_exports.object({
201
+ name: mcpTemplatePromptNameSchema,
202
+ description: external_exports.string().min(1).max(MCP_TEMPLATE_PROMPT_DESCRIPTION_MAX_LENGTH),
203
+ arguments: external_exports.object({
204
+ name: mcpTemplatePromptArgumentNameSchema,
205
+ description: external_exports.string().max(512).optional(),
206
+ required: external_exports.boolean().optional()
207
+ }).array().max(MCP_TEMPLATE_PROMPT_ARGUMENTS_MAX).optional(),
208
+ template: external_exports.string().min(1).max(MCP_TEMPLATE_PROMPT_TEMPLATE_MAX_LENGTH),
209
+ /** Where it is served; both when unset. */
210
+ exposeAs: external_exports.enum(["tool", "prompt"]).array().min(1).optional()
211
+ });
193
212
  var mcpGroupSecretMappingSchema = external_exports.record(secretNameSchema, external_exports.union([secretNameSchema, external_exports.literal("")]));
194
213
  var mcpGroupSecretsSchema = external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.string()));
195
214
  var mcpEnvironmentSchema = external_exports.object({
@@ -209,7 +228,11 @@ var mcpEnvironmentSchema = external_exports.object({
209
228
  /** Whether the environment's build pointer advances on its own. */
210
229
  policy: external_exports.enum(mcpEnvironmentPolicies).optional(),
211
230
  /** The page a browser gets at the environment's address. */
212
- customization: mcpCustomizationSchema.optional()
231
+ customization: mcpCustomizationSchema.optional(),
232
+ /** Sent as the MCP initialize `instructions`; `""` is none over production's. */
233
+ instructions: external_exports.string().max(MCP_INSTRUCTIONS_MAX_LENGTH).optional(),
234
+ /** Served as tools and MCP prompts; `[]` is none over production's. */
235
+ templatePrompts: mcpTemplatePromptSchema.array().max(MCP_TEMPLATE_PROMPTS_MAX).optional()
213
236
  });
214
237
  var mcpServerRecordSchema = baseRegistrySchema.extend({
215
238
  /** Own uid, branded so it cannot be confused with another entity's uid */
@@ -10,7 +10,7 @@ var DownloadIsolateCommand = () => {
10
10
  const cmd = new Command("download-isolate");
11
11
  cmd.description("Download the docs preview server");
12
12
  cmd.action(async () => {
13
- const { downloadIsolate } = await import("./action-ZYQEUYF7.js");
13
+ const { downloadIsolate } = await import("./action-JNH4DCZX.js");
14
14
  await downloadIsolate();
15
15
  });
16
16
  return cmd;
@@ -3,7 +3,7 @@ import {
3
3
  emailAllowanceSchema,
4
4
  teamImageSchema,
5
5
  teamNameSchema
6
- } from "./chunk-DRXJRWZA.js";
6
+ } from "./chunk-6BQHLHBE.js";
7
7
  import {
8
8
  brandedUid,
9
9
  emailSchema,
@@ -96,6 +96,23 @@ var userSchema = entitySchema.extend({
96
96
  emailAllowance: emailAllowanceSchema.optional()
97
97
  }).meta({ id: "user" });
98
98
 
99
+ // ../../packages/entities/dist/user/vcs-credential.js
100
+ var vcsProviderSchema = external_exports.enum(["github", "bitbucket", "forgejo"]);
101
+ var vcsCredentialRecordSchema = entitySchema.extend({
102
+ userUid: external_exports.string().min(1),
103
+ provider: vcsProviderSchema,
104
+ token: external_exports.string(),
105
+ /** Null for Forgejo, whose personal access token has no refresh token */
106
+ refreshToken: external_exports.string().nullable(),
107
+ expiry: timestampSchema.nullable(),
108
+ refreshExpiry: timestampSchema.nullable()
109
+ }).meta({ id: "vcs-credential-record" });
110
+ var vcsCredentialKeyRecordSchema = entitySchema.extend({
111
+ wrappedKey: external_exports.string(),
112
+ /** The KMS key version that wrapped `wrappedKey` */
113
+ kmsKeyVersion: external_exports.string()
114
+ }).meta({ id: "vcs-credential-key-record" });
115
+
99
116
  export {
100
117
  userSchema
101
118
  };
@@ -4,34 +4,35 @@ import {
4
4
  } from "./chunk-SNQFFEYH.js";
5
5
  import {
6
6
  BaseCollections
7
- } from "./chunk-7UKLAB2Q.js";
7
+ } from "./chunk-SHRUJFQI.js";
8
8
  import {
9
9
  getDatabaseClient
10
- } from "./chunk-AP2O742I.js";
10
+ } from "./chunk-GOKHFNB2.js";
11
11
  import {
12
12
  apiService
13
- } from "./chunk-I2JLVALT.js";
14
- import "./chunk-KVK4LNTB.js";
15
- import "./chunk-NEB25B57.js";
16
- import "./chunk-PFP35UAF.js";
13
+ } from "./chunk-BMQFEKHA.js";
14
+ import "./chunk-ANP5XF26.js";
15
+ import "./chunk-7FS7BAUX.js";
16
+ import "./chunk-Z6HOHGUJ.js";
17
17
  import {
18
18
  SdkLanguage
19
- } from "./chunk-NDCXYF5Q.js";
20
- import "./chunk-G7DFH6WK.js";
21
- import "./chunk-3MKTCEUX.js";
19
+ } from "./chunk-EOTD7HAV.js";
20
+ import "./chunk-USVU6AC2.js";
21
+ import "./chunk-W7P6VTCG.js";
22
+ import "./chunk-5D3T63G4.js";
22
23
  import "./chunk-RE5Z56QD.js";
23
24
  import "./chunk-VUXPDHTQ.js";
24
25
  import {
25
26
  getAuthData
26
- } from "./chunk-KAKAN5X3.js";
27
+ } from "./chunk-42MIV6WF.js";
27
28
  import {
28
29
  config
29
- } from "./chunk-OBJCYCIV.js";
30
- import "./chunk-VMRXSVEE.js";
30
+ } from "./chunk-TR5U7G7T.js";
31
+ import "./chunk-DWJMPHLY.js";
31
32
  import {
32
33
  teamSchema
33
- } from "./chunk-DRXJRWZA.js";
34
- import "./chunk-4T5XUXTP.js";
34
+ } from "./chunk-6BQHLHBE.js";
35
+ import "./chunk-BOCMOHQA.js";
35
36
  import {
36
37
  requireInteractive,
37
38
  select,
@@ -39,12 +40,12 @@ import {
39
40
  } from "./chunk-XUX6JXU5.js";
40
41
  import "./chunk-IRQJDPZE.js";
41
42
  import "./chunk-4ORL4MST.js";
42
- import "./chunk-ORHGCCJR.js";
43
+ import "./chunk-2KSOARE4.js";
43
44
  import {
44
45
  output
45
46
  } from "./chunk-T5HJUAWB.js";
46
- import "./chunk-5ENKYZA4.js";
47
- import "./chunk-JA7EIRUB.js";
47
+ import "./chunk-4S3DGMMZ.js";
48
+ import "./chunk-7PNOYE6B.js";
48
49
  import "./chunk-Q26DFKTY.js";
49
50
  import {
50
51
  external_exports,
@@ -4,44 +4,45 @@ import {
4
4
  } from "./chunk-SNQFFEYH.js";
5
5
  import {
6
6
  BaseCollections
7
- } from "./chunk-7UKLAB2Q.js";
7
+ } from "./chunk-SHRUJFQI.js";
8
8
  import {
9
9
  getDatabaseClient
10
- } from "./chunk-AP2O742I.js";
10
+ } from "./chunk-GOKHFNB2.js";
11
11
  import {
12
12
  apiService
13
- } from "./chunk-I2JLVALT.js";
14
- import "./chunk-KVK4LNTB.js";
15
- import "./chunk-NEB25B57.js";
16
- import "./chunk-PFP35UAF.js";
13
+ } from "./chunk-BMQFEKHA.js";
14
+ import "./chunk-ANP5XF26.js";
15
+ import "./chunk-7FS7BAUX.js";
16
+ import "./chunk-Z6HOHGUJ.js";
17
17
  import {
18
18
  sdkSchema
19
- } from "./chunk-NDCXYF5Q.js";
20
- import "./chunk-G7DFH6WK.js";
21
- import "./chunk-3MKTCEUX.js";
19
+ } from "./chunk-EOTD7HAV.js";
20
+ import "./chunk-USVU6AC2.js";
21
+ import "./chunk-W7P6VTCG.js";
22
+ import "./chunk-5D3T63G4.js";
22
23
  import "./chunk-RE5Z56QD.js";
23
24
  import "./chunk-VUXPDHTQ.js";
24
25
  import {
25
26
  getAuthData
26
- } from "./chunk-KAKAN5X3.js";
27
- import "./chunk-OBJCYCIV.js";
28
- import "./chunk-VMRXSVEE.js";
27
+ } from "./chunk-42MIV6WF.js";
28
+ import "./chunk-TR5U7G7T.js";
29
+ import "./chunk-DWJMPHLY.js";
29
30
  import {
30
31
  teamSchema
31
- } from "./chunk-DRXJRWZA.js";
32
- import "./chunk-4T5XUXTP.js";
32
+ } from "./chunk-6BQHLHBE.js";
33
+ import "./chunk-BOCMOHQA.js";
33
34
  import {
34
35
  requireInteractive,
35
36
  select
36
37
  } from "./chunk-XUX6JXU5.js";
37
38
  import "./chunk-IRQJDPZE.js";
38
39
  import "./chunk-4ORL4MST.js";
39
- import "./chunk-ORHGCCJR.js";
40
+ import "./chunk-2KSOARE4.js";
40
41
  import {
41
42
  output
42
43
  } from "./chunk-T5HJUAWB.js";
43
- import "./chunk-5ENKYZA4.js";
44
- import "./chunk-JA7EIRUB.js";
44
+ import "./chunk-4S3DGMMZ.js";
45
+ import "./chunk-7PNOYE6B.js";
45
46
  import "./chunk-Q26DFKTY.js";
46
47
  import {
47
48
  external_exports,