Port dataset nav and structure graph fixes to Go, merge agents list (#18183)

Fix compilation template config validation for JSONMap; merge template groups into agents list ordered by category/name; install nav service in ingestor; write readable nav cluster/doc names and emit nav_doc leaves;
port tree-to-graph projection and full document structure graph endpoint parity.
This commit is contained in:
Zhichang Yu
2026-08-12 22:46:24 +08:00
committed by GitHub
parent b505437db5
commit 6677f14bdf
19 changed files with 2696 additions and 176 deletions

View File

@@ -569,6 +569,14 @@ func runIngestor(ctx context.Context, cancel context.CancelFunc, args *serverArg
globalConfig.GetDefaultChatModel().Name,
globalConfig.GetDefaultEmbeddingModel().Name,
)
// The dataset-level knowledge-compile consumer (tree/structure products) upserts
// into the dataset-nav tree, so the Ingestor must install the same ES-backed
// NavService the API server installs. Without this, nav.GetNavService() returns
// nil and tree/structure products are dropped (the consumer logs "nav service
// unavailable, skipping dataset-nav upsert"), leaving the dataset tree empty.
// The embedder resolves the tenant's embedding model on demand, so both
// Search and UpsertDoc can embed queries/summaries automatically.
nav.SetNavService(nlp.NewNavService(service.NewNavEmbedder(service.NewModelProviderService(), "")))
// Memory extraction runs on the Ingestor's shared NATS consumer + worker
// pool (task_type="memory" dispatched by processMessage -> executeMemoryTask),
// so there is no longer a dedicated Redis memory consumer to start.