Skip to content

【Feature】Plugin runtime & hooks #69

@gaoredu

Description

@gaoredu

Is your feature request related to a problem? Please describe.

design.md defines in-process hooks (article.beforePublish, article.afterPublish, etc.), but the server only dispatches webhooks. There is no HookService, no plugins/{id}/plugin.json loader, and no way to intercept or transform data inside the CMS.

Describe the solution you'd like

  • Add server/src/modules/hook/ with applyFilters / doAction
  • Wire hooks into article, comment, and setting services
  • Ship a sample plugin (plugins/seo-basic) using article.beforePublish

Describe alternatives you've considered

  • Webhooks only — works for external sync, but cannot block publish, rewrite fields, or run spam filters in-process
  • Fork server — possible for one site, not viable for a plugin ecosystem

Additional context

Priority: P0 · Blocks the plugin system · Evidence: article.service.tswebhookService.dispatch('article.published') only

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions