Pin the script host, deferred tools, and background MCP connect #177

Merged
weichen merged 8 commits from feature/code-orchestration into main 2026-10-03 18:07:13 +00:00
Owner

feature/code-orchestration 任务卡

任务主记录:<PR 链接,task-finish 时填写>;状态:进行中;owner:weichen

基线与授权

  • 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 37a91142f2
  • 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-code-orchestration(worktree);分支:feature/code-orchestration
  • 授权与交付终点:实现批次 8(代码编排与 MCP)。允许改 agent-native、agent-squad(透传开关)、backend 与 Dev 指针;经 Gitea PR 合入 main 后回收 worktree。不引入 pi-durable。不把代码编排默认打开。

目标与非目标

  • 目标:run_tool_script 的 Python 宿主下沉到 runtime/codeorch。限额为 50 次调用、给脚本的单次结果 1 MiB、给模型的输出 16k 字符(全文落文件)、超时缺省 120 秒且最长 600 秒。禁止再调用 shell、python、命令、自身、派发和工作流工具。出错时报告已经执行的调用。开关 runtime.codeOrchestration 默认关。工作流 script 步骤改用同一宿主,原有确认和超时上限不变。工具可声明直接或延迟暴露;延迟工具不进清单,经 tool_search 与固定 schema 的 call_tool 调用。MCP 后台连接,stdio 维持单读循环,失败重连一次,HTTP 关闭时终止会话,input_required 交给 AskUser。项目配置可覆盖启用状态和暴露级别。
  • 非目标:MCP OAuth、进程级钩子、绕过确认的模式、把代码编排默认打开。

同步记录

节点 sync_base_sha tested_head_sha checked_at
启动 37a91142f2 37a91142f2 2026-10-03T17:46:51Z
同步前验收 37a91142f2 14ddc9e342 2026-10-03T18:06:06Z
同步前验收 37a91142f2 e352a807e5 2026-10-03T18:06:07Z
同步前验收 37a91142f2 bdb9452e41 2026-10-03T18:06:08Z

结果与验证(完成后填写)

  • 结果:native e4020d2,squad dcd523e,backend cd57276。
  • 验证:native 与 backend 相关包测试通过。make test 与 make build 通过(2026-10-03)。
  • 影响与剩余项:runtime.codeOrchestration 默认关。延迟工具不进清单。MCP 未连上时后台连接,已连上则当场注册。
# feature/code-orchestration 任务卡 任务主记录:<PR 链接,task-finish 时填写>;状态:进行中;owner:weichen ## 基线与授权 - 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 37a91142f2d4a91dc3e0a83296c05ee3aa0fa92e - 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-code-orchestration(worktree);分支:feature/code-orchestration - 授权与交付终点:实现批次 8(代码编排与 MCP)。允许改 agent-native、agent-squad(透传开关)、backend 与 Dev 指针;经 Gitea PR 合入 main 后回收 worktree。不引入 pi-durable。不把代码编排默认打开。 ## 目标与非目标 - 目标:`run_tool_script` 的 Python 宿主下沉到 `runtime/codeorch`。限额为 50 次调用、给脚本的单次结果 1 MiB、给模型的输出 16k 字符(全文落文件)、超时缺省 120 秒且最长 600 秒。禁止再调用 shell、python、命令、自身、派发和工作流工具。出错时报告已经执行的调用。开关 `runtime.codeOrchestration` 默认关。工作流 script 步骤改用同一宿主,原有确认和超时上限不变。工具可声明直接或延迟暴露;延迟工具不进清单,经 `tool_search` 与固定 schema 的 `call_tool` 调用。MCP 后台连接,stdio 维持单读循环,失败重连一次,HTTP 关闭时终止会话,`input_required` 交给 AskUser。项目配置可覆盖启用状态和暴露级别。 - 非目标:MCP OAuth、进程级钩子、绕过确认的模式、把代码编排默认打开。 ## 同步记录 | 节点 | sync_base_sha | tested_head_sha | checked_at | |---|---|---|---| | 启动 | 37a91142f2d4a91dc3e0a83296c05ee3aa0fa92e | 37a91142f2d4a91dc3e0a83296c05ee3aa0fa92e | 2026-10-03T17:46:51Z | | 同步前验收 | 37a91142f2d4a91dc3e0a83296c05ee3aa0fa92e | 14ddc9e342d8f136ec769840b7daa998a1caf8c5 | 2026-10-03T18:06:06Z | | 同步前验收 | 37a91142f2d4a91dc3e0a83296c05ee3aa0fa92e | e352a807e5e8b1505599bcb51a69073f53eed1a8 | 2026-10-03T18:06:07Z | | 同步前验收 | 37a91142f2d4a91dc3e0a83296c05ee3aa0fa92e | bdb9452e41b737fa483af66d14569fd959011f24 | 2026-10-03T18:06:08Z | ## 结果与验证(完成后填写) - 结果:native e4020d2,squad dcd523e,backend cd57276。 - 验证:native 与 backend 相关包测试通过。`make test` 与 `make build` 通过(2026-10-03)。 - 影响与剩余项:`runtime.codeOrchestration` 默认关。延迟工具不进清单。MCP 未连上时后台连接,已连上则当场注册。
weichen added 8 commits 2026-10-03 18:07:01 +00:00
Why: The batch needs an explicit authorization, the default-off switch, and the host limits before the libraries change.
Evidence: The card names the caps, the forbidden tools, and the MCP behaviors that stay out of scope.
Impact: Reviewers can match the later commits to this card. No code change.
Refs: feature/code-orchestration
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: the shared Python host and the MCP connect change landed in the libraries the product already calls.
Evidence: native, squad, and backend feature commits are recorded on the task card.
Impact: gitlinks move to those commits. Code orchestration stays off unless the setting is turned on.
Refs: feature/code-orchestration
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: the pin commit predates the full suite, and the card should name the commands that actually passed.
Evidence: make test and make build exited 0 in the feature worktree.
Impact: documentation only.
Refs: feature/code-orchestration
Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the sync rows inside the task card table
ci / test (pull_request) Successful in 1m56s
d401a180f9
Why: task-sync appended the checkpoint rows after the results section, so the card no longer read as one table.
Evidence: the three sync rows now sit under the existing header.
Impact: documentation only.
Refs: feature/code-orchestration
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen merged commit 4a83fecf46 into main 2026-10-03 18:07:13 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Dev#177