title, type, entity_type, tags, sources, last_updated
| title |
type |
entity_type |
tags |
sources |
last_updated |
| GraphDaemon |
entity |
tool |
| LSP |
| code-intelligence |
| semantic-graph |
| TypeScript |
|
|
2026-04-29 |
Overview
GraphDaemon(graphd)是 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
File Watching
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