- Зачем: - обеспечить корректную работу расширений VS Code через прокси-сервер без ручной правки переменных окружения. - Что: - обновлен скрипт `server-env-setup`: добавлена проверка доступности `hproxy.local` через `getent`. - реализован автоматический экспорт переменных `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY` и `NO_PROXY` (в обоих регистрах). - комментарии в скрипте переведены на русский язык. - в политики Gemini (`readonly-commands.toml`) добавлены разрешения для команд `ls`, `echo` и `[`. - Проверка: - запуск `env | grep -i proxy` в терминале VS Code после перезагрузки окна.
176 lines
3.2 KiB
TOML
176 lines
3.2 KiB
TOML
# ~/.gemini/policies/readonly-commands.toml
|
|
|
|
# ==========================================
|
|
# GIT
|
|
# ==========================================
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "git status"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "git log"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "git diff"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "git show"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "git fetch"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
# ==========================================
|
|
# DOCKER & DOCKER COMPOSE
|
|
# ==========================================
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "docker ps"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "docker images"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "docker logs"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "docker inspect"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "docker compose ps"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "docker compose logs"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
# ==========================================
|
|
# TMUX
|
|
# ==========================================
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "tmux ls"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "tmux list-sessions"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "tmux capture-pane"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
# ==========================================
|
|
# SYSTEM & READ-ONLY UTILS
|
|
# ==========================================
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "df"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "free"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "uptime"
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "head "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "tail "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "ls "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "cat "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "echo "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "[ "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "sed -n "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "sed -e "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "grep "
|
|
decision = "allow"
|
|
priority = 100
|
|
|
|
[[rule]]
|
|
toolName = "run_shell_command"
|
|
commandPrefix = "wc "
|
|
decision = "allow"
|
|
priority = 100
|