The package system
Every capability in Neuralis is a package — the protocol that makes that work.
Maturity: stable (85 %)
Package system. One manifest contract for installed, sandboxed and markdown-only packages, with schema-first tools, feature-gated routes, path policies, connectors and UI surfaces validated at load.
- Source packages are markdown only; code from a synced source runs only when an owner flags that source as a package source, and then in the WebAssembly sandbox.
- Below first-party trust, package code runs only in the WebAssembly sandbox, which offers no process execution.
- Events, config settings, provided services and prebuilt UI modules are honoured only for first-party packages.
- Tool names are global per deployment; there is no per-package tool namespace.
Neuralis is built around one architectural rule: every capability is a package. The host stays generic — it provides identity, project boundaries, the workspace shell, package routing, configuration, and deployment plumbing. Everything the product actually does — agents, filesystem, memory, terminal, admin, machine automation, tools, skills, connectors, hooks, policies, UI — arrives as a package that the host discovers, validates, and loads at bootstrap.
Treat this contract as a protocol, not an internal plugin format. It is
deliberately aligned with what the AI ecosystem already produces — skills
follow the agentskills.io standard and load
unchanged, contribution folders mirror the layouts of Claude Code, Cursor,
and friends, and a repository's existing .claude/ or .cursor/ directory
is recognized as a package without modification. The long-term claim is
simple: any AI capability bundle, from any tool, should be expressible
through — or adapt into — this one contract.
The contract is file-first. A package declares what it contributes through
files and manifest entries, never by registering code against the host: tool
schemas are JSON files, skills and rules are markdown, routes and tool handlers
are discovered from compiled modules by convention. The host reads the package's
directory, merges it with the neuralis manifest block in package.json, and
builds a typed PackageDefinition — the single canonical shape every runtime
surface consumes.
Three ways a package reaches the platform
| Builtin-class packages | Project packages (_packages/) | Source packages | |
|---|---|---|---|
| Installed by | Platform admin, as a dependency of the host (any npm scope) | Dropped into a project's _packages/ directory | Nobody — discovered in any synced filesystem source |
| Discovery signal | A neuralis block in the package's package.json | Presence in the project data zone | Contribution-layout files in the vector index |
| Execution | In-process Node (runtime.type: "node") or an MCP subprocess ("mcp") | Extism WASM sandbox ("wasm") — the only code runtime below first-party | None — markdown context only (skills, instructions, rules, agents, docs) |
| Trust | Forced to first-party by the host | untrusted by default, trusted at most | No code to trust; per-file defaults and gates, URI-policy evaluated per root and per file |
| Can shadow a builtin id | — | Never | Never — colliding skill ids are namespaced |
The first two are the installed classes the rest of this section
documents in depth. The third needs no install step at all: sync a mounted
repository or an agent's data tree, and its markdown contributions group
into packages agents can use — the import path for every .claude/,
.cursor/, and .github/ folder you already have.
Trust is assigned by source, not by self-declaration. A dependency the admin
added to the host is the trust act itself, so the host overwrites its trust to
first-party. A project-dropped package can never claim first-party, can never
use the in-process node runtime, and runs sandboxed. Declarative-only packages
(tool schemas and markdown, no runtime code) need no runtime type at all and are
safe at any trust tier.
Trust then shapes everything downstream: dispatch timeouts and rate limits (see lifecycle and execution), filesystem and network permissions in the manifest, which UI renderers a surface may use, and whether bundled skill scripts may run on the host shell.
What a package can contribute
- Tools — strict JSON-Schema tool definitions in
tools/*.json, callable by the model in-stream and over MCP. See Tools. - Commands —
commands/*.jsonprompt commands, served as static prompt text to external protocol clients. See Directory contract. - Skills —
agentskills.io-alignedSKILL.mdbundles with scripts, references, and assets. See Skills. - Instructions, rules, agents, docs — markdown that reaches the system prompt or becomes a spawnable delegate persona. See Contributions.
- Workflow templates —
workflows/*.jsonscheduled and triggered job definitions, instantiated into a project as editable workflows. Structured JSON, never prompt-injected. See Workflow templates. - Routes — feature-gated HTTP handlers served under
/api/packages/<id>/.... See Routes. - Connectors — filesystem-like source kinds and external service bindings. See Connectors.
- Sources — concrete source instances of an already-registered connector kind, seeded into a project or offered for on-demand add. See Declared sources.
- Resources — MCP resource entries (
uri,name,mimeType) advertised to external protocol clients alongside the package's tools. - Hooks — declarative lifecycle hooks (
hooks.json) validated at load time. - Policies — declared safety, permission, and trust entries the runtime compiles into tool allowlists, blocklists, and per-tool timeouts.
- App surfaces — widgets, dock entries, and chat cards under
app.surfaces[]. See App surfaces. - Team members — ready-made agent characters under
team/. - Features and role grants — capability ids the package provides, with per-role defaults. See Features and access.
- Credentials — the external secret ids the package needs, surfaced as rows in the admin credential catalog for an owner to fill in. Declaring one grants nothing and stores nothing. See Credentials.
- Config settings — the platform tunables the package owns, registered into the admin config surface; the host hardcodes no config schema of its own. See Config settings.
- URI policies — path-protection baselines for the package's own namespace. See URI policies.
Every contribution is scoped by the caller's real identity: package enable/disable state, role and feature grants, and project membership are evaluated deny-by-default before anything is advertised to a model or a user.
Section map
This section mirrors the @neuralis/package-system source layout, so the docs
group the same way the contract kernel does. The sidebar is grouped into the
same five areas:
| Source area | Doc pages | What it covers |
|---|---|---|
Contract (src/contracts) | Directory contract, Manifest, Tools, Contributions, Sessions, Connectors | The vocabulary every other package speaks — PackageDefinition, PackageFile, PackageTool, SessionContext, the connector port. |
Access & policy (src/access + src/policies) | Features and access, URI policies | The shared meetsRequires / hasFeature / rolePriority predicates and the four-layer URI-policy evaluator. |
Runtime (src/runtime + src/binding + src/data) | Lifecycle, Routes, Runtime stack, App surfaces, Skill launcher | How loaded packages are dispatched, routed, classified, and surfaced. |
Authoring & build (src/cli + src/testing + src/validation) | Create a package, Skills, Source packages, Testing, WASM build, Contract examples | Writing and importing packages, the three reach-paths side by side, the test harness, the WASM sandbox build, and three copyable examples — one per install class. |
| Distribution | The neuralweb marketplace | Publishing channels, vetting, capability disclosure, and per-element install. |
Where to go next
First-party packages
What builtin-class means, and the packages that ship with every installation.
Directory contract
The package layout and exactly what file-first discovery scans.
Manifest
The package.json neuralis block: identity, runtime, trust, requires, surfaces.
Tools
Schema-first tool authoring with the x-neuralis extension and result bounding.
Contributions
Instructions, rules, agents, docs, and team members — how each reaches the model.
Sessions
The canonical session shapes for user and system work.
Connectors
The source connector port and capability contract.
Features and access
Feature ids, role grants, and the shared visibility predicate.
URI policies
Per-package path protection evaluated at every layer.
Lifecycle
In-process node lifecycle, WASM sandbox, MCP runtime, and dispatcher behavior.
Routes
Declaring feature-gated route handlers with session-derived identity.
Runtime stack
The host classification snapshot packages and prompts read from.
App surfaces
Widgets, docks, and cards with the renderer-by-trust matrix.
Skill launcher
The composer skill-prefill affordance, its derived visibility, and the skillfile token.
Skills
The full SKILL.md protocol: frontmatter, activation, credentials, scripts.
Source packages
Packages discovered in synced sources — the no-install import path for existing tool folders.
Testing
Mock sessions, dispatcher inputs, and connector compliance helpers.
WASM build
Building project packages into the Extism sandbox.
Contract examples
Three example packages — builtin, project drop, and synced source — published to the registry.
Create a package
The three reach-paths side by side — installed node, project WASM, source markdown — and which layer a value belongs in.
The neuralweb marketplace
Publishing channels, six-stage vetting, signed revocations, and per-element install.