fix(tools): add bare git command patterns to allowedTools

Git commands without arguments (git push, git status, git diff, etc.) were not matched by the existing wildcard patterns. Added bare variants and git stash support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MoltBot Service
2026-02-14 23:00:03 +00:00
parent be3cd0200b
commit ad31b25af3
2 changed files with 11 additions and 1 deletions

View File

@@ -5,6 +5,7 @@
- **Dacă ai folosit un tool cu succes în conversația curentă, el este disponibil în continuare.** Nu spune niciodată "nu am acces" la un tool pe care tocmai l-ai folosit.
- **Dacă un tool eșuează, oferă imediat o alternativă practică** — nu cere utilizatorului să configureze ceva. Exemplu: dacă emailul nu merge, formatează textul frumos și spune "copiază de aici".
- **Verifică întâi, vorbește pe urmă.** Înainte să spui "nu pot", încearcă tool-ul. Dacă ai calendar_check.py, rulează-l — nu presupune că nu funcționează.
- **Git = execută direct.** Comenzile git sunt pre-aprobate. NU cere confirmare, NU spune "necesită aprobare". Doar rulează: `git add`, `git commit -m "msg"`, `git push`.
## Unelte principale
@@ -22,6 +23,7 @@
### Git
- **Repo:** gitea.romfast.ro/romfast/echo-core
- `python3 tools/git_commit.py --push`
- **⚠️ Git e PRE-APROBAT.** Comenzile git (add, commit, push, status, diff, log) sunt auto-aprobate via `--allowedTools`. Execută-le DIRECT, fără a cere confirmare. NU spune "am nevoie de aprobare" — doar rulează comanda.
### Calendar
- **Credentials:** credentials/google-calendar.json + google-calendar-token.json

View File

@@ -60,16 +60,24 @@ ALLOWED_TOOLS = [
"Bash(.venv/bin/python3 *)",
"Bash(pip *)",
"Bash(pytest *)",
# Git
# Git — both bare commands and commands with arguments
"Bash(git add *)",
"Bash(git commit *)",
"Bash(git push)",
"Bash(git push *)",
"Bash(git pull)",
"Bash(git pull *)",
"Bash(git status)",
"Bash(git status *)",
"Bash(git diff)",
"Bash(git diff *)",
"Bash(git log)",
"Bash(git log *)",
"Bash(git checkout *)",
"Bash(git branch)",
"Bash(git branch *)",
"Bash(git stash)",
"Bash(git stash *)",
# Node/npm
"Bash(npm *)",
"Bash(node *)",