Whole-workbook revert is labeled high risk but lacks the documented user-confirmation gate
Source references: 7A revert overwrites the current workbook with a historical version and is explicitly labeled high-risk. However, its system flags list only `--dry-run`, its execution example does not require `--yes`, and it is absent from the main strong-confirmation list.
If an agent invokes the example without renewed explicit consent, cells, formulas, objects, and collaborators' recent changes after that version may be overwritten across the workbook.
The documentation says revert overwrites the entire workbook and is high-risk, yet its declared flags and execution example have no `--yes` gate, and the main confirmation list omits it. It says to explain the impact but does not explicitly require consent. An agent could therefore start an asynchronous revert without clear approval. Users can ask that revert use the same dry-run, explicit-consent, and `--yes` protocol.
每张飞书电子表格保留一串历史版本(`minor_histories`)。每个版本由 `history_version_id` 标识,并附带创建时间(`create_time`)、动作(`action`)与块修订信息(`all_block_revision`)。历史是**工作簿级**的(针对整张电子表格,不针对单个子表)。回滚(revert)把电子表格的当前内容覆盖回某个历史版本——这是一个**高风险写入**操作,且为**异步**:发起后立即返回受理标识,真正的回滚在后台进行,需通过状态查询轮询最终结果(进行中 / 成功 / 失败)。Show 6 other places
| --- | --- | --- || `+history-list` | read | 历史版本 || `+history-revert` | high-risk-write | 历史版本 || `+history-revert-status` | read | 历史版本 |### `+history-revert`_公共:URL/token(无 sheet 定位) · 系统:`--dry-run`_| Flag | Type | 必填 | 说明 || --- | --- | --- | --- || `--history-version-id` | string | required | 要回滚到的历史版本(取自 +history-list) |### `+history-revert````bash# 回滚到指定历史版本(异步受理)lark-cli sheets +history-revert --url "https://sample.feishu.cn/sheets/SHTxxxxxx" --history-version-id "<id-from-history-list>"```回滚(revert)把电子表格的当前内容覆盖回某个历史版本——这是一个**高风险写入**操作,且为**异步**:发起后立即返回受理标识,真正的回滚在后台进行,需通过状态查询轮询最终结果(进行中 / 成功 / 失败)。**注意事项(必须了解)**:- **回滚是高风险写入操作**:会用历史版本内容覆盖当前表格,执行前应明确告知用户影响。- **回滚是异步的**:`+history-revert` 返回的是 `transaction_id`(受理标识),不代表回滚已完成;必须用 `+history-revert-status --transaction-id <transaction_id>` 确认最终结果。- **`history_version_id` 与 `transaction_id` 不是同一个**:`history_version_id` 用于 `+history-revert`(取自 `+history-list`);`transaction_id` 用于 `+history-revert-status`(取自 `+history-revert` 的输出)。> ⚠️ **high-risk-write 命令清单(exit 10 强确认门禁)**:`+batch-update`、`+cells-clear`、`+cells-batch-clear`、`+sheet-delete`、`+dim-delete`、`+dropdown-delete`,以及各对象删除 `+chart-delete` / `+pivot-delete` / `+cond-format-delete` / `+filter-delete` / `+filter-view-delete` / `+sparkline-delete` / `+float-image-delete`。>> **审批协议**:先 `--dry-run` 预览、向用户展示将执行的操作与影响范围,**获得用户明确同意后**再在原命令追加 `--yes` 执行。未经用户同意不得带 `--yes`,也不得在 exit 10 后静默补 `--yes` 重试——那等于禁用门禁。完整协议见 [`../lark-shared/SKILL.md`](../lark-shared/SKILL.md)。