Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR Review: chore(release): Bump version to 0.4.1This is a straightforward version bump PR. Here's my assessment: Summary of Changes
ObservationsConsistency note — README vs build.mill snapshot baseline The README previously said build.mill fallback version The pattern package.json version
No test changes needed This is purely a metadata/version bump with no logic changes, so the absence of new tests is appropriate. Verdict✅ Looks good to merge. The changes are minimal, correct, and internally consistent. The post-merge checklist (tag → push tag → wait for CI publish → bump to 🤖 Reviewed with Claude Code |
The ToolInput macro now tries to summon a user-provided ToolInput[T] before auto-generating schemas. This handles sealed ADT enums with custom JSON encoding (e.g. types that accept string | array on the wire) where the macro can't infer the correct schema from case names alone. Changes: - JsonSchema.AnyOfType + anyOf() constructor for union type schemas - ZodConverter handles AnyOfType via z.union() - ToolInputMacros.typeToSchemaExpr tries Expr.summon[ToolInput[T]] before falling through to auto-generation for enums and unknown types Usage: define `given ToolInput[MyType]` in the companion object with a manual schema, and the macro will pick it up automatically when MyType appears as a field in a derived case class. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code Review: v0.4.1 Release PROverall this is a clean, well-scoped release PR. The version bumps are consistent across all three files (
|
The trySummonToolInput pattern now applies to case classes too, not just enums and unknown types. Users can define a custom `given ToolInput[MyCaseClass]` to override the auto-derived schema. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR Review: chore(release): Bump version to 0.4.1Overall this is a clean release PR. The version bumps are straightforward and the two substantive changes (macro improvement + AnyOf schema support) are well-structured. A few observations below. ✅ What's good
|
Summary
0.4.10.4.10.4.1What's in v0.4.1
JsonSchema.AnyOfType+anyOf()constructor for union type schemas, with Zod conversion viaz.union()Expr.summon[ToolInput[T]]before auto-generating schemas, enabling custom JSON encoding for sealed ADT enumsPost-merge
git tag -a v0.4.1 -m "Release 0.4.1"git push origin v0.4.10.4.2-SNAPSHOTfor development🤖 Generated with Claude Code