|
15 | 15 | }, |
16 | 16 | "command": { |
17 | 17 | "type": "string", |
18 | | - "description": "Shell command to execute" |
| 18 | + "description": "Shell command to execute", |
| 19 | + "minLength": 1 |
19 | 20 | }, |
20 | 21 | "timeout": { |
21 | 22 | "type": "number", |
|
32 | 33 | "properties": { |
33 | 34 | "matcher": { |
34 | 35 | "type": "string", |
35 | | - "description": "String (e.g. Write) to match values related to the hook event, e.g. tool names" |
| 36 | + "description": "Optional pattern to match tool names, case-sensitive (only applicable for PreToolUse and PostToolUse)" |
36 | 37 | }, |
37 | 38 | "hooks": { |
38 | 39 | "type": "array", |
|
46 | 47 | "permissionRule": { |
47 | 48 | "type": "string", |
48 | 49 | "description": "Tool permission rule", |
49 | | - "pattern": "^((Bash|Edit|Glob|Grep|MultiEdit|NotebookEdit|NotebookRead|Read|SlashCommand|Task|TodoWrite|WebFetch|WebSearch|Write)\\(?|^mcp__)", |
| 50 | + "pattern": "^((Bash|BashOutput|Edit|ExitPlanMode|Glob|Grep|KillShell|NotebookEdit|Read|SlashCommand|Task|TodoWrite|WebFetch|WebSearch|Write)\\(?|^mcp__)", |
50 | 51 | "examples": [ |
51 | | - "Bash(npm run lint)", |
52 | | - "Bash(npm run test:*)", |
53 | | - "Bash(git push:*)", |
54 | | - "Bash(curl:*)", |
55 | | - "Read(~/.zshrc)", |
56 | | - "Read(./.env)", |
57 | | - "Read(./secrets/**)", |
| 52 | + "Bash(git commit:*)", |
| 53 | + "Bash(npm run lint:*)", |
| 54 | + "Edit(/src/**/*.ts)", |
| 55 | + "mcp__github__search_repositories", |
| 56 | + "Read(*.env)", |
| 57 | + "Read(//Users/alice/secrets/**)", |
| 58 | + "Read(~/Documents/*.pdf)", |
| 59 | + "WebFetch", |
58 | 60 | "WebFetch(domain:github.com)", |
59 | | - "Edit(~/projects/**)", |
60 | | - "mcp__github__search_repositories" |
| 61 | + "Read(//tmp/**/*)" |
61 | 62 | ] |
62 | 63 | } |
63 | 64 | }, |
|
73 | 74 | "apiKeyHelper": { |
74 | 75 | "type": "string", |
75 | 76 | "description": "Custom script path to generate an auth value", |
| 77 | + "minLength": 1, |
76 | 78 | "examples": ["/bin/generate_temp_api_key.sh"] |
77 | 79 | }, |
78 | 80 | "cleanupPeriodDays": { |
|
87 | 89 | "description": "Environment variables applied to every session", |
88 | 90 | "additionalProperties": false, |
89 | 91 | "patternProperties": { |
90 | | - "^[A-Z_]+$": { |
| 92 | + "^[A-Z_][A-Z0-9_]*$": { |
91 | 93 | "type": "string", |
92 | 94 | "description": "Environment variable value" |
93 | 95 | } |
94 | 96 | }, |
95 | | - "default": {} |
| 97 | + "default": {}, |
| 98 | + "examples": [ |
| 99 | + { |
| 100 | + "ANTHROPIC_MODEL": "claude-opus-4-1", |
| 101 | + "ANTHROPIC_SMALL_FAST_MODEL": "claude-3-5-haiku-latest" |
| 102 | + } |
| 103 | + ] |
96 | 104 | }, |
97 | 105 | "includeCoAuthoredBy": { |
98 | 106 | "type": "boolean", |
|
107 | 115 | "type": "object", |
108 | 116 | "description": "Tool permissions", |
109 | 117 | "additionalProperties": false, |
| 118 | + "examples": [ |
| 119 | + { |
| 120 | + "allow": ["Bash(git add:*)"], |
| 121 | + "ask": ["Bash(gh pr create:*)", "Bash(git commit:*)"], |
| 122 | + "deny": ["Read(*.env)", "Bash(rm:*)", "Bash(curl:*)"], |
| 123 | + "defaultMode": "default" |
| 124 | + } |
| 125 | + ], |
110 | 126 | "properties": { |
111 | 127 | "allow": { |
112 | 128 | "type": "array", |
|
140 | 156 | "type": "array", |
141 | 157 | "description": "Paths to additional directories Claude can access beyond the working directory", |
142 | 158 | "items": { |
143 | | - "type": "string" |
| 159 | + "type": "string", |
| 160 | + "minLength": 1 |
144 | 161 | }, |
145 | | - "uniqueItems": true |
| 162 | + "uniqueItems": true, |
| 163 | + "examples": [["//Users/alice/Documents", "~/projects"]] |
146 | 164 | } |
147 | 165 | } |
148 | 166 | }, |
|
155 | 173 | "type": "array", |
156 | 174 | "description": "List of allowed MCP servers from .mcp.json", |
157 | 175 | "items": { |
158 | | - "type": "string" |
| 176 | + "type": "string", |
| 177 | + "minLength": 1 |
159 | 178 | }, |
160 | 179 | "examples": [["memory", "github"]] |
161 | 180 | }, |
162 | 181 | "disabledMcpjsonServers": { |
163 | 182 | "type": "array", |
164 | 183 | "description": "List of denied MCP servers from .mcp.json", |
165 | 184 | "items": { |
166 | | - "type": "string" |
| 185 | + "type": "string", |
| 186 | + "minLength": 1 |
167 | 187 | }, |
168 | 188 | "examples": [["filesystem"]] |
169 | 189 | }, |
170 | 190 | "hooks": { |
171 | 191 | "type": "object", |
172 | 192 | "description": "Hooks configuration for executing commands at specific points in Claude Code's lifecycle", |
173 | 193 | "additionalProperties": false, |
| 194 | + "examples": [ |
| 195 | + { |
| 196 | + "PostToolUse": [ |
| 197 | + { |
| 198 | + "matcher": "Edit|Write", |
| 199 | + "hooks": [ |
| 200 | + { |
| 201 | + "type": "command", |
| 202 | + "command": "prettier --write", |
| 203 | + "timeout": 5 |
| 204 | + } |
| 205 | + ] |
| 206 | + } |
| 207 | + ] |
| 208 | + } |
| 209 | + ], |
174 | 210 | "properties": { |
175 | 211 | "PreToolUse": { |
176 | 212 | "type": "array", |
|
229 | 265 | "type": "boolean", |
230 | 266 | "description": "Disable all hooks" |
231 | 267 | }, |
| 268 | + "spinnerTipsEnabled": { |
| 269 | + "type": "boolean", |
| 270 | + "description": "Whether to show tips in the spinner" |
| 271 | + }, |
| 272 | + "alwaysThinkingEnabled": { |
| 273 | + "type": "boolean", |
| 274 | + "description": "Whether extended thinking is always enabled (default: false)" |
| 275 | + }, |
232 | 276 | "statusLine": { |
233 | 277 | "type": "object", |
234 | 278 | "description": "Custom status line configuration", |
| 279 | + "additionalProperties": false, |
235 | 280 | "properties": { |
236 | 281 | "type": { |
237 | 282 | "type": "string", |
238 | 283 | "const": "command" |
239 | 284 | }, |
240 | 285 | "command": { |
241 | 286 | "type": "string", |
242 | | - "description": "Shell command to execute to generate the status line" |
| 287 | + "description": "Shell command to execute to generate the status line", |
| 288 | + "minLength": 1 |
243 | 289 | }, |
244 | 290 | "padding": { |
245 | 291 | "type": "number", |
|
252 | 298 | "outputStyle": { |
253 | 299 | "type": "string", |
254 | 300 | "description": "The output style to use. Can be 'default', 'explanatory', 'learning', or a custom style name.", |
| 301 | + "minLength": 1, |
255 | 302 | "examples": ["default", "explanatory", "learning"] |
256 | 303 | }, |
257 | 304 | "forceLoginOrgUUID": { |
258 | 305 | "type": "string", |
| 306 | + "format": "uuid", |
259 | 307 | "description": "Force login with a specific organization UUID", |
| 308 | + "minLength": 1, |
260 | 309 | "examples": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] |
261 | 310 | }, |
262 | 311 | "awsAuthRefresh": { |
263 | 312 | "type": "string", |
264 | 313 | "description": "Command to refresh AWS credentials.", |
| 314 | + "minLength": 1, |
265 | 315 | "examples": ["aws sso login --profile myprofile"] |
266 | 316 | }, |
267 | 317 | "awsCredentialExport": { |
268 | 318 | "type": "string", |
269 | 319 | "description": "Command to export AWS credentials as JSON.", |
| 320 | + "minLength": 1, |
270 | 321 | "examples": ["/bin/generate_aws_grant.sh"] |
271 | 322 | } |
272 | 323 | } |
|
0 commit comments