@adcp/sdk 16.0.0-beta.9 → 16.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -2
- package/bin/adcp-identity.js +3 -2
- package/dist/lib/client/core.d.mts +1 -1
- package/dist/lib/client/core.d.ts +1 -1
- package/dist/lib/core/AgentClient.d.mts +8 -1
- package/dist/lib/core/AgentClient.d.ts +8 -1
- package/dist/lib/core/AgentClient.js +10 -0
- package/dist/lib/core/AgentClient.mjs +10 -0
- package/dist/lib/core/AsyncHandler.d.mts +2 -0
- package/dist/lib/core/AsyncHandler.d.ts +2 -0
- package/dist/lib/core/AsyncHandler.js +1 -1
- package/dist/lib/core/AsyncHandler.mjs +1 -1
- package/dist/lib/core/ConversationTypes.d.mts +32 -0
- package/dist/lib/core/ConversationTypes.d.ts +32 -0
- package/dist/lib/core/SingleAgentClient.d.mts +11 -1
- package/dist/lib/core/SingleAgentClient.d.ts +11 -1
- package/dist/lib/core/SingleAgentClient.js +25 -6
- package/dist/lib/core/SingleAgentClient.mjs +26 -7
- package/dist/lib/core/TaskExecutor.d.mts +3 -1
- package/dist/lib/core/TaskExecutor.d.ts +3 -1
- package/dist/lib/core/TaskExecutor.js +127 -34
- package/dist/lib/core/TaskExecutor.mjs +127 -34
- package/dist/lib/core/task-deadline.d.mts +2 -0
- package/dist/lib/core/task-deadline.d.ts +2 -0
- package/dist/lib/core/task-deadline.js +20 -2
- package/dist/lib/core/task-deadline.mjs +19 -2
- package/dist/lib/identity-3.3/revocation.js +6 -7
- package/dist/lib/identity-3.3/revocation.mjs +6 -7
- package/dist/lib/identity-3.3/schemas.draft.js +1 -1
- package/dist/lib/identity-3.3/schemas.draft.mjs +1 -1
- package/dist/lib/identity-3.3/trust.d.mts +8 -0
- package/dist/lib/identity-3.3/trust.d.ts +8 -0
- package/dist/lib/identity-3.3/trust.js +41 -12
- package/dist/lib/identity-3.3/trust.mjs +40 -12
- package/dist/lib/index.d.mts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/server/account-sync-contract.js +4 -1
- package/dist/lib/server/account-sync-contract.mjs +4 -1
- package/dist/lib/server/create-adcp-server.js +1 -1
- package/dist/lib/server/create-adcp-server.mjs +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +22 -17
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +22 -17
- package/dist/lib/signing/crypto.d.mts +1 -1
- package/dist/lib/signing/crypto.d.ts +1 -1
- package/dist/lib/signing/crypto.js +2 -45
- package/dist/lib/signing/crypto.mjs +2 -46
- package/dist/lib/signing/web-bot-auth.d.mts +18 -10
- package/dist/lib/signing/web-bot-auth.d.ts +18 -10
- package/dist/lib/signing/web-bot-auth.js +48 -28
- package/dist/lib/signing/web-bot-auth.mjs +49 -29
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/v2/projection/catalog.d.mts +10 -0
- package/dist/lib/v2/projection/catalog.d.ts +10 -0
- package/dist/lib/v2/projection/catalog.js +5 -0
- package/dist/lib/v2/projection/catalog.mjs +4 -0
- package/dist/lib/v2/projection/creative-delivery.d.mts +15 -9
- package/dist/lib/v2/projection/creative-delivery.d.ts +15 -9
- package/dist/lib/v2/projection/creative-delivery.js +71 -10
- package/dist/lib/v2/projection/creative-delivery.mjs +71 -10
- package/dist/lib/v2/projection/v1-to-v2.js +3 -2
- package/dist/lib/v2/projection/v1-to-v2.mjs +4 -3
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.mjs +3 -3
- package/docs/TYPE-SUMMARY.md +12 -2
- package/docs/guides/CREATIVE-DELIVERY.md +18 -1
- package/docs/guides/REPORTING-STABILITY.md +7 -7
- package/docs/llms.txt +3 -3
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/docs/migration-agent-identity-3.3.md +56 -23
- package/docs/migration-reporting-storage-package.md +3 -3
- package/docs/releases/16.0.0.md +20 -0
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import type { CanonicalFormatLegacyResolver } from './v2-to-v1';
|
|
|
4
4
|
import type { CanonicalFormatKind, ProjectionDiagnostic, V1FormatId } from './types';
|
|
5
5
|
import type { CanonicalFormatDeclaration } from './legacy-metadata';
|
|
6
6
|
import type { UndeclaredFormatOptionSelector } from './legacy-routes';
|
|
7
|
+
import { type V1FormatDefinition } from './catalog';
|
|
7
8
|
type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, Extract<keyof T, K>> : never;
|
|
8
9
|
/**
|
|
9
10
|
* Primary SDK creative shape. Spell out the named fields rather than using
|
|
@@ -276,15 +277,20 @@ export declare class CreativeFormatCapabilityError extends Error {
|
|
|
276
277
|
readonly code = "ADCP_CREATIVE_FORMAT_CAPABILITY_CONTRADICTION";
|
|
277
278
|
constructor(message: string);
|
|
278
279
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
export declare function
|
|
285
|
-
export declare function
|
|
286
|
-
export declare function
|
|
287
|
-
export declare function
|
|
280
|
+
/**
|
|
281
|
+
* Project identity and asset keys for the selected wire mode. Optional
|
|
282
|
+
* `legacyFormatDefinitions` override bundled definitions by exact format owner
|
|
283
|
+
* and ID; ambiguous definitions leave asset keys unchanged.
|
|
284
|
+
*/
|
|
285
|
+
export declare function projectCreativeForDelivery<T extends CreativeAsset>(creative: T, selectorContainer: CreativeFormatSelectorContainer, wireMode?: 'canonical', operation?: string, legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver, legacyFormatDefinitions?: readonly V1FormatDefinition[]): CanonicalProjectedCreative<T>;
|
|
286
|
+
export declare function projectCreativeForDelivery<T extends CreativeAsset>(creative: T, selectorContainer: CreativeFormatSelectorContainer, wireMode: 'legacy' | 'unknown', operation?: string, legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver, legacyFormatDefinitions?: readonly V1FormatDefinition[]): LegacyProjectedCreative<T>;
|
|
287
|
+
export declare function projectCreativeForDelivery<T extends CreativeAsset>(creative: T, selectorContainer: CreativeFormatSelectorContainer, wireMode: CreativeFormatWireMode, operation?: string, legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver, legacyFormatDefinitions?: readonly V1FormatDefinition[]): CanonicalProjectedCreative<T> | LegacyProjectedCreative<T>;
|
|
288
|
+
export declare function projectMediaBuyCreativesForDelivery<T>(request: T, wireMode: 'canonical', operation?: 'create_media_buy' | 'update_media_buy', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver, legacyFormatDefinitions?: readonly V1FormatDefinition[]): ProjectedMediaBuyCreativeRequest<T, 'canonical'>;
|
|
289
|
+
export declare function projectMediaBuyCreativesForDelivery<T>(request: T, wireMode: 'legacy' | 'unknown', operation?: 'create_media_buy' | 'update_media_buy', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver, legacyFormatDefinitions?: readonly V1FormatDefinition[]): ProjectedMediaBuyCreativeRequest<T, 'legacy'>;
|
|
290
|
+
export declare function projectMediaBuyCreativesForDelivery<T>(request: T, wireMode: CreativeFormatWireMode, operation?: 'create_media_buy' | 'update_media_buy', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver, legacyFormatDefinitions?: readonly V1FormatDefinition[]): ProjectedMediaBuyCreativeRequest<T, 'canonical'> | ProjectedMediaBuyCreativeRequest<T, 'legacy'>;
|
|
291
|
+
export declare function projectSyncCreativesForDelivery<T>(request: T, selectorContainers: ReadonlyArray<CreativeFormatSelectorContainer>, wireMode: 'canonical', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver, legacyFormatDefinitions?: readonly V1FormatDefinition[]): ProjectedSyncCreativeRequest<T, 'canonical'>;
|
|
292
|
+
export declare function projectSyncCreativesForDelivery<T>(request: T, selectorContainers: ReadonlyArray<CreativeFormatSelectorContainer>, wireMode: 'legacy' | 'unknown', legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver, legacyFormatDefinitions?: readonly V1FormatDefinition[]): ProjectedSyncCreativeRequest<T, 'legacy'>;
|
|
293
|
+
export declare function projectSyncCreativesForDelivery<T>(request: T, selectorContainers: ReadonlyArray<CreativeFormatSelectorContainer>, wireMode: CreativeFormatWireMode, legacyFormatConverter?: LegacyFormatConverter, canonicalFormatLegacyResolver?: CanonicalFormatLegacyResolver, legacyFormatDefinitions?: readonly V1FormatDefinition[]): ProjectedSyncCreativeRequest<T, 'canonical'> | ProjectedSyncCreativeRequest<T, 'legacy'>;
|
|
288
294
|
export type { UndeclaredFormatOptionSelector } from './legacy-routes';
|
|
289
295
|
/**
|
|
290
296
|
* Looks up a format option the SDK derived from a seller's legacy `format_ids`.
|
|
@@ -33,6 +33,7 @@ var import_v1_to_v2 = require('./v1-to-v2.js');
|
|
|
33
33
|
var import_v2_to_v1 = require('./v2-to-v1.js');
|
|
34
34
|
var import_legacy_metadata = require('./legacy-metadata.js');
|
|
35
35
|
var import_jcs = require('../../utils/jcs.js');
|
|
36
|
+
var import_catalog = require('./catalog.js');
|
|
36
37
|
function stripLegacyCreativeIdentity(value) {
|
|
37
38
|
const legacyTokens = /* @__PURE__ */ new Set();
|
|
38
39
|
const legacyUrlTokens = /* @__PURE__ */ new Set();
|
|
@@ -591,11 +592,55 @@ function selectLegacyRef(creative, container, canonicalFormatLegacyResolver, ope
|
|
|
591
592
|
matching = preferMostConstrainedLegacyCandidates(matching, creative);
|
|
592
593
|
return matching.length === 1 ? matching[0].ref : void 0;
|
|
593
594
|
}
|
|
594
|
-
function
|
|
595
|
+
function projectLegacyAssetKeys(assetsValue, definition) {
|
|
596
|
+
const assets = record(assetsValue);
|
|
597
|
+
if (!assets || !Array.isArray(definition?.assets)) return assetsValue;
|
|
598
|
+
const slots = definition.assets.filter((slot) => record(slot) !== void 0);
|
|
599
|
+
if (slots.some((slot) => slot.item_type !== void 0 && slot.item_type !== "individual")) return assetsValue;
|
|
600
|
+
const declaredIds = new Set(slots.map((slot) => slot.asset_id));
|
|
601
|
+
const availableSlots = slots.filter(
|
|
602
|
+
(slot) => (slot.item_type === void 0 || slot.item_type === "individual") && typeof slot.asset_id === "string" && slot.asset_id.length > 0 && !Object.hasOwn(assets, slot.asset_id)
|
|
603
|
+
);
|
|
604
|
+
const targetBySource = /* @__PURE__ */ new Map();
|
|
605
|
+
const sourcesByTarget = /* @__PURE__ */ new Map();
|
|
606
|
+
for (const [key, value] of Object.entries(assets)) {
|
|
607
|
+
if (declaredIds.has(key)) continue;
|
|
608
|
+
const asset = record(value);
|
|
609
|
+
if (!asset || typeof asset.asset_type !== "string") continue;
|
|
610
|
+
const matches = availableSlots.filter((slot) => {
|
|
611
|
+
if (slot.asset_type !== asset.asset_type) return false;
|
|
612
|
+
if (asset.asset_type === "url") {
|
|
613
|
+
return typeof asset.url_type === "string" && asset.url_type === slot.requirements?.url_type;
|
|
614
|
+
}
|
|
615
|
+
if (asset.asset_type === "pixel_tracker") {
|
|
616
|
+
return typeof asset.event === "string" && asset.event === slot.event && (asset.event !== "custom" || typeof asset.custom_event_name === "string" && asset.custom_event_name === slot.custom_event_name);
|
|
617
|
+
}
|
|
618
|
+
return true;
|
|
619
|
+
});
|
|
620
|
+
if (matches.length !== 1) continue;
|
|
621
|
+
const target = matches[0].asset_id;
|
|
622
|
+
targetBySource.set(key, target);
|
|
623
|
+
const sources = sourcesByTarget.get(target) ?? [];
|
|
624
|
+
sources.push(key);
|
|
625
|
+
sourcesByTarget.set(target, sources);
|
|
626
|
+
}
|
|
627
|
+
for (const sources of sourcesByTarget.values()) {
|
|
628
|
+
if (sources.length > 1) for (const source of sources) targetBySource.delete(source);
|
|
629
|
+
}
|
|
630
|
+
if (targetBySource.size === 0) return assetsValue;
|
|
631
|
+
return Object.fromEntries(Object.entries(assets).map(([key, value]) => [targetBySource.get(key) ?? key, value]));
|
|
632
|
+
}
|
|
633
|
+
function projectCreative(creative, formatId, legacyFormatDefinitions) {
|
|
595
634
|
const next = { ...creative };
|
|
596
635
|
delete next.format_kind;
|
|
597
636
|
delete next.format_option_ref;
|
|
598
637
|
next.format_id = { ...formatId };
|
|
638
|
+
const supplied = legacyFormatDefinitions?.filter((definition2) => {
|
|
639
|
+
const ref = legacyRef(record(definition2)?.format_id);
|
|
640
|
+
return ref !== void 0 && sameLegacyIdentity(ref, formatId);
|
|
641
|
+
});
|
|
642
|
+
const definition = supplied?.length ? supplied.length === 1 ? supplied[0] : void 0 : (0, import_catalog.lookupV1Format)(formatId);
|
|
643
|
+
if (Object.hasOwn(creative, "assets")) next.assets = projectLegacyAssetKeys(creative.assets, definition);
|
|
599
644
|
return next;
|
|
600
645
|
}
|
|
601
646
|
function dedupeLegacyRefs(refs) {
|
|
@@ -829,7 +874,7 @@ function canonicalizeCreative(creative, selectorContainer, operation, legacyForm
|
|
|
829
874
|
}
|
|
830
875
|
return next;
|
|
831
876
|
}
|
|
832
|
-
function projectCreativeForDelivery(creative, selectorContainer, wireMode = "canonical", operation = "creative_delivery", legacyFormatConverter, canonicalFormatLegacyResolver) {
|
|
877
|
+
function projectCreativeForDelivery(creative, selectorContainer, wireMode = "canonical", operation = "creative_delivery", legacyFormatConverter, canonicalFormatLegacyResolver, legacyFormatDefinitions) {
|
|
833
878
|
const inputRecord = creative;
|
|
834
879
|
const originalLegacyRef = legacyRef(inputRecord.format_id);
|
|
835
880
|
const creativeRecord = canonicalizeCreative(inputRecord, selectorContainer, operation, legacyFormatConverter);
|
|
@@ -837,7 +882,11 @@ function projectCreativeForDelivery(creative, selectorContainer, wireMode = "can
|
|
|
837
882
|
if (originalLegacyRef) {
|
|
838
883
|
const selectedOriginal = selectLegacyRef(inputRecord, selectorContainer, canonicalFormatLegacyResolver, operation);
|
|
839
884
|
if (selectedOriginal) {
|
|
840
|
-
return projectCreative(
|
|
885
|
+
return projectCreative(
|
|
886
|
+
creativeRecord,
|
|
887
|
+
selectedOriginal,
|
|
888
|
+
legacyFormatDefinitions
|
|
889
|
+
);
|
|
841
890
|
}
|
|
842
891
|
throw new CreativeFormatProjectionError(
|
|
843
892
|
operation,
|
|
@@ -846,7 +895,8 @@ function projectCreativeForDelivery(creative, selectorContainer, wireMode = "can
|
|
|
846
895
|
);
|
|
847
896
|
}
|
|
848
897
|
const formatId = selectLegacyRef(creativeRecord, selectorContainer, canonicalFormatLegacyResolver, operation);
|
|
849
|
-
if (formatId)
|
|
898
|
+
if (formatId)
|
|
899
|
+
return projectCreative(creativeRecord, formatId, legacyFormatDefinitions);
|
|
850
900
|
if (typeof creativeRecord.format_kind === "string") {
|
|
851
901
|
const creativeId = typeof creativeRecord.creative_id === "string" ? creativeRecord.creative_id : "(unknown)";
|
|
852
902
|
const allCandidates = candidatesFromContainer(selectorContainer, canonicalFormatLegacyResolver, operation);
|
|
@@ -881,10 +931,19 @@ function projectCreativeForDelivery(creative, selectorContainer, wireMode = "can
|
|
|
881
931
|
"canonical format legacy resolver returned an invalid or ambiguous creative mapping"
|
|
882
932
|
);
|
|
883
933
|
}
|
|
884
|
-
if (resolved)
|
|
934
|
+
if (resolved)
|
|
935
|
+
return projectCreative(
|
|
936
|
+
creativeRecord,
|
|
937
|
+
resolved[0],
|
|
938
|
+
legacyFormatDefinitions
|
|
939
|
+
);
|
|
885
940
|
const pinned = optionReference(creativeRecord.format_option_ref) !== void 0;
|
|
886
941
|
if (candidates.length === 1 && !pinned) {
|
|
887
|
-
return projectCreative(
|
|
942
|
+
return projectCreative(
|
|
943
|
+
creativeRecord,
|
|
944
|
+
candidates[0].ref,
|
|
945
|
+
legacyFormatDefinitions
|
|
946
|
+
);
|
|
888
947
|
}
|
|
889
948
|
if (candidates.length > 1) {
|
|
890
949
|
throw new CreativeFormatProjectionError(
|
|
@@ -898,7 +957,7 @@ function projectCreativeForDelivery(creative, selectorContainer, wireMode = "can
|
|
|
898
957
|
}
|
|
899
958
|
return creative;
|
|
900
959
|
}
|
|
901
|
-
function projectMediaBuyCreativesForDelivery(request, wireMode = "canonical", operation = "create_media_buy", legacyFormatConverter, canonicalFormatLegacyResolver) {
|
|
960
|
+
function projectMediaBuyCreativesForDelivery(request, wireMode = "canonical", operation = "create_media_buy", legacyFormatConverter, canonicalFormatLegacyResolver, legacyFormatDefinitions) {
|
|
902
961
|
const requestRecord = record(request);
|
|
903
962
|
if (!requestRecord) return request;
|
|
904
963
|
let changed = false;
|
|
@@ -918,7 +977,8 @@ function projectMediaBuyCreativesForDelivery(request, wireMode = "canonical", op
|
|
|
918
977
|
wireMode,
|
|
919
978
|
operation,
|
|
920
979
|
legacyFormatConverter,
|
|
921
|
-
canonicalFormatLegacyResolver
|
|
980
|
+
canonicalFormatLegacyResolver,
|
|
981
|
+
legacyFormatDefinitions
|
|
922
982
|
);
|
|
923
983
|
if (projected !== creativeValue) changed = true;
|
|
924
984
|
return projected;
|
|
@@ -936,7 +996,7 @@ function projectMediaBuyCreativesForDelivery(request, wireMode = "canonical", op
|
|
|
936
996
|
}
|
|
937
997
|
return changed ? next : request;
|
|
938
998
|
}
|
|
939
|
-
function projectSyncCreativesForDelivery(request, selectorContainers, wireMode = "canonical", legacyFormatConverter, canonicalFormatLegacyResolver) {
|
|
999
|
+
function projectSyncCreativesForDelivery(request, selectorContainers, wireMode = "canonical", legacyFormatConverter, canonicalFormatLegacyResolver, legacyFormatDefinitions) {
|
|
940
1000
|
const requestRecord = record(request);
|
|
941
1001
|
if (!requestRecord || !Array.isArray(requestRecord.creatives)) {
|
|
942
1002
|
return request;
|
|
@@ -965,7 +1025,8 @@ function projectSyncCreativesForDelivery(request, selectorContainers, wireMode =
|
|
|
965
1025
|
wireMode,
|
|
966
1026
|
"sync_creatives",
|
|
967
1027
|
legacyFormatConverter,
|
|
968
|
-
canonicalFormatLegacyResolver
|
|
1028
|
+
canonicalFormatLegacyResolver,
|
|
1029
|
+
legacyFormatDefinitions
|
|
969
1030
|
);
|
|
970
1031
|
if (projected !== creativeValue) changed = true;
|
|
971
1032
|
return projected;
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
transferLegacyCreativeMetadata
|
|
13
13
|
} from "./legacy-metadata.mjs";
|
|
14
14
|
import { canonicalize as canonicalizeJson } from "../../utils/jcs.mjs";
|
|
15
|
+
import { lookupV1Format } from "./catalog.mjs";
|
|
15
16
|
function stripLegacyCreativeIdentity(value) {
|
|
16
17
|
const legacyTokens = /* @__PURE__ */ new Set();
|
|
17
18
|
const legacyUrlTokens = /* @__PURE__ */ new Set();
|
|
@@ -570,11 +571,55 @@ function selectLegacyRef(creative, container, canonicalFormatLegacyResolver, ope
|
|
|
570
571
|
matching = preferMostConstrainedLegacyCandidates(matching, creative);
|
|
571
572
|
return matching.length === 1 ? matching[0].ref : void 0;
|
|
572
573
|
}
|
|
573
|
-
function
|
|
574
|
+
function projectLegacyAssetKeys(assetsValue, definition) {
|
|
575
|
+
const assets = record(assetsValue);
|
|
576
|
+
if (!assets || !Array.isArray(definition?.assets)) return assetsValue;
|
|
577
|
+
const slots = definition.assets.filter((slot) => record(slot) !== void 0);
|
|
578
|
+
if (slots.some((slot) => slot.item_type !== void 0 && slot.item_type !== "individual")) return assetsValue;
|
|
579
|
+
const declaredIds = new Set(slots.map((slot) => slot.asset_id));
|
|
580
|
+
const availableSlots = slots.filter(
|
|
581
|
+
(slot) => (slot.item_type === void 0 || slot.item_type === "individual") && typeof slot.asset_id === "string" && slot.asset_id.length > 0 && !Object.hasOwn(assets, slot.asset_id)
|
|
582
|
+
);
|
|
583
|
+
const targetBySource = /* @__PURE__ */ new Map();
|
|
584
|
+
const sourcesByTarget = /* @__PURE__ */ new Map();
|
|
585
|
+
for (const [key, value] of Object.entries(assets)) {
|
|
586
|
+
if (declaredIds.has(key)) continue;
|
|
587
|
+
const asset = record(value);
|
|
588
|
+
if (!asset || typeof asset.asset_type !== "string") continue;
|
|
589
|
+
const matches = availableSlots.filter((slot) => {
|
|
590
|
+
if (slot.asset_type !== asset.asset_type) return false;
|
|
591
|
+
if (asset.asset_type === "url") {
|
|
592
|
+
return typeof asset.url_type === "string" && asset.url_type === slot.requirements?.url_type;
|
|
593
|
+
}
|
|
594
|
+
if (asset.asset_type === "pixel_tracker") {
|
|
595
|
+
return typeof asset.event === "string" && asset.event === slot.event && (asset.event !== "custom" || typeof asset.custom_event_name === "string" && asset.custom_event_name === slot.custom_event_name);
|
|
596
|
+
}
|
|
597
|
+
return true;
|
|
598
|
+
});
|
|
599
|
+
if (matches.length !== 1) continue;
|
|
600
|
+
const target = matches[0].asset_id;
|
|
601
|
+
targetBySource.set(key, target);
|
|
602
|
+
const sources = sourcesByTarget.get(target) ?? [];
|
|
603
|
+
sources.push(key);
|
|
604
|
+
sourcesByTarget.set(target, sources);
|
|
605
|
+
}
|
|
606
|
+
for (const sources of sourcesByTarget.values()) {
|
|
607
|
+
if (sources.length > 1) for (const source of sources) targetBySource.delete(source);
|
|
608
|
+
}
|
|
609
|
+
if (targetBySource.size === 0) return assetsValue;
|
|
610
|
+
return Object.fromEntries(Object.entries(assets).map(([key, value]) => [targetBySource.get(key) ?? key, value]));
|
|
611
|
+
}
|
|
612
|
+
function projectCreative(creative, formatId, legacyFormatDefinitions) {
|
|
574
613
|
const next = { ...creative };
|
|
575
614
|
delete next.format_kind;
|
|
576
615
|
delete next.format_option_ref;
|
|
577
616
|
next.format_id = { ...formatId };
|
|
617
|
+
const supplied = legacyFormatDefinitions?.filter((definition2) => {
|
|
618
|
+
const ref = legacyRef(record(definition2)?.format_id);
|
|
619
|
+
return ref !== void 0 && sameLegacyIdentity(ref, formatId);
|
|
620
|
+
});
|
|
621
|
+
const definition = supplied?.length ? supplied.length === 1 ? supplied[0] : void 0 : lookupV1Format(formatId);
|
|
622
|
+
if (Object.hasOwn(creative, "assets")) next.assets = projectLegacyAssetKeys(creative.assets, definition);
|
|
578
623
|
return next;
|
|
579
624
|
}
|
|
580
625
|
function dedupeLegacyRefs(refs) {
|
|
@@ -808,7 +853,7 @@ function canonicalizeCreative(creative, selectorContainer, operation, legacyForm
|
|
|
808
853
|
}
|
|
809
854
|
return next;
|
|
810
855
|
}
|
|
811
|
-
function projectCreativeForDelivery(creative, selectorContainer, wireMode = "canonical", operation = "creative_delivery", legacyFormatConverter, canonicalFormatLegacyResolver) {
|
|
856
|
+
function projectCreativeForDelivery(creative, selectorContainer, wireMode = "canonical", operation = "creative_delivery", legacyFormatConverter, canonicalFormatLegacyResolver, legacyFormatDefinitions) {
|
|
812
857
|
const inputRecord = creative;
|
|
813
858
|
const originalLegacyRef = legacyRef(inputRecord.format_id);
|
|
814
859
|
const creativeRecord = canonicalizeCreative(inputRecord, selectorContainer, operation, legacyFormatConverter);
|
|
@@ -816,7 +861,11 @@ function projectCreativeForDelivery(creative, selectorContainer, wireMode = "can
|
|
|
816
861
|
if (originalLegacyRef) {
|
|
817
862
|
const selectedOriginal = selectLegacyRef(inputRecord, selectorContainer, canonicalFormatLegacyResolver, operation);
|
|
818
863
|
if (selectedOriginal) {
|
|
819
|
-
return projectCreative(
|
|
864
|
+
return projectCreative(
|
|
865
|
+
creativeRecord,
|
|
866
|
+
selectedOriginal,
|
|
867
|
+
legacyFormatDefinitions
|
|
868
|
+
);
|
|
820
869
|
}
|
|
821
870
|
throw new CreativeFormatProjectionError(
|
|
822
871
|
operation,
|
|
@@ -825,7 +874,8 @@ function projectCreativeForDelivery(creative, selectorContainer, wireMode = "can
|
|
|
825
874
|
);
|
|
826
875
|
}
|
|
827
876
|
const formatId = selectLegacyRef(creativeRecord, selectorContainer, canonicalFormatLegacyResolver, operation);
|
|
828
|
-
if (formatId)
|
|
877
|
+
if (formatId)
|
|
878
|
+
return projectCreative(creativeRecord, formatId, legacyFormatDefinitions);
|
|
829
879
|
if (typeof creativeRecord.format_kind === "string") {
|
|
830
880
|
const creativeId = typeof creativeRecord.creative_id === "string" ? creativeRecord.creative_id : "(unknown)";
|
|
831
881
|
const allCandidates = candidatesFromContainer(selectorContainer, canonicalFormatLegacyResolver, operation);
|
|
@@ -860,10 +910,19 @@ function projectCreativeForDelivery(creative, selectorContainer, wireMode = "can
|
|
|
860
910
|
"canonical format legacy resolver returned an invalid or ambiguous creative mapping"
|
|
861
911
|
);
|
|
862
912
|
}
|
|
863
|
-
if (resolved)
|
|
913
|
+
if (resolved)
|
|
914
|
+
return projectCreative(
|
|
915
|
+
creativeRecord,
|
|
916
|
+
resolved[0],
|
|
917
|
+
legacyFormatDefinitions
|
|
918
|
+
);
|
|
864
919
|
const pinned = optionReference(creativeRecord.format_option_ref) !== void 0;
|
|
865
920
|
if (candidates.length === 1 && !pinned) {
|
|
866
|
-
return projectCreative(
|
|
921
|
+
return projectCreative(
|
|
922
|
+
creativeRecord,
|
|
923
|
+
candidates[0].ref,
|
|
924
|
+
legacyFormatDefinitions
|
|
925
|
+
);
|
|
867
926
|
}
|
|
868
927
|
if (candidates.length > 1) {
|
|
869
928
|
throw new CreativeFormatProjectionError(
|
|
@@ -877,7 +936,7 @@ function projectCreativeForDelivery(creative, selectorContainer, wireMode = "can
|
|
|
877
936
|
}
|
|
878
937
|
return creative;
|
|
879
938
|
}
|
|
880
|
-
function projectMediaBuyCreativesForDelivery(request, wireMode = "canonical", operation = "create_media_buy", legacyFormatConverter, canonicalFormatLegacyResolver) {
|
|
939
|
+
function projectMediaBuyCreativesForDelivery(request, wireMode = "canonical", operation = "create_media_buy", legacyFormatConverter, canonicalFormatLegacyResolver, legacyFormatDefinitions) {
|
|
881
940
|
const requestRecord = record(request);
|
|
882
941
|
if (!requestRecord) return request;
|
|
883
942
|
let changed = false;
|
|
@@ -897,7 +956,8 @@ function projectMediaBuyCreativesForDelivery(request, wireMode = "canonical", op
|
|
|
897
956
|
wireMode,
|
|
898
957
|
operation,
|
|
899
958
|
legacyFormatConverter,
|
|
900
|
-
canonicalFormatLegacyResolver
|
|
959
|
+
canonicalFormatLegacyResolver,
|
|
960
|
+
legacyFormatDefinitions
|
|
901
961
|
);
|
|
902
962
|
if (projected !== creativeValue) changed = true;
|
|
903
963
|
return projected;
|
|
@@ -915,7 +975,7 @@ function projectMediaBuyCreativesForDelivery(request, wireMode = "canonical", op
|
|
|
915
975
|
}
|
|
916
976
|
return changed ? next : request;
|
|
917
977
|
}
|
|
918
|
-
function projectSyncCreativesForDelivery(request, selectorContainers, wireMode = "canonical", legacyFormatConverter, canonicalFormatLegacyResolver) {
|
|
978
|
+
function projectSyncCreativesForDelivery(request, selectorContainers, wireMode = "canonical", legacyFormatConverter, canonicalFormatLegacyResolver, legacyFormatDefinitions) {
|
|
919
979
|
const requestRecord = record(request);
|
|
920
980
|
if (!requestRecord || !Array.isArray(requestRecord.creatives)) {
|
|
921
981
|
return request;
|
|
@@ -944,7 +1004,8 @@ function projectSyncCreativesForDelivery(request, selectorContainers, wireMode =
|
|
|
944
1004
|
wireMode,
|
|
945
1005
|
"sync_creatives",
|
|
946
1006
|
legacyFormatConverter,
|
|
947
|
-
canonicalFormatLegacyResolver
|
|
1007
|
+
canonicalFormatLegacyResolver,
|
|
1008
|
+
legacyFormatDefinitions
|
|
948
1009
|
);
|
|
949
1010
|
if (projected !== creativeValue) changed = true;
|
|
950
1011
|
return projected;
|
|
@@ -219,7 +219,8 @@ function projectFormatId(fid, productId, field, options) {
|
|
|
219
219
|
const exactCatalogEntry = (0, import_catalog.lookupV1Format)(fid, options?._catalogPath);
|
|
220
220
|
const canonicalAgentUrl = (0, import_resolve_agent_properties.canonicalizeAgentUrl)(fid.agent_url);
|
|
221
221
|
const mayUseUniqueAlias = canonicalAgentUrl !== null && new URL(canonicalAgentUrl).protocol === "https:" && !(0, import_address_guards.isLikelyPrivateUrl)(canonicalAgentUrl);
|
|
222
|
-
const
|
|
222
|
+
const aaoGuessesApply = options?._authoritativeOnly !== true || (0, import_catalog.isAaoAgentUrl)(fid.agent_url);
|
|
223
|
+
const uniqueAliasEntry = exactCatalogEntry === void 0 && mayUseUniqueAlias && aaoGuessesApply ? (0, import_catalog.lookupUniqueV1FormatById)(fid.id, options?._catalogPath) : void 0;
|
|
223
224
|
if (uniqueAliasEntry) {
|
|
224
225
|
const explicit = projectWithLegacyConverter(fid, productId, field, options?.legacyFormatConverter);
|
|
225
226
|
if (explicit) return explicit;
|
|
@@ -277,7 +278,7 @@ function projectFormatId(fid, productId, field, options) {
|
|
|
277
278
|
}
|
|
278
279
|
};
|
|
279
280
|
}
|
|
280
|
-
const globMatch = (0, import_registry.forwardLookupByGlob)(fid.id);
|
|
281
|
+
const globMatch = aaoGuessesApply ? (0, import_registry.forwardLookupByGlob)(fid.id) : void 0;
|
|
281
282
|
if (globMatch) {
|
|
282
283
|
return {
|
|
283
284
|
decl: {
|
|
@@ -4,7 +4,7 @@ import { createRequire as __adcpCreateRequire } from "node:module";
|
|
|
4
4
|
const __dirname = __adcpDirname(__adcpFileURLToPath(import.meta.url));
|
|
5
5
|
const require2 = __adcpCreateRequire(import.meta.url);
|
|
6
6
|
import { forwardLookupByGlob, forwardLookupByStructural } from "./registry.mjs";
|
|
7
|
-
import { lookupUniqueV1FormatById, lookupV1Format } from "./catalog.mjs";
|
|
7
|
+
import { isAaoAgentUrl, lookupUniqueV1FormatById, lookupV1Format } from "./catalog.mjs";
|
|
8
8
|
import { AAO_CANONICAL_AGENT_URL } from "./constants.mjs";
|
|
9
9
|
import { LIBRARY_VERSION } from "../../version.mjs";
|
|
10
10
|
import { legacyFormatConverterFromCatalogSnapshots } from "./catalog-snapshot.mjs";
|
|
@@ -202,7 +202,8 @@ function projectFormatId(fid, productId, field, options) {
|
|
|
202
202
|
const exactCatalogEntry = lookupV1Format(fid, options?._catalogPath);
|
|
203
203
|
const canonicalAgentUrl = canonicalizeAgentUrl(fid.agent_url);
|
|
204
204
|
const mayUseUniqueAlias = canonicalAgentUrl !== null && new URL(canonicalAgentUrl).protocol === "https:" && !isLikelyPrivateUrl(canonicalAgentUrl);
|
|
205
|
-
const
|
|
205
|
+
const aaoGuessesApply = options?._authoritativeOnly !== true || isAaoAgentUrl(fid.agent_url);
|
|
206
|
+
const uniqueAliasEntry = exactCatalogEntry === void 0 && mayUseUniqueAlias && aaoGuessesApply ? lookupUniqueV1FormatById(fid.id, options?._catalogPath) : void 0;
|
|
206
207
|
if (uniqueAliasEntry) {
|
|
207
208
|
const explicit = projectWithLegacyConverter(fid, productId, field, options?.legacyFormatConverter);
|
|
208
209
|
if (explicit) return explicit;
|
|
@@ -260,7 +261,7 @@ function projectFormatId(fid, productId, field, options) {
|
|
|
260
261
|
}
|
|
261
262
|
};
|
|
262
263
|
}
|
|
263
|
-
const globMatch = forwardLookupByGlob(fid.id);
|
|
264
|
+
const globMatch = aaoGuessesApply ? forwardLookupByGlob(fid.id) : void 0;
|
|
264
265
|
if (globMatch) {
|
|
265
266
|
return {
|
|
266
267
|
decl: {
|
package/dist/lib/version.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AdCP SDK library version
|
|
3
3
|
*/
|
|
4
|
-
export declare const LIBRARY_VERSION = "16.
|
|
4
|
+
export declare const LIBRARY_VERSION = "16.1.0";
|
|
5
5
|
/**
|
|
6
6
|
* AdCP specification version this library is built for
|
|
7
7
|
*/
|
|
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
|
|
|
33
33
|
* Full version information
|
|
34
34
|
*/
|
|
35
35
|
export declare const VERSION_INFO: {
|
|
36
|
-
readonly library: "16.
|
|
36
|
+
readonly library: "16.1.0";
|
|
37
37
|
readonly adcp: "3.2.5";
|
|
38
38
|
readonly compatibleVersions: readonly ["v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.1.25", "3.1.26", "3.1.27", "3.1.28", "3.1.29", "3.2.1", "3.2", "3.2.2", "3.2.3", "3.2.4", "3.2.5"];
|
|
39
|
-
readonly generatedAt: "2026-10-
|
|
39
|
+
readonly generatedAt: "2026-10-20T17:31:57.242Z";
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* Get the AdCP specification version this library is built for
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AdCP SDK library version
|
|
3
3
|
*/
|
|
4
|
-
export declare const LIBRARY_VERSION = "16.
|
|
4
|
+
export declare const LIBRARY_VERSION = "16.1.0";
|
|
5
5
|
/**
|
|
6
6
|
* AdCP specification version this library is built for
|
|
7
7
|
*/
|
|
@@ -33,10 +33,10 @@ export type AdcpVersion = (typeof COMPATIBLE_ADCP_VERSIONS)[number];
|
|
|
33
33
|
* Full version information
|
|
34
34
|
*/
|
|
35
35
|
export declare const VERSION_INFO: {
|
|
36
|
-
readonly library: "16.
|
|
36
|
+
readonly library: "16.1.0";
|
|
37
37
|
readonly adcp: "3.2.5";
|
|
38
38
|
readonly compatibleVersions: readonly ["v3", "3.0.0", "3.0", "3.0.1", "3.0.2", "3.0.3", "3.0.4", "3.0.5", "3.0.6", "3.0.7", "3.0.8", "3.0.9", "3.0.10", "3.0.11", "3.0.12", "3.0.13", "3.0.14", "3.0.15", "3.0.16", "3.0.17", "3.0.18", "3.0.19", "3.0.20", "3.0.21", "3.0.22", "3.0.23", "3.0.24", "3.0.25", "3.1.0", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.1.4", "3.1.5", "3.1.6", "3.1.7", "3.1.8", "3.1.9", "3.1.10", "3.1.11", "3.1.12", "3.1.13", "3.1.14", "3.1.15", "3.1.16", "3.1.17", "3.1.18", "3.1.19", "3.1.20", "3.1.21", "3.1.22", "3.1.23", "3.1.24", "3.1.25", "3.1.26", "3.1.27", "3.1.28", "3.1.29", "3.2.1", "3.2", "3.2.2", "3.2.3", "3.2.4", "3.2.5"];
|
|
39
|
-
readonly generatedAt: "2026-10-
|
|
39
|
+
readonly generatedAt: "2026-10-20T17:31:57.242Z";
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* Get the AdCP specification version this library is built for
|
package/dist/lib/version.js
CHANGED
|
@@ -31,7 +31,7 @@ __export(version_exports, {
|
|
|
31
31
|
toReleasePrecisionVersion: () => toReleasePrecisionVersion
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(version_exports);
|
|
34
|
-
const LIBRARY_VERSION = "16.
|
|
34
|
+
const LIBRARY_VERSION = "16.1.0";
|
|
35
35
|
const ADCP_VERSION = "3.2.5";
|
|
36
36
|
const ADCP_MAJOR_VERSION = 3;
|
|
37
37
|
const COMPATIBLE_ADCP_VERSIONS = [
|
|
@@ -102,10 +102,10 @@ const COMPATIBLE_ADCP_VERSIONS = [
|
|
|
102
102
|
"3.2.5"
|
|
103
103
|
];
|
|
104
104
|
const VERSION_INFO = {
|
|
105
|
-
library: "16.
|
|
105
|
+
library: "16.1.0",
|
|
106
106
|
adcp: "3.2.5",
|
|
107
107
|
compatibleVersions: COMPATIBLE_ADCP_VERSIONS,
|
|
108
|
-
generatedAt: "2026-10-
|
|
108
|
+
generatedAt: "2026-10-20T17:31:57.242Z"
|
|
109
109
|
};
|
|
110
110
|
function getAdcpVersion() {
|
|
111
111
|
return ADCP_VERSION;
|
package/dist/lib/version.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const LIBRARY_VERSION = "16.
|
|
1
|
+
const LIBRARY_VERSION = "16.1.0";
|
|
2
2
|
const ADCP_VERSION = "3.2.5";
|
|
3
3
|
const ADCP_MAJOR_VERSION = 3;
|
|
4
4
|
const COMPATIBLE_ADCP_VERSIONS = [
|
|
@@ -69,10 +69,10 @@ const COMPATIBLE_ADCP_VERSIONS = [
|
|
|
69
69
|
"3.2.5"
|
|
70
70
|
];
|
|
71
71
|
const VERSION_INFO = {
|
|
72
|
-
library: "16.
|
|
72
|
+
library: "16.1.0",
|
|
73
73
|
adcp: "3.2.5",
|
|
74
74
|
compatibleVersions: COMPATIBLE_ADCP_VERSIONS,
|
|
75
|
-
generatedAt: "2026-10-
|
|
75
|
+
generatedAt: "2026-10-20T17:31:57.242Z"
|
|
76
76
|
};
|
|
77
77
|
function getAdcpVersion() {
|
|
78
78
|
return ADCP_VERSION;
|
package/docs/TYPE-SUMMARY.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# AdCP Type Summary
|
|
2
2
|
|
|
3
|
-
> Generated at: 2026-10-
|
|
4
|
-
> @adcp/sdk v16.
|
|
3
|
+
> Generated at: 2026-10-20
|
|
4
|
+
> @adcp/sdk v16.1.0
|
|
5
5
|
|
|
6
6
|
Curated reference of the types that matter for using the AdCP client. For full generated types see `src/lib/types/tools.generated.ts` and `src/lib/types/core.generated.ts`.
|
|
7
7
|
|
|
@@ -95,6 +95,7 @@ interface AgentDiscoverySeed {
|
|
|
95
95
|
// client.invalidateDiscoveryCache(): Promise<void>; refresh after a seller change.
|
|
96
96
|
|
|
97
97
|
interface TaskOptions {
|
|
98
|
+
operationId?: string; // Stable caller correlation id (otherwise a UUID); not an idempotency key
|
|
98
99
|
skipStatusHandlers?: boolean; // Skip inline completion handlers, including continuations
|
|
99
100
|
timeout?: number; // Absolute whole-task deadline
|
|
100
101
|
signal?: AbortSignal; // Caller cancellation
|
|
@@ -106,6 +107,15 @@ interface TaskOptions {
|
|
|
106
107
|
// ...deadline, cancellation, transport, and conversation options...
|
|
107
108
|
}
|
|
108
109
|
|
|
110
|
+
// Resume observation of persisted seller work (SingleAgentClient or AgentClient).
|
|
111
|
+
// Save metadata.serverTaskId, metadata.taskName as taskType, and metadata.taskId as operationId.
|
|
112
|
+
const tracked = await agent.trackTask({ taskId: saved.serverTaskId, taskType: saved.taskType, operationId: saved.operationId });
|
|
113
|
+
await tracked.track(); // One status read; TaskInfo includes operationId and serverTaskId
|
|
114
|
+
await tracked.waitForCompletion(1000, signal); // Same polling path as submitted continuations
|
|
115
|
+
// No per-poll protocol activity. Terminal status_change carries operation_id and server_task_id.
|
|
116
|
+
// Local observation errors do not terminalize seller work. Matching identities can reattach on the same client.
|
|
117
|
+
// Results retain seller tool response shapes; tracking does not restore prior request context or handlers.
|
|
118
|
+
|
|
109
119
|
interface DeferredContinuation<T> {
|
|
110
120
|
token: string;
|
|
111
121
|
question?: string;
|
|
@@ -124,7 +124,24 @@ await agent.syncCreatives(
|
|
|
124
124
|
The same pure functions are available from the explicit
|
|
125
125
|
`@adcp/sdk/v2/projection` migration subpath for composition outside a client call:
|
|
126
126
|
`projectCreativeForDelivery()`, `projectMediaBuyCreativesForDelivery()`, and
|
|
127
|
-
`projectSyncCreativesForDelivery()`.
|
|
127
|
+
`projectSyncCreativesForDelivery()`.
|
|
128
|
+
|
|
129
|
+
When these helpers emit a legacy `format_id`, they also map assets to the
|
|
130
|
+
definition's `asset_id` keys. Definitions come from the bundled reference
|
|
131
|
+
catalog, or from an optional final `legacyFormatDefinitions` array supplied to
|
|
132
|
+
any of the three helpers. Caller definitions take precedence and must match
|
|
133
|
+
both the format agent URL and ID. No network lookup occurs during projection.
|
|
134
|
+
|
|
135
|
+
Existing declared asset keys keep their values. Other assets move only to one
|
|
136
|
+
unoccupied slot with the same `asset_type`; URL assets must also match
|
|
137
|
+
`requirements.url_type`, and pixel trackers must match the slot's `event`.
|
|
138
|
+
Custom tracker events also match `custom_event_name`. Definitions containing
|
|
139
|
+
repeatable groups retain all asset keys; projection does not infer group membership.
|
|
140
|
+
Unmatched assets, ambiguous matches, and assets competing for the same slot
|
|
141
|
+
keep their original keys. Unknown definitions leave assets unchanged. Canonical
|
|
142
|
+
delivery retains its asset keys, and projection never mutates the caller's data.
|
|
143
|
+
|
|
144
|
+
Capability resolution uses the client's
|
|
128
145
|
emitted wire release pin: AdCP 3.2+ is canonical by contract, 3.0 is legacy, and 3.1
|
|
129
146
|
checks the explicit `media_buy.features.canonical_creatives` declaration. A
|
|
130
147
|
3.1 peer without the feature is deliberately
|
|
@@ -44,7 +44,7 @@ If you are unsure about a symbol, read its TSDoc. An `@experimental` tag means i
|
|
|
44
44
|
|
|
45
45
|
## How the two packages line up
|
|
46
46
|
|
|
47
|
-
`@adcp/reporting-storage` declares `@adcp/sdk` as a **peer dependency** (`^16.0.0
|
|
47
|
+
`@adcp/reporting-storage` declares `@adcp/sdk` as a **peer dependency** (`^16.0.0` for SDK 16), not a dependency. The store, its errors and the handlers share types and symbol-keyed guards, so the host must hold one copy of `@adcp/sdk`. A change to a storage interface in the SDK ships with a matching storage release; the changeset for each says which pair to install. The cloud SDKs (`@aws-sdk/client-s3`, `@azure/storage-blob`, `@google-cloud/storage`) are optional peers of the storage package. `@adcp/sdk` does not import `@adcp/reporting-storage`, and a test and a lint rule keep it that way.
|
|
48
48
|
|
|
49
49
|
## How to pin
|
|
50
50
|
|
|
@@ -53,19 +53,19 @@ Pin the storage package with a tilde range. A caret range on a `0.x` version alr
|
|
|
53
53
|
```json
|
|
54
54
|
{
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@adcp/sdk": "^16.0.0
|
|
57
|
-
"@adcp/reporting-storage": "~0.1.0
|
|
56
|
+
"@adcp/sdk": "^16.0.0",
|
|
57
|
+
"@adcp/reporting-storage": "~0.1.0"
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
These pins select SDK 16 and storage 0.1 stable versions. A stable range such as `~0.1.0` does not match `0.1.0-beta.0`; migrate both packages from their beta pins together.
|
|
63
63
|
|
|
64
|
-
- `~0.1.0`
|
|
65
|
-
- An exact version (`"0.1.0
|
|
64
|
+
- `~0.1.0` takes patches only (recommended).
|
|
65
|
+
- An exact version (`"0.1.0"`) is stricter still.
|
|
66
66
|
- Read the changelog before widening to a new minor, and apply any migration it names.
|
|
67
67
|
|
|
68
|
-
`@adcp/sdk` itself can use a caret range as usual, because the SDK's own surface follows semver.
|
|
68
|
+
`@adcp/sdk` itself can use a caret range as usual, because the SDK's own surface follows semver. Install the stable pair with `npm install @adcp/sdk@^16.0.0 @adcp/reporting-storage@~0.1.0`. The storage API remains experimental under the policy above.
|
|
69
69
|
|
|
70
70
|
## Migrations
|
|
71
71
|
|
package/docs/llms.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Ad Context Protocol (AdCP)
|
|
2
2
|
|
|
3
|
-
> Generated at: 2026-10-
|
|
4
|
-
> Library: @adcp/sdk v16.
|
|
3
|
+
> Generated at: 2026-10-20
|
|
4
|
+
> Library: @adcp/sdk v16.1.0
|
|
5
5
|
> AdCP major version: 3
|
|
6
6
|
> Canonical URL: https://adcontextprotocol.github.io/adcp-client/llms.txt
|
|
7
7
|
> Note: the `Library` stamp reflects the package.json version at doc-generation time. The narrative below describes the surface that lands on the next-published minor — including any 6.7 helpers documented here ahead of the release tag.
|
|
@@ -13,7 +13,7 @@ AdCP is an open protocol for AI agents to buy, manage, and optimize advertising
|
|
|
13
13
|
|
|
14
14
|
## Start here: AdCP 3.2
|
|
15
15
|
|
|
16
|
-
The SDK requires Node.js `^20.19.0 || >=22.12.0`. Install this reference's release train with `npm install @adcp/sdk@
|
|
16
|
+
The SDK requires Node.js `^20.19.0 || >=22.12.0`. Install this reference's release train with `npm install @adcp/sdk@16.1`; use the documentation from the exact published SDK version you install. For reproducible CLI runs, pin that exact SDK version. After installation, `node -p "require('@adcp/sdk').ADCP_VERSION"` reports its protocol pin; `ls node_modules/@adcp/sdk/compliance/cache` lists its packaged compliance versions. The legacy `adcp-3.2` npm tag selects SDK 14 and does not receive the refreshed compliance caches.
|
|
17
17
|
|
|
18
18
|
The SDK is compact-lifecycle first: `list_products → buy_products → control_media_buy`, with `request_proposals → refine_proposals → accept_proposal` when terms need negotiation.
|
|
19
19
|
|