@elaraai/east 1.0.45 → 1.0.46

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 (90) hide show
  1. package/dist/src/containers/sortedmap.d.ts +22 -0
  2. package/dist/src/containers/sortedmap.d.ts.map +1 -1
  3. package/dist/src/containers/sortedmap.js +31 -2
  4. package/dist/src/containers/sortedmap.js.map +1 -1
  5. package/dist/src/containers/sortedset.d.ts +22 -0
  6. package/dist/src/containers/sortedset.d.ts.map +1 -1
  7. package/dist/src/containers/sortedset.js +31 -2
  8. package/dist/src/containers/sortedset.js.map +1 -1
  9. package/dist/src/expr/blob.d.ts +6 -1
  10. package/dist/src/expr/blob.d.ts.map +1 -1
  11. package/dist/src/expr/blob.js +6 -1
  12. package/dist/src/expr/blob.js.map +1 -1
  13. package/dist/src/expr/libs/blob.d.ts +10 -1
  14. package/dist/src/expr/libs/blob.d.ts.map +1 -1
  15. package/dist/src/expr/libs/blob.js +10 -1
  16. package/dist/src/expr/libs/blob.js.map +1 -1
  17. package/dist/src/fuzz.d.ts.map +1 -1
  18. package/dist/src/fuzz.js +11 -2
  19. package/dist/src/fuzz.js.map +1 -1
  20. package/dist/src/serialization/beast2/index.d.ts +76 -22
  21. package/dist/src/serialization/beast2/index.d.ts.map +1 -1
  22. package/dist/src/serialization/beast2/index.js +87 -720
  23. package/dist/src/serialization/beast2/index.js.map +1 -1
  24. package/dist/src/serialization/beast2/index.spec.js +147 -4
  25. package/dist/src/serialization/beast2/index.spec.js.map +1 -1
  26. package/dist/src/serialization/beast2/shared.d.ts +79 -0
  27. package/dist/src/serialization/beast2/shared.d.ts.map +1 -0
  28. package/dist/src/serialization/beast2/shared.js +143 -0
  29. package/dist/src/serialization/beast2/shared.js.map +1 -0
  30. package/dist/src/serialization/beast2/v4/container.d.ts +67 -0
  31. package/dist/src/serialization/beast2/v4/container.d.ts.map +1 -0
  32. package/dist/src/serialization/beast2/v4/container.js +727 -0
  33. package/dist/src/serialization/beast2/v4/container.js.map +1 -0
  34. package/dist/src/serialization/beast2/{sourcemap-table.d.ts → v4/sourcemap-table.d.ts} +2 -2
  35. package/dist/src/serialization/beast2/v4/sourcemap-table.d.ts.map +1 -0
  36. package/dist/src/serialization/beast2/{sourcemap-table.js → v4/sourcemap-table.js} +2 -2
  37. package/dist/src/serialization/beast2/v4/sourcemap-table.js.map +1 -0
  38. package/dist/src/serialization/beast2/{string-table.d.ts → v4/string-table.d.ts} +1 -1
  39. package/dist/src/serialization/beast2/v4/string-table.d.ts.map +1 -0
  40. package/dist/src/serialization/beast2/{string-table.js → v4/string-table.js} +1 -1
  41. package/dist/src/serialization/beast2/v4/string-table.js.map +1 -0
  42. package/dist/src/serialization/beast2/{type-table.d.ts → v4/type-table.d.ts} +6 -4
  43. package/dist/src/serialization/beast2/v4/type-table.d.ts.map +1 -0
  44. package/dist/src/serialization/beast2/{type-table.js → v4/type-table.js} +103 -10
  45. package/dist/src/serialization/beast2/v4/type-table.js.map +1 -0
  46. package/dist/src/serialization/beast2/{value-table.d.ts → v4/value-table.d.ts} +2 -2
  47. package/dist/src/serialization/beast2/v4/value-table.d.ts.map +1 -0
  48. package/dist/src/serialization/beast2/{value-table.js → v4/value-table.js} +3 -3
  49. package/dist/src/serialization/beast2/v4/value-table.js.map +1 -0
  50. package/dist/src/serialization/beast2/v5/codec.d.ts +213 -0
  51. package/dist/src/serialization/beast2/v5/codec.d.ts.map +1 -0
  52. package/dist/src/serialization/beast2/v5/codec.js +954 -0
  53. package/dist/src/serialization/beast2/v5/codec.js.map +1 -0
  54. package/dist/src/serialization/beast2/v5/deflate.d.ts +16 -0
  55. package/dist/src/serialization/beast2/v5/deflate.d.ts.map +1 -0
  56. package/dist/src/serialization/beast2/v5/deflate.js +172 -0
  57. package/dist/src/serialization/beast2/v5/deflate.js.map +1 -0
  58. package/dist/src/serialization/beast2/v5/frames.d.ts +150 -0
  59. package/dist/src/serialization/beast2/v5/frames.d.ts.map +1 -0
  60. package/dist/src/serialization/beast2/v5/frames.js +284 -0
  61. package/dist/src/serialization/beast2/v5/frames.js.map +1 -0
  62. package/dist/src/serialization/beast2/v5/index.spec.d.ts +6 -0
  63. package/dist/src/serialization/beast2/v5/index.spec.d.ts.map +1 -0
  64. package/dist/src/serialization/beast2/v5/index.spec.js +484 -0
  65. package/dist/src/serialization/beast2/v5/index.spec.js.map +1 -0
  66. package/dist/src/serialization/beast2/v5/stream.d.ts +177 -0
  67. package/dist/src/serialization/beast2/v5/stream.d.ts.map +1 -0
  68. package/dist/src/serialization/beast2/v5/stream.js +447 -0
  69. package/dist/src/serialization/beast2/v5/stream.js.map +1 -0
  70. package/dist/src/serialization/beast2/v5/type-section.d.ts +81 -0
  71. package/dist/src/serialization/beast2/v5/type-section.d.ts.map +1 -0
  72. package/dist/src/serialization/beast2/v5/type-section.js +211 -0
  73. package/dist/src/serialization/beast2/v5/type-section.js.map +1 -0
  74. package/dist/src/serialization/beast2/version.d.ts +40 -0
  75. package/dist/src/serialization/beast2/version.d.ts.map +1 -0
  76. package/dist/src/serialization/beast2/version.js +23 -0
  77. package/dist/src/serialization/beast2/version.js.map +1 -0
  78. package/dist/src/serialization/index.d.ts +1 -1
  79. package/dist/src/serialization/index.d.ts.map +1 -1
  80. package/dist/src/serialization/index.js +1 -1
  81. package/dist/src/serialization/index.js.map +1 -1
  82. package/package.json +1 -1
  83. package/dist/src/serialization/beast2/sourcemap-table.d.ts.map +0 -1
  84. package/dist/src/serialization/beast2/sourcemap-table.js.map +0 -1
  85. package/dist/src/serialization/beast2/string-table.d.ts.map +0 -1
  86. package/dist/src/serialization/beast2/string-table.js.map +0 -1
  87. package/dist/src/serialization/beast2/type-table.d.ts.map +0 -1
  88. package/dist/src/serialization/beast2/type-table.js.map +0 -1
  89. package/dist/src/serialization/beast2/value-table.d.ts.map +0 -1
  90. package/dist/src/serialization/beast2/value-table.js.map +0 -1
