Skip to content

Runtime Models

Runtime metadata, resources, command results, and operation options.

Describes a runtime’s identity, resources, lifecycle state, and ingress settings.

interface RuntimeInfo
NameTypeDescription
agent?RuntimeAgentInfoRuntime-agent metadata, when an agent was requested.
displayNamestringHuman-readable resource name.
egressPolicyEgressPolicyRuntime egress policy.
idstringUnique resource UUID.
idleSuspendAfterSecs?numberIdle duration before automatic suspension.
ingressSpecsIngressSpec[]Runtime ingress configuration.
resourcesRuntimeResourcesRuntime resource configuration.
statusRuntimeStatusCurrent lifecycle or execution state.

Runtime-agent status metadata.

interface RuntimeAgentInfo
NameTypeDescription
errorstring | nullRuntime-agent failure message, when present.
keystringRuntime-agent identifier.
logPathstringPath to the runtime-agent log.
statusRuntimeAgentStatusCurrent lifecycle or execution state.
updatedAtstring | nullTimestamp of the latest runtime-agent update.

Buffered command result returned by runtime execution methods.

interface CommandResult
NameTypeDescription
durationMsnumberCommand duration in milliseconds.
durationSecondsnumberCommand duration in seconds.
exitCodenumberProcess exit code.
stderrstringCaptured standard error bytes.
stderrTextstringCaptured standard error decoded as text.
stderrTruncatedbooleanWhether standard error exceeded the configured limit.
stdoutstringCaptured standard output bytes.
stdoutTextstringCaptured standard output decoded as text.
stdoutTruncatedbooleanWhether standard output exceeded the configured limit.

Configures runtime creation, resources, readiness waiting, and initial egress.

interface CreateRuntimeOptions
NameTypeDescription
checkpointId?string | nullCheckpoint UUID used to restore the new runtime.
egressPolicy?EgressPolicyInitial runtime egress policy.
idleSuspendAfterSecs?number | nullIdle duration before automatic suspension.
ingressSpecs?IngressSpec[]Initial runtime ingress configuration.
memoryMaxMib?numberMaximum autoscaled memory in MiB. Defaults to the initial memory request.
memoryMib?numberInitial runtime memory in MiB.
name?string | nullOptional human-readable runtime name.
pollIntervalMs?numberPolling interval in milliseconds.
resources?CreateRuntimeResourcesRuntime resource configuration.
runtimeAgent?string | nullRuntime-agent key to start after creation.
timeoutMs?numberRequest timeout in milliseconds.
vcpus?numberVirtual CPU count.
wait?booleanWhether to wait for the operation to become ready.

Options accepted when updating a runtime.

interface PatchRuntimeOptions
NameTypeDescription
egressPolicy?EgressPolicyReplacement runtime egress policy.
idleSuspendAfterSecs?number | nullReplacement idle-suspension delay in seconds.
resources?PatchRuntimeResourcesUpdated runtime resource configuration.

Configures environment, input, timeout, and output limits for a command.

interface ExecOptions
NameTypeDescription
cwd?string | nullRuntime working directory for the command.
env?Record<string, string> | nullEnvironment variables passed to the command.
maxOutputBytes?number | nullMaximum buffered bytes per output stream.
stdin?string | Uint8Array<ArrayBufferLike> | nullStandard input passed to the command.
timeoutSecs?number | nullCommand timeout in seconds.

Runtime start behavior and wait settings.

interface StartOptions
NameTypeDescription
pollIntervalMs?numberPolling interval in milliseconds.
timeoutMs?numberRequest timeout in milliseconds.
wait?booleanWhether to wait for the operation to become ready.

Polling and timeout settings for wait operations.

interface WaitOptions
NameTypeDescription
pollIntervalMs?numberPolling interval in milliseconds.
timeoutMs?numberRequest timeout in milliseconds.

Ingress protocol and runtime port mapping.

interface IngressSpec
NameTypeDescription
protocolstringIngress protocol, such as tcp or http.
runtimePortnumberPort exposed by the runtime.

Resource requests accepted while creating a runtime.

interface CreateRuntimeResourceRequests
NameTypeDescription
memoryMib?numberInitial requested memory in MiB.
vcpus?numberVirtual CPU count.

Structured resource configuration accepted while creating a runtime.

interface CreateRuntimeResources
NameTypeDescription
limits?RuntimeResourceLimitsMaximum runtime resources.
requests?CreateRuntimeResourceRequestsRequested runtime resources.

Resource requests accepted while updating a runtime.

interface PatchRuntimeResourceRequests
NameTypeDescription
memoryMib?numberReplacement requested memory in MiB.

Structured resource configuration accepted while updating a runtime.

interface PatchRuntimeResources
NameTypeDescription
limits?RuntimeResourceLimitsMaximum runtime resources.
requests?PatchRuntimeResourceRequestsRequested runtime resources.

Requested runtime memory and CPU allocation.

interface RuntimeResourceRequests
NameTypeDescription
memoryMibnumberMemory amount in MiB.
vcpusnumberVirtual CPU count.

Maximum runtime memory allocation.

interface RuntimeResourceLimits
NameTypeDescription
memoryMibnumberMemory amount in MiB.

Effective runtime resource requests and limits.

interface RuntimeResources
NameTypeDescription
limitsRuntimeResourceLimitsMaximum runtime resources.
requestsRuntimeResourceRequestsRequested runtime resources.