Skip to content

Commit bb611c3

Browse files
bokelleyclaude
andauthored
feat: sync ADCP schema to 3.0.0-beta.3 with new operations and forecasting (#127)
* feat: sync with latest ADCP schema and add 5 new operations Sync schemas from ADCP 3.0.0-beta2 to latest tag (262 schemas, up from 210). Add list_accounts, sync_accounts, log_event, sync_event_sources, and get_creative_delivery operations across the full stack (client, protocols, server, CLI). Add 20+ discriminated union aliases for new response types. Fix preview_creative missing from ProtocolAdapter abstract base class. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: resolve CI failures from lint and stale generated types Re-sync schemas to pick up CatalogMatch and MatchedGtin types added to core/product.json. Fix import sorting in types/__init__.py, add noqa comment to auto-generated _ergonomic.py to suppress I001, remove unused Assets5Model import from format_assets.py, and fix line length in test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: resolve mypy errors in format_assets and preview_cache Widen FormatAsset type alias to Any since the schema now generates 17+ discriminated union variants for format assets. Fix str type narrowing in preview_cache.py where dict.get() returned Optional incompatible with the inferred str type. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: sync latest upstream schema - optional account_id and forecasting types Sync with latest ADCP upstream schema. Key changes: - account_id is now optional on CreateMediaBuyRequest (seller uses agent's sole account when omitted) - Add 10 new forecasting schemas: daypart-target, delivery-forecast, forecast-point, forecast-range, and related enums - Updated targeting, proposal, product-allocation, and cpp-option schemas Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: pin ADCP schema to 3.0.0-beta.3 Pin to explicit version tag instead of `latest`. Example data genericized (Coca-Cola/Publicis → Acme/Pinnacle) and $schema paths updated to versioned URLs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address review findings across 3 parallel reviews - Add preview_creative to server framework (base, mcp_tools, all subclass handlers) - Add all V3 operations to response_type_map for webhook parsing - Export 10 new forecasting types from types/__init__.py - Fix potential UnboundLocalError for debug_request in mcp.py - Add missing V3 aliases to adcp/__init__.py for consistency - Remove redundant branches in A2A response unwrapping - Add V3 operation hasattr checks to test_all_client_methods Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5d51635 commit bb611c3

574 files changed

Lines changed: 16574 additions & 4197 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

schemas/cache/.hashes.json

Lines changed: 273 additions & 214 deletions
Large diffs are not rendered by default.

schemas/cache/a2ui/component.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"$id": "/schemas/3.0.0-beta.2/a2ui/component.json",
32
"$schema": "http://json-schema.org/draft-07/schema#",
43
"additionalProperties": true,
54
"description": "A component in an A2UI surface",

schemas/cache/a2ui/surface.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"$id": "/schemas/3.0.0-beta.2/a2ui/surface.json",
32
"$schema": "http://json-schema.org/draft-07/schema#",
43
"additionalProperties": true,
54
"description": "A contiguous UI region containing components",
@@ -12,7 +11,7 @@
1211
"components": {
1312
"description": "Flat list of components (adjacency list structure)",
1413
"items": {
15-
"$ref": "/schemas/3.0.0-beta.2/a2ui/component.json"
14+
"$ref": "component.json"
1615
},
1716
"type": "array"
1817
},

schemas/cache/account/list-accounts-request.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
{
2-
"$id": "/schemas/3.0.0-beta.2/account/list-accounts-request.json",
32
"$schema": "http://json-schema.org/draft-07/schema#",
43
"additionalProperties": true,
54
"description": "Request parameters for listing accounts accessible to the authenticated agent",
65
"properties": {
76
"context": {
8-
"$ref": "/schemas/3.0.0-beta.2/core/context.json"
7+
"$ref": "../core/context.json"
98
},
109
"ext": {
11-
"$ref": "/schemas/3.0.0-beta.2/core/ext.json"
10+
"$ref": "../core/ext.json"
11+
},
12+
"pagination": {
13+
"$ref": "../core/pagination-request.json"
1214
},
1315
"status": {
14-
"default": "active",
15-
"description": "Filter accounts by status",
16+
"description": "Filter accounts by status. Omit to return accounts in all statuses.",
1617
"enum": [
1718
"active",
19+
"pending_approval",
20+
"payment_required",
1821
"suspended",
19-
"closed",
20-
"all"
22+
"closed"
2123
],
2224
"type": "string"
2325
}

schemas/cache/account/list-accounts-response.json

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"$id": "/schemas/3.0.0-beta.2/account/list-accounts-response.json",
32
"$schema": "http://json-schema.org/draft-07/schema#",
43
"additionalProperties": true,
54
"description": "Response payload for list_accounts task",
@@ -8,37 +7,41 @@
87
"data": {
98
"accounts": [
109
{
11-
"account_id": "acc_coke_publicis",
12-
"advertiser": "The Coca-Cola Company",
13-
"billing_proxy": "Publicis Media",
14-
"name": "Coke c/o Publicis",
10+
"account_id": "acc_acme_pinnacle",
11+
"advertiser": "Acme Corp",
12+
"billing_proxy": "Pinnacle Media",
13+
"name": "Acme c/o Pinnacle",
1514
"status": "active"
1615
},
1716
{
18-
"account_id": "acc_pepsi_publicis",
19-
"advertiser": "PepsiCo",
20-
"billing_proxy": "Publicis Media",
21-
"name": "Pepsi c/o Publicis",
17+
"account_id": "acc_nova_pinnacle",
18+
"advertiser": "Nova Brands",
19+
"billing_proxy": "Pinnacle Media",
20+
"name": "Nova c/o Pinnacle",
2221
"status": "active"
2322
},
2423
{
25-
"account_id": "acc_publicis",
26-
"advertiser": "Publicis Media",
27-
"name": "Publicis",
24+
"account_id": "acc_pinnacle",
25+
"advertiser": "Pinnacle Media",
26+
"name": "Pinnacle",
2827
"status": "active"
2928
}
30-
]
29+
],
30+
"pagination": {
31+
"has_more": false,
32+
"total_count": 3
33+
}
3134
},
3235
"description": "Agency with multiple client accounts"
3336
},
3437
{
3538
"data": {
3639
"accounts": [
3740
{
38-
"account_id": "acc_coke_direct",
39-
"advertiser": "The Coca-Cola Company",
40-
"name": "Coke",
41-
"rate_card": "coke_vip_2024",
41+
"account_id": "acc_acme_direct",
42+
"advertiser": "Acme Corp",
43+
"name": "Acme",
44+
"rate_card": "acme_vip_2024",
4245
"status": "active"
4346
}
4447
]
@@ -50,22 +53,25 @@
5053
"accounts": {
5154
"description": "Array of accounts accessible to the authenticated agent",
5255
"items": {
53-
"$ref": "/schemas/3.0.0-beta.2/core/account.json"
56+
"$ref": "../core/account.json"
5457
},
5558
"type": "array"
5659
},
5760
"context": {
58-
"$ref": "/schemas/3.0.0-beta.2/core/context.json"
61+
"$ref": "../core/context.json"
5962
},
6063
"errors": {
6164
"description": "Task-specific errors and warnings",
6265
"items": {
63-
"$ref": "/schemas/3.0.0-beta.2/core/error.json"
66+
"$ref": "../core/error.json"
6467
},
6568
"type": "array"
6669
},
6770
"ext": {
68-
"$ref": "/schemas/3.0.0-beta.2/core/ext.json"
71+
"$ref": "../core/ext.json"
72+
},
73+
"pagination": {
74+
"$ref": "../core/pagination-response.json"
6975
}
7076
},
7177
"required": [
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"additionalProperties": true,
4+
"description": "Sync advertiser accounts with a seller using upsert semantics. The agent declares which brands it represents, who operates each seat, and the billing model. The seller provisions or links accounts accordingly, returning per-account status. Brands are identified by house domain + brand_id, resolved via /.well-known/brand.json.",
5+
"examples": [
6+
{
7+
"data": {
8+
"accounts": [
9+
{
10+
"billing": "brand",
11+
"brand_id": "dove",
12+
"house": "unilever.com",
13+
"operator": "mindshare.com"
14+
},
15+
{
16+
"billing": "agent",
17+
"brand_id": "tide",
18+
"house": "pg.com",
19+
"operator": "groupm.com"
20+
}
21+
]
22+
},
23+
"description": "Agency syncing multiple advertisers with different billing"
24+
},
25+
{
26+
"data": {
27+
"accounts": [
28+
{
29+
"billing": "brand",
30+
"house": "acme-corp.com"
31+
}
32+
]
33+
},
34+
"description": "Brand buying direct, no operator"
35+
},
36+
{
37+
"data": {
38+
"accounts": [
39+
{
40+
"billing": "agent",
41+
"brand_id": "dove",
42+
"house": "unilever.com"
43+
},
44+
{
45+
"billing": "agent",
46+
"brand_id": "axe",
47+
"house": "unilever.com"
48+
}
49+
]
50+
},
51+
"description": "Agent consolidating billing for all advertisers"
52+
}
53+
],
54+
"properties": {
55+
"accounts": {
56+
"description": "Advertiser accounts to sync",
57+
"items": {
58+
"additionalProperties": true,
59+
"description": "An advertiser account the agent wants to operate on the seller",
60+
"properties": {
61+
"billing": {
62+
"description": "Who should be invoiced. brand: seller invoices the brand directly. operator: seller invoices the operator (agency). agent: agent consolidates billing across brands. Omit to accept the seller's default.",
63+
"enum": [
64+
"brand",
65+
"operator",
66+
"agent"
67+
],
68+
"type": "string"
69+
},
70+
"brand_id": {
71+
"description": "Brand ID within the house portfolio (from brand.json). Required when the house has multiple brands (e.g., 'dove' under unilever.com, 'tide' under pg.com). Omit for single-brand houses.",
72+
"pattern": "^[a-z0-9_]+$",
73+
"type": "string"
74+
},
75+
"house": {
76+
"description": "House domain where brand.json is hosted (e.g., 'unilever.com', 'acme-corp.com'). This is the canonical identity anchor for the brand, resolved via /.well-known/brand.json. For single-brand houses, this alone identifies the brand.",
77+
"pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$",
78+
"type": "string"
79+
},
80+
"operator": {
81+
"description": "Domain of the entity operating the seat (e.g., 'groupm.com', 'mindshare.com'). Verified against the brand's authorized_operators in brand.json. Omit if the brand operates its own seat.",
82+
"pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$",
83+
"type": "string"
84+
}
85+
},
86+
"required": [
87+
"house"
88+
],
89+
"type": "object"
90+
},
91+
"maxItems": 1000,
92+
"type": "array"
93+
},
94+
"context": {
95+
"$ref": "../core/context.json"
96+
},
97+
"delete_missing": {
98+
"default": false,
99+
"description": "When true, accounts previously synced by this agent but not included in this request will be deactivated. Scoped to the authenticated agent \u2014 does not affect accounts managed by other agents. Use with caution.",
100+
"type": "boolean"
101+
},
102+
"dry_run": {
103+
"default": false,
104+
"description": "When true, preview what would change without applying. Returns what would be created/updated/deactivated.",
105+
"type": "boolean"
106+
},
107+
"ext": {
108+
"$ref": "../core/ext.json"
109+
},
110+
"push_notification_config": {
111+
"$ref": "../core/push-notification-config.json",
112+
"description": "Optional webhook for async notifications when account status changes (e.g., pending_approval transitions to active)."
113+
}
114+
},
115+
"required": [
116+
"accounts"
117+
],
118+
"title": "Sync Accounts Request",
119+
"type": "object"
120+
}

0 commit comments

Comments
 (0)