@alibaba-group/opensandbox-code-interpreter 0.1.0-dev3 → 0.1.0-dev4

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.md CHANGED
@@ -76,6 +76,7 @@ console.log(result.result[0]?.text);
76
76
 
77
77
  // 7. Cleanup remote instance (optional but recommended)
78
78
  await sandbox.kill();
79
+ await sandbox.close();
79
80
  ```
80
81
 
81
82
  ## Runtime Configuration
@@ -182,6 +183,6 @@ await ci.codes.run("import time\nfor i in range(5):\n print(i)\n time.slee
182
183
 
183
184
  ## Notes
184
185
 
185
- - **Lifecycle**: `CodeInterpreter` wraps an existing `Sandbox` instance and reuses its connection configuration.
186
+ - **Lifecycle**: `CodeInterpreter` wraps an existing `Sandbox` instance and reuses its connection configuration. Each sandbox instance clones the transport via `ConnectionConfig.withTransportIfMissing()`, so call `sandbox.close()` when you are finished to release the Node.js keep-alive agent and avoid leak.
186
187
  - **Default context**: `codes.run(..., { language })` uses a language default context (state can persist across runs).
187
188
 
@@ -1 +1 @@
1
- {"version":3,"file":"defaultAdapterFactory.d.ts","sourceRoot":"","sources":["../../src/factory/defaultAdapterFactory.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,qBAAa,qBAAsB,YAAW,cAAc;IAC1D,WAAW,CAAC,IAAI,EAAE,uBAAuB,GAAG,KAAK;CAclD;AAED,wBAAgB,2BAA2B,IAAI,cAAc,CAE5D"}
1
+ {"version":3,"file":"defaultAdapterFactory.d.ts","sourceRoot":"","sources":["../../src/factory/defaultAdapterFactory.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,qBAAa,qBAAsB,YAAW,cAAc;IAC1D,WAAW,CAAC,IAAI,EAAE,uBAAuB,GAAG,KAAK;CAclD;AAED,wBAAgB,2BAA2B,IAAI,cAAc,CAE5D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alibaba-group/opensandbox-code-interpreter",
3
- "version": "0.1.0-dev3",
3
+ "version": "0.1.0-dev4",
4
4
  "description": "OpenSandbox Code Interpreter TypeScript/JavaScript SDK",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -29,7 +29,7 @@
29
29
  "node": ">=20"
30
30
  },
31
31
  "dependencies": {
32
- "@alibaba-group/opensandbox": "^0.1.0-dev3"
32
+ "@alibaba-group/opensandbox": "^0.1.0-dev4"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@eslint/js": "^9.39.2",