@@ -0,0 +1,284 @@
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
+ * Beast2 v5 frame layer — the on-wire transport of the value stream.
7
+ *
8
+ * The v5 value stream is a sequence of frames; the concatenation of the
9
+ * decompressed frame payloads forms the logical value encoding. Each frame:
10
+ *
11
+ * varint(codec_id) varint(uncompressed_len) varint(payload_len) payload
12
+ *
13
+ * Codec 0 (`none`) stores the logical bytes raw (`payload_len` must equal
14
+ * `uncompressed_len`); codec 1 (`deflate`) stores a raw DEFLATE (RFC 1951)
15
+ * stream that must inflate to exactly `uncompressed_len` bytes. Codec 2 is
16
+ * reserved for zstd. Writers choose a codec per frame, so a blob may mix
17
+ * compressed and uncompressed frames.
18
+ *
19
+ * Deflate uses Node's zlib when available (loaded via
20
+ * `process.getBuiltinModule`, which browser bundlers ignore); browsers fall
21
+ * back to the async `CompressionStream`/`DecompressionStream` path used by
22
+ * the async decode entry points.
23
+ */
24
+ import { BufferWriter, BufferReader } from "../../binary-utils.js";
25
+ import { deterministicDeflateRaw } from "./deflate.js";
26
+ /** Codec id: store logical bytes uncompressed. */
27
+ export const CODEC_NONE = 0;
28
+ /** Codec id: raw DEFLATE (RFC 1951). The mandatory baseline codec. */
29
+ export const CODEC_DEFLATE = 1;
30
+ /** Codec id reserved for zstd — not yet implemented by any runtime. */
31
+ export const CODEC_ZSTD = 2;
32
+ /** Frames with payloads below this size are stored uncompressed. */
33
+ export const COMPRESSION_THRESHOLD = 64;
34
+ /** Upper bound on a single frame's uncompressed length (1 GiB) — guards
35
+ * against decompression bombs and absurd allocations on corrupt input. */
36
+ export const MAX_FRAME_UNCOMPRESSED = 1 << 30;
37
+ /** Resolves a codec name to its wire id. */
38
+ export function codecId(codec) {
39
+ return codec === "deflate" ? CODEC_DEFLATE : CODEC_NONE;
40
+ }
41
+ /** Node's zlib when running under Node, `null` in browsers. Resolved once via
42
+ * `process.getBuiltinModule` so bundlers never see a `node:zlib` import. */
43
+ const zlib = globalThis.process?.getBuiltinModule?.("node:zlib") ?? null;
44
+ /**
45
+ * Compresses logical bytes with raw DEFLATE.
46
+ *
47
+ * Uses beast2's own specified encoder rather than the platform's zlib, so the
48
+ * bytes are identical in every runtime — see `./deflate.ts` for why that
49
+ * matters (content-addressing) and how the algorithm is pinned. It needs no
50
+ * platform support at all, so browsers can compress too.
51
+ *
52
+ * @param data - the logical bytes to compress
53
+ * @returns the raw DEFLATE stream
54
+ */
55
+ export function deflateRawSync(data) {
56
+ return deterministicDeflateRaw(data);
57
+ }
58
+ /**
59
+ * Decompresses a raw DEFLATE frame payload synchronously.
60
+ *
61
+ * @param payload - the compressed frame payload
62
+ * @param uncompressedLen - the expected logical byte length from the frame header
63
+ * @returns the logical bytes
64
+ * @throws {Error} When zlib is unavailable (browsers — use the async decode
65
+ * entry points), the stream is corrupt, or the output length mismatches.
66
+ */
67
+ export function inflateRawSync(payload, uncompressedLen) {
68
+ if (!zlib) {
69
+ throw new Error(`beast2 v5: synchronous inflate needs Node's zlib; use the async decode entry points in browsers`);
70
+ }
71
+ const out = zlib.inflateRawSync(payload, { maxOutputLength: uncompressedLen });
72
+ if (out.length !== uncompressedLen) {
73
+ throw new Error(`beast2 v5: frame inflated to ${out.length} bytes, header declared ${uncompressedLen}`);
74
+ }
75
+ return out;
76
+ }
77
+ /**
78
+ * Decompresses a raw DEFLATE frame payload asynchronously via
79
+ * `DecompressionStream("deflate-raw")` — the browser path.
80
+ *
81
+ * @param payload - the compressed frame payload
82
+ * @param uncompressedLen - the expected logical byte length from the frame header
83
+ * @returns the logical bytes
84
+ * @throws {Error} When the stream is corrupt or the output length mismatches.
85
+ */
86
+ export async function inflateRawAsync(payload, uncompressedLen) {
87
+ if (zlib)
88
+ return inflateRawSync(payload, uncompressedLen);
89
+ const DS = globalThis.DecompressionStream;
90
+ if (!DS) {
91
+ throw new Error(`beast2 v5: no inflate available (neither Node's zlib nor DecompressionStream)`);
92
+ }
93
+ const source = new ReadableStream({
94
+ start(controller) {
95
+ controller.enqueue(payload);
96
+ controller.close();
97
+ },
98
+ });
99
+ const stream = source.pipeThrough(new DS("deflate-raw"));
100
+ const chunks = [];
101
+ let total = 0;
102
+ const reader = stream.getReader();
103
+ for (;;) {
104
+ const { done, value } = await reader.read();
105
+ if (done)
106
+ break;
107
+ chunks.push(value);
108
+ total += value.length;
109
+ if (total > uncompressedLen) {
110
+ throw new Error(`beast2 v5: frame inflated past the declared ${uncompressedLen} bytes`);
111
+ }
112
+ }
113
+ if (total !== uncompressedLen) {
114
+ throw new Error(`beast2 v5: frame inflated to ${total} bytes, header declared ${uncompressedLen}`);
115
+ }
116
+ const out = new Uint8Array(total);
117
+ let pos = 0;
118
+ for (const c of chunks) {
119
+ out.set(c, pos);
120
+ pos += c.length;
121
+ }
122
+ return out;
123
+ }
124
+ // =============================================================================
125
+ // Frame write
126
+ // =============================================================================
127
+ /**
128
+ * Writes one frame carrying the given logical bytes.
129
+ *
130
+ * Small payloads (below {@link COMPRESSION_THRESHOLD}) and payloads that
131
+ * deflate fails to shrink are stored with codec `none` regardless of the
132
+ * requested codec — the codec id is a per-frame writer choice.
133
+ *
134
+ * @param out - the wire-level writer to append the frame to
135
+ * @param logical - the logical bytes this frame carries
136
+ * @param codec - the requested codec for this frame
137
+ */
138
+ export function writeFrame(out, logical, codec) {
139
+ if (codec === "deflate" && logical.length >= COMPRESSION_THRESHOLD) {
140
+ const compressed = deflateRawSync(logical);
141
+ if (compressed.length < logical.length) {
142
+ out.writeVarint(CODEC_DEFLATE);
143
+ out.writeVarint(logical.length);
144
+ out.writeVarint(compressed.length);
145
+ out.writeBytes(compressed);
146
+ return;
147
+ }
148
+ }
149
+ out.writeVarint(CODEC_NONE);
150
+ out.writeVarint(logical.length);
151
+ out.writeVarint(logical.length);
152
+ out.writeBytes(logical);
153
+ }
154
+ /**
155
+ * Parses one frame header at `offset` and validates its bounds.
156
+ *
157
+ * @param data - the whole blob
158
+ * @param offset - wire offset of the frame's first byte
159
+ * @returns the parsed header
160
+ * @throws {Error} When the header is truncated, the codec is unknown, the
161
+ * lengths are inconsistent, or the payload runs past the end of input.
162
+ */
163
+ export function readFrameHeader(data, offset) {
164
+ const reader = new BufferReader(data, offset);
165
+ const codec = reader.readVarint();
166
+ const uncompressedLen = reader.readVarint();
167
+ const payloadLen = reader.readVarint();
168
+ if (codec !== CODEC_NONE && codec !== CODEC_DEFLATE) {
169
+ if (codec === CODEC_ZSTD) {
170
+ throw new Error(`beast2 v5: frame uses codec 2 (zstd), which this runtime does not support`);
171
+ }
172
+ throw new Error(`beast2 v5: unknown frame codec ${codec}`);
173
+ }
174
+ if (uncompressedLen > MAX_FRAME_UNCOMPRESSED) {
175
+ throw new Error(`beast2 v5: frame declares ${uncompressedLen} uncompressed bytes (limit ${MAX_FRAME_UNCOMPRESSED})`);
176
+ }
177
+ if (codec === CODEC_NONE && payloadLen !== uncompressedLen) {
178
+ throw new Error(`beast2 v5: uncompressed frame lengths disagree (${payloadLen} != ${uncompressedLen})`);
179
+ }
180
+ const payloadOffset = reader.offset;
181
+ if (payloadOffset + payloadLen > data.length) {
182
+ throw new Error(`beast2 v5: truncated frame (payload of ${payloadLen} bytes runs past end of input)`);
183
+ }
184
+ return { codec, uncompressedLen, payloadLen, payloadOffset, endOffset: payloadOffset + payloadLen };
185
+ }
186
+ /**
187
+ * Sequential reader over the value stream's frames, yielding one
188
+ * {@link BufferReader} per logical chunk.
189
+ *
190
+ * The driver decides when to stop pulling frames — the logical value encoding
191
+ * is self-terminating, so bytes after the last consumed frame (the optional
192
+ * index and footer) are never touched by this reader.
193
+ */
194
+ export class FrameReader {
195
+ /** Wire offset of the next unread frame (after the last consumed one). */
196
+ wireOffset;
197
+ /** Wire offsets of each consumed frame's first byte, in order. */
198
+ frameOffsets = [];
199
+ data;
200
+ inflate;
201
+ /**
202
+ * @param data - the whole blob
203
+ * @param offset - wire offset of the first value-stream frame
204
+ * @param inflate - decompressor for deflate frames (defaults to the sync
205
+ * zlib binding; the async decode path pre-inflates and injects a lookup)
206
+ */
207
+ constructor(data, offset, inflate = defaultInflate) {
208
+ this.data = data;
209
+ this.wireOffset = offset;
210
+ this.inflate = inflate;
211
+ }
212
+ /** Whether another frame could start here (any unread bytes remain). */
213
+ hasBytes() {
214
+ return this.wireOffset < this.data.length;
215
+ }
216
+ /**
217
+ * Consumes the next frame and returns a reader over its logical chunk.
218
+ *
219
+ * @returns a reader positioned at the chunk's first byte
220
+ * @throws {Error} When no bytes remain or the frame is malformed.
221
+ */
222
+ next() {
223
+ if (!this.hasBytes()) {
224
+ throw new Error(`beast2 v5: truncated value stream (expected another frame at offset ${this.wireOffset})`);
225
+ }
226
+ const start = this.wireOffset;
227
+ const h = readFrameHeader(this.data, start);
228
+ this.frameOffsets.push(start);
229
+ this.wireOffset = h.endOffset;
230
+ const payload = this.data.subarray(h.payloadOffset, h.endOffset);
231
+ if (h.codec === CODEC_NONE) {
232
+ return new BufferReader(payload, 0);
233
+ }
234
+ return new BufferReader(this.inflate(payload, h.uncompressedLen, start), 0);
235
+ }
236
+ }
237
+ function defaultInflate(payload, uncompressedLen) {
238
+ return inflateRawSync(payload, uncompressedLen);
239
+ }
240
+ /**
241
+ * Pre-inflates every deflate frame from `offset` to the end of input
242
+ * asynchronously and returns an inflate lookup keyed by frame start offset —
243
+ * the browser decode path pairs this with a {@link FrameReader} and then runs
244
+ * the ordinary synchronous decode.
245
+ *
246
+ * @param data - the whole blob
247
+ * @param offset - wire offset of the first value-stream frame
248
+ * @returns an inflate function serving the precomputed chunks
249
+ */
250
+ export async function preInflateFrames(data, offset) {
251
+ const chunks = new Map();
252
+ let pos = offset;
253
+ while (pos < data.length) {
254
+ let h;
255
+ try {
256
+ h = readFrameHeader(data, pos);
257
+ }
258
+ catch {
259
+ // Not a valid frame — the trailing index/footer starts here. The sync
260
+ // decode drive stops pulling frames on its own; anything malformed
261
+ // before that point is reported by the sync pass with full context.
262
+ break;
263
+ }
264
+ if (h.codec === CODEC_DEFLATE) {
265
+ try {
266
+ chunks.set(pos, await inflateRawAsync(data.subarray(h.payloadOffset, h.endOffset), h.uncompressedLen));
267
+ }
268
+ catch {
269
+ // Corrupt frame, or index/footer bytes that merely looked like a
270
+ // frame header — leave it to the sync pass, which stops at the true
271
+ // end of the value stream and reports real corruption with context.
272
+ break;
273
+ }
274
+ }
275
+ pos = h.endOffset;
276
+ }
277
+ return (payload, uncompressedLen, frameStart) => {
278
+ const chunk = chunks.get(frameStart);
279
+ if (chunk)
280
+ return chunk;
281
+ return inflateRawSync(payload, uncompressedLen);
282
+ };
283
+ }
284
+ //# sourceMappingURL=frames.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frames.js","sourceRoot":"","sources":["../../../../../src/serialization/beast2/v5/frames.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvD,kDAAkD;AAClD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC;AAC5B,sEAAsE;AACtE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAC/B,uEAAuE;AACvE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC;AAK5B,oEAAoE;AACpE,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAExC;2EAC2E;AAC3E,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,IAAI,EAAE,CAAC;AAE9C,4CAA4C;AAC5C,MAAM,UAAU,OAAO,CAAC,KAAkB;IACxC,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC;AAC1D,CAAC;AAWD;6EAC6E;AAC7E,MAAM,IAAI,GACP,UAAkB,CAAC,OAAO,EAAE,gBAAgB,EAAE,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC;AAEvE;;;;;;;;;;G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D,GAAG,GAAG,CAAC,CAAC,SAAS,CAAC;IACpB,CAAC;IACD,OAAO,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,EAAE;QAC9C,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACrC,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC;QACxB,OAAO,cAAc,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAClD,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
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
+ export {};
6
+ //# sourceMappingURL=index.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../../../../../src/serialization/beast2/v5/index.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG"}