Add YouTube Live Companion ability#287
Open
yossitv wants to merge 3 commits into
Open
Conversation
Adds a community Background Daemon ability for YouTube Live chat summaries, status checks, and quiet-chat prompts. Constraint: Submit under community/youtube-live-companion for openhome-dev/abilities dev. Confidence: high. Scope-risk: moderate. Tested: OpenHome checker strict passed in PR workspace. Not-tested: Real private/unlisted YouTube Live OAuth connection in upstream workspace.
Contributor
🔀 Branch Merge CheckPR direction: ✅ Passed — |
Contributor
✅ Community PR Path Check — PassedAll changed files are inside the |
Contributor
✅ Ability Validation Passed |
Contributor
🔍 Lint Results✅
|
yossitv
added a commit
to yossitv/openhome_abilities
that referenced
this pull request
Jun 29, 2026
The PR preparation notes now live under docs/pr/archive with the submitted upstream PR link and branch metadata, so future follow-up can find the exact body used for openhome-dev/abilities#287. The ignore list also excludes generated public fork clones and Python cache directories. Constraint: The PR has already been submitted upstream as openhome-dev/abilities#287 Rejected: Keep the notes in docs/pr/youtube-live-companion | active PR prep path would look unresolved after submission Confidence: high Scope-risk: narrow Directive: Keep archived PR notes immutable unless correcting submitted-link metadata Tested: git diff --check --cached Not-tested: No runtime code changes
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.
PR Comment: YouTube Live Companion
This ability is intended as a community draft for
community/youtube-live-companion/.The current implementation does not import
config.pyat runtime. The OAuth placeholders, assistant prompts, polling controls, and speech templates are duplicated directly inmain.pyandbackground.pybecause the OpenHome upload/runtime loader currently treats each entrypoint as an isolated capability module. This avoidsNo module named 'config'failures when loading the background daemon.config.pyis intentionally left in the ability folder as a comparison/reference file only. It shows the previous centralized setup shape so reviewers can compare the inlinemain.py/background.pyvalues against the older shared-config version while deciding how OpenHome-managed OAuth should replace the manual placeholder layer.OAuth is intentionally draft-level in this PR. The ability currently uses manual placeholders for:
YOUTUBE_CLIENT_IDYOUTUBE_CLIENT_SECRETYOUTUBE_REFRESH_TOKENThe expected production direction is to replace that manual layer with OpenHome-managed OAuth / Linked Accounts once the OpenHome team wires up the final integration. Until then,
main.py,background.py, and the reference-onlyconfig.pyshould contain placeholders only. Real client secrets or refresh tokens must not be committed.Local credential tests are intentionally kept outside the Ability folder so they are not packaged into the upload zip. The local test harness may read a private
.envfile and patch the importedmain.py/background.pymodules during local smoke checks. The development-only test files live in this repo attests/youtube-live-companion/. OpenHome Cloud / Ability Editor does not read.env, and.envmust never be committed or included in the Ability zip.The background daemon is responsible for finding the active owned YouTube Live broadcast, polling live chat, storing recent chat state, and optionally speaking short assistant-style summaries or quiet-chat prompts. The interactive
main.pyreads that saved state for setup, status, summary, and reset commands.Runtime Tuning Surface
The Ability intentionally keeps its runtime tuning surface small and explicit. Reviewers and OpenHome operators can adjust language, polling cadence, speaking behavior, summary thresholds, and assistant tone by editing these top-level keys in the runtime files without changing the control flow:
SUMMARY_SYSTEM_PROMPTSandQUIET_SYSTEM_PROMPTSare the main tone controls. They are editable so the OpenHome team can tune how assistant-like, concise, or topic-aware the cohost guidance should be without rewriting the polling or trigger logic.Product Context
The original product idea is a
Live Stream Companionfor creators who are busy playing, building, presenting, or otherwise focused on the stream and may miss live chat. This is especially useful for smaller or early-stage streamers: when chat is quiet, the stream can easily become silent, which makes it harder for new viewers to engage and creates a negative loop.The Ability is meant to make OpenHome act like a cohost assistant, not a replacement host. It supports the creator by:
The current implementation is intentionally scoped to assistant/cohost support. It does not moderate YouTube chat actions such as deleting comments or banning users, and it does not end a livestream automatically. The status command only surfaces the saved daemon state so the streamer can notice whether the Ability is connected, waiting for an active live, or blocked by an OAuth/API error.
Trigger Words and Behavior to Review
Recommended Dashboard trigger words:
YouTubecan be mis-transcribed by STT asu twooryou two, so those variants are included for the status and summary paths.statusby itself is intentionally not recommended as a Dashboard trigger because it is too generic and may collide with normal conversation or other Abilities.youtube,youtube live setup,配信設定main.pyhas the three placeholder OAuth values replaced. If values are present, it logs that credentials are available and does not speak by default.youtube live status,youtube status,u two live status,配信ステータスyoutube_live_companion_state.jsonand speaks the current daemon state, credential source, target live title, live chat ID, last error, and buffered comment count.youtube live summary,youtube summary,u two live summary,コメント要約,チャット要約background.pyplus the live title/description to produce a short assistant-style summary.youtube live reset,youtube reset,reset,設定リセットExpected states to test include:
missing_config_values: placeholders have not been replaced in the runtime copy.waiting_for_active_live: OAuth values are present, but no owned active live broadcast is available.connected: an active live broadcast and live chat ID were found.authentication_error/api_error: OAuth refresh or YouTube API calls failed.Pre-Submission Verification
main.pyandbackground.pyentrypoint classes extendMatchingCapability.#{{register capability}}, accepted by the checker).main.pycallsresume_normal_flow()from afinallyblock.print()calls and useeditor_logging_handlerfor logs.requests.*()calls include atimeoutparameter.README.mdincludes a description and suggested trigger words, with full English/Japanese docs split intoREADME.en.mdandREADME.ja.md.youtube-live-companion/directory..envcredential testing stays outside the Ability zip and is documented as a repo-level test harness.Submission setting: this PR should target the
devbranch with files undercommunity/youtube-live-companion/.This PR does not claim the final OAuth UX is complete. It provides the working ability structure, voice flow, background polling behavior, and a clear integration boundary for the OpenHome team to finish OAuth cleanly.