tensorlake 0.5.95 → 0.5.103

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/dist/index.cjs CHANGED
@@ -35,7 +35,7 @@ var SDK_VERSION, API_URL, API_KEY, NAMESPACE, SANDBOX_PROXY_URL, DEFAULT_HTTP_TI
35
35
  var init_defaults = __esm({
36
36
  "src/defaults.ts"() {
37
37
  "use strict";
38
- SDK_VERSION = "0.5.95";
38
+ SDK_VERSION = "0.5.103";
39
39
  API_URL = process.env.TENSORLAKE_API_URL ?? "https://api.tensorlake.ai";
40
40
  API_KEY = process.env.TENSORLAKE_API_KEY ?? void 0;
41
41
  NAMESPACE = process.env.INDEXIFY_NAMESPACE ?? "default";
@@ -3455,10 +3455,12 @@ var init_sandbox = __esm({
3455
3455
  return info.status;
3456
3456
  }
3457
3457
  /**
3458
- * Update this sandbox's properties (name, exposed ports, proxy auth).
3458
+ * Update this sandbox's properties (name, exposed ports, proxy auth, and
3459
+ * egress network policy).
3459
3460
  *
3460
3461
  * Naming an ephemeral sandbox makes it non-ephemeral and enables
3461
- * suspend/resume.
3462
+ * suspend/resume. For `network`, omit to keep the current policy, pass an
3463
+ * object to replace it, or pass `null` to clear it to unrestricted egress.
3462
3464
  */
3463
3465
  async update(options) {
3464
3466
  const client = this.requireLifecycleClient("update");
@@ -4324,6 +4326,9 @@ var init_client = __esm({
4324
4326
  if (options.exposedPorts != null) {
4325
4327
  body.exposed_ports = normalizeUserPorts(options.exposedPorts);
4326
4328
  }
4329
+ if (options.network !== void 0) {
4330
+ body.network = options.network === null ? null : toSnakeKeys(options.network);
4331
+ }
4327
4332
  if (Object.keys(body).length === 0) {
4328
4333
  throw new SandboxError(
4329
4334
  "At least one sandbox update field must be provided."