DeepSeek Harness 插件

dsh-lens-nexusage

Real-time code feedback for DeepSeek Harness — LSP, linters, formatters, type-checking, and structural analysis.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
NexusAgentX/dsh-lens
最近更新
2026年8月14日
分类
工具与能力
GitHub stars
1
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/NexusAgentX/dsh-lens
插件名:dsh-lens-nexusage
作者:NexusAgentX

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-lens

Real-time code feedback for DeepSeek Harness: LSP, linters, formatters, type-checking, and structural analysis while the agent writes.

Current release: dsh-lens@0.2.0.

English | [中文](#中文)

What it does

This is a host-native port of pi-lens. The analysis engine stays in pi-lens; this plugin is the DeepSeek Harness adapter.

On every write / edit / bash mutation it runs the same pipeline pi-lens uses inside Pi:

1. format queue / safe autofix 2. LSP file sync and diagnostics 3. ast-grep, tree-sitter, fact rules, and language scanners 4. cascade diagnostics on likely neighbors 5. turn-end blockers and advisories injected into the next model request

It also registers the full agent-facing tool set, the /lens-* commands, bundled pi-lens skills, and a WebUI chip/dock.

Standalone CLI (review graph, same as pi-lens build-graph):

npx dsh-lens build-graph --cwd .
npx dsh-lens status

Install

dsh plugin --profile web add dsh-lens

Or from git:

dsh plugin --profile web add github:NexusAgentX/dsh-lens

Do not also attach pi-lens-mcp / official MCP-wrapped pi-lens against the same workspace — that double-starts language servers.

Tools

Always available:

  • lens_diagnostics — cached / project diagnostic state (delta / all / full)
  • lsp_diagnostics — file- or directory-scoped LSP diagnostics
  • symbol_search — ranked identifier search
  • module_report / project_report
  • read_symbol / read_enclosing

Also registered (dsh has no dynamic-tool API, so they stay visible):

  • ast_grep_search / ast_grep_replace / ast_grep_outline / ast_grep_dump
  • lsp_navigation
  • lens_diagnostic_mark
  • pi_lens_activate_tools — no-op catalog on dsh; all tools are already active

The official lsp tool is left alone. Use it for simple go-to; use lsp_navigation for the full IDE surface.

lens_diagnostics, ast_grep_search, and symbol_search present as search cards with file follow-along.

Commands

CommandWhat it does
/lens-toggleEnable or disable the pipeline for this session
/lens-context-toggleKeep tools/LSP/format on, stop injecting into the next turn
/lens-widget-toggleShow or hide the WebUI chip and dock
/lens-healthSession health, LSP list, cascade, event-loop, noisy rules
/lens-perfProcess + machine-wide p50/p99 phase ranking
/lens-toolsInstaller status grouped by source
/lens-tdiTechnical Debt Index
/lens-mapWrite the HTML dependency map; the chip gets an Open map action
/lens-allow-edit <path>One-shot read-guard exemption

WebUI

On the official dsh web profile the plugin ships a browser half (dsh.client):

  • session header chip (conversation.session.header.actions)
  • composer dock (conversation.input.dock)
  • official primitives: Menu, Tooltip, StateDot, chevron, CSS modules, zh/en locale

The chip reads the lens session projection, folded from widget-state on tool/result, turn/end, and /lens-widget-toggle. It does not append a custom session event, so persistence will not reject the log.

Skills

The four upstream pi-lens skills are registered when ctx.skills is present:

  • pi-lens-ast-grep
  • pi-lens-lsp-navigation
  • pi-lens-write-ast-grep-rule
  • pi-lens-write-tree-sitter-rule

Config

Same files as pi-lens:

  • project: .pi-lens.json
  • global: ~/.pi-lens/config.json

Plugin config on the Cordis entry (omit a key to keep .pi-lens.json / env):

- id: dsh-lens
  name: dsh-lens
  config:
    cwd: /path/to/workspace
    enabled: true
    contextInjection: true
    lsp: true
    format: true
    immediateFormat: false
    autofix: true
    tests: true
    delta: true
    guard: false
    opengrep: true
    readGuard: true
    turnSummary: false
    actionableWarnings: false
    actionableWarningActions: false
    actionableWarningAutofix: false
    actionableWarningAll: false

Boolean keys map onto the same flags as pi-lens (--no-lsp, --lens-guard, --immediate-format, …).

Host limits

dsh freezes tool arguments before dispatch, so Pi's in-flight edit autopatch cannot rewrite old_string. dsh already has its own read-before-edit observation policy.

These Pi host surfaces are not cloned: TUI footer, interactive LSP install prompts, session fork / cross-process nudge, official Settings cards (apiproxy allowlist), and /lens-booboo (still deferred upstream).

License

[MIT](LICENSE)

Inspired by pi-lens (MIT). See [NOTICE](NOTICE).

---

中文

DeepSeek Harness 用的实时代码反馈插件。分析引擎还是 pi-lens,这里是 dsh 宿主适配:写文件后跑 format / LSP / linter / 结构规则,并把 blocker 注回下一轮。

当前版本:dsh-lens@0.2.0

dsh plugin --profile web add dsh-lens

Web profile 会装上会话标题旁的 lens 芯片和输入框上面的 dock(官方 Menu / Tooltip / StateDot)。/lens-widget-toggle 可隐藏。/lens-health/lens-perf/lens-tools 与上游报告对齐。

不要和 pi-lens-mcp 同时挂同一批 workspace,会双开语言服务器。

配置继续用 .pi-lens.json / ~/.pi-lens/config.json,也可以在 Cordis 条目里写 lsp / format / guard 等开关。