Dominevo
Develop

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

PackageWhat it shows
@dominevo/addon-hello-notifierSmallest log-destination (write only)
@dominevo/addon-example-bundleThree addons in one install unit, with a shared runner
packages/example-device-integrationDevice integration (role: 'devices')
packages/example-service-integrationService connection (role: 'services')
packages/example-exporterExporter (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

ShapeWhenExample
Single addonOne feature, one process, one camstack.addons[] entry@dominevo/addon-hello-notifier
BundleSeveral 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.

FieldValuesWhat it does
placementhub-only, any-node, agent-onlyWhere the addon may run. hub-only is the default.
groupstring, or omitAddons that share a group share one process. Omit it for a dedicated process.
heapProfilelight, heavyV8 young-generation size. One heavy member makes the whole runner heavy.
maxOldSpaceMbnumberOld-space ceiling in MB. Set from a measurement. 0 removes the ceiling.
semiSpaceMbinteger 1–256Young-generation semi-space, from a GC log.
initialOldSpaceMbinteger 16–65536Old-space size at start, paired with semiSpaceMb.
rssBudgetMbnumberResident-memory budget the watchdog warns on. It does not kill the process.
isolatebooleanOnly 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

FieldRole
name@dominevo/addon-<name>
keywordsInclude camstack, addon, camstack-addon
typemodule
main / exportsdist/ entry the package barrel publishes
camstack.addons[].entryFile the hub actually loads, for example ./dist/index.js
filesdist, README.md, CHANGELOG.md, plus assets and python when you ship them
enginesnode >= 22
peerDependencies@dominevo/types, because the hub provides it and this build does not inline it
scriptsbuild (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 public

Tag a release latest when the version is already in the registry:

npm dist-tag add @dominevo/[email protected] latest

The 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