@deepseek-ai/dsh-tool-bash-persistent 0.1.6-alpha.2 → 0.1.7-alpha.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
@@ -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-bash-persistent/README.md
5
- README.md: f6d6daa0f9c312b64e913aa811fadff3ad6b6acf
6
- README.zh.md: 19f88c9c130a0bb1001770869355b88cae943644
5
+ README.md: f22004aa61b6099998d8a9e9a62cea7c6e5c3cf9
6
+ README.zh.md: 6735ede17f63b9bfe5dc46581578435b07231806
package/README.md CHANGED
@@ -56,7 +56,7 @@ Commands share one shell per agent, so state persists until an `exit`, a timeout
56
56
 
57
57
  ### What can go wrong
58
58
 
59
- A call without an owning agent session fails with `bash requires an owning agent session`, and a composition without a PTY backend activates the tool but fails its first call with `no PTY backend registered for "shell"`. An interactive foreground child (for example a REPL) returns early with partial output only where the backend proves its stdin wait; elsewhere the call runs to `timeoutMs`, which closes the uncertain shell and reports the reset. Cancellation also resets and discards the result, even when a complete status marker is already observable.
59
+ A call without an owning agent session fails with `bash requires an owning agent session`, and a composition without a PTY backend activates the tool but fails its first call with `no PTY backend registered for "shell"`. An interactive foreground child (for example a REPL) returns early with partial output only where the backend proves its stdin wait; elsewhere the call runs to `timeoutMs`, which closes the uncertain shell and reports the reset. Cancellation also resets and discards the result, even when a complete status marker is already observable. 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.
60
60
 
61
61
  -----
62
62
 
package/README.zh.md CHANGED
@@ -56,7 +56,7 @@ kind: "package-reference"
56
56
 
57
57
  ### 可能出什么问题
58
58
 
59
- 没有拥有者 agent 会话的调用会以 `bash requires an owning agent session` 失败,没有 PTY 后端的组合会激活该工具,但首次调用以 `no PTY backend registered for "shell"` 失败。交互式前台子进程(例如 REPL)只有在后端证明其 stdin 等待时才提前返回部分输出;否则调用一直运行到 `timeoutMs`,随后关闭不确定的 shell 并报告重置。取消也会重置并丢弃结果,即使完整状态标记已经可观察。
59
+ 没有拥有者 agent 会话的调用会以 `bash requires an owning agent session` 失败,没有 PTY 后端的组合会激活该工具,但首次调用以 `no PTY backend registered for "shell"` 失败。交互式前台子进程(例如 REPL)只有在后端证明其 stdin 等待时才提前返回部分输出;否则调用一直运行到 `timeoutMs`,随后关闭不确定的 shell 并报告重置。取消也会重置并丢弃结果,即使完整状态标记已经可观察。清理完成后,ToolRuntime 发布 `Error: tool call aborted`,错误码为 `ABORTED`;取消原因不作为命令输出渲染。排队期间被取消的调用不发送命令。
60
60
 
61
61
  -----
62
62
 
package/lib/index.js CHANGED
@@ -249,7 +249,13 @@ async function executeCommand(ctx, shells, owner, command, config, upstream) {
249
249
  };
