Skip to main content

node_runtime API

SDK 1.0.1. This reference describes the supported authoring interface.

NodePlatform​

type NodePlatform = Literal['macos-arm64', 'linux-glibc-x86_64', 'linux-glibc-aarch64']

NodeSource​

Exact upstream files; acquisition is separate from runtime authority.

Fields​

platform: NodePlatform
version: Literal['22.23.5']
archive_name: str
archive_sha256: str
archive_size: int
binary_sha256: str
binary_size: int
license_sha256: str
license_size: int
url: str
FieldDescriptionDeclared defaults and constraints
platformSelected runtime architecture.—
versionExplicit Node security patch.—
archive_nameImmutable upstream archive basename.—
archive_sha256—pattern="^[a-f0-9]{64}$"
archive_size—gt=0
binary_sha256—pattern="^[a-f0-9]{64}$"
binary_size—gt=0
license_sha256—pattern="^[a-f0-9]{64}$"
license_size—gt=0
urlReviewed anonymous upstream HTTPS archive URL.—

node_source​

Return the reviewed upstream identity for one explicit platform family.

def node_source(family: NodePlatform) -> NodeSource:
...

node_platform​

Resolve the current supported ABI family without selecting an executable.

def node_platform() -> NodePlatform:
...

measured_file​

Hash a bounded regular selected file, refusing final links by default.

Root or the runtime user must own it and other users must not be able to replace its bytes. A selected virtualenv Python may explicitly follow its final link while measuring the actual target. This is not attestation of the containing installation.

def measured_file(path: Path, *, maximum: int, executable: bool=False, follow_selected_link: bool=False) -> str:
...

node_metadata​

Return deterministic wheel metadata shared by the builder and selector.

def node_metadata(source: NodeSource) -> bytes:
...

SelectedNode​

Measured interpreter selection, not an installation or execution grant.

Fields​

executable: Path
source: NodeSource
FieldDescriptionDeclared defaults and constraints
executable——
source——

select_node​

Select only the pinned Node wheel inside the named CPython 3.13 runtime.

No PATH, ambient package search, discovery or mutation is performed. The caller must supply the runtime selected by its installer or local tool.

def select_node(runtime: Path) -> SelectedNode:
...