feat: read codex agent definitions

This commit is contained in:
Yoilun
2026-05-25 16:39:35 +08:00
parent c67d5a33ad
commit fee920a895
9 changed files with 383 additions and 9 deletions

View File

@@ -5,17 +5,13 @@ import (
"net/http"
"codex-agent-manager/internal/app"
"codex-agent-manager/internal/server"
)
func main() {
cfg := app.DefaultConfig()
mux := http.NewServeMux()
mux.HandleFunc("/api/health", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
_, _ = w.Write([]byte(`{"status":"ok"}`))
})
fmt.Printf("Codex 智能体管理台监听 http://%s\n", cfg.HTTPAddr)
if err := http.ListenAndServe(cfg.HTTPAddr, mux); err != nil {
if err := http.ListenAndServe(cfg.HTTPAddr, server.New(cfg)); err != nil {
panic(err)
}
}