@deepseek-ai/dsh-tool-pwsh 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 +2 -2
- package/package.json +31 -31
package/README.i18n.yaml
CHANGED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
en: addf35c4e607d33c
|
|
25
25
|
zh: 081f511d6b5a79d6
|
|
26
26
|
/deepseek-ai-dsh-tool-pwsh/use-this-package/running-a-command:
|
|
27
|
-
en:
|
|
28
|
-
zh:
|
|
27
|
+
en: 4f172bd02fa012f4
|
|
28
|
+
zh: f19375d333d3aed8
|
|
29
29
|
/deepseek-ai-dsh-tool-pwsh/use-this-package/foreground-commands-as-jobs:
|
|
30
30
|
en: 4a487e48ef146846
|
|
31
31
|
zh: 0a34dc49bffb03af
|
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 `pwsh -Command <command>` and returns the combined output. Commands run in a fresh pwsh process every call, so state never persists — pass `workdir` instead of `cd`. Paths use native Windows form and environment variables are read with `$env:NAME`. A non-zero exit is reported as `[exit code: N]`; on Windows a force-killed command settles as `[exit code: 1]` without a signal marker, so the agent treats a bare exit 1 after an interruption as a termination, not a command failure. Background runs, output truncation, and the `description`/`timeoutMs`/`workdir` arguments behave exactly as in [`dsh-tool-bash`](../tool-bash/README.md#running-long-commands-in-the-background), including job-owned cancellation during asynchronous shell preparation.
|
|
55
|
+
The tool executes `pwsh -Command <command>` and returns the combined output. Commands run in a fresh pwsh process every call, so state never persists — pass `workdir` instead of `cd`. Paths use native Windows form and environment variables are read with `$env:NAME`. A non-zero exit is reported as `[exit code: N]`; on Windows a force-killed command settles as `[exit code: 1]` without a signal marker, so the agent treats a bare exit 1 after an interruption as a termination, not a command failure. The description tells the agent to verify the resolved absolute target path before any delete or move and not to assign to automatic variables such as `$HOME`. Background runs, output truncation, and the `description`/`timeoutMs`/`workdir` arguments behave exactly as in [`dsh-tool-bash`](../tool-bash/README.md#running-long-commands-in-the-background), including job-owned cancellation during asynchronous shell preparation.
|
|
56
56
|
|
|
57
57
|
### Foreground commands as jobs
|
|
58
58
|
|
package/README.zh.md
CHANGED
|
@@ -52,7 +52,7 @@ kind: "package-reference"
|
|
|
52
52
|
|
|
53
53
|
### 运行命令
|
|
54
54
|
|
|
55
|
-
工具执行 `pwsh -Command <command>` 并返回合并后的输出。命令每次调用都运行在全新 pwsh 进程中,因此状态从不保留——请传 `workdir` 而不是 `cd`。路径使用原生 Windows 形式,环境变量用 `$env:NAME` 读取。非零退出以 `[exit code: N]` 报告;在 Windows 上,强制终止的命令以 `[exit code: 1]` 结算且没有信号标记,因此 agent 把中断后的裸 exit 1
|
|
55
|
+
工具执行 `pwsh -Command <command>` 并返回合并后的输出。命令每次调用都运行在全新 pwsh 进程中,因此状态从不保留——请传 `workdir` 而不是 `cd`。路径使用原生 Windows 形式,环境变量用 `$env:NAME` 读取。非零退出以 `[exit code: N]` 报告;在 Windows 上,强制终止的命令以 `[exit code: 1]` 结算且没有信号标记,因此 agent 把中断后的裸 exit 1 当作终止而非命令失败。工具描述要求 agent 在任何删除或移动前校验解析后的绝对目标路径,并且不要给 `$HOME` 等自动变量赋值。后台运行、输出截断以及 `description`/`timeoutMs`/`workdir` 参数的行为与 [`dsh-tool-bash`](../tool-bash/README.zh.md#running-long-commands-in-the-background) 完全一致,包括异步 shell 准备过程中由任务负责的取消。
|
|
56
56
|
|
|
57
57
|
### 前台命令即任务
|
|
58
58
|
|
package/lib/index.js
CHANGED
|
@@ -252,9 +252,9 @@ function validatePwshArgs(args) {
|
|
|
252
252
|
validateEscalationArgs(args.sandbox_permissions, args.justification);
|
|
253
253
|
}
|
|
254
254
|
function pwshDescription(windowsSandbox) {
|
|
255
|
-
const base = "Execute a PowerShell command (`pwsh -Command`) and return its stdout/stderr. Each call runs in a fresh pwsh process; pass `workdir` instead of using `cd`. Paths use native Windows form (`C:\\...`); read environment variables with `$env:NAME`. Managed `$env:DSH_*` 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. On Windows a force-killed command settles as `[exit code: 1]` without a signal marker — treat it as an interruption, not a command failure. 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.";
|
|
255
|
+
const base = "Execute a PowerShell command (`pwsh -Command`) and return its stdout/stderr. Each call runs in a fresh pwsh process; pass `workdir` instead of using `cd`. Paths use native Windows form (`C:\\...`); read environment variables with `$env:NAME`. Managed `$env:DSH_*` 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. On Windows a force-killed command settles as `[exit code: 1]` without a signal marker — treat it as an interruption, not a command failure. 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. Do not assign to automatic variables such as `$HOME`; variable names are case-insensitive, so `$home` is the same read-only variable. 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.";
|
|
256
256
|
if (!windowsSandbox) return base;
|
|
257
|
-
return "Execute a PowerShell command (`pwsh -Command`) and return its stdout/stderr. Each call runs in a fresh pwsh process; pass `workdir` instead of using `cd`. Paths use native Windows form (`C:\\...`); read environment variables with `$env:NAME`. Managed `$env:DSH_*` 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. On Windows a force-killed command settles as `[exit code: 1]` without a signal marker — treat it as an interruption, not a command failure. 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. Under the Windows sandbox, read-only pwsh runs in PowerShell ConstrainedLanguage mode, while workspace-write stays in FullLanguage unless host policy says otherwise. In read-only, prefer cmdlets and core types (`[string]`, `[datetime]`, `[regex]`, `[guid]`); .NET static calls (`[System.IO.*]::`, `[math]::`), `Add-Type`, COM objects, and reflection fail with \"only core types\" errors. `-f` formatting, property access, and core cmdlets work. In both confined modes, programs cannot open named pipes, so a command that captures another program's output through piped stdio (Node.js `child_process.spawn`/`exec` with the default `stdio: 'pipe'`) fails with EPERM, while `stdio: 'inherit'` and `stdio: 'ignore'` spawns work and PowerShell's own pipelines are unaffected. That EPERM is the documented boundary: do not retry the command another way — escalate the exact command once or restructure it to avoid capturing output.";
|
|
257
|
+
return "Execute a PowerShell command (`pwsh -Command`) and return its stdout/stderr. Each call runs in a fresh pwsh process; pass `workdir` instead of using `cd`. Paths use native Windows form (`C:\\...`); read environment variables with `$env:NAME`. Managed `$env:DSH_*` 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. On Windows a force-killed command settles as `[exit code: 1]` without a signal marker — treat it as an interruption, not a command failure. 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. Do not assign to automatic variables such as `$HOME`; variable names are case-insensitive, so `$home` is the same read-only variable. 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. Under the Windows sandbox, read-only pwsh runs in PowerShell ConstrainedLanguage mode, while workspace-write stays in FullLanguage unless host policy says otherwise. In read-only, prefer cmdlets and core types (`[string]`, `[datetime]`, `[regex]`, `[guid]`); .NET static calls (`[System.IO.*]::`, `[math]::`), `Add-Type`, COM objects, and reflection fail with \"only core types\" errors. `-f` formatting, property access, and core cmdlets work. In both confined modes, programs cannot open named pipes, so a command that captures another program's output through piped stdio (Node.js `child_process.spawn`/`exec` with the default `stdio: 'pipe'`) fails with EPERM, while `stdio: 'inherit'` and `stdio: 'ignore'` spawns work and PowerShell's own pipelines are unaffected. That EPERM is the documented boundary: do not retry the command another way — escalate the exact command once or restructure it to avoid capturing output.";
|
|
258
258
|
}
|
|
259
259
|
/**
|
|
260
260
|
* Resolve an explicit workdir first, making a relative one session-workspace-relative;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-tool-pwsh",
|
|
3
3
|
"description": "Model-facing pwsh tool over the bash executor seam",
|
|
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/
|
|
31
|
-
"@deepseek-ai/dsh-agent": "0.
|
|
32
|
-
"@deepseek-ai/dsh-
|
|
33
|
-
"@deepseek-ai/dsh-
|
|
34
|
-
"@deepseek-ai/dsh-
|
|
35
|
-
"@deepseek-ai/dsh-
|
|
36
|
-
"@deepseek-ai/dsh-
|
|
37
|
-
"@deepseek-ai/dsh-
|
|
38
|
-
"@deepseek-ai/dsh-
|
|
39
|
-
"@deepseek-ai/dsh-
|
|
40
|
-
"@deepseek-ai/
|
|
30
|
+
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
31
|
+
"@deepseek-ai/dsh-agent": "0.2.0-rc.2",
|
|
32
|
+
"@deepseek-ai/dsh-sandbox": "0.2.0-rc.2",
|
|
33
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.0-rc.2",
|
|
34
|
+
"@deepseek-ai/dsh-shell": "0.2.0-rc.2",
|
|
35
|
+
"@deepseek-ai/dsh-shell-env": "0.2.0-rc.2",
|
|
36
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
|
|
37
|
+
"@deepseek-ai/dsh-tools": "0.2.0-rc.2",
|
|
38
|
+
"@deepseek-ai/dsh-user-approval": "0.2.0-rc.2",
|
|
39
|
+
"@deepseek-ai/dsh-jobs": "0.2.0-rc.2",
|
|
40
|
+
"@deepseek-ai/cordis": "~4.0.4"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@deepseek-ai/schemastery": "~3.18.4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@deepseek-ai/dsh-agent": "0.1.7-rc.2",
|
|
47
46
|
"@deepseek-ai/cordis": "~4.0.4",
|
|
48
|
-
"@deepseek-ai/dsh-agent
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "0.
|
|
51
|
-
"@deepseek-ai/dsh-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
-
"@deepseek-ai/dsh-sandbox
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-session-projection": "0.
|
|
59
|
-
"@deepseek-ai/dsh-shell": "0.
|
|
60
|
-
"@deepseek-ai/dsh-shell-env": "0.
|
|
61
|
-
"@deepseek-ai/dsh-subprocess-local": "0.
|
|
62
|
-
"@deepseek-ai/dsh-
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
65
|
-
"@deepseek-ai/dsh-
|
|
47
|
+
"@deepseek-ai/dsh-agent": "0.2.0-rc.2",
|
|
48
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.0-rc.2",
|
|
49
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.0-rc.2",
|
|
50
|
+
"@deepseek-ai/dsh-app-boot": "0.2.0-rc.2",
|
|
51
|
+
"@deepseek-ai/dsh-jobs": "0.2.0-rc.2",
|
|
52
|
+
"@deepseek-ai/dsh-jobs-local": "0.2.0-rc.2",
|
|
53
|
+
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
54
|
+
"@deepseek-ai/dsh-pwsh-local": "0.2.0-rc.2",
|
|
55
|
+
"@deepseek-ai/dsh-sandbox": "0.2.0-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.0-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-session-projection": "0.2.0-rc.2",
|
|
58
|
+
"@deepseek-ai/dsh-shell": "0.2.0-rc.2",
|
|
59
|
+
"@deepseek-ai/dsh-shell-env": "0.2.0-rc.2",
|
|
60
|
+
"@deepseek-ai/dsh-subprocess-local": "0.2.0-rc.2",
|
|
61
|
+
"@deepseek-ai/dsh-loader-smoke": "0.2.0-rc.2",
|
|
62
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
|
|
63
|
+
"@deepseek-ai/dsh-tool-jobs": "0.2.0-rc.2",
|
|
64
|
+
"@deepseek-ai/dsh-user-approval": "0.2.0-rc.2",
|
|
65
|
+
"@deepseek-ai/dsh-tools": "0.2.0-rc.2"
|
|
66
66
|
}
|
|
67
67
|
}
|