From ad22a7a4dfec5b61a5330e23a2cdb099bddcb3e3 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sat, 23 May 2026 23:32:33 +0800 Subject: [PATCH] auto-sync: 2026-05-23 23:32:33 --- src/daemon/spawner.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/daemon/spawner.py b/src/daemon/spawner.py index eb8dc93..c4ee501 100644 --- a/src/daemon/spawner.py +++ b/src/daemon/spawner.py @@ -82,13 +82,13 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_ -d '{{"agent": "{agent_id}", "type": "code", "title": "main.py", "content_path": "/path/to/file.py", "summary": "主程序"}}' ``` -### 步骤 4: 提交审查或标记失败 +### 步骤 4: 提交完成或标记失败 ✅ 成功完成: ```bash curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_id}/status \ -H 'Content-Type: application/json' \ - -d '{{"status": "review", "agent": "{agent_id}"}}' + -d '{{"status": "{completion_status}", "agent": "{agent_id}"}}' ``` ❌ 无法完成: @@ -197,6 +197,8 @@ class AgentSpawner: logger.exception("BootstrapBuilder failed, falling back to template") # Fallback: 使用硬编码模板 + # mail 任务直接 done,不走 review + completion_status = "done" if project_id == "_mail" else "review" return SPAWN_PROMPT_TEMPLATE.format( project_id=project_id, task_id=task_id, @@ -210,6 +212,7 @@ class AgentSpawner: api_port=self.api_port, current_status=current_status or "claimed", retry_context=retry_context or "", + completion_status=completion_status, ) def _build_api_section(self, project_id: str, task_id: str,