feat: configurable edit tools (hashline default), path policy, safer headless, CI - #4
Merged
Merged
Conversation
Co-authored-by: Gao Yu <gaoyu06@users.noreply.github.com>
Default exposes only hashline_edit; str_replace (alias edit), write, and apply_patch must be enabled via the edit_tools array in config.json. Disabled edit tools are filtered from the model's tool definitions and rejected with a clear error if called anyway. Also adds enable_browser_open to switch off the desktop-only browser_open tool. Co-authored-by: Gao Yu <gaoyu06@users.noreply.github.com>
read/write/str_replace/hashline_edit/apply_patch/ls/outline/checkpoint reject paths that resolve outside the workspace cwd (absolute paths, .., and symlinks pointing outside). This is a permission/path policy, not an OS sandbox; bash and ripgrep are intentionally not gated. Co-authored-by: Gao Yu <gaoyu06@users.noreply.github.com>
Headless no longer forces full-auto: it accepts any --approval-mode, defaults to read-only, and auto-denies approval requests (which could never be answered) with a clear message instead of hanging. Use --approval-mode full-auto for mutating tasks. Co-authored-by: Gao Yu <gaoyu06@users.noreply.github.com>
Co-authored-by: Gao Yu <gaoyu06@users.noreply.github.com>
Co-authored-by: Gao Yu <gaoyu06@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
本次改动范围
edit_tools配置:默认只向模型暴露hashline_edit,可再打开str_replace/write/apply_patchbrowser_open保持仅 Desktop 环境,并可用配置关掉--approval-mode;审批请求自动拒绝以免挂死未做:沙箱、LSP、MCP、ACP、vendor crate。
是否可直接上线
否。默认编辑工具集与 headless 审批都是行为变化,旧脚本若依赖隐式 full-auto 或
write/str_replace会失败。上线前是否需要 review
需要。
review 的前置条件
cargo test --workspace与 clippy 绿serve、不受 headless 默认影响cursor/cli-vendor-providers-17c0、cursor/cli-mcp-skills-17c0合并时注意config.rs冲突