From 00bc88911847f525aef71f87b0ed5dc7aa1ab5c4 Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Wed, 29 Apr 2026 00:30:08 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20rename=20new=5Fagent=5Ftext=5Fmessage=20?= =?UTF-8?q?=E2=86=92=20new=5Ftext=5Fmessage=20(a2a-sdk=20v1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per the molecule-core a2a-sdk v0→v1 migration cheat-sheet (reference_a2a_sdk_v0_to_v1_migration), v1 renamed new_agent_text_message → new_text_message. The import path was already updated to a2a.helpers (line 38's "v1 renames a2a.utils → a2a.helpers" comment proves the migration was started), but the symbol rename was missed, so: from a2a.helpers import new_agent_text_message ImportError: cannot import name 'new_agent_text_message' from 'a2a.helpers' Effect: gemini-cli template image rebuild has been failing the boot-smoke gate on every cascade fire since 03:23 UTC today (3 in a row, same SHA = persistent regression, not flake). The smoke test correctly blocked the broken publish — current GHCR latest is from before this regression so existing workspaces still work, but no new gemini-cli builds can land until this fix. Surfaced via wheel-state audit while verifying that molecule-ai-workspace-runtime v0.1.36 contains the platform-tool- registry fixes (it does). Cascade health check found 7/8 templates rebuilt cleanly post-v0.1.36; gemini-cli was the outlier. Test: rename in 7 sites (1 import + 6 call sites), `python3 -m py_compile cli_executor.py` clean. CI's boot-smoke gate is the end-to-end check. Co-Authored-By: Claude Opus 4.7 (1M context) --- cli_executor.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cli_executor.py b/cli_executor.py index f5ceadd..5b00459 100644 --- a/cli_executor.py +++ b/cli_executor.py @@ -36,7 +36,7 @@ from pathlib import Path from a2a.server.agent_execution import AgentExecutor, RequestContext from a2a.server.events import EventQueue # KI-009: a2a-sdk v1 renames a2a.utils → a2a.helpers -from a2a.helpers import new_agent_text_message +from a2a.helpers import new_text_message from molecule_runtime.config import RuntimeConfig from molecule_runtime.executor_helpers import ( @@ -276,7 +276,7 @@ class CLIAgentExecutor(AgentExecutor): user_input = extract_message_text(context.message) if not user_input: await event_queue.enqueue_event( - new_agent_text_message("Error: message contained no text content.") + new_text_message("Error: message contained no text content.") ) return @@ -368,7 +368,7 @@ class CLIAgentExecutor(AgentExecutor): result = stdout_text if result: await event_queue.enqueue_event( - new_agent_text_message(result) + new_text_message(result) ) return else: @@ -380,7 +380,7 @@ class CLIAgentExecutor(AgentExecutor): await asyncio.sleep(delay) continue await event_queue.enqueue_event( - new_agent_text_message("(no response generated after retries)") + new_text_message("(no response generated after retries)") ) return else: @@ -402,7 +402,7 @@ class CLIAgentExecutor(AgentExecutor): # only the sanitized category to the user. logger.error("CLI agent error [%s]: %s", self.runtime, error_msg[:500]) await event_queue.enqueue_event( - new_agent_text_message(sanitize_agent_error(category=category)) + new_text_message(sanitize_agent_error(category=category)) ) return @@ -424,13 +424,13 @@ class CLIAgentExecutor(AgentExecutor): except Exception as wait_err: logger.warning("CLI wait error: %s", wait_err) await event_queue.enqueue_event( - new_agent_text_message(sanitize_agent_error(category="timeout")) + new_text_message(sanitize_agent_error(category="timeout")) ) return except Exception as exc: logger.exception("CLI agent exception [%s]", self.runtime) await event_queue.enqueue_event( - new_agent_text_message(sanitize_agent_error(exc)) + new_text_message(sanitize_agent_error(exc)) ) return