@kya-os/checkpoint-wasm-runtime 1.4.0 → 1.4.2
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 +54 -0
- package/dist/adapters.d.mts +1 -1
- package/dist/adapters.d.ts +1 -1
- package/dist/engine-edge.d.mts +2 -2
- package/dist/engine-edge.d.ts +2 -2
- package/dist/engine-node.d.mts +2 -2
- package/dist/engine-node.d.ts +2 -2
- package/dist/engine.d.mts +2 -2
- package/dist/engine.d.ts +2 -2
- package/dist/orchestrator-edge.d.mts +3 -1
- package/dist/orchestrator-edge.d.ts +3 -1
- package/dist/orchestrator-edge.js +18 -0
- package/dist/orchestrator-edge.mjs +18 -0
- package/dist/orchestrator-node.d.mts +3 -1
- package/dist/orchestrator-node.d.ts +3 -1
- package/dist/orchestrator-node.js +18 -0
- package/dist/orchestrator-node.mjs +18 -0
- package/dist/orchestrator.d.mts +3 -1
- package/dist/orchestrator.d.ts +3 -1
- package/dist/orchestrator.js +18 -0
- package/dist/orchestrator.mjs +18 -0
- package/dist/{types-KPEcVvac.d.mts → types-C3RniIOM.d.mts} +28 -0
- package/dist/{types-KPEcVvac.d.ts → types-C3RniIOM.d.ts} +28 -0
- package/package.json +1 -1
- package/wasm/kya-os-engine/README.md +26 -0
- package/wasm/kya-os-engine-bundler/kya_os_engine_bg.wasm +0 -0
- package/wasm/kya-os-engine-web/README.md +26 -0
- package/wasm/kya-os-engine/kya_os_engine.d.ts +0 -24
- package/wasm/kya-os-engine/kya_os_engine.js +0 -517
- package/wasm/kya-os-engine/kya_os_engine_bg.wasm +0 -0
- package/wasm/kya-os-engine/kya_os_engine_bg.wasm.d.ts +0 -8
- package/wasm/kya-os-engine/package.json +0 -27
- package/wasm/kya-os-engine-web/kya_os_engine.d.ts +0 -56
- package/wasm/kya-os-engine-web/kya_os_engine.js +0 -574
- package/wasm/kya-os-engine-web/kya_os_engine_bg.wasm +0 -0
- package/wasm/kya-os-engine-web/kya_os_engine_bg.wasm.d.ts +0 -8
- package/wasm/kya-os-engine-web/package.json +0 -29
|
@@ -1,517 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
let imports = {};
|
|
3
|
-
imports['__wbindgen_placeholder__'] = module.exports;
|
|
4
|
-
|
|
5
|
-
let cachedUint8ArrayMemory0 = null;
|
|
6
|
-
|
|
7
|
-
function getUint8ArrayMemory0() {
|
|
8
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
9
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
10
|
-
}
|
|
11
|
-
return cachedUint8ArrayMemory0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
15
|
-
|
|
16
|
-
cachedTextDecoder.decode();
|
|
17
|
-
|
|
18
|
-
function decodeText(ptr, len) {
|
|
19
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function getStringFromWasm0(ptr, len) {
|
|
23
|
-
ptr = ptr >>> 0;
|
|
24
|
-
return decodeText(ptr, len);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
let heap = new Array(128).fill(undefined);
|
|
28
|
-
|
|
29
|
-
heap.push(undefined, null, true, false);
|
|
30
|
-
|
|
31
|
-
let heap_next = heap.length;
|
|
32
|
-
|
|
33
|
-
function addHeapObject(obj) {
|
|
34
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
35
|
-
const idx = heap_next;
|
|
36
|
-
heap_next = heap[idx];
|
|
37
|
-
|
|
38
|
-
heap[idx] = obj;
|
|
39
|
-
return idx;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function getObject(idx) { return heap[idx]; }
|
|
43
|
-
|
|
44
|
-
let WASM_VECTOR_LEN = 0;
|
|
45
|
-
|
|
46
|
-
const cachedTextEncoder = new TextEncoder();
|
|
47
|
-
|
|
48
|
-
if (!('encodeInto' in cachedTextEncoder)) {
|
|
49
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
50
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
51
|
-
view.set(buf);
|
|
52
|
-
return {
|
|
53
|
-
read: arg.length,
|
|
54
|
-
written: buf.length
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
60
|
-
|
|
61
|
-
if (realloc === undefined) {
|
|
62
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
63
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
64
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
65
|
-
WASM_VECTOR_LEN = buf.length;
|
|
66
|
-
return ptr;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
let len = arg.length;
|
|
70
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
71
|
-
|
|
72
|
-
const mem = getUint8ArrayMemory0();
|
|
73
|
-
|
|
74
|
-
let offset = 0;
|
|
75
|
-
|
|
76
|
-
for (; offset < len; offset++) {
|
|
77
|
-
const code = arg.charCodeAt(offset);
|
|
78
|
-
if (code > 0x7F) break;
|
|
79
|
-
mem[ptr + offset] = code;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (offset !== len) {
|
|
83
|
-
if (offset !== 0) {
|
|
84
|
-
arg = arg.slice(offset);
|
|
85
|
-
}
|
|
86
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
87
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
88
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
89
|
-
|
|
90
|
-
offset += ret.written;
|
|
91
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
WASM_VECTOR_LEN = offset;
|
|
95
|
-
return ptr;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
let cachedDataViewMemory0 = null;
|
|
99
|
-
|
|
100
|
-
function getDataViewMemory0() {
|
|
101
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
102
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
103
|
-
}
|
|
104
|
-
return cachedDataViewMemory0;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function isLikeNone(x) {
|
|
108
|
-
return x === undefined || x === null;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function debugString(val) {
|
|
112
|
-
// primitive types
|
|
113
|
-
const type = typeof val;
|
|
114
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
115
|
-
return `${val}`;
|
|
116
|
-
}
|
|
117
|
-
if (type == 'string') {
|
|
118
|
-
return `"${val}"`;
|
|
119
|
-
}
|
|
120
|
-
if (type == 'symbol') {
|
|
121
|
-
const description = val.description;
|
|
122
|
-
if (description == null) {
|
|
123
|
-
return 'Symbol';
|
|
124
|
-
} else {
|
|
125
|
-
return `Symbol(${description})`;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
if (type == 'function') {
|
|
129
|
-
const name = val.name;
|
|
130
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
131
|
-
return `Function(${name})`;
|
|
132
|
-
} else {
|
|
133
|
-
return 'Function';
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
// objects
|
|
137
|
-
if (Array.isArray(val)) {
|
|
138
|
-
const length = val.length;
|
|
139
|
-
let debug = '[';
|
|
140
|
-
if (length > 0) {
|
|
141
|
-
debug += debugString(val[0]);
|
|
142
|
-
}
|
|
143
|
-
for(let i = 1; i < length; i++) {
|
|
144
|
-
debug += ', ' + debugString(val[i]);
|
|
145
|
-
}
|
|
146
|
-
debug += ']';
|
|
147
|
-
return debug;
|
|
148
|
-
}
|
|
149
|
-
// Test for built-in
|
|
150
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
151
|
-
let className;
|
|
152
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
153
|
-
className = builtInMatches[1];
|
|
154
|
-
} else {
|
|
155
|
-
// Failed to match the standard '[object ClassName]'
|
|
156
|
-
return toString.call(val);
|
|
157
|
-
}
|
|
158
|
-
if (className == 'Object') {
|
|
159
|
-
// we're a user defined class or Object
|
|
160
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
161
|
-
// easier than looping through ownProperties of `val`.
|
|
162
|
-
try {
|
|
163
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
164
|
-
} catch (_) {
|
|
165
|
-
return 'Object';
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
// errors
|
|
169
|
-
if (val instanceof Error) {
|
|
170
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
171
|
-
}
|
|
172
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
173
|
-
return className;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function handleError(f, args) {
|
|
177
|
-
try {
|
|
178
|
-
return f.apply(this, args);
|
|
179
|
-
} catch (e) {
|
|
180
|
-
wasm.__wbindgen_export3(addHeapObject(e));
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
185
|
-
ptr = ptr >>> 0;
|
|
186
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
function dropObject(idx) {
|
|
190
|
-
if (idx < 132) return;
|
|
191
|
-
heap[idx] = heap_next;
|
|
192
|
-
heap_next = idx;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
function takeObject(idx) {
|
|
196
|
-
const ret = getObject(idx);
|
|
197
|
-
dropObject(idx);
|
|
198
|
-
return ret;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Cross-boundary `verify` wrapper. The JS host calls `engine.verify(input,
|
|
202
|
-
* ctxSpec)`; on success it gets a [`VerifyResult`] JSON object; on
|
|
203
|
-
* infrastructure failure (or malformed input) it gets a thrown JS error
|
|
204
|
-
* whose message names the failure mode.
|
|
205
|
-
*
|
|
206
|
-
* **Error semantics**:
|
|
207
|
-
*
|
|
208
|
-
* - Verification *verdicts* (Block/Challenge/etc.) surface inside the
|
|
209
|
-
* returned `VerifyResult` — they are not thrown.
|
|
210
|
-
* - Engine [`VerifyError`][crate::error::VerifyError] (resolver / cache /
|
|
211
|
-
* reputation / policy infra failures) surface as thrown JS errors.
|
|
212
|
-
* - Serde deserialisation failures (malformed JS input) surface as thrown
|
|
213
|
-
* JS errors too, mirroring the typed-vs-thrown split.
|
|
214
|
-
*
|
|
215
|
-
* # JS signature
|
|
216
|
-
*
|
|
217
|
-
* ```ts
|
|
218
|
-
* function verify(input: AgentRequest, ctx: ContextSpec): VerifyResult;
|
|
219
|
-
* ```
|
|
220
|
-
* @param {any} input_js
|
|
221
|
-
* @param {any} ctx_js
|
|
222
|
-
* @returns {any}
|
|
223
|
-
*/
|
|
224
|
-
exports.verify = function(input_js, ctx_js) {
|
|
225
|
-
try {
|
|
226
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
227
|
-
wasm.verify(retptr, addHeapObject(input_js), addHeapObject(ctx_js));
|
|
228
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
229
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
230
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
231
|
-
if (r2) {
|
|
232
|
-
throw takeObject(r1);
|
|
233
|
-
}
|
|
234
|
-
return takeObject(r0);
|
|
235
|
-
} finally {
|
|
236
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
exports.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
|
|
241
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
242
|
-
return addHeapObject(ret);
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
exports.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
|
|
246
|
-
const ret = Number(getObject(arg0));
|
|
247
|
-
return ret;
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
251
|
-
const ret = String(getObject(arg1));
|
|
252
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
253
|
-
const len1 = WASM_VECTOR_LEN;
|
|
254
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
255
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
exports.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
|
|
259
|
-
const v = getObject(arg1);
|
|
260
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
261
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
262
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
exports.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
|
|
266
|
-
const v = getObject(arg0);
|
|
267
|
-
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
268
|
-
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
exports.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
|
|
272
|
-
const ret = debugString(getObject(arg1));
|
|
273
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
274
|
-
const len1 = WASM_VECTOR_LEN;
|
|
275
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
276
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
exports.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
|
|
280
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
281
|
-
return ret;
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
exports.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
|
|
285
|
-
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
286
|
-
return ret;
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
exports.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
|
|
290
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
291
|
-
return ret;
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
exports.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
|
|
295
|
-
const val = getObject(arg0);
|
|
296
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
297
|
-
return ret;
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
exports.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
|
|
301
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
|
302
|
-
return ret;
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
exports.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
|
|
306
|
-
const ret = getObject(arg0) === undefined;
|
|
307
|
-
return ret;
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
exports.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
|
|
311
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
312
|
-
return ret;
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
exports.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
|
|
316
|
-
const ret = getObject(arg0) == getObject(arg1);
|
|
317
|
-
return ret;
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
exports.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
|
|
321
|
-
const obj = getObject(arg1);
|
|
322
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
323
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
324
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
325
|
-
};
|
|
326
|
-
|
|
327
|
-
exports.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
|
|
328
|
-
const obj = getObject(arg1);
|
|
329
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
330
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
331
|
-
var len1 = WASM_VECTOR_LEN;
|
|
332
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
333
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
334
|
-
};
|
|
335
|
-
|
|
336
|
-
exports.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
|
|
337
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
exports.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
|
|
341
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
342
|
-
return addHeapObject(ret);
|
|
343
|
-
}, arguments) };
|
|
344
|
-
|
|
345
|
-
exports.__wbg_done_2042aa2670fb1db1 = function(arg0) {
|
|
346
|
-
const ret = getObject(arg0).done;
|
|
347
|
-
return ret;
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
exports.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
|
|
351
|
-
const ret = Object.entries(getObject(arg0));
|
|
352
|
-
return addHeapObject(ret);
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
exports.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
|
|
356
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
357
|
-
return addHeapObject(ret);
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
exports.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
|
|
361
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
362
|
-
return addHeapObject(ret);
|
|
363
|
-
}, arguments) };
|
|
364
|
-
|
|
365
|
-
exports.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
|
|
366
|
-
const ret = getObject(arg0)[getObject(arg1)];
|
|
367
|
-
return addHeapObject(ret);
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
exports.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
|
|
371
|
-
let result;
|
|
372
|
-
try {
|
|
373
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
|
374
|
-
} catch (_) {
|
|
375
|
-
result = false;
|
|
376
|
-
}
|
|
377
|
-
const ret = result;
|
|
378
|
-
return ret;
|
|
379
|
-
};
|
|
380
|
-
|
|
381
|
-
exports.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
|
|
382
|
-
let result;
|
|
383
|
-
try {
|
|
384
|
-
result = getObject(arg0) instanceof Map;
|
|
385
|
-
} catch (_) {
|
|
386
|
-
result = false;
|
|
387
|
-
}
|
|
388
|
-
const ret = result;
|
|
389
|
-
return ret;
|
|
390
|
-
};
|
|
391
|
-
|
|
392
|
-
exports.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
|
|
393
|
-
let result;
|
|
394
|
-
try {
|
|
395
|
-
result = getObject(arg0) instanceof Uint8Array;
|
|
396
|
-
} catch (_) {
|
|
397
|
-
result = false;
|
|
398
|
-
}
|
|
399
|
-
const ret = result;
|
|
400
|
-
return ret;
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
exports.__wbg_isArray_96e0af9891d0945d = function(arg0) {
|
|
404
|
-
const ret = Array.isArray(getObject(arg0));
|
|
405
|
-
return ret;
|
|
406
|
-
};
|
|
407
|
-
|
|
408
|
-
exports.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
|
|
409
|
-
const ret = Number.isSafeInteger(getObject(arg0));
|
|
410
|
-
return ret;
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
exports.__wbg_iterator_e5822695327a3c39 = function() {
|
|
414
|
-
const ret = Symbol.iterator;
|
|
415
|
-
return addHeapObject(ret);
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
exports.__wbg_length_69bca3cb64fc8748 = function(arg0) {
|
|
419
|
-
const ret = getObject(arg0).length;
|
|
420
|
-
return ret;
|
|
421
|
-
};
|
|
422
|
-
|
|
423
|
-
exports.__wbg_length_cdd215e10d9dd507 = function(arg0) {
|
|
424
|
-
const ret = getObject(arg0).length;
|
|
425
|
-
return ret;
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
exports.__wbg_new_1acc0b6eea89d040 = function() {
|
|
429
|
-
const ret = new Object();
|
|
430
|
-
return addHeapObject(ret);
|
|
431
|
-
};
|
|
432
|
-
|
|
433
|
-
exports.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
|
|
434
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
435
|
-
return addHeapObject(ret);
|
|
436
|
-
};
|
|
437
|
-
|
|
438
|
-
exports.__wbg_new_68651c719dcda04e = function() {
|
|
439
|
-
const ret = new Map();
|
|
440
|
-
return addHeapObject(ret);
|
|
441
|
-
};
|
|
442
|
-
|
|
443
|
-
exports.__wbg_new_e17d9f43105b08be = function() {
|
|
444
|
-
const ret = new Array();
|
|
445
|
-
return addHeapObject(ret);
|
|
446
|
-
};
|
|
447
|
-
|
|
448
|
-
exports.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
|
|
449
|
-
const ret = getObject(arg0).next();
|
|
450
|
-
return addHeapObject(ret);
|
|
451
|
-
}, arguments) };
|
|
452
|
-
|
|
453
|
-
exports.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
|
|
454
|
-
const ret = getObject(arg0).next;
|
|
455
|
-
return addHeapObject(ret);
|
|
456
|
-
};
|
|
457
|
-
|
|
458
|
-
exports.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
|
|
459
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
460
|
-
};
|
|
461
|
-
|
|
462
|
-
exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
463
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
464
|
-
};
|
|
465
|
-
|
|
466
|
-
exports.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
|
|
467
|
-
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
468
|
-
return addHeapObject(ret);
|
|
469
|
-
};
|
|
470
|
-
|
|
471
|
-
exports.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
|
|
472
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
473
|
-
};
|
|
474
|
-
|
|
475
|
-
exports.__wbg_value_692627309814bb8c = function(arg0) {
|
|
476
|
-
const ret = getObject(arg0).value;
|
|
477
|
-
return addHeapObject(ret);
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
481
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
482
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
483
|
-
return addHeapObject(ret);
|
|
484
|
-
};
|
|
485
|
-
|
|
486
|
-
exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
487
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
488
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
489
|
-
return addHeapObject(ret);
|
|
490
|
-
};
|
|
491
|
-
|
|
492
|
-
exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
493
|
-
// Cast intrinsic for `I64 -> Externref`.
|
|
494
|
-
const ret = arg0;
|
|
495
|
-
return addHeapObject(ret);
|
|
496
|
-
};
|
|
497
|
-
|
|
498
|
-
exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
499
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
500
|
-
const ret = arg0;
|
|
501
|
-
return addHeapObject(ret);
|
|
502
|
-
};
|
|
503
|
-
|
|
504
|
-
exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
505
|
-
const ret = getObject(arg0);
|
|
506
|
-
return addHeapObject(ret);
|
|
507
|
-
};
|
|
508
|
-
|
|
509
|
-
exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
510
|
-
takeObject(arg0);
|
|
511
|
-
};
|
|
512
|
-
|
|
513
|
-
const wasmPath = `${__dirname}/kya_os_engine_bg.wasm`;
|
|
514
|
-
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
515
|
-
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
516
|
-
const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
|
|
517
|
-
|
|
Binary file
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "kya-os-engine",
|
|
3
|
-
"collaborators": [
|
|
4
|
-
"KnowThat.ai Team"
|
|
5
|
-
],
|
|
6
|
-
"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.",
|
|
7
|
-
"version": "0.1.0",
|
|
8
|
-
"license": "MIT OR Apache-2.0",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "https://github.com/knowthat-ai/agentshield"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"kya_os_engine_bg.wasm",
|
|
15
|
-
"kya_os_engine.js"
|
|
16
|
-
],
|
|
17
|
-
"main": "kya_os_engine.js",
|
|
18
|
-
"keywords": [
|
|
19
|
-
"kya-os",
|
|
20
|
-
"verification",
|
|
21
|
-
"mcp-i",
|
|
22
|
-
"agent",
|
|
23
|
-
"did"
|
|
24
|
-
],
|
|
25
|
-
"type": "commonjs",
|
|
26
|
-
"_note": "wasm-bindgen --target nodejs output: uses module.exports + require('fs') at module load. The parent wasm/package.json says type:module (for the older agentshield_wasm.js ESM file), which would make Node mis-classify this CJS file and throw ERR_REQUIRE_ESM. This nested package.json overrides per Node's nearest-package.json resolution algorithm. See SDK-WASM-Bundler-Loader-1 (#2613) for the original incident; AIVF-1 Path B (#2639) re-instated this override after a wasm-pack regen silently dropped it, plus a regen-pipeline patcher (rust/scripts/build-engine-wasm.sh) + an integrity test (packages/checkpoint-wasm-runtime/src/__tests__/wasm-artifact-integrity.test.ts) so the next regen can't silently break Node consumers again."
|
|
27
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Cross-boundary `verify` wrapper. The JS host calls `engine.verify(input,
|
|
5
|
-
* ctxSpec)`; on success it gets a [`VerifyResult`] JSON object; on
|
|
6
|
-
* infrastructure failure (or malformed input) it gets a thrown JS error
|
|
7
|
-
* whose message names the failure mode.
|
|
8
|
-
*
|
|
9
|
-
* **Error semantics**:
|
|
10
|
-
*
|
|
11
|
-
* - Verification *verdicts* (Block/Challenge/etc.) surface inside the
|
|
12
|
-
* returned `VerifyResult` — they are not thrown.
|
|
13
|
-
* - Engine [`VerifyError`][crate::error::VerifyError] (resolver / cache /
|
|
14
|
-
* reputation / policy infra failures) surface as thrown JS errors.
|
|
15
|
-
* - Serde deserialisation failures (malformed JS input) surface as thrown
|
|
16
|
-
* JS errors too, mirroring the typed-vs-thrown split.
|
|
17
|
-
*
|
|
18
|
-
* # JS signature
|
|
19
|
-
*
|
|
20
|
-
* ```ts
|
|
21
|
-
* function verify(input: AgentRequest, ctx: ContextSpec): VerifyResult;
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export function verify(input_js: any, ctx_js: any): any;
|
|
25
|
-
|
|
26
|
-
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
27
|
-
|
|
28
|
-
export interface InitOutput {
|
|
29
|
-
readonly memory: WebAssembly.Memory;
|
|
30
|
-
readonly verify: (a: number, b: number, c: number) => void;
|
|
31
|
-
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
32
|
-
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
33
|
-
readonly __wbindgen_export3: (a: number) => void;
|
|
34
|
-
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
38
|
-
/**
|
|
39
|
-
* Instantiates the given `module`, which can either be bytes or
|
|
40
|
-
* a precompiled `WebAssembly.Module`.
|
|
41
|
-
*
|
|
42
|
-
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
43
|
-
*
|
|
44
|
-
* @returns {InitOutput}
|
|
45
|
-
*/
|
|
46
|
-
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
50
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
51
|
-
*
|
|
52
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
53
|
-
*
|
|
54
|
-
* @returns {Promise<InitOutput>}
|
|
55
|
-
*/
|
|
56
|
-
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|