{"_id":"@buckeyestudio/toh-tool-str-replace-editor","name":"@buckeyestudio/toh-tool-str-replace-editor","dist-tags":{"next":"0.1.1-rc.2","latest":"0.1.1-rc.2"},"versions":{"0.1.1-rc.2":{"name":"@buckeyestudio/toh-tool-str-replace-editor","description":"Model-facing view, create, literal replace, and line insert tool over the Harness filesystem service","version":"0.1.1-rc.2","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/dustinwloring1988/theopen-harness.git","directory":"packages/fs/tool-str-replace-editor"},"type":"module","main":"lib/index.js","types":"lib/types/index.d.ts","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./package.json":"./package.json"},"license":"MIT","author":{"name":"buckeyestudio"},"peerDependencies":{"@buckeyestudio/toh-fs":"^0.1.1-rc.2","@buckeyestudio/toh-invariants":"^0.1.1-rc.2","@buckeyestudio/toh-sandbox-policy":"^0.1.1-rc.2","@buckeyestudio/cordis":"^4.0.1","@buckeyestudio/toh-sandbox":"^0.1.1-rc.2","@buckeyestudio/toh-tools":"^0.1.1-rc.2"},"dependencies":{"@buckeyestudio/schemastery":"^3.18.1"},"devDependencies":{"@buckeyestudio/toh-fs":"^0.1.1-rc.2","@buckeyestudio/toh-agent":"^0.1.1-rc.2","@buckeyestudio/toh-fs-observation-policy":"^0.1.1-rc.2","@buckeyestudio/toh-fs-sandbox":"^0.1.1-rc.2","@buckeyestudio/toh-fs-local":"^0.1.1-rc.2","@buckeyestudio/toh-invariants":"^0.1.1-rc.2","@buckeyestudio/toh-llm":"^0.1.1-rc.2","@buckeyestudio/toh-sandbox":"^0.1.1-rc.2","@buckeyestudio/toh-sandbox-policy":"^0.1.1-rc.2","@buckeyestudio/toh-system-prompt":"^0.1.1-rc.2","@buckeyestudio/toh-session":"^0.1.1-rc.2","@buckeyestudio/toh-tools":"^0.1.1-rc.2","@buckeyestudio/cordis":"^4.0.1"},"_id":"@buckeyestudio/toh-tool-str-replace-editor@0.1.1-rc.2","bugs":{"url":"https://github.com/dustinwloring1988/theopen-harness/issues"},"homepage":"https://github.com/dustinwloring1988/theopen-harness#readme","_integrity":"sha512-LcBJZUd7ZIcW7NoO68BD/8frBPc3Zj19A7sMVKayqx5MKgdBx+aL7xttsZUW/kCexC1w1I4cPFHU/eEsAwdWhg==","_resolved":"/home/runner/work/theopen-harness/theopen-harness/dist/npm/buckeyestudio-toh-tool-str-replace-editor-0.1.1-rc.2.tgz","_from":"file:/home/runner/work/theopen-harness/theopen-harness/dist/npm/buckeyestudio-toh-tool-str-replace-editor-0.1.1-rc.2.tgz","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-LcBJZUd7ZIcW7NoO68BD/8frBPc3Zj19A7sMVKayqx5MKgdBx+aL7xttsZUW/kCexC1w1I4cPFHU/eEsAwdWhg==","shasum":"89d53e7d057aeb413f73ab2022e3526d6391edf4","tarball":"https://registry.npmjs.org/@buckeyestudio/toh-tool-str-replace-editor/-/toh-tool-str-replace-editor-0.1.1-rc.2.tgz","fileCount":9,"unpackedSize":27125,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAwi2CPOFghr5eZH/2bycxNtKMuu8pd1NxG5aCJNr5LuAiAGwDAodzBa8GZuN2FKDx3HJuiypTNriqfLPF4FVcUY3A=="}]},"_npmUser":{"name":"buckeyestudio","email":"dustinwloring1988@gmail.com"},"directories":{},"maintainers":[{"name":"buckeyestudio","email":"dustinwloring1988@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/toh-tool-str-replace-editor_0.1.1-rc.2_1787489404186_0.8815867292906012"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-23T12:50:03.987Z","0.1.1-rc.2":"2026-08-23T12:50:04.330Z","modified":"2026-08-23T12:50:04.583Z"},"maintainers":[{"name":"buckeyestudio","email":"dustinwloring1988@gmail.com"}],"description":"Model-facing view, create, literal replace, and line insert tool over the Harness filesystem service","homepage":"https://github.com/dustinwloring1988/theopen-harness#readme","repository":{"type":"git","url":"git+https://github.com/dustinwloring1988/theopen-harness.git","directory":"packages/fs/tool-str-replace-editor"},"author":{"name":"buckeyestudio"},"bugs":{"url":"https://github.com/dustinwloring1988/theopen-harness/issues"},"license":"MIT","readme":"# @buckeyestudio/toh-tool-str-replace-editor\n\n[English](README.md) | 中文\n\n基于 `ctx.fs`、面向模型的独立 `str_replace_editor`。它可与持久 Bash、一次性 Bash、沙箱 Bash 或其他终端接口组合。\n\n## 配置\n\n| 键 | 默认值 | 含义 |\n|---|---:|---|\n| `maxOutputChars` | `16000` | 文件和目录查看结果保留的前缀字符数。 |\n| `description` | 编辑器命令指南 | 面向模型的工具描述。 |\n\n## 工具\n\nschema 提供针对绝对路径的 `view`、`create`、`str_replace` 与 `insert`。文件查看使用从 1 开始的行号，并保留内容中的制表符，因此显示的文本仍可作为有效的字面量替换输入；目录查看忽略隐藏、依赖与 Python 缓存条目并下探两层。`view`、`str_replace` 或 `insert` 发生元数据未命中时，工具会在返回 `FS_NOT_FOUND` 前记录确认缺失，因此后续 `create` 可以通过已挂载策略的防护创建流程恢复外部删除的路径；缺失状态绝不会授权 `str_replace` 或 `insert`。替换要求字面量唯一匹配，错误只使用公开的 `old_str` 词汇。插入遵循所选的零基插入边界，不会隐式补尾换行。修改操作会保留请求编辑范围之外的制表符。\n\n## 模型体验\n\n### 工具 schema\n\n#### 模型看到的内容\n\n生成的 [`str_replace_editor` schema](../../../docs/tool-catalog.zh.md#buckeyestudiotoh-tool-str-replace-editor)，其中包含配置的 `description`。本插件不贡献独立系统提示词段。\n\n#### Token 影响\n\n`str_replace_editor` 可见时产生固定的 schema 成本。\n\n#### KV Cache 影响\n\n配置的描述与 schema 不变时前缀稳定。\n\n### 工具结果\n\n#### 模型看到的内容\n\n查看操作返回带行号文本或浅层目录列表。调用会提供文件位置，创建/替换调用还会向展示层提供 diff 卡片。修改操作返回简洁确认。长查看结果保留前缀并追加截断提示。\n\n#### Token 影响\n\n随数据变化，并受 `maxOutputChars` 与固定截断提示约束。\n\n#### KV Cache 影响\n\n工具结果以追加方式位于可复用请求前缀之后。\n\n## 已知限制与暂缓事项\n\n- 操作面向 UTF-8 文本，不支持二进制文件。\n- `str_replace` 刻意拒绝零匹配或多匹配，且没有 `replace_all` 参数。\n- 每个修改操作都会经过 `fs/write-intent` 或 `fs/edit-intent`，解析当前会话的沙箱策略，并交由挂载的文件系统与策略插件实施约束。\n","readmeFilename":"README.zh.md","_rev":"1-91b13f13b815d0ff6aeea4e745fddb96"}