refactor: add AgentLifecycleService for unified agent operations
Created centralized lifecycle service to handle new, upgrade, and rebuild operations. Added deprecation notices to old handlers (agent_setup, build_orchestrator, agent_build). Foundation for consolidating duplicate agent lifecycle logic.
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// BuildAgent handles the agent build endpoint
|
||||
// Deprecated: Use AgentHandler.Rebuild instead
|
||||
func BuildAgent(c *gin.Context) {
|
||||
var req services.AgentSetupRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
)
|
||||
|
||||
// SetupAgent handles the agent setup endpoint
|
||||
// Deprecated: Use AgentHandler.Setup instead
|
||||
func SetupAgent(c *gin.Context) {
|
||||
var req services.AgentSetupRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
)
|
||||
|
||||
// NewAgentBuild handles new agent installation requests
|
||||
// Deprecated: Use AgentHandler.Upgrade instead
|
||||
func NewAgentBuild(c *gin.Context) {
|
||||
var req services.NewBuildRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user