MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _old_install

Function _old_install

tests/test_opencode_plugin_refresh.py:71–79  ·  view source on GitHub ↗

Lay down the plugin and the config entry as an older release left them.

(directory: Path, body: str = V1_PLUGIN, entry: bool = True)

Source from the content-addressed store, hash-verified

69
70
71def _old_install(directory: Path, body: str = V1_PLUGIN, entry: bool = True) -> tuple[Path, Path]:
72 """Lay down the plugin and the config entry as an older release left them."""
73 plugin = directory / ".opencode" / "plugins" / "graphify.js"
74 plugin.parent.mkdir(parents=True, exist_ok=True)
75 plugin.write_text(body, encoding="utf-8")
76 config = directory / ".opencode" / "opencode.json"
77 settings = {"model": "some/model", **({"plugin": [ENTRY]} if entry else {})}
78 config.write_text(json.dumps(settings), encoding="utf-8")
79 return plugin, config
80
81
82def test_the_old_plugin_is_what_opencode_2_rejects():

Calls

no outgoing calls

Tested by

no test coverage detected