hair keeper增加claude-sonnet-4-6模型,claude code不允许读取.git/config,claude code可免确认执行一系列相对安全的指令
This commit is contained in:
@@ -1,12 +1,91 @@
|
|||||||
{
|
{
|
||||||
"permissions": {
|
"permissions": {
|
||||||
"allow": [
|
"allow": [
|
||||||
"Read(./.env.example)"
|
"Read(./.env.example)",
|
||||||
|
|
||||||
|
"Bash(cat:*)",
|
||||||
|
"Bash(head:*)",
|
||||||
|
"Bash(tail:*)",
|
||||||
|
"Bash(less:*)",
|
||||||
|
"Bash(wc:*)",
|
||||||
|
"Bash(ls:*)",
|
||||||
|
"Bash(tree:*)",
|
||||||
|
"Bash(find:*)",
|
||||||
|
"Bash(grep:*)",
|
||||||
|
"Bash(rg:*)", // ripgrep
|
||||||
|
"Bash(fd:*)", // fd-find
|
||||||
|
"Bash(file:*)",
|
||||||
|
"Bash(stat:*)",
|
||||||
|
"Bash(du:*)",
|
||||||
|
"Bash(diff:*)",
|
||||||
|
"Bash(which:*)",
|
||||||
|
"Bash(whoami:*)",
|
||||||
|
"Bash(echo:*)",
|
||||||
|
"Bash(pwd:*)",
|
||||||
|
"Bash(date:*)",
|
||||||
|
"Bash(uname:*)",
|
||||||
|
|
||||||
|
// ===== Git 只读操作 =====
|
||||||
|
"Bash(git status:*)",
|
||||||
|
"Bash(git diff:*)",
|
||||||
|
"Bash(git log:*)",
|
||||||
|
"Bash(git branch:*)",
|
||||||
|
"Bash(git show:*)",
|
||||||
|
"Bash(git remote:*)",
|
||||||
|
"Bash(git tag:*)",
|
||||||
|
"Bash(git stash list:*)",
|
||||||
|
"Bash(git blame:*)",
|
||||||
|
"Bash(git shortlog:*)",
|
||||||
|
"Bash(git rev-parse:*)",
|
||||||
|
|
||||||
|
// ===== 子代理 =====
|
||||||
|
"Task",
|
||||||
|
|
||||||
|
// ===== 文件编辑 =====
|
||||||
|
"Edit", // 编辑已有文件
|
||||||
|
"Write", // 创建/覆写文件
|
||||||
|
"MultiEdit", // 批量编辑
|
||||||
|
|
||||||
|
// ===== 包管理 =====
|
||||||
|
"Bash(pnpm install:*)",
|
||||||
|
"Bash(pnpm add:*)",
|
||||||
|
"Bash(pnpm run build:*)",
|
||||||
|
"Bash(pnpm prisma generate:*)",
|
||||||
|
"Bash(pnpm run lint:*)",
|
||||||
|
"Bash(pip install:*)",
|
||||||
|
"Bash(pip3 install:*)",
|
||||||
|
|
||||||
|
// 相对安全的写操作
|
||||||
|
"Bash(mkdir:*)",
|
||||||
|
"Bash(cp:*)",
|
||||||
|
"Bash(mv:*)",
|
||||||
|
"Bash(rm:*)",
|
||||||
|
"Bash(touch:*)",
|
||||||
|
"Bash(chmod:*)",
|
||||||
|
"Bash(chown:*)",
|
||||||
|
"Bash(ln:*)",
|
||||||
|
"Bash(tar:*)",
|
||||||
|
"Bash(unzip:*)",
|
||||||
|
"Bash(curl:*)",
|
||||||
|
"Bash(wget:*)",
|
||||||
|
"Bash(sed:*)",
|
||||||
|
"Bash(awk:*)",
|
||||||
|
"Bash(sort:*)",
|
||||||
|
"Bash(uniq:*)",
|
||||||
|
"Bash(cut:*)",
|
||||||
|
"Bash(xargs:*)",
|
||||||
|
"Bash(tee:*)",
|
||||||
|
"Bash(jq:*)",
|
||||||
|
|
||||||
|
// MCP
|
||||||
|
"mcp__ide__getDiagnostics"
|
||||||
],
|
],
|
||||||
"deny": [
|
"deny": [
|
||||||
"Read(./.env)",
|
"Read(./.env)",
|
||||||
"Read(./.env.development)",
|
"Read(./.env.development)",
|
||||||
"Read(./.env.production)"
|
"Read(./.env.production)",
|
||||||
|
|
||||||
|
"Read(./.git/config)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -52,3 +52,6 @@ tasks.md
|
|||||||
# lock 一般的项目需要用git管理,但这个是模板项目就不管理
|
# lock 一般的项目需要用git管理,但这个是模板项目就不管理
|
||||||
package-lock.json
|
package-lock.json
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
|
|
||||||
|
# claude
|
||||||
|
.claude/*.local.*
|
||||||
@@ -351,6 +351,7 @@ EOF
|
|||||||
"api_key": "${PKUAI_API_KEY}",
|
"api_key": "${PKUAI_API_KEY}",
|
||||||
"models": [
|
"models": [
|
||||||
"claude-opus-4-6",
|
"claude-opus-4-6",
|
||||||
|
"claude-sonnet-4-6",
|
||||||
"claude-sonnet-4-5-20250929",
|
"claude-sonnet-4-5-20250929",
|
||||||
"claude-opus-4-5-20251101",
|
"claude-opus-4-5-20251101",
|
||||||
"claude-haiku-4-5-20251001"
|
"claude-haiku-4-5-20251001"
|
||||||
@@ -375,7 +376,7 @@ EOF
|
|||||||
"Router": {
|
"Router": {
|
||||||
"default": "pku-anthropic,claude-opus-4-6",
|
"default": "pku-anthropic,claude-opus-4-6",
|
||||||
"background": "pku-anthropic,claude-haiku-4-5-20251001",
|
"background": "pku-anthropic,claude-haiku-4-5-20251001",
|
||||||
"think": "pku-anthropic,claude-opus-4-6",
|
"think": "pku-anthropic,-claude-opus4-6",
|
||||||
"longContext": "pku-anthropic,claude-opus-4-6",
|
"longContext": "pku-anthropic,claude-opus-4-6",
|
||||||
"longContextThreshold": 80000,
|
"longContextThreshold": 80000,
|
||||||
"webSearch": "",
|
"webSearch": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user