@scalar/cli 2.13.1 → 2.14.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 +46 -8
  2. package/chunks/{action-2BZ3AFBR.js → action-2BGAMGXU.js} +7 -6
  3. package/chunks/{action-27BJMHFD.js → action-2HPMP473.js} +4 -4
  4. package/chunks/{action-PBJFNJMY.js → action-3KP3WVPZ.js} +8 -7
  5. package/chunks/{action-5QDBZTBF.js → action-4HXB3YQR.js} +12 -11
  6. package/chunks/{action-3R3MVTP3.js → action-4HYLZRYW.js} +22 -21
  7. package/chunks/{action-WI6UW2AL.js → action-4MJXPSQU.js} +16 -15
  8. package/chunks/{action-JFNK5UCV.js → action-57SV3ZBM.js} +7 -6
  9. package/chunks/{action-FZZ2VLNA.js → action-6HFH7DAW.js} +7 -6
  10. package/chunks/{action-FR6UPGZP.js → action-APBLB3IU.js} +7 -6
  11. package/chunks/{action-5JTBIUPZ.js → action-APTGKF4W.js} +38 -36
  12. package/chunks/{action-CXQ3HLVC.js → action-BL5PWLFV.js} +21 -20
  13. package/chunks/{action-7HHTD65O.js → action-C7CNI7TP.js} +10 -10
  14. package/chunks/{action-VEXFHEQR.js → action-DJXZWPL7.js} +8 -7
  15. package/chunks/{action-F5LSDVJA.js → action-EPGLU5E3.js} +16 -15
  16. package/chunks/{action-WY4GOD2Y.js → action-EYOZ457H.js} +17 -16
  17. package/chunks/{action-XXIRB2F6.js → action-FLX3ESH7.js} +22 -21
  18. package/chunks/{action-JRPGHJGA.js → action-FOITEQNQ.js} +16 -15
  19. package/chunks/{action-5HWPNWVU.js → action-GOFCT7XK.js} +21 -20
  20. package/chunks/{action-KRXJWRCE.js → action-MJI3TI3W.js} +19 -18
  21. package/chunks/{action-PDOW5JS2.js → action-OP5DCAHN.js} +18 -16
  22. package/chunks/{action-W5VD63XO.js → action-P2QEJUBK.js} +11 -11
  23. package/chunks/{action-IUG6MPST.js → action-RRQNVUFW.js} +8 -8
  24. package/chunks/{action-3DBOUHKS.js → action-SCOJRZKD.js} +11 -10
  25. package/chunks/{action-ASBFLTOA.js → action-SRFBOLDL.js} +1 -1
  26. package/chunks/{action-W3AGGZ42.js → action-TR2T2UYB.js} +7 -6
  27. package/chunks/{action-3P66ZSL3.js → action-U2RJ3ZAU.js} +4 -4
  28. package/chunks/{action-RYLO75IN.js → action-VAJSWBMD.js} +14 -14
  29. package/chunks/{action-WEDLKGDY.js → action-VEP7LZPN.js} +4 -4
  30. package/chunks/{action-WQPMJZXL.js → action-VS22CPVB.js} +17 -16
  31. package/chunks/{action-GRAMP3QD.js → action-VW2POHCL.js} +15 -15
  32. package/chunks/{action-JEI24ZNE.js → action-VY3DRAO4.js} +11 -8
  33. package/chunks/{action-JCBTINNL.js → action-WOLNPEUQ.js} +10 -8
  34. package/chunks/{action-GLC54N3F.js → action-XA4MEYFP.js} +14 -14
  35. package/chunks/{action-GIKW67JB.js → action-Y4MKBDRC.js} +18 -17
  36. package/chunks/{action-EGF7LXVA.js → action-ZOU7EPX5.js} +19 -18
  37. package/chunks/{actions-I4HS6ASR.js → actions-PBYTDEMH.js} +16 -15
  38. package/chunks/{agent-E6PYTXAU.js → agent-NA3QFKJX.js} +7 -5
  39. package/chunks/{asyncapi-VQ7CCUCY.js → asyncapi-KCA6ZH3Q.js} +23 -18
  40. package/chunks/{build.action-LIAREWUF.js → build.action-54FHG7VL.js} +18 -17
  41. package/chunks/{chunk-JHJDLZSM.js → chunk-2KSOARE4.js} +2 -2
  42. package/chunks/{chunk-BDNCJLJP.js → chunk-2SBHCZPG.js} +1 -1
  43. package/chunks/{chunk-GARUDDWI.js → chunk-3CRO6NY4.js} +3 -1
  44. package/chunks/{chunk-UNV7BZD3.js → chunk-42YF4H6W.js} +2 -2
  45. package/chunks/{chunk-5ENKYZA4.js → chunk-4S3DGMMZ.js} +1 -1
  46. package/chunks/chunk-5D3T63G4.js +14 -0
  47. package/chunks/{chunk-F3TQHNSQ.js → chunk-6BQHLHBE.js} +7 -3
  48. package/chunks/{chunk-P4EPNS46.js → chunk-7FS7BAUX.js} +3 -3
  49. package/chunks/{chunk-M4QTWCJ7.js → chunk-7PNOYE6B.js} +4 -1
  50. package/chunks/{chunk-KTI65ZVY.js → chunk-7ZDC34NA.js} +28 -8
  51. package/chunks/{chunk-QS2T7JAK.js → chunk-AAWPGVMG.js} +2 -2
  52. package/chunks/{chunk-APX65SRT.js → chunk-ADQ6B6QI.js} +1 -1
  53. package/chunks/{chunk-QRYMQPFT.js → chunk-BLY2CF4S.js} +3 -1
  54. package/chunks/{chunk-VRZSDUZK.js → chunk-BOCMOHQA.js} +8 -1
  55. package/chunks/chunk-BY4NGQ5D.js +15 -0
  56. package/chunks/{chunk-RZDLPTXV.js → chunk-DTZBE4ZX.js} +3 -3
  57. package/chunks/{chunk-2XWUFFEZ.js → chunk-E24BNP6E.js} +1 -1
  58. package/chunks/{chunk-RQNLEGMQ.js → chunk-EOTD7HAV.js} +1 -1
  59. package/chunks/{chunk-YTTDYTVB.js → chunk-F5Q7FJRG.js} +1 -1
  60. package/chunks/chunk-GO3TSREI.js +27 -0
  61. package/chunks/{chunk-6VAEDMCP.js → chunk-H5AMMMQ3.js} +77 -11
  62. package/chunks/{chunk-RAJM56L7.js → chunk-HIDIW2FN.js} +1 -1
  63. package/chunks/{chunk-LK2ZIDHH.js → chunk-IDGT5RAQ.js} +1 -1
  64. package/chunks/chunk-IPUJEBMI.js +9 -0
  65. package/chunks/{chunk-XFBCZL7J.js → chunk-KKHTS43A.js} +3 -3
  66. package/chunks/{chunk-R3NDJICA.js → chunk-KXMZXTLK.js} +1 -1
  67. package/chunks/{chunk-QUUBUPAW.js → chunk-KZSM2SUL.js} +4 -4
  68. package/chunks/{chunk-MQ65WBVF.js → chunk-PIDLENYN.js} +7192 -6436
  69. package/chunks/{chunk-PWFA23M2.js → chunk-PRW5TKYS.js} +1 -1
  70. package/chunks/{chunk-4YQVGOHX.js → chunk-QMERQSPM.js} +2 -2
  71. package/chunks/{chunk-HZ4UKLOE.js → chunk-QTMJ3VUZ.js} +2 -2
  72. package/chunks/{chunk-LUR7BA3W.js → chunk-RRYUCZYO.js} +2 -2
  73. package/chunks/{chunk-SNSJW2JT.js → chunk-S3U2VMVL.js} +2 -2
  74. package/chunks/{chunk-DWN6JOF2.js → chunk-UM3WZUGF.js} +4 -12
  75. package/chunks/{chunk-X62ZTOQF.js → chunk-USVU6AC2.js} +23 -5
  76. package/chunks/{chunk-SIPBGEVT.js → chunk-VJ7FHLN4.js} +2 -2
  77. package/chunks/{chunk-FXELV3AW.js → chunk-W7P6VTCG.js} +25 -2
  78. package/chunks/{chunk-IDWF5L45.js → chunk-WKMOUBQJ.js} +7884 -3730
  79. package/chunks/{chunk-NOD4CBF7.js → chunk-WZSU45SV.js} +1 -1
  80. package/chunks/{chunk-6YDIOXF7.js → chunk-WZUA7IAV.js} +2 -2
  81. package/chunks/{create.action-PZMCTYGS.js → create.action-NB3YYZ7K.js} +18 -17
  82. package/chunks/{delete.action-J57JIFG3.js → delete.action-5BT3TXVZ.js} +21 -17
  83. package/chunks/{delete.action-VDSTPSWG.js → delete.action-DWMQYW62.js} +21 -17
  84. package/chunks/diff.action-ENOOLRRB.js +324 -0
  85. package/chunks/{get.action-KUP32QJT.js → get.action-2ASGSZW3.js} +17 -16
  86. package/chunks/{get.action-ZOSML6XG.js → get.action-55JDC2MJ.js} +21 -27
  87. package/chunks/{list.action-VYENIC5L.js → list.action-6QBQFGVR.js} +17 -16
  88. package/chunks/{list.action-Q5MPDR42.js → list.action-NCG6Q6S2.js} +21 -20
  89. package/chunks/{publish.action-MBAZHQ2J.js → publish.action-4Y5EXBOY.js} +38 -36
  90. package/chunks/{update.action-IEXVMUKG.js → update.action-4V6MQMWG.js} +19 -18
  91. package/chunks/{update.action-BWMCXWQ5.js → update.action-6OE54B5O.js} +18 -17
  92. package/index.js +268 -206
  93. package/package.json +13 -12
  94. package/skills/scalar-cli/SKILL.md +3 -2
  95. package/template.md +45 -7
