2374 Tun 1ad5 Wrap Tools As Tinyagent Agenttool E4bbcd88

Summary

tools-only Updated 7 repo stars

File contents

Summary

Removed the pydantic-ai ModelRetry bridge from the tool layer and added a tinyAgent adapter that exposes TunaCode tools as tinyagent.AgentTool instances with the fixed execute(tool_call_id, args, signal, on_update) signature.

Changes

  • src/tunacode/tools/decorators.py

    • ToolRetryError now passes through (no conversion to pydantic_ai.ModelRetry).
    • file_tool converts FileNotFoundError to ToolRetryError instead of ModelRetry.
    • Added to_tinyagent_tool() to emit tinyagent.AgentTool objects.
    • Added best-effort OpenAI-function JSON schema generation from tool signatures.
  • src/tunacode/core/agents/agent_components/tool_executor.py

    • ToolRetryError is now treated as non-retryable by the automatic tool retry loop.
  • Tests

    • Updated decorator/path-validation/retry tests to assert ToolRetryError instead of ModelRetry.
    • Added unit tests for to_tinyagent_tool().

Behavioral Impact

  • Tool retry hints are now represented as ToolRetryError all the way up to the agent loop.
  • Tools can be registered into tinyAgent without additional per-tool wrappers.

Related Cards

  • [[tun-1658-tinyagent-migration]]

tools-only/X-Skills/tree/main/development/2374-tun-1ad5-wrap-tools-as-tinyagent-agenttool_e4bbcd88 commit d4dfbefc7b

Frequently asked questions

npx skillmds@latest add tools-only/2374-tun-1ad5-wrap-tools-as-tinyagent-agenttool-e4bbcd88