@sandbank.dev/core 0.3.4 → 0.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,mBAAmB,EASpB,MAAM,oBAAoB,CAAA;AAI3B,wBAAsB,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,CA6VjF"}
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,mBAAmB,EASpB,MAAM,oBAAoB,CAAA;AAI3B,wBAAsB,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,CAoWjF"}
package/dist/session.js CHANGED
@@ -303,6 +303,10 @@ export async function createSession(config) {
303
303
  }
304
304
  }
305
305
  completionWaiters.clear();
306
+ // 先 unregister 所有沙箱(relay 仍可达时通知清理)
307
+ await Promise.allSettled([...sandboxes.entries()]
308
+ .filter(([, sb]) => sb != null)
309
+ .map(([name]) => rpcCall('session.unregister', { name }).catch(() => { })));
306
310
  // 并行销毁所有沙箱(在断开 WebSocket 前,确保 relay 仍可达)
307
311
  // Filter out null placeholders from in-progress spawns
308
312
  await Promise.allSettled([...sandboxes.values()].filter(Boolean).map(sandbox => config.provider.destroy(sandbox.id)));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sandbank.dev/core",
3
- "version": "0.3.4",
4
- "description": "Unified sandbox SDK for AI agents provider abstraction, capability system, and error types",
3
+ "version": "0.3.5",
4
+ "description": "Unified sandbox SDK for AI agents \u2014 provider abstraction, capability system, and error types",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "homepage": "https://sandbank.dev",
@@ -10,14 +10,22 @@
10
10
  "url": "https://github.com/chekusu/sandbank.git",
11
11
  "directory": "packages/core"
12
12
  },
13
- "keywords": ["sandbox", "ai-agent", "cloud", "provider", "sdk"],
13
+ "keywords": [
14
+ "sandbox",
15
+ "ai-agent",
16
+ "cloud",
17
+ "provider",
18
+ "sdk"
19
+ ],
14
20
  "exports": {
15
21
  ".": {
16
22
  "types": "./dist/index.d.ts",
17
23
  "import": "./dist/index.js"
18
24
  }
19
25
  },
20
- "files": ["dist"],
26
+ "files": [
27
+ "dist"
28
+ ],
21
29
  "scripts": {
22
30
  "build": "tsc",
23
31
  "typecheck": "tsc --noEmit",