tensorlake 0.5.29 → 0.5.31
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/bin/darwin-arm64/tensorlake +0 -0
- package/dist/bin/darwin-arm64/tl +0 -0
- package/dist/bin/linux-x64/tensorlake +0 -0
- package/dist/bin/linux-x64/tl +0 -0
- package/dist/bin/win32-x64/tensorlake.exe +0 -0
- package/dist/bin/win32-x64/tl.exe +0 -0
- package/dist/index.cjs +262 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -10
- package/dist/index.d.ts +49 -10
- package/dist/index.js +260 -75
- package/dist/index.js.map +1 -1
- package/dist/native/darwin-arm64/tensorlake-node.node +0 -0
- package/dist/native/linux-x64/tensorlake-node.node +0 -0
- package/dist/native/win32-x64/tensorlake-node.node +0 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -24,7 +24,8 @@ declare enum SandboxStatus {
|
|
|
24
24
|
SNAPSHOTTING = "snapshotting",
|
|
25
25
|
SUSPENDING = "suspending",
|
|
26
26
|
SUSPENDED = "suspended",
|
|
27
|
-
TERMINATED = "terminated"
|
|
27
|
+
TERMINATED = "terminated",
|
|
28
|
+
TIMEOUT = "timeout"
|
|
28
29
|
}
|
|
29
30
|
declare enum SnapshotStatus {
|
|
30
31
|
IN_PROGRESS = "in_progress",
|
|
@@ -109,6 +110,7 @@ interface CreateSandboxResponse {
|
|
|
109
110
|
sandboxId: string;
|
|
110
111
|
status: SandboxStatus;
|
|
111
112
|
routingHint?: string;
|
|
113
|
+
ingressEndpoint?: string;
|
|
112
114
|
name?: string | null;
|
|
113
115
|
terminationReason?: string;
|
|
114
116
|
errorDetails?: unknown;
|
|
@@ -133,12 +135,14 @@ interface SandboxInfo {
|
|
|
133
135
|
name?: string;
|
|
134
136
|
allowUnauthenticatedAccess?: boolean;
|
|
135
137
|
exposedPorts?: number[];
|
|
138
|
+
ingressEndpoint?: string;
|
|
136
139
|
sandboxUrl?: string;
|
|
137
140
|
routingHint?: string;
|
|
138
141
|
}
|
|
139
142
|
interface SandboxPortAccess {
|
|
140
143
|
allowUnauthenticatedAccess: boolean;
|
|
141
144
|
exposedPorts: number[];
|
|
145
|
+
ingressEndpoint?: string;
|
|
142
146
|
sandboxUrl?: string;
|
|
143
147
|
}
|
|
144
148
|
/** Sandbox information plus the archival timestamp. */
|
|
@@ -329,6 +333,10 @@ interface SandboxClientOptions {
|
|
|
329
333
|
namespace?: string;
|
|
330
334
|
maxRetries?: number;
|
|
331
335
|
retryBackoffMs?: number;
|
|
336
|
+
/** Total HTTP request timeout in seconds. Default: 300. */
|
|
337
|
+
requestTimeout?: number;
|
|
338
|
+
/** @deprecated Use requestTimeout. Total HTTP request timeout in milliseconds. */
|
|
339
|
+
timeoutMs?: number;
|
|
332
340
|
}
|
|
333
341
|
interface SandboxOptions {
|
|
334
342
|
sandboxId: string;
|
|
@@ -337,10 +345,20 @@ interface SandboxOptions {
|
|
|
337
345
|
organizationId?: string;
|
|
338
346
|
projectId?: string;
|
|
339
347
|
routingHint?: string;
|
|
348
|
+
resolveProxyInfo?: (identifier: string) => Promise<SandboxInfo & {
|
|
349
|
+
readonly traceId: string;
|
|
350
|
+
}>;
|
|
351
|
+
/** Optional total HTTP request timeout in seconds for sandbox proxy operations. Omit for no total proxy timeout. */
|
|
352
|
+
requestTimeout?: number;
|
|
353
|
+
/** @deprecated Use requestTimeout. Optional total HTTP request timeout in milliseconds for sandbox proxy operations. */
|
|
354
|
+
timeoutMs?: number;
|
|
340
355
|
}
|
|
341
356
|
interface CreateAndConnectOptions extends CreateSandboxOptions {
|
|
342
357
|
poolId?: string;
|
|
343
358
|
proxyUrl?: string;
|
|
359
|
+
/** Total HTTP request timeout in seconds for sandbox startup. Default: client requestTimeout. */
|
|
360
|
+
requestTimeout?: number;
|
|
361
|
+
/** @deprecated Use requestTimeout. */
|
|
344
362
|
startupTimeout?: number;
|
|
345
363
|
}
|
|
346
364
|
interface SuspendResumeOptions {
|
|
@@ -509,19 +527,22 @@ declare class Pty {
|
|
|
509
527
|
declare class Sandbox {
|
|
510
528
|
readonly sandboxId: string;
|
|
511
529
|
traceId: string | null;
|
|
530
|
+
private readonly proxy;
|
|
512
531
|
private readonly http;
|
|
513
|
-
private readonly baseUrl;
|
|
514
|
-
private readonly wsHeaders;
|
|
515
532
|
private ownsSandbox;
|
|
516
533
|
private lifecycleClient;
|
|
517
534
|
private lifecycleIdentifier;
|
|
518
535
|
private sandboxName;
|
|
519
536
|
constructor(options: SandboxOptions);
|
|
537
|
+
private get baseUrl();
|
|
538
|
+
private get wsHeaders();
|
|
520
539
|
get name(): string | null;
|
|
521
540
|
/** @internal Used by client wiring to keep locally cached name in sync. */
|
|
522
541
|
_setName(name: string | null): void;
|
|
523
542
|
/** @internal Used by lifecycle operations to pin to canonical sandbox ID. */
|
|
524
543
|
_setLifecycleIdentifier(identifier: string): void;
|
|
544
|
+
/** @internal Used by the lazy proxy resolver. */
|
|
545
|
+
_getLifecycleIdentifier(): string;
|
|
525
546
|
/** @internal Used by SandboxClient.createAndConnect to set ownership. */
|
|
526
547
|
_setOwner(client: SandboxClient): void;
|
|
527
548
|
/**
|
|
@@ -534,9 +555,9 @@ declare class Sandbox {
|
|
|
534
555
|
/**
|
|
535
556
|
* Attach to an existing sandbox and return a connected handle.
|
|
536
557
|
*
|
|
537
|
-
*
|
|
538
|
-
*
|
|
539
|
-
* sandbox — call `sandbox.resume()` explicitly.
|
|
558
|
+
* When `proxyUrl` is omitted, resolves the sandbox first so the handle uses
|
|
559
|
+
* the correct cloud/region ingress endpoint. Does **not** auto-resume a
|
|
560
|
+
* suspended sandbox — call `sandbox.resume()` explicitly.
|
|
540
561
|
*/
|
|
541
562
|
static connect(options: ConnectOptions & Partial<SandboxClientOptions>): Promise<Sandbox>;
|
|
542
563
|
/** Get information about a snapshot by ID. No sandbox handle needed. */
|
|
@@ -685,6 +706,9 @@ declare class SandboxClient {
|
|
|
685
706
|
private readonly projectId;
|
|
686
707
|
private readonly namespace;
|
|
687
708
|
private readonly local;
|
|
709
|
+
private readonly maxRetries;
|
|
710
|
+
private readonly retryBackoffMs;
|
|
711
|
+
private readonly requestTimeoutMs;
|
|
688
712
|
/** @internal Pass `true` to suppress the deprecation warning when used by `Sandbox.create()` / `Sandbox.connect()`. */
|
|
689
713
|
constructor(options?: SandboxClientOptions, _internal?: boolean);
|
|
690
714
|
/** Create a client for the TensorLake cloud platform. */
|
|
@@ -693,13 +717,18 @@ declare class SandboxClient {
|
|
|
693
717
|
organizationId?: string;
|
|
694
718
|
projectId?: string;
|
|
695
719
|
apiUrl?: string;
|
|
720
|
+
requestTimeout?: number;
|
|
721
|
+
timeoutMs?: number;
|
|
696
722
|
}): SandboxClient;
|
|
697
723
|
/** Create a client for a local Indexify server. */
|
|
698
724
|
static forLocalhost(options?: {
|
|
699
725
|
apiUrl?: string;
|
|
700
726
|
namespace?: string;
|
|
727
|
+
requestTimeout?: number;
|
|
728
|
+
timeoutMs?: number;
|
|
701
729
|
}): SandboxClient;
|
|
702
730
|
close(): void;
|
|
731
|
+
private withRequestTimeout;
|
|
703
732
|
private path;
|
|
704
733
|
/** Create a new sandbox. Returns immediately; the sandbox may still be starting. Use `createAndConnect()` for a blocking, ready-to-use handle. */
|
|
705
734
|
create(options?: CreateSandboxOptions): Promise<Traced<CreateSandboxResponse>>;
|
|
@@ -804,14 +833,15 @@ declare class SandboxClient {
|
|
|
804
833
|
/** Delete a sandbox pool. Fails if the pool has active containers. */
|
|
805
834
|
deletePool(poolId: string): Promise<void>;
|
|
806
835
|
/** Return a `Sandbox` handle for an existing running sandbox without verifying it exists. */
|
|
807
|
-
connect(identifier: string, proxyUrl?: string, routingHint?: string): Sandbox;
|
|
836
|
+
connect(identifier: string, proxyUrl?: string, routingHint?: string, requestTimeout?: number): Sandbox;
|
|
808
837
|
/**
|
|
809
838
|
* Create a sandbox, wait for it to reach `Running`, and return a connected handle.
|
|
810
839
|
*
|
|
811
|
-
* Blocks until the sandbox is ready or `
|
|
840
|
+
* Blocks until the sandbox is ready or `requestTimeout` elapses. The returned
|
|
812
841
|
* `Sandbox` auto-terminates when `terminate()` is called.
|
|
813
842
|
*
|
|
814
|
-
* @param options.
|
|
843
|
+
* @param options.requestTimeout - Max seconds to wait for `Running` status (default: client requestTimeout).
|
|
844
|
+
* @param options.startupTimeout - Deprecated alias for `requestTimeout`.
|
|
815
845
|
* @throws {SandboxError} If the sandbox terminates during startup or the timeout elapses.
|
|
816
846
|
*/
|
|
817
847
|
createAndConnect(options?: CreateAndConnectOptions): Promise<Sandbox>;
|
|
@@ -1014,6 +1044,15 @@ declare class APIClient {
|
|
|
1014
1044
|
requestOutput(applicationName: string, requestId: string): Promise<RequestOutput>;
|
|
1015
1045
|
}
|
|
1016
1046
|
|
|
1047
|
+
/**
|
|
1048
|
+
* Build a public sandbox URL from a server-provided ingress endpoint.
|
|
1049
|
+
*
|
|
1050
|
+
* `port` omitted or `9501` returns the management URL:
|
|
1051
|
+
* `https://<sandbox-id>.<ingress-host>`. User ports use the public
|
|
1052
|
+
* `<port>-<sandbox-id>.<ingress-host>` form.
|
|
1053
|
+
*/
|
|
1054
|
+
declare function sandboxUrlFromIngressEndpoint(ingressEndpoint: string, sandboxId: string, port?: number): string;
|
|
1055
|
+
|
|
1017
1056
|
/** Base exception for all sandbox-related errors. */
|
|
1018
1057
|
declare class SandboxException extends Error {
|
|
1019
1058
|
constructor(message: string);
|
|
@@ -1062,4 +1101,4 @@ declare class RequestExecutionError extends Error {
|
|
|
1062
1101
|
constructor(message: string, functionName?: string);
|
|
1063
1102
|
}
|
|
1064
1103
|
|
|
1065
|
-
export { APIClient, type ApiKeyIntrospection, type ApplicationBuildContext, type ApplicationBuildImageResult, type ApplicationBuildResponse, type ApplicationManifest, type ApplicationSummary, type ArchivedSandboxInfo, type BinaryPayload, type BuildInfo, type BuildLogEntry, type CheckpointOptions, type CheckpointType, CloudClient, type CloudClientOptions, type CommandResult, type ConnectDesktopOptions, type ConnectOptions, type ContainerResourcesInfo, ContainerState, type CreateAndConnectOptions, type CreateApplicationBuildImageRequest, type CreateApplicationBuildRequest, type CreatePoolOptions, type CreatePtyOptions, type CreatePtySessionOptions, type CreateSandboxOptions, type CreateSandboxPoolResponse, type CreateSandboxResponse, type CreateSnapshotResponse, type CreateTunnelOptions, type DaemonInfo, Desktop, type DesktopDoubleClickOptions, type DesktopPointerOptions, type DirectoryEntry, type HealthResponse, type ListArchivedSandboxesOptions, type ListArchivedSandboxesResponse, type ListDirectoryResponse, type MouseButton, type NetworkConfig, type NewSecret, type OutputEvent, OutputMode, type OutputResponse, type PoolContainerInfo, PoolInUseError, PoolNotFoundError, type ProcessInfo, ProcessStatus, type ProcessUser, type ProcessUserSpec, Pty, type PtyConnectionOptions, type PtyDataHandler, type PtyExitHandler, type PtySessionInfo, RemoteAPIError, type RequestErrorInfo, RequestExecutionError, RequestFailedError, type RequestInput, type RequestMetadata, RequestNotFinishedError, type RequestOutput, type RunOptions, Sandbox, SandboxClient, type SandboxClientOptions, SandboxConnectionError, SandboxError, SandboxException, type SandboxInfo, SandboxNotFoundError, type SandboxOptions, type SandboxPoolInfo, type SandboxPortAccess, SandboxStatus, type Secret, type SecretsList, type SecretsPagination, type SendSignalResponse, type SnapshotAndWaitOptions, type SnapshotInfo, type SnapshotOptions, SnapshotStatus, type SnapshotType, type SnapshotWaitCondition, type StartImageBuildRequest, type StartProcessOptions, StdinMode, type SuspendResumeOptions, TcpTunnel, type TunnelAddress, type UpdatePoolOptions, type UpsertSecretResponse };
|
|
1104
|
+
export { APIClient, type ApiKeyIntrospection, type ApplicationBuildContext, type ApplicationBuildImageResult, type ApplicationBuildResponse, type ApplicationManifest, type ApplicationSummary, type ArchivedSandboxInfo, type BinaryPayload, type BuildInfo, type BuildLogEntry, type CheckpointOptions, type CheckpointType, CloudClient, type CloudClientOptions, type CommandResult, type ConnectDesktopOptions, type ConnectOptions, type ContainerResourcesInfo, ContainerState, type CreateAndConnectOptions, type CreateApplicationBuildImageRequest, type CreateApplicationBuildRequest, type CreatePoolOptions, type CreatePtyOptions, type CreatePtySessionOptions, type CreateSandboxOptions, type CreateSandboxPoolResponse, type CreateSandboxResponse, type CreateSnapshotResponse, type CreateTunnelOptions, type DaemonInfo, Desktop, type DesktopDoubleClickOptions, type DesktopPointerOptions, type DirectoryEntry, type HealthResponse, type ListArchivedSandboxesOptions, type ListArchivedSandboxesResponse, type ListDirectoryResponse, type MouseButton, type NetworkConfig, type NewSecret, type OutputEvent, OutputMode, type OutputResponse, type PoolContainerInfo, PoolInUseError, PoolNotFoundError, type ProcessInfo, ProcessStatus, type ProcessUser, type ProcessUserSpec, Pty, type PtyConnectionOptions, type PtyDataHandler, type PtyExitHandler, type PtySessionInfo, RemoteAPIError, type RequestErrorInfo, RequestExecutionError, RequestFailedError, type RequestInput, type RequestMetadata, RequestNotFinishedError, type RequestOutput, type RunOptions, Sandbox, SandboxClient, type SandboxClientOptions, SandboxConnectionError, SandboxError, SandboxException, type SandboxInfo, SandboxNotFoundError, type SandboxOptions, type SandboxPoolInfo, type SandboxPortAccess, SandboxStatus, type Secret, type SecretsList, type SecretsPagination, type SendSignalResponse, type SnapshotAndWaitOptions, type SnapshotInfo, type SnapshotOptions, SnapshotStatus, type SnapshotType, type SnapshotWaitCondition, type StartImageBuildRequest, type StartProcessOptions, StdinMode, type SuspendResumeOptions, TcpTunnel, type TunnelAddress, type UpdatePoolOptions, type UpsertSecretResponse, sandboxUrlFromIngressEndpoint };
|
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,8 @@ declare enum SandboxStatus {
|
|
|
24
24
|
SNAPSHOTTING = "snapshotting",
|
|
25
25
|
SUSPENDING = "suspending",
|
|
26
26
|
SUSPENDED = "suspended",
|
|
27
|
-
TERMINATED = "terminated"
|
|
27
|
+
TERMINATED = "terminated",
|
|
28
|
+
TIMEOUT = "timeout"
|
|
28
29
|
}
|
|
29
30
|
declare enum SnapshotStatus {
|
|
30
31
|
IN_PROGRESS = "in_progress",
|
|
@@ -109,6 +110,7 @@ interface CreateSandboxResponse {
|
|
|
109
110
|
sandboxId: string;
|
|
110
111
|
status: SandboxStatus;
|
|
111
112
|
routingHint?: string;
|
|
113
|
+
ingressEndpoint?: string;
|
|
112
114
|
name?: string | null;
|
|
113
115
|
terminationReason?: string;
|
|
114
116
|
errorDetails?: unknown;
|
|
@@ -133,12 +135,14 @@ interface SandboxInfo {
|
|
|
133
135
|
name?: string;
|
|
134
136
|
allowUnauthenticatedAccess?: boolean;
|
|
135
137
|
exposedPorts?: number[];
|
|
138
|
+
ingressEndpoint?: string;
|
|
136
139
|
sandboxUrl?: string;
|
|
137
140
|
routingHint?: string;
|
|
138
141
|
}
|
|
139
142
|
interface SandboxPortAccess {
|
|
140
143
|
allowUnauthenticatedAccess: boolean;
|
|
141
144
|
exposedPorts: number[];
|
|
145
|
+
ingressEndpoint?: string;
|
|
142
146
|
sandboxUrl?: string;
|
|
143
147
|
}
|
|
144
148
|
/** Sandbox information plus the archival timestamp. */
|
|
@@ -329,6 +333,10 @@ interface SandboxClientOptions {
|
|
|
329
333
|
namespace?: string;
|
|
330
334
|
maxRetries?: number;
|
|
331
335
|
retryBackoffMs?: number;
|
|
336
|
+
/** Total HTTP request timeout in seconds. Default: 300. */
|
|
337
|
+
requestTimeout?: number;
|
|
338
|
+
/** @deprecated Use requestTimeout. Total HTTP request timeout in milliseconds. */
|
|
339
|
+
timeoutMs?: number;
|
|
332
340
|
}
|
|
333
341
|
interface SandboxOptions {
|
|
334
342
|
sandboxId: string;
|
|
@@ -337,10 +345,20 @@ interface SandboxOptions {
|
|
|
337
345
|
organizationId?: string;
|
|
338
346
|
projectId?: string;
|
|
339
347
|
routingHint?: string;
|
|
348
|
+
resolveProxyInfo?: (identifier: string) => Promise<SandboxInfo & {
|
|
349
|
+
readonly traceId: string;
|
|
350
|
+
}>;
|
|
351
|
+
/** Optional total HTTP request timeout in seconds for sandbox proxy operations. Omit for no total proxy timeout. */
|
|
352
|
+
requestTimeout?: number;
|
|
353
|
+
/** @deprecated Use requestTimeout. Optional total HTTP request timeout in milliseconds for sandbox proxy operations. */
|
|
354
|
+
timeoutMs?: number;
|
|
340
355
|
}
|
|
341
356
|
interface CreateAndConnectOptions extends CreateSandboxOptions {
|
|
342
357
|
poolId?: string;
|
|
343
358
|
proxyUrl?: string;
|
|
359
|
+
/** Total HTTP request timeout in seconds for sandbox startup. Default: client requestTimeout. */
|
|
360
|
+
requestTimeout?: number;
|
|
361
|
+
/** @deprecated Use requestTimeout. */
|
|
344
362
|
startupTimeout?: number;
|
|
345
363
|
}
|
|
346
364
|
interface SuspendResumeOptions {
|
|
@@ -509,19 +527,22 @@ declare class Pty {
|
|
|
509
527
|
declare class Sandbox {
|
|
510
528
|
readonly sandboxId: string;
|
|
511
529
|
traceId: string | null;
|
|
530
|
+
private readonly proxy;
|
|
512
531
|
private readonly http;
|
|
513
|
-
private readonly baseUrl;
|
|
514
|
-
private readonly wsHeaders;
|
|
515
532
|
private ownsSandbox;
|
|
516
533
|
private lifecycleClient;
|
|
517
534
|
private lifecycleIdentifier;
|
|
518
535
|
private sandboxName;
|
|
519
536
|
constructor(options: SandboxOptions);
|
|
537
|
+
private get baseUrl();
|
|
538
|
+
private get wsHeaders();
|
|
520
539
|
get name(): string | null;
|
|
521
540
|
/** @internal Used by client wiring to keep locally cached name in sync. */
|
|
522
541
|
_setName(name: string | null): void;
|
|
523
542
|
/** @internal Used by lifecycle operations to pin to canonical sandbox ID. */
|
|
524
543
|
_setLifecycleIdentifier(identifier: string): void;
|
|
544
|
+
/** @internal Used by the lazy proxy resolver. */
|
|
545
|
+
_getLifecycleIdentifier(): string;
|
|
525
546
|
/** @internal Used by SandboxClient.createAndConnect to set ownership. */
|
|
526
547
|
_setOwner(client: SandboxClient): void;
|
|
527
548
|
/**
|
|
@@ -534,9 +555,9 @@ declare class Sandbox {
|
|
|
534
555
|
/**
|
|
535
556
|
* Attach to an existing sandbox and return a connected handle.
|
|
536
557
|
*
|
|
537
|
-
*
|
|
538
|
-
*
|
|
539
|
-
* sandbox — call `sandbox.resume()` explicitly.
|
|
558
|
+
* When `proxyUrl` is omitted, resolves the sandbox first so the handle uses
|
|
559
|
+
* the correct cloud/region ingress endpoint. Does **not** auto-resume a
|
|
560
|
+
* suspended sandbox — call `sandbox.resume()` explicitly.
|
|
540
561
|
*/
|
|
541
562
|
static connect(options: ConnectOptions & Partial<SandboxClientOptions>): Promise<Sandbox>;
|
|
542
563
|
/** Get information about a snapshot by ID. No sandbox handle needed. */
|
|
@@ -685,6 +706,9 @@ declare class SandboxClient {
|
|
|
685
706
|
private readonly projectId;
|
|
686
707
|
private readonly namespace;
|
|
687
708
|
private readonly local;
|
|
709
|
+
private readonly maxRetries;
|
|
710
|
+
private readonly retryBackoffMs;
|
|
711
|
+
private readonly requestTimeoutMs;
|
|
688
712
|
/** @internal Pass `true` to suppress the deprecation warning when used by `Sandbox.create()` / `Sandbox.connect()`. */
|
|
689
713
|
constructor(options?: SandboxClientOptions, _internal?: boolean);
|
|
690
714
|
/** Create a client for the TensorLake cloud platform. */
|
|
@@ -693,13 +717,18 @@ declare class SandboxClient {
|
|
|
693
717
|
organizationId?: string;
|
|
694
718
|
projectId?: string;
|
|
695
719
|
apiUrl?: string;
|
|
720
|
+
requestTimeout?: number;
|
|
721
|
+
timeoutMs?: number;
|
|
696
722
|
}): SandboxClient;
|
|
697
723
|
/** Create a client for a local Indexify server. */
|
|
698
724
|
static forLocalhost(options?: {
|
|
699
725
|
apiUrl?: string;
|
|
700
726
|
namespace?: string;
|
|
727
|
+
requestTimeout?: number;
|
|
728
|
+
timeoutMs?: number;
|
|
701
729
|
}): SandboxClient;
|
|
702
730
|
close(): void;
|
|
731
|
+
private withRequestTimeout;
|
|
703
732
|
private path;
|
|
704
733
|
/** Create a new sandbox. Returns immediately; the sandbox may still be starting. Use `createAndConnect()` for a blocking, ready-to-use handle. */
|
|
705
734
|
create(options?: CreateSandboxOptions): Promise<Traced<CreateSandboxResponse>>;
|
|
@@ -804,14 +833,15 @@ declare class SandboxClient {
|
|
|
804
833
|
/** Delete a sandbox pool. Fails if the pool has active containers. */
|
|
805
834
|
deletePool(poolId: string): Promise<void>;
|
|
806
835
|
/** Return a `Sandbox` handle for an existing running sandbox without verifying it exists. */
|
|
807
|
-
connect(identifier: string, proxyUrl?: string, routingHint?: string): Sandbox;
|
|
836
|
+
connect(identifier: string, proxyUrl?: string, routingHint?: string, requestTimeout?: number): Sandbox;
|
|
808
837
|
/**
|
|
809
838
|
* Create a sandbox, wait for it to reach `Running`, and return a connected handle.
|
|
810
839
|
*
|
|
811
|
-
* Blocks until the sandbox is ready or `
|
|
840
|
+
* Blocks until the sandbox is ready or `requestTimeout` elapses. The returned
|
|
812
841
|
* `Sandbox` auto-terminates when `terminate()` is called.
|
|
813
842
|
*
|
|
814
|
-
* @param options.
|
|
843
|
+
* @param options.requestTimeout - Max seconds to wait for `Running` status (default: client requestTimeout).
|
|
844
|
+
* @param options.startupTimeout - Deprecated alias for `requestTimeout`.
|
|
815
845
|
* @throws {SandboxError} If the sandbox terminates during startup or the timeout elapses.
|
|
816
846
|
*/
|
|
817
847
|
createAndConnect(options?: CreateAndConnectOptions): Promise<Sandbox>;
|
|
@@ -1014,6 +1044,15 @@ declare class APIClient {
|
|
|
1014
1044
|
requestOutput(applicationName: string, requestId: string): Promise<RequestOutput>;
|
|
1015
1045
|
}
|
|
1016
1046
|
|
|
1047
|
+
/**
|
|
1048
|
+
* Build a public sandbox URL from a server-provided ingress endpoint.
|
|
1049
|
+
*
|
|
1050
|
+
* `port` omitted or `9501` returns the management URL:
|
|
1051
|
+
* `https://<sandbox-id>.<ingress-host>`. User ports use the public
|
|
1052
|
+
* `<port>-<sandbox-id>.<ingress-host>` form.
|
|
1053
|
+
*/
|
|
1054
|
+
declare function sandboxUrlFromIngressEndpoint(ingressEndpoint: string, sandboxId: string, port?: number): string;
|
|
1055
|
+
|
|
1017
1056
|
/** Base exception for all sandbox-related errors. */
|
|
1018
1057
|
declare class SandboxException extends Error {
|
|
1019
1058
|
constructor(message: string);
|
|
@@ -1062,4 +1101,4 @@ declare class RequestExecutionError extends Error {
|
|
|
1062
1101
|
constructor(message: string, functionName?: string);
|
|
1063
1102
|
}
|
|
1064
1103
|
|
|
1065
|
-
export { APIClient, type ApiKeyIntrospection, type ApplicationBuildContext, type ApplicationBuildImageResult, type ApplicationBuildResponse, type ApplicationManifest, type ApplicationSummary, type ArchivedSandboxInfo, type BinaryPayload, type BuildInfo, type BuildLogEntry, type CheckpointOptions, type CheckpointType, CloudClient, type CloudClientOptions, type CommandResult, type ConnectDesktopOptions, type ConnectOptions, type ContainerResourcesInfo, ContainerState, type CreateAndConnectOptions, type CreateApplicationBuildImageRequest, type CreateApplicationBuildRequest, type CreatePoolOptions, type CreatePtyOptions, type CreatePtySessionOptions, type CreateSandboxOptions, type CreateSandboxPoolResponse, type CreateSandboxResponse, type CreateSnapshotResponse, type CreateTunnelOptions, type DaemonInfo, Desktop, type DesktopDoubleClickOptions, type DesktopPointerOptions, type DirectoryEntry, type HealthResponse, type ListArchivedSandboxesOptions, type ListArchivedSandboxesResponse, type ListDirectoryResponse, type MouseButton, type NetworkConfig, type NewSecret, type OutputEvent, OutputMode, type OutputResponse, type PoolContainerInfo, PoolInUseError, PoolNotFoundError, type ProcessInfo, ProcessStatus, type ProcessUser, type ProcessUserSpec, Pty, type PtyConnectionOptions, type PtyDataHandler, type PtyExitHandler, type PtySessionInfo, RemoteAPIError, type RequestErrorInfo, RequestExecutionError, RequestFailedError, type RequestInput, type RequestMetadata, RequestNotFinishedError, type RequestOutput, type RunOptions, Sandbox, SandboxClient, type SandboxClientOptions, SandboxConnectionError, SandboxError, SandboxException, type SandboxInfo, SandboxNotFoundError, type SandboxOptions, type SandboxPoolInfo, type SandboxPortAccess, SandboxStatus, type Secret, type SecretsList, type SecretsPagination, type SendSignalResponse, type SnapshotAndWaitOptions, type SnapshotInfo, type SnapshotOptions, SnapshotStatus, type SnapshotType, type SnapshotWaitCondition, type StartImageBuildRequest, type StartProcessOptions, StdinMode, type SuspendResumeOptions, TcpTunnel, type TunnelAddress, type UpdatePoolOptions, type UpsertSecretResponse };
|
|
1104
|
+
export { APIClient, type ApiKeyIntrospection, type ApplicationBuildContext, type ApplicationBuildImageResult, type ApplicationBuildResponse, type ApplicationManifest, type ApplicationSummary, type ArchivedSandboxInfo, type BinaryPayload, type BuildInfo, type BuildLogEntry, type CheckpointOptions, type CheckpointType, CloudClient, type CloudClientOptions, type CommandResult, type ConnectDesktopOptions, type ConnectOptions, type ContainerResourcesInfo, ContainerState, type CreateAndConnectOptions, type CreateApplicationBuildImageRequest, type CreateApplicationBuildRequest, type CreatePoolOptions, type CreatePtyOptions, type CreatePtySessionOptions, type CreateSandboxOptions, type CreateSandboxPoolResponse, type CreateSandboxResponse, type CreateSnapshotResponse, type CreateTunnelOptions, type DaemonInfo, Desktop, type DesktopDoubleClickOptions, type DesktopPointerOptions, type DirectoryEntry, type HealthResponse, type ListArchivedSandboxesOptions, type ListArchivedSandboxesResponse, type ListDirectoryResponse, type MouseButton, type NetworkConfig, type NewSecret, type OutputEvent, OutputMode, type OutputResponse, type PoolContainerInfo, PoolInUseError, PoolNotFoundError, type ProcessInfo, ProcessStatus, type ProcessUser, type ProcessUserSpec, Pty, type PtyConnectionOptions, type PtyDataHandler, type PtyExitHandler, type PtySessionInfo, RemoteAPIError, type RequestErrorInfo, RequestExecutionError, RequestFailedError, type RequestInput, type RequestMetadata, RequestNotFinishedError, type RequestOutput, type RunOptions, Sandbox, SandboxClient, type SandboxClientOptions, SandboxConnectionError, SandboxError, SandboxException, type SandboxInfo, SandboxNotFoundError, type SandboxOptions, type SandboxPoolInfo, type SandboxPortAccess, SandboxStatus, type Secret, type SecretsList, type SecretsPagination, type SendSignalResponse, type SnapshotAndWaitOptions, type SnapshotInfo, type SnapshotOptions, SnapshotStatus, type SnapshotType, type SnapshotWaitCondition, type StartImageBuildRequest, type StartProcessOptions, StdinMode, type SuspendResumeOptions, TcpTunnel, type TunnelAddress, type UpdatePoolOptions, type UpsertSecretResponse, sandboxUrlFromIngressEndpoint };
|