tensorlake 0.5.130 → 0.5.132

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 (50) hide show
  1. package/README.md +27 -0
  2. package/dist/applications/index.cjs +492 -708
  3. package/dist/applications/index.cjs.map +1 -1
  4. package/dist/applications/index.d.cts +3 -3
  5. package/dist/applications/index.d.ts +3 -3
  6. package/dist/applications/index.js +493 -713
  7. package/dist/applications/index.js.map +1 -1
  8. package/dist/function-agent/main.cjs +5 -2
  9. package/dist/function-agent/main.cjs.map +1 -1
  10. package/dist/function-agent/main.js +6 -3
  11. package/dist/function-agent/main.js.map +1 -1
  12. package/dist/function-executor/main.cjs +6 -3
  13. package/dist/function-executor/main.cjs.map +1 -1
  14. package/dist/function-executor/main.js +7 -4
  15. package/dist/function-executor/main.js.map +1 -1
  16. package/dist/index.cjs +129 -421
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +16 -26
  19. package/dist/index.d.ts +16 -26
  20. package/dist/index.js +130 -426
  21. package/dist/index.js.map +1 -1
  22. package/dist/native-worker.cjs +1 -0
  23. package/dist/native-worker.cjs.map +1 -1
  24. package/dist/native-worker.js +1 -0
  25. package/dist/native-worker.js.map +1 -1
  26. package/dist/{remote-DRCCuRth.d.cts → remote-D95Y6Czr.d.cts} +1 -1
  27. package/dist/{remote-0dzBqScB.d.ts → remote-omwTzbfj.d.ts} +1 -1
  28. package/dist/{sandbox-image-Bf5bcxtO.d.cts → sandbox-image-ChzWDeZy.d.cts} +2 -0
  29. package/dist/{sandbox-image-Bf5bcxtO.d.ts → sandbox-image-ChzWDeZy.d.ts} +2 -0
  30. package/dist/sandbox-image.cjs +476 -453
  31. package/dist/sandbox-image.cjs.map +1 -1
  32. package/dist/sandbox-image.d.cts +1 -1
  33. package/dist/sandbox-image.d.ts +1 -1
  34. package/dist/sandbox-image.js +475 -456
  35. package/dist/sandbox-image.js.map +1 -1
  36. package/package.json +8 -8
  37. package/runtime/function-executor/manifest.json +14 -14
  38. package/runtime/function-executor/package/dist/function-executor/main.js +7 -4
  39. package/runtime/function-executor/package/dist/function-executor/main.js.map +1 -1
  40. package/runtime/function-executor/package/dist/native-worker.cjs +1 -0
  41. package/runtime/function-executor/package/dist/native-worker.cjs.map +1 -1
  42. package/runtime/function-executor/package/npm-shrinkwrap.json +2 -12
  43. package/runtime/function-executor/package/package.json +1 -2
  44. package/runtime/typescript-function-runner/manifest.json +13 -13
  45. package/runtime/typescript-function-runner/package/dist/function-agent/main.js +6 -3
  46. package/runtime/typescript-function-runner/package/dist/function-agent/main.js.map +1 -1
  47. package/runtime/typescript-function-runner/package/dist/native-worker.cjs +1 -0
  48. package/runtime/typescript-function-runner/package/dist/native-worker.cjs.map +1 -1
  49. package/runtime/typescript-function-runner/package/npm-shrinkwrap.json +20 -29
  50. package/runtime/typescript-function-runner/package/package.json +7 -7
