Agent Approval Card new Agent 操作确认卡 web
A human-in-the-loop checkpoint for reviewing and approving an agent plan or action
在 Agent 执行计划或动作前,留出人工查看和批准的检查点
Update 12 session records
The agent will migrate session auth, add middleware tests, and write a rollback note.
View plan
- Add migration for sessions
- Run middleware tests
- Write rollback note
标本可交互,可以直接操作。
Anatomy — every part, named解剖 —— 每个部件的名字
-
1 Plan summary计划摘要
aria-describedbyThe short description of what the agent proposes to do.
Agent 提议执行什么的简短说明。
Prompt fragmentPrompt 片段a concise verb-led plan summary with target, scope, and expected outcome
一个以动词开头的计划摘要,包含目标、范围和预期结果
-
2 Plan details计划详情
disclosureThe expandable context a reviewer may inspect before deciding.
做决定前可以查看的扩展上下文。
Prompt fragmentPrompt 片段a View plan disclosure with commands, files, or affected records in readable groups
一个 View plan 展开区,按可读分组展示命令、文件或受影响记录
-
3 Decision actions决定操作
buttonReject and Approve controls with different risk emphasis.
风险强调不同的拒绝和批准控件。
Prompt fragmentPrompt 片段a quiet Reject button and a clearly labeled Approve action that names the consequence
一个克制的拒绝按钮和一个明确写出后果的批准操作
-
4 Decision status决定状态
role=statusThe persistent result after the reviewer decides.
用户决定后的持久结果。
Prompt fragmentPrompt 片段a status region that changes to Approved, Rejected, or Failed and offers recovery
状态区域变为已批准、已拒绝或失败,并提供恢复动作
Prompt — paste into your agentPrompt —— 直接粘贴给你的代理
Build an Agent Approval Card for a high-impact tool call. Show the agent plan, target, affected scope, and any questions before the final action. Keep View plan, Reject, and Approve as distinct keyboard-reachable controls; explain what approval authorizes; prevent duplicate submissions; and replace the pending card with an explicit approved, rejected, or failed state.
为高影响的工具调用构建 Agent 操作确认卡。确认前展示 Agent 计划、目标、影响范围和待回答问题。View plan、Reject、Approve 三个操作要有清晰区别且键盘可达;说明批准会授权什么;防止重复提交;点击后替换为明确的已批准、已拒绝或失败状态。
Debug prompt — when it misbehaves调试 Prompt —— 当它不听话时
Debug my agent approval card. Check that the consequence and target are visible before approval; Approve cannot submit a surrounding form accidentally; focus order starts on the safer action; duplicate clicks are blocked while pending; rejection and server failure preserve the plan for recovery; status changes are announced; and the card does not appear after the action already ran. The symptom:
调试我的 Agent 操作确认卡。检查批准的后果和目标是否在操作前可见;Approve 不会误提交外层表单;焦点顺序先落在更安全的操作;处理中阻止重复点击;拒绝和服务端失败保留计划以便恢复;状态变化会播报;动作已执行后不会再次显示确认卡。症状:
In code代码里叫什么
| Framework框架 | Symbol符号 | Note说明 |
|---|---|---|
| ARIA | role=group + aria-describedby | connect the action to its consequence and scope |
| HTML | button type="button" | keep Approve from becoming an accidental form submit |
| UX | confirm + reject + view plan | show impact before an irreversible or external action |
| Motion | pending / approved / rejected | make the decision state persistent after the click |