@adcp/sdk 13.0.0-rc.7 → 13.0.0-rc.8

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 (1529) hide show
  1. package/ADCP_VERSION +1 -1
  2. package/bin/adcp.js +29 -0
  3. package/compliance/cache/{3.1.10.previous/protocols → 3.1.11/domains}/media-buy/scenarios/creative_fate_after_cancellation.yaml +46 -24
  4. package/compliance/cache/{3.1.10 → 3.1.11}/index.json +3 -3
  5. package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml +46 -24
  6. package/compliance/cache/{3.1.10 → 3.1.11}/universal/storyboard-schema.yaml +19 -6
  7. package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/creative_fate_after_cancellation.yaml +46 -24
  8. package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/index.json +3 -3
  9. package/compliance/cache/{3.1.10/domains → 3.1.11.previous/protocols}/media-buy/scenarios/creative_fate_after_cancellation.yaml +46 -24
  10. package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/storyboard-schema.yaml +19 -6
  11. package/dist/lib/auth/oauth/ClientCredentialsFlow.d.mts +2 -0
  12. package/dist/lib/auth/oauth/ClientCredentialsFlow.d.ts +2 -0
  13. package/dist/lib/auth/oauth/ClientCredentialsFlow.d.ts.map +1 -1
  14. package/dist/lib/auth/oauth/ClientCredentialsFlow.js +69 -24
  15. package/dist/lib/auth/oauth/ClientCredentialsFlow.js.map +1 -1
  16. package/dist/lib/auth/oauth/ClientCredentialsFlow.mjs +69 -24
  17. package/dist/lib/auth/oauth/ClientCredentialsFlow.mjs.map +1 -1
  18. package/dist/lib/auth/oauth/authorization-required.d.mts +3 -0
  19. package/dist/lib/auth/oauth/authorization-required.d.ts +3 -0
  20. package/dist/lib/auth/oauth/authorization-required.d.ts.map +1 -1
  21. package/dist/lib/auth/oauth/authorization-required.js +37 -7
  22. package/dist/lib/auth/oauth/authorization-required.js.map +1 -1
  23. package/dist/lib/auth/oauth/authorization-required.mjs +37 -7
  24. package/dist/lib/auth/oauth/authorization-required.mjs.map +1 -1
  25. package/dist/lib/auth/oauth/discovery.d.mts +2 -0
  26. package/dist/lib/auth/oauth/discovery.d.ts +2 -0
  27. package/dist/lib/auth/oauth/discovery.d.ts.map +1 -1
  28. package/dist/lib/auth/oauth/discovery.js +7 -5
  29. package/dist/lib/auth/oauth/discovery.js.map +1 -1
  30. package/dist/lib/auth/oauth/discovery.mjs +7 -5
  31. package/dist/lib/auth/oauth/discovery.mjs.map +1 -1
  32. package/dist/lib/core/AgentClient.d.ts.map +1 -1
  33. package/dist/lib/core/ConversationTypes.d.mts +6 -2
  34. package/dist/lib/core/ConversationTypes.d.ts +6 -2
  35. package/dist/lib/core/ConversationTypes.d.ts.map +1 -1
  36. package/dist/lib/core/ConversationTypes.js.map +1 -1
  37. package/dist/lib/core/GovernanceMiddleware.d.mts +3 -3
  38. package/dist/lib/core/GovernanceMiddleware.d.ts +3 -3
  39. package/dist/lib/core/GovernanceMiddleware.d.ts.map +1 -1
  40. package/dist/lib/core/GovernanceMiddleware.js +8 -4
  41. package/dist/lib/core/GovernanceMiddleware.js.map +1 -1
  42. package/dist/lib/core/GovernanceMiddleware.mjs +8 -4
  43. package/dist/lib/core/GovernanceMiddleware.mjs.map +1 -1
  44. package/dist/lib/core/SingleAgentClient.d.mts +12 -1
  45. package/dist/lib/core/SingleAgentClient.d.ts +12 -1
  46. package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
  47. package/dist/lib/core/SingleAgentClient.js +89 -12
  48. package/dist/lib/core/SingleAgentClient.js.map +1 -1
  49. package/dist/lib/core/SingleAgentClient.mjs +89 -12
  50. package/dist/lib/core/SingleAgentClient.mjs.map +1 -1
  51. package/dist/lib/core/TaskExecutor.d.mts +2 -4
  52. package/dist/lib/core/TaskExecutor.d.ts +2 -4
  53. package/dist/lib/core/TaskExecutor.d.ts.map +1 -1
  54. package/dist/lib/core/TaskExecutor.js +90 -14
  55. package/dist/lib/core/TaskExecutor.js.map +1 -1
  56. package/dist/lib/core/TaskExecutor.mjs +95 -14
  57. package/dist/lib/core/TaskExecutor.mjs.map +1 -1
  58. package/dist/lib/core/task-deadline.d.mts +20 -0
  59. package/dist/lib/core/task-deadline.d.ts +21 -0
  60. package/dist/lib/core/task-deadline.d.ts.map +1 -0
  61. package/dist/lib/core/task-deadline.js +74 -0
  62. package/dist/lib/core/task-deadline.js.map +1 -0
  63. package/dist/lib/core/task-deadline.mjs +47 -0
  64. package/dist/lib/core/task-deadline.mjs.map +1 -0
  65. package/dist/lib/errors/index.d.mts +11 -0
  66. package/dist/lib/errors/index.d.ts +11 -0
  67. package/dist/lib/errors/index.d.ts.map +1 -1
  68. package/dist/lib/errors/index.js +6 -0
  69. package/dist/lib/errors/index.js.map +1 -1
  70. package/dist/lib/errors/index.mjs +6 -0
  71. package/dist/lib/errors/index.mjs.map +1 -1
  72. package/dist/lib/net/ssrf-fetch.d.ts.map +1 -1
  73. package/dist/lib/net/ssrf-fetch.js +11 -0
  74. package/dist/lib/net/ssrf-fetch.js.map +1 -1
  75. package/dist/lib/net/ssrf-fetch.mjs +11 -0
  76. package/dist/lib/net/ssrf-fetch.mjs.map +1 -1
  77. package/dist/lib/protocols/abort.d.mts +3 -1
  78. package/dist/lib/protocols/abort.d.ts +3 -1
  79. package/dist/lib/protocols/abort.d.ts.map +1 -1
  80. package/dist/lib/protocols/abort.js +19 -17
  81. package/dist/lib/protocols/abort.js.map +1 -1
  82. package/dist/lib/protocols/abort.mjs +19 -17
  83. package/dist/lib/protocols/abort.mjs.map +1 -1
  84. package/dist/lib/protocols/index.d.ts.map +1 -1
  85. package/dist/lib/protocols/index.js +13 -10
  86. package/dist/lib/protocols/index.js.map +1 -1
  87. package/dist/lib/protocols/index.mjs +13 -10
  88. package/dist/lib/protocols/index.mjs.map +1 -1
  89. package/dist/lib/protocols/mcp.d.ts.map +1 -1
  90. package/dist/lib/protocols/mcp.js +8 -7
  91. package/dist/lib/protocols/mcp.js.map +1 -1
  92. package/dist/lib/protocols/mcp.mjs +8 -7
  93. package/dist/lib/protocols/mcp.mjs.map +1 -1
  94. package/dist/lib/schemas-data/3.1/a2ui/bound-value.json +1 -1
  95. package/dist/lib/schemas-data/3.1/a2ui/component.json +1 -1
  96. package/dist/lib/schemas-data/3.1/a2ui/si-catalog.json +25 -25
  97. package/dist/lib/schemas-data/3.1/a2ui/surface.json +2 -2
  98. package/dist/lib/schemas-data/3.1/a2ui/user-action.json +1 -1
  99. package/dist/lib/schemas-data/3.1/aao/agent-publishers.json +1 -1
  100. package/dist/lib/schemas-data/3.1/account/get-account-financials-request.json +6 -6
  101. package/dist/lib/schemas-data/3.1/account/get-account-financials-response.json +12 -12
  102. package/dist/lib/schemas-data/3.1/account/list-accounts-request.json +6 -6
  103. package/dist/lib/schemas-data/3.1/account/list-accounts-response.json +8 -8
  104. package/dist/lib/schemas-data/3.1/account/report-usage-request.json +6 -6
  105. package/dist/lib/schemas-data/3.1/account/report-usage-response.json +6 -6
  106. package/dist/lib/schemas-data/3.1/account/sync-accounts-request.json +12 -12
  107. package/dist/lib/schemas-data/3.1/account/sync-accounts-response.json +16 -16
  108. package/dist/lib/schemas-data/3.1/account/sync-governance-request.json +6 -6
  109. package/dist/lib/schemas-data/3.1/account/sync-governance-response.json +10 -10
  110. package/dist/lib/schemas-data/3.1/adagents.json +29 -29
  111. package/dist/lib/schemas-data/3.1/brand/acquire-rights-request.json +10 -10
  112. package/dist/lib/schemas-data/3.1/brand/acquire-rights-response.json +16 -16
  113. package/dist/lib/schemas-data/3.1/brand/creative-approval-request.json +5 -5
  114. package/dist/lib/schemas-data/3.1/brand/creative-approval-response.json +12 -12
  115. package/dist/lib/schemas-data/3.1/brand/get-brand-identity-request.json +4 -4
  116. package/dist/lib/schemas-data/3.1/brand/get-brand-identity-response.json +10 -10
  117. package/dist/lib/schemas-data/3.1/brand/get-rights-request.json +8 -8
  118. package/dist/lib/schemas-data/3.1/brand/get-rights-response.json +11 -11
  119. package/dist/lib/schemas-data/3.1/brand/revocation-notification.json +4 -4
  120. package/dist/lib/schemas-data/3.1/brand/rights-pricing-option.json +5 -5
  121. package/dist/lib/schemas-data/3.1/brand/rights-terms.json +3 -3
  122. package/dist/lib/schemas-data/3.1/brand/search-brands-request.json +6 -6
  123. package/dist/lib/schemas-data/3.1/brand/search-brands-response.json +11 -11
  124. package/dist/lib/schemas-data/3.1/brand/update-rights-request.json +6 -6
  125. package/dist/lib/schemas-data/3.1/brand/update-rights-response.json +11 -11
  126. package/dist/lib/schemas-data/3.1/brand/verification-status.json +1 -1
  127. package/dist/lib/schemas-data/3.1/brand/verify-brand-claim-request.json +2 -2
  128. package/dist/lib/schemas-data/3.1/brand/verify-brand-claim-response.json +13 -13
  129. package/dist/lib/schemas-data/3.1/brand/verify-brand-claims-request.json +2 -2
  130. package/dist/lib/schemas-data/3.1/brand/verify-brand-claims-response.json +13 -13
  131. package/dist/lib/schemas-data/3.1/brand.json +21 -21
  132. package/dist/lib/schemas-data/3.1/bundled/content-standards/calibrate-content-request.json +12 -12
  133. package/dist/lib/schemas-data/3.1/bundled/content-standards/calibrate-content-response.json +12 -12
  134. package/dist/lib/schemas-data/3.1/bundled/content-standards/create-content-standards-request.json +16 -16
  135. package/dist/lib/schemas-data/3.1/bundled/content-standards/create-content-standards-response.json +10 -10
  136. package/dist/lib/schemas-data/3.1/bundled/content-standards/get-content-standards-request.json +5 -5
  137. package/dist/lib/schemas-data/3.1/bundled/content-standards/get-content-standards-response.json +23 -23
  138. package/dist/lib/schemas-data/3.1/bundled/content-standards/get-media-buy-artifacts-request.json +16 -16
  139. package/dist/lib/schemas-data/3.1/bundled/content-standards/get-media-buy-artifacts-response.json +18 -18
  140. package/dist/lib/schemas-data/3.1/bundled/content-standards/list-content-standards-request.json +7 -7
  141. package/dist/lib/schemas-data/3.1/bundled/content-standards/list-content-standards-response.json +24 -24
  142. package/dist/lib/schemas-data/3.1/bundled/content-standards/update-content-standards-request.json +16 -16
  143. package/dist/lib/schemas-data/3.1/bundled/content-standards/update-content-standards-response.json +10 -10
  144. package/dist/lib/schemas-data/3.1/bundled/content-standards/validate-content-delivery-request.json +12 -12
  145. package/dist/lib/schemas-data/3.1/bundled/content-standards/validate-content-delivery-response.json +12 -12
  146. package/dist/lib/schemas-data/3.1/bundled/core/tasks-get-request.json +16 -16
  147. package/dist/lib/schemas-data/3.1/bundled/core/tasks-get-response.json +181 -181
  148. package/dist/lib/schemas-data/3.1/bundled/core/tasks-list-request.json +21 -21
  149. package/dist/lib/schemas-data/3.1/bundled/core/tasks-list-response.json +11 -11
  150. package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-delivery-request.json +17 -17
  151. package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-delivery-response.json +56 -56
  152. package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-features-request.json +44 -44
  153. package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-features-response.json +13 -13
  154. package/dist/lib/schemas-data/3.1/bundled/creative/list-creative-formats-request.json +16 -16
  155. package/dist/lib/schemas-data/3.1/bundled/creative/list-creative-formats-response.json +48 -48
  156. package/dist/lib/schemas-data/3.1/bundled/creative/list-creatives-request.json +17 -17
  157. package/dist/lib/schemas-data/3.1/bundled/creative/list-creatives-response.json +58 -58
  158. package/dist/lib/schemas-data/3.1/bundled/creative/list-transformers-request.json +18 -18
  159. package/dist/lib/schemas-data/3.1/bundled/creative/list-transformers-response.json +16 -16
  160. package/dist/lib/schemas-data/3.1/bundled/creative/preview-creative-request.json +44 -44
  161. package/dist/lib/schemas-data/3.1/bundled/creative/preview-creative-response.json +50 -50
  162. package/dist/lib/schemas-data/3.1/bundled/creative/sync-creatives-request.json +46 -46
  163. package/dist/lib/schemas-data/3.1/bundled/creative/sync-creatives-response.json +27 -27
  164. package/dist/lib/schemas-data/3.1/bundled/creative/validate-input-request.json +42 -42
  165. package/dist/lib/schemas-data/3.1/bundled/creative/validate-input-response.json +10 -10
  166. package/dist/lib/schemas-data/3.1/bundled/media-buy/build-creative-request.json +53 -53
  167. package/dist/lib/schemas-data/3.1/bundled/media-buy/build-creative-response.json +54 -54
  168. package/dist/lib/schemas-data/3.1/bundled/media-buy/create-media-buy-request.json +83 -83
  169. package/dist/lib/schemas-data/3.1/bundled/media-buy/create-media-buy-response.json +77 -77
  170. package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buy-delivery-request.json +25 -25
  171. package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buy-delivery-response.json +40 -40
  172. package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buys-request.json +18 -18
  173. package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buys-response.json +65 -65
  174. package/dist/lib/schemas-data/3.1/bundled/media-buy/get-products-request.json +49 -49
  175. package/dist/lib/schemas-data/3.1/bundled/media-buy/get-products-response.json +99 -99
  176. package/dist/lib/schemas-data/3.1/bundled/media-buy/list-creative-formats-request.json +12 -12
  177. package/dist/lib/schemas-data/3.1/bundled/media-buy/list-creative-formats-response.json +48 -48
  178. package/dist/lib/schemas-data/3.1/bundled/media-buy/log-event-request.json +12 -12
  179. package/dist/lib/schemas-data/3.1/bundled/media-buy/log-event-response.json +10 -10
  180. package/dist/lib/schemas-data/3.1/bundled/media-buy/package-request.json +79 -79
  181. package/dist/lib/schemas-data/3.1/bundled/media-buy/provide-performance-feedback-request.json +8 -8
  182. package/dist/lib/schemas-data/3.1/bundled/media-buy/provide-performance-feedback-response.json +10 -10
  183. package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-audiences-request.json +18 -18
  184. package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-audiences-response.json +12 -12
  185. package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-catalogs-request.json +26 -26
  186. package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-catalogs-response.json +12 -12
  187. package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-event-sources-request.json +19 -19
  188. package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-event-sources-response.json +16 -16
  189. package/dist/lib/schemas-data/3.1/bundled/media-buy/update-media-buy-request.json +79 -79
  190. package/dist/lib/schemas-data/3.1/bundled/media-buy/update-media-buy-response.json +71 -71
  191. package/dist/lib/schemas-data/3.1/bundled/property/create-property-list-request.json +18 -18
  192. package/dist/lib/schemas-data/3.1/bundled/property/create-property-list-response.json +26 -26
  193. package/dist/lib/schemas-data/3.1/bundled/property/delete-property-list-request.json +16 -16
  194. package/dist/lib/schemas-data/3.1/bundled/property/delete-property-list-response.json +10 -10
  195. package/dist/lib/schemas-data/3.1/bundled/property/get-property-list-request.json +16 -16
  196. package/dist/lib/schemas-data/3.1/bundled/property/get-property-list-response.json +27 -27
  197. package/dist/lib/schemas-data/3.1/bundled/property/list-property-lists-request.json +17 -17
  198. package/dist/lib/schemas-data/3.1/bundled/property/list-property-lists-response.json +27 -27
  199. package/dist/lib/schemas-data/3.1/bundled/property/update-property-list-request.json +18 -18
  200. package/dist/lib/schemas-data/3.1/bundled/property/update-property-list-response.json +26 -26
  201. package/dist/lib/schemas-data/3.1/bundled/property/validate-property-delivery-request.json +19 -19
  202. package/dist/lib/schemas-data/3.1/bundled/property/validate-property-delivery-response.json +15 -15
  203. package/dist/lib/schemas-data/3.1/bundled/protocol/get-adcp-capabilities-request.json +5 -5
  204. package/dist/lib/schemas-data/3.1/bundled/protocol/get-adcp-capabilities-response.json +35 -35
  205. package/dist/lib/schemas-data/3.1/bundled/protocol/get-task-status-request.json +16 -16
  206. package/dist/lib/schemas-data/3.1/bundled/protocol/get-task-status-response.json +181 -181
  207. package/dist/lib/schemas-data/3.1/bundled/protocol/list-tasks-request.json +21 -21
  208. package/dist/lib/schemas-data/3.1/bundled/protocol/list-tasks-response.json +11 -11
  209. package/dist/lib/schemas-data/3.1/bundled/signals/activate-signal-request.json +17 -17
  210. package/dist/lib/schemas-data/3.1/bundled/signals/activate-signal-response.json +12 -12
  211. package/dist/lib/schemas-data/3.1/bundled/signals/get-signals-request.json +24 -24
  212. package/dist/lib/schemas-data/3.1/bundled/signals/get-signals-response.json +53 -53
  213. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-get-offering-request.json +5 -5
  214. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-get-offering-response.json +23 -23
  215. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-initiate-session-request.json +18 -18
  216. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-initiate-session-response.json +25 -25
  217. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-send-message-request.json +16 -16
  218. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-send-message-response.json +26 -26
  219. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-terminate-session-request.json +5 -5
  220. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-terminate-session-response.json +11 -11
  221. package/dist/lib/schemas-data/3.1/collection/base-collection-source.json +3 -3
  222. package/dist/lib/schemas-data/3.1/collection/collection-list-changed-webhook.json +2 -2
  223. package/dist/lib/schemas-data/3.1/collection/collection-list-filters.json +7 -7
  224. package/dist/lib/schemas-data/3.1/collection/collection-list.json +5 -5
  225. package/dist/lib/schemas-data/3.1/collection/create-collection-list-request.json +8 -8
  226. package/dist/lib/schemas-data/3.1/collection/create-collection-list-response.json +6 -6
  227. package/dist/lib/schemas-data/3.1/collection/delete-collection-list-request.json +5 -5
  228. package/dist/lib/schemas-data/3.1/collection/delete-collection-list-response.json +5 -5
  229. package/dist/lib/schemas-data/3.1/collection/get-collection-list-request.json +5 -5
  230. package/dist/lib/schemas-data/3.1/collection/get-collection-list-response.json +12 -12
  231. package/dist/lib/schemas-data/3.1/collection/list-collection-lists-request.json +6 -6
  232. package/dist/lib/schemas-data/3.1/collection/list-collection-lists-response.json +7 -7
  233. package/dist/lib/schemas-data/3.1/collection/update-collection-list-request.json +8 -8
  234. package/dist/lib/schemas-data/3.1/collection/update-collection-list-response.json +6 -6
  235. package/dist/lib/schemas-data/3.1/content-standards/artifact-webhook-payload.json +3 -3
  236. package/dist/lib/schemas-data/3.1/content-standards/artifact.json +7 -7
  237. package/dist/lib/schemas-data/3.1/content-standards/calibrate-content-request.json +5 -5
  238. package/dist/lib/schemas-data/3.1/content-standards/calibrate-content-response.json +10 -10
  239. package/dist/lib/schemas-data/3.1/content-standards/content-standards.json +7 -7
  240. package/dist/lib/schemas-data/3.1/content-standards/create-content-standards-request.json +8 -8
  241. package/dist/lib/schemas-data/3.1/content-standards/create-content-standards-response.json +8 -8
  242. package/dist/lib/schemas-data/3.1/content-standards/get-content-standards-request.json +4 -4
  243. package/dist/lib/schemas-data/3.1/content-standards/get-content-standards-response.json +9 -9
  244. package/dist/lib/schemas-data/3.1/content-standards/get-media-buy-artifacts-request.json +5 -5
  245. package/dist/lib/schemas-data/3.1/content-standards/get-media-buy-artifacts-response.json +10 -10
  246. package/dist/lib/schemas-data/3.1/content-standards/list-content-standards-request.json +6 -6
  247. package/dist/lib/schemas-data/3.1/content-standards/list-content-standards-response.json +10 -10
  248. package/dist/lib/schemas-data/3.1/content-standards/update-content-standards-request.json +8 -8
  249. package/dist/lib/schemas-data/3.1/content-standards/update-content-standards-response.json +8 -8
  250. package/dist/lib/schemas-data/3.1/content-standards/validate-content-delivery-request.json +5 -5
  251. package/dist/lib/schemas-data/3.1/content-standards/validate-content-delivery-response.json +10 -10
  252. package/dist/lib/schemas-data/3.1/core/account-authorization.json +1 -1
  253. package/dist/lib/schemas-data/3.1/core/account-ref.json +2 -2
  254. package/dist/lib/schemas-data/3.1/core/account-with-authorization.json +3 -3
  255. package/dist/lib/schemas-data/3.1/core/account.json +10 -10
  256. package/dist/lib/schemas-data/3.1/core/activation-key.json +1 -1
  257. package/dist/lib/schemas-data/3.1/core/ad-inventory-config.json +1 -1
  258. package/dist/lib/schemas-data/3.1/core/agent-encryption-key.json +1 -1
  259. package/dist/lib/schemas-data/3.1/core/agent-signing-key.json +1 -1
  260. package/dist/lib/schemas-data/3.1/core/app-item.json +4 -4
  261. package/dist/lib/schemas-data/3.1/core/asset-group-vocabulary.json +1 -1
  262. package/dist/lib/schemas-data/3.1/core/assets/asset-union.json +21 -21
  263. package/dist/lib/schemas-data/3.1/core/assets/audio-asset.json +3 -3
  264. package/dist/lib/schemas-data/3.1/core/assets/brief-asset.json +2 -2
  265. package/dist/lib/schemas-data/3.1/core/assets/card-asset.json +6 -6
  266. package/dist/lib/schemas-data/3.1/core/assets/catalog-asset.json +2 -2
  267. package/dist/lib/schemas-data/3.1/core/assets/css-asset.json +2 -2
  268. package/dist/lib/schemas-data/3.1/core/assets/daast-asset.json +4 -4
  269. package/dist/lib/schemas-data/3.1/core/assets/daast-tracker-asset.json +3 -3
  270. package/dist/lib/schemas-data/3.1/core/assets/html-asset.json +2 -2
  271. package/dist/lib/schemas-data/3.1/core/assets/image-asset.json +2 -2
  272. package/dist/lib/schemas-data/3.1/core/assets/javascript-asset.json +3 -3
  273. package/dist/lib/schemas-data/3.1/core/assets/markdown-asset.json +2 -2
  274. package/dist/lib/schemas-data/3.1/core/assets/pixel-tracker-asset.json +2 -2
  275. package/dist/lib/schemas-data/3.1/core/assets/published-post-asset.json +2 -2
  276. package/dist/lib/schemas-data/3.1/core/assets/text-asset.json +2 -2
  277. package/dist/lib/schemas-data/3.1/core/assets/url-asset.json +3 -3
  278. package/dist/lib/schemas-data/3.1/core/assets/vast-asset.json +4 -4
  279. package/dist/lib/schemas-data/3.1/core/assets/vast-tracker-asset.json +3 -3
  280. package/dist/lib/schemas-data/3.1/core/assets/video-asset.json +7 -7
  281. package/dist/lib/schemas-data/3.1/core/assets/webhook-asset.json +7 -7
  282. package/dist/lib/schemas-data/3.1/core/assets/zip-asset.json +2 -2
  283. package/dist/lib/schemas-data/3.1/core/async-response-data.json +29 -29
  284. package/dist/lib/schemas-data/3.1/core/async-response-refs/creative/sync-creatives-async-response-input-required.json +3 -3
  285. package/dist/lib/schemas-data/3.1/core/async-response-refs/creative/sync-creatives-async-response-submitted.json +4 -4
  286. package/dist/lib/schemas-data/3.1/core/async-response-refs/creative/sync-creatives-async-response-working.json +3 -3
  287. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/build-creative-async-response-input-required.json +4 -4
  288. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/build-creative-async-response-submitted.json +4 -4
  289. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/build-creative-async-response-working.json +3 -3
  290. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/create-media-buy-async-response-input-required.json +4 -4
  291. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/create-media-buy-async-response-submitted.json +4 -4
  292. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/create-media-buy-async-response-working.json +3 -3
  293. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/get-products-async-response-input-required.json +4 -4
  294. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/get-products-async-response-submitted.json +4 -4
  295. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/get-products-async-response-working.json +3 -3
  296. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/sync-catalogs-async-response-input-required.json +3 -3
  297. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/sync-catalogs-async-response-submitted.json +4 -4
  298. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/sync-catalogs-async-response-working.json +3 -3
  299. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/update-media-buy-async-response-input-required.json +3 -3
  300. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/update-media-buy-async-response-submitted.json +4 -4
  301. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/update-media-buy-async-response-working.json +3 -3
  302. package/dist/lib/schemas-data/3.1/core/async-response-refs/signals/get-signals-async-response-submitted.json +4 -4
  303. package/dist/lib/schemas-data/3.1/core/async-response-refs/signals/get-signals-async-response-working.json +3 -3
  304. package/dist/lib/schemas-data/3.1/core/attribution-window.json +4 -4
  305. package/dist/lib/schemas-data/3.1/core/audience-member.json +3 -3
  306. package/dist/lib/schemas-data/3.1/core/audience-selector.json +7 -7
  307. package/dist/lib/schemas-data/3.1/core/authorized-agent-base.json +3 -3
  308. package/dist/lib/schemas-data/3.1/core/brand-id.json +1 -1
  309. package/dist/lib/schemas-data/3.1/core/brand-ref.json +3 -3
  310. package/dist/lib/schemas-data/3.1/core/business-entity.json +2 -2
  311. package/dist/lib/schemas-data/3.1/core/cancellation-policy.json +2 -2
  312. package/dist/lib/schemas-data/3.1/core/canonical-format-kind.json +1 -1
  313. package/dist/lib/schemas-data/3.1/core/canonical-projection-ref.json +3 -3
  314. package/dist/lib/schemas-data/3.1/core/canonical-projection-slot-override.json +1 -1
  315. package/dist/lib/schemas-data/3.1/core/catalog-field-mapping.json +2 -2
  316. package/dist/lib/schemas-data/3.1/core/catalog-item-delivery-metrics.json +3 -3
  317. package/dist/lib/schemas-data/3.1/core/catalog.json +7 -7
  318. package/dist/lib/schemas-data/3.1/core/catchment.json +5 -5
  319. package/dist/lib/schemas-data/3.1/core/collection-distribution.json +2 -2
  320. package/dist/lib/schemas-data/3.1/core/collection-list-ref.json +1 -1
  321. package/dist/lib/schemas-data/3.1/core/collection-selector.json +1 -1
  322. package/dist/lib/schemas-data/3.1/core/collection.json +13 -13
  323. package/dist/lib/schemas-data/3.1/core/committed-metric.json +9 -9
  324. package/dist/lib/schemas-data/3.1/core/content-rating.json +2 -2
  325. package/dist/lib/schemas-data/3.1/core/context.json +1 -1
  326. package/dist/lib/schemas-data/3.1/core/creative-asset.json +10 -10
  327. package/dist/lib/schemas-data/3.1/core/creative-assignment.json +2 -2
  328. package/dist/lib/schemas-data/3.1/core/creative-brief.json +4 -4
  329. package/dist/lib/schemas-data/3.1/core/creative-consumption.json +1 -1
  330. package/dist/lib/schemas-data/3.1/core/creative-delivery-metrics.json +2 -2
  331. package/dist/lib/schemas-data/3.1/core/creative-filters.json +5 -5
  332. package/dist/lib/schemas-data/3.1/core/creative-item.json +1 -1
  333. package/dist/lib/schemas-data/3.1/core/creative-manifest.json +11 -11
  334. package/dist/lib/schemas-data/3.1/core/creative-policy.json +3 -3
  335. package/dist/lib/schemas-data/3.1/core/creative-variable.json +1 -1
  336. package/dist/lib/schemas-data/3.1/core/creative-variant.json +5 -5
  337. package/dist/lib/schemas-data/3.1/core/data-provider-signal-selector.json +1 -1
  338. package/dist/lib/schemas-data/3.1/core/date-range.json +1 -1
  339. package/dist/lib/schemas-data/3.1/core/datetime-range.json +1 -1
  340. package/dist/lib/schemas-data/3.1/core/daypart-target.json +2 -2
  341. package/dist/lib/schemas-data/3.1/core/deadline-policy.json +1 -1
  342. package/dist/lib/schemas-data/3.1/core/delivery-forecast.json +7 -7
  343. package/dist/lib/schemas-data/3.1/core/delivery-metric-aggregate.json +9 -9
  344. package/dist/lib/schemas-data/3.1/core/delivery-metrics.json +8 -8
  345. package/dist/lib/schemas-data/3.1/core/deployment.json +3 -3
  346. package/dist/lib/schemas-data/3.1/core/destination-item.json +4 -4
  347. package/dist/lib/schemas-data/3.1/core/destination.json +1 -1
  348. package/dist/lib/schemas-data/3.1/core/diagnostic-issue.json +1 -1
  349. package/dist/lib/schemas-data/3.1/core/downstream-connection-requirement.json +1 -1
  350. package/dist/lib/schemas-data/3.1/core/duration.json +1 -1
  351. package/dist/lib/schemas-data/3.1/core/education-item.json +4 -4
  352. package/dist/lib/schemas-data/3.1/core/error.json +1 -1
  353. package/dist/lib/schemas-data/3.1/core/evaluator-spec.json +5 -5
  354. package/dist/lib/schemas-data/3.1/core/event-custom-data.json +2 -2
  355. package/dist/lib/schemas-data/3.1/core/event-source-health.json +3 -3
  356. package/dist/lib/schemas-data/3.1/core/event-surface.json +2 -2
  357. package/dist/lib/schemas-data/3.1/core/event.json +8 -8
  358. package/dist/lib/schemas-data/3.1/core/ext.json +1 -1
  359. package/dist/lib/schemas-data/3.1/core/feature-requirement.json +1 -1
  360. package/dist/lib/schemas-data/3.1/core/flight-item.json +4 -4
  361. package/dist/lib/schemas-data/3.1/core/forecast-dimension-audience.json +2 -2
  362. package/dist/lib/schemas-data/3.1/core/forecast-dimension-device-platform.json +2 -2
  363. package/dist/lib/schemas-data/3.1/core/forecast-dimension-device-type.json +2 -2
  364. package/dist/lib/schemas-data/3.1/core/forecast-dimension-geo.json +5 -5
  365. package/dist/lib/schemas-data/3.1/core/forecast-dimension-placement.json +2 -2
  366. package/dist/lib/schemas-data/3.1/core/forecast-dimension-signal.json +2 -2
  367. package/dist/lib/schemas-data/3.1/core/forecast-point-dimensions.json +7 -7
  368. package/dist/lib/schemas-data/3.1/core/forecast-point.json +27 -27
  369. package/dist/lib/schemas-data/3.1/core/forecast-range.json +1 -1
  370. package/dist/lib/schemas-data/3.1/core/forecast-vendor-metric-value.json +5 -5
  371. package/dist/lib/schemas-data/3.1/core/format-id.json +1 -1
  372. package/dist/lib/schemas-data/3.1/core/format-option-ref.json +1 -1
  373. package/dist/lib/schemas-data/3.1/core/format-shape-vocabulary.json +1 -1
  374. package/dist/lib/schemas-data/3.1/core/format.json +44 -44
  375. package/dist/lib/schemas-data/3.1/core/frequency-cap.json +4 -4
  376. package/dist/lib/schemas-data/3.1/core/generation-credential.json +3 -3
  377. package/dist/lib/schemas-data/3.1/core/geo-breakdown-support.json +3 -3
  378. package/dist/lib/schemas-data/3.1/core/geo-delivery-metrics.json +6 -6
  379. package/dist/lib/schemas-data/3.1/core/hotel-item.json +4 -4
  380. package/dist/lib/schemas-data/3.1/core/identifier.json +2 -2
  381. package/dist/lib/schemas-data/3.1/core/impairment.json +3 -3
  382. package/dist/lib/schemas-data/3.1/core/industry-identifier.json +2 -2
  383. package/dist/lib/schemas-data/3.1/core/insertion-order.json +1 -1
  384. package/dist/lib/schemas-data/3.1/core/installment-deadlines.json +2 -2
  385. package/dist/lib/schemas-data/3.1/core/installment.json +9 -9
  386. package/dist/lib/schemas-data/3.1/core/job-item.json +3 -3
  387. package/dist/lib/schemas-data/3.1/core/keyword-delivery-metrics.json +3 -3
  388. package/dist/lib/schemas-data/3.1/core/limited-series.json +1 -1
  389. package/dist/lib/schemas-data/3.1/core/material-deadline.json +1 -1
  390. package/dist/lib/schemas-data/3.1/core/mcp-webhook-payload.json +5 -5
  391. package/dist/lib/schemas-data/3.1/core/measurement-readiness.json +5 -5
  392. package/dist/lib/schemas-data/3.1/core/measurement-terms.json +3 -3
  393. package/dist/lib/schemas-data/3.1/core/measurement-window.json +1 -1
  394. package/dist/lib/schemas-data/3.1/core/media-buy-available-action.json +4 -4
  395. package/dist/lib/schemas-data/3.1/core/media-buy-features.json +1 -1
  396. package/dist/lib/schemas-data/3.1/core/media-buy.json +10 -10
  397. package/dist/lib/schemas-data/3.1/core/missing-metric.json +9 -9
  398. package/dist/lib/schemas-data/3.1/core/notification-config.json +4 -4
  399. package/dist/lib/schemas-data/3.1/core/offering-asset-group.json +16 -16
  400. package/dist/lib/schemas-data/3.1/core/offering.json +5 -5
  401. package/dist/lib/schemas-data/3.1/core/optimization-goal.json +7 -7
  402. package/dist/lib/schemas-data/3.1/core/outcome-measurement.json +2 -2
  403. package/dist/lib/schemas-data/3.1/core/overlay.json +1 -1
  404. package/dist/lib/schemas-data/3.1/core/package-signal-targeting-group.json +2 -2
  405. package/dist/lib/schemas-data/3.1/core/package-signal-targeting-groups.json +2 -2
  406. package/dist/lib/schemas-data/3.1/core/package-signal-targeting.json +3 -3
  407. package/dist/lib/schemas-data/3.1/core/package.json +17 -17
  408. package/dist/lib/schemas-data/3.1/core/pagination-request.json +1 -1
  409. package/dist/lib/schemas-data/3.1/core/pagination-response.json +1 -1
  410. package/dist/lib/schemas-data/3.1/core/performance-feedback.json +12 -12
  411. package/dist/lib/schemas-data/3.1/core/performance-standard.json +4 -4
  412. package/dist/lib/schemas-data/3.1/core/placement-definition.json +10 -10
  413. package/dist/lib/schemas-data/3.1/core/placement-ref.json +1 -1
  414. package/dist/lib/schemas-data/3.1/core/placement.json +7 -7
  415. package/dist/lib/schemas-data/3.1/core/planned-delivery.json +5 -5
  416. package/dist/lib/schemas-data/3.1/core/platform-extension-ref.json +1 -1
  417. package/dist/lib/schemas-data/3.1/core/postal-area-support.json +2 -2
  418. package/dist/lib/schemas-data/3.1/core/postal-area.json +4 -4
  419. package/dist/lib/schemas-data/3.1/core/postal-country-system.json +2 -2
  420. package/dist/lib/schemas-data/3.1/core/price.json +1 -1
  421. package/dist/lib/schemas-data/3.1/core/pricing-option.json +10 -10
  422. package/dist/lib/schemas-data/3.1/core/product-allocation.json +4 -4
  423. package/dist/lib/schemas-data/3.1/core/product-allowed-action.json +5 -5
  424. package/dist/lib/schemas-data/3.1/core/product-filters.json +27 -27
  425. package/dist/lib/schemas-data/3.1/core/product-format-declaration.json +16 -16
  426. package/dist/lib/schemas-data/3.1/core/product-signal-targeting-option.json +3 -3
  427. package/dist/lib/schemas-data/3.1/core/product.json +40 -40
  428. package/dist/lib/schemas-data/3.1/core/property-id.json +1 -1
  429. package/dist/lib/schemas-data/3.1/core/property-list-ref.json +1 -1
  430. package/dist/lib/schemas-data/3.1/core/property-tag.json +1 -1
  431. package/dist/lib/schemas-data/3.1/core/property.json +6 -6
  432. package/dist/lib/schemas-data/3.1/core/proposal.json +6 -6
  433. package/dist/lib/schemas-data/3.1/core/protocol-envelope.json +5 -5
  434. package/dist/lib/schemas-data/3.1/core/provenance.json +9 -9
  435. package/dist/lib/schemas-data/3.1/core/publisher-property-selector.json +3 -3
  436. package/dist/lib/schemas-data/3.1/core/push-notification-config.json +2 -2
  437. package/dist/lib/schemas-data/3.1/core/real-estate-item.json +4 -4
  438. package/dist/lib/schemas-data/3.1/core/reference-asset.json +1 -1
  439. package/dist/lib/schemas-data/3.1/core/registry-event.json +13 -13
  440. package/dist/lib/schemas-data/3.1/core/registry-feed-response.json +2 -2
  441. package/dist/lib/schemas-data/3.1/core/reporting-capabilities.json +8 -8
  442. package/dist/lib/schemas-data/3.1/core/reporting-webhook.json +3 -3
  443. package/dist/lib/schemas-data/3.1/core/requirements/asset-requirements.json +13 -13
  444. package/dist/lib/schemas-data/3.1/core/requirements/audio-asset-requirements.json +1 -1
  445. package/dist/lib/schemas-data/3.1/core/requirements/catalog-field-binding.json +4 -4
  446. package/dist/lib/schemas-data/3.1/core/requirements/catalog-requirements.json +5 -5
  447. package/dist/lib/schemas-data/3.1/core/requirements/css-asset-requirements.json +1 -1
  448. package/dist/lib/schemas-data/3.1/core/requirements/daast-asset-requirements.json +1 -1
  449. package/dist/lib/schemas-data/3.1/core/requirements/html-asset-requirements.json +1 -1
  450. package/dist/lib/schemas-data/3.1/core/requirements/image-asset-requirements.json +2 -2
  451. package/dist/lib/schemas-data/3.1/core/requirements/javascript-asset-requirements.json +1 -1
  452. package/dist/lib/schemas-data/3.1/core/requirements/markdown-asset-requirements.json +1 -1
  453. package/dist/lib/schemas-data/3.1/core/requirements/offering-asset-constraint.json +4 -4
  454. package/dist/lib/schemas-data/3.1/core/requirements/text-asset-requirements.json +1 -1
  455. package/dist/lib/schemas-data/3.1/core/requirements/url-asset-requirements.json +1 -1
  456. package/dist/lib/schemas-data/3.1/core/requirements/vast-asset-requirements.json +1 -1
  457. package/dist/lib/schemas-data/3.1/core/requirements/video-asset-requirements.json +6 -6
  458. package/dist/lib/schemas-data/3.1/core/requirements/webhook-asset-requirements.json +1 -1
  459. package/dist/lib/schemas-data/3.1/core/response-payload-jws-envelope.json +1 -1
  460. package/dist/lib/schemas-data/3.1/core/response.json +1 -1
  461. package/dist/lib/schemas-data/3.1/core/rights-constraint.json +4 -4
  462. package/dist/lib/schemas-data/3.1/core/seller-agent-ref.json +1 -1
  463. package/dist/lib/schemas-data/3.1/core/signal-coverage-forecast.json +5 -5
  464. package/dist/lib/schemas-data/3.1/core/signal-definition-enrichment.json +4 -4
  465. package/dist/lib/schemas-data/3.1/core/signal-definition.json +5 -5
  466. package/dist/lib/schemas-data/3.1/core/signal-filters.json +3 -3
  467. package/dist/lib/schemas-data/3.1/core/signal-id.json +1 -1
  468. package/dist/lib/schemas-data/3.1/core/signal-listing.json +4 -4
  469. package/dist/lib/schemas-data/3.1/core/signal-modeling-disclosure.json +1 -1
  470. package/dist/lib/schemas-data/3.1/core/signal-pricing-option.json +2 -2
  471. package/dist/lib/schemas-data/3.1/core/signal-pricing.json +6 -6
  472. package/dist/lib/schemas-data/3.1/core/signal-ref.json +1 -1
  473. package/dist/lib/schemas-data/3.1/core/signal-selection-group-rule.json +1 -1
  474. package/dist/lib/schemas-data/3.1/core/signal-targeting-expression.json +4 -4
  475. package/dist/lib/schemas-data/3.1/core/signal-targeting-rules.json +2 -2
  476. package/dist/lib/schemas-data/3.1/core/signal-targeting.json +7 -7
  477. package/dist/lib/schemas-data/3.1/core/sla-window.json +1 -1
  478. package/dist/lib/schemas-data/3.1/core/special.json +2 -2
  479. package/dist/lib/schemas-data/3.1/core/start-timing.json +1 -1
  480. package/dist/lib/schemas-data/3.1/core/store-item.json +3 -3
  481. package/dist/lib/schemas-data/3.1/core/talent.json +2 -2
  482. package/dist/lib/schemas-data/3.1/core/targeting.json +22 -22
  483. package/dist/lib/schemas-data/3.1/core/tasks-get-request.json +5 -5
  484. package/dist/lib/schemas-data/3.1/core/tasks-get-response.json +10 -10
  485. package/dist/lib/schemas-data/3.1/core/tasks-list-request.json +13 -13
  486. package/dist/lib/schemas-data/3.1/core/tasks-list-response.json +8 -8
  487. package/dist/lib/schemas-data/3.1/core/transformer-param.json +1 -1
  488. package/dist/lib/schemas-data/3.1/core/transformer.json +5 -5
  489. package/dist/lib/schemas-data/3.1/core/truncation-sentinel.json +1 -1
  490. package/dist/lib/schemas-data/3.1/core/user-match.json +3 -3
  491. package/dist/lib/schemas-data/3.1/core/vehicle-item.json +4 -4
  492. package/dist/lib/schemas-data/3.1/core/vendor-metric-id.json +1 -1
  493. package/dist/lib/schemas-data/3.1/core/vendor-metric-optimization-supported-metric.json +3 -3
  494. package/dist/lib/schemas-data/3.1/core/vendor-metric-optimization.json +2 -2
  495. package/dist/lib/schemas-data/3.1/core/vendor-metric-value.json +3 -3
  496. package/dist/lib/schemas-data/3.1/core/vendor-pricing-option.json +3 -3
  497. package/dist/lib/schemas-data/3.1/core/version-envelope.json +1 -1
  498. package/dist/lib/schemas-data/3.1/core/webhook-activity-record.json +3 -3
  499. package/dist/lib/schemas-data/3.1/core/webhook-challenge-response.json +1 -1
  500. package/dist/lib/schemas-data/3.1/core/webhook-challenge.json +2 -2
  501. package/dist/lib/schemas-data/3.1/core/wholesale-feed-event.json +17 -17
  502. package/dist/lib/schemas-data/3.1/core/wholesale-feed-webhook.json +3 -3
  503. package/dist/lib/schemas-data/3.1/core/x-entity-types.json +1 -1
  504. package/dist/lib/schemas-data/3.1/creative/asset-types/index.json +6 -6
  505. package/dist/lib/schemas-data/3.1/creative/audit-observation.json +2 -2
  506. package/dist/lib/schemas-data/3.1/creative/creative-feature-result.json +2 -2
  507. package/dist/lib/schemas-data/3.1/creative/creative-purged-webhook.json +3 -3
  508. package/dist/lib/schemas-data/3.1/creative/creative-status-changed-webhook.json +4 -4
  509. package/dist/lib/schemas-data/3.1/creative/get-creative-delivery-request.json +6 -6
  510. package/dist/lib/schemas-data/3.1/creative/get-creative-delivery-response.json +9 -9
  511. package/dist/lib/schemas-data/3.1/creative/get-creative-features-request.json +6 -6
  512. package/dist/lib/schemas-data/3.1/creative/get-creative-features-response.json +11 -11
  513. package/dist/lib/schemas-data/3.1/creative/list-creative-formats-request.json +13 -13
  514. package/dist/lib/schemas-data/3.1/creative/list-creative-formats-response.json +9 -9
  515. package/dist/lib/schemas-data/3.1/creative/list-creatives-request.json +9 -9
  516. package/dist/lib/schemas-data/3.1/creative/list-creatives-response.json +21 -21
  517. package/dist/lib/schemas-data/3.1/creative/list-transformers-request.json +8 -8
  518. package/dist/lib/schemas-data/3.1/creative/list-transformers-response.json +8 -8
  519. package/dist/lib/schemas-data/3.1/creative/preview-creative-request.json +12 -12
  520. package/dist/lib/schemas-data/3.1/creative/preview-creative-response.json +14 -14
  521. package/dist/lib/schemas-data/3.1/creative/preview-render.json +1 -1
  522. package/dist/lib/schemas-data/3.1/creative/sync-creatives-async-response-input-required.json +3 -3
  523. package/dist/lib/schemas-data/3.1/creative/sync-creatives-async-response-submitted.json +4 -4
  524. package/dist/lib/schemas-data/3.1/creative/sync-creatives-async-response-working.json +3 -3
  525. package/dist/lib/schemas-data/3.1/creative/sync-creatives-request.json +8 -8
  526. package/dist/lib/schemas-data/3.1/creative/sync-creatives-response.json +15 -15
  527. package/dist/lib/schemas-data/3.1/creative/validate-input-request.json +4 -4
  528. package/dist/lib/schemas-data/3.1/creative/validate-input-response.json +4 -4
  529. package/dist/lib/schemas-data/3.1/creative/validate-input-result.json +1 -1
  530. package/dist/lib/schemas-data/3.1/creative/video-brief.json +1 -1
  531. package/dist/lib/schemas-data/3.1/enums/account-scope.json +1 -1
  532. package/dist/lib/schemas-data/3.1/enums/account-status.json +1 -1
  533. package/dist/lib/schemas-data/3.1/enums/action-not-allowed-reason.json +1 -1
  534. package/dist/lib/schemas-data/3.1/enums/action-source.json +1 -1
  535. package/dist/lib/schemas-data/3.1/enums/adcp-protocol.json +1 -1
  536. package/dist/lib/schemas-data/3.1/enums/adjustment-kind.json +1 -1
  537. package/dist/lib/schemas-data/3.1/enums/advertiser-industry.json +1 -1
  538. package/dist/lib/schemas-data/3.1/enums/age-verification-method.json +1 -1
  539. package/dist/lib/schemas-data/3.1/enums/assessment-status.json +1 -1
  540. package/dist/lib/schemas-data/3.1/enums/asset-content-type.json +1 -1
  541. package/dist/lib/schemas-data/3.1/enums/attestation-claim.json +1 -1
  542. package/dist/lib/schemas-data/3.1/enums/attribution-methodology.json +1 -1
  543. package/dist/lib/schemas-data/3.1/enums/attribution-model.json +1 -1
  544. package/dist/lib/schemas-data/3.1/enums/audience-source.json +1 -1
  545. package/dist/lib/schemas-data/3.1/enums/audience-status.json +1 -1
  546. package/dist/lib/schemas-data/3.1/enums/audio-channel-layout.json +1 -1
  547. package/dist/lib/schemas-data/3.1/enums/audio-distribution-type.json +1 -1
  548. package/dist/lib/schemas-data/3.1/enums/auth-scheme.json +1 -1
  549. package/dist/lib/schemas-data/3.1/enums/available-metric.json +1 -1
  550. package/dist/lib/schemas-data/3.1/enums/billing-party.json +1 -1
  551. package/dist/lib/schemas-data/3.1/enums/binary-verdict.json +1 -1
  552. package/dist/lib/schemas-data/3.1/enums/brand-agent-type.json +1 -1
  553. package/dist/lib/schemas-data/3.1/enums/c2pa-watermark-action.json +1 -1
  554. package/dist/lib/schemas-data/3.1/enums/canceled-by.json +1 -1
  555. package/dist/lib/schemas-data/3.1/enums/catalog-action.json +1 -1
  556. package/dist/lib/schemas-data/3.1/enums/catalog-item-status.json +1 -1
  557. package/dist/lib/schemas-data/3.1/enums/catalog-type.json +1 -1
  558. package/dist/lib/schemas-data/3.1/enums/channels.json +1 -1
  559. package/dist/lib/schemas-data/3.1/enums/cloud-storage-protocol.json +1 -1
  560. package/dist/lib/schemas-data/3.1/enums/co-branding-requirement.json +1 -1
  561. package/dist/lib/schemas-data/3.1/enums/collection-cadence.json +1 -1
  562. package/dist/lib/schemas-data/3.1/enums/collection-kind.json +1 -1
  563. package/dist/lib/schemas-data/3.1/enums/collection-relationship.json +1 -1
  564. package/dist/lib/schemas-data/3.1/enums/collection-status.json +1 -1
  565. package/dist/lib/schemas-data/3.1/enums/completion-source.json +1 -1
  566. package/dist/lib/schemas-data/3.1/enums/consent-basis.json +1 -1
  567. package/dist/lib/schemas-data/3.1/enums/content-id-type.json +1 -1
  568. package/dist/lib/schemas-data/3.1/enums/content-rating-system.json +1 -1
  569. package/dist/lib/schemas-data/3.1/enums/creative-action.json +1 -1
  570. package/dist/lib/schemas-data/3.1/enums/creative-agent-capability.json +1 -1
  571. package/dist/lib/schemas-data/3.1/enums/creative-approval-status.json +1 -1
  572. package/dist/lib/schemas-data/3.1/enums/creative-event-reason-code.json +1 -1
  573. package/dist/lib/schemas-data/3.1/enums/creative-identifier-type.json +1 -1
  574. package/dist/lib/schemas-data/3.1/enums/creative-quality.json +1 -1
  575. package/dist/lib/schemas-data/3.1/enums/creative-selection-strategy.json +1 -1
  576. package/dist/lib/schemas-data/3.1/enums/creative-sort-field.json +1 -1
  577. package/dist/lib/schemas-data/3.1/enums/creative-status.json +1 -1
  578. package/dist/lib/schemas-data/3.1/enums/daast-tracking-event.json +1 -1
  579. package/dist/lib/schemas-data/3.1/enums/daast-version.json +1 -1
  580. package/dist/lib/schemas-data/3.1/enums/day-of-week.json +1 -1
  581. package/dist/lib/schemas-data/3.1/enums/delegation-authority.json +1 -1
  582. package/dist/lib/schemas-data/3.1/enums/delivery-type.json +1 -1
  583. package/dist/lib/schemas-data/3.1/enums/demographic-system.json +1 -1
  584. package/dist/lib/schemas-data/3.1/enums/derivative-type.json +1 -1
  585. package/dist/lib/schemas-data/3.1/enums/device-platform.json +1 -1
  586. package/dist/lib/schemas-data/3.1/enums/device-type.json +1 -1
  587. package/dist/lib/schemas-data/3.1/enums/digital-source-type.json +1 -1
  588. package/dist/lib/schemas-data/3.1/enums/dimension-unit.json +1 -1
  589. package/dist/lib/schemas-data/3.1/enums/disclosure-persistence.json +1 -1
  590. package/dist/lib/schemas-data/3.1/enums/disclosure-position.json +1 -1
  591. package/dist/lib/schemas-data/3.1/enums/distance-unit.json +1 -1
  592. package/dist/lib/schemas-data/3.1/enums/distribution-identifier-type.json +1 -1
  593. package/dist/lib/schemas-data/3.1/enums/embedded-provenance-method.json +1 -1
  594. package/dist/lib/schemas-data/3.1/enums/error-code.json +1 -1
  595. package/dist/lib/schemas-data/3.1/enums/error-scope.json +1 -1
  596. package/dist/lib/schemas-data/3.1/enums/escalation-severity.json +1 -1
  597. package/dist/lib/schemas-data/3.1/enums/event-type.json +1 -1
  598. package/dist/lib/schemas-data/3.1/enums/exclusivity.json +1 -1
  599. package/dist/lib/schemas-data/3.1/enums/feature-check-status.json +1 -1
  600. package/dist/lib/schemas-data/3.1/enums/feed-format.json +1 -1
  601. package/dist/lib/schemas-data/3.1/enums/feedback-source.json +1 -1
  602. package/dist/lib/schemas-data/3.1/enums/forecast-method.json +1 -1
  603. package/dist/lib/schemas-data/3.1/enums/forecast-range-unit.json +1 -1
  604. package/dist/lib/schemas-data/3.1/enums/forecastable-metric.json +1 -1
  605. package/dist/lib/schemas-data/3.1/enums/format-id-parameter.json +1 -1
  606. package/dist/lib/schemas-data/3.1/enums/frame-rate-type.json +1 -1
  607. package/dist/lib/schemas-data/3.1/enums/frequency-cap-scope.json +1 -1
  608. package/dist/lib/schemas-data/3.1/enums/genre-taxonomy.json +1 -1
  609. package/dist/lib/schemas-data/3.1/enums/geo-level.json +1 -1
  610. package/dist/lib/schemas-data/3.1/enums/gop-type.json +1 -1
  611. package/dist/lib/schemas-data/3.1/enums/governance-decision.json +1 -1
  612. package/dist/lib/schemas-data/3.1/enums/governance-domain.json +1 -1
  613. package/dist/lib/schemas-data/3.1/enums/governance-mode.json +1 -1
  614. package/dist/lib/schemas-data/3.1/enums/governance-phase.json +1 -1
  615. package/dist/lib/schemas-data/3.1/enums/history-entry-type.json +1 -1
  616. package/dist/lib/schemas-data/3.1/enums/http-method.json +1 -1
  617. package/dist/lib/schemas-data/3.1/enums/identifier-types.json +1 -1
  618. package/dist/lib/schemas-data/3.1/enums/impairment-offline-state.json +1 -1
  619. package/dist/lib/schemas-data/3.1/enums/impairment-reason-code.json +1 -1
  620. package/dist/lib/schemas-data/3.1/enums/installment-status.json +1 -1
  621. package/dist/lib/schemas-data/3.1/enums/javascript-module-type.json +1 -1
  622. package/dist/lib/schemas-data/3.1/enums/landing-page-requirement.json +1 -1
  623. package/dist/lib/schemas-data/3.1/enums/legacy-postal-system.json +1 -1
  624. package/dist/lib/schemas-data/3.1/enums/lift-dimension.json +1 -1
  625. package/dist/lib/schemas-data/3.1/enums/logo-slot.json +1 -1
  626. package/dist/lib/schemas-data/3.1/enums/makegood-remedy.json +1 -1
  627. package/dist/lib/schemas-data/3.1/enums/markdown-flavor.json +1 -1
  628. package/dist/lib/schemas-data/3.1/enums/match-id-type.json +1 -1
  629. package/dist/lib/schemas-data/3.1/enums/match-type.json +1 -1
  630. package/dist/lib/schemas-data/3.1/enums/media-buy-action-mode.json +1 -1
  631. package/dist/lib/schemas-data/3.1/enums/media-buy-health.json +1 -1
  632. package/dist/lib/schemas-data/3.1/enums/media-buy-status.json +1 -1
  633. package/dist/lib/schemas-data/3.1/enums/media-buy-valid-action.json +1 -1
  634. package/dist/lib/schemas-data/3.1/enums/metric-scope.json +1 -1
  635. package/dist/lib/schemas-data/3.1/enums/metric-type.json +1 -1
  636. package/dist/lib/schemas-data/3.1/enums/metro-system.json +1 -1
  637. package/dist/lib/schemas-data/3.1/enums/moov-atom-position.json +1 -1
  638. package/dist/lib/schemas-data/3.1/enums/notification-type.json +1 -1
  639. package/dist/lib/schemas-data/3.1/enums/offering-availability-status.json +1 -1
  640. package/dist/lib/schemas-data/3.1/enums/outcome-type.json +1 -1
  641. package/dist/lib/schemas-data/3.1/enums/pacing.json +1 -1
  642. package/dist/lib/schemas-data/3.1/enums/payment-terms.json +1 -1
  643. package/dist/lib/schemas-data/3.1/enums/performance-standard-metric.json +1 -1
  644. package/dist/lib/schemas-data/3.1/enums/policy-category.json +1 -1
  645. package/dist/lib/schemas-data/3.1/enums/policy-enforcement.json +1 -1
  646. package/dist/lib/schemas-data/3.1/enums/postal-system.json +1 -1
  647. package/dist/lib/schemas-data/3.1/enums/preview-output-format.json +1 -1
  648. package/dist/lib/schemas-data/3.1/enums/pricing-model.json +1 -1
  649. package/dist/lib/schemas-data/3.1/enums/production-quality.json +1 -1
  650. package/dist/lib/schemas-data/3.1/enums/property-type.json +1 -1
  651. package/dist/lib/schemas-data/3.1/enums/proposal-status.json +1 -1
  652. package/dist/lib/schemas-data/3.1/enums/publisher-identifier-types.json +1 -1
  653. package/dist/lib/schemas-data/3.1/enums/purchase-type.json +1 -1
  654. package/dist/lib/schemas-data/3.1/enums/reach-unit.json +1 -1
  655. package/dist/lib/schemas-data/3.1/enums/reporting-frequency.json +1 -1
  656. package/dist/lib/schemas-data/3.1/enums/response-type.json +1 -1
  657. package/dist/lib/schemas-data/3.1/enums/restricted-attribute.json +1 -1
  658. package/dist/lib/schemas-data/3.1/enums/right-type.json +1 -1
  659. package/dist/lib/schemas-data/3.1/enums/right-use.json +1 -1
  660. package/dist/lib/schemas-data/3.1/enums/rights-billing-period.json +1 -1
  661. package/dist/lib/schemas-data/3.1/enums/scan-type.json +1 -1
  662. package/dist/lib/schemas-data/3.1/enums/si-session-status.json +1 -1
  663. package/dist/lib/schemas-data/3.1/enums/signal-catalog-type.json +1 -1
  664. package/dist/lib/schemas-data/3.1/enums/signal-source.json +1 -1
  665. package/dist/lib/schemas-data/3.1/enums/signal-value-type.json +1 -1
  666. package/dist/lib/schemas-data/3.1/enums/snapshot-unavailable-reason.json +1 -1
  667. package/dist/lib/schemas-data/3.1/enums/social-placement-surface.json +1 -1
  668. package/dist/lib/schemas-data/3.1/enums/sort-direction.json +1 -1
  669. package/dist/lib/schemas-data/3.1/enums/sort-metric.json +1 -1
  670. package/dist/lib/schemas-data/3.1/enums/special-category.json +1 -1
  671. package/dist/lib/schemas-data/3.1/enums/specialism.json +1 -1
  672. package/dist/lib/schemas-data/3.1/enums/sponsored-placement-type.json +1 -1
  673. package/dist/lib/schemas-data/3.1/enums/talent-role.json +1 -1
  674. package/dist/lib/schemas-data/3.1/enums/task-status.json +1 -1
  675. package/dist/lib/schemas-data/3.1/enums/task-type.json +1 -1
  676. package/dist/lib/schemas-data/3.1/enums/transport-mode.json +1 -1
  677. package/dist/lib/schemas-data/3.1/enums/travel-time-unit.json +1 -1
  678. package/dist/lib/schemas-data/3.1/enums/uid-type.json +1 -1
  679. package/dist/lib/schemas-data/3.1/enums/universal-macro.json +1 -1
  680. package/dist/lib/schemas-data/3.1/enums/update-frequency.json +1 -1
  681. package/dist/lib/schemas-data/3.1/enums/url-asset-type.json +1 -1
  682. package/dist/lib/schemas-data/3.1/enums/validation-mode.json +1 -1
  683. package/dist/lib/schemas-data/3.1/enums/vast-tracking-event.json +1 -1
  684. package/dist/lib/schemas-data/3.1/enums/vast-version.json +1 -1
  685. package/dist/lib/schemas-data/3.1/enums/video-placement-type.json +1 -1
  686. package/dist/lib/schemas-data/3.1/enums/viewability-standard.json +1 -1
  687. package/dist/lib/schemas-data/3.1/enums/watermark-media-type.json +1 -1
  688. package/dist/lib/schemas-data/3.1/enums/wcag-level.json +1 -1
  689. package/dist/lib/schemas-data/3.1/enums/webhook-response-type.json +1 -1
  690. package/dist/lib/schemas-data/3.1/enums/webhook-security-method.json +1 -1
  691. package/dist/lib/schemas-data/3.1/error-details/account-setup-required.json +1 -1
  692. package/dist/lib/schemas-data/3.1/error-details/action-not-allowed.json +4 -4
  693. package/dist/lib/schemas-data/3.1/error-details/agent-permission-denied.json +1 -1
  694. package/dist/lib/schemas-data/3.1/error-details/audience-too-small.json +1 -1
  695. package/dist/lib/schemas-data/3.1/error-details/authorization-required.json +3 -3
  696. package/dist/lib/schemas-data/3.1/error-details/billing-not-permitted-for-agent.json +3 -3
  697. package/dist/lib/schemas-data/3.1/error-details/billing-not-supported.json +2 -2
  698. package/dist/lib/schemas-data/3.1/error-details/budget-too-low.json +1 -1
  699. package/dist/lib/schemas-data/3.1/error-details/conflict.json +1 -1
  700. package/dist/lib/schemas-data/3.1/error-details/creative-rejected.json +1 -1
  701. package/dist/lib/schemas-data/3.1/error-details/policy-violation.json +1 -1
  702. package/dist/lib/schemas-data/3.1/error-details/rate-limited.json +1 -1
  703. package/dist/lib/schemas-data/3.1/error-details/stale-response.json +1 -1
  704. package/dist/lib/schemas-data/3.1/error-details/vendor-error-codes.json +1 -1
  705. package/dist/lib/schemas-data/3.1/error-details/version-unsupported.json +2 -2
  706. package/dist/lib/schemas-data/3.1/extensions/extension-meta.json +1 -1
  707. package/dist/lib/schemas-data/3.1/extensions/index.json +2 -2
  708. package/dist/lib/schemas-data/3.1/formats/canonical/_base.json +5 -5
  709. package/dist/lib/schemas-data/3.1/formats/canonical/agent_placement.json +2 -2
  710. package/dist/lib/schemas-data/3.1/formats/canonical/audio_daast.json +2 -2
  711. package/dist/lib/schemas-data/3.1/formats/canonical/audio_hosted.json +2 -2
  712. package/dist/lib/schemas-data/3.1/formats/canonical/display_tag.json +2 -2
  713. package/dist/lib/schemas-data/3.1/formats/canonical/html5.json +2 -2
  714. package/dist/lib/schemas-data/3.1/formats/canonical/image.json +2 -2
  715. package/dist/lib/schemas-data/3.1/formats/canonical/image_carousel.json +2 -2
  716. package/dist/lib/schemas-data/3.1/formats/canonical/native_in_feed.json +2 -2
  717. package/dist/lib/schemas-data/3.1/formats/canonical/responsive_creative.json +2 -2
  718. package/dist/lib/schemas-data/3.1/formats/canonical/sponsored_placement.json +2 -2
  719. package/dist/lib/schemas-data/3.1/formats/canonical/video_hosted.json +2 -2
  720. package/dist/lib/schemas-data/3.1/formats/canonical/video_vast.json +2 -2
  721. package/dist/lib/schemas-data/3.1/governance/attribute-definition.json +1 -1
  722. package/dist/lib/schemas-data/3.1/governance/audience-constraints.json +3 -3
  723. package/dist/lib/schemas-data/3.1/governance/check-governance-request.json +8 -8
  724. package/dist/lib/schemas-data/3.1/governance/check-governance-response.json +7 -7
  725. package/dist/lib/schemas-data/3.1/governance/get-plan-audit-logs-request.json +5 -5
  726. package/dist/lib/schemas-data/3.1/governance/get-plan-audit-logs-response.json +11 -11
  727. package/dist/lib/schemas-data/3.1/governance/policy-category-definition.json +2 -2
  728. package/dist/lib/schemas-data/3.1/governance/policy-entry.json +6 -6
  729. package/dist/lib/schemas-data/3.1/governance/policy-ref.json +1 -1
  730. package/dist/lib/schemas-data/3.1/governance/report-plan-outcome-request.json +7 -7
  731. package/dist/lib/schemas-data/3.1/governance/report-plan-outcome-response.json +5 -5
  732. package/dist/lib/schemas-data/3.1/governance/sync-plans-request.json +14 -14
  733. package/dist/lib/schemas-data/3.1/governance/sync-plans-response.json +6 -6
  734. package/dist/lib/schemas-data/3.1/index.json +443 -443
  735. package/dist/lib/schemas-data/3.1/manifest.json +3 -3
  736. package/dist/lib/schemas-data/3.1/manifest.schema.json +1 -1
  737. package/dist/lib/schemas-data/3.1/media-buy/build-creative-async-response-input-required.json +4 -4
  738. package/dist/lib/schemas-data/3.1/media-buy/build-creative-async-response-submitted.json +4 -4
  739. package/dist/lib/schemas-data/3.1/media-buy/build-creative-async-response-working.json +3 -3
  740. package/dist/lib/schemas-data/3.1/media-buy/build-creative-request.json +16 -16
  741. package/dist/lib/schemas-data/3.1/media-buy/build-creative-response.json +35 -35
  742. package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-async-response-input-required.json +4 -4
  743. package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-async-response-submitted.json +4 -4
  744. package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-async-response-working.json +3 -3
  745. package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-request.json +13 -13
  746. package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-response.json +19 -19
  747. package/dist/lib/schemas-data/3.1/media-buy/get-media-buy-delivery-request.json +23 -23
  748. package/dist/lib/schemas-data/3.1/media-buy/get-media-buy-delivery-response.json +27 -27
  749. package/dist/lib/schemas-data/3.1/media-buy/get-media-buys-request.json +8 -8
  750. package/dist/lib/schemas-data/3.1/media-buy/get-media-buys-response.json +30 -30
  751. package/dist/lib/schemas-data/3.1/media-buy/get-products-async-response-input-required.json +4 -4
  752. package/dist/lib/schemas-data/3.1/media-buy/get-products-async-response-submitted.json +4 -4
  753. package/dist/lib/schemas-data/3.1/media-buy/get-products-async-response-working.json +3 -3
  754. package/dist/lib/schemas-data/3.1/media-buy/get-products-request.json +13 -13
  755. package/dist/lib/schemas-data/3.1/media-buy/get-products-response.json +10 -10
  756. package/dist/lib/schemas-data/3.1/media-buy/list-creative-formats-request.json +13 -13
  757. package/dist/lib/schemas-data/3.1/media-buy/list-creative-formats-response.json +9 -9
  758. package/dist/lib/schemas-data/3.1/media-buy/log-event-request.json +5 -5
  759. package/dist/lib/schemas-data/3.1/media-buy/log-event-response.json +8 -8
  760. package/dist/lib/schemas-data/3.1/media-buy/media-buy-delivery-webhook-result.json +9 -9
  761. package/dist/lib/schemas-data/3.1/media-buy/package-request.json +23 -23
  762. package/dist/lib/schemas-data/3.1/media-buy/package-update.json +13 -13
  763. package/dist/lib/schemas-data/3.1/media-buy/provide-performance-feedback-request.json +7 -7
  764. package/dist/lib/schemas-data/3.1/media-buy/provide-performance-feedback-response.json +8 -8
  765. package/dist/lib/schemas-data/3.1/media-buy/sync-audiences-request.json +8 -8
  766. package/dist/lib/schemas-data/3.1/media-buy/sync-audiences-response.json +14 -14
  767. package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-async-response-input-required.json +3 -3
  768. package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-async-response-submitted.json +4 -4
  769. package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-async-response-working.json +3 -3
  770. package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-request.json +8 -8
  771. package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-response.json +14 -14
  772. package/dist/lib/schemas-data/3.1/media-buy/sync-event-sources-request.json +8 -8
  773. package/dist/lib/schemas-data/3.1/media-buy/sync-event-sources-response.json +14 -14
  774. package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-async-response-input-required.json +3 -3
  775. package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-async-response-submitted.json +4 -4
  776. package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-async-response-working.json +3 -3
  777. package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-request.json +11 -11
  778. package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-response.json +17 -17
  779. package/dist/lib/schemas-data/3.1/pricing-options/cpa-option.json +4 -4
  780. package/dist/lib/schemas-data/3.1/pricing-options/cpc-option.json +4 -4
  781. package/dist/lib/schemas-data/3.1/pricing-options/cpcv-option.json +4 -4
  782. package/dist/lib/schemas-data/3.1/pricing-options/cpm-option.json +4 -4
  783. package/dist/lib/schemas-data/3.1/pricing-options/cpp-option.json +5 -5
  784. package/dist/lib/schemas-data/3.1/pricing-options/cpv-option.json +4 -4
  785. package/dist/lib/schemas-data/3.1/pricing-options/flat-rate-option.json +4 -4
  786. package/dist/lib/schemas-data/3.1/pricing-options/price-breakdown.json +2 -2
  787. package/dist/lib/schemas-data/3.1/pricing-options/price-guidance.json +1 -1
  788. package/dist/lib/schemas-data/3.1/pricing-options/time-option.json +4 -4
  789. package/dist/lib/schemas-data/3.1/pricing-options/vcpm-option.json +4 -4
  790. package/dist/lib/schemas-data/3.1/property/authorization-result.json +1 -1
  791. package/dist/lib/schemas-data/3.1/property/base-property-source.json +4 -4
  792. package/dist/lib/schemas-data/3.1/property/create-property-list-request.json +8 -8
  793. package/dist/lib/schemas-data/3.1/property/create-property-list-response.json +6 -6
  794. package/dist/lib/schemas-data/3.1/property/delete-property-list-request.json +5 -5
  795. package/dist/lib/schemas-data/3.1/property/delete-property-list-response.json +5 -5
  796. package/dist/lib/schemas-data/3.1/property/delivery-record.json +3 -3
  797. package/dist/lib/schemas-data/3.1/property/get-property-list-request.json +5 -5
  798. package/dist/lib/schemas-data/3.1/property/get-property-list-response.json +9 -9
  799. package/dist/lib/schemas-data/3.1/property/list-property-lists-request.json +6 -6
  800. package/dist/lib/schemas-data/3.1/property/list-property-lists-response.json +7 -7
  801. package/dist/lib/schemas-data/3.1/property/property-error.json +2 -2
  802. package/dist/lib/schemas-data/3.1/property/property-feature-definition.json +2 -2
  803. package/dist/lib/schemas-data/3.1/property/property-feature-result.json +4 -4
  804. package/dist/lib/schemas-data/3.1/property/property-feature-value.json +2 -2
  805. package/dist/lib/schemas-data/3.1/property/property-feature.json +1 -1
  806. package/dist/lib/schemas-data/3.1/property/property-list-changed-webhook.json +2 -2
  807. package/dist/lib/schemas-data/3.1/property/property-list-filters.json +5 -5
  808. package/dist/lib/schemas-data/3.1/property/property-list.json +6 -6
  809. package/dist/lib/schemas-data/3.1/property/update-property-list-request.json +8 -8
  810. package/dist/lib/schemas-data/3.1/property/update-property-list-response.json +6 -6
  811. package/dist/lib/schemas-data/3.1/property/validate-property-delivery-request.json +6 -6
  812. package/dist/lib/schemas-data/3.1/property/validate-property-delivery-response.json +6 -6
  813. package/dist/lib/schemas-data/3.1/property/validation-result.json +5 -5
  814. package/dist/lib/schemas-data/3.1/protocol/get-adcp-capabilities-request.json +4 -4
  815. package/dist/lib/schemas-data/3.1/protocol/get-adcp-capabilities-response.json +33 -33
  816. package/dist/lib/schemas-data/3.1/protocol/get-task-status-request.json +5 -5
  817. package/dist/lib/schemas-data/3.1/protocol/get-task-status-response.json +10 -10
  818. package/dist/lib/schemas-data/3.1/protocol/list-tasks-request.json +13 -13
  819. package/dist/lib/schemas-data/3.1/protocol/list-tasks-response.json +8 -8
  820. package/dist/lib/schemas-data/3.1/registries/v1-canonical-mapping.json +5 -5
  821. package/dist/lib/schemas-data/3.1/signals/activate-signal-request.json +6 -6
  822. package/dist/lib/schemas-data/3.1/signals/activate-signal-response.json +9 -9
  823. package/dist/lib/schemas-data/3.1/signals/get-signals-async-response-submitted.json +4 -4
  824. package/dist/lib/schemas-data/3.1/signals/get-signals-async-response-working.json +3 -3
  825. package/dist/lib/schemas-data/3.1/signals/get-signals-request.json +11 -11
  826. package/dist/lib/schemas-data/3.1/signals/get-signals-response.json +17 -17
  827. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-capabilities.json +1 -1
  828. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-context-use.json +1 -1
  829. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-get-offering-request.json +4 -4
  830. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-get-offering-response.json +9 -9
  831. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-identity.json +1 -1
  832. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-initiate-session-request.json +7 -7
  833. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-initiate-session-response.json +10 -10
  834. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-send-message-request.json +5 -5
  835. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-send-message-response.json +10 -10
  836. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-sponsored-context-receipt.json +4 -4
  837. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-sponsored-context.json +4 -4
  838. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-terminate-session-request.json +4 -4
  839. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-terminate-session-response.json +7 -7
  840. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-ui-element.json +1 -1
  841. package/dist/lib/schemas-data/3.1/trusted-match/available-package.json +4 -4
  842. package/dist/lib/schemas-data/3.1/trusted-match/context-match-request.json +5 -5
  843. package/dist/lib/schemas-data/3.1/trusted-match/context-match-response.json +4 -4
  844. package/dist/lib/schemas-data/3.1/trusted-match/error.json +1 -1
  845. package/dist/lib/schemas-data/3.1/trusted-match/identity-match-request.json +4 -4
  846. package/dist/lib/schemas-data/3.1/trusted-match/identity-match-response.json +4 -4
  847. package/dist/lib/schemas-data/3.1/trusted-match/offer-price.json +1 -1
  848. package/dist/lib/schemas-data/3.1/trusted-match/offer.json +5 -5
  849. package/dist/lib/schemas-data/3.1/trusted-match/provider-identity-match-response.json +4 -4
  850. package/dist/lib/schemas-data/3.1/trusted-match/provider-registration.json +2 -2
  851. package/dist/lib/schemas-data/3.1/trusted-match/publisher-tmpx-config.json +1 -1
  852. package/dist/lib/schemas-data/3.1/trusted-match/tmpx-chunk.json +1 -1
  853. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  854. package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js.map +1 -1
  855. package/dist/lib/server/decisioning/runtime/entity-hydration.generated.mjs.map +1 -1
  856. package/dist/lib/server/wire-spec-fields.generated.d.mts +29 -29
  857. package/dist/lib/server/wire-spec-fields.generated.d.ts +29 -29
  858. package/dist/lib/server/wire-spec-fields.generated.js +29 -29
  859. package/dist/lib/server/wire-spec-fields.generated.js.map +1 -1
  860. package/dist/lib/server/wire-spec-fields.generated.mjs +29 -29
  861. package/dist/lib/server/wire-spec-fields.generated.mjs.map +1 -1
  862. package/dist/lib/testing/index.d.mts +1 -1
  863. package/dist/lib/testing/index.d.ts +1 -1
  864. package/dist/lib/testing/index.d.ts.map +1 -1
  865. package/dist/lib/testing/index.js +12 -0
  866. package/dist/lib/testing/index.js.map +1 -1
  867. package/dist/lib/testing/index.mjs +12 -0
  868. package/dist/lib/testing/index.mjs.map +1 -1
  869. package/dist/lib/testing/storyboard/canonical-format-satisfaction.d.mts +6 -0
  870. package/dist/lib/testing/storyboard/canonical-format-satisfaction.d.ts +6 -0
  871. package/dist/lib/testing/storyboard/canonical-format-satisfaction.d.ts.map +1 -1
  872. package/dist/lib/testing/storyboard/canonical-format-satisfaction.js +11 -0
  873. package/dist/lib/testing/storyboard/canonical-format-satisfaction.js.map +1 -1
  874. package/dist/lib/testing/storyboard/canonical-format-satisfaction.mjs +10 -0
  875. package/dist/lib/testing/storyboard/canonical-format-satisfaction.mjs.map +1 -1
  876. package/dist/lib/testing/storyboard/creative-assets.d.mts +5 -0
  877. package/dist/lib/testing/storyboard/creative-assets.d.ts +6 -0
  878. package/dist/lib/testing/storyboard/creative-assets.d.ts.map +1 -0
  879. package/dist/lib/testing/storyboard/creative-assets.js +180 -0
  880. package/dist/lib/testing/storyboard/creative-assets.js.map +1 -0
  881. package/dist/lib/testing/storyboard/creative-assets.mjs +154 -0
  882. package/dist/lib/testing/storyboard/creative-assets.mjs.map +1 -0
  883. package/dist/lib/testing/storyboard/fixture-resolution.d.mts +37 -0
  884. package/dist/lib/testing/storyboard/fixture-resolution.d.ts +38 -0
  885. package/dist/lib/testing/storyboard/fixture-resolution.d.ts.map +1 -0
  886. package/dist/lib/testing/storyboard/fixture-resolution.js +424 -0
  887. package/dist/lib/testing/storyboard/fixture-resolution.js.map +1 -0
  888. package/dist/lib/testing/storyboard/fixture-resolution.mjs +395 -0
  889. package/dist/lib/testing/storyboard/fixture-resolution.mjs.map +1 -0
  890. package/dist/lib/testing/storyboard/index.d.mts +2 -1
  891. package/dist/lib/testing/storyboard/index.d.ts +2 -1
  892. package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
  893. package/dist/lib/testing/storyboard/index.js +13 -0
  894. package/dist/lib/testing/storyboard/index.js.map +1 -1
  895. package/dist/lib/testing/storyboard/index.mjs +14 -0
  896. package/dist/lib/testing/storyboard/index.mjs.map +1 -1
  897. package/dist/lib/testing/storyboard/junit.js +14 -1
  898. package/dist/lib/testing/storyboard/junit.js.map +1 -1
  899. package/dist/lib/testing/storyboard/junit.mjs +14 -1
  900. package/dist/lib/testing/storyboard/junit.mjs.map +1 -1
  901. package/dist/lib/testing/storyboard/loader.d.ts.map +1 -1
  902. package/dist/lib/testing/storyboard/loader.js +2 -0
  903. package/dist/lib/testing/storyboard/loader.js.map +1 -1
  904. package/dist/lib/testing/storyboard/loader.mjs +2 -0
  905. package/dist/lib/testing/storyboard/loader.mjs.map +1 -1
  906. package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
  907. package/dist/lib/testing/storyboard/runner.js +170 -12
  908. package/dist/lib/testing/storyboard/runner.js.map +1 -1
  909. package/dist/lib/testing/storyboard/runner.mjs +175 -13
  910. package/dist/lib/testing/storyboard/runner.mjs.map +1 -1
  911. package/dist/lib/testing/storyboard/seeding.d.mts +10 -3
  912. package/dist/lib/testing/storyboard/seeding.d.ts +10 -3
  913. package/dist/lib/testing/storyboard/seeding.d.ts.map +1 -1
  914. package/dist/lib/testing/storyboard/seeding.js +550 -2
  915. package/dist/lib/testing/storyboard/seeding.js.map +1 -1
  916. package/dist/lib/testing/storyboard/seeding.mjs +555 -2
  917. package/dist/lib/testing/storyboard/seeding.mjs.map +1 -1
  918. package/dist/lib/testing/storyboard/types.d.mts +106 -0
  919. package/dist/lib/testing/storyboard/types.d.ts +106 -0
  920. package/dist/lib/testing/storyboard/types.d.ts.map +1 -1
  921. package/dist/lib/testing/storyboard/types.js +1 -0
  922. package/dist/lib/testing/storyboard/types.js.map +1 -1
  923. package/dist/lib/testing/storyboard/types.mjs +1 -0
  924. package/dist/lib/testing/storyboard/types.mjs.map +1 -1
  925. package/dist/lib/testing/stubs/governance-agent-stub.d.ts.map +1 -1
  926. package/dist/lib/testing/stubs/governance-agent-stub.js +4 -1
  927. package/dist/lib/testing/stubs/governance-agent-stub.js.map +1 -1
  928. package/dist/lib/testing/stubs/governance-agent-stub.mjs +4 -1
  929. package/dist/lib/testing/stubs/governance-agent-stub.mjs.map +1 -1
  930. package/dist/lib/types/core.generated.d.mts +3 -1
  931. package/dist/lib/types/core.generated.d.ts +3 -1
  932. package/dist/lib/types/core.generated.d.ts.map +1 -1
  933. package/dist/lib/types/core.generated.js.map +1 -1
  934. package/dist/lib/types/inline-enums.generated.d.mts +2 -0
  935. package/dist/lib/types/inline-enums.generated.d.ts +2 -0
  936. package/dist/lib/types/inline-enums.generated.d.ts.map +1 -1
  937. package/dist/lib/types/inline-enums.generated.js +3 -0
  938. package/dist/lib/types/inline-enums.generated.js.map +1 -1
  939. package/dist/lib/types/inline-enums.generated.mjs +2 -0
  940. package/dist/lib/types/inline-enums.generated.mjs.map +1 -1
  941. package/dist/lib/types/manifest.generated.d.mts +3 -3
  942. package/dist/lib/types/manifest.generated.d.ts +3 -3
  943. package/dist/lib/types/manifest.generated.js.map +1 -1
  944. package/dist/lib/types/manifest.generated.mjs.map +1 -1
  945. package/dist/lib/types/per-tool-index.json +1 -1
  946. package/dist/lib/validation/schema-loader.d.mts +16 -0
  947. package/dist/lib/validation/schema-loader.d.ts +16 -0
  948. package/dist/lib/validation/schema-loader.d.ts.map +1 -1
  949. package/dist/lib/validation/schema-loader.js +116 -0
  950. package/dist/lib/validation/schema-loader.js.map +1 -1
  951. package/dist/lib/validation/schema-loader.mjs +115 -0
  952. package/dist/lib/validation/schema-loader.mjs.map +1 -1
  953. package/dist/lib/version.d.mts +7 -7
  954. package/dist/lib/version.d.ts +7 -7
  955. package/dist/lib/version.d.ts.map +1 -1
  956. package/dist/lib/version.js +7 -6
  957. package/dist/lib/version.js.map +1 -1
  958. package/dist/lib/version.mjs +7 -6
  959. package/dist/lib/version.mjs.map +1 -1
  960. package/docs/llms.txt +3 -3
  961. package/package.json +2 -2
  962. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/brand/index.yaml +0 -0
  963. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/brand/scenarios/distributed_brand_resolution.yaml +0 -0
  964. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/brand/scenarios/single_side_trust_extension.yaml +0 -0
  965. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/creative/index.yaml +0 -0
  966. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/creative/scenarios/billing_out_of_band.yaml +0 -0
  967. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/creative/scenarios/canonical_supported_formats.yaml +0 -0
  968. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -0
  969. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/creative/scenarios/evaluator_auth.yaml +0 -0
  970. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/creative/scenarios/native_in_feed.yaml +0 -0
  971. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/governance/index.yaml +0 -0
  972. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/index.yaml +0 -0
  973. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/audience_buy_flow.yaml +0 -0
  974. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/available_actions.yaml +0 -0
  975. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/billing_finality_delivery.yaml +0 -0
  976. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/canonical_formats.yaml +0 -0
  977. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/clicks_buy_flow.yaml +0 -0
  978. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/completed_views_buy_flow.yaml +0 -0
  979. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -0
  980. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/creative_reception.yaml +0 -0
  981. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/delivery_reporting.yaml +0 -0
  982. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/dependency_impairment.yaml +0 -0
  983. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/dependency_impairment_audience.yaml +0 -0
  984. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -0
  985. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/event_dedup_flow.yaml +0 -0
  986. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -0
  987. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/get_products_async.yaml +0 -0
  988. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/governance_approved.yaml +0 -0
  989. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/governance_conditions.yaml +0 -0
  990. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/governance_denied.yaml +0 -0
  991. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
  992. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/inline_creatives_without_sync.yaml +0 -0
  993. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/invalid_transitions.yaml +0 -0
  994. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
  995. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
  996. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/measurement_accountability.yaml +0 -0
  997. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
  998. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/package_correlation_legacy_fallback.yaml +0 -0
  999. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
  1000. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -0
  1001. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/performance_buy_flow.yaml +0 -0
  1002. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -0
  1003. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/pricing_currency_filter.yaml +0 -0
  1004. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/product_signal_targeting.yaml +0 -0
  1005. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/proposal_finalize.yaml +0 -0
  1006. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -0
  1007. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/proposal_not_found_errors.yaml +0 -0
  1008. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/provenance_audit_observation.yaml +0 -0
  1009. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/provenance_enforcement.yaml +0 -0
  1010. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -0
  1011. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/reach_buy_flow.yaml +0 -0
  1012. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -0
  1013. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/refine_products.yaml +0 -0
  1014. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/vendor_metric_accountability.yaml +0 -0
  1015. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -0
  1016. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -0
  1017. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/state-machine.yaml +0 -0
  1018. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/signals/index.yaml +0 -0
  1019. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/signals/scenarios/get_signals_async.yaml +0 -0
  1020. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/sponsored-intelligence/index.yaml +0 -0
  1021. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/sponsored-intelligence/sponsored-context-accountability.yaml +0 -0
  1022. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/brand/index.yaml +0 -0
  1023. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/brand/scenarios/distributed_brand_resolution.yaml +0 -0
  1024. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/brand/scenarios/single_side_trust_extension.yaml +0 -0
  1025. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/creative/index.yaml +0 -0
  1026. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/creative/scenarios/billing_out_of_band.yaml +0 -0
  1027. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/creative/scenarios/canonical_supported_formats.yaml +0 -0
  1028. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -0
  1029. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/creative/scenarios/evaluator_auth.yaml +0 -0
  1030. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/creative/scenarios/native_in_feed.yaml +0 -0
  1031. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/governance/index.yaml +0 -0
  1032. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/index.yaml +0 -0
  1033. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/audience_buy_flow.yaml +0 -0
  1034. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/available_actions.yaml +0 -0
  1035. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/billing_finality_delivery.yaml +0 -0
  1036. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/canonical_formats.yaml +0 -0
  1037. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/clicks_buy_flow.yaml +0 -0
  1038. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/completed_views_buy_flow.yaml +0 -0
  1039. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -0
  1040. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/creative_reception.yaml +0 -0
  1041. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -0
  1042. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/dependency_impairment.yaml +0 -0
  1043. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/dependency_impairment_audience.yaml +0 -0
  1044. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -0
  1045. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/event_dedup_flow.yaml +0 -0
  1046. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -0
  1047. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/get_products_async.yaml +0 -0
  1048. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/governance_approved.yaml +0 -0
  1049. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/governance_conditions.yaml +0 -0
  1050. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/governance_denied.yaml +0 -0
  1051. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
  1052. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/inline_creatives_without_sync.yaml +0 -0
  1053. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -0
  1054. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
  1055. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
  1056. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/measurement_accountability.yaml +0 -0
  1057. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
  1058. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/package_correlation_legacy_fallback.yaml +0 -0
  1059. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
  1060. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -0
  1061. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/performance_buy_flow.yaml +0 -0
  1062. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -0
  1063. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/pricing_currency_filter.yaml +0 -0
  1064. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/product_signal_targeting.yaml +0 -0
  1065. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -0
  1066. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -0
  1067. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/proposal_not_found_errors.yaml +0 -0
  1068. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/provenance_audit_observation.yaml +0 -0
  1069. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/provenance_enforcement.yaml +0 -0
  1070. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -0
  1071. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/reach_buy_flow.yaml +0 -0
  1072. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -0
  1073. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/refine_products.yaml +0 -0
  1074. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/vendor_metric_accountability.yaml +0 -0
  1075. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -0
  1076. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -0
  1077. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/state-machine.yaml +0 -0
  1078. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/signals/index.yaml +0 -0
  1079. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/signals/scenarios/get_signals_async.yaml +0 -0
  1080. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/sponsored-intelligence/index.yaml +0 -0
  1081. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/sponsored-intelligence/sponsored-context-accountability.yaml +0 -0
  1082. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/audience-sync/index.yaml +0 -0
  1083. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/brand-rights/index.yaml +0 -0
  1084. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -0
  1085. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/collection-lists/index.yaml +0 -0
  1086. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/content-standards/index.yaml +0 -0
  1087. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/creative-ad-server/index.yaml +0 -0
  1088. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/creative-generative/generative-seller.yaml +0 -0
  1089. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/creative-generative/index.yaml +0 -0
  1090. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/creative-template/index.yaml +0 -0
  1091. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/creative-transformers/index.yaml +0 -0
  1092. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/governance-aware-seller/index.yaml +0 -0
  1093. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/governance-aware-seller/scenarios/governance_multi_agent_rejected.yaml +0 -0
  1094. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/governance-delivery-monitor/index.yaml +0 -0
  1095. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/governance-spend-authority/denied.yaml +0 -0
  1096. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/governance-spend-authority/index.yaml +0 -0
  1097. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/property-lists/index.yaml +0 -0
  1098. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/sales-broadcast-tv/index.yaml +0 -0
  1099. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/sales-catalog-driven/index.yaml +0 -0
  1100. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/sales-guaranteed/index.yaml +0 -0
  1101. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/sales-non-guaranteed/index.yaml +0 -0
  1102. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/sales-proposal-mode/index.yaml +0 -0
  1103. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/sales-social/index.yaml +0 -0
  1104. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/signal-marketplace/index.yaml +0 -0
  1105. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -0
  1106. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/signal-owned/index.yaml +0 -0
  1107. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/sponsored-intelligence/index.yaml +0 -0
  1108. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/acme-outdoor-live.yaml +0 -0
  1109. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/acme-outdoor.yaml +0 -0
  1110. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/billing-gate-runner.yaml +0 -0
  1111. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/bistro-oranje.yaml +0 -0
  1112. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/distributed-brand-runner.yaml +0 -0
  1113. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/nova-motors.yaml +0 -0
  1114. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/osei-natural.yaml +0 -0
  1115. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/parallel-dispatch-runner.yaml +0 -0
  1116. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/rate-limit-trip-runner.yaml +0 -0
  1117. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/signed-requests-runner.yaml +0 -0
  1118. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/single-side-trust-runner.yaml +0 -0
  1119. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/substitution-observer-runner.yaml +0 -0
  1120. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/summit-foods.yaml +0 -0
  1121. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/webhook-receiver-runner.yaml +0 -0
  1122. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/catalog-macro-substitution.json +0 -0
  1123. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/001-minimal-plan.json +0 -0
  1124. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/002-full-plan.json +0 -0
  1125. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -0
  1126. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/004a-human-review-omitted.json +0 -0
  1127. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -0
  1128. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -0
  1129. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -0
  1130. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -0
  1131. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -0
  1132. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/007-unicode-objectives.json +0 -0
  1133. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -0
  1134. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/README.md +0 -0
  1135. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/canonicalization.json +0 -0
  1136. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/keys.json +0 -0
  1137. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/001-no-signature-header.json +0 -0
  1138. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/002-wrong-tag.json +0 -0
  1139. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/003-expired-signature.json +0 -0
  1140. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/004-window-too-long.json +0 -0
  1141. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -0
  1142. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -0
  1143. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -0
  1144. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -0
  1145. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -0
  1146. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -0
  1147. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/011-malformed-header.json +0 -0
  1148. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -0
  1149. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/013-expires-le-created.json +0 -0
  1150. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -0
  1151. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/015-signature-invalid.json +0 -0
  1152. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -0
  1153. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/017-key-revoked.json +0 -0
  1154. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -0
  1155. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -0
  1156. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/020-rate-abuse.json +0 -0
  1157. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -0
  1158. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -0
  1159. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -0
  1160. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -0
  1161. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -0
  1162. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -0
  1163. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -0
  1164. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/028-unsigned-protocol-method-required.json +0 -0
  1165. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/001-basic-post.json +0 -0
  1166. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -0
  1167. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/003-es256-post.json +0 -0
  1168. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -0
  1169. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -0
  1170. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -0
  1171. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -0
  1172. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -0
  1173. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -0
  1174. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -0
  1175. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -0
  1176. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +0 -0
  1177. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-receiver-envelope.json +0 -0
  1178. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/README.md +0 -0
  1179. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/keys.json +0 -0
  1180. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -0
  1181. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -0
  1182. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -0
  1183. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -0
  1184. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -0
  1185. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -0
  1186. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -0
  1187. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -0
  1188. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -0
  1189. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -0
  1190. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -0
  1191. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -0
  1192. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -0
  1193. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -0
  1194. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -0
  1195. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -0
  1196. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -0
  1197. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -0
  1198. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -0
  1199. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -0
  1200. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -0
  1201. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/001-basic-post.json +0 -0
  1202. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/002-es256-post.json +0 -0
  1203. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -0
  1204. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -0
  1205. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -0
  1206. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -0
  1207. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -0
  1208. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/008-request-signing-key-reuse.json +0 -0
  1209. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/billing-gate-dispatch.yaml +0 -0
  1210. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/canonical-format-validate-input.yaml +0 -0
  1211. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/capability-discovery.yaml +0 -0
  1212. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/collection-lists-pagination-integrity.yaml +0 -0
  1213. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/comply-controller-mode-gate.yaml +0 -0
  1214. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/content-standards-pagination-integrity.yaml +0 -0
  1215. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/deterministic-testing.yaml +0 -0
  1216. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/error-compliance-signals.yaml +0 -0
  1217. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/error-compliance.yaml +0 -0
  1218. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/fictional-entities.yaml +0 -0
  1219. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/get-media-buys-pagination-integrity.yaml +0 -0
  1220. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/get-products-pagination-integrity.yaml +0 -0
  1221. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/get-signals-pagination-integrity.yaml +0 -0
  1222. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/idempotency.yaml +0 -0
  1223. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/notification-config-event-scope.yaml +0 -0
  1224. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/notification-config-lifecycle.yaml +0 -0
  1225. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/notification-config-rejections.yaml +0 -0
  1226. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/pagination-integrity-creative-formats.yaml +0 -0
  1227. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/pagination-integrity-list-accounts.yaml +0 -0
  1228. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/pagination-integrity.yaml +0 -0
  1229. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/property-lists-pagination-integrity.yaml +0 -0
  1230. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/read-tool-idempotency.yaml +0 -0
  1231. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/runner-output-contract.yaml +0 -0
  1232. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/schema-validation-signals.yaml +0 -0
  1233. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/schema-validation.yaml +0 -0
  1234. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/security.yaml +0 -0
  1235. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/signed-requests.yaml +0 -0
  1236. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/stale-response-advisory.yaml +0 -0
  1237. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/v3-envelope-integrity.yaml +0 -0
  1238. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/version-negotiation.yaml +0 -0
  1239. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/webhook-emission.yaml +0 -0
  1240. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/webhook-receiver-envelope.yaml +0 -0
  1241. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/wholesale-feed-bulk-webhooks.yaml +0 -0
  1242. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/wholesale-feed-product-webhooks.yaml +0 -0
  1243. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/wholesale-feed-products.yaml +0 -0
  1244. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/wholesale-feed-signal-webhooks.yaml +0 -0
  1245. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/wholesale-feed-signals.yaml +0 -0
  1246. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/brand/index.yaml +0 -0
  1247. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/brand/scenarios/distributed_brand_resolution.yaml +0 -0
  1248. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/brand/scenarios/single_side_trust_extension.yaml +0 -0
  1249. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/creative/index.yaml +0 -0
  1250. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/creative/scenarios/billing_out_of_band.yaml +0 -0
  1251. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/creative/scenarios/canonical_supported_formats.yaml +0 -0
  1252. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -0
  1253. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/creative/scenarios/evaluator_auth.yaml +0 -0
  1254. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/creative/scenarios/native_in_feed.yaml +0 -0
  1255. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/governance/index.yaml +0 -0
  1256. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/index.yaml +0 -0
  1257. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/audience_buy_flow.yaml +0 -0
  1258. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/available_actions.yaml +0 -0
  1259. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/billing_finality_delivery.yaml +0 -0
  1260. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/canonical_formats.yaml +0 -0
  1261. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/clicks_buy_flow.yaml +0 -0
  1262. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/completed_views_buy_flow.yaml +0 -0
  1263. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -0
  1264. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/creative_reception.yaml +0 -0
  1265. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/delivery_reporting.yaml +0 -0
  1266. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/dependency_impairment.yaml +0 -0
  1267. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/dependency_impairment_audience.yaml +0 -0
  1268. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -0
  1269. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/event_dedup_flow.yaml +0 -0
  1270. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -0
  1271. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/get_products_async.yaml +0 -0
  1272. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/governance_approved.yaml +0 -0
  1273. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/governance_conditions.yaml +0 -0
  1274. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/governance_denied.yaml +0 -0
  1275. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
  1276. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/inline_creatives_without_sync.yaml +0 -0
  1277. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/invalid_transitions.yaml +0 -0
  1278. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
  1279. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
  1280. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/measurement_accountability.yaml +0 -0
  1281. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
  1282. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/package_correlation_legacy_fallback.yaml +0 -0
  1283. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
  1284. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -0
  1285. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/performance_buy_flow.yaml +0 -0
  1286. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -0
  1287. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/pricing_currency_filter.yaml +0 -0
  1288. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/product_signal_targeting.yaml +0 -0
  1289. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/proposal_finalize.yaml +0 -0
  1290. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -0
  1291. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/proposal_not_found_errors.yaml +0 -0
  1292. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/provenance_audit_observation.yaml +0 -0
  1293. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/provenance_enforcement.yaml +0 -0
  1294. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -0
  1295. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/reach_buy_flow.yaml +0 -0
  1296. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -0
  1297. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/refine_products.yaml +0 -0
  1298. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/vendor_metric_accountability.yaml +0 -0
  1299. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -0
  1300. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -0
  1301. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/state-machine.yaml +0 -0
  1302. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/signals/index.yaml +0 -0
  1303. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/signals/scenarios/get_signals_async.yaml +0 -0
  1304. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/sponsored-intelligence/index.yaml +0 -0
  1305. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/sponsored-intelligence/sponsored-context-accountability.yaml +0 -0
  1306. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/brand/index.yaml +0 -0
  1307. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/brand/scenarios/distributed_brand_resolution.yaml +0 -0
  1308. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/brand/scenarios/single_side_trust_extension.yaml +0 -0
  1309. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/creative/index.yaml +0 -0
  1310. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/creative/scenarios/billing_out_of_band.yaml +0 -0
  1311. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/creative/scenarios/canonical_supported_formats.yaml +0 -0
  1312. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -0
  1313. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/creative/scenarios/evaluator_auth.yaml +0 -0
  1314. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/creative/scenarios/native_in_feed.yaml +0 -0
  1315. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/governance/index.yaml +0 -0
  1316. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/index.yaml +0 -0
  1317. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/audience_buy_flow.yaml +0 -0
  1318. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/available_actions.yaml +0 -0
  1319. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/billing_finality_delivery.yaml +0 -0
  1320. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/canonical_formats.yaml +0 -0
  1321. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/clicks_buy_flow.yaml +0 -0
  1322. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/completed_views_buy_flow.yaml +0 -0
  1323. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -0
  1324. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/creative_reception.yaml +0 -0
  1325. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -0
  1326. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/dependency_impairment.yaml +0 -0
  1327. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/dependency_impairment_audience.yaml +0 -0
  1328. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -0
  1329. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/event_dedup_flow.yaml +0 -0
  1330. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -0
  1331. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/get_products_async.yaml +0 -0
  1332. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/governance_approved.yaml +0 -0
  1333. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/governance_conditions.yaml +0 -0
  1334. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/governance_denied.yaml +0 -0
  1335. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
  1336. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/inline_creatives_without_sync.yaml +0 -0
  1337. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -0
  1338. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
  1339. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
  1340. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/measurement_accountability.yaml +0 -0
  1341. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
  1342. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/package_correlation_legacy_fallback.yaml +0 -0
  1343. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
  1344. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -0
  1345. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/performance_buy_flow.yaml +0 -0
  1346. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -0
  1347. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/pricing_currency_filter.yaml +0 -0
  1348. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/product_signal_targeting.yaml +0 -0
  1349. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -0
  1350. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -0
  1351. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/proposal_not_found_errors.yaml +0 -0
  1352. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/provenance_audit_observation.yaml +0 -0
  1353. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/provenance_enforcement.yaml +0 -0
  1354. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -0
  1355. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/reach_buy_flow.yaml +0 -0
  1356. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -0
  1357. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/refine_products.yaml +0 -0
  1358. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/vendor_metric_accountability.yaml +0 -0
  1359. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -0
  1360. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -0
  1361. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/state-machine.yaml +0 -0
  1362. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/signals/index.yaml +0 -0
  1363. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/signals/scenarios/get_signals_async.yaml +0 -0
  1364. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/sponsored-intelligence/index.yaml +0 -0
  1365. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/sponsored-intelligence/sponsored-context-accountability.yaml +0 -0
  1366. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/audience-sync/index.yaml +0 -0
  1367. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/brand-rights/index.yaml +0 -0
  1368. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -0
  1369. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/collection-lists/index.yaml +0 -0
  1370. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/content-standards/index.yaml +0 -0
  1371. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/creative-ad-server/index.yaml +0 -0
  1372. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/creative-generative/generative-seller.yaml +0 -0
  1373. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/creative-generative/index.yaml +0 -0
  1374. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/creative-template/index.yaml +0 -0
  1375. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/creative-transformers/index.yaml +0 -0
  1376. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/governance-aware-seller/index.yaml +0 -0
  1377. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/governance-aware-seller/scenarios/governance_multi_agent_rejected.yaml +0 -0
  1378. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/governance-delivery-monitor/index.yaml +0 -0
  1379. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/governance-spend-authority/denied.yaml +0 -0
  1380. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/governance-spend-authority/index.yaml +0 -0
  1381. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/property-lists/index.yaml +0 -0
  1382. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/sales-broadcast-tv/index.yaml +0 -0
  1383. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/sales-catalog-driven/index.yaml +0 -0
  1384. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/sales-guaranteed/index.yaml +0 -0
  1385. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/sales-non-guaranteed/index.yaml +0 -0
  1386. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/sales-proposal-mode/index.yaml +0 -0
  1387. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/sales-social/index.yaml +0 -0
  1388. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/signal-marketplace/index.yaml +0 -0
  1389. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -0
  1390. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/signal-owned/index.yaml +0 -0
  1391. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/sponsored-intelligence/index.yaml +0 -0
  1392. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/acme-outdoor-live.yaml +0 -0
  1393. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/acme-outdoor.yaml +0 -0
  1394. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/billing-gate-runner.yaml +0 -0
  1395. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/bistro-oranje.yaml +0 -0
  1396. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/distributed-brand-runner.yaml +0 -0
  1397. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/nova-motors.yaml +0 -0
  1398. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/osei-natural.yaml +0 -0
  1399. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/parallel-dispatch-runner.yaml +0 -0
  1400. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/rate-limit-trip-runner.yaml +0 -0
  1401. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/signed-requests-runner.yaml +0 -0
  1402. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/single-side-trust-runner.yaml +0 -0
  1403. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/substitution-observer-runner.yaml +0 -0
  1404. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/summit-foods.yaml +0 -0
  1405. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/webhook-receiver-runner.yaml +0 -0
  1406. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/catalog-macro-substitution.json +0 -0
  1407. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/001-minimal-plan.json +0 -0
  1408. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/002-full-plan.json +0 -0
  1409. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -0
  1410. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/004a-human-review-omitted.json +0 -0
  1411. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -0
  1412. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -0
  1413. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -0
  1414. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -0
  1415. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -0
  1416. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/007-unicode-objectives.json +0 -0
  1417. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -0
  1418. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/README.md +0 -0
  1419. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/canonicalization.json +0 -0
  1420. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/keys.json +0 -0
  1421. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/001-no-signature-header.json +0 -0
  1422. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/002-wrong-tag.json +0 -0
  1423. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/003-expired-signature.json +0 -0
  1424. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/004-window-too-long.json +0 -0
  1425. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -0
  1426. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -0
  1427. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -0
  1428. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -0
  1429. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -0
  1430. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -0
  1431. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/011-malformed-header.json +0 -0
  1432. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -0
  1433. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/013-expires-le-created.json +0 -0
  1434. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -0
  1435. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/015-signature-invalid.json +0 -0
  1436. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -0
  1437. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/017-key-revoked.json +0 -0
  1438. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -0
  1439. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -0
  1440. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/020-rate-abuse.json +0 -0
  1441. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -0
  1442. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -0
  1443. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -0
  1444. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -0
  1445. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -0
  1446. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -0
  1447. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -0
  1448. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/028-unsigned-protocol-method-required.json +0 -0
  1449. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/001-basic-post.json +0 -0
  1450. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -0
  1451. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/003-es256-post.json +0 -0
  1452. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -0
  1453. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -0
  1454. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -0
  1455. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -0
  1456. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -0
  1457. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -0
  1458. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -0
  1459. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -0
  1460. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +0 -0
  1461. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-receiver-envelope.json +0 -0
  1462. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/README.md +0 -0
  1463. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/keys.json +0 -0
  1464. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -0
  1465. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -0
  1466. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -0
  1467. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -0
  1468. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -0
  1469. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -0
  1470. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -0
  1471. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -0
  1472. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -0
  1473. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -0
  1474. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -0
  1475. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -0
  1476. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -0
  1477. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -0
  1478. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -0
  1479. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -0
  1480. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -0
  1481. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -0
  1482. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -0
  1483. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -0
  1484. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -0
  1485. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/001-basic-post.json +0 -0
  1486. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/002-es256-post.json +0 -0
  1487. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -0
  1488. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -0
  1489. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -0
  1490. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -0
  1491. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -0
  1492. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/008-request-signing-key-reuse.json +0 -0
  1493. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/billing-gate-dispatch.yaml +0 -0
  1494. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/canonical-format-validate-input.yaml +0 -0
  1495. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/capability-discovery.yaml +0 -0
  1496. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/collection-lists-pagination-integrity.yaml +0 -0
  1497. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/comply-controller-mode-gate.yaml +0 -0
  1498. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/content-standards-pagination-integrity.yaml +0 -0
  1499. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/deterministic-testing.yaml +0 -0
  1500. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/error-compliance-signals.yaml +0 -0
  1501. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/error-compliance.yaml +0 -0
  1502. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/fictional-entities.yaml +0 -0
  1503. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/get-media-buys-pagination-integrity.yaml +0 -0
  1504. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/get-products-pagination-integrity.yaml +0 -0
  1505. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/get-signals-pagination-integrity.yaml +0 -0
  1506. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/idempotency.yaml +0 -0
  1507. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/notification-config-event-scope.yaml +0 -0
  1508. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/notification-config-lifecycle.yaml +0 -0
  1509. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/notification-config-rejections.yaml +0 -0
  1510. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/pagination-integrity-creative-formats.yaml +0 -0
  1511. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/pagination-integrity-list-accounts.yaml +0 -0
  1512. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/pagination-integrity.yaml +0 -0
  1513. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/property-lists-pagination-integrity.yaml +0 -0
  1514. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/read-tool-idempotency.yaml +0 -0
  1515. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/runner-output-contract.yaml +0 -0
  1516. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/schema-validation-signals.yaml +0 -0
  1517. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/schema-validation.yaml +0 -0
  1518. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/security.yaml +0 -0
  1519. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/signed-requests.yaml +0 -0
  1520. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/stale-response-advisory.yaml +0 -0
  1521. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/v3-envelope-integrity.yaml +0 -0
  1522. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/version-negotiation.yaml +0 -0
  1523. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/webhook-emission.yaml +0 -0
  1524. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/webhook-receiver-envelope.yaml +0 -0
  1525. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/wholesale-feed-bulk-webhooks.yaml +0 -0
  1526. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/wholesale-feed-product-webhooks.yaml +0 -0
  1527. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/wholesale-feed-products.yaml +0 -0
  1528. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/wholesale-feed-signal-webhooks.yaml +0 -0
  1529. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/wholesale-feed-signals.yaml +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/protocols/index.ts"],"sourcesContent":["import { fileURLToPath as __adcpFileURLToPath } from 'node:url';\nimport { dirname as __adcpDirname } from 'node:path';\nimport { createRequire as __adcpCreateRequire } from 'node:module';\nconst __dirname = __adcpDirname(__adcpFileURLToPath(import.meta.url));\nconst require = __adcpCreateRequire(import.meta.url);\n// Unified Protocol Interface for AdCP\nexport {\n callMCPTool,\n callMCPToolWithOAuth,\n connectMCP,\n closeMCPConnections,\n closeOAuthConnections,\n UnauthorizedError,\n} from './mcp';\n\nimport { closeMCPConnections } from './mcp';\nimport { closeA2AConnections } from './a2a';\n\n/**\n * Close protocol connections for the given protocol.\n * MCP closes persistent HTTP transports; A2A clears the agent-card client cache.\n */\nexport async function closeConnections(protocol: 'mcp' | 'a2a' = 'mcp'): Promise<void> {\n if (protocol === 'mcp') {\n await closeMCPConnections();\n } else {\n closeA2AConnections();\n }\n}\nexport type { MCPCallOptions, MCPConnectionResult } from './mcp';\nexport { callA2ATool } from './a2a';\nexport { DEFAULT_REQUEST_TIMEOUT_MS } from './abort';\nexport {\n callMCPToolWithTasks,\n getMCPTaskStatus,\n getMCPTaskResult,\n listMCPTasks,\n cancelMCPTask,\n mapMCPTaskStatus,\n serverSupportsTasks,\n} from './mcp-tasks';\n\nimport { callMCPToolWithTasks, callMCPToolWithClient } from './mcp-tasks';\nimport { callMCPToolWithOAuth } from './mcp';\nimport { callA2ATool } from './a2a';\nimport type { AgentConfig, DebugLogEntry } from '../types';\nimport type { PushNotificationConfig } from '../types/tools.generated';\nimport { getAuthToken } from '../auth';\nimport {\n discoverAuthorizationRequirements,\n NeedsAuthorizationError,\n getAgentStorage,\n ensureClientCredentialsTokens,\n} from '../auth/oauth';\nimport { getNonInteractiveOAuthProvider } from '../auth/oauth/provider-cache';\nimport { is401Error } from '../errors';\nimport { isLikelyPrivateUrl } from '../net';\nimport { validateAgentUrl } from '../validation';\nimport { withSpan } from '../observability/tracing';\nimport { ADCP_MAJOR_VERSION, ADCP_VERSION, parseAdcpMajorVersion } from '../version';\nimport { ConfigurationError } from '../errors';\nimport { resolveBundleKey, toReleasePrecisionWire, validateAdcpVersionWire } from '../validation/schema-loader';\nimport { buildAgentSigningContext, CAPABILITY_OP, ensureCapabilityLoaded } from '../signing/client';\nimport { withResponseSizeLimit } from './responseSizeLimit';\nimport {\n withTransportDiagnostics,\n type TransportActivityHandler as TransportActivityHandlerFn,\n} from './transportDiagnostics';\n\nexport {\n sanitizeTransportHeaders,\n sanitizeTransportUrl,\n withTransportDiagnostics,\n wrapFetchWithTransportDiagnostics,\n} from './transportDiagnostics';\nexport type { TransportActivity, TransportActivityContext, TransportActivityHandler } from './transportDiagnostics';\n\nexport type VersionEnvelopeMode = 'auto' | 'none' | 'major-only';\n\n/**\n * Derive the wire-level `adcp_major_version` integer from a caller-supplied\n * pin. Returns the SDK default when no pin is provided; throws on a pin\n * that doesn't parse so misuse surfaces at the factory boundary instead\n * of silently emitting the SDK's major.\n *\n * Throws `ConfigurationError` (not a plain `Error`) so a typo'd pin\n * surfaces with the same error class as the construction-time gate in\n * `resolveAdcpVersion` — one shape for all pin-misuse paths.\n */\nfunction resolveWireMajor(adcpVersion: string | undefined): number {\n if (adcpVersion === undefined) return ADCP_MAJOR_VERSION;\n const parsed = parseAdcpMajorVersion(adcpVersion);\n if (!Number.isFinite(parsed)) {\n throw new ConfigurationError(\n `adcpVersion ${JSON.stringify(adcpVersion)} is not a valid AdCP version. ` +\n `Expected a semver string (e.g. '3.0.1', '3.1.0-beta.1') or a legacy alias (e.g. 'v3').`,\n 'adcpVersion'\n );\n }\n return parsed;\n}\n\n/**\n * Returns true when the AdCP release that `bundleKey` identifies declares the\n * top-level `adcp_version` envelope field. The field landed in AdCP 3.1 per\n * spec PR `adcontextprotocol/adcp#3493` — 3.0 (any patch / prerelease) does\n * not carry it; 3.1+ does. Used to gate dual-emit on the wire so a 3.0-pinned\n * client doesn't emit a field its target schema doesn't define.\n */\nexport function bundleSupportsAdcpVersionField(bundleKey: string): boolean {\n const major = parseAdcpMajorVersion(bundleKey);\n if (!Number.isFinite(major)) return false;\n if (major < 3) return false;\n if (major > 3) return true;\n // Major 3 — only 3.1+ has the field. Bundle key shape is normalized by\n // `resolveBundleKey`: `'3.0'` / `'3.1'` for stable; `'3.0.0-beta.1'` /\n // `'3.1.0-beta.1'` for prereleases. Match the minor.\n const minorMatch = bundleKey.match(/^\\d+\\.(\\d+)/);\n if (!minorMatch) return false;\n return parseInt(minorMatch[1]!, 10) >= 1;\n}\n\n/**\n * Build the wire-level version envelope to merge into outgoing request args.\n *\n * Per AdCP 3.1 (spec PR `adcontextprotocol/adcp#3493`), 3.1+ requests carry\n * BOTH the integer `adcp_major_version` (deprecated through 3.x, removed in\n * 4.0) AND the release-precision string `adcp_version`. 3.0 schemas don't\n * define the string field, so a 3.0-pinned client emits the integer only —\n * matches the 3.0 spec exactly.\n *\n * Wire string is release-precision (MAJOR.MINOR with optional prerelease tag),\n * per `core/version-envelope.json`'s pattern `^\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?$`.\n * Full-semver bundle keys (`'3.1.0-beta.1'`) are collapsed via\n * `toReleasePrecisionWire` to `'3.1-beta.1'` before emit — meta-field shapes\n * are explicitly NOT valid wire values per the envelope schema's own\n * normalization rule.\n *\n * Returns `{}` for v2 callers (predates the major-version field entirely).\n */\nfunction buildVersionEnvelope(\n adcpVersion: string | undefined,\n serverVersion: 'v2' | 'v3' | undefined\n): Record<string, unknown> {\n if (serverVersion === 'v2') return {};\n const wireMajor = resolveWireMajor(adcpVersion);\n const bundleKey = resolveBundleKey(adcpVersion ?? ADCP_VERSION);\n if (!bundleSupportsAdcpVersionField(bundleKey)) {\n return { adcp_major_version: wireMajor };\n }\n const wireValue = toReleasePrecisionWire(bundleKey);\n // Defensive postcondition — should never throw in well-formed code, but\n // if a future refactor breaks the normalization the error message tells\n // the developer to call `toReleasePrecisionWire` instead of silently\n // emitting a non-spec wire string.\n validateAdcpVersionWire(wireValue);\n return { adcp_major_version: wireMajor, adcp_version: wireValue };\n}\n\nlet hasWarnedAboutV2PushNotificationSecret = false;\n\n/**\n * Warn once when an async webhook registration is suppressed for a v2 seller.\n *\n * v2.5's `push-notification-config.json` requires `authentication`, and unlike\n * 3.x it has no RFC 9421 selector semantics — so omitting the block produces a\n * schema-invalid request rather than choosing a signing mode. Without a\n * configured secret there is no honest value to send, and the previous\n * behaviour (a hardcoded placeholder credential) told the seller the channel\n * was authenticated by a constant published in this package.\n */\nfunction warnV2PushNotificationNeedsSecret(): void {\n if (hasWarnedAboutV2PushNotificationSecret) return;\n hasWarnedAboutV2PushNotificationSecret = true;\n console.warn(\n '[adcp] Suppressing push_notification_config for a v2 seller: AdCP 2.5 requires an ' +\n '`authentication` block and no `webhookSecret` is configured. Set `webhookSecret` to register ' +\n 'async task-status webhooks with this agent, or move the agent to an AdCP 3.x pin, where the ' +\n 'RFC 9421 webhook profile needs no shared secret.'\n );\n}\n\nfunction buildVersionEnvelopeForMode(\n mode: VersionEnvelopeMode,\n adcpVersion: string | undefined,\n serverVersion: 'v2' | 'v3' | undefined\n): Record<string, unknown> {\n if (mode === 'none' || serverVersion === 'v2') return {};\n if (mode === 'major-only') return { adcp_major_version: resolveWireMajor(adcpVersion) };\n return buildVersionEnvelope(adcpVersion, serverVersion);\n}\n\n/**\n * Merge the wire-level version envelope into a caller-supplied args object.\n * Caller args win: an explicit `adcp_major_version` / `adcp_version` in\n * `args` (e.g. a conformance harness probing `VERSION_UNSUPPORTED`) passes\n * through unchanged. The envelope only fills fields the caller didn't set.\n *\n * Single chokepoint for all four wire-injection sites so a future refactor\n * can't silently flip the spread order on one branch and leave the others\n * intact. Stale dual-field drift is caught at the server boundary by\n * `createAdcpServer`'s field-disagreement check (spec PR\n * `adcontextprotocol/adcp#3493`).\n *\n * @internal\n */\nexport function applyVersionEnvelope(\n args: Record<string, unknown>,\n envelope: Record<string, unknown>\n): Record<string, unknown> {\n return { ...envelope, ...args };\n}\n\n/**\n * Transport-level safeguards applied to a call.\n *\n * Wired into the SDK's internal fetch chain via AsyncLocalStorage, so the\n * cap takes effect even when the underlying transport's connection cache\n * reuses a fetch that was created on an earlier call with different limits.\n */\nexport interface TransportOptions {\n /**\n * Maximum response body size (in octets) the SDK will read before aborting\n * with `ResponseTooLargeError`. When unset, the SDK does not impose a cap —\n * matches the underlying MCP / A2A transport defaults.\n *\n * Set this when crawling **untrusted** agents (registries, federated\n * discovery layers, monitoring tools) to prevent a hostile vendor from\n * buffering a large reply before any application-layer schema validation\n * runs. Counted across response chunks; pre-cancels when `Content-Length`\n * exceeds the cap. Applies to A2A agent-card discovery\n * (`/.well-known/agent.json`) on the same call as well.\n *\n * Per-call override (`TaskOptions.transport.maxResponseBytes`) beats the\n * value set on the client constructor (`SingleAgentClientConfig.transport`).\n *\n * @remarks\n * **Safe to set on all calls.** SSE responses (`text/event-stream`) are\n * passed through unchanged — a single tool call legitimately emits N status\n * frames + a final result, bounded by protocol-level framing rather than\n * cumulative byte counts. The cap applies to one-shot JSON responses\n * (`get_adcp_capabilities`, agent-card lookup, tool result payloads on\n * non-streaming transports) where the body is bounded by definition.\n *\n * @remarks\n * **Hostile-peer note:** A peer can opt itself out of this cap by responding\n * with `Content-Type: text/event-stream`. SSE is bypassed because cumulative\n * event-frame bytes are unbounded by spec — MCP and A2A both stream tool\n * responses this way. The MCP/A2A SDKs consume SSE incrementally and frame\n * termination bounds memory in practice, so this is not a memory-bomb risk\n * for well-formed transports. Adopters relying on `maxResponseBytes` as a\n * hostile-server defense should treat it as best-effort for non-SSE\n * responses only.\n *\n * @remarks\n * Future hardening knobs (DNS-rebind defense, scheme allow-list, request\n * timeout overrides) will land here as additional fields. When `fetchFn`\n * is supplied, the SDK composes it inside its signing, capture, size-limit,\n * timeout, and diagnostics wrappers so callers do not have to reproduce\n * that non-obvious ordering themselves.\n */\n maxResponseBytes?: number;\n /**\n * Scoped fetch implementation for all outbound HTTP performed on behalf of\n * this client or call, including endpoint/card discovery, tool listing,\n * OAuth discovery and token refresh, and MCP/A2A tool requests.\n *\n * The function is runtime-only configuration and is never serialized into\n * agent records, storyboard artifacts, or compliance output. When unset,\n * the SDK uses the global `fetch` implementation.\n *\n * For SSRF-sensitive metadata probes, supplying this function makes it the\n * trusted network boundary: the SDK still validates schemes and resolved\n * addresses, but a custom fetch API cannot accept the SDK's pinned undici\n * dispatcher. The implementation must therefore prevent DNS rebinding (for\n * example with an egress proxy or its own DNS pinning).\n */\n fetchFn?: typeof fetch;\n /**\n * Timeout in milliseconds for bounded one-shot transport requests such as\n * A2A agent-card discovery and MCP read-path probes. Defaults to 60 seconds\n * for A2A discovery so an unresponsive card endpoint cannot hang forever.\n * Set to `0` to disable the SDK-imposed discovery timeout.\n */\n requestTimeoutMs?: number;\n}\n\n/**\n * Options for {@link ProtocolClient.callTool}. All fields are optional.\n *\n * `webhookUrl` / `webhookSecret` / `webhookToken` are for ASYNC TASK STATUS\n * notifications (push_notification_config). For reporting webhooks\n * (reporting_webhook), include them directly in `args` — they stay in skill\n * parameters and are sent verbatim to the agent.\n */\nexport interface CallToolOptions {\n /** Debug log array. Mutated in place by the protocol layer. */\n debugLogs?: DebugLogEntry[];\n /** URL for async task status notifications. */\n webhookUrl?: string;\n /** HMAC-SHA256 secret for push_notification_config authentication. */\n webhookSecret?: string;\n /** Bearer token for push_notification_config validation. */\n webhookToken?: string;\n /** Pinned protocol generation when the agent advertises both v2 and v3. */\n serverVersion?: 'v2' | 'v3';\n /** A2A session continuity (contextId carries conversation, taskId resumes a task). */\n session?: { contextId?: string; taskId?: string };\n /**\n * AdCP version pin from the calling client/server instance. Sets the\n * wire-level `adcp_major_version` field per-call instead of from the\n * SDK-pinned `ADCP_MAJOR_VERSION` constant. Default falls back to the\n * constant so call sites that don't plumb a per-instance version keep\n * their existing behavior. An explicit `adcp_major_version` /\n * `adcp_version` in `args` overrides this — conformance harnesses use\n * that path to probe seller version negotiation.\n */\n adcpVersion?: string;\n /**\n * Optional wire-only version override. Schema selection and client\n * construction can remain pinned to `adcpVersion`; the request envelope is\n * emitted for this release-precision line.\n */\n wireAdcpVersion?: string;\n /**\n * Controls whether the SDK injects AdCP version envelope fields into the\n * outgoing request. Defaults to `auto`. 3.0 pins emit only the legacy\n * `adcp_major_version`; 3.1+ pins emit both the legacy major and exact\n * `adcp_version` marker. `major-only` forces the legacy integer marker\n * without the 3.1 string marker for strict pre-3.1 peers discovered at\n * runtime.\n */\n versionEnvelope?: VersionEnvelopeMode;\n /**\n * Transport-level safeguards (size caps, etc.). Per-call override of any\n * matching field on the client constructor's `transport` option.\n */\n transport?: TransportOptions;\n /** Caller-owned cancellation signal for the in-flight protocol call. */\n signal?: AbortSignal;\n /** Transport-level diagnostics callback for outbound HTTP requests. */\n onTransportActivity?: TransportActivityHandlerFn;\n /**\n * Correlation metadata attached to transport diagnostics events emitted\n * while this protocol call is active.\n */\n transportActivityContext?: {\n operationId?: string;\n taskId?: string;\n contextId?: string;\n idempotencyKey?: string;\n };\n}\n\n/**\n * Universal protocol client - automatically routes to the correct protocol implementation\n */\nexport class ProtocolClient {\n /**\n * Call a tool on an agent using the appropriate protocol.\n *\n * @param agent - Agent configuration\n * @param toolName - Name of the tool/skill to call\n * @param args - Tool arguments (includes reporting_webhook if needed - NOT removed)\n * @param options - Optional call-level configuration. See {@link CallToolOptions}.\n */\n static async callTool(\n agent: AgentConfig,\n toolName: string,\n args: Record<string, unknown>,\n options: CallToolOptions = {}\n ): Promise<unknown> {\n const {\n debugLogs = [],\n webhookUrl,\n webhookSecret,\n webhookToken,\n serverVersion,\n session,\n adcpVersion,\n wireAdcpVersion,\n versionEnvelope: versionEnvelopeMode = 'auto',\n transport,\n signal,\n onTransportActivity,\n transportActivityContext,\n } = options;\n // Per-instance version envelope. Throws on unparseable pins via\n // `resolveWireMajor`; construction-time `resolveAdcpVersion` is the\n // primary gate but this is the failsafe for callers reaching\n // `ProtocolClient.callTool` directly (test harnesses, the in-process\n // MCP path). Returns `{ adcp_major_version }` for 3.0 pins and\n // `{ adcp_major_version, adcp_version }` for 3.1+ pins.\n const versionEnvelope = buildVersionEnvelopeForMode(\n versionEnvelopeMode,\n wireAdcpVersion ?? adcpVersion,\n serverVersion\n );\n // Enter the response-size-limit ALS slot once for this call. The slot is\n // read by `wrapFetchWithSizeLimit` in both protocol transports, so the\n // cap applies regardless of which path (MCP / A2A / OAuth refresh) the\n // call ends up taking. No-op when the cap is unset or non-positive.\n return withResponseSizeLimit(transport?.maxResponseBytes, () =>\n withTransportDiagnostics(\n {\n agentId: agent.id,\n protocol: agent.protocol,\n tool: toolName,\n taskType: toolName,\n ...transportActivityContext,\n onTransportActivity,\n },\n () =>\n withSpan(\n `adcp.${agent.protocol}.call_tool`,\n {\n 'adcp.agent_id': agent.id,\n 'adcp.protocol': agent.protocol,\n 'adcp.tool': toolName,\n 'http.url': agent.agent_uri,\n },\n async () => {\n // In-process MCP path: pre-connected client, no HTTP transport.\n // Idempotency injection, schema validation, and governance middleware all\n // still apply (they run in SingleAgentClient above this call). We skip\n // URL validation, OAuth refresh, and signing — none apply in-process.\n if (agent.protocol === 'mcp' && agent._inProcessMcpClient) {\n const inProcArgs = applyVersionEnvelope(args, versionEnvelope);\n return callMCPToolWithClient(agent._inProcessMcpClient, toolName, inProcArgs, debugLogs, {\n ...(signal && { signal }),\n ...(transport?.requestTimeoutMs !== undefined && { requestTimeoutMs: transport.requestTimeoutMs }),\n });\n }\n\n validateAgentUrl(agent.agent_uri);\n\n // OAuth 2.0 client credentials (RFC 6749 §4.4): re-exchange the\n // secret for a fresh access token whenever the cached one is within\n // its expiration skew. Runs before every call so mid-session expiry\n // can't leave the caller with a stale bearer. No-op if the agent\n // doesn't declare client credentials. Cheap on warm cache (single\n // `Date.now()` compare); a single POST to the token endpoint on miss.\n //\n // `allowPrivateIp` inherits the trust the caller already placed in\n // `agent.agent_uri` — if they're making a call to a private-IP agent,\n // they've authorized this process to talk to private-IP hosts, so\n // the token endpoint on the same network is reachable too. Public\n // agent URLs with private-IP token endpoints still require an\n // explicit opt-in via the library API.\n if (agent.oauth_client_credentials) {\n const ccStorage = getAgentStorage(agent);\n const allowPrivateIp = isLikelyPrivateUrl(agent.agent_uri);\n await ensureClientCredentialsTokens(agent, {\n storage: ccStorage,\n allowPrivateIp,\n fetch: transport?.fetchFn,\n });\n }\n\n const authToken = getAuthToken(agent);\n\n // RFC 9421 signing context. Built once per call and passed through\n // to each protocol-layer entry (`callMCPToolWithTasks`, `callA2ATool`,\n // `callMCPToolWithOAuth`) — those entries seed `signingContextStorage`\n // (AsyncLocalStorage) so the internal transport helpers read it\n // without an explicit parameter. Keep the explicit arg here: it's the\n // ALS seed, not incidental plumbing. `get_adcp_capabilities` is\n // exempt from signing (it's the discovery call itself) and also\n // triggers cache priming for any other op on agents with\n // `request_signing` configured.\n const signingContext = buildAgentSigningContext(agent);\n if (signingContext && toolName !== CAPABILITY_OP) {\n await ensureCapabilityLoaded(agent, signingContext, primeArgs =>\n ProtocolClient.callTool(agent, CAPABILITY_OP, primeArgs, {\n debugLogs,\n serverVersion,\n adcpVersion,\n ...(versionEnvelopeMode !== 'auto' && { versionEnvelope: versionEnvelopeMode }),\n transport,\n signal,\n ...(transport?.requestTimeoutMs !== undefined && { requestTimeoutMs: transport.requestTimeoutMs }),\n onTransportActivity,\n transportActivityContext,\n })\n );\n }\n\n // Inject the version envelope on every request so sellers can validate\n // compatibility. Skip for v2 servers — they don't recognise the\n // version fields and strict-schema agents reject them. The envelope\n // shape is per-pin: 3.0 pins get the integer `adcp_major_version`\n // alone; 3.1+ pins get both that and the release-precision string\n // `adcp_version` (`'3.1'` / `'3.1.0-beta.1'`) per spec PR\n // `adcontextprotocol/adcp#3493`.\n const argsWithVersion = applyVersionEnvelope(args, versionEnvelope);\n\n // Build push_notification_config for ASYNC TASK STATUS notifications\n // (NOT for reporting_webhook - that stays in args)\n // Schema: https://adcontextprotocol.org/schemas/v1/core/push-notification-config.json\n // `authentication` is a scheme SELECTOR, not a fallback: from AdCP\n // 3.0 on, push-notification-config.json makes its presence opt the\n // seller into legacy HMAC-SHA256 and its absence select the RFC\n // 9421 webhook profile, with `required: [\"url\"]` only. Emitting it\n // with a placeholder credential would therefore downgrade every\n // webhook to legacy HMAC keyed by a constant that ships in this\n // file, so the block is omitted unless a real secret backs it.\n //\n // v2.5 predates the selector: there `required` is\n // `[\"url\", \"authentication\"]` and there is no 9421 path, so an\n // omitted block is schema-invalid rather than a mode selection.\n // With no secret there is nothing honest to send a v2 seller, so\n // suppress the registration instead of fabricating a credential.\n const pushNotificationConfig: PushNotificationConfig | undefined = (():\n | PushNotificationConfig\n | undefined => {\n if (!webhookUrl) return undefined;\n if (webhookSecret) {\n return {\n url: webhookUrl,\n ...(webhookToken && { token: webhookToken }),\n authentication: {\n schemes: ['HMAC-SHA256' as const],\n credentials: webhookSecret,\n },\n };\n }\n if (serverVersion === 'v2') {\n warnV2PushNotificationNeedsSecret();\n return undefined;\n }\n return {\n url: webhookUrl,\n ...(webhookToken && { token: webhookToken }),\n };\n })();\n\n if (agent.protocol === 'mcp') {\n // For MCP, include push_notification_config in tool arguments (MCP spec)\n const argsWithWebhook = pushNotificationConfig\n ? { ...argsWithVersion, push_notification_config: pushNotificationConfig }\n : argsWithVersion;\n\n // If the agent config carries authorization-code OAuth tokens,\n // route through the OAuth provider path so the MCP SDK can refresh\n // on 401 instead of hard-failing. Excludes client-credentials\n // agents: they have a cached access token but no refresh_token,\n // and their refresh path is a secret re-exchange (handled above),\n // not the SDK's refresh_token grant.\n if (agent.oauth_tokens && !agent.oauth_client_credentials) {\n const authProvider = getNonInteractiveOAuthProvider(agent, {\n agentHint: agent.id,\n storage: getAgentStorage(agent),\n allowHttp: isLikelyPrivateUrl(agent.agent_uri),\n });\n try {\n return await callMCPToolWithOAuth({\n agentUrl: agent.agent_uri,\n toolName,\n args: argsWithWebhook,\n authProvider,\n debugLogs,\n customHeaders: agent.headers,\n signingContext,\n signal,\n requestTimeoutMs: transport?.requestTimeoutMs,\n fetchFn: transport?.fetchFn,\n });\n } catch (err) {\n // Refresh failed or server rejected the refreshed token — walk the\n // discovery chain so the caller can distinguish \"re-auth needed\"\n // from other failure modes.\n await rethrowAsNeedsAuthorization(err, agent.agent_uri, transport?.fetchFn);\n throw err;\n }\n }\n\n // Use callMCPToolWithTasks which auto-detects server tasks capability\n // and falls back to standard callTool when tasks are not supported\n try {\n return await callMCPToolWithTasks(\n agent.agent_uri,\n toolName,\n argsWithWebhook,\n authToken,\n debugLogs,\n agent.headers,\n {\n ...(signingContext && { signingContext }),\n ...(signal && { signal }),\n ...(transport?.requestTimeoutMs !== undefined && {\n requestTimeoutMs: transport.requestTimeoutMs,\n }),\n ...(transport?.fetchFn && { fetchFn: transport.fetchFn }),\n }\n );\n } catch (err) {\n // Client-credentials agents: on 401, the AS may have rotated\n // something out-of-band. Force a fresh exchange and retry once\n // before surfacing the error. Bounded (single retry) so we don't\n // loop if the credentials are genuinely wrong.\n if (agent.oauth_client_credentials && is401Error(err)) {\n const ccStorage = getAgentStorage(agent);\n const allowPrivateIp = isLikelyPrivateUrl(agent.agent_uri);\n await ensureClientCredentialsTokens(agent, {\n storage: ccStorage,\n force: true,\n allowPrivateIp,\n fetch: transport?.fetchFn,\n });\n const retryAuthToken = agent.oauth_tokens?.access_token ?? authToken;\n try {\n return await callMCPToolWithTasks(\n agent.agent_uri,\n toolName,\n argsWithWebhook,\n retryAuthToken,\n debugLogs,\n agent.headers,\n {\n ...(signingContext && { signingContext }),\n ...(signal && { signal }),\n ...(transport?.requestTimeoutMs !== undefined && {\n requestTimeoutMs: transport.requestTimeoutMs,\n }),\n ...(transport?.fetchFn && { fetchFn: transport.fetchFn }),\n }\n );\n } catch (retryErr) {\n await rethrowAsNeedsAuthorization(retryErr, agent.agent_uri, transport?.fetchFn);\n throw retryErr;\n }\n }\n await rethrowAsNeedsAuthorization(err, agent.agent_uri, transport?.fetchFn);\n throw err;\n }\n } else if (agent.protocol === 'a2a') {\n // For A2A, pass pushNotificationConfig separately (not in skill parameters)\n try {\n return await callA2ATool(\n agent.agent_uri,\n toolName,\n argsWithVersion,\n authToken,\n debugLogs,\n pushNotificationConfig,\n agent.headers,\n signingContext,\n session,\n signal,\n transport?.requestTimeoutMs,\n transport?.fetchFn\n );\n } catch (err) {\n // Same single-retry-on-401 for client-credentials agents as the\n // MCP path above. Kept symmetric so A2A CC agents aren't a\n // second-class experience — including the NeedsAuthorizationError\n // rewrap on a retry that still 401s.\n if (agent.oauth_client_credentials && is401Error(err)) {\n const ccStorage = getAgentStorage(agent);\n const allowPrivateIp = isLikelyPrivateUrl(agent.agent_uri);\n await ensureClientCredentialsTokens(agent, {\n storage: ccStorage,\n force: true,\n allowPrivateIp,\n fetch: transport?.fetchFn,\n });\n const retryAuthToken = agent.oauth_tokens?.access_token ?? authToken;\n try {\n return await callA2ATool(\n agent.agent_uri,\n toolName,\n argsWithVersion,\n retryAuthToken,\n debugLogs,\n pushNotificationConfig,\n agent.headers,\n signingContext,\n session,\n signal,\n transport?.requestTimeoutMs,\n transport?.fetchFn\n );\n } catch (retryErr) {\n await rethrowAsNeedsAuthorization(retryErr, agent.agent_uri, transport?.fetchFn);\n throw retryErr;\n }\n }\n await rethrowAsNeedsAuthorization(err, agent.agent_uri, transport?.fetchFn);\n throw err;\n }\n } else {\n throw new Error(`Unsupported protocol: ${agent.protocol}`);\n }\n }\n )\n )\n );\n }\n}\n\n/**\n * If `err` looks like a 401 from the MCP transport, probe the agent for a\n * Bearer challenge and throw a {@link NeedsAuthorizationError} carrying\n * walked discovery metadata. If the error isn't a 401 or we can't build a\n * requirements record, return silently so the caller re-throws the original.\n *\n * Keeping this off the hot path: we only probe on error, and the probe is\n * a single unauthenticated `tools/list` POST — no retries, no DNS rebind.\n */\nasync function rethrowAsNeedsAuthorization(err: unknown, agentUrl: string, fetchFn?: typeof fetch): Promise<void> {\n if (err instanceof NeedsAuthorizationError) throw err;\n if (!is401Error(err)) return;\n\n // If the caller has already connected to the agent URL, they've implicitly\n // trusted it — inherit that trust for the discovery probe so loopback /\n // private-IP development agents work the same way as public ones.\n const allowPrivateIp = isLikelyPrivateUrl(agentUrl);\n\n // discoverAuthorizationRequirements internally catches network failures and\n // returns null rather than throwing — anything that escapes is a genuine\n // bug we want to surface rather than mask the 401 with.\n const requirements = await discoverAuthorizationRequirements(agentUrl, { allowPrivateIp, fetchFn });\n if (requirements) {\n throw new NeedsAuthorizationError(requirements);\n }\n // No requirements walked; let the caller re-throw the original error.\n}\n\n/**\n * Simple factory functions for protocol-specific clients.\n *\n * Both factories accept a `transport` argument that flows through to the\n * size-cap surface so callers reaching the factory exports honor the same\n * `maxResponseBytes` contract as `ProtocolClient.callTool`. Without it,\n * the factories would silently bypass the cap, which the public API\n * (`TransportOptions`) implies they honor.\n */\nexport const createMCPClient = (\n agentUrl: string,\n authToken?: string,\n headers?: Record<string, string>,\n serverVersion?: 'v2' | 'v3',\n adcpVersion?: string,\n transport?: TransportOptions,\n versionEnvelopeMode: VersionEnvelopeMode = 'auto'\n) => {\n // Validate the pin at factory time so a typo surfaces here rather than at\n // first call. `buildVersionEnvelope` throws via `resolveWireMajor` on bad\n // input — call it once to surface, then close over the envelope.\n const versionEnvelope = buildVersionEnvelopeForMode(versionEnvelopeMode, adcpVersion, serverVersion);\n return {\n callTool: (toolName: string, args: Record<string, unknown>, debugLogs?: DebugLogEntry[]) =>\n withResponseSizeLimit(transport?.maxResponseBytes, () =>\n callMCPToolWithTasks(\n agentUrl,\n toolName,\n applyVersionEnvelope(args, versionEnvelope),\n authToken,\n debugLogs,\n headers,\n {\n ...(transport?.requestTimeoutMs !== undefined && { requestTimeoutMs: transport.requestTimeoutMs }),\n ...(transport?.fetchFn && { fetchFn: transport.fetchFn }),\n }\n )\n ),\n };\n};\n\nexport const createA2AClient = (\n agentUrl: string,\n authToken?: string,\n headers?: Record<string, string>,\n serverVersion?: 'v2' | 'v3',\n adcpVersion?: string,\n transport?: TransportOptions,\n versionEnvelopeMode: VersionEnvelopeMode = 'auto'\n) => {\n const versionEnvelope = buildVersionEnvelopeForMode(versionEnvelopeMode, adcpVersion, serverVersion);\n return {\n callTool: (toolName: string, parameters: Record<string, unknown>, debugLogs?: DebugLogEntry[]) =>\n withResponseSizeLimit(transport?.maxResponseBytes, () =>\n callA2ATool(\n agentUrl,\n toolName,\n applyVersionEnvelope(parameters, versionEnvelope),\n authToken,\n debugLogs,\n undefined,\n headers,\n undefined,\n undefined,\n undefined,\n transport?.requestTimeoutMs,\n transport?.fetchFn\n )\n ),\n };\n};\n"],"mappings":"AAAA,SAAS,iBAAiB,2BAA2B;AACrD,SAAS,WAAW,qBAAqB;AACzC,SAAS,iBAAiB,2BAA2B;AACrD,MAAM,YAAY,cAAc,oBAAoB,YAAY,GAAG,CAAC;AACpE,MAAMA,WAAU,oBAAoB,YAAY,GAAG;AAEnD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,uBAAAC,4BAA2B;AACpC,SAAS,2BAA2B;AAMpC,eAAsB,iBAAiB,WAA0B,OAAsB;AACrF,MAAI,aAAa,OAAO;AACtB,UAAMA,qBAAoB;AAAA,EAC5B,OAAO;AACL,wBAAoB;AAAA,EACtB;AACF;AAEA,SAAS,mBAAmB;AAC5B,SAAS,kCAAkC;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,wBAAAC,uBAAsB,6BAA6B;AAC5D,SAAS,wBAAAC,6BAA4B;AACrC,SAAS,eAAAC,oBAAmB;AAG5B,SAAS,oBAAoB;AAC7B;AAAA,EACE;AA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e;AAAA,QAC1C;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,UACE,GAAI,WAAW,qBAAqB,UAAa,EAAE,kBAAkB,UAAU,iBAAiB;AAAA,UAChG,GAAI,WAAW,WAAW,EAAE,SAAS,UAAU,QAAQ;AAAA,QACzD;AAAA,MACF;AAAA,IACF;AAAA,EACJ;AACF;AAEO,MAAM,kBAAkB,CAC7B,UACA,WACA,SACA,eACA,aACA,WACA,sBAA2C,WACxC;AACH,QAAM,kBAAkB,4BAA4B,qBAAqB,aAAa,aAAa;AACnG,SAAO;AAAA,IACL,UAAU,CAAC,UAAkB,YAAqC,cAChE;AAAA,MAAsB,WAAW;AAAA,MAAkB,MACjDE;AAAA,QACE;AAAA,QACA;AAAA,QACA,qBAAqB,YAAY,eAAe;AAAA,QAChD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW;AAAA,QACX,WAAW;AAAA,MACb;AAAA,IACF;AAAA,EACJ;AACF;","names":["require","closeMCPConnections","callMCPToolWithTasks","callMCPToolWithOAuth","callA2ATool","withTransportDiagnostics"]}
