@taggor/contract 0.4.0 → 0.6.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 (267) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/artifact-keys.d.ts +11 -11
  3. package/dist/artifact-keys.d.ts.map +1 -1
  4. package/dist/artifact-keys.js +11 -11
  5. package/dist/artifact-keys.js.map +1 -1
  6. package/dist/assets.d.ts +5 -5
  7. package/dist/assets.js +5 -5
  8. package/dist/bounded-path.d.ts +2 -2
  9. package/dist/bounded-path.js +2 -2
  10. package/dist/bounded.d.ts +2 -2
  11. package/dist/bounded.js +2 -2
  12. package/dist/build-diagnostic.d.ts +5 -5
  13. package/dist/build-diagnostic.js +5 -5
  14. package/dist/component-types.d.ts +7 -7
  15. package/dist/component-types.js +4 -4
  16. package/dist/component-types.js.map +1 -1
  17. package/dist/contract-version.d.ts +17 -12
  18. package/dist/contract-version.d.ts.map +1 -1
  19. package/dist/contract-version.js +24 -17
  20. package/dist/contract-version.js.map +1 -1
  21. package/dist/credential-fields.d.ts +1 -1
  22. package/dist/credential-fields.js +1 -1
  23. package/dist/css-tokens.d.ts +1 -1
  24. package/dist/css-tokens.js +1 -1
  25. package/dist/css-value.d.ts +4 -4
  26. package/dist/css-value.js +4 -4
  27. package/dist/data-api.d.ts +14 -44
  28. package/dist/data-api.d.ts.map +1 -1
  29. package/dist/data-api.js +20 -54
  30. package/dist/data-api.js.map +1 -1
  31. package/dist/denylist-keys.d.ts +1 -1
  32. package/dist/denylist-keys.js +4 -4
  33. package/dist/diagnostic-catalog.d.ts +63 -89
  34. package/dist/diagnostic-catalog.d.ts.map +1 -1
  35. package/dist/diagnostic-catalog.js +63 -87
  36. package/dist/diagnostic-catalog.js.map +1 -1
  37. package/dist/dom-members.snapshot.d.ts +4 -4
  38. package/dist/dom-members.snapshot.js +8 -8
  39. package/dist/early-loading.d.ts +1 -1
  40. package/dist/early-loading.js +1 -1
  41. package/dist/error-catalog.d.ts +81 -7
  42. package/dist/error-catalog.d.ts.map +1 -1
  43. package/dist/error-catalog.js +121 -51
  44. package/dist/error-catalog.js.map +1 -1
  45. package/dist/error-titles-pt-br.d.ts +13 -0
  46. package/dist/error-titles-pt-br.d.ts.map +1 -0
  47. package/dist/error-titles-pt-br.js +99 -0
  48. package/dist/error-titles-pt-br.js.map +1 -0
  49. package/dist/event-params.d.ts +41 -0
  50. package/dist/event-params.d.ts.map +1 -0
  51. package/dist/event-params.js +92 -0
  52. package/dist/event-params.js.map +1 -0
  53. package/dist/executable-config.d.ts +1 -1
  54. package/dist/freeze.d.ts +2 -2
  55. package/dist/freeze.js +2 -2
  56. package/dist/gunzip.d.ts +3 -3
  57. package/dist/gunzip.js +4 -4
  58. package/dist/gunzip.js.map +1 -1
  59. package/dist/hostname.d.ts +5 -6
  60. package/dist/hostname.d.ts.map +1 -1
  61. package/dist/hostname.js +7 -8
  62. package/dist/hostname.js.map +1 -1
  63. package/dist/human-actions.d.ts +3 -3
  64. package/dist/index.d.ts +11 -8
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +11 -8
  67. package/dist/index.js.map +1 -1
  68. package/dist/json-schema.d.ts +15 -15
  69. package/dist/json-schema.d.ts.map +1 -1
  70. package/dist/json-schema.js +20 -28
  71. package/dist/json-schema.js.map +1 -1
  72. package/dist/key-checksum.d.ts +1 -1
  73. package/dist/key-checksum.js +1 -1
  74. package/dist/libraries.d.ts +4 -4
  75. package/dist/libraries.d.ts.map +1 -1
  76. package/dist/libraries.js +4 -4
  77. package/dist/libraries.js.map +1 -1
  78. package/dist/limit-catalog.d.ts +19 -40
  79. package/dist/limit-catalog.d.ts.map +1 -1
  80. package/dist/limit-catalog.js +34 -55
  81. package/dist/limit-catalog.js.map +1 -1
  82. package/dist/limits.d.ts +22 -34
  83. package/dist/limits.d.ts.map +1 -1
  84. package/dist/limits.js +23 -35
  85. package/dist/limits.js.map +1 -1
  86. package/dist/locale-tag.d.ts +3 -3
  87. package/dist/locale-tag.js +3 -3
  88. package/dist/make-diagnostic.d.ts +2 -3
  89. package/dist/make-diagnostic.d.ts.map +1 -1
  90. package/dist/make-diagnostic.js.map +1 -1
  91. package/dist/manifest-compat-diagnostics.d.ts +1 -1
  92. package/dist/manifest-compat.js +1 -1
  93. package/dist/manifest.d.ts +44 -24
  94. package/dist/manifest.d.ts.map +1 -1
  95. package/dist/manifest.js +41 -61
  96. package/dist/manifest.js.map +1 -1
  97. package/dist/metering.d.ts +33 -21
  98. package/dist/metering.d.ts.map +1 -1
  99. package/dist/metering.js +33 -21
  100. package/dist/metering.js.map +1 -1
  101. package/dist/migrate.d.ts +1 -1
  102. package/dist/migrate.js +5 -5
  103. package/dist/migrate.js.map +1 -1
  104. package/dist/money.d.ts +2 -2
  105. package/dist/money.js +2 -2
  106. package/dist/names.d.ts +4 -4
  107. package/dist/names.js +4 -4
  108. package/dist/overage-pricing.d.ts +1 -1
  109. package/dist/overage-pricing.js +1 -1
  110. package/dist/plan-ids.d.ts +1 -1
  111. package/dist/plan-ids.js +1 -1
  112. package/dist/plan-limits.d.ts +13 -13
  113. package/dist/plan-limits.d.ts.map +1 -1
  114. package/dist/plan-limits.js +8 -8
  115. package/dist/plan-limits.js.map +1 -1
  116. package/dist/plan-pricing.d.ts +33 -62
  117. package/dist/plan-pricing.d.ts.map +1 -1
  118. package/dist/plan-pricing.js +20 -67
  119. package/dist/plan-pricing.js.map +1 -1
  120. package/dist/plan-usage.d.ts +18 -18
  121. package/dist/plan-usage.d.ts.map +1 -1
  122. package/dist/plan-usage.js +19 -20
  123. package/dist/plan-usage.js.map +1 -1
  124. package/dist/preview-token.js +2 -2
  125. package/dist/prop-names.d.ts +5 -5
  126. package/dist/prop-names.d.ts.map +1 -1
  127. package/dist/prop-names.js +10 -10
  128. package/dist/prop-names.js.map +1 -1
  129. package/dist/prop-type-docs.js +1 -1
  130. package/dist/prop-types.d.ts +6 -6
  131. package/dist/prop-types.js +16 -16
  132. package/dist/prop-types.js.map +1 -1
  133. package/dist/props.d.ts +5 -5
  134. package/dist/props.js +6 -6
  135. package/dist/props.js.map +1 -1
  136. package/dist/proto-guard.js +3 -3
  137. package/dist/proto-guard.js.map +1 -1
  138. package/dist/runtime-errors.d.ts +2 -2
  139. package/dist/runtime-errors.js +2 -2
  140. package/dist/runtime-pointers.d.ts +2 -2
  141. package/dist/runtime-pointers.js +2 -2
  142. package/{schema → dist/schema}/component-manifest.v1.json +7 -14
  143. package/{schema → dist/schema}/data-api.v1.json +4 -39
  144. package/dist/secret-scan.d.ts +10 -10
  145. package/dist/secret-scan.d.ts.map +1 -1
  146. package/dist/secret-scan.js +15 -16
  147. package/dist/secret-scan.js.map +1 -1
  148. package/dist/semver.d.ts +2 -2
  149. package/dist/semver.js +2 -2
  150. package/dist/server-key.js +1 -1
  151. package/dist/site-manifest-keys.d.ts +11 -11
  152. package/dist/site-manifest-keys.d.ts.map +1 -1
  153. package/dist/site-manifest-keys.js +18 -18
  154. package/dist/site-manifest-keys.js.map +1 -1
  155. package/dist/site-manifest.d.ts +3 -10
  156. package/dist/site-manifest.d.ts.map +1 -1
  157. package/dist/site-manifest.js +12 -15
  158. package/dist/site-manifest.js.map +1 -1
  159. package/dist/source-archive.d.ts +13 -13
  160. package/dist/source-archive.js +25 -25
  161. package/dist/source-archive.js.map +1 -1
  162. package/dist/source-package-corpus.d.ts +3 -4
  163. package/dist/source-package-corpus.d.ts.map +1 -1
  164. package/dist/source-package-corpus.js +4 -6
  165. package/dist/source-package-corpus.js.map +1 -1
  166. package/dist/source-package.d.ts +17 -17
  167. package/dist/source-package.d.ts.map +1 -1
  168. package/dist/source-package.js +15 -15
  169. package/dist/source-package.js.map +1 -1
  170. package/dist/source-secrets.js +1 -1
  171. package/dist/ssr-cap.d.ts +2 -2
  172. package/dist/ssr-cap.d.ts.map +1 -1
  173. package/dist/ssr-cap.js +4 -4
  174. package/dist/ssr-kv.d.ts +1 -1
  175. package/dist/ssr-kv.js +1 -1
  176. package/dist/ssr-render.d.ts +2 -2
  177. package/dist/ssr-render.d.ts.map +1 -1
  178. package/dist/ssr-render.js +3 -3
  179. package/dist/ssr-render.js.map +1 -1
  180. package/dist/ssr-version-ledger.js +3 -3
  181. package/dist/style-references.d.ts +2 -3
  182. package/dist/style-references.d.ts.map +1 -1
  183. package/dist/style-references.js +10 -11
  184. package/dist/style-references.js.map +1 -1
  185. package/dist/support-contact.d.ts +11 -0
  186. package/dist/support-contact.d.ts.map +1 -0
  187. package/dist/support-contact.js +11 -0
  188. package/dist/support-contact.js.map +1 -0
  189. package/dist/tag-name.d.ts +6 -6
  190. package/dist/tag-name.d.ts.map +1 -1
  191. package/dist/tag-name.js +7 -7
  192. package/dist/tag-name.js.map +1 -1
  193. package/dist/tar-writer.js +1 -1
  194. package/dist/testing.d.ts +1 -1
  195. package/dist/testing.js +1 -1
  196. package/dist/text-codec.d.ts +2 -2
  197. package/dist/text-codec.js +2 -2
  198. package/dist/url-value.d.ts +1 -1
  199. package/dist/url-value.d.ts.map +1 -1
  200. package/dist/url-value.js +7 -7
  201. package/dist/url-value.js.map +1 -1
  202. package/dist/usage-guard.d.ts +16 -16
  203. package/dist/usage-guard.js +15 -15
  204. package/dist/usage-mirror.d.ts +5 -5
  205. package/dist/value-check.d.ts +6 -6
  206. package/dist/value-check.js +20 -20
  207. package/dist/value-check.js.map +1 -1
  208. package/dist/value-patterns.js +2 -2
  209. package/dist/value-schema.d.ts +3 -3
  210. package/dist/value-schema.d.ts.map +1 -1
  211. package/dist/value-schema.js +4 -4
  212. package/dist/value-schema.js.map +1 -1
  213. package/dist/zod-free.d.ts +25 -25
  214. package/dist/zod-free.d.ts.map +1 -1
  215. package/dist/zod-free.js +26 -26
  216. package/dist/zod-free.js.map +1 -1
  217. package/package.json +9 -10
  218. package/dist/consent-text.d.ts +0 -31
  219. package/dist/consent-text.d.ts.map +0 -1
  220. package/dist/consent-text.js +0 -41
  221. package/dist/consent-text.js.map +0 -1
  222. package/schema/DEPLOYED +0 -12
  223. package/schema/published/SHA256SUMS +0 -41
  224. package/schema/published/build-diagnostic/v1.10.json +0 -83
  225. package/schema/published/build-diagnostic/v1.11.json +0 -83
  226. package/schema/published/build-diagnostic/v1.3.json +0 -83
  227. package/schema/published/build-diagnostic/v1.4.json +0 -83
  228. package/schema/published/build-diagnostic/v1.5.json +0 -83
  229. package/schema/published/build-diagnostic/v1.6.json +0 -83
  230. package/schema/published/build-diagnostic/v1.7.json +0 -83
  231. package/schema/published/build-diagnostic/v1.8.json +0 -83
  232. package/schema/published/build-diagnostic/v1.9.json +0 -83
  233. package/schema/published/component-manifest/v1.10.json +0 -1443
  234. package/schema/published/component-manifest/v1.11.json +0 -1443
  235. package/schema/published/component-manifest/v1.3.json +0 -1411
  236. package/schema/published/component-manifest/v1.4.json +0 -1419
  237. package/schema/published/component-manifest/v1.5.json +0 -1437
  238. package/schema/published/component-manifest/v1.6.json +0 -1437
  239. package/schema/published/component-manifest/v1.7.json +0 -1437
  240. package/schema/published/component-manifest/v1.8.json +0 -1437
  241. package/schema/published/component-manifest/v1.9.json +0 -1437
  242. package/schema/published/data-api/v1.10.json +0 -282
  243. package/schema/published/data-api/v1.11.json +0 -282
  244. package/schema/published/data-api/v1.3.json +0 -281
  245. package/schema/published/data-api/v1.4.json +0 -281
  246. package/schema/published/data-api/v1.5.json +0 -281
  247. package/schema/published/data-api/v1.6.json +0 -281
  248. package/schema/published/data-api/v1.7.json +0 -281
  249. package/schema/published/data-api/v1.8.json +0 -282
  250. package/schema/published/data-api/v1.9.json +0 -282
  251. package/schema/published/library-manifest/v1.10.json +0 -68
  252. package/schema/published/library-manifest/v1.11.json +0 -68
  253. package/schema/published/library-manifest/v1.5.json +0 -68
  254. package/schema/published/library-manifest/v1.6.json +0 -68
  255. package/schema/published/library-manifest/v1.7.json +0 -68
  256. package/schema/published/library-manifest/v1.8.json +0 -68
  257. package/schema/published/library-manifest/v1.9.json +0 -68
  258. package/schema/published/taggor-config/v1.10.json +0 -56
  259. package/schema/published/taggor-config/v1.11.json +0 -56
  260. package/schema/published/taggor-config/v1.5.json +0 -56
  261. package/schema/published/taggor-config/v1.6.json +0 -56
  262. package/schema/published/taggor-config/v1.7.json +0 -56
  263. package/schema/published/taggor-config/v1.8.json +0 -56
  264. package/schema/published/taggor-config/v1.9.json +0 -56
  265. /package/{schema → dist/schema}/build-diagnostic.v1.json +0 -0
  266. /package/{schema → dist/schema}/library-manifest.v1.json +0 -0
  267. /package/{schema → dist/schema}/taggor-config.v1.json +0 -0
package/dist/migrate.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
- * Migration of manifests between contract majors (TAG-207).
2
+ * Migration of manifests between contract majors.
3
3
  *
4
4
  * When a major ships, the change that bumps `CONTRACT_MAJOR` adds one step `from: N, to: N + 1`
5
5
  * to `MANIFEST_MIGRATIONS`: a pure function from a manifest of major N to an equivalent manifest
6
6
  * of major N + 1 (renames, removed fields mapped to their replacement, new required fields given
7
7
  * their old implicit value). `migrateManifest` chains the steps. The compatibility test
8
- * (compat.test.ts) runs every fixture of an older major through it and requires the result to
8
+ * (compat.test.ts) runs every sample of an older major through it and requires the result to
9
9
  * pass the current schema, so a major cannot ship without its migration.
10
10
  *
11
11
  * A migration is applied when a manifest is read for a new build or for display, never written
@@ -13,7 +13,7 @@
13
13
  * explicit action of the customer (golden rule 3).
14
14
  *
15
15
  * The input is untrusted (golden rule 5) and the runtime may call this on a host page (golden rule
16
- * 2), so it never throws (TAG-220): every refusal is a result with a stable `reason`.
16
+ * 2), so it never throws: every refusal is a result with a stable `reason`.
17
17
  *
