Repository navigation
docs(external-agent): design optional delegation through Collaboration - #2476
Conversation
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
APPROVE
This redesigns ExternalAgent onto the current plugin model: one optional process row registers a Collaboration member kind, the per-node bridge rows and their loader plumbing are gone, and delegation, approval delivery and settlement stay with Collaboration. The Codex, ACP and Claude Code adapter requirements, the delivery boundary and the process cleanup requirement are stated as testable design, and the overview, catalog and registration references point at the proposal. The English and Chinese editions are both 151 lines and structurally identical.
Verification of the claims against the tree:
- Collaboration still addresses Dim members through its directory, and a
sessionIdthat is not a Session is rejected (crates/dim-app-server/src/collaboration.rs, e.g. the error text at :3544 and :3548 and the check at :1646), so the proposal in §9.2 that a registration face is needed is accurate. hostPlatformservesspawn,wait,kill,settle,readOutput,stderrTailandwrite(docs/design/resource-faces.md:3), matching §2;pluginFileswithLockis the lease §2 describes (docs/typescript-plugin-authoring.md, Process storage).- Every referenced target exists: resource faces §3, settings-service §1.2, rutis usage R6, the TypeScript authoring page's Process owners and Process storage sections, subagent-tool-approval, ADR 003, clients, session notices and service faces.
- Every inbound anchor from the touched and related pages resolves to an existing heading: overview and clients to §3.2, overview to §3.4 and §3.5, background-task-list to §6, overview and plugin-contract and rutis-usage to §9 and §9.2, clients to A.1. No page still references the removed bridge rows,
externalAgentNodesor the old section numbers. - Link scan over the ten changed files found no broken target introduced; the one miss, docs/zh/design/rutis-usage.md:245 linking service-faces.md, predates this change.
node scripts/adr-check.mjs --base e950a5eapasses andgit diff --checkis clean. CI at the head: changes, ci-ok, evaluate-pr and issue-gate pass; the rest are skipped for a documentation-only change.
On the review focus questions: (1) the single registration face plus the typed run, cancel, close and answer operations cover routing, cancellation and ask expiry (§2, §3.2, §6), and §9.3 records the approval-route extension it needs; (2) §3.1 defines the handoff per protocol, states that ACP acknowledges local delivery only, and forbids resending once the prompt may have reached the agent; (3) the cleanup case is a named requirement with an owner in §3.4 and §9, and acceptance §7 repeats it with a killed runtime.
Optional P3 (inline): the Chinese edition links English documents where Chinese counterparts exist. This row and the approval scope, session notices and Appendix A.1 rows point at docs/design/appserver/settings-service.md, session-notices.md, clients.md, docs/design/rutis-usage.md and docs/adr/003-approval-scope.md, while docs/zh/ has each of them. The previous Chinese page linked the Chinese files, as docs/zh/design/plugins/PluginManager.md does. Repointing those five targets keeps the Chinese edition self-contained; the TypeScript authoring and resource-faces pages have no Chinese copy, so their English links are correct.
Cross-PR: documentation only. It touches no file of #2449, #2455, #2465, #2469 or #2475, so there is no conflict.
Verdict: APPROVE. The proposal is internally consistent and every cross-reference checked out. The link routing is the only note, and it does not affect the design.
| | --- | --- | | ||
| | `collaborationMembers.register(kind, dispatch)`(提案) | Collaboration 提供注册操作。插件登记一个受行生命周期约束的处理函数,按 §6 的数据协议受理调用。成员类型仅用于路由。[rutis 贡献注册](../../../design/rutis-usage.md#r6-contributions-register-with-their-owner) | | ||
| | `hostPlatform` | 使用工作区所在执行宿主提供的程序名与 argv、宿主隔离、标准输入输出管道和独立的有界 stderr。复用 write、readOutput、wait、kill、settle。[进程任务服务](../../../design/resource-faces.md#3-process-and-task-services) | | ||
| | `settings`、`managementMethods` | 登记用户作用域的配置源和附录 A.1 的本机管理方法。revision 检查归 Settings。[Settings](../../../design/appserver/settings-service.md) · [管理方法](../../../typescript-plugin-authoring.md#process-owners-and-management-methods) | |
There was a problem hiding this comment.
This link and the ones at lines 32, 56, 131, 133 and 151 point at English documents although Chinese counterparts exist: docs/zh/design/appserver/settings-service.md, session-notices.md, clients.md, docs/zh/design/rutis-usage.md and docs/zh/adr/003-approval-scope.md. The previous Chinese page linked the Chinese files (for example it used ../appserver/settings-service.md#12-决定密钥归其所有者), and docs/zh/design/plugins/PluginManager.md follows the same rule. Repoint these links to the zh copies so the Chinese edition stays self-contained. The TypeScript authoring and resource-faces pages have no Chinese copy, so their English links are correct.
There was a problem hiding this comment.
Updated six links in the Chinese ExternalAgent design to use the existing translations for rutis, Settings, approval scope, Session notices, and the client contract. All 14 distinct relative links on the page resolve, including the translated R6 and Settings §1.2 heading anchors. The TypeScript authoring and resource-faces links still lead to the English pages, which are the available editions. Commit
There was a problem hiding this comment.
Fixed in 645d1aa. The links now point at the Chinese copies: rutis-usage with the translated R6 anchor, settings-service in the table and in Appendix A.1 with the translated anchor, the approval-scope ADR, session-notices and clients. The pages without a Chinese copy stay on English, headings are unchanged so the referrer anchors still resolve, and adr-check passes.
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
APPROVE
Round 2 fixes exactly the links called out in the round-1 inline, and nothing else changed. docs/zh/design/plugins/ExternalAgent.md remains 151 lines and structurally identical to the English edition.
Verification:
- The Chinese page now points at
docs/zh/design/rutis-usage.md#r6-贡献向所有者登记,docs/zh/design/appserver/settings-service.md(the table link) and#12-决定密钥归其所有者(Appendix A.1),docs/zh/adr/003-approval-scope.md,docs/zh/design/appserver/session-notices.md, anddocs/zh/design/clients.md. Each target file exists and both anchors match the heading text (### R6. 贡献向所有者登记,### 1.2 决定:密钥归其所有者). - The pages without a Chinese copy keep their English links:
typescript-plugin-authoring(two anchors),resource-faces,execution-environments, and theservice-facesandsubagent-tool-approvalpages, which also have no zh edition. The language switch at the top points at the English page, and the English page points back at the Chinese one. - Every referrer anchor into this page still resolves in both editions (
#32-权限询问,#34-执行位置,#35-重载或重启后的恢复,#a1-管理方法, and their English counterparts), since the headings did not change. node scripts/adr-check.mjs --base e950a5eapasses (10 changed files),git diff --checkis clean, and CI at the head passes changes, ci-ok, evaluate-pr and issue-gate; the remaining jobs are skipped as documentation-only.- The round-1 inline about linking the Chinese edition to English documents is resolved and withdrawn. No new findings.
Cross-PR: documentation-only change in one file; no overlap with the other open PRs.
Prepare v0.1.0-alpha.32, the next alpha after v0.1.0-alpha.31. User-visible changes since v0.1.0-alpha.31: - App Server runtimes: prefer system runtimes by default, keep installed runtime downloads across an upgrade and their download source when runtime pins change, and explain recovery from system runtime failures (arcships#2475). - Workflow: reject a relative management cwd before canonicalizing it at the RPC boundary (arcships#2477). - Skills: give installations persistent identities and conditional update/remove (arcships#2451). - Runtime input: read pending inputs through InputQueue (arcships#2447). - Scheduler: remove retired wakeup remnants (arcships#2469). - Docs: specify negotiated mobile protocol exchanges and checkpoint recovery (arcships#2465), and optional external-agent delegation through Collaboration (arcships#2476).
Fixes #1898
Summary
A Session delegates a coding task through Collaboration’s existing
agenttool. The optional ExternalAgent package owns the external conversation and its protocol. The workspace host runs the process. Collaboration delivers the outcome to the requesting branch even after the desktop client disconnects. English design · 中文设计Review focus
collaborationMembers.register(kind, dispatch)face cover routing, cancellation and expiry of a provider’s pending approval asks?Design rule checklist
beforecallback. Provider callbacks run outside file leases and Timeline commit locks.Documentation
Verification
node scripts/adr-check.mjs --base origin/maingit diff --check origin/mainThe change is documentation only. Section 7 defines runtime acceptance scenarios for implementation.