| @@ -241,6 +241,7 @@ const ModelReroutedType = Schema.Literal("model.rerouted"); · 240 unmodified lines |
| 241 | 241 | const ConfigWarningType = Schema.Literal("config.warning"); |
| 242 | 242 | const DeprecationNoticeType = Schema.Literal("deprecation.notice"); |
| 243 | 243 | const FilesPersistedType = Schema.Literal("files.persisted"); |
| 244 | +const ToolDeniedType = Schema.Literal("tool.denied"); |
| 244 | 245 | const RuntimeWarningType = Schema.Literal("runtime.warning"); |
| 245 | 246 | const RuntimeErrorType = Schema.Literal("runtime.error"); |
| 246 | 247 | |
| @@ -589,6 +590,14 @@ const FilesPersistedPayload = Schema.Struct({ · 342 unmodified lines |
| 589 | 590 | }); |
| 590 | 591 | export type FilesPersistedPayload = typeof FilesPersistedPayload.Type; |
| 591 | 592 | |
| 593 | +const ToolDeniedPayload = Schema.Struct({ |
| 594 | + toolName: TrimmedNonEmptyStringSchema, |
| 595 | + toolUseId: Schema.optional(TrimmedNonEmptyStringSchema), |
| 596 | + reason: Schema.optional(TrimmedNonEmptyStringSchema), |
| 597 | + agentId: Schema.optional(TrimmedNonEmptyStringSchema), |
| 598 | +}); |
| 599 | +export type ToolDeniedPayload = typeof ToolDeniedPayload.Type; |
| 600 | + |
| 592 | 601 | const RuntimeWarningPayload = Schema.Struct({ |
| 593 | 602 | message: TrimmedNonEmptyStringSchema, |
| 594 | 603 | detail: Schema.optional(Schema.Unknown), |
| @@ -934,6 +943,13 @@ const ProviderRuntimeFilesPersistedEvent = Schema.Struct({ · 339 unmodified lines |
| 934 | 943 | }); |
| 935 | 944 | export type ProviderRuntimeFilesPersistedEvent = typeof ProviderRuntimeFilesPersistedEvent.Type; |
| 936 | 945 | |
| 946 | +const ProviderRuntimeToolDeniedEvent = Schema.Struct({ |
| 947 | + ...ProviderRuntimeEventBase.fields, |
| 948 | + type: ToolDeniedType, |
| 949 | + payload: ToolDeniedPayload, |
| 950 | +}); |
| 951 | +export type ProviderRuntimeToolDeniedEvent = typeof ProviderRuntimeToolDeniedEvent.Type; |
| 952 | + |
| 937 | 953 | const ProviderRuntimeWarningEvent = Schema.Struct({ |
| 938 | 954 | ...ProviderRuntimeEventBase.fields, |
| 939 | 955 | type: RuntimeWarningType, |
| @@ -994,6 +1010,7 @@ export const ProviderRuntimeEventV2 = Schema.Union([ · 54 unmodified lines |
| 994 | 1010 | ProviderRuntimeConfigWarningEvent, |
| 995 | 1011 | ProviderRuntimeDeprecationNoticeEvent, |
| 996 | 1012 | ProviderRuntimeFilesPersistedEvent, |
| 1013 | + ProviderRuntimeToolDeniedEvent, |
| 997 | 1014 | ProviderRuntimeWarningEvent, |
| 998 | 1015 | ProviderRuntimeErrorEvent, |
| 999 | 1016 | ]); |