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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .changeset/adopt-adcp-rc-three.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
'@adcp/sdk': minor
---

Adopt the signed AdCP 3.2.0-rc.3 schema and compliance bundles as the default wire release.

Moving the pin activates the `content_mismatch` consumer status and its closed
`mismatch_code` across the published `ReportingConsumerStatusSchema` /
`SyncReportingStatusRequestSchema` exports and the seller ledger's consumer-status types.
The machinery that keeps those two in step with the bundle landed separately in #2911,
which derives both the ledger statement type and the Zod conditional arms from the pinned
schema; this pin is what supplies the rc.3 arms it reads. Verified: the regenerated
validator requires the obligation id, the revision id, the recomputed
`observed_revision_content_sha256`, and `mismatch_code` for `content_mismatch`, forbids
`failure_code` there, and forbids `mismatch_code` on the four pre-existing statuses.

rc.3 also publishes `core/media-buy-available-action-id.json`, so the generated
`update_media_buy` dispatch table gains the structured-only
`update_media_buy_frequency_cap` action and its `frequency_cap` field binding. Media-buy
preflight already resolved that binding from the generated table, so the shared
media-buy frequency cap becomes dispatchable with no adopter change.

3.2 prereleases remain exact pins: rc.3 replaces rc.2 in `COMPATIBLE_ADCP_VERSIONS` and
only the current prerelease's schema bundle ships. Pin `adcpVersion: '3.2-rc'` to follow
whichever 3.2 release candidate a given SDK build carries.
29 changes: 29 additions & 0 deletions .changeset/targeting-input-null-clear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
'@adcp/sdk': minor
---

Add request-only Targeting Input helpers for the AdCP 3.2 null-clear semantics (DR-0020) and stop
`createMediaBuyStore` from persisting a clear command.

`resolveTargetingInput`, `applyTargetingInput`, and `hasTargetingClears` are exported from the root
and `@adcp/sdk/server`. They project between the request-only Targeting Input — where a dimension may
be `null` to suppress a product default on create or clear stored state on update — and the strict
Targeting Overlay used by discovery criteria, accepted commercial snapshots, mutation responses, and
package readback, which must not contain `null`.

Two fixes in `createMediaBuyStore`, both reachable only once rc.3 makes the nullable input types
real: `persistFromCreate` fell back to the request overlay verbatim when the seller's response did
not echo one, and the `new_packages` arm of `mergeFromUpdate` assigned the incoming overlay directly.
Either path could write a `null` clear command into durable state, which `backfill` would then echo
into a `get_media_buys` response whose schema forbids null. Both now resolve clears away, and a patch
that clears the last surviving dimension drops the tracked overlay instead of persisting `{}`.

The store's `CreateMediaBuyInputForStore` / `UpdateMediaBuyInputForStore` input types widen from the
strict overlay to the request shape, so passing a real `create_media_buy` / `update_media_buy`
payload typechecks. Persisted and echoed values remain strict.

