Repository navigation
feat!: Reference by modality with audio/video metadata; one name for sources - #35
Open
MyPrototypeWhat wants to merge 12 commits into
Open
MyPrototypeWhat wants to merge 12 commits into
MyPrototypeWhat wants to merge 12 commits into
Conversation
…tPolicy search_references projected only id/title/license/links, so an agent could not judge a match or tell whether it may store a result's media. Add the source description (capped at 280), the first 8 tags, the author, the cross-source relevance and rights.rehostPolicy, with each policy value explained in the output schema and tool description. sourceScore stays out: it is per-source and not comparable. Core exports REHOST_POLICIES and uses it in its own schema.
…nk, interfaces cannot extend it
…ds, no modality leaks
…es follow AUDIO_MIME
…e non-positive and rendition guards
… the source/modality release
…urface as isError
… heading levels, rerank and alias notes
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.
This is a breaking release covering items 10 and 11 of the architecture review.
Referencebecomes a union keyed by modality and gains audio and video metadata. The catalog a search queries now has one name, "source". It also fixes the defects that turned up in the same files.Design spec:
docs/superpowers/specs/2026-10-12-modality-union-and-source-naming-design.md. Plan:docs/superpowers/plans/2026-10-12-modality-union-and-source-naming.md. The changeset has the full migration guide.What changes
Referenceby modality.?: never, so a provider that writes the wrong field fails to compile, while readers keep compiling.z.discriminatedUnion, plus a per-variantpreview.mediaTypeprefix check. Cross-modality keys are stripped, and the testkit fails a provider that loses keys.AudioMeta:durationSec,bitrateKbps,sampleRateHz,channels,format.VideoMeta:durationSec,fps.thumbnailis always an image a UI can show.visualmeans the original's size.One word: "source". A provider is adapter code; each provider instance serves one source. These are renamed:
meta.providers→meta.sources;ProviderSearchStatus.providerId→SourceStatus.sourceId;providerOptions→sourceOptions;onProviderError→onSourceError;ref.source.providerId→ref.source.id;The
sourcesinput, the MCPsourcesparam and every adapter-side name stay as they are.Metadata from existing responses, with no new requests.
durationSecfor openverse-audio, freesound, jamendo, pexels-video and pixabay-video.Fixes.
ogx,midandwebmare labelled correctly, and an unknown filetype gets no preview.polyhaven-hdriid.SourceSelectionError, plus a structuralisSourceSelectionErrorguard, so hosts and the dsh plugin stop matching message text.film/animation, openverse-audiomusic.sourceOptionsids now produce a warning.visual.@refkit/mcp. ThesourceOptionsinput, the agent refsource, and newdurationSec/width/heightfields. The find-references skill from feat: refkit agent plugin for Claude Code and Codex #34 now names thesourcefield.Release. One changeset bumps
@refkit/core,@refkit/mcpand all 19 providers to minor; that is how 0.x signals a breaking change. Providers pin core exactly, so hosts upgrade everything together.How it was built
There were four tasks, each implemented test-first and reviewed independently. A design review and a whole-branch final review came on top. Every finding was fixed or ruled on, and the reasons are recorded.
Testing
pnpm typecheck,pnpm lint,pnpm build,pnpm test:runandpnpm smoke:artifactall pass on top of current main, which includes feat: refkit agent plugin for Claude Code and Codex #34: 653 tests passed, 25 skipped.image/jpeg, and categories.REFKIT_LIVE=1 pnpm test:live: 634 passed. The only failure was a gutendex upstream 403.Follow-up
@refkit/dsh-plugin0.3.0 adapts to this release once it is on npm (spec D8). The final review lists its 25 concrete changes.