feat(app): wire ACP AgentKindService + handler

This commit is contained in:
2026-05-07 11:41:14 +08:00
parent 8202a7a679
commit e97541030a
+6
View File
@@ -29,6 +29,7 @@ import (
"time"
"github.com/google/uuid"
"github.com/yan1h/agent-coding-workflow/internal/acp"
"github.com/yan1h/agent-coding-workflow/internal/audit"
"github.com/yan1h/agent-coding-workflow/internal/chat"
"github.com/yan1h/agent-coding-workflow/internal/config"
@@ -249,6 +250,11 @@ func New(ctx context.Context, cfg *config.Config, dist embed.FS) (*App, error) {
chat.NewHandler(chatConvSvc, chatMsgSvc, chatTplSvc, chatEpSvc, chatUsageSvc,
chatUploader, userSvc, userAdminAdapter{svc: userSvc}).Mount(r)
// ===== ACP module wiring (Part 1: agent_kinds only) =====
acpRepo := acp.NewPostgresRepository(pool)
akSvc := acp.NewAgentKindService(acpRepo, enc, auditRec)
acp.NewHandler(akSvc, userSvc, userAdminAdapter{svc: userSvc}, enc).Mount(r)
// ===== jobs module wiring =====
jobsRepo := jobs.NewPostgresRepository(pool)