@@ -241,6 +241,7 @@ const ModelReroutedType = Schema.Literal("model.rerouted");
241241const ConfigWarningType = Schema . Literal ( "config.warning" ) ;
242242const DeprecationNoticeType = Schema . Literal ( "deprecation.notice" ) ;
243243const FilesPersistedType = Schema . Literal ( "files.persisted" ) ;
244+ const ToolDeniedType = Schema . Literal ( "tool.denied" ) ;
244245const RuntimeWarningType = Schema . Literal ( "runtime.warning" ) ;
245246const RuntimeErrorType = Schema . Literal ( "runtime.error" ) ;
246247
@@ -589,6 +590,14 @@ const FilesPersistedPayload = Schema.Struct({
589590} ) ;
590591export type FilesPersistedPayload = typeof FilesPersistedPayload . Type ;
591592
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+
592601const RuntimeWarningPayload = Schema . Struct ( {
593602 message : TrimmedNonEmptyStringSchema ,
594603 detail : Schema . optional ( Schema . Unknown ) ,
@@ -934,6 +943,13 @@ const ProviderRuntimeFilesPersistedEvent = Schema.Struct({
934943} ) ;
935944export type ProviderRuntimeFilesPersistedEvent = typeof ProviderRuntimeFilesPersistedEvent . Type ;
936945
946+ const ProviderRuntimeToolDeniedEvent = Schema . Struct ( {
947+ ...ProviderRuntimeEventBase . fields ,
948+ type : ToolDeniedType ,
949+ payload : ToolDeniedPayload ,
950+ } ) ;
951+ export type ProviderRuntimeToolDeniedEvent = typeof ProviderRuntimeToolDeniedEvent . Type ;
952+
937953const ProviderRuntimeWarningEvent = Schema . Struct ( {
938954 ...ProviderRuntimeEventBase . fields ,
939955 type : RuntimeWarningType ,
@@ -994,6 +1010,7 @@ export const ProviderRuntimeEventV2 = Schema.Union([
9941010 ProviderRuntimeConfigWarningEvent ,
9951011 ProviderRuntimeDeprecationNoticeEvent ,
9961012 ProviderRuntimeFilesPersistedEvent ,
1013+ ProviderRuntimeToolDeniedEvent ,
9971014 ProviderRuntimeWarningEvent ,
9981015 ProviderRuntimeErrorEvent ,
9991016] ) ;
0 commit comments