@elaraai/east 1.0.79 → 1.0.80

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 (276) hide show
  1. package/README.md +1 -1
  2. package/dist/src/comparison.d.ts.map +1 -1
  3. package/dist/src/comparison.js +4 -5
  4. package/dist/src/comparison.js.map +1 -1
  5. package/dist/src/compile/builtins/array.d.ts +59 -0
  6. package/dist/src/compile/builtins/array.d.ts.map +1 -0
  7. package/dist/src/compile/builtins/array.js +656 -0
  8. package/dist/src/compile/builtins/array.js.map +1 -0
  9. package/dist/src/compile/builtins/blob.d.ts +18 -0
  10. package/dist/src/compile/builtins/blob.d.ts.map +1 -0
  11. package/dist/src/compile/builtins/blob.js +150 -0
  12. package/dist/src/compile/builtins/blob.js.map +1 -0
  13. package/dist/src/compile/builtins/compare.d.ts +18 -0
  14. package/dist/src/compile/builtins/compare.d.ts.map +1 -0
  15. package/dist/src/compile/builtins/compare.js +52 -0
  16. package/dist/src/compile/builtins/compare.js.map +1 -0
  17. package/dist/src/compile/builtins/datetime.d.ts +21 -0
  18. package/dist/src/compile/builtins/datetime.d.ts.map +1 -0
  19. package/dist/src/compile/builtins/datetime.js +46 -0
  20. package/dist/src/compile/builtins/datetime.js.map +1 -0
  21. package/dist/src/compile/builtins/dict.d.ts +46 -0
  22. package/dist/src/compile/builtins/dict.d.ts.map +1 -0
  23. package/dist/src/compile/builtins/dict.js +551 -0
  24. package/dist/src/compile/builtins/dict.js.map +1 -0
  25. package/dist/src/compile/builtins/index.d.ts +9 -0
  26. package/dist/src/compile/builtins/index.d.ts.map +1 -0
  27. package/dist/src/compile/builtins/index.js +28 -0
  28. package/dist/src/compile/builtins/index.js.map +1 -0
  29. package/dist/src/compile/builtins/matrix.d.ts +31 -0
  30. package/dist/src/compile/builtins/matrix.d.ts.map +1 -0
  31. package/dist/src/compile/builtins/matrix.js +310 -0
  32. package/dist/src/compile/builtins/matrix.js.map +1 -0
  33. package/dist/src/compile/builtins/primitives.d.ts +36 -0
  34. package/dist/src/compile/builtins/primitives.d.ts.map +1 -0
  35. package/dist/src/compile/builtins/primitives.js +67 -0
  36. package/dist/src/compile/builtins/primitives.js.map +1 -0
  37. package/dist/src/compile/builtins/ref.d.ts +11 -0
  38. package/dist/src/compile/builtins/ref.d.ts.map +1 -0
  39. package/dist/src/compile/builtins/ref.js +30 -0
  40. package/dist/src/compile/builtins/ref.js.map +1 -0
  41. package/dist/src/compile/builtins/set.d.ts +41 -0
  42. package/dist/src/compile/builtins/set.d.ts.map +1 -0
  43. package/dist/src/compile/builtins/set.js +385 -0
  44. package/dist/src/compile/builtins/set.js.map +1 -0
  45. package/dist/src/compile/builtins/sparse.d.ts +19 -0
  46. package/dist/src/compile/builtins/sparse.d.ts.map +1 -0
  47. package/dist/src/compile/builtins/sparse.js +143 -0
  48. package/dist/src/compile/builtins/sparse.js.map +1 -0
  49. package/dist/src/compile/builtins/string.d.ts +34 -0
  50. package/dist/src/compile/builtins/string.d.ts.map +1 -0
  51. package/dist/src/compile/builtins/string.js +238 -0
  52. package/dist/src/compile/builtins/string.js.map +1 -0
  53. package/dist/src/compile/builtins/vector.d.ts +44 -0
  54. package/dist/src/compile/builtins/vector.d.ts.map +1 -0
  55. package/dist/src/compile/builtins/vector.js +463 -0
  56. package/dist/src/compile/builtins/vector.js.map +1 -0
  57. package/dist/src/compile/constructors.d.ts +13 -0
  58. package/dist/src/compile/constructors.d.ts.map +1 -0
  59. package/dist/src/compile/constructors.js +179 -0
  60. package/dist/src/compile/constructors.js.map +1 -0
  61. package/dist/src/compile/control.d.ts +13 -0
  62. package/dist/src/compile/control.d.ts.map +1 -0
  63. package/dist/src/compile/control.js +513 -0
  64. package/dist/src/compile/control.js.map +1 -0
  65. package/dist/src/compile/functions.d.ts +13 -0
  66. package/dist/src/compile/functions.d.ts.map +1 -0
  67. package/dist/src/compile/functions.js +492 -0
  68. package/dist/src/compile/functions.js.map +1 -0
  69. package/dist/src/compile/ir.d.ts +19 -0
  70. package/dist/src/compile/ir.d.ts.map +1 -0
  71. package/dist/src/compile/ir.js +193 -0
  72. package/dist/src/compile/ir.js.map +1 -0
  73. package/dist/src/compile/runtime.d.ts +78 -0
  74. package/dist/src/compile/runtime.d.ts.map +1 -0
  75. package/dist/src/compile/runtime.js +111 -0
  76. package/dist/src/compile/runtime.js.map +1 -0
  77. package/dist/src/compile/type_parameters.d.ts +4 -0
  78. package/dist/src/compile/type_parameters.d.ts.map +1 -0
  79. package/dist/src/compile/type_parameters.js +55 -0
  80. package/dist/src/compile/type_parameters.js.map +1 -0
  81. package/dist/src/compile/typed_arrays.d.ts +28 -0
  82. package/dist/src/compile/typed_arrays.d.ts.map +1 -0
  83. package/dist/src/compile/typed_arrays.js +77 -0
  84. package/dist/src/compile/typed_arrays.js.map +1 -0
  85. package/dist/src/compile.d.ts +6 -41
  86. package/dist/src/compile.d.ts.map +1 -1
  87. package/dist/src/compile.js +8 -4415
  88. package/dist/src/compile.js.map +1 -1
  89. package/dist/src/compile.open_beast.spec.js +5 -4
  90. package/dist/src/compile.open_beast.spec.js.map +1 -1
  91. package/dist/src/containers/sortedmap.d.ts +2 -1
  92. package/dist/src/containers/sortedmap.d.ts.map +1 -1
  93. package/dist/src/containers/sortedmap.js +4 -2
  94. package/dist/src/containers/sortedmap.js.map +1 -1
  95. package/dist/src/containers/sortedset.d.ts +2 -1
  96. package/dist/src/containers/sortedset.d.ts.map +1 -1
  97. package/dist/src/containers/sortedset.js +4 -2
  98. package/dist/src/containers/sortedset.js.map +1 -1
  99. package/dist/src/error.d.ts +15 -0
  100. package/dist/src/error.d.ts.map +1 -1
  101. package/dist/src/error.js +16 -0
  102. package/dist/src/error.js.map +1 -1
  103. package/dist/src/index.d.ts +1 -0
  104. package/dist/src/index.d.ts.map +1 -1
  105. package/dist/src/index.js +1 -0
  106. package/dist/src/index.js.map +1 -1
  107. package/dist/src/patch/index.d.ts +1 -1
  108. package/dist/src/patch/index.d.ts.map +1 -1
  109. package/dist/src/patch/index.js +1 -1
  110. package/dist/src/patch/index.js.map +1 -1
  111. package/dist/src/patch/type_of_patch.d.ts +25 -1
  112. package/dist/src/patch/type_of_patch.d.ts.map +1 -1
  113. package/dist/src/patch/type_of_patch.js +33 -10
  114. package/dist/src/patch/type_of_patch.js.map +1 -1
  115. package/dist/src/platform.spec.js +19 -1
  116. package/dist/src/platform.spec.js.map +1 -1
  117. package/dist/src/runner_protocol.d.ts +316 -0
  118. package/dist/src/runner_protocol.d.ts.map +1 -0
  119. package/dist/src/runner_protocol.js +135 -0
  120. package/dist/src/runner_protocol.js.map +1 -0
  121. package/dist/src/serialization/beast2/index.d.ts +21 -5
  122. package/dist/src/serialization/beast2/index.d.ts.map +1 -1
  123. package/dist/src/serialization/beast2/index.js +12 -2
  124. package/dist/src/serialization/beast2/index.js.map +1 -1
  125. package/dist/src/serialization/beast2/index.spec.js +84 -3
  126. package/dist/src/serialization/beast2/index.spec.js.map +1 -1
  127. package/dist/src/serialization/beast2/shared.d.ts +32 -3
  128. package/dist/src/serialization/beast2/shared.d.ts.map +1 -1
  129. package/dist/src/serialization/beast2/shared.js +135 -10
  130. package/dist/src/serialization/beast2/shared.js.map +1 -1
  131. package/dist/src/serialization/beast2/v4/container.d.ts.map +1 -1
  132. package/dist/src/serialization/beast2/v4/container.js +5 -3
  133. package/dist/src/serialization/beast2/v4/container.js.map +1 -1
  134. package/dist/src/serialization/beast2/v5/aliasing.spec.d.ts +6 -0
  135. package/dist/src/serialization/beast2/v5/aliasing.spec.d.ts.map +1 -0
  136. package/dist/src/serialization/beast2/v5/aliasing.spec.js +75 -0
  137. package/dist/src/serialization/beast2/v5/aliasing.spec.js.map +1 -0
  138. package/dist/src/serialization/beast2/v5/boundary.d.ts +176 -0
  139. package/dist/src/serialization/beast2/v5/boundary.d.ts.map +1 -0
  140. package/dist/src/serialization/beast2/v5/boundary.js +297 -0
  141. package/dist/src/serialization/beast2/v5/boundary.js.map +1 -0
  142. package/dist/src/serialization/beast2/v5/boundary.spec.d.ts +6 -0
  143. package/dist/src/serialization/beast2/v5/boundary.spec.d.ts.map +1 -0
  144. package/dist/src/serialization/beast2/v5/boundary.spec.js +479 -0
  145. package/dist/src/serialization/beast2/v5/boundary.spec.js.map +1 -0
  146. package/dist/src/serialization/beast2/v5/codec.d.ts +6 -5
  147. package/dist/src/serialization/beast2/v5/codec.d.ts.map +1 -1
  148. package/dist/src/serialization/beast2/v5/codec.js +18 -3
  149. package/dist/src/serialization/beast2/v5/codec.js.map +1 -1
  150. package/dist/src/serialization/beast2/v5/deflate.d.ts +24 -2
  151. package/dist/src/serialization/beast2/v5/deflate.d.ts.map +1 -1
  152. package/dist/src/serialization/beast2/v5/deflate.js +47 -12
  153. package/dist/src/serialization/beast2/v5/deflate.js.map +1 -1
  154. package/dist/src/serialization/beast2/v5/deflate.spec.js +15 -1
  155. package/dist/src/serialization/beast2/v5/deflate.spec.js.map +1 -1
  156. package/dist/src/serialization/beast2/v5/elements.d.ts +64 -0
  157. package/dist/src/serialization/beast2/v5/elements.d.ts.map +1 -0
  158. package/dist/src/serialization/beast2/v5/elements.js +320 -0
  159. package/dist/src/serialization/beast2/v5/elements.js.map +1 -0
  160. package/dist/src/serialization/beast2/v5/elements.spec.d.ts +6 -0
  161. package/dist/src/serialization/beast2/v5/elements.spec.d.ts.map +1 -0
  162. package/dist/src/serialization/beast2/v5/elements.spec.js +161 -0
  163. package/dist/src/serialization/beast2/v5/elements.spec.js.map +1 -0
  164. package/dist/src/serialization/beast2/v5/frame-pool.d.ts +62 -21
  165. package/dist/src/serialization/beast2/v5/frame-pool.d.ts.map +1 -1
  166. package/dist/src/serialization/beast2/v5/frame-pool.js +138 -27
  167. package/dist/src/serialization/beast2/v5/frame-pool.js.map +1 -1
  168. package/dist/src/serialization/beast2/v5/frame-pool.spec.js +198 -71
  169. package/dist/src/serialization/beast2/v5/frame-pool.spec.js.map +1 -1
  170. package/dist/src/serialization/beast2/v5/frame-worker.js +25 -15
  171. package/dist/src/serialization/beast2/v5/frame-worker.js.map +1 -1
  172. package/dist/src/serialization/beast2/v5/frames.d.ts +22 -12
  173. package/dist/src/serialization/beast2/v5/frames.d.ts.map +1 -1
  174. package/dist/src/serialization/beast2/v5/frames.js +52 -27
  175. package/dist/src/serialization/beast2/v5/frames.js.map +1 -1
  176. package/dist/src/serialization/beast2/v5/geometry.d.ts +38 -1
  177. package/dist/src/serialization/beast2/v5/geometry.d.ts.map +1 -1
  178. package/dist/src/serialization/beast2/v5/geometry.js +73 -1
  179. package/dist/src/serialization/beast2/v5/geometry.js.map +1 -1
  180. package/dist/src/serialization/beast2/v5/geometry.spec.js +34 -23
  181. package/dist/src/serialization/beast2/v5/geometry.spec.js.map +1 -1
  182. package/dist/src/serialization/beast2/v5/index.spec.js +32 -28
  183. package/dist/src/serialization/beast2/v5/index.spec.js.map +1 -1
  184. package/dist/src/serialization/beast2/v5/lazy.d.ts +42 -1
  185. package/dist/src/serialization/beast2/v5/lazy.d.ts.map +1 -1
  186. package/dist/src/serialization/beast2/v5/lazy.js +143 -28
  187. package/dist/src/serialization/beast2/v5/lazy.js.map +1 -1
  188. package/dist/src/serialization/beast2/v5/lazy.spec.js +102 -24
  189. package/dist/src/serialization/beast2/v5/lazy.spec.js.map +1 -1
  190. package/dist/src/serialization/beast2/v5/manifest-writer.d.ts +110 -0
  191. package/dist/src/serialization/beast2/v5/manifest-writer.d.ts.map +1 -0
  192. package/dist/src/serialization/beast2/v5/manifest-writer.js +118 -0
  193. package/dist/src/serialization/beast2/v5/manifest-writer.js.map +1 -0
  194. package/dist/src/serialization/beast2/v5/manifest-writer.spec.d.ts +6 -0
  195. package/dist/src/serialization/beast2/v5/manifest-writer.spec.d.ts.map +1 -0
  196. package/dist/src/serialization/beast2/v5/manifest-writer.spec.js +207 -0
  197. package/dist/src/serialization/beast2/v5/manifest-writer.spec.js.map +1 -0
  198. package/dist/src/serialization/beast2/v5/manifest.d.ts +241 -0
  199. package/dist/src/serialization/beast2/v5/manifest.d.ts.map +1 -0
  200. package/dist/src/serialization/beast2/v5/manifest.js +233 -0
  201. package/dist/src/serialization/beast2/v5/manifest.js.map +1 -0
  202. package/dist/src/serialization/beast2/v5/merge.d.ts +93 -0
  203. package/dist/src/serialization/beast2/v5/merge.d.ts.map +1 -0
  204. package/dist/src/serialization/beast2/v5/merge.js +202 -0
  205. package/dist/src/serialization/beast2/v5/merge.js.map +1 -0
  206. package/dist/src/serialization/beast2/v5/merge.spec.d.ts +6 -0
  207. package/dist/src/serialization/beast2/v5/merge.spec.d.ts.map +1 -0
  208. package/dist/src/serialization/beast2/v5/merge.spec.js +118 -0
  209. package/dist/src/serialization/beast2/v5/merge.spec.js.map +1 -0
  210. package/dist/src/serialization/beast2/v5/recut.d.ts +143 -0
  211. package/dist/src/serialization/beast2/v5/recut.d.ts.map +1 -0
  212. package/dist/src/serialization/beast2/v5/recut.js +365 -0
  213. package/dist/src/serialization/beast2/v5/recut.js.map +1 -0
  214. package/dist/src/serialization/beast2/v5/recut.spec.d.ts +6 -0
  215. package/dist/src/serialization/beast2/v5/recut.spec.d.ts.map +1 -0
  216. package/dist/src/serialization/beast2/v5/recut.spec.js +215 -0
  217. package/dist/src/serialization/beast2/v5/recut.spec.js.map +1 -0
  218. package/dist/src/serialization/beast2/v5/runs.d.ts +148 -0
  219. package/dist/src/serialization/beast2/v5/runs.d.ts.map +1 -0
  220. package/dist/src/serialization/beast2/v5/runs.js +260 -0
  221. package/dist/src/serialization/beast2/v5/runs.js.map +1 -0
  222. package/dist/src/serialization/beast2/v5/runs.spec.d.ts +6 -0
  223. package/dist/src/serialization/beast2/v5/runs.spec.d.ts.map +1 -0
  224. package/dist/src/serialization/beast2/v5/runs.spec.js +182 -0
  225. package/dist/src/serialization/beast2/v5/runs.spec.js.map +1 -0
  226. package/dist/src/serialization/beast2/v5/sha256.d.ts +19 -0
  227. package/dist/src/serialization/beast2/v5/sha256.d.ts.map +1 -0
  228. package/dist/src/serialization/beast2/v5/sha256.js +103 -0
  229. package/dist/src/serialization/beast2/v5/sha256.js.map +1 -0
  230. package/dist/src/serialization/beast2/v5/sha256.spec.d.ts +6 -0
  231. package/dist/src/serialization/beast2/v5/sha256.spec.d.ts.map +1 -0
  232. package/dist/src/serialization/beast2/v5/sha256.spec.js +42 -0
  233. package/dist/src/serialization/beast2/v5/sha256.spec.js.map +1 -0
  234. package/dist/src/serialization/beast2/v5/stream.d.ts +273 -86
  235. package/dist/src/serialization/beast2/v5/stream.d.ts.map +1 -1
  236. package/dist/src/serialization/beast2/v5/stream.js +576 -244
  237. package/dist/src/serialization/beast2/v5/stream.js.map +1 -1
  238. package/dist/src/serialization/beast2/v5/sync-reader.spec.js +24 -10
  239. package/dist/src/serialization/beast2/v5/sync-reader.spec.js.map +1 -1
  240. package/dist/src/serialization/index.d.ts +1 -1
  241. package/dist/src/serialization/index.d.ts.map +1 -1
  242. package/dist/src/serialization/index.js +1 -1
  243. package/dist/src/serialization/index.js.map +1 -1
  244. package/dist/src/serialization/json.d.ts +28 -0
  245. package/dist/src/serialization/json.d.ts.map +1 -1
  246. package/dist/src/serialization/json.js +141 -30
  247. package/dist/src/serialization/json.js.map +1 -1
  248. package/dist/src/serialization/json.spec.js +47 -2
  249. package/dist/src/serialization/json.spec.js.map +1 -1
  250. package/dist/src/serialization/json_schema.d.ts +15 -11
  251. package/dist/src/serialization/json_schema.d.ts.map +1 -1
  252. package/dist/src/serialization/json_schema.js +21 -36
  253. package/dist/src/serialization/json_schema.js.map +1 -1
  254. package/dist/src/serialization/json_schema.spec.js +26 -32
  255. package/dist/src/serialization/json_schema.spec.js.map +1 -1
  256. package/dist/src/serialization/json_schema_to_type.d.ts +10 -5
  257. package/dist/src/serialization/json_schema_to_type.d.ts.map +1 -1
  258. package/dist/src/serialization/json_schema_to_type.js +13 -6
  259. package/dist/src/serialization/json_schema_to_type.js.map +1 -1
  260. package/dist/src/serialization/json_schema_to_type.spec.js +19 -0
  261. package/dist/src/serialization/json_schema_to_type.spec.js.map +1 -1
  262. package/dist/src/string_order.d.ts +36 -0
  263. package/dist/src/string_order.d.ts.map +1 -0
  264. package/dist/src/string_order.js +64 -0
  265. package/dist/src/string_order.js.map +1 -0
  266. package/dist/src/string_order.spec.d.ts +6 -0
  267. package/dist/src/string_order.spec.d.ts.map +1 -0
  268. package/dist/src/string_order.spec.js +79 -0
  269. package/dist/src/string_order.spec.js.map +1 -0
  270. package/dist/src/type_of_type.d.ts +17 -0
  271. package/dist/src/type_of_type.d.ts.map +1 -1
  272. package/dist/src/type_of_type.js +66 -0
  273. package/dist/src/type_of_type.js.map +1 -1
  274. package/dist/src/type_of_type.to_etv.spec.js +69 -1
  275. package/dist/src/type_of_type.to_etv.spec.js.map +1 -1
  276. package/package.json +1 -1
