antigravity 0.5.0
antigravity: ^0.5.0 copied to clipboard
A native Dart client SDK for Google Antigravity, fully decoupled from the Flutter framework for server, CLI, and mobile compatibility.
0.5.0 #
- Sync with Python SDK v0.1.7:
- Hierarchical Thread-Safe State Management: Introduced the
StateStoreclass for hierarchical context state sharing and lock/reentrancy support. RetargetedHookContextandToolContextto inherit fromStateStore. - Session Continuation Modes: Implemented
SessionContinuationModeto specify continuation behavior (RESUME,CREATE_OR_RESUME,CREATE_ONLY,SESSION_CONTINUATION_MODE_UNSPECIFIED) with validation checks onAgentConfig. - Dynamic Environment Hydration: Hydrates Vertex project and location parameters automatically from standard
GOOGLE_CLOUD_PROJECTandGOOGLE_CLOUD_LOCATIONenvironment variables when not explicitly passed, and enables Vertex mode automatically whenGOOGLE_GENAI_USE_VERTEXAIorGOOGLE_GENAI_USE_ENTERPRISEis set. - Websocket Retry Backoff & DNS Resolution: Refactored websocket connections in
LocalConnectionStrategyto retry on bothlocalhostand127.0.0.1to ensure reliable connections in containerized sandboxes. - Spinner Pause/Resume: Enhanced CLI
Spinnerwith pause and resume behaviors, and integrated them into user confirmation/question hooks to prevent prompt clobbering. - Custom Tool Execution Support: Added
custom_toolparsing support inStep.fromMapand filtered out tool calls from StepUpdate if they are local custom tools to prevent client duplicate events. - Addition Operator for Token Usage: Implemented
+addition operator onUsageMetadatafor clean accumulation of token usage. - Updated default image generation model to
'gemini-3.1-flash-lite-image'. - Added
ThinkingLevel.extraHigh('extra_high') level support.
- Hierarchical Thread-Safe State Management: Introduced the
0.4.1 #
- Bug Fixes & Adjustments:
- Restored default workspaces (current working directory) and capabilities configuration on
BaseLocalAgentConfigto prevent silent sandboxing regressions. - Fixed client handshake protocol to announce the correct client version instead of a stale one.
- Added missing
read_url_contenttool field mapping inStep.fromMapparser. - Resolved
HttpClientsocket/connection leak in LiteRT loopback server health checks. - Documented public configuration fields on
LocalOpenAIAgentConfigandLiteRTAgentConfig.
- Restored default workspaces (current working directory) and capabilities configuration on
0.4.0 #
- Local Inference & OpenAI Endpoint Support:
- Added support for local Gemma execution using LiteRT via
LiteRTAgentConfigandLiteRTConnectionStrategy(which manages a python loopback HTTP server). - Added support for any OpenAI-compatible completions API (e.g. Ollama, LM Studio) via
LocalOpenAIAgentConfigandLocalOpenAIConnectionStrategy.
- Added support for local Gemma execution using LiteRT via
- Multimodal Tool Outputs:
- Enabled custom tools to return media assets (images, audio, video, documents) directly via a single tool response without needing separate follow-up turns. Media is extracted and sent as
supplemental_mediaintool_response.
- Enabled custom tools to return media assets (images, audio, video, documents) directly via a single tool response without needing separate follow-up turns. Media is extracted and sent as
- Model Context Protocol (MCP):
- Decoupled tool calls and safety policy engines from legacy
mcp_string prefix synthesis, utilizing explicitserverNameattributes in tool evaluation.
- Decoupled tool calls and safety policy engines from legacy
- Alias Deserialization Support:
- Handled
results/entriesalias inListDirectoryResultandoutput/combined_outputalias inRunCommandResult.
- Handled
- Automated Binary Discovery Updates:
- Added version checking logic to verify if the cached
localharnessbinary is out of date. - Automatically triggers a re-download/upgrade if the cached binary version is older than the SDK's default version (
0.1.6).
- Added version checking logic to verify if the cached
0.3.1 #
-
Fix Tool Error Hook Dispatching:
- Resolved a bug where
OnToolErrorHookwas never dispatched for either client-side custom tool failures or harness-side built-in tool failures. - Implemented client-side tool error dispatching in
local_connection.dartwith support for recovery values. - Added routing for
LIFECYCLE_HOOK_ON_TOOL_ERRORandON_TOOL_ERRORhook requests inhook_router.dartand covered it with a unit test.
- Resolved a bug where
-
Dart 3 Modernization:
- Refactored core classes
ConnectionandConnectionStrategyto use Dart 3abstract interface classmodifiers. - Marked
MediaContentas asealed classto restrict subclass hierarchy and support compiler-level exhaustiveness checks. - Modernized
registerHook,allow,deny, andaskUserto leverage case type pattern matching inside switch statements. - Refactored policy bucket index resolution (
_bucketIndex), file change triggers (onFileChange), shorthand model builder (_buildShorthandModels), and step state mappings (Step.fromMap) to use clean switch expressions and logical OR patterns. - Updated local connection classes to implement rather than extend the new interface classes.
- Added conditional imports in
lib/src/types/content.dartto support running the package on the web.
- Refactored core classes
0.3.0 #
- Synchronize updates from Python SDK (v0.1.5):
- Added new
read_url_contentbuiltin tool and itsReadUrlContentResultstructured output. - Added
StepType.thinkingto enum representation for telemetry tracking. - Implemented the
HookRouterto process WebSocket-basedCallHookRequestturn and tool lifecycle hooks delegated by the harness. - Added support for telemetry
PreStepHookandPostStepHookinsideHookRunnerand connection parser. - Implemented
_StepTrackerto prevent duplicate step hooks or non-linear state transitions. - Supported error and cancelled propagation in
trajectory_state_updateevents. - Historical Step Absorption: Aligned startup handshake to await and parse pre-existing conversation history and usage metadata from
initialize_conversation_response, populating them immediately inConversationon start.
- Added new
0.2.2 #
- Update to support web platform use
0.2.1 #
- Reintroduce generated files in package
0.2.0 #
- Model Configuration Overhaul: Replaced the monolithic
GeminiConfigwith a more flexibleModelTargetand polymorphicModelEndpointclass hierarchy (GeminiAPIEndpoint,VertexEndpoint). - Subagents Feature: Introduced
SubagentConfigandSubagentCapabilitiesallowing definition and inclusion of subagents in the main agent's configuration. - New Builtin Tools: Added
SearchWebtool and relatedSearchWebResultstructured output. - Enhanced Configuration: Support for environment variables (
env) inMcpStdioServer. RemovedimageModelfromCapabilitiesConfigto favor the new generic model targeting features.
0.1.3 #
- Added support for Vertex AI configuration (project, location, vertex options) in
GeminiConfig. - Refactored Model Context Protocol (MCP) server configurations to run connections natively on the Go-based harness, removing client-side
McpBridgereferences. - Added
SlashCommandstructure to input content primitives to support built-in planning flows. - Integrated CLI
SpinnerintorunInteractiveLoopwith step-by-step progress tracking viaagent.conversation.receiveSteps(). - Enhanced policy engine with a 9-level priority model supporting prefix wildcards and custom MCP policy validators.
- Added
AntigravityCancelledExceptionandAntigravityExecutionExceptionfor robust error handling.
0.0.1 #
- Initial release of the Antigravity Dart SDK.