Codegen fix: `TargetingOverlayInput.device_platform` and `.device_type` were emitted as the scalar
`DevicePlatform` / `DeviceType` enums instead of arrays. `core/targeting-input.json` reaches those
dimensions through a JSON-pointer `$ref` into `core/targeting.json#/properties/<dimension>`, and for
an array with no `title` of its own json-schema-to-typescript names the result after the items'
canonical `$ref`. Both types now match the wire.
2 changes: 1 addition & 1 deletion ADCP_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.0-rc.2
3.2.0-rc.3
14 changes: 11 additions & 3 deletions docs/TYPE-SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -754,9 +754,11 @@ _Request:_
preferred_delivery_types: Delivery Type[]
filters: Product Filters
targeting_overlay: Targeting
media_buy_frequency_cap: Media Buy Frequency Cap
required_overlay_support: Targeting Overlay Requirements
required_media_buy_support: Media Buy Support Requirements
property_list: Property List Ref
fields: ('product_id' | 'name' | 'description' | 'publisher_properties' | 'channels' | 'video_placement_types' | 'audio_distribution_types' | 'sponsored_placement_types' | 'social_placement_surfaces' | 'format_options' | 'placements' | 'delivery_type' | 'exclusivity' | 'pricing_options' | 'forecast' | 'reporting_capabilities' | 'measurement_terms' | 'performance_standards' | 'catalog_types' | 'signal_targeting_allowed' | 'signal_targeting_rules' | 'demographic_targeting' | 'audience_evidence' | 'audience_evidence_selections' | 'max_optimization_goals' | 'catalog_match' | 'list_applications' | 'brief_relevance' | 'acceptance_policy_profile_ids' | 'identity' | 'expires_at' | 'allowed_actions' | 'format_ids' | 'outcome_measurement' | 'delivery_measurement' | 'creative_policy' | 'metric_optimization' | 'conversion_tracking' | 'data_provider_signals' | 'included_signals' | 'signal_targeting_options' | 'overlay_support' | 'targeting_resolution' | 'collections' | 'collection_targeting_allowed' | 'installments' | 'is_custom' | 'product_card' | 'product_card_detailed' | 'enforced_policies' | 'trusted_match')[]
fields: ('product_id' | 'name' | 'description' | 'publisher_properties' | 'channels' | 'video_placement_types' | 'audio_distribution_types' | 'sponsored_placement_types' | 'social_placement_surfaces' | 'format_options' | 'placements' | 'delivery_type' | 'exclusivity' | 'pricing_options' | 'forecast' | 'reporting_capabilities' | 'measurement_terms' | 'performance_standards' | 'catalog_types' | 'signal_targeting_allowed' | 'signal_targeting_rules' | 'demographic_targeting' | 'overlay_support' | 'media_buy_support' | 'audience_evidence' | 'audience_evidence_selections' | 'max_optimization_goals' | 'catalog_match' | 'list_applications' | 'brief_relevance' | 'acceptance_policy_profile_ids' | 'identity' | 'expires_at' | 'allowed_actions' | 'format_ids' | 'outcome_measurement' | 'delivery_measurement' | 'creative_policy' | 'metric_optimization' | 'conversion_tracking' | 'data_provider_signals' | 'included_signals' | 'signal_targeting_options' | 'overlay_support' | 'media_buy_support' | 'targeting_resolution' | 'collections' | 'collection_targeting_allowed' | 'installments' | 'is_custom' | 'product_card' | 'product_card_detailed' | 'enforced_policies' | 'trusted_match')[]
time_budget: Duration
push_notification_config: Push Notification Config
pagination: Pagination Request
Expand Down Expand Up @@ -943,7 +945,7 @@ _Request:_
idempotency_key: string // required
account: Canonical Account Ref // required
feed_version: string // required
purchases: Product Purchase[] // required
purchases: Product Purchase Input[] // required
start_time: Start Timing // required
end_time: string // required
adcp_version: string
Expand All @@ -952,6 +954,7 @@ _Request:_
pricing_version: string
total_budget: object
daily_budget_cap: number
frequency_cap: Media Buy Frequency Cap
budget_cap_timezone: string
budget_allocation: Canonical Budget Allocation
pacing: Pacing
Expand Down Expand Up @@ -1013,6 +1016,7 @@ _Request:_
cancellation_reason: string
total_budget: object
daily_budget_cap: number,null
frequency_cap: Media Buy Frequency Cap | null
budget_cap_timezone: string,null
budget_allocation: Canonical Budget Allocation
pacing: Pacing
Expand Down Expand Up @@ -1104,6 +1108,7 @@ _Request:_
opportunity: Opportunity Context
total_budget: object
daily_budget_cap: number
frequency_cap: Media Buy Frequency Cap
budget_cap_timezone: string
budget_allocation: Budget Allocation
packages: Package Request[]
Expand Down Expand Up @@ -1139,6 +1144,7 @@ _Response (success branch):_
currency: string
total_budget: number
daily_budget_cap: number
frequency_cap: Media Buy Frequency Cap
budget_cap_timezone: string
budget_allocation: Budget Allocation
pacing: Pacing
Expand Down Expand Up @@ -1175,6 +1181,7 @@ _Request:_
end_time: string
total_budget: object
daily_budget_cap: number,null
frequency_cap: Media Buy Frequency Cap | null
budget_cap_timezone: string,null
budget_allocation: Budget Allocation
pacing: Pacing
Expand All @@ -1198,6 +1205,7 @@ _Response (success branch):_
currency: string
total_budget: number
daily_budget_cap: number
frequency_cap: Media Buy Frequency Cap
budget_cap_timezone: string
budget_allocation: Budget Allocation
pacing: Pacing
Expand Down Expand Up @@ -2787,7 +2795,7 @@ await producer.runWorker();
const getReportingStatus = createReportingStatusHandler(store);
const getMediaBuyDelivery = createReportingDeliveryHandler(store); // exact reporting_revision_id reads