250
250
  try {
251
251
  const commandDeadline = __addDisposableResource(env_1, deadline(upstream, config.timeoutMs, TIMEOUT_CODE), false);
252
- const id = await shells.get(owner, commandDeadline.signal);
252
+ let id;
253
+ try {
254
+ id = await shells.get(owner, commandDeadline.signal);
255
+ } catch (error) {
256
+ if (upstream.aborted && error === upstream.reason) return "";
257
+ throw error;
258
+ }
253
259
  const marker = markers();
254
260
  const wrapped = wrapCommand(command, marker);
255
261
  let first = true;
@@ -291,7 +297,7 @@ async function executeCommand(ctx, shells, owner, command, config, upstream) {
291
297
  }
292
298
  if (commandDeadline.signal.aborted) {
293
299
  await shells.reset(owner, "persistent bash command aborted");
294
- commandDeadline.signal.throwIfAborted();
300
+ return "";
295
301
  }
296
302
  if (latest.text.includes(marker.end)) {
297
303
  const complete = commandOutput(retainedScrollback(ctx, owner, id, latest), marker);
@@ -346,7 +352,7 @@ function registerPersistentBash(ctx, config) {
346
352
  const owner = exec.agent;
347
353
  if (owner === void 0) throw new Error("bash requires an owning agent session");
348
354
  return serialized(owner, async () => {
349
- exec.signal.throwIfAborted();
355
+ if (exec.signal.aborted) return "";
350
356
  return executeCommand(ctx, shells, owner, args.command, config, exec.signal);
351
357
  });
352
358
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-tool-bash-persistent",
3
3
  "description": "Model-facing owner-scoped persistent Bash tool backed by the Harness PTY service",
4
- "version": "0.1.6-alpha.2",
4
+ "version": "0.1.7-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -26,31 +26,31 @@
26
26
  ],
27
27
  "license": "MIT",
28
28
  "peerDependencies": {
29
- "@deepseek-ai/dsh-agent": "^0.1.6-alpha.2",
30
- "@deepseek-ai/dsh-timeout": "^0.1.6-alpha.2",
31
- "@deepseek-ai/dsh-tools": "^0.1.6-alpha.2",
32
- "@deepseek-ai/cordis": "^4.0.2",
33
- "@deepseek-ai/dsh-terminal": "^0.1.6-alpha.2"
29
+ "@deepseek-ai/dsh-terminal": "0.1.7-alpha.2",
30
+ "@deepseek-ai/dsh-timeout": "0.1.7-alpha.2",
31
+ "@deepseek-ai/dsh-tools": "0.1.7-alpha.2",
32
+ "@deepseek-ai/dsh-agent": "0.1.7-alpha.2",
33
+ "@deepseek-ai/cordis": "~4.0.4"
34
34
  },
35
35
  "dependencies": {
36
- "@deepseek-ai/schemastery": "^3.18.2"
36
+ "@deepseek-ai/schemastery": "~3.18.4"
37
37
  },
38
38
  "devDependencies": {
39
- "@deepseek-ai/cordis-plugin-include": "^1.0.7",
40
- "@deepseek-ai/cordis-plugin-loader": "^1.0.3",
41
- "@deepseek-ai/dsh-agent": "^0.1.6-alpha.2",
42
- "@deepseek-ai/dsh-agent-loop-testkit": "^0.1.6-alpha.2",
43
- "@deepseek-ai/dsh-llm": "^0.1.6-alpha.2",
44
- "@deepseek-ai/dsh-terminal": "^0.1.6-alpha.2",
45
- "@deepseek-ai/dsh-terminal-bash": "^0.1.6-alpha.2",
46
- "@deepseek-ai/dsh-sandbox": "^0.1.6-alpha.2",
47
- "@deepseek-ai/dsh-sandbox-policy": "^0.1.6-alpha.2",
48
- "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
49
- "@deepseek-ai/dsh-subprocess-local": "^0.1.6-alpha.2",
50
- "@deepseek-ai/dsh-timeout": "^0.1.6-alpha.2",
51
- "@deepseek-ai/dsh-tools": "^0.1.6-alpha.2",
52
- "@deepseek-ai/cordis": "^4.0.2",
53
- "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.2",
54
- "@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.2"
39
+ "@deepseek-ai/cordis-plugin-include": "~1.0.9",
40
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.5",
41
+ "@deepseek-ai/dsh-agent": "0.1.7-alpha.2",
42
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.1.7-alpha.2",
43
+ "@deepseek-ai/dsh-llm": "0.1.7-alpha.2",
44
+ "@deepseek-ai/dsh-terminal-bash": "0.1.7-alpha.2",
45
+ "@deepseek-ai/dsh-terminal": "0.1.7-alpha.2",
46
+ "@deepseek-ai/dsh-sandbox": "0.1.7-alpha.2",
47
+ "@deepseek-ai/dsh-sandbox-policy": "0.1.7-alpha.2",
48
+ "@deepseek-ai/dsh-subprocess-local": "0.1.7-alpha.2",
49
+ "@deepseek-ai/dsh-session": "0.1.7-alpha.2",
50
+ "@deepseek-ai/dsh-system-prompt": "0.1.7-alpha.2",
51
+ "@deepseek-ai/dsh-timeout": "0.1.7-alpha.2",
52
+ "@deepseek-ai/dsh-tools": "0.1.7-alpha.2",
53
+ "@deepseek-ai/dsh-session-projection": "0.1.7-alpha.2",
54
+ "@deepseek-ai/cordis": "~4.0.4"
55
55
  }
56
56
  }