engenty wizards
Plugins

Files and manifest

Where the runtime looks for plugins, what counts as one, and what engenty.plugin.json says.

v0.5.0

Where the runtime looks

FolderWhat is in it
modules/ of the runtimePlugins that ship with engenty wizards
Each folder of PLUGINS_DIR (comma-separated)Plugins of this install
  • An installed app looks in ~/.engenty/wizards/plugins unless its .env names another folder.
  • In a checkout PLUGINS_DIR is empty. PLUGINS_DIR=examples/plugins in .env.local loads the examples.
  • A runtime that watches its plugins creates a folder of PLUGINS_DIR that is missing.

What counts as a plugin

In such a folder:

EntryIs
notify.ts, notify.jsA plugin of one file. Its id is the file’s name
contacts/engenty.plugin.jsonA plugin with a manifest
hello/index.ts, hello/index.jsA plugin without a manifest. Its id is the folder’s name
node_modules/<package>, node_modules/@scope/<package>Installed packages that carry a manifest
  • The runtime skips names that begin with . or _.
  • It doesn’t read .mjs files: Node keeps such a file once it is imported, so it could not load again.
  • Of two plugins with the same id, the first one found stays. The other shows under “Not a plugin” in Settings → Plugins, as does a manifest that cannot be read.

A plugin’s folder

contacts/
  engenty.plugin.json     the manifest
  src/
    plugin.ts             the server half
    schema.ts             its tables, for Drizzle
  migrations/
    0001_init.sql         the tables, as SQL
  ui/
    plugin.tsx            the studio half, as you write it
  dist/
    client.js             the studio half, built
    client.css
  package.json            only if it has dependencies of its own

Only the manifest is required. A plugin with a studio half must be a folder with a manifest.

The manifest

engenty.plugin.json is the same file an engenty module has. The runtime keeps fields it doesn’t know as they are.

{
  "id": "contacts",
  "name": "Contacts",
  "version": "0.1.0",
  "description": "Keeps the email address of everyone who ran a wizard to its end."
}
FieldDefault
idLower case, digits and -, starting with a letter, at most 40 characters. Part of the plugin’s addresses and of its tools’ idsrequired
nameShown in the settingsrequired
versionShown in the settings0.0.0
descriptionShown in the settings
serverThe server half, from the plugin’s foldersrc/plugin.ts, then src/plugin.js, then dist/plugin.js
studioThe built studio halfdist/client.js
stylesThe built studio half’s stylesdist/client.css

A path in the manifest must stay inside the plugin’s folder.

Dependencies

The plugin importsIt comes from
@engenty/wizards/plugin, @engenty/wizards/plugin/thread, zod, drizzle-orm, drizzle-orm/sqlite-coreThe runtime’s own copies, wherever the plugin’s file is
Its own filesBeside it, as TypeScript
Anything elseA node_modules the plugin brings beside it

For the studio half see The studio half.

On this page