@hy-sde-org/dsh-tool-edit

中文文档
0.2.1-rc.5发布于 2026/11/01MITTypeScriptES Module

富人 edit DeepSeek线束工具(替换/ patch / apply_patch / hashline模式),内置写时格式化和诊断-一个独立的插件,不需要更改上游线束。

中文使用文档

@hy-sde-org dsh-tool-edit

富人 edit DeepSeek Harness工具插件:将/ patch / apply_patch / hashline模式替换为嵌入式LSP客户端(format-on-write + diagnostics)。

dsh plugin --profile web add @hy-sde-org/dsh-tool-edit

官方线束版本(rc.8+): 安装bundle会禁用 运 str_replace_editor 工具,并且富编辑器替换了库存 edit 通过代理作用域跟踪。安装提供的预设行-参见 替换内置编辑器 节和 examples/agent-preset/ 在这个包裹里。安装bundle 孤独永不破靴。

完整的使用、配置和针对内置的基准测试 str_replace_editor: https://github.com/hy-sde/dsh-tool-edit#readme

TypeScript 7 native LSP(可选择加入)

TypeScript 7去掉了JS lib/tsserver.js 那 typescript-language-server 封装并使用本机的语言协议 tsc --lsp --stdio,所以 包装器在 initialize TypeScript 7项目。集 typescriptNative (关闭,除非设置-与上游的oh-my-pi提交完全相同 530664c8f5),以使嵌入式客户端每次只选择一个服务器 工作区:

- id: tool-edit
  config:
    lspCommand: npx --yes typescript-language-server --stdio
    typescriptNative: {}        # enabled; native launcher defaults to `tsc`
    # typescriptNative:
    #   command: tsc             # override the native launcher name/path,
    #                            # e.g. a tsc wrapper or `tsgo`

的工作空间根目录在每个工作空间第一次生成时运行一次选择 编辑(workspaceRoot):一个工作空间的TypeScript安装(走到 Repo根目录,所以monorepo工作区使用根目录安装 lib/tsserver.js 生成工作区自己的 tsc (.bin/tsc,使用win32 .exe/.cmd/.bat 候选人,回到一揽子计划 bin/tsc), --lsp --stdio;一个经典的安装(有 lib/tsserver.js)或不安装 lspCommand 不变;由于没有安装工作空间,本机启动程序已解决 仅在其安装还缺少时才使用 lib/tsserver.js;任何东西 无法觉察的保持 lspCommand 就像今天一样。

版本与发布记录

@hy-sde-org/dsh-tool-edit 共发布 18 个版本,首次发布于 2026/08/17;过去 12 个月发布了 18 个版本。

版本发布日期距今
0.2.1-rc.5latest2026/11/012 天前
0.2.1-rc.32026/10/259 天前
0.2.1-alpha.42026/10/1618 天前
0.2.1-alpha.22026/10/1321 天前
0.2.0-rc.2.22026/10/0529 天前
0.2.0-rc.2.12026/10/0529 天前

关于 @hy-sde-org/dsh-tool-edit 的常见问题

@hy-sde-org/dsh-tool-edit 是什么?

富人 edit DeepSeek线束工具(替换/ patch / apply_patch / hashline模式),内置写时格式化和诊断-一个独立的插件,不需要更改上游线束。

如何安装 @hy-sde-org/dsh-tool-edit?

在项目目录运行 npm install @hy-sde-org/dsh-tool-edit,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@deepseek-ai/cordis(~4.0.5)、@deepseek-ai/dsh-fs(^0.2.1-rc.5)、@deepseek-ai/dsh-tools(^0.2.1-rc.5)、@deepseek-ai/dsh-sandbox(^0.2.1-rc.5)、@deepseek-ai/dsh-session(^0.2.1-rc.5)、@deepseek-ai/dsh-system-prompt(^0.2.1-rc.5)、@deepseek-ai/dsh-sandbox-policy(^0.2.1-rc.5)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@hy-sde-org/dsh-tool-edit 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@hy-sde-org/dsh-tool-edit 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@hy-sde-org/dsh-tool-edit 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.19.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@hy-sde-org/dsh-tool-edit 可以商用吗?

@hy-sde-org/dsh-tool-edit 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@hy-sde-org/dsh-tool-edit 还在维护吗?

最新版本 0.2.1-rc.5 发布于 2026/11/01(2 天前);至今共发布 18 个版本,其中过去 12 个月发布了 18 个;首次发布于 2026/08/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。