Skip to content

docs(plugins): explain namespaced custom hooks - #241

Open
gabek wants to merge 1 commit into
owncast-docusaurusfrom
fix/plugin-event-hook-namespacing
Open

docs(plugins): explain namespaced custom hooks#241
gabek wants to merge 1 commit into
owncast-docusaurusfrom
fix/plugin-event-hook-namespacing

Conversation

@gabek

@gabek gabek commented Aug 9, 2026

Copy link
Copy Markdown
Member

Related to owncast/owncast#5093, owncast/owncast#5119, and owncast/plugin-sdk#16.

Summary

  • Document receiver-owned custom hook namespaces across events, APIs, permissions, testing, and language SDK pages.
  • Show local handler declarations and fully qualified <recipient-slug>.<hook> emit targets.
  • Document the same manifest and on_event behavior for native WebAssembly plugins.
  • Clarify scenario inputs and emitted-event assertions.

Verification

npx docusaurus build --locale en compiled the updated MDX and reached the repository's expected client-redirect validation failure for /development-builds and /dev-docs/contributor-guide, which are generated by the skipped prebuild. No broken-link, anchor, MDX, or parse errors were reported.

Independent SDK and documentation review: clean after fixes.

Merge order

Merge after owncast/owncast#5119 ships and the SDK runtime pin is updated. This PR targets owncast-docusaurus, where the plugin documentation lives.

Copilot AI lite review requested due to automatic review settings August 9, 2026 21:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Owncast plugin documentation to clarify that custom hooks are receiver-owned and namespaced by the receiving plugin slug, and that emitters must target the fully qualified <recipient-slug>.<hook> name across SDKs, permissions, APIs, events reference, and the scenario test harness.

Changes:

  • Clarify custom-hook ownership and fully qualified emit targets (<recipient-slug>.<hook>) across permissions, APIs, and events reference docs.
  • Update JavaScript/Python SDK docs to describe local hook declarations vs fully qualified names.
  • Update scenario testing docs/examples to assert against fully qualified emitted event targets.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/plugins/testing.mdx Clarifies scenario event dispatch semantics for custom hooks and updates emitted-event assertions/examples.
docs/plugins/sdks/python.md Updates Python SDK mapping and decorator explanation to reflect receiver-owned custom hooks.
docs/plugins/sdks/native-wasm.mdx Documents how native WASM modules receive local hook names while emitters use namespaced targets.
docs/plugins/sdks/javascript.md Updates JS SDK mapping table to reflect receiver-owned custom hooks.
docs/plugins/permissions.md Updates events.emit permission docs to reflect fully qualified recipient hook targets and no host rewriting.
docs/plugins/events.mdx Reframes plugin-to-plugin “custom events” as receiver-owned hooks; updates examples and permission table wording.
docs/plugins/apis.mdx Updates owncast.events.emit reference to require fully qualified <recipient-slug>.<hook> targets and refreshes examples.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/plugins/testing.mdx
Comment thread docs/plugins/sdks/native-wasm.mdx Outdated
@gabek
gabek force-pushed the fix/plugin-event-hook-namespacing branch from 807ebec to 81555a9 Compare August 9, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants