Addon examples
A public repository with a single addon package and a multi-addon bundle — manifest, runners, tests, and npm publish.
The worked examples live in github.com/dominevo/addon-examples. Clone that repository to build, test, and publish them. This page is the map. How each integration kind is built is on Build an integration.
Packages
| Package | What it shows |
|---|---|
@dominevo/addon-hello-notifier | Smallest log-destination (write only) |
@dominevo/addon-example-bundle | Three addons in one install unit, with a shared runner |
packages/example-device-integration | Device integration (role: 'devices') |
packages/example-service-integration | Service connection (role: 'services') |
packages/example-exporter | Exporter (device-export + integration-instances) |
The bundle's addon id example-exporter is a log-destination. The package
packages/example-exporter is the device exporter. They are different.
Single package or bundle
| Shape | When | Example |
|---|---|---|
| Single addon | One feature, one process, one camstack.addons[] entry | @dominevo/addon-hello-notifier |
| Bundle | Several addons that install and update together | @dominevo/addon-example-bundle (three addons) |
The npm package is the install unit. A bundle still starts one runner per
addon, unless those addons opt into the same execution.group. Per-addon
enable and settings stay separate.
hello-notifier provides log-destination (one required method, write).
That is the smallest output-shaped capability. A full notifier such as
notification-output registers the same way — subclass BaseAddon, call
super({}) with defaults, return { providers: [{ capability, provider }] }
— and then implements a much larger method list.
The bundle's example-devices addon is a device-provider with two
in-memory devices. example-listener subscribes to device.registered.
example-exporter is another log-destination and declares a pip
requirements file.
Runner options
Declared under camstack.addons[].execution. Omitted execution means
hub-only, on a runner whose id is the addon id.
| Field | Values | What it does |
|---|---|---|
placement | hub-only, any-node, agent-only | Where the addon may run. hub-only is the default. |
group | string, or omit | Addons that share a group share one process. Omit it for a dedicated process. |
heapProfile | light, heavy | V8 young-generation size. One heavy member makes the whole runner heavy. |
maxOldSpaceMb | number | Old-space ceiling in MB. Set from a measurement. 0 removes the ceiling. |
semiSpaceMb | integer 1–256 | Young-generation semi-space, from a GC log. |
initialOldSpaceMb | integer 16–65536 | Old-space size at start, paired with semiSpaceMb. |
rssBudgetMb | number | Resident-memory budget the watchdog warns on. It does not kill the process. |
isolate | boolean | Only a builtin inside @dominevo/system. Ignored on every other package. |
Share a group only when every member is off the live camera path, passes
no frames, and can crash without stopping capture or recording. The
example puts the listener and the exporter in example-observers for that
reason, and leaves the device provider on its own runner.
package.json
| Field | Role |
|---|---|
name | @dominevo/addon-<name> |
keywords | Include camstack, addon, camstack-addon |
type | module |
main / exports | dist/ entry the package barrel publishes |
camstack.addons[].entry | File the hub actually loads, for example ./dist/index.js |
files | dist, README.md, CHANGELOG.md, plus assets and python when you ship them |
engines | node >= 22 |
peerDependencies | @dominevo/types, because the hub provides it and this build does not inline it |
scripts | build (typecheck + vite), test (vitest), validate, deploy (dominevo deploy .) |
@dominevo/system, @dominevo/ui-library, and @dominevo/shm-ring stay
outside the bundle whenever you import them (native code, or one shared
React). @dominevo/types/<subpath> stays outside too. A self-contained
build inside the server repository inlines the bare @dominevo/types
import, zod, and @dominevo/sdk; these examples keep them external so
the package stays a thin peer of the hub.
A secret on an instance record is a string field with .meta({ secret: true }).
The records door stores it in the keychain, bound to that row. Do not put the
value in an environment variable.
There is no widgets key on the manifest. A widget is the addon-widgets
capability. An admin pages entry needs a Module Federation remote, so the
examples document that shape and do not ship a page.
Testing
@dominevo/types does not export a fake AddonContext. The examples
repository includes test/fake-addon-context.ts: a typed context whose
unwired methods throw. Specs drive initialize, then call the provider.
npm run validate checks the manifest keys and checks every capability
name against KNOWN_CAP_NAMES. On a the Dominevo server checkout the same
idea is dominevo develop validate.
Publish
Hubs install the npm dist-tag latest (beta prefers the beta tag,
then latest). Agents follow the hub's installed copy.
npm run build && npm test && npm run validate
npm publish --workspace @dominevo/addon-hello-notifier --access public
npm publish --workspace @dominevo/addon-example-bundle --access publicTag a release latest when the version is already in the registry:
npm dist-tag add @dominevo/[email protected] latestThe repository's publish workflow is switched off until NPM_TOKEN is set.
Install on a dev hub from a checkout with npm run deploy -w <package>,
or from the registry with the Addons page after publish.
Then
Examples from core addons
Patterns to copy — device providers, notifiers, OSD Manager, post-analysis, Home Assistant — and what each demonstrates.
AI-assisted development
How to drive Cursor or another agent on Dominevo — skills first, CLI/MCP tools, one hypothesis at a time, deploy before believing a log line.