Compare commits

...
Author SHA1 Message Date
weichenandCursor 7fbfad1851 Approve B-class allowlist for help and intent actions
Why: Record the independent U5-style review for the first two B-class
surface actions and update the usage guide allowlist note.
Evidence: proposal r1 status approved; usage doc API table updated.
Impact: Documents authority for backend whitelist implementation.
Refs: U5 action-scope r2; plan GenUI boundaries 2026-10-12

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-12 03:19:03 +00:00
weichen b680142586 Merge pull request 'Add the Generative UI usage guide and U1-U6 evaluation record (final)' (#76) from feature/generative-ui-u7 into main 2026-10-12 02:47:50 +00:00
2 changed files with 62 additions and 2 deletions
@@ -0,0 +1,59 @@
---
title: Generative UI B-class whitelist — builtin.help and system.intent
date: 2026-10-12
type: feat
revision: r1
status: approved
product_contract_source: generative-ui-u5-action-scope-r2
---
# Generative UI B 类加白提案:builtin.help / system.intent
依据:[U5 动作范围 r2](./2026-10-11-generative-ui-u5-action-scope.md)「每加一条走独立评审」。
本提案对两条命令分别裁定;实施与本提案同批合入。
负责人:裁定 weichen(用户);起草 Agent;更新时间 2026-10-12。
## 授权
用户 2026-10-12 计划确认:边界三项全部推进;B 类首批加白 `builtin.help` 与
`system.intent`。交付模式:authorized-continuous(本增量实施至 Dev 合入)。
## 一、builtin.help(独立裁定)
| 项 | 内容 |
|---|---|
| 命令 id / action id | `builtin.help` |
| 类 | B(白名单命令绑定) |
| 危险级 | 低(只读说明,无写副作用) |
| 参数 | 无必填 |
| 通道 | `POST /api/surfaces/{id}/actions` → cmdbus Entrance=`button` |
| 用途 | 页面按钮展示可用命令/入口说明 |
| 排除项对照 | 非业务写、非跨会话、非自动触发动作、非 MCP |
**裁定**:同意加白。
## 二、system.intent(独立裁定)
| 项 | 内容 |
|---|---|
| 命令 id / action id | `system.intent` |
| 类 | B(白名单命令绑定) |
| 危险级 | 入口本身低;**命中后嵌套分发可触达写命令**(既有 chat 行为) |
| 参数 | `text`(string,必填) |
| 通道 | 同上 Entrance=`button` |
| 硬化(加白前提) | **button 入口只返回 match / candidates,禁止嵌套 `Dispatch` 目标命令**;chat/slash/api 等既有入口行为不变 |
| 用途 | 页面上做意图探测/候选展示,不经按钮偷渡 D 类写 |
| 排除项对照 | 嵌套业务写在 button 路径关闭;仍禁止自动触发动作、MCP、任意命令全开 |
**裁定**:同意加白,前提硬化生效并有红测。
## 三、实施面
- Backend:`surfacesvc.AllowedActions`;`genui.ValidateActionIDs` / Catalog;`handleSystemIntent` button 只读。
- Documents:本提案 + 使用说明 API/动作表白名单更新。
- 红测:白名单外拒绝;help 可分发;intent button 命中写意图零副作用;chat 仍可嵌套。
## 四、明确不做
D 类业务写直执、扩大白名单至其他内置写命令、自动触发动作、动作结果自动改写页面。
@@ -49,7 +49,7 @@ curl -X POST ... -d '{"enabled":false}'
| GET /api/surfaces/{id} | 读取整页快照(禁用后仍可读) |
| GET /api/conversations/{id}/surfaces | 会话内页面列表 |
| GET /api/projects/{id}/surfaces | 项目级跨会话聚合(U6) |
| POST /api/surfaces/{id}/actions | 页面动作(白名单 generative-ui.submit) |
| POST /api/surfaces/{id}/actions | 页面动作(白名单:generative-ui.submit、builtin.help、system.intent;后者 button 只读匹配) |
## 二、U1–U6 落地与评测结论
@@ -80,7 +80,8 @@ Frontend #58/#59,Dev #381/#382/#387/#388):工具描述缺「何时用」
### 已知边界与后续项
- 自动触发模式默认关闭(后续 opt-in,需预算与防自激设计)。
- B 类命令白名单为空起步,逐条经独立评审加白(U5 提案 r2 约定)。
- B 类命令:已加白 `builtin.help` / `system.intent`(button 入口 intent 只读匹配、
不嵌套分发;提案 `2026-10-12-generative-ui-bclass-help-intent.md`);其余仍逐条评审。
- 人类可用性对照以 owner 实际使用替代(2026-10-11 用户裁定),本轮体感「初步不错」,
小问题另行修复。
- 部署与运行验收按独立授权推进。