Support ResponseSchema derivation for Scala 3 union types (rendered as JSON-Schema anyOf with a discriminator), enabling classifier.run(msg): F[Refund | Complaint | GeneralQuery] followed by an exhaustive match. Combined with issue 5 this gives a type-safe version of Embabel’s “closed mode” agent routing: a router that dispatches each classified intent to a typed sub-agent, with unhandled intents caught by the compiler. Scala 2.13 can offer a sealed-trait equivalent.
Support ResponseSchema derivation for Scala 3 union types (rendered as JSON-Schema anyOf with a discriminator), enabling classifier.run(msg): F[Refund | Complaint | GeneralQuery] followed by an exhaustive match. Combined with issue 5 this gives a type-safe version of Embabel’s “closed mode” agent routing: a router that dispatches each classified intent to a typed sub-agent, with unhandled intents caught by the compiler. Scala 2.13 can offer a sealed-trait equivalent.