@@ -4,44 +4,45 @@ import {
4
4
  } from "./chunk-SNQFFEYH.js";
5
5
  import {
6
6
  BaseCollections
7
- } from "./chunk-KTI65ZVY.js";
7
+ } from "./chunk-7ZDC34NA.js";
8
8
  import {
9
9
  getDatabaseClient
10
- } from "./chunk-HZ4UKLOE.js";
10
+ } from "./chunk-QTMJ3VUZ.js";
11
11
  import {
12
12
  apiService
13
- } from "./chunk-6VAEDMCP.js";
14
- import "./chunk-IDWF5L45.js";
15
- import "./chunk-P4EPNS46.js";
16
- import "./chunk-YTTDYTVB.js";
13
+ } from "./chunk-H5AMMMQ3.js";
14
+ import "./chunk-WKMOUBQJ.js";
15
+ import "./chunk-7FS7BAUX.js";
16
+ import "./chunk-F5Q7FJRG.js";
17
17
  import {
18
18
  sdkSchema
19
- } from "./chunk-RQNLEGMQ.js";
20
- import "./chunk-X62ZTOQF.js";
21
- import "./chunk-FXELV3AW.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-QS2T7JAK.js";
27
- import "./chunk-R3NDJICA.js";
28
- import "./chunk-GARUDDWI.js";
27
+ } from "./chunk-AAWPGVMG.js";
28
+ import "./chunk-KXMZXTLK.js";
29
+ import "./chunk-3CRO6NY4.js";
29
30
  import {
30
31
  teamSchema
31
- } from "./chunk-F3TQHNSQ.js";
32
- import "./chunk-VRZSDUZK.js";
32
+ } from "./chunk-6BQHLHBE.js";
33
+ import "./chunk-BOCMOHQA.js";
33
34
  import {
34
35
  canPrompt,
35
36
  select
36
37
  } from "./chunk-XUX6JXU5.js";
