refactor: extract domain logic out of agent-types-settings HTTP handler #1136
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/agent-hooks#1136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As a developer working on agent configuration, I want the business logic for revision auditing, scope validation, and agent_type CRUD to live in the domain layer, so that the HTTP handler is a thin routing layer and the logic is testable in isolation.
Handler
apps/server/src/http/handlers/agent-types-settings.ts(1737 lines) currently owns: revision auditing, scope validation, agent_type table CRUD, and provider chain parsingdomain/agent-type/agent-type-service.ts)Domain
createAgentType,updateAgentType,deleteAgentType,reorderProviderChain, etc.Tests
Out of scope
agent-types-settings.ts, now ~100 lines)References
apps/server/src/http/handlers/agent-types-settings.ts(1737 lines)🦵 @charles kicked the queue — re-running implement on @code-lead.