@kya-os/checkpoint-wasm-runtime 1.4.2 → 1.4.3

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.
@@ -0,0 +1,574 @@
1
+ let wasm;
2
+
3
+ let cachedUint8ArrayMemory0 = null;
4
+
5
+ function getUint8ArrayMemory0() {
6
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
7
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
8
+ }
9
+ return cachedUint8ArrayMemory0;
10
+ }
11
+
12
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
13
+
14
+ cachedTextDecoder.decode();
15
+
16
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
17
+ let numBytesDecoded = 0;
18
+ function decodeText(ptr, len) {
19
+ numBytesDecoded += len;
20
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
21
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
22
+ cachedTextDecoder.decode();
23
+ numBytesDecoded = len;
24
+ }
25
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
26
+ }
27
+
28
+ function getStringFromWasm0(ptr, len) {
29
+ ptr = ptr >>> 0;
30
+ return decodeText(ptr, len);
31
+ }
32
+
33
+ let heap = new Array(128).fill(undefined);
34
+
35
+ heap.push(undefined, null, true, false);
36
+
37
+ let heap_next = heap.length;
38
+
39
+ function addHeapObject(obj) {
40
+ if (heap_next === heap.length) heap.push(heap.length + 1);
41
+ const idx = heap_next;
42
+ heap_next = heap[idx];
43
+
44
+ heap[idx] = obj;
45
+ return idx;
46
+ }
47
+
48
+ function getObject(idx) { return heap[idx]; }
49
+
50
+ let WASM_VECTOR_LEN = 0;
51
+
52
+ const cachedTextEncoder = new TextEncoder();
53
+
54
+ if (!('encodeInto' in cachedTextEncoder)) {
55
+ cachedTextEncoder.encodeInto = function (arg, view) {
56
+ const buf = cachedTextEncoder.encode(arg);
57
+ view.set(buf);
58
+ return {
59
+ read: arg.length,
60
+ written: buf.length
61
+ };
62
+ }
63
+ }
64
+
65
+ function passStringToWasm0(arg, malloc, realloc) {
66
+
67
+ if (realloc === undefined) {
68
+ const buf = cachedTextEncoder.encode(arg);
69
+ const ptr = malloc(buf.length, 1) >>> 0;
70
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
71
+ WASM_VECTOR_LEN = buf.length;
72
+ return ptr;
73
+ }
74
+
75
+ let len = arg.length;
76
+ let ptr = malloc(len, 1) >>> 0;
77
+
78
+ const mem = getUint8ArrayMemory0();
79
+
80
+ let offset = 0;
81
+
82
+ for (; offset < len; offset++) {
83
+ const code = arg.charCodeAt(offset);
84
+ if (code > 0x7F) break;
85
+ mem[ptr + offset] = code;
86
+ }
87
+
88
+ if (offset !== len) {
89
+ if (offset !== 0) {
90
+ arg = arg.slice(offset);
91
+ }
92
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
93
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
94
+ const ret = cachedTextEncoder.encodeInto(arg, view);
95
+
96
+ offset += ret.written;
97
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
98
+ }
99
+
100
+ WASM_VECTOR_LEN = offset;
101
+ return ptr;
102
+ }
103
+
104
+ let cachedDataViewMemory0 = null;
105
+
106
+ function getDataViewMemory0() {
107
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
108
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
109
+ }
110
+ return cachedDataViewMemory0;
111
+ }
112
+
113
+ function isLikeNone(x) {
114
+ return x === undefined || x === null;
115
+ }
116
+
117
+ function debugString(val) {
118
+ // primitive types
119
+ const type = typeof val;
120
+ if (type == 'number' || type == 'boolean' || val == null) {
121
+ return `${val}`;
122
+ }
123
+ if (type == 'string') {
124
+ return `"${val}"`;
125
+ }
126
+ if (type == 'symbol') {
127
+ const description = val.description;
128
+ if (description == null) {
129
+ return 'Symbol';
130
+ } else {
131
+ return `Symbol(${description})`;
132
+ }
133
+ }
134
+ if (type == 'function') {
135
+ const name = val.name;
136
+ if (typeof name == 'string' && name.length > 0) {
137
+ return `Function(${name})`;
138
+ } else {
139
+ return 'Function';
140
+ }
141
+ }
142
+ // objects
143
+ if (Array.isArray(val)) {
144
+ const length = val.length;
145
+ let debug = '[';
146
+ if (length > 0) {
147
+ debug += debugString(val[0]);
148
+ }
149
+ for(let i = 1; i < length; i++) {
150
+ debug += ', ' + debugString(val[i]);
151
+ }
152
+ debug += ']';
153
+ return debug;
154
+ }
155
+ // Test for built-in
156
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
157
+ let className;
158
+ if (builtInMatches && builtInMatches.length > 1) {
159
+ className = builtInMatches[1];
160
+ } else {
161
+ // Failed to match the standard '[object ClassName]'
162
+ return toString.call(val);
163
+ }
164
+ if (className == 'Object') {
165
+ // we're a user defined class or Object
166
+ // JSON.stringify avoids problems with cycles, and is generally much
167
+ // easier than looping through ownProperties of `val`.
168
+ try {
169
+ return 'Object(' + JSON.stringify(val) + ')';
170
+ } catch (_) {
171
+ return 'Object';
172
+ }
173
+ }
174
+ // errors
175
+ if (val instanceof Error) {
176
+ return `${val.name}: ${val.message}\n${val.stack}`;
177
+ }
178
+ // TODO we could test for more things here, like `Set`s and `Map`s.
179
+ return className;
180
+ }
181
+
182
+ function handleError(f, args) {
183
+ try {
184
+ return f.apply(this, args);
185
+ } catch (e) {
186
+ wasm.__wbindgen_export3(addHeapObject(e));
187
+ }
188
+ }
189
+
190
+ function getArrayU8FromWasm0(ptr, len) {
191
+ ptr = ptr >>> 0;
192
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
193
+ }
194
+
195
+ function dropObject(idx) {
196
+ if (idx < 132) return;
197
+ heap[idx] = heap_next;
198
+ heap_next = idx;
199
+ }
200
+
201
+ function takeObject(idx) {
202
+ const ret = getObject(idx);
203
+ dropObject(idx);
204
+ return ret;
205
+ }
206
+ /**
207
+ * Cross-boundary `verify` wrapper. The JS host calls `engine.verify(input,
208
+ * ctxSpec)`; on success it gets a [`VerifyResult`] JSON object; on
209
+ * infrastructure failure (or malformed input) it gets a thrown JS error
210
+ * whose message names the failure mode.
211
+ *
212
+ * **Error semantics**:
213
+ *
214
+ * - Verification *verdicts* (Block/Challenge/etc.) surface inside the
215
+ * returned `VerifyResult` — they are not thrown.
216
+ * - Engine [`VerifyError`][crate::error::VerifyError] (resolver / cache /
217
+ * reputation / policy infra failures) surface as thrown JS errors.
218
+ * - Serde deserialisation failures (malformed JS input) surface as thrown
219
+ * JS errors too, mirroring the typed-vs-thrown split.
220
+ *
221
+ * # JS signature
222
+ *
223
+ * ```ts
224
+ * function verify(input: AgentRequest, ctx: ContextSpec): VerifyResult;
225
+ * ```
226
+ * @param {any} input_js
227
+ * @param {any} ctx_js
228
+ * @returns {any}
229
+ */
230
+ export function verify(input_js, ctx_js) {
231
+ try {
232
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
233
+ wasm.verify(retptr, addHeapObject(input_js), addHeapObject(ctx_js));
234
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
235
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
236
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
237
+ if (r2) {
238
+ throw takeObject(r1);
239
+ }
240
+ return takeObject(r0);
241
+ } finally {
242
+ wasm.__wbindgen_add_to_stack_pointer(16);
243
+ }
244
+ }
245
+
246
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
247
+
248
+ async function __wbg_load(module, imports) {
249
+ if (typeof Response === 'function' && module instanceof Response) {
250
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
251
+ try {
252
+ return await WebAssembly.instantiateStreaming(module, imports);
253
+
254
+ } catch (e) {
255
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
256
+
257
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
258
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
259
+
260
+ } else {
261
+ throw e;
262
+ }
263
+ }
264
+ }
265
+
266
+ const bytes = await module.arrayBuffer();
267
+ return await WebAssembly.instantiate(bytes, imports);
268
+
269
+ } else {
270
+ const instance = await WebAssembly.instantiate(module, imports);
271
+
272
+ if (instance instanceof WebAssembly.Instance) {
273
+ return { instance, module };
274
+
275
+ } else {
276
+ return instance;
277
+ }
278
+ }
279
+ }
280
+
281
+ function __wbg_get_imports() {
282
+ const imports = {};
283
+ imports.wbg = {};
284
+ imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
285
+ const ret = Error(getStringFromWasm0(arg0, arg1));
286
+ return addHeapObject(ret);
287
+ };
288
+ imports.wbg.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
289
+ const ret = Number(getObject(arg0));
290
+ return ret;
291
+ };
292
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
293
+ const ret = String(getObject(arg1));
294
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
295
+ const len1 = WASM_VECTOR_LEN;
296
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
297
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
298
+ };
299
+ imports.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
300
+ const v = getObject(arg1);
301
+ const ret = typeof(v) === 'bigint' ? v : undefined;
302
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
303
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
304
+ };
305
+ imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
306
+ const v = getObject(arg0);
307
+ const ret = typeof(v) === 'boolean' ? v : undefined;
308
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
309
+ };
310
+ imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
311
+ const ret = debugString(getObject(arg1));
312
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
313
+ const len1 = WASM_VECTOR_LEN;
314
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
315
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
316
+ };
317
+ imports.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
318
+ const ret = getObject(arg0) in getObject(arg1);
319
+ return ret;
320
+ };
321
+ imports.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
322
+ const ret = typeof(getObject(arg0)) === 'bigint';
323
+ return ret;
324
+ };
325
+ imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
326
+ const ret = typeof(getObject(arg0)) === 'function';
327
+ return ret;
328
+ };
329
+ imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
330
+ const val = getObject(arg0);
331
+ const ret = typeof(val) === 'object' && val !== null;
332
+ return ret;
333
+ };
334
+ imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
335
+ const ret = typeof(getObject(arg0)) === 'string';
336
+ return ret;
337
+ };
338
+ imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
339
+ const ret = getObject(arg0) === undefined;
340
+ return ret;
341
+ };
342
+ imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
343
+ const ret = getObject(arg0) === getObject(arg1);
344
+ return ret;
345
+ };
346
+ imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
347
+ const ret = getObject(arg0) == getObject(arg1);
348
+ return ret;
349
+ };
350
+ imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
351
+ const obj = getObject(arg1);
352
+ const ret = typeof(obj) === 'number' ? obj : undefined;
353
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
354
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
355
+ };
356
+ imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
357
+ const obj = getObject(arg1);
358
+ const ret = typeof(obj) === 'string' ? obj : undefined;
359
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
360
+ var len1 = WASM_VECTOR_LEN;
361
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
362
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
363
+ };
364
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
365
+ throw new Error(getStringFromWasm0(arg0, arg1));
366
+ };
367
+ imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
368
+ const ret = getObject(arg0).call(getObject(arg1));
369
+ return addHeapObject(ret);
370
+ }, arguments) };
371
+ imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
372
+ const ret = getObject(arg0).done;
373
+ return ret;
374
+ };
375
+ imports.wbg.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
376
+ const ret = Object.entries(getObject(arg0));
377
+ return addHeapObject(ret);
378
+ };
379
+ imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
380
+ const ret = getObject(arg0)[arg1 >>> 0];
381
+ return addHeapObject(ret);
382
+ };
383
+ imports.wbg.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
384
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
385
+ return addHeapObject(ret);
386
+ }, arguments) };
387
+ imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
388
+ const ret = getObject(arg0)[getObject(arg1)];
389
+ return addHeapObject(ret);
390
+ };
391
+ imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
392
+ let result;
393
+ try {
394
+ result = getObject(arg0) instanceof ArrayBuffer;
395
+ } catch (_) {
396
+ result = false;
397
+ }
398
+ const ret = result;
399
+ return ret;
400
+ };
401
+ imports.wbg.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
402
+ let result;
403
+ try {
404
+ result = getObject(arg0) instanceof Map;
405
+ } catch (_) {
406
+ result = false;
407
+ }
408
+ const ret = result;
409
+ return ret;
410
+ };
411
+ imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
412
+ let result;
413
+ try {
414
+ result = getObject(arg0) instanceof Uint8Array;
415
+ } catch (_) {
416
+ result = false;
417
+ }
418
+ const ret = result;
419
+ return ret;
420
+ };
421
+ imports.wbg.__wbg_isArray_96e0af9891d0945d = function(arg0) {
422
+ const ret = Array.isArray(getObject(arg0));
423
+ return ret;
424
+ };
425
+ imports.wbg.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
426
+ const ret = Number.isSafeInteger(getObject(arg0));
427
+ return ret;
428
+ };
429
+ imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
430
+ const ret = Symbol.iterator;
431
+ return addHeapObject(ret);
432
+ };
433
+ imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
434
+ const ret = getObject(arg0).length;
435
+ return ret;
436
+ };
437
+ imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
438
+ const ret = getObject(arg0).length;
439
+ return ret;
440
+ };
441
+ imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
442
+ const ret = new Object();
443
+ return addHeapObject(ret);
444
+ };
445
+ imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
446
+ const ret = new Uint8Array(getObject(arg0));
447
+ return addHeapObject(ret);
448
+ };
449
+ imports.wbg.__wbg_new_68651c719dcda04e = function() {
450
+ const ret = new Map();
451
+ return addHeapObject(ret);
452
+ };
453
+ imports.wbg.__wbg_new_e17d9f43105b08be = function() {
454
+ const ret = new Array();
455
+ return addHeapObject(ret);
456
+ };
457
+ imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
458
+ const ret = getObject(arg0).next();
459
+ return addHeapObject(ret);
460
+ }, arguments) };
461
+ imports.wbg.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
462
+ const ret = getObject(arg0).next;
463
+ return addHeapObject(ret);
464
+ };
465
+ imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
466
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
467
+ };
468
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
469
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
470
+ };
471
+ imports.wbg.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
472
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
473
+ return addHeapObject(ret);
474
+ };
475
+ imports.wbg.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
476
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
477
+ };
478
+ imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
479
+ const ret = getObject(arg0).value;
480
+ return addHeapObject(ret);
481
+ };
482
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
483
+ // Cast intrinsic for `Ref(String) -> Externref`.
484
+ const ret = getStringFromWasm0(arg0, arg1);
485
+ return addHeapObject(ret);
486
+ };
487
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
488
+ // Cast intrinsic for `U64 -> Externref`.
489
+ const ret = BigInt.asUintN(64, arg0);
490
+ return addHeapObject(ret);
491
+ };
492
+ imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
493
+ // Cast intrinsic for `I64 -> Externref`.
494
+ const ret = arg0;
495
+ return addHeapObject(ret);
496
+ };
497
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
498
+ // Cast intrinsic for `F64 -> Externref`.
499
+ const ret = arg0;
500
+ return addHeapObject(ret);
501
+ };
502
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
503
+ const ret = getObject(arg0);
504
+ return addHeapObject(ret);
505
+ };
506
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
507
+ takeObject(arg0);
508
+ };
509
+
510
+ return imports;
511
+ }
512
+
513
+ function __wbg_finalize_init(instance, module) {
514
+ wasm = instance.exports;
515
+ __wbg_init.__wbindgen_wasm_module = module;
516
+ cachedDataViewMemory0 = null;
517
+ cachedUint8ArrayMemory0 = null;
518
+
519
+
520
+
521
+ return wasm;
522
+ }
523
+
524
+ function initSync(module) {
525
+ if (wasm !== undefined) return wasm;
526
+
527
+
528
+ if (typeof module !== 'undefined') {
529
+ if (Object.getPrototypeOf(module) === Object.prototype) {
530
+ ({module} = module)
531
+ } else {
532
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
533
+ }
534
+ }
535
+
536
+ const imports = __wbg_get_imports();
537
+
538
+ if (!(module instanceof WebAssembly.Module)) {
539
+ module = new WebAssembly.Module(module);
540
+ }
541
+
542
+ const instance = new WebAssembly.Instance(module, imports);
543
+
544
+ return __wbg_finalize_init(instance, module);
545
+ }
546
+
547
+ async function __wbg_init(module_or_path) {
548
+ if (wasm !== undefined) return wasm;
549
+
550
+
551
+ if (typeof module_or_path !== 'undefined') {
552
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
553
+ ({module_or_path} = module_or_path)
554
+ } else {
555
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
556
+ }
557
+ }
558
+
559
+ if (typeof module_or_path === 'undefined') {
560
+ module_or_path = new URL('kya_os_engine_bg.wasm', import.meta.url);
561
+ }
562
+ const imports = __wbg_get_imports();
563
+
564
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
565
+ module_or_path = fetch(module_or_path);
566
+ }
567
+
568
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
569
+
570
+ return __wbg_finalize_init(instance, module);
571
+ }
572
+
573
+ export { initSync };
574
+ export default __wbg_init;
@@ -0,0 +1,4 @@
1
+ let wasm;
2
+ export function __wbg_set_wasm(val) {
3
+ wasm = val;
4
+ }
@@ -0,0 +1,8 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const verify: (a: number, b: number, c: number) => void;
5
+ export const __wbindgen_export: (a: number, b: number) => number;
6
+ export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
7
+ export const __wbindgen_export3: (a: number) => void;
8
+ export const __wbindgen_add_to_stack_pointer: (a: number) => number;
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "kya-os-engine",
3
+ "type": "module",
4
+ "collaborators": [
5
+ "KnowThat.ai Team"
6
+ ],
7
+ "description": "Verification engine for the KYA-OS ecosystem. The single source of truth for detection, identity, scope, revocation, policy, and reputation across every host runtime. See ADR-001.",
8
+ "version": "0.1.0",
9
+ "license": "MIT OR Apache-2.0",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/knowthat-ai/agentshield"
13
+ },
14
+ "files": [
15
+ "kya_os_engine_bg.wasm",
16
+ "kya_os_engine.js"
17
+ ],
18
+ "main": "kya_os_engine.js",
19
+ "sideEffects": [
20
+ "./snippets/*"
21
+ ],
22
+ "keywords": [
23
+ "kya-os",
24
+ "verification",
25
+ "mcp-i",
26
+ "agent",
27
+ "did"
28
+ ]
29
+ }