From da2a0140894c7e1611e930cb240c92714f8b1f32 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Fri, 29 May 2026 07:54:41 +0800 Subject: [PATCH] auto-sync: 2026-05-29 07:54:41 --- src/daemon/spawner.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/daemon/spawner.py b/src/daemon/spawner.py index 07c445e..5266272 100644 --- a/src/daemon/spawner.py +++ b/src/daemon/spawner.py @@ -345,6 +345,23 @@ curl -X POST http://{self.api_host}:{self.api_port}/api/projects/{project_id}/ta 成功:status → {success_status} | 失败:status → "failed" """ + def _build_discussion_prompt(self, task_id: str, title: str, + description: str, must_haves: str, + project_id: str, agent_id: str) -> str: + """构建讨论类 spawn prompt(§3.3 框架 + Boids)""" + goal_snapshot = description or title + constraints = must_haves or "(无特殊约束)" + + return DISCUSSION_PROMPT_TEMPLATE.format( + goal_snapshot=goal_snapshot, + constraints=constraints, + project_id=project_id, + task_id=task_id, + agent_id=agent_id, + api_host=self.api_host, + api_port=self.api_port, + ) + def _build_mail_prompt(self, task_id: str, title: str, description: str, must_haves: str, agent_id: str) -> str: """构建 Mail 专用精简模板"""