Skip to content
This repository was archived by the owner on Mar 15, 2026. It is now read-only.

Commit 4eccbca

Browse files
bokelleyclaude
andauthored
feat: upgrade to ADCP 3.5.0 with catalog support (#48)
* feat: add universal creative format (multi-channel asset pool) Adds a 'universal' format similar to Google's Performance Max asset groups. Publishers receive a pool of assets and assemble placements themselves -- this is a submission container, not a generative format. Asset pools use repeatable_group from the adcp library, supporting: - headlines (1-15, 30 chars), long_headlines (0-5, 90 chars) - descriptions (1-5, 90 chars) - images_landscape/square/portrait (1-20 each) - logos_square/landscape (0-5 each) - videos_landscape/portrait (0-15), videos_square (0-5) - Individual: brand_name, cta, promoted_offerings, click_url, impression_tracker Also fixes: - _format_to_human_readable now includes repeatable group IDs for LLMs - assets_required backward compat excludes repeatable groups (old clients don't understand item_type=repeatable_group) - filter_formats has_asset_type handles repeatable groups via getattr Known limitation (deferred): validate_manifest_assets does not yet enforce required repeatable groups. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: validate repeatable groups in creative manifests validate_manifest_assets now handles Assets5 (repeatable_group) entries: - Required groups (headlines, descriptions, images_landscape, images_square) are checked for presence using asset_group_id - min_count and max_count are enforced on submitted lists - Each item in a group list is validated using the inner asset type (e.g. each headline item is validated as a text asset) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: upgrade to ADCP 3.5.0 with catalog support, dead code cleanup Replace promoted_offerings with catalog_requirements on generative formats per ADCP 3.5.0. Add catalog validation (type, enum fields, feed_format compatibility, offering_asset_constraints). Add brand parameter to build_creative. Remove universal format (redundant with catalogs). Delete 8 unused modules and .bak files. Fix validate_url exception handling and remove misplaced data URI bypass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: resolve CI mypy errors for ADCP 3.5.0 type changes Annotate COMMON_MACROS as list[str | Any] to satisfy list[UniversalMacro | str] invariance. Add None guards for FormatCategory | None on fmt.type.value accesses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address pre-existing code review issues - Remove traceback strings from client-facing error responses, log server-side with logger.exception() instead - Validate output_format parameter early in preview_creative - Remove dead try/except ValidationError around f-string - Move inline imports (re) to top level - Simplify redundant emptiness check in _handle_batch_preview - Fix enum comparison to use .value for FormatCategory - Add regression tests for data URI rejection in validate_url - Clarify data URI size limit comment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: add git to Dockerfile for adcp git dependency The adcp package is installed from a git URL which requires git to be available in the Docker build environment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 04fd0c7 commit 4eccbca

25 files changed

Lines changed: 1041 additions & 1461 deletions

Dockerfile.fly

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ FROM public.ecr.aws/docker/library/python:3.12-slim
77
# Install dependencies
88
RUN apt-get update && apt-get install -y \
99
curl \
10+
git \
1011
&& rm -rf /var/lib/apt/lists/*
1112

1213
# Install uv for package management

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ dependencies = [
99
"fastmcp>=2.11.0",
1010
"google-genai>=1.0.0",
1111
"pillow>=10.0.0",
12-
"fastapi>=0.100.0",
1312
"uvicorn>=0.23.0",
1413
"httpx>=0.28.1",
1514
"pydantic>=2.0.0",
1615
"boto3>=1.35.0",
1716
"markdown>=3.6",
1817
"bleach>=6.3.0",
19-
"adcp>=3.2.0", # Official ADCP Python client with template format support
18+
"adcp>=3.5.0",
2019
]
2120

2221
[project.scripts]
@@ -32,6 +31,9 @@ packages = ["src/creative_agent"]
3231
[tool.uv]
3332
package = true
3433

34+
[tool.uv.sources]
35+
adcp = { git = "https://github.com/adcontextprotocol/adcp-client-python", tag = "v3.5.0" }
36+
3537
[dependency-groups]
3638
dev = [
3739
"mypy>=1.18.2",

src/creative_agent/api_server.py

Lines changed: 0 additions & 157 deletions
This file was deleted.

src/creative_agent/compat.py

Lines changed: 0 additions & 65 deletions
This file was deleted.

src/creative_agent/data/format_types.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ class AssetType(Enum):
4141
javascript = "javascript"
4242
url = "url"
4343
webhook = "webhook"
44-
promoted_offerings = "promoted_offerings"
4544

4645

4746
class Unit(Enum):

0 commit comments

Comments
 (0)