Skip to content

全流程与分类

本页是 Agent UI 的完整 lifecycle 与 taxonomy 参考。写法采用规范文档风格:直接列字段、约束、生命周期阶段、表面、Team 工作台规则和验收项。调研依据集中记录在引用索引

核心契约

Agent UI 是 Agent 工作台的投影协议。兼容客户端消费有序 runtime facts,并把它们投影到用户可见表面,但 UI 自身不能成为这些 facts 的所有者。

兼容客户端 MUST:

  • 为 active run 保留 runtime event order。
  • 把最终回答文本与 reasoning、tools、actions、artifacts、evidence、status、diagnostics、team events 分离。
  • 工作运行中保持 process 可见;完成后默认归档为折叠摘要。
  • 当 runtime 暴露 coordinator、teammates、child sessions 或 remote agents 时,保留 team ownership。
  • 用户写操作必须通过 runtime、policy、artifact、evidence、session 或 team-control 的拥有方 API。
  • 对 unknown 或 missing facts 渲染 unknownunavailablestaleblocked,不要从正文猜。
  • 支持旧 session、child sessions、remote tasks 和长任务的渐进 hydration。

兼容客户端 MUST NOT:

  • 从 assistant prose 推断 tool success、permission grants、artifact kind、evidence verdicts、approval state 或 teammate completion。
  • 在同屏把同一个 runtime fact 同时作为 expanded inline process 和 expanded timeline detail 展示。
  • 在已流式输出文本后,未经 reconciliation 直接追加 final completion text。
  • 把 UI collapse state、selected tab、active pane 或 local draft 当作 runtime truth。
  • 即使来源 transport 把 worker notification 放进 user-role channel,也不能把它当成真实用户消息。
  • 当 runtime 已暴露 agent、task、thread 或 team identity 时,不能把所有 worker 压平成一个匿名 assistant。

Lifecycle overview

标准流程是:

text
session/thread open
  -> composer draft
  -> listener bind
  -> submit or queue or steer
  -> run accepted
  -> active turn stream
  -> tool/action/team loop
  -> answer/artifact/evidence production
  -> final reconciliation
  -> timeline archive
  -> hydration/repair/replay

该流程适用于 Web、IDE、桌面端、终端和嵌入式 assistant。视觉布局可以不同,但投影规则不能变。

Event envelope

Agent UI event adapter SHOULD 把来源事件归一化为以下 envelope。Public JSON schema 有意保持可扩展,但这些字段是便携分类层。

FieldRequiredConstraintsPurpose
typeYes字符串 event class。驱动 reducer 行为。
sequenceRecommendedrun、thread、task 或 child-agent stream 内单调递增。保留 active-run order 与 repair。
timestampRecommendedproducer timestamp。Timeline、latency、replay。
sessionIdRecommended稳定 id。Session 与 tab projection。
threadIdRecommended与 session 不同时提供。Conversation recovery 与 branching。
runIdRecommendedactive work 的稳定 id。Runtime status 与 cancellation。
turnIdRecommendeduser turn 或 model turn 的稳定 id。Message/process grouping。
messageIdConditionalmessage parts 需要。Text reconciliation。
partIdConditional有序 message parts 可用时需要。穿插式渲染。
taskIdConditionalbackground task、work item 或 subagent task 需要。Task capsule、work board、task center。
agentIdConditionalfact 属于 child agent、teammate 或 remote agent 时需要。Team roster、delegation graph、transcript zoom。
parentSessionIdConditionalchild session 可用时需要。Parent/child lineage 与 hydration。
parentThreadIdConditionalchild thread 可用时需要。Delegation graph 与 replay。
toolCallIdConditionaltool lifecycle events 需要。Tool state 与 progress。
actionIdConditionalhuman-in-the-loop events 需要。Approval/input resolution。
artifactIdConditionalartifact events 需要。Artifact workspace routing。
evidenceIdConditionalevidence events 需要。Evidence/replay/review routing。
ownerRecommended下文 fact owner 值之一。防止 UI ownership drift。
scopeRecommended下文 scope 值之一。定义影响范围与持久化边界。
phaseRecommended下文 phase 值之一。驱动 status 与 grouping。
surfaceOptional主投影表面。渲染 hint,不是 fact owner。
persistenceOptional下文 persistence 值之一。Hydration 与 retention hint。
controlOptional与该 fact 关联的用户动作。Controlled write mapping。
topologyOptional下文 team topology 值之一。说明工作组织方式。
payloadOptional结构化数据。Producer-owned fact body。
refsOptionalids/refs 数组或映射。链接 artifact、evidence、transcript、file 或 raw diagnostics。
rawEventRefOptional安全引用,不是带 secret 的原始 payload。Debug 与 replay,避免污染 UI。

最小示例:

json
{
  "type": "agent.spawned",
  "sequence": 42,
  "sessionId": "session-lead",
  "threadId": "thread-lead",
  "taskId": "task-research",
  "agentId": "researcher@delivery-team",
  "parentSessionId": "session-lead",
  "parentThreadId": "thread-lead",
  "owner": "agent",
  "scope": "agent",
  "phase": "acting",
  "surface": "team_roster",
  "persistence": "snapshot",
  "topology": "coordinator_team",
  "payload": {
    "agentName": "researcher",
    "teamName": "delivery-team",
    "role": "researcher",
    "status": "running"
  }
}

分类维度

Fact owner

owner 描述谁写入 fact。UI projection 可以渲染 fact,但不能成为它的 writer。

OwnerWriterExamples
runtimeAgent runtime 或 protocol adapter。Run lifecycle、queue、interrupts、final outcome。
modelModel response adapter。Text deltas、reasoning summaries、tool call requests。
toolTool runtime 或 tool adapter。Tool input、progress、output、errors。
actionRuntime 或 policy action manager。Approval requests、structured user input、plan decisions。
artifactArtifact service。Artifact id、preview、version、diff、export state。
evidenceEvidence、review 或 replay service。Citations、traces、verdicts、replay ids、review decisions。
contextContext、memory 或 retrieval service。Context refs、budgets、missing context、compaction。
policyPolicy、permission、sandbox 或 security service。Risk、permission mode、sandbox、waiver、retention。
taskTask scheduler、work-board service 或 subagent runtime。Queue item、background teammate、work item、subagent task。
agentAgent runtime、team runtime 或 remote-agent adapter。Teammate identity、availability、handoff、transcript refs。
sessionSession/history service。Thread metadata、hydration cursor、stale state。
diagnosticsRuntime 或 client diagnostics channel。非用户正文的 debug 与 performance records。
ui_projectionClient UI controller only。Collapse state、focused tab、local draft、selected artifact。

Scope

scope 描述 fact 影响的最小稳定实体。

ScopeUse when
application全局健康、provider availability 或 account state。
workspaceWorkspace-local context、policy 或 artifact store state。
teamNamed team、roster、team preset 或 team memory boundary。
sessionChat session、task session 或 app tab。
thread可恢复或可 branch 的 conversation thread。
run一次 runtime execution boundary。
turnthread 内的一次 user turn 或 model turn。
message一条 user、assistant、system、tool 或 notification message。
part一个有序 message part。
taskQueue item、work item、background job 或 subagent task。
agentChild agent、collaborator、teammate 或 remote agent。
tool_call一次 tool invocation。
action_request一次 human-in-the-loop request。
artifact一个 durable deliverable。
evidence一个 evidence、trace、replay、review 或 citation entity。

Phase

phase 描述 fact 在 run lifecycle 中的位置。

PhaseMeaningTypical events
draft用户正在本地输入。只有持久化 draft 才使用 state.delta
submittedUI 已提交或排队输入。run.startedqueue.changed
acceptedRuntime 已接受任务。run.status
routingRuntime 正在选择 model、mode、tool surface、worker 或 teammate。run.statustask.changedteam.changed
preparingRuntime 正在组装 context 或 request。run.statuscontext.changed
planningAgent 正在生成或更新计划。plan.deltaplan.final
reasoning正在产生 reasoning/thinking。reasoning.deltareasoning.summary
actingTool、command、browser、workflow、teammate 或 subagent 正在运行。tool.*task.changedagent.changed
waitingRuntime 被用户、权限、依赖、teammate 或队列阻塞。action.requiredqueue.changedrun.statusagent.changed
reviewingReviewer 或 verifier 正在检查结果。review.requestedreview.completedevidence.changed
producing正在产生最终文本、artifact 或 evidence。text.deltaartifact.*evidence.changed
reconciling正在合并 streamed facts 与 final facts。text.finalmessages.snapshot
completed拥有系统报告成功。run.finishedtool.resultagent.completed
failed拥有系统报告失败。run.failedtool.failedartifact.failedagent.completed
cancelled用户或 runtime 取消任务。run.finishedtask.changed
interrupted工作停止,但可从 bookmark 恢复。run.finishedstate.snapshotagent.handoff
archived完成后的详情进入 timeline summary。messages.snapshotevidence.changedworker.notification
hydratingClient 正在从 snapshot/history 恢复状态。session.hydratedmessages.snapshot

Surface

surface 是渲染目的地,不是 owner。

SurfaceResponsibility
composerDraft、attachments、context chips、mode、queue/steer intent。
conversation用户消息与助手最终回答文本。
inline_processActive-run reasoning、tool progress、actions 与 status,按 event order 展示。
runtime_statusAccepted/routing/preparing/streaming/blocked/retrying/failed/done 状态。
tool_uiTool input summary、live progress、output preview、detail link。
hitlApprove、reject、edit、answer 或 structured input controls。
task_capsuleRunning、queued、failed、needs-input、subagent、team 与 background jobs。
artifact_workspaceArtifact preview、edit/canvas、version、diff、export、handoff。
timeline_evidenceProcess archive、citations、verification、replay、review、audit。
session_tabsActive、pinned、stale、unread、hydrated、running sessions。
diagnosticsDebug payloads、performance metrics、raw event refs。
team_rosterHuman 与 agent teammates、role、source、capability、status、model、policy。
work_boardHuman/agent work items、assignee、priority、blocker、progress、dependency。
delegation_graphParent/child tasks、coordinator-worker fanout、wait edges、handoff edges。
handoff_laneActive owner transfer、handoff reason、resume target、memory boundary。
worker_notificationsCompleted/failed/killed worker summaries、result refs、usage、duration。
review_laneReviewer/verifier verdicts、evidence links、requested fixes。
teammate_transcriptZoomed teammate conversation、recent messages、tool activity、pending input。
background_teammateScheduled 或 triggered background agent 作为 teammate:wake reason、run record、sleep state。
remote_teammateRemote agent card/capability、task status、input/auth needs、messages、artifacts。
team_policy每个 teammate 的 permission、approval、sandbox、plan mode、budget 与 termination controls。

Persistence

PersistenceMeaning
ephemeral_live只在 run active 时有价值。
transcript作为 conversation history 恢复。
snapshot存为有界 recent state 或 session summary。
archive存为 timeline/process/team history。
artifact_store由 artifact service 存储。
evidence_pack由 evidence/replay/review service 存储。
diagnostics_log只用于 debug 或性能分析。
ui_localClient-only local state。

User control

ControlRequired write boundary
sendRuntime submit API。
queueRuntime queue API。
steerRuntime steer/resume API。
interruptRuntime interrupt API。
delegate创建 teammate/subagent/remote task 的 runtime 或 team-control API。
assignWork-board 或 team-control API。
continue_agent给已有 teammate 发送输入的 runtime/team API。
wait等待一个或多个 teammate 的 runtime/team API。
stop停止 running teammate 或 task 的 runtime/team API。
close关闭或归档 teammate 的 runtime/team API。
request_reviewReview/evidence service 或 runtime review API。
approve / rejectRuntime 或 policy action response API。
answerRuntime action response API for structured input。
editArtifact service 或 runtime action API。
retryRuntime retry、tool retry、artifact retry 或 teammate retry API。
rollbackArtifact 或 session history API。
exportArtifact 或 evidence export API。
open_detail只读 session、artifact、evidence、transcript 或 diagnostics API。

标准事件类

Event class list 可扩展。以下类是便携 baseline。

