Plugin Metadata & Extensions

Register permissions, automations, segments, and cross-module hooks so the platform discovers plugin behavior. This guide follows version 3.1.7 (03acdf712c).

For the runtime that consumes meta, see Backend Plugins.

Permissions

Each backend plugin declares src/meta/permissions.ts as IPermissionConfig { plugin, modules[], defaultGroups }. Example: backend/plugins/sales_api/src/meta/permissions.ts registers deal, board, pipeline, pos modules with admin/user/viewer groups. The gateway and UI enforce these actions; agent-tools annotations must reference an action the plugin actually registers.

Tourism, insurance, and posclient have no meta/permissions.ts in the checked revision; confirm the current checkout before assuming their actions.

Extension points

Passed as meta to startPlugin in each plugin's src/main.ts:

  • automations (meta/automations.ts): triggers, actions, findObjectTargets, setPropertyTargets, producers.
  • segments (meta/segments.ts): dependentModules, contentTypes, segmentFields, evaluators, member listing.
  • documents (meta/documents.ts): template replacers and print support.
  • references, tags ({ types: [...] }), properties ({ types: [...] }), notifications (meta/notifications.ts).
  • payments (transaction callbacks), importExport (export headers/data handlers), beforeResolvers/afterProcess.

Sales wires all of these in backend/plugins/sales_api/src/main.ts; use a same-shaped plugin as the structural reference without importing its source.

Migrations and boundaries

Own migrations inside the plugin (for example backend/plugins/operation_api/src/migrations/). Never read or mutate another plugin's collections directly. Read or create the AGENTS.md at each changed plugin root and keep its bounded recent-changes section in sync.

Source references

Was this helpful?