Skip to main content
xbot
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Complete reference for the plugin.json manifest file, based on plugin/plugin.go (PluginManifest) and plugin/manifest.go (validation).

Top-Level Fields

FieldJSON KeyTypeRequiredDescription
IDidstringUnique plugin identifier. Must match ^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$ (prevents path traversal/injection). Reverse DNS recommended.
NamenamestringHuman-readable plugin name.
VersionversionstringStrict semver MAJOR.MINOR.PATCH (e.g. "1.0.0").
DescriptiondescriptionstringShort summary of what the plugin does.
AuthorauthorstringPlugin author or organization.
HomepagehomepagestringURL to source or docs.
RuntimeruntimestringExecution environment: "native", "stdio", "grpc" (historical alias for stdio), "wasm", "script". Empty defaults to "native".
EntryentrystringEntry point. For script runtime: command to execute (e.g. "bash my-script.sh"). For stdio runtime: command to start the plugin process. Default/fallback — platform entries take precedence.
EntryWindowsentry_windowsstringWindows-specific entry override.
EntryDarwinentry_darwinstringmacOS-specific entry override.
EntryLinuxentry_linuxstringLinux-specific entry override.
ExecutableexecutablestringCommand to start the plugin process (gRPC runtime). Takes precedence over entry when set.
Argsargsstring[]Command-line arguments passed to executable.
ActivationEventsactivation_eventsstring[]Events that trigger activation. Formats: "onStart", "onTool:<name>", "onHook:<event>", "onCommand:<cmd>". Empty → defaults to ["onStart"].
Permissionspermissionsstring[]Required capabilities. "*" is a wildcard allowed in manifests. Unknown permissions fail validation.
ContributescontributesobjectDeclares what the plugin provides (see below).
DependenciesdependenciesarrayOther plugins this plugin depends on. Only format validation currently; version resolution is future work.
WebwebobjectFrontend ESM plugin module declaration (v2 web plugin runtime).
TimeouttimeoutstringGo duration string ("30s", "1m", "500ms"). Max 5 minutes. Zero/empty → DefaultPluginTimeout (30s).

Validation: entry or executable must be non-empty for stdio/grpc runtime plugins.

web Object (WebPluginDecl)

FieldJSON KeyTypeDescription
EntryentrystringFrontend module path relative to the plugin’s web/ dir (e.g. "index.js"). Served at /plugins/<id>/web/<entry>.
ContributescontributesJSONOpaque JSON blob passed verbatim to the frontend runtime. The frontend is the single authoritative gate for contribution semantics.

dependencies[] Object (PluginDependency)

FieldJSON KeyTypeDescription
IDidstringUnique identifier of the required plugin. Must be a valid plugin ID.
VersionversionstringVersion constraint. Accepts loose semver formats ("^1.0.0", ">=1.0.0", "~1.0.0", "1.x", "*").

contributes Object (PluginContributes)

FieldJSON KeyTypeDescription
ToolstoolsarrayTool contributions. Each: { name (required), description (required), input_schema (object) }.
HookshooksarrayHook subscriptions. Each: { event (required, must be a valid hook event), matcher (tool name pattern, "" = all) }.
ContextEnricherscontext_enrichersarrayEach: { name, description }.
CommandscommandsarraySlash commands. Each: { name (e.g. "/deploy"), description }.
CronscronsarrayScheduled tasks (see below).
ThemesthemesarrayEach: { id, file }file is relative to plugin dir (e.g. "themes/dracula.json").
OverlaysoverlaysarrayFull-screen overlays. Each: { id, description }.
ConfigurationconfigurationobjectUser-configurable settings (see below).
UIuiarrayWidget slot reservations (see below).

crons[] Object (CronContribution)

FieldJSON KeyTypeDescription
MessagemessagestringMessage sent to the agent when triggered.
CronExprcron_exprstringCron expression (optional).
EverySecondsevery_secondsintInterval in seconds (optional).
AtatstringAbsolute time point (optional).
DelaySecondsdelay_secondsintRelative delay in seconds (optional).

configuration Object (ConfigurationContribution)

FieldJSON KeyTypeDescription
TitletitlestringHuman-readable title for the settings section.
PropertiespropertiesmapMap of property key → ConfigProperty.

Users override these settings in ~/.xbot/plugins/<id>/config.json. Manifest default values seed the merged config.

configuration.properties.* (ConfigProperty)

FieldJSON KeyTypeDescription
TypetypestringJSON schema type: "string", "number", "boolean", "select", "multiselect".
LabellabelstringDisplay name. Falls back to the property key when empty.
DescriptiondescriptionstringPurpose of the property.
DefaultdefaultanyDefault value when no user configuration exists.
OptionsoptionsarrayChoices for select/multiselect. Each: { label, value }.
SectionsectionstringGroup property under a named section in the settings UI.
SecretsecretboolMask the value in UI.
PlaceholderplaceholderstringHint text for text inputs.
RequiredrequiredboolValue must be set.
MinimumminimumfloatInclusive lower bound for number type.
MaximummaximumfloatInclusive upper bound for number type.

ui[] Object (UISlotContribution)

FieldJSON KeyTypeDescription
IDidstringUnique widget ID within the plugin. Used as the key for runtime updates.
SlotslotstringTarget zone: titleBarLeft, titleBarRight, statusBarLeft, statusBarRight, infoBar, footer, toolHint.
PrioritypriorityintOrdering within a zone (lower = earlier/leftmost). Default 100.
DescriptiondescriptionstringHuman-readable explanation of what the widget shows.
RefreshIntervalrefresh_intervalstringSuggested polling interval (e.g. "30s"). Advisory only — push-based UpdateWidget is preferred.
Triggerstriggersstring[]Hook matchers that trigger an instant script run. Format: "EventName:Matcher" (e.g. "PostToolUse:Shell*"). Script runtime only.
SyncsyncboolRun hook triggers synchronously (inline in the hook goroutine). Default false (async).
InteractiveinteractiveboolWidget supports user actions (v2). Default false.

Validation rules for ui[]:

  • Requires "ui.contribute" permission (or "*").
  • Maximum 10 widgets per plugin.
  • Widget IDs must be unique within the plugin.
  • Invalid slot names fail validation.

Checksum Verification

plugin.sha256 next to plugin.json can hold the SHA256 of the manifest. Enable verification via LoadManifestWithOptions(dir, {VerifyChecksum: true}). Accepts "hash" or "hash filename" (GNU coreutils) formats.

Discovery

Plugins are discovered by scanning directories (default: ~/.xbot/plugins and ~/.xbot/plugins/builtin) for subdirectories containing a valid plugin.json. Invalid manifests are logged as warnings and skipped.