| ... | @@ -1,11 +1,19 @@ | ... | @@ -1,11 +1,19 @@ |
| 1 | import { describe, expect, it } from "vite-plus/test"; | 1 | import { describe, expect, expectTypeOf, it } from "vite-plus/test"; |
| 2 | import * as Schema from "effect/Schema"; | 2 | import * as Schema from "effect/Schema"; |
| 3 | | 3 | |
| 4 | import { classifyTaskAgentKind, ProviderRuntimeEvent } from "./providerRuntime.ts"; | 4 | import { |
| | 5 | classifyTaskAgentKind, |
| | 6 | ProviderRuntimeEvent, |
| | 7 | type ProviderRuntimeEventType, |
| | 8 | } from "./providerRuntime.ts"; |
| 5 | | 9 | |
| 6 | const decodeRuntimeEvent = Schema.decodeUnknownSync(ProviderRuntimeEvent); | 10 | const decodeRuntimeEvent = Schema.decodeUnknownSync(ProviderRuntimeEvent); |
| 7 | | 11 | |
| 8 | describe("ProviderRuntimeEvent", () => { | 12 | describe("ProviderRuntimeEvent", () => { |
| | 13 | it("includes every runtime event in the public event type", () => { |
| | 14 | expectTypeOf<ProviderRuntimeEvent["type"]>().toEqualTypeOf<ProviderRuntimeEventType>(); |
| | 15 | }); |
| | 16 | |
| 9 | it("requires input and output totals for complete turn usage", () => { | 17 | it("requires input and output totals for complete turn usage", () => { |
| 10 | const completeEvent = { | 18 | const completeEvent = { |
| 11 | type: "turn.completed", | 19 | type: "turn.completed", |