Loading...
← Tüm rehberler

guardhook & omp-laya-judge — Ajan Güvenliği ve System-1 MCP (README)

Kodlama ajanları için çevrimdışı araç öncesi politika kapısı (guardhook) ve milisaniyelik yerel MCP yargıcı (omp-laya-judge)

guardhook — 30 Saniyede Kurulum ve Claude Code Kancası

Kodlama ajanları bir komutu çalıştırmadan önce stdin üzerinden JSON etkinliğini okur, yıkıcı komutları gerekçesiyle engeller (exit 2) ve tüm kararları JSONL olarak kaydeder.

Kurulum ve ilk politika testi
pip install git+https://github.com/F0Rextasy/guardhook.git
guardhook init
echo '{"tool":"exec","cmd":"rm -rf C:\\"}' | guardhook check
guardhook replay --last 2
Claude Code PreToolUse Hook Yapılandırması
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [{ "type": "command", "command": "guardhook check" }]
}
]
}
}
KuralEngellenen Desenİzin Verilen Örnek
fs.destructiverm -rf, rmdir /s, Remove-Item -Recurse -Forcerm file.txt
git.push_forcegit push --force / -fgit push --force-with-lease
net.pipe_exec(curl|wget) ... | (sh|bash|powershell|irm)curl https://x.sh -o out

omp-laya-judge — Sıfır Tokenli Yerel System-1 Karar Yargıcı

oh-my-pi için CPU üzerinde ortalama 402ms (p50 238ms) sürede sıfır LLM tokeni harcayarak tip güvenli (choice/bool/score) kararlar veren yerel MCP yan sunucusu.

Benchmark ve doğrulama komutları
git clone https://github.com/F0Rextasy/omp-laya-judge.git
cd omp-laya-judge
python benchmark/run.py
python benchmark/calibrate.py
MetrikLLM judge()omp-laya-judge (CPU)
Soru Başına Gecikme18.4s (16-25s)Ortalama 402ms (p50 238ms)
Harcanan Token728 token / soru0 token
12-Vaka DoğruluğuReferans10/12 (%0 hatalı otomatik onay)