@deepseek-ai/dsh-tool-bash-persistent 0.0.1-rc.2 → 0.0.1-rc.5

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,6 @@
1
1
  # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
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
- # pnpm run verify-translation-pairing --write packages/pty/tool-bash-persistent/README.md
5
- README.md: cfb3acf41803f5b06ecb3f56ee8ffc29ce9147b1
6
- README.zh.md: cf35a212159e7d12e1bdaa146b32b397d916a912
4
+ # pnpm run verify-translation-pairing --write packages/shell/tool-bash-persistent/README.md
5
+ README.md: 37c259443cba566350d8ec7963857d5f6ce7396c
6
+ README.zh.md: 8f3cf4e4d20aad1537b48644cee1a9d5706f4b3c
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [中文](README.zh.md)
4
4
 
5
- Model-facing `bash(command)` backed by one owner-scoped `ctx.pty` shell. The package owns the tool contract and shell reuse; deployments select the PTY backend and sandbox policy.
5
+ Model-facing `bash(command)` backed by one owner-scoped `ctx.terminals` shell. The package owns the tool contract and shell reuse; deployments select the PTY backend and sandbox policy.
6
6
 
7
7
  ## Config
8
8
 
package/README.zh.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](README.md) | 中文
4
4
 
5
- 模型可见的 `bash(command)`,底层复用一个按所有者隔离的 `ctx.pty` shell。该包拥有工具约定和 shell 复用;PTY 后端与沙箱策略由部署选择。
5
+ 模型可见的 `bash(command)`,底层复用一个按所有者隔离的 `ctx.terminals` shell。该包拥有工具约定和 shell 复用;PTY 后端与沙箱策略由部署选择。
6
6
 
7
7
  ## 配置
8
8
 
package/lib/index.js CHANGED
@@ -132,7 +132,7 @@ function nextScrollbackOffset(page, offset) {
132
132
  if (page.text.length === 0 || page.lineEnd <= offset) return void 0;
133
133
  return page.lineEnd;
134
134
  }
