- Зачем: - позволить агенту выполнять базовые операции анализа репозитория без лишних подтверждений. - Что: - в `readonly-commands.toml` добавлены правила `allow` для `git status`, `git diff` и `git add`. - Проверка: - запуск `git status` не должен вызывать диалог подтверждения (если политики применены).
86 lines
1.5 KiB
TOML
86 lines
1.5 KiB
TOML
# Gemini CLI Readonly Commands Policy
|
|
# Это конфигурационный файл для расширения списка разрешенных (readonly) команд.
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "getent "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "ip "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "which "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "command -v "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "stat "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "realpath "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "readlink "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "sort "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "uniq "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "wc "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "git status"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "git diff"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "git add "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "activate_skill"
|
|
decision = "allow"
|
|
priority = 100
|