Repository navigation
core(docs): define required-vs-optional host capability-check convention (#132) - #142
Merged
Merged
Conversation
Sub-issue 2/5 of #102: document the plugin-side convention for probing host APIs — feature detection at the call site, one predicate per host API (exact-surface typeof/version/import/hasattr/data-shape checks, never version strings), a single per-session warning naming the plugin, the feature and the missing requirement (API + matrix commit), and the rule that a missing optional API disables only its feature — never the plugin, never its basic-mode floor. Docs-only: the companion docs/compatibility.md matrix (#131) already pins the 'which commit' side; this is the 'how to probe' side. Covers all seven matrix rows with probe + per-row degradation contract (dlc_paths, read_member_bytes, chart-transform, /ws/sync relay, setExternalFrameDriver/renderFrame/renderFrameAt, playerContexts, getPhrases().top_difficulty), a canonical JS helper, the routes.py/context[log] backend equivalent, and a plugin-PR checklist. minHost metapassthrough limits and capability-declaration-as-not-a-probe are explicitly called out. Accepted scope exclusions: no new core API (a helper only new hosts ship cannot serve a degrade-on-old-host convention), no minHost changes (sub-issue 3/5).
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Overview
Docs-only PR (#132) adding Verification performed
Files Reviewed (4 files)
Reviewed by free · Input: 523.3K · Output: 7.4K · Cached: 637.4K |
cchacs
approved these changes
Oct 9, 2026
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.
Sub-issue 2/5 of #102. Docs-only, no code behavior change.
What this adds
docs/plugin-host-compat.md— the plugin-side convention for how to probe host APIs, the companion to the "which commit provides each API" matrix indocs/compatibility.md(#131):typeof/version/ import /hasattr/ data-shape checks — never version strings); a missing optional API disables only its feature, never the plugin; one per-session warning that names the plugin, the feature, and the missing requirement (API + matrix commit).0.3.0-alpha.1; a fork-only API can only gate the feature that uses it).HOST_FEATURES+hostFeature()/assumeHostFeature(), including an optionalwindow.feedBack.diagnostics.contributecontribution) and the backend equivalent (routes.pyguarded import +context["log"].warning, neverraisefromsetup()).dlc_paths._resolve_dlc_path,sloppak.read_member_bytes,chart-transform(chartTransformDomain.version === 1), the/ws/sync/{session_id}connect-probe (can't betypeof'd),setExternalFrameDriver/renderFrame/renderFrameAt,playerContexts.version === 1, andgetPhrases().top_difficulty(typeof === 'number'post-ready, with the "optional but load-bearing" nuance where0is a valid tier).minHostis metadata passthrough only (nothing understatic/reads it), and capability declarations are intent, not a probe.Also: README docs-list entry, a CLAUDE.md pointer under Plugin Best Practices, and a CHANGELOG
[Unreleased]entry.Scope exclusions (deliberate)
minHostchanges — making it actionable/feature-scoped is sub-issue 3/5.minHostbehavior changes. All probes were verified against currentstatic/highway.js,static/capabilities/chart-transform.js,static/capabilities/player-identity.js, andplugins/__init__.py; commit hashes and upstream/fork-only tags matchdocs/compatibility.mdexactly.Closes #132.
big-pickle(free) | 𝕏