@deepseek-ai/dsh-tool-str-replace-editor 0.1.7-rc.1 → 0.1.7-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -1,6 +1,79 @@
1
- # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
- # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
- # after editing either side, bring the other along and re-record with:
1
+ # Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
2
+ # section, a hash of its English and Chinese blocks outside code blocks and generated regions.
3
+ # After editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/fs/tool-str-replace-editor/README.md
5
- README.md: 66663b2ab19585c30f00e6e6d91ce759b4fb8d81
6
- README.zh.md: 01a942cbc8735c4aae85999ad601bdcf4b4e59a5
5
+ /:
6
+ en: 1d308889b00602e0
7
+ zh: 8858e4768891e79d
8
+ /deepseek-ai-dsh-tool-str-replace-editor:
9
+ en: ec475ff43043b97b
10
+ zh: 8b517c5c11bd650f
11
+ /deepseek-ai-dsh-tool-str-replace-editor/summary:
12
+ en: f7423308d3241a02
13
+ zh: 84255466399391f2
14
+ /deepseek-ai-dsh-tool-str-replace-editor/table-of-contents:
15
+ en: d152484eb41ac6b4
16
+ zh: 09388d293f9be9cb
17
+ /deepseek-ai-dsh-tool-str-replace-editor/use-this-package:
18
+ en: 00b16ec00064922b
19
+ zh: 5e0f3e78f1bb4a29
20
+ /deepseek-ai-dsh-tool-str-replace-editor/use-this-package/minimal-composition:
21
+ en: db6e7d91ff7e0439
22
+ zh: 2ed4096f6c856e17
23
+ /deepseek-ai-dsh-tool-str-replace-editor/use-this-package/configuration:
24
+ en: e6860f1861cc0df8
25
+ zh: cd00d3c1a660b7c7
26
+ /deepseek-ai-dsh-tool-str-replace-editor/use-this-package/the-commands:
27
+ en: 554e8446946fbd96
28
+ zh: 3af12627c19a0111
29
+ /deepseek-ai-dsh-tool-str-replace-editor/use-this-package/failures-and-recovery:
30
+ en: 2b249fcb0b5621aa
31
+ zh: d172b3de43c337c4
32
+ /deepseek-ai-dsh-tool-str-replace-editor/understand-the-implementation:
33
+ en: b0b36a22cd4421eb
34
+ zh: db47ef5b71dd51df
35
+ /deepseek-ai-dsh-tool-str-replace-editor/understand-the-implementation/design-concept:
36
+ en: cce2bf460652cba4
37
+ zh: 1f4f1c1563c4c55c
38
+ /deepseek-ai-dsh-tool-str-replace-editor/understand-the-implementation/source-map:
39
+ en: 3f906cb8a23140e5
40
+ zh: 5d72b0f3244c29bc
41
+ /deepseek-ai-dsh-tool-str-replace-editor/understand-the-implementation/how-each-command-runs:
42
+ en: a866aa948afff207
43
+ zh: 65b0417597efc19c
44
+ /deepseek-ai-dsh-tool-str-replace-editor/further-exploration:
45
+ en: b1c1ee3798694a4e
46
+ zh: 53b2033c94711c26
47
+ /deepseek-ai-dsh-tool-str-replace-editor/model-experience:
48
+ en: 215e7ba838619b7b
49
+ zh: a311da3843709f90
50
+ /deepseek-ai-dsh-tool-str-replace-editor/model-experience/tool-schema:
51
+ en: e4c7376d4f29dbd5
52
+ zh: 6b7a9eaf69c9ea53
53
+ /deepseek-ai-dsh-tool-str-replace-editor/model-experience/tool-schema/what-the-model-sees:
54
+ en: a2fc5c779d44c5b3
55
+ zh: a5c045c8017fcfb5
56
+ /deepseek-ai-dsh-tool-str-replace-editor/model-experience/tool-schema/token-effect:
57
+ en: b4009b2b48c27168
58
+ zh: f8692c0c87c7ce69
59
+ /deepseek-ai-dsh-tool-str-replace-editor/model-experience/tool-schema/kv-cache-effect:
60
+ en: 7d9323583a83cb95
61
+ zh: 726ba31a296c1b5e
62
+ /deepseek-ai-dsh-tool-str-replace-editor/model-experience/tool-results:
63
+ en: beaabb79f229692a
64
+ zh: 8573891441963be4
65
+ /deepseek-ai-dsh-tool-str-replace-editor/model-experience/tool-results/what-the-model-sees:
66
+ en: 2ce8dee1a9711311
67
+ zh: aed7d8e758710c1e
68
+ /deepseek-ai-dsh-tool-str-replace-editor/model-experience/tool-results/token-effect:
69
+ en: b60b4bccff75a5e3
70
+ zh: 100e97b019030507
71
+ /deepseek-ai-dsh-tool-str-replace-editor/model-experience/tool-results/kv-cache-effect:
72
+ en: ba6a48888c3361e5
73
+ zh: 30244b70b2122bd6
74
+ /deepseek-ai-dsh-tool-str-replace-editor/known-limitations-and-deferred-work:
75
+ en: bce77fc35b8a0140
76
+ zh: 48f227222bf5f3dc
77
+ /deepseek-ai-dsh-tool-str-replace-editor/known-limitations-and-deferred-work/dev-note:
78
+ en: 493672b381457d04
79
+ zh: d3e08ed16765a468
package/lib/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { isAbsolute } from "node:path";
2
2
  import z from "@deepseek-ai/schemastery";
