npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-copy-tool

v0.1.1

Published

Enhanced line-selection copy tool for DeepSeek Harness.

Readme

dsh-copy-tool

English

用于 DeepSeek Harness 的增强型按行复制插件。

它将常见的“read + 手动 write 提取模块”流程合并为一次 copy 工具调用。

功能

  • 将指定的 1-based 源行复制到对应的目标行
  • lines 与 target_lines 都使用非空数组,可混合单行号和 [start, end] 范围
  • 自动移除选中非空源行的公共缩进,并添加显式的 indent * 4 个空格
  • 使用必填的 dry_run 预览有界 unified diff
  • 目标文件不存在时通过 writeText 原子创建
  • 目标文件存在时(包括源目标相同)通过 editText 原子修改
  • 保留未选中的内容和文件系统原生换行符
  • 相对路径以当前会话工作区为基准并遵守沙箱策略

在 DSH profile 中安装

dsh plugin --profile web add dsh-copy-tool

如果 profile 没有自动加入 dsh-copy-tool bundle,请手动加入后重启 DSH Web。

使用方式

所有参数都必须提供。展开后的 lines 和 target_lines 必须包含相同行数,源行会按位置映射到目标行:

{
  "source_file": "source.py",
  "target_file": "module.py",
  "lines": [[633, 644]],
  "target_lines": [[1, 12]],
  "indent": 0,
  "dry_run": true
}

数组可以混合单行号和范围:

{
  "source_file": "source.py",
  "target_file": "module.py",
  "lines": [633, [640, 645], 700],
  "target_lines": [1, [2, 7], 8],
  "indent": 1,
  "dry_run": false
}

行号从 1 开始。工具会移除选中非空源行的公共缩进,再添加 indent * 4 个空格。已有目标文件只替换目标行并保留其余内容;新文件必须使用从 1 开始的连续 target_lines。写入前请先使用 dry_run 查看 diff。

许可证

MIT