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

# node_application API

SDK 1.0.1. This reference describes the supported authoring interface.

## `generated_asset`

Exclude generated install/desktop bookkeeping, never application modules.

```python
def generated_asset(name: str) -> bool:
    ...
```

## `asset_path`

Admit one normalized relative member without platform-specific aliases.

```python
def asset_path(value: str) -> str:
    ...
```

## `NodeAsset`

One exact regular application file in a signed runtime asset wheel.

### `NodeAsset.safe_path`

Refuse aliases and escapes before any filesystem access.

```python
def safe_path(cls, value: str) -> str:
    ...
```

### Fields

```python
path: str
sha256: str
size: int
executable: bool
```

| Field | Description | Declared defaults and constraints |
| --- | --- | --- |
| `path` | Namespace-relative member. | max_length=1024 |
| `sha256` | — | pattern="^[a-f0-9]&#123;64}$" |
| `size` | — | ge=0 |
| `executable` | Whether the regular asset may execute directly. | default=false |

## `NodeApplication`

Versioned public bootstrap metadata; signing/host admission is separate.

### `NodeApplication.exact_format`

Refuse numeric/boolean aliases of the bootstrap record version.

```python
def exact_format(cls, value: object) -> object:
    ...
```

### `NodeApplication.namespace`

Return a project-specific namespace independent of its version.

```python
def namespace(self) -> str:
    ...
```

### `NodeApplication.distribution`

Return the dependency root the signed native manifest must declare.

```python
def distribution(self) -> str:
    ...
```

### `NodeApplication.complete_assets`

Require exact entry/SDK members, bounded data and an unambiguous tree.

```python
def complete_assets(self) -> Self:
    ...
```

### Fields

```python
format: Literal[1]
bundle_id: Identifier
bundle_version: str
entry: str
files: tuple[NodeAsset, ...]
```

| Field | Description | Declared defaults and constraints |
| --- | --- | --- |
| `format` | — | default=1 |
| `bundle_id` | — | — |
| `bundle_version` | — | min_length=1; max_length=128 |
| `entry` | Module exporting the application's factory. | — |
| `files` | Complete regular-file inventory in the selected namespace. | min_length=2 |

## `verify_application`

Verify the entire selected asset namespace before importing application code.

No ancestor package search or mutable discovery selects these files. The
separate signed installer remains responsible for the complete runtime.

```python
def verify_application(application: NodeApplication, runtime: Path) -> Path:
    ...
```

## `verify_application_assets`

Measure an explicit complete asset tree without installing or importing it.

Author tools may supply their own immutable generation directory. This
measurement confers no installed status, startup authority or runtime grant.

```python
def verify_application_assets(application: NodeApplication, root: Path) -> Path:
    ...
```

## `launch_node_application`

Replace this bootstrap with exact selected Node, retaining owner/startup FDs.

The private selection FD supplies only the selected public credential-reader
interpreter, never account settings or credential values. The caller owns
startup authority; this function neither reads it nor manufactures context.

```python
def launch_node_application(application: NodeApplication, configuration_fd: int) -> None:
    ...
```

## `launch_node_source`

Exec measured author assets using only this interpreter's selected Node.

The caller supplies its local source generation and startup descriptor.
Nothing is installed into or modified in the interpreter environment. This
source launcher is independent of normal signed owner/Core admission.

```python
def launch_node_source(application: NodeApplication, root: Path, configuration_fd: int) -> None:
    ...
```

## `main`

Read only this exact bootstrap archive's versioned application declaration.

```python
def main() -> None:
    ...
```