ClassPurpose
session.openedClient 或 runtime 建立 session/thread surface。
session.hydratedSnapshot 或 history window 已应用。
session.updatedTitle、status、unread、pinned、stale 或 cursor 变化。
session.closedSession/tab 被关闭或冻结。
run.startedRuntime execution boundary 已开始或已接受。
run.statusRuntime status phase 变化。
run.finishedRuntime 以 success、cancellation 或 interrupt 结束。
run.failedRuntime 失败,并可暴露 retryability/diagnostics。
plan.delta / plan.finalPlan text 或 structured plan 变化。
text.delta / text.finalAssistant answer text 流式输出并 reconcile。
reasoning.delta / reasoning.summaryReasoning/thinking 在最终文本之外流式输出或总结。
tool.started建立 tool call boundary。
tool.argsTool input 可用或 streaming input 变化。
tool.progressTool progress 或 partial output reference 变化。
tool.output.deltaTool output 在 typed channel 中流式输出。
tool.resultTool 成功完成并返回 output 或 output reference。
tool.failedTool 以错误完成。
action.required / action.resolvedRuntime 因用户或 policy 决策暂停,然后恢复。
queue.changedQueued turns、steer state 或 queue order 变化。
task.changedBackground task、subagent、work item 或 team task 变化。
agent.changedChild agent、teammate、collaborator 或 remote-agent 状态变化。
agent.spawned / agent.completedTeammate/worker/remote collaborator 启动或返回。
agent.handoffActive agent 或 task owner 因明确原因切换,并带 resume target。
team.changedTeam roster、selected team、work board、team memory 或 team policy 变化。
worker.notificationWorker result、failure、kill、usage 或 summary notification 到达。
review.requested / review.completedReviewer/verifier request 或 verdict 变化。
context.changedContext selection、budget、retrieval 或 missing context 变化。
context.compaction.started / context.compaction.completedMemory/context compaction boundary。
permission.changedPolicy、sandbox、approval、waiver 或 risk projection 变化。
artifact.created / artifact.updatedArtifact 被创建或更新。
artifact.preview.readyArtifact preview 可用。
artifact.version.created / artifact.diff.readyArtifact version 或 diff 可用。
artifact.export.started / artifact.export.completedArtifact export lifecycle。
artifact.failed / artifact.deletedArtifact failure 或 deletion。
artifact.changedspecific artifact events 不可用时的折叠 adapter event。
evidence.changedCitation、trace、verification、replay、review、audit 或 source map 变化。
state.snapshot / state.delta外部应用状态或 durable runtime state 同步。
messages.snapshotMessage history window 或 repair snapshot 同步。
diagnostic.changedSafe diagnostics 变化。
metric.changedPerformance 或 responsiveness metric 变化。

Message part taxonomy

Message parts 是有序序列。Client SHOULD 按 active parts arrival order 渲染,完成后可归档为折叠 timeline。

PartOwnerDefault surfaceRule
user_textsessionruntimeconversationsubmit 后乐观展示,后续 reconcile ids。
assistant_textmodelruntimeconversation只用于最终回答。
reasoning_summarymodelruntimeinline_process运行中可见;完成后折叠。
reasoning_detailmodelruntimeinline_process仅在 provider policy 与用户设置允许时展示。
planmodelruntimeinline_processhitl需要审批时使用 plan decision UI。
runtime_statusruntimeruntime_status紧凑状态,不作为 prose。
tool_callmodeltooltool_ui展示安全输入摘要和运行态。
tool_resulttooltool_ui展示 preview/ref;完整 output 按需加载。
action_requiredactionpolicyhitl带 stable request id 的明确 CTA。
artifact_refartifactartifact_workspaceConversation/process 中是紧凑卡片,正文进入 workspace。
evidence_refevidencetimeline_evidence只有 evidence facts 支撑时才展示 citation/trace/review link。
context_eventcontextinline_processdiagnosticsBudget、retrieval、missing context 或 compaction summary。
agent_tasktasktask_capsulework_boardSubagent/team/background job 摘要。
agent_rosteragentteam_rosterTeammates、roles、status 与 capability boundaries。
agent_handoffagenthandoff_lanedelegation_graph展示 active-agent transfer,但不重写 transcript authorship。
worker_notificationagenttaskworker_notificationstimeline_evidence内部 worker result;不是用户消息,也不是 final prose。
remote_agent_statusagenttaskremote_teammateRemote task、input/auth need、artifact update 或 terminal state。
file_changeartifacttoolartifact_workspacetimeline_evidenceDiff/review surface,不放最终 prose。
errorOwning systemruntime_statustool_uitask_capsule可恢复 diagnostic 与下一步动作。
diagnosticdiagnosticsdiagnostics默认从正常 transcript 隐藏。

