(self, tmp_path: Path, output_root: Path)
| 950 | assert "color" not in fm |
| 951 | |
| 952 | def test_tool_name_rewriting(self, tmp_path: Path, output_root: Path): |
| 953 | from tools.tests.conftest import _make_agent |
| 954 | |
| 955 | plugin_dir = tmp_path / "demo" |
| 956 | plugin_dir.mkdir() |
| 957 | (plugin_dir / ".claude-plugin").mkdir() |
| 958 | (plugin_dir / ".claude-plugin" / "plugin.json").write_text('{"name": "demo"}') |
| 959 | agent = _make_agent( |
| 960 | plugin_dir, |
| 961 | "tool-user", |
| 962 | "name: tool-user\ndescription: Use when tooling.\ntools: Read, Write, Bash", |
| 963 | "# Tool User\n\nUse the `Read` tool to read and `Bash` to execute.\n", |
| 964 | ) |
| 965 | plugin = PluginSource( |
| 966 | name="demo", dir=plugin_dir, plugin_json={"name": "demo"}, agents=[agent] |
| 967 | ) |
| 968 | CopilotAdapter(output_root=output_root).emit_plugin(plugin) |
| 969 | |
| 970 | content = (output_root / ".copilot" / "agents" / "demo__tool-user.agent.md").read_text() |
| 971 | fm, body = parse_frontmatter(content) |
| 972 | assert fm["tools"] == ["read", "edit", "execute"] |
| 973 | assert "`read`" in body |
| 974 | assert "`execute`" in body |
| 975 | assert "`Read`" not in body |
| 976 | assert "`Bash`" not in body |
| 977 | |
| 978 | def test_model_alias_resolution(self, tmp_path: Path, output_root: Path): |
| 979 | from tools.tests.conftest import _make_agent |
nothing calls this directly
no test coverage detected