> Canonical guide: https://developers.foxlight.ai/build/sdk/reference/node_runtime/
> Contract snapshots: Skulk 2.0.0 (b0af39c79b6b7102b2478062904f1d7cc8619975); SDK 1.0.1 (fe6e0f8737ae343769b8cfc0a67ab112b9efac52). Check the installed runtime when versions differ.

# node_runtime API

SDK 1.0.1. This reference describes the supported authoring interface.

## `NodePlatform`

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

## `NodeSource`

Exact upstream files; acquisition is separate from runtime authority.

### Fields

```python
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
```

| Field | Description | Declared defaults and constraints |
| --- | --- | --- |
| `platform` | Selected runtime architecture. | — |
| `version` | Explicit Node security patch. | — |
| `archive_name` | Immutable upstream archive basename. | — |
| `archive_sha256` | — | pattern="^[a-f0-9]&#123;64}$" |
| `archive_size` | — | gt=0 |
| `binary_sha256` | — | pattern="^[a-f0-9]&#123;64}$" |
| `binary_size` | — | gt=0 |
| `license_sha256` | — | pattern="^[a-f0-9]&#123;64}$" |
| `license_size` | — | gt=0 |
| `url` | Reviewed anonymous upstream HTTPS archive URL. | — |

## `node_source`

Return the reviewed upstream identity for one explicit platform family.

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

## `node_platform`

Resolve the current supported ABI family without selecting an executable.

```python
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.

```python
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.

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

## `SelectedNode`

Measured interpreter selection, not an installation or execution grant.

### Fields

```python
executable: Path
source: NodeSource
```

| Field | Description | Declared 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.

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