Update nexus wiki content

This commit is contained in:
2026-05-03 05:42:06 +08:00
parent 90f3811b83
commit 111bc65b7b
707 changed files with 32306 additions and 7289 deletions

View File

@@ -0,0 +1,69 @@
---
title: "GraphDaemon"
type: entity
entity_type: tool
tags:
- LSP
- code-intelligence
- semantic-graph
- TypeScript
sources:
- lsp-index-engineer.md
last_updated: 2026-04-29
---
## Overview
GraphDaemongraphd是 LSP/Index Engineer Agent 的核心图谱守护进程,负责协调多个 LSP 客户端并发运行,将异构语言服务器的响应转换为统一的语义图谱,为沉浸式代码可视化提供基础设施。默认要求 TypeScript 和 PHP 语言服务器生产就绪。
## Core Components
### LSP Client Management
- **LSPClients**`Map<string, LanguageClient>` — 管理 TypeScript、PHP、Go、Rust、Python 等多语言 LSP 客户端
- **Capabilities**`Map<string, ServerCapabilities>` — 存储各语言服务器的能力协商结果
### Graph State
- **Nodes**`Map<NodeId, GraphNode>` — 文件节点和符号节点
- **Edges**`Map<EdgeId, GraphEdge>` — contains/imports/calls/refs 关系边
- **Index**SymbolIndex — 符号索引,支持快速查询
### API Endpoints
- `/graph` — 返回完整图谱(< 100ms< 10k 节点)
- `/nav/:symId` — 符号导航(< 20ms 缓存 / < 60ms 未缓存)
- `/stats` — 系统统计信息
### WebSocket Server
- 实时推送图谱差异更新,延迟 < 50ms
### File Watching
- 文件变化监听和 Git hooks 触发增量更新
## Graph Schema
### Node Types
- `file` — 文件节点
- `module` — 模块节点
- `class` — 类符号
- `function` — 函数符号
- `variable` — 变量符号
- `type` — 类型符号
### Edge Types
- `contains` — 文件包含符号
- `imports` — 模块导入关系
- `extends` — 继承关系
- `implements` — 实现关系
- `calls` — 函数调用关系
- `references` — 符号引用关系
## Performance Targets
- /graph 端点:< 100ms< 10k 节点)
- /nav/:symId< 20ms缓存/ < 60ms未缓存
- WebSocket 延迟:< 50ms
- 内存使用:< 500MB
- 规模能力100k+ 符号无性能降级
## Connections
- [[GraphDaemon]] ← builds ← [[SemanticCodeGraph]]
- [[GraphDaemon]] ← orchestrates ← [[LSPOrchestrator]]
- [[GraphDaemon]] ← streams via ← [[WebSocket]]
- [[GraphDaemon]] ← indexes via ← [[nav.index.jsonl]]