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:
Fimeg
2025-11-10 22:15:03 -05:00
parent 4531ca34c5
commit 52c9c1a45b
4 changed files with 320 additions and 0 deletions

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {