CC19990113/dsh-plugin-codegraph 预览 preview

CC19990113/dsh-plugin-codegraph

Plugin插件 Native原生 ⭐ 13 MIT Dev Workflow开发与代码工作流

适用于DeepSeek Harness(dsh)的结构化代码智能——为代理提供codegraph和codegraph_index工具,用于查找符号的声明位置、调用对象以及变更影响范围,基于其自行构建的tree-sitter索引。与codegraph CLI的磁盘格式兼容。

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH), designed to add structural code intelligence capabilities to DSH AI agents. It exposes two distinct tools to agents: codegraph for running 10 types of read-only queries against a pre-built symbol graph, and codegraph_index for building or refreshing the symbol index from scratch. To install the plugin, users just need to run the one-line command dsh plugin --profile <profile-name> add CC19990113/dsh-plugin-codegraph directly from the DSH CLI.

This plugin targets AI agent-assisted code editing workflows for large codebases, and fills gaps left by common existing tools. Unlike grep, which returns irrelevant matches from comments and strings and cannot answer call relationship questions, and unlike LSP, which requires a running per-language server and depends on cursor position for queries, this plugin delivers fast, accurate answers directly from the symbol index. The standard workflow starts with running codegraph_index to build the full project symbol graph, then uses codegraph operations to answer structural questions before any code changes are made.

This plugin is released under the permissive MIT open source license, and requires no external dependencies to function properly. It does not require users to install the standalone @colbymchenry/codegraph CLI separately, as the indexer and store run entirely in-process within DSH. It is fully interoperable with the standalone CLI: it can read existing indexes built by the CLI, and the CLI can also read indexes built by this plugin. Known limitations include partial gitignore syntax support, no semantic matching for queries, and potential breaks due to DSH’s developer preview status.

这是一款专为DeepSeek Harness(DSH)开发的原生插件,为DSH中的AI代理提供结构化代码情报能力。它为代理新增了codegraph和codegraph_index两个工具,让代理能够基于预构建的符号索引回答各类代码结构问题,包括符号声明位置、哪些函数调用了目标符号、修改符号会造成哪些影响等,相比文本搜索结果更精准。用户可通过DSH内置的插件命令一键完成安装。

这款插件面向需要修改大型代码仓库的AI代理开发场景,解决了常规工具的痛点:grep无法回答代码调用关系问题,结果还容易混入注释、字符串中的无关匹配;LSP需要为每种语言运行单独的服务器,且依赖光标位置而非符号名查询。典型工作流是先运行codegraph_index构建项目符号索引,再用codegraph查询结构问题。

该插件采用MIT许可开源,完全免费使用,不需要额外安装独立的codegraph CLI,索引器和存储都在进程内运行。它支持复用已有的@colbymchenry/codegraph CLI生成的索引,也兼容外部CLI读取本插件生成的索引。当前存在一定限制:不支持完整gitignore语法,不支持语义匹配,且DSH本身处于开发者预览版,可能存在不兼容变更。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 13 stars - an early-stage project星标 13,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-plugin-codegraph

把 CC19990113/dsh-plugin-codegraph 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-plugin-codegraph

English | 中文

dshfind

Structural code intelligence for DeepSeek Harness (dsh).

Gives the agent two tools — codegraph and codegraph_index — so it can ask where is this declared, who calls it, what breaks if I change it, and how does one symbol reach another, answered from a pre-built index instead of from text search.

dsh plugin --profile <name> add dsh-plugin-codegraph

Why

An agent editing code asks structural questions before it touches anything. The tools it usually has answer them badly or not at all:

  • grep matches a name inside comments, strings, and unrelated identifiers, and cannot answer "who calls this" at all.
  • LSP answers precisely, but needs a running server per language, a warm workspace index, and a cursor position rather than a name.

A symbol graph answers all of it from one cheap lookup. This plugin ships both halves: a store that serves queries from an on-disk graph, and an indexer that builds one, so a fresh workspace needs no external tooling.

What the model gets

Two tools, deliberately separate.

codegraph — ten read-only operations

Operation Answers Required
search Where is a symbol declared? query
node One symbol with its immediate callers and callees symbol
callers What calls this? symbol
callees What does this call? symbol
impact What can a change to this reach? symbol
trace How does one symbol reach another? from, to
files What is indexed, under a directory or glob? —
status How large and how fresh is the index? —
explore Several related declarations with their source query
context Everything relevant to a task task

codegraph_index — build or refresh the graph

Separate from codegraph rather than an eleventh operation, because indexing a large workspace takes minutes while a query takes milliseconds, and a tool's timeout budget is fixed per registration. Folding them together would force one budget that is either too tight for a real build or too loose to catch a hung query.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-provider-qoder 下一个 Next dsh-reviewer-bot →