package/dist/index.d.cts CHANGED
@@ -1,21 +1,8 @@
1
- import { C as CloudClientOptions, A as ApplicationManifest, B as BinaryPayload, S as SandboxTemplate, a as ApplicationSummary, R as RequestInput, c as RequestMetadata, b as RequestOutput, d as SecretsList, e as Secret, N as NewSecret, U as UpsertSecretResponse, f as StartImageBuildRequest, g as BuildInfo, h as CreateApplicationBuildRequest, i as ApplicationBuildContext, j as ApplicationBuildResponse, k as BuildLogEntry, F as FileSystem } from './sandbox-image-Bf5bcxtO.cjs';
2
- export { l as ApplicationBuildImageResult, m as CreateApplicationBuildImageRequest, n as CreateSandboxImageOptions, I as Image, o as ImageBuildOperation, p as ImageBuildOperationType, p as ImageBuildOperationTypeValue, q as ImageOptions, r as ImportSandboxImageOptions, s as RequestErrorInfo, t as SandboxImageSource, u as SecretsPagination, v as createSandboxImage, w as deleteSandboxImage, x as dockerfileContent, y as findSandboxImageByName, z as importSandboxImage, D as listSandboxImages } from './sandbox-image-Bf5bcxtO.cjs';
3
- export { v as APIClient, A as ApplicationCapability, a as ApplicationOptions, F as File, b as FunctionOptions, c as Future, H as Headers, d as HeadersInit, e as HttpBody, P as Parameter, g as RegisteredFunction, h as RemoteOptions, j as RequestContext, S as Schema, l as SimpleApplicationOptions, m as SimpleFunctionOptions, T as TailCall, r as registerApplication, o as registerFunction, p as remoteOptions, q as retries, s as runLocal, t as runRemote, u as schema } from './remote-DRCCuRth.cjs';
1
+ import { C as CloudClientOptions, A as ApplicationManifest, B as BinaryPayload, S as SandboxTemplate, a as ApplicationSummary, R as RequestInput, c as RequestMetadata, b as RequestOutput, d as SecretsList, e as Secret, N as NewSecret, U as UpsertSecretResponse, f as StartImageBuildRequest, g as BuildInfo, h as CreateApplicationBuildRequest, i as ApplicationBuildContext, j as ApplicationBuildResponse, k as BuildLogEntry, F as FileSystem } from './sandbox-image-ChzWDeZy.cjs';
2
+ export { l as ApplicationBuildImageResult, m as CreateApplicationBuildImageRequest, n as CreateSandboxImageOptions, I as Image, o as ImageBuildOperation, p as ImageBuildOperationType, p as ImageBuildOperationTypeValue, q as ImageOptions, r as ImportSandboxImageOptions, s as RequestErrorInfo, t as SandboxImageSource, u as SecretsPagination, v as createSandboxImage, w as deleteSandboxImage, x as dockerfileContent, y as findSandboxImageByName, z as importSandboxImage, D as listSandboxImages } from './sandbox-image-ChzWDeZy.cjs';
3
+ export { v as APIClient, A as ApplicationCapability, a as ApplicationOptions, F as File, b as FunctionOptions, c as Future, H as Headers, d as HeadersInit, e as HttpBody, P as Parameter, g as RegisteredFunction, h as RemoteOptions, j as RequestContext, S as Schema, l as SimpleApplicationOptions, m as SimpleFunctionOptions, T as TailCall, 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';
4
4
 
5
- /**
6
- * The return value of every SDK operation. Carries the W3C `trace_id` so callers
7
- * can correlate a specific request with its server-side spans in Datadog APM or
8
- * any other OTEL-compatible backend.
9
- *
10
- * Because this is an intersection type, all properties of `T` are accessible
11
- * directly — existing code that ignores `traceId` continues to compile and run
12
- * unchanged.
13
- *
14
- * @example
15
- * const sandbox = await client.createSandbox(req);
16
- * console.log(sandbox.id); // existing field — unchanged
17
- * console.log(sandbox.traceId); // new: look this up in Datadog APM
18
- */
5
+ /** An SDK result paired with its server-side W3C trace ID. */
19
6
  type Traced<T> = T & {
20
7
  readonly traceId: string;
21
8
  };
@@ -210,10 +197,10 @@ declare enum ContainerState {
210
197
  interface ContainerResourcesInfo {
211
198
  cpus: number;
212
199
  memoryMb: number;
213
- ephemeralDiskMb: number;
200
+ diskMb: number;
214
201
  }
215
202
  /** GPU models supported by the sandbox scheduler. */
216
- type GpuModel = "A100-40GB" | "A100-80GB" | "H100" | "T4" | "A6000" | "A10";
203
+ type GpuModel = "A100-40GB" | "A100-80GB" | "H100" | "T4" | "A6000" | "RTX-PRO-6000" | "L40" | "A10";
217
204
  /** A homogeneous GPU allocation for a sandbox. */
218
205
  interface GpuRequest {
219
206
  count: number;
@@ -484,7 +471,8 @@ interface CreatePoolOptions {
484
471
  image: string;
485
472
  cpus?: number;
486
473
  memoryMb?: number;
487
- ephemeralDiskMb?: number;
474
+ /** Root disk size in megabytes. Omit to use the registered image's size. */
475
+ diskMb?: number;
488
476
  timeoutSecs?: number;
489
477
  entrypoint?: string[];
490
478
  maxContainers?: number;
@@ -503,7 +491,8 @@ interface UpdatePoolOptions {
503
491
  image: string;
504
492
  cpus?: number;
505
493
  memoryMb?: number;
506
- ephemeralDiskMb?: number;
494
+ /** Root disk size in megabytes. Omit to use the registered image's size. */
495
+ diskMb?: number;
507
496
  timeoutSecs?: number;
508
497
  entrypoint?: string[];
509
498
  maxContainers?: number;
@@ -1349,7 +1338,10 @@ declare class SandboxClient {
1349
1338
  * network policy, set it to replace the policy, or pass `null` to remove the
1350
1339
  * policy entirely. On a change the service recycles the pool's unclaimed
1351
1340
  * warm containers onto the new policy, while containers already claimed by
1352
- * sandboxes keep the policy they booted with.
1341
+ * sandboxes keep the policy they booted with. CPU, memory, disk, image, and
1342
+ * entrypoint changes likewise recycle unclaimed warm containers
1343
+ * asynchronously. If suitable capacity is unavailable, stale warm
1344
+ * containers are not used as a fallback.
1353
1345
  */
1354
1346
  updatePool(poolId: string, options: UpdatePoolOptions): Promise<SandboxPoolInfo>;
1355
1347
  /** Delete a sandbox pool. Fails if the pool has active containers. */
@@ -1366,7 +1358,7 @@ declare class SandboxClient {
1366
1358
  }
1367
1359
 
1368
1360
  declare class CloudClient {
1369
- private readonly http;
1361
+ private readonly transport;
1370
1362
  private readonly organizationId?;
1371
1363
  private readonly projectId?;
1372
1364
  private readonly namespace;
@@ -2054,9 +2046,7 @@ declare class SandboxError extends SandboxException {
2054
2046
  /**
2055
2047
  * Raised when the client cannot complete a request against the API server.
2056
2048
  *
2057
- * The original transport error (typically undici's `TypeError: fetch failed`,
2058
- * whose real reason — `ECONNREFUSED`, `UND_ERR_CONNECT_TIMEOUT`, `EMFILE`, … —
2059
- * lives in `.cause`) is preserved on this error's {@link cause} for programmatic
2049
+ * The original transport error is preserved on this error's {@link cause} for programmatic
2060
2050
  * inspection, and its full chain is folded into the message so it survives
2061
2051
  * wrappers that only forward `error.message`. No interpretation of the failure
2062
2052
  * (client vs server) is applied — the raw inner error is surfaced as-is so the
package/dist/index.d.ts CHANGED
@@ -1,21 +1,8 @@
1
- import { C as CloudClientOptions, A as ApplicationManifest, B as BinaryPayload, S as SandboxTemplate, a as ApplicationSummary, R as RequestInput, c as RequestMetadata, b as RequestOutput, d as SecretsList, e as Secret, N as NewSecret, U as UpsertSecretResponse, f as StartImageBuildRequest, g as BuildInfo, h as CreateApplicationBuildRequest, i as ApplicationBuildContext, j as ApplicationBuildResponse, k as BuildLogEntry, F as FileSystem } from './sandbox-image-Bf5bcxtO.js';
2
- export { l as ApplicationBuildImageResult, m as CreateApplicationBuildImageRequest, n as CreateSandboxImageOptions, I as Image, o as ImageBuildOperation, p as ImageBuildOperationType, p as ImageBuildOperationTypeValue, q as ImageOptions, r as ImportSandboxImageOptions, s as RequestErrorInfo, t as SandboxImageSource, u as SecretsPagination, v as createSandboxImage, w as deleteSandboxImage, x as dockerfileContent, y as findSandboxImageByName, z as importSandboxImage, D as listSandboxImages } from './sandbox-image-Bf5bcxtO.js';
3
- export { v as APIClient, A as ApplicationCapability, a as ApplicationOptions, F as File, b as FunctionOptions, c as Future, H as Headers, d as HeadersInit, e as HttpBody, P as Parameter, g as RegisteredFunction, h as RemoteOptions, j as RequestContext, S as Schema, l as SimpleApplicationOptions, m as SimpleFunctionOptions, T as TailCall, r as registerApplication, o as registerFunction, p as remoteOptions, q as retries, s as runLocal, t as runRemote, u as schema } from './remote-0dzBqScB.js';
1
+ import { C as CloudClientOptions, A as ApplicationManifest, B as BinaryPayload, S as SandboxTemplate, a as ApplicationSummary, R as RequestInput, c as RequestMetadata, b as RequestOutput, d as SecretsList, e as Secret, N as NewSecret, U as UpsertSecretResponse, f as StartImageBuildRequest, g as BuildInfo, h as CreateApplicationBuildRequest, i as ApplicationBuildContext, j as ApplicationBuildResponse, k as BuildLogEntry, F as FileSystem } from './sandbox-image-ChzWDeZy.js';
2
+ export { l as ApplicationBuildImageResult, m as CreateApplicationBuildImageRequest, n as CreateSandboxImageOptions, I as Image, o as ImageBuildOperation, p as ImageBuildOperationType, p as ImageBuildOperationTypeValue, q as ImageOptions, r as ImportSandboxImageOptions, s as RequestErrorInfo, t as SandboxImageSource, u as SecretsPagination, v as createSandboxImage, w as deleteSandboxImage, x as dockerfileContent, y as findSandboxImageByName, z as importSandboxImage, D as listSandboxImages } from './sandbox-image-ChzWDeZy.js';
3
+ export { v as APIClient, A as ApplicationCapability, a as ApplicationOptions, F as File, b as FunctionOptions, c as Future, H as Headers, d as HeadersInit, e as HttpBody, P as Parameter, g as RegisteredFunction, h as RemoteOptions, j as RequestContext, S as Schema, l as SimpleApplicationOptions, m as SimpleFunctionOptions, T as TailCall, 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';
4
4
 
5
- /**
6
- * The return value of every SDK operation. Carries the W3C `trace_id` so callers
7
- * can correlate a specific request with its server-side spans in Datadog APM or
8
- * any other OTEL-compatible backend.
9
- *
10
- * Because this is an intersection type, all properties of `T` are accessible
11
- * directly — existing code that ignores `traceId` continues to compile and run
12
- * unchanged.
13
- *
14
- * @example
15
- * const sandbox = await client.createSandbox(req);
16
- * console.log(sandbox.id); // existing field — unchanged
17
- * console.log(sandbox.traceId); // new: look this up in Datadog APM
18
- */
5
+ /** An SDK result paired with its server-side W3C trace ID. */
19
6
  type Traced<T> = T & {
20
7
  readonly traceId: string;
21
8
  };
@@ -210,10 +197,10 @@ declare enum ContainerState {
210
197
  interface ContainerResourcesInfo {
211
198
  cpus: number;
212
199
  memoryMb: number;
213
- ephemeralDiskMb: number;
200
+ diskMb: number;
214
201
  }
215
202
  /** GPU models supported by the sandbox scheduler. */
216
- type GpuModel = "A100-40GB" | "A100-80GB" | "H100" | "T4" | "A6000" | "A10";
203
+ type GpuModel = "A100-40GB" | "A100-80GB" | "H100" | "T4" | "A6000" | "RTX-PRO-6000" | "L40" | "A10";
217
204
  /** A homogeneous GPU allocation for a sandbox. */
218
205
  interface GpuRequest {
219
206
  count: number;
@@ -484,7 +471,8 @@ interface CreatePoolOptions {
484
471
  image: string;
485
472
  cpus?: number;
486
473
  memoryMb?: number;
487
- ephemeralDiskMb?: number;
474
+ /** Root disk size in megabytes. Omit to use the registered image's size. */
475
+ diskMb?: number;
488
476
  timeoutSecs?: number;
489
477
  entrypoint?: string[];
490
478
  maxContainers?: number;
@@ -503,7 +491,8 @@ interface UpdatePoolOptions {
503
491
  image: string;
504
492
  cpus?: number;
505
493
  memoryMb?: number;
506
- ephemeralDiskMb?: number;
494
+ /** Root disk size in megabytes. Omit to use the registered image's size. */
495
+ diskMb?: number;
507
496
  timeoutSecs?: number;
508
497
  entrypoint?: string[];
509
498
  maxContainers?: number;
@@ -1349,7 +1338,10 @@ declare class SandboxClient {
1349
1338
  * network policy, set it to replace the policy, or pass `null` to remove the
1350
1339
  * policy entirely. On a change the service recycles the pool's unclaimed
1351
1340
  * warm containers onto the new policy, while containers already claimed by
1352
- * sandboxes keep the policy they booted with.
1341
+ * sandboxes keep the policy they booted with. CPU, memory, disk, image, and
1342
+ * entrypoint changes likewise recycle unclaimed warm containers
1343
+ * asynchronously. If suitable capacity is unavailable, stale warm
1344
+ * containers are not used as a fallback.
1353
1345
  */
1354
1346
  updatePool(poolId: string, options: UpdatePoolOptions): Promise<SandboxPoolInfo>;
1355
1347
  /** Delete a sandbox pool. Fails if the pool has active containers. */
@@ -1366,7 +1358,7 @@ declare class SandboxClient {
1366
1358
  }
1367
1359
 
1368
1360
  declare class CloudClient {
1369
- private readonly http;
1361
+ private readonly transport;
1370
1362
  private readonly organizationId?;
1371
1363
  private readonly projectId?;
1372
1364
  private readonly namespace;
@@ -2054,9 +2046,7 @@ declare class SandboxError extends SandboxException {
2054
2046
  /**
2055
2047
  * Raised when the client cannot complete a request against the API server.
2056
2048
  *
2057
- * The original transport error (typically undici's `TypeError: fetch failed`,
2058
- * whose real reason — `ECONNREFUSED`, `UND_ERR_CONNECT_TIMEOUT`, `EMFILE`, … —
2059
- * lives in `.cause`) is preserved on this error's {@link cause} for programmatic
2049
+ * The original transport error is preserved on this error's {@link cause} for programmatic
2060
2050
  * inspection, and its full chain is folded into the message so it survives
2061
2051
  * wrappers that only forward `error.message`. No interpretation of the failure
2062
2052
  * (client vs server) is applied — the raw inner error is surfaced as-is so the