// AdCP 3.2.0-rc.2: identity comes from authenticated transport.
// AdCP 3.2.0-rc.3: identity comes from authenticated transport.
const syncReportingStatus = createSyncReportingStatusHandler(store, {
resolveConsumerId: context => context.agent.agent_url,
});
Expand Down
4 changes: 2 additions & 2 deletions docs/development/WIRE-VERSION-COMPAT.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ How `@adcp/sdk` keeps a buyer pinned to one AdCP major version while talking to
## The shape of the problem

The SDK speaks one primary AdCP version on its public surface — `ADCP_VERSION`
in `src/lib/version.ts`. The SDK 14 prerelease pin is `3.2.0-rc.2`; maintained side
in `src/lib/version.ts`. The SDK 14 prerelease pin is `3.2.0-rc.3`; maintained side
bundles cover `3.1.18`, `3.0.25`, and v2.5. Every buyer-facing type, helper,
and example assumes the primary pin.

Expand All @@ -27,7 +27,7 @@ There is exactly one active legacy compat layer at a time today: `legacy/v2-5/`.

```
schemas/cache/
├── 3.2.0-rc.2/ # current SDK pin
├── 3.2.0-rc.3/ # current SDK pin
├── 3.1.18/ # maintained stable side bundle
├── 3.0.25/ # maintained stable side bundle
├── latest/ # symlink to the primary pin
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/MEDIA-BUY-3.2-COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ routes it can still **call**. A 3.2 seller should make the compact lifecycle the
obvious path for new buyers without breaking a 3.0 or 3.1 buyer that already
calls the established names.

The SDK is pinned to the signed `3.2.0-rc.2` bundle. It retains the converged
The SDK is pinned to the signed `3.2.0-rc.3` bundle. It retains the converged
RC.0 product-identity, daypart-timezone, and flat-rate loop-position and
slot-span surface, and adds the Reliable Reporting 1.0 core, managed-delivery,
and reconciled-billing schema contracts. Beta.5 introduced the normative async identity,
Expand Down Expand Up @@ -77,10 +77,10 @@ createAdcpServerFromPlatform(platform, {
name: 'seller',
version: '1.0.0',
// `adcpVersion` is the newest release explicit callers may select.
adcpVersion: '3.2.0-rc.2',
adcpVersion: '3.2.0-rc.3',
// Keep callers that omit a version on the established 3.1 contract.
defaultAdcpVersion: '3.1.18',
capabilities: { supported_versions: ['3.1.18', '3.2.0-rc.2'] },
capabilities: { supported_versions: ['3.1.18', '3.2.0-rc.3'] },
});
```

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/REPORTING-LEDGER.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ When `get_reporting_status` omits a period, the operational default horizon is t

## Consumer status ingest

The SDK is pinned to AdCP 3.2.0-rc.2 and exposes `sync_reporting_status` from the ledger subpath. Its request, response, consumer-status, obligation, issue, delivery-capabilities, and reporting-status types come from the published rc.2 schema bundle.
The SDK is pinned to AdCP 3.2.0-rc.3 and exposes `sync_reporting_status` from the ledger subpath. Its request, response, consumer-status, obligation, issue, delivery-capabilities, and reporting-status types come from the published rc.3 schema bundle.

```ts
const syncReportingStatus = createSyncReportingStatusHandler(store, {
Expand Down
Loading
Loading