@aerol-ai/aerolvm-sdk 0.5.2 → 0.5.4

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.d.ts CHANGED
@@ -3,4 +3,4 @@ export { Sandbox } from "./Sandbox.js";
3
3
  export { Image } from "./Image.js";
4
4
  export type { MicroVMConfig } from "./MicroVM.js";
5
5
  export type { RetryConfig } from "./internal/client.js";
6
- export type { AddCustomDomainOptions, BinaryLike, BuildImageOptions, BuildImagePushOptions, BuildImageResult, CloneGeneration, CreateOptions, CreateSessionOptions, CreateTemplateOptions, CreateWasmModuleOptions, CustomDomain, CustomDomainDNSRecords, CustomDomainStatus, DNSRecord, DNSRecordType, ExecRequest, ExecResult, ExecExitInfo, ExposedPort, ExposePortOptions, ExposeProtocol, ExposeResult, Failover, FailoverPolicy, HealthStatus, IngressTarget, IngressTargetSource, Lifecycle, MountSpec, MountSpecRedacted, MountType, RegisterSnapshotOptions, RegistryAuth, ResizeOptions, Sandbox as SandboxData, SandboxSnapshot, SandboxStatus, Session, SessionAttachHandle, SessionAttachOptions, SessionStatus, Template, TemplatePushState, TemplateStatus, WasmModule, WasmModuleStatus, PushWasmModuleOptions, PushWasmModuleResult, UpdateLifecycleOptions, } from "./types.js";
6
+ export type { AddCustomDomainOptions, BinaryLike, BuildImageOptions, BuildImagePushOptions, BuildImageResult, CloneGeneration, CreateOptions, CreateSessionOptions, CreateTemplateOptions, CreateWasmModuleOptions, CustomDomain, CustomDomainDNSRecords, CustomDomainStatus, DNSRecord, DNSRecordType, ExecRequest, ExecResult, ExecExitInfo, ExposedPort, ExposePortOptions, ExposeProtocol, ExposeResult, Failover, FailoverPolicy, HealthStatus, IngressTarget, IngressTargetSource, Lifecycle, MountSpec, MountSpecRedacted, MountType, PlatformVolumeMount, RegisterSnapshotOptions, RegistryAuth, ResizeOptions, Sandbox as SandboxData, SandboxSnapshot, SandboxStatus, Session, SessionAttachHandle, SessionAttachOptions, SessionStatus, Template, TemplatePushState, TemplateStatus, WasmModule, WasmModuleStatus, PushWasmModuleOptions, PushWasmModuleResult, UpdateLifecycleOptions, } from "./types.js";
@@ -610,11 +610,16 @@ function toApiCreateOptions(options) {
610
610
  env: options.env,
611
611
  os_user: options.osUser,
612
612
  network_block_all: options.networkBlockAll,
613
+ network_allow_out: options.networkAllowOut,
614
+ network_deny_out: options.networkDenyOut,
615
+ allow_public_traffic: options.allowPublicTraffic,
616
+ mask_request_host: options.maskRequestHost,
613
617
  network_bytes_in_limit: options.networkBytesInLimit,
614
618
  network_bytes_out_limit: options.networkBytesOutLimit,
615
619
  registry: options.registry,
616
620
  container_command: options.containerCommand,
617
621
  mounts: options.mounts?.map(toApiMountSpec),
622
+ platform_volumes: options.platformVolumes?.map(toApiPlatformVolumeMount),
618
623
  lifecycle: options.lifecycle ? toApiLifecycle(options.lifecycle) : undefined,
619
624
  failover: options.failover ? toApiFailover(options.failover) : undefined,
620
625
  runtime: options.runtime,
@@ -852,6 +857,13 @@ function toApiMountSpec(mount) {
852
857
  read_only: mount.readOnly,
853
858
  };
854
859
  }
