diff --git a/backend/internal/api/handlers/agent_install.go b/backend/internal/api/handlers/agent_install.go index 78957fa..762d6db 100644 --- a/backend/internal/api/handlers/agent_install.go +++ b/backend/internal/api/handlers/agent_install.go @@ -419,7 +419,7 @@ func (h *AgentInstallHandler) BatchUpgradeAgent(c *gin.Context) { // 下载新二进制 + 重启服务 upgradeScript := fmt.Sprintf( - `curl -fsSL -o /tmp/aiops-agent %s/agent/bin/%s && chmod +x /tmp/aiops-agent && systemctl stop aiops-agent 2>/dev/null; mv /tmp/aiops-agent /usr/local/bin/aiops-agent && systemctl start aiops-agent && echo "UPGRADE_OK"`, + `curl -fsSL -o /tmp/aiops-agent %s/api/agent/bin/%s && chmod +x /tmp/aiops-agent && systemctl stop aiops-agent 2>/dev/null; mv /tmp/aiops-agent /usr/local/bin/aiops-agent && systemctl start aiops-agent && echo "UPGRADE_OK"`, serverURL, binaryFile, ) diff --git a/backend/internal/api/routes/routes.go b/backend/internal/api/routes/routes.go index 6f67a8a..a3d8292 100644 --- a/backend/internal/api/routes/routes.go +++ b/backend/internal/api/routes/routes.go @@ -459,7 +459,7 @@ func Register(r *gin.Engine, db *gorm.DB, log *zap.Logger, cfg *config.Config, c } // Agent 二进制下载(无需鉴权,Agent 升级时使用) - r.Static("/agent/bin", "/app/agent/bin") + r.Static("/api/agent/bin", "/app/agent/bin") // AI 智能助手 - LLM 配置 + 对话代理(OpenAI 兼容) // Logan.Li llmHandler := handlers.NewLLMHandler(db)