@kya-os/checkpoint-wasm-runtime 1.1.0 → 1.1.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,101 @@
1
1
  # @kya-os/checkpoint-wasm-runtime
2
2
 
3
+ ## 1.1.1 — 2026-05-17
4
+
5
+ **Critical runtime fix.** 1.1.0 (and all prior versions back to 1.0.0)
6
+ shipped with `engineVerify` tree-shaken to a broken stub —
7
+ `function engineVerify(input, ctx) { const result = (void 0)(input, ctx); return result; }`.
8
+ The wasm-bindgen `verify` import was removed by tsup at build time
9
+ because `"sideEffects": false` told the bundler the whole package was
10
+ side-effect-free, but the wasm-bindgen `--target nodejs` JS file binds
11
+ its exports as a side-effect of loading (`module.exports = ...` runs
12
+ at import time + the WASM instance writes its symbols into that
13
+ exports object).
14
+
15
+ Why this didn't surface before SDK-WASM-Bundler-Loader-1 (#2600):
16
+ Next.js consumers couldn't reach `engineVerify` at all because the
17
+ Web-target WASM URL trick failed bundler analysis first. Once #2600
18
+ unblocked the build, every request started fail-opening with
19
+ `(void 0) is not a function (TypeError)`. Express consumers likely
20
+ hit the same bug but it manifested differently (verification just
21
+ silently failed) and went unreported.
22
+
23
+ ### Fix
24
+
25
+ Four coordinated changes — each addresses a different layer of the
26
+ wasm-bindgen-meets-modern-bundler problem:
27
+
28
+ 1. **Source: namespace import + lazy property access**
29
+ (`src/engine/index.ts`). Static named imports of CJS exports
30
+ (`import { verify }`) get tree-shaken to `(void 0)` by esbuild
31
+ because it can't see runtime-assigned `exports.verify`. Reading
32
+ `wasmModule.verify` inside the function body keeps the access as
33
+ a runtime member lookup that survives esbuild's static analysis.
34
+
35
+ 2. **Per-engine `wasm/<target>/package.json`** — pins each subdir to
36
+ `"type": "commonjs"` (Node target) or `"type": "module"` (Edge
37
+ target). The parent `wasm/package.json` declares `"type": "module"`
38
+ for the older `agentshield_wasm.js` ESM file; without these
39
+ per-subdir overrides, Node mis-classifies the CJS Node-target file
40
+ as ESM and throws `ERR_REQUIRE_ESM` in test environments.
41
+
42
+ 3. **`sideEffects: ["./wasm/**/\*.js"]`** in package.json (was `false`).
43
+ Defense in depth — preserves wasm-bindgen modules' load-time
44
+ binding side effects even if future tsup config changes loosen
45
+ the explicit safeguards above.
46
+
47
+ 4. **tsup `onSuccess` copies `wasm/.../kya_os_engine_bg.wasm` to
48
+ `dist/`** so the inlined wasm-bindgen glue's
49
+ `__dirname + '/<name>_bg.wasm'` lookup finds the artifact next
50
+ to the bundled JS (otherwise ENOENT — `__dirname` resolves to
51
+ `dist/` when bundled, not the original `wasm/` source location).
52
+ Adds ~1.2 MB to the bundle dir but the file was already in the
53
+ published tarball; it's now in two places. Acceptable for a binary.
54
+
55
+ ### Bundle verification
56
+
57
+ Before (broken):
58
+
59
+ ```
60
+ function engineVerify(input, ctx) {
61
+ const result = (void 0)(input, ctx); # ✗ wasmVerify tree-shaken
62
+ return result;
63
+ }
64
+ ```
65
+
66
+ After (this PR):
67
+
68
+ ```
69
+ var wasmModule = __toESM(require_kya_os_engine());
70
+ function engineVerify(input, ctx) {
71
+ const verify2 = wasmModule.verify; # ✓ runtime property access
72
+ return verify2(input, ctx);
73
+ }
74
+ ```
75
+
76
+ ### Test verification
77
+
78
+ - `@kya-os/checkpoint-wasm-runtime`: 173/173 tests pass
79
+ - `@kya-os/checkpoint-nextjs`: 141/141 tests pass (was 109 in 1.1.0)
80
+ - `@kya-os/checkpoint-express`: 21/21 tests pass
81
+
82
+ ### Consumers
83
+
84
+ No package.json changes needed in `@kya-os/checkpoint-{nextjs,express}`
85
+ — both already use `workspace:^` to depend on `^1.1.0`, so fresh
86
+ installs (including Vercel + Lambda redeploys) automatically pull
87
+ 1.1.1 transitively.
88
+
89
+ ### Coordinated release context
90
+
91
+ Third in the SDK-WASM-Bundler-Loader sequence:
92
+
93
+ - 1.0.0 → 1.1.0: SDK-WASM-Bundler-Loader-1 (#2600) — Node-only orchestrator entry
94
+ - 1.1.0 → **1.1.1**: this — `sideEffects` config preserves wasm-bindgen binding
95
+ - Future: SDK-WASM-Bundler-Loader-2 (#2605) — explicit init API for custom runtimes
96
+
97
+ ---
98
+
3
99
  ## 1.1.0 — 2026-05-17
4
100
 
5
101
  **SDK-WASM-Bundler-Loader-1 fix.** Surfaced during Bench-Before-After-1
package/dist/engine.js CHANGED
@@ -1,9 +1,454 @@
1
1
  'use strict';
2
2
 
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
10
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
11
+ }) : x)(function(x) {
12
+ if (typeof require !== "undefined") return require.apply(this, arguments);
13
+ throw Error('Dynamic require of "' + x + '" is not supported');
14
+ });
15
+ var __commonJS = (cb, mod) => function __require2() {
16
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
27
+ // If the importer is in node compatibility mode or this is not an ESM
28
+ // file that has been converted to a CommonJS file using a Babel-
29
+ // compatible transform (i.e. "__esModule" has not been set), then set
30
+ // "default" to the CommonJS "module.exports" for node compatibility.
31
+ !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
32
+ mod
33
+ ));
34
+
35
+ // wasm/kya-os-engine/kya_os_engine.js
36
+ var require_kya_os_engine = __commonJS({
37
+ "wasm/kya-os-engine/kya_os_engine.js"(exports$1, module) {
38
+ var imports = {};
39
+ imports["__wbindgen_placeholder__"] = module.exports;
40
+ var cachedUint8ArrayMemory0 = null;
41
+ function getUint8ArrayMemory0() {
42
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
43
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
44
+ }
45
+ return cachedUint8ArrayMemory0;
46
+ }
47
+ var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
48
+ cachedTextDecoder.decode();
49
+ function decodeText(ptr, len) {
50
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
51
+ }
52
+ function getStringFromWasm0(ptr, len) {
53
+ ptr = ptr >>> 0;
54
+ return decodeText(ptr, len);
55
+ }
56
+ var heap = new Array(128).fill(void 0);
57
+ heap.push(void 0, null, true, false);
58
+ var heap_next = heap.length;
59
+ function addHeapObject(obj) {
60
+ if (heap_next === heap.length) heap.push(heap.length + 1);
61
+ const idx = heap_next;
62
+ heap_next = heap[idx];
63
+ heap[idx] = obj;
64
+ return idx;
65
+ }
66
+ function getObject(idx) {
67
+ return heap[idx];
68
+ }
69
+ var WASM_VECTOR_LEN = 0;
70
+ var cachedTextEncoder = new TextEncoder();
71
+ if (!("encodeInto" in cachedTextEncoder)) {
72
+ cachedTextEncoder.encodeInto = function(arg, view) {
73
+ const buf = cachedTextEncoder.encode(arg);
74
+ view.set(buf);
75
+ return {
76
+ read: arg.length,
77
+ written: buf.length
78
+ };
79
+ };
80
+ }
81
+ function passStringToWasm0(arg, malloc, realloc) {
82
+ if (realloc === void 0) {
83
+ const buf = cachedTextEncoder.encode(arg);
84
+ const ptr2 = malloc(buf.length, 1) >>> 0;
85
+ getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
86
+ WASM_VECTOR_LEN = buf.length;
87
+ return ptr2;
88
+ }
89
+ let len = arg.length;
90
+ let ptr = malloc(len, 1) >>> 0;
91
+ const mem = getUint8ArrayMemory0();
92
+ let offset = 0;
93
+ for (; offset < len; offset++) {
94
+ const code = arg.charCodeAt(offset);
95
+ if (code > 127) break;
96
+ mem[ptr + offset] = code;
97
+ }
98
+ if (offset !== len) {
99
+ if (offset !== 0) {
100
+ arg = arg.slice(offset);
101
+ }
102
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
103
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
104
+ const ret = cachedTextEncoder.encodeInto(arg, view);
105
+ offset += ret.written;
106
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
107
+ }
108
+ WASM_VECTOR_LEN = offset;
109
+ return ptr;
110
+ }
111
+ var cachedDataViewMemory0 = null;
112
+ function getDataViewMemory0() {
113
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
114
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
115
+ }
116
+ return cachedDataViewMemory0;
117
+ }
118
+ function isLikeNone(x) {
119
+ return x === void 0 || x === null;
120
+ }
121
+ function debugString(val) {
122
+ const type = typeof val;
123
+ if (type == "number" || type == "boolean" || val == null) {
124
+ return `${val}`;
125
+ }
126
+ if (type == "string") {
127
+ return `"${val}"`;
128
+ }
129
+ if (type == "symbol") {
130
+ const description = val.description;
131
+ if (description == null) {
132
+ return "Symbol";
133
+ } else {
134
+ return `Symbol(${description})`;
135
+ }
136
+ }
137
+ if (type == "function") {
138
+ const name = val.name;
139
+ if (typeof name == "string" && name.length > 0) {
140
+ return `Function(${name})`;
141
+ } else {
142
+ return "Function";
143
+ }
144
+ }
145
+ if (Array.isArray(val)) {
146
+ const length = val.length;
147
+ let debug = "[";
148
+ if (length > 0) {
149
+ debug += debugString(val[0]);
150
+ }
151
+ for (let i = 1; i < length; i++) {
152
+ debug += ", " + debugString(val[i]);
153
+ }
154
+ debug += "]";
155
+ return debug;
156
+ }
157
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
158
+ let className;
159
+ if (builtInMatches && builtInMatches.length > 1) {
160
+ className = builtInMatches[1];
161
+ } else {
162
+ return toString.call(val);
163
+ }
164
+ if (className == "Object") {
165
+ try {
166
+ return "Object(" + JSON.stringify(val) + ")";
167
+ } catch (_) {
168
+ return "Object";
169
+ }
170
+ }
171
+ if (val instanceof Error) {
172
+ return `${val.name}: ${val.message}
173
+ ${val.stack}`;
174
+ }
175
+ return className;
176
+ }
177
+ function handleError(f, args) {
178
+ try {
179
+ return f.apply(this, args);
180
+ } catch (e) {
181
+ wasm.__wbindgen_export3(addHeapObject(e));
182
+ }
183
+ }
184
+ function getArrayU8FromWasm0(ptr, len) {
185
+ ptr = ptr >>> 0;
186
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
187
+ }
188
+ function dropObject(idx) {
189
+ if (idx < 132) return;
190
+ heap[idx] = heap_next;
191
+ heap_next = idx;
192
+ }
193
+ function takeObject(idx) {
194
+ const ret = getObject(idx);
195
+ dropObject(idx);
196
+ return ret;
197
+ }
198
+ exports$1.verify = function(input_js, ctx_js) {
199
+ try {
200
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
201
+ wasm.verify(retptr, addHeapObject(input_js), addHeapObject(ctx_js));
202
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
203
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
204
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
205
+ if (r2) {
206
+ throw takeObject(r1);
207
+ }
208
+ return takeObject(r0);
209
+ } finally {
210
+ wasm.__wbindgen_add_to_stack_pointer(16);
211
+ }
212
+ };
213
+ exports$1.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
214
+ const ret = Error(getStringFromWasm0(arg0, arg1));
215
+ return addHeapObject(ret);
216
+ };
217
+ exports$1.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
218
+ const ret = Number(getObject(arg0));
219
+ return ret;
220
+ };
221
+ exports$1.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
222
+ const ret = String(getObject(arg1));
223
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
224
+ const len1 = WASM_VECTOR_LEN;
225
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
226
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
227
+ };
228
+ exports$1.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
229
+ const v = getObject(arg1);
230
+ const ret = typeof v === "bigint" ? v : void 0;
231
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
232
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
233
+ };
234
+ exports$1.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
235
+ const v = getObject(arg0);
236
+ const ret = typeof v === "boolean" ? v : void 0;
237
+ return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
238
+ };
239
+ exports$1.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
240
+ const ret = debugString(getObject(arg1));
241
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
242
+ const len1 = WASM_VECTOR_LEN;
243
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
244
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
245
+ };
246
+ exports$1.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
247
+ const ret = getObject(arg0) in getObject(arg1);
248
+ return ret;
249
+ };
250
+ exports$1.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
251
+ const ret = typeof getObject(arg0) === "bigint";
252
+ return ret;
253
+ };
254
+ exports$1.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
255
+ const ret = typeof getObject(arg0) === "function";
256
+ return ret;
257
+ };
258
+ exports$1.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
259
+ const val = getObject(arg0);
260
+ const ret = typeof val === "object" && val !== null;
261
+ return ret;
262
+ };
263
+ exports$1.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
264
+ const ret = typeof getObject(arg0) === "string";
265
+ return ret;
266
+ };
267
+ exports$1.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
268
+ const ret = getObject(arg0) === void 0;
269
+ return ret;
270
+ };
271
+ exports$1.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
272
+ const ret = getObject(arg0) === getObject(arg1);
273
+ return ret;
274
+ };
275
+ exports$1.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
276
+ const ret = getObject(arg0) == getObject(arg1);
277
+ return ret;
278
+ };
279
+ exports$1.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
280
+ const obj = getObject(arg1);
281
+ const ret = typeof obj === "number" ? obj : void 0;
282
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
283
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
284
+ };
285
+ exports$1.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
286
+ const obj = getObject(arg1);
287
+ const ret = typeof obj === "string" ? obj : void 0;
288
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
289
+ var len1 = WASM_VECTOR_LEN;
290
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
291
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
292
+ };
293
+ exports$1.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
294
+ throw new Error(getStringFromWasm0(arg0, arg1));
295
+ };
296
+ exports$1.__wbg_call_e762c39fa8ea36bf = function() {
297
+ return handleError(function(arg0, arg1) {
298
+ const ret = getObject(arg0).call(getObject(arg1));
299
+ return addHeapObject(ret);
300
+ }, arguments);
301
+ };
302
+ exports$1.__wbg_done_2042aa2670fb1db1 = function(arg0) {
303
+ const ret = getObject(arg0).done;
304
+ return ret;
305
+ };
306
+ exports$1.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
307
+ const ret = Object.entries(getObject(arg0));
308
+ return addHeapObject(ret);
309
+ };
310
+ exports$1.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
311
+ const ret = getObject(arg0)[arg1 >>> 0];
312
+ return addHeapObject(ret);
313
+ };
314
+ exports$1.__wbg_get_efcb449f58ec27c2 = function() {
315
+ return handleError(function(arg0, arg1) {
316
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
317
+ return addHeapObject(ret);
318
+ }, arguments);
319
+ };
320
+ exports$1.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
321
+ const ret = getObject(arg0)[getObject(arg1)];
322
+ return addHeapObject(ret);
323
+ };
324
+ exports$1.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
325
+ let result;
326
+ try {
327
+ result = getObject(arg0) instanceof ArrayBuffer;
328
+ } catch (_) {
329
+ result = false;
330
+ }
331
+ const ret = result;
332
+ return ret;
333
+ };
334
+ exports$1.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
335
+ let result;
336
+ try {
337
+ result = getObject(arg0) instanceof Map;
338
+ } catch (_) {
339
+ result = false;
340
+ }
341
+ const ret = result;
342
+ return ret;
343
+ };
344
+ exports$1.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
345
+ let result;
346
+ try {
347
+ result = getObject(arg0) instanceof Uint8Array;
348
+ } catch (_) {
349
+ result = false;
350
+ }
351
+ const ret = result;
352
+ return ret;
353
+ };
354
+ exports$1.__wbg_isArray_96e0af9891d0945d = function(arg0) {
355
+ const ret = Array.isArray(getObject(arg0));
356
+ return ret;
357
+ };
358
+ exports$1.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
359
+ const ret = Number.isSafeInteger(getObject(arg0));
360
+ return ret;
361
+ };
362
+ exports$1.__wbg_iterator_e5822695327a3c39 = function() {
363
+ const ret = Symbol.iterator;
364
+ return addHeapObject(ret);
365
+ };
366
+ exports$1.__wbg_length_69bca3cb64fc8748 = function(arg0) {
367
+ const ret = getObject(arg0).length;
368
+ return ret;
369
+ };
370
+ exports$1.__wbg_length_cdd215e10d9dd507 = function(arg0) {
371
+ const ret = getObject(arg0).length;
372
+ return ret;
373
+ };
374
+ exports$1.__wbg_new_1acc0b6eea89d040 = function() {
375
+ const ret = new Object();
376
+ return addHeapObject(ret);
377
+ };
378
+ exports$1.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
379
+ const ret = new Uint8Array(getObject(arg0));
380
+ return addHeapObject(ret);
381
+ };
382
+ exports$1.__wbg_new_68651c719dcda04e = function() {
383
+ const ret = /* @__PURE__ */ new Map();
384
+ return addHeapObject(ret);
385
+ };
386
+ exports$1.__wbg_new_e17d9f43105b08be = function() {
387
+ const ret = new Array();
388
+ return addHeapObject(ret);
389
+ };
390
+ exports$1.__wbg_next_020810e0ae8ebcb0 = function() {
391
+ return handleError(function(arg0) {
392
+ const ret = getObject(arg0).next();
393
+ return addHeapObject(ret);
394
+ }, arguments);
395
+ };
396
+ exports$1.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
397
+ const ret = getObject(arg0).next;
398
+ return addHeapObject(ret);
399
+ };
400
+ exports$1.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
401
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
402
+ };
403
+ exports$1.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
404
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
405
+ };
406
+ exports$1.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
407
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
408
+ return addHeapObject(ret);
409
+ };
410
+ exports$1.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
411
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
412
+ };
413
+ exports$1.__wbg_value_692627309814bb8c = function(arg0) {
414
+ const ret = getObject(arg0).value;
415
+ return addHeapObject(ret);
416
+ };
417
+ exports$1.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
418
+ const ret = getStringFromWasm0(arg0, arg1);
419
+ return addHeapObject(ret);
420
+ };
421
+ exports$1.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
422
+ const ret = BigInt.asUintN(64, arg0);
423
+ return addHeapObject(ret);
424
+ };
425
+ exports$1.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
426
+ const ret = arg0;
427
+ return addHeapObject(ret);
428
+ };
429
+ exports$1.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
430
+ const ret = arg0;
431
+ return addHeapObject(ret);
432
+ };
433
+ exports$1.__wbindgen_object_clone_ref = function(arg0) {
434
+ const ret = getObject(arg0);
435
+ return addHeapObject(ret);
436
+ };
437
+ exports$1.__wbindgen_object_drop_ref = function(arg0) {
438
+ takeObject(arg0);
439
+ };
440
+ var wasmPath = `${__dirname}/kya_os_engine_bg.wasm`;
441
+ var wasmBytes = __require("fs").readFileSync(wasmPath);
442
+ var wasmModule2 = new WebAssembly.Module(wasmBytes);
443
+ var wasm = exports$1.__wasm = new WebAssembly.Instance(wasmModule2, imports).exports;
444
+ }
445
+ });
446
+
3
447
  // src/engine/index.ts
448
+ var wasmModule = __toESM(require_kya_os_engine());
4
449
  function engineVerify(input, ctx) {
5
- const result = (void 0)(input, ctx);
6
- return result;
450
+ const verify2 = wasmModule.verify;
451
+ return verify2(input, ctx);
7
452
  }
8
453
 
9
454
  exports.engineVerify = engineVerify;