@package-system

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.

How maturity is measured

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 packagesProject packages (_packages/)Source packages
Installed byPlatform admin, as a dependency of the host (any npm scope)Dropped into a project's _packages/ directoryNobody — discovered in any synced filesystem source
Discovery signalA neuralis block in the package's package.jsonPresence in the project data zoneContribution-layout files in the vector index
ExecutionIn-process Node (runtime.type: "node") or an MCP subprocess ("mcp")Extism WASM sandbox ("wasm") — the only code runtime below first-partyNone — markdown context only (skills, instructions, rules, agents, docs)
TrustForced to first-party by the hostuntrusted by default, trusted at mostNo code to trust; per-file defaults and gates, URI-policy evaluated per root and per file
Can shadow a builtin id—NeverNever — 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/*.json prompt commands, served as static prompt text to external protocol clients. See Directory contract.
  • Skills — agentskills.io-aligned SKILL.md bundles 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/*.json scheduled 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 areaDoc pagesWhat it covers
Contract (src/contracts)Directory contract, Manifest, Tools, Contributions, Sessions, ConnectorsThe vocabulary every other package speaks — PackageDefinition, PackageFile, PackageTool, SessionContext, the connector port.
Access & policy (src/access + src/policies)Features and access, URI policiesThe 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 launcherHow 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 examplesWriting 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.
DistributionThe neuralweb marketplacePublishing 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.

On this page