37
38
  import "./chunk-IRQJDPZE.js";
38
39
  import "./chunk-4ORL4MST.js";
39
- import "./chunk-JHJDLZSM.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-M4QTWCJ7.js";
44
+ import "./chunk-4S3DGMMZ.js";
45
+ import "./chunk-7PNOYE6B.js";
45
46
  import "./chunk-Q26DFKTY.js";
46
47
  import {
47
48
  external_exports,
@@ -2,7 +2,7 @@ import { createRequire as $$cR } from "node:module"; const require = $$cR(import
2
2
  import {
3
3
  baseRegistrySchema,
4
4
  docVersionToolSchema
5
- } from "./chunk-M4QTWCJ7.js";
5
+ } from "./chunk-7PNOYE6B.js";
6
6
  import {
7
7
  brandedUid,
8
8
  docVersionSchema,
@@ -136,7 +136,7 @@ var managedDocSchema = baseRegistrySchema.extend({
136
136
  verified: external_exports.boolean().default(false)
137
137
  }).meta({ id: "managed-doc" });
138
138
 
139
- // ../../node_modules/.pnpm/@scalar+helpers@0.16.1/node_modules/@scalar/helpers/dist/http/http-methods.js
139
+ // ../../node_modules/.pnpm/@scalar+helpers@0.16.4/node_modules/@scalar/helpers/dist/http/http-methods.js
140
140
  var HTTP_METHODS = ["delete", "get", "head", "options", "patch", "post", "put", "query", "trace"];
141
141
  var httpMethods = Object.freeze(new Set(HTTP_METHODS));
142
142
 
@@ -1,7 +1,7 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  userSchema
4
- } from "./chunk-YTTDYTVB.js";
4
+ } from "./chunk-F5Q7FJRG.js";
5
5
 
6
6
  // src/domains/team/helpers.ts