Tool lifecycle

如果来源协议提供,tool call SHOULD 经过这些状态。

StateEvent mappingUI rule
input-streamingtool.args只展示有用且非敏感的部分安全输入。
input-availabletool.args展示稳定安全输入摘要。
runningtool.startedtool.progressactive 时保持可见并展开。
progresstool.progresstool.output.delta更新 row、progress bar、preview 或 partial output ref。
output-availabletool.result折叠为 completed row,带 output preview/ref。
output-errortool.failed展示可恢复 error row。
cancelledtool.failed 或带 cancellation 的 run.finished除非需要用户动作,否则安静展示取消。

大输出 MUST offload 到 detail ref 或 artifact/evidence ref。Raw secrets MUST 在进入 projection state 前脱敏。

Human-in-the-loop taxonomy

Action typeOwnerRequired UI
tool_approvalpolicyruntimeApprove/reject,带 tool name、scope、risk 和 safe input。
plan_decisionruntime接受、拒绝或要求修改 proposed plan。
teammate_plan_decisionagentruntime标明请求审批的 teammate,并把 response 路由回该 teammate,而不是父对话。
structured_inputaction带 stable schema 与 request id 的 form/options。
clarificationruntime回答问题,但不能假装 run 已完成。
permission_grantpolicyRuntime 确认后的限时/限域 permission state。
delegated_permissionpolicyruntimeApproval card 必须展示触发请求的 delegated teammate/subagent。
credential_requestpolicy 或 secret store绝不在 message text 或 diagnostics 暴露 secret values。
artifact_reviewartifactevidenceReview diff、version、export 或 handoff result。

UI MUST 只在 owning runtime 或 policy system 确认后,才把 action 标为 resolved。

Task 与 multi-agent taxonomy

Agent UI SHOULD 把长任务和 multi-agent work 从 conversation transcript 分离出来分类。

ItemScopeDefault surfaceStatus values
Queued turntasktask_capsulequeuedpromotedremovedstarted
Work itemtaskwork_boardopenclaimedrunningblockedreviewingdone
Background jobtasktask_capsulebackground_teammatescheduledsleepingwakingrunningblockedpausedfailedcompleted
Teammate/subagentagentteam_rostertask_capsulesession_tabsspawningrunningwaitingneeds_inputplan_readyidlefailedcompletedkilledclosed
Coordinator teamteamagentteam_rosterdelegation_graphworker_notificationsformingactivewaitingmergingdone
Specialist handoffagenthandoff_lanedelegation_graphhandoff_requestedacceptedactivereturnedresumed
Review teammateagentevidencereview_lanerequestedreviewingpassedchanges_requestedfailed
Human/agent boardtaskteamwork_boardassignedclaimedblockedcommenteddone
Remote teammate tasktaskagentremote_teammatesubmittedworkinginput_requiredauth_requiredcompletedfailedcanceledrejected

Conversation text 可以说明 task outcome,但 task status 本身属于 task/runtime facts。当来源 runtime 暴露 agent/task ownership 时,multi-agent status MUST NOT 被压平成单一 assistant 作者。

Runtime execution alignment

Agent UI 不要求所有 runtime 使用同一套内部 taxonomy。但 UI projection 不能在 runtime 已经暴露更小一组 durable entities 时继续发明额外执行分类。兼容 adapter SHOULD 按下面方式映射:

Runtime entityAgent UI mappingRequired fieldsUI rule
Foreground agent turnruntimeEntity=agent_turnrun.*queue.changedtask.changedsessionIdthreadIdturnIdrunIdruntimeStatus,可选 queuedTurnCount展示在 runtime status、composer queue 与 task capsule;不要创建额外 teammate。
Child subagent 或 teammate turnruntimeEntity=subagent_turnagent.spawnedagent.changedtask.changedteam.changedagentIdagentNameparentSessionId、可选 parentThreadIdteamNameruntimeStatuslatestTurnStatus作为 teammate/child session 展示并保留 lineage;保留 coordinator-worker 分离。
Durable automation jobruntimeEntity=automation_jobtask.changed,若由 agent 拥有则同时有 agent.changedtaskId、schedule 或 wake reason、runtimeStatus、last run ref,可选 agentId作为 background teammate 或 task capsule 展示;不要创建第四类本地 runtime taxonomy。
Remote protocol taskruntimeEntity=external_taskagent.changedtask.changedartifact.changedaction.requiredagentIdremoteTaskId、remote capability/card ref、runtimeStatus、input/auth needs。保留 remote truth,同时投影到 remote_teammate
Board work itemruntimeEntity=work_itemtask.changedteam.changedworkItemId、owner/assignee、status、blocker、artifact/evidence refs。展示在 work_board;assignment 通过 board/team APIs 写回,不用 runtime status hack。

Adapter SHOULD 在 runtime 提供时保留 teamPhaseteamParallelBudgetteamActiveCountteamQueuedCountproviderConcurrencyGroupproviderParallelBudgetqueueReasonretryableOverload 等队列和并发事实。

Team topology taxonomy

Agent UI SHOULD 描述产出工作的 topology,因为不同 topology 需要不同控制表面。主心智模型是 team/workbench:teammates 协同、交接 owner、请求 review,并保留 evidence。Hierarchy-first 隐喻是具体产品实现选项,不是 Agent UI 的必需 topology。

TopologyRequired UI projectionTypical facts
solo_run一个 active run,包含 process、tools、artifacts 与 evidence。run.*tool.*artifact.*
coordinator_teamCoordinator 加 roster、worker tasks、worker result notifications 与 synthesis boundary。team.changedagent.spawnedworker.notification
parallel_workersFanout/fanin graph、per-worker state、wait controls、partial failures、merge/retry controls。agent.spawnedtask.changedworker.notificationagent.completed
specialist_handoffActive owner indicator、handoff reason、resume target、memory/context boundary。agent.handoffagent.changedmessages.snapshot
review_teamReviewer/verifier lane、verdicts、evidence links、requested fixes。review.requestedreview.completedevidence.changed
human_agent_boardHuman 与 agent assignees 的 board,包含 comments、blockers、claims、progress。team.changedtask.changedstate.delta
background_teammateWake reason、schedule、background run record、pause/resume、sleep state。task.changedagent.changedevidence.changed
remote_teammateRemote Agent Card/capability、task lifecycle、input/auth required、messages、artifacts。agent.changedtask.changedartifact.changedaction.required

Topology 是描述工作组织方式的 metadata。它不替代 ownerscopephasesurfacepersistence

Team workbench contract

当 runtime 暴露相关事实时,兼容 Team 工作台 SHOULD 投影这些事实:

FactRequired fieldsUI rule
Teammate identityagentIdagentNameteamName、role/source、可选 color/avatar、model、policy。展示在 team_roster;不要并入匿名 assistant。
Parent/child lineageparentSessionIdparentThreadId、child sessionId/threadIdtaskId、spawn reason。保留到 delegation_graph、history、evidence 与 replay。
Worker notificationtaskIdagentId、status、summary、result ref、可选 usage/duration/tool count。展示到 worker_notifications;可以归档,但不能伪装成 user speech。
Teammate statusruntimeStatuslatestTurnStatus、queue counts,以及可用时的 needs_inputplan_readyidleshutdown_requestedclosedneeds_inputplan_ready 优先级高于普通 running;展示 queue/parallel limits,但不要把它们当成 failure。
Teammate transcriptTranscript ref 或有界 recent messages、tool activity、pending input queue。按需在 teammate_transcript 打开;为性能保持有界。
Work board itemTitle、assignee、status、blocker、priority、dependencies、artifact/evidence refs。展示到 work_board;用户 assignment 通过 board/team API 写回。
HandoffFrom、to、reason、resume target、memory/context boundary、accepted time。展示到 handoff_lane;不重写历史 message authorship。
Review verdictReviewer、target、verdict、evidence refs、requested fixes。展示到 review_lane;最终回答可以总结,但 verdict 属于 evidence/review facts。
Delegated approvalAction id、requesting teammate、policy scope、safe input、parent routing。Approval card 必须标明请求动作的 teammate/subagent。
Remote teammateAgent Card/capability ref、remote task id、status、messages、artifact updates、auth/input needs。映射到 remote_teammate;不能把单次 idle tick 当作 terminal completion。
Background teammateSchedule/wake trigger、current run、last run record、pause/terminate controls。作为 teammate-owned background work 展示,不引入额外 hierarchy。

