MCPcopy Index your code
hub / github.com/wshobson/agents / emit_global

Method emit_global

tools/adapters/opencode.py:185–193  ·  view source on GitHub ↗
(self, plugins: list[PluginSource])

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 2

EmitResultClass · 0.90
writeMethod · 0.80

Tested by 1