7
7
  var getUserTeams = async (client, email) => {
@@ -2,7 +2,7 @@ import { createRequire as $$cR } from "node:module"; const require = $$cR(import
2
2
 
3
3
  // package.json
4
4
  var name = "@scalar/cli";
5
- var version = "2.13.1";
5
+ var version = "2.14.0";
6
6
  var bin = {
7
7
  scalar: "./dist/index.js",
8
8
  "scalar-cli": "./dist/index.js"
@@ -96,6 +96,7 @@ var package_default = {
96
96
  "stdout-update": "catalog:*",
97
97
  "tar-fs": "catalog:*",
98
98
  undici: "catalog:*",
99
+ ws: "catalog:*",
99
100
  yaml: "catalog:*"
100
101
  },
101
102
  devDependencies: {
@@ -113,6 +114,7 @@ var package_default = {
113
114
  "@types/prettyjson": "catalog:*",
114
115
  "@types/semver": "catalog:*",
115
116
  "@types/tar-fs": "catalog:*",
117
+ "@types/ws": "catalog:*",
116
118
  esbuild: "catalog:*",
117
119
  fastify: "catalog:*",
118
120
  "remark-gfm": "catalog:*",
@@ -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-R3NDJICA.js";
4
+ } from "./chunk-KXMZXTLK.js";
5
5
  import {
6
6
  RegistryAsset
7
- } from "./chunk-JHJDLZSM.js";
7
+ } from "./chunk-2KSOARE4.js";
8
8
 
9
9
  // src/domains/registry/helpers/links.ts
10
10
  function registryUrl(path) {
@@ -1,6 +1,6 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
 
3
- // ../../node_modules/.pnpm/@scalar+helpers@0.16.1/node_modules/@scalar/helpers/dist/types/result.js
3
+ // ../../node_modules/.pnpm/@scalar+helpers@0.16.4/node_modules/@scalar/helpers/dist/types/result.js
4
4
  var ok = (data) => ({ ok: true, data });
5
5
  var err = (error, message) => ({
6
6
  ok: false,
@@ -0,0 +1,14 @@
1
+ import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
+
3
+ // ../../node_modules/.pnpm/@scalar+helpers@0.16.4/node_modules/@scalar/helpers/dist/object/is-object.js
4
+ var isObject = (value) => {
5
+ if (value === null || typeof value !== "object") {
6
+ return false;
7
+ }
8
+ const proto = Object.getPrototypeOf(value);
9
+ return proto === Object.prototype || proto === null;
10
+ };
11
+
12
+ export {
13
+ isObject
14
+ };
@@ -1,7 +1,7 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  customProjectIconSchema
4
- } from "./chunk-VRZSDUZK.js";
4
+ } from "./chunk-BOCMOHQA.js";
5
5
  import {
6
6
  MAX_TEAM_ENVIRONMENTS,
7
7
  defaultTeamEnvironments,
@@ -103,6 +103,7 @@ var FeatureFlag;
103
103
  FeatureFlag2["AutoBillSdks"] = "autoBillSdks";
104
104
  FeatureFlag2["SdkOpenApiEditor"] = "sdkOpenApiEditor";
105
105
  FeatureFlag2["DashboardChat"] = "dashboardChat";
106
+ FeatureFlag2["DocsChatInsights"] = "docsChatInsights";
106
107
  })(FeatureFlag || (FeatureFlag = {}));
107
108
  var featureSchema = external_exports.boolean().optional().meta({ id: "feature" });
108
109
  var featureUpdateSchema = external_exports.boolean().nullable().optional();
@@ -128,7 +129,8 @@ var featureFlagSchema = external_exports.object({
128
129
  [FeatureFlag.AutoBillSeats]: featureSchema,
129
130
  [FeatureFlag.AutoBillSdks]: featureSchema,
130
131
  [FeatureFlag.SdkOpenApiEditor]: featureSchema,
131
- [FeatureFlag.DashboardChat]: featureSchema
132
+ [FeatureFlag.DashboardChat]: featureSchema,
133
+ [FeatureFlag.DocsChatInsights]: featureSchema
132
134
  }).meta({ id: "feature-flag" });
133
135
  var featureFlagUpdateSchema = external_exports.object(Object.fromEntries(Object.values(FeatureFlag).map((featureFlag) => [
134
136
  featureFlag,
@@ -675,7 +677,9 @@ var usageBillingReportSchema = zod_default.object({
675
677
  billingMode: zod_default.string().nullable(),
676
678
  hadUsageItem: zod_default.boolean(),
677
679
  /** Intervals of the subscription's items, e.g. ['year', 'month'], to spot unusual contracts. */
678
- intervals: zod_default.array(zod_default.string())
680
+ intervals: zod_default.array(zod_default.string()),
681
+ /** 1 when the billing subscription, created before `baselinesBefore`, had no agent credit baseline: written on apply, only counted on a dry run. */
682
+ baselines: zod_default.number().int().min(0)
679
683
  }).meta({ id: "usage-billing-report" });
680
684
 
681
685
  export {
@@ -3,15 +3,15 @@ import {
3
3
  SdkLanguage,
4
4
  sdkVersionStatusSchema,
5
5
  sdkVersionTargetStateSchema
6
- } from "./chunk-RQNLEGMQ.js";
6
+ } from "./chunk-EOTD7HAV.js";
7
7
  import {
8
8
  cloudflareHostnameStateSchema
9
- } from "./chunk-FXELV3AW.js";
9
+ } from "./chunk-W7P6VTCG.js";
10
10
  import {
11
11
  RegistryResourceTypes,
12
12
  baseRegistrySchema,
13
13
  contentShaSchema
14
- } from "./chunk-M4QTWCJ7.js";
14
+ } from "./chunk-7PNOYE6B.js";
15
15
  import {
16
16
  brandedUid,
17
17
  docVersionSchema,
@@ -721,6 +721,9 @@ var agentDocsProjectSchema = zod_default.object({
721
721
  // Nullish input, null output, so a payload without the column still parses.
722
722
  mcpEnvironment: zod_default.string().nullish().default(null),
723
723
  agentEnabled: zod_default.boolean(),
724
+ // Defaults like the column, so a payload without it still parses.
725
+ chatInsightsEnabled: zod_default.boolean().default(true),
726
+ analyticsEnabled: zod_default.boolean().default(true),
724
727
  createdAt: zod_default.string(),
725
728
  updatedAt: zod_default.string()
726
729
  }).meta({ id: "agent-docs-project" });
@@ -862,7 +865,7 @@ var keyDocumentSchema = zod_default.object({
862
865
  documentId: zod_default.uuid()
863
866
  }).meta({ id: "key-documents" });
864
867
 
865
- // ../../node_modules/.pnpm/@scalar+helpers@0.16.1/node_modules/@scalar/helpers/dist/http/http-token.js
868
+ // ../../node_modules/.pnpm/@scalar+helpers@0.16.4/node_modules/@scalar/helpers/dist/http/http-token.js
866
869
  var HTTP_TOKEN = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
867
870
 
868
871
  // ../../packages/entities/dist/agent/operation.js
@@ -5,36 +5,36 @@ import {
5
5
  loginPortalSchema,
6
6
  managedSchema,
7
7
  workspaceSchema
8
- } from "./chunk-P4EPNS46.js";
8
+ } from "./chunk-7FS7BAUX.js";
9
9
  import {
10
10
  userSchema
11
- } from "./chunk-YTTDYTVB.js";
11
+ } from "./chunk-F5Q7FJRG.js";
12
12
  import {
13
13
  sdkSchema
14
- } from "./chunk-RQNLEGMQ.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-FXELV3AW.js";
20
+ } from "./chunk-W7P6VTCG.js";
21
21
  import {
22
22
  teamSchema
23
- } from "./chunk-F3TQHNSQ.js";
23
+ } from "./chunk-6BQHLHBE.js";
24
24
  import {
25
25
  activeDeploymentSchema,
26
26
  publishRecordSchema,
27
27
  themeSchema
28
- } from "./chunk-VRZSDUZK.js";
28
+ } from "./chunk-BOCMOHQA.js";
29
29
  import {
30
30
  managedDocSchema,
31
31
  ruleSchema
32
- } from "./chunk-JHJDLZSM.js";
32
+ } from "./chunk-2KSOARE4.js";
33
33
  import {
34
34
  docInstanceOriginSchema,
35
35
  docInstanceSchema,
36
36
  docVersionRecordSchema
37
- } from "./chunk-M4QTWCJ7.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 {
@@ -206,6 +225,7 @@ var BaseCollections = {
206
225
  WebhookDeliveries: (teamUid) => `team/${teamUid}/webhook-deliveries`,
207
226
  WebhookSecrets: (teamUid) => `team/${teamUid}/webhook-secrets`,
208
227
  WebhookEventClaims: "webhook-event-claims",
228
+ AgentCreditReports: "agent-credit-reports",
209
229
  OauthStates: "oauth-states",
210
230
  Waitlist: "waitlist",
211
231
  BannedUsers: "banned-users",
@@ -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-R3NDJICA.js";
4
+ } from "./chunk-KXMZXTLK.js";
5
5
  import {
6
6
  roleSchema
7
- } from "./chunk-F3TQHNSQ.js";
7
+ } from "./chunk-6BQHLHBE.js";
8
8
  import {
9
9
  output
10
10
  } from "./chunk-T5HJUAWB.js";