3
3
  import { FsError } from "@deepseek-ai/dsh-fs";
4
+ import { truncateWithoutSplittingSurrogatePair } from "@deepseek-ai/dsh-output-retention";
4
5
  import { sandboxDenialMarker } from "@deepseek-ai/dsh-sandbox";
5
6
  import { defineTool } from "@deepseek-ai/dsh-tools";
6
7
  //#region lib/types/index.js
@@ -23,7 +24,7 @@ Notes for using the \`str_replace\` command:
23
24
  * The \`new_str\` parameter should contain the edited lines that should replace the \`old_str\`
24
25
  `.trim();
25
26
  function maybeTruncate(content, maxOutputChars) {
26
- return content.length <= maxOutputChars ? content : content.slice(0, maxOutputChars) + TRUNCATED_MESSAGE;
27
+ return content.length <= maxOutputChars ? content : truncateWithoutSplittingSurrogatePair(content, maxOutputChars) + TRUNCATED_MESSAGE;
27
28
  }
28
29
  function codepointCompare(left, right) {
29
30
  return left < right ? -1 : left > right ? 1 : 0;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-tool-str-replace-editor",
3
3
  "description": "Model-facing view, create, literal replace, and line insert tool over the Harness filesystem service",
4
- "version": "0.1.7-rc.1",
4
+ "version": "0.1.7-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -26,29 +26,31 @@
26
26
  ],
27
27
  "license": "MIT",
28
28
  "peerDependencies": {
29
- "@deepseek-ai/dsh-fs": "0.1.7-rc.1",
30
- "@deepseek-ai/dsh-sandbox": "0.1.7-rc.1",
31
- "@deepseek-ai/dsh-sandbox-policy": "0.1.7-rc.1",
32
- "@deepseek-ai/dsh-tools": "0.1.7-rc.1",
33
- "@deepseek-ai/cordis": "~4.0.4"
29
+ "@deepseek-ai/dsh-fs": "0.1.7-rc.2",
30
+ "@deepseek-ai/dsh-output-retention": "0.1.7-rc.2",
31
+ "@deepseek-ai/dsh-sandbox-policy": "0.1.7-rc.2",
32
+ "@deepseek-ai/dsh-tools": "0.1.7-rc.2",
33
+ "@deepseek-ai/cordis": "~4.0.4",
34
+ "@deepseek-ai/dsh-sandbox": "0.1.7-rc.2"
34
35
  },
35
36
  "dependencies": {
36
37
  "@deepseek-ai/schemastery": "~3.18.4"
37
38
  },
38
39
  "devDependencies": {
39
- "@deepseek-ai/dsh-agent": "0.1.7-rc.1",
40
- "@deepseek-ai/dsh-agent-loop-testkit": "0.1.7-rc.1",
41
- "@deepseek-ai/dsh-fs": "0.1.7-rc.1",
42
- "@deepseek-ai/dsh-fs-sandbox": "0.1.7-rc.1",
43
- "@deepseek-ai/dsh-llm": "0.1.7-rc.1",
44
- "@deepseek-ai/dsh-fs-local": "0.1.7-rc.1",
45
- "@deepseek-ai/dsh-sandbox": "0.1.7-rc.1",
46
- "@deepseek-ai/dsh-fs-observation-policy": "0.1.7-rc.1",
47
- "@deepseek-ai/dsh-sandbox-policy": "0.1.7-rc.1",
48
- "@deepseek-ai/dsh-session": "0.1.7-rc.1",
49
- "@deepseek-ai/dsh-system-prompt": "0.1.7-rc.1",
50
- "@deepseek-ai/dsh-tools": "0.1.7-rc.1",
40
+ "@deepseek-ai/dsh-agent": "0.1.7-rc.2",
41
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.1.7-rc.2",
42
+ "@deepseek-ai/dsh-fs-local": "0.1.7-rc.2",
43
+ "@deepseek-ai/dsh-fs-observation-policy": "0.1.7-rc.2",
44
+ "@deepseek-ai/dsh-fs": "0.1.7-rc.2",
45
+ "@deepseek-ai/dsh-fs-sandbox": "0.1.7-rc.2",
46
+ "@deepseek-ai/dsh-llm": "0.1.7-rc.2",
47
+ "@deepseek-ai/dsh-output-retention": "0.1.7-rc.2",
48
+ "@deepseek-ai/dsh-sandbox": "0.1.7-rc.2",
49
+ "@deepseek-ai/dsh-sandbox-policy": "0.1.7-rc.2",
50
+ "@deepseek-ai/dsh-session": "0.1.7-rc.2",
51
+ "@deepseek-ai/dsh-system-prompt": "0.1.7-rc.2",
52
+ "@deepseek-ai/dsh-tools": "0.1.7-rc.2",
51
53
  "@deepseek-ai/cordis": "~4.0.4",
52
- "@deepseek-ai/dsh-session-projection": "0.1.7-rc.1"
54
+ "@deepseek-ai/dsh-session-projection": "0.1.7-rc.2"
53
55
  }
54
56
  }