feat(mini): migrate mini to v2 (#34895)
feat(run): migrate non-interactive prompts to V2 feat(run): route mini prompts through V2 fix(run): use current session contracts fix(run): fix V2 prompt turns feat(cli): add mini subcommand feat(run): use settled execution events fix(run): handle remote prompt file attachments feat(run): send prompt files as attachments feat(run): use current APIs for run state fix(run): adopt app-node runtime deps feat(run): track subagent sessions feat(run): move catalogs and default model onto current APIs
This commit is contained in:
@@ -34,6 +34,8 @@ type OpenApiSchema = {
|
||||
additionalProperties?: OpenApiSchema | boolean
|
||||
allOf?: OpenApiSchema[]
|
||||
anyOf?: OpenApiSchema[]
|
||||
contentMediaType?: string
|
||||
contentSchema?: OpenApiSchema
|
||||
description?: string
|
||||
enum?: Array<string | boolean>
|
||||
items?: OpenApiSchema
|
||||
@@ -97,6 +99,7 @@ function matchLegacyOpenApi(input: Record<string, unknown>) {
|
||||
}
|
||||
normalizeComponentNames(spec)
|
||||
collapseDuplicateComponents(spec)
|
||||
normalizeV2EventSchemas(spec)
|
||||
applyLegacySchemaOverrides(spec)
|
||||
normalizeComponentDescriptions(spec)
|
||||
addLegacyErrorSchemas(spec)
|
||||
@@ -229,6 +232,16 @@ function collapseDuplicateComponents(spec: OpenApiSpec) {
|
||||
}
|
||||
}
|
||||
|
||||
function normalizeV2EventSchemas(spec: OpenApiSpec) {
|
||||
const schemas = spec.components?.schemas
|
||||
if (!schemas?.V2Event1?.anyOf || schemas.V2Event?.type !== "string") return
|
||||
schemas.V2EventStream = schemas.V2Event
|
||||
rewriteRefs(spec, "V2Event", "V2EventStream")
|
||||
schemas.V2Event = schemas.V2Event1
|
||||
delete schemas.V2Event1
|
||||
rewriteRefs(spec, "V2Event1", "V2Event")
|
||||
}
|
||||
|
||||
function normalizeComponentNames(spec: OpenApiSpec) {
|
||||
const schemas = spec.components?.schemas
|
||||
if (!schemas) return
|
||||
|
||||
Reference in New Issue
Block a user