feat(registry): ?verification_mode and ?verified filters for GET /api/registry/agents#3515
Draft
bokelley wants to merge 1 commit into
Draft
feat(registry): ?verification_mode and ?verified filters for GET /api/registry/agents#3515bokelley wants to merge 1 commit into
bokelley wants to merge 1 commit into
Conversation
…api/registry/agents Wires up the filter capability already advertised in docs/building/aao-verified.mdx#registry-filter but missing from the API. Adds two optional query params: - ?verification_mode=spec|live (repeat for AND semantics — both axes required) - ?verified=true (any active verification badge) Both params are additive: ?verified=true&verification_mode=live requires a badge that covers 'live'. On DB error the endpoint returns 503 rather than silently leaking unverified agents. When ?compliance=true is also set, the prefetched badge map is reused to save one round-trip. bySource counts now reflect the filtered agent set. Closes #3505 https://claude.ai/code/session_01K5MAwn6xWdaQLNP4hf1sCy
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.
Closes #3505
docs/building/aao-verified.mdx#registry-filterhas advertised verification-mode filtering on the federated agent listing since PR #2153, butGET /api/registry/agentsnever wired up the parameter. This PR closes that gap.What changed
Two new optional query parameters on
GET /api/registry/agents:?verification_modespec,live(repeat for AND)?verifiedtrueBoth params are additive:
?verified=true&verification_mode=liverequires a badge coveringlive(thewithVerifiedcheck is then a strict subset of theverificationModescheck, so no redundancy).Filter semantics — AND across repeated params, via a single-badge predicate:
Validation — unknown
verification_modevalues get a 400 withvalid_values: ["spec","live"].Error handling — DB failure returns 503 (not silently unfiltered, which would leak unverified agents to callers who asked for verified-only).
Badge map reuse — when
?compliance=trueis also set, the badge map fetched for the filter is reused in the enrichment step (saves one round-trip).bySourcecounts now reflect the filtered agent set (previously always reflected the full unfiltered listing).Non-breaking justification
Both params are optional. Callers that omit them hit the unchanged
listAllAgents+ early-return path (if (!withHealth && !withCapabilities...)) with no behavioral change.Pre-PR review
withVerified+verificationModespredicate, (2)z.enum(["true"])consistent with sibling params, (3) 503 on badge-fetch failure?verified+?verification_modenatural for buyersSession: https://claude.ai/code/session_01K5MAwn6xWdaQLNP4hf1sCy
Generated by Claude Code