Skip to content

Commit 952478c

Browse files
codexMats Varnskühler
andcommitted
Merge origin/main into pr7249 follow-up
Co-authored-by: Mats Varnskühler <[email protected]>
2 parents 27c25b5 + f925d63 commit 952478c

3 files changed

Lines changed: 638 additions & 97 deletions

File tree

‎packages/effect-codex-app-server/scripts/generate.ts‎

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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+
148175
const 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

Comments
 (0)