DeepSeek Harness 插件

AngelosZou/graphlint#integrations/dsh

Star 数 ★ 4 分类 开发与运行时 收录于 2026-08-16 npm dsh-graphlint

面向 AI 生成代码的死代码检测:graphlint 构建依赖图,定位从任何入口不可达的代码,以实现代码库清理和功能有效性理解,并为 DSH 智能体提供 graphlint_query / graphlint_build / graphlint_config 工具与 graphlint 技能。

安装

# npm 包(预构建)

dsh plugin --profile web add dsh-graphlint

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:AngelosZou/graphlint#path:/integrations/dsh

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本。请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

DeepSeek Harness plugin bundle for graphlint — dead-code detection for AI-generated codebases.

Installing this bundle gives every agent in the profile three tools (graphlint_query, graphlint_build, graphlint_config) plus a graphlint skill describing when and how to use them.

Requirements

  • Node.js >= 20.
  • A DeepSeek Harness profile (dsh plugin initializes one on first use).
  • The graphlint CLI on PATH (pip install graphlint) or inside the project's virtualenv (env/, .venv/, venv/ are probed automatically).

Install

Install the published bundle into a DeepSeek Harness profile:

dsh plugin --profile web add dsh-graphlint

# or via the graphlint CLI (requires dsh on PATH):
graphlint install dsh --profile web

Then restart the profile (and refresh the browser page). The bundle's patch layer inserts the plugin row at the profile root; you can address it by id dsh-graphlint in your own cordis.patch.yml (e.g. to disable it per profile).

Development / repository install (linking a local checkout):

# 1. Clone the repository and build the bundle
git clone https://github.com/AngelosZou/graphlint.git
cd graphlint/integrations/dsh
npm install
npm run build

# 2. Link the bundle into a profile (run from the repository root)
cd ..
dsh plugin --profile web add link:./integrations/dsh

# 3. Restart dsh web

Tools

Tool Purpose
graphlint_query Query the dependency graph for dead code, circular refs, unused imports, and other warnings. Fast incremental mode; JSON result. Common filters: warn_types, graph_id, exclude_clean, include_tests, public_as_entry.
graphlint_build Full or incremental index rebuild as a background job (poll with job_output).
graphlint_config show / get / set entries in the project's .graphlint/config.json, plus add-entry-rule / remove-entry-rule / add-exclude / remove-exclude for custom entry rules and excludes.

The graphlint skill leads with these tools (they run inside the session working directory and return structured results); the canonical CLI guidance follows as reference.

root_dir restriction

Every tool accepts an optional root_dir. It must stay inside the session working directory (the default) — a hard guard rejects anything else with a clear error. Scanning a high-level root (such as a user home directory) makes graphlint build a huge first-time index and can block for many minutes.

Development

cd integrations/dsh
npm install          # first time only; afterwards npm ci
npm run build        # tsc → lib/
npm test             # node --test lib/test/

The test suite covers the pure logic layers (root guard, argv construction, JSON parsing) plus manifest/patch contract checks. A committed package-lock.json is required (CI runs npm ci).

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →