@nakafa/aksara-contracts 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/LICENSE +185 -0
  2. package/README.md +73 -0
  3. package/dist/artifact/integrity.d.ts +29 -0
  4. package/dist/artifact/integrity.js +54 -0
  5. package/dist/artifact/limits.d.ts +26 -0
  6. package/dist/artifact/limits.js +46 -0
  7. package/dist/artifact/source.d.ts +21 -0
  8. package/dist/artifact/source.js +24 -0
  9. package/dist/artifact/spec.d.ts +148 -0
  10. package/dist/artifact/spec.js +92 -0
  11. package/dist/artifact/verify.d.ts +26 -0
  12. package/dist/artifact/verify.js +18 -0
  13. package/dist/cache/content.d.ts +52 -0
  14. package/dist/cache/content.js +80 -0
  15. package/dist/content.d.ts +168 -0
  16. package/dist/content.js +107 -0
  17. package/dist/country.d.ts +4 -0
  18. package/dist/country.js +8 -0
  19. package/dist/date.d.ts +24 -0
  20. package/dist/date.js +44 -0
  21. package/dist/decode.d.ts +4 -0
  22. package/dist/decode.js +8 -0
  23. package/dist/delivery.d.ts +4 -0
  24. package/dist/delivery.js +7 -0
  25. package/dist/errors.d.ts +10 -0
  26. package/dist/errors.js +8 -0
  27. package/dist/graph/family.d.ts +45 -0
  28. package/dist/graph/family.js +85 -0
  29. package/dist/graph/identity.d.ts +19 -0
  30. package/dist/graph/identity.js +39 -0
  31. package/dist/graph/spec.d.ts +20 -0
  32. package/dist/graph/spec.js +26 -0
  33. package/dist/hash/text.d.ts +10 -0
  34. package/dist/hash/text.js +20 -0
  35. package/dist/ids.d.ts +27 -0
  36. package/dist/ids.js +63 -0
  37. package/dist/limits.d.ts +10 -0
  38. package/dist/limits.js +10 -0
  39. package/dist/locale.d.ts +37 -0
  40. package/dist/locale.js +53 -0
  41. package/dist/material/domain.d.ts +4 -0
  42. package/dist/material/domain.js +8 -0
  43. package/dist/preview/artifact.d.ts +198 -0
  44. package/dist/preview/artifact.js +20 -0
  45. package/dist/preview/auth.d.ts +71 -0
  46. package/dist/preview/auth.js +49 -0
  47. package/dist/preview/document.d.ts +692 -0
  48. package/dist/preview/document.js +90 -0
  49. package/dist/preview/spec.d.ts +2517 -0
  50. package/dist/preview/spec.js +142 -0
  51. package/dist/preview/target.d.ts +172 -0
  52. package/dist/preview/target.js +70 -0
  53. package/dist/program/curriculum.d.ts +69 -0
  54. package/dist/program/curriculum.js +181 -0
  55. package/dist/program/snapshot/digest.d.ts +26 -0
  56. package/dist/program/snapshot/digest.js +220 -0
  57. package/dist/program/snapshot/hash.d.ts +31 -0
  58. package/dist/program/snapshot/hash.js +40 -0
  59. package/dist/program/snapshot/row-hash.d.ts +155 -0
  60. package/dist/program/snapshot/row-hash.js +34 -0
  61. package/dist/program/snapshot/row.d.ts +139 -0
  62. package/dist/program/snapshot/row.js +28 -0
  63. package/dist/program/snapshot/spec.d.ts +36 -0
  64. package/dist/program/snapshot/spec.js +39 -0
  65. package/dist/program/spec.d.ts +85 -0
  66. package/dist/program/spec.js +197 -0
  67. package/dist/projection/article.d.ts +145 -0
  68. package/dist/projection/article.js +150 -0
  69. package/dist/projection/digest.d.ts +261 -0
  70. package/dist/projection/digest.js +59 -0
  71. package/dist/projection/hash.d.ts +3 -0
  72. package/dist/projection/hash.js +10 -0
  73. package/dist/projection/material.d.ts +109 -0
  74. package/dist/projection/material.js +160 -0
  75. package/dist/projection/page.d.ts +112 -0
  76. package/dist/projection/page.js +106 -0
  77. package/dist/projection/question.d.ts +520 -0
  78. package/dist/projection/question.js +109 -0
  79. package/dist/projection/spec.d.ts +503 -0
  80. package/dist/projection/spec.js +56 -0
  81. package/dist/projection/verify.d.ts +281 -0
  82. package/dist/projection/verify.js +86 -0
  83. package/dist/question/identity.d.ts +175 -0
  84. package/dist/question/identity.js +205 -0
  85. package/dist/question/item.d.ts +453 -0
  86. package/dist/question/item.js +146 -0
  87. package/dist/question/response.d.ts +175 -0
  88. package/dist/question/response.js +150 -0
  89. package/dist/quran/attribution.d.ts +48 -0
  90. package/dist/quran/attribution.js +44 -0
  91. package/dist/quran/identity.d.ts +105 -0
  92. package/dist/quran/identity.js +100 -0
  93. package/dist/quran/notes.d.ts +56 -0
  94. package/dist/quran/notes.js +142 -0
  95. package/dist/quran/provenance.d.ts +257 -0
  96. package/dist/quran/provenance.js +144 -0
  97. package/dist/quran/snapshot/digest.d.ts +33 -0
  98. package/dist/quran/snapshot/digest.js +232 -0
  99. package/dist/quran/snapshot/hash.d.ts +51 -0
  100. package/dist/quran/snapshot/hash.js +50 -0
  101. package/dist/quran/snapshot/row/hash.d.ts +748 -0
  102. package/dist/quran/snapshot/row/hash.js +115 -0
  103. package/dist/quran/snapshot/row.d.ts +354 -0
  104. package/dist/quran/snapshot/row.js +91 -0
  105. package/dist/quran/snapshot/spec.d.ts +50 -0
  106. package/dist/quran/snapshot/spec.js +66 -0
  107. package/dist/quran/source.d.ts +206 -0
  108. package/dist/quran/source.js +153 -0
  109. package/dist/quran/spec.d.ts +47 -0
  110. package/dist/quran/spec.js +41 -0
  111. package/dist/quran/text.d.ts +7 -0
  112. package/dist/quran/text.js +11 -0
  113. package/dist/release/canonical.d.ts +23 -0
  114. package/dist/release/canonical.js +29 -0
  115. package/dist/release/current/evidence.d.ts +424 -0
  116. package/dist/release/current/evidence.js +41 -0
  117. package/dist/release/current/runtime.d.ts +4 -0
  118. package/dist/release/current/runtime.js +15 -0
  119. package/dist/release/current/state.d.ts +567 -0
  120. package/dist/release/current/state.js +91 -0
  121. package/dist/release/digest.d.ts +54 -0
  122. package/dist/release/digest.js +71 -0
  123. package/dist/release/hash.d.ts +72 -0
  124. package/dist/release/hash.js +14 -0
  125. package/dist/release/head.d.ts +206 -0
  126. package/dist/release/head.js +131 -0
  127. package/dist/release/items.d.ts +98 -0
  128. package/dist/release/items.js +114 -0
  129. package/dist/release/lifecycle.d.ts +297 -0
  130. package/dist/release/lifecycle.js +97 -0
  131. package/dist/release/origin.d.ts +30 -0
  132. package/dist/release/origin.js +24 -0
  133. package/dist/release/policy.d.ts +45 -0
  134. package/dist/release/policy.js +124 -0
  135. package/dist/release/result/digest.d.ts +127 -0
  136. package/dist/release/result/digest.js +140 -0
  137. package/dist/release/result/spec.d.ts +4 -0
  138. package/dist/release/result/spec.js +5 -0
  139. package/dist/release/rollback/digest.d.ts +126 -0
  140. package/dist/release/rollback/digest.js +92 -0
  141. package/dist/release/rollback/spec.d.ts +1729 -0
  142. package/dist/release/rollback/spec.js +156 -0
  143. package/dist/release/route/digest.d.ts +45 -0
  144. package/dist/release/route/digest.js +59 -0
  145. package/dist/release/route/page.d.ts +56 -0
  146. package/dist/release/route/page.js +46 -0
  147. package/dist/release/route/spec.d.ts +49 -0
  148. package/dist/release/route/spec.js +40 -0
  149. package/dist/release/route/verify.d.ts +66 -0
  150. package/dist/release/route/verify.js +67 -0
  151. package/dist/release/signing.d.ts +6 -0
  152. package/dist/release/signing.js +38 -0
  153. package/dist/release/snapshot/data.d.ts +475 -0
  154. package/dist/release/snapshot/data.js +74 -0
  155. package/dist/release/snapshot/evidence-requirement.d.ts +22 -0
  156. package/dist/release/snapshot/evidence-requirement.js +21 -0
  157. package/dist/release/snapshot/evidence.d.ts +58 -0
  158. package/dist/release/snapshot/evidence.js +14 -0
  159. package/dist/release/snapshot/program-evidence.d.ts +17 -0
  160. package/dist/release/snapshot/program-evidence.js +39 -0
  161. package/dist/release/snapshot/quran-evidence.d.ts +27 -0
  162. package/dist/release/snapshot/quran-evidence.js +43 -0
  163. package/dist/release/snapshot/scope.d.ts +60 -0
  164. package/dist/release/snapshot/scope.js +102 -0
  165. package/dist/release/snapshot/spec.d.ts +193 -0
  166. package/dist/release/snapshot/spec.js +139 -0
  167. package/dist/release/snapshot/tryout-evidence.d.ts +22 -0
  168. package/dist/release/snapshot/tryout-evidence.js +86 -0
  169. package/dist/release/snapshot/verify.d.ts +710 -0
  170. package/dist/release/snapshot/verify.js +147 -0
  171. package/dist/release/spec.d.ts +491 -0
  172. package/dist/release/spec.js +200 -0
  173. package/dist/release/verify.d.ts +98 -0
  174. package/dist/release/verify.js +70 -0
  175. package/dist/renderer/compatibility.d.ts +35 -0
  176. package/dist/renderer/compatibility.js +48 -0
  177. package/dist/renderer/component.d.ts +99 -0
  178. package/dist/renderer/component.js +102 -0
  179. package/dist/renderer/contract.d.ts +144 -0
  180. package/dist/renderer/contract.js +122 -0
  181. package/dist/renderer/domain.d.ts +6 -0
  182. package/dist/renderer/domain.js +18 -0
  183. package/dist/renderer/manifest.d.ts +86 -0
  184. package/dist/renderer/manifest.js +49 -0
  185. package/dist/renderer/selection.d.ts +39 -0
  186. package/dist/renderer/selection.js +87 -0
  187. package/dist/runtime/error.d.ts +8 -0
  188. package/dist/runtime/error.js +20 -0
  189. package/dist/runtime/protected/limits.d.ts +10 -0
  190. package/dist/runtime/protected/limits.js +15 -0
  191. package/dist/runtime/protected/spec.d.ts +328 -0
  192. package/dist/runtime/protected/spec.js +79 -0
  193. package/dist/runtime/protected/verify.d.ts +97 -0
  194. package/dist/runtime/protected/verify.js +72 -0
  195. package/dist/runtime/result.d.ts +12 -0
  196. package/dist/runtime/result.js +17 -0
  197. package/dist/runtime/spec.d.ts +705 -0
  198. package/dist/runtime/spec.js +61 -0
  199. package/dist/runtime/verify.d.ts +479 -0
  200. package/dist/runtime/verify.js +123 -0
  201. package/dist/signature/spec.d.ts +53 -0
  202. package/dist/signature/spec.js +29 -0
  203. package/dist/signature/trusted.d.ts +19 -0
  204. package/dist/signature/trusted.js +32 -0
  205. package/dist/signature/verify.d.ts +10 -0
  206. package/dist/signature/verify.js +82 -0
  207. package/dist/text/order.d.ts +2 -0
  208. package/dist/text/order.js +10 -0
  209. package/dist/text/syntax.d.ts +6 -0
  210. package/dist/text/syntax.js +15 -0
  211. package/dist/transport/batch.d.ts +971 -0
  212. package/dist/transport/batch.js +101 -0
  213. package/dist/transport/failure.d.ts +168 -0
  214. package/dist/transport/failure.js +194 -0
  215. package/dist/transport/group.d.ts +2946 -0
  216. package/dist/transport/group.js +47 -0
  217. package/dist/transport/limits.d.ts +30 -0
  218. package/dist/transport/limits.js +30 -0
  219. package/dist/transport/request.d.ts +9333 -0
  220. package/dist/transport/request.js +121 -0
  221. package/dist/transport/response.d.ts +6247 -0
  222. package/dist/transport/response.js +181 -0
  223. package/dist/transport/runtime.d.ts +77 -0
  224. package/dist/transport/runtime.js +33 -0
  225. package/dist/transport/snapshot.d.ts +978 -0
  226. package/dist/transport/snapshot.js +70 -0
  227. package/dist/tryout/canonical.d.ts +2 -0
  228. package/dist/tryout/canonical.js +11 -0
  229. package/dist/tryout/catalog-hash.d.ts +134 -0
  230. package/dist/tryout/catalog-hash.js +203 -0
  231. package/dist/tryout/catalog.d.ts +376 -0
  232. package/dist/tryout/catalog.js +147 -0
  233. package/dist/tryout/content-hash.d.ts +89 -0
  234. package/dist/tryout/content-hash.js +72 -0
  235. package/dist/tryout/identity.d.ts +12 -0
  236. package/dist/tryout/identity.js +46 -0
  237. package/dist/tryout/key.d.ts +4 -0
  238. package/dist/tryout/key.js +8 -0
  239. package/dist/tryout/language.d.ts +24 -0
  240. package/dist/tryout/language.js +32 -0
  241. package/dist/tryout/locale-closure.d.ts +20 -0
  242. package/dist/tryout/locale-closure.js +164 -0
  243. package/dist/tryout/placement-closure.d.ts +5 -0
  244. package/dist/tryout/placement-closure.js +30 -0
  245. package/dist/tryout/placement-hash.d.ts +11 -0
  246. package/dist/tryout/placement-hash.js +55 -0
  247. package/dist/tryout/placement.d.ts +280 -0
  248. package/dist/tryout/placement.js +82 -0
  249. package/dist/tryout/row-hash.d.ts +28 -0
  250. package/dist/tryout/row-hash.js +50 -0
  251. package/dist/tryout/runtime/canonical.d.ts +8 -0
  252. package/dist/tryout/runtime/canonical.js +33 -0
  253. package/dist/tryout/runtime/hash.d.ts +32 -0
  254. package/dist/tryout/runtime/hash.js +11 -0
  255. package/dist/tryout/runtime/source.d.ts +42 -0
  256. package/dist/tryout/runtime/source.js +47 -0
  257. package/dist/tryout/runtime/spec.d.ts +58 -0
  258. package/dist/tryout/runtime/spec.js +21 -0
  259. package/dist/tryout/runtime/verify.d.ts +61 -0
  260. package/dist/tryout/runtime/verify.js +69 -0
  261. package/dist/tryout/snapshot/canonical.d.ts +7 -0
  262. package/dist/tryout/snapshot/canonical.js +17 -0
  263. package/dist/tryout/snapshot/hash.d.ts +8 -0
  264. package/dist/tryout/snapshot/hash.js +19 -0
  265. package/dist/tryout/snapshot/spec.d.ts +46 -0
  266. package/dist/tryout/snapshot/spec.js +30 -0
  267. package/dist/tryout/spec.d.ts +13 -0
  268. package/dist/tryout/spec.js +15 -0
  269. package/package.json +506 -0
