Kiro:V3 会话中的钩子可改写工具输入并回答权限请求
V3 会话中,PreToolUse 钩子可返回 updatedInput,PermissionRequest 钩子可回答 allow 或 deny。
- 事件类型
- 功能更新
- 官方发布
- 本站整理
本次变化 · 变化明细 · 版本时间线
关键变化
在 V3 会话中,PreToolUse 钩子现在可以返回 updatedInput,在工具运行前替换工具调用的输入。
本次变化
共 9 条要点
在 V3 会话中,PreToolUse 钩子现在可以返回 updatedInput,在工具运行前替换工具调用的输入。
官方原文 · c1
In a V3 session, a PreToolUse hook can now return updatedInput to replace a tool call's inputs before the tool runs
官方原文 · c1 在 V3 会话中,PreToolUse hook 可以在工具运行前返回 updatedInput,并同时给出 allow、ask 或 deny 决定。
官方原文 · c2
In a V3 session, a PreToolUse hook can now return updatedInput to replace a tool call's inputs before the tool runs, alongside its allow , ask , or deny decision.
官方原文 · c2 新增的 PermissionRequest 钩子在工具调用将要向你请求权限时运行,可以用 allow 或 deny 作答。
官方原文 · c3
A new PermissionRequest hook runs when a tool call would ask you for permission and can answer with allow or deny
官方原文 · c3 这样脚本就能批准或拒绝原本要等你处理的调用。
官方原文 · c4
so a script grants or refuses a call that would otherwise wait on you
官方原文 · c4 任何钩子给出的 deny 都优先于 allow。
官方原文 · c5
A deny from any hook wins over an allow
官方原文 · c5 钩子给出的权限答复只适用于那一次工具调用。
官方原文 · c6
a hook's permission answer applies to that one tool call only
官方原文 · c6 请求超出模型上下文窗口时,智能体会恢复,而不是让这一轮失败。
官方原文 · c7
The agent recovers when a request exceeds the model's context window instead of failing the turn
官方原文 · c7 macOS 上的沙盒命令和 MCP 服务器可以使用 POSIX 信号量。
官方原文 · c8
Sandboxed commands and MCP servers on macOS can use POSIX semaphores
官方原文 · c8 读取文件失败后,不再未经批准就把它当作你主目录中的路径重试。
官方原文 · c9
A failed file read no longer retries without approval as a path in your home folder
官方原文 · c9
变化明细
下表按已审核事实整理,保留原语言;原文见各要点的引用。
| 编号 | 主体 | 动作 | 对象 | 范围 | 判断 |
|---|---|---|---|---|---|
| c1 | PreToolUse hook | can return | updatedInput to replace a tool call's inputs before the tool runs | V3 session | |
| c2 | PreToolUse hook | can return updatedInput alongside | allow, ask, or deny decision | in a V3 session, before the tool runs | |
| c3 | PermissionRequest hook | runs and can answer | allow or deny when a tool call would ask for permission | ||
| c4 | script | grants or refuses | a call that would otherwise wait on the user | ||
| c5 | deny from any hook | wins over | allow | ||
| c6 | hook permission answer | applies to | that one tool call only | ||
| c7 | agent | recovers | when a request exceeds the model's context window instead of failing the turn | ||
| c8 | Sandboxed commands and MCP servers | can use | POSIX semaphores | macOS | |
| c9 | failed file read | no longer retries without approval | as a path in your home folder | 否定 |
版本时间线
同一工具在本站已发布的快讯,按官方发布日期由新到旧。
关于这个工具
相关教程
来源与说明
官方原文 · kiro.dev/changelog/cli/3-4
AI 整理说明
本条由 AI 依据官方来源整理并经自动核对;发现错误请 反馈。