| 183 | return result |
| 184 | |
| 185 | def emit_global(self, plugins: list[PluginSource]) -> EmitResult: |
| 186 | result = EmitResult() |
| 187 | # Minimal opencode.json pointing at .opencode/ |
| 188 | # NOTE: only `$schema` is accepted as an extension key — OpenCode rejects others. |
| 189 | config = { |
| 190 | "$schema": "https://opencode.ai/config.json", |
| 191 | } |
| 192 | result.written.append(self.write("opencode.json", json.dumps(config, indent=2) + "\n")) |
| 193 | return result |
| 194 | |
| 195 | # ── Internals ────────────────────────────────────────────────────────── |
| 196 | |