diff --git a/a2a_agents/python/a2ui_agent/src/a2ui/extension/a2ui_extension.py b/a2a_agents/python/a2ui_agent/src/a2ui/extension/a2ui_extension.py index 150607b92..c8155d49e 100644 --- a/a2a_agents/python/a2ui_agent/src/a2ui/extension/a2ui_extension.py +++ b/a2a_agents/python/a2ui_agent/src/a2ui/extension/a2ui_extension.py @@ -89,7 +89,7 @@ def get_a2ui_datapart(part: Part) -> Optional[DataPart]: def get_a2ui_agent_extension( accepts_inline_catalogs: bool = False, - supported_catalog_ids: List[str] = [], + supported_catalog_ids: Optional[List[str]] = None, ) -> AgentExtension: """Creates the A2UI AgentExtension configuration. @@ -100,6 +100,8 @@ def get_a2ui_agent_extension( Returns: The configured A2UI AgentExtension. """ + if supported_catalog_ids is None: + supported_catalog_ids = [] params = {} if accepts_inline_catalogs: params[AGENT_EXTENSION_ACCEPTS_INLINE_CATALOGS_KEY] = ( diff --git a/a2a_agents/python/a2ui_agent/src/a2ui/extension/send_a2ui_to_client_toolset.py b/a2a_agents/python/a2ui_agent/src/a2ui/extension/send_a2ui_to_client_toolset.py index baba339f4..d65906b36 100644 --- a/a2a_agents/python/a2ui_agent/src/a2ui/extension/send_a2ui_to_client_toolset.py +++ b/a2a_agents/python/a2ui_agent/src/a2ui/extension/send_a2ui_to_client_toolset.py @@ -311,8 +311,8 @@ def convert_send_a2ui_to_client_genai_part_to_a2a_part( return [] final_parts = [] + logger.info(f"Found {len(json_data)} messages. Creating individual DataParts.") for message in json_data: - logger.info(f"Found {len(json_data)} messages. Creating individual DataParts.") final_parts.append(create_a2ui_part(message)) return final_parts diff --git a/a2a_agents/python/a2ui_agent/src/a2ui/inference/schema/validator.py b/a2a_agents/python/a2ui_agent/src/a2ui/inference/schema/validator.py index a42b2052e..2074d9db0 100644 --- a/a2a_agents/python/a2ui_agent/src/a2ui/inference/schema/validator.py +++ b/a2a_agents/python/a2ui_agent/src/a2ui/inference/schema/validator.py @@ -130,10 +130,10 @@ def _build_0_9_validator(self) -> Draft202012Validator: # these resolve to https://a2ui.org/specification/v0_9/catalog.json. # We must register them using these absolute URIs. base_uri = self._catalog.s2c_schema.get("$id", BASE_SCHEMA_URL) - import os + from urllib.parse import urljoin def get_sibling_uri(uri, filename): - return os.path.join(os.path.dirname(uri), filename) + return urljoin(uri, filename) catalog_uri = get_sibling_uri(base_uri, "catalog.json") common_types_uri = get_sibling_uri(base_uri, "common_types.json") diff --git a/renderers/lit/src/0.8/ui/root.ts b/renderers/lit/src/0.8/ui/root.ts index fcd33df1e..f2188eb5d 100644 --- a/renderers/lit/src/0.8/ui/root.ts +++ b/renderers/lit/src/0.8/ui/root.ts @@ -298,7 +298,7 @@ export class Root extends SignalWatcher(LitElement) { .surfaceId=${this.surfaceId} .dataContextPath=${node.dataContextPath ?? ""} .action=${node.properties.action} - .childComponents=${[node.properties.child]} + .childComponents=${node.properties.child ? [node.properties.child] : []} .enableCustomElements=${this.enableCustomElements} >`; } diff --git a/samples/agent/adk/contact_lookup/agent.py b/samples/agent/adk/contact_lookup/agent.py index 0bde787c1..cd1b91714 100644 --- a/samples/agent/adk/contact_lookup/agent.py +++ b/samples/agent/adk/contact_lookup/agent.py @@ -61,7 +61,7 @@ def __init__(self, base_url: str, use_ui: bool = False): def get_agent_card(self) -> AgentCard: capabilities = AgentCapabilities( streaming=True, - extensions=[self._schema_manager.get_agent_extension()], + extensions=[self._schema_manager.get_agent_extension()] if self._schema_manager else [], ) skill = AgentSkill( id="find_contact", @@ -196,7 +196,7 @@ async def stream(self, query, session_id) -> AsyncIterable[dict[str, Any]]: ) if attempt <= max_retries: current_query_text = ( - "I received no response. Please try again." + "I received no response. Please try again. " f"Please retry the original request: '{query}'" ) continue # Go to next retry