@@ -0,0 +1,316 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * The runner protocol: the one unit of work every stock runner executes for a
7
+ * machine, and the result it reports.
8
+ *
9
+ * `east-node exec <unit.beast2>`, `east-c exec …` and `east-py exec …` read a
10
+ * {@link UnitType} blob, do its work, and write a {@link UnitResultType} blob
11
+ * where the unit says. A unit either runs a program, writing what it produces
12
+ * by the kind of output it makes, or merges parts of one output kind that
13
+ * earlier units wrote. Everything a unit needs is named by path, and a relative
14
+ * path is relative to the unit file, so a unit file and the files it names are
15
+ * a complete, replayable snapshot of the work.
16
+ *
17
+ * The types live here, beside the collection layer, because every runner and
18
+ * the platform that schedules them read them; east-c declares the same types
19
+ * in C, and the conformance corpus pins that all three runners agree.
20
+ */
21
+ import { ArrayType, FloatType, IntegerType, NullType, OptionType, StringType, StructType, VariantType, type ValueTypeOf } from "./types.js";
22
+ /**
23
+ * Where a unit's output goes, by the kind of output it is.
24
+ *
25
+ * @remarks
26
+ * A `value` is what a program returns. Every other kind is emitted: the
27
+ * program's trailing parameter is `emit`, whose signature the kind fixes — `(T)
28
+ * -> Null`, or `(K, V) -> Null` for a dict — and the parts it emits combine the
29
+ * way the kind says, whichever unit emitted them.
30
+ */
31
+ export declare const UnitOutputType: VariantType<{
32
+ /** The program's result, written to this file: a collection as a manifest
33
+ * directory there, anything else as one blob. */
34
+ readonly value: StringType;
35
+ /** Elements emitted in order, written through the Writer as the manifest
36
+ * directory `<dir>/0.beast2`. */
37
+ readonly array: StringType;
38
+ /** Elements emitted in any order, written through the RunSorter as sorted
39
+ * runs, each the manifest directory `<dir>/<n>.beast2`, numbered from 0 in
40
+ * the order the runs close. Equal elements collapse. */
41
+ readonly set: StringType;
42
+ /** Entries emitted in any order, written as runs like a set's. Equal keys
43
+ * fold with `merge`, an IR file of a `(K, V, V) -> V` function, in the order
44
+ * they were emitted; without it a repeated key is refused. */
45
+ readonly dict: StructType<{
46
+ readonly dir: StringType;
47
+ readonly merge: OptionType<StringType>;
48
+ }>;
49
+ /** Emitted values folded with `combine`, an IR file of a `(T, T) -> T`
50
+ * function, starting at `zero`, a file holding a value; the result is
51
+ * written to `path` as a `value` is. */
52
+ readonly fold: StructType<{
53
+ readonly path: StringType;
54
+ readonly zero: StringType;
55
+ readonly combine: StringType;
56
+ }>;
57
+ }>;
58
+ export type UnitOutputType = typeof UnitOutputType;
59
+ export type UnitOutput = ValueTypeOf<typeof UnitOutputType>;
60
+ /** What a unit does. */
61
+ export declare const UnitWorkType: VariantType<{
62
+ /** Evaluate `program`, an IR file, on `inputs`, one file per parameter —
63
+ * a blob or a manifest directory — and write `output`. */
64
+ readonly run: StructType<{
65
+ readonly program: StringType;
66
+ readonly inputs: ArrayType<StringType>;
67
+ readonly output: VariantType<{
68
+ /** The program's result, written to this file: a collection as a manifest
69
+ * directory there, anything else as one blob. */
70
+ readonly value: StringType;
71
+ /** Elements emitted in order, written through the Writer as the manifest
72
+ * directory `<dir>/0.beast2`. */
73
+ readonly array: StringType;
74
+ /** Elements emitted in any order, written through the RunSorter as sorted
75
+ * runs, each the manifest directory `<dir>/<n>.beast2`, numbered from 0 in
76
+ * the order the runs close. Equal elements collapse. */
77
+ readonly set: StringType;
78
+ /** Entries emitted in any order, written as runs like a set's. Equal keys
79
+ * fold with `merge`, an IR file of a `(K, V, V) -> V` function, in the order
80
+ * they were emitted; without it a repeated key is refused. */
81
+ readonly dict: StructType<{
82
+ readonly dir: StringType;
83
+ readonly merge: OptionType<StringType>;
84
+ }>;
85
+ /** Emitted values folded with `combine`, an IR file of a `(T, T) -> T`
86
+ * function, starting at `zero`, a file holding a value; the result is
87
+ * written to `path` as a `value` is. */
88
+ readonly fold: StructType<{
89
+ readonly path: StringType;
90
+ readonly zero: StringType;
91
+ readonly combine: StringType;
92
+ }>;
93
+ }>;
94
+ }>;
95
+ /**
96
+ * Assemble `parts` of one output kind into one: sorted set or dict runs
97
+ * merged into one run, `<dir>/0.beast2`, with a key that several parts hold
98
+ * collapsed or folded in part order; or fold partials folded in order,
99
+ * starting at `zero`. `range` is a file holding `{from: Option<K>, to:
100
+ * Option<K>}` over the parts' key type, and limits the merge to the keys in
101
+ * `[from, to)`. An array's parts never need a unit, and a value has none.
102
+ */
103
+ readonly merge: StructType<{
104
+ readonly parts: ArrayType<StringType>;
105
+ readonly range: OptionType<StringType>;
106
+ readonly output: VariantType<{
107
+ /** The program's result, written to this file: a collection as a manifest
108
+ * directory there, anything else as one blob. */
109
+ readonly value: StringType;
110
+ /** Elements emitted in order, written through the Writer as the manifest
111
+ * directory `<dir>/0.beast2`. */
112
+ readonly array: StringType;
113
+ /** Elements emitted in any order, written through the RunSorter as sorted
114
+ * runs, each the manifest directory `<dir>/<n>.beast2`, numbered from 0 in
115
+ * the order the runs close. Equal elements collapse. */
116
+ readonly set: StringType;
117
+ /** Entries emitted in any order, written as runs like a set's. Equal keys
118
+ * fold with `merge`, an IR file of a `(K, V, V) -> V` function, in the order
119
+ * they were emitted; without it a repeated key is refused. */
120
+ readonly dict: StructType<{
121
+ readonly dir: StringType;
122
+ readonly merge: OptionType<StringType>;
123
+ }>;
124
+ /** Emitted values folded with `combine`, an IR file of a `(T, T) -> T`
125
+ * function, starting at `zero`, a file holding a value; the result is
126
+ * written to `path` as a `value` is. */
127
+ readonly fold: StructType<{
128
+ readonly path: StringType;
129
+ readonly zero: StringType;
130
+ readonly combine: StringType;
131
+ }>;
132
+ }>;
133
+ }>;
134
+ }>;
135
+ export type UnitWorkType = typeof UnitWorkType;
136
+ export type UnitWork = ValueTypeOf<typeof UnitWorkType>;
137
+ /**
138
+ * A unit of work for a runner: what `exec` reads.
139
+ *
140
+ * @example
141
+ * ```ts
142
+ * const unit: Unit = {
143
+ * work: variant("run", {
144
+ * program: "program.beast2",
145
+ * inputs: ["sales.beast2"],
146
+ * output: variant("dict", { dir: "out", merge: some("add.beast2") }),
147
+ * }),
148
+ * platforms: [],
149
+ * threads: 1n,
150
+ * result: "result.beast2",
151
+ * };
152
+ * writeFileSync("unit.beast2", encodeBeast2For(UnitType)(unit));
153
+ * // east-node exec unit.beast2
154
+ * ```
155
+ */
156
+ export declare const UnitType: StructType<{
157
+ /** The work. */
158
+ readonly work: VariantType<{
159
+ /** Evaluate `program`, an IR file, on `inputs`, one file per parameter —
160
+ * a blob or a manifest directory — and write `output`. */
161
+ readonly run: StructType<{
162
+ readonly program: StringType;
163
+ readonly inputs: ArrayType<StringType>;
164
+ readonly output: VariantType<{
165
+ /** The program's result, written to this file: a collection as a manifest
166
+ * directory there, anything else as one blob. */
167
+ readonly value: StringType;
168
+ /** Elements emitted in order, written through the Writer as the manifest
169
+ * directory `<dir>/0.beast2`. */
170
+ readonly array: StringType;
171
+ /** Elements emitted in any order, written through the RunSorter as sorted
172
+ * runs, each the manifest directory `<dir>/<n>.beast2`, numbered from 0 in
173
+ * the order the runs close. Equal elements collapse. */
174
+ readonly set: StringType;
175
+ /** Entries emitted in any order, written as runs like a set's. Equal keys
176
+ * fold with `merge`, an IR file of a `(K, V, V) -> V` function, in the order
177
+ * they were emitted; without it a repeated key is refused. */
178
+ readonly dict: StructType<{
179
+ readonly dir: StringType;
180
+ readonly merge: OptionType<StringType>;
181
+ }>;
182
+ /** Emitted values folded with `combine`, an IR file of a `(T, T) -> T`
183
+ * function, starting at `zero`, a file holding a value; the result is
184
+ * written to `path` as a `value` is. */
185
+ readonly fold: StructType<{
186
+ readonly path: StringType;
187
+ readonly zero: StringType;
188
+ readonly combine: StringType;
189
+ }>;
190
+ }>;
191
+ }>;
192
+ /**
193
+ * Assemble `parts` of one output kind into one: sorted set or dict runs
194
+ * merged into one run, `<dir>/0.beast2`, with a key that several parts hold
195
+ * collapsed or folded in part order; or fold partials folded in order,
196
+ * starting at `zero`. `range` is a file holding `{from: Option<K>, to:
197
+ * Option<K>}` over the parts' key type, and limits the merge to the keys in
198
+ * `[from, to)`. An array's parts never need a unit, and a value has none.
199
+ */
200
+ readonly merge: StructType<{
201
+ readonly parts: ArrayType<StringType>;
202
+ readonly range: OptionType<StringType>;
203
+ readonly output: VariantType<{
204
+ /** The program's result, written to this file: a collection as a manifest
205
+ * directory there, anything else as one blob. */
206
+ readonly value: StringType;
207
+ /** Elements emitted in order, written through the Writer as the manifest
208
+ * directory `<dir>/0.beast2`. */
209
+ readonly array: StringType;
210
+ /** Elements emitted in any order, written through the RunSorter as sorted
211
+ * runs, each the manifest directory `<dir>/<n>.beast2`, numbered from 0 in
212
+ * the order the runs close. Equal elements collapse. */
213
+ readonly set: StringType;
214
+ /** Entries emitted in any order, written as runs like a set's. Equal keys
215
+ * fold with `merge`, an IR file of a `(K, V, V) -> V` function, in the order
216
+ * they were emitted; without it a repeated key is refused. */
217
+ readonly dict: StructType<{
218
+ readonly dir: StringType;
219
+ readonly merge: OptionType<StringType>;
220
+ }>;
221
+ /** Emitted values folded with `combine`, an IR file of a `(T, T) -> T`
222
+ * function, starting at `zero`, a file holding a value; the result is
223
+ * written to `path` as a `value` is. */
224
+ readonly fold: StructType<{
225
+ readonly path: StringType;
226
+ readonly zero: StringType;
227
+ readonly combine: StringType;
228
+ }>;
229
+ }>;
230
+ }>;
231
+ }>;
232
+ /** The platform packages the program's platform calls need, named as the
233
+ * runner that executes the unit names them. */
234
+ readonly platforms: ArrayType<StringType>;
235
+ /** The threads the runner may use, its own pools included: one frames every
236
+ * output inline. */
237
+ readonly threads: IntegerType;
238
+ /** Where the runner writes its {@link UnitResultType}. */
239
+ readonly result: StringType;
240
+ }>;
241
+ export type UnitType = typeof UnitType;
242
+ export type Unit = ValueTypeOf<typeof UnitType>;
243
+ /** How a unit ended. */
244
+ export declare const UnitOutcomeType: VariantType<{
245
+ /** Every output was written. */
246
+ readonly ok: NullType;
247
+ /** The unit failed: its message, and its source locations innermost first,
248
+ * as the program's source map gives them — empty when no East code was
249
+ * running. */
250
+ readonly failed: StructType<{
251
+ readonly message: StringType;
252
+ readonly locations: ArrayType<StructType<{
253
+ readonly filename: StringType;
254
+ readonly line: IntegerType;
255
+ readonly column: IntegerType;
256
+ }>>;
257
+ }>;
258
+ }>;
259
+ export type UnitOutcomeType = typeof UnitOutcomeType;
260
+ export type UnitOutcome = ValueTypeOf<typeof UnitOutcomeType>;
261
+ /** Where a unit's time went, in milliseconds. */
262
+ export declare const UnitTimingsType: StructType<{
263
+ /** Loading the program, the platforms and the inputs. */
264
+ readonly load: FloatType;
265
+ /** Compiling the program and the functions its output folds with. */
266
+ readonly compile: FloatType;
267
+ /** Running the program, or merging the parts. */
268
+ readonly execute: FloatType;
269
+ /** Finishing the output. */
270
+ readonly output: FloatType;
271
+ }>;
272
+ export type UnitTimingsType = typeof UnitTimingsType;
273
+ export type UnitTimings = ValueTypeOf<typeof UnitTimingsType>;
274
+ /**
275
+ * What a runner reports for a unit, written where the unit's `result` says.
276
+ *
277
+ * @remarks
278
+ * The runner exits 0 when the outcome is `ok` and 1 when it records a failure;
279
+ * any other exit, or no result, is a crash. Two runners agree on a unit when
280
+ * their outcomes are equal: `peakBytes` and `timings` are measurements.
281
+ */
282
+ export declare const UnitResultType: StructType<{
283
+ /** How the unit ended. */
284
+ readonly outcome: VariantType<{
285
+ /** Every output was written. */
286
+ readonly ok: NullType;
287
+ /** The unit failed: its message, and its source locations innermost first,
288
+ * as the program's source map gives them — empty when no East code was
289
+ * running. */
290
+ readonly failed: StructType<{
291
+ readonly message: StringType;
292
+ readonly locations: ArrayType<StructType<{
293
+ readonly filename: StringType;
294
+ readonly line: IntegerType;
295
+ readonly column: IntegerType;
296
+ }>>;
297
+ }>;
298
+ }>;
299
+ /** The process's peak resident memory: VmHWM on Linux, `ru_maxrss`
300
+ * elsewhere. */
301
+ readonly peakBytes: IntegerType;
302
+ /** Where the time went. */
303
+ readonly timings: StructType<{
304
+ /** Loading the program, the platforms and the inputs. */
305
+ readonly load: FloatType;
306
+ /** Compiling the program and the functions its output folds with. */
307
+ readonly compile: FloatType;
308
+ /** Running the program, or merging the parts. */
309
+ readonly execute: FloatType;
310
+ /** Finishing the output. */
311
+ readonly output: FloatType;
312
+ }>;
313
+ }>;
314
+ export type UnitResultType = typeof UnitResultType;
315
+ export type UnitResult = ValueTypeOf<typeof UnitResultType>;
316
+ //# sourceMappingURL=runner_protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner_protocol.d.ts","sourceRoot":"","sources":["../../src/runner_protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAG5I;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;IACzB;sDACkD;;IAElD;sCACkC;;IAElC;;6DAEyD;;IAEzD;;mEAE+D;;;;;IAE/D;;6CAEyC;;;;;;EAEzC,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AACnD,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,wBAAwB;AACxB,eAAO,MAAM,YAAY;IACvB;+DAC2D;;;;;YAz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AW,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;IACzB,0BAA0B;;QAjC1B,gCAAgC;;QAEhC;;uBAEe;;;;;;;;;;IA+Bf;qBACiB;;IAEjB,2BAA2B;;QA1B3B,yDAAyD;;QAEzD,qEAAqE;;QAErE,iDAAiD;;QAEjD,4BAA4B;;;EAsB5B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AACnD,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * The runner protocol: the one unit of work every stock runner executes for a
7
+ * machine, and the result it reports.
8
+ *
9
+ * `east-node exec <unit.beast2>`, `east-c exec …` and `east-py exec …` read a
10
+ * {@link UnitType} blob, do its work, and write a {@link UnitResultType} blob
11
+ * where the unit says. A unit either runs a program, writing what it produces
12
+ * by the kind of output it makes, or merges parts of one output kind that
13
+ * earlier units wrote. Everything a unit needs is named by path, and a relative
14
+ * path is relative to the unit file, so a unit file and the files it names are
15
+ * a complete, replayable snapshot of the work.
16
+ *
17
+ * The types live here, beside the collection layer, because every runner and
18
+ * the platform that schedules them read them; east-c declares the same types
19
+ * in C, and the conformance corpus pins that all three runners agree.
20
+ */
21
+ import { ArrayType, FloatType, IntegerType, NullType, OptionType, StringType, StructType, VariantType } from "./types.js";
22
+ import { LocationType } from "./ir.js";
23
+ /**
24
+ * Where a unit's output goes, by the kind of output it is.
25
+ *
26
+ * @remarks
27
+ * A `value` is what a program returns. Every other kind is emitted: the
28
+ * program's trailing parameter is `emit`, whose signature the kind fixes — `(T)
29
+ * -> Null`, or `(K, V) -> Null` for a dict — and the parts it emits combine the
30
+ * way the kind says, whichever unit emitted them.
31
+ */
32
+ export const UnitOutputType = VariantType({
33
+ /** The program's result, written to this file: a collection as a manifest
34
+ * directory there, anything else as one blob. */
35
+ value: StringType,
36
+ /** Elements emitted in order, written through the Writer as the manifest
37
+ * directory `<dir>/0.beast2`. */
38
+ array: StringType,
39
+ /** Elements emitted in any order, written through the RunSorter as sorted
40
+ * runs, each the manifest directory `<dir>/<n>.beast2`, numbered from 0 in
41
+ * the order the runs close. Equal elements collapse. */
42
+ set: StringType,
43
+ /** Entries emitted in any order, written as runs like a set's. Equal keys
44
+ * fold with `merge`, an IR file of a `(K, V, V) -> V` function, in the order
45
+ * they were emitted; without it a repeated key is refused. */
46
+ dict: StructType({ dir: StringType, merge: OptionType(StringType) }),
47
+ /** Emitted values folded with `combine`, an IR file of a `(T, T) -> T`
48
+ * function, starting at `zero`, a file holding a value; the result is
49
+ * written to `path` as a `value` is. */
50
+ fold: StructType({ path: StringType, zero: StringType, combine: StringType }),
51
+ });
52
+ /** What a unit does. */
53
+ export const UnitWorkType = VariantType({
54
+ /** Evaluate `program`, an IR file, on `inputs`, one file per parameter —
55
+ * a blob or a manifest directory — and write `output`. */
56
+ run: StructType({ program: StringType, inputs: ArrayType(StringType), output: UnitOutputType }),
57
+ /**
58
+ * Assemble `parts` of one output kind into one: sorted set or dict runs
59
+ * merged into one run, `<dir>/0.beast2`, with a key that several parts hold
60
+ * collapsed or folded in part order; or fold partials folded in order,
61
+ * starting at `zero`. `range` is a file holding `{from: Option<K>, to:
62
+ * Option<K>}` over the parts' key type, and limits the merge to the keys in
63
+ * `[from, to)`. An array's parts never need a unit, and a value has none.
64
+ */
65
+ merge: StructType({ parts: ArrayType(StringType), range: OptionType(StringType), output: UnitOutputType }),
66
+ });
67
+ /**
68
+ * A unit of work for a runner: what `exec` reads.
69
+ *
70
+ * @example
71
+ * ```ts
72
+ * const unit: Unit = {
73
+ * work: variant("run", {
74
+ * program: "program.beast2",
75
+ * inputs: ["sales.beast2"],
76
+ * output: variant("dict", { dir: "out", merge: some("add.beast2") }),
77
+ * }),
78
+ * platforms: [],
79
+ * threads: 1n,
80
+ * result: "result.beast2",
81
+ * };
82
+ * writeFileSync("unit.beast2", encodeBeast2For(UnitType)(unit));
83
+ * // east-node exec unit.beast2
84
+ * ```
85
+ */
86
+ export const UnitType = StructType({
87
+ /** The work. */
88
+ work: UnitWorkType,
89
+ /** The platform packages the program's platform calls need, named as the
90
+ * runner that executes the unit names them. */
91
+ platforms: ArrayType(StringType),
92
+ /** The threads the runner may use, its own pools included: one frames every
93
+ * output inline. */
94
+ threads: IntegerType,
95
+ /** Where the runner writes its {@link UnitResultType}. */
96
+ result: StringType,
97
+ });
98
+ /** How a unit ended. */
99
+ export const UnitOutcomeType = VariantType({
100
+ /** Every output was written. */
101
+ ok: NullType,
102
+ /** The unit failed: its message, and its source locations innermost first,
103
+ * as the program's source map gives them — empty when no East code was
104
+ * running. */
105
+ failed: StructType({ message: StringType, locations: ArrayType(LocationType) }),
106
+ });
107
+ /** Where a unit's time went, in milliseconds. */
108
+ export const UnitTimingsType = StructType({
109
+ /** Loading the program, the platforms and the inputs. */
110
+ load: FloatType,
111
+ /** Compiling the program and the functions its output folds with. */
112
+ compile: FloatType,
113
+ /** Running the program, or merging the parts. */
114
+ execute: FloatType,
115
+ /** Finishing the output. */
116
+ output: FloatType,
117
+ });
118
+ /**
119
+ * What a runner reports for a unit, written where the unit's `result` says.
120
+ *
121
+ * @remarks
122
+ * The runner exits 0 when the outcome is `ok` and 1 when it records a failure;
123
+ * any other exit, or no result, is a crash. Two runners agree on a unit when
124
+ * their outcomes are equal: `peakBytes` and `timings` are measurements.
125
+ */
126
+ export const UnitResultType = StructType({
127
+ /** How the unit ended. */
128
+ outcome: UnitOutcomeType,
129
+ /** The process's peak resident memory: VmHWM on Linux, `ru_maxrss`
130
+ * elsewhere. */
131
+ peakBytes: IntegerType,
132
+ /** Where the time went. */
133
+ timings: UnitTimingsType,
134
+ });
135
+ //# sourceMappingURL=runner_protocol.js.map
@@ -0,0 +1 @@
1
+ {"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IACjC,gBAAgB;IAChB,IAAI,EAAE,YAAY;IAClB;oDACgD;IAChD,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC;IAChC;yBACqB;IACrB,OAAO,EAAE,WAAW;IACpB,0DAA0D;IAC1D,MAAM,EAAE,UAAU;CACnB,CAAC,CAAC;AAIH,wBAAwB;AACxB,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;IACzC,gCAAgC;IAChC,EAAE,EAAE,QAAQ;IACZ;;mBAEe;IACf,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC;CAChF,CAAC,CAAC;AAIH,iDAAiD;AACjD,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;IACxC,yDAAyD;IACzD,IAAI,EAAE,SAAS;IACf,qEAAqE;IACrE,OAAO,EAAE,SAAS;IAClB,iDAAiD;IACjD,OAAO,EAAE,SAAS;IAClB,4BAA4B;IAC5B,MAAM,EAAE,SAAS;CAClB,CAAC,CAAC;AAIH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,0BAA0B;IAC1B,OAAO,EAAE,eAAe;IACxB;qBACiB;IACjB,SAAS,EAAE,WAAW;IACtB,2BAA2B;IAC3B,OAAO,EAAE,eAAe;CACzB,CAAC,CAAC"}
@@ -23,9 +23,19 @@ export { MAGIC_BYTES } from "./v4/container.js";
23
23
  export { MAGIC_BYTES_V5 } from "./v5/codec.js";
