tandem_generator 0.3.0
tandem_generator: ^0.3.0 copied to clipboard
Generates the code behind a Tandem agent list: the names, doc comments and JSON Schemas of what a class lets the agent see and call.
0.3.0 #
- Breaking: Upgrade
tandemto 0.3.0 and rundart run build_runner buildagain. - Breaking: Mark an object parameter with
@TandemInput()when the agent should create it; otherwise list the objects it chooses from with.sees. - Breaking: Keep
agentCapabilitiesfree ofsuper, and write each.seesin that getter. - Breaking: Match constructor parameter and getter types in classes Tandem reads from their constructors.
- Breaking: Supply a
JsonConverterfor Flutter values without a built-in form instead of relying on constructor and getter serialization. @TandemCatalog([...])generates a catalog from the app's widget constructors, including children, actions and fields. Its doc comment supplies guidelines and an example whose component and property names are checked during the build.converters:on@TandemAgentand@TandemCatalogacceptsJsonConverter<T, S>values for types the app wants to describe differently..seesmay stand inside anif, aswitchor a spread, so the agent list can follow the route.- Supported types include
Uri,Set<T>, token classes and classes with concrete generic type arguments. - List parameters accept nullable elements and nested lists.
- A parameter's default may be a
static constmember of its class. - Dependency bounds accept analyzer 13.3 and source_gen 4.2.4, allowing apps using auto_route_generator 10.6 to resolve.
0.2.1 #
- An enum with its own
namefield reaches the agent by the name of its constant. Before, the generated code sent the field's value. - The example shows the order form of Tandem's example app.
0.2.0 #
- A description joins the wrapped lines of its doc comment and keeps its paragraphs, so the agent reads whole sentences.
- A method can return
Future<T>?orFutureOr<T>?. When it returns null, the agent gets null as the result.
0.1.0 #
- Generates the
_$Namemixin of a class with@TandemAgent(): the names, doc comments and JSON Schemas of what itsagentCapabilitieslist. - Parameters, results and
.seesvalues can beString,bool,int,double,num,DateTime, enums, extension types overString,int,double,numorbool,List<T>and plain classes. Any other type fails the build, which names the type and where it is. - The schema of a nullable parameter is
anyOfthe schema of its type and{"type": "null"}.