@vincemakes/kiso-evals 0.1.31 → 0.1.33

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 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
  },
@@ -3,7 +3,8 @@
3
3
  * and allowed later; the model must see both outcomes distinctly.
4
4
  *
5
5
  * Incident (mauri ADR-0002): a permission system that is a yes/no gate has
6
- * no memory and no upgrade path. CC's ask model allows deny-with-reason,
6
+ * no memory and no upgrade path. The reference implementation's ask model
7
+ * allows deny-with-reason,
7
8
  * and the reason feeds back to the model so it can adjust. The kernel's
8
9
  * contract: each decision is a distinct tool_result — `precondition` for a
9
10
  * refusal (the tool never ran), a normal result for the allowed retry.
@@ -3,7 +3,8 @@
3
3
  * and allowed later; the model must see both outcomes distinctly.
4
4
  *
5
5
  * Incident (mauri ADR-0002): a permission system that is a yes/no gate has
6
- * no memory and no upgrade path. CC's ask model allows deny-with-reason,
6
+ * no memory and no upgrade path. The reference implementation's ask model
7
+ * allows deny-with-reason,
7
8
  * and the reason feeds back to the model so it can adjust. The kernel's
8
9
  * contract: each decision is a distinct tool_result — `precondition` for a
9
10
  * refusal (the tool never ran), a normal result for the allowed retry.
@@ -3,7 +3,10 @@
3
3
  * checks. Loop integration (trajectory + requiredTerminal) lands in M1.
4
4
  */
5
5
  export function flattenScript(fixture) {
6
- return fixture.script.flatMap((turn) => turn.events);
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);
@@ -6,7 +6,8 @@
6
6
  * the model ignored it and continued with "results look great, done" —
7
7
  * the turn ended "completed" with zero usable work. Root cause class:
8
8
  * error results ride the same channel as successes, and nothing forced the
9
- * model to acknowledge the error (CC's community loudest complaint: "reports
9
+ * model to acknowledge the error (the reference implementation's loudest
10
+ * community complaint: "reports
10
11
  * of finished work that never happened").
11
12
  *
12
13
  * The kernel-side shape the fixture pins: an isError tool_result in the
@@ -6,7 +6,8 @@
6
6
  * the model ignored it and continued with "results look great, done" —
7
7
  * the turn ended "completed" with zero usable work. Root cause class:
8
8
  * error results ride the same channel as successes, and nothing forced the
9
- * model to acknowledge the error (CC's community loudest complaint: "reports
9
+ * model to acknowledge the error (the reference implementation's loudest
10
+ * community complaint: "reports
10
11
  * of finished work that never happened").
11
12
  *
12
13
  * The kernel-side shape the fixture pins: an isError tool_result in the
@@ -6,7 +6,8 @@
6
6
  * real incident abstracted (uooki production, 2026). A fixture the loop
7
7
  * cannot pass is a regression the loop must not ship. Other frameworks
8
8
  * advertise features; kiso advertises "verifyable against known failure
9
- * modes" — because CC's loudest production complaints (reports of done work
9
+ * modes" — because the reference implementation's loudest production
10
+ * complaints (reports of done work
10
11
  * that never landed, silent tool failures) are exactly these shapes.
11
12
  *
12
13
  * `assert` receives the FULL trajectory (all events, seq 0..N) once the
@@ -6,7 +6,8 @@
6
6
  * real incident abstracted (uooki production, 2026). A fixture the loop
7
7
  * cannot pass is a regression the loop must not ship. Other frameworks
8
8
  * advertise features; kiso advertises "verifyable against known failure
9
- * modes" — because CC's loudest production complaints (reports of done work
9
+ * modes" — because the reference implementation's loudest production
10
+ * complaints (reports of done work
10
11
  * that never landed, silent tool failures) are exactly these shapes.
11
12
  *
12
13
  * `assert` receives the FULL trajectory (all events, seq 0..N) once the
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Fixture: UNKNOWN TOOL — the model calls a tool that is not registered.
3
3
  *
4
- * Incident class (uooki + CC community): a tool name drifts (renamed,
4
+ * Incident class (uooki + the reference implementation's community): a tool
5
+ * name drifts (renamed,
5
6
  * ghost entry, typo'd enum) and the harness either silently drops the call
6
7
  * (agent loops forever trying to find the tool) or executes something
7
8
  * unexpected. The kernel's answer is structural: an unregistered tool is
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Fixture: UNKNOWN TOOL — the model calls a tool that is not registered.
3
3
  *
4
- * Incident class (uooki + CC community): a tool name drifts (renamed,
4
+ * Incident class (uooki + the reference implementation's community): a tool
5
+ * name drifts (renamed,
5
6
  * ghost entry, typo'd enum) and the harness either silently drops the call
6
7
  * (agent loops forever trying to find the tool) or executes something
7
8
  * unexpected. The kernel's answer is structural: an unregistered tool is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-evals",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
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.30"
24
+ "@vincemakes/kiso-core": "0.1.32"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@anthropic-ai/sdk": "^0.115.0",
28
- "@vincemakes/kiso-provider-anthropic": "0.1.31",
29
- "@vincemakes/kiso-provider-openai": "0.1.31",
28
+ "@vincemakes/kiso-provider-anthropic": "0.1.33",
29
+ "@vincemakes/kiso-provider-openai": "0.1.33",
30
30
  "@types/node": "^26.1.2",
31
31
  "openai": "^7.3.0",
32
32
  "typescript": "^5.7.2",