agent-Specialization/.playwright-mcp/page-2026-04-27T09-51-33-383Z.yml
JOJO e2bbd767f7 feat(host-security+ui): unify host execution/approval behavior, runtime notices, and approval overlay UX
This commit consolidates a large set of host-mode security and UX fixes across backend and frontend.

Security / execution model:
- Make permission/execution mode switches apply immediately (no deferred pending-only behavior).
- Keep runtime mode change notices durable and visible via user-message guidance path.
- Add explicit runtime message source taxonomy support and persistence:
  user / presend / guidance / notify / sub_agent / background_command.
- Ensure guidance/notify insertion is batched per tool-cycle so mid-run inserts are committed together.
- Separate notify from guidance semantics for mode-change notices.
- Add direct-mode auto-fallback handling visibility on frontend.

Approval and command gating:
- Align run_command approval pre-check logic with docker behavior for approval/auto_approval modes in host execution paths.
- Keep approval retry flow and final-result semantics intact when permission errors trigger approval.
- Externalize forbidden command keyword list into JSON config:
  config/forbidden_commands.json.
- Update forbidden command rejection message to user-facing wording:
  用户不允许执行包含“... ”的指令.

Prompt/runtime guidance:
- Refine execution-mode runtime rule text to avoid endless workaround loops:
  one safe alternative first, then request switching to direct mode when truly required.

Chat rendering / message UX:
- Prevent injected guidance/notify user-messages from incorrectly triggering assistant work header/timer chain.
- Restore correct visibility after history reload while preserving runtime-source behavior.
- Update user-header icon/label rendering by message source:
  - guidance -> 引导 + navigation icon
  - notify/sub_agent/background_command -> 通知 + bell icon
  - user/presend -> keep normal user header.
- Add new icons: static/icons/navigation.svg, static/icons/bell.svg.

Approval panel UX:
- Convert desktop approval panel from layout-compress sidebar to overlay + blur sheet.
- Fix panel transition behavior (remove unintended vertical motion; use dedicated desktop overlay transition).
- Improve approval result display:
  - decision and reason split lines,
  - green/red status styling,
  - multiline reason rendering,
  - auto-collapse delay adjusted to 3s.

Execution mode TTL feedback:
- When direct mode auto-expires to sandbox, frontend menu state is updated from status snapshot.
- Show non-auto-dismiss warning toast to explicitly notify auto-fallback.

Misc consistency updates:
- Execution mode label text cleanup in composer.
- Runtime notice wording normalization (权限模式修改为..., 执行环境修改为...).

Build/test notes:
- Frontend rebuilt after UI changes.
- Smoke tests passed for server refactor path.
2026-05-12 19:16:38 +08:00

146 lines
9.2 KiB
YAML

