diff --git a/spec.bs b/spec.bs index 91f1d725f..738742cff 100644 --- a/spec.bs +++ b/spec.bs @@ -96,6 +96,8 @@ spec:infra; type:dfn; text:user agent margin: 1em 0; } +dl { padding-left: 1em; } + /* domintro from https://resources.whatwg.org/standard.css */ .domintro { position: relative; @@ -4212,102 +4214,101 @@ dictionary DirectFromSellerSignalsForSeller { }; -

Interest group

+

Interest group

-An interest group is a [=struct=] with the following [=struct/items=]: +An interest group is a [=struct=] with the following [=struct/items=]:
-: expiry -:: A [=moment=] at which the browser will forget about this interest group. -: owner -:: An [=origin=]. Frames that join interest groups owned by [=interest group/owner=] must either be - served from [=interest group/owner=], or another origin delegated by [=interest group/owner=] (See - [=checking interest group permissions=] for details). The [=origin/scheme=] must be "`https`". -: name -:: A [=string=]. The ([=interest group/owner=], [=interest group/name=]) tuple is a key that - uniquely defines each interest group. -: priority -:: A {{double}}, initially 0.0. Used to select which interest groups participate in an auction - when the number of interest groups are limited by {{AuctionAdConfig/perBuyerGroupLimits}}. - See [=applying interest groups limits to prioritized list=]. -: enable bidding signals prioritization -:: A [=boolean=], initially false. Being true if the interest group's priority should be - calculated using vectors from bidding signals fetch. -: priority vector -:: Null or an [=ordered map=] whose [=map/keys=] are [=strings=] and whose [=map/values=] are - {{double}}. Its dot product with the {{AuctionAdConfig/perBuyerPrioritySignals}} will be used - in place of [=interest group/priority=], if set. -: priority signals overrides -:: Null or an [=ordered map=] whose [=map/keys=] are [=strings=] and whose [=map/values=] are - {{double}}. Overrides the {{AuctionAdConfig}}'s corresponding priority signals. -: execution mode -:: "`compatibility`", "`frozen-context`", or "`group-by-origin`". - TODO: Define spec for these execution modes, link to it from here and explain these modes. -: bidding url -:: Null or a [=URL=]. The URL to fetch the buyer's JavaScript from. -

- When non-null, the [=interest group/bidding url=]'s [=origin=] will always be [=same origin=] - with [=interest group/owner=]. -

-: bidding wasm helper url -:: Null or a [=URL=]. Lets the bidder provide computationally-expensive subroutines in WebAssembly, - in addition to JavaScript, to be driven from the JavaScript function provided by - [=interest group/bidding url=]. -

- When non-null, the [=interest group/bidding wasm helper url=]'s [=origin=] will always be - [=same origin=] with [=interest group/owner=]. -

-: update url -:: Null or a [=URL=]. Provides a mechanism for the group's owner to periodically update the - attributes of the interest group. See [[#interest-group-updates]]. Must be null if - [=interest group/additional bid key=] is not null. -

- When non-null, the [=interest group/update url=]'s [=origin=] will always be [=same origin=] - with [=interest group/owner=]. -

-: trusted bidding signals url -:: Null or a [=URL=]. Provide a mechanism for making real-time data available for use at bidding - time. See [=building trusted bidding signals url=]. -

- When non-null, the [=interest group/trusted bidding signals url=]'s [=origin=] will always be - [=same origin=] with [=interest group/owner=]. -

-: trusted bidding signals keys -:: Null or a [=list=] of [=string=]. See [=building trusted bidding signals url=]. -: user bidding signals -:: Null or a [=string=]. Additional metadata that the owner can use during on-device bidding. -: ads -:: Null or a [=list=] of [=interest group ad=]. Contains various ads that the interest group might - show. Must be null if [=interest group/additional bid key=] is not null. -: ad components -:: Null or a [=list=] of [=interest group ad=]. Contains various ad components (or "products") that - can be used to construct ads composed of multiple pieces — a top-level ad template "container" - which includes some slots that can be filled in with specific "products". -: additional bid key -:: Null or a [=byte sequence=] of length 32. Must be null if [=interest group/ads=] or - [=interest group/update url=] is not null. The Ed25519 public key (a 256-bit EdDSA public key) - used to guarantee that this [=interest group=], if used by an additional bid for a negative - targeting, can only be used by its [=interest group/owner=]. -: joining origin -:: An [=origin=]. The top level page origin from where the interest group was joined. -: join counts -:: A [=list=] containing [=tuples=] of the day and per day join count. The day - is calculated based on UTC time. The join count is a count of the number of - times {{Navigator/joinAdInterestGroup()}} was called for this interest group on the - corresponding day. -: join time -:: A [=moment=] at which the browser joined this interest group, updated upon each join and - re-join. -: bid counts -:: A [=list=] containing [=tuples=] of the day and per day bid count. The day - is calculated based on UTC time. The bid count is a count of the number of - times the bid calculated during {{Navigator/runAdAuction()}} was greater than 0. -: previous wins -:: A [=list=] of [=previous wins=]. -: next update after -:: A [=moment=] at which the browser will permit updating this interest group. See - [[#interest-group-updates]]. - + : expiry + :: A [=moment=] at which the browser will forget about this interest group. + : owner + :: An [=origin=]. Frames that join interest groups owned by [=interest group/owner=] must either be + served from [=interest group/owner=], or another origin delegated by [=interest group/owner=] (See + [=checking interest group permissions=] for details). The [=origin/scheme=] must be "`https`". + : name + :: A [=string=]. The ([=interest group/owner=], [=interest group/name=]) tuple is a key that + uniquely defines each interest group. + : priority + :: A {{double}}, initially 0.0. Used to select which interest groups participate in an auction + when the number of interest groups are limited by {{AuctionAdConfig/perBuyerGroupLimits}}. + See [=applying interest groups limits to prioritized list=]. + : enable bidding signals prioritization + :: A [=boolean=], initially false. Being true if the interest group's priority should be + calculated using vectors from bidding signals fetch. + : priority vector + :: Null or an [=ordered map=] whose [=map/keys=] are [=strings=] and whose [=map/values=] are + {{double}}. Its dot product with the {{AuctionAdConfig/perBuyerPrioritySignals}} will be used + in place of [=interest group/priority=], if set. + : priority signals overrides + :: Null or an [=ordered map=] whose [=map/keys=] are [=strings=] and whose [=map/values=] are + {{double}}. Overrides the {{AuctionAdConfig}}'s corresponding priority signals. + : execution mode + :: "`compatibility`", "`frozen-context`", or "`group-by-origin`". + TODO: Define spec for these execution modes, link to it from here and explain these modes. + : bidding url + :: Null or a [=URL=]. The URL to fetch the buyer's JavaScript from. +

+ When non-null, the [=interest group/bidding url=]'s [=origin=] will always be [=same origin=] + with [=interest group/owner=]. +

+ : bidding wasm helper url + :: Null or a [=URL=]. Lets the bidder provide computationally-expensive subroutines in WebAssembly, + in addition to JavaScript, to be driven from the JavaScript function provided by + [=interest group/bidding url=]. +

+ When non-null, the [=interest group/bidding wasm helper url=]'s [=origin=] will always be + [=same origin=] with [=interest group/owner=]. +

+ : update url + :: Null or a [=URL=]. Provides a mechanism for the group's owner to periodically update the + attributes of the interest group. See [[#interest-group-updates]]. Must be null if + [=interest group/additional bid key=] is not null. +

+ When non-null, the [=interest group/update url=]'s [=origin=] will always be [=same origin=] + with [=interest group/owner=]. +

+ : trusted bidding signals url + :: Null or a [=URL=]. Provide a mechanism for making real-time data available for use at bidding + time. See [=building trusted bidding signals url=]. +

+ When non-null, the [=interest group/trusted bidding signals url=]'s [=origin=] will always be + [=same origin=] with [=interest group/owner=]. +

+ : trusted bidding signals keys + :: Null or a [=list=] of [=string=]. See [=building trusted bidding signals url=]. + : user bidding signals + :: Null or a [=string=]. Additional metadata that the owner can use during on-device bidding. + : ads + :: Null or a [=list=] of [=interest group ad=]. Contains various ads that the interest group might + show. Must be null if [=interest group/additional bid key=] is not null. + : ad components + :: Null or a [=list=] of [=interest group ad=]. Contains various ad components (or "products") that + can be used to construct ads composed of multiple pieces — a top-level ad template "container" + which includes some slots that can be filled in with specific "products". + : additional bid key + :: Null or a [=byte sequence=] of length 32. Must be null if [=interest group/ads=] or + [=interest group/update url=] is not null. The Ed25519 public key (a 256-bit EdDSA public key) + used to guarantee that this [=interest group=], if used by an additional bid for a negative + targeting, can only be used by its [=interest group/owner=]. + : joining origin + :: An [=origin=]. The top level page origin from where the interest group was joined. + : join counts + :: A [=list=] containing [=tuples=] of the day and per day join count. The day + is calculated based on UTC time. The join count is a count of the number of + times {{Navigator/joinAdInterestGroup()}} was called for this interest group on the + corresponding day. + : join time + :: A [=moment=] at which the browser joined this interest group, updated upon each join and + re-join. + : bid counts + :: A [=list=] containing [=tuples=] of the day and per day bid count. The day + is calculated based on UTC time. The bid count is a count of the number of + times the bid calculated during {{Navigator/runAdAuction()}} was greater than 0. + : previous wins + :: A [=list=] of [=previous wins=]. + : next update after + :: A [=moment=] at which the browser will permit updating this interest group. See + [interest group updates](#interest-group-updates).
A regular interest group is an [=interest group=] whose @@ -4316,32 +4317,39 @@ A regular interest group is an [=interest group=] whose A negative interest group is an [=interest group=] whose [=interest group/additional bid key=] is not null. -

Interest group ad

- -An interest group ad is a [=struct=] with the following [=struct/items=]: +An interest group ad is a [=struct=] with the following [=struct/items=]:
-: render url -:: A [=URL=]. If this ad wins the auction, this URL (or a [=urn uuid=] that maps to this URL) will - be returned by {{Navigator/runAdAuction()}}. This URL is intended to be loaded into an ad - <{iframe}> (or a <{fencedframe}>). -: metadata -:: Null or a [=string=]. Extra arbitary information about this ad, passed to `generateBid()`. -: buyer reporting ID -:: Null or a [=string=]. Will be passed in place of interest group name to [=report win=], subject - to [=k-anonymity=] checks. Only meaningful in [=interest group/ads=], but ignored in - [=interest group/ad components=]. -: buyer and seller reporting ID -:: Null or a [=string=]. Will be passed in place of interest group name or - [=interest group ad/buyer reporting ID=] to [=report win=] and [=report result=], subject to - [=k-anonymity=] checks. Only meaningful in [=interest group/ads=], but ignored in - [=interest group/ad components=]. -: allowed reporting origins -:: Null or a [=list=] of [=origins=]. A list of up to 10 reporting origins that can receive reports - with registered macros. All origins must be HTTPS origins and - enrolled. Only meaningful in - [=interest group/ads=], but ignored in [=interest group/ad components=]. + : render url + :: A [=URL=]. If this ad wins the auction, this URL (or a [=urn uuid=] that maps to this URL) will + be returned by {{Navigator/runAdAuction()}}. This URL is intended to be loaded into an ad + <{iframe}> (or a <{fencedframe}>). + : metadata + :: Null or a [=string=]. Extra arbitary information about this ad, passed to `generateBid()`. + : buyer reporting ID + :: Null or a [=string=]. Will be passed in place of interest group name to [=report win=], subject + to [=k-anonymity=] checks. Only meaningful in [=interest group/ads=], but ignored in + [=interest group/ad components=]. + : buyer and seller reporting ID + :: Null or a [=string=]. Will be passed in place of interest group name or + [=interest group ad/buyer reporting ID=] to [=report win=] and [=report result=], subject to + [=k-anonymity=] checks. Only meaningful in [=interest group/ads=], but ignored in + [=interest group/ad components=]. + : allowed reporting origins + :: Null or a [=list=] of [=origins=]. A list of up to 10 reporting origins that can receive reports + with registered macros. Each origin's [=origin/scheme=] must be "`https`" and each origin must be + enrolled. Only meaningful in + [=interest group/ads=], but ignored in [=interest group/ad components=]. +
+ +A previous win is the [=interest group=]'s auction win history, to allow on-device +frequency capping. +
+ : time + :: A [=moment=]. Approximate time the [=interest group=] won an auction. + : ad json + :: A [=string=]. A JSON serialized object corresponding to the ad that won the auction.

Currency tag

@@ -4372,319 +4380,296 @@ value is used to denote that the currency is unspecified. 1. Return false. -

Auction config

+

Auction config

-An auction config is a [=struct=] with the following items: +An auction config is a [=struct=] with the following items:
-: seller -:: An [=origin=]. - The origin of the seller running the ad auction. The [=origin/scheme=] must be "https". -: decision logic url -:: A [=URL=]. - The URL to fetch the seller's JavaScript from. -

- The [=auction config/decision logic url=]'s [=origin=] will always be [=same origin=] with - [=auction config/seller=]. -

-: trusted scoring signals url -:: Null or a [=URL=]. - Provide a mechanism for making real-time data (information about a specific [=ad creative=]) available - for use at scoring time, e.g. the results of some ad scanning system. -

- When non-null, the [=auction config/trusted scoring signals url=]'s [=origin=] will always be - [=same origin=] with [=auction config/seller=]. -

-: interest group buyers -:: Null or a [=list=] of [=origins=]. - Owners of interest groups allowed to participate in the auction. Each [=origin's=] [=origin/scheme=] - must be "https". -: auction signals -:: Null, a [=string=], a {{Promise}}, or failure. - Opaque JSON data passed to both sellers' and buyers' [=script runners=]. -: requested size -:: Null or an [=ad size=], initially null. - The size of the frame for the ad being selected by the auction. -: seller signals -:: Null, a [=string=], a {{Promise}}, or failure. - Opaque JSON data passed to the seller's [=script runner=]. -: seller timeout -:: A [=duration=] in milliseconds, initially 50 milliseconds. - Restricts the runtime of the seller's `scoreAd()` script. If scoring does not complete before - the timeout, the bid being scored is not considered further. -: per buyer signals -:: Null, a {{Promise}}, failure, or an [=ordered map=] whose [=map/keys=] are [=origins=] and - whose [=map/values=] are [=strings=]. - [=map/Keys=] are buyers and must be valid HTTPS origins. [=map/Values=] are opaque JSON data - passed to corresponding buyer's [=script runner=]. -: per buyer timeouts -:: Null, a {{Promise}}, failure, or an [=ordered map=] whose [=map/keys=] are [=origins=] and - whose [=map/values=] are [=durations=] in milliseconds. - [=map/Keys=] are buyers and must be valid HTTPS origins. [=map/Values=] restrict the runtime of - corresponding buyer's `generateBid()` script. If the timeout expires, only the bid submitted - via `setBid()` is considered. -: all buyers timeout -:: A [=duration=] in milliseconds, initially 50 milliseconds. - Restricts the `generateBid()` script's runtime for all buyers without a timeout specified in - [=auction config/per buyer timeouts=]. If the timeout expires, only the bid submitted via - `setBid()` is considered. -: per buyer cumulative timeouts -:: Null, a {{Promise}}, failure, or an [=ordered map=] whose [=map/keys=] are [=origins=] and - whose [=map/values=] are [=durations=] in milliseconds. - [=map/Keys=] are buyers and must be valid HTTPS [=origins=]. [=map/Values=] are collective - timeouts for all interest groups of the buyer represented by the [=map/key=]. Includes the time of - loading scripts and signals, and running the `generateBid()` functions. Once the timer expires, - the affected buyer's interest groups may no longer generate any bids. All bids generated before - the timeout will continue to participate in the auction. - Implementations should attempt, on a best-effort basis, to generate bids for each buyer in - priority order, so lower priority [=interest groups=] are the ones more likely to be timed out. If - {{Promise}}s are passed in to the [=auction config=] for fields that support them, - [=wait until configuration input promises resolve=] before starting the timer. - -: all buyers cumulative timeout -:: Null or a [=duration=] in milliseconds, initially null. - Restricts a buyer's cumulative timeout for all buyers without one specified in - [=auction config/per buyer cumulative timeouts=]. -: per buyer group limits -:: Null or an [=ordered map=] whose [=map/keys=] are [=origins=] and whose [=map/values=] are - {{unsigned short}}s. - [=map/Keys=] are buyers and must be valid HTTPS origins. [=map/Values=] restrict the number of - bidding interest groups for a particular buyer that can participate in an auction. -: all buyers group limit -:: An {{unsigned short}}, initially 65535. - Limit on the number of bidding interest groups for all buyers without a limit specified in - [=auction config/per buyer group limits=]. -: per buyer priority signals -:: Null or an [=ordered map=] whose [=map/keys=] are [=origins=] and whose [=map/values=] are - [=ordered maps=], whose [=map/keys=] are [=strings=] and whose [=map/values=] are {{double}}. - Per-buyer sparse vector whose dot product with [=interest group/priority vector=] is used to - calculate interest group priorities. No signal's key starts with "browserSignals.", which is - reserved for values coming from the browser. -: all buyers priority signals -:: Null or an [=ordered map=] whose [=map/keys=] are [=strings=] and whose [=map/values=] are - {{double}}. - Merged with [=auction config/per buyer priority signals=] before calculating per-interest group - priorities. In the case both have entries with the same key, the entry in - `per_buyer_priority_signals` takes precedence. No signals key start with "browserSignals.", which - is reserved for values coming from the browser. -: component auctions -:: A [=list=] of [=auction config=]s. - Nested auctions whose results will also participate in a top level auction. Only the top level - [=auction config=] can have component auctions. -: seller experiment group id -:: Null or an {{unsigned short}}, initially null. - Optional identifier for an experiment group to support coordinated experiments with the seller's - trusted server. -: per buyer experiment group ids -:: An [=ordered map=] whose [=map/keys=] are [=origins=] and whose [=map/values=] are - {{unsigned short}}s. - [=map/Keys=] are buyers and must be valid HTTPS origins. [=map/Values=] are identifiers for - experiment groups, to support coordinated experiments with buyers' trusted servers. -: all buyer experiment group id -:: Null or an {{unsigned short}}, initially null. - Optional identifier for an experiment group to support coordinated experiments with buyers' - trusted servers for buyers without a specified experiment group. -: pending promise count -:: An integer, initially 0. The number of things that are pending that are needed to score - everything. It includes waiting for {{Promise}}s [=auction config/auction signals=], - [=auction config/per buyer signals=], [=auction config/per buyer currencies=], - [=auction config/per buyer timeouts=], [=auction config/direct from seller signals header ad slot=], - [=auction config/seller signals=], or {{AuctionAdConfig/additionalBids}} whose {{Promise}}s are not - yet resolved. -: config idl -:: {{AuctionAdConfig}}. -: resolve to config -:: A [=boolean=] or a {{Promise}}, initially false. - Whether the ad should be returned as a {{FencedFrameConfig}}, or otherwise as a [=urn uuid=]. -: seller currency -:: A [=currency tag=]. Specifies the currency bids returned by `scoreAd()` are expected to use, and - which reporting for this auction will agree on. -: per buyer currencies -:: A {{Promise}} or failure or an [=ordered map=] whose [=map/keys=] are [=origins=] and whose - [=map/values=] are [=currency tags=]. Specifies the currency bids returned by `generateBid()` or - `scoreAd()` in component auctions are expected to use. The initial value is an empty map. -: all buyers currency -:: A [=currency tag=]. Specifies the currency bids returned by `generateBid()` or `scoreAd()` in - component auctions are expected to use if [=auction config/per buyer currencies=] does not specify - a particular value. -: direct from seller signals header ad slot -:: Null, a [=string=], a {{Promise}}, or failure. Initially null. -: auction nonce -:: Null or a [=version 4 UUID=], initially null. - A unique identifier associated with this and only this invocation of - {{Window/navigator}}.{{Navigator/runAdAuction()}}. For - multi-seller auctions, this ID is uniquely associated with all {{AuctionAdConfig/componentAuctions}}. - This must come from a prior call to {{Window/navigator}}.{{Navigator/createAuctionNonce()}}. This - is only required for auctions that provide additional bids, and each of those additional bids must - use the same auction nonce to ensure that each of those additional bids was intended for this and - only this auction. -: expects additional bids -:: A [=boolean=] or failure, initially false. - Specifies whether some bids will be provided as signed exchanges. Sets to failure if the - {{AuctionAdConfig/additionalBids}} {{Promise}} is [=rejected=]. - + : seller + :: An [=origin=]. + The origin of the seller running the ad auction. The [=origin/scheme=] must be "`https`". + : decision logic url + :: A [=URL=]. + The URL to fetch the seller's JavaScript from. +

+ The [=auction config/decision logic url=]'s [=origin=] will always be [=same origin=] with + [=auction config/seller=]. +

+ : trusted scoring signals url + :: Null or a [=URL=]. + Provide a mechanism for making real-time data (information about a specific [=ad creative=]) + available for use at [=evaluate a scoring script|scoring=] time, e.g. the results of some ad + scanning system. +

+ When non-null, the [=auction config/trusted scoring signals url=]'s [=origin=] will always be + [=same origin=] with [=auction config/seller=]. +

+ : interest group buyers + :: Null or a [=list=] of [=origins=]. + Owners of interest groups allowed to participate in the auction. Each [=origin's=] + [=origin/scheme=] must be "`https`". + : auction signals + :: Null, a [=string=], a {{Promise}}, or failure. + Opaque JSON data passed to both sellers' and buyers' [=script runners=]. + : requested size + :: Null or an [=ad size=], initially null. + The size of the frame for the ad being selected by the auction. + : seller signals + :: Null, a [=string=], a {{Promise}}, or failure. + Opaque JSON data passed to the seller's [=script runner=]. + : seller timeout + :: A [=duration=] in milliseconds, initially 50 milliseconds. + Restricts the runtime of the seller's `scoreAd()` script. If scoring does not complete before + the timeout, the bid being scored is not considered further. + : per buyer signals + :: Null, a {{Promise}}, failure, or an [=ordered map=] whose [=map/keys=] are [=origins=] and + whose [=map/values=] are [=strings=]. + [=map/Keys=] are buyers whose [=origin/schemes=] must be "`https`". [=map/Values=] are + opaque JSON data passed to corresponding buyer's [=script runner=]. + : per buyer timeouts + :: Null, a {{Promise}}, failure, or an [=ordered map=] whose [=map/keys=] are [=origins=] and + whose [=map/values=] are [=durations=] in milliseconds. + [=map/Keys=] are buyers whose [=origin/schemes=] must be "`https`". [=map/Values=] restrict the + runtime of corresponding buyer's `generateBid()` script. If the timeout expires, only the bid + submitted via `setBid()` is considered. + : all buyers timeout + :: A [=duration=] in milliseconds, initially 50 milliseconds. + Restricts the `generateBid()` script's runtime for all buyers without a timeout specified in + [=auction config/per buyer timeouts=]. If the timeout expires, only the bid submitted via + `setBid()` is considered. + : per buyer cumulative timeouts + :: Null, a {{Promise}}, failure, or an [=ordered map=] whose [=map/keys=] are [=origins=] and + whose [=map/values=] are [=durations=] in milliseconds. + [=map/Keys=] are buyers whose [=origin/schemes=] must be "`https`". [=map/Values=] are collective + timeouts for all interest groups of the buyer represented by the [=map/key=]. Includes the time of + loading scripts and signals, and running the `generateBid()` functions. Once the timer expires, + the affected buyer's interest groups may no longer generate any bids. All bids generated before + the timeout will continue to participate in the auction. + Implementations should attempt, on a best-effort basis, to generate bids for each buyer in + priority order, so lower priority [=interest groups=] are the ones more likely to be timed out. If + {{Promise}}s are passed in to the [=auction config=] for fields that support them, + [=wait until configuration input promises resolve=] before starting the timer. + : all buyers cumulative timeout + :: Null or a [=duration=] in milliseconds, initially null. + Restricts a buyer's cumulative timeout for all buyers without one specified in + [=auction config/per buyer cumulative timeouts=]. + : per buyer group limits + :: Null or an [=ordered map=] whose [=map/keys=] are [=origins=] and whose [=map/values=] are + {{unsigned short}}s. + [=map/Keys=] are buyers whose [=origin/schemes=] must be "`https`". [=map/Values=] restrict the + number of bidding interest groups for a particular buyer that can participate in an auction. + : all buyers group limit + :: An {{unsigned short}}, initially 65535. + Limit on the number of bidding interest groups for all buyers without a limit specified in + [=auction config/per buyer group limits=]. + : per buyer priority signals + :: Null or an [=ordered map=] whose [=map/keys=] are [=origins=] and whose [=map/values=] are + [=ordered maps=], whose [=map/keys=] are [=strings=] and whose [=map/values=] are {{double}}. + Per-buyer sparse vector whose dot product with [=interest group/priority vector=] is used to + calculate interest group priorities. No signal's key starts with "browserSignals.", which is + reserved for values coming from the browser. + : all buyers priority signals + :: Null or an [=ordered map=] whose [=map/keys=] are [=strings=] and whose [=map/values=] are + {{double}}. + Merged with [=auction config/per buyer priority signals=] before calculating per-interest group + priorities. In the case both have entries with the same key, the entry in + `per_buyer_priority_signals` takes precedence. No signals key start with "browserSignals.", which + is reserved for values coming from the browser. + : component auctions + :: A [=list=] of [=auction config=]s. + Nested auctions whose results will also participate in a top level auction. Only the top level + [=auction config=] can have component auctions. + : seller experiment group id + :: Null or an {{unsigned short}}, initially null. + Optional identifier for an experiment group to support coordinated experiments with the seller's + trusted server. + : per buyer experiment group ids + :: An [=ordered map=] whose [=map/keys=] are [=origins=] and whose [=map/values=] are + {{unsigned short}}s. + [=map/Keys=] are buyers whose [=origin/schemes=] must be "`https`". [=map/Values=] are + identifiers for experiment groups, to support coordinated experiments with buyers' trusted servers. + : all buyer experiment group id + :: Null or an {{unsigned short}}, initially null. + Optional identifier for an experiment group to support coordinated experiments with buyers' + trusted servers for buyers without a specified experiment group. + : pending promise count + :: An integer, initially 0. The number of things that are pending that are needed to score + everything. It includes waiting for {{Promise}}s [=auction config/auction signals=], + [=auction config/per buyer signals=], [=auction config/per buyer currencies=], + [=auction config/per buyer timeouts=], [=auction config/direct from seller signals header ad slot=], + [=auction config/seller signals=], or {{AuctionAdConfig/additionalBids}} whose {{Promise}}s are + not yet resolved. + : config idl + :: {{AuctionAdConfig}}. + : resolve to config + :: A [=boolean=] or a {{Promise}}, initially false. + Whether the ad should be returned as a {{FencedFrameConfig}}, or otherwise as a [=urn uuid=]. + : seller currency + :: A [=currency tag=]. Specifies the currency bids returned by `scoreAd()` are expected to use, and + which reporting for this auction will agree on. + : per buyer currencies + :: A {{Promise}} or failure or an [=ordered map=] whose [=map/keys=] are [=origins=] and whose + [=map/values=] are [=currency tags=]. Specifies the currency bids returned by `generateBid()` or + `scoreAd()` in component auctions are expected to use. The initial value is an empty map. + : all buyers currency + :: A [=currency tag=]. Specifies the currency bids returned by `generateBid()` or `scoreAd()` in + component auctions are expected to use if [=auction config/per buyer currencies=] does not + specify a particular value. + : direct from seller signals header ad slot + :: Null, a [=string=], a {{Promise}}, or failure. Initially null. + : auction nonce + :: Null or a [=version 4 UUID=], initially null. + A unique identifier associated with this and only this invocation of + {{Window/navigator}}.{{Navigator/runAdAuction()}}. For multi-seller auctions, this ID is + uniquely associated with all {{AuctionAdConfig/componentAuctions}}. + This must come from a prior call to {{Window/navigator}}.{{Navigator/createAuctionNonce()}}. + This is only required for auctions that provide [=additional bids=], and each of those + [=additional bids=] must use the same auction nonce to ensure that each of them was intended for + this and only this auction. + : expects additional bids + :: A [=boolean=] or failure, initially false. + Specifies whether some bids will be provided as signed exchanges. Sets to failure if the + {{AuctionAdConfig/additionalBids}} {{Promise}} is [=rejected=].
-To wait until configuration input promises resolve given an [=auction config=] |auctionConfig|: -1. Wait until |auctionConfig|'s [=auction config/pending promise count=] is 0. -1. [=Assert=] |auctionConfig|'s [=auction config/auction signals=], [=auction config/seller signals=], - [=auction config/per buyer signals=], [=auction config/per buyer currencies=], - [=auction config/per buyer timeouts=], [=auction config/per buyer cumulative timeouts=], and - [=auction config/direct from seller signals header ad slot=] are not {{Promise}}s, and - [=auction config/expects additional bids=] is false. -1. If |auctionConfig|'s [=auction config/auction signals=], [=auction config/seller signals=], - [=auction config/per buyer signals=], [=auction config/per buyer currencies=], - [=auction config/per buyer timeouts=], [=auction config/per buyer cumulative timeouts=], or - [=auction config/direct from seller signals header ad slot=] is failure, return failure. -1. Return. +To wait until configuration input promises resolve given an [=auction config=] +|auctionConfig|: + 1. Wait until |auctionConfig|'s [=auction config/pending promise count=] is 0. + 1. [=Assert=] |auctionConfig|'s [=auction config/auction signals=], [=auction config/seller signals=], + [=auction config/per buyer signals=], [=auction config/per buyer currencies=], + [=auction config/per buyer timeouts=], [=auction config/per buyer cumulative timeouts=], and + [=auction config/direct from seller signals header ad slot=] are not {{Promise}}s, and + [=auction config/expects additional bids=] is false. + 1. If |auctionConfig|'s [=auction config/auction signals=], [=auction config/seller signals=], + [=auction config/per buyer signals=], [=auction config/per buyer currencies=], + [=auction config/per buyer timeouts=], [=auction config/per buyer cumulative timeouts=], or + [=auction config/direct from seller signals header ad slot=] is failure, return failure. + 1. Return.
To recursively wait until configuration input promises resolve given an [=auction config=] |auctionConfig|: -1. [=list/For each=] |componentAuctionConfig| in |auctionConfig|'s [=auction config/component auctions=]: - 1. If the result of [=waiting until configuration input promises resolve=] given |componentAuctionConfig| is - failure, return failure. -1. Return the result of [=waiting until configuration input promises resolve=] given |auctionConfig|. + 1. [=list/For each=] |componentAuctionConfig| in |auctionConfig|'s + [=auction config/component auctions=]: + 1. If the result of [=waiting until configuration input promises resolve=] given + |componentAuctionConfig| is failure, return failure. + 1. Return the result of [=waiting until configuration input promises resolve=] given |auctionConfig|.
To handle an input promise in configuration given an [=auction config=] |auctionConfig|, a {{Promise}} |p|, and two sequences of steps, covering the parsing of the value and error-handling: -1. Increment |auctionConfig|'s [=auction config/pending promise count=]. -1. Let |resolvedAndTypeChecked| be the promise representing performing the following steps - [=upon fulfillment=] of |p| with |result|: - 1. Execute the steps to be run for parsing of the value given |result|. - 1. If no exception was [=exception/thrown=] in the previous step, then decrement |auctionConfig|'s - [=auction config/pending promise count=]. -1. [=Upon rejection=] of |resolvedAndTypeChecked|: - 1. Execute the steps for error-handling. - 1. Decrement |auctionConfig|'s [=auction config/pending promise count=]. + 1. Increment |auctionConfig|'s [=auction config/pending promise count=]. + 1. Let |resolvedAndTypeChecked| be the promise representing performing the following steps + [=upon fulfillment=] of |p| with |result|: + 1. Execute the steps to be run for parsing of the value given |result|. + 1. If no exception was [=exception/thrown=] in the previous step, then decrement + |auctionConfig|'s [=auction config/pending promise count=]. + 1. [=Upon rejection=] of |resolvedAndTypeChecked|: + 1. Execute the steps for error-handling. + 1. Decrement |auctionConfig|'s [=auction config/pending promise count=].
- To look up per-buyer currency given an [=auction config=] |auctionConfig|, and an [=origin=] |buyer|: +To look up per-buyer currency given an [=auction config=] |auctionConfig|, and an +[=origin=] |buyer|: 1. Let |perBuyerCurrency| be |auctionConfig|'s [=auction config/all buyers currency=] - 1. Assert: |auctionConfig|'s [=auction config/per buyer currencies=] is an [=ordered map=]. + 1. [=Assert=] that |auctionConfig|'s [=auction config/per buyer currencies=] is an [=ordered map=]. 1. If |auctionConfig|'s [=auction config/per buyer currencies=][|buyer|] [=map/exists=], then set |perBuyerCurrency| to |auctionConfig|'s [=auction config/per buyer currencies=][|buyer|]. 1. Return |perBuyerCurrency|
-

Per buyer bid generator

+

Bid generator

-A per buyer bid generator is an [=ordered map=] whose [=map/keys=] are [=URLs=] representing -[=interest group/trusted bidding signals urls=], and whose [=map/values=] are +A per buyer bid generator is an [=ordered map=] whose [=map/keys=] are [=URLs=] +representing [=interest group/trusted bidding signals urls=], and whose [=map/values=] are [=per signals url bid generators=]. -

Per signals url bid generator

- -A per signals url bid generator is an [=ordered map=] whose [=map/keys=] are [=origins=] +A per signals url bid generator is an [=ordered map=] whose [=map/keys=] are [=origins=] representing [=interest group/joining origins=], and whose [=map/values=] are [=lists=] of [=interest groups=]. +

Generated bid

-

Previous win

- -The [=interest group=]'s auction win history, to allow on-device frequency capping. - - -
-: time -:: A [=moment=]. Approximate time the [=interest group=] won an auction. -: ad json -:: A [=string=]. A JSON serialized object corresponding to the ad that won the auction. +A generated bid is a bid that needs to be scored by the seller. The bid is either the +result of [=evaluating a bidding script=], or an [=additional bid=] provided by the +[:Ad-Auction-Additional-Bid:] response headers. +
+ : bid + :: A [=bid with currency=]. If the [=bid with currency/value=] is zero or negative, then this + [=interest group=] will not participate in the auction. + : bid in seller currency + :: A {{double}} or null. An equivalent of the original bid in seller's currency. This is either + the original bid if the currency already matched, or a conversion provided by `scoreAd()`. + : ad + :: A [=string=]. JSON string to be passed to the scoring function. + + Issue: TODO: Check whether [=generated bid/ad descriptor=] can be moved to + [=generated bid/bid ad=] to avoid duplication + (WICG/turtledove#868). + : ad descriptor + :: An [=ad descriptor=]. Render URL and size of the bid's ad. + : ad component descriptors + :: Null or a [=list=] of [=ad descriptors=]. Ad components associated with bid, if any. May have at + most 20 [=list/items=]. Must be null if the interest group making this bid has a null + [=interest group/ad components=] field. + : ad cost + :: Null or a {{double}}. Advertiser click or conversion cost passed from `generateBid()` to + `reportWin()`. Negative values will be ignored and not passed. Will be + [=round a value|stochastically rounded=] when passed. + : modeling signals + :: Null or an {{unsigned short}}. A 0-4095 integer (12-bits) passed to `reportWin()`, with noising. + : interest group + :: An [=interest group=], whose `generateBid()` invocation generated this bid, or specified by the + additional bid. + : bid ad + :: The [=interest group ad=] within [=generated bid/interest group=] to display. + : modified bid + :: Null or a [=bid with currency=]. Being null for top level auction. + The bid value a component auction's `scoreAd()` script returns. + : bid duration + :: A [=duration=] in milliseconds. How long it took to run `generateBid()`. + : provided as additional bid + :: A [=boolean=], initially false.
-

Bid with currency

-Numeric value of a bid and the currency it is in. +A bid with currency is a numeric value of a bid and the currency it is in.
-: value -:: A {{double}}. The value of the bid. -: currency -:: A [=currency tag=]. The currency the bid is in. - -
- -

Generated bid

- -A bid that needs to be scored by the seller. The bid is either the output of running a Protected -Audience `generateBid()` script, or an additional bid provided by the [:Ad-Auction-Additional-Bid:] -response headers. - -
-: bid -:: A [=bid with currency=]. If the [=bid with currency/value=] is zero or negative, then this - [=interest group=] will not participate in the auction. -: bid in seller currency -:: A {{double}} or null. An equivalent of the original bid in seller's currency. This is either the - original bid if the currency already matched, or a conversion provided by `scoreAd()`. -: ad -:: A [=string=]. JSON string to be passed to the scoring function. - - Issue: TODO: Check whether [=generated bid/ad descriptor=] can be moved to - [=generated bid/bid ad=] to avoid duplication - (WICG/turtledove#868). -: ad descriptor -:: An [=ad descriptor=]. Render URL and size of the bid's ad. -: ad component descriptors -:: Null or a [=list=] of [=ad descriptors=]. Ad components associated with bid, if any. May have at - most 20 [=list/items=]. Must be null if the interest group making this bid has a null - [=interest group/ad components=] field. -: ad cost -:: Null or a {{double}}. Advertiser click or conversion cost passed from `generateBid()` to - `reportWin()`. Negative values will be ignored and not passed. Will be - [=round a value|stochastically rounded=] when passed. -: modeling signals -:: Null or an {{unsigned short}}. A 0-4095 integer (12-bits) passed to `reportWin()`, with noising. -: interest group -:: An [=interest group=], whose `generateBid()` invocation generated this bid, or specified by the - additional bid. -: bid ad -:: The [=interest group ad=] within [=generated bid/interest group=] to display. -: modified bid -:: Null or a [=bid with currency=]. Being null for top level auction. - The bid value a component auction's `scoreAd()` script returns. -: bid duration -:: A [=duration=] in milliseconds. How long it took to run `generateBid()`. -: provided as additional bid -:: A [=boolean=], initially false. - + : value + :: A {{double}}. The value of the bid. + : currency + :: A [=currency tag=]. The currency the bid is in.
-

Ad descriptor

- -The render URL and size of an ad. +An ad descriptor is the render URL and size of an ad.
-: url -:: A [=URL=], which will be rendered to display the [=ad creative=] if this bid wins the auction. -: size -:: Null or an [=ad size=], initially null. - + : url + :: A [=URL=], which will be rendered to display the [=ad creative=] if this bid wins the auction. + : size + :: Null or an [=ad size=], initially null.
-

Ad size

- -Width and height of an ad. +An ad size is the width and height of an ad.
-: width -:: A {{double}}. -: width units -:: A [=string=]. Can only be one of "px" (pixel), "sh" (screen height), and "sw" (screen width). -: height -:: A {{double}}. -: height units -:: A [=string=]. Can only be one of "px" (pixel), "sh" (screen height), and "sw" (screen width). - + : width + :: A {{double}}. + : width units + :: A [=string=]. Can only be one of "px" (pixel), "sh" (screen height), and "sw" (screen width). + : height + :: A {{double}}. + : height units + :: A [=string=]. Can only be one of "px" (pixel), "sh" (screen height), and "sw" (screen width).

Direct from seller signals

@@ -4710,11 +4695,11 @@ A direct from seller signals is a [=struct=] with the following [=str Opaque JSON data passed to the seller's [=script runner=]. : per buyer signals :: A [=map=] whose [=map/keys=] are [=origins=] and whose [=map/values=] are [=strings=]. - [=map/Keys=] are buyers and must be valid HTTPS origins. [=map/Values=] are opaque JSON data - passed to corresponding buyer's [=script runner=]. + [=map/Keys=] are buyers whose [=origin/scheme=] must be "`https`". [=map/Values=] are opaque + JSON data passed to corresponding buyer's [=script runner=].
-

Score ad output

+

Score ad output

The output of running a Protected Audience `scoreAd()` script, is represented using the following type:
@@ -4753,8 +4738,8 @@ TODO: This also has an ad field, which should behave similar to the way {{ScoreA
 affects [=generated bid/modified bid=], and then affecting the adMetadata parameter to scoreAd.
 
 
- To process scoreAd output given an [=ECMAScript/Completion Record=] |result|: + 1. If |result| is an an [=ECMAScript/abrupt completion=], return failure. 1. If |result|.\[[Value]] is a [=Number=]: 1. Let |checkedScore| be the result of [=converted to an IDL value|converting=] @@ -4772,62 +4757,62 @@ To process scoreAd output given an [=ECMAScript/Completion Record=] | 1. Return |resultIDL|.
-

Leading bid info

+

Leading bid info

-Information of the auction's leading bid so far when ranking scored bids. +A leading bid info is the information of the auction's leading bid so far when ranking +scored bids.
-: top score -:: A {{double}}, initially 0.0. The highest score so far. -: top bids count -:: An integer, initially 0. The number of bids with the same `top score`. -: at most one top bid owner -:: A [=boolean=], initially true. Whether all bids of `top score` are from the same interest - group owner. -: leading bid -:: Null or a [=generated bid=]. The leading bid of the auction so far. -: auction config -:: An [=auction config=]. The auction config of the auction which generated this - [=leading bid info/leading bid=]. -: second highest score -:: A {{double}}, initially 0.0. The second highest score so far. If more than one bids tie with - `top score`, this will be set to `top score`. -: highest scoring other bids count -:: An integer, initially 0. The number of bids with the same `second highest score`. -: highest scoring other bid -:: Null or a [=generated bid=]. The second highest scoring other bid. -: highest scoring other bid owner -:: Null or an [=origin=], initially null. The interest group owner that made bids with the - `second highest score`. Set to null if there are more than one owners made bids with the - `second highest score`. -: top level seller -:: Null or a [=string=]. The seller in the top level auction. Only set for component auctions, null - otherwise. -: top level seller signals -:: Null or a [=string=]. Signals from the seller in the top level auction, produced as the output - of the top-level seller's `reportResult()` method. Only set for component auctions, - null otherwise. -: component seller -:: Null or a [=string=]. Seller in component auction which generated this - [=leading bid info/leading bid=]. Only set the top level auction when component auctions are - present, null otherwise. -: bidding data version -:: Null or an {{unsigned long}}. - Data-Version value from the trusted bidding signals server's response(s). Will only be not null if - the Data-Version header was provided and had a consistent value for all of the trusted bidding - signals server responses used to construct the trustedBiddingSignals. -: scoring data version -:: Null or an {{unsigned long}}. - Data-Version value from the trusted scoring signals server's response. Will only be not null if - the Data-Version header was provided in the response headers from the trusted scoring signals - server. -: buyer reporting result -:: Null or a [=reporting result=], initially null. -: seller reporting result -:: Null or a [=reporting result=], initially null. -: component seller reporting result -:: Null or a [=reporting result=], initially null. - + : top score + :: A {{double}}, initially 0.0. The highest score so far. + : top bids count + :: An integer, initially 0. The number of bids with the same `top score`. + : at most one top bid owner + :: A [=boolean=], initially true. Whether all bids of `top score` are from the same interest + group owner. + : leading bid + :: Null or a [=generated bid=]. The leading bid of the auction so far. + : auction config + :: An [=auction config=]. The auction config of the auction which generated this + [=leading bid info/leading bid=]. + : second highest score + :: A {{double}}, initially 0.0. The second highest score so far. If more than one bids tie with + `top score`, this will be set to `top score`. + : highest scoring other bids count + :: An integer, initially 0. The number of bids with the same `second highest score`. + : highest scoring other bid + :: Null or a [=generated bid=]. The second highest scoring other bid. + : highest scoring other bid owner + :: Null or an [=origin=], initially null. The interest group owner that made bids with the + `second highest score`. Set to null if there are more than one owners made bids with the + `second highest score`. + : top level seller + :: Null or a [=string=]. The seller in the top level auction. Only set for component auctions, + null otherwise. + : top level seller signals + :: Null or a [=string=]. Signals from the seller in the top level auction, produced as the output + of the top-level seller's `reportResult()` method. Only set for component auctions, + null otherwise. + : component seller + :: Null or a [=string=]. Seller in component auction which generated this + [=leading bid info/leading bid=]. Only set the top level auction when component auctions are + present, null otherwise. + : bidding data version + :: Null or an {{unsigned long}}. + Data-Version value from the trusted bidding signals server's response(s). Will only be not null + if the [:Data-Version:] header was provided and had a consistent value for all of the trusted + bidding signals server responses used to construct the trustedBiddingSignals. + : scoring data version + :: Null or an {{unsigned long}}. + Data-Version value from the trusted scoring signals server's response. Will only be not null if + the [:Data-Version:] header was provided in the response headers from the trusted scoring + signals server. + : buyer reporting result + :: Null or a [=reporting result=], initially null. + : seller reporting result + :: Null or a [=reporting result=], initially null. + : component seller reporting result + :: Null or a [=reporting result=], initially null.
A reporting result is a [=struct=] with the following [=struct/items=]: