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

# Native candidate publishing

SDK **1.0.1** and author tools **0.2.0** supply the explicit compiler-free
native build path with the published native **0.7.0** cohort. See the
[SDK1 package/host compatibility record](https://developers.foxlight.ai/build/sdk/sdk1/sdk1-cohort/). The public tools contain
authoring, artifact and signature contracts; the owner, supervisor, runtime
installer and provider code are independently supplied. Start with the
[public SDK1 quickstart](https://developers.foxlight.ai/build/sdk/sdk1/native-public-quickstart/) for local Python/TypeScript
development without a private runtime. Final application and Skulk-release
qualification remain separate from package publication.

A native build selects `skulk.managed/2`, release protocol3, runtime protocol5
and `skulk.calls/2`. It uses the actual public compiled author reader, full native
identities and the active profile fingerprints. All fourteen installed ABI
fingerprints are compared with the immutable public candidate receipt. The
selected runtime kernel wheel must match that receipt's exact filename, SHA-256,
size and platform. No legacy revision is truncated or padded.

## Inputs and commands

Use Python3.13 and install the public SDK, author tools and one exact public
native wheel for your host. The workspace's `native-runtime` group selects
[native-v0.7.0](https://github.com/Foxlight-Foundation/skulk-capability-sdk/releases/tag/native-v0.7.0).
Python and TypeScript select this same declared-discovery cohort. Separately
issued older cohorts remain readable and independently selectable.
No compiler, Foxlight account or publisher registration is needed to acquire
these public source/packages or to build a disposable candidate.

The capability supplies its own spec and pure manifest factory. A native spec
uses the same package, dependency and data-file fields as a legacy spec. An
optional `validator` receives the public `NativeManifest` object from
`skulk_capability_tools.native_publishing`; its `.record` is the actual immutable
compiled record and `.canonical_json` holds that reader's canonical bytes.
The validator does not receive a legacy Python `Manifest`.

Build each supported platform from an exact runtime lock. That lock must include
the separately obtained owner package and all capability dependencies. The
[public native runtime recipes](https://developers.foxlight.ai/build/sdk/sdk1/native-runtime-acquisition/) acquire the
qualified owner 0.18.1 / SDK 1.0.1 / kernel 0.7.0 wheel closure anonymously.
Use the explicit `runtime --native --recipe` path; ordinary built-in runtime
recipes retain their legacy cohort. Your application lock and independent
rebuild remain separate inputs to feed signing.

```sh
capability-wheelhouse --lock runtime.uv.lock --spec capability-native.toml \
  --native-candidate --output wheels

capability-build --spec capability-native.toml --manifest manifest.json \
  --inference-runtime --wheelhouse wheels --skulk-source skulk-source/src \
  --private-key publisher.key --publisher example --sequence 1 \
  --expires-at EXPIRY_UNIX_SECONDS --state-schema example-native-v1 \
  --permission 'Run this explicitly configured capability' --output release
```

`publisher.key` is a protected local32-byte Ed25519 seed. The publisher keeps it
outside the capability package and wheelhouse. Use disposable keys and explicit
test trust for qualification. An operator must independently approve a publisher
before any of its code can be installed.

`--native-candidate` permits locked prereleases and the published native Linux
floor (glibc2.34). It does not select a wire protocol or authorize installation.
Without it, the ordinary recipe retains its existing stable-version policy and
glibc2.28 floor. Hash, size, dependency, platform and source-build checks apply to
both paths; the flag never enables an unpinned dependency or a third-party
source build for a missing native binary.

Universal locks can contain the same name and version under different platform
URLs. The recipe follows their explicit resolution markers and source references;
it refuses an ambiguous source instead of choosing by lock order or wheel tags.

`--inference-runtime` separately selects the native author/release/runtime
contracts. A native manifest requires a complete wheelhouse. The builder checks
runtime launchers, native binary identity, dependency closure, source ownership,
archive self-containment, duplicate sources and host metadata limits before
writing final artifacts. The deterministic bundle's actual hash is bound into
a newly admitted native manifest. The runtime signature uses the exact
`skulk.runtime/5` domain with its NUL separator. Legacy signature bytes and
accepted release/runtime protocol windows are unchanged.

The public publisher can produce a signed candidate without Skulk installed by
measuring a separately acquired public Core source directory. This is provenance,
not host authority. Core still verifies current publisher trust, compatibility,
exact artifacts and runtime admission before startup.

## Separate delivery and authority gates

Use the explicit native [author CLI journey](https://developers.foxlight.ai/build/sdk/sdk1/native-authoring/) for
create/run/watch/invoke/debug. Existing legacy flows retain their own contracts.
`capability-feed --native` assembles and verifies a native catalog from exact
release inputs and an independent rebuild reference; use `--help` for its
required identities and expiry bounds. Native catalog assembly and the existing
reviewed Store submission process are separate publication surfaces. Local
signing does not register a Foxlight
publisher, distribute a package, enable inference, approve a provider account or
grant caller permissions. Use the normal independently qualified Core/owner
installation path; the publisher contains no installer or host bypass.

Keep these results distinct: public source/package availability, deterministic
artifact integrity, publisher/catalog registration, signed installed startup,
application state migration, and real provider qualification. A successful
native package build alone proves none of the latter gates.

When editing the SDK workspace locally, force both workspace distributions to be
rebuilt during the frozen non-editable sync before testing. An existing wheel
with the same version can otherwise hide source edits:

```sh
uv sync --frozen --all-packages --no-editable --group native-runtime \
  --reinstall-package skulk-capability-sdk \
  --reinstall-package skulk-capability-tools
```

## Legacy applications using an SDK1 owner

A legacy protocol-four application can use the SDK1 owner and kernel without
changing its governed operation contracts. Tools `0.2.0rc5` expose the explicit
`--native-candidate` dependency policy on `capability-feed`, matching
`capability-wheelhouse --native-candidate`. This permits the locked SDK1 RC
packages and glibc2.34 floor while producing a legacy runtime-two release and its
normal legacy catalog. Use it when assembling SDK1 consumer candidates from the
same lock and independent rebuild. The platform set, every wheel hash, manifest
identity, permissions and state-schema checks remain mandatory.

Select `--native` only for actual managed/2 native declarations. Dependency-policy
selection supplies no host authorization or governed-effect approval.

With tools `0.2.0rc6`, the independent rebuild job should create its receipt with
the same explicit policy:

```python
from pathlib import Path
from skulk_capability_tools.assemble_feed import release_reference
from skulk_capability_tools.wheelhouse import load_lock

reference = release_reference(
    Path("independent/release"), load_lock(Path("uv.lock")), native_candidate=True
)
```

This records independently acquired direct-URL wheel sizes where uv's lock
contains only a hash. Other-platform kernel sizes come from the versioned public
qualification receipt; a local binary that disagrees is refused. The bundle and
manifest still come from that separate rebuild. Default legacy references and
the signed runtime/manifest protocols do not change.

---

Source-owned SDK guide: [public revision `9e77c82e9d1d`](https://github.com/Foxlight-Foundation/skulk-capability-sdk/blob/9e77c82e9d1d3e2ae3ffe0fb47e662f7be2bc34d/docs/native-publishing.md). Package/API revision: `fe6e0f8737ae` (SDK1.0.1).
