@kya-os/checkpoint-wasm-runtime 1.3.0 → 1.4.0
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 +110 -1
- 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-edge.js +3 -509
- package/dist/engine-edge.mjs +3 -508
- package/dist/engine-node.d.mts +46 -0
- package/dist/engine-node.d.ts +46 -0
- package/dist/engine-node.js +31 -0
- package/dist/engine-node.mjs +10 -0
- package/dist/engine.d.mts +25 -4
- package/dist/engine.d.ts +25 -4
- package/dist/engine.js +2 -457
- package/dist/engine.mjs +2 -464
- package/dist/index.d.mts +531 -3
- package/dist/index.d.ts +531 -3
- package/dist/index.js +2 -28
- package/dist/index.mjs +2 -29
- package/dist/node.d.mts +524 -3
- package/dist/node.d.ts +524 -3
- package/dist/node.js +2 -26
- package/dist/node.mjs +2 -26
- package/dist/orchestrator-edge.d.mts +24 -10
- package/dist/orchestrator-edge.d.ts +24 -10
- package/dist/orchestrator-edge.js +5 -510
- package/dist/orchestrator-edge.mjs +5 -509
- package/dist/orchestrator-node.d.mts +60 -52
- package/dist/orchestrator-node.d.ts +60 -52
- package/dist/orchestrator-node.js +50 -487
- package/dist/orchestrator-node.mjs +34 -497
- package/dist/orchestrator.d.mts +356 -4
- package/dist/orchestrator.d.ts +356 -4
- package/dist/orchestrator.js +37 -1001
- package/dist/orchestrator.mjs +37 -1005
- package/dist/{types-ByrdPLL2.d.ts → types-KPEcVvac.d.mts} +31 -1
- package/dist/{types-ByrdPLL2.d.mts → types-KPEcVvac.d.ts} +31 -1
- package/package.json +13 -2
- package/wasm/kya-os-engine/kya_os_engine_bg.wasm +0 -0
- package/wasm/kya-os-engine/package.json +24 -4
- package/wasm/kya-os-engine-bundler/kya_os_engine.d.ts +24 -0
- package/wasm/kya-os-engine-bundler/kya_os_engine.js +4 -0
- package/wasm/kya-os-engine-bundler/kya_os_engine_bg.js +522 -0
- package/wasm/kya-os-engine-bundler/kya_os_engine_bg.wasm +0 -0
- package/wasm/kya-os-engine-bundler/kya_os_engine_bg.wasm.d.ts +8 -0
- package/wasm/kya-os-engine-web/kya_os_engine_bg.wasm +0 -0
- package/wasm/kya-os-engine-web/package.json +25 -3
- package/dist/kya_os_engine_bg.wasm +0 -0
- package/dist/rules-detector-ZIKHN-_y.d.mts +0 -532
- package/dist/rules-detector-ZIKHN-_y.d.ts +0 -532
package/dist/orchestrator.js
CHANGED
|
@@ -1,970 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
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 __esm = (fn, res) => function __init() {
|
|
16
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
17
|
-
};
|
|
18
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
19
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
20
|
-
};
|
|
21
|
-
var __export = (target, all) => {
|
|
22
|
-
for (var name in all)
|
|
23
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
24
|
-
};
|
|
25
|
-
var __copyProps = (to, from, except, desc) => {
|
|
26
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
|
-
for (let key of __getOwnPropNames(from))
|
|
28
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
29
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
30
|
-
}
|
|
31
|
-
return to;
|
|
32
|
-
};
|
|
33
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
34
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
35
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
36
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
37
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
38
|
-
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
39
|
-
mod
|
|
40
|
-
));
|
|
41
|
-
|
|
42
|
-
// ../../node_modules/.pnpm/tsup@8.5.0_@swc+core@1.15.32_jiti@2.6.1_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3_yaml@2.8.3/node_modules/tsup/assets/cjs_shims.js
|
|
43
|
-
var getImportMetaUrl, importMetaUrl;
|
|
44
|
-
var init_cjs_shims = __esm({
|
|
45
|
-
"../../node_modules/.pnpm/tsup@8.5.0_@swc+core@1.15.32_jiti@2.6.1_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3_yaml@2.8.3/node_modules/tsup/assets/cjs_shims.js"() {
|
|
46
|
-
getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
47
|
-
importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
// wasm/kya-os-engine/kya_os_engine.js
|
|
52
|
-
var require_kya_os_engine = __commonJS({
|
|
53
|
-
"wasm/kya-os-engine/kya_os_engine.js"(exports$1, module) {
|
|
54
|
-
init_cjs_shims();
|
|
55
|
-
var imports = {};
|
|
56
|
-
imports["__wbindgen_placeholder__"] = module.exports;
|
|
57
|
-
var cachedUint8ArrayMemory02 = null;
|
|
58
|
-
function getUint8ArrayMemory02() {
|
|
59
|
-
if (cachedUint8ArrayMemory02 === null || cachedUint8ArrayMemory02.byteLength === 0) {
|
|
60
|
-
cachedUint8ArrayMemory02 = new Uint8Array(wasm2.memory.buffer);
|
|
61
|
-
}
|
|
62
|
-
return cachedUint8ArrayMemory02;
|
|
63
|
-
}
|
|
64
|
-
var cachedTextDecoder2 = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
65
|
-
cachedTextDecoder2.decode();
|
|
66
|
-
function decodeText2(ptr, len) {
|
|
67
|
-
return cachedTextDecoder2.decode(getUint8ArrayMemory02().subarray(ptr, ptr + len));
|
|
68
|
-
}
|
|
69
|
-
function getStringFromWasm02(ptr, len) {
|
|
70
|
-
ptr = ptr >>> 0;
|
|
71
|
-
return decodeText2(ptr, len);
|
|
72
|
-
}
|
|
73
|
-
var heap2 = new Array(128).fill(void 0);
|
|
74
|
-
heap2.push(void 0, null, true, false);
|
|
75
|
-
var heap_next2 = heap2.length;
|
|
76
|
-
function addHeapObject2(obj) {
|
|
77
|
-
if (heap_next2 === heap2.length) heap2.push(heap2.length + 1);
|
|
78
|
-
const idx = heap_next2;
|
|
79
|
-
heap_next2 = heap2[idx];
|
|
80
|
-
heap2[idx] = obj;
|
|
81
|
-
return idx;
|
|
82
|
-
}
|
|
83
|
-
function getObject2(idx) {
|
|
84
|
-
return heap2[idx];
|
|
85
|
-
}
|
|
86
|
-
var WASM_VECTOR_LEN2 = 0;
|
|
87
|
-
var cachedTextEncoder2 = new TextEncoder();
|
|
88
|
-
if (!("encodeInto" in cachedTextEncoder2)) {
|
|
89
|
-
cachedTextEncoder2.encodeInto = function(arg, view) {
|
|
90
|
-
const buf = cachedTextEncoder2.encode(arg);
|
|
91
|
-
view.set(buf);
|
|
92
|
-
return {
|
|
93
|
-
read: arg.length,
|
|
94
|
-
written: buf.length
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
function passStringToWasm02(arg, malloc, realloc) {
|
|
99
|
-
if (realloc === void 0) {
|
|
100
|
-
const buf = cachedTextEncoder2.encode(arg);
|
|
101
|
-
const ptr2 = malloc(buf.length, 1) >>> 0;
|
|
102
|
-
getUint8ArrayMemory02().subarray(ptr2, ptr2 + buf.length).set(buf);
|
|
103
|
-
WASM_VECTOR_LEN2 = buf.length;
|
|
104
|
-
return ptr2;
|
|
105
|
-
}
|
|
106
|
-
let len = arg.length;
|
|
107
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
108
|
-
const mem = getUint8ArrayMemory02();
|
|
109
|
-
let offset = 0;
|
|
110
|
-
for (; offset < len; offset++) {
|
|
111
|
-
const code = arg.charCodeAt(offset);
|
|
112
|
-
if (code > 127) break;
|
|
113
|
-
mem[ptr + offset] = code;
|
|
114
|
-
}
|
|
115
|
-
if (offset !== len) {
|
|
116
|
-
if (offset !== 0) {
|
|
117
|
-
arg = arg.slice(offset);
|
|
118
|
-
}
|
|
119
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
120
|
-
const view = getUint8ArrayMemory02().subarray(ptr + offset, ptr + len);
|
|
121
|
-
const ret = cachedTextEncoder2.encodeInto(arg, view);
|
|
122
|
-
offset += ret.written;
|
|
123
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
124
|
-
}
|
|
125
|
-
WASM_VECTOR_LEN2 = offset;
|
|
126
|
-
return ptr;
|
|
127
|
-
}
|
|
128
|
-
var cachedDataViewMemory02 = null;
|
|
129
|
-
function getDataViewMemory02() {
|
|
130
|
-
if (cachedDataViewMemory02 === null || cachedDataViewMemory02.buffer.detached === true || cachedDataViewMemory02.buffer.detached === void 0 && cachedDataViewMemory02.buffer !== wasm2.memory.buffer) {
|
|
131
|
-
cachedDataViewMemory02 = new DataView(wasm2.memory.buffer);
|
|
132
|
-
}
|
|
133
|
-
return cachedDataViewMemory02;
|
|
134
|
-
}
|
|
135
|
-
function isLikeNone2(x) {
|
|
136
|
-
return x === void 0 || x === null;
|
|
137
|
-
}
|
|
138
|
-
function debugString2(val) {
|
|
139
|
-
const type = typeof val;
|
|
140
|
-
if (type == "number" || type == "boolean" || val == null) {
|
|
141
|
-
return `${val}`;
|
|
142
|
-
}
|
|
143
|
-
if (type == "string") {
|
|
144
|
-
return `"${val}"`;
|
|
145
|
-
}
|
|
146
|
-
if (type == "symbol") {
|
|
147
|
-
const description = val.description;
|
|
148
|
-
if (description == null) {
|
|
149
|
-
return "Symbol";
|
|
150
|
-
} else {
|
|
151
|
-
return `Symbol(${description})`;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
if (type == "function") {
|
|
155
|
-
const name = val.name;
|
|
156
|
-
if (typeof name == "string" && name.length > 0) {
|
|
157
|
-
return `Function(${name})`;
|
|
158
|
-
} else {
|
|
159
|
-
return "Function";
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
if (Array.isArray(val)) {
|
|
163
|
-
const length = val.length;
|
|
164
|
-
let debug = "[";
|
|
165
|
-
if (length > 0) {
|
|
166
|
-
debug += debugString2(val[0]);
|
|
167
|
-
}
|
|
168
|
-
for (let i = 1; i < length; i++) {
|
|
169
|
-
debug += ", " + debugString2(val[i]);
|
|
170
|
-
}
|
|
171
|
-
debug += "]";
|
|
172
|
-
return debug;
|
|
173
|
-
}
|
|
174
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
175
|
-
let className;
|
|
176
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
177
|
-
className = builtInMatches[1];
|
|
178
|
-
} else {
|
|
179
|
-
return toString.call(val);
|
|
180
|
-
}
|
|
181
|
-
if (className == "Object") {
|
|
182
|
-
try {
|
|
183
|
-
return "Object(" + JSON.stringify(val) + ")";
|
|
184
|
-
} catch (_) {
|
|
185
|
-
return "Object";
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
if (val instanceof Error) {
|
|
189
|
-
return `${val.name}: ${val.message}
|
|
190
|
-
${val.stack}`;
|
|
191
|
-
}
|
|
192
|
-
return className;
|
|
193
|
-
}
|
|
194
|
-
function handleError2(f, args) {
|
|
195
|
-
try {
|
|
196
|
-
return f.apply(this, args);
|
|
197
|
-
} catch (e) {
|
|
198
|
-
wasm2.__wbindgen_export3(addHeapObject2(e));
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
function getArrayU8FromWasm02(ptr, len) {
|
|
202
|
-
ptr = ptr >>> 0;
|
|
203
|
-
return getUint8ArrayMemory02().subarray(ptr / 1, ptr / 1 + len);
|
|
204
|
-
}
|
|
205
|
-
function dropObject2(idx) {
|
|
206
|
-
if (idx < 132) return;
|
|
207
|
-
heap2[idx] = heap_next2;
|
|
208
|
-
heap_next2 = idx;
|
|
209
|
-
}
|
|
210
|
-
function takeObject2(idx) {
|
|
211
|
-
const ret = getObject2(idx);
|
|
212
|
-
dropObject2(idx);
|
|
213
|
-
return ret;
|
|
214
|
-
}
|
|
215
|
-
exports$1.verify = function(input_js, ctx_js) {
|
|
216
|
-
try {
|
|
217
|
-
const retptr = wasm2.__wbindgen_add_to_stack_pointer(-16);
|
|
218
|
-
wasm2.verify(retptr, addHeapObject2(input_js), addHeapObject2(ctx_js));
|
|
219
|
-
var r0 = getDataViewMemory02().getInt32(retptr + 4 * 0, true);
|
|
220
|
-
var r1 = getDataViewMemory02().getInt32(retptr + 4 * 1, true);
|
|
221
|
-
var r2 = getDataViewMemory02().getInt32(retptr + 4 * 2, true);
|
|
222
|
-
if (r2) {
|
|
223
|
-
throw takeObject2(r1);
|
|
224
|
-
}
|
|
225
|
-
return takeObject2(r0);
|
|
226
|
-
} finally {
|
|
227
|
-
wasm2.__wbindgen_add_to_stack_pointer(16);
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
exports$1.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
|
|
231
|
-
const ret = Error(getStringFromWasm02(arg0, arg1));
|
|
232
|
-
return addHeapObject2(ret);
|
|
233
|
-
};
|
|
234
|
-
exports$1.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
|
|
235
|
-
const ret = Number(getObject2(arg0));
|
|
236
|
-
return ret;
|
|
237
|
-
};
|
|
238
|
-
exports$1.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
239
|
-
const ret = String(getObject2(arg1));
|
|
240
|
-
const ptr1 = passStringToWasm02(ret, wasm2.__wbindgen_export, wasm2.__wbindgen_export2);
|
|
241
|
-
const len1 = WASM_VECTOR_LEN2;
|
|
242
|
-
getDataViewMemory02().setInt32(arg0 + 4 * 1, len1, true);
|
|
243
|
-
getDataViewMemory02().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
244
|
-
};
|
|
245
|
-
exports$1.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
|
|
246
|
-
const v = getObject2(arg1);
|
|
247
|
-
const ret = typeof v === "bigint" ? v : void 0;
|
|
248
|
-
getDataViewMemory02().setBigInt64(arg0 + 8 * 1, isLikeNone2(ret) ? BigInt(0) : ret, true);
|
|
249
|
-
getDataViewMemory02().setInt32(arg0 + 4 * 0, !isLikeNone2(ret), true);
|
|
250
|
-
};
|
|
251
|
-
exports$1.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
|
|
252
|
-
const v = getObject2(arg0);
|
|
253
|
-
const ret = typeof v === "boolean" ? v : void 0;
|
|
254
|
-
return isLikeNone2(ret) ? 16777215 : ret ? 1 : 0;
|
|
255
|
-
};
|
|
256
|
-
exports$1.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
|
|
257
|
-
const ret = debugString2(getObject2(arg1));
|
|
258
|
-
const ptr1 = passStringToWasm02(ret, wasm2.__wbindgen_export, wasm2.__wbindgen_export2);
|
|
259
|
-
const len1 = WASM_VECTOR_LEN2;
|
|
260
|
-
getDataViewMemory02().setInt32(arg0 + 4 * 1, len1, true);
|
|
261
|
-
getDataViewMemory02().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
262
|
-
};
|
|
263
|
-
exports$1.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
|
|
264
|
-
const ret = getObject2(arg0) in getObject2(arg1);
|
|
265
|
-
return ret;
|
|
266
|
-
};
|
|
267
|
-
exports$1.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
|
|
268
|
-
const ret = typeof getObject2(arg0) === "bigint";
|
|
269
|
-
return ret;
|
|
270
|
-
};
|
|
271
|
-
exports$1.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
|
|
272
|
-
const ret = typeof getObject2(arg0) === "function";
|
|
273
|
-
return ret;
|
|
274
|
-
};
|
|
275
|
-
exports$1.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
|
|
276
|
-
const val = getObject2(arg0);
|
|
277
|
-
const ret = typeof val === "object" && val !== null;
|
|
278
|
-
return ret;
|
|
279
|
-
};
|
|
280
|
-
exports$1.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
|
|
281
|
-
const ret = typeof getObject2(arg0) === "string";
|
|
282
|
-
return ret;
|
|
283
|
-
};
|
|
284
|
-
exports$1.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
|
|
285
|
-
const ret = getObject2(arg0) === void 0;
|
|
286
|
-
return ret;
|
|
287
|
-
};
|
|
288
|
-
exports$1.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
|
|
289
|
-
const ret = getObject2(arg0) === getObject2(arg1);
|
|
290
|
-
return ret;
|
|
291
|
-
};
|
|
292
|
-
exports$1.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
|
|
293
|
-
const ret = getObject2(arg0) == getObject2(arg1);
|
|
294
|
-
return ret;
|
|
295
|
-
};
|
|
296
|
-
exports$1.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
|
|
297
|
-
const obj = getObject2(arg1);
|
|
298
|
-
const ret = typeof obj === "number" ? obj : void 0;
|
|
299
|
-
getDataViewMemory02().setFloat64(arg0 + 8 * 1, isLikeNone2(ret) ? 0 : ret, true);
|
|
300
|
-
getDataViewMemory02().setInt32(arg0 + 4 * 0, !isLikeNone2(ret), true);
|
|
301
|
-
};
|
|
302
|
-
exports$1.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
|
|
303
|
-
const obj = getObject2(arg1);
|
|
304
|
-
const ret = typeof obj === "string" ? obj : void 0;
|
|
305
|
-
var ptr1 = isLikeNone2(ret) ? 0 : passStringToWasm02(ret, wasm2.__wbindgen_export, wasm2.__wbindgen_export2);
|
|
306
|
-
var len1 = WASM_VECTOR_LEN2;
|
|
307
|
-
getDataViewMemory02().setInt32(arg0 + 4 * 1, len1, true);
|
|
308
|
-
getDataViewMemory02().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
309
|
-
};
|
|
310
|
-
exports$1.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
|
|
311
|
-
throw new Error(getStringFromWasm02(arg0, arg1));
|
|
312
|
-
};
|
|
313
|
-
exports$1.__wbg_call_e762c39fa8ea36bf = function() {
|
|
314
|
-
return handleError2(function(arg0, arg1) {
|
|
315
|
-
const ret = getObject2(arg0).call(getObject2(arg1));
|
|
316
|
-
return addHeapObject2(ret);
|
|
317
|
-
}, arguments);
|
|
318
|
-
};
|
|
319
|
-
exports$1.__wbg_done_2042aa2670fb1db1 = function(arg0) {
|
|
320
|
-
const ret = getObject2(arg0).done;
|
|
321
|
-
return ret;
|
|
322
|
-
};
|
|
323
|
-
exports$1.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
|
|
324
|
-
const ret = Object.entries(getObject2(arg0));
|
|
325
|
-
return addHeapObject2(ret);
|
|
326
|
-
};
|
|
327
|
-
exports$1.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
|
|
328
|
-
const ret = getObject2(arg0)[arg1 >>> 0];
|
|
329
|
-
return addHeapObject2(ret);
|
|
330
|
-
};
|
|
331
|
-
exports$1.__wbg_get_efcb449f58ec27c2 = function() {
|
|
332
|
-
return handleError2(function(arg0, arg1) {
|
|
333
|
-
const ret = Reflect.get(getObject2(arg0), getObject2(arg1));
|
|
334
|
-
return addHeapObject2(ret);
|
|
335
|
-
}, arguments);
|
|
336
|
-
};
|
|
337
|
-
exports$1.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
|
|
338
|
-
const ret = getObject2(arg0)[getObject2(arg1)];
|
|
339
|
-
return addHeapObject2(ret);
|
|
340
|
-
};
|
|
341
|
-
exports$1.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
|
|
342
|
-
let result;
|
|
343
|
-
try {
|
|
344
|
-
result = getObject2(arg0) instanceof ArrayBuffer;
|
|
345
|
-
} catch (_) {
|
|
346
|
-
result = false;
|
|
347
|
-
}
|
|
348
|
-
const ret = result;
|
|
349
|
-
return ret;
|
|
350
|
-
};
|
|
351
|
-
exports$1.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
|
|
352
|
-
let result;
|
|
353
|
-
try {
|
|
354
|
-
result = getObject2(arg0) instanceof Map;
|
|
355
|
-
} catch (_) {
|
|
356
|
-
result = false;
|
|
357
|
-
}
|
|
358
|
-
const ret = result;
|
|
359
|
-
return ret;
|
|
360
|
-
};
|
|
361
|
-
exports$1.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
|
|
362
|
-
let result;
|
|
363
|
-
try {
|
|
364
|
-
result = getObject2(arg0) instanceof Uint8Array;
|
|
365
|
-
} catch (_) {
|
|
366
|
-
result = false;
|
|
367
|
-
}
|
|
368
|
-
const ret = result;
|
|
369
|
-
return ret;
|
|
370
|
-
};
|
|
371
|
-
exports$1.__wbg_isArray_96e0af9891d0945d = function(arg0) {
|
|
372
|
-
const ret = Array.isArray(getObject2(arg0));
|
|
373
|
-
return ret;
|
|
374
|
-
};
|
|
375
|
-
exports$1.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
|
|
376
|
-
const ret = Number.isSafeInteger(getObject2(arg0));
|
|
377
|
-
return ret;
|
|
378
|
-
};
|
|
379
|
-
exports$1.__wbg_iterator_e5822695327a3c39 = function() {
|
|
380
|
-
const ret = Symbol.iterator;
|
|
381
|
-
return addHeapObject2(ret);
|
|
382
|
-
};
|
|
383
|
-
exports$1.__wbg_length_69bca3cb64fc8748 = function(arg0) {
|
|
384
|
-
const ret = getObject2(arg0).length;
|
|
385
|
-
return ret;
|
|
386
|
-
};
|
|
387
|
-
exports$1.__wbg_length_cdd215e10d9dd507 = function(arg0) {
|
|
388
|
-
const ret = getObject2(arg0).length;
|
|
389
|
-
return ret;
|
|
390
|
-
};
|
|
391
|
-
exports$1.__wbg_new_1acc0b6eea89d040 = function() {
|
|
392
|
-
const ret = new Object();
|
|
393
|
-
return addHeapObject2(ret);
|
|
394
|
-
};
|
|
395
|
-
exports$1.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
|
|
396
|
-
const ret = new Uint8Array(getObject2(arg0));
|
|
397
|
-
return addHeapObject2(ret);
|
|
398
|
-
};
|
|
399
|
-
exports$1.__wbg_new_68651c719dcda04e = function() {
|
|
400
|
-
const ret = /* @__PURE__ */ new Map();
|
|
401
|
-
return addHeapObject2(ret);
|
|
402
|
-
};
|
|
403
|
-
exports$1.__wbg_new_e17d9f43105b08be = function() {
|
|
404
|
-
const ret = new Array();
|
|
405
|
-
return addHeapObject2(ret);
|
|
406
|
-
};
|
|
407
|
-
exports$1.__wbg_next_020810e0ae8ebcb0 = function() {
|
|
408
|
-
return handleError2(function(arg0) {
|
|
409
|
-
const ret = getObject2(arg0).next();
|
|
410
|
-
return addHeapObject2(ret);
|
|
411
|
-
}, arguments);
|
|
412
|
-
};
|
|
413
|
-
exports$1.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
|
|
414
|
-
const ret = getObject2(arg0).next;
|
|
415
|
-
return addHeapObject2(ret);
|
|
416
|
-
};
|
|
417
|
-
exports$1.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
|
|
418
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm02(arg0, arg1), getObject2(arg2));
|
|
419
|
-
};
|
|
420
|
-
exports$1.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
421
|
-
getObject2(arg0)[takeObject2(arg1)] = takeObject2(arg2);
|
|
422
|
-
};
|
|
423
|
-
exports$1.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
|
|
424
|
-
const ret = getObject2(arg0).set(getObject2(arg1), getObject2(arg2));
|
|
425
|
-
return addHeapObject2(ret);
|
|
426
|
-
};
|
|
427
|
-
exports$1.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
|
|
428
|
-
getObject2(arg0)[arg1 >>> 0] = takeObject2(arg2);
|
|
429
|
-
};
|
|
430
|
-
exports$1.__wbg_value_692627309814bb8c = function(arg0) {
|
|
431
|
-
const ret = getObject2(arg0).value;
|
|
432
|
-
return addHeapObject2(ret);
|
|
433
|
-
};
|
|
434
|
-
exports$1.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
435
|
-
const ret = getStringFromWasm02(arg0, arg1);
|
|
436
|
-
return addHeapObject2(ret);
|
|
437
|
-
};
|
|
438
|
-
exports$1.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
439
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
440
|
-
return addHeapObject2(ret);
|
|
441
|
-
};
|
|
442
|
-
exports$1.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
443
|
-
const ret = arg0;
|
|
444
|
-
return addHeapObject2(ret);
|
|
445
|
-
};
|
|
446
|
-
exports$1.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
447
|
-
const ret = arg0;
|
|
448
|
-
return addHeapObject2(ret);
|
|
449
|
-
};
|
|
450
|
-
exports$1.__wbindgen_object_clone_ref = function(arg0) {
|
|
451
|
-
const ret = getObject2(arg0);
|
|
452
|
-
return addHeapObject2(ret);
|
|
453
|
-
};
|
|
454
|
-
exports$1.__wbindgen_object_drop_ref = function(arg0) {
|
|
455
|
-
takeObject2(arg0);
|
|
456
|
-
};
|
|
457
|
-
var wasmPath = `${__dirname}/kya_os_engine_bg.wasm`;
|
|
458
|
-
var wasmBytes = __require("fs").readFileSync(wasmPath);
|
|
459
|
-
var wasmModule2 = new WebAssembly.Module(wasmBytes);
|
|
460
|
-
var wasm2 = exports$1.__wasm = new WebAssembly.Instance(wasmModule2, imports).exports;
|
|
461
|
-
}
|
|
462
|
-
});
|
|
3
|
+
var kya_os_engine_js = require('@kya-os/checkpoint-wasm-runtime/wasm/kya-os-engine-bundler/kya_os_engine.js');
|
|
463
4
|
|
|
464
|
-
//
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
default: () => kya_os_engine_default,
|
|
468
|
-
initSync: () => initSync,
|
|
469
|
-
verify: () => verify2
|
|
470
|
-
});
|
|
471
|
-
function getUint8ArrayMemory0() {
|
|
472
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
473
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
474
|
-
}
|
|
475
|
-
return cachedUint8ArrayMemory0;
|
|
476
|
-
}
|
|
477
|
-
function decodeText(ptr, len) {
|
|
478
|
-
numBytesDecoded += len;
|
|
479
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
480
|
-
cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
481
|
-
cachedTextDecoder.decode();
|
|
482
|
-
numBytesDecoded = len;
|
|
483
|
-
}
|
|
484
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
485
|
-
}
|
|
486
|
-
function getStringFromWasm0(ptr, len) {
|
|
487
|
-
ptr = ptr >>> 0;
|
|
488
|
-
return decodeText(ptr, len);
|
|
489
|
-
}
|
|
490
|
-
function addHeapObject(obj) {
|
|
491
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
492
|
-
const idx = heap_next;
|
|
493
|
-
heap_next = heap[idx];
|
|
494
|
-
heap[idx] = obj;
|
|
495
|
-
return idx;
|
|
496
|
-
}
|
|
497
|
-
function getObject(idx) {
|
|
498
|
-
return heap[idx];
|
|
499
|
-
}
|
|
500
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
501
|
-
if (realloc === void 0) {
|
|
502
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
503
|
-
const ptr2 = malloc(buf.length, 1) >>> 0;
|
|
504
|
-
getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
|
|
505
|
-
WASM_VECTOR_LEN = buf.length;
|
|
506
|
-
return ptr2;
|
|
507
|
-
}
|
|
508
|
-
let len = arg.length;
|
|
509
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
510
|
-
const mem = getUint8ArrayMemory0();
|
|
511
|
-
let offset = 0;
|
|
512
|
-
for (; offset < len; offset++) {
|
|
513
|
-
const code = arg.charCodeAt(offset);
|
|
514
|
-
if (code > 127) break;
|
|
515
|
-
mem[ptr + offset] = code;
|
|
516
|
-
}
|
|
517
|
-
if (offset !== len) {
|
|
518
|
-
if (offset !== 0) {
|
|
519
|
-
arg = arg.slice(offset);
|
|
520
|
-
}
|
|
521
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
522
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
523
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
524
|
-
offset += ret.written;
|
|
525
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
526
|
-
}
|
|
527
|
-
WASM_VECTOR_LEN = offset;
|
|
528
|
-
return ptr;
|
|
529
|
-
}
|
|
530
|
-
function getDataViewMemory0() {
|
|
531
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
532
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
533
|
-
}
|
|
534
|
-
return cachedDataViewMemory0;
|
|
535
|
-
}
|
|
536
|
-
function isLikeNone(x) {
|
|
537
|
-
return x === void 0 || x === null;
|
|
538
|
-
}
|
|
539
|
-
function debugString(val) {
|
|
540
|
-
const type = typeof val;
|
|
541
|
-
if (type == "number" || type == "boolean" || val == null) {
|
|
542
|
-
return `${val}`;
|
|
543
|
-
}
|
|
544
|
-
if (type == "string") {
|
|
545
|
-
return `"${val}"`;
|
|
546
|
-
}
|
|
547
|
-
if (type == "symbol") {
|
|
548
|
-
const description = val.description;
|
|
549
|
-
if (description == null) {
|
|
550
|
-
return "Symbol";
|
|
551
|
-
} else {
|
|
552
|
-
return `Symbol(${description})`;
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
if (type == "function") {
|
|
556
|
-
const name = val.name;
|
|
557
|
-
if (typeof name == "string" && name.length > 0) {
|
|
558
|
-
return `Function(${name})`;
|
|
559
|
-
} else {
|
|
560
|
-
return "Function";
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
if (Array.isArray(val)) {
|
|
564
|
-
const length = val.length;
|
|
565
|
-
let debug = "[";
|
|
566
|
-
if (length > 0) {
|
|
567
|
-
debug += debugString(val[0]);
|
|
568
|
-
}
|
|
569
|
-
for (let i = 1; i < length; i++) {
|
|
570
|
-
debug += ", " + debugString(val[i]);
|
|
571
|
-
}
|
|
572
|
-
debug += "]";
|
|
573
|
-
return debug;
|
|
574
|
-
}
|
|
575
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
576
|
-
let className;
|
|
577
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
578
|
-
className = builtInMatches[1];
|
|
579
|
-
} else {
|
|
580
|
-
return toString.call(val);
|
|
581
|
-
}
|
|
582
|
-
if (className == "Object") {
|
|
583
|
-
try {
|
|
584
|
-
return "Object(" + JSON.stringify(val) + ")";
|
|
585
|
-
} catch (_) {
|
|
586
|
-
return "Object";
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
if (val instanceof Error) {
|
|
590
|
-
return `${val.name}: ${val.message}
|
|
591
|
-
${val.stack}`;
|
|
592
|
-
}
|
|
593
|
-
return className;
|
|
594
|
-
}
|
|
595
|
-
function handleError(f, args) {
|
|
596
|
-
try {
|
|
597
|
-
return f.apply(this, args);
|
|
598
|
-
} catch (e) {
|
|
599
|
-
wasm.__wbindgen_export3(addHeapObject(e));
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
603
|
-
ptr = ptr >>> 0;
|
|
604
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
605
|
-
}
|
|
606
|
-
function dropObject(idx) {
|
|
607
|
-
if (idx < 132) return;
|
|
608
|
-
heap[idx] = heap_next;
|
|
609
|
-
heap_next = idx;
|
|
610
|
-
}
|
|
611
|
-
function takeObject(idx) {
|
|
612
|
-
const ret = getObject(idx);
|
|
613
|
-
dropObject(idx);
|
|
614
|
-
return ret;
|
|
615
|
-
}
|
|
616
|
-
function verify2(input_js, ctx_js) {
|
|
617
|
-
try {
|
|
618
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
619
|
-
wasm.verify(retptr, addHeapObject(input_js), addHeapObject(ctx_js));
|
|
620
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
621
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
622
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
623
|
-
if (r2) {
|
|
624
|
-
throw takeObject(r1);
|
|
625
|
-
}
|
|
626
|
-
return takeObject(r0);
|
|
627
|
-
} finally {
|
|
628
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
async function __wbg_load(module, imports) {
|
|
632
|
-
if (typeof Response === "function" && module instanceof Response) {
|
|
633
|
-
if (typeof WebAssembly.instantiateStreaming === "function") {
|
|
634
|
-
try {
|
|
635
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
636
|
-
} catch (e) {
|
|
637
|
-
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
638
|
-
if (validResponse && module.headers.get("Content-Type") !== "application/wasm") {
|
|
639
|
-
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);
|
|
640
|
-
} else {
|
|
641
|
-
throw e;
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
const bytes = await module.arrayBuffer();
|
|
646
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
647
|
-
} else {
|
|
648
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
649
|
-
if (instance instanceof WebAssembly.Instance) {
|
|
650
|
-
return { instance, module };
|
|
651
|
-
} else {
|
|
652
|
-
return instance;
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
function __wbg_get_imports() {
|
|
657
|
-
const imports = {};
|
|
658
|
-
imports.wbg = {};
|
|
659
|
-
imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
|
|
660
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
661
|
-
return addHeapObject(ret);
|
|
662
|
-
};
|
|
663
|
-
imports.wbg.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
|
|
664
|
-
const ret = Number(getObject(arg0));
|
|
665
|
-
return ret;
|
|
666
|
-
};
|
|
667
|
-
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
668
|
-
const ret = String(getObject(arg1));
|
|
669
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
670
|
-
const len1 = WASM_VECTOR_LEN;
|
|
671
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
672
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
673
|
-
};
|
|
674
|
-
imports.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
|
|
675
|
-
const v = getObject(arg1);
|
|
676
|
-
const ret = typeof v === "bigint" ? v : void 0;
|
|
677
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
678
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
679
|
-
};
|
|
680
|
-
imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
|
|
681
|
-
const v = getObject(arg0);
|
|
682
|
-
const ret = typeof v === "boolean" ? v : void 0;
|
|
683
|
-
return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
|
|
684
|
-
};
|
|
685
|
-
imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
|
|
686
|
-
const ret = debugString(getObject(arg1));
|
|
687
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
688
|
-
const len1 = WASM_VECTOR_LEN;
|
|
689
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
690
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
691
|
-
};
|
|
692
|
-
imports.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
|
|
693
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
694
|
-
return ret;
|
|
695
|
-
};
|
|
696
|
-
imports.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
|
|
697
|
-
const ret = typeof getObject(arg0) === "bigint";
|
|
698
|
-
return ret;
|
|
699
|
-
};
|
|
700
|
-
imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
|
|
701
|
-
const ret = typeof getObject(arg0) === "function";
|
|
702
|
-
return ret;
|
|
703
|
-
};
|
|
704
|
-
imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
|
|
705
|
-
const val = getObject(arg0);
|
|
706
|
-
const ret = typeof val === "object" && val !== null;
|
|
707
|
-
return ret;
|
|
708
|
-
};
|
|
709
|
-
imports.wbg.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
|
|
710
|
-
const ret = typeof getObject(arg0) === "string";
|
|
711
|
-
return ret;
|
|
712
|
-
};
|
|
713
|
-
imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
|
|
714
|
-
const ret = getObject(arg0) === void 0;
|
|
715
|
-
return ret;
|
|
716
|
-
};
|
|
717
|
-
imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
|
|
718
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
719
|
-
return ret;
|
|
720
|
-
};
|
|
721
|
-
imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
|
|
722
|
-
const ret = getObject(arg0) == getObject(arg1);
|
|
723
|
-
return ret;
|
|
724
|
-
};
|
|
725
|
-
imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
|
|
726
|
-
const obj = getObject(arg1);
|
|
727
|
-
const ret = typeof obj === "number" ? obj : void 0;
|
|
728
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
729
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
730
|
-
};
|
|
731
|
-
imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
|
|
732
|
-
const obj = getObject(arg1);
|
|
733
|
-
const ret = typeof obj === "string" ? obj : void 0;
|
|
734
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
735
|
-
var len1 = WASM_VECTOR_LEN;
|
|
736
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
737
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
738
|
-
};
|
|
739
|
-
imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
|
|
740
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
741
|
-
};
|
|
742
|
-
imports.wbg.__wbg_call_e762c39fa8ea36bf = function() {
|
|
743
|
-
return handleError(function(arg0, arg1) {
|
|
744
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
745
|
-
return addHeapObject(ret);
|
|
746
|
-
}, arguments);
|
|
747
|
-
};
|
|
748
|
-
imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
|
|
749
|
-
const ret = getObject(arg0).done;
|
|
750
|
-
return ret;
|
|
751
|
-
};
|
|
752
|
-
imports.wbg.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
|
|
753
|
-
const ret = Object.entries(getObject(arg0));
|
|
754
|
-
return addHeapObject(ret);
|
|
755
|
-
};
|
|
756
|
-
imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
|
|
757
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
758
|
-
return addHeapObject(ret);
|
|
759
|
-
};
|
|
760
|
-
imports.wbg.__wbg_get_efcb449f58ec27c2 = function() {
|
|
761
|
-
return handleError(function(arg0, arg1) {
|
|
762
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
763
|
-
return addHeapObject(ret);
|
|
764
|
-
}, arguments);
|
|
765
|
-
};
|
|
766
|
-
imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
|
|
767
|
-
const ret = getObject(arg0)[getObject(arg1)];
|
|
768
|
-
return addHeapObject(ret);
|
|
769
|
-
};
|
|
770
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
|
|
771
|
-
let result;
|
|
772
|
-
try {
|
|
773
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
|
774
|
-
} catch (_) {
|
|
775
|
-
result = false;
|
|
776
|
-
}
|
|
777
|
-
const ret = result;
|
|
778
|
-
return ret;
|
|
779
|
-
};
|
|
780
|
-
imports.wbg.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
|
|
781
|
-
let result;
|
|
782
|
-
try {
|
|
783
|
-
result = getObject(arg0) instanceof Map;
|
|
784
|
-
} catch (_) {
|
|
785
|
-
result = false;
|
|
786
|
-
}
|
|
787
|
-
const ret = result;
|
|
788
|
-
return ret;
|
|
789
|
-
};
|
|
790
|
-
imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
|
|
791
|
-
let result;
|
|
792
|
-
try {
|
|
793
|
-
result = getObject(arg0) instanceof Uint8Array;
|
|
794
|
-
} catch (_) {
|
|
795
|
-
result = false;
|
|
796
|
-
}
|
|
797
|
-
const ret = result;
|
|
798
|
-
return ret;
|
|
799
|
-
};
|
|
800
|
-
imports.wbg.__wbg_isArray_96e0af9891d0945d = function(arg0) {
|
|
801
|
-
const ret = Array.isArray(getObject(arg0));
|
|
802
|
-
return ret;
|
|
803
|
-
};
|
|
804
|
-
imports.wbg.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
|
|
805
|
-
const ret = Number.isSafeInteger(getObject(arg0));
|
|
806
|
-
return ret;
|
|
807
|
-
};
|
|
808
|
-
imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
|
|
809
|
-
const ret = Symbol.iterator;
|
|
810
|
-
return addHeapObject(ret);
|
|
811
|
-
};
|
|
812
|
-
imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
|
|
813
|
-
const ret = getObject(arg0).length;
|
|
814
|
-
return ret;
|
|
815
|
-
};
|
|
816
|
-
imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
|
|
817
|
-
const ret = getObject(arg0).length;
|
|
818
|
-
return ret;
|
|
819
|
-
};
|
|
820
|
-
imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
|
|
821
|
-
const ret = new Object();
|
|
822
|
-
return addHeapObject(ret);
|
|
823
|
-
};
|
|
824
|
-
imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
|
|
825
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
826
|
-
return addHeapObject(ret);
|
|
827
|
-
};
|
|
828
|
-
imports.wbg.__wbg_new_68651c719dcda04e = function() {
|
|
829
|
-
const ret = /* @__PURE__ */ new Map();
|
|
830
|
-
return addHeapObject(ret);
|
|
831
|
-
};
|
|
832
|
-
imports.wbg.__wbg_new_e17d9f43105b08be = function() {
|
|
833
|
-
const ret = new Array();
|
|
834
|
-
return addHeapObject(ret);
|
|
835
|
-
};
|
|
836
|
-
imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() {
|
|
837
|
-
return handleError(function(arg0) {
|
|
838
|
-
const ret = getObject(arg0).next();
|
|
839
|
-
return addHeapObject(ret);
|
|
840
|
-
}, arguments);
|
|
841
|
-
};
|
|
842
|
-
imports.wbg.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
|
|
843
|
-
const ret = getObject(arg0).next;
|
|
844
|
-
return addHeapObject(ret);
|
|
845
|
-
};
|
|
846
|
-
imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
|
|
847
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
848
|
-
};
|
|
849
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
850
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
851
|
-
};
|
|
852
|
-
imports.wbg.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
|
|
853
|
-
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
854
|
-
return addHeapObject(ret);
|
|
855
|
-
};
|
|
856
|
-
imports.wbg.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
|
|
857
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
858
|
-
};
|
|
859
|
-
imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
|
|
860
|
-
const ret = getObject(arg0).value;
|
|
861
|
-
return addHeapObject(ret);
|
|
862
|
-
};
|
|
863
|
-
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
864
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
865
|
-
return addHeapObject(ret);
|
|
866
|
-
};
|
|
867
|
-
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
868
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
869
|
-
return addHeapObject(ret);
|
|
870
|
-
};
|
|
871
|
-
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
872
|
-
const ret = arg0;
|
|
873
|
-
return addHeapObject(ret);
|
|
874
|
-
};
|
|
875
|
-
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
876
|
-
const ret = arg0;
|
|
877
|
-
return addHeapObject(ret);
|
|
878
|
-
};
|
|
879
|
-
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
880
|
-
const ret = getObject(arg0);
|
|
881
|
-
return addHeapObject(ret);
|
|
882
|
-
};
|
|
883
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
884
|
-
takeObject(arg0);
|
|
885
|
-
};
|
|
886
|
-
return imports;
|
|
887
|
-
}
|
|
888
|
-
function __wbg_finalize_init(instance, module) {
|
|
889
|
-
wasm = instance.exports;
|
|
890
|
-
__wbg_init.__wbindgen_wasm_module = module;
|
|
891
|
-
cachedDataViewMemory0 = null;
|
|
892
|
-
cachedUint8ArrayMemory0 = null;
|
|
893
|
-
return wasm;
|
|
894
|
-
}
|
|
895
|
-
function initSync(module) {
|
|
896
|
-
if (wasm !== void 0) return wasm;
|
|
897
|
-
if (typeof module !== "undefined") {
|
|
898
|
-
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
899
|
-
({ module } = module);
|
|
900
|
-
} else {
|
|
901
|
-
console.warn("using deprecated parameters for `initSync()`; pass a single object instead");
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
const imports = __wbg_get_imports();
|
|
905
|
-
if (!(module instanceof WebAssembly.Module)) {
|
|
906
|
-
module = new WebAssembly.Module(module);
|
|
907
|
-
}
|
|
908
|
-
const instance = new WebAssembly.Instance(module, imports);
|
|
909
|
-
return __wbg_finalize_init(instance, module);
|
|
910
|
-
}
|
|
911
|
-
async function __wbg_init(module_or_path) {
|
|
912
|
-
if (wasm !== void 0) return wasm;
|
|
913
|
-
if (typeof module_or_path !== "undefined") {
|
|
914
|
-
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
915
|
-
({ module_or_path } = module_or_path);
|
|
916
|
-
} else {
|
|
917
|
-
console.warn("using deprecated parameters for the initialization function; pass a single object instead");
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
if (typeof module_or_path === "undefined") {
|
|
921
|
-
module_or_path = new URL("kya_os_engine_bg.wasm", importMetaUrl);
|
|
922
|
-
}
|
|
923
|
-
const imports = __wbg_get_imports();
|
|
924
|
-
if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) {
|
|
925
|
-
module_or_path = fetch(module_or_path);
|
|
926
|
-
}
|
|
927
|
-
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
928
|
-
return __wbg_finalize_init(instance, module);
|
|
5
|
+
// src/engine/index.ts
|
|
6
|
+
function engineVerify(input, ctx) {
|
|
7
|
+
return kya_os_engine_js.verify(input, ctx);
|
|
929
8
|
}
|
|
930
|
-
var wasm, cachedUint8ArrayMemory0, cachedTextDecoder, MAX_SAFARI_DECODE_BYTES, numBytesDecoded, heap, heap_next, WASM_VECTOR_LEN, cachedTextEncoder, cachedDataViewMemory0, EXPECTED_RESPONSE_TYPES, kya_os_engine_default;
|
|
931
|
-
var init_kya_os_engine = __esm({
|
|
932
|
-
"wasm/kya-os-engine-web/kya_os_engine.js"() {
|
|
933
|
-
init_cjs_shims();
|
|
934
|
-
cachedUint8ArrayMemory0 = null;
|
|
935
|
-
cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
936
|
-
cachedTextDecoder.decode();
|
|
937
|
-
MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
938
|
-
numBytesDecoded = 0;
|
|
939
|
-
heap = new Array(128).fill(void 0);
|
|
940
|
-
heap.push(void 0, null, true, false);
|
|
941
|
-
heap_next = heap.length;
|
|
942
|
-
WASM_VECTOR_LEN = 0;
|
|
943
|
-
cachedTextEncoder = new TextEncoder();
|
|
944
|
-
if (!("encodeInto" in cachedTextEncoder)) {
|
|
945
|
-
cachedTextEncoder.encodeInto = function(arg, view) {
|
|
946
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
947
|
-
view.set(buf);
|
|
948
|
-
return {
|
|
949
|
-
read: arg.length,
|
|
950
|
-
written: buf.length
|
|
951
|
-
};
|
|
952
|
-
};
|
|
953
|
-
}
|
|
954
|
-
cachedDataViewMemory0 = null;
|
|
955
|
-
EXPECTED_RESPONSE_TYPES = /* @__PURE__ */ new Set(["basic", "cors", "default"]);
|
|
956
|
-
kya_os_engine_default = __wbg_init;
|
|
957
|
-
}
|
|
958
|
-
});
|
|
959
|
-
|
|
960
|
-
// src/engine/orchestrator/index.ts
|
|
961
|
-
init_cjs_shims();
|
|
962
|
-
|
|
963
|
-
// src/engine/orchestrator/verify-request.ts
|
|
964
|
-
init_cjs_shims();
|
|
965
9
|
|
|
966
10
|
// src/engine/adapters/outbound-url-policy.ts
|
|
967
|
-
init_cjs_shims();
|
|
968
11
|
var BLOCKED_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "metadata", "metadata.google.internal"]);
|
|
969
12
|
var UnsafeOutboundUrl = class extends Error {
|
|
970
13
|
kind = "UnsafeOutboundUrl";
|
|
@@ -1039,19 +82,7 @@ function isBlockedIpv6(hostname) {
|
|
|
1039
82
|
(firstSegment & 65280) === 65280;
|
|
1040
83
|
}
|
|
1041
84
|
|
|
1042
|
-
// src/engine/index.ts
|
|
1043
|
-
init_cjs_shims();
|
|
1044
|
-
var wasmModule = __toESM(require_kya_os_engine());
|
|
1045
|
-
function engineVerify(input, ctx) {
|
|
1046
|
-
const verify3 = wasmModule.verify;
|
|
1047
|
-
return verify3(input, ctx);
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
// src/engine/orchestrator/build-agent-request.ts
|
|
1051
|
-
init_cjs_shims();
|
|
1052
|
-
|
|
1053
85
|
// src/engine/adapters/util.ts
|
|
1054
|
-
init_cjs_shims();
|
|
1055
86
|
function base64UrlDecode(input) {
|
|
1056
87
|
const padded = input.replace(/-/g, "+").replace(/_/g, "/");
|
|
1057
88
|
const padding = padded.length % 4 === 0 ? "" : "=".repeat(4 - padded.length % 4);
|
|
@@ -1245,7 +276,6 @@ function bodyAsBytes(body) {
|
|
|
1245
276
|
}
|
|
1246
277
|
|
|
1247
278
|
// src/engine/orchestrator/synthetic-results.ts
|
|
1248
|
-
init_cjs_shims();
|
|
1249
279
|
function hostSynthesizedEngineInfo() {
|
|
1250
280
|
return {
|
|
1251
281
|
name: "checkpoint-engine-wasm",
|
|
@@ -1273,23 +303,27 @@ function parseErrorDetectionDetail(detail) {
|
|
|
1273
303
|
|
|
1274
304
|
// src/engine/orchestrator/verify-request.ts
|
|
1275
305
|
var DEFAULT_REPUTATION_BASELINE = 1;
|
|
1276
|
-
function
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
306
|
+
function createVerifyRequestApi(defaultEngine) {
|
|
307
|
+
function verifyRequest2(req, opts) {
|
|
308
|
+
return verifyRequest_internal(req, opts, opts.engineVerifyFn ?? defaultEngine);
|
|
309
|
+
}
|
|
310
|
+
function makeVerifyRequest2(opts) {
|
|
311
|
+
let argusWarningLogged = false;
|
|
312
|
+
const log = opts.logger ?? defaultLogger;
|
|
313
|
+
const engine = opts.engineVerifyFn ?? defaultEngine;
|
|
314
|
+
return async function verifyRequest3(req) {
|
|
315
|
+
if (!argusWarningLogged && !opts.argusUrl) {
|
|
316
|
+
log(
|
|
317
|
+
'[Checkpoint] WARNING: Argus URL not configured; reputation will degrade to baseline 1.0 ("trust by default"). Set ARGUS_API_URL to enable.'
|
|
318
|
+
);
|
|
319
|
+
argusWarningLogged = true;
|
|
320
|
+
}
|
|
321
|
+
return verifyRequest_internal(req, opts, engine);
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
return { verifyRequest: verifyRequest2, makeVerifyRequest: makeVerifyRequest2 };
|
|
1291
325
|
}
|
|
1292
|
-
async function verifyRequest_internal(req, opts) {
|
|
326
|
+
async function verifyRequest_internal(req, opts, engineVerify2) {
|
|
1293
327
|
if (hasMalformedJwsBody(req)) {
|
|
1294
328
|
return blockWithParseError("malformed JWS body", opts.enforcementMode);
|
|
1295
329
|
}
|
|
@@ -1336,9 +370,10 @@ async function verifyRequest_internal(req, opts) {
|
|
|
1336
370
|
reputation: agentDid ? { [agentDid]: repScore } : {},
|
|
1337
371
|
tenantDecision,
|
|
1338
372
|
nowUnix: opts.clock.nowUnix(),
|
|
1339
|
-
enforcementMode: opts.enforcementMode
|
|
373
|
+
enforcementMode: opts.enforcementMode,
|
|
374
|
+
...opts.engineConfig ? { config: opts.engineConfig } : {}
|
|
1340
375
|
};
|
|
1341
|
-
return
|
|
376
|
+
return engineVerify2(agentRequest, ctx);
|
|
1342
377
|
}
|
|
1343
378
|
async function fetchCredentialStatus(credentialStatusUrl, statusListCache) {
|
|
1344
379
|
assertSafeHttpsUrl(credentialStatusUrl, "credential status URL");
|
|
@@ -1367,11 +402,7 @@ function defaultLogger(msg) {
|
|
|
1367
402
|
console.warn(msg);
|
|
1368
403
|
}
|
|
1369
404
|
|
|
1370
|
-
// src/engine/orchestrator/verify-request-edge.ts
|
|
1371
|
-
init_cjs_shims();
|
|
1372
|
-
|
|
1373
405
|
// src/engine/edge.ts
|
|
1374
|
-
init_cjs_shims();
|
|
1375
406
|
var initialised = null;
|
|
1376
407
|
function initEngineEdge(moduleOrPath) {
|
|
1377
408
|
return ensureReady(moduleOrPath).then(() => void 0);
|
|
@@ -1379,7 +410,7 @@ function initEngineEdge(moduleOrPath) {
|
|
|
1379
410
|
function ensureReady(moduleOrPath) {
|
|
1380
411
|
if (initialised) return initialised;
|
|
1381
412
|
const pending = (async () => {
|
|
1382
|
-
const mod = await
|
|
413
|
+
const mod = await import('@kya-os/checkpoint-wasm-runtime/wasm/kya-os-engine-web/kya_os_engine.js');
|
|
1383
414
|
await mod.default(moduleOrPath !== void 0 ? { module_or_path: moduleOrPath } : void 0);
|
|
1384
415
|
return mod.verify;
|
|
1385
416
|
})();
|
|
@@ -1392,12 +423,11 @@ function ensureReady(moduleOrPath) {
|
|
|
1392
423
|
return initialised;
|
|
1393
424
|
}
|
|
1394
425
|
async function engineVerifyEdge(input, ctx) {
|
|
1395
|
-
const
|
|
1396
|
-
return
|
|
426
|
+
const verify = await ensureReady();
|
|
427
|
+
return verify(input, ctx);
|
|
1397
428
|
}
|
|
1398
429
|
|
|
1399
430
|
// src/engine/orchestrator/render-decision.ts
|
|
1400
|
-
init_cjs_shims();
|
|
1401
431
|
function renderDecisionAsResponse(result) {
|
|
1402
432
|
const baseHeaders = buildBaseHeaders(result);
|
|
1403
433
|
if (result.enforcementMode === "observe") {
|
|
@@ -1625,7 +655,8 @@ async function verifyRequestEdge_internal(req, opts) {
|
|
|
1625
655
|
reputation: agentDid ? { [agentDid]: repScore } : {},
|
|
1626
656
|
tenantDecision,
|
|
1627
657
|
nowUnix: opts.clock.nowUnix(),
|
|
1628
|
-
enforcementMode: opts.enforcementMode
|
|
658
|
+
enforcementMode: opts.enforcementMode,
|
|
659
|
+
...opts.engineConfig ? { config: opts.engineConfig } : {}
|
|
1629
660
|
};
|
|
1630
661
|
return engineVerifyEdge(agentRequest, ctx);
|
|
1631
662
|
}
|
|
@@ -1656,6 +687,11 @@ function defaultLogger2(msg) {
|
|
|
1656
687
|
console.warn(msg);
|
|
1657
688
|
}
|
|
1658
689
|
|
|
690
|
+
// src/engine/orchestrator/index.ts
|
|
691
|
+
var bundlerApi = createVerifyRequestApi(engineVerify);
|
|
692
|
+
var verifyRequest = bundlerApi.verifyRequest;
|
|
693
|
+
var makeVerifyRequest = bundlerApi.makeVerifyRequest;
|
|
694
|
+
|
|
1659
695
|
exports.buildAgentRequest = buildAgentRequest;
|
|
1660
696
|
exports.extractAgentDid = extractAgentDid;
|
|
1661
697
|
exports.extractCredentialStatusUrl = extractCredentialStatusUrl;
|