@vincemakes/kiso-evals 0.1.31 → 0.1.32
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/dist/faux.d.ts +13 -1
- package/dist/faux.js +4 -0
- package/dist/fixtures/runner.js +4 -1
- package/package.json +4 -4
package/dist/faux.d.ts
CHANGED
|
@@ -24,7 +24,19 @@ import type { Adapter } from "@vincemakes/kiso-core";
|
|
|
24
24
|
import type { EventInput } from "@vincemakes/kiso-core";
|
|
25
25
|
/** One model turn: the events it emits. Tool results live in fixture tools. */
|
|
26
26
|
export interface FauxTurn {
|
|
27
|
-
readonly events: readonly EventInput[];
|
|
27
|
+
readonly events: readonly (EventInput | FauxDelay)[];
|
|
28
|
+
}
|
|
29
|
+
/** W18: the harness's slow-adapter capability — a `delay` pseudo-event
|
|
30
|
+
* awaits REAL milliseconds before the following events. The CLI e2e's
|
|
31
|
+
* slow-summarize needs a genuinely slow adapter call at the PROCESS
|
|
32
|
+
* level (nothing else is slow there: every summarize local step is a
|
|
33
|
+
* linear scan and the stream itself is instant); the runtime gates
|
|
34
|
+
* prove the abort semantics with real inline adapters. The delay is
|
|
35
|
+
* NOT signal-aware — the runtime's post-call boundary check catches
|
|
36
|
+
* an abort that landed during it. */
|
|
37
|
+
export interface FauxDelay {
|
|
38
|
+
readonly type: "delay";
|
|
39
|
+
readonly ms: number;
|
|
28
40
|
}
|
|
29
41
|
export type FauxScript = readonly FauxTurn[];
|
|
30
42
|
export declare function createFauxProvider(script: FauxScript): Adapter;
|
package/dist/faux.js
CHANGED
|
@@ -45,6 +45,10 @@ export function createFauxProvider(script) {
|
|
|
45
45
|
// fake `completed`.
|
|
46
46
|
let seq = 0;
|
|
47
47
|
for (const ev of turn?.events ?? []) {
|
|
48
|
+
if (ev.type === "delay") {
|
|
49
|
+
await new Promise((resolve) => setTimeout(resolve, ev.ms));
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
48
52
|
yield { ...ev, seq: seq++ };
|
|
49
53
|
}
|
|
50
54
|
},
|
package/dist/fixtures/runner.js
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
* checks. Loop integration (trajectory + requiredTerminal) lands in M1.
|
|
4
4
|
*/
|
|
5
5
|
export function flattenScript(fixture) {
|
|
6
|
-
|
|
6
|
+
// W18: the delay pseudo-event is a harness timing directive consumed by
|
|
7
|
+
// the faux stream — never a model event, so the static checks must not
|
|
8
|
+
// see it (the flat view is the MODEL's event stream).
|
|
9
|
+
return fixture.script.flatMap((turn) => turn.events.filter((ev) => ev.type !== "delay"));
|
|
7
10
|
}
|
|
8
11
|
export function runStaticFixture(fixture) {
|
|
9
12
|
const events = flattenScript(fixture);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-evals",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"description": "kiso evals — the faux provider, the incident fixture library, and the cross-provider contract tests.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"test": "vitest run"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@vincemakes/kiso-core": "0.1.
|
|
24
|
+
"@vincemakes/kiso-core": "0.1.31"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@anthropic-ai/sdk": "^0.115.0",
|
|
28
|
-
"@vincemakes/kiso-provider-anthropic": "0.1.
|
|
29
|
-
"@vincemakes/kiso-provider-openai": "0.1.
|
|
28
|
+
"@vincemakes/kiso-provider-anthropic": "0.1.32",
|
|
29
|
+
"@vincemakes/kiso-provider-openai": "0.1.32",
|
|
30
30
|
"@types/node": "^26.1.2",
|
|
31
31
|
"openai": "^7.3.0",
|
|
32
32
|
"typescript": "^5.7.2",
|