refactor(agents): migrate deprecated sync loader functions to non-deprecated alternatives#1083
Merged
zbigniewsobiecki merged 1 commit intodevfrom Apr 4, 2026
Merged
Conversation
…recated alternatives
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
nhopeatall
approved these changes
Apr 4, 2026
Collaborator
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
LGTM — Clean mechanical rename that removes deprecated sync loader functions, replaces them with clearly-named loadBuiltinDefinition / getBuiltinAgentTypes helpers, and correctly converts getDefaultTaskPrompt to async. All callers are updated, tests pass, and zero deprecated references remain in the codebase.
Code Issues
Nitpick
- src/agents/definitions/loader.ts:80 — The JSDoc for
isBuiltinAgentTypestill says "to avoid repeated deprecated-function calls" but the function it wraps (getBuiltinAgentTypes()) is no longer deprecated. The phrasing is a leftover from when it wrapped the deprecatedgetKnownAgentTypes(). Consider updating to e.g. "WrapsgetBuiltinAgentTypes().includes()for convenience at each call site."
🕵️ claude-code · claude-opus-4-6 · run details
5 tasks
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
Migrates away from deprecated
loadAgentDefinition(),getKnownAgentTypes(), andloadAllAgentDefinitions()functions insrc/agents/definitions/loader.ts.loadBuiltinDefinition()andgetBuiltinAgentTypes()— non-deprecated sync YAML-only helpers for legitimate sync contexts (seed scripts, reset operations, internal fallbacks)getDefaultTaskPrompt()toasync, usingresolveAgentDefinition()instead of the deprecated sync loaderloadAgentDefinition(),getKnownAgentTypes(), andloadAllAgentDefinitions()entirelyFiles Changed
src/agents/definitions/loader.ts— AddedloadBuiltinDefinition/getBuiltinAgentTypes; deprecated functions removedsrc/agents/definitions/index.ts— Updated barrel exportssrc/agents/prompts/index.ts— MadegetDefaultTaskPromptasync, usesresolveAgentDefinitionsrc/api/routers/agentDefinitions.ts— Migrated to new sync helpers, removed// Intentional:commentssrc/api/routers/agentTriggerConfigs.ts— Migrated to new sync helperssrc/db/seeds/seedAgentDefinitions.ts— Migrated to new sync helperssrc/api/routers/agentConfigs.ts— AwaitsgetDefaultTaskPromptTest plan
npm run typecheck)npm test)npm run lint:fix)src/confirmed with grepKey decisions
isBuiltinAgentType()(not deprecated) — already calledgetKnownAgentTypes()internally, now updated to callgetBuiltinAgentTypes()getDefaultTaskPromptsignature change (sync → async) is the only breaking API change; the single caller inagentConfigs.tswas updated toawaitthe resultTrello card: https://trello.com/c/69ce1cabafca047d2501437e
🤖 Generated with Claude Code
🕵️ claude-code · claude-sonnet-4-6 · run details