24
24
  export type { Beast2DecodeOptions } from "./shared.js";
25
25
  export type { Beast2Codec } from "./v5/frames.js";
26
- export { Beast2Writer, type Beast2WriterOptions, encodeBeast2SegmentsFor, encodeBeast2PagedFor, type Beast2PagedEncodeOptions, BEAST2_PAGED_BATCH_DEFAULT, BEAST2_PAGED_PROBE_BATCH, BEAST2_PAGED_TARGET_BYTES_DEFAULT, iterBeast2SegmentsFor, Beast2Pages, openBeast2PagesFor, } from "./v5/stream.js";
27
- export { type Beast2Extents, readBeast2Extents, carveBeast2, spliceBeast2, rebuildBeast2, type RebuildBeast2Options, type Beast2RangeReader, type Beast2SyncRangeReader, type Beast2RangedExtents, type ReadBeast2ExtentsRangedOptions, readBeast2ExtentsRanged, readBeast2ExtentsSync, isBeast2SyncRangeReader, carveBeast2Ranged, spliceBeast2Tail, } from "./v5/geometry.js";
26
+ export { Beast2Writer, type Beast2WriterOptions, Beast2ElementWriter, type Beast2ElementWriterOptions, type Beast2ElementOf, type Beast2Segment, type Beast2SegmentSink, encodeBeast2SegmentsFor, encodeBeast2PagedFor, type Beast2PagedEncodeOptions, iterBeast2SegmentsFor, Beast2Pages, openBeast2PagesFor, } from "./v5/stream.js";
27
+ export { type Beast2Extents, readBeast2Extents, readBeast2SegmentLogicalBytes, carveBeast2, spliceBeast2, rebuildBeast2, type RebuildBeast2Options, type Beast2RangeReader, type Beast2SyncRangeReader, type Beast2RangedExtents, type ReadBeast2ExtentsRangedOptions, readBeast2ExtentsRanged, readBeast2ExtentsSync, isBeast2SyncRangeReader, carveBeast2Ranged, spliceBeast2Tail, spliceBeast2Segments, } from "./v5/geometry.js";
28
28
  export { openBeast2LazyFor, isBeast2LazySafe, type Beast2LazySafeOptions } from "./v5/lazy.js";
