first commit

This commit is contained in:
2026-08-14 23:41:57 +08:00
commit 086803a8dd
471 changed files with 91938 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
package server
import (
"regexp"
"agent/internal/agent"
)
// Server 持有全部依赖,各 handler 文件通过它访问共享状态。
type Server struct {
cfg agent.Config
store *agent.SessionStore
agent *agent.Agent
dockerCfg *agent.DockerConfigStore
apiCfg *agent.APIConfigStore
}
// sessionIDPattern 匹配会话直达路径 / WebSocket 绑定的会话 ID 格式(24 位十六进制)。
var sessionIDPattern = regexp.MustCompile(`^[0-9a-f]{24}$`)