From 2d489a2780327a7ba047a835146ae8eb65848c7b Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 1 Oct 2026 12:51:56 +0000 Subject: [PATCH 1/6] Record the task card for feature-agent-harness-p1 --- .task/feature-agent-harness-p1.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .task/feature-agent-harness-p1.md diff --git a/.task/feature-agent-harness-p1.md b/.task/feature-agent-harness-p1.md new file mode 100644 index 00000000..87ea63b4 --- /dev/null +++ b/.task/feature-agent-harness-p1.md @@ -0,0 +1,25 @@ +# feature/agent-harness-p1 任务卡 + +任务主记录:;状态:进行中;owner:weichen + +## 基线与授权 + +- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 701d4ab1e351b83bbc05c1b3f306467941064805 +- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-agent-harness-p1(worktree);分支:feature/agent-harness-p1 +- 授权与交付终点:<本次允许的动作与终点;未授权事项写明> + +## 目标与非目标 + +<预期结果、受影响入口/模块/契约;明确不做什么。> + +## 同步记录 + +| 节点 | sync_base_sha | tested_head_sha | checked_at | +|---|---|---|---| +| 启动 | 701d4ab1e351b83bbc05c1b3f306467941064805 | 701d4ab1e351b83bbc05c1b3f306467941064805 | 2026-10-01T12:51:56Z | + +## 结果与验证(完成后填写) + +- 结果: +- 验证: +- 影响与剩余项: From b7631c71a81592b01ffe9b2d35bbb651b97eed56 Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 1 Oct 2026 13:29:55 +0000 Subject: [PATCH 2/6] Pin the harness turn loop across the three native checkouts Why: the direct chat path and both consumers must compile the same agent-native commit, or the new loop fields exist in only one replace target. Evidence: make test passed (boundaries, core, backend, frontend 51, ui 71, agent-command). The three agent-native gitlinks are a34689c. Impact: Dev pins deps/agent-native, deps/agent-squad, and modules/backend. Squad behavior stays on the zero-value kernel switches. Refs: feature/agent-harness-p1 Co-authored-by: Cursor --- .task/feature-agent-harness-p1.md | 18 ++++++++++++++---- deps/agent-native | 2 +- deps/agent-squad | 2 +- modules/backend | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.task/feature-agent-harness-p1.md b/.task/feature-agent-harness-p1.md index 87ea63b4..af813fa7 100644 --- a/.task/feature-agent-harness-p1.md +++ b/.task/feature-agent-harness-p1.md @@ -6,11 +6,14 @@ - 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 701d4ab1e351b83bbc05c1b3f306467941064805 - 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-agent-harness-p1(worktree);分支:feature/agent-harness-p1 -- 授权与交付终点:<本次允许的动作与终点;未授权事项写明> +- 授权与交付终点:实现 P1(直连改走 runtime.Run,内核新能力默认关闭)。允许改 agent-native、backend、agent-squad 与 Dev 的 gitlink,并在各仓 feature/agent-harness-p1 上提 PR。未授权:合入 main、改小队行为、做 P2 计划回灌或 P3 子代理。 +- precheck(2026-10-01):verdict READY;R0=701d4ab1e351b83bbc05c1b3f306467941064805;branch=main head=701d4ab1e3;ahead=0 behind=0;tree clean。 ## 目标与非目标 -<预期结果、受影响入口/模块/契约;明确不做什么。> +- 目标:直连 LLMRunner 改为 runtime.Run 适配;内核补 Stop、工具钩子、提醒、重复调用提醒、length 续写与 FinishReason。新字段零值保持今天的行为,P1 只给直连打开 RepeatGuard 与 ContinueOnLength。 +- 非目标:不改小队路径;不实现 Reminders 的计划回灌(P2);不改 SubLLMRunner / delegate_task(P3)。 +- 裁定:Stop 在 follow-up 排空之后才看;两者同时设置时,本轮有 follow-up 就不调用 Stop。length 续写优先于 follow-up 与 Stop。History 只在会话转录为空时作为初始转录,且不回写进 Session。 ## 同步记录 @@ -20,6 +23,13 @@ ## 结果与验证(完成后填写) -- 结果: +- 结果:直连 `LLMRunner` 改为 `runtime.Run` 适配。内核新增可选的 Stop、BeforeTool/AfterTool、Reminders、RepeatGuard、ContinueOnLength、History、UnknownTool 与 `llm.Event.FinishReason`。直连打开 RepeatGuard 与 ContinueOnLength;小队不设置这些字段。三处 agent-native gitlink 同为 `a34689c`(Dev `deps/agent-native`、backend `deps/agent-native`、agent-squad `deps/agent-native`)。 +- 指针:agent-native `a34689c`,backend `cfcf95d`,agent-squad `590fd86`。 +- 裁定:未在画像里声明、但模型仍然发出的工具调用走 `UnknownTool`,零值保持 unknown tool 错误。注册表 schema 用宽松 object,真实 schema 仍经流式请求声明,避免空参数被内核校验提前拒绝。 - 验证: -- 影响与剩余项: + - precheck(启动):verdict READY;R0=701d4ab1e351b83bbc05c1b3f306467941064805;head=701d4ab1e3;ahead=0 behind=0;tree clean。 + - agent-native `go test ./...` 通过。 + - backend `go test ./...` 通过。现有 `internal/runtime` 断言未改;新增工具整批超限落库与 length 续写。 + - agent-squad `scripts/submodule-consistency.sh` 全部 ok;`go test ./...` 通过。 + - Dev `make test` 通过(boundaries ok,core/backend go test,frontend vitest 51,ui vitest 71,agent-command ok)。 +- 影响与剩余项:合入顺序为 Agent-Native,然后 Backend 与 Agent-Squad,最后 Dev。未合入。P2 的 Reminders 仍为 nil。小队行为留到 P3。 diff --git a/deps/agent-native b/deps/agent-native index 6b7d2432..a34689c7 160000 --- a/deps/agent-native +++ b/deps/agent-native @@ -1 +1 @@ -Subproject commit 6b7d2432b3bc4f2bbdbde12c26d0c83f09450f47 +Subproject commit a34689c78fbddbfa34b343cd6f85cca36c4d2f9d diff --git a/deps/agent-squad b/deps/agent-squad index 5cbac00b..590fd86f 160000 --- a/deps/agent-squad +++ b/deps/agent-squad @@ -1 +1 @@ -Subproject commit 5cbac00b994223b6aa76afd9bc70277b8b49e985 +Subproject commit 590fd86f4c8bfada0ec76efbfb57133c61607bd6 diff --git a/modules/backend b/modules/backend index 188c6335..cfcf95d3 160000 --- a/modules/backend +++ b/modules/backend @@ -1 +1 @@ -Subproject commit 188c63357cccd7fe028af23621396e51be59f449 +Subproject commit cfcf95d33524d5313f2cd967c8632553f28662b2 From 150480f388984d15c62589ed882a15adfc4ba424 Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 1 Oct 2026 13:30:00 +0000 Subject: [PATCH 3/6] Record the sync checkpoint --- .task/feature-agent-harness-p1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.task/feature-agent-harness-p1.md b/.task/feature-agent-harness-p1.md index af813fa7..c1f05ea4 100644 --- a/.task/feature-agent-harness-p1.md +++ b/.task/feature-agent-harness-p1.md @@ -33,3 +33,4 @@ - agent-squad `scripts/submodule-consistency.sh` 全部 ok;`go test ./...` 通过。 - Dev `make test` 通过(boundaries ok,core/backend go test,frontend vitest 51,ui vitest 71,agent-command ok)。 - 影响与剩余项:合入顺序为 Agent-Native,然后 Backend 与 Agent-Squad,最后 Dev。未合入。P2 的 Reminders 仍为 nil。小队行为留到 P3。 +| 同步前验收 | 701d4ab1e351b83bbc05c1b3f306467941064805 | b7631c71a81592b01ffe9b2d35bbb651b97eed56 | 2026-10-01T13:30:00Z | From 87d509a763f3f1fbf315411b99fb5cb9d96c34ab Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 1 Oct 2026 13:30:36 +0000 Subject: [PATCH 4/6] Record the harness P1 verification on the task card Why: acceptance needs the precheck, task-sync, and test evidence on the task card before review. Evidence: task-sync reported already up to date at 701d4ab1e3; make test had already passed on b7631c7. Impact: task card only. Refs: feature/agent-harness-p1 Co-authored-by: Cursor --- .task/feature-agent-harness-p1.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.task/feature-agent-harness-p1.md b/.task/feature-agent-harness-p1.md index c1f05ea4..ef35cb3e 100644 --- a/.task/feature-agent-harness-p1.md +++ b/.task/feature-agent-harness-p1.md @@ -20,6 +20,7 @@ | 节点 | sync_base_sha | tested_head_sha | checked_at | |---|---|---|---| | 启动 | 701d4ab1e351b83bbc05c1b3f306467941064805 | 701d4ab1e351b83bbc05c1b3f306467941064805 | 2026-10-01T12:51:56Z | +| 同步前验收 | 701d4ab1e351b83bbc05c1b3f306467941064805 | b7631c71a81592b01ffe9b2d35bbb651b97eed56 | 2026-10-01T13:30:00Z | ## 结果与验证(完成后填写) @@ -32,5 +33,5 @@ - backend `go test ./...` 通过。现有 `internal/runtime` 断言未改;新增工具整批超限落库与 length 续写。 - agent-squad `scripts/submodule-consistency.sh` 全部 ok;`go test ./...` 通过。 - Dev `make test` 通过(boundaries ok,core/backend go test,frontend vitest 51,ui vitest 71,agent-command ok)。 + - task-sync:`Already up to date.` `[synced] sync_base=701d4ab1e3 tested_head=b7631c71a8 checked_at=2026-10-01T13:30:00Z` - 影响与剩余项:合入顺序为 Agent-Native,然后 Backend 与 Agent-Squad,最后 Dev。未合入。P2 的 Reminders 仍为 nil。小队行为留到 P3。 -| 同步前验收 | 701d4ab1e351b83bbc05c1b3f306467941064805 | b7631c71a81592b01ffe9b2d35bbb651b97eed56 | 2026-10-01T13:30:00Z | From 1417fbef9d5d745f42d9c6b919213d7a52a53a8c Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 1 Oct 2026 13:31:08 +0000 Subject: [PATCH 5/6] Record the harness pull request on the task card Why: the task card is the main record, and review needs the Dev pull request link. Evidence: Dev pull request 136 is open against main. Impact: task card only. Refs: feature/agent-harness-p1 Co-authored-by: Cursor --- .task/feature-agent-harness-p1.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.task/feature-agent-harness-p1.md b/.task/feature-agent-harness-p1.md index ef35cb3e..65313b78 100644 --- a/.task/feature-agent-harness-p1.md +++ b/.task/feature-agent-harness-p1.md @@ -1,6 +1,6 @@ # feature/agent-harness-p1 任务卡 -任务主记录:;状态:进行中;owner:weichen +任务主记录:PR #136 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/136;状态:进行中;owner:weichen ## 基线与授权 @@ -34,4 +34,4 @@ - agent-squad `scripts/submodule-consistency.sh` 全部 ok;`go test ./...` 通过。 - Dev `make test` 通过(boundaries ok,core/backend go test,frontend vitest 51,ui vitest 71,agent-command ok)。 - task-sync:`Already up to date.` `[synced] sync_base=701d4ab1e3 tested_head=b7631c71a8 checked_at=2026-10-01T13:30:00Z` -- 影响与剩余项:合入顺序为 Agent-Native,然后 Backend 与 Agent-Squad,最后 Dev。未合入。P2 的 Reminders 仍为 nil。小队行为留到 P3。 +- 影响与剩余项:合入顺序为 Agent-Native #6,然后 Backend #43 与 Agent-Squad #6,最后 Dev #136。均未合入。P2 的 Reminders 仍为 nil。小队行为留到 P3。 From c5ab4c35e56bd762f37a22649fc94a4e2480bc5b Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 1 Oct 2026 13:41:48 +0000 Subject: [PATCH 6/6] Record the sync checkpoint --- .task/feature-agent-harness-p1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.task/feature-agent-harness-p1.md b/.task/feature-agent-harness-p1.md index 65313b78..dca2c852 100644 --- a/.task/feature-agent-harness-p1.md +++ b/.task/feature-agent-harness-p1.md @@ -35,3 +35,4 @@ - Dev `make test` 通过(boundaries ok,core/backend go test,frontend vitest 51,ui vitest 71,agent-command ok)。 - task-sync:`Already up to date.` `[synced] sync_base=701d4ab1e3 tested_head=b7631c71a8 checked_at=2026-10-01T13:30:00Z` - 影响与剩余项:合入顺序为 Agent-Native #6,然后 Backend #43 与 Agent-Squad #6,最后 Dev #136。均未合入。P2 的 Reminders 仍为 nil。小队行为留到 P3。 +| 同步前验收 | 701d4ab1e351b83bbc05c1b3f306467941064805 | 1417fbef9d5d745f42d9c6b919213d7a52a53a8c | 2026-10-01T13:41:48Z |