135
- function retainedScrollback(ctx, owner, id, latest = ctx.pty.read(owner, id, {
135
+ function retainedScrollback(ctx, owner, id, latest = ctx.terminals.read(owner, id, {
136
136
  offset: 0,
137
137
  count: SCROLLBACK_PAGE_LINES
138
138
  })) {
@@ -141,7 +141,7 @@ function retainedScrollback(ctx, owner, id, latest = ctx.pty.read(owner, id, {
141
141
  let truncated = latest.truncated;
142
142
  while (true) {
143
143
  if (offset >= latest.totalLines) break;
144
- const page = ctx.pty.read(owner, id, {
144
+ const page = ctx.terminals.read(owner, id, {
145
145
  offset,
146
146
  count: SCROLLBACK_PAGE_LINES
147
147
  });
@@ -174,8 +174,8 @@ function persistentShells(ctx, config) {
174
174
  const ownerCleanupInstalled = /* @__PURE__ */ new WeakSet();
175
175
  const lifecycle = new AbortController();
176
176
  const close = async (owner, id, reason) => {
177
- if (!ctx.pty.list(owner).some((snapshot) => snapshot.sessionId === id)) return;
178
- await ctx.pty.kill(owner, id, reason);
177
+ if (!ctx.terminals.list(owner).some((snapshot) => snapshot.sessionId === id)) return;
178
+ await ctx.terminals.kill(owner, id, reason);
179
179
  };
180
180
  ctx.effect(() => async () => {
181
181
  lifecycle.abort(/* @__PURE__ */ new Error("tool-bash-persistent disposed during shell creation"));
@@ -199,7 +199,7 @@ function persistentShells(ctx, config) {
199
199
  const tracked = (async () => {
200
200
  try {
201
201
  const cwd = owner.session.header.cwd;
202
- const spawned = await ctx.pty.spawn(owner, {
202
+ const spawned = await ctx.terminals.spawn(owner, {
203
203
  type: config.backendType,
204
204
  ...cwd === void 0 ? {} : { cwd }
205
205
  }, combinedSignal);
@@ -211,7 +211,7 @@ function persistentShells(ctx, config) {
211
211
  live.delete(owner);
212
212
  }, "tool-bash-persistent owner cache cleanup");
213
213
  }
214
- const result = await ctx.pty.startSend(owner, spawned.sessionId, {
214
+ const result = await ctx.terminals.startSend(owner, spawned.sessionId, {
215
215
  text: `stty -echo; PS1=${quoteForBash(SHELL_PROMPT)}`,
216
216
  submit: true,
217
217
  signal: combinedSignal
@@ -252,7 +252,7 @@ async function executeCommand(ctx, shells, owner, command, config, upstream) {
252
252
  let operation;
253
253
  let result;
254
254
  try {
255
- operation = ctx.pty.startSend(owner, id, {
255
+ operation = ctx.terminals.startSend(owner, id, {
256
256
  text: first ? wrapped : "",
257
257
  submit: first,
258
258
  signal: commandDeadline.signal
@@ -266,7 +266,7 @@ async function executeCommand(ctx, shells, owner, command, config, upstream) {
266
266
  const incremental = operation.readOutput();
267
267
  fallback = incremental.delta.length > 0 ? fallback + incremental.delta : result.viewport;
268
268
  fallbackTruncated ||= incremental.truncated || result.truncated;
269
- const latest = ctx.pty.read(owner, id, {
269
+ const latest = ctx.terminals.read(owner, id, {
270
270
  offset: 0,
271
271
  count: SCROLLBACK_PAGE_LINES
272
272
  });
@@ -352,7 +352,7 @@ function registerPersistentBash(ctx, config) {
352
352
  }));
353
353
  }
354
354
  const name = "tool-bash-persistent";
355
- const inject = ["tools", "pty"];
355
+ const inject = ["tools", "terminals"];
356
356
  /** Runtime configuration schema for the persistent Bash tool. */
357
357
  const Config = z.object({
358
358
  backendType: z.string().default("shell"),
package/package.json CHANGED
@@ -1,14 +1,14 @@
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.0.1-rc.2",
4
+ "version": "0.0.1-rc.5",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
11
- "directory": "packages/pty/tool-bash-persistent"
11
+ "directory": "packages/shell/tool-bash-persistent"
12
12
  },
13
13
  "type": "module",
14
14
  "main": "lib/index.js",
@@ -31,31 +31,31 @@
31
31
  ],
32
32
  "license": "BSD-3-Clause",
33
33
  "peerDependencies": {
34
- "@deepseek-ai/dsh-agent": "^0.0.1-rc.2",
35
- "@deepseek-ai/dsh-pty": "^0.0.1-rc.2",
36
- "@deepseek-ai/dsh-timeout": "^0.0.1-rc.2",
37
- "@deepseek-ai/dsh-tools": "^0.0.1-rc.2",
38
- "@deepseek-ai/cordis": "^4.0.1-rc.1",
39
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2"
34
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.5",
35
+ "@deepseek-ai/dsh-terminal": "^0.0.1-rc.5",
36
+ "@deepseek-ai/dsh-tools": "^0.0.1-rc.5",
37
+ "@deepseek-ai/cordis": "^4.0.1-rc.4",
38
+ "@deepseek-ai/dsh-timeout": "^0.0.1-rc.5",
39
+ "@deepseek-ai/dsh-agent": "^0.0.1-rc.5"
40
40
  },
41
41
  "dependencies": {
42
- "@deepseek-ai/schemastery": "^3.18.1-rc.1"
42
+ "@deepseek-ai/schemastery": "^3.18.1-rc.4"
43
43
  },
44
44
  "devDependencies": {
45
- "@deepseek-ai/cordis-plugin-include": "^1.0.5-rc.1",
46
- "@deepseek-ai/cordis-plugin-loader": "^1.0.1-rc.1",
47
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
48
- "@deepseek-ai/dsh-llm": "^0.0.1-rc.2",
49
- "@deepseek-ai/dsh-agent": "^0.0.1-rc.2",
50
- "@deepseek-ai/dsh-pty": "^0.0.1-rc.2",
51
- "@deepseek-ai/dsh-pty-local": "^0.0.1-rc.2",
52
- "@deepseek-ai/dsh-sandbox": "^0.0.1-rc.2",
53
- "@deepseek-ai/dsh-sandbox-policy": "^0.0.1-rc.2",
54
- "@deepseek-ai/dsh-session": "^0.0.1-rc.2",
55
- "@deepseek-ai/dsh-subprocess-local": "^0.0.1-rc.2",
56
- "@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.2",
57
- "@deepseek-ai/dsh-timeout": "^0.0.1-rc.2",
58
- "@deepseek-ai/dsh-tools": "^0.0.1-rc.2",
59
- "@deepseek-ai/cordis": "^4.0.1-rc.1"
45
+ "@deepseek-ai/cordis-plugin-include": "^1.0.6-rc.4",
46
+ "@deepseek-ai/cordis-plugin-loader": "^1.0.2-rc.4",
47
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.5",
48
+ "@deepseek-ai/dsh-agent": "^0.0.1-rc.5",
49
+ "@deepseek-ai/dsh-llm": "^0.0.1-rc.5",
50
+ "@deepseek-ai/dsh-terminal-bash": "^0.0.1-rc.5",
51
+ "@deepseek-ai/dsh-terminal": "^0.0.1-rc.5",
52
+ "@deepseek-ai/dsh-sandbox": "^0.0.1-rc.5",
53
+ "@deepseek-ai/dsh-sandbox-policy": "^0.0.1-rc.5",
54
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.5",
55
+ "@deepseek-ai/dsh-subprocess-local": "^0.0.1-rc.5",
56
+ "@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.5",
57
+ "@deepseek-ai/dsh-timeout": "^0.0.1-rc.5",
58
+ "@deepseek-ai/dsh-tools": "^0.0.1-rc.5",
59
+ "@deepseek-ai/cordis": "^4.0.1-rc.4"
60
60
  }
61
61
  }