File tree Expand file tree Collapse file tree
plugins/ai-maestro/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -326,6 +326,45 @@ create_project_template() {
326326 return 1
327327 }
328328
329+ # Write .claude/settings.local.json with pre-approved tool permissions
330+ # so agents created by AI Maestro don't require manual tool approval (Issue #223)
331+ local tmp_settings
332+ tmp_settings=$( mktemp) || {
333+ print_error " Failed to create temp file for settings.local.json"
334+ return 1
335+ }
336+
337+ cat > " $tmp_settings " << 'SETTINGS '
338+ {
339+ "permissions": {
340+ "allow": [
341+ "Bash(*)",
342+ "Read(*)",
343+ "Write(*)",
344+ "Edit(*)",
345+ "Glob(*)",
346+ "Grep(*)",
347+ "WebFetch(*)",
348+ "WebSearch(*)",
349+ "Task(*)",
350+ "mcp__*"
351+ ]
352+ }
353+ }
354+ SETTINGS
355+ # shellcheck disable=SC2181
356+ if [[ $? -ne 0 ]]; then
357+ rm -f " $tmp_settings "
358+ print_error " Failed to write settings.local.json content"
359+ return 1
360+ fi
361+
362+ mv " $tmp_settings " " $canonical_dir /.claude/settings.local.json" || {
363+ rm -f " $tmp_settings "
364+ print_error " Failed to create .claude/settings.local.json"
365+ return 1
366+ }
367+
329368 # HIGH-1/HIGH-2: Use atomic write pattern - write to temp file first, then mv
330369 local tmp_claude tmp_gitignore
331370 tmp_claude=$( mktemp) || {
Original file line number Diff line number Diff line change @@ -326,6 +326,45 @@ create_project_template() {
326326 return 1
327327 }
328328
329+ # Write .claude/settings.local.json with pre-approved tool permissions
330+ # so agents created by AI Maestro don't require manual tool approval (Issue #223)
331+ local tmp_settings
332+ tmp_settings=$( mktemp) || {
333+ print_error " Failed to create temp file for settings.local.json"
334+ return 1
335+ }
336+
337+ cat > " $tmp_settings " << 'SETTINGS '
338+ {
339+ "permissions": {
340+ "allow": [
341+ "Bash(*)",
342+ "Read(*)",
343+ "Write(*)",
344+ "Edit(*)",
345+ "Glob(*)",
346+ "Grep(*)",
347+ "WebFetch(*)",
348+ "WebSearch(*)",
349+ "Task(*)",
350+ "mcp__*"
351+ ]
352+ }
353+ }
354+ SETTINGS
355+ # shellcheck disable=SC2181
356+ if [[ $? -ne 0 ]]; then
357+ rm -f " $tmp_settings "
358+ print_error " Failed to write settings.local.json content"
359+ return 1
360+ fi
361+
362+ mv " $tmp_settings " " $canonical_dir /.claude/settings.local.json" || {
363+ rm -f " $tmp_settings "
364+ print_error " Failed to create .claude/settings.local.json"
365+ return 1
366+ }
367+
329368 # HIGH-1/HIGH-2: Use atomic write pattern - write to temp file first, then mv
330369 local tmp_claude tmp_gitignore
331370 tmp_claude=$( mktemp) || {
You can’t perform that action at this time.
0 commit comments