MCPcopy
hub / github.com/HKUDS/OpenHarness / _write_plugin

Function _write_plugin

scripts/local_system_scenarios.py:68–93  ·  view source on GitHub ↗
(source_root: Path)

Source from the content-addressed store, hash-verified

66
67
68def _write_plugin(source_root: Path) -> Path:
69 plugin_dir = source_root / "fixture-plugin"
70 (plugin_dir / "skills").mkdir(parents=True)
71 (plugin_dir / "plugin.json").write_text(
72 json.dumps({"name": "fixture-plugin", "version": "1.0.0", "description": "Fixture plugin"}),
73 encoding="utf-8",
74 )
75 (plugin_dir / "skills" / "fixture.md").write_text(
76 "# FixtureSkill\nFixture skill content for local scenario.\n",
77 encoding="utf-8",
78 )
79 (plugin_dir / "mcp.json").write_text(
80 json.dumps(
81 {
82 "mcpServers": {
83 "fixture": {
84 "type": "stdio",
85 "command": sys.executable,
86 "args": [str(FIXTURE_SERVER)],
87 }
88 }
89 }
90 ),
91 encoding="utf-8",
92 )
93 return plugin_dir
94
95
96async def _run_mcp_flow(temp_root: Path) -> None:

Callers 2

_run_plugin_flowFunction · 0.70
_run_plugin_command_flowFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected