Skills Plugins MCP Prompt Model 导航 博客 资讯 我的中心

dsh-peekedit

DeepSeek Harness 增强文件工具:peek 窗口化查看、peek_edit 字面替换/插入、peek_write 创建/覆写,另附文件浏览器。

lhp343969656 @lhp343969656 ⬇ 1 ★ 1 master

安装

dsh plugin --profile web add github:lhp343969656/dsh-peekedit
下载安装清单

需要可复现安装时,可在仓库后追加 #commit 固定提交。

DeepSeek Harness 增强文件工具:peek 窗口化查看、peek_edit 字面替换/插入、peek_write 创建/覆写,另附文件浏览器。

该插件未提供要点说明,请参考仓库 README。

  1. 安装并启动 DeepSeek Harness:npx @deepseek-ai/dsh web
  2. 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
  3. 用 dsh plugins list 确认已安装,必要时重启 Harness 生效

插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。

代码仓库github.com/lhp343969656/dsh-peekedit
许可证MIT
主要语言master
下载量1
GitHub 星标1
最近推送2026-08-16
收录日期2026-09-19
分类工具与能力

事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。

以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。

# dsh-peekedit

[![npm version](https://img.shields.io/npm/v/dsh-peekedit.svg)](https://www.npmjs.com/package/dsh-peekedit)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

**English** · [简体中文](README.zh-CN.md)

Enhanced file tools **and a file browser** for [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness) (`dsh`).

Source:  · Issues:

## What you get

**Model-facing tools** that complement (and never shadow) the built-in `read` / `write` / `edit` tools, sharing the same `ctx.fs` service, `fs/*` policy events, and sandbox enforcement:

| Tool | Purpose |
|---|---|
| `peek` | View a file with a line window (`view_range`) or a directory up to 2 levels deep. Numbered lines, total-line count, and a clipping notice on long output. |
| `peek_edit` | Mutate an existing file: unique-literal `str_replace` or line `insert`. |
| `peek_write` | Create a new file or overwrite an existing one. |

**File browser UI** (Web Client): a "📁 文件" button in the session header opens a side drawer showing the current session's workspace directory — click into folders, click a file to preview it, and edit + save right there. Reads and writes go through the same `ctx.fs` seam; the browser never bypasses sandbox or containment rules (paths are resolved inside the session workspace and `..` escapes are rejected).

Everything goes through the mounted `ctx.fs` backend and the `fs/*` event gate, so sandbox fencing, read-before-edit policy, and remote filesystem backends work exactly as they do for the built-in tools.

## Install

The package ships a `dsh.bundle` manifest, so it installs as a plugin bundle into a profile.

**Recommended** — from npm:

```sh
dsh plugin --profile web add dsh-peekedit
```

Alternatively, from a git repository (builds on install via the `prepare` script) or a local checkout / tarball:

```sh
dsh plugin --profile web add github:lhp343969656/dsh-peekedit
dsh plugin --profile web add ./dsh-peekedit
```

> The browser half of the plugin (`dsh.client` bundle) is discovered only when the package resolves from the profile's dependency tree, so install it with `dsh plugin add` rather than a `file://` patch overlay.

Verify the layer before booting:

```sh
dsh --profile web --dump-config
```

Or load it ad hoc with a patch overlay (tools only — the browser half needs a real install):

```sh
dsh web --patch ./cordis.patch.yml
```

> On Windows, an ad-hoc patch that references the package by name resolves from the profile's dependency tree only after `dsh plugin add`. To point a patch at a local checkout directly, use a `file://` URL: `name: 'file:///H:/path/to/dsh-peekedit/lib/index.js'` (the loader rejects bare drive-letter paths).

Git installs run the package's `prepare` script (tsdown build) — allow it once in the profile's `pnpm-workspace.yaml` (`allowBuilds: dsh-peekedit: true`) if your pnpm refuses, and pin a commit for anything you don't trust.

## Configuration

The bundle inserts two plugin rows; each takes its own config.

`dsh-peekedit` (tools):

| Key | Default | Meaning |
|---|---:|---|
| `maxOutputChars` | `16000` | Characters retained for a `peek` file view before the clipping notice. |

`dsh-peekedit/api` (file-browser API, web compositions only):

| Key | Default | Meaning |
|---|---:|---|
| `root` | `process.cwd()` | Fallback browse root when no session cwd resolves. |
| `maxReadChars` | `1000000` | Characters a browser preview read returns; larger files report `FS_TOO_LARGE`. |

```yaml
# cordis.patch.yml (your profile / home layer)
- id: api-peekedit
  config:
    root: 'H:/myproject'
    maxReadChars: 200000
```

## Browser API

Same-origin routes under `/api/peekedit/*` (registered only where a `webServer` is mounted):

| Route | Purpose |
|---|---|
| `GET /api/peekedit/list?session=&path=` | One directory's children, relative to the session workspace. |
| `GET /api/peekedit/read?session=&path=` | A file's UTF-8 content (binary rejected, size-capped). |
| `POST /api/peekedit/write` | Replace a file's content; rejects cross-origin `Origin` headers. |

Paths resolve against the calling session's `cwd` (fallback: `root` config) and must stay inside it — `..` segments and containment escapes are `403 PATH_ESCAPE`.

## Requirements

- Node.js ≥ 20
- DeepSeek Harness with the `@deepseek-ai/dsh-*` `0.1.0-rc.6` packages (or newer) reachable from the profile's dependency tree
- The Web Client bundle ships a browser half that needs React 18 (the platform word table provides it)

## Development

```sh
npm install
npm test          # vitest unit + integration suites (host API + client bundle)
npm run build     # tsdown → lib/ (host entries + browser bundle)
```

## License

MIT

数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。