feat(acp): WebSocket session handler (history + live + ping/pong + owner-only prompt/cancel)

This commit is contained in:
2026-05-07 17:08:09 +08:00
parent 72cd353757
commit f5f048083a
5 changed files with 196 additions and 4 deletions
+5 -1
View File
@@ -327,7 +327,11 @@ func New(ctx context.Context, cfg *config.Config, dist embed.FS) (*App, error) {
MaxActivePerUser: cfg.Acp.MaxActivePerUser,
},
)
acp.NewHandler(akSvc, sessSvc, acpSup, acpRepo, userSvc, userAdminAdapter{svc: userSvc}, enc).Mount(r)
acp.NewHandler(akSvc, sessSvc, acpSup, acpRepo, userSvc, userAdminAdapter{svc: userSvc}, enc, acp.WSConfig{
PingInterval: cfg.Acp.WSPingInterval,
PongTimeout: cfg.Acp.WSPongTimeout,
SendBuffer: cfg.Acp.WSSendBuffer,
}).Mount(r)
// ===== jobs module wiring =====
jobsRepo := jobs.NewPostgresRepository(pool)