From 0907e0f31ec7c5c853c34f3fb8cf5c73fb718a99 Mon Sep 17 00:00:00 2001 From: Dmitry Dementev Date: Wed, 4 Mar 2026 21:43:33 +0300 Subject: [PATCH] =?UTF-8?q?chore(gemini):=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3?= =?UTF-8?q?=D1=83=D1=80=D0=B0=D1=86=D0=B8=D1=8F=20=D0=B8=D0=B7=20JSON=20?= =?UTF-8?q?=D0=B2=20TOML?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Зачем: - формат TOML более читабелен и удобен для редактирования. - Что: - удалён файл settings.json. - добавлен builtin-readonly.toml. - добавлен readonly-commands.toml. - Проверка: - проверка структуры новой конфигурации. --- gemini/.gemini/builtin-readonly.toml | 28 +++++ gemini/.gemini/readonly-commands.toml | 157 ++++++++++++++++++++++++++ gemini/.gemini/settings.json | 53 --------- 3 files changed, 185 insertions(+), 53 deletions(-) create mode 100644 gemini/.gemini/builtin-readonly.toml create mode 100644 gemini/.gemini/readonly-commands.toml delete mode 100644 gemini/.gemini/settings.json diff --git a/gemini/.gemini/builtin-readonly.toml b/gemini/.gemini/builtin-readonly.toml new file mode 100644 index 0000000..09257c3 --- /dev/null +++ b/gemini/.gemini/builtin-readonly.toml @@ -0,0 +1,28 @@ +# ========================================== +# BUILT-IN READ-ONLY TOOLS +# ========================================== + +[[rule]] +toolName = "read_file" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "read_many_files" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "list_directory" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "search_file_content" +decision = "allow" +priority = 100 + +[[rule]] +toolName = "glob" +decision = "allow" +priority = 100 diff --git a/gemini/.gemini/readonly-commands.toml b/gemini/.gemini/readonly-commands.toml new file mode 100644 index 0000000..a8eddba --- /dev/null +++ b/gemini/.gemini/readonly-commands.toml @@ -0,0 +1,157 @@ +# ~/.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 = "cat " +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 diff --git a/gemini/.gemini/settings.json b/gemini/.gemini/settings.json deleted file mode 100644 index 925e3b4..0000000 --- a/gemini/.gemini/settings.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "general": { - "sessionRetention": { - "enabled": true, - "maxAge": "30d", - "warningAcknowledged": true - } - }, - "security": { - "auth": { - "selectedType": "oauth-personal" - } - }, - "ui": { - "theme": "Default" - }, - "ide": { - "hasSeenNudge": true - }, - "autoAccept": true, - "tools": { - "allowed": [ - "run_shell_command(git status)", - "run_shell_command(git log)", - "run_shell_command(git diff)", - "run_shell_command(git show)", - "run_shell_command(git fetch)", - - "run_shell_command(docker ps)", - "run_shell_command(docker images)", - "run_shell_command(docker logs)", - "run_shell_command(docker inspect)", - "run_shell_command(docker compose ps)", - "run_shell_command(docker compose logs)", - - "run_shell_command(tmux ls)", - "run_shell_command(tmux list-sessions)", - "run_shell_command(tmux capture-pane)", - - "run_shell_command(df)", - "run_shell_command(free)", - "run_shell_command(uptime)", - - "run_shell_command(head )", - "run_shell_command(tail )", - "run_shell_command(cat )", - "run_shell_command(sed -n )", - "run_shell_command(sed -e )", - "run_shell_command(grep )", - "run_shell_command(wc )" - ] - } -} \ No newline at end of file