feat(plugin): let server plugins emit custom bus events - #46186
Conversation
Server plugins can only receive events via the event hook, forcing client/server plugin pairs into loopback HTTP workarounds. Add event.emit(type, properties) to PluginInput, publishing arbitrary namespaced event types (e.g. plugin.<pluginID>.<name>) on the Bus so clients can subscribe. TUI plugins subscribe with api.event.on(...) — loosen its typing so custom types filter through with a PluginEvent fallback shape while known SDK event types still narrow via Extract.
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR: feat(plugin): add typed rpc and custom events (#46105) This PR appears to be closely related as it also addresses custom events functionality for plugins. Both PRs deal with extending plugin capabilities to handle custom events, though PR #46105 mentions "typed rpc and custom events" while the current PR (#46186) specifically focuses on server plugins emitting custom bus events. These may be addressing overlapping concerns or the same feature from different angles. |
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Issue for this PR
Partial implementation of #6330
Type of change
What does this PR do?
Add event.emit(type, properties) to PluginInput, publishing arbitrary namespaced event types (e.g. plugin..) on the Bus so clients can subscribe.
TUI plugins subscribe with
api.event.on(...)How did you verify your code works?
Screenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist
If you do not follow this template your PR will be automatically rejected.