tensorlake 0.5.142 → 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 +9 -5
  14. package/dist/index.d.ts +9 -5
  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
@@ -1,5 +1,5 @@
1
- import { A as ApplicationCapability, J as JSONSchema, R as RegisteredDefinition } from '../remote-D95Y6Czr.cjs';
2
- export { a as ApplicationOptions, F as File, b as FunctionOptions, c as Future, H as Headers, d as HeadersInit, e as HttpBody, I as Infer, L as LocalRequest, P as Parameter, f as ParameterValues, g as RegisteredFunction, h as RemoteOptions, i as RemoteRequest, j as RequestContext, k as RequestContextValue, S as Schema, l as SimpleApplicationOptions, m as SimpleFunctionOptions, T as TailCall, W as WaitOptions, n as WaitResult, r as registerApplication, o as registerFunction, p as remoteOptions, q as retries, s as runLocal, t as runRemote, u as schema } from '../remote-D95Y6Czr.cjs';
1
+ import { A as ApplicationCapability, J as JSONSchema, R as RegisteredDefinition } from '../remote-CNJ9TmcQ.cjs';
2
+ export { a as ApplicationOptions, F as File, b as FunctionOptions, c as Future, H as Headers, d as HeadersInit, e as HttpBody, I as Infer, L as LocalRequest, P as Parameter, f as ParameterValues, g as RegisteredFunction, h as RemoteOptions, i as RemoteRequest, j as RequestContext, k as RequestContextValue, S as Schema, l as SimpleApplicationOptions, m as SimpleFunctionOptions, T as TailCall, W as WaitOptions, n as WaitResult, r as registerApplication, o as registerFunction, p as remoteOptions, q as retries, s as runLocal, t as runRemote, u as schema } from '../remote-CNJ9TmcQ.cjs';
3
3
  export { I as Image } from '../sandbox-image-ChzWDeZy.cjs';
4
4
 
5
5
  declare const SDK_VERSION: string;
@@ -1,5 +1,5 @@
1
- import { A as ApplicationCapability, J as JSONSchema, R as RegisteredDefinition } from '../remote-omwTzbfj.js';
2
- export { a as ApplicationOptions, F as File, b as FunctionOptions, c as Future, H as Headers, d as HeadersInit, e as HttpBody, I as Infer, L as LocalRequest, P as Parameter, f as ParameterValues, g as RegisteredFunction, h as RemoteOptions, i as RemoteRequest, j as RequestContext, k as RequestContextValue, S as Schema, l as SimpleApplicationOptions, m as SimpleFunctionOptions, T as TailCall, W as WaitOptions, n as WaitResult, r as registerApplication, o as registerFunction, p as remoteOptions, q as retries, s as runLocal, t as runRemote, u as schema } from '../remote-omwTzbfj.js';
1
+ import { A as ApplicationCapability, J as JSONSchema, R as RegisteredDefinition } from '../remote-dblFxKug.js';
2
+ export { a as ApplicationOptions, F as File, b as FunctionOptions, c as Future, H as Headers, d as HeadersInit, e as HttpBody, I as Infer, L as LocalRequest, P as Parameter, f as ParameterValues, g as RegisteredFunction, h as RemoteOptions, i as RemoteRequest, j as RequestContext, k as RequestContextValue, S as Schema, l as SimpleApplicationOptions, m as SimpleFunctionOptions, T as TailCall, W as WaitOptions, n as WaitResult, r as registerApplication, o as registerFunction, p as remoteOptions, q as retries, s as runLocal, t as runRemote, u as schema } from '../remote-dblFxKug.js';
3
3
  export { I as Image } from '../sandbox-image-ChzWDeZy.js';
4
4
 
5
5
  declare const SDK_VERSION: string;
@@ -46,7 +46,7 @@ var init_defaults = __esm({
46
46
  "src/defaults.ts"() {
47
47
  "use strict";
48
48
  init_esm_shims();
49
- SDK_VERSION = "0.5.142";
49
+ SDK_VERSION = "0.5.143";
50
50
  API_URL = process.env.TENSORLAKE_API_URL ?? "https://api.tensorlake.ai";
51
51
  API_KEY = process.env.TENSORLAKE_API_KEY ?? void 0;
52
52
  NAMESPACE = process.env.INDEXIFY_NAMESPACE ?? "default";
@@ -514,7 +514,7 @@ var init_native_worker_client = __esm({
514
514
  }
515
515
  };
516
516
  runtimeKey = /* @__PURE__ */ Symbol.for(
517
- `tensorlake.native.worker.${false ? "source" : "0.5.142"}.v1`
517
+ `tensorlake.native.worker.${false ? "source" : "0.5.143"}.v1`
518
518
  );
519
519
  runtimes = globalThis;
520
520
  }
@@ -4001,15 +4001,21 @@ var FilesystemClient = class {
4001
4001
  this.cli = new FsCli(envOverrides);
4002
4002
  }
4003
4003
  // -- lifecycle --------------------------------------------------------------
4004
- /** Create a new filesystem and return a handle to it. */
4005
- async create(name) {
4004
+ /** Create a filesystem; region fixes its storage placement. Forks inherit placement. */
4005
+ async create(name, options = {}) {
4006
4006
  if (typeof name !== "string") {
4007
4007
  throw new TypeError("name must be a string");
4008
4008
  }
4009
4009
  if (name.length === 0) {
4010
4010
  throw new FilesystemError("filesystem name must not be empty");
4011
4011
  }
4012
- const raw = await callNative2(() => this.native.createFilesystem(name));
4012
+ const { region } = options;
4013
+ if (region !== void 0 && (typeof region !== "string" || region.length === 0 || region.trim() !== region)) {
4014
+ throw new FilesystemError(
4015
+ "region must be a nonempty string without surrounding whitespace"
4016
+ );
4017
+ }
4018
+ const raw = await callNative2(() => region === void 0 ? this.native.createFilesystem(name) : this.native.createFilesystem(name, region));
4013
4019
  const created = JSON.parse(raw);
4014
4020
  return new Filesystem(
4015
4021
  this,
@@ -4465,8 +4471,11 @@ var APIClient = class {
4465
4471
  async deleteSandboxImage(imageName) {
4466
4472
  await this.cloudClient.deleteSandboxImage(imageName);
4467
4473
  }
4468
- async createFileSystem(name, description, _options) {
4469
- const filesystem = await new FilesystemClient(this.filesystemOptions).create(name);
4474
+ async createFileSystem(name, description, options) {
4475
+ const filesystem = await new FilesystemClient(this.filesystemOptions).create(
4476
+ name,
4477
+ { region: options?.region }
4478
+ );
4470
4479
  return {
4471
4480
  id: filesystem.name,
4472
4481
  name: filesystem.name,