@deepseek-ai/dsh-tool-pwsh-persistent 0.1.6-alpha.2 → 0.1.7-alpha.1
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 +9 -3
- package/package.json +24 -24
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/shell/tool-pwsh-persistent/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: f90442e7e9d8a361a690f66f41a58f1a4fcdd708
|
|
6
|
+
README.zh.md: d634e8e42e186318a8733ee9ef2024e2840a857c
|
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ Commands share one shell per agent, so cwd, `$env:` variables, functions, and ba
|
|
|
58
58
|
|
|
59
59
|
### What can go wrong
|
|
60
60
|
|
|
61
|
-
A call without an owning agent session fails with `pwsh requires an owning agent session`, and a composition without a pwsh-dialect PTY backend activates the tool but fails its first call with `no PTY backend registered for "shell"`. A model redefinition of the `prompt` function removes the readiness marker, and the shell then settles on the silence tier instead of the marker fast path. Raw ESC characters inside a command are consumed by PSReadLine before execution and are unsupported. A timeout
|
|
61
|
+
A call without an owning agent session fails with `pwsh requires an owning agent session`, and a composition without a pwsh-dialect PTY backend activates the tool but fails its first call with `no PTY backend registered for "shell"`. A model redefinition of the `prompt` function removes the readiness marker, and the shell then settles on the silence tier instead of the marker fast path. Raw ESC characters inside a command are consumed by PSReadLine before execution and are unsupported. A timeout closes the uncertain shell and reports bounded partial output and the reset. Cancellation resets the shell and discards command output. After cleanup settles, ToolRuntime publishes `Error: tool call aborted` with code `ABORTED`; cancellation reasons are not rendered as command output. A queued cancelled call sends no command.
|
|
62
62
|
|
|
63
63
|
-----
|
|
64
64
|
|
package/README.zh.md
CHANGED
|
@@ -58,7 +58,7 @@ kind: "package-reference"
|
|
|
58
58
|
|
|
59
59
|
### 可能出什么问题
|
|
60
60
|
|
|
61
|
-
没有拥有者 agent 会话的调用会以 `pwsh requires an owning agent session` 失败,没有 pwsh 方言 PTY 后端的组合会激活该工具,但首次调用以 `no PTY backend registered for "shell"` 失败。模型重定义 `prompt` 函数会移除就绪标记,shell 随后在静默层级而非标记快路径上结算。命令内的原始 ESC 字符会在执行前被 PSReadLine
|
|
61
|
+
没有拥有者 agent 会话的调用会以 `pwsh requires an owning agent session` 失败,没有 pwsh 方言 PTY 后端的组合会激活该工具,但首次调用以 `no PTY backend registered for "shell"` 失败。模型重定义 `prompt` 函数会移除就绪标记,shell 随后在静默层级而非标记快路径上结算。命令内的原始 ESC 字符会在执行前被 PSReadLine 消费,不受支持。超时关闭不确定的 shell,并报告受限的部分输出与重置。取消会重置 shell 并丢弃命令输出。清理完成后,ToolRuntime 发布 `Error: tool call aborted`,错误码为 `ABORTED`;取消原因不作为命令输出渲染。排队期间被取消的调用不发送命令。
|
|
62
62
|
|
|
63
63
|
-----
|
|
64
64
|
|
package/lib/index.js
CHANGED
|
@@ -273,7 +273,13 @@ async function executeCommand(ctx, shells, owner, command, config, upstream) {
|
|
|
273
273
|
};
|
|
274
274
|
try {
|
|
275
275
|
const commandDeadline = __addDisposableResource(env_1, deadline(upstream, config.timeoutMs, TIMEOUT_CODE), false);
|
|
276
|
-
|
|
276
|
+
let id;
|
|
277
|
+
try {
|
|
278
|
+
id = await shells.get(owner, commandDeadline.signal);
|
|
279
|
+
} catch (error) {
|
|
280
|
+
if (upstream.aborted && error === upstream.reason) return "";
|
|
281
|
+
throw error;
|
|
282
|
+
}
|
|
277
283
|
const marker = markers();
|
|
278
284
|
const wrapped = wrapCommand(command, marker);
|
|
279
285
|
let first = true;
|
|
@@ -315,7 +321,7 @@ async function executeCommand(ctx, shells, owner, command, config, upstream) {
|
|
|
315
321
|
}
|
|
316
322
|
if (commandDeadline.signal.aborted) {
|
|
317
323
|
await shells.reset(owner, "persistent pwsh command aborted");
|
|
318
|
-
|
|
324
|
+
return "";
|
|
319
325
|
}
|
|
320
326
|
if (latest.text.includes(marker.end)) {
|
|
321
327
|
const complete = commandOutput(retainedScrollback(ctx, owner, id, latest), marker, wrapped);
|
|
@@ -370,7 +376,7 @@ function registerPersistentPwsh(ctx, config) {
|
|
|
370
376
|
const owner = exec.agent;
|
|
371
377
|
if (owner === void 0) throw new Error("pwsh requires an owning agent session");
|
|
372
378
|
return serialized(owner, async () => {
|
|
373
|
-
exec.signal.
|
|
379
|
+
if (exec.signal.aborted) return "";
|
|
374
380
|
return executeCommand(ctx, shells, owner, args.command, config, exec.signal);
|
|
375
381
|
});
|
|
376
382
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-tool-pwsh-persistent",
|
|
3
3
|
"description": "Model-facing owner-scoped persistent PowerShell tool backed by the Harness PTY service",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -26,32 +26,32 @@
|
|
|
26
26
|
],
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@deepseek-ai/dsh-
|
|
30
|
-
"@deepseek-ai/dsh-
|
|
31
|
-
"@deepseek-ai/dsh-
|
|
32
|
-
"@deepseek-ai/
|
|
33
|
-
"@deepseek-ai/
|
|
29
|
+
"@deepseek-ai/dsh-agent": "^0.1.7-alpha.1",
|
|
30
|
+
"@deepseek-ai/dsh-terminal": "^0.1.7-alpha.1",
|
|
31
|
+
"@deepseek-ai/dsh-timeout": "^0.1.7-alpha.1",
|
|
32
|
+
"@deepseek-ai/dsh-tools": "^0.1.7-alpha.1",
|
|
33
|
+
"@deepseek-ai/cordis": "^4.0.3"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
36
|
+
"@deepseek-ai/schemastery": "^3.18.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@deepseek-ai/cordis-plugin-
|
|
40
|
-
"@deepseek-ai/cordis-plugin-
|
|
41
|
-
"@deepseek-ai/dsh-agent
|
|
42
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
43
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
44
|
-
"@deepseek-ai/dsh-terminal": "^0.1.
|
|
45
|
-
"@deepseek-ai/dsh-terminal-bash": "^0.1.
|
|
46
|
-
"@deepseek-ai/dsh-pwsh-local": "^0.1.
|
|
47
|
-
"@deepseek-ai/dsh-sandbox": "^0.1.
|
|
48
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
39
|
+
"@deepseek-ai/cordis-plugin-include": "^1.0.8",
|
|
40
|
+
"@deepseek-ai/cordis-plugin-loader": "^1.0.4",
|
|
41
|
+
"@deepseek-ai/dsh-agent": "^0.1.7-alpha.1",
|
|
42
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.7-alpha.1",
|
|
43
|
+
"@deepseek-ai/dsh-llm": "^0.1.7-alpha.1",
|
|
44
|
+
"@deepseek-ai/dsh-terminal": "^0.1.7-alpha.1",
|
|
45
|
+
"@deepseek-ai/dsh-terminal-bash": "^0.1.7-alpha.1",
|
|
46
|
+
"@deepseek-ai/dsh-pwsh-local": "^0.1.7-alpha.1",
|
|
47
|
+
"@deepseek-ai/dsh-sandbox": "^0.1.7-alpha.1",
|
|
48
|
+
"@deepseek-ai/dsh-session": "^0.1.7-alpha.1",
|
|
49
|
+
"@deepseek-ai/dsh-sandbox-policy": "^0.1.7-alpha.1",
|
|
50
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.7-alpha.1",
|
|
51
|
+
"@deepseek-ai/dsh-subprocess-local": "^0.1.7-alpha.1",
|
|
52
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.7-alpha.1",
|
|
53
|
+
"@deepseek-ai/dsh-timeout": "^0.1.7-alpha.1",
|
|
54
|
+
"@deepseek-ai/dsh-tools": "^0.1.7-alpha.1",
|
|
55
|
+
"@deepseek-ai/cordis": "^4.0.3"
|
|
56
56
|
}
|
|
57
57
|
}
|