runcloud 0.2.208 → 0.2.210

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/README.md CHANGED
@@ -176,6 +176,7 @@ runcloud asset delete <id>
176
176
  ```bash
177
177
  runcloud sandbox create # start a sandbox (default image: runcloud/agent-base)
178
178
  runcloud sandbox create --cpu 0.5 --memory 1024 # allocate CPU cores and memory in MiB
179
+ runcloud sandbox create --memory 512 --memory-limit 2048 # may use up to 2048 MiB when the host has room; billed as used
179
180
  runcloud sandbox create --disk 80 # request an 80 GiB root filesystem
180
181
  runcloud sandbox exec <id> npm run build # run a command inside it
181
182
  runcloud sandbox shell <id> # interactive shell, streamed over the API
@@ -10,7 +10,7 @@ import { requireCredentials } from '../config.js';
10
10
  import { recordSimulatorAudio } from './run-cloud-audio.js';
11
11
  export const IOS_SIMULATOR_CAPABILITIES = ['HealthKit', 'HomeKit', 'WidgetKit', 'SpeechSynthesis', 'Contacts', 'Calendars', 'AppleAccount'];
12
12
  export const IOS_PLATFORM_VERSIONS = ['26.5'];
13
- export const IOS_DEVICE_NAMES = ['iPhone 17e'];
13
+ export const IOS_DEVICE_NAMES = ['iPhone 17e', 'iPad (A16)'];
14
14
  export function runCloudIosOptions(opts) {
15
15
  const capabilities = [...new Set(opts.capability ?? [])];
16
16
  if (!capabilities.length && !opts.platformVersion && !opts.deviceName)
@@ -150,6 +150,18 @@ function parseMemoryMb(value) {
150
150
  }
151
151
  return n;
152
152
  }
153
+ function parseMemoryLimitMb(value) {
154
+ const n = Number(value);
155
+ if (!Number.isInteger(n) || n <= 0) {
156
+ throw new InvalidArgumentError('--memory-limit must be a positive integer of MiB, e.g. 2048');
157
+ }
158
+ return n;
159
+ }
160
+ function assertMemoryLimit(memoryLimit, memory) {
161
+ if (memoryLimit !== undefined && memory !== undefined && memoryLimit < memory) {
162
+ throw new Error(`--memory-limit (${memoryLimit} MiB) must not be below --memory (${memory} MiB)`);
163
+ }
164
+ }
153
165
  function parseDiskGb(value) {
154
166
  const n = Number(value);
155
167
  if (!Number.isSafeInteger(n) || n <= 0 || n > MAX_SANDBOX_DISK_GIB) {
@@ -354,6 +366,7 @@ export function registerSandbox(program) {
354
366
  .option('--org <id>', 'billing and ownership organization')
355
367
  .option('--cpu <cores>', 'fractional vCPU allocation, e.g. 0.5', parseCpuCores)
356
368
  .option('--memory <mb>', 'memory allocation in MiB', parseMemoryMb)
369
+ .option('--memory-limit <mb>', 'memory the sandbox may use above --memory when its host has room, in MiB; memory above --memory is billed as used', parseMemoryLimitMb)
357
370
  .option('--disk <gb>', 'root disk capacity in GiB', parseDiskGb)
358
371
  .option('--idle-pause <seconds>', 'pause after inactivity; 0 keeps it running', parseIdlePauseSeconds)
359
372
  .option('--timeout <seconds>', 'maximum sandbox lifetime; defaults to 300, or 0 for persistent sandboxes', parseTimeoutSeconds)
@@ -390,6 +403,9 @@ export function registerSandbox(program) {
390
403
  body.cpu = cpu;
391
404
  if (memory !== undefined)
392
405
  body.memory = memory;
406
+ assertMemoryLimit(opts.memoryLimit, memory);
407
+ if (opts.memoryLimit !== undefined)
408
+ body.memoryLimit = opts.memoryLimit;
393
409
  if (opts.disk !== undefined)
394
410
  body.disk = opts.disk;
395
411
  const persistent = exposed || opts.persistent || opts.idlePause === 0;
@@ -801,6 +817,7 @@ export function registerSandbox(program) {
801
817
  .option('--size <size>', 'size preset for the restored sandbox')
802
818
  .option('--cpu <cores>', 'CPU cores, including fractional values', parseCpuCores)
803
819
  .option('--memory <mb>', 'memory in MiB', parseMemoryMb)
820
+ .option('--memory-limit <mb>', 'memory the fork may use above its memory when its host has room, in MiB; memory above it is billed as used', parseMemoryLimitMb)
804
821
  .option('--disk <gb>', 'root disk capacity in GiB (may only grow)', parseDiskGb)
805
822
  .option('--region <region>', 'placement region')
806
823
  .option('--secret-group <group>', 'attach a secret group to the fork; a fork inherits NONE by default (secrets live in memory, so a snapshot cannot carry them)', collectRepeatable, [])
@@ -816,6 +833,9 @@ export function registerSandbox(program) {
816
833
  body.cpu = opts.cpu;
817
834
  if (opts.memory !== undefined)
818
835
  body.memory = opts.memory;
836
+ assertMemoryLimit(opts.memoryLimit, opts.memory);
837
+ if (opts.memoryLimit !== undefined)
838
+ body.memoryLimit = opts.memoryLimit;
819
839
  if (opts.disk !== undefined)
820
840
  body.disk = opts.disk;
821
841
  if (opts.region)
@@ -22,9 +22,12 @@ export function renderHeldSecrets(id, held) {
22
22
  function resources(record) {
23
23
  const memory = formatMib(record.mem_mb);
24
24
  const disk = formatMib(record.disk_mb);
25
+ const ceiling = record.mem_limit_mb !== undefined && record.mem_mb !== undefined && record.mem_limit_mb > record.mem_mb
26
+ ? formatMib(record.mem_limit_mb)
27
+ : undefined;
25
28
  return [
26
29
  formatCpu(record.milli_cpu),
27
- memory ? `${memory} memory` : undefined,
30
+ memory ? `${memory} memory${ceiling ? ` (bursts to ${ceiling})` : ''}` : undefined,
28
31
  disk ? `${disk} disk` : undefined,
29
32
  ]
30
33
  .filter(Boolean)
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const CLI_VERSION = '0.2.208';
1
+ export const CLI_VERSION = '0.2.210';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runcloud",
3
- "version": "0.2.208",
3
+ "version": "0.2.210",
4
4
  "description": "Create and control run.cloud remote mobile simulators and cloud sandboxes",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
Binary file
@@ -415,6 +415,7 @@ warm-parked and resumable is the most expensive mistake available here.
415
415
  | `api` `api-force` | destroyed | a caller destroyed it. `api-force` bypassed a wedged guest |
416
416
  | `health-sweep` | interrupted | the platform judged it unhealthy |
417
417
  | `host-state-reconcile` | paused | the host had already parked it and the control plane caught up. The pause happened earlier than this event says |
418
+ | `host-memory-pressure` | paused | the host ran short of memory and parked the sandbox that held the most above its memory reservation. Only a sandbox with a memory burst ceiling can get this. Nothing is lost, and a resume brings it back |
418
419
  | `host-reconcile` `reap-sweep` | destroyed | the platform reclaimed it |
419
420
  | `boot-failure` `placement-timeout` `request-timeout` `scheduler` | never ran | capacity or image, not the workload |
420
421
  | `orphaned-placement` | never ran | the control plane restarted while placing it (stuck in pending/starting); create it again |
Binary file