29
+ export { RUN_MAX_COUNT, RUN_MAX_BYTES, Beast2RunSorter, type Beast2RunSink, type Beast2RunSorterOptions, } from "./v5/runs.js";
30
+ export { mergeBeast2For, type Beast2MergeSource, type Beast2MergeOptions, type Beast2MergeStats, } from "./v5/merge.js";
31
+ export { decodeBeast2ElementsFor } from "./v5/elements.js";
32
+ export { recutBeast2For, type Beast2SegmentRef, type Beast2RecutPiece, type Beast2RecutSink, type Beast2RecutOptions, type Beast2RecutStats, } from "./v5/recut.js";
33
+ export { COLLECTION_MANIFEST_KIND, CollectionManifestType, CollectionManifestEntryType, type CollectionManifest, type CollectionManifestEntry, type Beast2ManifestSource, isCollectionManifestType, isCollectionManifest, isBeast2ManifestSource, encodeCollectionManifest, decodeCollectionManifest, readBeast2Manifest, manifestElementCount, manifestByteSize, } from "./v5/manifest.js";
34
+ export { Beast2ManifestWriter, type Beast2ManifestSink } from "./v5/manifest-writer.js";
35
+ export { sha256Hex } from "./v5/sha256.js";
36
+ export { configureFramePool, type FramePoolSettings } from "./v5/frame-pool.js";
37
+ export { SEGMENT_MIN_COUNT, SEGMENT_TARGET_COUNT, SEGMENT_MAX_COUNT, SEGMENT_MIN_BYTES, SEGMENT_TARGET_BYTES, SEGMENT_MAX_BYTES, SEGMENT_RULE_KEYED, SEGMENT_RULE_ARRAY, SegmentCutter, segmentBoundaryHash, isSegmentBoundary, startsSegmentAfter, segmentRuleFor, segmentKeyTypeOf, encodeBeast2FenceFor, decodeBeast2FenceFor, } from "./v5/boundary.js";
38
+ export { fnv1a64 } from "./shared.js";
29
39
  import type { Beast2SyncRangeReader } from "./v5/range.js";
