diff --git a/docker/searxng/README.md b/docker/searxng/README.md index fd891db..bbd3376 100644 --- a/docker/searxng/README.md +++ b/docker/searxng/README.md @@ -18,14 +18,13 @@ docker logs --since 10m searxng-core ## Возврат MCP-сервера -Добавить в блок `mcp` файла `opencode/.config/opencode/opencode.json`: +Добавить в `mcp.servers` файла `opencode/.config/opencode/opencode.json`: ```json "searxng": { "type": "local", "command": ["npx", "-y", "mcp-searxng"], - "environment": { "SEARXNG_URL": "http://localhost:26745" }, - "enabled": true + "environment": { "SEARXNG_URL": "http://localhost:26745" } } ``` diff --git a/opencode/.config/opencode/opencode.json b/opencode/.config/opencode/opencode.json index 5eb749d..c088ebc 100644 --- a/opencode/.config/opencode/opencode.json +++ b/opencode/.config/opencode/opencode.json @@ -1,50 +1,34 @@ { "$schema": "https://opencode.ai/config.json", - // Плагин opencode-permission-reviewer снят (эксперимент 2026-10-11 признан - // неудачным — см. docs/research/). Блок сохранён для возврата: - // "plugins": [ - // { - // "package": "opencode-permission-reviewer@^2.4.0", - // "options": {} - // } - // ], - "default_agent": "build", - "permission": { - // edit покрывает и запись, и патчи (write/patch в V2 устарели) - "edit": "ask", - "webfetch": "ask", - "task": "ask", - "bash": { - "*": "ask", - "*/.ssh/*": "deny", - "*id_rsa*": "deny", - "*id_ed25519*": "deny", - "*.pem": "deny", - "*.env": "deny", - "*.env.*": "deny", - "*.secrets*": "deny", - "*.netrc*": "deny", - "*.env.example": "allow" - } - }, + // Минимальный шаблон для 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": { - "context7": { - "type": "remote", - "url": "https://mcp.context7.com/mcp", - "headers": { - "CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}" - }, - "enabled": true - }, - "playwright": { - "type": "local", - "command": [ - "npx", - "-y", - "@playwright/mcp@latest" - ], - "enabled": false + "servers": { + "context7": { + "type": "remote", + "url": "https://mcp.context7.com/mcp", + "headers": { + "CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}" + } + } } - }, - "share": "manual" + } } diff --git a/opencode/.config/opencode/skills b/opencode/.config/opencode/skills deleted file mode 120000 index 88dd050..0000000 --- a/opencode/.config/opencode/skills +++ /dev/null @@ -1 +0,0 @@ -../../../agents/.agents/skills \ No newline at end of file