@@ -4,7 +4,7 @@ import { createRequire as $$cR } from "node:module"; const require = $$cR(import
4
4
  var AGENT_NOTES = [
5
5
  "Run `scalar <command>` when the CLI is installed, or `npx @scalar/cli <command>` when it is not.",
6
6
  "Run `scalar context` for this command tree as JSON, or `scalar <command> --help` for a single command.",
7
- "Log in with a personal token: `scalar auth login --token <token>`, or set `SCALAR_API_KEY` and run `scalar auth login`. Both store the session on disk for later commands. Without a token, `scalar auth login` opens a browser and waits for a person to log in, so do not run it that way. Check the session with `scalar auth whoami`.",
7
+ "Log in with a personal token: `scalar auth login --token <token>`, or set `SCALAR_API_KEY` and run `scalar auth login`. An explicit --token overrides SCALAR_API_KEY and must not be empty or whitespace-only. Both store the session on disk for later commands. Without a token, `scalar auth login` opens a browser and waits for a person to log in, so do not run it that way. Check the session with `scalar auth whoami`.",
8
8
  "Use --no-input before or after subcommands to disable prompts and browser launches, including under a PTY. Supply required values explicitly; missing inputs fail with exit code 1 and guidance. Piped input is never a confirmation. Cancelled prompts and EOF exit with code 1. The flag does not imply --yes or --force and neither option chooses an unspecified target.",
9
9
  "Many commands prompt when a value is left out, such as a slug, a team, or a confirmation before overwriting a file, and missing values fail when interaction is disabled. Pass every value as an argument or flag: for example `--output` on `document bundle` and `document upgrade`, `--yes` on `project rollback`, and `--force` on `project init`.",
10
10
  "Results go to stdout. Errors go to stderr, prefixed with `[ERROR]`."
@@ -19,6 +19,7 @@ var parseIntegerOption = (value, minimum, maximum) => {
19
19
  };
20
20
  var parsePort = (value) => parseIntegerOption(value, 0, 65535);
21
21
  var parseFetchLimit = (value) => parseIntegerOption(value, 1, Number.MAX_SAFE_INTEGER);
22
+ var parseExitCode = (value) => parseIntegerOption(value, 1, 125);
22
23
 
23
24
  // src/domains/document/bundle/index.ts
24
25
  var DEFAULT_FETCH_CONCURRENCY = 5;
@@ -42,7 +43,7 @@ function BundleCommand() {
42
43
  );
43
44
  completeFiles(cmd, ["file|url"], ["--output"]);
44
45
  cmd.action(async (...args) => {
45
- const { bundleAction } = await import("./action-PBJFNJMY.js");
46
+ const { bundleAction } = await import("./action-3KP3WVPZ.js");
46
47
  return bundleAction(...args);
47
48
  });
48
49
  return cmd;
@@ -51,6 +52,7 @@ function BundleCommand() {
51
52
  export {
52
53
  parsePort,
53
54
  parseFetchLimit,
55
+ parseExitCode,
54
56
  DEFAULT_FETCH_CONCURRENCY,
55
57
  BundleCommand
56
58
  };
@@ -527,6 +527,11 @@ var sharedProjectSchema = entitySchema.extend({
527
527
  agentEnabled: external_exports.boolean().default(false).meta({ examples: [true] }),
528
528
  /** Toggle analytics tracking for the docs project */
529
529
  analyticsEnabled: external_exports.boolean().default(true).meta({ examples: [true] }),
530
+ /**
531
+ * Toggle docs chat insights: redacted transcripts of Ask AI conversations,
532
+ * kept briefly to extract the questions and gaps the dashboard reports
533
+ */
534
+ chatInsightsEnabled: external_exports.boolean().default(true).meta({ examples: [true] }),
530
535
  /** Set of allowed access groups */
531
536
  accessGroups: scalarSet(external_exports.set(nanoidSchema).max(50)).default([]).meta({ examples: [["UakgbKJ5m9gl0JDMbcJqL"]] })
532
537
  }).meta({ id: "shared-project" });
@@ -598,7 +603,9 @@ var forgejoRepositorySchema = external_exports.object({
598
603
  forgejoOwner: external_exports.string(),
599
604
  forgejoRepo: external_exports.string(),
600
605
  branch: external_exports.string().default("main"),
601
- configPath: external_exports.string().default("scalar.config.json")
606
+ configPath: external_exports.string().default("scalar.config.json"),
607
+ /** Forgejo commit whose CLI publish last recorded the config path. */
608
+ configPathCommitSha: external_exports.string().optional()
602
609
  }).meta({ id: "docs-project-repository-forgejo" });
603
610
  var githubRepositorySchema = external_exports.object({
604
611
  provider: external_exports.literal("github"),
@@ -0,0 +1,15 @@
1
+ import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
+
3
+ // src/domains/document/helpers/safe-normalize.ts
4
+ import { normalize } from "@scalar/json-magic/helpers/normalize";
5
+ var safeNormalize = (value) => {
6
+ try {
7
+ return normalize(value);
8
+ } catch {
9
+ return void 0;
10
+ }
11
+ };
12
+
13
+ export {
14
+ safeNormalize
15
+ };
@@ -1,16 +1,16 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  getPublishDeploymentUrl
4
- } from "./chunk-NOD4CBF7.js";
4
+ } from "./chunk-WZSU45SV.js";
5
5
  import {
6
6
  writeJson
7
7
  } from "./chunk-SNQFFEYH.js";
8
8
  import {
9
9
  createDatabaseClient
10
- } from "./chunk-HZ4UKLOE.js";
10
+ } from "./chunk-QTMJ3VUZ.js";
11
11
  import {
12
12
  publishRecordSchema
13
- } from "./chunk-VRZSDUZK.js";
13
+ } from "./chunk-BOCMOHQA.js";
14
14
  import {
15
15
  output
16
16
  } from "./chunk-T5HJUAWB.js";
@@ -2,7 +2,7 @@ import { createRequire as $$cR } from "node:module"; const require = $$cR(import
2
2
  import {
3
3
  err,
4
4
  ok
5
- } from "./chunk-5ENKYZA4.js";
5
+ } from "./chunk-4S3DGMMZ.js";
6
6
 
7
7
  // src/helpers/input-error.ts
8
8
  var causes = {
@@ -1,7 +1,7 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  baseRegistrySchema
4
- } from "./chunk-M4QTWCJ7.js";
4
+ } from "./chunk-7PNOYE6B.js";
5
5
  import {
6
6
  brandedUid,
7
7
  docVersionSchema,
@@ -3,7 +3,7 @@ import {
3
3
  emailAllowanceSchema,
4
4
  teamImageSchema,
5
5
  teamNameSchema
6
- } from "./chunk-F3TQHNSQ.js";
6
+ } from "./chunk-6BQHLHBE.js";
7
7
  import {
8
8
  brandedUid,
9
9
  emailSchema,
@@ -0,0 +1,27 @@
1
+ import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
+ import {
3
+ fetchFromRegistry
4
+ } from "./chunk-VJ7FHLN4.js";
5
+ import {
6
+ registry
7
+ } from "./chunk-S3U2VMVL.js";
8
+ import {
9
+ getAuthData
10
+ } from "./chunk-AAWPGVMG.js";
11
+
12
+ // src/domains/schema/download.ts
13
+ async function downloadSchema(input) {
14
+ const auth = await getAuthData();
15
+ auth.addEventListener((state) => Object.assign(auth, state));
16
+ return fetchFromRegistry(
17
+ registry(input.namespace).schemas(input.slug).url({
18
+ version: input.version,
19
+ format: input.format
20
+ }),
21
+ auth.accessToken
22
+ );
23
+ }
24
+
25
+ export {
26
+ downloadSchema
27
+ };
@@ -14,16 +14,16 @@ import {
14
14
  webhookSubscriptionSchema,
15
15
  workspaceSchema,
16
16
  workspaceVersionSchema
17
- } from "./chunk-P4EPNS46.js";
17
+ } from "./chunk-7FS7BAUX.js";
18
18
  import {
19
19
  userSchema
20
- } from "./chunk-YTTDYTVB.js";
20
+ } from "./chunk-F5Q7FJRG.js";
21
21
  import {
22
22
  sdkSchema
23
- } from "./chunk-RQNLEGMQ.js";
23
+ } from "./chunk-EOTD7HAV.js";
24
24
  import {
25
25
  mcpEnvironmentSchema
26
- } from "./chunk-FXELV3AW.js";
26
+ } from "./chunk-W7P6VTCG.js";
27
27
  import {
28
28
  RENEWAL_MARGIN_MS,
29
29
  SESSION_EXPIRED,
@@ -33,10 +33,10 @@ import {
33
33
  needsRenewal,
34
34
  refreshToken,
35
35
  renewAuth
36
- } from "./chunk-QS2T7JAK.js";
36
+ } from "./chunk-AAWPGVMG.js";
37
37
  import {
38
38
  config
39
- } from "./chunk-R3NDJICA.js";
39
+ } from "./chunk-KXMZXTLK.js";
40
40
  import {
41
41
  UnifiedDocsMigrationStatus,
42
42
  pendingInviteSchema,
@@ -46,18 +46,18 @@ import {
46
46
  teamNameSchema,
47
47
  teamSdkPricing,
48
48
  userRefSchema
49
- } from "./chunk-F3TQHNSQ.js";
49
+ } from "./chunk-6BQHLHBE.js";
50
50
  import {
51
51
  docsProjectSchema,
52
52
  githubInstallSchema,
53
53
  githubProjectSchema,
54
54
  themeSchema
55
- } from "./chunk-VRZSDUZK.js";
55
+ } from "./chunk-BOCMOHQA.js";
56
56
  import {
57
57
  managedDocSchema,
58
58
  managedDocVersionSchema,
59
59
  ruleSchema
60
- } from "./chunk-JHJDLZSM.js";
60
+ } from "./chunk-2KSOARE4.js";
61
61
  import {
62
62
  createdMcpServerSchema,
63
63
  docInstanceSchema,
@@ -67,7 +67,7 @@ import {
67
67
  registryGitBindingSchema,
68
68
  registryPublishRecordSchema,
69
69
  secretMetadataSchema
70
- } from "./chunk-M4QTWCJ7.js";
70
+ } from "./chunk-7PNOYE6B.js";
71
71
  import {
72
72
  teamEnvironmentSchema
73
73
  } from "./chunk-Q26DFKTY.js";
