Luke-Yong/dsh-plugin-knowledge-graph
dsh-plugin-knowledge-graph for Deepseek Harness
이것은 DeepSeek Harness(DSH) 플러그인입니다. 이 사이트는 GitHub README, 설치 정보, 유지보수 상태, 공개 보안 시그널을 모아 보여줍니다.
업스트림에서 중국어 README를 제공하지 않아 저장소 원본 내용을 표시합니다.
dsh-plugin-knowledge-graph
A DeepSeek Harness (DSH) plugin that exposes a read_graph tool backed by a codebase knowledge graph. The graph tracks every file, directory, exported symbol, and their relationships so an agent can answer structural and dependency questions faster than grepping or reading files.
Status: infancy. This project is in its infancy stage. Execution behavior, the query surface, and compatibility may change while the project is iterated on and tested by the open source community.
Derived work. This project is derived from the knowledge graph tool in Luke-Yong/H, adapted to DeepSeek Harness's "everything is a plugin" model.
What it does
Given a workspace root, the plugin builds an in-memory graph and answers queries such as:
structure— print the full directory treeexports <file>— list every symbol exported by a fileimports_of <file>— list symbols a file imports (with their source files; stdlib/third-party imports are tagged)exporters_of <symbol>— find which files export a symboldependents <file>— find which files import from a fileunused_imports <file>— list imports never referenced in the file
Symbols are parsed from TypeScript/JavaScript (via the TypeScript compiler API) and Python (module-level def, class, and name = value bindings).
Graph model
The graph uses three node types and four edge types:
| Nodes | Meaning |
|---|---|
dir | A directory |
file | A source file |
symbol | An exported symbol (function, class, const, type, interface, enum, default) |
| Edges | Meaning |
|---|---|
CONTAINS | Structural parent → child (dir → dir/file, file → symbol) |
EXPORTS | File → symbol it exports |
IMPORTS | File-level dependency (file → file) |
IMPORTS_SYMBOL | Precise symbol-level dependency (file → symbol) |
Installation
Install with the DSH CLI into a profile:
dsh plugin --profile web add github:Luke-Yong/dsh-plugin-knowledge-graph
Pin to a specific commit for reproducibility:
dsh plugin --profile web add github:Luke-Yong/dsh-plugin-knowledge-graph#<commit-sha>
Usage
The plugin registers a single tool, read_graph, on ctx.tools. Its parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | yes | Query string in <query_type> <target> form |
root | string | no | Absolute workspace root to graph. Defaults to process.cwd() |
Root hygiene: the
rootdefault (process.cwd()) may be a parent directory containing several independent projects. Always pass an explicitrootpointing at the single workspace you are working in, sostructuredoesn't descend into sibling trees.
Example queries:
exports src/index.ts
exporters_of buildKnowledgeGraph
imports_of src/query.ts
dependents src/knowledgeGraph.ts
unused_imports app.py
structure
Project structure
src/
index.ts Plugin entry — registers the read_graph tool
knowledgeGraph.ts Graph builder (filesystem walk, import/export parsing, serialization)
query.ts Query engine (runGraphQuery)
Building
npm run build # tsc -p tsconfig.json
Output is emitted to dist/ (dist/index.js is the package entry point).
License
MIT
보안 및 설치 증거
이 점수는 공개 저장소 메타데이터와 이 사이트에 등록된 설치 증거에만 기반하며, 코드 보안 감사와 다릅니다.
공개 플러그인 카탈로그에서 왔으며, 공개 GitHub 저장소로 연결됩니다.
저장소가 MIT 라이선스를 선언했습니다.
최근 180일 내 코드 업데이트가 있습니다.
재현 가능한 정확한 설치 메타데이터가 아직 등록되지 않았습니다. 저장소 설명에 따라 직접 확인하세요.
검사한 패키지 메타데이터에 설치 라이프사이클 스크립트가 선언되지 않았습니다.