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
+10
View File
@@ -24,6 +24,7 @@ import (
"github.com/local/glpi-neural-brain/internal/ollama"
"github.com/local/glpi-neural-brain/internal/persist"
"github.com/local/glpi-neural-brain/internal/research"
"github.com/local/glpi-neural-brain/internal/sourceagent"
"github.com/local/glpi-neural-brain/internal/workqueue"
)
@@ -63,6 +64,7 @@ type Engine struct {
Scanner *ingest.KnowledgeScanner
GLPIKB *ingest.GLPIKBSyncer
Persistence *persist.Coordinator
SourceInbox *sourceagent.Store
mu sync.Mutex
stateMu sync.RWMutex
@@ -329,6 +331,9 @@ func (e *Engine) Start(ctx context.Context) {
}
go e.idle(ctx)
e.startAutonomousResearch(ctx)
if e.SourceInbox != nil && e.Cfg.SourceInboxEnabled {
go e.sourceInboxLoop(ctx)
}
}
func (e *Engine) enrichmentScheduler(ctx context.Context) {
@@ -1041,6 +1046,11 @@ func (e *Engine) Status() map[string]any {
}
e.stateMu.RUnlock()
status["autonomous_research"] = e.AutonomousResearchStatus(context.Background())
if e.SourceInbox != nil {
if inbox, err := e.SourceInbox.Stats(context.Background()); err == nil {
status["source_inbox"] = inbox
}
}
return status
}