Commit 93364cbc by chunhong.mu

chore(root): 扩充 Claude 权限白名单并修正 defaultMode

减少改动本项目时的授权提示。三处问题:

1. defaultMode 原为 "auto",不在 Claude Code 支持的取值内
   (default / acceptEdits / plan / bypassPermissions),实际未生效。
   改为 acceptEdits:文件编辑不再逐次询问(改动都在 git 里可回溯),
   Bash 仍按白名单控制。
2. 部分条目缺尾部通配,带 `2>&1` 重定向就匹配不上,例如
   `pnpm -F * type-check` 匹配不了 `pnpm -F admin type-check 2>&1`。
   补齐 type-check*/lint*/build* 等形态与 --filter 长写法。
3. 补充实际高频的只读命令:npx tsc --noEmit*、pnpm why/outdated、
   curl 对 localhost 的冒烟检查。

未加入(有意):pnpm install(改 node_modules)、git add/commit(提交应人工确认)、
rm/mv/cp/pkill(写操作)、npx vite|uni 与 node <file>(等价任意代码执行)、
curl 任意 URL(可外传数据)。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
parent b98979af
Showing with 15 additions and 2 deletions
......@@ -35,8 +35,21 @@
"Bash(git diff *)",
"Bash(git branch *)",
"Bash(npx vue-tsc *)",
"Bash(npx eslint *)"
"Bash(npx eslint *)",
"Bash(pnpm lint*)",
"Bash(pnpm dev:*)",
"Bash(pnpm build:*)",
"Bash(pnpm -F * type-check*)",
"Bash(pnpm --filter * type-check*)",
"Bash(pnpm --filter * build*)",
"Bash(pnpm --filter * lint*)",
"Bash(pnpm why *)",
"Bash(pnpm outdated*)",
"Bash(npx tsc --noEmit*)",
"Bash(curl -s http://localhost:*)",
"Bash(curl -sI http://localhost:*)"
],
"defaultMode": "auto"
"defaultMode": "acceptEdits"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment