aru-code 0.13.0__tar.gz → 0.13.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aru_code-0.13.0/aru_code.egg-info → aru_code-0.13.2}/PKG-INFO +1 -1
- aru_code-0.13.2/aru/__init__.py +1 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/cli.py +18 -7
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/config.py +3 -8
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/runtime.py +1 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/tools/codebase.py +17 -11
- {aru_code-0.13.0 → aru_code-0.13.2/aru_code.egg-info}/PKG-INFO +1 -1
- {aru_code-0.13.0 → aru_code-0.13.2}/pyproject.toml +1 -1
- aru_code-0.13.0/aru/__init__.py +0 -1
- {aru_code-0.13.0 → aru_code-0.13.2}/LICENSE +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/README.md +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/agent_factory.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/agents/__init__.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/agents/base.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/agents/executor.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/agents/planner.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/commands.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/completers.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/context.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/display.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/permissions.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/providers.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/runner.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/session.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/tools/__init__.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/tools/ast_tools.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/tools/gitignore.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/tools/mcp_client.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/tools/ranker.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru/tools/tasklist.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru_code.egg-info/SOURCES.txt +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru_code.egg-info/dependency_links.txt +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru_code.egg-info/entry_points.txt +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru_code.egg-info/requires.txt +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/aru_code.egg-info/top_level.txt +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/setup.cfg +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_agents_base.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_ast_tools.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli_advanced.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli_base.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli_completers.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli_new.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli_run_cli.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli_session.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli_shell.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_codebase.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_config.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_context.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_executor.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_gitignore.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_main.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_mcp_client.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_permissions.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_planner.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_providers.py +0 -0
- {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_ranker.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.13.2"
|
|
@@ -214,18 +214,29 @@ async def run_cli(skip_permissions: bool = False, resume_id: str | None = None):
|
|
|
214
214
|
_render_input_separator()
|
|
215
215
|
model_tb = session.model_display
|
|
216
216
|
from prompt_toolkit.formatted_text import HTML
|
|
217
|
+
|
|
218
|
+
def _bottom_toolbar():
|
|
219
|
+
mcp_part = ""
|
|
220
|
+
if ctx.mcp_loaded_msg:
|
|
221
|
+
mcp_part = (
|
|
222
|
+
f' <style fg="ansigray">│</style>'
|
|
223
|
+
f' <style fg="ansigray">{ctx.mcp_loaded_msg}</style>'
|
|
224
|
+
)
|
|
225
|
+
return HTML(
|
|
226
|
+
f' <style fg="ansigray">{model_tb}</style>'
|
|
227
|
+
f' <style fg="ansigray">│</style>'
|
|
228
|
+
f' <style fg="ansigray">/help</style>'
|
|
229
|
+
f' <style fg="ansigray">│</style>'
|
|
230
|
+
f' <style fg="ansigray">Esc+Enter newline</style>'
|
|
231
|
+
f'{mcp_part}'
|
|
232
|
+
)
|
|
233
|
+
|
|
217
234
|
user_text = (
|
|
218
235
|
await asyncio.to_thread(
|
|
219
236
|
prompt_session.prompt,
|
|
220
237
|
HTML('<b><ansigreen>❯</ansigreen></b> '),
|
|
221
238
|
multiline=False,
|
|
222
|
-
bottom_toolbar=
|
|
223
|
-
f' <style fg="ansigray">{model_tb}</style>'
|
|
224
|
-
f' <style fg="ansigray">│</style>'
|
|
225
|
-
f' <style fg="ansigray">/help</style>'
|
|
226
|
-
f' <style fg="ansigray">│</style>'
|
|
227
|
-
f' <style fg="ansigray">Esc+Enter newline</style>'
|
|
228
|
-
),
|
|
239
|
+
bottom_toolbar=_bottom_toolbar,
|
|
229
240
|
)
|
|
230
241
|
).strip()
|
|
231
242
|
_render_input_separator()
|
|
@@ -197,14 +197,9 @@ class AgentConfig:
|
|
|
197
197
|
lines.append(f"- `/{name}{hint}`: {skill.description}")
|
|
198
198
|
parts.append("\n".join(lines))
|
|
199
199
|
|
|
200
|
-
#
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
catalog_text = get_ctx().mcp_catalog_text
|
|
204
|
-
if catalog_text and not lightweight:
|
|
205
|
-
parts.append(catalog_text)
|
|
206
|
-
except LookupError:
|
|
207
|
-
pass
|
|
200
|
+
# MCP tool catalog is NOT included in the system prompt to save ~1-1.5K
|
|
201
|
+
# tokens per turn. The model discovers available tools on-demand when it
|
|
202
|
+
# calls use_mcp_tool — the gateway returns the catalog on first use.
|
|
208
203
|
|
|
209
204
|
return "\n\n".join(parts)
|
|
210
205
|
|
|
@@ -1232,7 +1232,7 @@ async def load_mcp_tools(eager: bool = False):
|
|
|
1232
1232
|
if eager:
|
|
1233
1233
|
# Legacy: each MCP tool = one Agno Function (expensive)
|
|
1234
1234
|
mcp_tools = manager.get_eager_tools()
|
|
1235
|
-
get_ctx().
|
|
1235
|
+
get_ctx().mcp_loaded_msg = f"Loaded {tool_count} tools from MCP servers (eager mode)."
|
|
1236
1236
|
for t in mcp_tools:
|
|
1237
1237
|
ALL_TOOLS.append(t)
|
|
1238
1238
|
EXECUTOR_TOOLS.append(t)
|
|
@@ -1245,10 +1245,10 @@ async def load_mcp_tools(eager: bool = False):
|
|
|
1245
1245
|
GENERAL_TOOLS.append(gateway)
|
|
1246
1246
|
# Store catalog text for injection into system prompt
|
|
1247
1247
|
get_ctx().mcp_catalog_text = manager.get_catalog_text()
|
|
1248
|
-
get_ctx().
|
|
1248
|
+
get_ctx().mcp_loaded_msg = f"Loaded {tool_count} tools from MCP servers."
|
|
1249
1249
|
|
|
1250
1250
|
except Exception as e:
|
|
1251
|
-
get_ctx().
|
|
1251
|
+
get_ctx().mcp_loaded_msg = f"Failed to load MCP tools: {e}"
|
|
1252
1252
|
|
|
1253
1253
|
|
|
1254
1254
|
def _build_mcp_gateway(manager):
|
|
@@ -1256,26 +1256,32 @@ def _build_mcp_gateway(manager):
|
|
|
1256
1256
|
from agno.tools import Function
|
|
1257
1257
|
|
|
1258
1258
|
async def use_mcp_tool(tool_name: str, arguments: dict | None = None) -> str:
|
|
1259
|
-
"""Call an external MCP tool by name.
|
|
1260
|
-
|
|
1261
|
-
Use this to invoke any tool from the MCP Tools catalog listed in your instructions.
|
|
1262
|
-
Pass the exact tool name and its arguments as a JSON object.
|
|
1259
|
+
"""Call an external MCP tool by name, or pass tool_name="list" to see all available tools.
|
|
1263
1260
|
|
|
1264
1261
|
Args:
|
|
1265
|
-
tool_name: The MCP tool name (e.g. "github__search_repositories").
|
|
1262
|
+
tool_name: The MCP tool name (e.g. "github__search_repositories"), or "list" to see the catalog.
|
|
1266
1263
|
arguments: The arguments to pass to the tool as key-value pairs.
|
|
1267
1264
|
"""
|
|
1268
|
-
|
|
1265
|
+
if tool_name == "list":
|
|
1266
|
+
return manager.get_catalog_text() or "No MCP tools available."
|
|
1267
|
+
result = await manager.call_tool(tool_name, arguments)
|
|
1268
|
+
# If the tool was not found, append the catalog so the model can self-correct
|
|
1269
|
+
if result.startswith("Error: Unknown MCP tool"):
|
|
1270
|
+
result += "\n\n" + (manager.get_catalog_text() or "")
|
|
1271
|
+
return result
|
|
1269
1272
|
|
|
1273
|
+
# Include server names in description so the model knows what's available
|
|
1274
|
+
servers = sorted(set(e.server_name for e in manager.catalog.values()))
|
|
1275
|
+
server_list = ", ".join(servers) if servers else "none"
|
|
1270
1276
|
return Function(
|
|
1271
1277
|
name="use_mcp_tool",
|
|
1272
|
-
description=
|
|
1278
|
+
description=f'Call an external MCP tool by name. Available servers: {server_list}. Pass tool_name="list" to discover all tools and their parameters.',
|
|
1273
1279
|
parameters={
|
|
1274
1280
|
"type": "object",
|
|
1275
1281
|
"properties": {
|
|
1276
1282
|
"tool_name": {
|
|
1277
1283
|
"type": "string",
|
|
1278
|
-
"description":
|
|
1284
|
+
"description": 'MCP tool name (e.g. "github__search_repositories") or "list" to see all available tools'
|
|
1279
1285
|
},
|
|
1280
1286
|
"arguments": {
|
|
1281
1287
|
"type": "object",
|
aru_code-0.13.0/aru/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.13.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|