30
40
  /**
31
41
  * Reads the root type a beast2 blob's header declares, without decoding the
@@ -104,11 +114,15 @@ export declare function encodeBeast2For<T extends EastType>(type: T, options?: B
104
114
  * Builds a decoder closure for the given type.
105
115
  *
106
116
  * The returned function dispatches on the blob's magic version byte, so v4
107
- * blobs decode through the same entry point as newer container versions.
117
+ * blobs decode through the same entry point as newer container versions. It
118
+ * decodes a blob whose header names `type`, or a subtype of it whose variant
119
+ * tags line up — each of its variants holds the first cases of `type`'s, so a
120
+ * `none` reads as any `Option` — and refuses any other, naming both types.
108
121
  *
109
122
  * @param type - the expected root East type (as `EastType` or `EastTypeValue`)
110
123
  * @param options - decode options (platform functions for decoded functions)
111
- * @returns a reusable function decoding beast2 bytes to values of `type`
124
+ * @returns a reusable function decoding beast2 bytes to values of `type`,
125
+ * which throws when the blob's header names a type that does not read as it
112
126
  */
113
127
  export declare function decodeBeast2For(type: EastTypeValue, options?: Beast2DecodeOptions): (data: Uint8Array) => any;
114
128
  export declare function decodeBeast2For<T extends EastType>(type: T, options?: Beast2DecodeOptions): (data: Uint8Array) => ValueTypeOf<T>;
