dsh-tool-str-replace-editor/packages/fs/tool-str-replace-editor官方

175.3kStar19.0kFork0Issue752Watching

面向模型的文件系统编辑工具,提供 view、create、str_replace、insert 四个操作,支持精确字符串替换和行插入,强制唯一匹配确保编辑准确性

机审证据安装命令仓库已核验dsh-plugin Topic许可证READMEAI 百科

此插件是大仓库 deepseek-ai/deepseek-harness 的子包,星数与活跃度统计的是整个仓库。

语言
TypeScript
License
MIT
分支
master
ai-agentscordisdshdsh-plugin

安装

$ dsh plugin --profile web add npm:@deepseek-ai/dsh-tool-str-replace-editor

在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程

对话式安装

帮我安装 DeepSeek Harness 插件 deepseek-ai/deepseek-harness/packages/fs/tool-str-replace-editor:先查看仓库 https://github.com/deepseek-ai/deepseek-harness 确认安全性,然后执行安装命令并验证插件加载成功。

把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。

English | 中文

Standalone model-facing str_replace_editor over ctx.fs. It can be composed with persistent Bash, one-shot Bash, sandboxed Bash, or another terminal surface.

Config

KeyDefaultMeaning
maxOutputChars16000Prefix characters retained for file and directory views.
descriptionEditor command guideModel-facing tool description.

Tool

The schema provides view, create, str_replace, and insert over absolute paths. File views use one-based line numbers and preserve content tabs, so displayed text remains valid literal replacement input; directory views omit hidden, dependency, and Python-cache entries and descend two levels. A metadata miss from view, str_replace, or insert records confirmed absence before returning FS_NOT_FOUND, so a later create can recover an externally deleted path through the mounted policy's guarded-create flow; absence never authorizes str_replace or insert. Replacement requires one unique literal match and reports errors only in the public old_str vocabulary. Insert follows the selected zero-based insertion boundary without adding an implicit trailing newline. Mutations preserve tabs outside the requested edit.

Model Experience

Tool schema

What the model sees

The generated str_replace_editor schema, including the configured description. The plugin contributes no standalone system-prompt section.

Token effect

Fixed schema cost while str_replace_editor is visible.

KV Cache effect

Prefix-stable while the configured description and schema remain unchanged.

Tool results

What the model sees

Views return numbered text or a shallow directory listing. Calls expose file locations, and create/replace calls expose diff cards to presentation surfaces. Mutations return concise confirmations. Long views keep their prefix and append a clipping notice.

Token effect

Data-dependent and bounded by maxOutputChars plus the fixed clipping notice.

KV Cache effect

Append-only tool results follow the reusable request prefix.

Known Limitations and Deferred Work

  • Operations target UTF-8 text; binary files are unsupported.
  • str_replace intentionally rejects zero or multiple matches and has no replace_all argument.
  • Every mutation goes through fs/write-intent or fs/edit-intent, resolves the current session sandbox policy, and delegates enforcement to the mounted filesystem and policy plugins.

收录徽章

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/deepseek-ai/deepseek-harness/packages/fs/tool-str-replace-editor)

把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。

返回插件目录
dsh-tool-str-replace-editor/packages/fs/tool-str-replace-editor — DeepSeek Harness 插件 | deepseek-plugin.org