feat(aao-directory): implement ?include=properties on GET /v1/agents/{url}/publishers#4928
Closed
bokelley wants to merge 1 commit into
Closed
feat(aao-directory): implement ?include=properties on GET /v1/agents/{url}/publishers#4928bokelley wants to merge 1 commit into
bokelley wants to merge 1 commit into
Conversation
…{url}/publishers
Wires the `?include=properties` query parameter through the route →
service → DB layer so SDK divergence detectors can run full set-diff
against the directory, not just count comparison.
Schema + docs + changeset already landed on main (issue #4890 prior
session). This PR adds the server implementation only.
Refs #4890
https://claude.ai/code/session_015MXVgGH1xk84m361nM7fj7
Closed
5 tasks
Contributor
Author
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.
Refs #4890
Schema, docs, and changeset for
?include=propertiesalready landed onmain(prior triage session). This PR adds the server implementation only: parsing the query parameter, passing it through the service layer, and serializingproperty_idsin the response.Non-breaking justification: Adds an optional query parameter (
?include=properties, default unset) and an optional response field (property_ids, absent when flag is not set). Existing consumers receive an identical envelope. No required field added, no field removed, no enum value changed. Changeset.changeset/4890-aao-include-properties.mdalready onmain(classified--empty— server-only change; schema bump was in the spec-first landing).What changed:
federated-index-db.ts—AgentPublisherDetailRowgainsproperty_ids: string[] | null;getPublishersForAgentDetailgainsincludePropertyIds?: boolean; SQL addsCASE WHEN $6 THEN array_agg(DISTINCT dp.property_id ...) ELSE NULL END AS property_idsfederated-index.ts— service wrapper opts type updated to pass throughincludePropertyIdsregistry-api.ts— ZodAgentPublishersEntrySchemaaddsproperty_ids?: string[]; OpenAPI spec addsincludequery param (repeated-key form, same as?status); handler parses?include, passesincludePropertyIdsto DB layer, spreadsproperty_idsinto shaped output when flag is set; ETag hash includesincludeand per-rowproperty_idsstatic/schemas/source/aao/agent-publishers.json— clarifiedproperty_idsdescription:len(property_ids) ≤ properties_authorizedwhen any authorized properties lack aproperty_idin adagents.jsonstatic/openapi/registry.yaml— regenerated from Zod schemas (includesincludeparam andproperty_idsfield)includePropertyIdsreturns IDs, without flagproperty_idsis null, empty array when no authorized property hasproperty_idNit (surfaced by pre-PR review, not fixed): The 404 existence-probe call at line 7241 omits
includePropertyIds— intentional, the probe needs only a row-count. Worth a comment to future readers.Pre-PR review:
Unknown→Invalid), updated schema description to clarifylen(property_ids) ≤ properties_authorizedsubset semantics; regenerated OpenAPI specinclude=propertiesrepeated-key encoding consistent with?statusconvention;dp.property_id(adagents.json slug) vsdp.id(UUID) distinction is correct for set-diff use case; ETag correctly keyed onincludeand per-rowproperty_idsSession: https://claude.ai/code/session_015MXVgGH1xk84m361nM7fj7
Generated by Claude Code