Remove Router component and refactor MainAgent to handle skills/services directly#144
Merged
talos-agent merged 1 commit intomainfrom Jul 31, 2025
Merged
Conversation
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…ces directly - Remove Router class and all imports - Update MainAgent to store skills and services directly - Refactor _setup_router to _setup_skills_and_services - Update CLI and daemon to not instantiate Router - Fix all test files to remove Router references - Update documentation to reflect new architecture - All tests passing, lint and type checks clean Co-Authored-By: talosgma@gmail.com <talosgma@gmail.com>
41a7983 to
93cf3e7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove Router component and refactor MainAgent to handle skills/services directly
Summary
This PR completely removes the
Routercomponent from the Talos codebase and refactorsMainAgentto manage skills and services directly. The Router was acting as an intermediary layer that is no longer needed - MainAgent now stores skills and services as direct attributes and accesses them through simple iteration patterns.Key changes:
src/talos/core/router.pyentirelyMainAgentto storeself.skillsandself.servicesdirectlyself.router.skillstoself.skillsReview & Testing Checklist for Human
uv run talos) and verify that skills and services work correctly in interactive modetalos daemon) to ensure background operation works without Router_build_context) correctly aggregates tickets from all skillsgrep -r "Router\|router" src/to double-check no code references remainRecommended test plan:
Diagram
%%{ init : { "theme" : "default" }}%% graph TD MainAgent["src/talos/core/main_agent.py<br/>MainAgent class"]:::major-edit RouterFile["src/talos/core/router.py<br/>(DELETED)"]:::deleted CLIMain["src/talos/cli/main.py"]:::minor-edit CLIDaemon["src/talos/cli/daemon.py"]:::minor-edit TestMain["tests/test_main_agent.py"]:::minor-edit TestPrompt["tests/test_prompt_concatenation.py"]:::minor-edit MainAgent -->|"removed router field"| RouterFile MainAgent -->|"added skills/services fields"| MainAgent CLIMain -->|"removed Router() instantiation"| MainAgent CLIDaemon -->|"removed Router() instantiation"| MainAgent TestMain -->|"updated assertions"| MainAgent TestPrompt -->|"removed Router import"| MainAgent subgraph Legend L1[Major Edit]:::major-edit L2[Minor Edit]:::minor-edit L3[Deleted]:::deleted end classDef major-edit fill:#90EE90 classDef minor-edit fill:#ADD8E6 classDef deleted fill:#FFB6C1Notes
ruff), type checks (mypy), and unit tests (pytest) pass successfullySession details: