@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
@@ -1,7 +1,7 @@
1
1
  /** Source of the pattern every site key matches, for schemas and database checks. */
2
2
  export declare const SITE_KEY_PATTERN = "^st_[a-z2-7]{10}$";
3
3
  /**
4
- * Pattern of a site's Turnstile site key (TAG-724): a PUBLIC key (the secret stays on the edge),
4
+ * Pattern of a site's Turnstile site key: a PUBLIC key (the secret stays on the edge),
5
5
  * the same shape the loader accepts.
6
6
  */
7
7
  export declare const TURNSTILE_SITE_KEY_PATTERN = "^[A-Za-z0-9_-]{1,100}$";
@@ -11,19 +11,19 @@ export declare const TURNSTILE_SITE_KEY_PATTERN = "^[A-Za-z0-9_-]{1,100}$";
11
11
  * Side effects: none.
12
12
  */
13
13
  export declare function isTurnstileSiteKey(value: unknown): value is string;
14
- /** What a site does with a submission the bot filter marked (TAG-730); `keep` is the default. */
14
+ /** What a site does with a submission the bot filter marked; `keep` is the default. */
15
15
  export declare const SUSPECT_POLICIES: readonly ["keep", "drop"];
16
16
  /** One of `SUSPECT_POLICIES`. */
17
17
  export type SuspectPolicy = (typeof SUSPECT_POLICIES)[number];
18
18
  /**
19
19
  * Whether a site honors the visitor's Global Privacy Control (`Sec-GPC: 1`) or Do Not Track (`DNT: 1`)
20
- * signal at the event ingest (TAG-816) when its `protection.respectGpc` is absent. Privacy by default
20
+ * signal at the event ingest when its `protection.respectGpc` is absent. Privacy by default
21
21
  * (golden rule 6): ON. The one place that holds the default; flip it here, nowhere else.
22
22
  */
23
23
  export declare const RESPECT_GPC_DEFAULT = true;
24
24
  /**
25
25
  * Default daily cap of submissions per site to a form without a Turnstile key, and the hard
26
- * bounds of a site's own `protection.dailyCap` (TAG-730). The platform ceiling is lower and comes
26
+ * bounds of a site's own `protection.dailyCap`. The platform ceiling is lower and comes
27
27
  * from the deploy's environment (the API reads it); the upper bound here only keeps a
28
28
  * manifest value sane.
29
29
  */
@@ -49,29 +49,29 @@ export declare function manifestKvKey(siteKey: string, channel: ManifestChannel)
49
49
  /** Seconds a daily cap mark lives (KV's `expirationTtl`); the consumer refreshes it while the cap holds. */
50
50
  export declare const DAILY_CAP_MARK_TTL_SECONDS = 3600;
51
51
  /**
52
- * KV key of a site's daily cap mark (TAG-730).
52
+ * KV key of a site's daily cap mark.
53
53
  * Inputs: a site key. Output: `cap:<siteKey>`. Errors: `TypeError` when the site key is malformed.
54
54
  * Side effects: none.
55
55
  */
56
56
  export declare function dailyCapKvKey(siteKey: string): string;
57
57
  /**
58
- * Seconds a Free plan submission cut mark lives (TAG-1628). Six hours, like the render cut marks: the
58
+ * Seconds a Free plan submission cut mark lives. Six hours, like the render cut marks: the
59
59
  * consumer rewrites it with every message it refuses and the usage job with every visit, so a plan
60
60
  * upgrade lifts the cut within this time and a lapse of the writers only lets a few messages through
61
61
  * (the consumer refuses them again and rewrites the mark).
62
62
  */
63
63
  export declare const SUBMISSION_CAP_MARK_TTL_SECONDS: number;
64
64
  /**
65
- * KV key of a site's Free plan submission cut mark (TAG-1628, decision 84).
65
+ * KV key of a site's Free plan submission cut mark.
66
66
  * Inputs: a site key. Output: `subcap:<siteKey>`. Errors: `TypeError` when the site key is malformed.
67
67
  * Side effects: none.
68
68
  */
69
69
  export declare function submissionCapKvKey(siteKey: string): string;
70
70
  /**
71
- * KV key of a site's usage cut mark (TAG-1714, written by the plan's usage cut since TAG-1625):
72
- * present while the site's workspace is past its plan's renders per month plus the grace (TAG-1607). The edge reads it on the loader and manifest routes
71
+ * KV key of a site's usage cut mark (written by the plan's usage cut):
72
+ * present while the site's workspace is past its plan's renders per month plus the grace. The edge reads it on the loader and manifest routes
73
73
  * only and then serves the inert answer; the data ingest ignores it, so a form already on a page
74
- * keeps collecting (decision 64).
74
+ * keeps collecting.
75
75
  * Inputs: a site key. Output: `viewcap:<siteKey>`. Errors: `TypeError` when the site key is malformed.
76
76
  * Side effects: none.
77
77
  */