860
+ function toApiPlatformVolumeMount(volume) {
861
+ return {
862
+ name: volume.name,
863
+ path: volume.path,
864
+ read_only: volume.readOnly,
865
+ };
866
+ }
855
867
  function fromApiMountSpecRedacted(mount) {
856
868
  return {
857
869
  type: mount.type,
package/dist/types.d.ts CHANGED
@@ -65,6 +65,20 @@ export interface MountSpecRedacted {
65
65
  readOnly: boolean;
66
66
  hasCredentials: boolean;
67
67
  }
68
+ /**
69
+ * A named, operator-backed persistent volume to attach by name. The operator
70
+ * configures the shared backend (S3/NFS); you never supply storage coordinates
71
+ * or credentials. Persists across the sandbox lifecycle and can be re-attached
72
+ * by name from another sandbox.
73
+ */
74
+ export interface PlatformVolumeMount {
75
+ /** Volume name, scoped to your tenant. */
76
+ name: string;
77
+ /** Absolute path to mount it at inside the sandbox. */
78
+ path: string;
79
+ /** Mount read-only. Defaults to read-write. */
80
+ readOnly?: boolean;
81
+ }
68
82
  export interface Lifecycle {
69
83
  /** Duration in integer nanoseconds. */
70
84
  stopIfIdleFor?: number;
@@ -137,6 +151,32 @@ export interface CreateOptions {
137
151
  env?: Record<string, string>;
138
152
  osUser?: string;
139
153
  networkBlockAll?: boolean;
154
+ /**
155
+ * Egress allowlist of CIDRs. When set, the sandbox may reach only these
156
+ * destinations; all other outbound traffic is dropped by the host firewall.
157
+ * Mutually exclusive with `networkDenyOut`. For a full block use
158
+ * `networkBlockAll` instead.
159
+ */
160
+ networkAllowOut?: string[];
161
+ /**
162
+ * Egress blocklist of CIDRs. When set, the sandbox may reach anything except
163
+ * these destinations. Mutually exclusive with `networkAllowOut`.
164
+ */
165
+ networkDenyOut?: string[];
166
+ /**
167
+ * Whether the sandbox may be exposed to the public internet. Defaults to
168
+ * true; set `false` to make `exposePort` fail — the sandbox stays reachable
169
+ * only via the toolbox proxy and SSH gateway, not a public URL.
170
+ */
171
+ allowPublicTraffic?: boolean;
172
+ /**
173
+ * Rewrite the upstream `Host` header on ingress to exposed HTTP ports to this
174
+ * value. Frameworks that validate the Host (Vite `allowedHosts`,
175
+ * webpack-dev-server, Django `ALLOWED_HOSTS`) reject the per-sandbox public
176
+ * hostname; set this to a value they accept (e.g. `"localhost"`). Empty/unset
177
+ * passes the host through unchanged. HTTP-only; TCP/TLS exposures ignore it.
178
+ */
179
+ maskRequestHost?: string;
140
180
  /**
141
181
  * Cap on bytes the sandbox may receive from outside the container before its
142
182
  * ingress is dropped via per-IP iptables rule. `0` (default) is unlimited.
@@ -153,6 +193,12 @@ export interface CreateOptions {
153
193
  registry?: RegistryAuth;
154
194
  containerCommand?: string[];
155
195
  mounts?: MountSpec[];
196
+ /**
197
+ * Named, operator-backed persistent volumes to attach by name. Requires the
198
+ * operator to have enabled platform volumes; otherwise the create is rejected
199
+ * with 412. Only supported on the docker/gvisor runtimes.
200
+ */
201
+ platformVolumes?: PlatformVolumeMount[];
156
202
  lifecycle?: Lifecycle;
157
203
  failover?: Failover;
158
204
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aerol-ai/aerolvm-sdk",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "test": "tsc -p tsconfig.test.json --outDir dist-test && node --test dist-test/*.test.js dist-test/internal/*.test.js"
22
22
  },
23
23
  "devDependencies": {
24
- "@types/node": "^25.9.2",
24
+ "@types/node": "^25.9.3",
25
25
  "typescript": "^6.0.3",
26
26
  "tsx": "^4.22.4"
27
27
  }