Problem
Internally, Flue calls toJsonSchema from Valibot's library (@valibot/to-json-schema). This forces the consumer to install Valibot as a dependency in their project even if they have an existing validation lib.
Suggestion
I think Flue should allow users to use any validation library they want by implementing the StandardJSONSchema & StandardSchema interface for the result object instead.
Benefits
flue/sdk reduces 2 runtime deps.
- Allows users to use any lib that uses Standard Schema / Standard JSON Schema. They can reuse their existing validation lib, no extra dependency.
Breaking Changes
- Existing Valibot users will encounter errors on upgrade. They need to install
@valibot/to-json-schema in their own project and explicitly call toStandardJsonSchema in their agent.
If this is a welcome change, I'd be happy to look into it and create a PR.
PS: Loving Flue so far! Super clean abstractions, I think a framework for building agents is exactly what is needed now.
Problem
Internally, Flue calls
toJsonSchemafrom Valibot's library (@valibot/to-json-schema). This forces the consumer to install Valibot as a dependency in their project even if they have an existing validation lib.Suggestion
I think Flue should allow users to use any validation library they want by implementing the
StandardJSONSchema&StandardSchemainterface for theresultobject instead.Benefits
flue/sdkreduces 2 runtime deps.Breaking Changes
@valibot/to-json-schemain their own project and explicitly calltoStandardJsonSchemain their agent.If this is a welcome change, I'd be happy to look into it and create a PR.
PS: Loving Flue so far! Super clean abstractions, I think a framework for building agents is exactly what is needed now.