feat(#741): Delete AgentType class (Phases 4-5)#750
Merged
Conversation
Phase 4: Remove the AgentType class entirely. Contexts replace it. - Delete inc/Engine/AI/AgentType.php (constants PIPELINE/CHAT/SYSTEM/ALL, getAll(), isValid(), getLogFilename() — all dead after log modernization) - Replace AgentType::CHAT with 'chat' string literal (ChatOrchestrator, Chat DB, Chat REST API, CreateChatSessionAbility) - Replace AgentType::PIPELINE with 'pipeline' string literal (AIStep) - Replace AgentType::isValid() with inline in_array() check (Chat REST API) - Remove unused AgentType imports from SystemAbilities and test file - PluginSettings::getAgentTypes() retained — independent utility method - Deprecated shims (ToolExecutor::getAvailableTools, ToolManager:: getAvailableToolsForChat) retained for one more release cycle Zero behavioral changes. 785 tests pass, 0 failures.
Homeboy Results —
|
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.
Summary
Final phases of #741 — delete the
AgentTypeclass entirely. Contexts replace it.What changed
inc/Engine/AI/AgentType.php— the class had 3 string constants (PIPELINE,CHAT,SYSTEM), agetAll()registry,isValid()validator, and a deadgetLogFilename()method (logging moved to DB in feat(#746): Modernize DM Logging — Replace Monolog with Database-Backed Logs #747)AgentType::CHAT→'chat'andAgentType::PIPELINE→'pipeline'string literals across 7 filesAgentType::isValid()with inlinein_array()check in Chat REST API parameter validationAgentTypeimports from SystemAbilities and test fileWhat stays
PluginSettings::getAgentTypes()— independent utility method for settings UI, not tied to AgentType classToolExecutor::getAvailableTools,ToolManager::getAvailableToolsForChat) — kept one more release cycle, tested by backward compat testsagent_typecolumn in chat sessions table — values stay as string literals ('chat','pipeline','system')Testing
Files changed (8 files, +26/-105)
AgentType.php— deletedChatOrchestrator.php— removed import,'chat'literalsChat.php(DB) — 11 FQN references →'chat'literalsChat.php(REST API) — removed import, inline validationCreateChatSessionAbility.php— removed import,'chat'literalAIStep.php— removed import,'pipeline'literalSystemAbilities.php— removed unused importSystemAbilitiesTest.php— removed import,'chat'literalCompletes #741 (all 5 phases done)