feat(task): 创建任务可选下发种子意图,worker 免等首轮规划直接开跑

新增 seed_first_intent(默认开启):创建即把"描述+目标"作为一条意图
写入 frontier,worker 轮询领取立即执行,省掉开跑前的首轮 planner LLM;
跑完由 NotifyDone 正常唤醒 planner 判定/补充。CTF 场景常一 work 解决。

- Engine.Run 首轮 kick 改为"frontier 为空才触发",一处覆盖普通/种子/恢复三种情况
- HTTP createTask 与 spawn_task 工具同步支持;bump 工具 schema 刷新 flag 使旧库生效

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Autumn-27andClaude Opus 4.8 committed 2026-08-09 02:19:40 -04:00
1 parent 4cf622593a
commit f86885ec3d
5 files changed
+73 -19

No files matched your search

+8 -2
View File
@@ -109,8 +109,14 @@ export const api = {
// ---- tasks ----
tasks: () => get<{ tasks: Task[]; active: string }>("/tasks").then((r) => ({ tasks: arr(r.tasks), active: r.active ?? "" })),
createTask: (description: string, goal: string, llmProfileId?: number, timeoutSeconds?: number) =>
post<Task>("/tasks", { description, goal, llm_profile_id: llmProfileId ?? null, timeout_seconds: timeoutSeconds ?? 0 }),
createTask: (description: string, goal: string, llmProfileId?: number, timeoutSeconds?: number, seedFirstIntent?: boolean) =>
post<Task>("/tasks", {
description,
goal,
llm_profile_id: llmProfileId ?? null,
timeout_seconds: timeoutSeconds ?? 0,
seed_first_intent: seedFirstIntent ?? true,
}),
deleteTask: (id: string) => del<{ deleted: number }>(`/tasks/${id}`),
controlTask: (id: string, action: "pause" | "resume") => post<{ id: string; paused: boolean }>(`/tasks/${id}/control`, { action }),
setActive: (id: string) => post<{ active: string }>("/active", { id }),