virnavi_ai_agent_compose 0.0.3
virnavi_ai_agent_compose: ^0.0.3 copied to clipboard
Ties Flutter UI to MCP tool results. Widgets rebuild reactively when AI agents invoke tools — no setState needed.
0.0.3 #
New features #
- Nested model propagation —
McpComposeBindingnow accepts an optionalMcpSummary. When provided, after every successful tool call the binding walks the result model'snestedExtractorsand stores each nested model's JSON inMcpResultStoreunder its own model ID. Recurses for arbitrarily deep nesting. This means@McpViewwidgets bound to nested models (e.g.DimensionsinsideProduct) react automatically without a separate tool call.
0.0.1 #
Initial release.
McpToolState— sealed state type:McpIdle,McpLoading,McpSuccess(data),McpError(message).McpResultStore—ChangeNotifierthat holds per-tool state; updates reactively as AI agents invoke tools.McpComposeBinding— wrapsToolDefinitionhandlers to driveMcpResultStorethroughidle → loading → success | errortransitions automatically.McpResultBuilder— Flutter widget backed byListenableBuilderthat rebuilds whenever a specific tool's state changes.McpViewDefinition— pairs a model ID with aWidget Function(Object?)builder; attached toMcpSummaryviaMcpSummaryViewsXextension.McpSummaryViewsXextension onMcpSummary—bindViews(),views,buildView()using anExpandoto avoid circular dependencies.McpViewannotation re-exported fromvirnavi_ai_agent_mcp— app code only needs to import compose.List<ToolDefinition>.registerWith(bridge, binding)convenience extension.