@adcp/sdk 17.0.0-beta.13 → 17.0.0-beta.15

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.
Files changed (64) hide show
  1. package/dist/lib/brand/index.d.mts +2 -0
  2. package/dist/lib/brand/index.d.ts +2 -0
  3. package/dist/lib/brand/index.js +3 -0
  4. package/dist/lib/brand/index.mjs +2 -0
  5. package/dist/lib/brand/selection.d.mts +13 -0
  6. package/dist/lib/brand/selection.d.ts +13 -0
  7. package/dist/lib/brand/selection.js +83 -0
  8. package/dist/lib/brand/selection.mjs +59 -0
  9. package/dist/lib/index.d.mts +2 -2
  10. package/dist/lib/index.d.ts +2 -2
  11. package/dist/lib/index.js +2 -0
  12. package/dist/lib/index.mjs +2 -0
  13. package/dist/lib/registry/types.d.mts +5 -0
  14. package/dist/lib/registry/types.d.ts +5 -0
  15. package/dist/lib/registry/types.generated.d.ts +4 -0
  16. package/dist/lib/server/decisioning/runtime/from-platform.js +12 -2
  17. package/dist/lib/server/decisioning/runtime/from-platform.mjs +12 -2
  18. package/dist/lib/server/test-controller.d.mts +9 -35
  19. package/dist/lib/server/test-controller.d.ts +9 -35
  20. package/dist/lib/server/test-controller.js +4 -0
  21. package/dist/lib/server/test-controller.mjs +4 -0
  22. package/dist/lib/testing/comply-controller.d.mts +7 -10
  23. package/dist/lib/testing/comply-controller.d.ts +7 -10
  24. package/dist/lib/testing/reporting/doctor.js +2 -1
  25. package/dist/lib/testing/reporting/doctor.mjs +2 -1
  26. package/dist/lib/testing/storyboard/account-policy.d.mts +42 -0
  27. package/dist/lib/testing/storyboard/account-policy.d.ts +42 -0
  28. package/dist/lib/testing/storyboard/account-policy.js +41 -2
  29. package/dist/lib/testing/storyboard/account-policy.mjs +38 -1
  30. package/dist/lib/testing/storyboard/path.d.mts +6 -0
  31. package/dist/lib/testing/storyboard/path.d.ts +6 -0
  32. package/dist/lib/testing/storyboard/path.js +22 -0
  33. package/dist/lib/testing/storyboard/path.mjs +21 -0
  34. package/dist/lib/testing/storyboard/request-builder.js +1 -1
  35. package/dist/lib/testing/storyboard/request-builder.mjs +1 -1
  36. package/dist/lib/testing/storyboard/runner.d.mts +1 -42
  37. package/dist/lib/testing/storyboard/runner.d.ts +1 -42
  38. package/dist/lib/testing/storyboard/runner.js +8 -38
  39. package/dist/lib/testing/storyboard/runner.mjs +5 -35
  40. package/dist/lib/testing/storyboard/seeding.js +152 -2
  41. package/dist/lib/testing/storyboard/seeding.mjs +152 -2
  42. package/dist/lib/testing/storyboard/types.d.mts +4 -2
  43. package/dist/lib/testing/storyboard/types.d.ts +4 -2
  44. package/dist/lib/testing/storyboard/types.js +1 -0
  45. package/dist/lib/testing/storyboard/types.mjs +1 -0
  46. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  47. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  48. package/dist/lib/testing/storyboard/validations.js +60 -1
  49. package/dist/lib/testing/storyboard/validations.mjs +61 -1
  50. package/dist/lib/v2/projection/creative-delivery.js +62 -16
  51. package/dist/lib/v2/projection/creative-delivery.mjs +62 -16
  52. package/dist/lib/version.d.mts +3 -3
  53. package/dist/lib/version.d.ts +3 -3
  54. package/dist/lib/version.js +3 -3
  55. package/dist/lib/version.mjs +3 -3
  56. package/docs/TYPE-SUMMARY.md +1 -1
  57. package/docs/guides/BRAND-ENTRY-SELECTION.md +56 -0
  58. package/docs/guides/REPORTING-LEDGER.md +142 -12
  59. package/docs/guides/REPORTING-OPERATIONS.md +18 -5
  60. package/docs/guides/VALIDATE-YOUR-AGENT.md +44 -0
  61. package/docs/llms.txt +1 -1
  62. package/docs/migration-14.x-rc-worksheet.md +4 -4
  63. package/docs/migration-reporting-row-storage-alignment.md +4 -2
  64. package/package.json +1 -1
@@ -2,6 +2,8 @@ import type { RegistryClient, SaveBrandResponse } from '../registry/index.mjs';
2
2
  import type { GetBrandIdentitySuccess } from '../types/core.generated.mjs';
3
3
  export { BrandDomainValidationError, isDevelopmentBrandDomain, validateBrandDomain } from './domain.mjs';
4
4
  export type { BrandDomainValidationCode, ValidateBrandDomainOptions } from './domain.mjs';
5
+ export { selectBrandEntry } from './selection.mjs';
6
+ export type { BrandEntrySelector } from './selection.mjs';
5
7
  export type BrandJsonRecord = Record<string, unknown>;
6
8
  type ProtocolBrandLogo = NonNullable<GetBrandIdentitySuccess['logos']>[number];
7
9
  export type BrandWebsiteAliasRelationship = 'owned';
@@ -2,6 +2,8 @@ import type { RegistryClient, SaveBrandResponse } from '../registry';
2
2
  import type { GetBrandIdentitySuccess } from '../types/core.generated';
3
3
  export { BrandDomainValidationError, isDevelopmentBrandDomain, validateBrandDomain } from './domain';
4
4
  export type { BrandDomainValidationCode, ValidateBrandDomainOptions } from './domain';
5
+ export { selectBrandEntry } from './selection';
6
+ export type { BrandEntrySelector } from './selection';
5
7
  export type BrandJsonRecord = Record<string, unknown>;
6
8
  type ProtocolBrandLogo = NonNullable<GetBrandIdentitySuccess['logos']>[number];
7
9
  export type BrandWebsiteAliasRelationship = 'owned';
