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
Name Type Description
agent? RuntimeAgentInfo Runtime-agent metadata, when an agent was requested.
displayName string Human-readable resource name.
egressPolicy EgressPolicy Runtime egress policy.
id string Unique resource UUID.
idleSuspendAfterSecs? number Idle duration before automatic suspension.
ingressSpecs IngressSpec[] Runtime ingress configuration.
resources RuntimeResources Runtime resource configuration.
status RuntimeStatus Current lifecycle or execution state.

Runtime-agent status metadata.

interface RuntimeAgentInfo
Name Type Description
error string | null Runtime-agent failure message, when present.
key string Runtime-agent identifier.
logPath string Path to the runtime-agent log.
status RuntimeAgentStatus Current lifecycle or execution state.
updatedAt string | null Timestamp of the latest runtime-agent update.

Buffered command result returned by runtime execution methods.

interface CommandResult
Name Type Description
durationMs number Command duration in milliseconds.
durationSeconds number Command duration in seconds.
exitCode number Process exit code.
stderr string Captured standard error bytes.
stderrText string Captured standard error decoded as text.
stderrTruncated boolean Whether standard error exceeded the configured limit.
stdout string Captured standard output bytes.
stdoutText string Captured standard output decoded as text.
stdoutTruncated boolean Whether standard output exceeded the configured limit.

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

interface CreateRuntimeOptions
Name Type Description
checkpointId? string | null Checkpoint UUID used to restore the new runtime.
egressPolicy? EgressPolicy Initial runtime egress policy.
idleSuspendAfterSecs? number | null Idle duration before automatic suspension.
ingressSpecs? IngressSpec[] Initial runtime ingress configuration.
memoryMaxMib? number Maximum autoscaled memory in MiB. Defaults to the initial memory request.
memoryMib? number Initial runtime memory in MiB.
name? string | null Optional human-readable runtime name.
pollIntervalMs? number Polling interval in milliseconds.
resources? CreateRuntimeResources Runtime resource configuration.
runtimeAgent? string | null Runtime-agent key to start after creation.
timeoutMs? number Request timeout in milliseconds.
vcpus? number Virtual CPU count.
wait? boolean Whether to wait for the operation to become ready.

Options accepted when updating a runtime.

interface PatchRuntimeOptions
Name Type Description
egressPolicy? EgressPolicy Replacement runtime egress policy.
idleSuspendAfterSecs? number | null Replacement idle-suspension delay in seconds.
resources? PatchRuntimeResources Updated runtime resource configuration.

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

interface ExecOptions
Name Type Description
cwd? string | null Runtime working directory for the command.
env? Record<string, string> | null Environment variables passed to the command.
maxOutputBytes? number | null Maximum buffered bytes per output stream.
stdin? string | Uint8Array<ArrayBufferLike> | null Standard input passed to the command.
timeoutSecs? number | null Command timeout in seconds.

Runtime lifecycle behavior and wait settings.

interface LifecycleOptions
Name Type Description
pollIntervalMs? number Polling interval in milliseconds.
timeoutMs? number Request timeout in milliseconds.
wait? boolean Whether to wait for the operation to become ready.

Polling and timeout settings for wait operations.

interface WaitOptions
Name Type Description
pollIntervalMs? number Polling interval in milliseconds.
timeoutMs? number Request timeout in milliseconds.

Ingress protocol and runtime port mapping.

interface IngressSpec
Name Type Description
protocol string Ingress protocol, such as tcp or http.
runtimePort number Port exposed by the runtime.

Resource requests accepted while creating a runtime.

interface CreateRuntimeResourceRequests
Name Type Description
memoryMib? number Initial requested memory in MiB.
vcpus? number Virtual CPU count.

Structured resource configuration accepted while creating a runtime.

interface CreateRuntimeResources
Name Type Description
limits? RuntimeResourceLimits Maximum runtime resources.
requests? CreateRuntimeResourceRequests Requested runtime resources.

Resource requests accepted while updating a runtime.

interface PatchRuntimeResourceRequests
Name Type Description
memoryMib? number Replacement requested memory in MiB.

Structured resource configuration accepted while updating a runtime.

interface PatchRuntimeResources
Name Type Description
limits? RuntimeResourceLimits Maximum runtime resources.
requests? PatchRuntimeResourceRequests Requested runtime resources.

Requested runtime memory and CPU allocation.

interface RuntimeResourceRequests
Name Type Description
memoryMib number Memory amount in MiB.
vcpus number Virtual CPU count.

Maximum runtime memory allocation.

interface RuntimeResourceLimits
Name Type Description
memoryMib number Memory amount in MiB.

Effective runtime resource requests and limits.

interface RuntimeResources
Name Type Description
limits RuntimeResourceLimits Maximum runtime resources.
requests RuntimeResourceRequests Requested runtime resources.