The contract examples
Three official example packages — one per install class — published to the package registry as the canonical, machine-readable package contract.
The package contract has three example packages, one for each way a package reaches the platform (a package folder listed on a source loads like the project drop). Each exercises every surface its install class can carry, once, and nothing it cannot: what this site describes, the examples declare.
Three examples, one per install class
| Example | Install class | Package identity | Runtime |
|---|---|---|---|
example-builtin | Admin-installed npm/dependency package | @neuralis/example-builtin | Node, in-process, host-assigned native trust |
example-project | A drop into a project's _packages/ directory | @example/project-package | Extism WASM sandbox, untrusted |
example-source | Markdown discovered in a synced source | @neuralis-examples/example-source | None — no install step, no code, no package.json at all |
Schema demonstrations, not working capabilities
Each contribution file teaches its category's schema: which fields exist, which are required, what the host does with each, what breaks if wrong. None ships a useful skill, rule or agent — one competing with the platform's real ones would pollute every agent's context. Copy the shapes; the examples themselves do nothing.
Where to get them
Native package source is not published; the examples reach you through the package registry (marketplace), the one rail serving a single element rather than a whole tree.
Public registry not yet deployed
registry.neuralisapp.com does not resolve to a public registry today, so
there is no public URL to install from yet. A self-hosted instance serves the
full API and the CLI now — point NEURALWEB_REGISTRY at it.
Markdown elements (Tier A) read as plain text; schema-only contracts (Tier B)
as one self-verifying JSON envelope; runtime-bound elements (Tier C) answer
409 TIER_C_NOT_STANDALONE with a link to the parent package. The tier
membership and endpoints are on the marketplace page.
# Tier A — the authoring walk-through, plain text (no version = latest listed;
# drop the --line-* range for the whole file)
neuralweb read '@neuralis/example-builtin#docs/docs.create-package' --line-start 1 --line-end 40
# Tier B — a tool schema, verbatim, in a self-verifying JSON envelope
neuralweb info '@neuralis/example-builtin#tool/example_query'Every read is verified end to end (one mismatched byte fails).
neuralweb install <ref> --channel project drops a verified Tier-A element into
a project's _packages/; --channel builtin only prints the admin's
command — installing builtin-class code is the admin's trust act. There is no
base package to fork: author your own @yourco/* against the same contract.
What each tree demonstrates
example-builtin — the full contract
The builtin class is the only one that carries every surface, so this tree is the reference for all of them.
package.json # the manifest — the `neuralis` key holds everything
README.md # package-meta — NOT a contribution
hooks.json # declarative lifecycle hooks
tools/example_query.json # strict JSON Schema + one x-neuralis extension
tools/example_health.json
workflows/sample-workflow.json # a workflow TEMPLATE — typed JSON, never prompt-injected
skills/example-skill/SKILL.md # agentskills.io-shaped skill (category: skill)
rules/guardrails.md # safety rules (category: rule)
agents/example-agent.md # a delegation target (category: agent)
docs/create-package.md # authoring walk-through (category: docs)
team/example-member/member.json # a team member + its identity prose
team/example-member/identity/persona.md
src/lifecycle.ts # init / start / stop / api + hook callbacks
src/routes/health.ts # file-discovered HTTP routes
src/routes/query.ts
src/tools/example_query.ts # handler paired with tools/example_query.json (default-exported)
src/tools/example_health.ts
app/surfaces/{kind}/{id}/ # one canonical root per asset-backed surface
app/shared/example-theme.css # package-public assets — bundle-mode surfaces only
assets/example-icon.svg # static icons, images- Manifest. Identity and model-facing description, the
source/runtime/access/metablocks,requires(two features with default role grants and anaccessFeaturebase gate),credentials[], asources[]instance,configSettings[],uriPolicies,policies[],connectors[],resources[]andapp.surfaces[]— Manifest. - Tools.
example_queryandexample_healthshow the strict schema —$schema,title, rootadditionalProperties: false, onex-neuralisextension (dottedoperation,transport, fullannotationswith the mandatory riskcategory, a carduiblock). Each handler atsrc/tools/<name>.tsbinds by its default export; a named-only export is silently skipped — Tools. - Markdown contributions. A folder-per-skill
SKILL.md, a rules file, a delegation agent, a docs walk-through and ateam/member with identity prose, each categorized by its folder. Root loose markdown (the README) is package-meta, never a contribution — Skills. - Workflow template.
workflows/*.jsonis a typed JSON array liketools, not a sixth file category: inputs,manual+webhook+scheduletriggers withmaxRuns/endAtguardrails, delivery, an execution policy, a feature gate. - Lifecycle and routes.
src/lifecycle.tsexportsinit/start/stopand a typedapi();src/routes/*.tsare file-discovered, feature-gated handlers — Lifecycle, Routes. - Hooks.
hooks.jsondeclaresPreToolUse/PostToolUsehooks on named tools whosecallbacks are named exports of the lifecycle module. - URI policies. Baselines for
data://<self>/**andpackages://<self>/**, with a nested rule keepingsrc/**read-only — URI policies. - App surfaces. Two widgets, one standalone dock entry, two tool-matched
cards. The first widget and card are self-contained HTML (the default); the
second card,
example_approval.card, matches the same tool with"state": "approval-required"; the second widget declares"assetMode": "bundle"(stylesheet, scripts, a JSON sibling, an image, the package-publicapp/shared/example-theme.css) and opts out of a dock entry with"dock": {"show": false}— App surfaces. - Connectors, resources, policies. An in-process host gateway connector, an
OAuth-configured HTTP gateway, an MCP resource entry and full policy shapes.
policies[]kindssafety(tool blocklist, per-tool timeout),permission(tool allowlist) andtrust(input validation on/off) run before any handler, and a deny is absolute;kind: "access"is accepted and does nothing (tool gating is onlyx-neuralis.requires.features).safetyspans every loaded package, so it is honoured only from a native manifest;permissionandtrustrestrict the declaring package at any trust level.
No example ships a commands/ folder: the array remains for imported packages;
new packages ship skills.
example-project — the sandboxed project drop
The same contract, narrowed to a _packages/ drop: one tool with its handler,
one route, one skill, one rule, one docs file, and one iframe widget with its
dock entry — an untrusted package has exactly one renderer. A single feature
id gates every surface it contributes (tool, route, widget, dock entry,
feature-gated markdown), so one grant is visibly several enforcement points.
Two things it deliberately does not do are covered on
WASM build.
example-source — markdown only, no manifest
No package.json, no code, no install step: the folder layout is the
declaration. It ships skills/, rules/, instructions/, docs/ and a root
AGENTS.md, and shows the default-ON / opt-in split of
source packages.
Deliberately never loadable
The examples pass every validator yet never auto-load. Three independent gates:
- Neither is a dependency of the host, and builtin discovery iterates only the host's own dependencies.
- Both manifests carry
neuralis.referenceOnly: true, a separate exclusion in the same loop. (example-sourcehas no manifest — it is markdown in a source, which contributes no code by construction.) - Their ids sit in the host's explicit reference-only set, so a manifest that lost its flag still could not be promoted: the exclusion runs before native trust assignment.
No gate relies on an invalid manifest. Any documentation-only package opts out the same way:
{ "neuralis": { "referenceOnly": true } }A dependency carrying the flag never auto-loads. The examples' tools, skills and routes are authoring examples, not a callable or smoke-test surface.
What this costs an agent
Rules and instructions enter every system prompt, agents are read when a
delegation resolves, skills cost only their description until activated, docs
are read on demand. So the example skill declares invocation: manual, the
agent is feature-gated, and the long walk-through costs nothing until opened —
copy that discipline with the shape.
Reading order for new authors
- Skim
example-builtin'spackage.jsontop to bottom with the manifest reference open. - Read
tools/example_query.jsonnext to Tools — the schema rules are where most first packages fail validation. - Read
skills/example-skill/SKILL.mdand Skills for the activation model. - Read the example matching how your package reaches the platform, and validate early: Testing and validation runs the same checks your package meets at bootstrap.