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

Complete list of permission strings (plugin/permissions.go). Plugins declare them in plugin.json under permissions. The wildcard "*" (Go side only) grants everything; unknown permissions fail manifest validation.

Backend Permissions (Go)

ConstantStringGrants
PermToolsRegistertools.registerRegister tools and middleware (RegisterTool, RegisterTools, UseMiddleware).
PermToolsCalltools.callInvoke tools.
PermHooksSubscribehooks.subscribeSubscribe to lifecycle hooks (OnPreToolUse etc.) and register the plugin error callback.
PermContextEnrichcontext.enrichRegister context enrichers (EnrichContext).
PermStoragePrivatestorage.privateAccess the plugin’s private key-value storage (Storage() and typed helpers).
PermStorageSharedstorage.sharedAccess shared plugin storage.
PermNetworkOutboundnetwork.outboundMake outbound network requests.
PermBusReadbus.readRead from the event bus (with bus.plugin).
PermBusWritebus.writePublish to the event bus (with bus.plugin).
PermBusPluginbus.pluginUse the plugin-to-plugin event bus. Subscribe needs bus.plugin+bus.read; Publish needs bus.plugin+bus.write.
PermUIContributeui.contributeContribute UI widgets (ContributeUI). Also required by contributes.ui in the manifest.
PermChannelsRegisterchannels.registerRegister custom Channel providers.
PermCommandsRegistercommands.registerRegister slash commands.
PermCronSchedulecron.scheduleSchedule and cancel cron tasks.
PermUIThemesui.themesContribute themes (ContributeTheme).
PermUIOverlayui.overlayRegister and control overlays (RegisterOverlay, ShowOverlay, HideOverlay).
PermNotificationsSendnotifications.sendSend notifications and play sounds (Notify, PlaySound).

Frontend Permissions (Web Plugin v2)

These match web/src/plugin-api/manifest.ts Permission type and are also registered in the Go backend whitelist (allPermissions) — the two lists MUST stay in sync (a mismatch causes unknown permission "ui" reload failures):

PermissionGrants (frontend PluginContext<P> capability)
eventsTyped event bus access (ctx.events.on/once).
commandsCommand registration/execution (ctx.commands.register/execute/registerKeybinding).
rpcBackend RPC calls (ctx.rpc.call/notify).
stateKey-value state store (ctx.state).
uiUI capabilities: toast, panel open/close, editor view tabs (ctx.ui.openViewTab/openFileTab).
pluginsInter-plugin registry (ctx.plugins).
configPlugin configuration API (ctx.config).

Enforcement

  • Go: PermissionChecker (NewPermissionChecker, Has, HasAll, HasAny) — pluginContextImpl checks permissions on every capability call and returns *PermissionError (or silently warns for notifications).
  • Web: capabilities are types — PluginContext<P> only exposes capability interfaces whose permission is in P; accessing undeclared capabilities is a compile-time error.