Repository navigation
feat(mcp): give agents description, tags, author, relevance and rehostPolicy - #33
Open
MyPrototypeWhat wants to merge 1 commit into
Open
MyPrototypeWhat wants to merge 1 commit into
MyPrototypeWhat wants to merge 1 commit 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.
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.
search_referencesused to give agents only the id, title, license and links. An agent therefore could not judge whether a result really matches, and it had no way to know whether it may store the result's media.rights.rehostPolicywas validated on every record, but nothing ever read it.Change
description: the source's own caption, capped at 280 characters.tags: the first 8 of the source's subjects.author.relevance: the 0..1 cross-source score after fusion and rerank.rehostPolicy.rehostPolicygets a reader. The output schema describes each value:hotlink-requiredmeans link only,cache-allowedmeans download and cache,thumbnail-onlymeans keep only the thumbnail, andno-storemeans keep nothing. The tool description also tells the agent to follow it before downloading or storing anything.sourceScoreis left out on purpose. It uses each source's own scale and only orders results within that source, so an agent comparing it across sources would be misled.relevanceis the score an agent can compare.REHOST_POLICIES. Core's own schema now uses it too, so the value list lives in one place, the same pattern asLICENSE_IDSandINTENTS.@refkit/core(new export) and@refkit/mcp(new output fields).Testing
authorandrehostPolicycome through,relevanceis in 0..1, andsourceScoreis absent.rehostPolicyvalues.pnpm typecheck,pnpm lint,pnpm build,pnpm test:run(521 passed, 23 skipped) andpnpm smoke:artifact.