@deepstrike/wasm-kernel 0.2.8 → 0.2.9
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 -73
- package/deepstrike_wasm.js +1 -1
- package/deepstrike_wasm_bg.js +0 -141
- package/deepstrike_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/deepstrike_wasm.d.ts
CHANGED
|
@@ -1,46 +1,5 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* A single loop stop predicate. `kind` is `\"noNewFindings\"` | `\"noErrors\"` | `\"maxRounds\"`;
|
|
5
|
-
* `maxRounds` is required only when `kind === \"maxRounds\"`.
|
|
6
|
-
*/
|
|
7
|
-
export interface StopConditionSpec {
|
|
8
|
-
kind: string;
|
|
9
|
-
maxRounds?: number;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Discriminated action returned by `LoopUntilDone`. Inspect `kind`:
|
|
14
|
-
* `\"spawn\"` → `round`; `\"done\"` → `roundsUsed`, `reason`.
|
|
15
|
-
*/
|
|
16
|
-
export interface LoopAction {
|
|
17
|
-
kind: string;
|
|
18
|
-
round?: number;
|
|
19
|
-
roundsUsed?: number;
|
|
20
|
-
reason?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Discriminated action returned by `Tournament`. Inspect `kind`:
|
|
25
|
-
* `\"judgeRound\"` → `round`, `matches`; `\"done\"` → `winner`, `roundsUsed`.
|
|
26
|
-
*/
|
|
27
|
-
export interface TournamentAction {
|
|
28
|
-
kind: string;
|
|
29
|
-
round?: number;
|
|
30
|
-
matches?: TournamentMatch[];
|
|
31
|
-
winner?: string;
|
|
32
|
-
roundsUsed?: number;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* One pairwise match-up in a tournament round.
|
|
37
|
-
*/
|
|
38
|
-
export interface TournamentMatch {
|
|
39
|
-
id: number;
|
|
40
|
-
left: string;
|
|
41
|
-
right: string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
3
|
/**
|
|
45
4
|
* Structured context for a provider call — emitted with `kind === \"call_llm\"`.
|
|
46
5
|
*/
|
|
@@ -51,14 +10,6 @@ export interface RenderedContext {
|
|
|
51
10
|
turns: Message[];
|
|
52
11
|
}
|
|
53
12
|
|
|
54
|
-
/**
|
|
55
|
-
* What the SDK reports after running a loop round\'s worker.
|
|
56
|
-
*/
|
|
57
|
-
export interface RoundReport {
|
|
58
|
-
newFindings: number;
|
|
59
|
-
errors: number;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
13
|
export interface ContentPartObj {
|
|
63
14
|
type: string;
|
|
64
15
|
text?: string;
|
|
@@ -234,18 +185,6 @@ export class KernelRuntime {
|
|
|
234
185
|
turn(): number;
|
|
235
186
|
}
|
|
236
187
|
|
|
237
|
-
/**
|
|
238
|
-
* Loop-until-done state machine; a `maxRounds` backstop is injected if none is given.
|
|
239
|
-
*/
|
|
240
|
-
export class LoopUntilDone {
|
|
241
|
-
free(): void;
|
|
242
|
-
[Symbol.dispose](): void;
|
|
243
|
-
feed(report: RoundReport): LoopAction;
|
|
244
|
-
isDone(): boolean;
|
|
245
|
-
constructor(conditions: StopConditionSpec[]);
|
|
246
|
-
start(): LoopAction;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
188
|
export class SignalRouter {
|
|
250
189
|
free(): void;
|
|
251
190
|
[Symbol.dispose](): void;
|
|
@@ -261,15 +200,3 @@ export class SignalRouter {
|
|
|
261
200
|
*/
|
|
262
201
|
next(): RuntimeSignal | undefined;
|
|
263
202
|
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Single-elimination tournament with pairwise comparative judging.
|
|
267
|
-
*/
|
|
268
|
-
export class Tournament {
|
|
269
|
-
free(): void;
|
|
270
|
-
[Symbol.dispose](): void;
|
|
271
|
-
feedRound(winners: string[]): TournamentAction;
|
|
272
|
-
isDone(): boolean;
|
|
273
|
-
constructor(entrants: string[]);
|
|
274
|
-
start(): TournamentAction;
|
|
275
|
-
}
|
package/deepstrike_wasm.js
CHANGED
package/deepstrike_wasm_bg.js
CHANGED
|
@@ -294,67 +294,6 @@ export class KernelRuntime {
|
|
|
294
294
|
}
|
|
295
295
|
if (Symbol.dispose) KernelRuntime.prototype[Symbol.dispose] = KernelRuntime.prototype.free;
|
|
296
296
|
|
|
297
|
-
/**
|
|
298
|
-
* Loop-until-done state machine; a `maxRounds` backstop is injected if none is given.
|
|
299
|
-
*/
|
|
300
|
-
export class LoopUntilDone {
|
|
301
|
-
__destroy_into_raw() {
|
|
302
|
-
const ptr = this.__wbg_ptr;
|
|
303
|
-
this.__wbg_ptr = 0;
|
|
304
|
-
LoopUntilDoneFinalization.unregister(this);
|
|
305
|
-
return ptr;
|
|
306
|
-
}
|
|
307
|
-
free() {
|
|
308
|
-
const ptr = this.__destroy_into_raw();
|
|
309
|
-
wasm.__wbg_loopuntildone_free(ptr, 0);
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* @param {RoundReport} report
|
|
313
|
-
* @returns {LoopAction}
|
|
314
|
-
*/
|
|
315
|
-
feed(report) {
|
|
316
|
-
const ret = wasm.loopuntildone_feed(this.__wbg_ptr, addHeapObject(report));
|
|
317
|
-
return takeObject(ret);
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* @returns {boolean}
|
|
321
|
-
*/
|
|
322
|
-
isDone() {
|
|
323
|
-
const ret = wasm.loopuntildone_isDone(this.__wbg_ptr);
|
|
324
|
-
return ret !== 0;
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* @param {StopConditionSpec[]} conditions
|
|
328
|
-
*/
|
|
329
|
-
constructor(conditions) {
|
|
330
|
-
try {
|
|
331
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
332
|
-
const ptr0 = passArrayJsValueToWasm0(conditions, wasm.__wbindgen_export);
|
|
333
|
-
const len0 = WASM_VECTOR_LEN;
|
|
334
|
-
wasm.loopuntildone_new(retptr, ptr0, len0);
|
|
335
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
336
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
337
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
338
|
-
if (r2) {
|
|
339
|
-
throw takeObject(r1);
|
|
340
|
-
}
|
|
341
|
-
this.__wbg_ptr = r0;
|
|
342
|
-
LoopUntilDoneFinalization.register(this, this.__wbg_ptr, this);
|
|
343
|
-
return this;
|
|
344
|
-
} finally {
|
|
345
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* @returns {LoopAction}
|
|
350
|
-
*/
|
|
351
|
-
start() {
|
|
352
|
-
const ret = wasm.loopuntildone_start(this.__wbg_ptr);
|
|
353
|
-
return takeObject(ret);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
if (Symbol.dispose) LoopUntilDone.prototype[Symbol.dispose] = LoopUntilDone.prototype.free;
|
|
357
|
-
|
|
358
297
|
export class SignalRouter {
|
|
359
298
|
__destroy_into_raw() {
|
|
360
299
|
const ptr = this.__wbg_ptr;
|
|
@@ -417,80 +356,6 @@ export class SignalRouter {
|
|
|
417
356
|
}
|
|
418
357
|
}
|
|
419
358
|
if (Symbol.dispose) SignalRouter.prototype[Symbol.dispose] = SignalRouter.prototype.free;
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Single-elimination tournament with pairwise comparative judging.
|
|
423
|
-
*/
|
|
424
|
-
export class Tournament {
|
|
425
|
-
__destroy_into_raw() {
|
|
426
|
-
const ptr = this.__wbg_ptr;
|
|
427
|
-
this.__wbg_ptr = 0;
|
|
428
|
-
TournamentFinalization.unregister(this);
|
|
429
|
-
return ptr;
|
|
430
|
-
}
|
|
431
|
-
free() {
|
|
432
|
-
const ptr = this.__destroy_into_raw();
|
|
433
|
-
wasm.__wbg_tournament_free(ptr, 0);
|
|
434
|
-
}
|
|
435
|
-
/**
|
|
436
|
-
* @param {string[]} winners
|
|
437
|
-
* @returns {TournamentAction}
|
|
438
|
-
*/
|
|
439
|
-
feedRound(winners) {
|
|
440
|
-
try {
|
|
441
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
442
|
-
const ptr0 = passArrayJsValueToWasm0(winners, wasm.__wbindgen_export);
|
|
443
|
-
const len0 = WASM_VECTOR_LEN;
|
|
444
|
-
wasm.tournament_feedRound(retptr, this.__wbg_ptr, ptr0, len0);
|
|
445
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
446
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
447
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
448
|
-
if (r2) {
|
|
449
|
-
throw takeObject(r1);
|
|
450
|
-
}
|
|
451
|
-
return takeObject(r0);
|
|
452
|
-
} finally {
|
|
453
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
/**
|
|
457
|
-
* @returns {boolean}
|
|
458
|
-
*/
|
|
459
|
-
isDone() {
|
|
460
|
-
const ret = wasm.tournament_isDone(this.__wbg_ptr);
|
|
461
|
-
return ret !== 0;
|
|
462
|
-
}
|
|
463
|
-
/**
|
|
464
|
-
* @param {string[]} entrants
|
|
465
|
-
*/
|
|
466
|
-
constructor(entrants) {
|
|
467
|
-
try {
|
|
468
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
469
|
-
const ptr0 = passArrayJsValueToWasm0(entrants, wasm.__wbindgen_export);
|
|
470
|
-
const len0 = WASM_VECTOR_LEN;
|
|
471
|
-
wasm.tournament_new(retptr, ptr0, len0);
|
|
472
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
473
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
474
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
475
|
-
if (r2) {
|
|
476
|
-
throw takeObject(r1);
|
|
477
|
-
}
|
|
478
|
-
this.__wbg_ptr = r0;
|
|
479
|
-
TournamentFinalization.register(this, this.__wbg_ptr, this);
|
|
480
|
-
return this;
|
|
481
|
-
} finally {
|
|
482
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* @returns {TournamentAction}
|
|
487
|
-
*/
|
|
488
|
-
start() {
|
|
489
|
-
const ret = wasm.tournament_start(this.__wbg_ptr);
|
|
490
|
-
return takeObject(ret);
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
if (Symbol.dispose) Tournament.prototype[Symbol.dispose] = Tournament.prototype.free;
|
|
494
359
|
export function __wbg_Error_bce6d499ff0a4aff(arg0, arg1) {
|
|
495
360
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
496
361
|
return addHeapObject(ret);
|
|
@@ -634,15 +499,9 @@ const GovernanceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
634
499
|
const KernelRuntimeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
635
500
|
? { register: () => {}, unregister: () => {} }
|
|
636
501
|
: new FinalizationRegistry(ptr => wasm.__wbg_kernelruntime_free(ptr, 1));
|
|
637
|
-
const LoopUntilDoneFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
638
|
-
? { register: () => {}, unregister: () => {} }
|
|
639
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_loopuntildone_free(ptr, 1));
|
|
640
502
|
const SignalRouterFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
641
503
|
? { register: () => {}, unregister: () => {} }
|
|
642
504
|
: new FinalizationRegistry(ptr => wasm.__wbg_signalrouter_free(ptr, 1));
|
|
643
|
-
const TournamentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
644
|
-
? { register: () => {}, unregister: () => {} }
|
|
645
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_tournament_free(ptr, 1));
|
|
646
505
|
|
|
647
506
|
function addHeapObject(obj) {
|
|
648
507
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
package/deepstrike_wasm_bg.wasm
CHANGED
|
Binary file
|