Regular plugin authors only need the fields on this page. IM platform adapter fields are not covered here.
Basic syntax
- JavaScript
- Python
Parsing rules
- JavaScript uses
//[key: value]. - Python uses
#[key: value]. - Declarations must be in the continuous comment block at the top of the file. Declarations after the first non-comment code line are ignored as headers.
keyis case-insensitive. Use lowercase for consistency.authoris required. Withoutauthor, the plugin is marked as invalid.- For most duplicate fields, the last value wins.
rule,event,method,param,dependency, and selector fields can repeat. - Boolean values support
true/false,1/0, andyes/no.
Common fields
Message trigger: rule
rule matches user messages. You can write multiple rule headers.
sender.param(1).
Events and scheduled triggers
Write
cron only once. It supports common 5-field expressions, expressions with seconds, and cron descriptors.
Trigger scope
Use selectors to limit which IM channels, users, or groups can trigger a plugin.
If you write both allowlist and blocklist selectors of the same type, the allowlist wins. Avoid mixing them.
Configuration parameters: param
Use JSON inparam headers to declare configuration fields. Declare one field per line.
Dependencies: dependency
Usedependency to declare packages that the plugin needs. Each line is a JSON object.
You can also import on demand in code: JavaScript uses
importModule(...); Python uses import_module(...).
HTTP route plugins
Declarerouter to let a plugin handle HTTP requests.
Do not use
/api, /open, or /healthz as route prefixes.
Marketplace fields
If you want to publish a plugin publicly, add these fields.Complete example
Machine-readable files
- JSON Schema:
schemas/plugin-manifest.schema.json - JavaScript type declarations:
types/middleware-js.d.ts