@deepstrike/wasm-kernel 0.2.52 → 0.2.61
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 +0 -26
- package/deepstrike_wasm.js +1 -1
- package/deepstrike_wasm_bg.js +0 -134
- package/deepstrike_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/deepstrike_wasm.d.ts
CHANGED
|
@@ -84,12 +84,6 @@ export interface CriterionResult {
|
|
|
84
84
|
feedback: string;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
export interface GovernanceVerdict {
|
|
88
|
-
kind: string;
|
|
89
|
-
reason?: string;
|
|
90
|
-
retryAfterMs?: number;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
87
|
export interface LoopPolicy {
|
|
94
88
|
maxTokens: number;
|
|
95
89
|
maxTurns?: number;
|
|
@@ -272,21 +266,6 @@ export class CanonicalKernel {
|
|
|
272
266
|
terminalJson(): string | undefined;
|
|
273
267
|
}
|
|
274
268
|
|
|
275
|
-
export class Governance {
|
|
276
|
-
free(): void;
|
|
277
|
-
[Symbol.dispose](): void;
|
|
278
|
-
addPermissionRule(pattern: string, action: string): void;
|
|
279
|
-
allowParamValues(tool_name: string, param_path: string, allowed_values: string[]): void;
|
|
280
|
-
blockTool(name: string): void;
|
|
281
|
-
evaluate(tool_name: string, args_json: string): GovernanceVerdict;
|
|
282
|
-
limitParamRange(tool_name: string, param_path: string, min?: number | null, max?: number | null): void;
|
|
283
|
-
constructor(default_action?: string | null);
|
|
284
|
-
requireParam(tool_name: string, param_path: string): void;
|
|
285
|
-
setIdentity(agent_id: string, session_id: string): void;
|
|
286
|
-
setRateLimit(tool_name: string, max_calls: number, window_ms: number): void;
|
|
287
|
-
setTime(now_ms: number): void;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
269
|
export class SignalRouter {
|
|
291
270
|
free(): void;
|
|
292
271
|
[Symbol.dispose](): void;
|
|
@@ -309,11 +288,6 @@ export class SignalRouter {
|
|
|
309
288
|
*/
|
|
310
289
|
export function buildEvalMessages(goal: string, criteria: Criterion[], result: string, attempt: number, extract_skill_on_pass: boolean): Message[];
|
|
311
290
|
|
|
312
|
-
/**
|
|
313
|
-
* The single ABI revision accepted by core. Hosts must read this export instead of copying it.
|
|
314
|
-
*/
|
|
315
|
-
export function kernelAbiVersion(): number;
|
|
316
|
-
|
|
317
291
|
/**
|
|
318
292
|
* Parse the evaluator LLM's JSON response into a structured `Verdict`.
|
|
319
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
|
@@ -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
|
|
@@ -654,9 +523,6 @@ export function __wbindgen_object_drop_ref(arg0) {
|
|
|
654
523
|
const CanonicalKernelFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
655
524
|
? { register: () => {}, unregister: () => {} }
|
|
656
525
|
: new FinalizationRegistry(ptr => wasm.__wbg_canonicalkernel_free(ptr, 1));
|
|
657
|
-
const GovernanceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
658
|
-
? { register: () => {}, unregister: () => {} }
|
|
659
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_governance_free(ptr, 1));
|
|
660
526
|
const SignalRouterFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
661
527
|
? { register: () => {}, unregister: () => {} }
|
|
662
528
|
: new FinalizationRegistry(ptr => wasm.__wbg_signalrouter_free(ptr, 1));
|
package/deepstrike_wasm_bg.wasm
CHANGED
|
Binary file
|