Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
6358ff1
fix(core): keep agent usage rounds cumulative
yiliang114 Sep 6, 2026
6aefbda
feat(core): correlate agent external deliveries
yiliang114 Sep 6, 2026
cb642a5
refactor(core): explain resident continuation outcomes
yiliang114 Sep 6, 2026
fceb389
feat(core): add mesh admission foundation
yiliang114 Sep 6, 2026
0f429b3
test(core): observe idle resident slot accounting
yiliang114 Sep 6, 2026
5ad69e1
test(core): preserve repeated external input on revive
yiliang114 Sep 6, 2026
08f67da
refactor(core): drop speculative mesh token charging
yiliang114 Sep 6, 2026
e9429c0
docs: incorporate mesh review round two
yiliang114 Sep 6, 2026
2ae1004
docs(core): clarify mesh queue timestamp
yiliang114 Sep 6, 2026
0c90d68
docs: distinguish review from runtime observations
yiliang114 Sep 6, 2026
fc86943
docs(plans): add per-step acceptance criteria for the mesh implementa…
yiliang114 Sep 6, 2026
e08ddde
docs(plans): add implementation brief for mesh steps 2-3
yiliang114 Sep 6, 2026
b06121b
docs(plans): defer tool-layer shell refusal proof to the launcher step
yiliang114 Sep 6, 2026
2c9164e
docs(plans): switch the mesh delivery shape to a stack under #11206
yiliang114 Sep 6, 2026
a59f878
Merge origin/main into codex/multi-agent-mesh-foundation
yiliang114 Sep 6, 2026
a251498
Merge #11200 into codex/multi-agent-mesh-foundation
yiliang114 Sep 6, 2026
0f6f347
Merge #11204 into codex/multi-agent-mesh-foundation
yiliang114 Sep 6, 2026
4b43d9b
docs(plans): add the implementer watch list and open question 12
yiliang114 Sep 6, 2026
b838fa1
Merge #11202 into codex/multi-agent-mesh-foundation
yiliang114 Sep 6, 2026
bbcf2a2
Merge remote updates into codex/multi-agent-mesh-foundation
yiliang114 Sep 6, 2026
e91cb15
docs(plans): record merged draft PR state
yiliang114 Sep 6, 2026
6e0c32a
test(core): cover invalid mesh roots
yiliang114 Sep 6, 2026
1842491
docs(plans): record the relationship between mesh threads and the Age…
yiliang114 Sep 6, 2026
985b0d8
feat(core): define mesh capability boundary (#11211)
yiliang114 Sep 6, 2026
8edbff4
feat(core): add versioned mesh storage protocol (#11222)
yiliang114 Sep 6, 2026
4f21280
feat(mesh): add programmatic agent launch boundary (#11224)
yiliang114 Sep 6, 2026
3a81ed8
feat(mesh): add hidden host session launcher (#11225)
yiliang114 Sep 7, 2026
c129e4d
feat(mesh): add run tools and minimal dispatcher (#11236)
yiliang114 Sep 7, 2026
32c97a9
feat(mesh): wire runs into background agents (#11252)
yiliang114 Sep 7, 2026
19e9138
fix(mesh): bind resident turns to stored transcripts (#11255)
yiliang114 Sep 7, 2026
aeefa63
feat(mesh): ship shared-thread demo and runtime flow (#11260)
yiliang114 Sep 7, 2026
47d8818
docs(mesh): record live collaboration acceptance (#11278)
yiliang114 Sep 7, 2026
99e7b6d
docs(mesh): record crash recovery evidence (#11283)
yiliang114 Sep 7, 2026
e8510f0
Merge remote-tracking branch 'origin/main' into codex/mesh-merge-main…
yiliang114 Sep 7, 2026
e1e2b24
fix(mesh): deny shell without filesystem isolation (#11287)
yiliang114 Sep 7, 2026
6507427
docs(mesh): record live ping-pong budget result (#11288)
yiliang114 Sep 7, 2026
593668c
fix(mesh): allow complete agent handoffs
yiliang114 Sep 7, 2026
ee0fe85
feat(mesh): deliver the notifications nothing was reading
yiliang114 Sep 7, 2026
af4f4cb
docs(plans): state the gap against Multica, and the plan to close it
yiliang114 Sep 7, 2026
53f4beb
docs(plans): record the three decisions, and what Stage A is concretely
yiliang114 Sep 7, 2026
c270796
feat(mesh): give an agent a runtime binding, a concurrency limit and …
yiliang114 Sep 7, 2026
2a8e23c
refactor: rename the subsystem from mesh to workspace agents
yiliang114 Sep 7, 2026
77578ab
fix: repair the import paths the rename broke, and give an agent sess…
yiliang114 Sep 7, 2026
cbc8958
feat(agents): dispatch against one session process per agent
yiliang114 Sep 7, 2026
f663f77
feat(agents): charge tokens from the session's own counter
yiliang114 Sep 7, 2026
39da00b
refactor(agents): remove the subagent execution path
yiliang114 Sep 7, 2026
b4055c3
feat(agents): name an agent's session after the agent, and link runs …
yiliang114 Sep 7, 2026
6616312
feat(agents): give a thread acceptance criteria and a priority
yiliang114 Sep 7, 2026
8d6e199
feat(agents): deleting an agent retires it instead of erasing it
yiliang114 Sep 7, 2026
59d326e
feat(agents): make an agent configurable, and show what it may do
yiliang114 Sep 7, 2026
eb76f79
docs(agents): record what landed for stages A through D
yiliang114 Sep 7, 2026
41789e9
fix(agents): give an agent's turn its run frame back
yiliang114 Sep 7, 2026
26122e7
refactor(agents): drop the runtime field nothing wrote or read
yiliang114 Sep 7, 2026
c418895
docs(agents): record that definition drift is designed in but never fed
yiliang114 Sep 7, 2026
c71fd40
test(agents): cover the trusted run-frame path
yiliang114 Sep 7, 2026
c89d263
test(agents): cover retirement, priority ordering and acceptance crit…
yiliang114 Sep 7, 2026
95ff77a
test(agents): cover persona resolution and the one-shot persona guard
yiliang114 Sep 7, 2026
1cf8848
fix(agents): refuse to enable a retired identity, and resync the reco…
yiliang114 Sep 7, 2026
0431388
fix(audit): sweep the REST layer, and catch a baseline that names not…
yiliang114 Sep 7, 2026
ff74719
fix(agents): put deliverChannelMessage on the deps it is passed as
yiliang114 Sep 7, 2026
3a5d798
fix(agents): make the subsystem typecheck
yiliang114 Sep 7, 2026
83586f4
fix(agents): drop a bridge alias pointing at a deleted type, and type…
yiliang114 Sep 7, 2026
b779841
fix(web-shell): stop the agents UI adding type errors, measured again…
yiliang114 Sep 7, 2026
2d91196
fix(agents): stop the extracted parser rejecting the request it parses
yiliang114 Sep 7, 2026
eda1705
fix(audit): stop the generated paths naming a file that does not exist
yiliang114 Sep 7, 2026
0189e7c
test(agents): execute the rules, instead of only typechecking them
yiliang114 Sep 7, 2026
521b212
fix(agents): refuse a retired agent at admission, not only at start
yiliang114 Sep 7, 2026
2d67b58
test(agents): execute the posting path, mention routing and status ag…
yiliang114 Sep 7, 2026
c7299c6
test(agents): execute a run's whole life, and the budget boundaries
yiliang114 Sep 7, 2026
d29490a
test(agents): execute an agent actually collaborating
yiliang114 Sep 7, 2026
fb6379b
test(agents): execute delegation, blocking and waiting
yiliang114 Sep 7, 2026
51f9011
test(agents): execute the parent-report outbox and crash recovery
yiliang114 Sep 8, 2026
de1c922
test(agents): execute what the panel tells a person
yiliang114 Sep 8, 2026
10e1192
test(agents): contend the store, in one process and across several
yiliang114 Sep 8, 2026
a074c3d
test(agents): kill a writer mid-transaction, and say what that does n…
yiliang114 Sep 8, 2026
e59072d
test(agents): fuzz the store against its invariants
yiliang114 Sep 8, 2026
2ee089d
fix(audit): drop an unused binding the fuzzer left behind
yiliang114 Sep 8, 2026
9d3ebe6
test(agents): widen the fuzzer, after finding it was barely exploring
yiliang114 Sep 8, 2026
ae7deee
test(agents): check a sub-thread cannot buy a fresh budget
yiliang114 Sep 8, 2026
08c97e2
docs(agents): record how this branch was verified, and what that misses
yiliang114 Sep 8, 2026
24cc99d
test(agents): close the last two unchecked decisions, one of them pro…
yiliang114 Sep 8, 2026
8e71c72
test(agents): cover what a mutation campaign proved was untested
yiliang114 Sep 8, 2026
84e0db2
test(agents): charge tokens for real, which nothing here had ever done
yiliang114 Sep 8, 2026
a770ec3
test(agents): cover every way an assignment can be refused
yiliang114 Sep 8, 2026
eba821c
test(agents): cover the quiet no-ops, and say which survivors are not…
yiliang114 Sep 8, 2026
192bb98
test(agents): finish the mutation triage, and record what the score m…
yiliang114 Sep 8, 2026
5782b4e
fix(agents): release task dispatch before model completion
yiliang114 Sep 8, 2026
571a780
Merge remote-tracking branch 'origin/codex/multi-agent-mesh-foundatio…
yiliang114 Sep 8, 2026
41ae4a0
fix(agents): connect collaboration tools and task panel routes
yiliang114 Sep 8, 2026
451f730
fix(agents): start and resume real collaboration sessions
yiliang114 Sep 8, 2026
bb6c9f7
fix(agents): enforce capability policy in agent sessions
yiliang114 Sep 8, 2026
4002e7c
fix(agents): apply model selection when sessions initialize
yiliang114 Sep 8, 2026
4843990
feat(web-shell): Show persisted task routing outcomes
yiliang114 Sep 8, 2026
9b15dc4
fix(agents): Preserve unread inputs across run close
yiliang114 Sep 8, 2026
be1e757
feat(agents): Deliver live input through ACP with consumption receipts
yiliang114 Sep 8, 2026
009963e
fix(web-shell): Describe peer waits without assuming child threads
yiliang114 Sep 8, 2026
e94bdc6
fix(agents): Confirm runtime stop before completing cancellation
yiliang114 Sep 8, 2026
98f2884
docs(agents): Record human unblock acceptance and current delivery wo…
yiliang114 Sep 8, 2026
2b0dbbf
fix(agents): Recover durable work after runtime readiness
yiliang114 Sep 8, 2026
f20fc33
fix(agents): Persist budget gate notifications on admission
yiliang114 Sep 8, 2026
30ac645
Merge branch 'main' into codex/multi-agent-mesh-foundation
wenshao Sep 8, 2026
954c1ff
fix(agents): Confirm initial input after transcript flush
yiliang114 Sep 8, 2026
dd332c6
feat(agents): expose persistent agent runtime state
yiliang114 Sep 8, 2026
1f680f6
Merge remote-tracking branch 'origin/codex/multi-agent-mesh-foundatio…
yiliang114 Sep 8, 2026
3c89a77
feat(agents): reuse the existing agent builder
yiliang114 Sep 8, 2026
c1e6a46
fix(agents): avoid spurious collaboration wakes
yiliang114 Sep 8, 2026
811aa18
feat(agents): show agent sessions in the sidebar
yiliang114 Sep 8, 2026
3646bab
fix(agents): isolate task sessions by thread
yiliang114 Sep 8, 2026
6019fe5
feat(agents): create persistent identities directly
yiliang114 Sep 8, 2026
f060d67
fix(agents): bind identities to the local runtime
yiliang114 Sep 8, 2026
f8d6f1a
feat(agents): separate roster tasks and runtime views
yiliang114 Sep 8, 2026
c19c0ae
fix(agents): apply persistent persona to task sessions
yiliang114 Sep 8, 2026
b57b8b9
feat(agents): connect identities tasks and sessions
yiliang114 Sep 8, 2026
feb9e73
feat(agents): expose the local runtime host
yiliang114 Sep 8, 2026
98bf97c
docs(agents): audit the original collaboration goal
yiliang114 Sep 8, 2026
74a16dd
docs(agents): define the registered host boundary
yiliang114 Sep 8, 2026
d644ed2
docs(agents): stage the remote host protocol
yiliang114 Sep 8, 2026
049d8fb
feat(agents): register remote hosts
yiliang114 Sep 8, 2026
4a2ac17
Merge branch 'main' into codex/multi-agent-mesh-foundation
yiliang114 Sep 8, 2026
73c5765
fix(agents): repair two compile errors the new host work introduced
yiliang114 Sep 8, 2026
40f1596
Merge branch 'main' into codex/multi-agent-mesh-foundation
wenshao Sep 8, 2026
8f5130f
fix(web-shell): remove unsupported agent task fields
yiliang114 Sep 9, 2026
6a69c0b
fix(serve): guard missing search sessions
yiliang114 Sep 9, 2026
39b2ffd
docs(agents): define service collaboration handoff and opt-in boundaries
yiliang114 Sep 9, 2026
2864ac4
docs(agents): close the review gaps in the service-collaboration design
yiliang114 Sep 9, 2026
d3d38d8
chore(audit): retire the one-time probes, keep the regression net
yiliang114 Sep 9, 2026
2828675
docs(agents): settle the P0 capture method on a test-only hook
yiliang114 Sep 9, 2026
fb99ef9
docs(agents): ground §5, §8, P1 and P4 in what the code actually has
yiliang114 Sep 9, 2026
60dd3cc
docs(agents): name the missing server-binding check, and pin the gate…
yiliang114 Sep 9, 2026
2b75f17
docs(agents): make the two documents agree with each other
yiliang114 Sep 9, 2026
3efa1c4
feat(core): capture what the model was actually asked, for the P0 off…
yiliang114 Sep 9, 2026
829591f
feat(agents): gate collaboration behind an opt-in and bind agent sess…
yiliang114 Sep 9, 2026
2f2ede0
feat(agents): gate the run frame and the shared-threads entry on the …
yiliang114 Sep 9, 2026
5e8bd25
feat(agents): close runs the collaboration switch strands, so recover…
yiliang114 Sep 9, 2026
8a28e9c
test(agents): make the collaboration gate observation reproducible
yiliang114 Sep 9, 2026
9872ec7
feat(agents): freeze the A2A contract, with the mapping as code rathe…
yiliang114 Sep 9, 2026
01d49e1
feat(agents): accept external work idempotently and scope it to its c…
yiliang114 Sep 9, 2026
9cc7547
feat(agents): give a thread a cancelled state, closing the gap P1 rec…
yiliang114 Sep 9, 2026
d268da0
feat(agents): serve the five required A2A operations, with grants tha…
yiliang114 Sep 9, 2026
fe88042
feat(agents): decide what a Codex turn ending is evidence of
yiliang114 Sep 9, 2026
5f88890
feat(agents): lease runs to outbound Hosts, so a ghost cannot overwri…
yiliang114 Sep 9, 2026
525bafe
feat(web-shell): answer P5's three questions in one pass
yiliang114 Sep 9, 2026
c976e5e
docs(agents): record what each phase actually delivered, and what it …
yiliang114 Sep 9, 2026
6a4d04d
docs(agents): hand the two transport tasks off with their constraints…
yiliang114 Sep 9, 2026
ee8cdf7
feat(cli): expose workspace agents over A2A
yiliang114 Sep 9, 2026
2e4b020
feat(cli): add managed host run pickup
yiliang114 Sep 9, 2026
048dac5
feat(web-shell): choose agent execution hosts
yiliang114 Sep 9, 2026
93b1cd1
fix(agents): end workspace turns at handoff
yiliang114 Sep 9, 2026
890f373
feat(agents): execute managed host assignments
yiliang114 Sep 9, 2026
4c5da65
feat(agents): run managed work with codex
yiliang114 Sep 9, 2026
e0f7579
fix(agents): complete delegated work handoff and resume waiting agents
yiliang114 Sep 10, 2026
dff9f52
fix(agents): make Host pickup refuse terminal threads, and revive the…
yiliang114 Sep 10, 2026
eb3eb6a
test(agents): cover the Host pickup and result paths that had none
yiliang114 Sep 10, 2026
e40cd89
test(agents): drive the A2A transport over real HTTP
yiliang114 Sep 10, 2026
b411e01
test(agents): pin the asymmetry in who must name a thread's owner
yiliang114 Sep 10, 2026
d92342d
Merge remote-tracking branch 'origin/main' into HEAD
yiliang114 Sep 10, 2026
ba306c3
chore: sync pnpm-lock.yaml with @a2a-js/sdk dependency
yiliang114 Sep 10, 2026
ba5238e
fix(agents): refuse an executor a workspace Agent cannot honour, and …
yiliang114 Sep 10, 2026
a331a63
test(agents): a waiting agent is woken once, not on every later close
yiliang114 Sep 10, 2026
dd37cf9
fix(agents): restore the core build, which every CI job on this branc…
yiliang114 Sep 10, 2026
ea57d8b
Merge origin/main into codex/multi-agent-mesh-foundation
yiliang114 Sep 10, 2026
607de15
fix(cli): fold the agent-run type import into Session.ts's existing t…
yiliang114 Sep 10, 2026
8d3e506
Merge remote-tracking branch 'origin/main' into pr11206-resolve
yiliang114 Sep 10, 2026
6a34bf0
fix: regenerate the settings schema, and guard an optional Config method
yiliang114 Sep 11, 2026
5d94c22
fix: guard every optional Config read, and refresh NOTICES.txt
yiliang114 Sep 11, 2026
760ae6e
fix: bring the drifted tests and registries up to what the code now does
yiliang114 Sep 11, 2026
0aca214
fix: complete the i18n keys and record that terminateTurn is no longe…
yiliang114 Sep 11, 2026
8789f4a
fix(scripts): do not crash the dev launcher on a manifest without an …
yiliang114 Sep 11, 2026
3dd1989
Merge origin/main into codex/multi-agent-mesh-foundation
yiliang114 Sep 11, 2026
214b895
Merge origin/main, and deny the new `exec` tool to workspace Agents
yiliang114 Sep 11, 2026
307263e
chore(mesh): merge latest main into mesh demo branch
yiliang114 Sep 13, 2026
58cc972
fix(mesh): authenticate A2A requests before task lookup
yiliang114 Sep 13, 2026
7848a2e
fix(mesh): renew exact Host leases without claiming more work
yiliang114 Sep 13, 2026
ab62b08
fix(mesh): quote task frames and record review regression checks
yiliang114 Sep 13, 2026
4791356
feat(mesh): stream live agent replies into project conversations
yiliang114 Sep 13, 2026
769e21e
test(mesh): add repeatable Playwright streaming acceptance
yiliang114 Sep 13, 2026
4082a90
fix(mesh): stream provider thoughts and clarify queued agent state
yiliang114 Sep 13, 2026
1ddd5f5
fix(mesh): request Codex reasoning summaries for streamed runs
yiliang114 Sep 13, 2026
04fb54d
fix(mesh): show startup loading and toggle activity panel
yiliang114 Sep 13, 2026
6f92ecd
fix(mesh): resume persistent Codex host conversations
yiliang114 Sep 13, 2026
0097599
fix(mesh): retain Codex processes and deliver in-flight follow-ups
yiliang114 Sep 14, 2026
628a63e
fix(web-shell): clarify pending agent execution confirmation
yiliang114 Sep 14, 2026
90be45f
fix(web-shell): move agent activity into right panel and bridge loadi…
yiliang114 Sep 14, 2026
a99fec3
fix(web-shell): retain native chat header for collaboration
yiliang114 Sep 14, 2026
a899e1a
docs(design): record cross-machine agent-host acceptance
yiliang114 Sep 14, 2026
69d660d
refactor(web-shell): drop the Agents session-source tab
yiliang114 Sep 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions docs/design/2026-09-09-a2a-frozen-contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# P1:冻结的外部契约

状态:契约已冻结并有可执行落点;尚未实现任何传输层,也没有跑通任何互通。2026-09-09。

上游为[接续架构](./2026-09-09-agent-service-collaboration.md)与[实施计划](../plans/2026-09-09-agent-service-collaboration-plan.md)的 P1。本文只记录“说定了什么”,不宣称“跑通了什么”。

可执行部分在 `packages/core/src/agents/workspace-agents/a2a-contract.ts`,由 `scripts/audit/run-workspace-agents.mjs` 第 29 节断言(本轮 227 passed / 0 failed)。文档与代码不一致时以代码为准——文档会过期,断言不会。

## 1. 冻结的版本与绑定

| 项 | 取值 | 出处 |
| --------------- | ------------------------------------------------- | --------------------------------------------- |
| 协议版本 | `1.0`(`Major.Minor`,wire header `A2A-Version`) | 规范;`@a2a-js/sdk` 的 `A2A_PROTOCOL_VERSION` |
| 传输绑定 | `JSONRPC`(唯一一个) | `AgentInterface.protocolBinding` |
| SDK | `@a2a-js/sdk@1.1.0`,Apache-2.0,node ≥ 20 | npm registry |
| Agent Card 路径 | `.well-known/agent-card.json` | 规范 §8(RFC 8615) |
| Content-Type | `application/a2a+json` | SDK 常量 |

选 JSON-RPC 而非 gRPC:daemon 本来就是 Express,SDK 直接提供 `./server/express`;gRPC 会为我们用不到的能力引入 `@grpc/grpc-js` 与 `@bufbuild/protobuf` 两个运行时 peer。

规范定义三种绑定但**不强制任何一种**,所以“支持 A2A”必须落到具体绑定才有意义。

## 2. 必需与可选操作

必需(`A2ARequestHandler` 的命名):`sendMessage`、`getTask`、`listTasks`、`cancelTask`、`getAuthenticatedExtendedAgentCard`。五个全部应答之前不得对外声称 A2A。

可选,第一版**一个都不取**:`sendMessageStream` / `resubscribe`(需 `streaming`)、四个 push notification 操作(需 `pushNotifications`)。两者都只是“更早知道任务状态”的手段,轮询 `getTask` 回答同一个问题,而且不引入第二条需要单独做可靠的投递路径。

## 3. 单位映射(本文最要紧的一条决定)

**A2A `Task` = 本地一个 `Thread`,不是一个 `ThreadRun`。**

Task 会经历 `INPUT_REQUIRED` 再收到后续输入,这正是一个 thread 被回答后继续被推进;而 run 是单次 turn,在协议里没有对应物。相应地 **A2A `contextId` = `rootThreadId`**——规范把它称作“the contextual collection of interactions”,那正是一个父 thread 连同它分裂出的子 thread。`Message` ↔ `ThreadMessage`。

| 本地 `ThreadStatus` | A2A `TaskState` | 说明 |
| ------------------- | --------------------------- | ------------------------ |
| `open` | `TASK_STATE_SUBMITTED` | |
| `in_progress` | `TASK_STATE_WORKING` | |
| `blocked` | `TASK_STATE_INPUT_REQUIRED` | |
| `in_review` | `TASK_STATE_INPUT_REQUIRED` | 见下 |
| `done` | `TASK_STATE_COMPLETED` | 唯一映射到终态的本地状态 |

`in_review` 映到 `INPUT_REQUIRED` 而不是 `WORKING`:工作没有在推进,且要由人解除,这正是该状态对“我该不该继续等”的调用方的含义。代价是**“提了问题”与“提交待评审”的区别在边界上丢失**,只在扩展 metadata 里保留。

新增 `ThreadStatus` 而不决定它对外长什么样,会让 `toA2ATaskState` 抛错而不是默认——这是断言覆盖的一项。

## 4. 不支持项(逐项)

- **远端用量不随 Task/Message 回报。** A2A 1.0 的数据模型里根本没有用量或 token 字段。因此**不能要求**第三方 agent 报告用量。我们自己的数字走 `Task.metadata` 下的扩展;**准入必须把“缺失”当作未知而非 0**,否则一个拒绝报告的远端 agent 就等于免费调用。
- **幂等只有 `MAY`。** 规范说 agent _may_ 用 `Message.messageId` 去重,而这个 id 由客户端自己生成、且没有作用域。两个不同调用方可以给出同一个 id。所以服务端自己加作用域键:`externalRequestKey(callerId, targetAgentId, messageId)`,按认证调用方与目标 agent 限定。三段用长度前缀拼接而非分隔符连接——id 是外部来的不透明字符串,能把分隔符塞进 id 的调用方本可以伪造出别人的键(这一点有断言,且变异验证过)。
**该键必须与“接单”写在同一次写入里。** 事后补写的键无法回答它存在的那个问题(重试是否与正在接受的请求是同一个),而“同键不同内容明确拒绝”也就无从判断。
- **三处本地状态缺口:** `TASK_STATE_REJECTED`(agent 拒绝接活)与 `TASK_STATE_AUTH_REQUIRED` 在本地模型里没有对应物;**thread 级的取消也没有**——`ThreadStatus` 没有该成员,只有 run 有。所以**入站 `cancelTask` 今天无法在本地表达**,P2 必须先补上,才能声称取消可用。

## 5. run 帧的非 `_meta` 通道

本地用 ACP prompt 的 `_meta` 传 run 帧,那是 daemon 的信任边界,**外部不可达也不应可达**。外部任务另用一条:在 `AgentCapabilities.extensions` 里声明扩展 URI `https://qwenlm.github.io/qwen-code/a2a/workspace-agents/v1`,帧与用量都放在 `Task.metadata` 该 URI 下。

声明为 `required: false`:忽略该扩展的客户端仍能拿到正确的 Task / Message 语义,只是看不到用量。

## 6. 互通验收者

选 **`a2a-sdk`(Python,PyPI 1.1.2,requires-python ≥ 3.10)**,仓库 `a2aproject/a2a-python`。

它与我们服务端所用的 `@a2a-js/sdk` 是不同语言、不同代码库,因此“两端都用自家客户端自测”这条被架构 §6 排除的情形不成立。用 `@a2a-js/sdk` 自带的 client 顶多算冒烟,不作为兼容证据。

## 7. 仍需人来定的事(阻塞 P2,不阻塞 P1)

1. 实际 A/B 环境与可达方式(谁能到达谁;是否需要 P4 的出站通道提前)。
2. 首个对外开放的 Agent 及其执行权限范围。
3. 审批接收人。

另有一项来自架构 §5、须在 P3 前定:Codex turn 结束时“什么信号算明确任务结果”的映射。

## 8. 本轮没有做的事

没有实现任何 A2A 路由、没有 Agent Card 发布、没有认证、没有接单存储、没有装 `@a2a-js/sdk`(依赖尚未加入 `package.json`)。P1 的门槛是“逐项记录映射与不支持项并选定验收者”,本文与 `a2a-contract.ts` 是那个记录;跑通互通是 P2 的事。
Loading
Loading