@deepstrike/wasm-kernel 0.2.51 → 0.2.60
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/deepstrike_wasm.d.ts +5 -29
- package/deepstrike_wasm.js +1 -1
- package/deepstrike_wasm_bg.js +4 -166
- package/deepstrike_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/deepstrike_wasm.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
export type CanonicalRecordBytes = Uint8Array[];
|
|
5
|
+
|
|
6
|
+
|
|
3
7
|
/**
|
|
4
8
|
* Structured context for a provider call — emitted with `kind === \"call_llm\"`.
|
|
5
9
|
*/
|
|
@@ -80,12 +84,6 @@ export interface CriterionResult {
|
|
|
80
84
|
feedback: string;
|
|
81
85
|
}
|
|
82
86
|
|
|
83
|
-
export interface GovernanceVerdict {
|
|
84
|
-
kind: string;
|
|
85
|
-
reason?: string;
|
|
86
|
-
retryAfterMs?: number;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
87
|
export interface LoopPolicy {
|
|
90
88
|
maxTokens: number;
|
|
91
89
|
maxTurns?: number;
|
|
@@ -236,8 +234,6 @@ export type CanonicalLifecycle = "created" | "configured" | "running" | "suspend
|
|
|
236
234
|
|
|
237
235
|
export type CanonicalPreparation = { status: "prepared"; prepareToken: string; stepSeq: string; expectedHead?: string; recordDigest: string; recordBytes: Uint8Array; plannedStepJson: string } | { status: "replayed"; stepSeq: string; expectedHead?: string; recordDigest: string; recordBytes?: Uint8Array; plannedStepJson?: string } | { status: "rejected"; faultJson: string };
|
|
238
236
|
|
|
239
|
-
export type CanonicalRecordBytes = Uint8Array[];
|
|
240
|
-
|
|
241
237
|
|
|
242
238
|
/**
|
|
243
239
|
* Durable canonical operation handle. It exposes no direct `step` method.
|
|
@@ -266,25 +262,10 @@ export class CanonicalKernel {
|
|
|
266
262
|
/**
|
|
267
263
|
* Replace this handle in place from checkpoint bytes plus post-checkpoint record bytes.
|
|
268
264
|
*/
|
|
269
|
-
restore(checkpoint_bytes: Uint8Array | null | undefined, record_bytes:
|
|
265
|
+
restore(checkpoint_bytes: Uint8Array | null | undefined, record_bytes: any): CanonicalRestoreCost;
|
|
270
266
|
terminalJson(): string | undefined;
|
|
271
267
|
}
|
|
272
268
|
|
|
273
|
-
export class Governance {
|
|
274
|
-
free(): void;
|
|
275
|
-
[Symbol.dispose](): void;
|
|
276
|
-
addPermissionRule(pattern: string, action: string): void;
|
|
277
|
-
allowParamValues(tool_name: string, param_path: string, allowed_values: string[]): void;
|
|
278
|
-
blockTool(name: string): void;
|
|
279
|
-
evaluate(tool_name: string, args_json: string): GovernanceVerdict;
|
|
280
|
-
limitParamRange(tool_name: string, param_path: string, min?: number | null, max?: number | null): void;
|
|
281
|
-
constructor(default_action?: string | null);
|
|
282
|
-
requireParam(tool_name: string, param_path: string): void;
|
|
283
|
-
setIdentity(agent_id: string, session_id: string): void;
|
|
284
|
-
setRateLimit(tool_name: string, max_calls: number, window_ms: number): void;
|
|
285
|
-
setTime(now_ms: number): void;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
269
|
export class SignalRouter {
|
|
289
270
|
free(): void;
|
|
290
271
|
[Symbol.dispose](): void;
|
|
@@ -307,11 +288,6 @@ export class SignalRouter {
|
|
|
307
288
|
*/
|
|
308
289
|
export function buildEvalMessages(goal: string, criteria: Criterion[], result: string, attempt: number, extract_skill_on_pass: boolean): Message[];
|
|
309
290
|
|
|
310
|
-
/**
|
|
311
|
-
* The single ABI revision accepted by core. Hosts must read this export instead of copying it.
|
|
312
|
-
*/
|
|
313
|
-
export function kernelAbiVersion(): number;
|
|
314
|
-
|
|
315
291
|
/**
|
|
316
292
|
* Parse the evaluator LLM's JSON response into a structured `Verdict`.
|
|
317
293
|
*/
|
package/deepstrike_wasm.js
CHANGED
|
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./deepstrike_wasm_bg.js";
|
|
|
5
5
|
__wbg_set_wasm(wasm);
|
|
6
6
|
|
|
7
7
|
export {
|
|
8
|
-
CanonicalKernel,
|
|
8
|
+
CanonicalKernel, SignalRouter, buildEvalMessages, parseVerdict, verdictOutputSchema
|
|
9
9
|
} from "./deepstrike_wasm_bg.js";
|
package/deepstrike_wasm_bg.js
CHANGED
|
@@ -179,7 +179,7 @@ export class CanonicalKernel {
|
|
|
179
179
|
/**
|
|
180
180
|
* Replace this handle in place from checkpoint bytes plus post-checkpoint record bytes.
|
|
181
181
|
* @param {Uint8Array | null | undefined} checkpoint_bytes
|
|
182
|
-
* @param {
|
|
182
|
+
* @param {any} record_bytes
|
|
183
183
|
* @returns {CanonicalRestoreCost}
|
|
184
184
|
*/
|
|
185
185
|
restore(checkpoint_bytes, record_bytes) {
|
|
@@ -224,128 +224,6 @@ export class CanonicalKernel {
|
|
|
224
224
|
}
|
|
225
225
|
if (Symbol.dispose) CanonicalKernel.prototype[Symbol.dispose] = CanonicalKernel.prototype.free;
|
|
226
226
|
|
|
227
|
-
export class Governance {
|
|
228
|
-
__destroy_into_raw() {
|
|
229
|
-
const ptr = this.__wbg_ptr;
|
|
230
|
-
this.__wbg_ptr = 0;
|
|
231
|
-
GovernanceFinalization.unregister(this);
|
|
232
|
-
return ptr;
|
|
233
|
-
}
|
|
234
|
-
free() {
|
|
235
|
-
const ptr = this.__destroy_into_raw();
|
|
236
|
-
wasm.__wbg_governance_free(ptr, 0);
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* @param {string} pattern
|
|
240
|
-
* @param {string} action
|
|
241
|
-
*/
|
|
242
|
-
addPermissionRule(pattern, action) {
|
|
243
|
-
const ptr0 = passStringToWasm0(pattern, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
244
|
-
const len0 = WASM_VECTOR_LEN;
|
|
245
|
-
const ptr1 = passStringToWasm0(action, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
246
|
-
const len1 = WASM_VECTOR_LEN;
|
|
247
|
-
wasm.governance_addPermissionRule(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* @param {string} tool_name
|
|
251
|
-
* @param {string} param_path
|
|
252
|
-
* @param {string[]} allowed_values
|
|
253
|
-
*/
|
|
254
|
-
allowParamValues(tool_name, param_path, allowed_values) {
|
|
255
|
-
const ptr0 = passStringToWasm0(tool_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
256
|
-
const len0 = WASM_VECTOR_LEN;
|
|
257
|
-
const ptr1 = passStringToWasm0(param_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
258
|
-
const len1 = WASM_VECTOR_LEN;
|
|
259
|
-
const ptr2 = passArrayJsValueToWasm0(allowed_values, wasm.__wbindgen_export);
|
|
260
|
-
const len2 = WASM_VECTOR_LEN;
|
|
261
|
-
wasm.governance_allowParamValues(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* @param {string} name
|
|
265
|
-
*/
|
|
266
|
-
blockTool(name) {
|
|
267
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
268
|
-
const len0 = WASM_VECTOR_LEN;
|
|
269
|
-
wasm.governance_blockTool(this.__wbg_ptr, ptr0, len0);
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* @param {string} tool_name
|
|
273
|
-
* @param {string} args_json
|
|
274
|
-
* @returns {GovernanceVerdict}
|
|
275
|
-
*/
|
|
276
|
-
evaluate(tool_name, args_json) {
|
|
277
|
-
const ptr0 = passStringToWasm0(tool_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
278
|
-
const len0 = WASM_VECTOR_LEN;
|
|
279
|
-
const ptr1 = passStringToWasm0(args_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
280
|
-
const len1 = WASM_VECTOR_LEN;
|
|
281
|
-
const ret = wasm.governance_evaluate(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
282
|
-
return takeObject(ret);
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* @param {string} tool_name
|
|
286
|
-
* @param {string} param_path
|
|
287
|
-
* @param {number | null} [min]
|
|
288
|
-
* @param {number | null} [max]
|
|
289
|
-
*/
|
|
290
|
-
limitParamRange(tool_name, param_path, min, max) {
|
|
291
|
-
const ptr0 = passStringToWasm0(tool_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
292
|
-
const len0 = WASM_VECTOR_LEN;
|
|
293
|
-
const ptr1 = passStringToWasm0(param_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
294
|
-
const len1 = WASM_VECTOR_LEN;
|
|
295
|
-
wasm.governance_limitParamRange(this.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(min), isLikeNone(min) ? 0 : min, !isLikeNone(max), isLikeNone(max) ? 0 : max);
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
* @param {string | null} [default_action]
|
|
299
|
-
*/
|
|
300
|
-
constructor(default_action) {
|
|
301
|
-
var ptr0 = isLikeNone(default_action) ? 0 : passStringToWasm0(default_action, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
302
|
-
var len0 = WASM_VECTOR_LEN;
|
|
303
|
-
const ret = wasm.governance_new(ptr0, len0);
|
|
304
|
-
this.__wbg_ptr = ret;
|
|
305
|
-
GovernanceFinalization.register(this, this.__wbg_ptr, this);
|
|
306
|
-
return this;
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* @param {string} tool_name
|
|
310
|
-
* @param {string} param_path
|
|
311
|
-
*/
|
|
312
|
-
requireParam(tool_name, param_path) {
|
|
313
|
-
const ptr0 = passStringToWasm0(tool_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
314
|
-
const len0 = WASM_VECTOR_LEN;
|
|
315
|
-
const ptr1 = passStringToWasm0(param_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
316
|
-
const len1 = WASM_VECTOR_LEN;
|
|
317
|
-
wasm.governance_requireParam(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* @param {string} agent_id
|
|
321
|
-
* @param {string} session_id
|
|
322
|
-
*/
|
|
323
|
-
setIdentity(agent_id, session_id) {
|
|
324
|
-
const ptr0 = passStringToWasm0(agent_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
325
|
-
const len0 = WASM_VECTOR_LEN;
|
|
326
|
-
const ptr1 = passStringToWasm0(session_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
327
|
-
const len1 = WASM_VECTOR_LEN;
|
|
328
|
-
wasm.governance_setIdentity(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
* @param {string} tool_name
|
|
332
|
-
* @param {number} max_calls
|
|
333
|
-
* @param {number} window_ms
|
|
334
|
-
*/
|
|
335
|
-
setRateLimit(tool_name, max_calls, window_ms) {
|
|
336
|
-
const ptr0 = passStringToWasm0(tool_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
337
|
-
const len0 = WASM_VECTOR_LEN;
|
|
338
|
-
wasm.governance_setRateLimit(this.__wbg_ptr, ptr0, len0, max_calls, window_ms);
|
|
339
|
-
}
|
|
340
|
-
/**
|
|
341
|
-
* @param {number} now_ms
|
|
342
|
-
*/
|
|
343
|
-
setTime(now_ms) {
|
|
344
|
-
wasm.governance_setTime(this.__wbg_ptr, now_ms);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
if (Symbol.dispose) Governance.prototype[Symbol.dispose] = Governance.prototype.free;
|
|
348
|
-
|
|
349
227
|
export class SignalRouter {
|
|
350
228
|
__destroy_into_raw() {
|
|
351
229
|
const ptr = this.__wbg_ptr;
|
|
@@ -449,15 +327,6 @@ export function buildEvalMessages(goal, criteria, result, attempt, extract_skill
|
|
|
449
327
|
}
|
|
450
328
|
}
|
|
451
329
|
|
|
452
|
-
/**
|
|
453
|
-
* The single ABI revision accepted by core. Hosts must read this export instead of copying it.
|
|
454
|
-
* @returns {number}
|
|
455
|
-
*/
|
|
456
|
-
export function kernelAbiVersion() {
|
|
457
|
-
const ret = wasm.kernelAbiVersion();
|
|
458
|
-
return ret >>> 0;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
330
|
/**
|
|
462
331
|
* Parse the evaluator LLM's JSON response into a structured `Verdict`.
|
|
463
332
|
* @param {string} content
|
|
@@ -523,8 +392,8 @@ export function __wbg___wbindgen_in_07056af4f902c445(arg0, arg1) {
|
|
|
523
392
|
const ret = getObject(arg0) in getObject(arg1);
|
|
524
393
|
return ret;
|
|
525
394
|
}
|
|
526
|
-
export function
|
|
527
|
-
const ret =
|
|
395
|
+
export function __wbg___wbindgen_is_null_2042690d351e14f0(arg0) {
|
|
396
|
+
const ret = getObject(arg0) === null;
|
|
528
397
|
return ret;
|
|
529
398
|
}
|
|
530
399
|
export function __wbg___wbindgen_is_object_b4593df85baada48(arg0) {
|
|
@@ -557,14 +426,6 @@ export function __wbg___wbindgen_string_get_d109740c0d18f4d7(arg0, arg1) {
|
|
|
557
426
|
export function __wbg___wbindgen_throw_9c31b086c2b26051(arg0, arg1) {
|
|
558
427
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
559
428
|
}
|
|
560
|
-
export function __wbg_call_13665d9f14390edc() { return handleError(function (arg0, arg1) {
|
|
561
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
562
|
-
return addHeapObject(ret);
|
|
563
|
-
}, arguments); }
|
|
564
|
-
export function __wbg_done_54b8da57023b7ed2(arg0) {
|
|
565
|
-
const ret = getObject(arg0).done;
|
|
566
|
-
return ret;
|
|
567
|
-
}
|
|
568
429
|
export function __wbg_from_fa561fa561dc8031(arg0) {
|
|
569
430
|
const ret = Array.from(getObject(arg0));
|
|
570
431
|
return addHeapObject(ret);
|
|
@@ -572,11 +433,7 @@ export function __wbg_from_fa561fa561dc8031(arg0) {
|
|
|
572
433
|
export function __wbg_getRandomValues_ef12552bf5acd2fe() { return handleError(function (arg0, arg1) {
|
|
573
434
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
574
435
|
}, arguments); }
|
|
575
|
-
export function
|
|
576
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
577
|
-
return addHeapObject(ret);
|
|
578
|
-
}, arguments); }
|
|
579
|
-
export function __wbg_get_unchecked_1dfe6d05ad91d9b7(arg0, arg1) {
|
|
436
|
+
export function __wbg_get_98fdf51d029a75eb(arg0, arg1) {
|
|
580
437
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
581
438
|
return addHeapObject(ret);
|
|
582
439
|
}
|
|
@@ -612,10 +469,6 @@ export function __wbg_isSafeInteger_01e964d144ad3a55(arg0) {
|
|
|
612
469
|
const ret = Number.isSafeInteger(getObject(arg0));
|
|
613
470
|
return ret;
|
|
614
471
|
}
|
|
615
|
-
export function __wbg_iterator_1441b47f341dc34f() {
|
|
616
|
-
const ret = Symbol.iterator;
|
|
617
|
-
return addHeapObject(ret);
|
|
618
|
-
}
|
|
619
472
|
export function __wbg_length_2591a0f4f659a55c(arg0) {
|
|
620
473
|
const ret = getObject(arg0).length;
|
|
621
474
|
return ret;
|
|
@@ -636,14 +489,6 @@ export function __wbg_new_7ddec6de44ff8f5d(arg0) {
|
|
|
636
489
|
const ret = new Uint8Array(getObject(arg0));
|
|
637
490
|
return addHeapObject(ret);
|
|
638
491
|
}
|
|
639
|
-
export function __wbg_next_2a4e19f4f5083b0f(arg0) {
|
|
640
|
-
const ret = getObject(arg0).next;
|
|
641
|
-
return addHeapObject(ret);
|
|
642
|
-
}
|
|
643
|
-
export function __wbg_next_6429a146bf756f93() { return handleError(function (arg0) {
|
|
644
|
-
const ret = getObject(arg0).next();
|
|
645
|
-
return addHeapObject(ret);
|
|
646
|
-
}, arguments); }
|
|
647
492
|
export function __wbg_prototypesetcall_5f9bdc8d75e07276(arg0, arg1, arg2) {
|
|
648
493
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
649
494
|
}
|
|
@@ -653,10 +498,6 @@ export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
|
|
|
653
498
|
export function __wbg_set_78ea6a19f4818587(arg0, arg1, arg2) {
|
|
654
499
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
655
500
|
}
|
|
656
|
-
export function __wbg_value_9cc0518af87a489c(arg0) {
|
|
657
|
-
const ret = getObject(arg0).value;
|
|
658
|
-
return addHeapObject(ret);
|
|
659
|
-
}
|
|
660
501
|
export function __wbindgen_cast_0000000000000001(arg0) {
|
|
661
502
|
// Cast intrinsic for `F64 -> Externref`.
|
|
662
503
|
const ret = arg0;
|
|
@@ -682,9 +523,6 @@ export function __wbindgen_object_drop_ref(arg0) {
|
|
|
682
523
|
const CanonicalKernelFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
683
524
|
? { register: () => {}, unregister: () => {} }
|
|
684
525
|
: new FinalizationRegistry(ptr => wasm.__wbg_canonicalkernel_free(ptr, 1));
|
|
685
|
-
const GovernanceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
686
|
-
? { register: () => {}, unregister: () => {} }
|
|
687
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_governance_free(ptr, 1));
|
|
688
526
|
const SignalRouterFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
689
527
|
? { register: () => {}, unregister: () => {} }
|
|
690
528
|
: new FinalizationRegistry(ptr => wasm.__wbg_signalrouter_free(ptr, 1));
|
package/deepstrike_wasm_bg.wasm
CHANGED
|
Binary file
|