@@ -174,6 +174,61 @@ function accessGroupsApiFactory(requestService) {
174
174
  };
175
175
  }
176
176
 
177
+ // ../../packages/bigquery/dist/chat-schemas.js
178
+ var chatWeekKeySchema = external_exports.iso.date();
179
+ var count = external_exports.number().int().nonnegative();
180
+ var rate = external_exports.number().min(0).max(1);
181
+ var examples = external_exports.array(external_exports.string()).max(5);
182
+ var chatWeekSchema = external_exports.object({
183
+ week: chatWeekKeySchema,
184
+ questions: count,
185
+ conversations: count,
186
+ readers: count,
187
+ mean_turns: external_exports.number().nonnegative(),
188
+ no_answer_rate: rate,
189
+ abort_rate: rate
190
+ });
191
+ var chatPageCountSchema = external_exports.object({ path: external_exports.string(), count });
192
+ var chatTopicSchema = external_exports.object({
193
+ topic_ref: external_exports.string(),
194
+ topic_label: external_exports.string(),
195
+ conversations: count,
196
+ readers: count,
197
+ answered_rate: rate,
198
+ example_paraphrases: examples
199
+ });
200
+ var chatGapSchema = external_exports.object({
201
+ label: external_exports.string(),
202
+ gap_description: external_exports.string(),
203
+ conversations: count,
204
+ readers: count,
205
+ not_answered_rate: rate,
206
+ example_paraphrases: examples
207
+ });
208
+ var chatOutcomeWeekSchema = external_exports.object({
209
+ week: chatWeekKeySchema,
210
+ answered: count,
211
+ partially_answered: count,
212
+ not_answered: count,
213
+ off_topic: count
214
+ });
215
+ var chatWeekResultSchema = external_exports.object({
216
+ week: chatWeekKeySchema,
217
+ weeks: external_exports.array(chatWeekSchema),
218
+ pages: external_exports.object({
219
+ asked_from: external_exports.array(chatPageCountSchema),
220
+ cited: external_exports.array(chatPageCountSchema)
221
+ }),
222
+ topics: external_exports.array(chatTopicSchema),
223
+ gaps: external_exports.array(chatGapSchema),
224
+ outcomes: external_exports.array(chatOutcomeWeekSchema),
225
+ digest: external_exports.string().nullable()
226
+ });
227
+ var chatAnalyticsQuerySchema = external_exports.object({
228
+ week: chatWeekKeySchema.optional(),
229
+ weeks: external_exports.coerce.number().int().min(1).max(13).default(8)
230
+ });
231
+
177
232
  // ../../packages/bigquery/dist/schemas.js