Coordinator synthesis 与 worker results 是不同事实。Coordinator 可以向用户总结 worker output,但 worker result、usage 和 transcript refs 仍作为 task/agent/evidence facts 保留。

Context、memory 与 compaction taxonomy

FactOwnerUI rule
Context referencecontext展示为 context chip、source ref 或 tool/detail link。
Context budgetcontext展示低噪声 budget meter 或 warning。
Missing contextcontext展示 blockedunknown,不要伪造可用性。
Retrieval resultcontexttoolSource ids/citations 与 final text 分离。
Memory writecontext只有用户可见 policy 要求时才展示。
Team memorycontextteam展示 repo/team scoped memory refs;脱敏 secrets;保留明确冲突优先级。
Compaction boundarycontext展示紧凑边界或摘要;保留 resume metadata。

Permission 与 security taxonomy

FactOwnerUI rule
Risk levelpolicy仅在影响用户控制或 required approval 时展示。
Sandbox/access modepolicy展示当前约束和 escalation requests。
Per-teammate permission modepolicyagent当 teammate permission 与 coordinator 不同时展示。
Approval statepolicyruntime不从 prose 推断;必须有 action confirmation。
Delegated approval sourcepolicyruntime保留触发 approval 的 teammate/subagent。
Secret-bearing payloadpolicy 或 secret store不持久化进 projection state;使用 refs/redaction。
Retention/waiverpolicy只展示 durable policy facts 或 evidence refs。

Hydration 与 repair

兼容客户端 SHOULD 按顺序恢复:

  1. 渲染 shell、tab、title 和轻量 snapshot。
  2. 应用 recent message window。
  3. 应用 current run status、queue、pending action、task summary 和 team summary。
  4. 应用 compact process/timeline/artifact/evidence/team references。
  5. Teammate transcripts、full tool output、artifact body、evidence payload、remote task details 和 older history 按需加载。

Hydration events MUST stale-safe。用户切换 session 后,迟到 hydration result 不得覆盖 active view。

Validation checklist

兼容实现 SHOULD 通过这些检查:

  1. Listener binding 早于 submit。
  2. Runtime accepted/routing/preparing status 可在 first text 前渲染。
  3. Active message parts 按 event/part order 渲染。
  4. Running reasoning 与 tools 保持可见;completed process 折叠为 summaries。
  5. Final answer text 保持干净,并且 reconciliation 不重复。
  6. Tool input/progress/output/error state 不进入 final answer text。
  7. Human-in-the-loop actions 使用 stable ids 与 controlled write APIs。
  8. Queue 与 steer 在视觉和语义上可区分。
  9. Artifact body 默认在 Artifact Workspace,而不是 transcript。
  10. Evidence、replay、review 与 citations 链接到 evidence facts。
  11. Multi-agent 与 background tasks 使用 task/agent/team facts,不靠 assistant prose。
  12. 当 runtime 暴露 coordinator、worker、handoff、board、background、review 或 remote-agent facts 时,Team topology 可见。
  13. Worker notifications 能与真实用户消息和 coordinator final text 区分。
  14. Parent/child session/thread/task ids 在 hydration、replay、evidence export 与 transcript zoom 中保留。
  15. Delegated approvals 标明请求动作的 teammate/subagent。
  16. Context 与 compaction 作为 facts 或 boundaries 展示,不是隐藏文本突变。
  17. Missing facts 渲染诚实 fallback states。
  18. Old sessions 渐进 hydrate,并安全忽略 stale results。
  19. Diagnostics 与 metrics 保持在正常 conversation text 之外。

Draft runtime-first standard for agent interaction surfaces.