genui_x 0.0.10
genui_x: ^0.0.10 copied to clipboard
Connect any AI backend — Claude, OpenAI-compatible, or custom proxy — to Google's genui (Generative UI) framework.
0.0.10 #
- Add
GenuiXTransport.anthropic()factory constructor — mirrors.openai()with explicit Anthropic defaults (x-api-keyheader,/v1/messagesendpoint, Anthropic SSE format). - Add automatic retry on 429 responses with exponential backoff — configurable via
maxRetries(default3). RespectsRetry-Afterheader when present.
0.0.9 #
- Add
GenuiXTransport.openai()factory constructor — pre-configuresAuthorization: Bearerheader,/v1/chat/completionsendpoint, and OpenAI SSE format. Works with OpenAI, OpenRouter, LiteLLM, and any OpenAI-compatible proxy. - Add
surfaceOperations(SurfaceOperations?) toGenuiXTransportandGenuiXConfig— usePromptBuilder.custom()to control which A2UI operations (create, update, delete) the AI may perform. Defaults toPromptBuilder.chat()(create-only) when not set. - Add
clientDataModel(Map<String, Object?>?) toGenuiXTransportandGenuiXConfig— inject app-state context (user profile, active session, domain data) into the system prompt. - Add
GenuiXRateLimitError— thrown on 429 responses. ExposesretryAfter: int?parsed from theRetry-Afterheader. - Re-export
PromptFragmentsandSurfaceOperationsfromgenui_x.dart— users no longer need a separateimport 'package:genui/genui.dart'to configure the transport. - Remove Flutter upper-bound constraint (
<4.0.0) per pub.dev deprecation guidance. - Overhaul README — add genui/genui_x architecture diagram, backend examples,
surfaceOperationsandclientDataModelusage.
0.0.8 #
- Improve doc comments on all public APIs —
GenuiXTransport,GenuiXConfig,GenuiXStreamFormat,GenuiXAuthError,GenuiXApiError. - Add
example/lib/proxy_main.dart— runnable example for OpenAI-compatible backends (LiteLLM, OpenRouter, custom proxy). - Update
example/README.mdto document all three entry points.
0.0.7 #
- Rename
ClaudeTransport→GenuiXTransport,ClaudeConfig→GenuiXConfig,ClaudeStreamFormat→GenuiXStreamFormat— names no longer imply Claude-only. - Rename
ClaudeAuthException→GenuiXAuthErrorandClaudeApiException→GenuiXApiErrorfor provider-neutral naming. - Add
cancel()toClaudeTransport— abort an in-flight request and resetisLoading. - Add
clearHistory()toClaudeTransport— reset conversation history without creating a new transport. - Add
debug: booltoClaudeConfigandClaudeTransport— prints request URL, model, status code, and errors viadebugPrint. - Add transport-level tests: error handling, streaming (Anthropic + OpenAI),
isLoadingstate,cancel(),clearHistory().
0.0.5 #
- Add
systemPromptFragmentstoClaudeTransportandClaudeConfig— inject persona, domain restrictions, or date context into the system prompt. - Add
isLoading(ValueNotifier<bool>) toClaudeTransport— drive loading indicators without manually tracking conversation state. - Tighten SDK constraint to
>=3.10.0 <4.0.0and Flutter to>=3.35.7 <4.0.0to match genui 0.8.0 requirements.
0.0.4 #
- Rename main library export to
genui_x.dart— import withpackage:genui_x/genui_x.dart. - Add
requestBodyOverridestoClaudeTransportandClaudeConfigfor provider-specific JSON-mode support. - Add travel demo example app and minimal example app.
- Fix
baseUrlresolution in example apps.
0.0.3 #
- Add OpenAI-style stream format support and parser.
- Allow selecting stream format via ClaudeConfig.
- Document OpenAI-style proxy configuration.
- Add request body overrides for JSON-mode responses.
0.0.2 #
- Add configurable endpoint path and request headers for proxies/LiteLLM.
- Document proxy usage and authorization header support.
0.0.1 #
- Initial release of the Claude transport adapter for genui.
- Includes ClaudeTransport, configuration, and SSE parsing.
- Adds a Flutter example app and basic tests.