Files
dotfiles/opencode/.config/opencode/opencode.json
T
ddadmin 761fd9978b refactor(opencode): минимальный шаблон конфига для 2.x
Конфиг переписан в каноническом виде OpenCode 2: права заданы
списком permissions, MCP-серверы — в mcp.servers. Убраны устаревшие
default_agent и выключенный playwright, а также комментарий про
снятый плагин. Пример возврата SearXNG в README поправлен под новую
схему. Лишний симлинк opencode/skills удалён: OpenCode сам читает
~/.agents/skills.
2026-10-17 17:16:41 +02:00

35 lines
1.6 KiB
JSON

{
"$schema": "https://opencode.ai/config.json",
// Минимальный шаблон для OpenCode 2.x. Файл раскладывается копией
// (install.sh → copy_managed_file), поэтому правки в репозитории
// попадают в ~/.config/opencode только после ./install.sh.
"share": "manual",
"permissions": [
// Порядок важен: побеждает последнее совпавшее правило.
{ "action": "edit", "resource": "*", "effect": "ask" },
{ "action": "webfetch", "resource": "*", "effect": "ask" },
{ "action": "subagent", "resource": "*", "effect": "ask" },
{ "action": "shell", "resource": "*", "effect": "ask" },
{ "action": "shell", "resource": "*/.ssh/*", "effect": "deny" },
{ "action": "shell", "resource": "*id_rsa*", "effect": "deny" },
{ "action": "shell", "resource": "*id_ed25519*", "effect": "deny" },
{ "action": "shell", "resource": "*.pem", "effect": "deny" },
{ "action": "shell", "resource": "*.env", "effect": "deny" },
{ "action": "shell", "resource": "*.env.*", "effect": "deny" },
{ "action": "shell", "resource": "*.secrets*", "effect": "deny" },
{ "action": "shell", "resource": "*.netrc*", "effect": "deny" },
{ "action": "shell", "resource": "*.env.example", "effect": "allow" }
],
"mcp": {
"servers": {
"context7": {
"type": "remote",
"url": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}"
}
}
}
}
}