Harmony Chat
Developers

Plugin authoring

Layout, manifest, and client entry.

A plugin is a directory under plugins/<id>/ with a harmony.plugin.json manifest at its root. The id is the directory name.

plugins/my.plugin/
  harmony.plugin.json
  client/            → clientEntry (bundled into clients)
  server/            → optional server module
  worker/            → optional worker module

Start from the sample:

plugins/harmony.sample.embed-notes/

Manifest

harmony.plugin.json declares the id, version, and which entrypoints exist. Keep the id stable — it is the key used by the registry, the CLI (harmony plugins <id> …), and the install path under $HARMONY_HOME/plugins/.

Entrypoints

FieldConsumed byNotes
clientEntryWeb / mobile / desktopLoaded same-origin, or via the origin allowlist
Server moduleMain serverRegistered during server start
Worker moduleWorkerOnly runs where a worker dials in

Build client output into the plugin's dist/, then stage it:

bun run plugins:build

That copies each dist/client.js into apps/web/public/plugins/<id>/client.js, which is where clients look for it.

  • Plugins for the trust model.
  • Storybook covers the plugin host surface under Harmony/Plugins/Host.