From 63ef4399f8cc6fdbdf1d03d151cd1fe2969cae7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E6=98=8E?= <83812544+Ed1s0nZ@users.noreply.github.com> Date: Tue, 30 Jun 2026 18:00:00 +0800 Subject: [PATCH] Add files via upload --- internal/app/app.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/app/app.go b/internal/app/app.go index d989bd61..7417b294 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -363,6 +363,7 @@ func New(cfg *config.Config, log *logger.Logger, configPath string) (*App, error configHandler := handler.NewConfigHandler(configPath, cfg, mcpServer, executor, agent, attackChainHandler, externalMCPMgr, log.Logger) configHandler.SetAudit(auditSvc) agentHandler.SetHitlToolWhitelistSaver(configHandler) + agentHandler.SetHitlAuditStrategySaver(configHandler) externalMCPHandler := handler.NewExternalMCPHandler(externalMCPMgr, cfg, configPath, log.Logger) externalMCPHandler.SetAudit(auditSvc) roleHandler := handler.NewRoleHandler(cfg, configPath, log.Logger) @@ -812,11 +813,17 @@ func setupRoutes( protected.POST("/eino-agent", agentHandler.EinoSingleAgentLoop) protected.POST("/eino-agent/stream", agentHandler.EinoSingleAgentLoopStream) protected.GET("/hitl/pending", agentHandler.ListHITLPending) + protected.GET("/hitl/logs", agentHandler.ListHITLLogs) + protected.GET("/hitl/logs/:id", agentHandler.GetHITLLog) protected.POST("/hitl/decision", agentHandler.DecideHITLInterrupt) protected.POST("/hitl/dismiss", agentHandler.DismissHITLInterrupt) protected.GET("/hitl/config/:conversationId", agentHandler.GetHITLConversationConfig) protected.PUT("/hitl/config", agentHandler.UpsertHITLConversationConfig) + protected.GET("/hitl/tool-whitelist", agentHandler.GetHITLGlobalToolWhitelist) + protected.PUT("/hitl/tool-whitelist", agentHandler.SetHITLGlobalToolWhitelist) protected.POST("/hitl/tool-whitelist", agentHandler.MergeHITLGlobalToolWhitelist) + protected.GET("/hitl/audit-strategy", agentHandler.GetHITLAuditStrategy) + protected.PUT("/hitl/audit-strategy", agentHandler.UpdateHITLAuditStrategy) // Agent Loop 取消与任务列表 protected.POST("/agent-loop/cancel", agentHandler.CancelAgentLoop) protected.GET("/agent-loop/tasks", agentHandler.ListAgentTasks)