Skip to Content
@package-system

Create a package

Shipping one PackageDefinition as an installed node package, a project WASM package or source markdown, side by side.

In Neuralis every capability is a package, and the PackageDefinition is identical whichever way it ships; you only pick where it lives. An installed node package runs in-process; a project package (a drop in _packages/, or a package folder listed on a source, which loads the same way) runs WASM-sandboxed; a source package is markdown discovered in a synced source with no install step. Author the same manifest, tools/*.json and skills/<name>/SKILL.md; the platform treats it by the path it arrived through (four ways).

The parity matrix

installed node @scope/*project _packages/ (WASM)source markdown
Installwhile the host runs: neuralis package install + an approval + a restart; or into the image: neuralis pkg add + rebuild → node_modules/<name> (any scope)drop a folder in _packages/ (or list a source folder in packageFolders)none — discovered in a synced source
Discoverydeps-scan (the neuralis block)ProjectPackageScannersource vector-index
Trustnative (host-assigned)untrusted → trustedinherits the source trust
Runtime codein-process nodeWASM sandbox (neuralis-build generates dispatch)none — context-only
Tools + handlers✅✅ generated dispatch❌
Routes✅ direct✅ host-gated (dist/routes.json)❌
UIdirect React (a prebuilt module built with neuralis-build ui)iframe only❌
Statelivestateless (lazy-init, ctx.data)❌
Hookscallback executes; script / http are declared but have no executordeclared only — nothing fires today❌
skills / rules / instructions / agents / docs✅✅✅ (whole surface)

The 3 irreducible differences

Between an installed node package and a project WASM package, only three things genuinely differ — everything else is the same contract:

  1. UI: direct React vs iframe. A native package's widgets and cards are React components in the workspace, shipped as a prebuilt UI module (app.module); a project package's UI loads in a sandboxed iframe.
  2. State: live vs stateless. A node package holds live in-process state; a WASM package is stateless across calls (init(ctx) runs lazily once) and persists through ctx.data.
  3. Hooks: in-process callbacks vs nothing that fires. callback, script and http handlers are all validated at load, but only a node package's callback executes; a script or http hook fails at dispatch with no executor configured. Do not build a capability whose only trigger is a hook (Hooks).

A source package carries no code at all: the markdown surface only, no tools, routes, UI, state or hooks.

Which layer does this value belong in?

Three stores, not interchangeable; pick by what the value is:

The value is…Goes inRead with
a secret — an API key, token, or client secretmanifest credentials[]ctx.credentials.resolveCredential(id, scope)
a tunable — a cap, timeout, TTL, interval, threshold, model or URL defaultmanifest configSettings[]the injected config provider, read per call
boot-critical infrastructure — a database URL, an auth secret, a topology address needed before anything is decryptable.envthe host, at boot

Two rules follow from the table and are enforced:

  • A secret is never a config key: config values are admin-visible plaintext in the Config tab.
  • Declare only what something resolves: a credential or config row no code reads makes the operator believe a feature is configured while it stays dark.
  • A connector has no credentialFields and its factory context no credentials map: its secrets are ordinary credentials[] declarations (Credentials, Config settings).

Start from an example

One official example per way a package reaches the platform, each readable element by element from the package registry:

Your package will…ExampleRead it
be admin-installed as an npm dependency@neuralis/example-builtinneuralweb read '@neuralis/example-builtin#docs/docs.create-package'
be dropped into a project's _packages/@example/project-packageneuralweb read '@example/project-package#docs/<id>'
be markdown in a synced source@neuralis-examples/example-sourceneuralweb read '@neuralis-examples/example-source#skill/<id>'

Markdown elements read as plain text (--path for a multi-file element, --line-start/--line-end for a window); tool, connector, credential and config-setting contracts read as JSON (neuralweb info '<identity>#tool/<id>'). What the examples promise: Contract examples; the registry: Marketplace.

Where to go for depth

Manifest · Tools · Lifecycle · Routes · WASM build · Source packages.

On this page