fix(hub): include Edit in default single-agent tools

Removing the claude_code preset dropped Edit. Unrestricted roles need it for
in-place file edits; write_file also grants Edit for restricted roles.
This commit is contained in:
2026-07-25 14:18:57 +08:00
parent a3af63c1c6
commit 2699ff3679
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -1,6 +1,7 @@
export const DEFAULT_CLAUDE_BUILT_IN_TOOLS = [
"Read",
"Write",
"Edit",
"Bash",
"Glob",
"Grep",
@@ -31,7 +32,7 @@ export interface ClaudeSdkToolConfig {
const ROLE_TOOL_TO_CLAUDE_BUILT_INS: Readonly<Record<string, readonly string[]>> = {
read_file: ["Read"],
write_file: ["Write"],
write_file: ["Write", "Edit"],
list_files: ["Glob"],
search_files: ["Grep"],
bash: ["Bash"],
@@ -46,6 +47,7 @@ const ROLE_TOOL_TO_CLAUDE_BUILT_INS: Readonly<Record<string, readonly string[]>>
TodoWrite: ["TodoWrite"],
Read: ["Read"],
Write: ["Write"],
Edit: ["Edit"],
Bash: ["Bash"],
Glob: ["Glob"],
Grep: ["Grep"],