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.
Files changed (57) hide show
  1. {aru_code-0.13.0/aru_code.egg-info → aru_code-0.13.2}/PKG-INFO +1 -1
  2. aru_code-0.13.2/aru/__init__.py +1 -0
  3. {aru_code-0.13.0 → aru_code-0.13.2}/aru/cli.py +18 -7
  4. {aru_code-0.13.0 → aru_code-0.13.2}/aru/config.py +3 -8
  5. {aru_code-0.13.0 → aru_code-0.13.2}/aru/runtime.py +1 -0
  6. {aru_code-0.13.0 → aru_code-0.13.2}/aru/tools/codebase.py +17 -11
  7. {aru_code-0.13.0 → aru_code-0.13.2/aru_code.egg-info}/PKG-INFO +1 -1
  8. {aru_code-0.13.0 → aru_code-0.13.2}/pyproject.toml +1 -1
  9. aru_code-0.13.0/aru/__init__.py +0 -1
  10. {aru_code-0.13.0 → aru_code-0.13.2}/LICENSE +0 -0
  11. {aru_code-0.13.0 → aru_code-0.13.2}/README.md +0 -0
  12. {aru_code-0.13.0 → aru_code-0.13.2}/aru/agent_factory.py +0 -0
  13. {aru_code-0.13.0 → aru_code-0.13.2}/aru/agents/__init__.py +0 -0
  14. {aru_code-0.13.0 → aru_code-0.13.2}/aru/agents/base.py +0 -0
  15. {aru_code-0.13.0 → aru_code-0.13.2}/aru/agents/executor.py +0 -0
  16. {aru_code-0.13.0 → aru_code-0.13.2}/aru/agents/planner.py +0 -0
  17. {aru_code-0.13.0 → aru_code-0.13.2}/aru/commands.py +0 -0
  18. {aru_code-0.13.0 → aru_code-0.13.2}/aru/completers.py +0 -0
  19. {aru_code-0.13.0 → aru_code-0.13.2}/aru/context.py +0 -0
  20. {aru_code-0.13.0 → aru_code-0.13.2}/aru/display.py +0 -0
  21. {aru_code-0.13.0 → aru_code-0.13.2}/aru/permissions.py +0 -0
  22. {aru_code-0.13.0 → aru_code-0.13.2}/aru/providers.py +0 -0
  23. {aru_code-0.13.0 → aru_code-0.13.2}/aru/runner.py +0 -0
  24. {aru_code-0.13.0 → aru_code-0.13.2}/aru/session.py +0 -0
  25. {aru_code-0.13.0 → aru_code-0.13.2}/aru/tools/__init__.py +0 -0
  26. {aru_code-0.13.0 → aru_code-0.13.2}/aru/tools/ast_tools.py +0 -0
  27. {aru_code-0.13.0 → aru_code-0.13.2}/aru/tools/gitignore.py +0 -0
  28. {aru_code-0.13.0 → aru_code-0.13.2}/aru/tools/mcp_client.py +0 -0
  29. {aru_code-0.13.0 → aru_code-0.13.2}/aru/tools/ranker.py +0 -0
  30. {aru_code-0.13.0 → aru_code-0.13.2}/aru/tools/tasklist.py +0 -0
  31. {aru_code-0.13.0 → aru_code-0.13.2}/aru_code.egg-info/SOURCES.txt +0 -0
  32. {aru_code-0.13.0 → aru_code-0.13.2}/aru_code.egg-info/dependency_links.txt +0 -0
  33. {aru_code-0.13.0 → aru_code-0.13.2}/aru_code.egg-info/entry_points.txt +0 -0
  34. {aru_code-0.13.0 → aru_code-0.13.2}/aru_code.egg-info/requires.txt +0 -0
  35. {aru_code-0.13.0 → aru_code-0.13.2}/aru_code.egg-info/top_level.txt +0 -0
  36. {aru_code-0.13.0 → aru_code-0.13.2}/setup.cfg +0 -0
  37. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_agents_base.py +0 -0
  38. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_ast_tools.py +0 -0
  39. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli.py +0 -0
  40. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli_advanced.py +0 -0
  41. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli_base.py +0 -0
  42. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli_completers.py +0 -0
  43. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli_new.py +0 -0
  44. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli_run_cli.py +0 -0
  45. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli_session.py +0 -0
  46. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_cli_shell.py +0 -0
  47. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_codebase.py +0 -0
  48. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_config.py +0 -0
  49. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_context.py +0 -0
  50. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_executor.py +0 -0
  51. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_gitignore.py +0 -0
  52. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_main.py +0 -0
  53. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_mcp_client.py +0 -0
  54. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_permissions.py +0 -0
  55. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_planner.py +0 -0
  56. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_providers.py +0 -0
  57. {aru_code-0.13.0 → aru_code-0.13.2}/tests/test_ranker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aru-code
3
- Version: 0.13.0
3
+ Version: 0.13.2
4
4
  Summary: A Claude Code clone built with Agno agents
5
5
  Author-email: Estevao <estevaofon@gmail.com>
6
6
  License-Expression: MIT
@@ -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=HTML(
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
- # Include MCP tool catalog (lazy mode lightweight text instead of full schemas)
201
- try:
202
- from aru.runtime import get_ctx
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
 
@@ -117,6 +117,7 @@ class RuntimeContext:
117
117
 
118
118
  # -- MCP --
119
119
  mcp_catalog_text: str = ""
120
+ mcp_loaded_msg: str = ""
120
121
 
121
122
 
122
123
  # ── ContextVar plumbing ──────────────────────────────────────────────
@@ -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().console.print(f"[dim]Loaded {tool_count} tools from MCP servers (eager mode).[/dim]")
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().console.print(f"[dim]Loaded {tool_count} tools from MCP servers.[/dim]")
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().console.print(f"[dim]Failed to load MCP tools: {e}[/dim]")
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
- return await manager.call_tool(tool_name, arguments)
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="Call an external MCP tool by name. See the MCP Tools catalog in your instructions for available tools and their parameters.",
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": "The MCP tool name from the catalog (e.g. 'github__search_repositories')"
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",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aru-code
3
- Version: 0.13.0
3
+ Version: 0.13.2
4
4
  Summary: A Claude Code clone built with Agno agents
5
5
  Author-email: Estevao <estevaofon@gmail.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "aru-code"
7
- version = "0.13.0"
7
+ version = "0.13.2"
8
8
  description = "A Claude Code clone built with Agno agents"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -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