Skip to content

DecisioningCapabilities cannot publish ext / extensions_supported on get_adcp_capabilities #1844

Open

Description

@bokelley

Summary

get_adcp_capabilities allows a top-level ext object and extensions_supported in AdCP 3.x, but DecisioningCapabilities has no field for either, so a seller built on DecisioningPlatform cannot publish an extension on its capabilities response. The only way to add one today is to wrap PlatformHandler.get_adcp_capabilities and edit the response dict after the SDK projects it.

Minimal repro

adcp==9.5.1 (same on 9.4.0):

import dataclasses
from adcp.decisioning import DecisioningCapabilities

print("ext" in {f.name for f in dataclasses.fields(DecisioningCapabilities)})  # False
DecisioningCapabilities(specialisms=["sales-non-guaranteed"], ext={"acme": {"flag": True}})
# TypeError: DecisioningCapabilities.__init__() got an unexpected keyword argument 'ext'

Neither DecisioningPlatform.capabilities nor the request-scoped get_adcp_capabilities_for_request() (which returns a DecisioningCapabilities) can carry it, and PlatformHandler.get_adcp_capabilities projects each declared block into the response (handler.py, the caps.signals ... caps.compliance_testing projection, then experimental_features) with nothing for ext or extensions_supported.

Why it matters

The AdCP capabilities schema (3.2 get-adcp-capabilities-response.json) defines both ext and extensions_supported ("Extension namespaces this agent supports. Buyers can expect meaningful data in ext.{namespace} fields on responses from this agent"), and the SDK's client already reads them (supports("ext:scope3")). A seller has no supported way to write them.

Our case: the Scope3 embedded sales agent declares whether it accepts a create_media_buy with no creatives, which AdCP cannot express yet (proposal: adcontextprotocol/adcp#8723). It carries the answer as ext.scope3.create_without_creatives and has to wrap the handler to do so.

Suggested fix

Add two optional fields to DecisioningCapabilities, projected as they are:

ext: dict[str, Any] | None = None
extensions_supported: list[str] | None = None

and, in PlatformHandler.get_adcp_capabilities, copy them onto the response when set (validating extensions_supported against the schema pattern ^[a-z][a-z0-9_]*$, unique). Merging ext from get_adcp_capabilities_for_request() over the platform-level value would let a request-scoped platform vary it per tenant, as it can for the other blocks.

We will drop our handler wrapper when this ships.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions