feat: planner/worker 态势移出 system 入首轮 user + bench 提示词/调度器优化 + plan 心跳前端对齐 10min

- agent: planner/worker 把易变运行期数据(意图/态势/收尾词)从 system 移到本轮 user 输入,
  system 每轮/每 session 稳定更利于缓存;移除 worker 的 cross-trace 工具引导段
- web: plan 心跳前端默认/下限对齐后端 10min(600s),清理 300 旧注释
- bench: challenge_review 经验抽取结构化(区分 confirmed/inferred/negative、限制"已穷尽"、
  结构化 hint 格式);worker.md 补深度挖掘/目录扫描引导;scheduler 加 FAST_POLL 快轮询
- deps: norma v0.2.8 → v0.2.9
This commit is contained in:
Autumn-27 committed 2026-08-14 11:46:01 -04:00
1 parent aafab015e7
commit 4c33317c6a
10 files changed
+111 -65

No files matched your search

+6 -6
View File
@@ -111,7 +111,7 @@ export default function TasksPage() {
const [profiles, setProfiles] = React.useState<LLMProfile[]>([]);
const [llmProfile, setLlmProfile] = React.useState<string>(ACTIVE_PROFILE); // sentinel = active
const [timeoutMin, setTimeoutMin] = React.useState(""); // 任务级超时(分钟);空/0 = 不限时
const [heartbeatMin, setHeartbeatMin] = React.useState("5"); // planner 心跳(分钟);默认5,下限5(与后端一致)
const [heartbeatMin, setHeartbeatMin] = React.useState("10"); // planner 心跳(分钟);默认10,下限10(与后端一致)
const [seedFirstIntent, setSeedFirstIntent] = React.useState(true); // 创建时下发种子意图,worker 免等首轮 planner 直接开跑
const [open, setOpen] = React.useState(false);
const [query, setQuery] = React.useState("");
@@ -174,14 +174,14 @@ export default function TasksPage() {
try {
const pid = llmProfile === ACTIVE_PROFILE ? undefined : Number(llmProfile);
const timeoutSec = Math.max(0, Math.floor(Number(timeoutMin) || 0)) * 60;
const heartbeatSec = Math.max(5, Math.floor(Number(heartbeatMin) || 5)) * 60; // 下限 5min,与后端归一一致
const heartbeatSec = Math.max(10, Math.floor(Number(heartbeatMin) || 10)) * 60; // 下限 10min,与后端归一一致
await api.createTask(description.trim(), goal.trim(), pid, timeoutSec, seedFirstIntent, heartbeatSec);
toast.success("任务已创建");
setDescription("");
setGoal("");
setLlmProfile(ACTIVE_PROFILE);
setTimeoutMin("");
setHeartbeatMin("5");
setHeartbeatMin("10");
setSeedFirstIntent(true);
setOpen(false);
load();
@@ -311,14 +311,14 @@ export default function TasksPage() {
<Input
id="heartbeat-min"
type="number"
min={5}
min={10}
className="w-40"
placeholder="默认 5"
placeholder="默认 10"
value={heartbeatMin}
onChange={(e) => setHeartbeatMin(e.target.value)}
/>
<p className="text-muted-foreground text-xs">
距上轮规划结束/任务开始满该时长且期间无触发,自动触发一轮规划(兜底卡死 + 唤醒去监督在跑的 worker)。下限 5 分钟。
距上轮规划结束/任务开始满该时长且期间无触发,自动触发一轮规划(兜底卡死 + 唤醒去监督在跑的 worker)。下限 10 分钟。
</p>
</div>
<div className="grid gap-2">
+1 -1
View File
@@ -116,7 +116,7 @@ export const api = {
llm_profile_id: llmProfileId ?? null,
timeout_seconds: timeoutSeconds ?? 0,
seed_first_intent: seedFirstIntent ?? true,
plan_heartbeat_seconds: planHeartbeatSeconds ?? 0, // 0 = 后端归一到默认 300(5min)
plan_heartbeat_seconds: planHeartbeatSeconds ?? 0, // 0 = 后端归一到默认 600(10min)
}),
deleteTask: (id: string) => del<{ deleted: number }>(`/tasks/${id}`),
controlTask: (id: string, action: "pause" | "resume") => post<{ id: string; paused: boolean }>(`/tasks/${id}/control`, { action }),