Skip to content

Commit bfa0a5d

Browse files
committed
Fix Windows path assertion + correct stale Tavily/demo-tools comments
- test_default_servers_curated_set_and_filesystem_root hardcoded a forward-slash path, which fails on Windows where str(Path(...)) uses backslashes; compare against str(root) instead. The production code (a native path for the filesystem MCP server) was already correct. - Update three docstrings/comments in the live agent that still referenced TAVILY_API_KEY / --demo-tools after the switch to Firecrawl and default-loaded tools (flagged by review). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S2tt5oaMXD2RCVoAqGbqyR
1 parent 7079cef commit bfa0a5d

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

aai_cli/agent_cascade/brain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def _tool_capabilities(tools: Sequence[BaseTool]) -> list[str]:
6060
"""The spoken-capability phrases backed by an actually-present tool.
6161
6262
Derived from the resolved tool names so the prompt never advertises a capability the
63-
agent can't perform: web search is present only with a ``TAVILY_API_KEY``, and the docs
64-
tools are best-effort (absent when the docs host is unreachable).
63+
agent can't perform: web search is present only with a ``FIRECRAWL_API_KEY``, and the
64+
docs tools are best-effort (absent when the docs host is unreachable).
6565
"""
6666
names = {tool.name for tool in tools}
6767
capabilities: list[str] = []
@@ -94,7 +94,7 @@ def build_system_prompt(
9494
9595
The guidance is tailored to the bound tools so the model is only told about
9696
capabilities it actually has — advertising a missing tool (web search without a
97-
``TAVILY_API_KEY``) made the agent announce an action it then couldn't take, leaving
97+
``FIRECRAWL_API_KEY``) made the agent announce an action it then couldn't take, leaving
9898
the turn hanging with no answer. ``tools`` are the built-in legs (web search, URL
9999
fetch, AssemblyAI docs); ``extra_tools`` are user-configured MCP tools, advertised
100100
generically by name. With no tools at all the model answers from its own knowledge.

aai_cli/agent_cascade/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ class CascadeConfig:
4444
# Extra streaming-TTS query params (the --tts-config escape hatch).
4545
tts_extra: Mapping[str, str] = field(default_factory=dict[str, str])
4646
# MCP servers (name -> launch spec) whose tools the deepagents brain can call. Empty
47-
# by default; populated from --mcp-config files and/or the --demo-tools curated set.
47+
# here by default; the live command populates it with the curated default set plus any
48+
# --mcp-config files.
4849
mcp_servers: Mapping[str, Mapping[str, object]] = field(
4950
default_factory=dict[str, Mapping[str, object]]
5051
)

tests/test_agent_cascade_mcp.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,18 @@
2020

2121

2222
def test_default_servers_curated_set_and_filesystem_root():
23-
servers = mcp_tools.default_servers(Path("/notes/dir"))
23+
root = Path("/notes/dir")
24+
servers = mcp_tools.default_servers(root)
2425
# The five curated, no-auth servers, each with a real launch command.
2526
assert set(servers) == {"time", "fetch", "memory", "filesystem", "weather"}
2627
assert servers["time"] == {"command": "uvx", "args": ["mcp-server-time"]}
2728
assert servers["memory"]["args"] == ["-y", "@modelcontextprotocol/server-memory"]
28-
# The filesystem server is scoped to the passed-in root directory.
29+
# The filesystem server is scoped to the passed-in root directory. Compare against
30+
# str(root), not a hardcoded "/notes/dir", so it holds on Windows (backslash paths).
2931
assert servers["filesystem"]["args"] == [
3032
"-y",
3133
"@modelcontextprotocol/server-filesystem",
32-
"/notes/dir",
34+
str(root),
3335
]
3436

3537

0 commit comments

Comments
 (0)