fix(contracts): include tool.denied in runtime event types (#9770)

Co-authored-by: Simone <[email protected]>
This commit is contained in:
SimoneandSimone authored and GitHub committed 2026-09-04 16:48:00 -04:00
1 parent 0a590fa01a
commit b7d6e65021
2 files changed
+11 -2

No files matched your search

+10 -2
View File
@@ -1,11 +1,19 @@
import { describe, expect, it } from "vite-plus/test";
import { describe, expect, expectTypeOf, it } from "vite-plus/test";
import * as Schema from "effect/Schema";
import { classifyTaskAgentKind, ProviderRuntimeEvent } from "./providerRuntime.ts";
import {
classifyTaskAgentKind,
ProviderRuntimeEvent,
type ProviderRuntimeEventType,
} from "./providerRuntime.ts";
const decodeRuntimeEvent = Schema.decodeUnknownSync(ProviderRuntimeEvent);
describe("ProviderRuntimeEvent", () => {
it("includes every runtime event in the public event type", () => {
expectTypeOf<ProviderRuntimeEvent["type"]>().toEqualTypeOf<ProviderRuntimeEventType>();
});
it("requires input and output totals for complete turn usage", () => {
const completeEvent = {
type: "turn.completed",
@@ -186,6 +186,7 @@ const ProviderRuntimeEventType = Schema.Literals([
"hook.completed",
"tool.progress",
"tool.summary",
"tool.denied",
"auth.status",
"account.updated",
"account.rate-limits.updated",