From cb12256558c6ceb00a339b5e2382233eb1ea1b99 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 24 Jun 2026 18:02:07 +0000 Subject: [PATCH 1/3] Initial plan From 15f5cfedfa2b74582dd78aef4921e1260688dfb3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 24 Jun 2026 18:07:18 +0000 Subject: [PATCH 2/3] fix: skills_paths accepts str | Path | Sequence[str | Path] | None --- .../core/agent_framework/_harness/_agent.py | 10 +++--- .../core/tests/core/test_harness_agent.py | 36 +++++++++++++++++++ 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/python/packages/core/agent_framework/_harness/_agent.py b/python/packages/core/agent_framework/_harness/_agent.py index 87280a9fcca..bef4b99222d 100644 --- a/python/packages/core/agent_framework/_harness/_agent.py +++ b/python/packages/core/agent_framework/_harness/_agent.py @@ -173,7 +173,7 @@ def _assemble_context_providers( if skills_provider: providers.append(skills_provider) if skills_paths: - providers.append(SkillsProvider.from_paths(*skills_paths)) + providers.append(SkillsProvider.from_paths(skills_paths)) # Background agents are opt-in: only added when agents are provided. if background_agents: @@ -263,7 +263,7 @@ def create_harness_agent( disable_file_access: bool = False, file_access_store: AgentFileStore | None = None, skills_provider: SkillsProvider | None = None, - skills_paths: Sequence[str] | None = None, + skills_paths: str | Path | Sequence[str | Path] | None = None, background_agents: Sequence[SupportsAgentRun] | None = None, background_agents_instructions: str | None = None, shell_executor: ShellExecutor | None = None, @@ -377,8 +377,10 @@ def create_harness_agent( skills_provider: Custom SkillsProvider instance for code-defined skills. Can be combined with ``skills_paths`` to aggregate file and code-based skills. skills_paths: Paths for file-based skill discovery (looks for SKILL.md files). - Can be combined with ``skills_provider``. When neither ``skills_provider`` - nor ``skills_paths`` is provided, no SkillsProvider is added. + Accepts a single ``str`` or :class:`~pathlib.Path`, or a sequence of + ``str | Path``. Can be combined with ``skills_provider``. When neither + ``skills_provider`` nor ``skills_paths`` is provided, no SkillsProvider + is added. background_agents: Collection of agents available for background task delegation. When provided, a ``BackgroundAgentsProvider`` is automatically included, enabling the agent to start, monitor, and retrieve results from background tasks. diff --git a/python/packages/core/tests/core/test_harness_agent.py b/python/packages/core/tests/core/test_harness_agent.py index 8213df5888c..c55a9fd7d4b 100644 --- a/python/packages/core/tests/core/test_harness_agent.py +++ b/python/packages/core/tests/core/test_harness_agent.py @@ -202,6 +202,42 @@ def test_create_harness_agent_skills_paths_adds_provider() -> None: assert SkillsProvider in provider_types +def test_create_harness_agent_skills_paths_single_str() -> None: + """skills_paths should accept a single str (not wrapped in a list).""" + agent = create_harness_agent( + client=_FakeChatClient(), + max_context_window_tokens=128_000, + max_output_tokens=16_384, + skills_paths="./test-skills", + ) + provider_types = [type(p) for p in agent.context_providers] + assert SkillsProvider in provider_types + + +def test_create_harness_agent_skills_paths_single_path(tmp_path: Path) -> None: + """skills_paths should accept a single pathlib.Path (not wrapped in a list).""" + agent = create_harness_agent( + client=_FakeChatClient(), + max_context_window_tokens=128_000, + max_output_tokens=16_384, + skills_paths=tmp_path, + ) + provider_types = [type(p) for p in agent.context_providers] + assert SkillsProvider in provider_types + + +def test_create_harness_agent_skills_paths_sequence_of_paths(tmp_path: Path) -> None: + """skills_paths should accept a sequence of pathlib.Path objects.""" + agent = create_harness_agent( + client=_FakeChatClient(), + max_context_window_tokens=128_000, + max_output_tokens=16_384, + skills_paths=[tmp_path, tmp_path / "sub"], + ) + provider_types = [type(p) for p in agent.context_providers] + assert SkillsProvider in provider_types + + def test_create_harness_agent_disable_compaction() -> None: """disable_compaction=True should exclude CompactionProvider.""" agent = create_harness_agent( From 1b91748b88c350d6452b9ff15c1c3b05238a183b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 24 Jun 2026 18:33:54 +0000 Subject: [PATCH 3/3] fix: update _assemble_context_providers skills_paths annotation to match public signature --- python/packages/core/agent_framework/_harness/_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/packages/core/agent_framework/_harness/_agent.py b/python/packages/core/agent_framework/_harness/_agent.py index bef4b99222d..23275f0d10d 100644 --- a/python/packages/core/agent_framework/_harness/_agent.py +++ b/python/packages/core/agent_framework/_harness/_agent.py @@ -135,7 +135,7 @@ def _assemble_context_providers( disable_file_access: bool, file_access_store: AgentFileStore | None, skills_provider: SkillsProvider | None, - skills_paths: Sequence[str] | None, + skills_paths: str | Path | Sequence[str | Path] | None, background_agents: Sequence[SupportsAgentRun] | None, background_agents_instructions: str | None, shell_context_provider: ContextProvider | None,