@@ -97,7 +97,7 @@ export interface EmptySiteManifest {
97
97
  */
98
98
  export declare function emptySiteManifest(siteKey: string): EmptySiteManifest;
99
99
  /**
100
- * Most components one site manifest lists: the PLATFORM ceiling (TAG-1623), equal to the highest
100
+ * Most components one site manifest lists: the PLATFORM ceiling, equal to the highest
101
101
  * `planQuotas[*].componentsPerSite` (a test keeps them equal). What one site may attach depends on
102
102
  * its plan; this is only what the manifest schema and the loader accept at all, so a plan change
103
103
  * never makes a stored manifest invalid. The loader repeats the number (`MAX_COMPONENTS`, it
@@ -1 +1 @@
1
- {"version":3,"file":"site-manifest-keys.d.ts","sourceRoot":"","sources":["../src/site-manifest-keys.ts"],"names":[],"mappings":"AAuBA,qFAAqF;AACrF,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AAIpD;;;GAGG;AACH,eAAO,MAAM,0BAA0B,2BAA2B,CAAC;AAInE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAElE;AAED,iGAAiG;AACjG,eAAO,MAAM,gBAAgB,2BAA4B,CAAC;AAE1D,iCAAiC;AACjC,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,OAAQ,CAAC;AACvC,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,kBAAkB,UAAY,CAAC;AAE5C,oFAAoF;AACpF,eAAO,MAAM,iBAAiB,oCAAqC,CAAC;AAEpE,kC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D;AAED,qFAAqF;AACrF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrB,QAAQ,CAAC,cAAc,EAAE,SAAS,EAAE,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,SAAS,EAAE,CAAC;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAEpE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,MAAM,CAAC"}
@@ -1,22 +1,22 @@
1
1
  /**
2
- * Zod-free pieces of the site manifest (TAG-602): the site key format, the KV key layout of the
2
+ * Zod-free pieces of the site manifest: the site key format, the KV key layout of the
3
3
  * manifest store and of the published-bundle index, and the manifest served for a site that does
4
4
  * not exist. The API writes KV with these keys and the edge reads with them (the edge never
5
- * writes, threat T-60), so the layout lives in one place. Nothing here imports Zod, so the edge
5
+ * writes), so the layout lives in one place. Nothing here imports Zod, so the edge
6
6
  * and the browser runtime can import it from `@taggor/contract/zod-free`.
7
7
  *
8
8
  * KV layout (one namespace, `MANIFESTS` in the edge):
9
9
  * - `manifest:<siteKey>:<channel>`: the JSON of one `SiteManifest` (the channel is the site's
10
10
  * environment). Absent for a site that is unknown, disabled or deleted, so those three read
11
- * alike (TAG-622).
11
+ * alike.
12
12
  * - `published:<artifactKey>`: JSON `{ "contractVersion": "1.0.0" }` for each public artifact
13
13
  * (`b/<sha256>.js|css`) of a version a site manifest points to. The CDN serves only keys with
14
- * this entry, so a build that never became a published version is never hosted (TAG-411).
15
- * - `cap:<siteKey>`: written by the API's queue consumer (TAG-730) for an hour when a site's form
14
+ * this entry, so a build that never became a published version is never hosted.
15
+ * - `cap:<siteKey>`: written by the API's queue consumer for an hour when a site's form
16
16
  * without a Turnstile key spent its daily cap of submissions; the edge answers 429
17
17
  * `daily_cap_reached` while it exists. The value is not read, only the key's presence.
18
- * - `subcap:<siteKey>`: written by the same consumer and by the hourly usage job (TAG-1628, decision
19
- * 84) when the workspace of a FREE site spent its month's submissions or its storage; the edge
18
+ * - `subcap:<siteKey>`: written by the same consumer and by the hourly usage job
19
+ * when the workspace of a FREE site spent its month's submissions or its storage; the edge
20
20
  * answers 429 before reading the body while it exists. Only the key's presence is read.
21
21
  */
22
22
  import { isPublicArtifactKey } from "./artifact-keys.js";
@@ -24,7 +24,7 @@ import { isPublicArtifactKey } from "./artifact-keys.js";
24
24
  export const SITE_KEY_PATTERN = "^st_[a-z2-7]{10}$";
25
25
  const SITE_KEY = new RegExp(SITE_KEY_PATTERN);
26
26
  /**
27
- * Pattern of a site's Turnstile site key (TAG-724): a PUBLIC key (the secret stays on the edge),
27
+ * Pattern of a site's Turnstile site key: a PUBLIC key (the secret stays on the edge),
28
28
  * the same shape the loader accepts.
29
29
  */
30
30
  export const TURNSTILE_SITE_KEY_PATTERN = "^[A-Za-z0-9_-]{1,100}$";
@@ -37,17 +37,17 @@ const TURNSTILE_SITE_KEY = new RegExp(TURNSTILE_SITE_KEY_PATTERN);
37
37
  export function isTurnstileSiteKey(value) {
38
38
  return typeof value === "string" && TURNSTILE_SITE_KEY.test(value);
39
39
  }
40
- /** What a site does with a submission the bot filter marked (TAG-730); `keep` is the default. */
40
+ /** What a site does with a submission the bot filter marked; `keep` is the default. */
41
41
  export const SUSPECT_POLICIES = ["keep", "drop"];
42
42
  /**
43
43
  * Whether a site honors the visitor's Global Privacy Control (`Sec-GPC: 1`) or Do Not Track (`DNT: 1`)
44
- * signal at the event ingest (TAG-816) when its `protection.respectGpc` is absent. Privacy by default
44
+ * signal at the event ingest when its `protection.respectGpc` is absent. Privacy by default
45
45
  * (golden rule 6): ON. The one place that holds the default; flip it here, nowhere else.
46
46
  */
47
47
  export const RESPECT_GPC_DEFAULT = true;
48
48
  /**
49
49
  * Default daily cap of submissions per site to a form without a Turnstile key, and the hard
50
- * bounds of a site's own `protection.dailyCap` (TAG-730). The platform ceiling is lower and comes
50
+ * bounds of a site's own `protection.dailyCap`. The platform ceiling is lower and comes
51
51
  * from the deploy's environment (the API reads it); the upper bound here only keeps a
52
52
  * manifest value sane.
53
53
  */
@@ -77,7 +77,7 @@ export function manifestKvKey(siteKey, channel) {
77
77
  /** Seconds a daily cap mark lives (KV's `expirationTtl`); the consumer refreshes it while the cap holds. */
78
78
  export const DAILY_CAP_MARK_TTL_SECONDS = 3600;
79
79
  /**
80
- * KV key of a site's daily cap mark (TAG-730).
80
+ * KV key of a site's daily cap mark.
81
81
  * Inputs: a site key. Output: `cap:<siteKey>`. Errors: `TypeError` when the site key is malformed.
82
82
  * Side effects: none.
83
83
  */
@@ -87,14 +87,14 @@ export function dailyCapKvKey(siteKey) {
87
87
  return `cap:${siteKey}`;
88
88
  }
89
89
  /**
90
- * Seconds a Free plan submission cut mark lives (TAG-1628). Six hours, like the render cut marks: the
90
+ * Seconds a Free plan submission cut mark lives. Six hours, like the render cut marks: the
91
91
  * consumer rewrites it with every message it refuses and the usage job with every visit, so a plan
92
92
  * upgrade lifts the cut within this time and a lapse of the writers only lets a few messages through
93
93
  * (the consumer refuses them again and rewrites the mark).
94
94
  */
95
95
  export const SUBMISSION_CAP_MARK_TTL_SECONDS = 6 * 60 * 60;
96
96
  /**
97
- * KV key of a site's Free plan submission cut mark (TAG-1628, decision 84).
97
+ * KV key of a site's Free plan submission cut mark.
98
98
  * Inputs: a site key. Output: `subcap:<siteKey>`. Errors: `TypeError` when the site key is malformed.
99
99
  * Side effects: none.
100
100
  */
@@ -104,10 +104,10 @@ export function submissionCapKvKey(siteKey) {
104
104
  return `subcap:${siteKey}`;
105
105
  }
106
106
  /**
107
- * KV key of a site's usage cut mark (TAG-1714, written by the plan's usage cut since TAG-1625):
108
- * present while the site's workspace is past its plan's renders per month plus the grace (TAG-1607). The edge reads it on the loader and manifest routes
107
+ * KV key of a site's usage cut mark (written by the plan's usage cut):
108
+ * present while the site's workspace is past its plan's renders per month plus the grace. The edge reads it on the loader and manifest routes
109
109
  * only and then serves the inert answer; the data ingest ignores it, so a form already on a page
110
- * keeps collecting (decision 64).
110
+ * keeps collecting.
111
111
  * Inputs: a site key. Output: `viewcap:<siteKey>`. Errors: `TypeError` when the site key is malformed.
112
112
  * Side effects: none.
113
113
  */
@@ -136,7 +136,7 @@ export function emptySiteManifest(siteKey) {
136
136
  return { siteKey, revision: 0, allowedDomains: [], components: [] };
137
137
  }
138
138
  /**
139
- * Most components one site manifest lists: the PLATFORM ceiling (TAG-1623), equal to the highest
139
+ * Most components one site manifest lists: the PLATFORM ceiling, equal to the highest
140
140
  * `planQuotas[*].componentsPerSite` (a test keeps them equal). What one site may attach depends on
141
141
  * its plan; this is only what the manifest schema and the loader accept at all, so a plan change
142
142
  * never makes a stored manifest invalid. The loader repeats the number (`MAX_COMPONENTS`, it
@@ -1 +1 @@
1
- {"version":3,"file":"site-manifest-keys.js","sourceRoot":"","sources":["../src/site-manifest-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,qFAAqF;AACrF,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAEpD,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAE9C;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,wBAAwB,CAAC;AAEnE,MAAM,kBAAkB,GAAG,IAAI,MAAM,CAAC,0BAA0B,CAAC,CAAC;AAElE;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED,iGAAiG;AACjG,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAU,CAAC;AAK1D;;;;GAIG;AACH,MAAM,CAAC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AAC,CAAC;IAC/D,OAAO,UAAU,OAAO,EAAE,CAAC;AAC7B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC/D,OAAO,WAAW,OAAO,EAAE,CAAC;AAC9B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,WAAmB;IAChD,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,2BAA2B,CAAC,CAAC;IACxF,OAAO,aAAa,WAAW,EAAE,CAAC;AACpC,CAAC;AAUD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;AACtE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The site manifest (TAG-602): what a site's snippet needs to load its components, compiled by the
2
+ * The site manifest: what a site's snippet needs to load its components, compiled by the
3
3
  * API from Postgres and stored in KV, served read-only by the edge at `/m/<siteKey>.json`. Public
4
4
  * by nature (it goes to every visitor): it holds no workspace id, component id or customer data
5
5
  * beyond the site's own allowed domains and component defaults.
@@ -11,9 +11,8 @@ import * as z from "zod";
11
11
  import { SITE_MANIFEST_MAX_COMPONENTS } from "./site-manifest-keys.js";
12
12
  export { SITE_MANIFEST_MAX_COMPONENTS };
13
13
  /**
14
- * What the data ingest needs to know about a component's collections (TAG-703): the declared
15
- * collections to validate submissions against, whether they hold personal data and the name of
16
- * the prop that carries the privacy policy URL. Copied by the API from the published version's
14
+ * What the data ingest needs to know about a component's collections: the declared
15
+ * collections to validate submissions against. Copied by the API from the published version's
17
16
  * manifest, so the edge never trusts the request for any of it. The edge strips it from the
18
17
  * public `/m/` and `/s/` answers: visitors' pages do not need it.
19
18
  */
@@ -83,8 +82,6 @@ export declare const siteManifestComponentDataSchema: z.ZodObject<{
83
82
  private: "private";
84
83
  }>>;
85
84
  }, z.core.$strict>>;
86
- personal: z.ZodOptional<z.ZodBoolean>;
87
- privacyPolicyUrl: z.ZodOptional<z.ZodString>;
88
85
  }, z.core.$strict>;
89
86
  /** One component a site loads. */
90
87
  export declare const siteManifestComponentSchema: z.ZodObject<{
@@ -168,8 +165,6 @@ export declare const siteManifestComponentSchema: z.ZodObject<{
168
165
  private: "private";
169
166
  }>>;
170
167
  }, z.core.$strict>>;
171
- personal: z.ZodOptional<z.ZodBoolean>;
172
- privacyPolicyUrl: z.ZodOptional<z.ZodString>;
173
168
  }, z.core.$strict>>;
174
169
  }, z.core.$strict>;
175
170
  /** The `data` entry of a site manifest component. */
@@ -262,8 +257,6 @@ export declare const siteManifestSchema: z.ZodObject<{
262
257
  private: "private";
263
258
  }>>;
264
259
  }, z.core.$strict>>;
265
- personal: z.ZodOptional<z.ZodBoolean>;
266
- privacyPolicyUrl: z.ZodOptional<z.ZodString>;
267
260
  }, z.core.$strict>>;
268
261
  }, z.core.$strict>>;
269
262
  turnstileSiteKey: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"site-manifest.d.ts","sourceRoot":"","sources":["../src/site-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAQzB,OAAO,EAIL,4BAA4B,EAG7B,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,4BAA4B,EAAE,CAAC;AAExC;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAS1C,CAAC;AAEH,kCAAkC;AAClC,e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8CAA8C;AAC9C,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,gCAAgC;AAChC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmC7B,CAAC;AAEH,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The site manifest (TAG-602): what a site's snippet needs to load its components, compiled by the
2
+ * The site manifest: what a site's snippet needs to load its components, compiled by the
3
3
  * API from Postgres and stored in KV, served read-only by the edge at `/m/<siteKey>.json`. Public
4
4
  * by nature (it goes to every visitor): it holds no workspace id, component id or customer data
5
5
  * beyond the site's own allowed domains and component defaults.
@@ -13,21 +13,18 @@ import { boundedRecord } from "./bounded.js";
13
13
  import { MANIFEST_LIMITS } from "./limits.js";
14
14
  import { RUNTIME_RINGS } from "./runtime-pointers.js";
15
15
  import { collectionSchema, eventSampleRateSchema } from "./manifest.js";
16
- import { memberNameSchema, propNameSchema } from "./names.js";
16
+ import { memberNameSchema } from "./names.js";
17
17
  import { DAILY_CAP_HARD_MAX, DAILY_CAP_MIN, SITE_KEY_PATTERN, SITE_MANIFEST_MAX_COMPONENTS, SUSPECT_POLICIES, TURNSTILE_SITE_KEY_PATTERN, } from "./site-manifest-keys.js";
18
18
  import { TAG_NAME_PATTERN } from "./tag-name.js";
19
19
  export { SITE_MANIFEST_MAX_COMPONENTS };
20
20
  /**
21
- * What the data ingest needs to know about a component's collections (TAG-703): the declared
22
- * collections to validate submissions against, whether they hold personal data and the name of
23
- * the prop that carries the privacy policy URL. Copied by the API from the published version's
21
+ * What the data ingest needs to know about a component's collections: the declared
22
+ * collections to validate submissions against. Copied by the API from the published version's
24
23
  * manifest, so the edge never trusts the request for any of it. The edge strips it from the
25
24
  * public `/m/` and `/s/` answers: visitors' pages do not need it.
26
25
  */
27
26
  export const siteManifestComponentDataSchema = z.strictObject({
28
27
  collections: boundedRecord(memberNameSchema, collectionSchema, MANIFEST_LIMITS.maxCollections, "collections"),
29
- personal: z.boolean().optional(),
30
- privacyPolicyUrl: propNameSchema.optional(),
31
28
  });
32
29
  /** One component a site loads. */
33
30
  export const siteManifestComponentSchema = z.strictObject({
@@ -46,18 +43,18 @@ export const siteManifestComponentSchema = z.strictObject({
46
43
  /** `disabled` is the kill switch: the loader skips the component. */
47
44
  status: z.enum(["active", "disabled"]),
48
45
  /**
49
- * When the loader imports the bundle (TAG-335): `idle` waits for an idle moment of the page and
46
+ * When the loader imports the bundle: `idle` waits for an idle moment of the page and
50
47
  * fetches the loader's lazy `loading.js` module to do it. Absent means `eager` (on load), so
51
48
  * manifests written before this field read the same. An older loader ignores the field.
52
49
  */
53
50
  loading: z.enum(["idle"]).optional(),
54
51
  /**
55
- * The component's `eventSampleRate` (TAG-819), copied from the published version's manifest: the
56
- * browser sends that share of `interaction` and `custom` events, and the edge weights what it
52
+ * The component's `eventSampleRate`, copied from the published version's manifest: the
53
+ * browser sends that share of `track` events, and the edge weights what it
57
54
  * stores by `1 / rate` from this stored value, never from the request. Absent: all are sent.
58
55
  */
59
56
  eventSampleRate: eventSampleRateSchema.optional(),
60
- /** Collections of the component for the data ingest (TAG-703); absent when it declares none. */
57
+ /** Collections of the component for the data ingest; absent when it declares none. */
61
58
  data: siteManifestComponentDataSchema.optional(),
62
59
  });
63
60
  /** The manifest of one site. */
@@ -69,11 +66,11 @@ export const siteManifestSchema = z.strictObject({
69
66
  components: z.array(siteManifestComponentSchema).max(SITE_MANIFEST_MAX_COMPONENTS),
70
67
  /**
71
68
  * The site's Turnstile public key, embedded in the loader of a site with a collection component
72
- * so submissions carry a token (TAG-724); absent when the site has none.
69
+ * so submissions carry a token; absent when the site has none.
73
70
  */
74
71
  turnstileSiteKey: z.string().regex(new RegExp(TURNSTILE_SITE_KEY_PATTERN)).optional(),
75
72
  /**
76
- * What the customer chose about the submissions of the site's forms (TAG-730): `suspects` (keep
73
+ * What the customer chose about the submissions of the site's forms: `suspects` (keep
77
74
  * is the default, drop is opt-in) and `dailyCap` (per site, up to the platform ceiling the API
78
75
  * checks). Absent when nothing was chosen. Never served to visitors (`/m/` leaves it out).
79
76
  */
@@ -81,12 +78,12 @@ export const siteManifestSchema = z.strictObject({
81
78
  .strictObject({
82
79
  suspects: z.enum(SUSPECT_POLICIES).optional(),
83
80
  dailyCap: z.int().min(DAILY_CAP_MIN).max(DAILY_CAP_HARD_MAX).optional(),
84
- /** TAG-816: honor `Sec-GPC`/`DNT` at the event ingest; absent means `RESPECT_GPC_DEFAULT`. */
81
+ /** honor `Sec-GPC`/`DNT` at the event ingest; absent means `RESPECT_GPC_DEFAULT`. */
85
82
  respectGpc: z.boolean().optional(),
86
83
  })
87
84
  .optional(),
88
85
  /**
89
- * The runtime ring of the site (TAG-611): `canary` sites get the canary runtime version, the
86
+ * The runtime ring of the site: `canary` sites get the canary runtime version, the
90
87
  * rest (field absent or `stable`) the stable one. Set by the Taggor operator, never by the
91
88
  * customer; the API writes it only for canary sites, and the edge leaves it out of `/m/`.
92
89
  */
@@ -1 +1 @@
1
- {"version":3,"file":"site-manifest.js","sourceRoot":"","sources":["../src/site-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,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;IACxC,sEAAsE;IACtE,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACrD,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC,GAAG,CAAC,4BAA4B,CAAC;IAClF;;;OAGG;IACH,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,0BAA0B,CAAC,CAAC,CAAC,QAAQ,EAAE;IACrF;;;;OAIG;IACH,UAAU,EAAE,CAAC;SACV,YAAY,CAAC;QACZ,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE;QAC7C,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;QACvE,qFAAqF;QACrF,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KACnC,CAAC;SACD,QAAQ,EAAE;IACb;;;;OAIG;IACH,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;IAC7C,2EAA2E;IAC3E,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,KAAK,CAAC,qBAAqB,CAAC;SAC5B,QAAQ,EAAE;CACd,CAAC,CAAC"}
@@ -1,15 +1,15 @@
1
1
  import { type SourceProblem } from "./executable-config.js";
2
2
  export type { SourceProblem } from "./executable-config.js";
3
3
  /**
4
- * Text extensions a source package may contain; `scss` since TAG-408 (compiled by the builder).
5
- * The asset extensions (`ASSET_SOURCE_EXTENSIONS`, TAG-410) are accepted too, as bytes.
4
+ * Text extensions a source package may contain; `scss` (compiled by the builder).
5
+ * The asset extensions (`ASSET_SOURCE_EXTENSIONS`) are accepted too, as bytes.
6
6
  */
7
7
  export declare const SOURCE_EXTENSIONS: ReadonlySet<string>;
8
8
  /** Most problems one read reports; the rest are dropped (each costs a diagnostic). */
9
9
  export declare const MAX_SOURCE_PROBLEMS = 20;
10
10
  /**
11
- * The outcome: the text files (virtual path → text) and the asset files (virtual path → bytes,
12
- * TAG-410; always empty for a policy that never places an asset), or why the archive was refused.
11
+ * The outcome: the text files (virtual path → text) and the asset files (virtual path → bytes;
12
+ * always empty for a policy that never places an asset), or why the archive was refused.
13
13
  */
14
14
  export type SourceArchiveResult = {
15
15
  readonly ok: true;
@@ -29,7 +29,7 @@ export interface SourceArchiveLimits {
29
29
  readonly maxUnpackedBytes: number;
30
30
  /**
31
31
  * Headers of any kind (files, folders, refused entries, pax headers), so a package of tens of
32
- * thousands of folders stops early (TAG-407 re-review, B8). Default: `ENTRIES_PER_FILE` ×
32
+ * thousands of folders stops early. Default: `ENTRIES_PER_FILE` ×
33
33
  * `maxFiles`, so a caller that tunes only `maxFiles` (the builder's `tuneBuildLimits`) moves
34
34
  * this cap with it.
35
35
  */
@@ -38,7 +38,7 @@ export interface SourceArchiveLimits {
38
38
  /** Headers allowed per regular file when `maxEntries` is not given: room for folders and pax. */
39
39
  export declare const ENTRIES_PER_FILE = 4;
40
40
  /**
41
- * Most bytes of one pax header (TAG-407 security review, M2): the only value read is `path`, at
41
+ * Most bytes of one pax header: the only value read is `path`, at
42
42
  * most `maxPathLength` characters, so 64 KiB leaves room for every metadata record; 20 MiB of
43
43
  * tiny records took 6 s of CPU.
44
44
  */
@@ -48,9 +48,9 @@ export declare const MAX_PAX_RECORDS = 256;
48
48
  /**
49
49
  * Pax records allowed per entry in the whole archive: the cap is this × `maxEntries` (16,000
50
50
  * with the default 2,000, about 40 ms at 2.3 µs a record). One header of 256 records per entry
51
- * cost 1 to 1.4 s of CPU per read (TAG-425 security review, M2); a flat 4,096 refused a real
51
+ * cost 1 to 1.4 s of CPU per read; a flat 4,096 refused a real
52
52
  * package, 500 files and 101 folders from macOS bsdtar with `com.apple.quarantine` at 7 records
53
- * each (re-review).
53
+ * each.
54
54
  */
55
55
  export declare const PAX_RECORDS_PER_ENTRY = 8;
56
56
  /** The outcome of checking one archive path. */
@@ -72,7 +72,7 @@ export type ArchivePathResult = {
72
72
  */
73
73
  export declare function checkArchivePath(raw: string, maxPathLength: number): ArchivePathResult;
74
74
  /**
75
- * Where a policy puts one entry: a virtual path (as bytes with `asset`, TAG-410; as UTF-8 text
75
+ * Where a policy puts one entry: a virtual path (as bytes with `asset`; as UTF-8 text
76
76
  * otherwise), nowhere (`skip`) or a refusal.
77
77
  */
78
78
  export type TarEntryPlacement = {
@@ -84,9 +84,9 @@ export type TarEntryPlacement = {
84
84
  readonly problem: SourceProblem;
85
85
  };
86
86
  /**
87
- * Where the regular files and folders of an archive go (TAG-402). `file` maps a regular file's
87
+ * Where the regular files and folders of an archive go. `file` maps a regular file's
88
88
  * stored path to its virtual path, skips it (`{ skip: true }`: not part of the result, its bytes
89
- * still count in the limits) or refuses it; `directory` does the same for a folder (TAG-425: the
89
+ * still count in the limits) or refuses it; `directory` does the same for a folder (the
90
90
  * mapped path of an accepted folder is checked against the files, `folderClashes`; a skipped one,
91
91
  * such as npm's `package/`, is not). The source package's policy is `fileProblem` below.
92
92
  */
@@ -99,7 +99,7 @@ export interface TarEntryPolicy {
99
99
  *
100
100
  * Inputs: the uncompressed archive bytes and the limits. Output: `{ ok: true, files, assets }` with
101
101
  * every regular file decoded as UTF-8 under its virtual path (`/src/a.ts`), except the ones the
102
- * policy places as assets (TAG-410: the source package's images and fonts under `src/`), which are
102
+ * policy places as assets (the source package's images and fonts under `src/`), which are
103
103
  * copied as bytes into `assets`; or `{ ok: false, problems }`
104
104
  * (at most `MAX_SOURCE_PROBLEMS`). A broken archive stops at its first problem (`SOURCE_INVALID`:
105
105
  * bad checksum, size or other numeric field, a GNU or v7 header, a truncated body or header, a
@@ -110,7 +110,7 @@ export interface TarEntryPolicy {
110
110
  * (`checkArchivePath`), `SOURCE_ENTRY_NOT_ALLOWED` (symlink, hardlink, device, FIFO, GNU record),
111
111
  * `SOURCE_CONFIG_NOT_ALLOWED` (`executableConfigProblem`), `SOURCE_EXTENSION_NOT_ALLOWED`, and
112
112
  * `SOURCE_INVALID` for a duplicate path (also by letter case or Unicode normalization), a file that
113
- * is also a folder (`folderClashes`) or content that is not UTF-8. TAG-402: `policy` replaces the
113
+ * is also a folder (`folderClashes`) or content that is not UTF-8. `policy` replaces the
114
114
  * source package's own rules for paths and files (the npm tarballs of the builder's allowlist);
115
115
  * the limits, the folder clashes and the pax bounds apply to every policy, on the paths it maps.
116
116
  * Errors: never throws. Side effects: none.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Reader of the (already decompressed) source package: a POSIX tar archive. Created in the
3
- * builder by TAG-401; moved to the contract by TAG-407, so the API (first line,
3
+ * builder; moved to the contract, so the API (first line,
4
4
  * before the package is stored) and the build container (second line) read a package the same
5
5
  * way and refuse it with the same diagnostic codes.
6
6
  *
@@ -18,7 +18,7 @@
18
18
  * metadata, and pax headers are bounded in bytes and records. The result is the in-memory file
19
19
  * map the build runs on, so nothing the customer sends is ever written to a disk.
20
20
  *
21
- * TAG-410: the asset files a component imports (`ASSET_SOURCE_EXTENSIONS`: images and WOFF2 fonts)
21
+ * The asset files a component imports (`ASSET_SOURCE_EXTENSIONS`: images and WOFF2 fonts)
22
22
  * may be in the package too, under `src/` only, and are kept as bytes (`assets`), never decoded as
23
23
  * text; every other check (path, duplicates, limits) is the same for them.
24
24
  *
@@ -26,7 +26,7 @@
26
26
  * `MAX_SOURCE_PROBLEMS`, so an agent fixes them in one round; a broken archive or a limit stops
27
27
  * the read at once.
28
28
  *
29
- * TAG-402: the builder reads the npm tarballs of its allowlist with this same reader, through a
29
+ * The builder reads the npm tarballs of its allowlist with this same reader, through a
30
30
  * `TarEntryPolicy` of its own (strip `package/`, keep only module files, skip the rest); the
31
31
  * header, pax, entry-type, limit and duplicate checks are the same for both.
32
32
  *
@@ -40,8 +40,8 @@ const BLOCK = 512;
40
40
  /** Entry types that carry a body: regular files (`0`, NUL) and pax headers (`x`, `g`). */
41
41
  const BODY_TYPES = new Set(["0", "\0", "x", "g"]);
42
42
  /**
43
- * Text extensions a source package may contain; `scss` since TAG-408 (compiled by the builder).
44
- * The asset extensions (`ASSET_SOURCE_EXTENSIONS`, TAG-410) are accepted too, as bytes.
43
+ * Text extensions a source package may contain; `scss` (compiled by the builder).
44
+ * The asset extensions (`ASSET_SOURCE_EXTENSIONS`) are accepted too, as bytes.
45
45
  */
46
46
  export const SOURCE_EXTENSIONS = new Set([
47
47
  "ts",
@@ -59,7 +59,7 @@ export const MAX_SOURCE_PROBLEMS = 20;
59
59
  /** Headers allowed per regular file when `maxEntries` is not given: room for folders and pax. */
60
60
  export const ENTRIES_PER_FILE = 4;
61
61
  /**
62
- * Names, pax keys and pax values keep a leading U+FEFF (TAG-407 security review, M1): a decoder
62
+ * Names, pax keys and pax values keep a leading U+FEFF: a decoder
63
63
  * that drops it made `\uFEFFsrc/index.tsx` read as `src/index.tsx` here while bsdtar keeps it
64
64
  * outside `src/`, and made a `\uFEFFpath` key act as `path` here while bsdtar and tarfile ignore
65
65
  * it. Kept, the BOM reaches `checkArchivePath` (and the key allowlist) and is refused. File
@@ -83,7 +83,7 @@ const POSIX_MAGIC = [0x75, 0x73, 0x74, 0x61, 0x72, 0x00, 0x30, 0x30];
83
83
  * Whether a header is POSIX ustar (the format pax extends). GNU headers (`ustar \0`) and v7
84
84
  * headers (no magic) are refused: in them the bytes at offset 345 are not a path prefix (GNU
85
85
  * keeps times there), so reading them as one made the builder see a different tree from bsdtar
86
- * and node-tar (TAG-401 security review, M2 remainder).
86
+ * and node-tar (M2 remainder).
87
87
  */
88
88
  function isPosixUstar(header) {
89
89
  return POSIX_MAGIC.every((byte, index) => header[257 + index] === byte);
@@ -91,8 +91,8 @@ function isPosixUstar(header) {
91
91
  /**
92
92
  * A numeric field as POSIX writes it: optional leading spaces, octal digits, then spaces or NULs
93
93
  * to the end of the field. Nothing else: `trim()` accepted a leading `\v`, `\n`, `\f`, `\r` or
94
- * U+00A0, which libarchive reads as 0, so the two disagreed on where the next header starts
95
- * (TAG-407 security review, A1). GNU's base-256 numbers are not POSIX and are refused too.
94
+ * U+00A0, which libarchive reads as 0, so the two disagreed on where the next header starts.
95
+ * GNU's base-256 numbers are not POSIX and are refused too.
96
96
  */
97
97
  const POSIX_NUMBER = /^ *([0-7]+)[ \0]*$/;
98
98
  function octal(header, offset, length) {
@@ -104,7 +104,7 @@ function octal(header, offset, length) {
104
104
  * them: optional leading spaces, octal digits, then spaces or NULs. The reader does not use their
105
105
  * values, but bsdtar refuses an archive whose first header has, say, `000064x` as its mode, and
106
106
  * tarfile stops at such a header further in, so both would see another tree (found by the
107
- * TAG-425 oracle). GNU base-256 values are refused here as everywhere.
107
+ * tar oracle). GNU base-256 values are refused here as everywhere.
108
108
  */
109
109
  const POSIX_NUMBER_OR_BLANK = /^ *[0-7]*[ \0]*$/;
110
110
  const OTHER_NUMBER_FIELDS = [
@@ -131,10 +131,10 @@ function isZeroBlock(header) {
131
131
  return header.every((byte) => byte === 0);
132
132
  }
133
133
  /**
134
- * The pax keys a package may carry (TAG-407 security review, B2): `path`, which the reader applies,
134
+ * The pax keys a package may carry: `path`, which the reader applies,
135
135
  * and metadata that changes neither where an entry's data is nor what it is (times, owners, the
136
136
  * node-tar `dev`/`ino`/`nlink`, a `comment` such as `git archive`'s, the creation time, the file
137
- * flags bsdtar writes from the disk (`SCHILY.fflags`, TAG-2239, only with the values of
137
+ * flags bsdtar writes from the disk (`SCHILY.fflags`, only with the values of
138
138
  * `ALLOWED_FFLAGS`) and the `com.apple.*` extended attributes macOS tar writes). Any other key is
139
139
  * refused: `size`,
140
140
  * `linkpath`, `GNU.sparse.*`, `SCHILY.realsize` (bsdtar truncates the file to it), `hdrcharset`
@@ -159,13 +159,13 @@ const ALLOWED_PAX_KEYS = new Set([
159
159
  /**
160
160
  * Extended attributes macOS tar writes (`SCHILY.xattr.com.apple.provenance`, `…quarantine`,
161
161
  * `…metadata:kMDItemWhereFroms`), ignored, since their values are raw bytes. Only `com.apple.*`
162
- * names with printable ASCII (TAG-407 re-review, B9): a consumer that extracts the package with
162
+ * names with printable ASCII: a consumer that extracts the package with
163
163
  * xattrs on Linux would apply `security.capability`, `trusted.*` or `system.posix_acl_*`, and a
164
164
  * NUL would cut a name to whatever follows a harmless-looking prefix.
165
165
  */
166
166
  const ALLOWED_XATTR_KEY = /^(?:SCHILY|LIBARCHIVE)\.xattr\.com\.apple\.[\x21-\x7e]{1,200}$/;
167
167
  /**
168
- * The file flags a `SCHILY.fflags` value may name (TAG-2239 security review, B1): the ones bsdtar
168
+ * The file flags a `SCHILY.fflags` value may name: the ones bsdtar
169
169
  * writes for an ordinary file (`nocow` on btrfs; `nodump`, `noatime`, `notail`, `compress` from
170
170
  * `chattr` on Linux; `hidden` on macOS), which a tool extracting as root may set on the file but
171
171
  * which never stop it from being changed or removed. `schg`, `uchg`, `sappnd`, `uappnd` (immutable
@@ -193,7 +193,7 @@ function isAllowedPaxKey(key) {
193
193
  return ALLOWED_PAX_KEYS.has(key) || ALLOWED_XATTR_KEY.test(key);
194
194
  }
195
195
  /**
196
- * Most bytes of one pax header (TAG-407 security review, M2): the only value read is `path`, at
196
+ * Most bytes of one pax header: the only value read is `path`, at
197
197
  * most `maxPathLength` characters, so 64 KiB leaves room for every metadata record; 20 MiB of
198
198
  * tiny records took 6 s of CPU.
199
199
  */
@@ -203,9 +203,9 @@ export const MAX_PAX_RECORDS = 256;
203
203
  /**
204
204
  * Pax records allowed per entry in the whole archive: the cap is this × `maxEntries` (16,000
205
205
  * with the default 2,000, about 40 ms at 2.3 µs a record). One header of 256 records per entry
206
- * cost 1 to 1.4 s of CPU per read (TAG-425 security review, M2); a flat 4,096 refused a real
206
+ * cost 1 to 1.4 s of CPU per read; a flat 4,096 refused a real
207
207
  * package, 500 files and 101 folders from macOS bsdtar with `com.apple.quarantine` at 7 records
208
- * each (re-review).
208
+ * each.
209
209
  */
210
210
  export const PAX_RECORDS_PER_ENTRY = 8;
211
211
  /** How to pack without the extended attributes Linux bsdtar stores by default. */
@@ -352,7 +352,7 @@ function extensionOf(path) {
352
352
  /**
353
353
  * The form two names share when a case-insensitive, normalizing disk (APFS, NTFS) would store
354
354
  * them as one file: NFC, then upper and lower case, so `σ`/`ς`, `s`/`ſ` and `ss`/`ß` meet as
355
- * well as `A`/`a` (TAG-407 security review, B1).
355
+ * well as `A`/`a`.
356
356
  */
357
357
  function foldName(path) {
358
358
  return path.normalize("NFC").toUpperCase().toLowerCase().normalize("NFC");
@@ -418,7 +418,7 @@ function sourcePolicy(limits) {
418
418
  *
419
419
  * Inputs: the uncompressed archive bytes and the limits. Output: `{ ok: true, files, assets }` with
420
420
  * every regular file decoded as UTF-8 under its virtual path (`/src/a.ts`), except the ones the
421
- * policy places as assets (TAG-410: the source package's images and fonts under `src/`), which are
421
+ * policy places as assets (the source package's images and fonts under `src/`), which are
422
422
  * copied as bytes into `assets`; or `{ ok: false, problems }`
423
423
  * (at most `MAX_SOURCE_PROBLEMS`). A broken archive stops at its first problem (`SOURCE_INVALID`:
424
424
  * bad checksum, size or other numeric field, a GNU or v7 header, a truncated body or header, a
@@ -429,7 +429,7 @@ function sourcePolicy(limits) {
429
429
  * (`checkArchivePath`), `SOURCE_ENTRY_NOT_ALLOWED` (symlink, hardlink, device, FIFO, GNU record),
430
430
  * `SOURCE_CONFIG_NOT_ALLOWED` (`executableConfigProblem`), `SOURCE_EXTENSION_NOT_ALLOWED`, and
431
431
  * `SOURCE_INVALID` for a duplicate path (also by letter case or Unicode normalization), a file that
432
- * is also a folder (`folderClashes`) or content that is not UTF-8. TAG-402: `policy` replaces the
432
+ * is also a folder (`folderClashes`) or content that is not UTF-8. `policy` replaces the
433
433
  * source package's own rules for paths and files (the npm tarballs of the builder's allowlist);
434
434
  * the limits, the folder clashes and the pax bounds apply to every policy, on the paths it maps.
435
435
  * Errors: never throws. Side effects: none.
@@ -492,7 +492,7 @@ export function readSourceArchive(archive, limits, policy = sourcePolicy(limits)
492
492
  const type = String.fromCharCode(header[156] ?? 0);
493
493
  // Only regular files and pax headers have a body. bsdtar and tarfile read the body of any
494
494
  // other entry (a directory, a link) as the next headers, so a size there would hide entries
495
- // from this reader that they extract (TAG-407 security review, A1).
495
+ // from this reader that they extract.
496
496
  if (size !== 0 && !BODY_TYPES.has(type)) {
497
497
  return invalid(`a ${JSON.stringify(type)} entry declares a body of ${String(size)} bytes`);
498
498
  }
@@ -596,8 +596,8 @@ export function readSourceArchive(archive, limits, policy = sourcePolicy(limits)
596
596
  }
597
597
  }
598
598
  // bsdtar fails on bytes left that are not a whole header, on a last body without its padding
599
- // (security review, M1: the offset then passes the end) and on an `x` header with no entry
600
- // after it, tarfile on a `g` header with none (found by the TAG-425 oracle).
599
+ // (the offset then passes the end) and on an `x` header with no entry
600
+ // after it, tarfile on a `g` header with none (found by the tar oracle).
601
601
  if (problems.length < MAX_SOURCE_PROBLEMS) {
602
602
  if (!ended && offset !== archive.length)
603
603
  return invalid("truncated tar archive");
@@ -611,8 +611,8 @@ export function readSourceArchive(archive, limits, policy = sourcePolicy(limits)
611
611
  return problems.length === 0 ? { ok: true, files, assets } : { ok: false, problems };
612
612
  }
613
613
  /**
614
- * Entries that no disk can hold together, after folding (TAG-407 security review, B1; directory
615
- * entries since the re-review, B7): a file or directory inside a path that is a file
614
+ * Entries that no disk can hold together, after folding (directory
615
+ * entries): a file or directory inside a path that is a file
616
616
  * (`src/a.ts` and `src/a.ts/b.ts`), and a file that is also a directory entry (`src/a.ts` and
617
617
  * `src/A.ts/`). Extracting the package would fail or drop one of them.
618
618
  */