Skip to content

feat(aao directory): re-introduce ?include=properties for full set-diff divergence detection #4890

@bokelley

Description

@bokelley

Background

adcp#4836 (server implementation of GET /v1/agents/{agent_url}/publishers) explicitly deferred ?include=properties from v1 — "Counts-only v1." That decision was correct for shipping the directory endpoint, but it now constrains downstream SDKs.

Problem — count-only divergence is a false-negative trap

The SDK divergence detector (adcp-client-python#752, Part 3 of adcp-client-python#749) compares the directory's properties_authorized count against a per-child federated fetch result. When the counts match, the comparison returns "no divergence" — but count-equality is not set-equality.

Worked example (the cafemedia replacement-of-3 case):

Time Directory thinks publisher has Publisher actually has Divergence detected?
T0 {p-001, p-002, p-003} (count = 3) {p-001, p-002, p-003} (count = 3) ✓ correct, no divergence
T1 {p-001, p-002, p-003} (count = 3, stale) {p-004, p-005, p-006} (count = 3, after publisher rotation) false negative — counts still match, set is entirely different

A publisher rotating three properties is a routine operation. Today's directory makes this rotation undetectable to operators relying on the divergence detector — which is exactly the population the directory is meant to serve.

Proposal

Add ?include=properties to GET /v1/agents/{agent_url}/publishers. When set, each PublisherEntry in the response carries a property_ids: list[string] field — the canonical list of property_ids the agent's selectors resolve to under that publisher.

{
  "publishers": [
    {
      "publisher_domain": "site.example.com",
      "discovery_method": "adagents_authoritative",
      "manager_domain": "cafemedia.com",
      "properties_authorized": 3,
      "property_ids": ["p-001", "p-002", "p-003"],
      ...
    }
  ]
}

Schema delta in static/schemas/source/aao/agent-publishers.json:

  • PublisherEntry.property_ids: array of string, optional, present iff include=properties

Cost

  • Response payload grows roughly linearly in property count. For cafemedia at ~6,800 publishers × avg 1 property each = ~7 KB of additional IDs per page — small.
  • Directory index already computes the resolved property ID set during properties_authorized count derivation (per feat(server): implement /v1/agents/{agent_url}/publishers directory endpoint #4836 §"Per-publisher property counts"). Surfacing it is mostly serialization.

Out of scope

  • Returning full property objects (not just IDs). Operators with the IDs can fetch detail via existing per-domain primitives.
  • Pagination semantics for very-large-per-publisher lists (defer to v3 if it becomes a real shape).

Acceptance

  • ?include=properties query parameter accepted; default off (preserves current envelope).
  • When set, every PublisherEntry in response carries property_ids: list[string].
  • Schema updated in static/schemas/source/aao/agent-publishers.json.
  • Docs updated in docs/aao/directory-api.mdx.
  • SDK divergence detectors (adcp-client-python, adcp-client TS, adcp-go) can be upgraded from count-only to full set-diff once this lands. Track the SDK upgrade in companion issues.

Companion SDK work

  • adcontextprotocol/adcp-client-python — upgrade detect_publisher_properties_divergence to full set-diff (PublisherDivergence.missing_in_inline / .missing_in_federated populated from property_ids, not None).
  • adcontextprotocol/adcp-client (TS/JS) — mirror.
  • adcontextprotocol/adcp-go — mirror.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.enhancementNew feature or requestschemaJSON Schema source-of-truth: definitions, codegen artifacts, validation, hygiene

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions