@wildo-ai/platform-config-lib 1.1.11 → 1.1.12

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 (389) hide show
  1. package/dist/esm/_unimplemented/soft-warn.d.ts +24 -49
  2. package/dist/esm/_unimplemented/soft-warn.d.ts.map +1 -1
  3. package/dist/esm/_unimplemented/soft-warn.js +24 -49
  4. package/dist/esm/_unimplemented/soft-warn.js.map +1 -1
  5. package/dist/esm/blueprint/anchored-region.d.ts.map +1 -1
  6. package/dist/esm/blueprint/anchored-region.js.map +1 -1
  7. package/dist/esm/blueprint/blueprint.schemas.d.ts +0 -89
  8. package/dist/esm/blueprint/blueprint.schemas.d.ts.map +1 -1
  9. package/dist/esm/blueprint/blueprint.schemas.js.map +1 -1
  10. package/dist/esm/bootstrap/application-backend-env.contracts.d.ts.map +1 -1
  11. package/dist/esm/bootstrap/application-backend-env.contracts.js.map +1 -1
  12. package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts.map +1 -1
  13. package/dist/esm/bootstrap/application-creation-verification-env.contracts.js.map +1 -1
  14. package/dist/esm/bootstrap/bootstrap-planner.d.ts.map +1 -1
  15. package/dist/esm/bootstrap/bootstrap-planner.js.map +1 -1
  16. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  17. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  18. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +8 -1
  19. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  20. package/dist/esm/bootstrap/bootstrap.schemas.js +15 -1
  21. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  22. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +10 -2
  23. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  24. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +10 -2
  25. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  26. package/dist/esm/bootstrap/platform-store-preconnect.d.ts +21 -0
  27. package/dist/esm/bootstrap/platform-store-preconnect.d.ts.map +1 -1
  28. package/dist/esm/bootstrap/platform-store-preconnect.js +25 -0
  29. package/dist/esm/bootstrap/platform-store-preconnect.js.map +1 -1
  30. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts +80 -0
  31. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts.map +1 -0
  32. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js +81 -0
  33. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js.map +1 -0
  34. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts +41 -9
  35. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -1
  36. package/dist/esm/bootstrap/runtime-backing-service-access.js +77 -28
  37. package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -1
  38. package/dist/esm/bootstrap/runtime-network-policy.d.ts +117 -12
  39. package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -1
  40. package/dist/esm/bootstrap/runtime-network-policy.js +222 -23
  41. package/dist/esm/bootstrap/runtime-network-policy.js.map +1 -1
  42. package/dist/esm/bootstrap/runtime-network-topology.d.ts +31 -4
  43. package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -1
  44. package/dist/esm/bootstrap/runtime-network-topology.js +43 -2
  45. package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -1
  46. package/dist/esm/bootstrap/runtime-platform-access.d.ts.map +1 -1
  47. package/dist/esm/bootstrap/runtime-platform-access.js.map +1 -1
  48. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts +40 -2
  49. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -1
  50. package/dist/esm/bootstrap/runtime-principal.contracts.js +66 -3
  51. package/dist/esm/bootstrap/runtime-principal.contracts.js.map +1 -1
  52. package/dist/esm/bootstrap/runtime-response-integrity.d.ts.map +1 -1
  53. package/dist/esm/bootstrap/runtime-response-integrity.js +3 -3
  54. package/dist/esm/bootstrap/runtime-response-integrity.js.map +1 -1
  55. package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts.map +1 -1
  56. package/dist/esm/bootstrap/runtime-secret-env.contracts.js.map +1 -1
  57. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
  58. package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
  59. package/dist/esm/bootstrap/wildo-owner-organization.contracts.d.ts.map +1 -1
  60. package/dist/esm/bootstrap/wildo-owner-organization.contracts.js.map +1 -1
  61. package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts.map +1 -1
  62. package/dist/esm/canonical-json/rfc8785-canonical-json.js.map +1 -1
  63. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  64. package/dist/esm/config-authoring.entry.js.map +1 -1
  65. package/dist/esm/credentials/credential-generator.service.d.ts.map +1 -1
  66. package/dist/esm/credentials/credential-generator.service.js.map +1 -1
  67. package/dist/esm/index.d.ts +5 -1
  68. package/dist/esm/index.d.ts.map +1 -1
  69. package/dist/esm/index.js +5 -1
  70. package/dist/esm/index.js.map +1 -1
  71. package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts +119 -0
  72. package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts.map +1 -0
  73. package/dist/esm/key-management/application-legacy-envelope-key.contracts.js +109 -0
  74. package/dist/esm/key-management/application-legacy-envelope-key.contracts.js.map +1 -0
  75. package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts +182 -0
  76. package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts.map +1 -0
  77. package/dist/esm/key-management/application-signing-key-rotation.contracts.js +145 -0
  78. package/dist/esm/key-management/application-signing-key-rotation.contracts.js.map +1 -0
  79. package/dist/esm/key-management/approval-seal-manifested-copy.d.ts +156 -0
  80. package/dist/esm/key-management/approval-seal-manifested-copy.d.ts.map +1 -0
  81. package/dist/esm/key-management/approval-seal-manifested-copy.js +617 -0
  82. package/dist/esm/key-management/approval-seal-manifested-copy.js.map +1 -0
  83. package/dist/esm/key-management/approval-seal-verifier.d.ts +101 -39
  84. package/dist/esm/key-management/approval-seal-verifier.d.ts.map +1 -1
  85. package/dist/esm/key-management/approval-seal-verifier.js +134 -12
  86. package/dist/esm/key-management/approval-seal-verifier.js.map +1 -1
  87. package/dist/esm/key-management/approval-seal.contracts.d.ts +12 -15
  88. package/dist/esm/key-management/approval-seal.contracts.d.ts.map +1 -1
  89. package/dist/esm/key-management/approval-seal.contracts.js +20 -0
  90. package/dist/esm/key-management/approval-seal.contracts.js.map +1 -1
  91. package/dist/esm/key-management/data-key.contracts.d.ts +0 -2
  92. package/dist/esm/key-management/data-key.contracts.d.ts.map +1 -1
  93. package/dist/esm/key-management/data-key.contracts.js.map +1 -1
  94. package/dist/esm/key-management/es256-jws.d.ts.map +1 -1
  95. package/dist/esm/key-management/es256-jws.js.map +1 -1
  96. package/dist/esm/key-management/key-provider.spi.d.ts +8 -1
  97. package/dist/esm/key-management/key-provider.spi.d.ts.map +1 -1
  98. package/dist/esm/key-management/key-provider.spi.js.map +1 -1
  99. package/dist/esm/key-management/keyring-rotation.contracts.d.ts +2 -12
  100. package/dist/esm/key-management/keyring-rotation.contracts.d.ts.map +1 -1
  101. package/dist/esm/key-management/keyring-rotation.contracts.js +3 -3
  102. package/dist/esm/key-management/keyring-rotation.contracts.js.map +1 -1
  103. package/dist/esm/key-management/keyring-status.contracts.d.ts +0 -7
  104. package/dist/esm/key-management/keyring-status.contracts.d.ts.map +1 -1
  105. package/dist/esm/key-management/keyring-status.contracts.js.map +1 -1
  106. package/dist/esm/key-management/pdf-incremental-update.d.ts +158 -0
  107. package/dist/esm/key-management/pdf-incremental-update.d.ts.map +1 -0
  108. package/dist/esm/key-management/pdf-incremental-update.js +730 -0
  109. package/dist/esm/key-management/pdf-incremental-update.js.map +1 -0
  110. package/dist/esm/key-management/pdf-truetype-font.d.ts +35 -0
  111. package/dist/esm/key-management/pdf-truetype-font.d.ts.map +1 -0
  112. package/dist/esm/key-management/pdf-truetype-font.js +152 -0
  113. package/dist/esm/key-management/pdf-truetype-font.js.map +1 -0
  114. package/dist/esm/key-management/qr-code.d.ts +38 -0
  115. package/dist/esm/key-management/qr-code.d.ts.map +1 -0
  116. package/dist/esm/key-management/qr-code.js +325 -0
  117. package/dist/esm/key-management/qr-code.js.map +1 -0
  118. package/dist/esm/key-management/signature-request.contracts.d.ts +0 -4
  119. package/dist/esm/key-management/signature-request.contracts.d.ts.map +1 -1
  120. package/dist/esm/key-management/signature-request.contracts.js.map +1 -1
  121. package/dist/esm/key-management/signing-log-export.contracts.d.ts +0 -1
  122. package/dist/esm/key-management/signing-log-export.contracts.d.ts.map +1 -1
  123. package/dist/esm/key-management/signing-log-export.contracts.js.map +1 -1
  124. package/dist/esm/key-management/vault-custody.contracts.d.ts +43 -0
  125. package/dist/esm/key-management/vault-custody.contracts.d.ts.map +1 -1
  126. package/dist/esm/key-management/vault-custody.contracts.js +66 -0
  127. package/dist/esm/key-management/vault-custody.contracts.js.map +1 -1
  128. package/dist/esm/lockfile/build-parallelism.d.ts.map +1 -1
  129. package/dist/esm/lockfile/build-parallelism.js.map +1 -1
  130. package/dist/esm/lockfile/canonical-json.d.ts +1 -1
  131. package/dist/esm/lockfile/canonical-json.d.ts.map +1 -1
  132. package/dist/esm/lockfile/canonical-json.js +1 -1
  133. package/dist/esm/lockfile/canonical-json.js.map +1 -1
  134. package/dist/esm/lockfile/file-lock-hold.d.ts.map +1 -1
  135. package/dist/esm/lockfile/file-lock-hold.js +2 -1
  136. package/dist/esm/lockfile/file-lock-hold.js.map +1 -1
  137. package/dist/esm/lockfile/lockfile-io.d.ts +6 -8
  138. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
  139. package/dist/esm/lockfile/lockfile-io.js +6 -8
  140. package/dist/esm/lockfile/lockfile-io.js.map +1 -1
  141. package/dist/esm/lockfile/materialize-infra-section.d.ts +5 -6
  142. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
  143. package/dist/esm/lockfile/materialize-infra-section.js +4 -5
  144. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
  145. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +1 -247
  146. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
  147. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +1 -1
  148. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
  149. package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts +146 -0
  150. package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts.map +1 -0
  151. package/dist/esm/pnpm-settings/application-pnpm-settings.js +573 -0
  152. package/dist/esm/pnpm-settings/application-pnpm-settings.js.map +1 -0
  153. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -1
  154. package/dist/esm/project-config/application-public-pricing-catalog.loader.js +15 -3
  155. package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -1
  156. package/dist/esm/project-config/application-served-public-documents.loader.d.ts.map +1 -1
  157. package/dist/esm/project-config/application-served-public-documents.loader.js +16 -8
  158. package/dist/esm/project-config/application-served-public-documents.loader.js.map +1 -1
  159. package/dist/esm/project-config/backend-compliance-section.reader.d.ts +35 -0
  160. package/dist/esm/project-config/backend-compliance-section.reader.d.ts.map +1 -0
  161. package/dist/esm/project-config/backend-compliance-section.reader.js +123 -0
  162. package/dist/esm/project-config/backend-compliance-section.reader.js.map +1 -0
  163. package/dist/esm/project-config/backend-compliance-section.worker.d.ts +20 -0
  164. package/dist/esm/project-config/backend-compliance-section.worker.d.ts.map +1 -0
  165. package/dist/esm/project-config/backend-compliance-section.worker.js +78 -0
  166. package/dist/esm/project-config/backend-compliance-section.worker.js.map +1 -0
  167. package/dist/esm/project-config/config-module-resolution.d.ts +32 -0
  168. package/dist/esm/project-config/config-module-resolution.d.ts.map +1 -0
  169. package/dist/esm/project-config/config-module-resolution.js +33 -0
  170. package/dist/esm/project-config/config-module-resolution.js.map +1 -0
  171. package/dist/esm/project-config/define-framework-config.d.ts.map +1 -1
  172. package/dist/esm/project-config/define-framework-config.js.map +1 -1
  173. package/dist/esm/project-config/define-infra-env-config.d.ts +109 -55
  174. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
  175. package/dist/esm/project-config/define-infra-env-config.js +108 -70
  176. package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
  177. package/dist/esm/project-config/define-minion-config.d.ts +26 -36
  178. package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
  179. package/dist/esm/project-config/define-minion-config.js +64 -25
  180. package/dist/esm/project-config/define-minion-config.js.map +1 -1
  181. package/dist/esm/project-config/define-saas-config.d.ts +41 -437
  182. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  183. package/dist/esm/project-config/define-saas-config.js +102 -94
  184. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  185. package/dist/esm/project-config/define-worker-config.d.ts +10 -20
  186. package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
  187. package/dist/esm/project-config/define-worker-config.js +10 -12
  188. package/dist/esm/project-config/define-worker-config.js.map +1 -1
  189. package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -1
  190. package/dist/esm/project-config/hosted-infra-env-config.js +1 -1
  191. package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -1
  192. package/dist/esm/project-config/index.d.ts +2 -0
  193. package/dist/esm/project-config/index.d.ts.map +1 -1
  194. package/dist/esm/project-config/index.js +2 -0
  195. package/dist/esm/project-config/index.js.map +1 -1
  196. package/dist/esm/project-config/loader-instances-zod.d.ts +19 -0
  197. package/dist/esm/project-config/loader-instances-zod.d.ts.map +1 -0
  198. package/dist/esm/project-config/loader-instances-zod.js +40 -0
  199. package/dist/esm/project-config/loader-instances-zod.js.map +1 -0
  200. package/dist/esm/project-config/loader.d.ts +131 -14
  201. package/dist/esm/project-config/loader.d.ts.map +1 -1
  202. package/dist/esm/project-config/loader.js +226 -12
  203. package/dist/esm/project-config/loader.js.map +1 -1
  204. package/dist/esm/project-config/minion-liveness.contracts.d.ts +131 -0
  205. package/dist/esm/project-config/minion-liveness.contracts.d.ts.map +1 -0
  206. package/dist/esm/project-config/minion-liveness.contracts.js +167 -0
  207. package/dist/esm/project-config/minion-liveness.contracts.js.map +1 -0
  208. package/dist/esm/project-config/minion-local-provider-registration.d.ts.map +1 -1
  209. package/dist/esm/project-config/minion-local-provider-registration.js.map +1 -1
  210. package/dist/esm/project-config/npm-version-range.d.ts.map +1 -1
  211. package/dist/esm/project-config/npm-version-range.js.map +1 -1
  212. package/dist/esm/project-config/owning-package-tsconfig.d.ts +7 -7
  213. package/dist/esm/project-config/owning-package-tsconfig.d.ts.map +1 -1
  214. package/dist/esm/project-config/owning-package-tsconfig.js +7 -7
  215. package/dist/esm/project-config/owning-package-tsconfig.js.map +1 -1
  216. package/dist/esm/project-config/provider-catalog-types.d.ts.map +1 -1
  217. package/dist/esm/project-config/provider-catalog-types.js.map +1 -1
  218. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
  219. package/dist/esm/project-config/provider-companion-discovery.js +3 -1
  220. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
  221. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +71 -46
  222. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
  223. package/dist/esm/project-config/provider-runtime-artifacts.js +150 -4
  224. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
  225. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts +0 -2
  226. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -1
  227. package/dist/esm/project-config/shared/application-creation-verification.schemas.js.map +1 -1
  228. package/dist/esm/project-config/shared/application-modules.schemas.d.ts.map +1 -1
  229. package/dist/esm/project-config/shared/application-modules.schemas.js.map +1 -1
  230. package/dist/esm/project-config/shared/application-modules.utils.d.ts.map +1 -1
  231. package/dist/esm/project-config/shared/application-modules.utils.js.map +1 -1
  232. package/dist/esm/project-config/shared/auth.schemas.d.ts +0 -17
  233. package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -1
  234. package/dist/esm/project-config/shared/auth.schemas.js.map +1 -1
  235. package/dist/esm/project-config/shared/backing-service-servability.d.ts.map +1 -1
  236. package/dist/esm/project-config/shared/backing-service-servability.js.map +1 -1
  237. package/dist/esm/project-config/shared/backing-services.schemas.d.ts +9 -10
  238. package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
  239. package/dist/esm/project-config/shared/backing-services.schemas.js +13 -15
  240. package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
  241. package/dist/esm/project-config/shared/cdn.schemas.d.ts +0 -51
  242. package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -1
  243. package/dist/esm/project-config/shared/cdn.schemas.js.map +1 -1
  244. package/dist/esm/project-config/shared/csp-defaults.d.ts +34 -6
  245. package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
  246. package/dist/esm/project-config/shared/csp-defaults.js +52 -8
  247. package/dist/esm/project-config/shared/csp-defaults.js.map +1 -1
  248. package/dist/esm/project-config/shared/csp-emit.d.ts +60 -13
  249. package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -1
  250. package/dist/esm/project-config/shared/csp-emit.js +77 -24
  251. package/dist/esm/project-config/shared/csp-emit.js.map +1 -1
  252. package/dist/esm/project-config/shared/csp.schemas.d.ts +72 -84
  253. package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
  254. package/dist/esm/project-config/shared/csp.schemas.js +40 -12
  255. package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
  256. package/dist/esm/project-config/shared/data-services.schemas.d.ts +0 -8
  257. package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
  258. package/dist/esm/project-config/shared/data-services.schemas.js.map +1 -1
  259. package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
  260. package/dist/esm/project-config/shared/env-example-defaults.js.map +1 -1
  261. package/dist/esm/project-config/shared/environment.schemas.d.ts +95 -8
  262. package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
  263. package/dist/esm/project-config/shared/environment.schemas.js +122 -10
  264. package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
  265. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +10 -4
  266. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -1
  267. package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -1
  268. package/dist/esm/project-config/shared/infra-service.schemas.d.ts.map +1 -1
  269. package/dist/esm/project-config/shared/infra-service.schemas.js.map +1 -1
  270. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +1 -1
  271. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
  272. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +1 -1
  273. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
  274. package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
  275. package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
  276. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -1
  277. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -1
  278. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +20 -0
  279. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
  280. package/dist/esm/project-config/shared/minion-resource-access.validation.js +21 -2
  281. package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
  282. package/dist/esm/project-config/shared/object-storage-session-policy.d.ts.map +1 -1
  283. package/dist/esm/project-config/shared/object-storage-session-policy.js.map +1 -1
  284. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts +62 -36
  285. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts.map +1 -1
  286. package/dist/esm/project-config/shared/platform-key-management.schemas.js +105 -3
  287. package/dist/esm/project-config/shared/platform-key-management.schemas.js.map +1 -1
  288. package/dist/esm/project-config/shared/platform-services.schemas.d.ts.map +1 -1
  289. package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
  290. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts +2 -2
  291. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts.map +1 -1
  292. package/dist/esm/project-config/shared/platform-storage.schemas.js +16 -2
  293. package/dist/esm/project-config/shared/platform-storage.schemas.js.map +1 -1
  294. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts +21 -23
  295. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
  296. package/dist/esm/project-config/shared/service-definitions.schemas.js +4 -5
  297. package/dist/esm/project-config/shared/service-definitions.schemas.js.map +1 -1
  298. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts +0 -18
  299. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts.map +1 -1
  300. package/dist/esm/project-config/shared/systems-of-record-env.schemas.js.map +1 -1
  301. package/dist/esm/project-config/static-asset-import-noop.d.ts +20 -3
  302. package/dist/esm/project-config/static-asset-import-noop.d.ts.map +1 -1
  303. package/dist/esm/project-config/static-asset-import-noop.js +36 -20
  304. package/dist/esm/project-config/static-asset-import-noop.js.map +1 -1
  305. package/dist/esm/registry/artifact-domain.schemas.d.ts +0 -5
  306. package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -1
  307. package/dist/esm/registry/artifact-domain.schemas.js.map +1 -1
  308. package/dist/esm/registry/digest.schemas.d.ts.map +1 -1
  309. package/dist/esm/registry/digest.schemas.js.map +1 -1
  310. package/dist/esm/registry/index.d.ts +2 -3
  311. package/dist/esm/registry/index.d.ts.map +1 -1
  312. package/dist/esm/registry/index.js +2 -3
  313. package/dist/esm/registry/index.js.map +1 -1
  314. package/dist/esm/registry/local-checkout-source.d.ts.map +1 -1
  315. package/dist/esm/registry/local-checkout-source.js.map +1 -1
  316. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +1 -98
  317. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
  318. package/dist/esm/registry/lockfile-modules-section.schemas.js +1 -2
  319. package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -1
  320. package/dist/esm/registry/module-artifact.schemas.d.ts +17 -17
  321. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
  322. package/dist/esm/registry/module-artifact.schemas.js.map +1 -1
  323. package/dist/esm/registry/module-manifest.schemas.d.ts +151 -219
  324. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
  325. package/dist/esm/registry/module-manifest.schemas.js +145 -13
  326. package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
  327. package/dist/esm/registry/module-search.schemas.d.ts.map +1 -1
  328. package/dist/esm/registry/module-search.schemas.js.map +1 -1
  329. package/dist/esm/registry/registry-config.schemas.d.ts +0 -18
  330. package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -1
  331. package/dist/esm/registry/registry-config.schemas.js.map +1 -1
  332. package/dist/esm/registry/registry-defaults.constants.d.ts.map +1 -1
  333. package/dist/esm/registry/registry-defaults.constants.js.map +1 -1
  334. package/dist/esm/registry/registry-errors.d.ts +81 -3
  335. package/dist/esm/registry/registry-errors.d.ts.map +1 -1
  336. package/dist/esm/registry/registry-errors.js +185 -4
  337. package/dist/esm/registry/registry-errors.js.map +1 -1
  338. package/dist/esm/registry/registry-keys.schemas.d.ts.map +1 -1
  339. package/dist/esm/registry/registry-keys.schemas.js.map +1 -1
  340. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
  341. package/dist/esm/registry/registry-section-schemas.constants.js.map +1 -1
  342. package/dist/esm/registry/registry-url-resolution.d.ts.map +1 -1
  343. package/dist/esm/registry/registry-url-resolution.js.map +1 -1
  344. package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
  345. package/dist/esm/release/framework-release.constants.js.map +1 -1
  346. package/dist/esm/schemas/framework-info.schemas.d.ts.map +1 -1
  347. package/dist/esm/schemas/framework-info.schemas.js.map +1 -1
  348. package/dist/esm/schemas/framework-secrets.schemas.d.ts +0 -7
  349. package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
  350. package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
  351. package/dist/esm/schemas/platform-application-config.schemas.d.ts +1 -1
  352. package/dist/esm/schemas/platform-application-config.schemas.d.ts.map +1 -1
  353. package/dist/esm/schemas/platform-application-config.schemas.js.map +1 -1
  354. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +1 -1
  355. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts.map +1 -1
  356. package/dist/esm/schemas/platform-application-secrets.schemas.js.map +1 -1
  357. package/dist/esm/schemas/platform-config.schemas.d.ts +2 -2
  358. package/dist/esm/schemas/platform-config.schemas.d.ts.map +1 -1
  359. package/dist/esm/schemas/platform-config.schemas.js.map +1 -1
  360. package/dist/esm/workspace-scope/application-subject-manifest.d.ts.map +1 -1
  361. package/dist/esm/workspace-scope/application-subject-manifest.js.map +1 -1
  362. package/dist/esm/workspace-scope/index.d.ts.map +1 -1
  363. package/dist/esm/workspace-scope/index.js.map +1 -1
  364. package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -1
  365. package/dist/esm/workspace-scope/resolve-homes.js.map +1 -1
  366. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -1
  367. package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -1
  368. package/dist/esm/workspace-scope/workspace-scope-detector.d.ts.map +1 -1
  369. package/dist/esm/workspace-scope/workspace-scope-detector.js.map +1 -1
  370. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
  371. package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
  372. package/dist/tsconfig.build.tsbuildinfo +1 -1
  373. package/package.json +12 -12
  374. package/dist/esm/_unimplemented/index.d.ts +0 -3
  375. package/dist/esm/_unimplemented/index.d.ts.map +0 -1
  376. package/dist/esm/_unimplemented/index.js +0 -3
  377. package/dist/esm/_unimplemented/index.js.map +0 -1
  378. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +0 -137
  379. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts.map +0 -1
  380. package/dist/esm/_unimplemented/unimplemented-field-warning.js +0 -153
  381. package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +0 -1
  382. package/dist/esm/project-config/shared/cdn.example.d.ts +0 -14
  383. package/dist/esm/project-config/shared/cdn.example.d.ts.map +0 -1
  384. package/dist/esm/project-config/shared/cdn.example.js +0 -38
  385. package/dist/esm/project-config/shared/cdn.example.js.map +0 -1
  386. package/dist/esm/project-config/shared/schema-version.schemas.d.ts +0 -15
  387. package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +0 -1
  388. package/dist/esm/project-config/shared/schema-version.schemas.js +0 -40
  389. package/dist/esm/project-config/shared/schema-version.schemas.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-seal-manifested-copy.js","sourceRoot":"","sources":["../../../src/key-management/approval-seal-manifested-copy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,iCAAiC,EAAE,6BAA6B,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACjI,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EACL,iBAAiB,EACjB,2BAA2B,EAC3B,gCAAgC,EAChC,0BAA0B,EAC1B,GAAG,GAKJ,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,gBAAgB,EAAqB,MAAM,qBAAqB,CAAC;AAEvG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,2HAA2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MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;YAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC7E,OAAO;YACL,OAAO,EAAE,IAAI;YACb,QAAQ;YACR,SAAS,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;SACtL,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC","sourcesContent":["import { createHash } from 'node:crypto';\nimport { APPROVAL_SEAL_MANIFESTATION_WORDS, ApprovalSealManifestationWord, interpolateLabelParams } from '@wildo-ai/saas-models';\nimport { canonicalizeJson } from '../canonical-json/rfc8785-canonical-json';\nimport {\n PdfDocumentReader,\n PdfIncrementalUpdateRefusal,\n PdfIncrementalUpdateRefusedError,\n appendPdfIncrementalUpdate,\n pdf,\n type PdfDict,\n type PdfObject,\n type PdfRef,\n type PdfUpdateObject,\n} from './pdf-incremental-update';\nimport { QrCodeTooLongError, QrErrorCorrection, encodeQrCode } from './qr-code';\nimport { TrueTypeFontUnreadableError, readTrueTypeFont, type TrueTypeFont } from './pdf-truetype-font';\n\n/**\n * # The manifested copy of an approved deliverable (#2907)\n *\n * A deliverable a person approved is frozen before anyone approves it (#2904), so it cannot carry its own approval. The\n * manifested copy is a SEPARATE file: the frozen original, byte for byte, followed by one incremental-update section that\n * adds a last page stating who approved it, when, and what the approval meant, and attaches the approval seal's JWS. The\n * pattern is the signature manifestation of 21 CFR §11.50 (printed name, date and time, meaning), borrowed: no Part 11\n * compliance is claimed.\n *\n * spec-cite: 21 CFR §11.50(a) (https://www.ecfr.gov/current/title-21/chapter-I/subchapter-A/part-11/subpart-C/section-11.50) — the three elements, paraphrased.\n *\n * ## Why the copy can be checked from the seal\n *\n * Everything appended is a PURE function of its inputs: the original's bytes, the seal's JWS, the approver's printed\n * name, the page's words, the embedded font and the verification address. The copy carries every input but the\n * original's bytes (its prefix) and the JWS (attached, and given to the verifier): the words, the name and the address in\n * an attached `manifestation.json`, the font as its embedded font program. So a verifier splits the copy at its marker\n * ({@link APPROVAL_SEAL_MANIFESTED_COPY_MARKER}, the LAST occurrence), takes those inputs back, rebuilds the copy and\n * compares byte for byte: one changed byte anywhere in the appended section and the copy is not this seal's.\n *\n * What the rebuild cannot vouch for, and who does: the WORDS are the producing application's, so the host's record of the\n * copy's SHA-256 (in a verification bundle) binds them; the FONT is pinned by its SHA-256\n * ({@link APPROVAL_SEAL_MANIFESTATION_FONT_SHA256S}), so a font drawing other glyphs for the same codes is refused; the\n * NAME is checked against the seal's approver disclosure when it is given; the ORIGINAL against the seal's commitment to\n * the approved file.\n *\n * ## Words, names and the font\n *\n * The words are the application's (`backend_documents.approval_manifestation.*`, and the meaning and outcome vocabularies),\n * in one language. Text is set in Liberation Sans Regular (SIL Open Font License 1.1, which permits embedding it in\n * documents), embedded WHOLE as a CID font with Identity-H encoding and a ToUnicode map, so a reader extracts the text it\n * shows. Embedding the whole font rather than a subset is deliberate: a subset differs with the text, so only the whole\n * font can be pinned by one digest. A name or a word with a character the font has no glyph for refuses the copy; it is\n * never printed approximately. The font covers Latin, Greek and Cyrillic.\n *\n * ## The attachments (ISO 32000-1 §7.11.4, §12.5.6.15; ISO 32000-2 §14.13)\n *\n * The JWS is attached twice over one file specification: by a file attachment annotation on the page, and at document\n * level in the catalog's `EmbeddedFiles` name tree and its `AF` array (PDF 2.0 associated files, `AFRelationship`\n * Supplement), where viewers list a document's attachments. `manifestation.json` is attached at document level only.\n *\n * spec-cite: ISO 32000-1:2008 §7.7.2 (document catalog), §7.7.4 (name dictionary, EmbeddedFiles), §7.9.6 (name trees),\n * §7.11.3–§7.11.4 (file specifications, embedded file streams), §9.7.4 (CIDFontType2), §9.7.5.2 (Identity-H), §9.10.3\n * (ToUnicode CMaps), §12.5.6.15 (file attachment annotations); ISO 32000-2:2020 §14.13 (associated files). Cited by section.\n */\n\n/** Opens the appended section: the copy is split at its LAST occurrence. Never produced by anything this module writes. */\nexport const APPROVAL_SEAL_MANIFESTED_COPY_MARKER = '\\n%wildo-manifested-copy:2\\n';\n\n/** The layout version recorded in `manifestation.json`. */\nexport const APPROVAL_SEAL_MANIFESTATION_VERSION = 2;\n\n/** The attached JWS's file name. */\nexport const APPROVAL_SEAL_MANIFESTED_COPY_ATTACHMENT_NAME = 'approval-seal.jws';\n\n/** The attached record of the copy's inputs. */\nexport const APPROVAL_SEAL_MANIFESTATION_CONTEXT_NAME = 'manifestation.json';\n\n/**\n * The fonts a copy may embed, by the SHA-256 of the font program: Liberation Sans Regular 2.x (SIL Open Font License 1.1),\n * the file `pdfjs-dist` ships as `standard_fonts/LiberationSans-Regular.ttf`. A font is added here, never replaced, so a\n * copy made with an earlier font still verifies.\n */\nexport const APPROVAL_SEAL_MANIFESTATION_FONT_SHA256S: ReadonlySet<string> = new Set([\n 'f8ace1f892b2bd9dc1792ba7f097fa7588f84fed48321480e04de5390828221f',\n]);\n\n/** Why no manifested copy can be made of a deliverable. */\nexport enum ApprovalSealManifestedCopyRefusal {\n /** The deliverable is not a PDF. */\n NOT_A_PDF = 'not_a_pdf',\n /** The PDF is encrypted. */\n ENCRYPTED = 'encrypted',\n /** The PDF uses a structure the appender does not follow. */\n UNSUPPORTED_STRUCTURE = 'unsupported_structure',\n /** The JWS is not an approval seal's: no claims to print. */\n NOT_A_SEAL = 'not_a_seal',\n /** The seal records no printed name for its approver. */\n NO_PRINTED_NAME = 'no_printed_name',\n /** A character of the name or of a word has no glyph in the font: it is never printed approximately. */\n TEXT_NOT_PRINTABLE = 'text_not_printable',\n /** The font is not one of the pinned ones, or not a TrueType font this writer reads. */\n FONT_NOT_PINNED = 'font_not_pinned',\n /** A word is missing, empty, or drops a parameter it must print. */\n WORDING_INCOMPLETE = 'wording_incomplete',\n /** The verification address with the JWS is too long for a QR code. */\n VERIFICATION_LINK_TOO_LONG = 'verification_link_too_long',\n}\n\nexport class ApprovalSealManifestedCopyRefusedError extends Error {\n constructor(readonly refusal: ApprovalSealManifestedCopyRefusal, message: string) {\n super(message);\n this.name = 'ApprovalSealManifestedCopyRefusedError';\n }\n}\n\n/** The page's words, as the application's label tree gives them, in one language. */\nexport interface ApprovalSealManifestationWording {\n /** The language the words are in (the application's primary one). */\n readonly locale: string;\n /** Every word, as a template with its declared `{param}` placeholders. */\n readonly words: Readonly<Record<ApprovalSealManifestationWord, string>>;\n /** The word of the seal's meaning (`system_enums.ApprovalSealMeaning.<value>`). */\n readonly meaningWord: string;\n /** The word of the seal's outcome (`system_enums.HumanDecision_Outcome.<value>`). */\n readonly outcomeWord: string;\n}\n\n/** What a manifested copy is built from. Nothing else reaches its bytes. */\nexport interface ApprovalSealManifestationInput {\n /** The approved deliverable's bytes, as the seal attests them. */\n readonly original: Uint8Array;\n /** The seal's compact JWS: attached, and the source of every printed claim. */\n readonly jws: string;\n /** The approver's printed name, from their disclosure (`value.name`). */\n readonly approverName: string;\n readonly wording: ApprovalSealManifestationWording;\n /** A TrueType font program whose SHA-256 is pinned ({@link APPROVAL_SEAL_MANIFESTATION_FONT_SHA256S}). */\n readonly font: Uint8Array;\n /**\n * The application's public verification route, absolute; the page prints a QR code linking to it with the JWS\n * ({@link approvalSealVerificationLinkOf}). Absent, the page has no code.\n */\n readonly verificationUrl?: string;\n}\n\n/**\n * The link a copy's QR code carries: the public verification route with the JWS as its `jws` parameter. A JWS names no\n * person and no row, so the link carries no personal data and no database id; the route verifies from it alone.\n */\nexport function approvalSealVerificationLinkOf(verificationUrl: string, jws: string): string {\n return `${verificationUrl}${verificationUrl.includes('?') ? '&' : '?'}jws=${jws}`;\n}\n\n/** The claims a manifestation prints, read from the JWS payload. */\ninterface PrintedClaims {\n readonly jti: string;\n readonly iss: string;\n readonly iat: number;\n readonly decidedAt: number;\n readonly meaning: string;\n readonly outcome: string;\n}\n\nconst refuse = (refusal: ApprovalSealManifestedCopyRefusal, message: string) => new ApprovalSealManifestedCopyRefusedError(refusal, message);\n\nfunction printedClaimsOf(jws: string): PrintedClaims {\n const notASeal = () => refuse(ApprovalSealManifestedCopyRefusal.NOT_A_SEAL, 'the JWS carries no approval seal claims to print');\n const parts = jws.split('.');\n if (parts.length !== 3) throw notASeal();\n let payload: Record<string, unknown>;\n try {\n payload = JSON.parse(Buffer.from(parts[1]!, 'base64url').toString('utf8')) as Record<string, unknown>;\n } catch {\n throw notASeal();\n }\n const { jti, iss, iat, decidedAt, meaning, outcome } = payload ?? {};\n if (typeof jti !== 'string' || typeof iss !== 'string' || typeof iat !== 'number' || typeof decidedAt !== 'number'\n || typeof meaning !== 'string' || typeof outcome !== 'string') throw notASeal();\n return { jti, iss, iat, decidedAt, meaning, outcome };\n}\n\nconst isoSeconds = (epochSeconds: number) => new Date(epochSeconds * 1000).toISOString().replace(/\\.\\d{3}Z$/, 'Z');\n\n/** The record of the inputs a copy was made with, attached as `manifestation.json`. */\ninterface ManifestationContext {\n readonly v: number;\n readonly locale: string;\n readonly words: Readonly<Record<string, string>>;\n readonly meaningWord: string;\n readonly outcomeWord: string;\n readonly approverName: string;\n readonly verificationUrl?: string;\n}\n\n/** A word filled with its parameters; refused when the template is missing, empty, or drops a parameter it must print. */\nfunction filled(wording: ApprovalSealManifestationWording, word: ApprovalSealManifestationWord, params: Record<string, string> = {}): string {\n const template = wording.words[word];\n if (typeof template !== 'string' || template.trim().length === 0) {\n throw refuse(ApprovalSealManifestedCopyRefusal.WORDING_INCOMPLETE, `the word '${word}' is missing`);\n }\n for (const param of APPROVAL_SEAL_MANIFESTATION_WORDS[word].params) {\n if (!template.includes(`{${param}}`)) throw refuse(ApprovalSealManifestedCopyRefusal.WORDING_INCOMPLETE, `the word '${word}' does not print {${param}}`);\n }\n return interpolateLabelParams(template, params, wording.locale);\n}\n\n/** Text set in the embedded font: its glyphs, its width, every glyph's character for the ToUnicode map. */\nclass TextSetter {\n readonly used = new Map<number, string>();\n constructor(private readonly font: TrueTypeFont) {}\n\n glyphsOf(text: string): number[] {\n const glyphs: number[] = [];\n for (const char of text.normalize('NFC')) {\n const codePoint = char.codePointAt(0)!;\n const glyph = codePoint >= 0x20 ? this.font.glyphOf(codePoint) : undefined;\n if (glyph === undefined) {\n throw refuse(ApprovalSealManifestedCopyRefusal.TEXT_NOT_PRINTABLE, `U+${codePoint.toString(16).toUpperCase().padStart(4, '0')} has no glyph in the embedded font`);\n }\n if (!this.used.has(glyph)) this.used.set(glyph, char);\n glyphs.push(glyph);\n }\n return glyphs;\n }\n\n widthOf(text: string, size: number): number {\n return this.glyphsOf(text).reduce((sum, glyph) => sum + this.font.advanceOf(glyph), 0) * size / this.font.unitsPerEm;\n }\n\n /** A line cut at spaces to fit `width` points; a single word wider than the line is cut where it overflows. */\n wrap(text: string, size: number, width: number): string[] {\n const lines: string[] = [];\n let line = '';\n for (const word of text.split(' ')) {\n const candidate = line.length === 0 ? word : `${line} ${word}`;\n if (this.widthOf(candidate, size) <= width) { line = candidate; continue; }\n if (line.length > 0) lines.push(line);\n line = word;\n while (this.widthOf(line, size) > width && line.length > 1) {\n let cut = line.length - 1;\n while (cut > 1 && this.widthOf(line.slice(0, cut), size) > width) cut -= 1;\n lines.push(line.slice(0, cut));\n line = line.slice(cut);\n }\n }\n if (line.length > 0 || lines.length === 0) lines.push(line);\n return lines;\n }\n\n /** A string operand of `Tj`: the glyph ids as two-byte codes (Identity-H). */\n operand(text: string): string {\n return `<${this.glyphsOf(text).map((glyph) => glyph.toString(16).toUpperCase().padStart(4, '0')).join('')}>`;\n }\n}\n\n/** A4, in points: the page size when the document's first page states none this reader can use. */\nconst A4_MEDIA_BOX: readonly [number, number, number, number] = [0, 0, 595.28, 841.89];\nconst MARGIN = 56;\nconst TITLE_SIZE = 16;\nconst BODY_SIZE = 10;\nconst LEADING = 14;\nconst QR_MAX_WIDTH = 170;\n\n/** The object offsets past the original's `/Size` that the appended section uses, so a verifier finds its own inputs. */\nenum AppendedObject {\n PAGE = 0, TYPE0_FONT = 1, CID_FONT = 2, FONT_DESCRIPTOR = 3, FONT_PROGRAM = 4, TO_UNICODE = 5, CONTENTS = 6,\n ANNOTATION = 7, SEAL_FILESPEC = 8, SEAL_FILE = 9, CONTEXT_FILESPEC = 10, CONTEXT_FILE = 11, NAME_TREE_ROOT = 12, NAME_TREE_LEAF = 13,\n}\n\nconst refusalOf: Record<PdfIncrementalUpdateRefusal, ApprovalSealManifestedCopyRefusal> = {\n [PdfIncrementalUpdateRefusal.NOT_A_PDF]: ApprovalSealManifestedCopyRefusal.NOT_A_PDF,\n [PdfIncrementalUpdateRefusal.ENCRYPTED]: ApprovalSealManifestedCopyRefusal.ENCRYPTED,\n [PdfIncrementalUpdateRefusal.UNSUPPORTED_STRUCTURE]: ApprovalSealManifestedCopyRefusal.UNSUPPORTED_STRUCTURE,\n};\n\nconst sha256Hex = (bytes: Uint8Array) => createHash('sha256').update(bytes).digest('hex');\nconst asBuffer = (bytes: Uint8Array) => Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n\n/**\n * Build the manifested copy. Pure: the same inputs give the same bytes, which is what {@link checkApprovalSealManifestedCopy}\n * relies on. Throws {@link ApprovalSealManifestedCopyRefusedError} when no copy can be made.\n */\nexport function buildApprovalSealManifestedCopy(input: ApprovalSealManifestationInput): Buffer {\n const claims = printedClaimsOf(input.jws);\n const approverName = input.approverName.normalize('NFC').trim();\n if (approverName.length === 0) throw refuse(ApprovalSealManifestedCopyRefusal.NO_PRINTED_NAME, 'the seal records no printed name for its approver');\n if (!APPROVAL_SEAL_MANIFESTATION_FONT_SHA256S.has(sha256Hex(input.font))) throw refuse(ApprovalSealManifestedCopyRefusal.FONT_NOT_PINNED, 'the font is not a pinned one');\n let font: TrueTypeFont;\n try {\n font = readTrueTypeFont(input.font);\n } catch (error) {\n if (error instanceof TrueTypeFontUnreadableError) throw refuse(ApprovalSealManifestedCopyRefusal.FONT_NOT_PINNED, error.message);\n throw error;\n }\n const { meaningWord, outcomeWord } = input.wording;\n if (!meaningWord?.trim() || !outcomeWord?.trim()) throw refuse(ApprovalSealManifestedCopyRefusal.WORDING_INCOMPLETE, 'the meaning or the outcome has no word');\n try {\n return appendManifestation(new PdfDocumentReader(asBuffer(input.original)), input, claims, approverName, font);\n } catch (error) {\n if (error instanceof PdfIncrementalUpdateRefusedError) throw refuse(refusalOf[error.refusal], error.message);\n if (error instanceof QrCodeTooLongError) throw refuse(ApprovalSealManifestedCopyRefusal.VERIFICATION_LINK_TOO_LONG, error.message);\n throw error;\n }\n}\n\nfunction appendManifestation(reader: PdfDocumentReader, input: ApprovalSealManifestationInput, claims: PrintedClaims, approverName: string, font: TrueTypeFont): Buffer {\n const unsupported = (message: string) => new PdfIncrementalUpdateRefusedError(PdfIncrementalUpdateRefusal.UNSUPPORTED_STRUCTURE, message);\n const catalogRef = reader.trailer.entries.get('Root');\n if (catalogRef?.kind !== 'ref') throw unsupported('the trailer names its catalog by no reference');\n const catalog = reader.dictOf(catalogRef, 'the document catalog');\n const pagesRef = catalog.entries.get('Pages');\n if (pagesRef?.kind !== 'ref') throw unsupported('the catalog names its page tree by no reference');\n const pagesGen = reader.generationOf(pagesRef.num);\n const pages = reader.dictOf(pagesRef, 'the page tree root');\n const kids = pages.entries.get('Kids');\n const count = pages.entries.get('Count');\n if (kids?.kind !== 'array' || count?.kind !== 'number' || !/^\\d+$/.test(count.text)) {\n throw unsupported('the page tree root has no direct /Kids array or integer /Count');\n }\n\n // The first page's size, inherited along the tree (§7.7.3.4), so the appended page matches the document.\n let mediaBox: readonly [number, number, number, number] | undefined;\n let node: PdfObject | undefined = pagesRef;\n for (let depth = 0; depth < 32 && node; depth += 1) {\n const dict = reader.resolve(node);\n if (dict.kind !== 'dict') break;\n mediaBox = reader.boxOf(dict.entries.get('MediaBox')) ?? mediaBox;\n const type = dict.entries.get('Type');\n if (type?.kind === 'name' && type.value === 'Page') break;\n const children = reader.resolve(dict.entries.get('Kids'));\n node = children.kind === 'array' ? children.items[0] : undefined;\n }\n const firstPage = mediaBox && mediaBox[2] - mediaBox[0] > 300 ? mediaBox : A4_MEDIA_BOX;\n const laidOut = layOutPage(input, claims, approverName, font, firstPage, sha256Hex(reader.bytes));\n // A first page too short for the approval page gives way to A4, which always holds it.\n const final = laidOut ?? layOutPage(input, claims, approverName, font, A4_MEDIA_BOX, sha256Hex(reader.bytes));\n if (!final) throw new PdfIncrementalUpdateRefusedError(PdfIncrementalUpdateRefusal.UNSUPPORTED_STRUCTURE, 'the approval page does not fit on an A4 page');\n const { box: pageBox, setter, content, attachmentLine } = final;\n const [llx, lly, urx, ury] = pageBox;\n // Objects, numbered past the original's highest.\n const base = reader.size;\n const at = (offset: AppendedObject) => base + offset;\n const jwsBytes = Buffer.from(input.jws, 'ascii');\n const { wording } = input;\n const context: ManifestationContext = {\n v: APPROVAL_SEAL_MANIFESTATION_VERSION,\n locale: wording.locale,\n words: Object.fromEntries(Object.values(ApprovalSealManifestationWord).map((word) => [word, wording.words[word]])),\n meaningWord: wording.meaningWord,\n outcomeWord: wording.outcomeWord,\n approverName,\n ...(input.verificationUrl !== undefined ? { verificationUrl: input.verificationUrl } : {}),\n };\n const contextBytes = Buffer.from(canonicalizeJson(context), 'utf8');\n const scale = (value: number) => Math.round((value * 1000) / font.unitsPerEm);\n const fontName = pdf.name(font.postscriptName);\n const box = pdf.array([pdf.real(llx), pdf.real(lly), pdf.real(urx), pdf.real(ury)]);\n const usedGlyphs = [...setter.used.keys()].sort((first, second) => first - second);\n const widths: PdfObject[] = [];\n for (const glyph of usedGlyphs) widths.push(pdf.int(glyph), pdf.array([pdf.int(scale(font.advanceOf(glyph)))]));\n const attachmentKeys = { seal: `approval-seal-${claims.jti}.jws`, context: `approval-manifestation-${claims.jti}.json` };\n\n const objects: PdfUpdateObject[] = [\n {\n // The page tree root, redefined: the same entries, the new page last among its kids.\n num: pagesRef.num,\n gen: pagesGen,\n value: { kind: 'dict', entries: new Map([...pages.entries, ['Kids', pdf.array([...kids.items, pdf.ref(at(AppendedObject.PAGE))])], ['Count', pdf.int(Number(count.text) + 1)]]) },\n },\n {\n num: at(AppendedObject.PAGE),\n gen: 0,\n // Every inheritable attribute stated, so nothing the tree declares above changes this page (§7.7.3.4).\n value: pdf.dict({\n Type: pdf.name('Page'),\n Parent: pdf.ref(pagesRef.num, pagesGen),\n MediaBox: box,\n CropBox: box,\n Rotate: pdf.int(0),\n Resources: pdf.dict({ Font: pdf.dict({ WildoF: pdf.ref(at(AppendedObject.TYPE0_FONT)) }) }),\n Contents: pdf.ref(at(AppendedObject.CONTENTS)),\n Annots: pdf.array([pdf.ref(at(AppendedObject.ANNOTATION))]),\n }),\n },\n {\n num: at(AppendedObject.TYPE0_FONT),\n gen: 0,\n value: pdf.dict({\n Type: pdf.name('Font'), Subtype: pdf.name('Type0'), BaseFont: fontName, Encoding: pdf.name('Identity-H'),\n DescendantFonts: pdf.array([pdf.ref(at(AppendedObject.CID_FONT))]), ToUnicode: pdf.ref(at(AppendedObject.TO_UNICODE)),\n }),\n },\n {\n num: at(AppendedObject.CID_FONT),\n gen: 0,\n value: pdf.dict({\n Type: pdf.name('Font'), Subtype: pdf.name('CIDFontType2'), BaseFont: fontName,\n CIDSystemInfo: pdf.dict({ Registry: pdf.string('Adobe'), Ordering: pdf.string('Identity'), Supplement: pdf.int(0) }),\n FontDescriptor: pdf.ref(at(AppendedObject.FONT_DESCRIPTOR)), DW: pdf.int(1000), W: pdf.array(widths), CIDToGIDMap: pdf.name('Identity'),\n }),\n },\n {\n num: at(AppendedObject.FONT_DESCRIPTOR),\n gen: 0,\n value: pdf.dict({\n Type: pdf.name('FontDescriptor'), FontName: fontName,\n // Nonsymbolic (bit 6), and fixed-pitch (bit 1) when the font says so (§9.8.2).\n Flags: pdf.int(32 + (font.fixedPitch ? 1 : 0)),\n FontBBox: pdf.array(font.bbox.map((value) => pdf.int(scale(value)))),\n ItalicAngle: pdf.real(font.italicAngle), Ascent: pdf.int(scale(font.ascent)), Descent: pdf.int(scale(font.descent)),\n CapHeight: pdf.int(scale(font.capHeight)), StemV: pdf.int(80), FontFile2: pdf.ref(at(AppendedObject.FONT_PROGRAM)),\n }),\n },\n { num: at(AppendedObject.FONT_PROGRAM), gen: 0, value: pdf.dict({ Length1: pdf.int(input.font.byteLength) }), stream: asBuffer(input.font) },\n { num: at(AppendedObject.TO_UNICODE), gen: 0, value: pdf.dict({}), stream: Buffer.from(toUnicodeCMap(setter.used), 'latin1') },\n { num: at(AppendedObject.CONTENTS), gen: 0, value: pdf.dict({}), stream: Buffer.from(content, 'latin1') },\n {\n num: at(AppendedObject.ANNOTATION),\n gen: 0,\n value: pdf.dict({\n Type: pdf.name('Annot'), Subtype: pdf.name('FileAttachment'),\n Rect: pdf.array([pdf.real(urx - MARGIN - 16), pdf.real(attachmentLine - 4), pdf.real(urx - MARGIN), pdf.real(attachmentLine + 12)]),\n Contents: pdf.string(APPROVAL_SEAL_MANIFESTED_COPY_ATTACHMENT_NAME), Name: pdf.name('Paperclip'),\n // Printable (§12.5.3, bit 3).\n F: pdf.int(4), FS: pdf.ref(at(AppendedObject.SEAL_FILESPEC)),\n }),\n },\n fileSpec(at(AppendedObject.SEAL_FILESPEC), at(AppendedObject.SEAL_FILE), APPROVAL_SEAL_MANIFESTED_COPY_ATTACHMENT_NAME, 'The approval seal of this document, a compact JWS'),\n // `application/jose`: the media type of a compact JWS (RFC 7515 §9.2.1).\n embeddedFile(at(AppendedObject.SEAL_FILE), 'application/jose', jwsBytes),\n fileSpec(at(AppendedObject.CONTEXT_FILESPEC), at(AppendedObject.CONTEXT_FILE), APPROVAL_SEAL_MANIFESTATION_CONTEXT_NAME, 'The inputs this approval page was made from: its words, the printed name, the verification address'),\n embeddedFile(at(AppendedObject.CONTEXT_FILE), 'application/json', contextBytes),\n ...documentLevelAttachments(reader, catalogRef, catalog, at, [\n [attachmentKeys.seal, pdf.ref(at(AppendedObject.SEAL_FILESPEC))],\n [attachmentKeys.context, pdf.ref(at(AppendedObject.CONTEXT_FILESPEC))],\n ]),\n ];\n return appendPdfIncrementalUpdate(reader, APPROVAL_SEAL_MANIFESTED_COPY_MARKER, objects);\n}\n\n/** The approval page laid out on `box`: its content stream and where its attachment line is; undefined when it does not fit. */\nfunction layOutPage(\n input: ApprovalSealManifestationInput,\n claims: PrintedClaims,\n approverName: string,\n font: TrueTypeFont,\n box: readonly [number, number, number, number],\n originalSha256: string,\n): { box: readonly [number, number, number, number]; setter: TextSetter; content: string; attachmentLine: number } | undefined {\n const [llx, lly, urx, ury] = box;\n const { wording } = input;\n const setter = new TextSetter(font);\n const width = urx - llx - 2 * MARGIN;\n const body: string[] = [\n ...setter.wrap(filled(wording, ApprovalSealManifestationWord.INTRO), BODY_SIZE, width),\n '',\n ...setter.wrap(filled(wording, ApprovalSealManifestationWord.SIGNED_BY, { name: approverName }), BODY_SIZE, width),\n ...setter.wrap(filled(wording, ApprovalSealManifestationWord.DECIDED_AT, { instant: isoSeconds(claims.decidedAt) }), BODY_SIZE, width),\n ...setter.wrap(filled(wording, ApprovalSealManifestationWord.MEANING, { meaning: wording.meaningWord, outcome: wording.outcomeWord }), BODY_SIZE, width),\n '',\n ...setter.wrap(filled(wording, ApprovalSealManifestationWord.SEAL, { seal: claims.jti }), BODY_SIZE, width),\n ...setter.wrap(filled(wording, ApprovalSealManifestationWord.ISSUER, { issuer: claims.iss }), BODY_SIZE, width),\n ...setter.wrap(filled(wording, ApprovalSealManifestationWord.SEALED_AT, { instant: isoSeconds(claims.iat) }), BODY_SIZE, width),\n ...setter.wrap(filled(wording, ApprovalSealManifestationWord.ORIGINAL_DIGEST), BODY_SIZE, width),\n originalSha256,\n '',\n ...setter.wrap(filled(wording, ApprovalSealManifestationWord.ATTACHMENT, { file: APPROVAL_SEAL_MANIFESTED_COPY_ATTACHMENT_NAME }), BODY_SIZE, width),\n ...setter.wrap(filled(wording, ApprovalSealManifestationWord.VERIFY_OFFLINE), BODY_SIZE, width),\n ];\n const caption = input.verificationUrl !== undefined ? setter.wrap(filled(wording, ApprovalSealManifestationWord.VERIFY_ONLINE), BODY_SIZE, width) : [];\n const title = filled(wording, ApprovalSealManifestationWord.TITLE);\n const point = (value: number) => (pdf.real(value) as { text: string }).text;\n const left = llx + MARGIN;\n const top = ury - 72;\n let content = `BT\\n/WildoF 16 Tf\\n${point(left)} ${point(top)} Td\\n${setter.operand(title)} Tj\\n/WildoF ${BODY_SIZE} Tf\\n${LEADING} TL\\n0 -${BODY_SIZE} Td\\n`;\n for (const line of [...body, ...caption]) content += line.length === 0 ? 'T*\\n' : `T* ${setter.operand(line)} Tj\\n`;\n content += 'ET\\n';\n const textBottom = top - BODY_SIZE - LEADING * (body.length + caption.length);\n const attachmentLine = top - BODY_SIZE - LEADING * (body.length - 1);\n let lowest = textBottom;\n\n if (input.verificationUrl !== undefined) {\n // The QR code, as filled rectangles, one per run of dark modules in a row (ISO/IEC 18004 §6.3.8: four light modules\n // of quiet zone, which the white page gives).\n const code = encodeQrCode(approvalSealVerificationLinkOf(input.verificationUrl, input.jws), QrErrorCorrection.MEDIUM);\n const module = Math.min(2, QR_MAX_WIDTH / code.size);\n const originY = textBottom - LEADING - code.size * module;\n lowest = originY;\n content += 'q\\n0 g\\n';\n for (let y = 0; y < code.size; y += 1) {\n for (let x = 0; x < code.size;) {\n if (!code.dark(x, y)) { x += 1; continue; }\n let run = 1;\n while (x + run < code.size && code.dark(x + run, y)) run += 1;\n content += `${point(left + x * module)} ${point(originY + (code.size - 1 - y) * module)} ${point(run * module)} ${point(module)} re\\n`;\n x += run;\n }\n }\n content += 'f\\nQ\\n';\n }\n\n if (lowest < lly + MARGIN) return undefined;\n return { box, setter, content, attachmentLine };\n}\n\nfunction fileSpec(num: number, file: number, name: string, description: string): PdfUpdateObject {\n return {\n num,\n gen: 0,\n value: pdf.dict({\n Type: pdf.name('Filespec'), F: pdf.string(name), UF: pdf.string(name), Desc: pdf.string(description),\n EF: pdf.dict({ F: pdf.ref(file) }),\n // An associated file of the document (ISO 32000-2 §14.13): it supplements the document's content.\n AFRelationship: pdf.name('Supplement'),\n }),\n };\n}\n\nfunction embeddedFile(num: number, mediaType: string, bytes: Buffer): PdfUpdateObject {\n return { num, gen: 0, value: pdf.dict({ Type: pdf.name('EmbeddedFile'), Subtype: pdf.name(mediaType), Params: pdf.dict({ Size: pdf.int(bytes.length) }) }), stream: bytes };\n}\n\n/** A name tree's key, as the bytes it compares by (§7.9.6). */\nconst keyBytes = (key: PdfObject | undefined) => (key?.kind === 'string' ? key.bytes : undefined);\n\n/**\n * The catalog redefined with the attachments at document level: in the `EmbeddedFiles` name tree (merged into a tree the\n * document has, §7.9.6) and appended to `AF`. A tree whose keys already hold one of ours, or whose kids' ranges overlap\n * ours, cannot be merged into, and refuses.\n */\nfunction documentLevelAttachments(\n reader: PdfDocumentReader,\n catalogRef: PdfRef,\n catalog: PdfDict,\n at: (offset: AppendedObject) => number,\n attachments: ReadonlyArray<readonly [string, PdfRef]>,\n): PdfUpdateObject[] {\n const unsupported = (message: string) => new PdfIncrementalUpdateRefusedError(PdfIncrementalUpdateRefusal.UNSUPPORTED_STRUCTURE, message);\n const ours = attachments.map(([key, spec]) => [Buffer.from(key, 'latin1'), spec] as const).sort(([first], [second]) => Buffer.compare(first, second));\n const existingNames = reader.resolve(catalog.entries.get('Names'));\n const names = new Map(existingNames.kind === 'dict' ? existingNames.entries : []);\n const tree = reader.resolve(names.get('EmbeddedFiles'));\n const objects: PdfUpdateObject[] = [];\n const pairs = (entries: ReadonlyArray<readonly [Buffer, PdfObject]>) => entries.flatMap(([key, value]) => [pdf.string(key), value]);\n\n if (tree.kind !== 'dict') {\n objects.push({ num: at(AppendedObject.NAME_TREE_ROOT), gen: 0, value: pdf.dict({ Names: pdf.array(pairs(ours)) }) });\n } else if (tree.entries.has('Names')) {\n const existing = reader.resolve(tree.entries.get('Names'));\n if (existing.kind !== 'array' || existing.items.length % 2 !== 0) throw unsupported('an EmbeddedFiles leaf whose /Names is not key and value pairs');\n const merged: Array<readonly [Buffer, PdfObject]> = [];\n for (let index = 0; index < existing.items.length; index += 2) {\n const key = keyBytes(reader.resolve(existing.items[index]));\n if (!key) throw unsupported('an EmbeddedFiles key that is not a string');\n merged.push([key, existing.items[index + 1]!]);\n }\n for (const [key, spec] of ours) {\n if (merged.some(([existingKey]) => existingKey.equals(key))) throw unsupported('the document already attaches a file under this seal\\'s name');\n merged.push([key, spec]);\n }\n merged.sort(([first], [second]) => Buffer.compare(first, second));\n objects.push({ num: at(AppendedObject.NAME_TREE_ROOT), gen: 0, value: pdf.dict({ Names: pdf.array(pairs(merged)) }) });\n } else {\n const kids = reader.resolve(tree.entries.get('Kids'));\n if (kids.kind !== 'array') throw unsupported('an EmbeddedFiles root with neither /Names nor /Kids');\n const low = ours[0]![0];\n const high = ours[ours.length - 1]![0];\n const ranged = kids.items.map((kid) => {\n const limits = reader.resolve(reader.dictOf(kid, 'an EmbeddedFiles kid').entries.get('Limits'));\n const first = limits.kind === 'array' ? keyBytes(reader.resolve(limits.items[0])) : undefined;\n const last = limits.kind === 'array' ? keyBytes(reader.resolve(limits.items[1])) : undefined;\n if (!first || !last) throw unsupported('an EmbeddedFiles kid without /Limits');\n if (Buffer.compare(low, last) <= 0 && Buffer.compare(first, high) <= 0) throw unsupported('an EmbeddedFiles kid whose range holds this seal\\'s names');\n return { kid, first };\n });\n const leaf = pdf.ref(at(AppendedObject.NAME_TREE_LEAF));\n const ordered = [...ranged.map(({ kid, first }) => ({ kid, first })), { kid: leaf as PdfObject, first: low }]\n .sort((first, second) => Buffer.compare(first.first, second.first));\n objects.push({ num: at(AppendedObject.NAME_TREE_ROOT), gen: 0, value: pdf.dict({ Kids: pdf.array(ordered.map(({ kid }) => kid)) }) });\n objects.push({ num: at(AppendedObject.NAME_TREE_LEAF), gen: 0, value: pdf.dict({ Names: pdf.array(pairs(ours)), Limits: pdf.array([pdf.string(low), pdf.string(high)]) }) });\n }\n names.set('EmbeddedFiles', pdf.ref(at(AppendedObject.NAME_TREE_ROOT)));\n const existingAf = reader.resolve(catalog.entries.get('AF'));\n const af = [...(existingAf.kind === 'array' ? existingAf.items : []), ...attachments.map(([, spec]) => spec)];\n objects.push({\n num: catalogRef.num,\n gen: reader.generationOf(catalogRef.num),\n value: { kind: 'dict', entries: new Map([...catalog.entries, ['Names', { kind: 'dict', entries: names }], ['AF', pdf.array(af)]]) },\n });\n return objects;\n}\n\n/** The ToUnicode CMap of the glyphs used (§9.10.3): each glyph's two-byte code to its character, UTF-16BE. */\nfunction toUnicodeCMap(used: ReadonlyMap<number, string>): string {\n const hex = (value: number) => value.toString(16).toUpperCase().padStart(4, '0');\n const entries = [...used.entries()].sort(([first], [second]) => first - second)\n .map(([glyph, char]) => `<${hex(glyph)}> <${Buffer.from(char, 'utf16le').swap16().toString('hex').toUpperCase()}>`);\n let blocks = '';\n for (let index = 0; index < entries.length; index += 100) {\n const block = entries.slice(index, index + 100);\n blocks += `${block.length} beginbfchar\\n${block.join('\\n')}\\nendbfchar\\n`;\n }\n return '/CIDInit /ProcSet findresource begin\\n12 dict begin\\nbegincmap\\n'\n + '/CIDSystemInfo << /Registry (Adobe) /Ordering (UCS) /Supplement 0 >> def\\n/CMapName /Adobe-Identity-UCS def\\n/CMapType 2 def\\n'\n + '1 begincodespacerange\\n<0000> <FFFF>\\nendcodespacerange\\n'\n + blocks\n + 'endcmap\\nCMapName currentdict /CMap defineresource pop\\nend\\nend\\n';\n}\n\n/** A copy split at its manifestation marker: the original's bytes. Undefined when the bytes carry no marker. */\nexport function originalOfApprovalSealManifestedCopy(copy: Uint8Array): Buffer | undefined {\n const bytes = asBuffer(copy);\n const at = bytes.lastIndexOf(APPROVAL_SEAL_MANIFESTED_COPY_MARKER, undefined, 'latin1');\n return at > 0 ? bytes.subarray(0, at) : undefined;\n}\n\n/** What a copy states about itself, read from its attachments: what the rebuild uses besides the seal. */\nexport interface ApprovalSealManifestedCopyStatement {\n readonly locale: string;\n readonly approverName: string;\n readonly verificationUrl?: string;\n /** The SHA-256 of the embedded font program. */\n readonly fontSha256: string;\n}\n\n/** What checking a manifested copy against a seal found. */\nexport type ApprovalSealManifestedCopyCheck =\n /** The copy is exactly the original followed by this seal's manifestation, made from what it states. */\n | { readonly matches: true; readonly original: Buffer; readonly statement: ApprovalSealManifestedCopyStatement }\n /** It is not: no marker, unreadable inputs, an unpinned font, another name than expected, or one differing byte. */\n | { readonly matches: false };\n\nconst ContextShape = (value: unknown): value is ManifestationContext => {\n if (value === null || typeof value !== 'object') return false;\n const context = value as Record<string, unknown>;\n return context.v === APPROVAL_SEAL_MANIFESTATION_VERSION && typeof context.locale === 'string' && typeof context.meaningWord === 'string'\n && typeof context.outcomeWord === 'string' && typeof context.approverName === 'string'\n && (context.verificationUrl === undefined || typeof context.verificationUrl === 'string')\n && context.words !== null && typeof context.words === 'object'\n && Object.values(ApprovalSealManifestationWord).every((word) => typeof (context.words as Record<string, unknown>)[word] === 'string');\n};\n\n/**\n * Check a copy against the seal it claims: take its inputs back from it (the words, the name, the address, the font),\n * rebuild it from its own prefix and the JWS, and compare byte for byte. `approverName`, when the seal's approver\n * disclosure is given, must be the name the copy prints. Says nothing about whether the prefix is the approved file:\n * the caller opens it against the seal's commitment.\n */\nexport function checkApprovalSealManifestedCopy(copy: Uint8Array, seal: { readonly jws: string; readonly approverName?: string }): ApprovalSealManifestedCopyCheck {\n const original = originalOfApprovalSealManifestedCopy(copy);\n if (!original) return { matches: false };\n try {\n const base = new PdfDocumentReader(original).size;\n const copyReader = new PdfDocumentReader(asBuffer(copy));\n const font = copyReader.streamDataOf(base + AppendedObject.FONT_PROGRAM);\n const contextBytes = copyReader.streamDataOf(base + AppendedObject.CONTEXT_FILE);\n if (!font || !contextBytes) return { matches: false };\n const fontSha256 = sha256Hex(font);\n if (!APPROVAL_SEAL_MANIFESTATION_FONT_SHA256S.has(fontSha256)) return { matches: false };\n const context: unknown = JSON.parse(contextBytes.toString('utf8'));\n if (!ContextShape(context)) return { matches: false };\n if (seal.approverName !== undefined && seal.approverName.normalize('NFC').trim() !== context.approverName) return { matches: false };\n const rebuilt = buildApprovalSealManifestedCopy({\n original,\n jws: seal.jws,\n approverName: context.approverName,\n wording: { locale: context.locale, words: context.words as Record<ApprovalSealManifestationWord, string>, meaningWord: context.meaningWord, outcomeWord: context.outcomeWord },\n font,\n ...(context.verificationUrl !== undefined ? { verificationUrl: context.verificationUrl } : {}),\n });\n if (Buffer.compare(rebuilt, asBuffer(copy)) !== 0) return { matches: false };\n return {\n matches: true,\n original,\n statement: { locale: context.locale, approverName: context.approverName, fontSha256, ...(context.verificationUrl !== undefined ? { verificationUrl: context.verificationUrl } : {}) },\n };\n } catch {\n return { matches: false };\n }\n}\n"]}
@@ -1,37 +1,3 @@
1
- /**
2
- * # Verifying an approval seal, offline (#2903)
3
- *
4
- * Everything a verifier needs travels with the seal: the compact JWS, the stored records of the keys that may have signed
5
- * it (their public half, scope and issuer, as an export carries them), and, when the person's content is to be shown,
6
- * the disclosures. Nothing here calls the application or the platform, so a seal verifies after the application is gone.
7
- *
8
- * ## What is checked, and on whose authority
9
- *
10
- * - The header: ES256 is pinned per key from the key RECORD, never read from the header (RFC 8725 §3.1); `jku`, `x5u`,
11
- * `jwk` and `x5c` are never followed (RFC 8725 §3.10, RFC 7515 §10.7); a `crit` naming anything is refused, since no
12
- * extension is understood (RFC 7515 §4.1.11); `typ` must be the approval seal's.
13
- * - The signature, under the key the `kid` names among those given.
14
- * - The issuer: the payload's `iss` must be the key record's, and the expected issuer when one is given.
15
- * - The claims: the version-1 shape, strict.
16
- * - The key's scope, from its stored record and never from a JWKS member: an organization-scoped key verifies only a seal
17
- * whose tenant is that organization.
18
- * - The disclosures: each must digest to the commitment its claim names; a commitment with no disclosure is reported as
19
- * erased (the person's content was removed, the seal stands).
20
- * - A COMPROMISED key: the signature may still verify, but the seal is not PROVABLE unless corroborated by evidence the
21
- * key's holder could not have forged: the decision's payload digest recorded outside the application before the
22
- * compromise instant (an exported audit event, an immutable sink).
23
- * - The OPERATOR'S PIN SET, when one is given (#2932): the key must be pinned, by the RFC 7638 thumbprint of the public
24
- * half the verifier was handed (so a key record that names a pinned `kid` over another key is refused), and the pin's
25
- * state, scope and compromise instant are used instead of the record's. The record (from a bundle, from the host)
26
- * only supplies the public half and the issuer; the operator's pin decides whether that half is theirs and what became
27
- * of it. Without a pin set the records are trusted as given, as before.
28
- * - The OPERATOR'S KEPT SIGNING-LOG EXPORTS, when given (#2932): a seal under a key compromised after an export that lists
29
- * it is corroborated by that export, which the host could not have signed after the compromise without the operator's
30
- * copy disagreeing. Each export is verified here, with the operator's pin set for the export key.
31
- *
32
- * spec-cite: RFC 8725 §3.1 (algorithm verification), §3.10 (do not trust received URLs); RFC 7515 §4.1.11 (`crit`),
33
- * §10.7 (key selection from header parameters). Cited by section; the behaviour is this file's decision.
34
- */
35
1
  import { z } from 'zod';
36
2
  import { CryptoKey_Scope, CryptoKey_VersionState, type CryptoKeyPinSet } from '@wildo-ai/saas-models';
37
3
  import { ES256_JWS_ALGORITHM, type P256PublicJwk } from './es256-jws';
@@ -62,7 +28,38 @@ export interface ApprovalSealVerificationInput {
62
28
  /** The issuer the seal must carry, when the verifier knows which application it expects. */
63
29
  readonly expectedIssuer?: string;
64
30
  readonly disclosures?: readonly ApprovalSealDisclosureValue[];
31
+ /**
32
+ * The committed claims whose content the host no longer holds because an ERASURE removed it (#2924): the approver's
33
+ * own erasure, or a later erasure of the requester or of a person the presentation named (#3001). The host's
34
+ * statement, read as a reason and never as proof: a claim it names and does not give reads ERASED, one it neither
35
+ * names nor gives reads WITHHELD, and either way the seal stands.
36
+ */
37
+ readonly erasedClaims?: readonly ApprovalSealDisclosureClaim[];
65
38
  readonly corroboration?: ApprovalSealCorroboration;
39
+ /**
40
+ * The file deliverable the seal attests (#2904): its id and the salt the seal's row kept (a bundle carries both), and
41
+ * the file's BYTES, which the verifier is given by whoever holds the file (`wildo seal verify --deliverable`). Without
42
+ * the bytes the file is reported NOT_GIVEN.
43
+ */
44
+ readonly deliverableFile?: {
45
+ readonly fileId: string;
46
+ readonly salt: string;
47
+ readonly bytes?: Uint8Array;
48
+ };
49
+ /**
50
+ * The manifested copy of that deliverable (#2907): its id as the host names it, or the host's statement that the
51
+ * approver's erasure deleted it (`contentErased`, read as a reason, never as proof), and the copy's BYTES from whoever
52
+ * holds the file (`wildo seal verify --manifested-copy`). Checking it needs the approver disclosed (the copy prints
53
+ * their name) and, to tie it to the approved file, the presentation and `deliverableFile`'s salt. `contentSha256` is
54
+ * the host's record of the copy's hash: it binds what the rebuild takes from the copy itself (its words, its
55
+ * verification address), so a copy reworded since does not verify.
56
+ */
57
+ readonly manifestedCopy?: {
58
+ readonly fileId?: string;
59
+ readonly contentSha256?: string;
60
+ readonly contentErased?: boolean;
61
+ readonly bytes?: Uint8Array;
62
+ };
66
63
  /** The operator's pin set for approval seals (#2932), from a channel the host does not control. */
67
64
  readonly pins?: CryptoKeyPinSet;
68
65
  /**
@@ -105,14 +102,50 @@ export declare enum ApprovalSealVerificationFailure {
105
102
  /** A disclosure does not digest to the commitment its claim names. */
106
103
  DISCLOSURE_MISMATCH = "disclosure_mismatch",
107
104
  /** A pin set was given and does not pin the key, or the key handed over is not the one its pinned `kid` names. */
108
- UNPINNED = "unpinned"
105
+ UNPINNED = "unpinned",
106
+ /** A file deliverable's bytes were given and are not the ones the seal binds (#2904). */
107
+ DELIVERABLE_FILE_MISMATCH = "deliverable_file_mismatch",
108
+ /**
109
+ * A manifested copy was given and is not this seal's (#2907): its approval page, its attached JWS or its page tree is
110
+ * not what the seal rebuilds, or what precedes them is not the file the seal binds.
111
+ */
112
+ MANIFESTED_COPY_MISMATCH = "manifested_copy_mismatch"
113
+ }
114
+ /** What the seal says about the file deliverable it attests (#2904). */
115
+ export declare enum ApprovalSealDeliverableFileStanding {
116
+ /** The bytes given hash, with the row's salt, to the commitment the presentation binds: the file approved. */
117
+ MATCHES = "matches",
118
+ /** The bytes given are not the file approved: one changed byte is enough. The seal does not verify. */
119
+ CHANGED = "changed",
120
+ /** The seal binds the file and its bytes were not given: the file is missing, or was not supplied. */
121
+ NOT_GIVEN = "not_given",
122
+ /**
123
+ * Nothing to compare with: the presentation that holds the commitment is not disclosed (erased with a person it
124
+ * named, or withheld), or it binds no such file.
125
+ */
126
+ NOT_COMMITTED = "not_committed",
127
+ /**
128
+ * A manifested copy (#2907) only: the host states the approver's erasure deleted it. The copy printed the approver's
129
+ * name in clear and a file cannot be scrubbed, so it went; the seal and the original still prove the approval, and the
130
+ * copy can be rebuilt from both should the name ever lawfully be needed again.
131
+ */
132
+ CONTENT_ERASED = "content_erased"
109
133
  }
110
- /** What the seal says about one person's disclosure. */
134
+ /**
135
+ * What the seal says about one committed disclosure: a person's (approver, requester), what they were shown, what they
136
+ * answered. In none of the three is the seal failed: the signature covers the commitments, never the content (#2924).
137
+ */
111
138
  export declare enum ApprovalSealDisclosureStanding {
112
139
  /** Given, and it digests to the commitment. */
113
140
  DISCLOSED = "disclosed",
114
- /** Committed to, and not given: the content was erased (or withheld). The seal stands. */
115
- ERASED = "erased"
141
+ /**
142
+ * Committed to, not given, and the bundle states an erasure removed it (`erasedClaims`): UNDISCLOSED (erased). For the
143
+ * presentation this is PRESENTATION_ERASED: an erasure rewrote the stored presentation, and the seal still proves that
144
+ * a presentation with this digest was shown.
145
+ */
146
+ ERASED = "erased",
147
+ /** Committed to, and not given, with no erasure stated: withheld, or a bundle that does not carry it. */
148
+ WITHHELD = "withheld"
116
149
  }
117
150
  export interface ApprovalSealVerification {
118
151
  /** The signature verifies, under a key whose record covers the seal, over well-formed claims and matching disclosures. */
@@ -144,7 +177,7 @@ export interface ApprovalSealVerification {
144
177
  readonly standing: ApprovalSealDisclosureStanding;
145
178
  readonly value?: Readonly<Record<string, unknown>>;
146
179
  };
147
- /** What the person was shown (#2903 S6), when the seal binds it: DISCLOSED with the presentation, else not given. */
180
+ /** What the person was shown (#2903 S6), when the seal binds it: DISCLOSED, ERASED (PRESENTATION_ERASED) or WITHHELD. */
148
181
  readonly presentation?: {
149
182
  readonly standing: ApprovalSealDisclosureStanding;
150
183
  readonly value?: Readonly<Record<string, unknown>>;
@@ -154,6 +187,25 @@ export interface ApprovalSealVerification {
154
187
  readonly standing: ApprovalSealDisclosureStanding;
155
188
  readonly value?: Readonly<Record<string, unknown>>;
156
189
  };
190
+ /** The file deliverable the seal attests, checked against its bytes (#2904), when one was named. */
191
+ readonly deliverableFile?: {
192
+ readonly fileId: string;
193
+ readonly argument?: string;
194
+ readonly standing: ApprovalSealDeliverableFileStanding;
195
+ };
196
+ /**
197
+ * The manifested copy (#2907), when one was named: MATCHES (the original the seal binds, followed by exactly this seal's
198
+ * approval page naming the disclosed approver), CHANGED, NOT_GIVEN, NOT_COMMITTED (the approver or the commitment is
199
+ * not disclosed, so there is nothing to rebuild or tie it to) or CONTENT_ERASED. `approverName` is the name it prints.
200
+ */
201
+ readonly manifestedCopy?: {
202
+ readonly fileId?: string;
203
+ readonly standing: ApprovalSealDeliverableFileStanding;
204
+ readonly approverName?: string;
205
+ /** What the copy states it was made with, when it rebuilt: its words' language, its verification address. */
206
+ readonly locale?: string;
207
+ readonly verificationUrl?: string;
208
+ };
157
209
  }
158
210
  /** See the file's header. Pure and offline. */
159
211
  export declare function verifyApprovalSeal(input: ApprovalSealVerificationInput): ApprovalSealVerification;
@@ -211,6 +263,16 @@ export declare const ApprovalSealVerificationBundleSchema: z.ZodObject<{
211
263
  salt: z.ZodString;
212
264
  value: z.ZodRecord<z.ZodString, z.ZodUnknown>;
213
265
  }, z.core.$strip>>>;
266
+ erasedClaims: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof ApprovalSealDisclosureClaim>>>;
267
+ deliverableFile: z.ZodOptional<z.ZodObject<{
268
+ fileId: z.ZodString;
269
+ salt: z.ZodString;
270
+ }, z.core.$strip>>;
271
+ manifestedCopy: z.ZodOptional<z.ZodObject<{
272
+ fileId: z.ZodOptional<z.ZodString>;
273
+ contentSha256: z.ZodOptional<z.ZodString>;
274
+ contentErased: z.ZodOptional<z.ZodLiteral<true>>;
275
+ }, z.core.$strip>>;
214
276
  }, z.core.$strip>;
215
277
  export type ApprovalSealVerificationBundle = z.infer<typeof ApprovalSealVerificationBundleSchema>;
216
278
  //# sourceMappingURL=approval-seal-verifier.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"approval-seal-verifier.d.ts","sourceRoot":"","sources":["../../../../src/key-management/approval-seal-verifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAsC,eAAe,EAAE,sBAAsB,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC1I,OAAO,EAAE,mBAAmB,EAAgC,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAGpG,OAAO,EAEL,2BAA2B,EAE3B,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EACjC,MAAM,2BAA2B,CAAC;AAQnC,8GAA8G;AAC9G,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,kFAAkF;IAClF,QAAQ,CAAC,GAAG,EAAE,OAAO,mBAAmB,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,+FAA+F;IAC/F,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,sBAAsB,CAAC;IACvC,oGAAoG;IACpG,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,+GAA+G;AAC/G,MAAM,WAAW,yBAA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AAO,MAAM,iCAAiC;;;;;;;;;;;;;;iBAA8B,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;iBAAwF,CAAC;AAErI;;;;;;GAMG;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmB/C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC"}
@@ -17,6 +17,14 @@
17
17
  * whose tenant is that organization.
18
18
  * - The disclosures: each must digest to the commitment its claim names; a commitment with no disclosure is reported as
19
19
  * erased (the person's content was removed, the seal stands).
20
+ * - A FILE deliverable (#2904), when the seal attests one: the file's bytes, hashed and salted with the salt its row
21
+ * kept, must give the commitment the disclosed presentation binds it by. One changed byte fails the seal; bytes not
22
+ * given are reported as such (a missing file), never as a match.
23
+ * - A MANIFESTED COPY (#2907), when the seal's deliverable has one: the copy is rebuilt from its own prefix, the JWS, the
24
+ * inputs it carries (its words, its pinned font, its verification address) and the disclosed approver's printed name,
25
+ * and must equal the bytes given, and the host's record of its hash when the bundle states one; its prefix must then open the seal's commitment
26
+ * to the approved file, which ties the copy to the original without the original being supplied. One changed byte in
27
+ * the approval page fails the seal. A copy the approver's erasure deleted is reported CONTENT_ERASED, never missing.
20
28
  * - A COMPROMISED key: the signature may still verify, but the seal is not PROVABLE unless corroborated by evidence the
21
29
  * key's holder could not have forged: the decision's payload digest recorded outside the application before the
22
30
  * compromise instant (an exported audit event, an immutable sink).
@@ -32,12 +40,14 @@
32
40
  * spec-cite: RFC 8725 §3.1 (algorithm verification), §3.10 (do not trust received URLs); RFC 7515 §4.1.11 (`crit`),
33
41
  * §10.7 (key selection from header parameters). Cited by section; the behaviour is this file's decision.
34
42
  */
43
+ import { createHash } from 'node:crypto';
35
44
  import { z } from 'zod';
36
- import { singleJwsTypeOf, CryptoKey_Purpose, CryptoKey_Scope, CryptoKey_VersionState } from '@wildo-ai/saas-models';
45
+ import { humanDecisionBoundDeliverableOf, singleJwsTypeOf, CryptoKey_Purpose, CryptoKey_Scope, CryptoKey_VersionState } from '@wildo-ai/saas-models';
37
46
  import { ES256_JWS_ALGORITHM, isP256PublicJwk, verifyEs256 } from './es256-jws.js';
38
47
  import { decisionPayloadDigestOf, sealClaimsDigestOf } from './signature-request.contracts.js';
39
48
  import { VerificationKeyRecordSchema, compareSigningLogExports, pinnedVerificationKeyOf, verifySigningLogExport } from './signing-log-export.contracts.js';
40
- import { ApprovalSealClaimsV1Schema, ApprovalSealDisclosureClaim, approvalSealDisclosureDigestOf, } from './approval-seal.contracts.js';
49
+ import { checkApprovalSealManifestedCopy } from './approval-seal-manifested-copy.js';
50
+ import { ApprovalSealClaimsV1Schema, ApprovalSealDisclosureClaim, approvalSealDisclosureDigestOf, approvalSealFileCommitmentOf, } from './approval-seal.contracts.js';
41
51
  /** The approval seal's JWS `typ`. */
42
52
  const APPROVAL_SEAL_TYP = singleJwsTypeOf(CryptoKey_Purpose.APPROVAL_SEAL);
43
53
  /** The payload members the custodian sets; the rest is the decision's committed payload. */
@@ -74,14 +84,51 @@ export var ApprovalSealVerificationFailure;
74
84
  ApprovalSealVerificationFailure["DISCLOSURE_MISMATCH"] = "disclosure_mismatch";
75
85
  /** A pin set was given and does not pin the key, or the key handed over is not the one its pinned `kid` names. */
76
86
  ApprovalSealVerificationFailure["UNPINNED"] = "unpinned";
87
+ /** A file deliverable's bytes were given and are not the ones the seal binds (#2904). */
88
+ ApprovalSealVerificationFailure["DELIVERABLE_FILE_MISMATCH"] = "deliverable_file_mismatch";
89
+ /**
90
+ * A manifested copy was given and is not this seal's (#2907): its approval page, its attached JWS or its page tree is
91
+ * not what the seal rebuilds, or what precedes them is not the file the seal binds.
92
+ */
93
+ ApprovalSealVerificationFailure["MANIFESTED_COPY_MISMATCH"] = "manifested_copy_mismatch";
77
94
  })(ApprovalSealVerificationFailure || (ApprovalSealVerificationFailure = {}));
78
- /** What the seal says about one person's disclosure. */
95
+ /** What the seal says about the file deliverable it attests (#2904). */
96
+ export var ApprovalSealDeliverableFileStanding;
97
+ (function (ApprovalSealDeliverableFileStanding) {
98
+ /** The bytes given hash, with the row's salt, to the commitment the presentation binds: the file approved. */
99
+ ApprovalSealDeliverableFileStanding["MATCHES"] = "matches";
100
+ /** The bytes given are not the file approved: one changed byte is enough. The seal does not verify. */
101
+ ApprovalSealDeliverableFileStanding["CHANGED"] = "changed";
102
+ /** The seal binds the file and its bytes were not given: the file is missing, or was not supplied. */
103
+ ApprovalSealDeliverableFileStanding["NOT_GIVEN"] = "not_given";
104
+ /**
105
+ * Nothing to compare with: the presentation that holds the commitment is not disclosed (erased with a person it
106
+ * named, or withheld), or it binds no such file.
107
+ */
108
+ ApprovalSealDeliverableFileStanding["NOT_COMMITTED"] = "not_committed";
109
+ /**
110
+ * A manifested copy (#2907) only: the host states the approver's erasure deleted it. The copy printed the approver's
111
+ * name in clear and a file cannot be scrubbed, so it went; the seal and the original still prove the approval, and the
112
+ * copy can be rebuilt from both should the name ever lawfully be needed again.
113
+ */
114
+ ApprovalSealDeliverableFileStanding["CONTENT_ERASED"] = "content_erased";
115
+ })(ApprovalSealDeliverableFileStanding || (ApprovalSealDeliverableFileStanding = {}));
116
+ /**
117
+ * What the seal says about one committed disclosure: a person's (approver, requester), what they were shown, what they
118
+ * answered. In none of the three is the seal failed: the signature covers the commitments, never the content (#2924).
119
+ */
79
120
  export var ApprovalSealDisclosureStanding;
80
121
  (function (ApprovalSealDisclosureStanding) {
81
122
  /** Given, and it digests to the commitment. */
82
123
  ApprovalSealDisclosureStanding["DISCLOSED"] = "disclosed";
83
- /** Committed to, and not given: the content was erased (or withheld). The seal stands. */
124
+ /**
125
+ * Committed to, not given, and the bundle states an erasure removed it (`erasedClaims`): UNDISCLOSED (erased). For the
126
+ * presentation this is PRESENTATION_ERASED: an erasure rewrote the stored presentation, and the seal still proves that
127
+ * a presentation with this digest was shown.
128
+ */
84
129
  ApprovalSealDisclosureStanding["ERASED"] = "erased";
130
+ /** Committed to, and not given, with no erasure stated: withheld, or a bundle that does not carry it. */
131
+ ApprovalSealDisclosureStanding["WITHHELD"] = "withheld";
85
132
  })(ApprovalSealDisclosureStanding || (ApprovalSealDisclosureStanding = {}));
86
133
  function decodeJson(part) {
87
134
  if (!part)
@@ -94,19 +141,75 @@ function decodeJson(part) {
94
141
  return null;
95
142
  }
96
143
  }
97
- function disclosureStanding(claimName, commitment, disclosures, failures) {
144
+ function disclosureStanding(claimName, commitment, disclosures, erasedClaims, failures) {
98
145
  if (!commitment)
99
146
  return undefined;
100
147
  const given = disclosures.filter((disclosure) => disclosure.claimName === claimName);
101
- if (given.length === 0)
102
- return { standing: ApprovalSealDisclosureStanding.ERASED };
148
+ if (given.length === 0) {
149
+ return { standing: erasedClaims.includes(claimName) ? ApprovalSealDisclosureStanding.ERASED : ApprovalSealDisclosureStanding.WITHHELD };
150
+ }
103
151
  const matching = given.find((disclosure) => approvalSealDisclosureDigestOf(disclosure) === commitment);
104
152
  if (!matching) {
153
+ // A disclosure that does not open its commitment is not the content: the seal fails, and nothing was disclosed.
105
154
  failures.push(ApprovalSealVerificationFailure.DISCLOSURE_MISMATCH);
106
- return { standing: ApprovalSealDisclosureStanding.ERASED };
155
+ return { standing: ApprovalSealDisclosureStanding.WITHHELD };
107
156
  }
108
157
  return { standing: ApprovalSealDisclosureStanding.DISCLOSED, value: matching.value };
109
158
  }
159
+ /**
160
+ * The file deliverable against the commitment the disclosed presentation binds it by (#2904). A mismatch is a failure:
161
+ * the seal does not attest those bytes.
162
+ */
163
+ function deliverableFileStandingOf(given, presentation, failures) {
164
+ if (!given)
165
+ return undefined;
166
+ const bound = presentation?.standing === ApprovalSealDisclosureStanding.DISCLOSED ? humanDecisionBoundDeliverableOf(presentation.value, given.fileId) : undefined;
167
+ if (!bound)
168
+ return { fileId: given.fileId, standing: ApprovalSealDeliverableFileStanding.NOT_COMMITTED };
169
+ if (!given.bytes)
170
+ return { fileId: given.fileId, argument: bound.argument, standing: ApprovalSealDeliverableFileStanding.NOT_GIVEN };
171
+ const contentSha256 = createHash('sha256').update(given.bytes).digest('hex');
172
+ if (approvalSealFileCommitmentOf(given.salt, contentSha256) === bound.commitment) {
173
+ return { fileId: given.fileId, argument: bound.argument, standing: ApprovalSealDeliverableFileStanding.MATCHES };
174
+ }
175
+ failures.push(ApprovalSealVerificationFailure.DELIVERABLE_FILE_MISMATCH);
176
+ return { fileId: given.fileId, argument: bound.argument, standing: ApprovalSealDeliverableFileStanding.CHANGED };
177
+ }
178
+ /**
179
+ * The manifested copy against the seal (#2907): rebuilt and compared, then its prefix opened against the commitment the
180
+ * disclosed presentation binds the deliverable by. A mismatch at either step is a failure.
181
+ */
182
+ function manifestedCopyStandingOf(input, approver, presentation, failures) {
183
+ const given = input.manifestedCopy;
184
+ if (!given)
185
+ return undefined;
186
+ const named = given.fileId ? { fileId: given.fileId } : {};
187
+ if (!given.bytes) {
188
+ return { ...named, standing: given.contentErased ? ApprovalSealDeliverableFileStanding.CONTENT_ERASED : ApprovalSealDeliverableFileStanding.NOT_GIVEN };
189
+ }
190
+ if (approver?.standing !== ApprovalSealDisclosureStanding.DISCLOSED || !approver.value)
191
+ return { ...named, standing: ApprovalSealDeliverableFileStanding.NOT_COMMITTED };
192
+ const approverName = typeof approver.value.name === 'string' ? approver.value.name : undefined;
193
+ const printed = approverName !== undefined ? { approverName } : {};
194
+ const statedHash = given.contentSha256 === undefined || createHash('sha256').update(given.bytes).digest('hex') === given.contentSha256;
195
+ const check = checkApprovalSealManifestedCopy(given.bytes, { jws: input.jws, ...printed });
196
+ if (!check.matches || !statedHash) {
197
+ failures.push(ApprovalSealVerificationFailure.MANIFESTED_COPY_MISMATCH);
198
+ return { ...named, standing: ApprovalSealDeliverableFileStanding.CHANGED };
199
+ }
200
+ const deliverable = input.deliverableFile;
201
+ const bound = deliverable && presentation?.standing === ApprovalSealDisclosureStanding.DISCLOSED
202
+ ? humanDecisionBoundDeliverableOf(presentation.value, deliverable.fileId)
203
+ : undefined;
204
+ const stated = { locale: check.statement.locale, ...(check.statement.verificationUrl ? { verificationUrl: check.statement.verificationUrl } : {}) };
205
+ if (!deliverable || !bound)
206
+ return { ...named, standing: ApprovalSealDeliverableFileStanding.NOT_COMMITTED, ...printed, ...stated };
207
+ if (approvalSealFileCommitmentOf(deliverable.salt, createHash('sha256').update(check.original).digest('hex')) !== bound.commitment) {
208
+ failures.push(ApprovalSealVerificationFailure.MANIFESTED_COPY_MISMATCH);
209
+ return { ...named, standing: ApprovalSealDeliverableFileStanding.CHANGED };
210
+ }
211
+ return { ...named, standing: ApprovalSealDeliverableFileStanding.MATCHES, ...printed, ...stated };
212
+ }
110
213
  /**
111
214
  * What corroborates a seal under a compromised key, if anything: evidence of its payload recorded before the compromise,
112
215
  * or a kept export signed before the compromise that lists this exact seal (its issuer, its key, its signed claims).
@@ -183,10 +286,13 @@ export function verifyApprovalSeal(input) {
183
286
  if (!scopeCovers)
184
287
  failures.push(ApprovalSealVerificationFailure.TENANT_OUTSIDE_KEY_SCOPE);
185
288
  const disclosures = input.disclosures ?? [];
186
- const approver = disclosureStanding(ApprovalSealDisclosureClaim.APPROVER, claims.approver, disclosures, failures);
187
- const requester = disclosureStanding(ApprovalSealDisclosureClaim.REQUESTER, claims.requester?.disclosure, disclosures, failures);
188
- const presentation = disclosureStanding(ApprovalSealDisclosureClaim.PRESENTATION, claims.presentation?.digest, disclosures, failures);
189
- const statement = disclosureStanding(ApprovalSealDisclosureClaim.STATEMENT, claims.statementDigest, disclosures, failures);
289
+ const erased = input.erasedClaims ?? [];
290
+ const approver = disclosureStanding(ApprovalSealDisclosureClaim.APPROVER, claims.approver, disclosures, erased, failures);
291
+ const requester = disclosureStanding(ApprovalSealDisclosureClaim.REQUESTER, claims.requester?.disclosure, disclosures, erased, failures);
292
+ const presentation = disclosureStanding(ApprovalSealDisclosureClaim.PRESENTATION, claims.presentation?.digest, disclosures, erased, failures);
293
+ const statement = disclosureStanding(ApprovalSealDisclosureClaim.STATEMENT, claims.statementDigest, disclosures, erased, failures);
294
+ const deliverableFile = deliverableFileStandingOf(input.deliverableFile, presentation, failures);
295
+ const manifestedCopy = manifestedCopyStandingOf(input, approver, presentation, failures);
190
296
  const decisionPayloadDigest = decisionPayloadDigestOf(committed);
191
297
  const valid = failures.length === 0;
192
298
  const compromised = key.state === CryptoKey_VersionState.COMPROMISED;
@@ -208,6 +314,8 @@ export function verifyApprovalSeal(input) {
208
314
  ...(requester ? { requester } : {}),
209
315
  ...(presentation ? { presentation } : {}),
210
316
  ...(statement ? { statement } : {}),
317
+ ...(deliverableFile ? { deliverableFile } : {}),
318
+ ...(manifestedCopy ? { manifestedCopy } : {}),
211
319
  };
212
320
  }
213
321
  /** A verification key as an export or a CLI file states it (dates as ISO strings): the one shape of a key record. */
@@ -229,5 +337,19 @@ export const ApprovalSealVerificationBundleSchema = z.object({
229
337
  keys: z.array(ApprovalSealVerificationKeySchema).min(1),
230
338
  expectedIssuer: z.string().min(1).optional(),
231
339
  disclosures: z.array(z.object({ claimName: z.enum(ApprovalSealDisclosureClaim), salt: z.string().min(1), value: z.record(z.string(), z.unknown()) })).optional(),
340
+ /** The committed claims an erasure removed from the host's row (#2924): see `ApprovalSealVerificationInput.erasedClaims`. */
341
+ erasedClaims: z.array(z.enum(ApprovalSealDisclosureClaim)).optional(),
342
+ /**
343
+ * The file deliverable the seal attests (#2904): its id and the salt its row kept. Never the bytes, which the verifier
344
+ * is given from the file itself (`--deliverable`), and never the clear hash.
345
+ */
346
+ deliverableFile: z.object({ fileId: z.string().min(1), salt: z.string().min(1) }).optional(),
347
+ /**
348
+ * The deliverable's manifested copy (#2907): its file id, or `contentErased` when the approver's erasure deleted it.
349
+ * Never its bytes, which the verifier is given from the file itself (`--manifested-copy`).
350
+ */
351
+ manifestedCopy: z.object({ fileId: z.string().min(1).optional(), contentSha256: z.string().regex(/^[0-9a-f]{64}$/).optional(), contentErased: z.literal(true).optional() })
352
+ .refine((copy) => (copy.fileId === undefined) !== (copy.contentErased === undefined), { message: 'A manifested copy is named by its file id, or stated erased: exactly one of the two' })
353
+ .optional(),
232
354
  });
233
355
  //# sourceMappingURL=approval-seal-verifier.js.map