178
233
  var consumerTypeSchema = external_exports.enum(["human", "bot", "llm", "mcp"]);
179
234
  var timeseriesPointSchema = external_exports.object({
@@ -302,12 +357,23 @@ function analyticsApiFactory(requestService) {
302
357
  schema: feedbackResultSchema
303
358
  });
304
359
  }
360
+ async function getChatWeek(projectUid, args = {}) {
361
+ return requestService.request({
362
+ url: `core/analytics/projects/${projectUid}/chat${buildQuery({
363
+ week: args.week,
364
+ weeks: args.weeks
365
+ })}`,
366
+ method: "get",
367
+ schema: chatWeekResultSchema
368
+ });
369
+ }
305
370
  return {
306
371
  getOverview,
307
372
  getPages,
308
373
  getReferrers,
309
374
  getConsumers,
310
- getFeedback
375
+ getFeedback,
376
+ getChatWeek
311
377
  };
312
378
  }
313
379
 
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  err,
7
7
  ok
8
- } from "./chunk-5ENKYZA4.js";
8
+ } from "./chunk-4S3DGMMZ.js";
9
9
 
10
10
  // src/helpers/url-opener.ts
11
11
  import { spawn } from "node:child_process";
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  err,
7
7
  ok
8
- } from "./chunk-5ENKYZA4.js";
8
+ } from "./chunk-4S3DGMMZ.js";
9
9
  import {
10
10
  external_exports
11
11
  } from "./chunk-I57ID5K7.js";
@@ -0,0 +1,9 @@
1
+ import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
+
3
+ // ../../node_modules/.pnpm/@scalar+helpers@0.16.4/node_modules/@scalar/helpers/dist/object/prevent-pollution.js
4
+ var PROTOTYPE_POLLUTION_KEYS = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
5
+ var isPollutionKey = (key) => PROTOTYPE_POLLUTION_KEYS.has(key);
6
+
7
+ export {
8
+ isPollutionKey
9
+ };