feat: provider resource declarations, kind-aware routing, MCP dynamic schema#25
Merged
MyPrototypeWhat merged 10 commits intoJul 25, 2026
Merged
Conversation
Two-granularity provider declarations (modalities + open ResourceKind vocabulary), kind-aware core routing with provider id whitelist, and MCP dynamic schema/description generation from registered declarations.
…er, kind in output
…ces filter Upstream aa4b048 shipped SearchInput.sources — the same provider-id whitelist this branch implemented as SearchInput.providers. Resolution: adopt the upstream sources API (name, error messages, warning channel, MCP open-string param with runtime miss handling) and drop this branch's duplicate providers input; keep this branch's declaration-gated kind routing composed into the same skipReasonFor chain, plus the declaration-derived MCP schema/source list. Also: declare kinds/description for the new provider-nailbook and fold it into the changeset.
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.
Summary
ResourceKindvocabulary (14 well-known values + any custom string); optionalkinds+ one-linedescriptiononReferenceProvider; optionalkindonReference. All 22 first-party factories declare adescription; 19 declarekinds(brave / wikimedia-commons / openverse-image honestly stay undeclared as omnibus sources).providersid whitelist → modality intersection → declared-kind match (undeclared providers conservatively included). New skip reasonsnot-selected/unsupported-kindin explain metadata; unknown whitelist ids warn and continue; the modality-only error message stays byte-identical.createRefkitMcpServerderives themodalities/controls.media.kind/providersinput enums and a per-providerConfigured sources:list in the tool description fromrefkit.providersat startup — single source of truth, no second registry. Results now exposekind.searchConformantenforces that an annotated resultkindis within the provider's declaredkinds.Spec:
docs/superpowers/specs/2026-07-24-provider-resource-declaration-design.md· Plan:docs/superpowers/plans/2026-07-24-provider-resource-declaration.mdTest Plan
pnpm typecheck— clean across all 21 packagespnpm test:run— 409 passed, 22 skipped (network-gated live tests)pnpm build— all packages, ESM + DTS