Skip to content

feat: provider resource declarations, kind-aware routing, MCP dynamic schema#25

Merged
MyPrototypeWhat merged 10 commits into
mainfrom
claude/provider-resource-declaration-426dad
Jul 25, 2026
Merged

feat: provider resource declarations, kind-aware routing, MCP dynamic schema#25
MyPrototypeWhat merged 10 commits into
mainfrom
claude/provider-resource-declaration-426dad

Conversation

@MyPrototypeWhat

Copy link
Copy Markdown
Collaborator

Summary

  • Provider declarations (two granularities): open ResourceKind vocabulary (14 well-known values + any custom string); optional kinds + one-line description on ReferenceProvider; optional kind on Reference. All 22 first-party factories declare a description; 19 declare kinds (brave / wikimedia-commons / openverse-image honestly stay undeclared as omnibus sources).
  • Kind-aware routing + provider whitelist (core): provider selection narrows in priority order — providers id whitelist → modality intersection → declared-kind match (undeclared providers conservatively included). New skip reasons not-selected / unsupported-kind in explain metadata; unknown whitelist ids warn and continue; the modality-only error message stays byte-identical.
  • MCP declaration-derived schema: createRefkitMcpServer derives the modalities / controls.media.kind / providers input enums and a per-provider Configured sources: list in the tool description from refkit.providers at startup — single source of truth, no second registry. Results now expose kind.
  • Testkit: searchConformant enforces that an annotated result kind is within the provider's declared kinds.

Spec: docs/superpowers/specs/2026-07-24-provider-resource-declaration-design.md · Plan: docs/superpowers/plans/2026-07-24-provider-resource-declaration.md

Test Plan

  • pnpm typecheck — clean across all 21 packages
  • pnpm test:run — 409 passed, 22 skipped (network-gated live tests)
  • pnpm build — all packages, ESM + DTS
  • 6 independent subagent reviews (per-batch spec+quality, plus a final holistic cross-layer review) — no blocking findings

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.
…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.
@MyPrototypeWhat
MyPrototypeWhat merged commit b1ee28c into main Jul 25, 2026
1 check passed
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.

1 participant