1
+ {"version":3,"sources":["../../../src/lib/protocols/index.ts"],"sourcesContent":["import { fileURLToPath as __adcpFileURLToPath } from 'node:url';\nimport { dirname as __adcpDirname } from 'node:path';\nimport { createRequire as __adcpCreateRequire } from 'node:module';\nconst __dirname = __adcpDirname(__adcpFileURLToPath(import.meta.url));\nconst require = __adcpCreateRequire(import.meta.url);\n// Unified Protocol Interface for AdCP\nexport {\n callMCPTool,\n callMCPToolWithOAuth,\n connectMCP,\n closeMCPConnections,\n closeOAuthConnections,\n UnauthorizedError,\n} from './mcp';\n\nimport { closeMCPConnections } from './mcp';\nimport { closeA2AConnections } from './a2a';\n\n/**\n * Close protocol connections for the given protocol.\n * MCP closes persistent HTTP transports; A2A clears the agent-card client cache.\n */\nexport async function closeConnections(protocol: 'mcp' | 'a2a' = 'mcp'): Promise<void> {\n if (protocol === 'mcp') {\n await closeMCPConnections();\n } else {\n closeA2AConnections();\n }\n}\nexport type { MCPCallOptions, MCPConnectionResult } from './mcp';\nexport { callA2ATool } from './a2a';\nexport { DEFAULT_REQUEST_TIMEOUT_MS } from './abort';\nexport {\n callMCPToolWithTasks,\n getMCPTaskStatus,\n getMCPTaskResult,\n listMCPTasks,\n cancelMCPTask,\n mapMCPTaskStatus,\n serverSupportsTasks,\n} from './mcp-tasks';\n\nimport { callMCPToolWithTasks, callMCPToolWithClient } from './mcp-tasks';\nimport { callMCPToolWithOAuth } from './mcp';\nimport { callA2ATool } from './a2a';\nimport type { AgentConfig, DebugLogEntry } from '../types';\nimport type { PushNotificationConfig } from '../types/tools.generated';\nimport { getAuthToken } from '../auth';\nimport {\n discoverAuthorizationRequirements,\n NeedsAuthorizationError,\n getAgentStorage,\n ensureClientCredentialsTokens,\n} from '../auth/oauth';\nimport { getNonInteractiveOAuthProvider } from '../auth/oauth/provider-cache';\nimport { is401Error } from '../errors';\nimport { isLikelyPrivateUrl } from '../net';\nimport { validateAgentUrl } from '../validation';\nimport { withSpan } from '../observability/tracing';\nimport { ADCP_MAJOR_VERSION, ADCP_VERSION, parseAdcpMajorVersion } from '../version';\nimport { ConfigurationError } from '../errors';\nimport { resolveBundleKey, toReleasePrecisionWire, validateAdcpVersionWire } from '../validation/schema-loader';\nimport { buildAgentSigningContext, CAPABILITY_OP, ensureCapabilityLoaded } from '../signing/client';\nimport { withResponseSizeLimit } from './responseSizeLimit';\nimport {\n withTransportDiagnostics,\n type TransportActivityHandler as TransportActivityHandlerFn,\n} from './transportDiagnostics';\n\nexport {\n sanitizeTransportHeaders,\n sanitizeTransportUrl,\n withTransportDiagnostics,\n wrapFetchWithTransportDiagnostics,\n} from './transportDiagnostics';\nexport type { TransportActivity, TransportActivityContext, TransportActivityHandler } from './transportDiagnostics';\n\nexport type VersionEnvelopeMode = 'auto' | 'none' | 'major-only';\n\n/**\n * Derive the wire-level `adcp_major_version` integer from a caller-supplied\n * pin. Returns the SDK default when no pin is provided; throws on a pin\n * that doesn't parse so misuse surfaces at the factory boundary instead\n * of silently emitting the SDK's major.\n *\n * Throws `ConfigurationError` (not a plain `Error`) so a typo'd pin\n * surfaces with the same error class as the construction-time gate in\n * `resolveAdcpVersion` — one shape for all pin-misuse paths.\n */\nfunction resolveWireMajor(adcpVersion: string | undefined): number {\n if (adcpVersion === undefined) return ADCP_MAJOR_VERSION;\n const parsed = parseAdcpMajorVersion(adcpVersion);\n if (!Number.isFinite(parsed)) {\n throw new ConfigurationError(\n `adcpVersion ${JSON.stringify(adcpVersion)} is not a valid AdCP version. ` +\n `Expected a semver string (e.g. '3.0.1', '3.1.0-beta.1') or a legacy alias (e.g. 'v3').`,\n 'adcpVersion'\n );\n }\n return parsed;\n}\n\n/**\n * Returns true when the AdCP release that `bundleKey` identifies declares the\n * top-level `adcp_version` envelope field. The field landed in AdCP 3.1 per\n * spec PR `adcontextprotocol/adcp#3493` — 3.0 (any patch / prerelease) does\n * not carry it; 3.1+ does. Used to gate dual-emit on the wire so a 3.0-pinned\n * client doesn't emit a field its target schema doesn't define.\n */\nexport function bundleSupportsAdcpVersionField(bundleKey: string): boolean {\n const major = parseAdcpMajorVersion(bundleKey);\n if (!Number.isFinite(major)) return false;\n if (major < 3) return false;\n if (major > 3) return true;\n // Major 3 — only 3.1+ has the field. Bundle key shape is normalized by\n // `resolveBundleKey`: `'3.0'` / `'3.1'` for stable; `'3.0.0-beta.1'` /\n // `'3.1.0-beta.1'` for prereleases. Match the minor.\n const minorMatch = bundleKey.match(/^\\d+\\.(\\d+)/);\n if (!minorMatch) return false;\n return parseInt(minorMatch[1]!, 10) >= 1;\n}\n\n/**\n * Build the wire-level version envelope to merge into outgoing request args.\n *\n * Per AdCP 3.1 (spec PR `adcontextprotocol/adcp#3493`), 3.1+ requests carry\n * BOTH the integer `adcp_major_version` (deprecated through 3.x, removed in\n * 4.0) AND the release-precision string `adcp_version`. 3.0 schemas don't\n * define the string field, so a 3.0-pinned client emits the integer only —\n * matches the 3.0 spec exactly.\n *\n * Wire string is release-precision (MAJOR.MINOR with optional prerelease tag),\n * per `core/version-envelope.json`'s pattern `^\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?$`.\n * Full-semver bundle keys (`'3.1.0-beta.1'`) are collapsed via\n * `toReleasePrecisionWire` to `'3.1-beta.1'` before emit — meta-field shapes\n * are explicitly NOT valid wire values per the envelope schema's own\n * normalization rule.\n *\n * Returns `{}` for v2 callers (predates the major-version field entirely).\n */\nfunction buildVersionEnvelope(\n adcpVersion: string | undefined,\n serverVersion: 'v2' | 'v3' | undefined\n): Record<string, unknown> {\n if (serverVersion === 'v2') return {};\n const wireMajor = resolveWireMajor(adcpVersion);\n const bundleKey = resolveBundleKey(adcpVersion ?? ADCP_VERSION);\n if (!bundleSupportsAdcpVersionField(bundleKey)) {\n return { adcp_major_version: wireMajor };\n }\n const wireValue = toReleasePrecisionWire(bundleKey);\n // Defensive postcondition — should never throw in well-formed code, but\n // if a future refactor breaks the normalization the error message tells\n // the developer to call `toReleasePrecisionWire` instead of silently\n // emitting a non-spec wire string.\n validateAdcpVersionWire(wireValue);\n return { adcp_major_version: wireMajor, adcp_version: wireValue };\n}\n\nlet hasWarnedAboutV2PushNotificationSecret = false;\n\n/**\n * Warn once when an async webhook registration is suppressed for a v2 seller.\n *\n * v2.5's `push-notification-config.json` requires `authentication`, and unlike\n * 3.x it has no RFC 9421 selector semantics — so omitting the block produces a\n * schema-invalid request rather than choosing a signing mode. Without a\n * configured secret there is no honest value to send, and the previous\n * behaviour (a hardcoded placeholder credential) told the seller the channel\n * was authenticated by a constant published in this package.\n */\nfunction warnV2PushNotificationNeedsSecret(): void {\n if (hasWarnedAboutV2PushNotificationSecret) return;\n hasWarnedAboutV2PushNotificationSecret = true;\n console.warn(\n '[adcp] Suppressing push_notification_config for a v2 seller: AdCP 2.5 requires an ' +\n '`authentication` block and no `webhookSecret` is configured. Set `webhookSecret` to register ' +\n 'async task-status webhooks with this agent, or move the agent to an AdCP 3.x pin, where the ' +\n 'RFC 9421 webhook profile needs no shared secret.'\n );\n}\n\nfunction buildVersionEnvelopeForMode(\n mode: VersionEnvelopeMode,\n adcpVersion: string | undefined,\n serverVersion: 'v2' | 'v3' | undefined\n): Record<string, unknown> {\n if (mode === 'none' || serverVersion === 'v2') return {};\n if (mode === 'major-only') return { adcp_major_version: resolveWireMajor(adcpVersion) };\n return buildVersionEnvelope(adcpVersion, serverVersion);\n}\n\n/**\n * Merge the wire-level version envelope into a caller-supplied args object.\n * Caller args win: an explicit `adcp_major_version` / `adcp_version` in\n * `args` (e.g. a conformance harness probing `VERSION_UNSUPPORTED`) passes\n * through unchanged. The envelope only fills fields the caller didn't set.\n *\n * Single chokepoint for all four wire-injection sites so a future refactor\n * can't silently flip the spread order on one branch and leave the others\n * intact. Stale dual-field drift is caught at the server boundary by\n * `createAdcpServer`'s field-disagreement check (spec PR\n * `adcontextprotocol/adcp#3493`).\n *\n * @internal\n */\nexport function applyVersionEnvelope(\n args: Record<string, unknown>,\n envelope: Record<string, unknown>\n): Record<string, unknown> {\n return { ...envelope, ...args };\n}\n\n/**\n * Transport-level safeguards applied to a call.\n *\n * Wired into the SDK's internal fetch chain via AsyncLocalStorage, so the\n * cap takes effect even when the underlying transport's connection cache\n * reuses a fetch that was created on an earlier call with different limits.\n */\nexport interface TransportOptions {\n /**\n * Maximum response body size (in octets) the SDK will read before aborting\n * with `ResponseTooLargeError`. When unset, the SDK does not impose a cap —\n * matches the underlying MCP / A2A transport defaults.\n *\n * Set this when crawling **untrusted** agents (registries, federated\n * discovery layers, monitoring tools) to prevent a hostile vendor from\n * buffering a large reply before any application-layer schema validation\n * runs. Counted across response chunks; pre-cancels when `Content-Length`\n * exceeds the cap. Applies to A2A agent-card discovery\n * (`/.well-known/agent.json`) on the same call as well.\n *\n * Per-call override (`TaskOptions.transport.maxResponseBytes`) beats the\n * value set on the client constructor (`SingleAgentClientConfig.transport`).\n *\n * @remarks\n * **Safe to set on all calls.** SSE responses (`text/event-stream`) are\n * passed through unchanged — a single tool call legitimately emits N status\n * frames + a final result, bounded by protocol-level framing rather than\n * cumulative byte counts. The cap applies to one-shot JSON responses\n * (`get_adcp_capabilities`, agent-card lookup, tool result payloads on\n * non-streaming transports) where the body is bounded by definition.\n *\n * @remarks\n * **Hostile-peer note:** A peer can opt itself out of this cap by responding\n * with `Content-Type: text/event-stream`. SSE is bypassed because cumulative\n * event-frame bytes are unbounded by spec — MCP and A2A both stream tool\n * responses this way. The MCP/A2A SDKs consume SSE incrementally and frame\n * termination bounds memory in practice, so this is not a memory-bomb risk\n * for well-formed transports. Adopters relying on `maxResponseBytes` as a\n * hostile-server defense should treat it as best-effort for non-SSE\n * responses only.\n *\n * @remarks\n * Future hardening knobs (DNS-rebind defense, scheme allow-list, request\n * timeout overrides) will land here as additional fields. When `fetchFn`\n * is supplied, the SDK composes it inside its signing, capture, size-limit,\n * timeout, and diagnostics wrappers so callers do not have to reproduce\n * that non-obvious ordering themselves.\n */\n maxResponseBytes?: number;\n /**\n * Scoped fetch implementation for all outbound HTTP performed on behalf of\n * this client or call, including endpoint/card discovery, tool listing,\n * OAuth discovery and token refresh, and MCP/A2A tool requests.\n *\n * The function is runtime-only configuration and is never serialized into\n * agent records, storyboard artifacts, or compliance output. When unset,\n * the SDK uses the global `fetch` implementation.\n *\n * For SSRF-sensitive metadata probes, supplying this function makes it the\n * trusted network boundary: the SDK still validates schemes and resolved\n * addresses, but a custom fetch API cannot accept the SDK's pinned undici\n * dispatcher. The implementation must therefore prevent DNS rebinding (for\n * example with an egress proxy or its own DNS pinning).\n */\n fetchFn?: typeof fetch;\n /**\n * Timeout in milliseconds for bounded one-shot transport requests such as\n * A2A agent-card discovery and MCP read-path probes. Defaults to 60 seconds\n * for A2A discovery so an unresponsive card endpoint cannot hang forever.\n * Set to `0` to disable the SDK-imposed discovery timeout.\n */\n requestTimeoutMs?: number;\n}\n\n/**\n * Options for {@link ProtocolClient.callTool}. All fields are optional.\n *\n * `webhookUrl` / `webhookSecret` / `webhookToken` are for ASYNC TASK STATUS\n * notifications (push_notification_config). For reporting webhooks\n * (reporting_webhook), include them directly in `args` — they stay in skill\n * parameters and are sent verbatim to the agent.\n */\nexport interface CallToolOptions {\n /** Debug log array. Mutated in place by the protocol layer. */\n debugLogs?: DebugLogEntry[];\n /** URL for async task status notifications. */\n webhookUrl?: string;\n /** HMAC-SHA256 secret for push_notification_config authentication. */\n webhookSecret?: string;\n /** Bearer token for push_notification_config validation. */\n webhookToken?: string;\n /** Pinned protocol generation when the agent advertises both v2 and v3. */\n serverVersion?: 'v2' | 'v3';\n /** A2A session continuity (contextId carries conversation, taskId resumes a task). */\n session?: { contextId?: string; taskId?: string };\n /**\n * AdCP version pin from the calling client/server instance. Sets the\n * wire-level `adcp_major_version` field per-call instead of from the\n * SDK-pinned `ADCP_MAJOR_VERSION` constant. Default falls back to the\n * constant so call sites that don't plumb a per-instance version keep\n * their existing behavior. An explicit `adcp_major_version` /\n * `adcp_version` in `args` overrides this — conformance harnesses use\n * that path to probe seller version negotiation.\n */\n adcpVersion?: string;\n /**\n * Optional wire-only version override. Schema selection and client\n * construction can remain pinned to `adcpVersion`; the request envelope is\n * emitted for this release-precision line.\n */\n wireAdcpVersion?: string;\n /**\n * Controls whether the SDK injects AdCP version envelope fields into the\n * outgoing request. Defaults to `auto`. 3.0 pins emit only the legacy\n * `adcp_major_version`; 3.1+ pins emit both the legacy major and exact\n * `adcp_version` marker. `major-only` forces the legacy integer marker\n * without the 3.1 string marker for strict pre-3.1 peers discovered at\n * runtime.\n */\n versionEnvelope?: VersionEnvelopeMode;\n /**\n * Transport-level safeguards (size caps, etc.). Per-call override of any\n * matching field on the client constructor's `transport` option.\n */\n transport?: TransportOptions;\n /** Caller-owned cancellation signal for the in-flight protocol call. */\n signal?: AbortSignal;\n /** Transport-level diagnostics callback for outbound HTTP requests. */\n onTransportActivity?: TransportActivityHandlerFn;\n /**\n * Correlation metadata attached to transport diagnostics events emitted\n * while this protocol call is active.\n */\n transportActivityContext?: {\n operationId?: string;\n taskId?: string;\n contextId?: string;\n idempotencyKey?: string;\n };\n}\n\n/**\n * Universal protocol client - automatically routes to the correct protocol implementation\n */\nexport class ProtocolClient {\n /**\n * Call a tool on an agent using the appropriate protocol.\n *\n * @param agent - Agent configuration\n * @param toolName - Name of the tool/skill to call\n * @param args - Tool arguments (includes reporting_webhook if needed - NOT removed)\n * @param options - Optional call-level configuration. See {@link CallToolOptions}.\n */\n static async callTool(\n agent: AgentConfig,\n toolName: string,\n args: Record<string, unknown>,\n options: CallToolOptions = {}\n ): Promise<unknown> {\n const {\n debugLogs = [],\n webhookUrl,\n webhookSecret,\n webhookToken,\n serverVersion,\n session,\n adcpVersion,\n wireAdcpVersion,\n versionEnvelope: versionEnvelopeMode = 'auto',\n transport,\n signal,\n onTransportActivity,\n transportActivityContext,\n } = options;\n // Per-instance version envelope. Throws on unparseable pins via\n // `resolveWireMajor`; construction-time `resolveAdcpVersion` is the\n // primary gate but this is the failsafe for callers reaching\n // `ProtocolClient.callTool` directly (test harnesses, the in-process\n // MCP path). Returns `{ adcp_major_version }` for 3.0 pins and\n // `{ adcp_major_version, adcp_version }` for 3.1+ pins.\n const versionEnvelope = buildVersionEnvelopeForMode(\n versionEnvelopeMode,\n wireAdcpVersion ?? adcpVersion,\n serverVersion\n );\n // Enter the response-size-limit ALS slot once for this call. The slot is\n // read by `wrapFetchWithSizeLimit` in both protocol transports, so the\n // cap applies regardless of which path (MCP / A2A / OAuth refresh) the\n // call ends up taking. No-op when the cap is unset or non-positive.\n return withResponseSizeLimit(transport?.maxResponseBytes, () =>\n withTransportDiagnostics(\n {\n agentId: agent.id,\n protocol: agent.protocol,\n tool: toolName,\n taskType: toolName,\n ...transportActivityContext,\n onTransportActivity,\n },\n () =>\n withSpan(\n `adcp.${agent.protocol}.call_tool`,\n {\n 'adcp.agent_id': agent.id,\n 'adcp.protocol': agent.protocol,\n 'adcp.tool': toolName,\n 'http.url': agent.agent_uri,\n },\n async () => {\n // In-process MCP path: pre-connected client, no HTTP transport.\n // Idempotency injection, schema validation, and governance middleware all\n // still apply (they run in SingleAgentClient above this call). We skip\n // URL validation, OAuth refresh, and signing — none apply in-process.\n if (agent.protocol === 'mcp' && agent._inProcessMcpClient) {\n const inProcArgs = applyVersionEnvelope(args, versionEnvelope);\n return callMCPToolWithClient(agent._inProcessMcpClient, toolName, inProcArgs, debugLogs, {\n ...(signal && { signal }),\n ...(transport?.requestTimeoutMs !== undefined && { requestTimeoutMs: transport.requestTimeoutMs }),\n });\n }\n\n validateAgentUrl(agent.agent_uri);\n\n // OAuth 2.0 client credentials (RFC 6749 §4.4): re-exchange the\n // secret for a fresh access token whenever the cached one is within\n // its expiration skew. Runs before every call so mid-session expiry\n // can't leave the caller with a stale bearer. No-op if the agent\n // doesn't declare client credentials. Cheap on warm cache (single\n // `Date.now()` compare); a single POST to the token endpoint on miss.\n //\n // `allowPrivateIp` inherits the trust the caller already placed in\n // `agent.agent_uri` — if they're making a call to a private-IP agent,\n // they've authorized this process to talk to private-IP hosts, so\n // the token endpoint on the same network is reachable too. Public\n // agent URLs with private-IP token endpoints still require an\n // explicit opt-in via the library API.\n if (agent.oauth_client_credentials) {\n const ccStorage = getAgentStorage(agent);\n const allowPrivateIp = isLikelyPrivateUrl(agent.agent_uri);\n await ensureClientCredentialsTokens(agent, {\n storage: ccStorage,\n allowPrivateIp,\n fetch: transport?.fetchFn,\n signal,\n });\n }\n\n const authToken = getAuthToken(agent);\n\n // RFC 9421 signing context. Built once per call and passed through\n // to each protocol-layer entry (`callMCPToolWithTasks`, `callA2ATool`,\n // `callMCPToolWithOAuth`) — those entries seed `signingContextStorage`\n // (AsyncLocalStorage) so the internal transport helpers read it\n // without an explicit parameter. Keep the explicit arg here: it's the\n // ALS seed, not incidental plumbing. `get_adcp_capabilities` is\n // exempt from signing (it's the discovery call itself) and also\n // triggers cache priming for any other op on agents with\n // `request_signing` configured.\n const signingContext = buildAgentSigningContext(agent);\n if (signingContext && toolName !== CAPABILITY_OP) {\n await ensureCapabilityLoaded(agent, signingContext, primeArgs =>\n ProtocolClient.callTool(agent, CAPABILITY_OP, primeArgs, {\n debugLogs,\n serverVersion,\n adcpVersion,\n ...(versionEnvelopeMode !== 'auto' && { versionEnvelope: versionEnvelopeMode }),\n transport,\n signal,\n ...(transport?.requestTimeoutMs !== undefined && { requestTimeoutMs: transport.requestTimeoutMs }),\n onTransportActivity,\n transportActivityContext,\n })\n );\n }\n\n // Inject the version envelope on every request so sellers can validate\n // compatibility. Skip for v2 servers — they don't recognise the\n // version fields and strict-schema agents reject them. The envelope\n // shape is per-pin: 3.0 pins get the integer `adcp_major_version`\n // alone; 3.1+ pins get both that and the release-precision string\n // `adcp_version` (`'3.1'` / `'3.1.0-beta.1'`) per spec PR\n // `adcontextprotocol/adcp#3493`.\n const argsWithVersion = applyVersionEnvelope(args, versionEnvelope);\n\n // Build push_notification_config for ASYNC TASK STATUS notifications\n // (NOT for reporting_webhook - that stays in args)\n // Schema: https://adcontextprotocol.org/schemas/v1/core/push-notification-config.json\n // `authentication` is a scheme SELECTOR, not a fallback: from AdCP\n // 3.0 on, push-notification-config.json makes its presence opt the\n // seller into legacy HMAC-SHA256 and its absence select the RFC\n // 9421 webhook profile, with `required: [\"url\"]` only. Emitting it\n // with a placeholder credential would therefore downgrade every\n // webhook to legacy HMAC keyed by a constant that ships in this\n // file, so the block is omitted unless a real secret backs it.\n //\n // v2.5 predates the selector: there `required` is\n // `[\"url\", \"authentication\"]` and there is no 9421 path, so an\n // omitted block is schema-invalid rather than a mode selection.\n // With no secret there is nothing honest to send a v2 seller, so\n // suppress the registration instead of fabricating a credential.\n const pushNotificationConfig: PushNotificationConfig | undefined = (():\n | PushNotificationConfig\n | undefined => {\n if (!webhookUrl) return undefined;\n if (webhookSecret) {\n return {\n url: webhookUrl,\n ...(webhookToken && { token: webhookToken }),\n authentication: {\n schemes: ['HMAC-SHA256' as const],\n credentials: webhookSecret,\n },\n };\n }\n if (serverVersion === 'v2') {\n warnV2PushNotificationNeedsSecret();\n return undefined;\n }\n return {\n url: webhookUrl,\n ...(webhookToken && { token: webhookToken }),\n };\n })();\n\n if (agent.protocol === 'mcp') {\n // For MCP, include push_notification_config in tool arguments (MCP spec)\n const argsWithWebhook = pushNotificationConfig\n ? { ...argsWithVersion, push_notification_config: pushNotificationConfig }\n : argsWithVersion;\n\n // If the agent config carries authorization-code OAuth tokens,\n // route through the OAuth provider path so the MCP SDK can refresh\n // on 401 instead of hard-failing. Excludes client-credentials\n // agents: they have a cached access token but no refresh_token,\n // and their refresh path is a secret re-exchange (handled above),\n // not the SDK's refresh_token grant.\n if (agent.oauth_tokens && !agent.oauth_client_credentials) {\n const authProvider = getNonInteractiveOAuthProvider(agent, {\n agentHint: agent.id,\n storage: getAgentStorage(agent),\n allowHttp: isLikelyPrivateUrl(agent.agent_uri),\n });\n try {\n return await callMCPToolWithOAuth({\n agentUrl: agent.agent_uri,\n toolName,\n args: argsWithWebhook,\n authProvider,\n debugLogs,\n customHeaders: agent.headers,\n signingContext,\n signal,\n requestTimeoutMs: transport?.requestTimeoutMs,\n fetchFn: transport?.fetchFn,\n });\n } catch (err) {\n // Refresh failed or server rejected the refreshed token — walk the\n // discovery chain so the caller can distinguish \"re-auth needed\"\n // from other failure modes.\n await rethrowAsNeedsAuthorization(err, agent.agent_uri, transport?.fetchFn, signal);\n throw err;\n }\n }\n\n // Use callMCPToolWithTasks which auto-detects server tasks capability\n // and falls back to standard callTool when tasks are not supported\n try {\n return await callMCPToolWithTasks(\n agent.agent_uri,\n toolName,\n argsWithWebhook,\n authToken,\n debugLogs,\n agent.headers,\n {\n ...(signingContext && { signingContext }),\n ...(signal && { signal }),\n ...(transport?.requestTimeoutMs !== undefined && {\n requestTimeoutMs: transport.requestTimeoutMs,\n }),\n ...(transport?.fetchFn && { fetchFn: transport.fetchFn }),\n }\n );\n } catch (err) {\n // Client-credentials agents: on 401, the AS may have rotated\n // something out-of-band. Force a fresh exchange and retry once\n // before surfacing the error. Bounded (single retry) so we don't\n // loop if the credentials are genuinely wrong.\n if (agent.oauth_client_credentials && is401Error(err)) {\n const ccStorage = getAgentStorage(agent);\n const allowPrivateIp = isLikelyPrivateUrl(agent.agent_uri);\n await ensureClientCredentialsTokens(agent, {\n storage: ccStorage,\n force: true,\n allowPrivateIp,\n fetch: transport?.fetchFn,\n signal,\n });\n const retryAuthToken = agent.oauth_tokens?.access_token ?? authToken;\n try {\n return await callMCPToolWithTasks(\n agent.agent_uri,\n toolName,\n argsWithWebhook,\n retryAuthToken,\n debugLogs,\n agent.headers,\n {\n ...(signingContext && { signingContext }),\n ...(signal && { signal }),\n ...(transport?.requestTimeoutMs !== undefined && {\n requestTimeoutMs: transport.requestTimeoutMs,\n }),\n ...(transport?.fetchFn && { fetchFn: transport.fetchFn }),\n }\n );\n } catch (retryErr) {\n await rethrowAsNeedsAuthorization(retryErr, agent.agent_uri, transport?.fetchFn, signal);\n throw retryErr;\n }\n }\n await rethrowAsNeedsAuthorization(err, agent.agent_uri, transport?.fetchFn, signal);\n throw err;\n }\n } else if (agent.protocol === 'a2a') {\n // For A2A, pass pushNotificationConfig separately (not in skill parameters)\n try {\n return await callA2ATool(\n agent.agent_uri,\n toolName,\n argsWithVersion,\n authToken,\n debugLogs,\n pushNotificationConfig,\n agent.headers,\n signingContext,\n session,\n signal,\n transport?.requestTimeoutMs,\n transport?.fetchFn\n );\n } catch (err) {\n // Same single-retry-on-401 for client-credentials agents as the\n // MCP path above. Kept symmetric so A2A CC agents aren't a\n // second-class experience — including the NeedsAuthorizationError\n // rewrap on a retry that still 401s.\n if (agent.oauth_client_credentials && is401Error(err)) {\n const ccStorage = getAgentStorage(agent);\n const allowPrivateIp = isLikelyPrivateUrl(agent.agent_uri);\n await ensureClientCredentialsTokens(agent, {\n storage: ccStorage,\n force: true,\n allowPrivateIp,\n fetch: transport?.fetchFn,\n signal,\n });\n const retryAuthToken = agent.oauth_tokens?.access_token ?? authToken;\n try {\n return await callA2ATool(\n agent.agent_uri,\n toolName,\n argsWithVersion,\n retryAuthToken,\n debugLogs,\n pushNotificationConfig,\n agent.headers,\n signingContext,\n session,\n signal,\n transport?.requestTimeoutMs,\n transport?.fetchFn\n );\n } catch (retryErr) {\n await rethrowAsNeedsAuthorization(retryErr, agent.agent_uri, transport?.fetchFn, signal);\n throw retryErr;\n }\n }\n await rethrowAsNeedsAuthorization(err, agent.agent_uri, transport?.fetchFn, signal);\n throw err;\n }\n } else {\n throw new Error(`Unsupported protocol: ${agent.protocol}`);\n }\n }\n )\n )\n );\n }\n}\n\n/**\n * If `err` looks like a 401 from the MCP transport, probe the agent for a\n * Bearer challenge and throw a {@link NeedsAuthorizationError} carrying\n * walked discovery metadata. If the error isn't a 401 or we can't build a\n * requirements record, return silently so the caller re-throws the original.\n *\n * Keeping this off the hot path: we only probe on error, and the probe is\n * a single unauthenticated `tools/list` POST — no retries, no DNS rebind.\n */\nasync function rethrowAsNeedsAuthorization(\n err: unknown,\n agentUrl: string,\n fetchFn?: typeof fetch,\n signal?: AbortSignal\n): Promise<void> {\n if (err instanceof NeedsAuthorizationError) throw err;\n if (!is401Error(err)) return;\n\n // If the caller has already connected to the agent URL, they've implicitly\n // trusted it — inherit that trust for the discovery probe so loopback /\n // private-IP development agents work the same way as public ones.\n const allowPrivateIp = isLikelyPrivateUrl(agentUrl);\n\n // discoverAuthorizationRequirements internally catches network failures and\n // returns null rather than throwing — anything that escapes is a genuine\n // bug we want to surface rather than mask the 401 with.\n const requirements = await discoverAuthorizationRequirements(agentUrl, { allowPrivateIp, fetchFn, signal });\n if (requirements) {\n throw new NeedsAuthorizationError(requirements);\n }\n // No requirements walked; let the caller re-throw the original error.\n}\n\n/**\n * Simple factory functions for protocol-specific clients.\n *\n * Both factories accept a `transport` argument that flows through to the\n * size-cap surface so callers reaching the factory exports honor the same\n * `maxResponseBytes` contract as `ProtocolClient.callTool`. Without it,\n * the factories would silently bypass the cap, which the public API\n * (`TransportOptions`) implies they honor.\n */\nexport const createMCPClient = (\n agentUrl: string,\n authToken?: string,\n headers?: Record<string, string>,\n serverVersion?: 'v2' | 'v3',\n adcpVersion?: string,\n transport?: TransportOptions,\n versionEnvelopeMode: VersionEnvelopeMode = 'auto'\n) => {\n // Validate the pin at factory time so a typo surfaces here rather than at\n // first call. `buildVersionEnvelope` throws via `resolveWireMajor` on bad\n // input — call it once to surface, then close over the envelope.\n const versionEnvelope = buildVersionEnvelopeForMode(versionEnvelopeMode, adcpVersion, serverVersion);\n return {\n callTool: (toolName: string, args: Record<string, unknown>, debugLogs?: DebugLogEntry[]) =>\n withResponseSizeLimit(transport?.maxResponseBytes, () =>\n callMCPToolWithTasks(\n agentUrl,\n toolName,\n applyVersionEnvelope(args, versionEnvelope),\n authToken,\n debugLogs,\n headers,\n {\n ...(transport?.requestTimeoutMs !== undefined && { requestTimeoutMs: transport.requestTimeoutMs }),\n ...(transport?.fetchFn && { fetchFn: transport.fetchFn }),\n }\n )\n ),\n };\n};\n\nexport const createA2AClient = (\n agentUrl: string,\n authToken?: string,\n headers?: Record<string, string>,\n serverVersion?: 'v2' | 'v3',\n adcpVersion?: string,\n transport?: TransportOptions,\n versionEnvelopeMode: VersionEnvelopeMode = 'auto'\n) => {\n const versionEnvelope = buildVersionEnvelopeForMode(versionEnvelopeMode, adcpVersion, serverVersion);\n return {\n callTool: (toolName: string, parameters: Record<string, unknown>, debugLogs?: DebugLogEntry[]) =>\n withResponseSizeLimit(transport?.maxResponseBytes, () =>\n callA2ATool(\n agentUrl,\n toolName,\n applyVersionEnvelope(parameters, versionEnvelope),\n authToken,\n debugLogs,\n undefined,\n headers,\n undefined,\n undefined,\n undefined,\n transport?.requestTimeoutMs,\n transport?.fetchFn\n )\n ),\n };\n};\n"],"mappings":"AAAA,SAAS,iBAAiB,2BAA2B;AACrD,SAAS,WAAW,qBAAqB;AACzC,SAAS,iBAAiB,2BAA2B;AACrD,MAAM,YAAY,cAAc,oBAAoB,YAAY,GAAG,CAAC;AACpE,MAAMA,WAAU,oBAAo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;AAAA,EACJ;AACF;","names":["require","closeMCPConnections","callMCPToolWithTasks","callMCPToolWithOAuth","callA2ATool","withTransportDiagnostics"]}
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../src/lib/protocols/mcp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EACL,6BAA6B,EAG9B,MAAM,oDAAoD,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAIpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAiD,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAc5G,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAyK7B;;;;GAIG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAU3D;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAazD;AAoTD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,wBAAwB;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,uBAAuB;IACvB,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC;IAC5B,mFAAmF;IACnF,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,mGAAmG;IACnG,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,iEAAiE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MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;CACxB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA6J/B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CA6EpF"}
@@ -280,7 +280,7 @@ async function withCachedConnection(agentUrl, authToken, authHeaders, debugLogs,
280
280
  requestOptions
281
281
  );
282
282
  try {
283
- return await fn(guardedClient);
283
+ return await (0, import_abort.withAbortSignal)([requestOptions.signal], void 0, () => fn(guardedClient));
284
284
  } finally {
285
285
  try {
286
286
  await guardedClient.close();
@@ -353,18 +353,19 @@ async function connectMCPWithFallback(url, authHeaders, debugLogs = [], label =
353
353
  }
354
354
  async function connectMCPWithFallbackImpl(url, authHeaders, debugLogs = [], label = "connection", transportFetch, requestOptions = {}) {
355
355
  const signingContext = import_client2.signingContextStorage.getStore();
356
- const requestTimeoutMs = (0, import_abort.resolveRequestTimeoutMs)(requestOptions.requestTimeoutMs);
357
356
  const clientRequestTimeoutMs = (0, import_abort.resolveClientRequestTimeoutMs)(requestOptions.requestTimeoutMs);
358
357
  const mcpRequestOptions = {
359
358
  ...requestOptions.signal && { signal: requestOptions.signal },
360
359
  ...clientRequestTimeoutMs !== void 0 && { timeout: clientRequestTimeoutMs }
361
360
  };
362
361
  const rawNetworkFetch = transportFetch ?? ((input, init) => fetch(input, init));
363
- const networkFetch = (input, init) => (0, import_abort.withAbortSignal)(
364
- [requestOptions.signal, init?.signal],
365
- requestTimeoutMs,
366
- (signal) => rawNetworkFetch(input, { ...init, signal })
367
- );
362
+ const networkFetch = (input, init) => {
363
+ const signals = [requestOptions.signal, init?.signal ?? void 0].filter(
364
+ (signal2) => signal2 !== void 0
365
+ );
366
+ const signal = signals.length === 0 ? void 0 : signals.length === 1 ? signals[0] : AbortSignal.any(signals);
367
+ return rawNetworkFetch(input, { ...init, signal });
368
+ };
368
369
  const sizeLimited = (0, import_responseSizeLimit.wrapFetchWithSizeLimit)(networkFetch);
369
370
  const diagnosticFetch = (0, import_transportDiagnostics.wrapFetchWithTransportDiagnostics)(sizeLimited);
370
371
  const baseFetch = signingContext ? (0, import_client2.buildAgentSigningFetch)({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/protocols/mcp.ts"],"sourcesContent":["// Official MCP client implementation using HTTP streaming transport with SSE fallback\nimport { Client as MCPClient } from '@modelcontextprotocol/sdk/client/index.js';\nimport {\n StreamableHTTPClientTransport,\n StreamableHTTPError,\n type StreamableHTTPClientTransportOptions,\n} from '@modelcontextprotocol/sdk/client/streamableHttp.js';\nimport { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';\nimport { UnauthorizedError } from '@modelcontextprotocol/sdk/client/auth.js';\nimport type { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js';\nimport { createHmac } from 'node:crypto';\nimport { createMCPAuthHeaders } from '../auth';\nimport { is401Error } from '../errors';\nimport type { DebugLogEntry } from '../types/adcp';\nimport { withSpan, injectTraceHeaders } from '../observability/tracing';\nimport { buildAgentSigningFetch, signingContextStorage, type AgentSigningContext } from '../signing/client';\nimport { redactArgsForLog } from '../utils/redact-args';\nimport { wrapFetchWithCapture } from './rawResponseCapture';\nimport { wrapFetchWithSizeLimit } from './responseSizeLimit';\nimport { wrapFetchWithTransportDiagnostics } from './transportDiagnostics';\nimport {\n isAbortOrTimeoutError,\n resolveClientRequestTimeoutMs,\n resolveRequestTimeoutMs,\n withAbortSignal,\n} from './abort';\nimport { closeModernMCPConnections, tryCallModernMCPTool } from './mcp-modern';\n\n// Re-export for convenience\nexport { UnauthorizedError };\n\n/** Response shape returned by MCPClient.callTool(). */\ntype CallToolResponse = {\n isError?: boolean;\n content?: Array<{ type: string; text?: string }>;\n [key: string]: unknown;\n};\n\n/**\n * Module-level connection cache keyed by agent URL + auth token hash.\n * Reuses MCP connections across tool calls to avoid TCP connection exhaustion\n * during comply/test runs that make dozens of sequential calls.\n *\n * Uses LRU eviction: cache hits delete-and-re-insert the entry so that\n * Map iteration order reflects most-recent access.\n *\n * The cache key includes only URL + auth token hash. Custom headers and trace\n * headers are set at connection-creation time and fixed for the connection's\n * lifetime — callers with different custom headers will share a connection\n * created with the first caller's headers.\n *\n * Note: This is a process-global singleton. Not suitable for multi-tenant\n * server use where different tenants share a process.\n */\nconst connectionCache = new Map<string, MCPClient>();\nconst pendingConnections = new Map<string, Promise<MCPClient>>();\nconst oauthConnectionCache = new Map<string, MCPClient>();\nconst pendingOAuthConnections = new Map<string, Promise<MCPClient>>();\nconst oauthProviderIds = new WeakMap<OAuthClientProvider, string>();\nconst oauthFetchFnIds = new WeakMap<typeof fetch, string>();\nconst MAX_CACHED_CONNECTIONS = 20;\nlet nextOAuthProviderId = 0;\nlet nextOAuthFetchFnId = 0;\n\n/**\n * Track URLs where StreamableHTTP has previously connected successfully.\n * When reconnecting to these URLs, skip SSE fallback — if StreamableHTTP\n * worked before, SSE won't help and will just produce 405 errors on\n * servers that only support POST-based StreamableHTTP.\n *\n * Capped at MAX_CACHED_CONNECTIONS to avoid unbounded growth. Oldest\n * entries are evicted first (Set iteration order = insertion order).\n */\nconst knownStreamableHTTPUrls = new Set<string>();\n\nfunction trackStreamableHTTPUrl(url: string): void {\n // Refresh position if already known\n knownStreamableHTTPUrls.delete(url);\n knownStreamableHTTPUrls.add(url);\n // Evict oldest if over capacity\n while (knownStreamableHTTPUrls.size > MAX_CACHED_CONNECTIONS) {\n const oldest = knownStreamableHTTPUrls.values().next().value;\n if (oldest) knownStreamableHTTPUrls.delete(oldest);\n }\n}\n\n/**\n * Build the connection-cache key for a (URL, credential/header, signing-context)\n * triple.\n *\n * Two credential paths feed this cache. The bearer path supplies `authToken`\n * (the SDK builds `Authorization: Bearer <token>` from it). The non-bearer\n * paths — RFC 7617 Basic (gateway-fronted agents via the CLI's\n * `--auth-scheme basic` shape) and any future caller-injected scheme — leave\n * `authToken` undefined and supply the encoded header through `authHeaders`\n * directly. Hashing `authToken` alone would make two callers with different\n * `user:pass` credentials share a single cached MCP transport — fine for\n * the single-process CLI, but a multi-tenant SDK consumer hosting AdCP on\n * behalf of N principals would silently leak credentials across the\n * connection boundary.\n *\n * Also include non-trace custom headers in the key. Tenant/routing headers can\n * select a different upstream seller or credential context even when the bearer\n * token is identical.\n */\nfunction connectionCacheKey(\n agentUrl: string,\n authToken?: string,\n signingCacheKey?: string,\n authHeaders?: Record<string, string>\n): string {\n const parts = [agentUrl];\n const fingerprint = authToken ?? extractAuthHeader(authHeaders);\n if (fingerprint) parts.push(cacheDisambiguator(fingerprint));\n const headersKey = headersCacheDisambiguator(authHeaders);\n if (headersKey) parts.push(`headers:${headersKey}`);\n if (signingCacheKey) parts.push(signingCacheKey);\n return parts.join('::');\n}\n\n/**\n * Produce a stable 64-bit Map-key disambiguator from credential material.\n *\n * This is NOT a password hash. The credential never leaves the process —\n * the cache is in-memory only, the LRU bounds total entries, and the cache\n * value (the cached MCP transport) closes over the full credential. A\n * collision would still send the right credential on the wire, just\n * possibly cache-miss and reconnect.\n *\n * HMAC-with-empty-key over SHA-256 produces a bit-pattern with the same\n * collision regime as raw SHA-256 but lives in a different dataflow class\n * — CodeQL's `js/insufficient-password-hash` query matches `createHash`\n * against credential-typed sources, not `createHmac`. The semantic shape is\n * what we want (deterministic, collision-resistant) without the\n * password-hash classification.\n */\nfunction cacheDisambiguator(value: string): string {\n return createHmac('sha256', '').update(value).digest('hex').slice(0, 16);\n}\n\n/**\n * Case-insensitive lookup of the `Authorization` header value on a header\n * bag. Returns `undefined` when no such header is present.\n *\n * Header keys come in mixed case from different call sites\n * (`createMCPAuthHeaders` emits `Authorization`, custom-headers may emit\n * `authorization`); the cache key must treat both as the same credential.\n */\nfunction extractAuthHeader(headers?: Record<string, string>): string | undefined {\n if (!headers) return undefined;\n for (const [key, value] of Object.entries(headers)) {\n if (key.toLowerCase() === 'authorization' && value) return value;\n }\n return undefined;\n}\n\nfunction headersCacheDisambiguator(headers?: Record<string, string>): string | undefined {\n const entries = Object.entries(headers ?? {})\n .filter(([key]) => {\n const lower = key.toLowerCase();\n return lower !== 'traceparent' && lower !== 'tracestate' && lower !== 'baggage';\n })\n .map(([key, value]) => [key.toLowerCase(), value] as const)\n .sort(([a], [b]) => a.localeCompare(b));\n return entries.length > 0 ? cacheDisambiguator(JSON.stringify(entries)) : undefined;\n}\n\n/** Get a cached connection, refreshing its LRU position. */\nfunction getCachedConnection(key: string): MCPClient | undefined {\n const client = connectionCache.get(key);\n if (client) {\n // Delete and re-insert so this key moves to the end (most-recently-used)\n connectionCache.delete(key);\n connectionCache.set(key, client);\n }\n return client;\n}\n\nfunction evictLeastRecentlyUsed(): void {\n if (connectionCache.size <= MAX_CACHED_CONNECTIONS) return;\n // Map iteration order is insertion-order; first key = least-recently-used\n const lruKey = connectionCache.keys().next().value;\n if (!lruKey) return;\n const oldClient = connectionCache.get(lruKey);\n connectionCache.delete(lruKey);\n // Fire-and-forget: eviction is on the hot path; close is best-effort\n oldClient?.close().catch(() => {});\n}\n\nfunction evictLeastRecentlyUsedOAuth(): void {\n if (oauthConnectionCache.size <= MAX_CACHED_CONNECTIONS) return;\n const lruKey = oauthConnectionCache.keys().next().value;\n if (!lruKey) return;\n const oldClient = oauthConnectionCache.get(lruKey);\n oauthConnectionCache.delete(lruKey);\n oldClient?.close().catch(() => {});\n}\n\n/**\n * Close all cached OAuth MCP connections.\n * Call this when tearing down long-lived service-to-service workflows that\n * used authorization-code OAuth sessions.\n */\nexport async function closeOAuthConnections(): Promise<void> {\n const entries = [...oauthConnectionCache.entries()];\n oauthConnectionCache.clear();\n for (const [, client] of entries) {\n try {\n await client.close();\n } catch {\n /* ignore close errors */\n }\n }\n}\n\n/**\n * Close all cached MCP connections.\n * Call this at the end of comply/test runs or before process exit.\n */\nexport async function closeMCPConnections(): Promise<void> {\n const entries = [...connectionCache.entries()];\n connectionCache.clear();\n knownStreamableHTTPUrls.clear();\n for (const [, client] of entries) {\n try {\n await client.close();\n } catch {\n /* ignore close errors */\n }\n }\n await closeOAuthConnections();\n await closeModernMCPConnections();\n}\n\n/**\n * Get or create a cached connection for the given cache key.\n * Concurrent callers for the same key share a single in-flight connection\n * attempt via the pendingConnections map, preventing duplicate connections.\n */\nasync function getOrCreateConnection(\n cacheKey: string,\n baseUrl: URL,\n authHeaders: Record<string, string>,\n debugLogs: DebugLogEntry[],\n label: string,\n requestOptions: { signal?: AbortSignal; requestTimeoutMs?: number } = {}\n): Promise<MCPClient> {\n const cached = getCachedConnection(cacheKey);\n if (cached) return cached;\n\n const pending = pendingConnections.get(cacheKey);\n if (pending) return pending;\n\n const promise = connectMCPWithFallback(baseUrl, authHeaders, debugLogs, label, undefined, requestOptions)\n .then(client => {\n connectionCache.set(cacheKey, client);\n evictLeastRecentlyUsed();\n return client;\n })\n .finally(() => {\n pendingConnections.delete(cacheKey);\n });\n\n pendingConnections.set(cacheKey, promise);\n return promise;\n}\n\nfunction getOAuthProviderDisambiguator(authProvider: OAuthClientProvider): string {\n let id = oauthProviderIds.get(authProvider);\n if (!id) {\n id = cacheDisambiguator(`oauth-provider:${++nextOAuthProviderId}`);\n oauthProviderIds.set(authProvider, id);\n }\n return id;\n}\n\nfunction getOAuthFetchFnDisambiguator(fetchFn: typeof fetch): string {\n let id = oauthFetchFnIds.get(fetchFn);\n if (!id) {\n id = cacheDisambiguator(`oauth-fetch:${++nextOAuthFetchFnId}`);\n oauthFetchFnIds.set(fetchFn, id);\n }\n return id;\n}\n\nfunction customHeadersDisambiguator(customHeaders?: Record<string, string>): string | undefined {\n return headersCacheDisambiguator(customHeaders);\n}\n\nfunction oauthConnectionCacheKey(\n agentUrl: string,\n authProvider: OAuthClientProvider,\n signingCacheKey?: string,\n customHeaders?: Record<string, string>,\n fetchFn?: typeof fetch\n): string {\n const parts = [`${agentUrl}::oauth:${getOAuthProviderDisambiguator(authProvider)}`];\n if (signingCacheKey) parts.push(signingCacheKey);\n const headersKey = customHeadersDisambiguator(customHeaders);\n if (headersKey) parts.push(`headers:${headersKey}`);\n if (fetchFn) parts.push(`fetch:${getOAuthFetchFnDisambiguator(fetchFn)}`);\n return parts.join('::');\n}\n\n/** Get a cached OAuth connection, refreshing its LRU position. */\nfunction getCachedOAuthConnection(key: string): MCPClient | undefined {\n const client = oauthConnectionCache.get(key);\n if (client) {\n oauthConnectionCache.delete(key);\n oauthConnectionCache.set(key, client);\n }\n return client;\n}\n\nasync function getOrCreateOAuthConnection(\n cacheKey: string,\n options: {\n agentUrl: string;\n authProvider: OAuthClientProvider;\n debugLogs: DebugLogEntry[];\n customHeaders?: Record<string, string>;\n signingContext?: AgentSigningContext;\n signal?: AbortSignal;\n requestTimeoutMs?: number;\n fetchFn?: typeof fetch;\n }\n): Promise<MCPClient> {\n const cached = getCachedOAuthConnection(cacheKey);\n if (cached) return cached;\n\n const pending = pendingOAuthConnections.get(cacheKey);\n if (pending) return pending;\n\n const promise = connectMCP(options)\n .then(({ client }) => {\n oauthConnectionCache.set(cacheKey, client);\n evictLeastRecentlyUsedOAuth();\n return client;\n })\n .finally(() => {\n pendingOAuthConnections.delete(cacheKey);\n });\n\n pendingOAuthConnections.set(cacheKey, promise);\n return promise;\n}\n\nasync function withCachedOAuthConnection<T>(\n options: {\n agentUrl: string;\n authProvider: OAuthClientProvider;\n debugLogs: DebugLogEntry[];\n customHeaders?: Record<string, string>;\n signingContext?: AgentSigningContext;\n signal?: AbortSignal;\n requestTimeoutMs?: number;\n fetchFn?: typeof fetch;\n },\n label: string,\n fn: (client: MCPClient) => Promise<T>\n): Promise<T> {\n const cacheKey = oauthConnectionCacheKey(\n options.agentUrl,\n options.authProvider,\n options.signingContext?.cacheKey,\n options.customHeaders,\n options.fetchFn\n );\n if (options.signal || options.requestTimeoutMs !== undefined || options.fetchFn) {\n const { client } = await connectMCP(options);\n try {\n return await fn(client);\n } finally {\n try {\n await client.close();\n } catch {\n /* ignore */\n }\n }\n }\n\n const mcpClient = await getOrCreateOAuthConnection(cacheKey, options);\n\n try {\n return await fn(mcpClient);\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n options.debugLogs.push({\n type: 'error',\n message: `MCP: ${label} OAuth call failed: ${errorMessage}`,\n timestamp: new Date().toISOString(),\n error,\n });\n\n if (is401Error(error)) {\n oauthConnectionCache.delete(cacheKey);\n try {\n await mcpClient.close();\n } catch {\n /* ignore */\n }\n options.debugLogs.push({\n type: 'warning',\n message: `MCP: OAuth authentication issue detected for ${label}; evicted cached connection`,\n timestamp: new Date().toISOString(),\n });\n throw error;\n }\n\n if (isAbortOrTimeoutError(error)) {\n throw error;\n }\n\n oauthConnectionCache.delete(cacheKey);\n try {\n await mcpClient.close();\n } catch {\n /* ignore */\n }\n\n const retryClient = await getOrCreateOAuthConnection(cacheKey, {\n ...options,\n debugLogs: options.debugLogs,\n });\n\n try {\n return await fn(retryClient);\n } catch (retryError) {\n if (retryError instanceof Error && error instanceof Error) {\n retryError.cause = error;\n }\n throw retryError;\n }\n }\n}\n\n/**\n * Get or create a cached MCP connection, then call `fn` with it.\n * On transport errors, evicts the stale connection and retries once.\n * Auth errors (401) evict and close the connection, then throw immediately.\n *\n * @internal Used by mcp-tasks.ts for protocol-level task operations.\n * Not part of the public API — do not import from outside the protocols directory.\n */\nexport async function withCachedConnection<T>(\n agentUrl: string,\n authToken: string | undefined,\n authHeaders: Record<string, string>,\n debugLogs: DebugLogEntry[],\n label: string,\n fn: (client: MCPClient) => Promise<T>,\n transportFetch?: typeof fetch,\n requestOptions: { signal?: AbortSignal; requestTimeoutMs?: number } = {}\n): Promise<T> {\n const signingContext = signingContextStorage.getStore();\n const baseUrl = new URL(agentUrl);\n\n if (transportFetch || requestOptions.signal || requestOptions.requestTimeoutMs !== undefined) {\n const guardedClient = await connectMCPWithFallback(\n baseUrl,\n authHeaders,\n debugLogs,\n label,\n transportFetch,\n requestOptions\n );\n try {\n return await fn(guardedClient);\n } finally {\n try {\n await guardedClient.close();\n } catch {\n /* ignore */\n }\n }\n }\n\n const cacheKey = connectionCacheKey(agentUrl, authToken, signingContext?.cacheKey, authHeaders);\n const mcpClient = await getOrCreateConnection(cacheKey, baseUrl, authHeaders, debugLogs, label, requestOptions);\n\n try {\n return await fn(mcpClient);\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n debugLogs.push({\n type: 'error',\n message: `MCP: ${label} call failed: ${errorMessage}`,\n timestamp: new Date().toISOString(),\n error,\n });\n\n // Auth errors won't be fixed by reconnecting — fail fast\n if (is401Error(error)) {\n connectionCache.delete(cacheKey);\n try {\n await mcpClient.close();\n } catch {\n /* ignore */\n }\n debugLogs.push({\n type: 'warning',\n message: `MCP: Authentication issue detected for ${label} - headers may not be reaching server`,\n timestamp: new Date().toISOString(),\n });\n throw error;\n }\n\n if (isAbortOrTimeoutError(error)) {\n throw error;\n }\n\n // Evict stale connection and retry once with a fresh connection\n connectionCache.delete(cacheKey);\n try {\n await mcpClient.close();\n } catch {\n /* ignore */\n }\n\n const retryClient = await getOrCreateConnection(\n cacheKey,\n baseUrl,\n authHeaders,\n debugLogs,\n `${label} (retry)`,\n requestOptions\n );\n\n try {\n return await fn(retryClient);\n } catch (retryError) {\n // Attach original error for diagnostics\n if (retryError instanceof Error && error instanceof Error) {\n retryError.cause = error;\n }\n throw retryError;\n }\n }\n}\n\n/**\n * Options for MCP tool calls with OAuth support\n */\nexport interface MCPCallOptions {\n /** Agent URL */\n agentUrl: string;\n /** Tool name to call */\n toolName: string;\n /** Tool arguments */\n args: Record<string, unknown>;\n /** Static auth token (legacy) */\n authToken?: string;\n /** OAuth provider for dynamic auth */\n authProvider?: OAuthClientProvider;\n /** Debug logs array */\n debugLogs?: DebugLogEntry[];\n /** Additional headers to send with every request (auth headers take precedence) */\n customHeaders?: Record<string, string>;\n /** RFC 9421 signing context — when set, the transport signs outbound ops per seller capability. */\n signingContext?: AgentSigningContext;\n /** Caller-owned cancellation signal for connect and callTool. */\n signal?: AbortSignal;\n /** Optional per-request timeout for connect and callTool. */\n requestTimeoutMs?: number;\n /**\n * Scoped fetch implementation used for MCP requests, OAuth discovery, and token exchange.\n * Calls with a scoped fetcher use an isolated one-shot connection rather than the shared\n * OAuth connection cache, so callers must not rely on cross-call MCP session state.\n */\n fetchFn?: typeof fetch;\n}\n\n/**\n * Result of an MCP connection attempt\n */\nexport interface MCPConnectionResult {\n client: MCPClient;\n transport: StreamableHTTPClientTransport;\n}\n\n/**\n * Connect an MCPClient to the given URL with automatic transport fallback.\n *\n * Strategy:\n * 1. Try StreamableHTTPClientTransport.\n * 2. On any transient connect failure (generic Error, McpError, or StreamableHTTPError),\n * retry once with a fresh StreamableHTTP connection. Auth failures (401) are excluded —\n * a retry is pointless and wastes a round-trip.\n * 3. If a 401 is returned, throw immediately — auth failure is transport-agnostic.\n * 4. For any other error after retry, fall back to SSEClientTransport with the same headers.\n *\n * The returned client is connected and ready for use. Callers are responsible for\n * calling client.close() when done.\n */\nexport async function connectMCPWithFallback(\n url: URL,\n authHeaders: Record<string, string>,\n debugLogs: DebugLogEntry[] = [],\n label = 'connection',\n transportFetch?: typeof fetch,\n requestOptions: { signal?: AbortSignal; requestTimeoutMs?: number } = {}\n): Promise<MCPClient> {\n return withSpan(\n 'adcp.mcp.connect',\n {\n 'http.url': url.toString(),\n 'adcp.connection_label': label,\n },\n async () => {\n return connectMCPWithFallbackImpl(url, authHeaders, debugLogs, label, transportFetch, requestOptions);\n }\n );\n}\n\nasync function connectMCPWithFallbackImpl(\n url: URL,\n authHeaders: Record<string, string>,\n debugLogs: DebugLogEntry[] = [],\n label = 'connection',\n transportFetch?: typeof fetch,\n requestOptions: { signal?: AbortSignal; requestTimeoutMs?: number } = {}\n): Promise<MCPClient> {\n const signingContext = signingContextStorage.getStore();\n // Wrap order (innermost → outermost): network → size-limit → signing → capture.\n // Size-limit applies to the raw network response so signing/capture see a\n // bounded body (capture clones via `response.clone()`, which would otherwise\n // buffer a hostile reply in memory).\n const requestTimeoutMs = resolveRequestTimeoutMs(requestOptions.requestTimeoutMs);\n const clientRequestTimeoutMs = resolveClientRequestTimeoutMs(requestOptions.requestTimeoutMs);\n const mcpRequestOptions = {\n ...(requestOptions.signal && { signal: requestOptions.signal }),\n ...(clientRequestTimeoutMs !== undefined && { timeout: clientRequestTimeoutMs }),\n };\n const rawNetworkFetch: typeof fetch = transportFetch ?? ((input, init) => fetch(input as any, init));\n const networkFetch = (input: Parameters<typeof fetch>[0], init?: RequestInit) =>\n withAbortSignal<Response>([requestOptions.signal, init?.signal], requestTimeoutMs, signal =>\n rawNetworkFetch(input, { ...init, signal })\n );\n const sizeLimited = wrapFetchWithSizeLimit(networkFetch);\n const diagnosticFetch = wrapFetchWithTransportDiagnostics(sizeLimited);\n const baseFetch: typeof fetch = signingContext\n ? (buildAgentSigningFetch({\n upstream: diagnosticFetch,\n signing: signingContext.signing,\n getCapability: signingContext.getCapability,\n }) as typeof fetch)\n : diagnosticFetch;\n const transportOptions: StreamableHTTPClientTransportOptions = {\n requestInit: { headers: authHeaders, redirect: 'manual' },\n fetch: wrapFetchWithCapture(baseFetch),\n };\n let failedClient: MCPClient | undefined;\n\n try {\n const client = new MCPClient({ name: 'AdCP-Client', version: '1.0.0' });\n failedClient = client;\n debugLogs.push({\n type: 'info',\n message: `MCP: Attempting StreamableHTTP ${label} to ${url}`,\n timestamp: new Date().toISOString(),\n });\n await client.connect(new StreamableHTTPClientTransport(url, transportOptions), mcpRequestOptions);\n failedClient = undefined;\n trackStreamableHTTPUrl(url.toString());\n debugLogs.push({\n type: 'success',\n message: `MCP: Connected via StreamableHTTP for ${label}`,\n timestamp: new Date().toISOString(),\n });\n return client;\n } catch (error: unknown) {\n // Close the failed client to avoid resource leaks\n if (failedClient) {\n try {\n await failedClient.close();\n } catch {\n /* ignore */\n }\n }\n\n const errorMessage = error instanceof Error ? error.message : String(error);\n const errorClass = error instanceof Error ? error.constructor.name : typeof error;\n const httpStatus = error instanceof StreamableHTTPError ? ` [HTTP ${error.code}]` : '';\n debugLogs.push({\n type: 'error',\n message: `MCP: StreamableHTTP failed for ${label}${httpStatus} (${errorClass}): ${errorMessage}`,\n timestamp: new Date().toISOString(),\n error,\n });\n\n if (isAbortOrTimeoutError(error)) {\n throw error;\n }\n\n // Retry StreamableHTTP once on any transient connect failure — network blips,\n // JSON parse errors on half-buffered responses, and mid-handshake proxy\n // disconnects all surface as generic Error or McpError, not StreamableHTTPError.\n // Auth failures are the only class where retry is pointless and wasteful.\n if (!is401Error(error)) {\n debugLogs.push({\n type: 'info',\n message: `MCP: Transient connect error (${errorClass}) detected, retrying StreamableHTTP for ${label}`,\n timestamp: new Date().toISOString(),\n });\n const retryClient = new MCPClient({ name: 'AdCP-Client', version: '1.0.0' });\n try {\n await retryClient.connect(new StreamableHTTPClientTransport(url, transportOptions), mcpRequestOptions);\n trackStreamableHTTPUrl(url.toString());\n debugLogs.push({\n type: 'success',\n message: `MCP: Connected via StreamableHTTP (retry) for ${label}`,\n timestamp: new Date().toISOString(),\n });\n return retryClient;\n } catch (retryError) {\n try {\n await retryClient.close();\n } catch {\n /* ignore */\n }\n debugLogs.push({\n type: 'error',\n message: `MCP: StreamableHTTP retry also failed for ${label}: ${retryError instanceof Error ? retryError.message : String(retryError)}`,\n timestamp: new Date().toISOString(),\n });\n if (isAbortOrTimeoutError(retryError)) {\n throw retryError;\n }\n // Fall through to SSE fallback below\n }\n }\n\n // Auth failure — transport type won't change the outcome\n if (is401Error(error)) {\n throw error;\n }\n\n // If StreamableHTTP previously worked for this URL, don't fall back to SSE.\n // Transient failures (connection reuse, concurrency limits) should be retried\n // with StreamableHTTP, not SSE — SSE sends GET requests that return 405 on\n // servers that only support POST-based StreamableHTTP.\n if (knownStreamableHTTPUrls.has(url.toString())) {\n debugLogs.push({\n type: 'info',\n message: `MCP: StreamableHTTP previously succeeded for ${url} — skipping SSE fallback for ${label}`,\n timestamp: new Date().toISOString(),\n });\n throw error;\n }\n\n // Fall back to SSE\n debugLogs.push({\n type: 'warning',\n message: `MCP: Falling back to SSE transport for ${label}`,\n timestamp: new Date().toISOString(),\n });\n const client = new MCPClient({ name: 'AdCP-Client', version: '1.0.0' });\n try {\n await client.connect(\n new SSEClientTransport(url, {\n requestInit: { headers: authHeaders, redirect: 'manual' },\n fetch: wrapFetchWithCapture(baseFetch),\n }),\n mcpRequestOptions\n );\n } catch (sseError) {\n try {\n await client.close();\n } catch {\n /* ignore */\n }\n throw sseError;\n }\n debugLogs.push({\n type: 'success',\n message: `MCP: Connected via SSE transport for ${label}`,\n timestamp: new Date().toISOString(),\n });\n return client;\n }\n}\n\nexport async function callMCPTool(\n agentUrl: string,\n toolName: string,\n args: Record<string, unknown>,\n authToken?: string,\n debugLogs: DebugLogEntry[] = [],\n customHeaders?: Record<string, string>,\n signingContext?: AgentSigningContext,\n transportFetch?: typeof fetch,\n requestOptions?: { signal?: AbortSignal; requestTimeoutMs?: number }\n): Promise<unknown> {\n debugLogs.push({\n type: 'info',\n message: `MCP: Auth configuration`,\n timestamp: new Date().toISOString(),\n hasAuth: !!authToken,\n headers: authToken ? { 'x-adcp-auth': '***' } : {},\n customHeaderKeys: customHeaders ? Object.keys(customHeaders) : [],\n });\n debugLogs.push({\n type: 'info',\n message: `MCP: Calling tool ${toolName} with args: ${JSON.stringify(redactArgsForLog(args))}`,\n timestamp: new Date().toISOString(),\n });\n if (authToken) {\n debugLogs.push({\n type: 'info',\n message: `MCP: Transport configured with x-adcp-auth header for ${toolName}`,\n timestamp: new Date().toISOString(),\n });\n }\n\n // Custom fetch injection is an internal conformance seam whose mocks use\n // the v1 transport shape. Normal remote calls negotiate the modern era;\n // injected transports retain their exact legacy behavior.\n if (!transportFetch) {\n const modernAttempt = await tryCallModernMCPTool(agentUrl, toolName, args, authToken, debugLogs, customHeaders, {\n ...(signingContext && { signingContext }),\n ...(requestOptions?.signal && { signal: requestOptions.signal }),\n ...(requestOptions?.requestTimeoutMs !== undefined && {\n requestTimeoutMs: requestOptions.requestTimeoutMs,\n }),\n });\n if (modernAttempt.handled) {\n debugLogs.push({\n type: modernAttempt.response?.isError ? 'error' : 'success',\n message: `MCP: Tool ${toolName} response received (${modernAttempt.response?.isError ? 'error' : 'success'})`,\n timestamp: new Date().toISOString(),\n response: modernAttempt.response,\n });\n return modernAttempt.response;\n }\n }\n\n return withSpan(\n 'adcp.mcp.call_tool',\n {\n 'adcp.tool': toolName,\n 'http.url': agentUrl,\n },\n async () => {\n return signingContextStorage.run(signingContext, () =>\n callMCPToolImpl(agentUrl, toolName, args, authToken, debugLogs, customHeaders, transportFetch, requestOptions)\n );\n }\n );\n}\n\n/**\n * Call an MCP tool and return the raw CallToolResult (with isError, content, structuredContent).\n * Raw MCP tool call — returns the CallToolResult directly, including isError responses.\n */\nexport async function callMCPToolRaw(\n agentUrl: string,\n toolName: string,\n args: Record<string, unknown>,\n authToken?: string,\n debugLogs: DebugLogEntry[] = [],\n customHeaders?: Record<string, string>,\n signingContext?: AgentSigningContext,\n transportFetch?: typeof fetch\n): Promise<unknown> {\n return signingContextStorage.run(signingContext, () =>\n callMCPToolRawImpl(agentUrl, toolName, args, authToken, debugLogs, customHeaders, transportFetch)\n );\n}\n\nasync function callMCPToolImpl(\n agentUrl: string,\n toolName: string,\n args: Record<string, unknown>,\n authToken?: string,\n debugLogs: DebugLogEntry[] = [],\n customHeaders?: Record<string, string>,\n transportFetch?: typeof fetch,\n requestOptions?: { signal?: AbortSignal; requestTimeoutMs?: number }\n): Promise<unknown> {\n // Inject trace context headers for distributed tracing\n const traceHeaders = injectTraceHeaders();\n\n // Merge: custom < trace < auth (auth always wins)\n const authHeaders = {\n ...customHeaders,\n ...traceHeaders,\n ...(authToken ? createMCPAuthHeaders(authToken) : {}),\n };\n\n const resolvedRequestTimeoutMs = resolveClientRequestTimeoutMs(requestOptions?.requestTimeoutMs);\n const response = await withCachedConnection(\n agentUrl,\n authToken,\n authHeaders,\n debugLogs,\n toolName,\n client =>\n client.callTool({ name: toolName, arguments: args }, undefined, {\n ...(requestOptions?.signal && { signal: requestOptions.signal }),\n ...(resolvedRequestTimeoutMs !== undefined && { timeout: resolvedRequestTimeoutMs }),\n }) as Promise<CallToolResponse>,\n transportFetch,\n requestOptions\n );\n\n debugLogs.push({\n type: response?.isError ? 'error' : 'success',\n message: `MCP: Tool ${toolName} response received (${response?.isError ? 'error' : 'success'})`,\n timestamp: new Date().toISOString(),\n response: response,\n });\n\n return response;\n}\n\n/**\n * Raw MCP tool call — returns the CallToolResult directly.\n */\nasync function callMCPToolRawImpl(\n agentUrl: string,\n toolName: string,\n args: Record<string, unknown>,\n authToken?: string,\n debugLogs: DebugLogEntry[] = [],\n customHeaders?: Record<string, string>,\n transportFetch?: typeof fetch\n): Promise<unknown> {\n const traceHeaders = injectTraceHeaders();\n const authHeaders = {\n ...customHeaders,\n ...traceHeaders,\n ...(authToken ? createMCPAuthHeaders(authToken) : {}),\n };\n\n return withCachedConnection(\n agentUrl,\n authToken,\n authHeaders,\n debugLogs,\n toolName,\n client => client.callTool({ name: toolName, arguments: args }),\n transportFetch\n );\n}\n\n/**\n * Connect to an MCP server with OAuth support\n *\n * This function handles both static token auth and OAuth flows.\n * When using OAuth, if the server requires authorization:\n * 1. UnauthorizedError is thrown\n * 2. The OAuth provider's redirectToAuthorization is called\n * 3. Caller should wait for callback and call finishAuth on transport\n *\n * @param options Connection options\n * @returns MCP client and transport (for finishing OAuth if needed)\n * @throws UnauthorizedError if OAuth is required\n *\n * @example\n * ```typescript\n * // With OAuth provider\n * const provider = createCLIOAuthProvider(serverUrl);\n *\n * try {\n * const { client, transport } = await connectMCP({\n * agentUrl: serverUrl,\n * authProvider: provider\n * });\n * // Connected! Use client...\n * } catch (error) {\n * if (error instanceof UnauthorizedError) {\n * // OAuth flow started, wait for callback\n * const code = await provider.waitForCallback();\n * await transport.finishAuth(code);\n * // Retry connection...\n * }\n * }\n * ```\n *\n * @deprecated Low-level v1/SSE escape hatch. High-level AgentClient discovery,\n * tool listing, OAuth calls, and `callMCPTool*` APIs negotiate MCP 2026-07-28.\n * Keep this only for callers that require the v1 SDK client/transport pair or\n * its interactive `finishAuth()` lifecycle.\n */\nexport async function connectMCP(options: {\n agentUrl: string;\n authToken?: string;\n authProvider?: OAuthClientProvider;\n debugLogs?: DebugLogEntry[];\n customHeaders?: Record<string, string>;\n signingContext?: AgentSigningContext;\n signal?: AbortSignal;\n requestTimeoutMs?: number;\n fetchFn?: typeof fetch;\n}): Promise<MCPConnectionResult> {\n const {\n agentUrl,\n authToken,\n authProvider,\n debugLogs = [],\n customHeaders,\n signingContext,\n signal,\n requestTimeoutMs: configuredRequestTimeoutMs,\n fetchFn,\n } = options;\n const baseUrl = new URL(agentUrl);\n\n debugLogs.push({\n type: 'info',\n message: `MCP: Connecting to ${baseUrl}`,\n timestamp: new Date().toISOString(),\n authMethod: authProvider ? 'oauth' : authToken ? 'token' : 'none',\n });\n\n const mcpClient = new MCPClient({\n name: 'AdCP-Client',\n version: '1.0.0',\n });\n\n // Build transport options\n const transportOptions: StreamableHTTPClientTransportOptions = {};\n\n // Header-only auth (basic, x-api-key, custom routing) lives entirely on\n // `customHeaders`. Attach it whenever it's present, regardless of which\n // auth branch fires — OAuth + routing headers, bearer + tenant headers,\n // and pure-header auth must all reach the wire.\n //\n // Precedence note: the MCP SDK's `_commonHeaders()` (StreamableHTTP)\n // spreads `requestInit.headers` *over* any provider-emitted `Authorization`\n // (`new Headers({ ...providerHeaders, ...requestInitHeaders })`, last-write-\n // wins). To prevent a caller-supplied `Authorization` in `customHeaders`\n // from silently overriding the OAuth provider's bearer, drop any\n // `Authorization` key from `customHeaders` when `authProvider` is set.\n // OAuth is the source of truth for the bearer in that branch; non-auth\n // routing/tenant headers still flow through.\n const filteredCustomHeaders = authProvider\n ? Object.fromEntries(Object.entries(customHeaders ?? {}).filter(([k]) => k.toLowerCase() !== 'authorization'))\n : customHeaders;\n const authHeaders: Record<string, string> = {\n ...filteredCustomHeaders,\n ...(authToken ? createMCPAuthHeaders(authToken) : {}),\n };\n transportOptions.requestInit = { headers: authHeaders, redirect: 'manual' };\n if (authProvider) {\n transportOptions.authProvider = authProvider;\n debugLogs.push({\n type: 'info',\n message: 'MCP: Using OAuth provider for authentication',\n timestamp: new Date().toISOString(),\n });\n } else if (authToken) {\n debugLogs.push({\n type: 'info',\n message: 'MCP: Using static token for authentication',\n timestamp: new Date().toISOString(),\n });\n } else if (Object.keys(authHeaders).length > 0) {\n debugLogs.push({\n type: 'info',\n message: 'MCP: Using custom headers for authentication',\n timestamp: new Date().toISOString(),\n });\n }\n\n // RFC 9421 signing — wrap the transport's fetch so the signer sees the final\n // headers the SDK assembled (including any OAuth-issued Authorization) and\n // decides per outbound request whether to sign. Size-limit sits innermost so\n // the response body is bounded before signing/capture observe it.\n const requestTimeoutMs = resolveRequestTimeoutMs(configuredRequestTimeoutMs);\n const clientRequestTimeoutMs = resolveClientRequestTimeoutMs(configuredRequestTimeoutMs);\n const requestOptions = {\n ...(signal && { signal }),\n ...(clientRequestTimeoutMs !== undefined && { timeout: clientRequestTimeoutMs }),\n };\n const rawNetworkFetch: typeof fetch = fetchFn ?? ((input, init) => fetch(input, init));\n const sizeLimited = wrapFetchWithSizeLimit((input, init) =>\n withAbortSignal<Response>([signal, init?.signal], requestTimeoutMs, linkedSignal =>\n rawNetworkFetch(input, { ...init, signal: linkedSignal })\n )\n );\n const diagnosticFetch = wrapFetchWithTransportDiagnostics(sizeLimited);\n const signedFetch: typeof fetch = signingContext\n ? (buildAgentSigningFetch({\n upstream: diagnosticFetch,\n signing: signingContext.signing,\n getCapability: signingContext.getCapability,\n }) as typeof fetch)\n : diagnosticFetch;\n transportOptions.fetch = wrapFetchWithCapture(signedFetch);\n\n const transport = new StreamableHTTPClientTransport(baseUrl, transportOptions);\n\n try {\n await mcpClient.connect(transport, requestOptions);\n debugLogs.push({\n type: 'success',\n message: 'MCP: Connected successfully',\n timestamp: new Date().toISOString(),\n });\n return { client: mcpClient, transport };\n } catch (error) {\n // If it's an UnauthorizedError, the OAuth flow has started\n // Rethrow so the caller can handle the callback\n if (error instanceof UnauthorizedError) {\n debugLogs.push({\n type: 'info',\n message: 'MCP: OAuth authorization required, flow initiated',\n timestamp: new Date().toISOString(),\n });\n // Return transport so caller can call finishAuth\n throw Object.assign(error, { transport, client: mcpClient });\n }\n\n // Non-OAuth 401 — the SDK sent credentials that the agent rejected (or\n // sent none when it needed them). The raw transport error is shaped like\n // `Error POSTing to endpoint (HTTP 401): unauthorized`, which omits the\n // crucial piece of debug data: *which auth scheme did the SDK actually\n // use*. Without that, a caller can't diff against curl. Wrap the error\n // with a scheme tag and a remediation hint, preserving the original\n // under `.cause` so existing `is401Error` / `error.status` checks\n // downstream still resolve.\n if (is401Error(error)) {\n const scheme = authProvider\n ? 'oauth'\n : authToken\n ? 'bearer'\n : Object.keys(authHeaders).length > 0\n ? 'header'\n : 'none';\n const hint =\n scheme === 'none'\n ? 'No credentials were sent. Configure auth_token, headers, or oauth_tokens on the agent config (or pass --auth on the CLI).'\n : scheme === 'header'\n ? \"Verify the Authorization header value matches the gateway (basic-auth: 'Basic ' + base64(user:pass); pair with --auth-scheme basic on the CLI).\"\n : scheme === 'bearer'\n ? \"Verify the bearer token matches the agent's expected credential.\"\n : 'OAuth provider returned tokens that the agent rejected — check the provider configuration and token scopes.';\n const detail = `MCP connect rejected with HTTP 401 from ${agentUrl}. SDK sent auth scheme: ${scheme}. ${hint}`;\n const wrapped = Object.assign(new Error(detail), {\n cause: error,\n code: 'MCP_AUTH_REJECTED',\n scheme,\n agentUrl,\n originalError: error,\n });\n throw wrapped;\n }\n\n throw error;\n }\n}\n\n/**\n * Call an MCP tool with OAuth support.\n *\n * OAuth connections are cached by agent URL and OAuth provider identity so a\n * service-to-service workflow can reuse the initialized MCP session across\n * related tool calls. Reuse the same OAuthClientProvider instance for a\n * session/source/principal; the provider owns token refresh state for the\n * cached transport.\n *\n * Supplying `fetchFn` opts out of connection reuse. Scoped fetchers commonly\n * carry request- or tenant-specific network policy, so each call gets an\n * isolated connection that is closed after the tool response.\n *\n * Signing: this path consumes `options.signingContext` via the transport —\n * `connectMCP` attaches a signing-fetch wrapper at transport-creation time —\n * rather than via `signingContextStorage`. The OAuth cache key includes the\n * signing cache key so different signing identities do not share a transport.\n * The non-OAuth fallback (`callMCPTool`) does enter ALS.\n *\n * @param options Call options\n * @returns Tool response\n * @throws UnauthorizedError if OAuth is required (with transport attached)\n */\nexport async function callMCPToolWithOAuth(options: MCPCallOptions): Promise<unknown> {\n const {\n agentUrl,\n toolName,\n args,\n authToken,\n authProvider,\n debugLogs = [],\n customHeaders,\n signingContext,\n signal,\n requestTimeoutMs,\n fetchFn,\n } = options;\n const resolvedRequestTimeoutMs = resolveClientRequestTimeoutMs(requestTimeoutMs);\n const requestOptions = {\n ...(signal && { signal }),\n ...(resolvedRequestTimeoutMs !== undefined && { timeout: resolvedRequestTimeoutMs }),\n };\n\n // If no OAuth provider, use the legacy function\n if (!authProvider) {\n return callMCPTool(agentUrl, toolName, args, authToken, debugLogs, customHeaders, signingContext, fetchFn, {\n signal,\n requestTimeoutMs,\n });\n }\n\n const modernAttempt = await tryCallModernMCPTool(agentUrl, toolName, args, undefined, debugLogs, customHeaders, {\n authProvider,\n signingContext,\n signal,\n requestTimeoutMs,\n fetchFn,\n handleLegacy: true,\n });\n if (modernAttempt.handled) {\n debugLogs.push({\n type: modernAttempt.response?.isError ? 'error' : 'success',\n message: `MCP: Tool ${toolName} response received`,\n timestamp: new Date().toISOString(),\n });\n return modernAttempt.response;\n }\n\n const response = await withCachedOAuthConnection(\n {\n agentUrl,\n authProvider,\n debugLogs,\n customHeaders,\n signingContext,\n signal,\n requestTimeoutMs,\n fetchFn,\n },\n toolName,\n async client => {\n debugLogs.push({\n type: 'info',\n message: `MCP: Calling tool ${toolName}`,\n timestamp: new Date().toISOString(),\n });\n\n const response = await client.callTool({ name: toolName, arguments: args }, undefined, requestOptions);\n\n debugLogs.push({\n type: response?.isError ? 'error' : 'success',\n message: `MCP: Tool ${toolName} response received`,\n timestamp: new Date().toISOString(),\n });\n\n return response;\n }\n );\n\n return response;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAoC;AACpC,4BAIO;AACP,iBAAmC;AACnC,kBAAkC;AAElC,yBAA2B;AAC3B,IAAAA,eAAqC;AACrC,oBAA2B;AAE3B,qBAA6C;AAC7C,IAAAC,iBAAwF;AACxF,yBAAiC;AACjC,gCAAqC;AACrC,+BAAuC;AACvC,kCAAkD;AAClD,mBAKO;AACP,wBAAgE;AA4BhE,MAAM,kBAAkB,oBAAI,IAAuB;AACnD,MAAM,qBAAqB,oBAAI,IAAgC;AAC/D,MAAM,uBAAuB,oBAAI,IAAuB;AACxD,MAAM,0BAA0B,oBAAI,IAAgC;AACpE,MAAM,mBAAmB,oBAAI,QAAqC;AAClE,MAAM,kBAAkB,oBAAI,QAA8B;AAC1D,MAAM,yBAAyB;AAC/B,IAAI,sBAAsB;AAC1B,IAAI,qBAAqB;AAWzB,MAAM,0BAA0B,oBAAI,IAAY;AAEhD,SAAS,uBAAuB,KAAmB;AAEjD,0BAAwB,OAAO,GAAG;AAClC,0BAAwB,IAAI,GAAG;AAE/B,SAAO,wBAAwB,OAAO,wBAAwB;AAC5D,UAAM,SAAS,wBAAwB,OAAO,EAAE,KAAK,EAAE;AACvD,QAAI,OAAQ,yBAAwB,OAAO,MAAM;AAAA,EACnD;AACF;AAqBA,SAAS,mBACP,UACA,WACA,iBACA,aACQ;AACR,QAAM,QAAQ,CAAC,QAAQ;AACvB,QAAM,cAAc,aAAa,kBAAkB,WAAW;AAC9D,MAAI,YAAa,OAAM,KAAK,mBAAmB,WAAW,CAAC;AAC3D,QAAM,aAAa,0BAA0B,WAAW;AACxD,MAAI,WAAY,OAAM,KAAK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;AACzB,cAAU,KAAK;AAAA,MACb,MAAM,cAAc,UAAU,UAAU,UAAU;AAAA,MAClD,SAAS,aAAa,QAAQ;AAAA,MAC9B,YAAW,oBAAI,KAAK,GAAE,YAAY;AAAA,IACpC,CAAC;AACD,WAAO,cAAc;AAAA,EACvB;AAEA,QAAM,WAAW,MAAM;AAAA,IACrB;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA,OAAM,WAAU;AACd,gBAAU,KAAK;AAAA,QACb,MAAM;AAAA,QACN,SAAS,qBAAqB,QAAQ;AAAA,QACtC,YAAW,oBAAI,KAAK,GAAE,YAAY;AAAA,MACpC,CAAC;AAED,YAAMC,YAAW,MAAM,OAAO,SAAS,EAAE,MAAM,UAAU,WAAW,KAAK,GAAG,QAAW,cAAc;AAErG,gBAAU,KAAK;AAAA,QACb,MAAMA,WAAU,UAAU,UAAU;AAAA,QACpC,SAAS,aAAa,QAAQ;AAAA,QAC9B,YAAW,oBAAI,KAAK,GAAE,YAAY;AAAA,MACpC,CAAC;AAED,aAAOA;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;","names":["import_auth","import_client","MCPClient","response"]}
1
+ {"version":3,"sources":["../../../src/lib/protocols/mcp.ts"],"sourcesContent":["// Official MCP client implementation using HTTP streaming transport with SSE fallback\nimport { Client as MCPClient } from '@modelcontextprotocol/sdk/client/index.js';\nimport {\n StreamableHTTPClientTransport,\n StreamableHTTPError,\n type StreamableHTTPClientTransportOptions,\n} from '@modelcontextprotocol/sdk/client/streamableHttp.js';\nimport { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';\nimport { UnauthorizedError } from '@modelcontextprotocol/sdk/client/auth.js';\nimport type { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js';\nimport { createHmac } from 'node:crypto';\nimport { createMCPAuthHeaders } from '../auth';\nimport { is401Error } from '../errors';\nimport type { DebugLogEntry } from '../types/adcp';\nimport { withSpan, injectTraceHeaders } from '../observability/tracing';\nimport { buildAgentSigningFetch, signingContextStorage, type AgentSigningContext } from '../signing/client';\nimport { redactArgsForLog } from '../utils/redact-args';\nimport { wrapFetchWithCapture } from './rawResponseCapture';\nimport { wrapFetchWithSizeLimit } from './responseSizeLimit';\nimport { wrapFetchWithTransportDiagnostics } from './transportDiagnostics';\nimport {\n isAbortOrTimeoutError,\n resolveClientRequestTimeoutMs,\n resolveRequestTimeoutMs,\n withAbortSignal,\n} from './abort';\nimport { closeModernMCPConnections, tryCallModernMCPTool } from './mcp-modern';\n\n// Re-export for convenience\nexport { UnauthorizedError };\n\n/** Response shape returned by MCPClient.callTool(). */\ntype CallToolResponse = {\n isError?: boolean;\n content?: Array<{ type: string; text?: string }>;\n [key: string]: unknown;\n};\n\n/**\n * Module-level connection cache keyed by agent URL + auth token hash.\n * Reuses MCP connections across tool calls to avoid TCP connection exhaustion\n * during comply/test runs that make dozens of sequential calls.\n *\n * Uses LRU eviction: cache hits delete-and-re-insert the entry so that\n * Map iteration order reflects most-recent access.\n *\n * The cache key includes only URL + auth token hash. Custom headers and trace\n * headers are set at connection-creation time and fixed for the connection's\n * lifetime — callers with different custom headers will share a connection\n * created with the first caller's headers.\n *\n * Note: This is a process-global singleton. Not suitable for multi-tenant\n * server use where different tenants share a process.\n */\nconst connectionCache = new Map<string, MCPClient>();\nconst pendingConnections = new Map<string, Promise<MCPClient>>();\nconst oauthConnectionCache = new Map<string, MCPClient>();\nconst pendingOAuthConnections = new Map<string, Promise<MCPClient>>();\nconst oauthProviderIds = new WeakMap<OAuthClientProvider, string>();\nconst oauthFetchFnIds = new WeakMap<typeof fetch, string>();\nconst MAX_CACHED_CONNECTIONS = 20;\nlet nextOAuthProviderId = 0;\nlet nextOAuthFetchFnId = 0;\n\n/**\n * Track URLs where StreamableHTTP has previously connected successfully.\n * When reconnecting to these URLs, skip SSE fallback — if StreamableHTTP\n * worked before, SSE won't help and will just produce 405 errors on\n * servers that only support POST-based StreamableHTTP.\n *\n * Capped at MAX_CACHED_CONNECTIONS to avoid unbounded growth. Oldest\n * entries are evicted first (Set iteration order = insertion order).\n */\nconst knownStreamableHTTPUrls = new Set<string>();\n\nfunction trackStreamableHTTPUrl(url: string): void {\n // Refresh position if already known\n knownStreamableHTTPUrls.delete(url);\n knownStreamableHTTPUrls.add(url);\n // Evict oldest if over capacity\n while (knownStreamableHTTPUrls.size > MAX_CACHED_CONNECTIONS) {\n const oldest = knownStreamableHTTPUrls.values().next().value;\n if (oldest) knownStreamableHTTPUrls.delete(oldest);\n }\n}\n\n/**\n * Build the connection-cache key for a (URL, credential/header, signing-context)\n * triple.\n *\n * Two credential paths feed this cache. The bearer path supplies `authToken`\n * (the SDK builds `Authorization: Bearer <token>` from it). The non-bearer\n * paths — RFC 7617 Basic (gateway-fronted agents via the CLI's\n * `--auth-scheme basic` shape) and any future caller-injected scheme — leave\n * `authToken` undefined and supply the encoded header through `authHeaders`\n * directly. Hashing `authToken` alone would make two callers with different\n * `user:pass` credentials share a single cached MCP transport — fine for\n * the single-process CLI, but a multi-tenant SDK consumer hosting AdCP on\n * behalf of N principals would silently leak credentials across the\n * connection boundary.\n *\n * Also include non-trace custom headers in the key. Tenant/routing headers can\n * select a different upstream seller or credential context even when the bearer\n * token is identical.\n */\nfunction connectionCacheKey(\n agentUrl: string,\n authToken?: string,\n signingCacheKey?: string,\n authHeaders?: Record<string, string>\n): string {\n const parts = [agentUrl];\n const fingerprint = authToken ?? extractAuthHeader(authHeaders);\n if (fingerprint) parts.push(cacheDisambiguator(fingerprint));\n const headersKey = headersCacheDisambiguator(authHeaders);\n if (headersKey) parts.push(`headers:${headersKey}`);\n if (signingCacheKey) parts.push(signingCacheKey);\n return parts.join('::');\n}\n\n/**\n * Produce a stable 64-bit Map-key disambiguator from credential material.\n *\n * This is NOT a password hash. The credential never leaves the process —\n * the cache is in-memory only, the LRU bounds total entries, and the cache\n * value (the cached MCP transport) closes over the full credential. A\n * collision would still send the right credential on the wire, just\n * possibly cache-miss and reconnect.\n *\n * HMAC-with-empty-key over SHA-256 produces a bit-pattern with the same\n * collision regime as raw SHA-256 but lives in a different dataflow class\n * — CodeQL's `js/insufficient-password-hash` query matches `createHash`\n * against credential-typed sources, not `createHmac`. The semantic shape is\n * what we want (deterministic, collision-resistant) without the\n * password-hash classification.\n */\nfunction cacheDisambiguator(value: string): string {\n return createHmac('sha256', '').update(value).digest('hex').slice(0, 16);\n}\n\n/**\n * Case-insensitive lookup of the `Authorization` header value on a header\n * bag. Returns `undefined` when no such header is present.\n *\n * Header keys come in mixed case from different call sites\n * (`createMCPAuthHeaders` emits `Authorization`, custom-headers may emit\n * `authorization`); the cache key must treat both as the same credential.\n */\nfunction extractAuthHeader(headers?: Record<string, string>): string | undefined {\n if (!headers) return undefined;\n for (const [key, value] of Object.entries(headers)) {\n if (key.toLowerCase() === 'authorization' && value) return value;\n }\n return undefined;\n}\n\nfunction headersCacheDisambiguator(headers?: Record<string, string>): string | undefined {\n const entries = Object.entries(headers ?? {})\n .filter(([key]) => {\n const lower = key.toLowerCase();\n return lower !== 'traceparent' && lower !== 'tracestate' && lower !== 'baggage';\n })\n .map(([key, value]) => [key.toLowerCase(), value] as const)\n .sort(([a], [b]) => a.localeCompare(b));\n return entries.length > 0 ? cacheDisambiguator(JSON.stringify(entries)) : undefined;\n}\n\n/** Get a cached connection, refreshing its LRU position. */\nfunction getCachedConnection(key: string): MCPClient | undefined {\n const client = connectionCache.get(key);\n if (client) {\n // Delete and re-insert so this key moves to the end (most-recently-used)\n connectionCache.delete(key);\n connectionCache.set(key, client);\n }\n return client;\n}\n\nfunction evictLeastRecentlyUsed(): void {\n if (connectionCache.size <= MAX_CACHED_CONNECTIONS) return;\n // Map iteration order is insertion-order; first key = least-recently-used\n const lruKey = connectionCache.keys().next().value;\n if (!lruKey) return;\n const oldClient = connectionCache.get(lruKey);\n connectionCache.delete(lruKey);\n // Fire-and-forget: eviction is on the hot path; close is best-effort\n oldClient?.close().catch(() => {});\n}\n\nfunction evictLeastRecentlyUsedOAuth(): void {\n if (oauthConnectionCache.size <= MAX_CACHED_CONNECTIONS) return;\n const lruKey = oauthConnectionCache.keys().next().value;\n if (!lruKey) return;\n const oldClient = oauthConnectionCache.get(lruKey);\n oauthConnectionCache.delete(lruKey);\n oldClient?.close().catch(() => {});\n}\n\n/**\n * Close all cached OAuth MCP connections.\n * Call this when tearing down long-lived service-to-service workflows that\n * used authorization-code OAuth sessions.\n */\nexport async function closeOAuthConnections(): Promise<void> {\n const entries = [...oauthConnectionCache.entries()];\n oauthConnectionCache.clear();\n for (const [, client] of entries) {\n try {\n await client.close();\n } catch {\n /* ignore close errors */\n }\n }\n}\n\n/**\n * Close all cached MCP connections.\n * Call this at the end of comply/test runs or before process exit.\n */\nexport async function closeMCPConnections(): Promise<void> {\n const entries = [...connectionCache.entries()];\n connectionCache.clear();\n knownStreamableHTTPUrls.clear();\n for (const [, client] of entries) {\n try {\n await client.close();\n } catch {\n /* ignore close errors */\n }\n }\n await closeOAuthConnections();\n await closeModernMCPConnections();\n}\n\n/**\n * Get or create a cached connection for the given cache key.\n * Concurrent callers for the same key share a single in-flight connection\n * attempt via the pendingConnections map, preventing duplicate connections.\n */\nasync function getOrCreateConnection(\n cacheKey: string,\n baseUrl: URL,\n authHeaders: Record<string, string>,\n debugLogs: DebugLogEntry[],\n label: string,\n requestOptions: { signal?: AbortSignal; requestTimeoutMs?: number } = {}\n): Promise<MCPClient> {\n const cached = getCachedConnection(cacheKey);\n if (cached) return cached;\n\n const pending = pendingConnections.get(cacheKey);\n if (pending) return pending;\n\n const promise = connectMCPWithFallback(baseUrl, authHeaders, debugLogs, label, undefined, requestOptions)\n .then(client => {\n connectionCache.set(cacheKey, client);\n evictLeastRecentlyUsed();\n return client;\n })\n .finally(() => {\n pendingConnections.delete(cacheKey);\n });\n\n pendingConnections.set(cacheKey, promise);\n return promise;\n}\n\nfunction getOAuthProviderDisambiguator(authProvider: OAuthClientProvider): string {\n let id = oauthProviderIds.get(authProvider);\n if (!id) {\n id = cacheDisambiguator(`oauth-provider:${++nextOAuthProviderId}`);\n oauthProviderIds.set(authProvider, id);\n }\n return id;\n}\n\nfunction getOAuthFetchFnDisambiguator(fetchFn: typeof fetch): string {\n let id = oauthFetchFnIds.get(fetchFn);\n if (!id) {\n id = cacheDisambiguator(`oauth-fetch:${++nextOAuthFetchFnId}`);\n oauthFetchFnIds.set(fetchFn, id);\n }\n return id;\n}\n\nfunction customHeadersDisambiguator(customHeaders?: Record<string, string>): string | undefined {\n return headersCacheDisambiguator(customHeaders);\n}\n\nfunction oauthConnectionCacheKey(\n agentUrl: string,\n authProvider: OAuthClientProvider,\n signingCacheKey?: string,\n customHeaders?: Record<string, string>,\n fetchFn?: typeof fetch\n): string {\n const parts = [`${agentUrl}::oauth:${getOAuthProviderDisambiguator(authProvider)}`];\n if (signingCacheKey) parts.push(signingCacheKey);\n const headersKey = customHeadersDisambiguator(customHeaders);\n if (headersKey) parts.push(`headers:${headersKey}`);\n if (fetchFn) parts.push(`fetch:${getOAuthFetchFnDisambiguator(fetchFn)}`);\n return parts.join('::');\n}\n\n/** Get a cached OAuth connection, refreshing its LRU position. */\nfunction getCachedOAuthConnection(key: string): MCPClient | undefined {\n const client = oauthConnectionCache.get(key);\n if (client) {\n oauthConnectionCache.delete(key);\n oauthConnectionCache.set(key, client);\n }\n return client;\n}\n\nasync function getOrCreateOAuthConnection(\n cacheKey: string,\n options: {\n agentUrl: string;\n authProvider: OAuthClientProvider;\n debugLogs: DebugLogEntry[];\n customHeaders?: Record<string, string>;\n signingContext?: AgentSigningContext;\n signal?: AbortSignal;\n requestTimeoutMs?: number;\n fetchFn?: typeof fetch;\n }\n): Promise<MCPClient> {\n const cached = getCachedOAuthConnection(cacheKey);\n if (cached) return cached;\n\n const pending = pendingOAuthConnections.get(cacheKey);\n if (pending) return pending;\n\n const promise = connectMCP(options)\n .then(({ client }) => {\n oauthConnectionCache.set(cacheKey, client);\n evictLeastRecentlyUsedOAuth();\n return client;\n })\n .finally(() => {\n pendingOAuthConnections.delete(cacheKey);\n });\n\n pendingOAuthConnections.set(cacheKey, promise);\n return promise;\n}\n\nasync function withCachedOAuthConnection<T>(\n options: {\n agentUrl: string;\n authProvider: OAuthClientProvider;\n debugLogs: DebugLogEntry[];\n customHeaders?: Record<string, string>;\n signingContext?: AgentSigningContext;\n signal?: AbortSignal;\n requestTimeoutMs?: number;\n fetchFn?: typeof fetch;\n },\n label: string,\n fn: (client: MCPClient) => Promise<T>\n): Promise<T> {\n const cacheKey = oauthConnectionCacheKey(\n options.agentUrl,\n options.authProvider,\n options.signingContext?.cacheKey,\n options.customHeaders,\n options.fetchFn\n );\n if (options.signal || options.requestTimeoutMs !== undefined || options.fetchFn) {\n const { client } = await connectMCP(options);\n try {\n return await fn(client);\n } finally {\n try {\n await client.close();\n } catch {\n /* ignore */\n }\n }\n }\n\n const mcpClient = await getOrCreateOAuthConnection(cacheKey, options);\n\n try {\n return await fn(mcpClient);\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n options.debugLogs.push({\n type: 'error',\n message: `MCP: ${label} OAuth call failed: ${errorMessage}`,\n timestamp: new Date().toISOString(),\n error,\n });\n\n if (is401Error(error)) {\n oauthConnectionCache.delete(cacheKey);\n try {\n await mcpClient.close();\n } catch {\n /* ignore */\n }\n options.debugLogs.push({\n type: 'warning',\n message: `MCP: OAuth authentication issue detected for ${label}; evicted cached connection`,\n timestamp: new Date().toISOString(),\n });\n throw error;\n }\n\n if (isAbortOrTimeoutError(error)) {\n throw error;\n }\n\n oauthConnectionCache.delete(cacheKey);\n try {\n await mcpClient.close();\n } catch {\n /* ignore */\n }\n\n const retryClient = await getOrCreateOAuthConnection(cacheKey, {\n ...options,\n debugLogs: options.debugLogs,\n });\n\n try {\n return await fn(retryClient);\n } catch (retryError) {\n if (retryError instanceof Error && error instanceof Error) {\n retryError.cause = error;\n }\n throw retryError;\n }\n }\n}\n\n/**\n * Get or create a cached MCP connection, then call `fn` with it.\n * On transport errors, evicts the stale connection and retries once.\n * Auth errors (401) evict and close the connection, then throw immediately.\n *\n * @internal Used by mcp-tasks.ts for protocol-level task operations.\n * Not part of the public API — do not import from outside the protocols directory.\n */\nexport async function withCachedConnection<T>(\n agentUrl: string,\n authToken: string | undefined,\n authHeaders: Record<string, string>,\n debugLogs: DebugLogEntry[],\n label: string,\n fn: (client: MCPClient) => Promise<T>,\n transportFetch?: typeof fetch,\n requestOptions: { signal?: AbortSignal; requestTimeoutMs?: number } = {}\n): Promise<T> {\n const signingContext = signingContextStorage.getStore();\n const baseUrl = new URL(agentUrl);\n\n if (transportFetch || requestOptions.signal || requestOptions.requestTimeoutMs !== undefined) {\n const guardedClient = await connectMCPWithFallback(\n baseUrl,\n authHeaders,\n debugLogs,\n label,\n transportFetch,\n requestOptions\n );\n try {\n return await withAbortSignal([requestOptions.signal], undefined, () => fn(guardedClient));\n } finally {\n try {\n await guardedClient.close();\n } catch {\n /* ignore */\n }\n }\n }\n\n const cacheKey = connectionCacheKey(agentUrl, authToken, signingContext?.cacheKey, authHeaders);\n const mcpClient = await getOrCreateConnection(cacheKey, baseUrl, authHeaders, debugLogs, label, requestOptions);\n\n try {\n return await fn(mcpClient);\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n debugLogs.push({\n type: 'error',\n message: `MCP: ${label} call failed: ${errorMessage}`,\n timestamp: new Date().toISOString(),\n error,\n });\n\n // Auth errors won't be fixed by reconnecting — fail fast\n if (is401Error(error)) {\n connectionCache.delete(cacheKey);\n try {\n await mcpClient.close();\n } catch {\n /* ignore */\n }\n debugLogs.push({\n type: 'warning',\n message: `MCP: Authentication issue detected for ${label} - headers may not be reaching server`,\n timestamp: new Date().toISOString(),\n });\n throw error;\n }\n\n if (isAbortOrTimeoutError(error)) {\n throw error;\n }\n\n // Evict stale connection and retry once with a fresh connection\n connectionCache.delete(cacheKey);\n try {\n await mcpClient.close();\n } catch {\n /* ignore */\n }\n\n const retryClient = await getOrCreateConnection(\n cacheKey,\n baseUrl,\n authHeaders,\n debugLogs,\n `${label} (retry)`,\n requestOptions\n );\n\n try {\n return await fn(retryClient);\n } catch (retryError) {\n // Attach original error for diagnostics\n if (retryError instanceof Error && error instanceof Error) {\n retryError.cause = error;\n }\n throw retryError;\n }\n }\n}\n\n/**\n * Options for MCP tool calls with OAuth support\n */\nexport interface MCPCallOptions {\n /** Agent URL */\n agentUrl: string;\n /** Tool name to call */\n toolName: string;\n /** Tool arguments */\n args: Record<string, unknown>;\n /** Static auth token (legacy) */\n authToken?: string;\n /** OAuth provider for dynamic auth */\n authProvider?: OAuthClientProvider;\n /** Debug logs array */\n debugLogs?: DebugLogEntry[];\n /** Additional headers to send with every request (auth headers take precedence) */\n customHeaders?: Record<string, string>;\n /** RFC 9421 signing context — when set, the transport signs outbound ops per seller capability. */\n signingContext?: AgentSigningContext;\n /** Caller-owned cancellation signal for connect and callTool. */\n signal?: AbortSignal;\n /** Optional per-request timeout for connect and callTool. */\n requestTimeoutMs?: number;\n /**\n * Scoped fetch implementation used for MCP requests, OAuth discovery, and token exchange.\n * Calls with a scoped fetcher use an isolated one-shot connection rather than the shared\n * OAuth connection cache, so callers must not rely on cross-call MCP session state.\n */\n fetchFn?: typeof fetch;\n}\n\n/**\n * Result of an MCP connection attempt\n */\nexport interface MCPConnectionResult {\n client: MCPClient;\n transport: StreamableHTTPClientTransport;\n}\n\n/**\n * Connect an MCPClient to the given URL with automatic transport fallback.\n *\n * Strategy:\n * 1. Try StreamableHTTPClientTransport.\n * 2. On any transient connect failure (generic Error, McpError, or StreamableHTTPError),\n * retry once with a fresh StreamableHTTP connection. Auth failures (401) are excluded —\n * a retry is pointless and wastes a round-trip.\n * 3. If a 401 is returned, throw immediately — auth failure is transport-agnostic.\n * 4. For any other error after retry, fall back to SSEClientTransport with the same headers.\n *\n * The returned client is connected and ready for use. Callers are responsible for\n * calling client.close() when done.\n */\nexport async function connectMCPWithFallback(\n url: URL,\n authHeaders: Record<string, string>,\n debugLogs: DebugLogEntry[] = [],\n label = 'connection',\n transportFetch?: typeof fetch,\n requestOptions: { signal?: AbortSignal; requestTimeoutMs?: number } = {}\n): Promise<MCPClient> {\n return withSpan(\n 'adcp.mcp.connect',\n {\n 'http.url': url.toString(),\n 'adcp.connection_label': label,\n },\n async () => {\n return connectMCPWithFallbackImpl(url, authHeaders, debugLogs, label, transportFetch, requestOptions);\n }\n );\n}\n\nasync function connectMCPWithFallbackImpl(\n url: URL,\n authHeaders: Record<string, string>,\n debugLogs: DebugLogEntry[] = [],\n label = 'connection',\n transportFetch?: typeof fetch,\n requestOptions: { signal?: AbortSignal; requestTimeoutMs?: number } = {}\n): Promise<MCPClient> {\n const signingContext = signingContextStorage.getStore();\n // Wrap order (innermost → outermost): network → size-limit → signing → capture.\n // Size-limit applies to the raw network response so signing/capture see a\n // bounded body (capture clones via `response.clone()`, which would otherwise\n // buffer a hostile reply in memory).\n const clientRequestTimeoutMs = resolveClientRequestTimeoutMs(requestOptions.requestTimeoutMs);\n const mcpRequestOptions = {\n ...(requestOptions.signal && { signal: requestOptions.signal }),\n ...(clientRequestTimeoutMs !== undefined && { timeout: clientRequestTimeoutMs }),\n };\n const rawNetworkFetch: typeof fetch = transportFetch ?? ((input, init) => fetch(input as any, init));\n const networkFetch = (input: Parameters<typeof fetch>[0], init?: RequestInit) => {\n // Keep cancellation linked for the entire response-body lifetime. A\n // Promise race around fetch only covers receipt of response headers; MCP\n // Streamable HTTP can then hold the body open while a tool runs.\n const signals = [requestOptions.signal, init?.signal ?? undefined].filter(\n (signal): signal is AbortSignal => signal !== undefined\n );\n const signal = signals.length === 0 ? undefined : signals.length === 1 ? signals[0] : AbortSignal.any(signals);\n return rawNetworkFetch(input, { ...init, signal });\n };\n const sizeLimited = wrapFetchWithSizeLimit(networkFetch);\n const diagnosticFetch = wrapFetchWithTransportDiagnostics(sizeLimited);\n const baseFetch: typeof fetch = signingContext\n ? (buildAgentSigningFetch({\n upstream: diagnosticFetch,\n signing: signingContext.signing,\n getCapability: signingContext.getCapability,\n }) as typeof fetch)\n : diagnosticFetch;\n const transportOptions: StreamableHTTPClientTransportOptions = {\n requestInit: { headers: authHeaders, redirect: 'manual' },\n fetch: wrapFetchWithCapture(baseFetch),\n };\n let failedClient: MCPClient | undefined;\n\n try {\n const client = new MCPClient({ name: 'AdCP-Client', version: '1.0.0' });\n failedClient = client;\n debugLogs.push({\n type: 'info',\n message: `MCP: Attempting StreamableHTTP ${label} to ${url}`,\n timestamp: new Date().toISOString(),\n });\n await client.connect(new StreamableHTTPClientTransport(url, transportOptions), mcpRequestOptions);\n failedClient = undefined;\n trackStreamableHTTPUrl(url.toString());\n debugLogs.push({\n type: 'success',\n message: `MCP: Connected via StreamableHTTP for ${label}`,\n timestamp: new Date().toISOString(),\n });\n return client;\n } catch (error: unknown) {\n // Close the failed client to avoid resource leaks\n if (failedClient) {\n try {\n await failedClient.close();\n } catch {\n /* ignore */\n }\n }\n\n const errorMessage = error instanceof Error ? error.message : String(error);\n const errorClass = error instanceof Error ? error.constructor.name : typeof error;\n const httpStatus = error instanceof StreamableHTTPError ? ` [HTTP ${error.code}]` : '';\n debugLogs.push({\n type: 'error',\n message: `MCP: StreamableHTTP failed for ${label}${httpStatus} (${errorClass}): ${errorMessage}`,\n timestamp: new Date().toISOString(),\n error,\n });\n\n if (isAbortOrTimeoutError(error)) {\n throw error;\n }\n\n // Retry StreamableHTTP once on any transient connect failure — network blips,\n // JSON parse errors on half-buffered responses, and mid-handshake proxy\n // disconnects all surface as generic Error or McpError, not StreamableHTTPError.\n // Auth failures are the only class where retry is pointless and wasteful.\n if (!is401Error(error)) {\n debugLogs.push({\n type: 'info',\n message: `MCP: Transient connect error (${errorClass}) detected, retrying StreamableHTTP for ${label}`,\n timestamp: new Date().toISOString(),\n });\n const retryClient = new MCPClient({ name: 'AdCP-Client', version: '1.0.0' });\n try {\n await retryClient.connect(new StreamableHTTPClientTransport(url, transportOptions), mcpRequestOptions);\n trackStreamableHTTPUrl(url.toString());\n debugLogs.push({\n type: 'success',\n message: `MCP: Connected via StreamableHTTP (retry) for ${label}`,\n timestamp: new Date().toISOString(),\n });\n return retryClient;\n } catch (retryError) {\n try {\n await retryClient.close();\n } catch {\n /* ignore */\n }\n debugLogs.push({\n type: 'error',\n message: `MCP: StreamableHTTP retry also failed for ${label}: ${retryError instanceof Error ? retryError.message : String(retryError)}`,\n timestamp: new Date().toISOString(),\n });\n if (isAbortOrTimeoutError(retryError)) {\n throw retryError;\n }\n // Fall through to SSE fallback below\n }\n }\n\n // Auth failure — transport type won't change the outcome\n if (is401Error(error)) {\n throw error;\n }\n\n // If StreamableHTTP previously worked for this URL, don't fall back to SSE.\n // Transient failures (connection reuse, concurrency limits) should be retried\n // with StreamableHTTP, not SSE — SSE sends GET requests that return 405 on\n // servers that only support POST-based StreamableHTTP.\n if (knownStreamableHTTPUrls.has(url.toString())) {\n debugLogs.push({\n type: 'info',\n message: `MCP: StreamableHTTP previously succeeded for ${url} — skipping SSE fallback for ${label}`,\n timestamp: new Date().toISOString(),\n });\n throw error;\n }\n\n // Fall back to SSE\n debugLogs.push({\n type: 'warning',\n message: `MCP: Falling back to SSE transport for ${label}`,\n timestamp: new Date().toISOString(),\n });\n const client = new MCPClient({ name: 'AdCP-Client', version: '1.0.0' });\n try {\n await client.connect(\n new SSEClientTransport(url, {\n requestInit: { headers: authHeaders, redirect: 'manual' },\n fetch: wrapFetchWithCapture(baseFetch),\n }),\n mcpRequestOptions\n );\n } catch (sseError) {\n try {\n await client.close();\n } catch {\n /* ignore */\n }\n throw sseError;\n }\n debugLogs.push({\n type: 'success',\n message: `MCP: Connected via SSE transport for ${label}`,\n timestamp: new Date().toISOString(),\n });\n return client;\n }\n}\n\nexport async function callMCPTool(\n agentUrl: string,\n toolName: string,\n args: Record<string, unknown>,\n authToken?: string,\n debugLogs: DebugLogEntry[] = [],\n customHeaders?: Record<string, string>,\n signingContext?: AgentSigningContext,\n transportFetch?: typeof fetch,\n requestOptions?: { signal?: AbortSignal; requestTimeoutMs?: number }\n): Promise<unknown> {\n debugLogs.push({\n type: 'info',\n message: `MCP: Auth configuration`,\n timestamp: new Date().toISOString(),\n hasAuth: !!authToken,\n headers: authToken ? { 'x-adcp-auth': '***' } : {},\n customHeaderKeys: customHeaders ? Object.keys(customHeaders) : [],\n });\n debugLogs.push({\n type: 'info',\n message: `MCP: Calling tool ${toolName} with args: ${JSON.stringify(redactArgsForLog(args))}`,\n timestamp: new Date().toISOString(),\n });\n if (authToken) {\n debugLogs.push({\n type: 'info',\n message: `MCP: Transport configured with x-adcp-auth header for ${toolName}`,\n timestamp: new Date().toISOString(),\n });\n }\n\n // Custom fetch injection is an internal conformance seam whose mocks use\n // the v1 transport shape. Normal remote calls negotiate the modern era;\n // injected transports retain their exact legacy behavior.\n if (!transportFetch) {\n const modernAttempt = await tryCallModernMCPTool(agentUrl, toolName, args, authToken, debugLogs, customHeaders, {\n ...(signingContext && { signingContext }),\n ...(requestOptions?.signal && { signal: requestOptions.signal }),\n ...(requestOptions?.requestTimeoutMs !== undefined && {\n requestTimeoutMs: requestOptions.requestTimeoutMs,\n }),\n });\n if (modernAttempt.handled) {\n debugLogs.push({\n type: modernAttempt.response?.isError ? 'error' : 'success',\n message: `MCP: Tool ${toolName} response received (${modernAttempt.response?.isError ? 'error' : 'success'})`,\n timestamp: new Date().toISOString(),\n response: modernAttempt.response,\n });\n return modernAttempt.response;\n }\n }\n\n return withSpan(\n 'adcp.mcp.call_tool',\n {\n 'adcp.tool': toolName,\n 'http.url': agentUrl,\n },\n async () => {\n return signingContextStorage.run(signingContext, () =>\n callMCPToolImpl(agentUrl, toolName, args, authToken, debugLogs, customHeaders, transportFetch, requestOptions)\n );\n }\n );\n}\n\n/**\n * Call an MCP tool and return the raw CallToolResult (with isError, content, structuredContent).\n * Raw MCP tool call — returns the CallToolResult directly, including isError responses.\n */\nexport async function callMCPToolRaw(\n agentUrl: string,\n toolName: string,\n args: Record<string, unknown>,\n authToken?: string,\n debugLogs: DebugLogEntry[] = [],\n customHeaders?: Record<string, string>,\n signingContext?: AgentSigningContext,\n transportFetch?: typeof fetch\n): Promise<unknown> {\n return signingContextStorage.run(signingContext, () =>\n callMCPToolRawImpl(agentUrl, toolName, args, authToken, debugLogs, customHeaders, transportFetch)\n );\n}\n\nasync function callMCPToolImpl(\n agentUrl: string,\n toolName: string,\n args: Record<string, unknown>,\n authToken?: string,\n debugLogs: DebugLogEntry[] = [],\n customHeaders?: Record<string, string>,\n transportFetch?: typeof fetch,\n requestOptions?: { signal?: AbortSignal; requestTimeoutMs?: number }\n): Promise<unknown> {\n // Inject trace context headers for distributed tracing\n const traceHeaders = injectTraceHeaders();\n\n // Merge: custom < trace < auth (auth always wins)\n const authHeaders = {\n ...customHeaders,\n ...traceHeaders,\n ...(authToken ? createMCPAuthHeaders(authToken) : {}),\n };\n\n const resolvedRequestTimeoutMs = resolveClientRequestTimeoutMs(requestOptions?.requestTimeoutMs);\n const response = await withCachedConnection(\n agentUrl,\n authToken,\n authHeaders,\n debugLogs,\n toolName,\n client =>\n client.callTool({ name: toolName, arguments: args }, undefined, {\n ...(requestOptions?.signal && { signal: requestOptions.signal }),\n ...(resolvedRequestTimeoutMs !== undefined && { timeout: resolvedRequestTimeoutMs }),\n }) as Promise<CallToolResponse>,\n transportFetch,\n requestOptions\n );\n\n debugLogs.push({\n type: response?.isError ? 'error' : 'success',\n message: `MCP: Tool ${toolName} response received (${response?.isError ? 'error' : 'success'})`,\n timestamp: new Date().toISOString(),\n response: response,\n });\n\n return response;\n}\n\n/**\n * Raw MCP tool call — returns the CallToolResult directly.\n */\nasync function callMCPToolRawImpl(\n agentUrl: string,\n toolName: string,\n args: Record<string, unknown>,\n authToken?: string,\n debugLogs: DebugLogEntry[] = [],\n customHeaders?: Record<string, string>,\n transportFetch?: typeof fetch\n): Promise<unknown> {\n const traceHeaders = injectTraceHeaders();\n const authHeaders = {\n ...customHeaders,\n ...traceHeaders,\n ...(authToken ? createMCPAuthHeaders(authToken) : {}),\n };\n\n return withCachedConnection(\n agentUrl,\n authToken,\n authHeaders,\n debugLogs,\n toolName,\n client => client.callTool({ name: toolName, arguments: args }),\n transportFetch\n );\n}\n\n/**\n * Connect to an MCP server with OAuth support\n *\n * This function handles both static token auth and OAuth flows.\n * When using OAuth, if the server requires authorization:\n * 1. UnauthorizedError is thrown\n * 2. The OAuth provider's redirectToAuthorization is called\n * 3. Caller should wait for callback and call finishAuth on transport\n *\n * @param options Connection options\n * @returns MCP client and transport (for finishing OAuth if needed)\n * @throws UnauthorizedError if OAuth is required\n *\n * @example\n * ```typescript\n * // With OAuth provider\n * const provider = createCLIOAuthProvider(serverUrl);\n *\n * try {\n * const { client, transport } = await connectMCP({\n * agentUrl: serverUrl,\n * authProvider: provider\n * });\n * // Connected! Use client...\n * } catch (error) {\n * if (error instanceof UnauthorizedError) {\n * // OAuth flow started, wait for callback\n * const code = await provider.waitForCallback();\n * await transport.finishAuth(code);\n * // Retry connection...\n * }\n * }\n * ```\n *\n * @deprecated Low-level v1/SSE escape hatch. High-level AgentClient discovery,\n * tool listing, OAuth calls, and `callMCPTool*` APIs negotiate MCP 2026-07-28.\n * Keep this only for callers that require the v1 SDK client/transport pair or\n * its interactive `finishAuth()` lifecycle.\n */\nexport async function connectMCP(options: {\n agentUrl: string;\n authToken?: string;\n authProvider?: OAuthClientProvider;\n debugLogs?: DebugLogEntry[];\n customHeaders?: Record<string, string>;\n signingContext?: AgentSigningContext;\n signal?: AbortSignal;\n requestTimeoutMs?: number;\n fetchFn?: typeof fetch;\n}): Promise<MCPConnectionResult> {\n const {\n agentUrl,\n authToken,\n authProvider,\n debugLogs = [],\n customHeaders,\n signingContext,\n signal,\n requestTimeoutMs: configuredRequestTimeoutMs,\n fetchFn,\n } = options;\n const baseUrl = new URL(agentUrl);\n\n debugLogs.push({\n type: 'info',\n message: `MCP: Connecting to ${baseUrl}`,\n timestamp: new Date().toISOString(),\n authMethod: authProvider ? 'oauth' : authToken ? 'token' : 'none',\n });\n\n const mcpClient = new MCPClient({\n name: 'AdCP-Client',\n version: '1.0.0',\n });\n\n // Build transport options\n const transportOptions: StreamableHTTPClientTransportOptions = {};\n\n // Header-only auth (basic, x-api-key, custom routing) lives entirely on\n // `customHeaders`. Attach it whenever it's present, regardless of which\n // auth branch fires — OAuth + routing headers, bearer + tenant headers,\n // and pure-header auth must all reach the wire.\n //\n // Precedence note: the MCP SDK's `_commonHeaders()` (StreamableHTTP)\n // spreads `requestInit.headers` *over* any provider-emitted `Authorization`\n // (`new Headers({ ...providerHeaders, ...requestInitHeaders })`, last-write-\n // wins). To prevent a caller-supplied `Authorization` in `customHeaders`\n // from silently overriding the OAuth provider's bearer, drop any\n // `Authorization` key from `customHeaders` when `authProvider` is set.\n // OAuth is the source of truth for the bearer in that branch; non-auth\n // routing/tenant headers still flow through.\n const filteredCustomHeaders = authProvider\n ? Object.fromEntries(Object.entries(customHeaders ?? {}).filter(([k]) => k.toLowerCase() !== 'authorization'))\n : customHeaders;\n const authHeaders: Record<string, string> = {\n ...filteredCustomHeaders,\n ...(authToken ? createMCPAuthHeaders(authToken) : {}),\n };\n transportOptions.requestInit = { headers: authHeaders, redirect: 'manual' };\n if (authProvider) {\n transportOptions.authProvider = authProvider;\n debugLogs.push({\n type: 'info',\n message: 'MCP: Using OAuth provider for authentication',\n timestamp: new Date().toISOString(),\n });\n } else if (authToken) {\n debugLogs.push({\n type: 'info',\n message: 'MCP: Using static token for authentication',\n timestamp: new Date().toISOString(),\n });\n } else if (Object.keys(authHeaders).length > 0) {\n debugLogs.push({\n type: 'info',\n message: 'MCP: Using custom headers for authentication',\n timestamp: new Date().toISOString(),\n });\n }\n\n // RFC 9421 signing — wrap the transport's fetch so the signer sees the final\n // headers the SDK assembled (including any OAuth-issued Authorization) and\n // decides per outbound request whether to sign. Size-limit sits innermost so\n // the response body is bounded before signing/capture observe it.\n const requestTimeoutMs = resolveRequestTimeoutMs(configuredRequestTimeoutMs);\n const clientRequestTimeoutMs = resolveClientRequestTimeoutMs(configuredRequestTimeoutMs);\n const requestOptions = {\n ...(signal && { signal }),\n ...(clientRequestTimeoutMs !== undefined && { timeout: clientRequestTimeoutMs }),\n };\n const rawNetworkFetch: typeof fetch = fetchFn ?? ((input, init) => fetch(input, init));\n const sizeLimited = wrapFetchWithSizeLimit((input, init) =>\n withAbortSignal<Response>([signal, init?.signal], requestTimeoutMs, linkedSignal =>\n rawNetworkFetch(input, { ...init, signal: linkedSignal })\n )\n );\n const diagnosticFetch = wrapFetchWithTransportDiagnostics(sizeLimited);\n const signedFetch: typeof fetch = signingContext\n ? (buildAgentSigningFetch({\n upstream: diagnosticFetch,\n signing: signingContext.signing,\n getCapability: signingContext.getCapability,\n }) as typeof fetch)\n : diagnosticFetch;\n transportOptions.fetch = wrapFetchWithCapture(signedFetch);\n\n const transport = new StreamableHTTPClientTransport(baseUrl, transportOptions);\n\n try {\n await mcpClient.connect(transport, requestOptions);\n debugLogs.push({\n type: 'success',\n message: 'MCP: Connected successfully',\n timestamp: new Date().toISOString(),\n });\n return { client: mcpClient, transport };\n } catch (error) {\n // If it's an UnauthorizedError, the OAuth flow has started\n // Rethrow so the caller can handle the callback\n if (error instanceof UnauthorizedError) {\n debugLogs.push({\n type: 'info',\n message: 'MCP: OAuth authorization required, flow initiated',\n timestamp: new Date().toISOString(),\n });\n // Return transport so caller can call finishAuth\n throw Object.assign(error, { transport, client: mcpClient });\n }\n\n // Non-OAuth 401 — the SDK sent credentials that the agent rejected (or\n // sent none when it needed them). The raw transport error is shaped like\n // `Error POSTing to endpoint (HTTP 401): unauthorized`, which omits the\n // crucial piece of debug data: *which auth scheme did the SDK actually\n // use*. Without that, a caller can't diff against curl. Wrap the error\n // with a scheme tag and a remediation hint, preserving the original\n // under `.cause` so existing `is401Error` / `error.status` checks\n // downstream still resolve.\n if (is401Error(error)) {\n const scheme = authProvider\n ? 'oauth'\n : authToken\n ? 'bearer'\n : Object.keys(authHeaders).length > 0\n ? 'header'\n : 'none';\n const hint =\n scheme === 'none'\n ? 'No credentials were sent. Configure auth_token, headers, or oauth_tokens on the agent config (or pass --auth on the CLI).'\n : scheme === 'header'\n ? \"Verify the Authorization header value matches the gateway (basic-auth: 'Basic ' + base64(user:pass); pair with --auth-scheme basic on the CLI).\"\n : scheme === 'bearer'\n ? \"Verify the bearer token matches the agent's expected credential.\"\n : 'OAuth provider returned tokens that the agent rejected — check the provider configuration and token scopes.';\n const detail = `MCP connect rejected with HTTP 401 from ${agentUrl}. SDK sent auth scheme: ${scheme}. ${hint}`;\n const wrapped = Object.assign(new Error(detail), {\n cause: error,\n code: 'MCP_AUTH_REJECTED',\n scheme,\n agentUrl,\n originalError: error,\n });\n throw wrapped;\n }\n\n throw error;\n }\n}\n\n/**\n * Call an MCP tool with OAuth support.\n *\n * OAuth connections are cached by agent URL and OAuth provider identity so a\n * service-to-service workflow can reuse the initialized MCP session across\n * related tool calls. Reuse the same OAuthClientProvider instance for a\n * session/source/principal; the provider owns token refresh state for the\n * cached transport.\n *\n * Supplying `fetchFn` opts out of connection reuse. Scoped fetchers commonly\n * carry request- or tenant-specific network policy, so each call gets an\n * isolated connection that is closed after the tool response.\n *\n * Signing: this path consumes `options.signingContext` via the transport —\n * `connectMCP` attaches a signing-fetch wrapper at transport-creation time —\n * rather than via `signingContextStorage`. The OAuth cache key includes the\n * signing cache key so different signing identities do not share a transport.\n * The non-OAuth fallback (`callMCPTool`) does enter ALS.\n *\n * @param options Call options\n * @returns Tool response\n * @throws UnauthorizedError if OAuth is required (with transport attached)\n */\nexport async function callMCPToolWithOAuth(options: MCPCallOptions): Promise<unknown> {\n const {\n agentUrl,\n toolName,\n args,\n authToken,\n authProvider,\n debugLogs = [],\n customHeaders,\n signingContext,\n signal,\n requestTimeoutMs,\n fetchFn,\n } = options;\n const resolvedRequestTimeoutMs = resolveClientRequestTimeoutMs(requestTimeoutMs);\n const requestOptions = {\n ...(signal && { signal }),\n ...(resolvedRequestTimeoutMs !== undefined && { timeout: resolvedRequestTimeoutMs }),\n };\n\n // If no OAuth provider, use the legacy function\n if (!authProvider) {\n return callMCPTool(agentUrl, toolName, args, authToken, debugLogs, customHeaders, signingContext, fetchFn, {\n signal,\n requestTimeoutMs,\n });\n }\n\n const modernAttempt = await tryCallModernMCPTool(agentUrl, toolName, args, undefined, debugLogs, customHeaders, {\n authProvider,\n signingContext,\n signal,\n requestTimeoutMs,\n fetchFn,\n handleLegacy: true,\n });\n if (modernAttempt.handled) {\n debugLogs.push({\n type: modernAttempt.response?.isError ? 'error' : 'success',\n message: `MCP: Tool ${toolName} response received`,\n timestamp: new Date().toISOString(),\n });\n return modernAttempt.response;\n }\n\n const response = await withCachedOAuthConnection(\n {\n agentUrl,\n authProvider,\n debugLogs,\n customHeaders,\n signingContext,\n signal,\n requestTimeoutMs,\n fetchFn,\n },\n toolName,\n async client => {\n debugLogs.push({\n type: 'info',\n message: `MCP: Calling tool ${toolName}`,\n timestamp: new Date().toISOString(),\n });\n\n const response = await client.callTool({ name: toolName, arguments: args }, undefined, requestOptions);\n\n debugLogs.push({\n type: response?.isError ? 'error' : 'success',\n message: `MCP: Tool ${toolName} response received`,\n timestamp: new Date().toISOString(),\n });\n\n return response;\n }\n );\n\n return response;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAoC;AACpC,4BAIO;AACP,iBAAmC;AACnC,kBAAkC;AAElC,yBAA2B;AAC3B,IAAAA,eAAqC;AACrC,oBAA2B;AAE3B,qBAA6C;AAC7C,IAAAC,iBAAwF;AACxF,yBAAiC;AACjC,gCAAqC;AACrC,+BAAuC;AACvC,kCAAkD;AAClD,mBAKO;AACP,wBAAgE;AA4BhE,MAAM,kBAAkB,oBAAI,IAAuB;AACnD,MAAM,qBAAqB,oBAAI,IAAgC;AAC/D,MAAM,uBAAuB,oBAAI,IAAuB;AACxD,MAAM,0BAA0B,oBAAI,IAAgC;AACpE,MA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