@@ -25,6 +25,7 @@ __export(brand_exports, {
25
25
  extractBrandWebsiteAliasDomains: () => extractBrandWebsiteAliasDomains,
26
26
  extractBrandWebsiteAliases: () => extractBrandWebsiteAliases,
27
27
  isDevelopmentBrandDomain: () => import_domain.isDevelopmentBrandDomain,
28
+ selectBrandEntry: () => import_selection.selectBrandEntry,
28
29
  selectLogoForSlot: () => selectLogoForSlot,
29
30
  updateBrandJsonFromMappings: () => updateBrandJsonFromMappings,
30
31
  validateBrandAssetMappings: () => validateBrandAssetMappings,
@@ -32,6 +33,7 @@ __export(brand_exports, {
32
33
  });
33
34
  module.exports = __toCommonJS(brand_exports);
34
35
  var import_domain = require('./domain.js');
36
+ var import_selection = require('./selection.js');
35
37
  const COMMON_LOGO_SLOTS = [
36
38
  "logo_card_light",
37
39
  "logo_card_dark",
@@ -475,6 +477,7 @@ function readLocalizedName(value) {
475
477
  extractBrandWebsiteAliasDomains,
476
478
  extractBrandWebsiteAliases,
477
479
  isDevelopmentBrandDomain,
480
+ selectBrandEntry,
478
481
  selectLogoForSlot,
479
482
  updateBrandJsonFromMappings,
480
483
  validateBrandAssetMappings,
@@ -1,4 +1,5 @@
1
1
  import { BrandDomainValidationError, isDevelopmentBrandDomain, validateBrandDomain } from "./domain.mjs";
2
+ import { selectBrandEntry } from "./selection.mjs";
2
3
  const COMMON_LOGO_SLOTS = [
3
4
  "logo_card_light",
4
5
  "logo_card_dark",
@@ -441,6 +442,7 @@ export {
441
442
  extractBrandWebsiteAliasDomains,
442
443
  extractBrandWebsiteAliases,
443
444
  isDevelopmentBrandDomain,
445
+ selectBrandEntry,
444
446
  selectLogoForSlot,
445
447
  updateBrandJsonFromMappings,
446
448
  validateBrandAssetMappings,
@@ -0,0 +1,13 @@
1
+ export interface BrandEntrySelector {
2
+ domain: string;
3
+ /** An already-resolved portfolio ID, not a display name or domain alias. */
4
+ brandId?: string;
5
+ /** Additional house hostnames confirmed by the resolver's HTTPS redirect check. */
6
+ houseDomains?: Iterable<string>;
7
+ }
8
+ /**
9
+ * Select one complete brand entry without renaming localized/creative fields.
10
+ * This only inspects a document: it never follows pointers, extends trust,
11
+ * guesses from a name, or falls back to the first portfolio entry.
12
+ */
13
+ export declare function selectBrandEntry(document: unknown, domainOrSelector: string | BrandEntrySelector): Record<string, unknown> | undefined;
@@ -0,0 +1,13 @@
1
+ export interface BrandEntrySelector {
2
+ domain: string;
3
+ /** An already-resolved portfolio ID, not a display name or domain alias. */
4
+ brandId?: string;
5
+ /** Additional house hostnames confirmed by the resolver's HTTPS redirect check. */
6
+ houseDomains?: Iterable<string>;
7
+ }
8
+ /**
9
+ * Select one complete brand entry without renaming localized/creative fields.
10
+ * This only inspects a document: it never follows pointers, extends trust,
11
+ * guesses from a name, or falls back to the first portfolio entry.
12
+ */
13
+ export declare function selectBrandEntry(document: unknown, domainOrSelector: string | BrandEntrySelector): Record<string, unknown> | undefined;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var selection_exports = {};
20
+ __export(selection_exports, {
21
+ selectBrandEntry: () => selectBrandEntry
22
+ });
23
+ module.exports = __toCommonJS(selection_exports);
24
+ function isRecord(value) {
25
+ return value !== null && typeof value === "object" && !Array.isArray(value);
26
+ }
27
+ function isBrand(value) {
28
+ return isRecord(value) && typeof value.id === "string" && value.id.length > 0 && Array.isArray(value.names) && value.names.length > 0;
29
+ }
30
+ function publicEntry(brand) {
31
+ const entry = { ...brand };
32
+ delete entry.brand_context;
33
+ return entry;
34
+ }
35
+ function matchesDomain(brand, domain) {
36
+ if (typeof brand.url === "string") {
37
+ try {
38
+ const url = new URL(brand.url);
39
+ if ((url.protocol === "https:" || url.protocol === "http:") && url.hostname.toLowerCase() === domain) {
40
+ return true;
41
+ }
42
+ } catch {
43
+ }
44
+ }
45
+ return Array.isArray(brand.properties) && brand.properties.some(
46
+ (property) => isRecord(property) && property.type === "website" && typeof property.identifier === "string" && property.identifier.toLowerCase() === domain && (property.relationship === void 0 || property.relationship === "owned") && // Raw/cached documents may use the adagents.json compatibility field.
47
+ // A supplied delegation marker cannot establish owned brand identity.
48
+ property.delegation_type === void 0
49
+ );
50
+ }
51
+ function selectBrandEntry(document, domainOrSelector) {
52
+ const selector = typeof domainOrSelector === "string" ? { domain: domainOrSelector } : domainOrSelector;
53
+ if (!isRecord(document) || typeof document.authoritative_location === "string" || typeof document.house === "string")
54
+ return void 0;
55
+ if (isBrand(document) && !isRecord(document.house) && document.brands === void 0 && document.brand_refs === void 0) {
56
+ return selector.brandId === void 0 || document.id === selector.brandId ? publicEntry(document) : void 0;
57
+ }
58
+ if (!isRecord(document.house) || typeof document.house.domain !== "string") return void 0;
59
+ const brands = Array.isArray(document.brands) ? document.brands : [];
60
+ if (!brands.every(isBrand)) return void 0;
61
+ const pointers = Array.isArray(document.brand_refs) ? document.brand_refs : [];
62
+ const domain = selector.domain.toLowerCase();
63
+ const matches = selector.brandId === void 0 ? brands.filter((brand) => matchesDomain(brand, domain)) : brands.filter((brand) => brand.id === selector.brandId);
64
+ const pointerMatches = pointers.filter(
65
+ (pointer) => isRecord(pointer) && (selector.brandId === void 0 ? typeof pointer.domain === "string" && pointer.domain.toLowerCase() === domain : pointer.brand_id === selector.brandId)
66
+ );
67
+ if (matches.length + pointerMatches.length > 1) return void 0;
68
+ const match = matches[0];
69
+ if (matches.length === 1 && match) return publicEntry(match);
70
+ if (selector.brandId !== void 0 || pointerMatches.length > 0) return void 0;
71
+ const houseDomains = new Set([domain, ...selector.houseDomains ?? []].map((host) => host.toLowerCase()));
72
+ if (!houseDomains.has(document.house.domain.toLowerCase())) return void 0;
73
+ const masters = brands.filter((brand) => brand.keller_type === "master");
74
+ const master = masters[0];
75
+ if (masters.length === 1 && master) return publicEntry(master);
76
+ const soleBrand = brands[0];
77
+ if (masters.length === 0 && brands.length === 1 && pointers.length === 0 && soleBrand) return publicEntry(soleBrand);
78
+ return void 0;
79
+ }
80
+ // Annotate the CommonJS export names for ESM import in node:
81
+ 0 && (module.exports = {
82
+ selectBrandEntry
83
+ });
@@ -0,0 +1,59 @@
1
+ function isRecord(value) {
2
+ return value !== null && typeof value === "object" && !Array.isArray(value);
3
+ }
4
+ function isBrand(value) {
5
+ return isRecord(value) && typeof value.id === "string" && value.id.length > 0 && Array.isArray(value.names) && value.names.length > 0;
6
+ }
7
+ function publicEntry(brand) {
8
+ const entry = { ...brand };
9
+ delete entry.brand_context;
10
+ return entry;
11
+ }
12
+ function matchesDomain(brand, domain) {
13
+ if (typeof brand.url === "string") {
14
+ try {
15
+ const url = new URL(brand.url);
16
+ if ((url.protocol === "https:" || url.protocol === "http:") && url.hostname.toLowerCase() === domain) {
17
+ return true;
18
+ }
19
+ } catch {
20
+ }
21
+ }
22
+ return Array.isArray(brand.properties) && brand.properties.some(
23
+ (property) => isRecord(property) && property.type === "website" && typeof property.identifier === "string" && property.identifier.toLowerCase() === domain && (property.relationship === void 0 || property.relationship === "owned") && // Raw/cached documents may use the adagents.json compatibility field.
24
+ // A supplied delegation marker cannot establish owned brand identity.
25
+ property.delegation_type === void 0
26
+ );
27
+ }
28
+ function selectBrandEntry(document, domainOrSelector) {
29
+ const selector = typeof domainOrSelector === "string" ? { domain: domainOrSelector } : domainOrSelector;
30
+ if (!isRecord(document) || typeof document.authoritative_location === "string" || typeof document.house === "string")
31
+ return void 0;
32
+ if (isBrand(document) && !isRecord(document.house) && document.brands === void 0 && document.brand_refs === void 0) {
33
+ return selector.brandId === void 0 || document.id === selector.brandId ? publicEntry(document) : void 0;
34
+ }
35
+ if (!isRecord(document.house) || typeof document.house.domain !== "string") return void 0;
36
+ const brands = Array.isArray(document.brands) ? document.brands : [];
37
+ if (!brands.every(isBrand)) return void 0;
38
+ const pointers = Array.isArray(document.brand_refs) ? document.brand_refs : [];
39
+ const domain = selector.domain.toLowerCase();
40
+ const matches = selector.brandId === void 0 ? brands.filter((brand) => matchesDomain(brand, domain)) : brands.filter((brand) => brand.id === selector.brandId);
41
+ const pointerMatches = pointers.filter(
42
+ (pointer) => isRecord(pointer) && (selector.brandId === void 0 ? typeof pointer.domain === "string" && pointer.domain.toLowerCase() === domain : pointer.brand_id === selector.brandId)
43
+ );
44
+ if (matches.length + pointerMatches.length > 1) return void 0;
45
+ const match = matches[0];
46
+ if (matches.length === 1 && match) return publicEntry(match);
47
+ if (selector.brandId !== void 0 || pointerMatches.length > 0) return void 0;
48
+ const houseDomains = new Set([domain, ...selector.houseDomains ?? []].map((host) => host.toLowerCase()));
49
+ if (!houseDomains.has(document.house.domain.toLowerCase())) return void 0;
50
+ const masters = brands.filter((brand) => brand.keller_type === "master");
51
+ const master = masters[0];
52
+ if (masters.length === 1 && master) return publicEntry(master);
53
+ const soleBrand = brands[0];
54
+ if (masters.length === 0 && brands.length === 1 && pointers.length === 0 && soleBrand) return publicEntry(soleBrand);
55
+ return void 0;
56
+ }
57
+ export {
58
+ selectBrandEntry
59
+ };
@@ -4,8 +4,8 @@ export { RegistryClient, RegistryRequestError, isRegistryRequestError, RegistryS
4
4
  export type { RegistrySyncConfig, RegistrySyncState, RegistrySyncTransport, RegistrySyncEvents, AgentFilter, RegistrySyncProperty, CursorStore, PropertyRegistryConfig, FeedStreamQuery, FeedStreamMessage, FeedHeartbeat, FeedStreamErrorData, OpenFeedStreamOptions, FeedFreshness, } from './registry/index.mjs';
5
5
  export { openFeedStream, parseSseStream, sanitizeStreamText, DEFAULT_MAX_SSE_FRAME_BYTES, FeedStreamError, FeedStreamUnsupportedError, FeedStreamCursorExpiredError, FeedStreamHttpError, FeedStreamParseError, } from './registry/index.mjs';
6
6
  export type { ResolvedBrand, LookupBrandOptions, ResolvedProperty as ResolvedRegistryProperty, PropertyInfo, RegistryClientConfig, SaveBrandRequest, SaveBrandResponse, BrandLogoReviewStatus, ApprovedBrandLogoAsset, PendingBrandLogoAsset, ReviewedBrandLogoAsset, BrandLogoAsset, ListBrandLogosOptions, ListBrandLogosResponse, SaveBrandLogoInput, SaveBrandLogoResponse, UploadBrandLogoInput, UploadBrandLogoResponse, SavePropertyIdentity, RegistryPropertyIdentity, SavePropertyRequest, SavePropertyResponse, ResolveIdentifiersRequest, ResolveIdentifiersResponse, FileCatalogDisputeRequest, FileCatalogDisputeResponse, GetCatalogDisputeResponse, BrandRegistryItem, PropertyRegistryItem, ValidationResult as RegistryValidationResult, FederatedAgentWithDetails, FederatedPublisher, DomainLookupResult, ListBrandsOptions, ListBrandsResponse, GetBrandJsonResponse, ListOptions, ListAgentsOptions, ListAgentsResponse, ListPublishersResponse, ValidateAdagentsRequest, ValidateAdagentsResponse, CreateAdagentsRequest, CreateAdagentsResponse, AdagentsAuthorizedAgent, AdagentsCatalogFormat, AdagentsPlacementDefinition, AdagentsPlacementFormatReference, AdagentsPlacementFormatOption, AdagentsPlacementTag, CreatedAdagentsJson, CommunityMirrorAdagentsConfig, CreateCommunityMirrorAdagentsConfig, CommunityMirrorAdagentsCatalog, PublishCommunityMirrorAdagentsResponse, CommunityMirrorAdagentsSummary, ListCommunityMirrorAdagentsResponse, GetCommunityMirrorAdagentsResponse, PublishCommunityMirrorAdagentsRequest, PublishCommunityMirrorAdagentsError, DeleteCommunityMirrorAdagentsResponse, PublisherPropertySelector, CompanySearchResult, FindCompanyResult, ManagerRevalidationRequest, ManagerRevalidationResponse, ListPoliciesQuery, ListPoliciesResponse, ResolvePolicyQuery, ResolvePolicyResponse, ResolvePoliciesBulkRequest, ResolvePoliciesBulkResponse, GetPolicyHistoryQuery, GetPolicyHistoryResponse, SavePolicyRequest, SavePolicyResponse, GetBrandHistoryQuery, GetBrandHistoryResponse, GetPropertyHistoryQuery, GetPropertyHistoryResponse, RegistryFeedEvent, AgentEventPayload, PropertyEventPayload, CollectionEventPayload, AuthorizationEventPayload, PublisherEventPayload, BrandEventPayload, CatalogBrowseResponse, CatalogBrowseEntry, CatalogSyncResponse, CatalogSyncEntry, AgentCompliance, AgentComplianceDetail, StoryboardStatus, OperatorLookupResult, PublisherLookupResult, ComplianceChangedPayload, GetAgentStoryboardStatusResponse, GetAgentStoryboardStatusBulkResponse, } from './registry/index.mjs';
7
- export { COMMON_LOGO_SLOTS, BrandDomainValidationError, applyBrandAssetMappings, checkLogoSlotCoverage, extractBrandWebsiteAliasDomains, extractBrandWebsiteAliases, isDevelopmentBrandDomain, selectLogoForSlot, updateBrandJsonFromMappings, validateBrandAssetMappings, validateBrandDomain, } from './brand/index.mjs';
8
- export type { AppliedBrandAssetMapping, ApplyBrandAssetMappingsOptions, ApplyBrandAssetMappingsResult, BrandAssetCandidate, BrandAssetCropBox, BrandAssetExtractionMethod, BrandAssetMapping, BrandAssetMappingIssue, BrandAssetMappingTarget, BrandAssetMappingValidationResult, BrandAssetReviewStatus, BrandWebsiteAlias, BrandWebsiteAliasRelationship, BrandWebsiteAliasSource, BrandJsonRecord, BrandDomainValidationCode, BrandLogoBackground, BrandLogoOrientation, BrandLogoProposal, BrandLogoVariant, ExtractBrandWebsiteAliasesOptions, LogoSelectionOptions, LogoSlotCoverage, LogoSlotCoverageOptions, ResolveBrandAssetUrl, SkippedBrandAssetMapping, UpdateBrandJsonFromMappingsOptions, UpdateBrandJsonFromMappingsResult, ValidateBrandDomainOptions, } from './brand/index.mjs';
7
+ export { COMMON_LOGO_SLOTS, BrandDomainValidationError, applyBrandAssetMappings, checkLogoSlotCoverage, extractBrandWebsiteAliasDomains, extractBrandWebsiteAliases, isDevelopmentBrandDomain, selectBrandEntry, selectLogoForSlot, updateBrandJsonFromMappings, validateBrandAssetMappings, validateBrandDomain, } from './brand/index.mjs';
8
+ export type { AppliedBrandAssetMapping, ApplyBrandAssetMappingsOptions, ApplyBrandAssetMappingsResult, BrandAssetCandidate, BrandAssetCropBox, BrandAssetExtractionMethod, BrandAssetMapping, BrandAssetMappingIssue, BrandAssetMappingTarget, BrandAssetMappingValidationResult, BrandAssetReviewStatus, BrandWebsiteAlias, BrandWebsiteAliasRelationship, BrandWebsiteAliasSource, BrandJsonRecord, BrandEntrySelector, BrandDomainValidationCode, BrandLogoBackground, BrandLogoOrientation, BrandLogoProposal, BrandLogoVariant, ExtractBrandWebsiteAliasesOptions, LogoSelectionOptions, LogoSlotCoverage, LogoSlotCoverageOptions, ResolveBrandAssetUrl, SkippedBrandAssetMapping, UpdateBrandJsonFromMappingsOptions, UpdateBrandJsonFromMappingsResult, ValidateBrandDomainOptions, } from './brand/index.mjs';
9
9
  export { PropertyIndex, getPropertyIndex, resetPropertyIndex, type PropertyMatch, type AgentAuthorization, } from './discovery/property-index.mjs';
10
10
  export { PropertyCrawler, type AgentInfo, type CrawlResult, type PropertyCrawlerConfig, } from './discovery/property-crawler.mjs';
11
11
  export { NetworkConsistencyChecker, type NetworkConsistencyCheckerConfig, type NetworkCheckReport, type CheckSummary, type CheckProgress, type OrphanedPointer, type StalePointer, type MissingPointer, type SchemaError, type AgentHealthResult, type DomainDetail, type DomainStatus, } from './discovery/network-consistency-checker.mjs';
@@ -4,8 +4,8 @@ export { RegistryClient, RegistryRequestError, isRegistryRequestError, RegistryS
4
4
  export type { RegistrySyncConfig, RegistrySyncState, RegistrySyncTransport, RegistrySyncEvents, AgentFilter, RegistrySyncProperty, CursorStore, PropertyRegistryConfig, FeedStreamQuery, FeedStreamMessage, FeedHeartbeat, FeedStreamErrorData, OpenFeedStreamOptions, FeedFreshness, } from './registry';
5
5
  export { openFeedStream, parseSseStream, sanitizeStreamText, DEFAULT_MAX_SSE_FRAME_BYTES, FeedStreamError, FeedStreamUnsupportedError, FeedStreamCursorExpiredError, FeedStreamHttpError, FeedStreamParseError, } from './registry';
6
6
  export type { ResolvedBrand, LookupBrandOptions, ResolvedProperty as ResolvedRegistryProperty, PropertyInfo, RegistryClientConfig, SaveBrandRequest, SaveBrandResponse, BrandLogoReviewStatus, ApprovedBrandLogoAsset, PendingBrandLogoAsset, ReviewedBrandLogoAsset, BrandLogoAsset, ListBrandLogosOptions, ListBrandLogosResponse, SaveBrandLogoInput, SaveBrandLogoResponse, UploadBrandLogoInput, UploadBrandLogoResponse, SavePropertyIdentity, RegistryPropertyIdentity, SavePropertyRequest, SavePropertyResponse, ResolveIdentifiersRequest, ResolveIdentifiersResponse, FileCatalogDisputeRequest, FileCatalogDisputeResponse, GetCatalogDisputeResponse, BrandRegistryItem, PropertyRegistryItem, ValidationResult as RegistryValidationResult, FederatedAgentWithDetails, FederatedPublisher, DomainLookupResult, ListBrandsOptions, ListBrandsResponse, GetBrandJsonResponse, ListOptions, ListAgentsOptions, ListAgentsResponse, ListPublishersResponse, ValidateAdagentsRequest, ValidateAdagentsResponse, CreateAdagentsRequest, CreateAdagentsResponse, AdagentsAuthorizedAgent, AdagentsCatalogFormat, AdagentsPlacementDefinition, AdagentsPlacementFormatReference, AdagentsPlacementFormatOption, AdagentsPlacementTag, CreatedAdagentsJson, CommunityMirrorAdagentsConfig, CreateCommunityMirrorAdagentsConfig, CommunityMirrorAdagentsCatalog, PublishCommunityMirrorAdagentsResponse, CommunityMirrorAdagentsSummary, ListCommunityMirrorAdagentsResponse, GetCommunityMirrorAdagentsResponse, PublishCommunityMirrorAdagentsRequest, PublishCommunityMirrorAdagentsError, DeleteCommunityMirrorAdagentsResponse, PublisherPropertySelector, CompanySearchResult, FindCompanyResult, ManagerRevalidationRequest, ManagerRevalidationResponse, ListPoliciesQuery, ListPoliciesResponse, ResolvePolicyQuery, ResolvePolicyResponse, ResolvePoliciesBulkRequest, ResolvePoliciesBulkResponse, GetPolicyHistoryQuery, GetPolicyHistoryResponse, SavePolicyRequest, SavePolicyResponse, GetBrandHistoryQuery, GetBrandHistoryResponse, GetPropertyHistoryQuery, GetPropertyHistoryResponse, RegistryFeedEvent, AgentEventPayload, PropertyEventPayload, CollectionEventPayload, AuthorizationEventPayload, PublisherEventPayload, BrandEventPayload, CatalogBrowseResponse, CatalogBrowseEntry, CatalogSyncResponse, CatalogSyncEntry, AgentCompliance, AgentComplianceDetail, StoryboardStatus, OperatorLookupResult, PublisherLookupResult, ComplianceChangedPayload, GetAgentStoryboardStatusResponse, GetAgentStoryboardStatusBulkResponse, } from './registry';
7
- export { COMMON_LOGO_SLOTS, BrandDomainValidationError, applyBrandAssetMappings, checkLogoSlotCoverage, extractBrandWebsiteAliasDomains, extractBrandWebsiteAliases, isDevelopmentBrandDomain, selectLogoForSlot, updateBrandJsonFromMappings, validateBrandAssetMappings, validateBrandDomain, } from './brand';
8
- export type { AppliedBrandAssetMapping, ApplyBrandAssetMappingsOptions, ApplyBrandAssetMappingsResult, BrandAssetCandidate, BrandAssetCropBox, BrandAssetExtractionMethod, BrandAssetMapping, BrandAssetMappingIssue, BrandAssetMappingTarget, BrandAssetMappingValidationResult, BrandAssetReviewStatus, BrandWebsiteAlias, BrandWebsiteAliasRelationship, BrandWebsiteAliasSource, BrandJsonRecord, BrandDomainValidationCode, BrandLogoBackground, BrandLogoOrientation, BrandLogoProposal, BrandLogoVariant, ExtractBrandWebsiteAliasesOptions, LogoSelectionOptions, LogoSlotCoverage, LogoSlotCoverageOptions, ResolveBrandAssetUrl, SkippedBrandAssetMapping, UpdateBrandJsonFromMappingsOptions, UpdateBrandJsonFromMappingsResult, ValidateBrandDomainOptions, } from './brand';
7
+ export { COMMON_LOGO_SLOTS, BrandDomainValidationError, applyBrandAssetMappings, checkLogoSlotCoverage, extractBrandWebsiteAliasDomains, extractBrandWebsiteAliases, isDevelopmentBrandDomain, selectBrandEntry, selectLogoForSlot, updateBrandJsonFromMappings, validateBrandAssetMappings, validateBrandDomain, } from './brand';
8
+ export type { AppliedBrandAssetMapping, ApplyBrandAssetMappingsOptions, ApplyBrandAssetMappingsResult, BrandAssetCandidate, BrandAssetCropBox, BrandAssetExtractionMethod, BrandAssetMapping, BrandAssetMappingIssue, BrandAssetMappingTarget, BrandAssetMappingValidationResult, BrandAssetReviewStatus, BrandWebsiteAlias, BrandWebsiteAliasRelationship, BrandWebsiteAliasSource, BrandJsonRecord, BrandEntrySelector, BrandDomainValidationCode, BrandLogoBackground, BrandLogoOrientation, BrandLogoProposal, BrandLogoVariant, ExtractBrandWebsiteAliasesOptions, LogoSelectionOptions, LogoSlotCoverage, LogoSlotCoverageOptions, ResolveBrandAssetUrl, SkippedBrandAssetMapping, UpdateBrandJsonFromMappingsOptions, UpdateBrandJsonFromMappingsResult, ValidateBrandDomainOptions, } from './brand';
9
9
  export { PropertyIndex, getPropertyIndex, resetPropertyIndex, type PropertyMatch, type AgentAuthorization, } from './discovery/property-index';
10
10
  export { PropertyCrawler, type AgentInfo, type CrawlResult, type PropertyCrawlerConfig, } from './discovery/property-crawler';
11
11
  export { NetworkConsistencyChecker, type NetworkConsistencyCheckerConfig, type NetworkCheckReport, type CheckSummary, type CheckProgress, type OrphanedPointer, type StalePointer, type MissingPointer, type SchemaError, type AgentHealthResult, type DomainDetail, type DomainStatus, } from './discovery/network-consistency-checker';
package/dist/lib/index.js CHANGED
@@ -662,6 +662,7 @@ __export(index_exports, {
662
662
  scheduledMediaBuyDeliveryNotification: () => import_media_buy_delivery_notification_builders.scheduledMediaBuyDeliveryNotification,
663
663
  scopedStore: () => import_server.scopedStore,
664
664
  segmentIdActivationKey: () => import_activation_key_builders.segmentIdActivationKey,
665
+ selectBrandEntry: () => import_brand.selectBrandEntry,
665
666
  selectLogoForSlot: () => import_brand.selectLogoForSlot,
666
667
  sellerAdvertises31: () => import_adcp_version_config.sellerAdvertises31,
667
668
  serve: () => import_server.serve,
@@ -1530,6 +1531,7 @@ function createAdCPClientFromEnv() {
1530
1531
  scheduledMediaBuyDeliveryNotification,
1531
1532
  scopedStore,
1532
1533
  segmentIdActivationKey,
1534
+ selectBrandEntry,
1533
1535
  selectLogoForSlot,
1534
1536
  sellerAdvertises31,
1535
1537
  serve,
@@ -28,6 +28,7 @@ import {
28
28
  extractBrandWebsiteAliasDomains,
29
29
  extractBrandWebsiteAliases,
30
30
  isDevelopmentBrandDomain,
31
+ selectBrandEntry,
31
32
  selectLogoForSlot,
32
33
  updateBrandJsonFromMappings,
33
34
  validateBrandAssetMappings,
@@ -1489,6 +1490,7 @@ export {
1489
1490
  scheduledMediaBuyDeliveryNotification,
1490
1491
  scopedStore,
1491
1492
  segmentIdActivationKey,
1493
+ selectBrandEntry,
1492
1494
  selectLogoForSlot,
1493
1495
  sellerAdvertises31,
1494
1496
  serve,
@@ -70,6 +70,11 @@ export type FeedResponse = Omit<GeneratedFeedResponse, 'events'> & {
70
70
  */
71
71
  export interface ResolvedBrand extends Omit<GeneratedResolvedBrand, 'parent_brand'> {
72
72
  parent_brand?: string;
73
+ /** Complete selected brand.json entry from the response's winning identity source.
74
+ * Absent on older registries or when a unique entry is unavailable; never
75
+ * infer a brand/house authorization relationship from this convenience field.
76
+ */
77
+ brand?: Record<string, unknown>;
73
78
  /**
74
79
  * @deprecated Legacy caller-facing trust tier from registry versions before
75
80
  * `source` and `relationship_trust`. Modern registry responses may omit
@@ -70,6 +70,11 @@ export type FeedResponse = Omit<GeneratedFeedResponse, 'events'> & {
70
70
  */
71
71
  export interface ResolvedBrand extends Omit<GeneratedResolvedBrand, 'parent_brand'> {
72
72
  parent_brand?: string;
73
+ /** Complete selected brand.json entry from the response's winning identity source.
74
+ * Absent on older registries or when a unique entry is unavailable; never
75
+ * infer a brand/house authorization relationship from this convenience field.
76
+ */
77
+ brand?: Record<string, unknown>;
73
78
  /**
74
79
  * @deprecated Legacy caller-facing trust tier from registry versions before
75
80
  * `source` and `relationship_trust`. Modern registry responses may omit
@@ -2349,6 +2349,10 @@ export interface components {
2349
2349
  brand_manifest?: {
2350
2350
  [key: string]: unknown;
2351
2351
  };
2352
+ /** @description Complete brand entry selected from the same source as this response, retaining brand.json field shapes including localized names, tagline, fonts, colors, and tone. A portfolio contributes only the uniquely selected inline entry; a canonical document contributes the brand document itself. Absent for unresolved/ambiguous entries and agent-only or unexpanded pointer documents. Existing brand_manifest semantics are unchanged; brand is identity data, not additional relationship authorization. */
2353
+ brand?: {
2354
+ [key: string]: unknown;
2355
+ };
2352
2356
  /**
2353
2357
  * @description Provenance of the selected record, not relationship authorization. Deterministic precedence is `hosted` > `brand_json` > `community` > `enriched` > `stub`; normal reads prefer the durable stored winner on a source tie, while `fresh=true` lets a successful live origin read win a tie. `brand_json`: the domain's own /.well-known/brand.json. `hosted`: registered by an owner whose control of the domain was verified. `community`: contributed by a member. `enriched`: third-party enrichment. `stub`: a minimal organization-derived placeholder awaiting stronger evidence.
2354
2358
  * @enum {string}
@@ -59,6 +59,7 @@ var import_task_registry = require('./task-registry.js');
59
59
  var import_protocol_for_tool = require('./protocol-for-tool.js');
60
60
  var import_status_changes = require('../status-changes.js');
61
61
  var import_comply_controller = require('../../../testing/comply-controller.js');
62
+ var import_test_controller = require('../../test-controller.js');
62
63
  var import_seed_merge = require('../../../testing/seed-merge.js');
63
64
  var import_adcp_server = require('../../adcp-server.js');
64
65
  var import_account_mode = require('../../account-mode.js');
@@ -2079,7 +2080,10 @@ function createAdcpServerFromPlatform(platform, opts) {
2079
2080
  "[adcp/auto-seed] seed_product fired without `account.account_id`; dropping write. Verify the request envelope carries an account ref and the sandboxGate is configured correctly.",
2080
2081
  { product_id: params.product_id }
2081
2082
  );
2082
- return;
2083
+ throw new import_test_controller.TestControllerError(
2084
+ "INVALID_PARAMS",
2085
+ "seed_product requires a resolved sandbox account; no fixture was written"
2086
+ );
2083
2087
  }
2084
2088
  autoSeedStoreFor(autoSeedStore, accountId).set(params.product_id, {
2085
2089
  ...params.fixture,
@@ -2095,7 +2099,10 @@ function createAdcpServerFromPlatform(platform, opts) {
2095
2099
  "[adcp/auto-seed] seed_pricing_option fired without `account.account_id`; dropping write. Verify the request envelope carries an account ref and the sandboxGate is configured correctly.",
2096
2100
  { product_id: params.product_id, pricing_option_id: params.pricing_option_id }
2097
2101
  );
2098
- return;
2102
+ throw new import_test_controller.TestControllerError(
2103
+ "INVALID_PARAMS",
2104
+ "seed_pricing_option requires a resolved sandbox account; no fixture was written"
2105
+ );
2099
2106
  }
2100
2107
  const accountStore = autoSeedStoreFor(autoSeedStore, accountId);
2101
2108
  const existing = accountStore.get(params.product_id);
@@ -2124,6 +2131,9 @@ function createAdcpServerFromPlatform(platform, opts) {
2124
2131
  account_id: import_zod.z.string().min(1).optional(),
2125
2132
  brand: import_zod.z.unknown().optional(),
2126
2133
  operator: import_zod.z.string().optional(),
2134
+ operator_unit: import_zod.z.unknown().optional(),
2135
+ currency: import_zod.z.string().optional(),
2136
+ timezone: import_zod.z.string().optional(),
2127
2137
  sandbox: import_zod.z.boolean().optional()
2128
2138
  }).strict().optional()
2129
2139
  };
@@ -92,6 +92,7 @@ import {
92
92
  _handleComplyControllerWithResolvedAuthority,
93
93
  createComplyController
94
94
  } from "../../../testing/comply-controller.mjs";
95
+ import { TestControllerError } from "../../test-controller.mjs";
95
96
  import { mergeSeedProduct } from "../../../testing/seed-merge.mjs";
96
97
  import {
97
98
  getSdkServer,
@@ -2111,7 +2112,10 @@ function createAdcpServerFromPlatform(platform, opts) {
2111
2112
  "[adcp/auto-seed] seed_product fired without `account.account_id`; dropping write. Verify the request envelope carries an account ref and the sandboxGate is configured correctly.",
2112
2113
  { product_id: params.product_id }
2113
2114
  );
2114
- return;
2115
+ throw new TestControllerError(
2116
+ "INVALID_PARAMS",
2117
+ "seed_product requires a resolved sandbox account; no fixture was written"
2118
+ );
2115
2119
  }
2116
2120
  autoSeedStoreFor(autoSeedStore, accountId).set(params.product_id, {
2117
2121
  ...params.fixture,
@@ -2127,7 +2131,10 @@ function createAdcpServerFromPlatform(platform, opts) {
2127
2131
  "[adcp/auto-seed] seed_pricing_option fired without `account.account_id`; dropping write. Verify the request envelope carries an account ref and the sandboxGate is configured correctly.",
2128
2132
  { product_id: params.product_id, pricing_option_id: params.pricing_option_id }
2129
2133
  );
2130
- return;
2134
+ throw new TestControllerError(
2135
+ "INVALID_PARAMS",
2136
+ "seed_pricing_option requires a resolved sandbox account; no fixture was written"
2137
+ );
2131
2138
  }
2132
2139
  const accountStore = autoSeedStoreFor(autoSeedStore, accountId);
2133
2140
  const existing = accountStore.get(params.product_id);
@@ -2156,6 +2163,9 @@ function createAdcpServerFromPlatform(platform, opts) {
2156
2163
  account_id: z.string().min(1).optional(),
2157
2164
  brand: z.unknown().optional(),
2158
2165
  operator: z.string().optional(),
2166
+ operator_unit: z.unknown().optional(),
2167
+ currency: z.string().optional(),
2168
+ timezone: z.string().optional(),
2159
2169
  sandbox: z.boolean().optional()
2160
2170
  }).strict().optional()
2161
2171
  };
@@ -593,43 +593,17 @@ export declare function toMcpResponse(data: ComplyTestControllerResponse): McpTo
593
593
  * the `inputSchema` argument to `server.registerTool(...)` in custom wrappers
594
594
  * so the request shape stays in sync with {@link registerTestController}.
595
595
  *
596
- * Matches `ComplyTestControllerRequest` from the generated schema: `scenario`
597
- * (required), `params` (scenario-specific), and the universal `context` / `ext`
598
- * envelope fields. No top-level `account` or `brand` — AdCP routes account
599
- * and brand context through `context` on this tool.
600
- *
601
- * **Extending for vendor fields.** Custom wrappers that carry tenant or
602
- * account references in top-level fields can extend the shape locally.
603
- * Those buyer-supplied fields are identifiers only: resolve them through a
604
- * trusted server-side account resolver before making authorization decisions.
605
- * Both `account` and `brand` are commonly added — storyboard fixtures and
606
- * v5-shaped wrappers often send them alongside `params`:
607
- *
608
- * ```ts
609
- * const MY_SHAPE = {
610
- * ...TOOL_INPUT_SHAPE,
611
- * account: z.object({ account_id: z.string() }).passthrough().optional(),
612
- * brand: z.object({ domain: z.string() }).passthrough().optional(),
613
- * };
614
- * server.registerTool(
615
- * 'comply_test_controller',
616
- * { description: 'Sandbox only.', inputSchema: MY_SHAPE },
617
- * async input => {
618
- * const account = await accounts.resolve(input.account, trustedRequestContext());
619
- * if (!isSandboxOrMockAccount(account)) return toMcpResponse({ ... });
620
- * return toMcpResponse(await handleTestControllerRequest(store, input as Record<string, unknown>));
621
- * }
622
- * );
623
- * ```
624
- *
625
- * Adopters routing through `createAdcpServerFromPlatform(platform, { complyTest })`
626
- * pass the same fields via `complyTest.inputSchema` (see
627
- * `ComplyControllerConfig.inputSchema` in `@adcp/sdk/testing`).
628
- *
629
- * This keeps the default registration protocol-compliant while giving
630
- * wrapper authors a documented extension point.
596
+ * Matches the controller request's required sandbox assertion. The account
597
+ * object is open in the protocol: preserve complete natural account identity
598
+ * or an opaque account_id so a per-request store factory can resolve it.
599
+ * The assertion is caller intent, not sandbox authority. Resolve and authorize
600
+ * the supplied identity against trusted persisted state before making writes.
601
+ * Custom wrappers can extend the remaining top-level shape for vendor fields.
631
602
  */
632
603
  export declare const TOOL_INPUT_SHAPE: {
604
+ account: z.ZodObject<{
605
+ sandbox: z.ZodLiteral<true>;
606
+ }, z.core.$loose>;
633
607
  scenario: z.ZodString;
634
608
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
635
609
  context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -593,43 +593,17 @@ export declare function toMcpResponse(data: ComplyTestControllerResponse): McpTo
593
593
  * the `inputSchema` argument to `server.registerTool(...)` in custom wrappers
594
594
  * so the request shape stays in sync with {@link registerTestController}.
595
595
  *
596
- * Matches `ComplyTestControllerRequest` from the generated schema: `scenario`
597
- * (required), `params` (scenario-specific), and the universal `context` / `ext`
598
- * envelope fields. No top-level `account` or `brand` — AdCP routes account
599
- * and brand context through `context` on this tool.
600
- *
601
- * **Extending for vendor fields.** Custom wrappers that carry tenant or
602
- * account references in top-level fields can extend the shape locally.
603
- * Those buyer-supplied fields are identifiers only: resolve them through a
604
- * trusted server-side account resolver before making authorization decisions.
605
- * Both `account` and `brand` are commonly added — storyboard fixtures and
606
- * v5-shaped wrappers often send them alongside `params`:
607
- *
608
- * ```ts
609
- * const MY_SHAPE = {
610
- * ...TOOL_INPUT_SHAPE,
611
- * account: z.object({ account_id: z.string() }).passthrough().optional(),
612
- * brand: z.object({ domain: z.string() }).passthrough().optional(),
613
- * };
614
- * server.registerTool(
615
- * 'comply_test_controller',
616
- * { description: 'Sandbox only.', inputSchema: MY_SHAPE },
617
- * async input => {
618
- * const account = await accounts.resolve(input.account, trustedRequestContext());
619
- * if (!isSandboxOrMockAccount(account)) return toMcpResponse({ ... });
620
- * return toMcpResponse(await handleTestControllerRequest(store, input as Record<string, unknown>));
621
- * }
622
- * );
623
- * ```
624
- *
625
- * Adopters routing through `createAdcpServerFromPlatform(platform, { complyTest })`
626
- * pass the same fields via `complyTest.inputSchema` (see
627
- * `ComplyControllerConfig.inputSchema` in `@adcp/sdk/testing`).
628
- *
629
- * This keeps the default registration protocol-compliant while giving
630
- * wrapper authors a documented extension point.
596
+ * Matches the controller request's required sandbox assertion. The account
597
+ * object is open in the protocol: preserve complete natural account identity
598
+ * or an opaque account_id so a per-request store factory can resolve it.
599
+ * The assertion is caller intent, not sandbox authority. Resolve and authorize
600
+ * the supplied identity against trusted persisted state before making writes.
601
+ * Custom wrappers can extend the remaining top-level shape for vendor fields.
631
602
  */
632
603
  export declare const TOOL_INPUT_SHAPE: {
604
+ account: z.ZodObject<{
605
+ sandbox: z.ZodLiteral<true>;
606
+ }, z.core.$loose>;
633
607
  scenario: z.ZodString;
634
608
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
635
609
  context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -269,6 +269,9 @@ function makeSeedCacheScope(input) {
269
269
  `account_ref:${canonicalJson({
270
270
  ...accountRef.brand !== void 0 && { brand: accountRef.brand },
271
271
  ...accountRef.operator !== void 0 && { operator: accountRef.operator },
272
+ ...accountRef.operator_unit !== void 0 && { operator_unit: accountRef.operator_unit },
273
+ ...accountRef.currency !== void 0 && { currency: accountRef.currency },
274
+ ...accountRef.timezone !== void 0 && { timezone: accountRef.timezone },
272
275
  ...accountRef.sandbox !== void 0 && { sandbox: accountRef.sandbox }
273
276
  })}`
274
277
  );
@@ -870,6 +873,7 @@ function toMcpResponse(data) {
870
873
  };
871
874
  }
872
875
  const TOOL_INPUT_SHAPE = {
876
+ account: import_zod.z.object({ sandbox: import_zod.z.literal(true) }).passthrough().describe("Sandbox account assertion and complete routing identity; verify sandbox status against persisted state"),
873
877
  scenario: import_zod.z.string().describe("Scenario to execute (e.g., list_scenarios, force_account_status)"),
874
878
  params: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional().describe("Scenario-specific parameters"),
875
879
  context: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional().describe("AdCP context object"),
@@ -238,6 +238,9 @@ function makeSeedCacheScope(input) {
238
238
  `account_ref:${canonicalJson({
239
239
  ...accountRef.brand !== void 0 && { brand: accountRef.brand },
240
240
  ...accountRef.operator !== void 0 && { operator: accountRef.operator },
241
+ ...accountRef.operator_unit !== void 0 && { operator_unit: accountRef.operator_unit },
242
+ ...accountRef.currency !== void 0 && { currency: accountRef.currency },
243
+ ...accountRef.timezone !== void 0 && { timezone: accountRef.timezone },
241
244
  ...accountRef.sandbox !== void 0 && { sandbox: accountRef.sandbox }
242
245
  })}`
243
246
  );
@@ -839,6 +842,7 @@ function toMcpResponse(data) {
839
842
  };
840
843
  }
841
844
  const TOOL_INPUT_SHAPE = {
845
+ account: z.object({ sandbox: z.literal(true) }).passthrough().describe("Sandbox account assertion and complete routing identity; verify sandbox status against persisted state"),
842
846
  scenario: z.string().describe("Scenario to execute (e.g., list_scenarios, force_account_status)"),
843
847
  params: z.record(z.string(), z.unknown()).optional().describe("Scenario-specific parameters"),
844
848
  context: z.record(z.string(), z.unknown()).optional().describe("AdCP context object"),
@@ -381,24 +381,22 @@ export interface ComplyControllerConfig {
381
381
  seedCache?: SeedFixtureCache;
382
382
  /**
383
383
  * Extra Zod fields to merge into the canonical `comply_test_controller`
384
- * input schema. Use this when a custom wrapper carries a tenant or account
385
- * reference in a top-level field that the spec-canonical
386
- * {@link TOOL_INPUT_SHAPE} doesn't include. Treat such fields only as
384
+ * input schema. Use this when a custom wrapper carries a vendor field
385
+ * that the spec-canonical {@link TOOL_INPUT_SHAPE} does not include. Treat such fields only as
387
386
  * identifiers for trusted server-side resolution; never use their contents
388
387
  * directly as sandbox authority.
389
388
  * Keys override canonical fields if there's a name collision; the
390
389
  * resulting shape is what the framework passes to
391
390
  * `mcp.registerTool(..., { inputSchema })` at registration.
392
391
  *
393
- * Mirrors the documented `{ ...TOOL_INPUT_SHAPE, account: ... }`
392
+ * Mirrors the `{ ...TOOL_INPUT_SHAPE, vendor_field: ... }`
394
393
  * pattern from `test-controller.ts` so adopters routed through
395
394
  * `createAdcpServerFromPlatform(platform, { complyTest })` get the same
396
395
  * extension seam as adopters wiring `registerTestController` directly.
397
396
  *
398
- * Storyboard fixtures that send a top-level `account` or `brand`
399
- * (rather than `context.account` / `context.brand`) are the canonical
400
- * cases for this option — both are stripped by the spec-canonical
401
- * shape.
397
+ * The canonical top-level `account` already preserves all identity fields
398
+ * and requires the sandbox assertion. Resolve its identity through trusted
399
+ * account state; the caller assertion cannot grant sandbox authority.
402
400
  *
403
401
  * @example
404
402
  * ```ts
@@ -406,8 +404,7 @@ export interface ComplyControllerConfig {
406
404
  *
407
405
  * complyTest: {
408
406
  * inputSchema: {
409
- * account: z.object({ account_id: z.string() }).passthrough().optional(),
410
- * brand: z.object({ domain: z.string() }).passthrough().optional(),
407
+ * vendor_scope: z.string().optional(),
411
408
  * },
412
409
  * force: { ... },
413
410
  * }