Agent-Mode mit Aufgabenteilung und automatischer Recherche

This commit is contained in:
2026-08-07 21:57:23 +02:00
parent ffee925163
commit adbe69d24d
30 changed files with 2580 additions and 51 deletions
+20 -4
View File
@@ -18,16 +18,18 @@ import (
"github.com/local/glpi-neural-brain/internal/engine"
"github.com/local/glpi-neural-brain/internal/graph"
"github.com/local/glpi-neural-brain/internal/model"
"github.com/local/glpi-neural-brain/internal/sourceagent"
)
//go:embed static/*
var assets embed.FS
type Server struct {
Engine *engine.Engine
Graph *graph.Store
Broker *activity.Broker
APIKey string
Engine *engine.Engine
Graph *graph.Store
Broker *activity.Broker
APIKey string
SourceAgents *sourceagent.Store
}
func (s *Server) Handler() http.Handler {
@@ -55,6 +57,20 @@ func (s *Server) Handler() http.Handler {
mux.HandleFunc("POST /api/glpi-kb/sync", s.handleGLPIKBSync)
mux.HandleFunc("POST /api/flush", s.handleFlush)
mux.HandleFunc("GET /api/state/export", s.handleStateExport)
mux.HandleFunc("GET /api/source-agents", s.handleListSourceAgents)
mux.HandleFunc("POST /api/source-agents", s.handleCreateSourceAgent)
mux.HandleFunc("PATCH /api/source-agents/{id}", s.handlePatchSourceAgent)
mux.HandleFunc("DELETE /api/source-agents/{id}", s.handleDeleteSourceAgent)
mux.HandleFunc("POST /api/source-agents/{id}/rotate-token", s.handleRotateSourceAgentToken)
mux.HandleFunc("GET /api/source-agents/{id}/tasks", s.handleListSourceTasks)
mux.HandleFunc("POST /api/source-agents/{id}/tasks", s.handleCreateSourceTask)
mux.HandleFunc("PUT /api/source-tasks/{id}", s.handleUpdateSourceTask)
mux.HandleFunc("DELETE /api/source-tasks/{id}", s.handleDeleteSourceTask)
mux.HandleFunc("GET /api/source-inbox", s.handleSourceInbox)
mux.HandleFunc("GET /api/source-inbox/status", s.handleSourceInboxStatus)
mux.HandleFunc("GET /api/v1/agent/config", s.handleAgentConfig)
mux.HandleFunc("POST /api/v1/agent/heartbeat", s.handleAgentHeartbeat)
mux.HandleFunc("POST /api/v1/agent/ingest", s.handleAgentIngest)
sub, _ := fs.Sub(assets, "static")
mux.HandleFunc("GET /analysis", func(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/analysis.html", http.StatusTemporaryRedirect)