18
18
  * Zod-free and pure. The output is not validated here: callers parse it (`parseManifest`).
19
19
  */
@@ -38,7 +38,7 @@ const SAFE_ERROR_NAME = /^[A-Za-z][A-Za-z0-9]{0,63}$/;
38
38
  * Name of a caught value, for a message that never echoes input data. The value may come from the
39
39
  * input (a throwing `toJSON` or getter): `instanceof` runs a Proxy's `getPrototypeOf` trap and
40
40
  * `.name` may be a getter, both of which can throw, so they run inside a try and the name is
41
- * echoed only when it is a short identifier (TAG-220).
41
+ * echoed only when it is a short identifier.
42
42
  */
43
43
  function errorName(error) {
44
44
  try {
@@ -111,7 +111,7 @@ export function migrateManifest(input, options = {}) {
111
111
  try {
112
112
  // The first scan refuses what is too large before JSON.stringify walks it (a sparse array of
113
113
  // length 2**32 - 1 used to throw a RangeError here); the second one checks what the copy
114
- // really holds, since a toJSON may produce anything (TAG-220).
114
+ // really holds, since a toJSON may produce anything.
115
115
  const scanned = checkDocument(input, "manifest");
116
116
  if (!scanned.ok)
117
117
  return scanned;
@@ -1 +1 @@
1
- {"version":3,"file":"migrate.js","sourceRoot":"","sources":["../src/migrate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAezE;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAiC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAqDnF,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAID,SAAS,OAAO,CAAC,MAAgC,EAAE,OAAe;IAChE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AACxC,CAAC;AAED,oEAAoE;AACpE,MAAM,eAAe,GAAG,6BAA6B,CAAC;AAEtD;;;;;GAKG;AACH,SAAS,SAAS,CAAC,KAAc;IAC/B,IAAI,CAAC;QACH,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,MAAM,IAAI,GAAY,KAAK,CAAC,IAAI,CAAC;YACj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AK,CAAC,EAAE,CAC5F,CAAC;YACF,OAAO,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;QACtF,CAAC;QACD,MAAM,eAAe,GAAG,UAAU,CAAC,QAAQ,CAAC;YAC1C,CAAC,CAAC,oBAAoB,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;YACnD,CAAC,CAAC,SAAS,CAAC;QACd,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,eAAe,EAAE,KAAK,KAAK,IAAI,CAAC,EAAE,EAAE,CAAC;YAChE,OAAO,OAAO,CACZ,UAAU,EACV,uBAAuB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,mCAAmC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CACrG,CAAC;QACJ,CAAC;QACD,QAAQ,GAAG,QAAQ,CAAC;IACtB,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;AACjE,CAAC"}
package/dist/money.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * The one formatter of US dollar amounts for every surface (TAG-1635): the portal, the staff
2
+ * The one formatter of US dollar amounts for every surface: the portal, the staff
3
3
  * backoffice, the CLI and the public site read money through these functions, so a figure is written
4
- * the same way everywhere and its rounding is defined once. Money is always US dollars (decision 68).
4
+ * the same way everywhere and its rounding is defined once. Money is always US dollars.
5
5
  *
6
6
  * Rounding rule: an amount of micro dollars is shown in whole cents rounded DOWN, because an estimate
7
7
  * must never overstate a bill (the CLOSE bills the ledger, not this text). A price per unit
package/dist/money.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * The one formatter of US dollar amounts for every surface (TAG-1635): the portal, the staff
2
+ * The one formatter of US dollar amounts for every surface: the portal, the staff
3
3
  * backoffice, the CLI and the public site read money through these functions, so a figure is written
4
- * the same way everywhere and its rounding is defined once. Money is always US dollars (decision 68).
4
+ * the same way everywhere and its rounding is defined once. Money is always US dollars.
5
5
  *
6
6
  * Rounding rule: an amount of micro dollars is shown in whole cents rounded DOWN, because an estimate
7
7
  * must never overstate a bill (the CLOSE bills the ledger, not this text). A price per unit
package/dist/names.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  /**
2
- * Identifier schemas of component contract v1 (TAG-201): component name, prop, event, slot, part, CSS
3
- * variable, collection and field names. Custom element tags live in `tag-name.ts` (TAG-204).
2
+ * Identifier schemas of component contract v1: component name, prop, event, slot, part, CSS
3
+ * variable, collection and field names. Custom element tags live in `tag-name.ts`.
4
4
  *
5
5
  * Every rule is a plain regular expression, so the generated JSON Schema enforces exactly what Zod
6
6
  * enforces (no refinement that only Zod would see). Lookaheads carry the deny lists (prop names
7
7
  * that would collide with the host element). The prop name rules themselves live in the Zod-free
8
- * `prop-names.ts` (TAG-205), which the runtime may import.
8
+ * `prop-names.ts`, which the runtime may import.
9
9
  */
10
10
  import * as z from "zod";
11
11
  /** Kebab-case member name: events, slots, parts, collections, track events, component name. */
12
12
  export declare const KEBAB_NAME_PATTERN: RegExp;
13
13
  /**
14
- * `Object.prototype` members a field name must not be (TAG-205): validators and consumers read
14
+ * `Object.prototype` members a field name must not be: validators and consumers read
15
15
  * `value[name]`, which finds the inherited member when the field is absent (Zod's object schema
16
16
  * then rejects every value without a `toString` field, and component code may call it).
17
17
  */
package/dist/names.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
- * Identifier schemas of component contract v1 (TAG-201): component name, prop, event, slot, part, CSS
3
- * variable, collection and field names. Custom element tags live in `tag-name.ts` (TAG-204).
2
+ * Identifier schemas of component contract v1: component name, prop, event, slot, part, CSS
3
+ * variable, collection and field names. Custom element tags live in `tag-name.ts`.
4
4
  *
5
5
  * Every rule is a plain regular expression, so the generated JSON Schema enforces exactly what Zod
6
6
  * enforces (no refinement that only Zod would see). Lookaheads carry the deny lists (prop names
7
7
  * that would collide with the host element). The prop name rules themselves live in the Zod-free
8
- * `prop-names.ts` (TAG-205), which the runtime may import.
8
+ * `prop-names.ts`, which the runtime may import.
9
9
  */
10
10
  import * as z from "zod";
11
11
  import { DOM_MEMBER_SNAPSHOT } from "./dom-members.snapshot.js";
@@ -28,7 +28,7 @@ const KEBAB_BODY = "[a-z][a-z0-9]*(?:-[a-z0-9]+)*";
28
28
  /** Kebab-case member name: events, slots, parts, collections, track events, component name. */
29
29
  export const KEBAB_NAME_PATTERN = new RegExp(`^${KEBAB_BODY}$`);
30
30
  /**
31
- * `Object.prototype` members a field name must not be (TAG-205): validators and consumers read
31
+ * `Object.prototype` members a field name must not be: validators and consumers read
32
32
  * `value[name]`, which finds the inherited member when the field is absent (Zod's object schema
33
33
  * then rejects every value without a `toString` field, and component code may call it).
34
34
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The overage rate table as DATA (TAG-1629, owner decision of 2026-11-14): one row per
2
+ * The overage rate table as DATA: one row per
3
3
  * (metric, paid plan, version) with the instant it starts to apply, in micro US dollars. The rows
4
4
  * live in the database (`overage_rates`) and staff edits them; `OVERAGE_RATES` in `plan-pricing.ts`
5
5
  * is only the seed of version 1. This module is the pure part every reader shares: the row shape,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The overage rate table as DATA (TAG-1629, owner decision of 2026-11-14): one row per
2
+ * The overage rate table as DATA: one row per
3
3
  * (metric, paid plan, version) with the instant it starts to apply, in micro US dollars. The rows
4
4
  * live in the database (`overage_rates`) and staff edits them; `OVERAGE_RATES` in `plan-pricing.ts`
5
5
  * is only the seed of version 1. This module is the pure part every reader shares: the row shape,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The plan ids, apart from every table that has a row per plan (TAG-1627): the limit catalog
2
+ * The plan ids, apart from every table that has a row per plan: the limit catalog
3
3
  * (`limit-catalog.ts`) and `planLimits` both need them, and neither may import the other first.
4
4
  * Zod-free.
5
5
  */
package/dist/plan-ids.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The plan ids, apart from every table that has a row per plan (TAG-1627): the limit catalog
2
+ * The plan ids, apart from every table that has a row per plan: the limit catalog
3
3
  * (`limit-catalog.ts`) and `planLimits` both need them, and neither may import the other first.
4
4
  * Zod-free.
5
5
  */
@@ -15,15 +15,15 @@ export interface PlanLimits {
15
15
  /** What visitors download: the bundle and the CSS together. */
16
16
  readonly maxOutputBytes: number;
17
17
  /**
18
- * One asset file a component imports (TAG-410: an image or a WOFF2 font, as stored), at most the
18
+ * One asset file a component imports (an image or a WOFF2 font, as stored), at most the
19
19
  * contract's `ASSET_LIMITS.assetMaxBytes`; over it the build fails with `ASSET_TOO_LARGE`.
20
20
  */
21
21
  readonly maxAssetBytes: number;
22
- /** All the asset files one component imports together (TAG-410, `ASSET_TOO_LARGE`). */
22
+ /** All the asset files one component imports together (`ASSET_TOO_LARGE`). */
23
23
  readonly maxAssetsBytes: number;
24
24
  /**
25
- * Builds a workspace may queue in a rolling 7-day window (the API's `POST /builds`, decision 78):
26
- * one limit, one window, no hourly or daily sublimit beside it (decision 79).
25
+ * Builds a workspace may queue in a rolling 7-day window (the API's `POST /builds`):
26
+ * one limit, one window, no hourly or daily sublimit beside it.
27
27
  */
28
28
  readonly buildsPerWeek: number;
29
29
  /** Builds of one workspace running at once; always fewer than the container instances. */
@@ -73,7 +73,7 @@ export declare function planAbove(limit: PlanLimitName, current: number, plans?:
73
73
  * Inputs: the current time. Output: seconds. Errors: none. Side effects: none.
74
74
  */
75
75
  export declare function secondsUntilNextUtcDay(now: Date): number;
76
- /** The window of `buildsPerWeek`: a rolling 7 days (decision 78). */
76
+ /** The window of `buildsPerWeek`: a rolling 7 days. */
77
77
  export declare const BUILD_WINDOW_MS: number;
78
78
  /** When a full build window frees a place, and how long a client waits for it. */
79
79
  export interface BuildWindowReset {
@@ -93,31 +93,31 @@ export interface BuildWindowReset {
93
93
  export declare function buildWindowReset(freeingBuildCreatedAt: Date, now: Date): BuildWindowReset;
94
94
  /** What each plan allows a workspace to HOLD (as opposed to `PlanLimits`, what one build may use). */
95
95
  export interface PlanQuotas {
96
- /** Sites (not deleted) at once; `POST /v1/sites` answers 409 `site_quota_exceeded` past it (TAG-622). */
96
+ /** Sites (not deleted) at once; `POST /v1/sites` answers 409 `site_quota_exceeded` past it. */
97
97
  readonly maxSites: number;
98
- /** Unrevoked API keys at once; `POST /v1/api-keys` answers 409 `api_key_quota_exceeded` past it (TAG-924). */
98
+ /** Unrevoked API keys at once; `POST /v1/api-keys` answers 409 `api_key_quota_exceeded` past it. */
99
99
  readonly activeApiKeys: number;
100
100
  /**
101
- * Unrevoked API keys one admin or member may have created at once (TAG-2293); an owner is bound
101
+ * Unrevoked API keys one admin or member may have created at once; an owner is bound
102
102
  * by `activeApiKeys` only. Past it, `POST /v1/api-keys` answers 409 `api_key_quota_exceeded`.
103
103
  */
104
104
  readonly activeApiKeysPerCreator: number;
105
105
  /**
106
- * Places of `activeApiKeys` that only an owner may fill (TAG-2293), so no admin or member, even
106
+ * Places of `activeApiKeys` that only an owner may fill, so no admin or member, even
107
107
  * several together, can leave the owner without a place to create a key.
108
108
  */
109
109
  readonly ownerReservedApiKeys: number;
110
110
  /**
111
- * Components attached to one site at once (TAG-1623, decision 77); an attach past it answers 409
112
- * `site_component_limit`. PROVISIONAL until the owner approves the plans (TAG-1602). It only
111
+ * Components attached to one site at once; an attach past it answers 409
112
+ * `site_component_limit`. Provisional until the plans are final. It only
113
113
  * stops a NEW attach: after a downgrade, what is attached stays served (golden rule 2). The
114
114
  * highest value is the platform ceiling `SITE_MANIFEST_MAX_COMPONENTS` (site-manifest.ts).
115
115
  */
116
116
  readonly componentsPerSite: number;
117
117
  /**
118
- * Network origins one version may declare in `permissions.connect` (TAG-1625, the old trust
118
+ * Network origins one version may declare in `permissions.connect` (the old trust
119
119
  * level's `connectOrigins`); a version past it is refused with 402 `plan_limit_reached` before
120
- * the INSERT. PROVISIONAL until the owner approves the plans (TAG-1602).
120
+ * the INSERT. Provisional until the plans are final.
121
121
  */
122
122
  readonly connectOriginsPerVersion: number;
123
123
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plan-limits.d.ts","sourceRoot":"","sources":["../src/plan-limits.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,QAAQ,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,KAAK,MAAM,EAAE,CAAC;AAEjC,4FAA4F;AAC5F,eAAO,MAAM,eAAe,EAAE,MAAe,CAAC;AAE9C,qEAAqE;AACrE,MAAM,WAAW,UAAU;IACzB,qEAAqE;IACrE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,qCAAqC;IACrC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,2CAA2C;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,kGAAkG;IAClG,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,+DAA+D;IAC/D,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,uFAAuF;IACvF,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,0FAA0F;IAC1F,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC;AAED,yCAAyC;AACzC,MAAM,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC;AAM7C;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAqB,CAAC;AAElF;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAExD;AAED;;;;;;GAMG;AACH,wBAAg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,MAAM,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC;CAC3C;AAID;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAA0B,CAAC;AAEvF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAEnE"}
@@ -1,15 +1,15 @@
1
1
  /**
2
- * `planLimits` (TAG-413): the single table of what each plan allows a workspace to build. Zod-free.
2
+ * `planLimits`: the single table of what each plan allows a workspace to build. Zod-free.
3
3
  *
4
4
  * The builder reads it for every build (timeout, source size, files, dependencies, output size,
5
- * asset sizes since TAG-410, builds at once) and the API reads it before queueing one (builds per
6
- * rolling week, `POST /builds` answers 429 with `Retry-After` past it, TAG-909, TAG-1624). Billing (E16, TAG-1603) reuses the same rows for its
5
+ * asset sizes, builds at once) and the API reads it before queueing one (builds per
6
+ * rolling week, `POST /builds` answers 429 with `Retry-After` past it). Billing reuses the same rows for its
7
7
  * entitlements, so a limit lives here once. It sits in the contract because both the API and the
8
8
  * builder already depend on it, and the customer's agent sees these numbers in the
9
9
  * `LIMIT_EXCEEDED` diagnostics.
10
10
  *
11
- * The values are provisional until the owner approves the plans and prices (TAG-1602): today
12
- * there is one plan, `free`, with the limits every build already had (TAG-401, TAG-1705), so
11
+ * The values are provisional until the plans and prices are final: today
12
+ * there is one plan, `free`, with the limits every build already had, so
13
13
  * nothing gets stricter. The builder's platform ceilings (`BUILD_LIMIT_BOUNDS`, tuned with the
14
14
  * `TAGGOR_BUILD_MAX_*` variables) still cap every plan: a plan only lowers a limit, never raises
15
15
  * it past what one container instance holds.
@@ -20,8 +20,8 @@ import { PLAN_IDS } from "./plan-ids.js";
20
20
  export { PLAN_IDS };
21
21
  /** The plan of a workspace without one (and of every build until workspaces have plans). */
22
22
  export const DEFAULT_PLAN_ID = "free";
23
- // The rows come from the limit catalog (`limit-catalog.ts`), the one place that holds the numbers
24
- // (decision 79). The types check that the catalog's `build` group is exactly `PlanLimits`.
23
+ // The rows come from the limit catalog (`limit-catalog.ts`), the one place that holds the numbers.
24
+ // The types check that the catalog's `build` group is exactly `PlanLimits`.
25
25
  const table = catalogRows("build");
26
26
  /**
27
27
  * The limits of every plan, by plan id.
@@ -76,7 +76,7 @@ export function secondsUntilNextUtcDay(now) {
76
76
  const nextMidnight = (Math.floor(now.getTime() / DAY_MS) + 1) * DAY_MS;
77
77
  return Math.max(1, Math.ceil((nextMidnight - now.getTime()) / 1000));
78
78
  }
79
- /** The window of `buildsPerWeek`: a rolling 7 days (decision 78). */
79
+ /** The window of `buildsPerWeek`: a rolling 7 days. */
80
80
  export const BUILD_WINDOW_MS = 7 * DAY_MS;
81
81
  /**
82
82
  * When the rolling 7-day window frees one place (`POST /builds` answers 429 with
@@ -1 +1 @@
1
- {"version":3,"file":"plan-limits.js","sourceRoot":"","sources":["../src/plan-limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAe,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAe,CAAC;AAEjC,4FAA4F;AAC5F,MAAM,CAAC,MAAM,eAAe,GAAW,MAAM,CAAC;AAiC9C,kGAAkG;AAClG,2FAA2F;AAC3F,MAAM,KAAK,GAA+B,WAAW,CAAC,OAAO,CAAC,CAAC;AAE/D;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAyC,UAAU,CAAC,KAAK,CAAC,CAAC;AAElF;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;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AI,CAAC,IAAI,CAAC,CAAC,YAAY,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;AACvE,CAAC;AAED,uDAAuD;AACvD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG,MAAM,CAAC;AAS1C;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,qBAA2B,EAAE,GAAS;IACrE,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAAC,OAAO,EAAE,GAAG,eAAe,CAAC,CAAC;IAC7E,MAAM,iBAAiB,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAC9F,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;AACzC,CAAC;AAiCD,MAAM,UAAU,GAA+B,WAAW,CAAC,OAAO,CAAC,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAyC,UAAU,CAAC,UAAU,CAAC,CAAC;AAEvF;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,MAA0B;IACrD,OAAO,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;AACjE,CAAC"}
@@ -1,3 +1,19 @@
1
+ /**
2
+ * What each plan COSTS, the technical site ceiling and the overage rates and rules. Zod-free, frozen, same style as `plan-usage.ts` and `plan-limits.ts`.
3
+ *
4
+ * Why it lives in the contract: the billing catalog (`apps/api/src/domain/billing/plans.ts`) and the
5
+ * public site both need these numbers, and a number written twice drifts. The billing catalog
6
+ * composes its rows from here; the site reads them through its figures registry, so no plan price
7
+ * is typed by hand in site copy.
8
+ *
9
+ * ALL NUMBERS ARE PROVISIONAL until the plans and prices are final.
10
+ * Money is US dollar cents.
11
+ * Nothing here charges or cuts; it is a table.
12
+ *
13
+ * The overage rate table below (`OVERAGE_RATES`) is the ONE place
14
+ * the price of a unit above the plan is written; the site, the portal, the API and the Stripe
15
+ * prices read it. Rates are provisional until the prices are final.
16
+ */
1
17
  import type { PlanId } from "./plan-limits.js";
2
18
  import { type OverageMetric } from "./limit-catalog.js";
3
19
  /** An amount in US dollar cents, per month and per year (billed once a year). */
@@ -5,23 +21,15 @@ export interface PlanMoney {
5
21
  readonly monthly: number;
6
22
  readonly annual: number;
7
23
  }
8
- /** The Agency's growth past its included sites: one more site costs money and raises two ceilings. */
9
- export interface PlanSiteExtension {
10
- /** Sites in the plan's price (the plan's `maxSites` quota). */
11
- readonly includedSites: number;
12
- /** The most sites with add-ons. */
13
- readonly maxSites: number;
14
- readonly extraSitePriceUsdCents: PlanMoney;
15
- /** What each extra site adds to the monthly renders ceiling. */
16
- readonly rendersPerExtraSite: number;
17
- /** What each extra site adds to the monthly submissions ceiling. */
18
- readonly submissionsPerExtraSite: number;
19
- }
20
- /** The price of one plan and its site extension (null when the plan has none). */
24
+ /** The price of one plan. */
21
25
  export interface PlanPricing {
22
26
  readonly priceUsdCents: PlanMoney;
23
- readonly siteExtension: PlanSiteExtension | null;
24
27
  }
28
+ /**
29
+ * The most live sites a workspace may hold while the overage bills the sites past its plan (Pro and
30
+ * Agency pay US$ 1 a site a month), so "billed, never refused" still has a technical end.
31
+ */
32
+ export declare const BILLABLE_SITES_CEILING = 500;
25
33
  /** The pricing of every plan, by plan id. Frozen. */
26
34
  export declare const planPricing: Readonly<Record<PlanId, PlanPricing>>;
27
35
  /** A plan that pays: the only ones that can have an overage. */
@@ -41,25 +49,24 @@ export interface OverageRate {
41
49
  readonly microUsdPerUnit: Readonly<Record<PaidPlanId, number>>;
42
50
  }
43
51
  /**
44
- * THE SEED of the rate table (TAG-1629, owner 2026-11-14): the tariffs live in the database
52
+ * THE SEED of the rate table: the tariffs live in the database
45
53
  * (`overage_rates`, versions with an effective date, edited by staff with a reason) and this table
46
54
  * is only what migration 0081 inserted as version 1 and what every reader falls back to when the
47
55
  * database cannot be read. A test compares it with the migration; nothing else reads it for a price.
48
56
  *
49
- * The tariffs of decision 84 (provisional, pendency 76), in micro USD per unit:
57
+ * The tariffs (provisional), in micro USD per unit:
50
58
  * renders US$ 0,02 per 1.000; SSR renders US$ 0,015 per 1.000; SSR version-day US$ 0,01 (no
51
59
  * included amount in v1); build over the weekly limit US$ 0,01; stored submission US$ 0,25 per
52
- * 1.000; storage US$ 1,00 per GB-month (1000 per MB, raised from 0,35 on 2026-11-15 by the owner; migration 0097, on the average of the cycle's daily readings); extra site US$ 1 (Pro) and US$ 2 (Agency, the existing
53
- * add-on price, billed on the plan subscription, so its overage rate is informational).
60
+ * 1.000; storage US$ 1,00 per GB-month (1000 per MB, on the average of the cycle's daily readings); extra site US$ 1 on Pro and on Agency.
54
61
  */
55
62
  export declare const OVERAGE_RATES: Readonly<Record<OverageMetric, OverageRate>>;
56
63
  /** The metrics in a fixed order (ledger and Stripe meters follow it). */
57
64
  export declare const OVERAGE_METRIC_LIST: readonly OverageMetric[];
58
65
  /**
59
- * The rules around the money of an overage (decision 84, ADR 0067), numbers only:
66
+ * The rules around the money of an overage, numbers only:
60
67
  * - `minInvoiceUsdCents`: below it the amount carries to the next month.
61
68
  * - `lagHours`: the ledger bills what was counted at least this long ago, never the live count.
62
- * - NO default spending limit (owner, 2026-11-14, TAG-1629): the customer pays what they use. A
69
+ * - NO default spending limit: the customer pays what they use. A
63
70
  * spending LIMIT is OPTIONAL, set by the customer or by staff, between `spendCapMinUsdCents` and
64
71
  * `spendCapMaxUsdCents` (staff: `staffSpendCapMaxUsdCents`). It is a trigger, not a ceiling on the
65
72
  * bill: Taggor TRIES to stop the use when the overage reaches it, WITHOUT guarantee, and what was
@@ -68,8 +75,7 @@ export declare const OVERAGE_METRIC_LIST: readonly OverageMetric[];
68
75
  * e-mail per milestone per cycle. `spendMilestonePercents` are the named steps of the DEFAULT list
69
76
  * (percent of the plan's monthly price: 50%, 100%, 200%, 500%); from there it keeps going, doubling
70
77
  * from `spendMilestoneDoublingFrom` (1000%, 2000%, 4000%...) up to `maxSpendMilestones` milestones
71
- * in all (`defaultSpendMilestonePercents`), so a runaway use keeps warning past 500% (TAG-1629
72
- * review M4). The customer may set their own list of up to `maxSpendMilestones` amounts, each at
78
+ * in all (`defaultSpendMilestonePercents`), so a runaway use keeps warning past 500%. The customer may set their own list of up to `maxSpendMilestones` amounts, each at
73
79
  * most `spendMilestoneMaxUsdCents`.
74
80
  * - `dunningDays`: how long an unpaid overage invoice is chased before new overage is suspended.
75
81
  * - `freeCutMultiple`: Free is cut at this multiple of its number (1x, no grace).
@@ -101,45 +107,10 @@ export declare function defaultSpendMilestonePercents(): readonly number[];
101
107
  */
102
108
  export declare function overageMicroUsdPerUnit(metric: OverageMetric, planId: PlanId): number | null;
103
109
  /**
104
- * Which of the forgeable metrics are billed (TAG-1628 review M1 and L2, ADR 0067 item 8; ON since
105
- * TAG-1629, decision 84 amendment of 2026-11-14). A render and a stored submission can be forged by
106
- * anyone with the public site key, so they were kept off the bill until a guard existed. The owner
107
- * decided that a customer pays what was used, so the three metrics are billed; the guard (a spike
108
- * flag per site, `usage-guard.ts`) no longer holds anything back, it only keeps the Free plan from
109
- * being cut by forged traffic and warns the customer of an unusual day, and the safety net for a wrong
110
- * bill is the credit on request (runbook). The switch stays in ONE place: the billing code of the API
111
- * derives its `OVERAGE_BILLING_FROM_*` constants from it, and the site, the portal and the CLI choose
112
- * their wording by `isOverageMetricBilled`, so a switch changes the code and every text together. A
113
- * gate only has an effect while the API's overage mode is not `off`. Changing it is an
114
- * ADR-level decision, never a drive-by edit.
115
- */
116
- export interface OverageBillingGates {
117
- /** The renders metric (`loader_hits`). */
118
- readonly loaderHits: boolean;
119
- /** The submissions metric and the storage that follows it. */
120
- readonly submissions: boolean;
121
- }
122
- /** The gates as the code ships them: both on (TAG-1629); frozen, the literal types are `true`. */
123
- export declare const OVERAGE_BILLING_GATES: Readonly<{
124
- readonly loaderHits: true;
125
- readonly submissions: true;
126
- }>;
127
- /**
128
- * Whether the excess of a metric is billed automatically (and so spends the customer's cap, raises a
129
- * cap notice and counts in the cost estimate). Renders when `gates.loaderHits`; submissions and
130
- * storage when `gates.submissions`; builds, extra sites and SSR always.
131
- * Inputs: a metric and the gates (default: as shipped). Output: a boolean. Pure.
132
- */
133
- export declare function isOverageMetricBilled(metric: OverageMetric, gates?: OverageBillingGates): boolean;
134
- /**
135
- * Whether going past a catalog limit is billed automatically today on a paid plan: the limit is
136
- * `metered` on Pro (Agency matches) and its metric is billed (`isOverageMetricBilled`). A limit that
137
- * is `hard` on every plan (a security or per-build cap), an unknown name and a metered limit whose
138
- * metric's gate is off are all false. The portal and the CLI
139
- * word a limit row with it.
140
- * Inputs: a limit name (any string) and the gates (default: as shipped). Output: a boolean. Pure.
110
+ * Whether going past a catalog limit is billed automatically on a paid plan: the limit is
111
+ * `metered` on Pro (Agency matches). A limit that is `hard` on every plan (a security or per-build
112
+ * cap) and an unknown name are false. The portal and the CLI word a limit row with it.
113
+ * Inputs: a limit name (any string). Output: a boolean. Pure.
141
114
  */
142
- export declare function isLimitOverageBilled(name: string, gates?: OverageBillingGates): boolean;
143
- /** The metrics billed today, in the fixed metric order: derived from the gates, never typed. */
144
- export declare const BILLED_OVERAGE_METRICS: readonly OverageMetric[];
115
+ export declare function isLimitOverageBilled(name: string): boolean;
145
116
  //# sourceMappingURL=plan-pricing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plan-pricing.d.ts","sourceRoot":"","sources":["../src/plan-pricing.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExF,iFAAiF;AACjF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAA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,MAAM,sBAAsB,MAAM,CAAC;AAU1C,qDAAqD;AACrD,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAI5D,CAAC;AAEH,gEAAgE;AAChE,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEjD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,IAAI,CAAC;AAExC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;CAChE;AAKD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,CA4BrE,CAAC;AAEH,yEAAyE;AACzE,eAAO,MAAM,mBAAmB,EAAE,SAAS,aAAa,EAAoB,CAAC;AAE7E;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;EAaxB,CAAC;AAEH;;;;GAIG;AACH,wBAAgB,6BAA6B,IAAI,SAAS,MAAM,EAAE,CAUjE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI3F;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1D"}
@@ -1,36 +1,14 @@
1
+ import { LIMIT_CATALOG, OVERAGE_METRICS } from "./limit-catalog.js";
1
2
  /**
2
- * What each plan COSTS, the Agency site extension and the overage rates and rules (TAG-1934 P0, from
3
- * decisions 68 and 71; TAG-1628, decision 84, replaced the cut rule of decisions 69 and 71). Zod-free, frozen, same style as `plan-usage.ts` and `plan-limits.ts`.
4
- *
5
- * Why it lives in the contract: the billing catalog (`apps/api/src/domain/billing/plans.ts`) and the
6
- * public site both need these numbers, and a number written twice drifts. The billing catalog
7
- * composes its rows from here; the site reads them through its figures registry, so no plan price
8
- * is typed by hand in site copy.
9
- *
10
- * ALL NUMBERS ARE PROVISIONAL until the owner approves the plans and prices
11
- * (DECISOES.md, decisions 67 to 69). Money is US dollar cents (decision 68 item 1).
12
- * Nothing here charges or cuts; it is a table.
13
- *
14
- * TAG-1628 (decision 84, ADR 0067): the overage rate table below (`OVERAGE_RATES`) is the ONE place
15
- * the price of a unit above the plan is written; the site, the portal, the API and the Stripe
16
- * prices read it. Rates are PROVISIONAL until the owner answers pendency 76.
3
+ * The most live sites a workspace may hold while the overage bills the sites past its plan (Pro and
4
+ * Agency pay US$ 1 a site a month), so "billed, never refused" still has a technical end.
17
5
  */
18
- import { planQuotas } from "./plan-limits.js";
19
- import { LIMIT_CATALOG, OVERAGE_METRICS } from "./limit-catalog.js";
6
+ export const BILLABLE_SITES_CEILING = 500;
20
7
  const money = (monthly, annual) => Object.freeze({ monthly, annual });
21
8
  const table = {
22
- free: { priceUsdCents: money(0, 0), siteExtension: null },
23
- pro: { priceUsdCents: money(1400, 14_000), siteExtension: null },
24
- agency: {
25
- priceUsdCents: money(4900, 49_000),
26
- siteExtension: Object.freeze({
27
- includedSites: planQuotas.agency.maxSites,
28
- maxSites: 500,
29
- extraSitePriceUsdCents: money(200, 2000),
30
- rendersPerExtraSite: 100_000,
31
- submissionsPerExtraSite: 4000,
32
- }),
33
- },
9
+ free: { priceUsdCents: money(0, 0) },
10
+ pro: { priceUsdCents: money(1400, 14_000) },
11
+ agency: { priceUsdCents: money(4900, 49_000) },
34
12
  };
35
13
  /** The pricing of every plan, by plan id. Frozen. */
36
14
  export const planPricing = Object.freeze({
@@ -40,16 +18,15 @@ export const planPricing = Object.freeze({
40
18
  });
41
19
  const bothPaid = (value) => Object.freeze({ pro: value, agency: value });
42
20
  /**
43
- * THE SEED of the rate table (TAG-1629, owner 2026-11-14): the tariffs live in the database
21
+ * THE SEED of the rate table: the tariffs live in the database
44
22
  * (`overage_rates`, versions with an effective date, edited by staff with a reason) and this table
45
23
  * is only what migration 0081 inserted as version 1 and what every reader falls back to when the
46
24
  * database cannot be read. A test compares it with the migration; nothing else reads it for a price.
47
25
  *
48
- * The tariffs of decision 84 (provisional, pendency 76), in micro USD per unit:
26
+ * The tariffs (provisional), in micro USD per unit:
49
27
  * renders US$ 0,02 per 1.000; SSR renders US$ 0,015 per 1.000; SSR version-day US$ 0,01 (no
50
28
  * included amount in v1); build over the weekly limit US$ 0,01; stored submission US$ 0,25 per
51
- * 1.000; storage US$ 1,00 per GB-month (1000 per MB, raised from 0,35 on 2026-11-15 by the owner; migration 0097, on the average of the cycle's daily readings); extra site US$ 1 (Pro) and US$ 2 (Agency, the existing
52
- * add-on price, billed on the plan subscription, so its overage rate is informational).
29
+ * 1.000; storage US$ 1,00 per GB-month (1000 per MB, on the average of the cycle's daily readings); extra site US$ 1 on Pro and on Agency.
53
30
  */
54
31
  export const OVERAGE_RATES = Object.freeze({
55
32
  renders: Object.freeze({ metric: "renders", unit: "unit", microUsdPerUnit: bothPaid(20) }),
@@ -77,16 +54,16 @@ export const OVERAGE_RATES = Object.freeze({
77
54
  extra_sites: Object.freeze({
78
55
  metric: "extra_sites",
79
56
  unit: "unit",
80
- microUsdPerUnit: Object.freeze({ pro: 1_000_000, agency: 2_000_000 }),
57
+ microUsdPerUnit: bothPaid(1_000_000),
81
58
  }),
82
59
  });
83
60
  /** The metrics in a fixed order (ledger and Stripe meters follow it). */
84
61
  export const OVERAGE_METRIC_LIST = OVERAGE_METRICS;
85
62
  /**
86
- * The rules around the money of an overage (decision 84, ADR 0067), numbers only:
63
+ * The rules around the money of an overage, numbers only:
87
64
  * - `minInvoiceUsdCents`: below it the amount carries to the next month.
88
65
  * - `lagHours`: the ledger bills what was counted at least this long ago, never the live count.
89
- * - NO default spending limit (owner, 2026-11-14, TAG-1629): the customer pays what they use. A
66
+ * - NO default spending limit: the customer pays what they use. A
90
67
  * spending LIMIT is OPTIONAL, set by the customer or by staff, between `spendCapMinUsdCents` and
91
68
  * `spendCapMaxUsdCents` (staff: `staffSpendCapMaxUsdCents`). It is a trigger, not a ceiling on the
92
69
  * bill: Taggor TRIES to stop the use when the overage reaches it, WITHOUT guarantee, and what was
@@ -95,8 +72,7 @@ export const OVERAGE_METRIC_LIST = OVERAGE_METRICS;
95
72
  * e-mail per milestone per cycle. `spendMilestonePercents` are the named steps of the DEFAULT list
96
73
  * (percent of the plan's monthly price: 50%, 100%, 200%, 500%); from there it keeps going, doubling
97
74
  * from `spendMilestoneDoublingFrom` (1000%, 2000%, 4000%...) up to `maxSpendMilestones` milestones
98
- * in all (`defaultSpendMilestonePercents`), so a runaway use keeps warning past 500% (TAG-1629
99
- * review M4). The customer may set their own list of up to `maxSpendMilestones` amounts, each at
75
+ * in all (`defaultSpendMilestonePercents`), so a runaway use keeps warning past 500%. The customer may set their own list of up to `maxSpendMilestones` amounts, each at
100
76
  * most `spendMilestoneMaxUsdCents`.
101
77
  * - `dunningDays`: how long an unpaid overage invoice is chased before new overage is suspended.
102
78
  * - `freeCutMultiple`: Free is cut at this multiple of its number (1x, no grace).
@@ -137,36 +113,13 @@ export function overageMicroUsdPerUnit(metric, planId) {
137
113
  const rates = OVERAGE_RATES[metric].microUsdPerUnit;
138
114
  return rates[planId] ?? null;
139
115
  }
140
- /** The gates as the code ships them: both on (TAG-1629); frozen, the literal types are `true`. */
141
- export const OVERAGE_BILLING_GATES = Object.freeze({
142
- loaderHits: true,
143
- submissions: true,
144
- });
145
- /**
146
- * Whether the excess of a metric is billed automatically (and so spends the customer's cap, raises a
147
- * cap notice and counts in the cost estimate). Renders when `gates.loaderHits`; submissions and
148
- * storage when `gates.submissions`; builds, extra sites and SSR always.
149
- * Inputs: a metric and the gates (default: as shipped). Output: a boolean. Pure.
150
- */
151
- export function isOverageMetricBilled(metric, gates = OVERAGE_BILLING_GATES) {
152
- if (metric === "renders")
153
- return gates.loaderHits;
154
- if (metric === "submissions" || metric === "storage")
155
- return gates.submissions;
156
- return true;
157
- }
158
116
  /**
159
- * Whether going past a catalog limit is billed automatically today on a paid plan: the limit is
160
- * `metered` on Pro (Agency matches) and its metric is billed (`isOverageMetricBilled`). A limit that
161
- * is `hard` on every plan (a security or per-build cap), an unknown name and a metered limit whose
162
- * metric's gate is off are all false. The portal and the CLI
163
- * word a limit row with it.
164
- * Inputs: a limit name (any string) and the gates (default: as shipped). Output: a boolean. Pure.
117
+ * Whether going past a catalog limit is billed automatically on a paid plan: the limit is
118
+ * `metered` on Pro (Agency matches). A limit that is `hard` on every plan (a security or per-build
119
+ * cap) and an unknown name are false. The portal and the CLI word a limit row with it.
120
+ * Inputs: a limit name (any string). Output: a boolean. Pure.
165
121
  */
166
- export function isLimitOverageBilled(name, gates = OVERAGE_BILLING_GATES) {
167
- const policy = LIMIT_CATALOG.find((spec) => spec.name === name)?.policy.pro;
168
- return policy?.mode === "metered" && isOverageMetricBilled(policy.metric, gates);
122
+ export function isLimitOverageBilled(name) {
123
+ return LIMIT_CATALOG.find((spec) => spec.name === name)?.policy.pro.mode === "metered";
169
124
  }
170
- /** The metrics billed today, in the fixed metric order: derived from the gates, never typed. */
171
- export const BILLED_OVERAGE_METRICS = Object.freeze(OVERAGE_METRICS.filter((metric) => isOverageMetricBilled(metric)));
172
125
  //# sourceMappingURL=plan-pricing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plan-pricing.js","sourceRoot":"","sources":["../src/plan-pricing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,eAAe,EAAsB,MAAM,oBAAoB,CAAC;AA2BxF,MAAM,KAAK,GAAG,CAAC,OAAe,EAAE,MAAc,EAA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