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