Plugin Setup and Config
Reference for plugin packaging (package.json metadata), manifests
(fluffbuzz.plugin.json), setup entries, and config schemas.
Package metadata
Yourpackage.json needs an fluffbuzz field that tells the plugin system what
your plugin provides:
Channel plugin:
fluffbuzz fields
| Field | Type | Description |
|---|---|---|
extensions | string[] | Entry point files (relative to package root) |
setupEntry | string | Lightweight setup-only entry (optional) |
channel | object | Channel metadata: id, label, blurb, selectionLabel, docsPath, order, aliases |
providers | string[] | Provider ids registered by this plugin |
install | object | Install hints: npmSpec, localPath, defaultChoice |
startup | object | Startup behavior flags |
Deferred full load
Channel plugins can opt into deferred loading with:setupEntry during the pre-listen startup
phase, even for already-configured channels. The full entry loads after the
gateway starts listening.
Plugin manifest
Every native plugin must ship anfluffbuzz.plugin.json in the package root.
FluffBuzz uses this to validate config without executing plugin code.
kind and channels:
Setup entry
Thesetup-entry.ts file is a lightweight alternative to index.ts that
FluffBuzz loads when it only needs setup surfaces (onboarding, config repair,
disabled channel inspection).
setupEntry instead of the full entry:
- The channel is disabled but needs setup/onboarding surfaces
- The channel is enabled but unconfigured
- Deferred loading is enabled (
deferConfiguredChannelFullLoadUntilAfterListen)
setupEntry must register:
- The channel plugin object (via
defineSetupPluginEntry) - Any HTTP routes required before gateway listen
- Any gateway methods needed during startup
setupEntry should NOT include:
- CLI registrations
- Background services
- Heavy runtime imports (crypto, SDKs)
- Gateway methods only needed after startup
Config schema
Plugin config is validated against the JSON Schema in your manifest. Users configure plugins via:api.pluginConfig during registration.
For channel-specific config, use the channel config section instead:
Building channel config schemas
UsebuildChannelConfigSchema from fluffbuzz/plugin-sdk/core to convert a
Zod schema into the ChannelConfigSchema wrapper that FluffBuzz validates:
Setup wizards
Channel plugins can provide interactive setup wizards forfluffbuzz onboard.
The wizard is a ChannelSetupWizard object on the ChannelPlugin:
ChannelSetupWizard type supports credentials, textInputs,
dmPolicy, allowFrom, groupAccess, prepare, finalize, and more.
See bundled plugins (e.g. extensions/discord/src/channel.setup.ts) for
full examples.
For DM allowlist prompts that only need the standard
note -> prompt -> parse -> merge -> patch flow, prefer the shared setup
helpers from fluffbuzz/plugin-sdk/setup: createPromptParsedAllowFromForAccount(...),
createTopLevelChannelParsedAllowFromPrompt(...), and
createNestedChannelParsedAllowFromPrompt(...).
For channel setup status blocks that only vary by labels, scores, and optional
extra lines, prefer createStandardChannelSetupStatus(...) from
fluffbuzz/plugin-sdk/setup instead of hand-rolling the same status object in
each plugin.
For optional setup surfaces that should only appear in certain contexts, use
createOptionalChannelSetupSurface from fluffbuzz/plugin-sdk/channel-setup:
Publishing and installing
External plugins: publish to ClawHub or npm, then install:extensions/ and they are automatically
discovered during build.
Users can browse and install:
For npm-sourced installs,
fluffbuzz plugins install runs
npm install --ignore-scripts (no lifecycle scripts). Keep plugin dependency
trees pure JS/TS and avoid packages that require postinstall builds.Related
- SDK Entry Points —
definePluginEntryanddefineChannelPluginEntry - Plugin Manifest — full manifest schema reference
- Building Plugins — step-by-step getting started guide