@@ -123,7 +137,9 @@ export declare function decodeBeast2For<T extends EastType>(type: T, options?: B
123
137
  *
124
138
  * @param type - the expected root East type (as `EastType` or `EastTypeValue`)
125
139
  * @param options - decode options (platform functions for decoded functions)
126
- * @returns a reusable async function decoding beast2 bytes to values of `type`
140
+ * @returns a reusable async function decoding beast2 bytes to values of
141
+ * `type`, which rejects when the blob's header names a type that does not
142
+ * read as it
127
143
  */
128
144
  export declare function decodeBeast2ForAsync(type: EastTypeValue, options?: Beast2DecodeOptions): (data: Uint8Array) => Promise<any>;
129
145
  export declare function decodeBeast2ForAsync<T extends EastType>(type: T, options?: Beast2DecodeOptions): (data: Uint8Array) => Promise<ValueTypeOf<T>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/serialization/beast2/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE5E,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAU,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAiBvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,YAA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,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,UAAU,GAAG,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAQvG;AAiBD,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,CAErH;AAED,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,eAAe,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAExI"}
@@ -22,9 +22,19 @@ import { encodeBeast2V5For, decodeBeast2V5For, decodeBeast2V5ForAsync, decodeBea
22
22
  import { BEAST2_WRITE_VERSION } from "./version.js";
23
23
  export { MAGIC_BYTES } from "./v4/container.js";
24
24
  export { MAGIC_BYTES_V5 } from "./v5/codec.js";
25
- export { Beast2Writer, encodeBeast2SegmentsFor, encodeBeast2PagedFor, BEAST2_PAGED_BATCH_DEFAULT, BEAST2_PAGED_PROBE_BATCH, BEAST2_PAGED_TARGET_BYTES_DEFAULT, iterBeast2SegmentsFor, Beast2Pages, openBeast2PagesFor, } from "./v5/stream.js";
26
- export { readBeast2Extents, carveBeast2, spliceBeast2, rebuildBeast2, readBeast2ExtentsRanged, readBeast2ExtentsSync, isBeast2SyncRangeReader, carveBeast2Ranged, spliceBeast2Tail, } from "./v5/geometry.js";
25
+ export { Beast2Writer, Beast2ElementWriter, encodeBeast2SegmentsFor, encodeBeast2PagedFor, iterBeast2SegmentsFor, Beast2Pages, openBeast2PagesFor, } from "./v5/stream.js";
26
+ export { readBeast2Extents, readBeast2SegmentLogicalBytes, carveBeast2, spliceBeast2, rebuildBeast2, readBeast2ExtentsRanged, readBeast2ExtentsSync, isBeast2SyncRangeReader, carveBeast2Ranged, spliceBeast2Tail, spliceBeast2Segments, } from "./v5/geometry.js";
27
27
  export { openBeast2LazyFor, isBeast2LazySafe } from "./v5/lazy.js";
28
+ export { RUN_MAX_COUNT, RUN_MAX_BYTES, Beast2RunSorter, } from "./v5/runs.js";
29
+ export { mergeBeast2For, } from "./v5/merge.js";
30
+ export { decodeBeast2ElementsFor } from "./v5/elements.js";
31
+ export { recutBeast2For, } from "./v5/recut.js";
32
+ export { COLLECTION_MANIFEST_KIND, CollectionManifestType, CollectionManifestEntryType, isCollectionManifestType, isCollectionManifest, isBeast2ManifestSource, encodeCollectionManifest, decodeCollectionManifest, readBeast2Manifest, manifestElementCount, manifestByteSize, } from "./v5/manifest.js";
33
+ export { Beast2ManifestWriter } from "./v5/manifest-writer.js";
34
+ export { sha256Hex } from "./v5/sha256.js";
35
+ export { configureFramePool } from "./v5/frame-pool.js";
36
+ export { SEGMENT_MIN_COUNT, SEGMENT_TARGET_COUNT, SEGMENT_MAX_COUNT, SEGMENT_MIN_BYTES, SEGMENT_TARGET_BYTES, SEGMENT_MAX_BYTES, SEGMENT_RULE_KEYED, SEGMENT_RULE_ARRAY, SegmentCutter, segmentBoundaryHash, isSegmentBoundary, startsSegmentAfter, segmentRuleFor, segmentKeyTypeOf, encodeBeast2FenceFor, decodeBeast2FenceFor, } from "./v5/boundary.js";
37
+ export { fnv1a64 } from "./shared.js";
28
38
  import { readIndex, MAGIC_BYTES_V5 } from "./v5/codec.js";
29
39
  /**
30
40
  * Reads the root type a beast2 blob's header declares, without decoding the
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/serialization/beast2/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAAE,eAAe,EAAsB,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,OAAO,EAAE,MAAM,EAAyC,MAAM,aAAa,CAAC;AAE5E,OAAO,EA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