Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ recursive-include src/adcp py.typed
recursive-include src/adcp/_schemas/2.5 *.json
recursive-include src/adcp/_schemas/3.0 *.json
recursive-include src/adcp/_schemas/3.1 *.json
recursive-include src/adcp/_schemas/3.2.0-beta.0 *.json
recursive-include src/adcp/_schemas/3.2.0-beta.3 *.json
prune src/adcp/_schemas/3.1.0-*
31 changes: 28 additions & 3 deletions MIGRATION_ADCP_3.1_TO_3.2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Migrating an integration from AdCP 3.1 to 3.2 beta

Python SDK 8 beta supports the AdCP `3.2.0-beta.0` schemas and the compact
Python SDK 8 beta supports the AdCP `3.2.0-beta.3` schemas and the compact
product/media-buy lifecycle that becomes the foundation of AdCP 4.0. The SDK
continues to support AdCP 3.0 and 3.1, and the deprecated
`get_products`/`create_media_buy`/`update_media_buy` lifecycle remains available
Expand All @@ -16,13 +16,38 @@ from the version alone; read `media_buy.lifecycle_tools` or MCP `tools/list`.
Use the release-precision prerelease identifier while 3.2 is in beta:

```python
client = ADCPClient(agent, adcp_version="3.2-beta.0")
server = adcp_server("seller", adcp_version="3.2-beta.0")
client = ADCPClient(agent, adcp_version="3.2-beta.3")
server = adcp_server("seller", adcp_version="3.2-beta.3")
```

`"3.2"` intentionally does not alias to a prerelease. Exact prerelease pins
prevent a deployment from silently changing contracts when 3.2 stable ships.

## Beta.3 integration notes

AdCP 3.2.0-beta.3 adds placement presentation and delegated preview metadata.
The SDK exports `PlacementPresentationDocument`,
`PlacementPresentationReference`, `PublisherDesignatedPreviewProvider`,
`PreviewRendererMetadata`, and `ReferenceRenderer` from `adcp` and
`adcp.types.creative`.

Treat every `preview_url` and `preview_html` as untrusted. URL previews belong
in a cross-origin iframe; HTML previews belong in iframe `srcdoc` with
`sandbox=""` and a caller-controlled restrictive CSP. Never inject preview HTML
into the host DOM. Provider `embedding` and `renderer` metadata is advisory and
does not grant authority or loosen those controls. `PreviewURLGenerator`
preserves this metadata and returns a mandatory `rendering_policy`; its cache is
bounded, size-limited, and expiry-aware.

Catalog-only `adagents.json` mirrors may now use `authorized_agents: []` when
at least one catalog collection is non-empty. This grants no sales authority.

Package requests may carry multiple selector routes only for 3.x compatibility.
Sellers must resolve each supplied route independently and reject different
selected product-option sets with `CONFLICTING_SELECTORS` before applying
precedence. This comparison is product-aware application logic; JSON Schema's
Draft 7 validator cannot enforce selector equivalence by itself.

## Choose the lifecycle subset

| Workflow | Compact tools |
Expand Down
2 changes: 1 addition & 1 deletion MIGRATION_v7_to_v8.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Migrating from Python SDK 7 to 8

