feat(events): document namespaced custom hooks - #16
Open
gabek wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the SDK and author-facing documentation to clarify namespaced custom hook ownership: plugins declare local custom hook names, while emitters must target fully qualified <recipient-slug>.<hook> event types. It also updates the bundled templates, skills, and relay/announcer examples to reflect the directed emitter→recipient round trip.
Changes:
- Document that
on/@plugin.on(...)custom hooks are local hook keys owned by the declaring plugin, and the host registers them as<plugin-slug>.<hook>. - Document that
owncast.events.emitmust target the fully qualified<recipient-slug>.<hook>name. - Update JS/Python templates, skills, guides, wire protocol docs, and relay examples/tests to use/describe the fully qualified announcer hook.
Reviewed changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sdks/python/owncast_plugin/template/src/plugin.py | Updates scaffolded example to show local custom hook naming and ownership. |
| sdks/python/owncast_plugin/template/AGENTS.md | Updates agent guidance table to describe local hook ownership + fully qualified emit targets. |
| sdks/python/owncast_plugin/template/.agents/skills/create-owncast-plugin-py/SKILL.md | Updates Python skill docs to describe local hook keys and qualified emit targets. |
| sdks/python/owncast_plugin/init.py | Adds docstrings clarifying local hook registration and fully qualified emit targets. |
| sdks/js/index.js | Updates top-level runtime comments to describe local custom hook keys and host qualification. |
| sdks/js/index.d.ts | Updates TypeScript docs for on and owncast.events.emit to reflect namespaced hook behavior. |
| sdks/js/create-owncast-plugin/template/src/plugin.js | Updates JS template example to show local hook naming and ownership. |
| sdks/js/create-owncast-plugin/template/AGENTS.md | Updates agent guidance table for local hook ownership + fully qualified emit targets. |
| sdks/js/create-owncast-plugin/template/.agents/skills/create-owncast-plugin-js/SKILL.md | Updates JS skill docs to describe local hook keys and qualified emit targets. |
| README.md | Updates repository README to explain local hook declaration vs qualified emit targets and updates the relay→announcer narrative. |
| examples/python/relay/src/plugin.py | Updates relay example to emit to announcer.announcement.broadcast. |
| examples/python/relay/README.md | Updates relay example docs to describe targeting announcer’s fully qualified hook. |
| examples/python/relay/plugin.manifest.json | Updates relay manifest description to reference the qualified target hook. |
| examples/python/relay/INSTRUCTIONS.md | Updates relay instructions to reference qualified emit target and round trip wording. |
| examples/python/relay/tests/relay.test.json | Updates relay scenario expectations to assert the qualified emitted event type. |
| examples/python/README.md | Updates examples catalog descriptions to distinguish emitter targeting vs receiver hook ownership. |
| examples/python/announcer/README.md | Updates announcer docs to describe local hook ownership and host registration behavior. |
| examples/python/announcer/plugin.manifest.json | Updates announcer manifest description to reflect hook ownership. |
| examples/python/announcer/INSTRUCTIONS.md | Updates announcer instructions to describe host routing from qualified target to local hook. |
| examples/js/relay/src/plugin.js | Updates relay example to emit to announcer.announcement.broadcast. |
| examples/js/relay/README.md | Updates relay example docs to describe targeting announcer’s fully qualified hook. |
| examples/js/relay/plugin.manifest.json | Updates relay manifest description to reference the qualified target hook. |
| examples/js/relay/INSTRUCTIONS.md | Updates relay instructions to reference qualified emit target and round trip wording. |
| examples/js/relay/tests/relay.test.json | Updates relay scenario expectations to assert the qualified emitted event type. |
| examples/js/README.md | Updates examples catalog descriptions to distinguish emitter targeting vs receiver hook ownership. |
| examples/js/announcer/README.md | Updates announcer docs to describe local hook ownership and host registration behavior. |
| examples/js/announcer/plugin.manifest.json | Updates announcer manifest description to reflect hook ownership. |
| examples/js/announcer/INSTRUCTIONS.md | Updates announcer instructions to describe host routing from qualified target to local hook. |
| docs/WIRE_PROTOCOL.md | Documents host-side namespacing of custom hook subscriptions and emitter targeting requirements. |
| docs/PLUGIN_AUTHOR_GUIDE.md | Updates author guide examples and permission docs to reflect qualified emit targets and local hook ownership. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
gabek
force-pushed
the
fix/plugin-event-hook-namespacing
branch
from
August 9, 2026 21:23
3e7cb65 to
9c78188
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to owncast/owncast#5093 and owncast/owncast#5119.
Summary
owncast.events.emittargets as fully qualified<recipient-slug>.<hook>names.Verification
Against the matching runtime from owncast/owncast#5119:
Merge order
Do not merge before owncast/owncast#5119 is released and
host-runtime/go.modis bumped to that build. The current pin keeps custom subscriptions literal. CI uses the matching open Owncast branch so this PR is tested against the new runtime before that release exists.