tensorlake 0.5.141 → 0.5.143

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.
Files changed (31) hide show
  1. package/dist/applications/index.cjs +16 -7
  2. package/dist/applications/index.cjs.map +1 -1
  3. package/dist/applications/index.d.cts +2 -2
  4. package/dist/applications/index.d.ts +2 -2
  5. package/dist/applications/index.js +16 -7
  6. package/dist/applications/index.js.map +1 -1
  7. package/dist/function-agent/main.cjs +1 -1
  8. package/dist/function-agent/main.js +1 -1
  9. package/dist/function-executor/main.cjs +2 -2
  10. package/dist/function-executor/main.js +2 -2
  11. package/dist/index.cjs +18 -9
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +21 -9
  14. package/dist/index.d.ts +21 -9
  15. package/dist/index.js +18 -9
  16. package/dist/index.js.map +1 -1
  17. package/dist/{remote-D95Y6Czr.d.cts → remote-CNJ9TmcQ.d.cts} +2 -1
  18. package/dist/{remote-omwTzbfj.d.ts → remote-dblFxKug.d.ts} +2 -1
  19. package/dist/sandbox-image.cjs +2 -2
  20. package/dist/sandbox-image.cjs.map +1 -1
  21. package/dist/sandbox-image.js +2 -2
  22. package/dist/sandbox-image.js.map +1 -1
  23. package/package.json +7 -7
  24. package/runtime/function-executor/manifest.json +5 -5
  25. package/runtime/function-executor/package/dist/function-executor/main.js +2 -2
  26. package/runtime/function-executor/package/npm-shrinkwrap.json +2 -2
  27. package/runtime/function-executor/package/package.json +1 -1
  28. package/runtime/typescript-function-runner/manifest.json +5 -5
  29. package/runtime/typescript-function-runner/package/dist/function-agent/main.js +1 -1
  30. package/runtime/typescript-function-runner/package/npm-shrinkwrap.json +20 -20
  31. package/runtime/typescript-function-runner/package/package.json +7 -7
@@ -49,7 +49,7 @@ var init_defaults = __esm({
49
49
  "src/defaults.ts"() {
50
50
  "use strict";
51
51
  init_cjs_shims();
52
- SDK_VERSION = "0.5.141";
52
+ SDK_VERSION = "0.5.143";
53
53
  API_URL = process.env.TENSORLAKE_API_URL ?? "https://api.tensorlake.ai";
54
54
  API_KEY = process.env.TENSORLAKE_API_KEY ?? void 0;
55
55
  NAMESPACE = process.env.INDEXIFY_NAMESPACE ?? "default";
@@ -517,7 +517,7 @@ var init_native_worker_client = __esm({
517
517
  }
518
518
  };
519
519
  runtimeKey = /* @__PURE__ */ Symbol.for(
520
- `tensorlake.native.worker.${false ? "source" : "0.5.141"}.v1`
520
+ `tensorlake.native.worker.${false ? "source" : "0.5.143"}.v1`
521
521
  );
522
522
  runtimes = globalThis;
523
523
  }
@@ -4039,15 +4039,21 @@ var FilesystemClient = class {
4039
4039
  this.cli = new FsCli(envOverrides);
4040
4040
  }
4041
4041
  // -- lifecycle --------------------------------------------------------------
4042
- /** Create a new filesystem and return a handle to it. */
4043
- async create(name) {
4042
+ /** Create a filesystem; region fixes its storage placement. Forks inherit placement. */
4043
+ async create(name, options = {}) {
4044
4044
  if (typeof name !== "string") {
4045
4045
  throw new TypeError("name must be a string");
4046
4046
  }
4047
4047
  if (name.length === 0) {
4048
4048
  throw new FilesystemError("filesystem name must not be empty");
4049
4049
  }
4050
- const raw = await callNative2(() => this.native.createFilesystem(name));
4050
+ const { region } = options;
4051
+ if (region !== void 0 && (typeof region !== "string" || region.length === 0 || region.trim() !== region)) {
4052
+ throw new FilesystemError(
4053
+ "region must be a nonempty string without surrounding whitespace"
4054
+ );
4055
+ }
4056
+ const raw = await callNative2(() => region === void 0 ? this.native.createFilesystem(name) : this.native.createFilesystem(name, region));
4051
4057
  const created = JSON.parse(raw);
4052
4058
  return new Filesystem(
4053
4059
  this,
@@ -4503,8 +4509,11 @@ var APIClient = class {
4503
4509
  async deleteSandboxImage(imageName) {
4504
4510
  await this.cloudClient.deleteSandboxImage(imageName);
4505
4511
  }
4506
- async createFileSystem(name, description, _options) {
4507
- const filesystem = await new FilesystemClient(this.filesystemOptions).create(name);
4512
+ async createFileSystem(name, description, options) {
4513
+ const filesystem = await new FilesystemClient(this.filesystemOptions).create(
4514
+ name,
4515
+ { region: options?.region }
4516
+ );
4508
4517
  return {
4509
4518
  id: filesystem.name,
4510
4519
  name: filesystem.name,