Skip to main content
Upload a .npack archive to register a plugin, or add a version to one that already exists.

Request

The form field must be named archive, and the filename must end in .npack. Any other field name is ignored; a request with no archive field is rejected.

Response

Wrapped in a data envelope, like every management API response.
files_processed uses one fixed token per entry kind, in this order: wasm (always present), noorle, env, wit. Do not parse it for filenames — the archive’s actual filenames are not echoed back.

Archive contents

.npack is a gzip-compressed tar archive. Entries are matched by pattern, not by fixed filename: Directories are skipped; anything else is ignored. The plugin name is resolved in this order: metadata.name from noorle.yaml, then the archive filename minus .npack, then the WASM file’s stem.
Tool discovery does not depend on the .wit file. Tools are extracted by reflecting over the component’s exported functions; the WIT file, when present, only enriches tool descriptions.

Admission checks

The upload is rejected unless the WASM passes validation:
  1. It must be a valid Component Model binary. A core WASM module is rejected.
  2. Every import must begin with one of nine allowed WASI prefixes: wasi:clocks/, wasi:random/, wasi:cli/, wasi:sockets/, wasi:io/, wasi:filesystem/, wasi:http/, wasi:config/, wasi:keyvalue/.
  3. It must export at least one callable function.
noorle.yaml, when present, must declare schema_version: "1.0" exactly, and must pass config validation.

Limits

The 20 MB body limit is the management API’s upload_max_size_mb setting and is the value in effect in every shipped environment. Uploading through the Portal instead allows a larger per-file size.

Activation

A newly registered version is created dormant. The upload writes the version row, pushes its metadata, and then — in a single transaction — records the content hashes and flips the active version. If that final step fails, the new version stays dormant and the previously active version keeps serving. A plugin whose active_version is 0 has no activated version; tool dispatch against it fails until one is activated.

Status codes

Error bodies use the standard management API shape — see Errors and rate limits.
There is no upload rate limit on this endpoint.