@@ -145,6 +145,33 @@ const ManualSchemas: Record<string, Schema.Json> = {
145145 } ,
146146} ;
147147
148+ // Codex 0.150 added these multi-agent values before our next full protocol
149+ // refresh. Keep every generated response namespace compatible with them.
150+ const Codex0150DefinitionSchemas : Record < string , Schema . Json > = {
151+ CollabAgentTool : {
152+ type : "string" ,
153+ enum : [
154+ "spawnAgent" ,
155+ "sendInput" ,
156+ "resumeAgent" ,
157+ "wait" ,
158+ "closeAgent" ,
159+ "sendMessage" ,
160+ "followupTask" ,
161+ "interruptAgent" ,
162+ "listAgents" ,
163+ ] ,
164+ } ,
165+ CollabAgentToolCallStatus : {
166+ type : "string" ,
167+ enum : [ "inProgress" , "completed" , "failed" , "interrupted" ] ,
168+ } ,
169+ SubAgentActivityKind : {
170+ type : "string" ,
171+ enum : [ "started" , "interacted" , "interrupted" , "completed" ] ,
172+ } ,
173+ } ;
174+
148175const getGeneratedPaths = Effect . fn ( "getGeneratedPaths" ) ( function * ( ) {
149176 const path = yield * Path . Path ;
150177 const generatedDir = path . join ( import . meta. dirname , ".." , "src" , "_generated" ) ;
@@ -556,10 +583,12 @@ const generateFiles = Effect.fn("generateFiles")(function* () {
556583 ) ;
557584
558585 for ( const [ definitionName , definitionSchema ] of Object . entries ( parsed . definitions ?? { } ) ) {
586+ const compatibleDefinitionSchema =
587+ Codex0150DefinitionSchemas [ definitionName ] ?? definitionSchema ;
559588 aggregateSchemas [ localDefinitionNames . get ( definitionName ) ! ] = stripNullDefaults (
560589 normalizeNullableTypes (
561590 rewriteExternalRefs (
562- definitionSchema ,
591+ compatibleDefinitionSchema ,
563592 localDefinitionNames ,
564593 file . namespace ,
565594 exportNameByQualifiedName ,
0 commit comments