@deepseek-ai/dsh-tool-bash 0.1.7-rc.2 → 0.2.0-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 +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/lib/index.js +1 -1
- package/package.json +31 -31
package/README.i18n.yaml
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
en: 9a16909fc013c6e5
|
|
22
22
|
zh: ba740dbce3cd2e93
|
|
23
23
|
/deepseek-ai-dsh-tool-bash/use-this-package/running-a-command:
|
|
24
|
-
en:
|
|
25
|
-
zh:
|
|
24
|
+
en: 1710624931aa2aa7
|
|
25
|
+
zh: ef4fa86fd05a1cc8
|
|
26
26
|
/deepseek-ai-dsh-tool-bash/use-this-package/running-long-commands-in-the-background:
|
|
27
27
|
en: a5eecea7bb7a75e8
|
|
28
28
|
zh: fae7f08e0e11594e
|
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-a
|
|
|
52
52
|
|
|
53
53
|
### Running a command
|
|
54
54
|
|
|
55
|
-
The tool executes `bash -c <command>` and returns the combined output. Commands run in a fresh shell every call, so state never persists — pass `workdir` instead of `cd`. A non-zero exit is reported as `[exit code: N]` for the agent to interpret, not surfaced as a tool error. A `description` in active voice (5–10 words) labels the call in the UI; `timeoutMs` overrides the executor's default and cap. Output beyond the executor's stream caps is truncated to its tail, with the full output saved to a spill file whose path is reported.
|
|
55
|
+
The tool executes `bash -c <command>` and returns the combined output. Commands run in a fresh shell every call, so state never persists — pass `workdir` instead of `cd`. A non-zero exit is reported as `[exit code: N]` for the agent to interpret, not surfaced as a tool error. A `description` in active voice (5–10 words) labels the call in the UI; `timeoutMs` overrides the executor's default and cap. Output beyond the executor's stream caps is truncated to its tail, with the full output saved to a spill file whose path is reported. The description tells the agent to verify the resolved absolute target path before any delete or move and to guard variables in such paths with `${VAR:?}`.
|
|
56
56
|
|
|
57
57
|
<a id="running-long-commands-in-the-background"></a>
|
|
58
58
|
### Running long commands in the background
|
package/README.zh.md
CHANGED
|
@@ -52,7 +52,7 @@ kind: "package-reference"
|
|
|
52
52
|
|
|
53
53
|
### 运行命令
|
|
54
54
|
|
|
55
|
-
工具执行 `bash -c <command>` 并返回合并后的输出。命令每次调用都运行在全新 shell 中,因此状态从不保留——请传 `workdir` 而不是 `cd`。非零退出以 `[exit code: N]` 报告给 agent 解读,而不是作为工具错误抛出。主动语态的 `description`(5–10 个词)在 UI 中标注该调用;`timeoutMs` 覆盖执行器的默认值与上限。超出执行器流上限的输出会被截断为尾部,完整输出保存到 spill
|
|
55
|
+
工具执行 `bash -c <command>` 并返回合并后的输出。命令每次调用都运行在全新 shell 中,因此状态从不保留——请传 `workdir` 而不是 `cd`。非零退出以 `[exit code: N]` 报告给 agent 解读,而不是作为工具错误抛出。主动语态的 `description`(5–10 个词)在 UI 中标注该调用;`timeoutMs` 覆盖执行器的默认值与上限。超出执行器流上限的输出会被截断为尾部,完整输出保存到 spill 文件并报告其路径。工具描述要求 agent 在任何删除或移动前校验解析后的绝对目标路径,并用 `${VAR:?}` 保护此类路径中的变量。
|
|
56
56
|
|
|
57
57
|
<a id="running-long-commands-in-the-background"></a>
|
|
58
58
|
### 后台运行长时间命令
|
package/lib/index.js
CHANGED
|
@@ -240,7 +240,7 @@ function validateBashArgs(args, effectiveMode) {
|
|
|
240
240
|
validateEscalationArgs(args.sandbox_permissions, justification);
|
|
241
241
|
}
|
|
242
242
|
function bashDescription() {
|
|
243
|
-
return `Execute a bash command (\`bash -c\`) and return its stdout/stderr. Each call runs in a fresh shell; pass \`workdir\` instead of using \`cd\`. Managed \`$${DSH_ENV_PREFIX}*\` variables expose current harness environment facts. Long output is truncated to its tail; the full output is saved to a file whose path is reported when available. Commands may run under a file sandbox; a blocked file operation is reported as \`[sandbox: file access denied under <mode> mode]\`, a policy denial: do not retry another way.`;
|
|
243
|
+
return `Execute a bash command (\`bash -c\`) and return its stdout/stderr. Each call runs in a fresh shell; pass \`workdir\` instead of using \`cd\`. Managed \`$${DSH_ENV_PREFIX}*\` variables expose current harness environment facts. Long output is truncated to its tail; the full output is saved to a file whose path is reported when available. Before any delete or move, verify that the resolved absolute target path is the intended one; never run it against a computed path you have not checked. An unset variable expands to an empty string, so guard variables in such paths with \`\${VAR:?}\`. Commands may run under a file sandbox; a blocked file operation is reported as \`[sandbox: file access denied under <mode> mode]\`, a policy denial: do not retry another way.`;
|
|
244
244
|
}
|
|
245
245
|
function presentBashCall(args) {
|
|
246
246
|
if (args.run_in_background === true) return {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-tool-bash",
|
|
3
3
|
"description": "Model-facing bash tool with optional generic background-job and sandbox-escalation support",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0-rc.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,41 +27,41 @@
|
|
|
27
27
|
],
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@deepseek-ai/dsh-agent": "0.
|
|
31
|
-
"@deepseek-ai/dsh-shell": "0.
|
|
32
|
-
"@deepseek-ai/dsh-shell-env": "0.
|
|
33
|
-
"@deepseek-ai/dsh-llm": "0.
|
|
34
|
-
"@deepseek-ai/dsh-sandbox": "0.
|
|
35
|
-
"@deepseek-ai/dsh-sandbox-policy": "0.
|
|
36
|
-
"@deepseek-ai/dsh-system-prompt": "0.
|
|
37
|
-
"@deepseek-ai/dsh-
|
|
38
|
-
"@deepseek-ai/
|
|
39
|
-
"@deepseek-ai/dsh-
|
|
40
|
-
"@deepseek-ai/
|
|
30
|
+
"@deepseek-ai/dsh-agent": "0.2.0-rc.2",
|
|
31
|
+
"@deepseek-ai/dsh-shell": "0.2.0-rc.2",
|
|
32
|
+
"@deepseek-ai/dsh-shell-env": "0.2.0-rc.2",
|
|
33
|
+
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
34
|
+
"@deepseek-ai/dsh-sandbox": "0.2.0-rc.2",
|
|
35
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.0-rc.2",
|
|
36
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
|
|
37
|
+
"@deepseek-ai/dsh-user-approval": "0.2.0-rc.2",
|
|
38
|
+
"@deepseek-ai/cordis": "~4.0.4",
|
|
39
|
+
"@deepseek-ai/dsh-tools": "0.2.0-rc.2",
|
|
40
|
+
"@deepseek-ai/dsh-jobs": "0.2.0-rc.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@deepseek-ai/schemastery": "~3.18.4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@deepseek-ai/dsh-agent": "0.
|
|
47
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "0.
|
|
48
|
-
"@deepseek-ai/dsh-
|
|
49
|
-
"@deepseek-ai/dsh-shell": "0.
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-sandbox": "0.
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
-
"@deepseek-ai/dsh-session
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-jobs": "0.
|
|
59
|
-
"@deepseek-ai/dsh-jobs
|
|
60
|
-
"@deepseek-ai/dsh-
|
|
61
|
-
"@deepseek-ai/dsh-
|
|
62
|
-
"@deepseek-ai/dsh-system-prompt": "0.1.7-rc.2",
|
|
63
|
-
"@deepseek-ai/dsh-session-projection": "0.1.7-rc.2",
|
|
46
|
+
"@deepseek-ai/dsh-agent": "0.2.0-rc.2",
|
|
47
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.0-rc.2",
|
|
48
|
+
"@deepseek-ai/dsh-shell": "0.2.0-rc.2",
|
|
49
|
+
"@deepseek-ai/dsh-shell-env": "0.2.0-rc.2",
|
|
50
|
+
"@deepseek-ai/dsh-bash-local": "0.2.0-rc.2",
|
|
51
|
+
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
52
|
+
"@deepseek-ai/dsh-subprocess-local": "0.2.0-rc.2",
|
|
53
|
+
"@deepseek-ai/dsh-sandbox": "0.2.0-rc.2",
|
|
54
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.0-rc.2",
|
|
55
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-session": "0.2.0-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-jobs": "0.2.0-rc.2",
|
|
58
|
+
"@deepseek-ai/dsh-jobs-local": "0.2.0-rc.2",
|
|
59
|
+
"@deepseek-ai/dsh-tool-jobs": "0.2.0-rc.2",
|
|
60
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.0-rc.2",
|
|
61
|
+
"@deepseek-ai/dsh-user-approval": "0.2.0-rc.2",
|
|
64
62
|
"@deepseek-ai/cordis": "~4.0.4",
|
|
65
|
-
"@deepseek-ai/dsh-
|
|
63
|
+
"@deepseek-ai/dsh-session-projection": "0.2.0-rc.2",
|
|
64
|
+
"@deepseek-ai/dsh-tools": "0.2.0-rc.2",
|
|
65
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.0-rc.2"
|
|
66
66
|
}
|
|
67
67
|
}
|