package/LICENSE ADDED
@@ -0,0 +1,185 @@
1
+ # Nakafa Source Available License 1.0
2
+
3
+ Effective date: April 24, 2026
4
+
5
+ Copyright (c) 2026 PT NAKAFA TEKNO KREATIF. All rights reserved.
6
+
7
+ This is not an open-source license. Nakafa source code is public so people can
8
+ inspect it, learn from it, review it, and propose improvements. The public
9
+ source code does not grant permission to rebrand, redistribute, host, sell,
10
+ monetize, or turn Nakafa into another product without written permission.
11
+
12
+ ## 1. Definitions
13
+
14
+ `Nakafa` means the software, source code, build files, configuration, scripts,
15
+ database schema, prompts, UI, and related code made available in this repository.
16
+
17
+ `You` means the individual or entity receiving or using Nakafa.
18
+
19
+ `Personal use` means use by one individual for that individual's own learning,
20
+ research, testing, security review, or hobby evaluation. Personal use does not
21
+ include use for an employer, client, school, organization, product, service,
22
+ team, or business purpose.
23
+
24
+ `Local use` means use on a device or development environment controlled by you,
25
+ without making Nakafa available to any other person over the internet, an
26
+ intranet, a private network, a shared server, or any hosted environment.
27
+
28
+ `Written permission` means a separate written agreement signed by PT NAKAFA
29
+ TEKNO KREATIF, or a written approval sent from an official Nakafa email address.
30
+
31
+ ## 2. Scope
32
+
33
+ This license applies to the software source code in this repository unless a
34
+ file says that a different license applies.
35
+
36
+ This license does not apply to:
37
+
38
+ - Third-party dependencies, packages, services, fonts, or libraries, which keep
39
+ their own licenses.
40
+ - Educational content, articles, exercises, explanations, datasets, copy,
41
+ images, video, audio, and other non-code materials, which are covered by
42
+ `CONTENT_LICENSE.md` unless a file says otherwise.
43
+ - The Nakafa name, logos, domains, product names, visual identity, and other
44
+ brand assets, which are covered by `TRADEMARKS.md`.
45
+ - Prior copies of Nakafa that were lawfully received under a previous license.
46
+ Those older copies remain under the license terms that applied when they were
47
+ received. New changes published after the effective date above are covered by
48
+ this license.
49
+
50
+ All rights not expressly granted by this license are reserved by PT NAKAFA TEKNO
51
+ KREATIF.
52
+
53
+ ## 3. Allowed Use Without Written Permission
54
+
55
+ You may do only the following without written permission from PT NAKAFA TEKNO
56
+ KREATIF:
57
+
58
+ - View, read, inspect, and audit the source code.
59
+ - Clone or download one copy for personal review.
60
+ - Create a GitHub fork only to prepare and submit contributions back to Nakafa,
61
+ as long as the fork is not used as a standalone project, hosted service,
62
+ mirror, product, rebrand, or distribution channel.
63
+ - Run the unmodified software locally for your own personal, non-commercial
64
+ learning, research, testing, security review, or hobby evaluation.
65
+ - Make temporary technical copies that are necessary for the allowed personal
66
+ local use above.
67
+ - Submit issues, suggestions, or pull requests under the contribution terms in
68
+ `.github/CONTRIBUTING.md`.
69
+
70
+ These permissions are personal, limited, non-exclusive, non-transferable, and
71
+ revocable if you violate this license.
72
+
73
+ ## 4. Permission Required
74
+
75
+ You must get prior written permission from PT NAKAFA TEKNO KREATIF before doing
76
+ anything not listed in Section 3.
77
+
78
+ The following uses always require prior written permission:
79
+
80
+ - Commercial use.
81
+ - Revenue-generating use.
82
+ - Use in a product, service, course, school system, learning management system,
83
+ SaaS, API, internal company tool, agency project, client project, consulting
84
+ work, paid training, or paid content.
85
+ - Use by a company, school, institution, nonprofit organization, government
86
+ organization, team, or other entity outside personal local evaluation.
87
+ - Any hosted deployment outside your own local machine, whether public or
88
+ private, and whether or not anyone else can access it.
89
+ - Distribution, redistribution, mirroring, publishing, uploading, packaging,
90
+ reselling, sublicensing, or sharing copies of the software.
91
+ - Modification, forked product development, derivative works, white-label use,
92
+ private-label use, rebranding, or presenting Nakafa as your own project.
93
+ - Removing, hiding, or changing copyright, license, attribution, source,
94
+ trademark, or brand notices.
95
+ - Using Nakafa code, content, structure, datasets, or outputs to train,
96
+ fine-tune, benchmark, evaluate, seed, or improve AI models, search indexes,
97
+ datasets, embeddings, retrieval systems, or competing educational products.
98
+
99
+ Commercial or revenue-generating use includes use connected to subscriptions,
100
+ ads, sponsorships, affiliate revenue, lead generation, paid access, paid
101
+ support, paid tutoring, paid courses, paid school services, sales enablement,
102
+ customer acquisition, investor demos, or any other direct or indirect business
103
+ benefit.
104
+
105
+ ## 5. Brand Rights
106
+
107
+ This license grants no trademark, service mark, trade name, domain name, logo,
108
+ design, or brand rights. You may not use the Nakafa brand in a way that suggests
109
+ ownership, endorsement, partnership, official status, or source confusion.
110
+
111
+ See `TRADEMARKS.md` for the brand rules.
112
+
113
+ ## 6. Content Rights
114
+
115
+ This license grants no rights to copy, redistribute, sell, mirror, scrape,
116
+ repackage, rebrand, or monetize Nakafa educational content.
117
+
118
+ See `CONTENT_LICENSE.md` for the content rules.
119
+
120
+ ## 7. Contributions
121
+
122
+ By submitting a contribution, you agree to the contribution terms in
123
+ `.github/CONTRIBUTING.md`.
124
+
125
+ If you cannot grant those contribution rights, do not submit the contribution.
126
+
127
+ ## 8. Termination
128
+
129
+ Your rights under this license end immediately if you violate any term.
130
+
131
+ After termination, you must stop using the software and delete all copies under
132
+ your control, except copies you are required to keep for legal compliance.
133
+
134
+ PT NAKAFA TEKNO KREATIF may reinstate your rights only in writing.
135
+
136
+ ## 9. Mandatory Legal Rights
137
+
138
+ This license does not limit rights that applicable law says cannot be waived,
139
+ limited, or conditioned by contract.
140
+
141
+ ## 10. No Warranty
142
+
143
+ Nakafa is provided "as is" and "as available", without warranties or conditions
144
+ of any kind, whether express, implied, statutory, or otherwise.
145
+
146
+ PT NAKAFA TEKNO KREATIF does not warrant that Nakafa is accurate, secure,
147
+ complete, uninterrupted, error-free, fit for a particular purpose, or
148
+ non-infringing.
149
+
150
+ ## 11. Limitation of Liability
151
+
152
+ To the fullest extent permitted by law, PT NAKAFA TEKNO KREATIF will not be
153
+ liable for any indirect, incidental, special, consequential, exemplary, punitive,
154
+ or similar damages, or for any loss of profits, revenue, data, goodwill, or
155
+ business opportunity, arising from or related to Nakafa or this license.
156
+
157
+ ## 12. Governing Law and Venue
158
+
159
+ This license is governed by the laws of the Republic of Indonesia, without
160
+ regard to conflict of law principles.
161
+
162
+ Except where prohibited by applicable law, any dispute arising out of or related
163
+ to this license or Nakafa must be brought exclusively in the courts of the
164
+ Republic of Indonesia.
165
+
166
+ ## 13. No Waiver
167
+
168
+ If PT NAKAFA TEKNO KREATIF does not enforce a term immediately, that does not
169
+ waive the right to enforce that term later.
170
+
171
+ Any waiver must be in writing and signed by PT NAKAFA TEKNO KREATIF.
172
+
173
+ ## 14. Severability
174
+
175
+ If any part of this license is found unenforceable, the rest remains in effect.
176
+ The unenforceable part will be interpreted as narrowly as possible so it becomes
177
+ enforceable while preserving the original intent.
178
+
179
+ ## 15. Written Permission
180
+
181
+ Commercial, hosted, institutional, redistribution, modification, white-label,
182
+ private-label, rebrand, AI-training, or other non-personal use requires a
183
+ separate written agreement.
184
+
185
+ Contact: nakafaai@gmail.com
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # @nakafa/aksara-contracts
2
+
3
+ This package defines exact runtime contracts for the Aksara compiler and
4
+ publisher. Nakafa runtime adoption is a separate cutover gated by a proven
5
+ immutable release archive and compatible renderer support.
6
+
7
+ This package contains schemas, branded identifiers, canonical wire encodings,
8
+ and Web Crypto signature verification. It contains no corpus, renderer
9
+ implementation, signing key, deployment credential, or browser-side MDX
10
+ runtime.
11
+
12
+ Consumers install the exact attested GitHub Release archive recorded in their
13
+ pnpm lockfile. Content requiring a newer contract may be activated only after a
14
+ compatible Nakafa renderer is live.
15
+
16
+ Node-only writer and incremental digest exports remain isolated behind package
17
+ conditions. Default-runtime exports used by Convex are audited to reject
18
+ reachable Node built-ins. Verification accepts only reviewed, signed Aksara
19
+ artifacts and releases. It does not make MDX safe for arbitrary uploads; MDX
20
+ remains trusted executable source.
21
+
22
+ ## Consumer boundaries
23
+
24
+ Current consumers use unversioned semantic Interfaces:
25
+
26
+ - `graph/family` classifies either a complete graph identity or one exact
27
+ asset ID into its application locale and content family.
28
+ - `tryout/catalog` owns minimal catalog node schemas, while `tryout/identity`
29
+ builds their pure lookup identities before complete signed rows are loaded.
30
+ - `projection/material` owns the application-locale material namespace and
31
+ validates every signed route and projection against it.
32
+ - `projection/page` owns stable public page identities, localized paths, and
33
+ signed metadata for human, agent, and sitemap delivery.
34
+ ## Publication dates
35
+
36
+ Article, material, and public page metadata carries one required
37
+ `datePublished` and one optional `dateModified`, both as exact `DateOnly`
38
+ values.
39
+
40
+ - `datePublished` is the first verified public availability of that specific
41
+ locale page.
42
+ - `dateModified` is the public activation date of a later signed release that
43
+ contains a meaningful content change.
44
+ - When present, `dateModified` must be strictly later than `datePublished`.
45
+
46
+ Neither value may be derived from a build clock, import time, Convex
47
+ `_creationTime`, an unsigned source commit, or an unactivated candidate. The
48
+ signed release and activation history remain the audit evidence for both
49
+ values. These rules keep visible dates and structured data aligned with
50
+ [Google publication date guidance](https://developers.google.com/search/docs/appearance/publication-dates)
51
+ and
52
+ [Article structured data](https://developers.google.com/search/docs/appearance/structured-data/article).
53
+
54
+ Runtime verification authenticates the independently signed release and
55
+ artifact values against the exact renderer manifest frozen into that release.
56
+ Execution verification also proves the selected artifact against the complete
57
+ live renderer when the deployed manifest hash differs. Non-rendering evidence
58
+ verification authenticates the same frozen release and artifact without
59
+ claiming that its consumer can execute the artifact. This directional
60
+ execution check lets an additive live renderer serve an older release only when
61
+ it still publishes the selected domain and supports every required component
62
+ version. It never authorizes publication: new releases, activation, and
63
+ recovery preflight remain bound to the exact complete live renderer. The
64
+ renderer is not a third signed value. Current production trusts authenticated
65
+ Convex state for route/head membership, delivery class, and the active pointer;
66
+ a release result digest is not a per-row inclusion proof. This boundary is
67
+ recorded explicitly in
68
+ [ADR 0002](https://github.com/nakafaai/aksara/blob/main/docs/adr/0002-release-state.md).
69
+
70
+ The package source is publicly readable for supply-chain review. All use and
71
+ redistribution remain subject to the included Nakafa Source Available License
72
+ 1.0. The package grants no rights to the Nakafa corpus, branding, or
73
+ educational material.
@@ -0,0 +1,29 @@
1
+ import { Effect } from "effect";
2
+ import { ArtifactHashComputationError, ArtifactHashMismatchError, ArtifactVerificationDecodeError } from "#contracts/artifact/spec";
3
+ import { type CompiledContentPayload } from "#contracts/content";
4
+ /** Computes the immutable identity of one canonical compiled payload. */
5
+ export declare function hashCompiledContentPayload(payload: CompiledContentPayload): string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
6
+ /** Strictly authenticates artifact integrity without renderer compatibility. */
7
+ export declare const verifySignedContentArtifactIntegrity: (input: unknown) => Effect.Effect<{
8
+ readonly artifactHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
9
+ readonly keyId: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSigningKeyId">;
10
+ readonly payload: {
11
+ readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
12
+ readonly byteLength: number;
13
+ readonly compiledCode: string;
14
+ readonly compilerConfigHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
15
+ readonly compilerVersion: "0.1.0";
16
+ readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
17
+ readonly format: "mdx-function-body";
18
+ readonly mdxCompilerVersion: "3.1.1";
19
+ readonly plainText: string;
20
+ readonly rawMdx: string;
21
+ readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
22
+ readonly requiredComponents: readonly {
23
+ readonly name: string;
24
+ readonly version: number;
25
+ }[];
26
+ readonly sourceHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
27
+ };
28
+ readonly signature: string & import("effect/Brand").Brand<"@NakafaAI/AksaraEd25519Signature">;
29
+ }, import("#contracts/artifact/spec").ArtifactCompiledByteLengthMismatchError | ArtifactHashComputationError | ArtifactHashMismatchError | import("#contracts/artifact/spec").ArtifactPayloadFieldByteLimitError | import("#contracts/artifact/spec").ArtifactSourceHashComputationError | import("#contracts/artifact/spec").ArtifactSourceHashMismatchError | import("#contracts/artifact/spec").ArtifactVerificationByteLimitError | ArtifactVerificationDecodeError | import("../signature/spec.js").PublicKeyParseError | import("../signature/spec.js").PublicKeyTypeError | import("../signature/spec.js").SignatureCheckError | import("../signature/spec.js").SignatureInvalidError | import("../signature/spec.js").SigningKeyNotFoundError | import("../signature/spec.js").SigningKeyResolutionError, import("../signature/spec.js").ContentVerificationKeyResolver>;
@@ -0,0 +1,54 @@
1
+ import { createHash } from "node:crypto";
2
+ import { Effect, Schema } from "effect";
3
+ import { validateArtifactByteIntegrity } from "#contracts/artifact/limits";
4
+ import { verifyCompiledContentSourceHash } from "#contracts/artifact/source";
5
+ import { ArtifactHashComputationError, ArtifactHashMismatchError, ArtifactVerificationDecodeError, } from "#contracts/artifact/spec";
6
+ import { canonicalizeCompiledContentPayload, canonicalizeContentArtifactSigningInput, SignedContentArtifactSchema, } from "#contracts/content";
7
+ import { Sha256HashSchema } from "#contracts/ids";
8
+ import { verifyEd25519Signature } from "#contracts/signature/verify";
9
+ /** Computes the immutable identity of one canonical compiled payload. */
10
+ export function hashCompiledContentPayload(payload) {
11
+ return Sha256HashSchema.make(`sha256:${createHash("sha256")
12
+ .update(canonicalizeCompiledContentPayload(payload))
13
+ .digest("hex")}`);
14
+ }
15
+ /** Computes an artifact hash while preserving typed computation failures. */
16
+ function hashPayload(payload) {
17
+ return Effect.try({
18
+ catch: () => new ArtifactHashComputationError({ contentKey: payload.contentKey }),
19
+ try: () => hashCompiledContentPayload(payload),
20
+ });
21
+ }
22
+ /** Confirms that an artifact envelope identifies its canonical payload. */
23
+ function validateArtifactHash(artifact, actualHash) {
24
+ if (artifact.artifactHash === actualHash) {
25
+ return Effect.void;
26
+ }
27
+ return Effect.fail(new ArtifactHashMismatchError({
28
+ actualHash,
29
+ contentKey: artifact.payload.contentKey,
30
+ expectedHash: artifact.artifactHash,
31
+ }));
32
+ }
33
+ /** Verifies immutable bytes, hashes, source, and signature without a renderer. */
34
+ function authenticateSignedArtifact(artifact) {
35
+ return Effect.gen(function* () {
36
+ const actualHash = yield* hashPayload(artifact.payload);
37
+ yield* validateArtifactHash(artifact, actualHash);
38
+ yield* verifyEd25519Signature({
39
+ keyId: artifact.keyId,
40
+ message: canonicalizeContentArtifactSigningInput(artifact.artifactHash, artifact.payload),
41
+ signature: artifact.signature,
42
+ subject: "artifact",
43
+ });
44
+ yield* validateArtifactByteIntegrity(artifact);
45
+ yield* verifyCompiledContentSourceHash(artifact.payload);
46
+ return artifact;
47
+ });
48
+ }
49
+ /** Strictly authenticates artifact integrity without renderer compatibility. */
50
+ export const verifySignedContentArtifactIntegrity = Effect.fn("AksaraContracts.verifySignedContentArtifactIntegrity")((input) => Schema.decodeUnknownEffect(SignedContentArtifactSchema)(input, {
51
+ onExcessProperty: "error",
52
+ }).pipe(Effect.mapError(() => new ArtifactVerificationDecodeError({
53
+ message: "Artifact verification input does not satisfy its exact wire contract.",
54
+ })), Effect.flatMap(authenticateSignedArtifact)));
@@ -0,0 +1,26 @@
1
+ import { Effect } from "effect";
2
+ import { ArtifactCompiledByteLengthMismatchError, ArtifactPayloadFieldByteLimitError, ArtifactVerificationByteLimitError } from "#contracts/artifact/spec";
3
+ /** Verifies complete wire, declared bytes, and every bounded payload field. */
4
+ export declare const validateArtifactByteIntegrity: (artifact: {
5
+ readonly artifactHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
6
+ readonly keyId: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSigningKeyId">;
7
+ readonly payload: {
8
+ readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
9
+ readonly byteLength: number;
10
+ readonly compiledCode: string;
11
+ readonly compilerConfigHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
12
+ readonly compilerVersion: "0.1.0";
13
+ readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
14
+ readonly format: "mdx-function-body";
15
+ readonly mdxCompilerVersion: "3.1.1";
16
+ readonly plainText: string;
17
+ readonly rawMdx: string;
18
+ readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
19
+ readonly requiredComponents: readonly {
20
+ readonly name: string;
21
+ readonly version: number;
22
+ }[];
23
+ readonly sourceHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
24
+ };
25
+ readonly signature: string & import("effect/Brand").Brand<"@NakafaAI/AksaraEd25519Signature">;
26
+ }) => Effect.Effect<undefined, ArtifactCompiledByteLengthMismatchError | ArtifactPayloadFieldByteLimitError | ArtifactVerificationByteLimitError, never>;
@@ -0,0 +1,46 @@
1
+ import { Buffer } from "node:buffer";
2
+ import { Effect } from "effect";
3
+ import { ArtifactCompiledByteLengthMismatchError, ArtifactPayloadFieldByteLimitError, ArtifactVerificationByteLimitError, } from "#contracts/artifact/spec";
4
+ import { canonicalizeCompiledContentPayload, canonicalizeSignedContentArtifact, } from "#contracts/content";
5
+ import { MAX_CANONICAL_PAYLOAD_BYTES, MAX_COMPILED_CODE_BYTES, MAX_PLAIN_TEXT_BYTES, MAX_RAW_MDX_BYTES, MAX_SIGNED_ARTIFACT_BYTES, } from "#contracts/limits";
6
+ /** Rejects a complete signed artifact envelope above its wire ceiling. */
7
+ function enforceSignedWireLimit(artifact) {
8
+ const actualBytes = Buffer.byteLength(canonicalizeSignedContentArtifact(artifact), "utf8");
9
+ if (actualBytes <= MAX_SIGNED_ARTIFACT_BYTES) {
10
+ return Effect.void;
11
+ }
12
+ return Effect.fail(new ArtifactVerificationByteLimitError({
13
+ actualBytes,
14
+ maxBytes: MAX_SIGNED_ARTIFACT_BYTES,
15
+ }));
16
+ }
17
+ /** Rejects one authenticated payload field above its shared ceiling. */
18
+ function enforcePayloadFieldLimit(payload, field, value, maxBytes) {
19
+ const actualBytes = Buffer.byteLength(value, "utf8");
20
+ if (actualBytes <= maxBytes) {
21
+ return Effect.void;
22
+ }
23
+ return Effect.fail(new ArtifactPayloadFieldByteLimitError({
24
+ actualBytes,
25
+ contentKey: payload.contentKey,
26
+ field,
27
+ maxBytes,
28
+ }));
29
+ }
30
+ /** Verifies complete wire, declared bytes, and every bounded payload field. */
31
+ export const validateArtifactByteIntegrity = Effect.fn("AksaraContracts.validateArtifactByteIntegrity")(function* (artifact) {
32
+ yield* enforceSignedWireLimit(artifact);
33
+ const { payload } = artifact;
34
+ const compiledBytes = Buffer.byteLength(payload.compiledCode, "utf8");
35
+ if (payload.byteLength !== compiledBytes) {
36
+ return yield* new ArtifactCompiledByteLengthMismatchError({
37
+ actualBytes: compiledBytes,
38
+ contentKey: payload.contentKey,
39
+ declaredBytes: payload.byteLength,
40
+ });
41
+ }
42
+ yield* enforcePayloadFieldLimit(payload, "rawMdx", payload.rawMdx, MAX_RAW_MDX_BYTES);
43
+ yield* enforcePayloadFieldLimit(payload, "compiledCode", payload.compiledCode, MAX_COMPILED_CODE_BYTES);
44
+ yield* enforcePayloadFieldLimit(payload, "plainText", payload.plainText, MAX_PLAIN_TEXT_BYTES);
45
+ yield* enforcePayloadFieldLimit(payload, "canonicalPayload", canonicalizeCompiledContentPayload(payload), MAX_CANONICAL_PAYLOAD_BYTES);
46
+ });
@@ -0,0 +1,21 @@
1
+ import { Effect } from "effect";
2
+ import { ArtifactSourceHashComputationError, ArtifactSourceHashMismatchError } from "#contracts/artifact/spec";
3
+ /** Verifies that sourceHash identifies the complete authenticated raw MDX. */
4
+ export declare const verifyCompiledContentSourceHash: (payload: {
5
+ readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
6
+ readonly byteLength: number;
7
+ readonly compiledCode: string;
8
+ readonly compilerConfigHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
9
+ readonly compilerVersion: "0.1.0";
10
+ readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
11
+ readonly format: "mdx-function-body";
12
+ readonly mdxCompilerVersion: "3.1.1";
13
+ readonly plainText: string;
14
+ readonly rawMdx: string;
15
+ readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
16
+ readonly requiredComponents: readonly {
17
+ readonly name: string;
18
+ readonly version: number;
19
+ }[];
20
+ readonly sourceHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
21
+ }) => Effect.Effect<void, ArtifactSourceHashComputationError | ArtifactSourceHashMismatchError, never>;
@@ -0,0 +1,24 @@
1
+ import { createHash } from "node:crypto";
2
+ import { Effect } from "effect";
3
+ import { ArtifactSourceHashComputationError, ArtifactSourceHashMismatchError, } from "#contracts/artifact/spec";
4
+ import { Sha256HashSchema } from "#contracts/ids";
5
+ /** Computes the authenticated hash of the complete authored MDX source. */
6
+ function hashAuthoredSource(payload) {
7
+ return Effect.try({
8
+ catch: () => new ArtifactSourceHashComputationError({
9
+ contentKey: payload.contentKey,
10
+ }),
11
+ try: () => Sha256HashSchema.make(`sha256:${createHash("sha256").update(payload.rawMdx).digest("hex")}`),
12
+ });
13
+ }
14
+ /** Verifies that sourceHash identifies the complete authenticated raw MDX. */
15
+ export const verifyCompiledContentSourceHash = Effect.fn("AksaraContracts.verifyCompiledContentSourceHash")((payload) => hashAuthoredSource(payload).pipe(Effect.flatMap((actualHash) => {
16
+ if (actualHash === payload.sourceHash) {
17
+ return Effect.void;
18
+ }
19
+ return Effect.fail(new ArtifactSourceHashMismatchError({
20
+ actualHash,
21
+ contentKey: payload.contentKey,
22
+ expectedHash: payload.sourceHash,
23
+ }));
24
+ })));
@@ -0,0 +1,148 @@
1
+ import { Schema } from "effect";
2
+ /**
3
+ * Complete server-only input needed to authenticate one compiled artifact.
4
+ * `rendererContractVersion` comes from the active release because payloads do
5
+ * not duplicate that release-scoped value.
6
+ */
7
+ export declare const ArtifactVerificationRequestSchema: Schema.Struct<{
8
+ readonly artifact: Schema.Struct<{
9
+ readonly artifactHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
10
+ readonly keyId: Schema.brand<Schema.String, "@NakafaAI/AksaraSigningKeyId">;
11
+ readonly payload: Schema.Struct<{
12
+ readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
13
+ readonly byteLength: Schema.Finite;
14
+ readonly compiledCode: Schema.String;
15
+ readonly compilerConfigHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
16
+ readonly compilerVersion: Schema.Literal<"0.1.0">;
17
+ readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
18
+ readonly format: Schema.Literal<"mdx-function-body">;
19
+ readonly mdxCompilerVersion: Schema.Literal<"3.1.1">;
20
+ readonly plainText: Schema.String;
21
+ readonly rawMdx: Schema.String;
22
+ readonly rendererDomain: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
23
+ readonly requiredComponents: Schema.$Array<Schema.Struct<{
24
+ readonly name: Schema.String;
25
+ readonly version: Schema.Finite;
26
+ }>>;
27
+ readonly sourceHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
28
+ }>;
29
+ readonly signature: Schema.brand<Schema.String, "@NakafaAI/AksaraEd25519Signature">;
30
+ }>;
31
+ readonly rendererContractVersion: Schema.String;
32
+ readonly rendererManifest: Schema.Struct<{
33
+ readonly base: Schema.Struct<{
34
+ authoringComponents: Schema.$Array<Schema.Struct<{
35
+ readonly name: Schema.String;
36
+ readonly version: Schema.Finite;
37
+ }>>;
38
+ supportedComponents: Schema.$Array<Schema.Struct<{
39
+ readonly name: Schema.String;
40
+ readonly version: Schema.Finite;
41
+ }>>;
42
+ }>;
43
+ readonly domains: Schema.$Array<Schema.Struct<{
44
+ readonly authoringComponents: Schema.$Array<Schema.Struct<{
45
+ readonly name: Schema.String;
46
+ readonly version: Schema.Finite;
47
+ }>>;
48
+ readonly name: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
49
+ readonly supportedComponents: Schema.$Array<Schema.Struct<{
50
+ readonly name: Schema.String;
51
+ readonly version: Schema.Finite;
52
+ }>>;
53
+ }>>;
54
+ readonly format: Schema.Literal<"nakafa-mdx-renderer-v1">;
55
+ readonly hash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
56
+ readonly publishedDomains: Schema.$Array<Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>>;
57
+ readonly rendererContractVersion: Schema.Literal<"1.0.0">;
58
+ }>;
59
+ }>;
60
+ export type ArtifactVerificationRequest = typeof ArtifactVerificationRequestSchema.Type;
61
+ declare const ArtifactVerificationDecodeError_base: Schema.Class<ArtifactVerificationDecodeError, Schema.TaggedStruct<"ArtifactVerificationDecodeError", {
62
+ readonly message: Schema.Literal<"Artifact verification input does not satisfy its exact wire contract.">;
63
+ }>, import("effect/Cause").YieldableError>;
64
+ /** Unknown artifact input did not exactly satisfy the verification contract. */
65
+ export declare class ArtifactVerificationDecodeError extends ArtifactVerificationDecodeError_base {
66
+ }
67
+ declare const ArtifactVerificationByteLimitError_base: Schema.Class<ArtifactVerificationByteLimitError, Schema.TaggedStruct<"ArtifactVerificationByteLimitError", {
68
+ readonly actualBytes: Schema.Finite;
69
+ readonly maxBytes: Schema.Finite;
70
+ }>, import("effect/Cause").YieldableError>;
71
+ /** A signed artifact exceeded the canonical UTF-8 wire ceiling. */
72
+ export declare class ArtifactVerificationByteLimitError extends ArtifactVerificationByteLimitError_base {
73
+ }
74
+ declare const ArtifactCompiledByteLengthMismatchError_base: Schema.Class<ArtifactCompiledByteLengthMismatchError, Schema.TaggedStruct<"ArtifactCompiledByteLengthMismatchError", {
75
+ readonly actualBytes: Schema.Finite;
76
+ readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
77
+ readonly declaredBytes: Schema.Finite;
78
+ }>, import("effect/Cause").YieldableError>;
79
+ /** Declared compiled bytes differ from the authenticated function body. */
80
+ export declare class ArtifactCompiledByteLengthMismatchError extends ArtifactCompiledByteLengthMismatchError_base {
81
+ }
82
+ declare const ArtifactPayloadFieldByteLimitError_base: Schema.Class<ArtifactPayloadFieldByteLimitError, Schema.TaggedStruct<"ArtifactPayloadFieldByteLimitError", {
83
+ readonly actualBytes: Schema.Finite;
84
+ readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
85
+ readonly field: Schema.Literals<readonly ["rawMdx", "compiledCode", "plainText", "canonicalPayload"]>;
86
+ readonly maxBytes: Schema.Finite;
87
+ }>, import("effect/Cause").YieldableError>;
88
+ /** One authenticated payload field exceeded its shared runtime ceiling. */
89
+ export declare class ArtifactPayloadFieldByteLimitError extends ArtifactPayloadFieldByteLimitError_base {
90
+ }
91
+ declare const ArtifactHashComputationError_base: Schema.Class<ArtifactHashComputationError, Schema.TaggedStruct<"ArtifactHashComputationError", {
92
+ readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
93
+ }>, import("effect/Cause").YieldableError>;
94
+ /** SHA-256 computation failed before authenticity could be established. */
95
+ export declare class ArtifactHashComputationError extends ArtifactHashComputationError_base {
96
+ }
97
+ declare const ArtifactHashMismatchError_base: Schema.Class<ArtifactHashMismatchError, Schema.TaggedStruct<"ArtifactHashMismatchError", {
98
+ readonly actualHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
99
+ readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
100
+ readonly expectedHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
101
+ }>, import("effect/Cause").YieldableError>;
102
+ /** The signed artifact hash does not identify its canonical payload. */
103
+ export declare class ArtifactHashMismatchError extends ArtifactHashMismatchError_base {
104
+ }
105
+ declare const ArtifactSourceHashComputationError_base: Schema.Class<ArtifactSourceHashComputationError, Schema.TaggedStruct<"ArtifactSourceHashComputationError", {
106
+ readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
107
+ }>, import("effect/Cause").YieldableError>;
108
+ /** SHA-256 could not be calculated for the authenticated authored source. */
109
+ export declare class ArtifactSourceHashComputationError extends ArtifactSourceHashComputationError_base {
110
+ }
111
+ declare const ArtifactSourceHashMismatchError_base: Schema.Class<ArtifactSourceHashMismatchError, Schema.TaggedStruct<"ArtifactSourceHashMismatchError", {
112
+ readonly actualHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
113
+ readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
114
+ readonly expectedHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
115
+ }>, import("effect/Cause").YieldableError>;
116
+ /** The authenticated source hash does not identify the complete raw MDX. */
117
+ export declare class ArtifactSourceHashMismatchError extends ArtifactSourceHashMismatchError_base {
118
+ }
119
+ declare const RendererContractVersionMismatchError_base: Schema.Class<RendererContractVersionMismatchError, Schema.TaggedStruct<"RendererContractVersionMismatchError", {
120
+ readonly actualVersion: Schema.String;
121
+ readonly expectedVersion: Schema.String;
122
+ }>, import("effect/Cause").YieldableError>;
123
+ /** The runtime and hash-validated renderer envelope disagree globally. */
124
+ export declare class RendererContractVersionMismatchError extends RendererContractVersionMismatchError_base {
125
+ }
126
+ declare const ArtifactRendererComponentMissingError_base: Schema.Class<ArtifactRendererComponentMissingError, Schema.TaggedStruct<"ArtifactRendererComponentMissingError", {
127
+ readonly componentName: Schema.String;
128
+ readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
129
+ }>, import("effect/Cause").YieldableError>;
130
+ /** A custom component required by the artifact is absent from the renderer. */
131
+ export declare class ArtifactRendererComponentMissingError extends ArtifactRendererComponentMissingError_base {
132
+ }
133
+ declare const ArtifactRendererVersionUnsupportedError_base: Schema.Class<ArtifactRendererVersionUnsupportedError, Schema.TaggedStruct<"ArtifactRendererVersionUnsupportedError", {
134
+ readonly componentName: Schema.String;
135
+ readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
136
+ readonly requiredVersion: Schema.Finite;
137
+ }>, import("effect/Cause").YieldableError>;
138
+ /** The renderer does not implement the exact required component version. */
139
+ export declare class ArtifactRendererVersionUnsupportedError extends ArtifactRendererVersionUnsupportedError_base {
140
+ }
141
+ declare const ArtifactRendererDomainUnpublishedError_base: Schema.Class<ArtifactRendererDomainUnpublishedError, Schema.TaggedStruct<"ArtifactRendererDomainUnpublishedError", {
142
+ readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
143
+ readonly rendererDomain: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
144
+ }>, import("effect/Cause").YieldableError>;
145
+ /** The deployed Nakafa app cannot route this artifact's renderer domain. */
146
+ export declare class ArtifactRendererDomainUnpublishedError extends ArtifactRendererDomainUnpublishedError_base {
147
+ }
148
+ export {};