diff --git a/README.md b/README.md index ce12f818b..c3fbc3441 100644 --- a/README.md +++ b/README.md @@ -336,7 +336,7 @@ Opinionated defaults, adjustable if you insist. See [Configuration Documentation](docs/reference/configuration.md). **Quick Overview:** -- **Config Locations**: The compatibility layer recognizes both `oh-my-openagent.json[c]` and legacy `oh-my-opencode.json[c]` plugin config files. Existing installs still commonly use the legacy basename. +- **Config Locations**: User config plus walked `.opencode/oh-my-openagent.json[c]` configs up to `$HOME`; closest wins. Legacy `oh-my-opencode.json[c]` still works. - **JSONC Support**: Comments and trailing commas supported - **Agents**: Override models, temperatures, prompts, and permissions for any agent - **Built-in Skills**: `playwright` (browser automation), `git-master` (atomic commits) diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index cfd5e1b18..7a6004a49 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md @@ -43,9 +43,9 @@ Complete reference for Oh My OpenCode plugin configuration. During the rename tr ### File Locations -User config is loaded first, then project config overrides it. In each directory, the compatibility layer recognizes both the renamed and legacy basenames. +User config loads first. Project configs are discovered by walking from the working directory up to `$HOME`; closer configs win. If the working directory is outside `$HOME`, only that directory is checked. -1. Project config: `.opencode/oh-my-openagent.json[c]` or `.opencode/oh-my-opencode.json[c]` +1. Walked configs: `.opencode/oh-my-openagent.json[c]` or legacy `.opencode/oh-my-opencode.json[c]` 2. User config (`.jsonc` preferred over `.json`): | Platform | Path candidates | @@ -53,6 +53,8 @@ User config is loaded first, then project config overrides it. In each directory | macOS/Linux | `~/.config/opencode/oh-my-openagent.json[c]`, `~/.config/opencode/oh-my-opencode.json[c]` | | Windows | `%APPDATA%\opencode\oh-my-openagent.json[c]`, `%APPDATA%\opencode\oh-my-opencode.json[c]` | +**Security note:** `mcp_env_allowlist` is user-only. Walked configs cannot extend it. + **Rename compatibility:** The published package and CLI binary remain `oh-my-opencode`. OpenCode plugin registration prefers `oh-my-openagent`, while legacy `oh-my-opencode` entries and config basenames still load during the transition. Config detection checks `oh-my-opencode` before `oh-my-openagent`, so if both plugin config basenames exist in the same directory, the legacy `oh-my-opencode.*` file currently wins. JSONC supports `// line comments`, `/* block comments */`, and trailing commas.