Skip to content

feat(tools): optionality + refactor#736

Open
afjcjsbx wants to merge 2 commits intosipeed:mainfrom
afjcjsbx:feat/tools-optionality
Open

feat(tools): optionality + refactor#736
afjcjsbx wants to merge 2 commits intosipeed:mainfrom
afjcjsbx:feat/tools-optionality

Conversation

@afjcjsbx
Copy link

📝 Description

This PR addresses several architectural improvements within the tools module.

Key changes include:

  1. One Tool = One File Structure: Split monolithic files (like edit.go or web.go) into separate files for each tool to ensure a clear and maintainable directory structure.
  2. Tools Module Decoupling: Moved tool initialization logic out of the agent's core (pkg/agent/instance.go and pkg/agent/loop.go). Introduced pkg/tools/init.go with SetupWorkspaceTools and SetupSharedTools to handle tool registration independently.
  3. Granular Tool Configuration: Added new configuration flags in config.json (ToolsConfig) to selectively enable/disable specific tool groups (core, filesystem, exec, skills, web, etc.).

🗣️ Type of Change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 📖 Documentation update
  • ⚡ Code refactoring (no functional changes, no api changes)

🤖 AI Code Generation

  • 🤖 Fully AI-generated (100% AI, 0% Human)
  • 🛠️ Mostly AI-generated (AI draft, Human verified/modified)
  • 👨‍💻 Mostly Human-written (Human lead, AI assisted or none)

🔗 Related Issue

Resolves: #634

📚 Technical Context (Skip for Docs)

  • Reference URL: N/A
  • Reasoning: - Separation of Concerns: The agent no longer needs to know how tools are instantiated.
  • Token Optimization & Security: By allowing users to disable infrequently used tools (like hardware/I2C or specific filesystem operations), we significantly reduce the size of the System Prompt injected into the LLM context window, saving tokens and resource saving by not loading into memory unnecessary tools

🧪 Test Environment

🧪 Test Environment

  • Hardware: Apple Silicon (Mac M-series)
  • OS: macOS
  • Model/Provider: Generic (Infrastructure change)
  • Channels: Telegram / All

📸 Evidence (Optional)

Click to view Logs/Screenshots image

☑️ Checklist

  • My code/docs follow the style of this project.
  • I have performed a self-review of my own changes.
  • I have updated the documentation accordingly.

@afjcjsbx afjcjsbx changed the title Feat/tools optionality feat: tools optionality + refactor Feb 24, 2026
@afjcjsbx afjcjsbx changed the title feat: tools optionality + refactor feat(tools): optionality + refactor Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] Refactor the tools system

2 participants