SDK 8 beta also updates the generated protocol surface from AdCP 3.1.15 to
AdCP 3.2.0-beta.0 and adds the compact product/media-buy lifecycle. The old
AdCP 3.2.0-beta.3 and adds the compact product/media-buy lifecycle. The old
3.x lifecycle remains supported. See
[Migrating an integration from AdCP 3.1 to 3.2 beta](MIGRATION_ADCP_3.1_TO_3.2.md)
for lifecycle selection, capability declarations, and the compatibility test
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ async with ADCPMultiAgentClient(

## AdCP version support

The SDK 8 beta line is built against **AdCP 3.2.0-beta.0**, makes canonical
The SDK 8 beta line is built against **AdCP 3.2.0-beta.3**, makes canonical
creatives the primary Python contract, and negotiates AdCP 3.0, 3.1, and the
exact 3.2 beta wire dialect. The SDK package version and protocol version are
intentionally independent:
Expand All @@ -285,7 +285,7 @@ intentionally independent:
import adcp

adcp.get_adcp_sdk_version() # SDK package version, e.g. "8.0.0b1"
adcp.get_adcp_spec_version() # AdCP spec this build targets, e.g. "3.2.0-beta.0"
adcp.get_adcp_spec_version() # AdCP spec this build targets, e.g. "3.2.0-beta.3"
```

If you talk to an agent on a newer spec than this SDK validates, the response
Expand Down
53 changes: 49 additions & 4 deletions SCHEMA_DELTAS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,53 @@
# Generated-types delta

## Files added

- `core/placement_presentation.py` — BoxDecoration, Canvas, Color, CreativeSlot, Fit, ImageDecoration, ImageRef, Layer, PlacementPresentationDocument, Rectangle, TextDecoration
- `core/presentation_ref.py` — PlacementPresentationReference
- `core/preview_provider.py` — PublisherDesignatedPreviewProvider, Route
- `core/preview_renderer_metadata.py` — PreviewRendererMetadata, RenderingOrigin
- `core/reference_renderer.py` — Provenance, ReferenceRenderer

## Field changes

- `media_buy/create_media_buy_response.py`
- `CreateMediaBuyResponse1`: `+status`
- `media_buy/update_media_buy_response.py`
- `UpdateMediaBuyResponse1`: `+status`
- `adagents.py`
- `AdcpAgentsAuthorization210`: `+catalog_role`
- `AdcpAgentsAuthorization211`: `+catalog_role`
- `AdcpAgentsAuthorization212`: `+catalog_role`
- `AdcpAgentsAuthorization213`: `+catalog_role`
- `AdcpAgentsAuthorization27`: `+catalog_role`
- `AdcpAgentsAuthorization28`: `+catalog_role`
- `AdcpAgentsAuthorization29`: `+catalog_role`
- `brand_discovery.py`
- `ImageAsset`: `+file_size_bytes`
- `bundled/protocol/get_adcp_capabilities_response.py`
- **classes added**: Preview, RenderingOrigin, Route
- `Creative`: `+preview`
- `Logo`: `+file_size_bytes`
- `Params7`: `+max_file_size_mb`
- `compliance/comply_test_controller_request.py`
- `Operation`: `+expire_proposal`, `+prepare`
- `Params`: `+proposal_id`
- `core/assets/asset_union.py`
- `ImageAsset`: `+file_size_bytes`
- `core/assets/image_asset.py`
- `ImageAsset`: `+file_size_bytes`
- `core/placement_definition.py`
- `PlacementDefinition`: `+presentation_ref`, `+preview_provider`
- `creative/preview_render.py`
- `PreviewRender1`: `+renderer`
- `PreviewRender2`: `+renderer`
- `PreviewRender3`: `+renderer`
- `enums/error_code.py`
- `ErrorCode`: `+CONFLICTING_SELECTORS`
- `formats/canonical/audio_hosted.py`
- `CanonicalFormatHostedAudio`: `+max_file_size_mb`
- `media_buy/accept_proposal_request.py`
- `AcceptProposalRequest`: `+adcp_major_version`
- `media_buy/buy_products_request.py`
- `BuyProductsRequest`: `+adcp_major_version`
- `media_buy/control_media_buy_request.py`
- `ControlMediaBuyRequest`: `+adcp_major_version`
- `protocol/get_adcp_capabilities_response.py`
- **classes added**: Preview, RenderingOrigin, Route
- `Creative`: `+preview`
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ adcp = [
"_schemas/2.5/**/*.json",
"_schemas/3.0/**/*.json",
"_schemas/3.1/**/*.json",
"_schemas/3.2.0-beta.0/**/*.json",
"_schemas/3.2.0-beta.3/**/*.json",
# Vendored canonical-formats reference fixtures (14 v2 products +
# 50-entry v1 catalog) so :mod:`adcp.canonical_formats.fixtures`
# can serve them to adopter test suites without forcing each
Expand Down
80 changes: 80 additions & 0 deletions schemas/cache/3.2.0-beta.3/a2ui/bound-value.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "A2UI Bound Value",
"description": "A value that can be a literal or bound to a path in the data model",
"oneOf": [
{
"type": "object",
"description": "Literal string value",
"properties": {
"literalString": {
"type": "string",
"description": "Static string value"
}
},
"required": [
"literalString"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Literal number value",
"properties": {
"literalNumber": {
"type": "number",
"description": "Static number value"
}
},
"required": [
"literalNumber"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Literal boolean value",
"properties": {
"literalBoolean": {
"type": "boolean",
"description": "Static boolean value"
}
},
"required": [
"literalBoolean"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Path to data model value",
"properties": {
"path": {
"type": "string",
"description": "JSON pointer path to value in data model (e.g., '/products/0/title')"
}
},
"required": [
"path"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Literal with path binding (sets default and binds)",
"properties": {
"literalString": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": [
"literalString",
"path"
],
"additionalProperties": false
}
]
}
31 changes: 31 additions & 0 deletions schemas/cache/3.2.0-beta.3/a2ui/component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "A2UI Component",
"description": "A component in an A2UI surface",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for this component within the surface"
},
"parentId": {
"type": "string",
"description": "ID of the parent component (null for root)"
},
"component": {
"type": "object",
"description": "Component definition (keyed by component type)",
"minProperties": 1,
"maxProperties": 1,
"additionalProperties": {
"type": "object",
"description": "Component properties"
}
}
},
"required": [
"id",
"component"
],
"additionalProperties": true
}
Loading
Loading