From fabdc404d0678d2c41cf7afbba9a2c4c8e5f7c3d Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sun, 17 May 2026 18:36:01 +0800 Subject: [PATCH] auto-sync: 2026-05-17 18:36:01 --- src/daemon/spawner.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/daemon/spawner.py b/src/daemon/spawner.py index e64ae86..89f9d3d 100644 --- a/src/daemon/spawner.py +++ b/src/daemon/spawner.py @@ -158,8 +158,15 @@ class AgentSpawner: must_haves: str = "", project_id: str = "", agent_id: str = "", + current_status: str = "claimed", + retry_context: str = "", ) -> str: - """构建 Agent spawn 的消息(使用 prompt 模板)""" + """构建 Agent spawn 的消息(使用 prompt 模板) + + Args: + current_status: 任务当前状态(动态生成状态机提示) + retry_context: 重试上下文(前轮产出摘要 + 审查意见) + """ return SPAWN_PROMPT_TEMPLATE.format( project_id=project_id, task_id=task_id, @@ -171,6 +178,8 @@ class AgentSpawner: agent_id=agent_id, api_host=self.api_host, api_port=self.api_port, + current_status=current_status or "claimed", + retry_context=retry_context or "", ) async def spawn_full_agent(