- generic [ref=e2]:
- generic [ref=e3]:
- generic:
- generic [ref=e6]:
- link "新闻" [ref=e7] [cursor=pointer]:
- /url: http://news.baidu.com
- link "hao123" [ref=e8] [cursor=pointer]:
- /url: https://www.hao123.com?src=from_pc
- link "地图" [ref=e9] [cursor=pointer]:
- /url: http://map.baidu.com
- link "贴吧" [ref=e10] [cursor=pointer]:
- /url: http://tieba.baidu.com/
- link "视频" [ref=e11] [cursor=pointer]:
- /url: https://haokan.baidu.com/?sfrom=baidu-top
- link "图片" [ref=e12] [cursor=pointer]:
- /url: http://image.baidu.com/
- link "网盘" [ref=e13] [cursor=pointer]:
- /url: https://pan.baidu.com?from=1026962h
- link "文库" [ref=e14] [cursor=pointer]:
- /url: https://wenku.baidu.com/?fr=bdpcindex
- link "文心" [ref=e15] [cursor=pointer]:
- /url: https://chat.baidu.com/search?isShowHello=1&pd=csaitab&setype=csaitab&extParamsJson=%7B%22enter_type%22%3A%22home_tab%22%7D
- link "搭子DuMate" [ref=e16] [cursor=pointer]:
- /url: https://cloud.baidu.com/product/dumate.html?track=bdsy
- link "更多" [ref=e18] [cursor=pointer]:
- /url: http://www.baidu.com/more/
- generic [ref=e19]:
- generic [ref=e20] [cursor=pointer]: 设置
- link "登录" [ref=e21] [cursor=pointer]:
- /url: https://passport.baidu.com/v2/?login&tpl=mn&u=http%3A%2F%2Fwww.baidu.com%2F&sms=5
- generic [ref=e24]:
- generic [ref=e25]:
- img [ref=e26]
- generic:
- link "点击一下,了解更多":
- /url: //www.baidu.com/s?wd=%E7%99%BE%E5%BA%A6%E7%83%AD%E6%90%9C&sa=ire_dl_gh_logo_texing&rsv_dl=igh_logo_pcs
- generic [ref=e31]:
- generic [ref=e34]:
- textbox "广州钦州暴雨" [active] [ref=e36]
- generic [ref=e38]:
- generic [ref=e39]:
- img [ref=e47] [cursor=pointer]
- generic [ref=e50]:
- img [ref=e54] [cursor=pointer]
- img [ref=e59] [cursor=pointer]
- button "百度一下" [ref=e63] [cursor=pointer]
- link "复杂问题就找文心助手,深入思考回答更优 " [ref=e67] [cursor=pointer]:
- /url: https://chat.baidu.com/search?extParams=%7B%22enter_type%22%3A%22home_operate%22%7D&isShowHello=1
- img [ref=e68]
- generic [ref=e69]:
- generic [ref=e70]: 复杂问题就找文心助手,深入思考回答更优
- generic [ref=e71]:
- generic [ref=e72]:
- generic [ref=e73]:
- link "百度热搜":
- /url: https://top.baidu.com/board?platform=pc&sa=pcindex_entry
- generic "百度热搜" [ref=e74] [cursor=pointer]: 
- generic [ref=e75] [cursor=pointer]:
- generic [ref=e76]:
- text: 换一换
- list:
- listitem [ref=e77]:
- link " 小试点闯出大天地" [ref=e78] [cursor=pointer]:
- /url: https://www.baidu.com/s?wd=%E5%B0%8F%E8%AF%95%E7%82%B9%E9%97%AF%E5%87%BA%E5%A4%A7%E5%A4%A9%E5%9C%B0&sa=fyb_n_homepage&rsv_dl=fyb_n_homepage&from=super&cl=3&tn=baidutop10&fr=top1000&rsv_idx=2&hisfilter=1
- generic [ref=e79]:
- text: 小试点闯出大天地
- listitem [ref=e81]:
- link "5 男孩拿菜刀与父亲对峙被狠狠批评" [ref=e82] [cursor=pointer]:
- /url: https://www.baidu.com/s?wd=%E7%94%B7%E5%AD%A9%E6%8B%BF%E8%8F%9C%E5%88%80%E4%B8%8E%E7%88%B6%E4%BA%B2%E5%AF%B9%E5%B3%99%E8%A2%AB%E7%8B%A0%E7%8B%A0%E6%89%B9%E8%AF%84&sa=fyb_n_homepage&rsv_dl=fyb_n_homepage&from=super&cl=3&tn=baidutop10&fr=top1000&rsv_idx=2&hisfilter=1
- generic [ref=e83]: "5"
- text: 男孩拿菜刀与父亲对峙被狠狠批评
- listitem [ref=e85]:
- link "1 中国海军强势“围观”美日菲军演" [ref=e86] [cursor=pointer]:
- /url: https://www.baidu.com/s?wd=%E4%B8%AD%E5%9B%BD%E6%B5%B7%E5%86%9B%E5%BC%BA%E5%8A%BF%E2%80%9C%E5%9B%B4%E8%A7%82%E2%80%9D%E7%BE%8E%E6%97%A5%E8%8F%B2%E5%86%9B%E6%BC%94&sa=fyb_n_homepage&rsv_dl=fyb_n_homepage&from=super&cl=3&tn=baidutop10&fr=top1000&rsv_idx=2&hisfilter=1
- generic [ref=e87]: "1"
- text: 中国海军强势“围观”美日菲军演
- generic [ref=e88]:
- listitem [ref=e89]:
- link "6 重庆地下通道跳舞爸爸的女儿去世" [ref=e90] [cursor=pointer]:
- /url: https://www.baidu.com/s?wd=%E9%87%8D%E5%BA%86%E5%9C%B0%E4%B8%8B%E9%80%9A%E9%81%93%E8%B7%B3%E8%88%9E%E7%88%B8%E7%88%B8%E7%9A%84%E5%A5%B3%E5%84%BF%E5%8E%BB%E4%B8%96&sa=fyb_n_homepage&rsv_dl=fyb_n_homepage&from=super&cl=3&tn=baidutop10&fr=top1000&rsv_idx=2&hisfilter=1
- generic [ref=e91]: "6"
- text: 重庆地下通道跳舞爸爸的女儿去世
- generic [ref=e92]:
- listitem [ref=e93]:
- link "2 花38万买100多箱茅台全是假的" [ref=e94] [cursor=pointer]:
- /url: https://www.baidu.com/s?wd=%E8%8A%B138%E4%B8%87%E4%B9%B0100%E5%A4%9A%E7%AE%B1%E8%8C%85%E5%8F%B0%E5%85%A8%E6%98%AF%E5%81%87%E7%9A%84&sa=fyb_n_homepage&rsv_dl=fyb_n_homepage&from=super&cl=3&tn=baidutop10&fr=top1000&rsv_idx=2&hisfilter=1
- generic [ref=e95]: "2"
- text: 花38万买100多箱茅台全是假的
- generic [ref=e96]:
- listitem [ref=e97]:
- link "7 王中和一审获刑17年" [ref=e98] [cursor=pointer]:
- /url: https://www.baidu.com/s?wd=%E7%8E%8B%E4%B8%AD%E5%92%8C%E4%B8%80%E5%AE%A1%E8%8E%B7%E5%88%9117%E5%B9%B4&sa=fyb_n_homepage&rsv_dl=fyb_n_homepage&from=super&cl=3&tn=baidutop10&fr=top1000&rsv_idx=2&hisfilter=1
- generic [ref=e99]: "7"
- text: 王中和一审获刑17年
- listitem [ref=e101]:
- link "3 全国“五一”赏花地图来了" [ref=e102] [cursor=pointer]:
- /url: https://www.baidu.com/s?wd=%E5%85%A8%E5%9B%BD%E2%80%9C%E4%BA%94%E4%B8%80%E2%80%9D%E8%B5%8F%E8%8A%B1%E5%9C%B0%E5%9B%BE%E6%9D%A5%E4%BA%86&sa=fyb_n_homepage&rsv_dl=fyb_n_homepage&from=super&cl=3&tn=baidutop10&fr=top1000&rsv_idx=2&hisfilter=1
- generic [ref=e103]: "3"
- text: 全国“五一”赏花地图来了
- listitem [ref=e105]:
- link "8 一夜之间数千上市公司董秘岗位空缺" [ref=e106] [cursor=pointer]:
- /url: https://www.baidu.com/s?wd=%E4%B8%80%E5%A4%9C%E4%B9%8B%E9%97%B4%E6%95%B0%E5%8D%83%E4%B8%8A%E5%B8%82%E5%85%AC%E5%8F%B8%E8%91%A3%E7%A7%98%E5%B2%97%E4%BD%8D%E7%A9%BA%E7%BC%BA&sa=fyb_n_homepage&rsv_dl=fyb_n_homepage&from=super&cl=3&tn=baidutop10&fr=top1000&rsv_idx=2&hisfilter=1
- generic [ref=e107]: "8"
- text: 一夜之间数千上市公司董秘岗位空缺
- listitem [ref=e109]:
- link "4 为救战机他放弃跳伞 牺牲时年仅29岁" [ref=e110] [cursor=pointer]:
- /url: https://www.baidu.com/s?wd=%E4%B8%BA%E6%95%91%E6%88%98%E6%9C%BA%E4%BB%96%E6%94%BE%E5%BC%83%E8%B7%B3%E4%BC%9E+%E7%89%BA%E7%89%B2%E6%97%B6%E5%B9%B4%E4%BB%8529%E5%B2%81&sa=fyb_n_homepage&rsv_dl=fyb_n_homepage&from=super&cl=3&tn=baidutop10&fr=top1000&rsv_idx=2&hisfilter=1
- generic [ref=e111]: "4"
- text: 为救战机他放弃跳伞 牺牲时年仅29岁
- generic [ref=e112]:
- listitem [ref=e113]:
- link "9 中国首次实现批量克隆10头牦牛" [ref=e114] [cursor=pointer]:
- /url: https://www.baidu.com/s?wd=%E4%B8%AD%E5%9B%BD%E9%A6%96%E6%AC%A1%E5%AE%9E%E7%8E%B0%E6%89%B9%E9%87%8F%E5%85%8B%E9%9A%8610%E5%A4%B4%E7%89%A6%E7%89%9B&sa=fyb_n_homepage&rsv_dl=fyb_n_homepage&from=super&cl=3&tn=baidutop10&fr=top1000&rsv_idx=2&hisfilter=1
- generic [ref=e115]: "9"
- text: 中国首次实现批量克隆10头牦牛
- generic [ref=e118]:
- paragraph [ref=e119]:
- link "关于百度" [ref=e120] [cursor=pointer]:
- /url: //home.baidu.com
- paragraph [ref=e121]:
- link "About Baidu" [ref=e122] [cursor=pointer]:
- /url: http://ir.baidu.com
- paragraph [ref=e123]:
- link "使用百度前必读" [ref=e124] [cursor=pointer]:
- /url: //www.baidu.com/duty
- paragraph [ref=e125]:
- link "帮助中心" [ref=e126] [cursor=pointer]:
- /url: https://help.baidu.com/question?prod_id=1
- paragraph [ref=e127]:
- link "企业推广" [ref=e128] [cursor=pointer]:
- /url: https://e.baidu.com/?refer=1271
- paragraph [ref=e129]:
- link "京公网安备11000002000001号" [ref=e130] [cursor=pointer]:
- /url: http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11000002000001
- paragraph [ref=e131]:
- link "京ICP证030173号" [ref=e132] [cursor=pointer]:
- /url: https://beian.miit.gov.cn
- paragraph [ref=e133]: 互联网新闻信息服务许可证11220180008
- generic [ref=e134]:
- generic [ref=e135]:
- generic [ref=e136]:
- generic:
- generic:
- generic:
- img
- img [ref=e141] [cursor=pointer]