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

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 (1678) 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/adapters/roster-account-store.d.mts +9 -8
  12. package/dist/lib/adapters/roster-account-store.d.ts +9 -8
  13. package/dist/lib/adapters/roster-account-store.d.ts.map +1 -1
  14. package/dist/lib/adapters/roster-account-store.js +2 -1
  15. package/dist/lib/adapters/roster-account-store.js.map +1 -1
  16. package/dist/lib/adapters/roster-account-store.mjs +2 -1
  17. package/dist/lib/adapters/roster-account-store.mjs.map +1 -1
  18. package/dist/lib/auth/oauth/ClientCredentialsFlow.d.mts +2 -0
  19. package/dist/lib/auth/oauth/ClientCredentialsFlow.d.ts +2 -0
  20. package/dist/lib/auth/oauth/ClientCredentialsFlow.d.ts.map +1 -1
  21. package/dist/lib/auth/oauth/ClientCredentialsFlow.js +69 -24
  22. package/dist/lib/auth/oauth/ClientCredentialsFlow.js.map +1 -1
  23. package/dist/lib/auth/oauth/ClientCredentialsFlow.mjs +69 -24
  24. package/dist/lib/auth/oauth/ClientCredentialsFlow.mjs.map +1 -1
  25. package/dist/lib/auth/oauth/authorization-required.d.mts +3 -0
  26. package/dist/lib/auth/oauth/authorization-required.d.ts +3 -0
  27. package/dist/lib/auth/oauth/authorization-required.d.ts.map +1 -1
  28. package/dist/lib/auth/oauth/authorization-required.js +37 -7
  29. package/dist/lib/auth/oauth/authorization-required.js.map +1 -1
  30. package/dist/lib/auth/oauth/authorization-required.mjs +37 -7
  31. package/dist/lib/auth/oauth/authorization-required.mjs.map +1 -1
  32. package/dist/lib/auth/oauth/discovery.d.mts +2 -0
  33. package/dist/lib/auth/oauth/discovery.d.ts +2 -0
  34. package/dist/lib/auth/oauth/discovery.d.ts.map +1 -1
  35. package/dist/lib/auth/oauth/discovery.js +7 -5
  36. package/dist/lib/auth/oauth/discovery.js.map +1 -1
  37. package/dist/lib/auth/oauth/discovery.mjs +7 -5
  38. package/dist/lib/auth/oauth/discovery.mjs.map +1 -1
  39. package/dist/lib/core/AgentClient.d.ts.map +1 -1
  40. package/dist/lib/core/ConversationTypes.d.mts +6 -2
  41. package/dist/lib/core/ConversationTypes.d.ts +6 -2
  42. package/dist/lib/core/ConversationTypes.d.ts.map +1 -1
  43. package/dist/lib/core/ConversationTypes.js.map +1 -1
  44. package/dist/lib/core/GovernanceMiddleware.d.mts +3 -3
  45. package/dist/lib/core/GovernanceMiddleware.d.ts +3 -3
  46. package/dist/lib/core/GovernanceMiddleware.d.ts.map +1 -1
  47. package/dist/lib/core/GovernanceMiddleware.js +8 -4
  48. package/dist/lib/core/GovernanceMiddleware.js.map +1 -1
  49. package/dist/lib/core/GovernanceMiddleware.mjs +8 -4
  50. package/dist/lib/core/GovernanceMiddleware.mjs.map +1 -1
  51. package/dist/lib/core/SingleAgentClient.d.mts +12 -1
  52. package/dist/lib/core/SingleAgentClient.d.ts +12 -1
  53. package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
  54. package/dist/lib/core/SingleAgentClient.js +89 -12
  55. package/dist/lib/core/SingleAgentClient.js.map +1 -1
  56. package/dist/lib/core/SingleAgentClient.mjs +89 -12
  57. package/dist/lib/core/SingleAgentClient.mjs.map +1 -1
  58. package/dist/lib/core/TaskExecutor.d.mts +2 -4
  59. package/dist/lib/core/TaskExecutor.d.ts +2 -4
  60. package/dist/lib/core/TaskExecutor.d.ts.map +1 -1
  61. package/dist/lib/core/TaskExecutor.js +90 -14
  62. package/dist/lib/core/TaskExecutor.js.map +1 -1
  63. package/dist/lib/core/TaskExecutor.mjs +95 -14
  64. package/dist/lib/core/TaskExecutor.mjs.map +1 -1
  65. package/dist/lib/core/task-deadline.d.mts +20 -0
  66. package/dist/lib/core/task-deadline.d.ts +21 -0
  67. package/dist/lib/core/task-deadline.d.ts.map +1 -0
  68. package/dist/lib/core/task-deadline.js +74 -0
  69. package/dist/lib/core/task-deadline.js.map +1 -0
  70. package/dist/lib/core/task-deadline.mjs +47 -0
  71. package/dist/lib/core/task-deadline.mjs.map +1 -0
  72. package/dist/lib/errors/index.d.mts +11 -0
  73. package/dist/lib/errors/index.d.ts +11 -0
  74. package/dist/lib/errors/index.d.ts.map +1 -1
  75. package/dist/lib/errors/index.js +6 -0
  76. package/dist/lib/errors/index.js.map +1 -1
  77. package/dist/lib/errors/index.mjs +6 -0
  78. package/dist/lib/errors/index.mjs.map +1 -1
  79. package/dist/lib/net/address-guards.d.ts.map +1 -1
  80. package/dist/lib/net/address-guards.js +6 -0
  81. package/dist/lib/net/address-guards.js.map +1 -1
  82. package/dist/lib/net/address-guards.mjs +6 -0
  83. package/dist/lib/net/address-guards.mjs.map +1 -1
  84. package/dist/lib/net/ssrf-fetch.d.ts.map +1 -1
  85. package/dist/lib/net/ssrf-fetch.js +70 -46
  86. package/dist/lib/net/ssrf-fetch.js.map +1 -1
  87. package/dist/lib/net/ssrf-fetch.mjs +70 -46
  88. package/dist/lib/net/ssrf-fetch.mjs.map +1 -1
  89. package/dist/lib/protocols/abort.d.mts +3 -1
  90. package/dist/lib/protocols/abort.d.ts +3 -1
  91. package/dist/lib/protocols/abort.d.ts.map +1 -1
  92. package/dist/lib/protocols/abort.js +19 -17
  93. package/dist/lib/protocols/abort.js.map +1 -1
  94. package/dist/lib/protocols/abort.mjs +19 -17
  95. package/dist/lib/protocols/abort.mjs.map +1 -1
  96. package/dist/lib/protocols/index.d.ts.map +1 -1
  97. package/dist/lib/protocols/index.js +13 -10
  98. package/dist/lib/protocols/index.js.map +1 -1
  99. package/dist/lib/protocols/index.mjs +13 -10
  100. package/dist/lib/protocols/index.mjs.map +1 -1
  101. package/dist/lib/protocols/mcp.d.ts.map +1 -1
  102. package/dist/lib/protocols/mcp.js +8 -7
  103. package/dist/lib/protocols/mcp.js.map +1 -1
  104. package/dist/lib/protocols/mcp.mjs +8 -7
  105. package/dist/lib/protocols/mcp.mjs.map +1 -1
  106. package/dist/lib/schemas-data/3.1/a2ui/bound-value.json +1 -1
  107. package/dist/lib/schemas-data/3.1/a2ui/component.json +1 -1
  108. package/dist/lib/schemas-data/3.1/a2ui/si-catalog.json +25 -25
  109. package/dist/lib/schemas-data/3.1/a2ui/surface.json +2 -2
  110. package/dist/lib/schemas-data/3.1/a2ui/user-action.json +1 -1
  111. package/dist/lib/schemas-data/3.1/aao/agent-publishers.json +1 -1
  112. package/dist/lib/schemas-data/3.1/account/get-account-financials-request.json +6 -6
  113. package/dist/lib/schemas-data/3.1/account/get-account-financials-response.json +12 -12
  114. package/dist/lib/schemas-data/3.1/account/list-accounts-request.json +6 -6
  115. package/dist/lib/schemas-data/3.1/account/list-accounts-response.json +8 -8
  116. package/dist/lib/schemas-data/3.1/account/report-usage-request.json +6 -6
  117. package/dist/lib/schemas-data/3.1/account/report-usage-response.json +6 -6
  118. package/dist/lib/schemas-data/3.1/account/sync-accounts-request.json +12 -12
  119. package/dist/lib/schemas-data/3.1/account/sync-accounts-response.json +16 -16
  120. package/dist/lib/schemas-data/3.1/account/sync-governance-request.json +6 -6
  121. package/dist/lib/schemas-data/3.1/account/sync-governance-response.json +10 -10
  122. package/dist/lib/schemas-data/3.1/adagents.json +29 -29
  123. package/dist/lib/schemas-data/3.1/brand/acquire-rights-request.json +10 -10
  124. package/dist/lib/schemas-data/3.1/brand/acquire-rights-response.json +16 -16
  125. package/dist/lib/schemas-data/3.1/brand/creative-approval-request.json +5 -5
  126. package/dist/lib/schemas-data/3.1/brand/creative-approval-response.json +12 -12
  127. package/dist/lib/schemas-data/3.1/brand/get-brand-identity-request.json +4 -4
  128. package/dist/lib/schemas-data/3.1/brand/get-brand-identity-response.json +10 -10
  129. package/dist/lib/schemas-data/3.1/brand/get-rights-request.json +8 -8
  130. package/dist/lib/schemas-data/3.1/brand/get-rights-response.json +11 -11
  131. package/dist/lib/schemas-data/3.1/brand/revocation-notification.json +4 -4
  132. package/dist/lib/schemas-data/3.1/brand/rights-pricing-option.json +5 -5
  133. package/dist/lib/schemas-data/3.1/brand/rights-terms.json +3 -3
  134. package/dist/lib/schemas-data/3.1/brand/search-brands-request.json +6 -6
  135. package/dist/lib/schemas-data/3.1/brand/search-brands-response.json +11 -11
  136. package/dist/lib/schemas-data/3.1/brand/update-rights-request.json +6 -6
  137. package/dist/lib/schemas-data/3.1/brand/update-rights-response.json +11 -11
  138. package/dist/lib/schemas-data/3.1/brand/verification-status.json +1 -1
  139. package/dist/lib/schemas-data/3.1/brand/verify-brand-claim-request.json +2 -2
  140. package/dist/lib/schemas-data/3.1/brand/verify-brand-claim-response.json +13 -13
  141. package/dist/lib/schemas-data/3.1/brand/verify-brand-claims-request.json +2 -2
  142. package/dist/lib/schemas-data/3.1/brand/verify-brand-claims-response.json +13 -13
  143. package/dist/lib/schemas-data/3.1/brand.json +21 -21
  144. package/dist/lib/schemas-data/3.1/bundled/content-standards/calibrate-content-request.json +12 -12
  145. package/dist/lib/schemas-data/3.1/bundled/content-standards/calibrate-content-response.json +12 -12
  146. package/dist/lib/schemas-data/3.1/bundled/content-standards/create-content-standards-request.json +16 -16
  147. package/dist/lib/schemas-data/3.1/bundled/content-standards/create-content-standards-response.json +10 -10
  148. package/dist/lib/schemas-data/3.1/bundled/content-standards/get-content-standards-request.json +5 -5
  149. package/dist/lib/schemas-data/3.1/bundled/content-standards/get-content-standards-response.json +23 -23
  150. package/dist/lib/schemas-data/3.1/bundled/content-standards/get-media-buy-artifacts-request.json +16 -16
  151. package/dist/lib/schemas-data/3.1/bundled/content-standards/get-media-buy-artifacts-response.json +18 -18
  152. package/dist/lib/schemas-data/3.1/bundled/content-standards/list-content-standards-request.json +7 -7
  153. package/dist/lib/schemas-data/3.1/bundled/content-standards/list-content-standards-response.json +24 -24
  154. package/dist/lib/schemas-data/3.1/bundled/content-standards/update-content-standards-request.json +16 -16
  155. package/dist/lib/schemas-data/3.1/bundled/content-standards/update-content-standards-response.json +10 -10
  156. package/dist/lib/schemas-data/3.1/bundled/content-standards/validate-content-delivery-request.json +12 -12
  157. package/dist/lib/schemas-data/3.1/bundled/content-standards/validate-content-delivery-response.json +12 -12
  158. package/dist/lib/schemas-data/3.1/bundled/core/tasks-get-request.json +16 -16
  159. package/dist/lib/schemas-data/3.1/bundled/core/tasks-get-response.json +181 -181
  160. package/dist/lib/schemas-data/3.1/bundled/core/tasks-list-request.json +21 -21
  161. package/dist/lib/schemas-data/3.1/bundled/core/tasks-list-response.json +11 -11
  162. package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-delivery-request.json +17 -17
  163. package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-delivery-response.json +56 -56
  164. package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-features-request.json +44 -44
  165. package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-features-response.json +13 -13
  166. package/dist/lib/schemas-data/3.1/bundled/creative/list-creative-formats-request.json +16 -16
  167. package/dist/lib/schemas-data/3.1/bundled/creative/list-creative-formats-response.json +48 -48
  168. package/dist/lib/schemas-data/3.1/bundled/creative/list-creatives-request.json +17 -17
  169. package/dist/lib/schemas-data/3.1/bundled/creative/list-creatives-response.json +58 -58
  170. package/dist/lib/schemas-data/3.1/bundled/creative/list-transformers-request.json +18 -18
  171. package/dist/lib/schemas-data/3.1/bundled/creative/list-transformers-response.json +16 -16
  172. package/dist/lib/schemas-data/3.1/bundled/creative/preview-creative-request.json +44 -44
  173. package/dist/lib/schemas-data/3.1/bundled/creative/preview-creative-response.json +50 -50
  174. package/dist/lib/schemas-data/3.1/bundled/creative/sync-creatives-request.json +46 -46
  175. package/dist/lib/schemas-data/3.1/bundled/creative/sync-creatives-response.json +27 -27
  176. package/dist/lib/schemas-data/3.1/bundled/creative/validate-input-request.json +42 -42
  177. package/dist/lib/schemas-data/3.1/bundled/creative/validate-input-response.json +10 -10
  178. package/dist/lib/schemas-data/3.1/bundled/media-buy/build-creative-request.json +53 -53
  179. package/dist/lib/schemas-data/3.1/bundled/media-buy/build-creative-response.json +54 -54
  180. package/dist/lib/schemas-data/3.1/bundled/media-buy/create-media-buy-request.json +83 -83
  181. package/dist/lib/schemas-data/3.1/bundled/media-buy/create-media-buy-response.json +77 -77
  182. package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buy-delivery-request.json +25 -25
  183. package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buy-delivery-response.json +40 -40
  184. package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buys-request.json +18 -18
  185. package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buys-response.json +65 -65
  186. package/dist/lib/schemas-data/3.1/bundled/media-buy/get-products-request.json +49 -49
  187. package/dist/lib/schemas-data/3.1/bundled/media-buy/get-products-response.json +99 -99
  188. package/dist/lib/schemas-data/3.1/bundled/media-buy/list-creative-formats-request.json +12 -12
  189. package/dist/lib/schemas-data/3.1/bundled/media-buy/list-creative-formats-response.json +48 -48
  190. package/dist/lib/schemas-data/3.1/bundled/media-buy/log-event-request.json +12 -12
  191. package/dist/lib/schemas-data/3.1/bundled/media-buy/log-event-response.json +10 -10
  192. package/dist/lib/schemas-data/3.1/bundled/media-buy/package-request.json +79 -79
  193. package/dist/lib/schemas-data/3.1/bundled/media-buy/provide-performance-feedback-request.json +8 -8
  194. package/dist/lib/schemas-data/3.1/bundled/media-buy/provide-performance-feedback-response.json +10 -10
  195. package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-audiences-request.json +18 -18
  196. package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-audiences-response.json +12 -12
  197. package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-catalogs-request.json +26 -26
  198. package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-catalogs-response.json +12 -12
  199. package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-event-sources-request.json +19 -19
  200. package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-event-sources-response.json +16 -16
  201. package/dist/lib/schemas-data/3.1/bundled/media-buy/update-media-buy-request.json +79 -79
  202. package/dist/lib/schemas-data/3.1/bundled/media-buy/update-media-buy-response.json +71 -71
  203. package/dist/lib/schemas-data/3.1/bundled/property/create-property-list-request.json +18 -18
  204. package/dist/lib/schemas-data/3.1/bundled/property/create-property-list-response.json +26 -26
  205. package/dist/lib/schemas-data/3.1/bundled/property/delete-property-list-request.json +16 -16
  206. package/dist/lib/schemas-data/3.1/bundled/property/delete-property-list-response.json +10 -10
  207. package/dist/lib/schemas-data/3.1/bundled/property/get-property-list-request.json +16 -16
  208. package/dist/lib/schemas-data/3.1/bundled/property/get-property-list-response.json +27 -27
  209. package/dist/lib/schemas-data/3.1/bundled/property/list-property-lists-request.json +17 -17
  210. package/dist/lib/schemas-data/3.1/bundled/property/list-property-lists-response.json +27 -27
  211. package/dist/lib/schemas-data/3.1/bundled/property/update-property-list-request.json +18 -18
  212. package/dist/lib/schemas-data/3.1/bundled/property/update-property-list-response.json +26 -26
  213. package/dist/lib/schemas-data/3.1/bundled/property/validate-property-delivery-request.json +19 -19
  214. package/dist/lib/schemas-data/3.1/bundled/property/validate-property-delivery-response.json +15 -15
  215. package/dist/lib/schemas-data/3.1/bundled/protocol/get-adcp-capabilities-request.json +5 -5
  216. package/dist/lib/schemas-data/3.1/bundled/protocol/get-adcp-capabilities-response.json +35 -35
  217. package/dist/lib/schemas-data/3.1/bundled/protocol/get-task-status-request.json +16 -16
  218. package/dist/lib/schemas-data/3.1/bundled/protocol/get-task-status-response.json +181 -181
  219. package/dist/lib/schemas-data/3.1/bundled/protocol/list-tasks-request.json +21 -21
  220. package/dist/lib/schemas-data/3.1/bundled/protocol/list-tasks-response.json +11 -11
  221. package/dist/lib/schemas-data/3.1/bundled/signals/activate-signal-request.json +17 -17
  222. package/dist/lib/schemas-data/3.1/bundled/signals/activate-signal-response.json +12 -12
  223. package/dist/lib/schemas-data/3.1/bundled/signals/get-signals-request.json +24 -24
  224. package/dist/lib/schemas-data/3.1/bundled/signals/get-signals-response.json +53 -53
  225. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-get-offering-request.json +5 -5
  226. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-get-offering-response.json +23 -23
  227. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-initiate-session-request.json +18 -18
  228. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-initiate-session-response.json +25 -25
  229. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-send-message-request.json +16 -16
  230. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-send-message-response.json +26 -26
  231. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-terminate-session-request.json +5 -5
  232. package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-terminate-session-response.json +11 -11
  233. package/dist/lib/schemas-data/3.1/collection/base-collection-source.json +3 -3
  234. package/dist/lib/schemas-data/3.1/collection/collection-list-changed-webhook.json +2 -2
  235. package/dist/lib/schemas-data/3.1/collection/collection-list-filters.json +7 -7
  236. package/dist/lib/schemas-data/3.1/collection/collection-list.json +5 -5
  237. package/dist/lib/schemas-data/3.1/collection/create-collection-list-request.json +8 -8
  238. package/dist/lib/schemas-data/3.1/collection/create-collection-list-response.json +6 -6
  239. package/dist/lib/schemas-data/3.1/collection/delete-collection-list-request.json +5 -5
  240. package/dist/lib/schemas-data/3.1/collection/delete-collection-list-response.json +5 -5
  241. package/dist/lib/schemas-data/3.1/collection/get-collection-list-request.json +5 -5
  242. package/dist/lib/schemas-data/3.1/collection/get-collection-list-response.json +12 -12
  243. package/dist/lib/schemas-data/3.1/collection/list-collection-lists-request.json +6 -6
  244. package/dist/lib/schemas-data/3.1/collection/list-collection-lists-response.json +7 -7
  245. package/dist/lib/schemas-data/3.1/collection/update-collection-list-request.json +8 -8
  246. package/dist/lib/schemas-data/3.1/collection/update-collection-list-response.json +6 -6
  247. package/dist/lib/schemas-data/3.1/content-standards/artifact-webhook-payload.json +3 -3
  248. package/dist/lib/schemas-data/3.1/content-standards/artifact.json +7 -7
  249. package/dist/lib/schemas-data/3.1/content-standards/calibrate-content-request.json +5 -5
  250. package/dist/lib/schemas-data/3.1/content-standards/calibrate-content-response.json +10 -10
  251. package/dist/lib/schemas-data/3.1/content-standards/content-standards.json +7 -7
  252. package/dist/lib/schemas-data/3.1/content-standards/create-content-standards-request.json +8 -8
  253. package/dist/lib/schemas-data/3.1/content-standards/create-content-standards-response.json +8 -8
  254. package/dist/lib/schemas-data/3.1/content-standards/get-content-standards-request.json +4 -4
  255. package/dist/lib/schemas-data/3.1/content-standards/get-content-standards-response.json +9 -9
  256. package/dist/lib/schemas-data/3.1/content-standards/get-media-buy-artifacts-request.json +5 -5
  257. package/dist/lib/schemas-data/3.1/content-standards/get-media-buy-artifacts-response.json +10 -10
  258. package/dist/lib/schemas-data/3.1/content-standards/list-content-standards-request.json +6 -6
  259. package/dist/lib/schemas-data/3.1/content-standards/list-content-standards-response.json +10 -10
  260. package/dist/lib/schemas-data/3.1/content-standards/update-content-standards-request.json +8 -8
  261. package/dist/lib/schemas-data/3.1/content-standards/update-content-standards-response.json +8 -8
  262. package/dist/lib/schemas-data/3.1/content-standards/validate-content-delivery-request.json +5 -5
  263. package/dist/lib/schemas-data/3.1/content-standards/validate-content-delivery-response.json +10 -10
  264. package/dist/lib/schemas-data/3.1/core/account-authorization.json +1 -1
  265. package/dist/lib/schemas-data/3.1/core/account-ref.json +2 -2
  266. package/dist/lib/schemas-data/3.1/core/account-with-authorization.json +3 -3
  267. package/dist/lib/schemas-data/3.1/core/account.json +10 -10
  268. package/dist/lib/schemas-data/3.1/core/activation-key.json +1 -1
  269. package/dist/lib/schemas-data/3.1/core/ad-inventory-config.json +1 -1
  270. package/dist/lib/schemas-data/3.1/core/agent-encryption-key.json +1 -1
  271. package/dist/lib/schemas-data/3.1/core/agent-signing-key.json +1 -1
  272. package/dist/lib/schemas-data/3.1/core/app-item.json +4 -4
  273. package/dist/lib/schemas-data/3.1/core/asset-group-vocabulary.json +1 -1
  274. package/dist/lib/schemas-data/3.1/core/assets/asset-union.json +21 -21
  275. package/dist/lib/schemas-data/3.1/core/assets/audio-asset.json +3 -3
  276. package/dist/lib/schemas-data/3.1/core/assets/brief-asset.json +2 -2
  277. package/dist/lib/schemas-data/3.1/core/assets/card-asset.json +6 -6
  278. package/dist/lib/schemas-data/3.1/core/assets/catalog-asset.json +2 -2
  279. package/dist/lib/schemas-data/3.1/core/assets/css-asset.json +2 -2
  280. package/dist/lib/schemas-data/3.1/core/assets/daast-asset.json +4 -4
  281. package/dist/lib/schemas-data/3.1/core/assets/daast-tracker-asset.json +3 -3
  282. package/dist/lib/schemas-data/3.1/core/assets/html-asset.json +2 -2
  283. package/dist/lib/schemas-data/3.1/core/assets/image-asset.json +2 -2
  284. package/dist/lib/schemas-data/3.1/core/assets/javascript-asset.json +3 -3
  285. package/dist/lib/schemas-data/3.1/core/assets/markdown-asset.json +2 -2
  286. package/dist/lib/schemas-data/3.1/core/assets/pixel-tracker-asset.json +2 -2
  287. package/dist/lib/schemas-data/3.1/core/assets/published-post-asset.json +2 -2
  288. package/dist/lib/schemas-data/3.1/core/assets/text-asset.json +2 -2
  289. package/dist/lib/schemas-data/3.1/core/assets/url-asset.json +3 -3
  290. package/dist/lib/schemas-data/3.1/core/assets/vast-asset.json +4 -4
  291. package/dist/lib/schemas-data/3.1/core/assets/vast-tracker-asset.json +3 -3
  292. package/dist/lib/schemas-data/3.1/core/assets/video-asset.json +7 -7
  293. package/dist/lib/schemas-data/3.1/core/assets/webhook-asset.json +7 -7
  294. package/dist/lib/schemas-data/3.1/core/assets/zip-asset.json +2 -2
  295. package/dist/lib/schemas-data/3.1/core/async-response-data.json +29 -29
  296. package/dist/lib/schemas-data/3.1/core/async-response-refs/creative/sync-creatives-async-response-input-required.json +3 -3
  297. package/dist/lib/schemas-data/3.1/core/async-response-refs/creative/sync-creatives-async-response-submitted.json +4 -4
  298. package/dist/lib/schemas-data/3.1/core/async-response-refs/creative/sync-creatives-async-response-working.json +3 -3
  299. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/build-creative-async-response-input-required.json +4 -4
  300. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/build-creative-async-response-submitted.json +4 -4
  301. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/build-creative-async-response-working.json +3 -3
  302. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/create-media-buy-async-response-input-required.json +4 -4
  303. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/create-media-buy-async-response-submitted.json +4 -4
  304. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/create-media-buy-async-response-working.json +3 -3
  305. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/get-products-async-response-input-required.json +4 -4
  306. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/get-products-async-response-submitted.json +4 -4
  307. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/get-products-async-response-working.json +3 -3
  308. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/sync-catalogs-async-response-input-required.json +3 -3
  309. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/sync-catalogs-async-response-submitted.json +4 -4
  310. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/sync-catalogs-async-response-working.json +3 -3
  311. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/update-media-buy-async-response-input-required.json +3 -3
  312. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/update-media-buy-async-response-submitted.json +4 -4
  313. package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/update-media-buy-async-response-working.json +3 -3
  314. package/dist/lib/schemas-data/3.1/core/async-response-refs/signals/get-signals-async-response-submitted.json +4 -4
  315. package/dist/lib/schemas-data/3.1/core/async-response-refs/signals/get-signals-async-response-working.json +3 -3
  316. package/dist/lib/schemas-data/3.1/core/attribution-window.json +4 -4
  317. package/dist/lib/schemas-data/3.1/core/audience-member.json +3 -3
  318. package/dist/lib/schemas-data/3.1/core/audience-selector.json +7 -7
  319. package/dist/lib/schemas-data/3.1/core/authorized-agent-base.json +3 -3
  320. package/dist/lib/schemas-data/3.1/core/brand-id.json +1 -1
  321. package/dist/lib/schemas-data/3.1/core/brand-ref.json +3 -3
  322. package/dist/lib/schemas-data/3.1/core/business-entity.json +2 -2
  323. package/dist/lib/schemas-data/3.1/core/cancellation-policy.json +2 -2
  324. package/dist/lib/schemas-data/3.1/core/canonical-format-kind.json +1 -1
  325. package/dist/lib/schemas-data/3.1/core/canonical-projection-ref.json +3 -3
  326. package/dist/lib/schemas-data/3.1/core/canonical-projection-slot-override.json +1 -1
  327. package/dist/lib/schemas-data/3.1/core/catalog-field-mapping.json +2 -2
  328. package/dist/lib/schemas-data/3.1/core/catalog-item-delivery-metrics.json +3 -3
  329. package/dist/lib/schemas-data/3.1/core/catalog.json +7 -7
  330. package/dist/lib/schemas-data/3.1/core/catchment.json +5 -5
  331. package/dist/lib/schemas-data/3.1/core/collection-distribution.json +2 -2
  332. package/dist/lib/schemas-data/3.1/core/collection-list-ref.json +1 -1
  333. package/dist/lib/schemas-data/3.1/core/collection-selector.json +1 -1
  334. package/dist/lib/schemas-data/3.1/core/collection.json +13 -13
  335. package/dist/lib/schemas-data/3.1/core/committed-metric.json +9 -9
  336. package/dist/lib/schemas-data/3.1/core/content-rating.json +2 -2
  337. package/dist/lib/schemas-data/3.1/core/context.json +1 -1
  338. package/dist/lib/schemas-data/3.1/core/creative-asset.json +10 -10
  339. package/dist/lib/schemas-data/3.1/core/creative-assignment.json +2 -2
  340. package/dist/lib/schemas-data/3.1/core/creative-brief.json +4 -4
  341. package/dist/lib/schemas-data/3.1/core/creative-consumption.json +1 -1
  342. package/dist/lib/schemas-data/3.1/core/creative-delivery-metrics.json +2 -2
  343. package/dist/lib/schemas-data/3.1/core/creative-filters.json +5 -5
  344. package/dist/lib/schemas-data/3.1/core/creative-item.json +1 -1
  345. package/dist/lib/schemas-data/3.1/core/creative-manifest.json +11 -11
  346. package/dist/lib/schemas-data/3.1/core/creative-policy.json +3 -3
  347. package/dist/lib/schemas-data/3.1/core/creative-variable.json +1 -1
  348. package/dist/lib/schemas-data/3.1/core/creative-variant.json +5 -5
  349. package/dist/lib/schemas-data/3.1/core/data-provider-signal-selector.json +1 -1
  350. package/dist/lib/schemas-data/3.1/core/date-range.json +1 -1
  351. package/dist/lib/schemas-data/3.1/core/datetime-range.json +1 -1
  352. package/dist/lib/schemas-data/3.1/core/daypart-target.json +2 -2
  353. package/dist/lib/schemas-data/3.1/core/deadline-policy.json +1 -1
  354. package/dist/lib/schemas-data/3.1/core/delivery-forecast.json +7 -7
  355. package/dist/lib/schemas-data/3.1/core/delivery-metric-aggregate.json +9 -9
  356. package/dist/lib/schemas-data/3.1/core/delivery-metrics.json +8 -8
  357. package/dist/lib/schemas-data/3.1/core/deployment.json +3 -3
  358. package/dist/lib/schemas-data/3.1/core/destination-item.json +4 -4
  359. package/dist/lib/schemas-data/3.1/core/destination.json +1 -1
  360. package/dist/lib/schemas-data/3.1/core/diagnostic-issue.json +1 -1
  361. package/dist/lib/schemas-data/3.1/core/downstream-connection-requirement.json +1 -1
  362. package/dist/lib/schemas-data/3.1/core/duration.json +1 -1
  363. package/dist/lib/schemas-data/3.1/core/education-item.json +4 -4
  364. package/dist/lib/schemas-data/3.1/core/error.json +1 -1
  365. package/dist/lib/schemas-data/3.1/core/evaluator-spec.json +5 -5
  366. package/dist/lib/schemas-data/3.1/core/event-custom-data.json +2 -2
  367. package/dist/lib/schemas-data/3.1/core/event-source-health.json +3 -3
  368. package/dist/lib/schemas-data/3.1/core/event-surface.json +2 -2
  369. package/dist/lib/schemas-data/3.1/core/event.json +8 -8
  370. package/dist/lib/schemas-data/3.1/core/ext.json +1 -1
  371. package/dist/lib/schemas-data/3.1/core/feature-requirement.json +1 -1
  372. package/dist/lib/schemas-data/3.1/core/flight-item.json +4 -4
  373. package/dist/lib/schemas-data/3.1/core/forecast-dimension-audience.json +2 -2
  374. package/dist/lib/schemas-data/3.1/core/forecast-dimension-device-platform.json +2 -2
  375. package/dist/lib/schemas-data/3.1/core/forecast-dimension-device-type.json +2 -2
  376. package/dist/lib/schemas-data/3.1/core/forecast-dimension-geo.json +5 -5
  377. package/dist/lib/schemas-data/3.1/core/forecast-dimension-placement.json +2 -2
  378. package/dist/lib/schemas-data/3.1/core/forecast-dimension-signal.json +2 -2
  379. package/dist/lib/schemas-data/3.1/core/forecast-point-dimensions.json +7 -7
  380. package/dist/lib/schemas-data/3.1/core/forecast-point.json +27 -27
  381. package/dist/lib/schemas-data/3.1/core/forecast-range.json +1 -1
  382. package/dist/lib/schemas-data/3.1/core/forecast-vendor-metric-value.json +5 -5
  383. package/dist/lib/schemas-data/3.1/core/format-id.json +1 -1
  384. package/dist/lib/schemas-data/3.1/core/format-option-ref.json +1 -1
  385. package/dist/lib/schemas-data/3.1/core/format-shape-vocabulary.json +1 -1
  386. package/dist/lib/schemas-data/3.1/core/format.json +44 -44
  387. package/dist/lib/schemas-data/3.1/core/frequency-cap.json +4 -4
  388. package/dist/lib/schemas-data/3.1/core/generation-credential.json +3 -3
  389. package/dist/lib/schemas-data/3.1/core/geo-breakdown-support.json +3 -3
  390. package/dist/lib/schemas-data/3.1/core/geo-delivery-metrics.json +6 -6
  391. package/dist/lib/schemas-data/3.1/core/hotel-item.json +4 -4
  392. package/dist/lib/schemas-data/3.1/core/identifier.json +2 -2
  393. package/dist/lib/schemas-data/3.1/core/impairment.json +3 -3
  394. package/dist/lib/schemas-data/3.1/core/industry-identifier.json +2 -2
  395. package/dist/lib/schemas-data/3.1/core/insertion-order.json +1 -1
  396. package/dist/lib/schemas-data/3.1/core/installment-deadlines.json +2 -2
  397. package/dist/lib/schemas-data/3.1/core/installment.json +9 -9
  398. package/dist/lib/schemas-data/3.1/core/job-item.json +3 -3
  399. package/dist/lib/schemas-data/3.1/core/keyword-delivery-metrics.json +3 -3
  400. package/dist/lib/schemas-data/3.1/core/limited-series.json +1 -1
  401. package/dist/lib/schemas-data/3.1/core/material-deadline.json +1 -1
  402. package/dist/lib/schemas-data/3.1/core/mcp-webhook-payload.json +5 -5
  403. package/dist/lib/schemas-data/3.1/core/measurement-readiness.json +5 -5
  404. package/dist/lib/schemas-data/3.1/core/measurement-terms.json +3 -3
  405. package/dist/lib/schemas-data/3.1/core/measurement-window.json +1 -1
  406. package/dist/lib/schemas-data/3.1/core/media-buy-available-action.json +4 -4
  407. package/dist/lib/schemas-data/3.1/core/media-buy-features.json +1 -1
  408. package/dist/lib/schemas-data/3.1/core/media-buy.json +10 -10
  409. package/dist/lib/schemas-data/3.1/core/missing-metric.json +9 -9
  410. package/dist/lib/schemas-data/3.1/core/notification-config.json +4 -4
  411. package/dist/lib/schemas-data/3.1/core/offering-asset-group.json +16 -16
  412. package/dist/lib/schemas-data/3.1/core/offering.json +5 -5
  413. package/dist/lib/schemas-data/3.1/core/optimization-goal.json +7 -7
  414. package/dist/lib/schemas-data/3.1/core/outcome-measurement.json +2 -2
  415. package/dist/lib/schemas-data/3.1/core/overlay.json +1 -1
  416. package/dist/lib/schemas-data/3.1/core/package-signal-targeting-group.json +2 -2
  417. package/dist/lib/schemas-data/3.1/core/package-signal-targeting-groups.json +2 -2
  418. package/dist/lib/schemas-data/3.1/core/package-signal-targeting.json +3 -3
  419. package/dist/lib/schemas-data/3.1/core/package.json +17 -17
  420. package/dist/lib/schemas-data/3.1/core/pagination-request.json +1 -1
  421. package/dist/lib/schemas-data/3.1/core/pagination-response.json +1 -1
  422. package/dist/lib/schemas-data/3.1/core/performance-feedback.json +12 -12
  423. package/dist/lib/schemas-data/3.1/core/performance-standard.json +4 -4
  424. package/dist/lib/schemas-data/3.1/core/placement-definition.json +10 -10
  425. package/dist/lib/schemas-data/3.1/core/placement-ref.json +1 -1
  426. package/dist/lib/schemas-data/3.1/core/placement.json +7 -7
  427. package/dist/lib/schemas-data/3.1/core/planned-delivery.json +5 -5
  428. package/dist/lib/schemas-data/3.1/core/platform-extension-ref.json +1 -1
  429. package/dist/lib/schemas-data/3.1/core/postal-area-support.json +2 -2
  430. package/dist/lib/schemas-data/3.1/core/postal-area.json +4 -4
  431. package/dist/lib/schemas-data/3.1/core/postal-country-system.json +2 -2
  432. package/dist/lib/schemas-data/3.1/core/price.json +1 -1
  433. package/dist/lib/schemas-data/3.1/core/pricing-option.json +10 -10
  434. package/dist/lib/schemas-data/3.1/core/product-allocation.json +4 -4
  435. package/dist/lib/schemas-data/3.1/core/product-allowed-action.json +5 -5
  436. package/dist/lib/schemas-data/3.1/core/product-filters.json +27 -27
  437. package/dist/lib/schemas-data/3.1/core/product-format-declaration.json +16 -16
  438. package/dist/lib/schemas-data/3.1/core/product-signal-targeting-option.json +3 -3
  439. package/dist/lib/schemas-data/3.1/core/product.json +40 -40
  440. package/dist/lib/schemas-data/3.1/core/property-id.json +1 -1
  441. package/dist/lib/schemas-data/3.1/core/property-list-ref.json +1 -1
  442. package/dist/lib/schemas-data/3.1/core/property-tag.json +1 -1
  443. package/dist/lib/schemas-data/3.1/core/property.json +6 -6
  444. package/dist/lib/schemas-data/3.1/core/proposal.json +6 -6
  445. package/dist/lib/schemas-data/3.1/core/protocol-envelope.json +5 -5
  446. package/dist/lib/schemas-data/3.1/core/provenance.json +9 -9
  447. package/dist/lib/schemas-data/3.1/core/publisher-property-selector.json +3 -3
  448. package/dist/lib/schemas-data/3.1/core/push-notification-config.json +2 -2
  449. package/dist/lib/schemas-data/3.1/core/real-estate-item.json +4 -4
  450. package/dist/lib/schemas-data/3.1/core/reference-asset.json +1 -1
  451. package/dist/lib/schemas-data/3.1/core/registry-event.json +13 -13
  452. package/dist/lib/schemas-data/3.1/core/registry-feed-response.json +2 -2
  453. package/dist/lib/schemas-data/3.1/core/reporting-capabilities.json +8 -8
  454. package/dist/lib/schemas-data/3.1/core/reporting-webhook.json +3 -3
  455. package/dist/lib/schemas-data/3.1/core/requirements/asset-requirements.json +13 -13
  456. package/dist/lib/schemas-data/3.1/core/requirements/audio-asset-requirements.json +1 -1
  457. package/dist/lib/schemas-data/3.1/core/requirements/catalog-field-binding.json +4 -4
  458. package/dist/lib/schemas-data/3.1/core/requirements/catalog-requirements.json +5 -5
  459. package/dist/lib/schemas-data/3.1/core/requirements/css-asset-requirements.json +1 -1
  460. package/dist/lib/schemas-data/3.1/core/requirements/daast-asset-requirements.json +1 -1
  461. package/dist/lib/schemas-data/3.1/core/requirements/html-asset-requirements.json +1 -1
  462. package/dist/lib/schemas-data/3.1/core/requirements/image-asset-requirements.json +2 -2
  463. package/dist/lib/schemas-data/3.1/core/requirements/javascript-asset-requirements.json +1 -1
  464. package/dist/lib/schemas-data/3.1/core/requirements/markdown-asset-requirements.json +1 -1
  465. package/dist/lib/schemas-data/3.1/core/requirements/offering-asset-constraint.json +4 -4
  466. package/dist/lib/schemas-data/3.1/core/requirements/text-asset-requirements.json +1 -1
  467. package/dist/lib/schemas-data/3.1/core/requirements/url-asset-requirements.json +1 -1
  468. package/dist/lib/schemas-data/3.1/core/requirements/vast-asset-requirements.json +1 -1
  469. package/dist/lib/schemas-data/3.1/core/requirements/video-asset-requirements.json +6 -6
  470. package/dist/lib/schemas-data/3.1/core/requirements/webhook-asset-requirements.json +1 -1
  471. package/dist/lib/schemas-data/3.1/core/response-payload-jws-envelope.json +1 -1
  472. package/dist/lib/schemas-data/3.1/core/response.json +1 -1
  473. package/dist/lib/schemas-data/3.1/core/rights-constraint.json +4 -4
  474. package/dist/lib/schemas-data/3.1/core/seller-agent-ref.json +1 -1
  475. package/dist/lib/schemas-data/3.1/core/signal-coverage-forecast.json +5 -5
  476. package/dist/lib/schemas-data/3.1/core/signal-definition-enrichment.json +4 -4
  477. package/dist/lib/schemas-data/3.1/core/signal-definition.json +5 -5
  478. package/dist/lib/schemas-data/3.1/core/signal-filters.json +3 -3
  479. package/dist/lib/schemas-data/3.1/core/signal-id.json +1 -1
  480. package/dist/lib/schemas-data/3.1/core/signal-listing.json +4 -4
  481. package/dist/lib/schemas-data/3.1/core/signal-modeling-disclosure.json +1 -1
  482. package/dist/lib/schemas-data/3.1/core/signal-pricing-option.json +2 -2
  483. package/dist/lib/schemas-data/3.1/core/signal-pricing.json +6 -6
  484. package/dist/lib/schemas-data/3.1/core/signal-ref.json +1 -1
  485. package/dist/lib/schemas-data/3.1/core/signal-selection-group-rule.json +1 -1
  486. package/dist/lib/schemas-data/3.1/core/signal-targeting-expression.json +4 -4
  487. package/dist/lib/schemas-data/3.1/core/signal-targeting-rules.json +2 -2
  488. package/dist/lib/schemas-data/3.1/core/signal-targeting.json +7 -7
  489. package/dist/lib/schemas-data/3.1/core/sla-window.json +1 -1
  490. package/dist/lib/schemas-data/3.1/core/special.json +2 -2
  491. package/dist/lib/schemas-data/3.1/core/start-timing.json +1 -1
  492. package/dist/lib/schemas-data/3.1/core/store-item.json +3 -3
  493. package/dist/lib/schemas-data/3.1/core/talent.json +2 -2
  494. package/dist/lib/schemas-data/3.1/core/targeting.json +22 -22
  495. package/dist/lib/schemas-data/3.1/core/tasks-get-request.json +5 -5
  496. package/dist/lib/schemas-data/3.1/core/tasks-get-response.json +10 -10
  497. package/dist/lib/schemas-data/3.1/core/tasks-list-request.json +13 -13
  498. package/dist/lib/schemas-data/3.1/core/tasks-list-response.json +8 -8
  499. package/dist/lib/schemas-data/3.1/core/transformer-param.json +1 -1
  500. package/dist/lib/schemas-data/3.1/core/transformer.json +5 -5
  501. package/dist/lib/schemas-data/3.1/core/truncation-sentinel.json +1 -1
  502. package/dist/lib/schemas-data/3.1/core/user-match.json +3 -3
  503. package/dist/lib/schemas-data/3.1/core/vehicle-item.json +4 -4
  504. package/dist/lib/schemas-data/3.1/core/vendor-metric-id.json +1 -1
  505. package/dist/lib/schemas-data/3.1/core/vendor-metric-optimization-supported-metric.json +3 -3
  506. package/dist/lib/schemas-data/3.1/core/vendor-metric-optimization.json +2 -2
  507. package/dist/lib/schemas-data/3.1/core/vendor-metric-value.json +3 -3
  508. package/dist/lib/schemas-data/3.1/core/vendor-pricing-option.json +3 -3
  509. package/dist/lib/schemas-data/3.1/core/version-envelope.json +1 -1
  510. package/dist/lib/schemas-data/3.1/core/webhook-activity-record.json +3 -3
  511. package/dist/lib/schemas-data/3.1/core/webhook-challenge-response.json +1 -1
  512. package/dist/lib/schemas-data/3.1/core/webhook-challenge.json +2 -2
  513. package/dist/lib/schemas-data/3.1/core/wholesale-feed-event.json +17 -17
  514. package/dist/lib/schemas-data/3.1/core/wholesale-feed-webhook.json +3 -3
  515. package/dist/lib/schemas-data/3.1/core/x-entity-types.json +1 -1
  516. package/dist/lib/schemas-data/3.1/creative/asset-types/index.json +6 -6
  517. package/dist/lib/schemas-data/3.1/creative/audit-observation.json +2 -2
  518. package/dist/lib/schemas-data/3.1/creative/creative-feature-result.json +2 -2
  519. package/dist/lib/schemas-data/3.1/creative/creative-purged-webhook.json +3 -3
  520. package/dist/lib/schemas-data/3.1/creative/creative-status-changed-webhook.json +4 -4
  521. package/dist/lib/schemas-data/3.1/creative/get-creative-delivery-request.json +6 -6
  522. package/dist/lib/schemas-data/3.1/creative/get-creative-delivery-response.json +9 -9
  523. package/dist/lib/schemas-data/3.1/creative/get-creative-features-request.json +6 -6
  524. package/dist/lib/schemas-data/3.1/creative/get-creative-features-response.json +11 -11
  525. package/dist/lib/schemas-data/3.1/creative/list-creative-formats-request.json +13 -13
  526. package/dist/lib/schemas-data/3.1/creative/list-creative-formats-response.json +9 -9
  527. package/dist/lib/schemas-data/3.1/creative/list-creatives-request.json +9 -9
  528. package/dist/lib/schemas-data/3.1/creative/list-creatives-response.json +21 -21
  529. package/dist/lib/schemas-data/3.1/creative/list-transformers-request.json +8 -8
  530. package/dist/lib/schemas-data/3.1/creative/list-transformers-response.json +8 -8
  531. package/dist/lib/schemas-data/3.1/creative/preview-creative-request.json +12 -12
  532. package/dist/lib/schemas-data/3.1/creative/preview-creative-response.json +14 -14
  533. package/dist/lib/schemas-data/3.1/creative/preview-render.json +1 -1
  534. package/dist/lib/schemas-data/3.1/creative/sync-creatives-async-response-input-required.json +3 -3
  535. package/dist/lib/schemas-data/3.1/creative/sync-creatives-async-response-submitted.json +4 -4
  536. package/dist/lib/schemas-data/3.1/creative/sync-creatives-async-response-working.json +3 -3
  537. package/dist/lib/schemas-data/3.1/creative/sync-creatives-request.json +8 -8
  538. package/dist/lib/schemas-data/3.1/creative/sync-creatives-response.json +15 -15
  539. package/dist/lib/schemas-data/3.1/creative/validate-input-request.json +4 -4
  540. package/dist/lib/schemas-data/3.1/creative/validate-input-response.json +4 -4
  541. package/dist/lib/schemas-data/3.1/creative/validate-input-result.json +1 -1
  542. package/dist/lib/schemas-data/3.1/creative/video-brief.json +1 -1
  543. package/dist/lib/schemas-data/3.1/enums/account-scope.json +1 -1
  544. package/dist/lib/schemas-data/3.1/enums/account-status.json +1 -1
  545. package/dist/lib/schemas-data/3.1/enums/action-not-allowed-reason.json +1 -1
  546. package/dist/lib/schemas-data/3.1/enums/action-source.json +1 -1
  547. package/dist/lib/schemas-data/3.1/enums/adcp-protocol.json +1 -1
  548. package/dist/lib/schemas-data/3.1/enums/adjustment-kind.json +1 -1
  549. package/dist/lib/schemas-data/3.1/enums/advertiser-industry.json +1 -1
  550. package/dist/lib/schemas-data/3.1/enums/age-verification-method.json +1 -1
  551. package/dist/lib/schemas-data/3.1/enums/assessment-status.json +1 -1
  552. package/dist/lib/schemas-data/3.1/enums/asset-content-type.json +1 -1
  553. package/dist/lib/schemas-data/3.1/enums/attestation-claim.json +1 -1
  554. package/dist/lib/schemas-data/3.1/enums/attribution-methodology.json +1 -1
  555. package/dist/lib/schemas-data/3.1/enums/attribution-model.json +1 -1
  556. package/dist/lib/schemas-data/3.1/enums/audience-source.json +1 -1
  557. package/dist/lib/schemas-data/3.1/enums/audience-status.json +1 -1
  558. package/dist/lib/schemas-data/3.1/enums/audio-channel-layout.json +1 -1
  559. package/dist/lib/schemas-data/3.1/enums/audio-distribution-type.json +1 -1
  560. package/dist/lib/schemas-data/3.1/enums/auth-scheme.json +1 -1
  561. package/dist/lib/schemas-data/3.1/enums/available-metric.json +1 -1
  562. package/dist/lib/schemas-data/3.1/enums/billing-party.json +1 -1
  563. package/dist/lib/schemas-data/3.1/enums/binary-verdict.json +1 -1
  564. package/dist/lib/schemas-data/3.1/enums/brand-agent-type.json +1 -1
  565. package/dist/lib/schemas-data/3.1/enums/c2pa-watermark-action.json +1 -1
  566. package/dist/lib/schemas-data/3.1/enums/canceled-by.json +1 -1
  567. package/dist/lib/schemas-data/3.1/enums/catalog-action.json +1 -1
  568. package/dist/lib/schemas-data/3.1/enums/catalog-item-status.json +1 -1
  569. package/dist/lib/schemas-data/3.1/enums/catalog-type.json +1 -1
  570. package/dist/lib/schemas-data/3.1/enums/channels.json +1 -1
  571. package/dist/lib/schemas-data/3.1/enums/cloud-storage-protocol.json +1 -1
  572. package/dist/lib/schemas-data/3.1/enums/co-branding-requirement.json +1 -1
  573. package/dist/lib/schemas-data/3.1/enums/collection-cadence.json +1 -1
  574. package/dist/lib/schemas-data/3.1/enums/collection-kind.json +1 -1
  575. package/dist/lib/schemas-data/3.1/enums/collection-relationship.json +1 -1
  576. package/dist/lib/schemas-data/3.1/enums/collection-status.json +1 -1
  577. package/dist/lib/schemas-data/3.1/enums/completion-source.json +1 -1
  578. package/dist/lib/schemas-data/3.1/enums/consent-basis.json +1 -1
  579. package/dist/lib/schemas-data/3.1/enums/content-id-type.json +1 -1
  580. package/dist/lib/schemas-data/3.1/enums/content-rating-system.json +1 -1
  581. package/dist/lib/schemas-data/3.1/enums/creative-action.json +1 -1
  582. package/dist/lib/schemas-data/3.1/enums/creative-agent-capability.json +1 -1
  583. package/dist/lib/schemas-data/3.1/enums/creative-approval-status.json +1 -1
  584. package/dist/lib/schemas-data/3.1/enums/creative-event-reason-code.json +1 -1
  585. package/dist/lib/schemas-data/3.1/enums/creative-identifier-type.json +1 -1
  586. package/dist/lib/schemas-data/3.1/enums/creative-quality.json +1 -1
  587. package/dist/lib/schemas-data/3.1/enums/creative-selection-strategy.json +1 -1
  588. package/dist/lib/schemas-data/3.1/enums/creative-sort-field.json +1 -1
  589. package/dist/lib/schemas-data/3.1/enums/creative-status.json +1 -1
  590. package/dist/lib/schemas-data/3.1/enums/daast-tracking-event.json +1 -1
  591. package/dist/lib/schemas-data/3.1/enums/daast-version.json +1 -1
  592. package/dist/lib/schemas-data/3.1/enums/day-of-week.json +1 -1
  593. package/dist/lib/schemas-data/3.1/enums/delegation-authority.json +1 -1
  594. package/dist/lib/schemas-data/3.1/enums/delivery-type.json +1 -1
  595. package/dist/lib/schemas-data/3.1/enums/demographic-system.json +1 -1
  596. package/dist/lib/schemas-data/3.1/enums/derivative-type.json +1 -1
  597. package/dist/lib/schemas-data/3.1/enums/device-platform.json +1 -1
  598. package/dist/lib/schemas-data/3.1/enums/device-type.json +1 -1
  599. package/dist/lib/schemas-data/3.1/enums/digital-source-type.json +1 -1
  600. package/dist/lib/schemas-data/3.1/enums/dimension-unit.json +1 -1
  601. package/dist/lib/schemas-data/3.1/enums/disclosure-persistence.json +1 -1
  602. package/dist/lib/schemas-data/3.1/enums/disclosure-position.json +1 -1
  603. package/dist/lib/schemas-data/3.1/enums/distance-unit.json +1 -1
  604. package/dist/lib/schemas-data/3.1/enums/distribution-identifier-type.json +1 -1
  605. package/dist/lib/schemas-data/3.1/enums/embedded-provenance-method.json +1 -1
  606. package/dist/lib/schemas-data/3.1/enums/error-code.json +1 -1
  607. package/dist/lib/schemas-data/3.1/enums/error-scope.json +1 -1
  608. package/dist/lib/schemas-data/3.1/enums/escalation-severity.json +1 -1
  609. package/dist/lib/schemas-data/3.1/enums/event-type.json +1 -1
  610. package/dist/lib/schemas-data/3.1/enums/exclusivity.json +1 -1
  611. package/dist/lib/schemas-data/3.1/enums/feature-check-status.json +1 -1
  612. package/dist/lib/schemas-data/3.1/enums/feed-format.json +1 -1
  613. package/dist/lib/schemas-data/3.1/enums/feedback-source.json +1 -1
  614. package/dist/lib/schemas-data/3.1/enums/forecast-method.json +1 -1
  615. package/dist/lib/schemas-data/3.1/enums/forecast-range-unit.json +1 -1
  616. package/dist/lib/schemas-data/3.1/enums/forecastable-metric.json +1 -1
  617. package/dist/lib/schemas-data/3.1/enums/format-id-parameter.json +1 -1
  618. package/dist/lib/schemas-data/3.1/enums/frame-rate-type.json +1 -1
  619. package/dist/lib/schemas-data/3.1/enums/frequency-cap-scope.json +1 -1
  620. package/dist/lib/schemas-data/3.1/enums/genre-taxonomy.json +1 -1
  621. package/dist/lib/schemas-data/3.1/enums/geo-level.json +1 -1
  622. package/dist/lib/schemas-data/3.1/enums/gop-type.json +1 -1
  623. package/dist/lib/schemas-data/3.1/enums/governance-decision.json +1 -1
  624. package/dist/lib/schemas-data/3.1/enums/governance-domain.json +1 -1
  625. package/dist/lib/schemas-data/3.1/enums/governance-mode.json +1 -1
  626. package/dist/lib/schemas-data/3.1/enums/governance-phase.json +1 -1
  627. package/dist/lib/schemas-data/3.1/enums/history-entry-type.json +1 -1
  628. package/dist/lib/schemas-data/3.1/enums/http-method.json +1 -1
  629. package/dist/lib/schemas-data/3.1/enums/identifier-types.json +1 -1
  630. package/dist/lib/schemas-data/3.1/enums/impairment-offline-state.json +1 -1
  631. package/dist/lib/schemas-data/3.1/enums/impairment-reason-code.json +1 -1
  632. package/dist/lib/schemas-data/3.1/enums/installment-status.json +1 -1
  633. package/dist/lib/schemas-data/3.1/enums/javascript-module-type.json +1 -1
  634. package/dist/lib/schemas-data/3.1/enums/landing-page-requirement.json +1 -1
  635. package/dist/lib/schemas-data/3.1/enums/legacy-postal-system.json +1 -1
  636. package/dist/lib/schemas-data/3.1/enums/lift-dimension.json +1 -1
  637. package/dist/lib/schemas-data/3.1/enums/logo-slot.json +1 -1
  638. package/dist/lib/schemas-data/3.1/enums/makegood-remedy.json +1 -1
  639. package/dist/lib/schemas-data/3.1/enums/markdown-flavor.json +1 -1
  640. package/dist/lib/schemas-data/3.1/enums/match-id-type.json +1 -1
  641. package/dist/lib/schemas-data/3.1/enums/match-type.json +1 -1
  642. package/dist/lib/schemas-data/3.1/enums/media-buy-action-mode.json +1 -1
  643. package/dist/lib/schemas-data/3.1/enums/media-buy-health.json +1 -1
  644. package/dist/lib/schemas-data/3.1/enums/media-buy-status.json +1 -1
  645. package/dist/lib/schemas-data/3.1/enums/media-buy-valid-action.json +1 -1
  646. package/dist/lib/schemas-data/3.1/enums/metric-scope.json +1 -1
  647. package/dist/lib/schemas-data/3.1/enums/metric-type.json +1 -1
  648. package/dist/lib/schemas-data/3.1/enums/metro-system.json +1 -1
  649. package/dist/lib/schemas-data/3.1/enums/moov-atom-position.json +1 -1
  650. package/dist/lib/schemas-data/3.1/enums/notification-type.json +1 -1
  651. package/dist/lib/schemas-data/3.1/enums/offering-availability-status.json +1 -1
  652. package/dist/lib/schemas-data/3.1/enums/outcome-type.json +1 -1
  653. package/dist/lib/schemas-data/3.1/enums/pacing.json +1 -1
  654. package/dist/lib/schemas-data/3.1/enums/payment-terms.json +1 -1
  655. package/dist/lib/schemas-data/3.1/enums/performance-standard-metric.json +1 -1
  656. package/dist/lib/schemas-data/3.1/enums/policy-category.json +1 -1
  657. package/dist/lib/schemas-data/3.1/enums/policy-enforcement.json +1 -1
  658. package/dist/lib/schemas-data/3.1/enums/postal-system.json +1 -1
  659. package/dist/lib/schemas-data/3.1/enums/preview-output-format.json +1 -1
  660. package/dist/lib/schemas-data/3.1/enums/pricing-model.json +1 -1
  661. package/dist/lib/schemas-data/3.1/enums/production-quality.json +1 -1
  662. package/dist/lib/schemas-data/3.1/enums/property-type.json +1 -1
  663. package/dist/lib/schemas-data/3.1/enums/proposal-status.json +1 -1
  664. package/dist/lib/schemas-data/3.1/enums/publisher-identifier-types.json +1 -1
  665. package/dist/lib/schemas-data/3.1/enums/purchase-type.json +1 -1
  666. package/dist/lib/schemas-data/3.1/enums/reach-unit.json +1 -1
  667. package/dist/lib/schemas-data/3.1/enums/reporting-frequency.json +1 -1
  668. package/dist/lib/schemas-data/3.1/enums/response-type.json +1 -1
  669. package/dist/lib/schemas-data/3.1/enums/restricted-attribute.json +1 -1
  670. package/dist/lib/schemas-data/3.1/enums/right-type.json +1 -1
  671. package/dist/lib/schemas-data/3.1/enums/right-use.json +1 -1
  672. package/dist/lib/schemas-data/3.1/enums/rights-billing-period.json +1 -1
  673. package/dist/lib/schemas-data/3.1/enums/scan-type.json +1 -1
  674. package/dist/lib/schemas-data/3.1/enums/si-session-status.json +1 -1
  675. package/dist/lib/schemas-data/3.1/enums/signal-catalog-type.json +1 -1
  676. package/dist/lib/schemas-data/3.1/enums/signal-source.json +1 -1
  677. package/dist/lib/schemas-data/3.1/enums/signal-value-type.json +1 -1
  678. package/dist/lib/schemas-data/3.1/enums/snapshot-unavailable-reason.json +1 -1
  679. package/dist/lib/schemas-data/3.1/enums/social-placement-surface.json +1 -1
  680. package/dist/lib/schemas-data/3.1/enums/sort-direction.json +1 -1
  681. package/dist/lib/schemas-data/3.1/enums/sort-metric.json +1 -1
  682. package/dist/lib/schemas-data/3.1/enums/special-category.json +1 -1
  683. package/dist/lib/schemas-data/3.1/enums/specialism.json +1 -1
  684. package/dist/lib/schemas-data/3.1/enums/sponsored-placement-type.json +1 -1
  685. package/dist/lib/schemas-data/3.1/enums/talent-role.json +1 -1
  686. package/dist/lib/schemas-data/3.1/enums/task-status.json +1 -1
  687. package/dist/lib/schemas-data/3.1/enums/task-type.json +1 -1
  688. package/dist/lib/schemas-data/3.1/enums/transport-mode.json +1 -1
  689. package/dist/lib/schemas-data/3.1/enums/travel-time-unit.json +1 -1
  690. package/dist/lib/schemas-data/3.1/enums/uid-type.json +1 -1
  691. package/dist/lib/schemas-data/3.1/enums/universal-macro.json +1 -1
  692. package/dist/lib/schemas-data/3.1/enums/update-frequency.json +1 -1
  693. package/dist/lib/schemas-data/3.1/enums/url-asset-type.json +1 -1
  694. package/dist/lib/schemas-data/3.1/enums/validation-mode.json +1 -1
  695. package/dist/lib/schemas-data/3.1/enums/vast-tracking-event.json +1 -1
  696. package/dist/lib/schemas-data/3.1/enums/vast-version.json +1 -1
  697. package/dist/lib/schemas-data/3.1/enums/video-placement-type.json +1 -1
  698. package/dist/lib/schemas-data/3.1/enums/viewability-standard.json +1 -1
  699. package/dist/lib/schemas-data/3.1/enums/watermark-media-type.json +1 -1
  700. package/dist/lib/schemas-data/3.1/enums/wcag-level.json +1 -1
  701. package/dist/lib/schemas-data/3.1/enums/webhook-response-type.json +1 -1
  702. package/dist/lib/schemas-data/3.1/enums/webhook-security-method.json +1 -1
  703. package/dist/lib/schemas-data/3.1/error-details/account-setup-required.json +1 -1
  704. package/dist/lib/schemas-data/3.1/error-details/action-not-allowed.json +4 -4
  705. package/dist/lib/schemas-data/3.1/error-details/agent-permission-denied.json +1 -1
  706. package/dist/lib/schemas-data/3.1/error-details/audience-too-small.json +1 -1
  707. package/dist/lib/schemas-data/3.1/error-details/authorization-required.json +3 -3
  708. package/dist/lib/schemas-data/3.1/error-details/billing-not-permitted-for-agent.json +3 -3
  709. package/dist/lib/schemas-data/3.1/error-details/billing-not-supported.json +2 -2
  710. package/dist/lib/schemas-data/3.1/error-details/budget-too-low.json +1 -1
  711. package/dist/lib/schemas-data/3.1/error-details/conflict.json +1 -1
  712. package/dist/lib/schemas-data/3.1/error-details/creative-rejected.json +1 -1
  713. package/dist/lib/schemas-data/3.1/error-details/policy-violation.json +1 -1
  714. package/dist/lib/schemas-data/3.1/error-details/rate-limited.json +1 -1
  715. package/dist/lib/schemas-data/3.1/error-details/stale-response.json +1 -1
  716. package/dist/lib/schemas-data/3.1/error-details/vendor-error-codes.json +1 -1
  717. package/dist/lib/schemas-data/3.1/error-details/version-unsupported.json +2 -2
  718. package/dist/lib/schemas-data/3.1/extensions/extension-meta.json +1 -1
  719. package/dist/lib/schemas-data/3.1/extensions/index.json +2 -2
  720. package/dist/lib/schemas-data/3.1/formats/canonical/_base.json +5 -5
  721. package/dist/lib/schemas-data/3.1/formats/canonical/agent_placement.json +2 -2
  722. package/dist/lib/schemas-data/3.1/formats/canonical/audio_daast.json +2 -2
  723. package/dist/lib/schemas-data/3.1/formats/canonical/audio_hosted.json +2 -2
  724. package/dist/lib/schemas-data/3.1/formats/canonical/display_tag.json +2 -2
  725. package/dist/lib/schemas-data/3.1/formats/canonical/html5.json +2 -2
  726. package/dist/lib/schemas-data/3.1/formats/canonical/image.json +2 -2
  727. package/dist/lib/schemas-data/3.1/formats/canonical/image_carousel.json +2 -2
  728. package/dist/lib/schemas-data/3.1/formats/canonical/native_in_feed.json +2 -2
  729. package/dist/lib/schemas-data/3.1/formats/canonical/responsive_creative.json +2 -2
  730. package/dist/lib/schemas-data/3.1/formats/canonical/sponsored_placement.json +2 -2
  731. package/dist/lib/schemas-data/3.1/formats/canonical/video_hosted.json +2 -2
  732. package/dist/lib/schemas-data/3.1/formats/canonical/video_vast.json +2 -2
  733. package/dist/lib/schemas-data/3.1/governance/attribute-definition.json +1 -1
  734. package/dist/lib/schemas-data/3.1/governance/audience-constraints.json +3 -3
  735. package/dist/lib/schemas-data/3.1/governance/check-governance-request.json +8 -8
  736. package/dist/lib/schemas-data/3.1/governance/check-governance-response.json +7 -7
  737. package/dist/lib/schemas-data/3.1/governance/get-plan-audit-logs-request.json +5 -5
  738. package/dist/lib/schemas-data/3.1/governance/get-plan-audit-logs-response.json +11 -11
  739. package/dist/lib/schemas-data/3.1/governance/policy-category-definition.json +2 -2
  740. package/dist/lib/schemas-data/3.1/governance/policy-entry.json +6 -6
  741. package/dist/lib/schemas-data/3.1/governance/policy-ref.json +1 -1
  742. package/dist/lib/schemas-data/3.1/governance/report-plan-outcome-request.json +7 -7
  743. package/dist/lib/schemas-data/3.1/governance/report-plan-outcome-response.json +5 -5
  744. package/dist/lib/schemas-data/3.1/governance/sync-plans-request.json +14 -14
  745. package/dist/lib/schemas-data/3.1/governance/sync-plans-response.json +6 -6
  746. package/dist/lib/schemas-data/3.1/index.json +443 -443
  747. package/dist/lib/schemas-data/3.1/manifest.json +3 -3
  748. package/dist/lib/schemas-data/3.1/manifest.schema.json +1 -1
  749. package/dist/lib/schemas-data/3.1/media-buy/build-creative-async-response-input-required.json +4 -4
  750. package/dist/lib/schemas-data/3.1/media-buy/build-creative-async-response-submitted.json +4 -4
  751. package/dist/lib/schemas-data/3.1/media-buy/build-creative-async-response-working.json +3 -3
  752. package/dist/lib/schemas-data/3.1/media-buy/build-creative-request.json +16 -16
  753. package/dist/lib/schemas-data/3.1/media-buy/build-creative-response.json +35 -35
  754. package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-async-response-input-required.json +4 -4
  755. package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-async-response-submitted.json +4 -4
  756. package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-async-response-working.json +3 -3
  757. package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-request.json +13 -13
  758. package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-response.json +19 -19
  759. package/dist/lib/schemas-data/3.1/media-buy/get-media-buy-delivery-request.json +23 -23
  760. package/dist/lib/schemas-data/3.1/media-buy/get-media-buy-delivery-response.json +27 -27
  761. package/dist/lib/schemas-data/3.1/media-buy/get-media-buys-request.json +8 -8
  762. package/dist/lib/schemas-data/3.1/media-buy/get-media-buys-response.json +30 -30
  763. package/dist/lib/schemas-data/3.1/media-buy/get-products-async-response-input-required.json +4 -4
  764. package/dist/lib/schemas-data/3.1/media-buy/get-products-async-response-submitted.json +4 -4
  765. package/dist/lib/schemas-data/3.1/media-buy/get-products-async-response-working.json +3 -3
  766. package/dist/lib/schemas-data/3.1/media-buy/get-products-request.json +13 -13
  767. package/dist/lib/schemas-data/3.1/media-buy/get-products-response.json +10 -10
  768. package/dist/lib/schemas-data/3.1/media-buy/list-creative-formats-request.json +13 -13
  769. package/dist/lib/schemas-data/3.1/media-buy/list-creative-formats-response.json +9 -9
  770. package/dist/lib/schemas-data/3.1/media-buy/log-event-request.json +5 -5
  771. package/dist/lib/schemas-data/3.1/media-buy/log-event-response.json +8 -8
  772. package/dist/lib/schemas-data/3.1/media-buy/media-buy-delivery-webhook-result.json +9 -9
  773. package/dist/lib/schemas-data/3.1/media-buy/package-request.json +23 -23
  774. package/dist/lib/schemas-data/3.1/media-buy/package-update.json +13 -13
  775. package/dist/lib/schemas-data/3.1/media-buy/provide-performance-feedback-request.json +7 -7
  776. package/dist/lib/schemas-data/3.1/media-buy/provide-performance-feedback-response.json +8 -8
  777. package/dist/lib/schemas-data/3.1/media-buy/sync-audiences-request.json +8 -8
  778. package/dist/lib/schemas-data/3.1/media-buy/sync-audiences-response.json +14 -14
  779. package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-async-response-input-required.json +3 -3
  780. package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-async-response-submitted.json +4 -4
  781. package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-async-response-working.json +3 -3
  782. package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-request.json +8 -8
  783. package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-response.json +14 -14
  784. package/dist/lib/schemas-data/3.1/media-buy/sync-event-sources-request.json +8 -8
  785. package/dist/lib/schemas-data/3.1/media-buy/sync-event-sources-response.json +14 -14
  786. package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-async-response-input-required.json +3 -3
  787. package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-async-response-submitted.json +4 -4
  788. package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-async-response-working.json +3 -3
  789. package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-request.json +11 -11
  790. package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-response.json +17 -17
  791. package/dist/lib/schemas-data/3.1/pricing-options/cpa-option.json +4 -4
  792. package/dist/lib/schemas-data/3.1/pricing-options/cpc-option.json +4 -4
  793. package/dist/lib/schemas-data/3.1/pricing-options/cpcv-option.json +4 -4
  794. package/dist/lib/schemas-data/3.1/pricing-options/cpm-option.json +4 -4
  795. package/dist/lib/schemas-data/3.1/pricing-options/cpp-option.json +5 -5
  796. package/dist/lib/schemas-data/3.1/pricing-options/cpv-option.json +4 -4
  797. package/dist/lib/schemas-data/3.1/pricing-options/flat-rate-option.json +4 -4
  798. package/dist/lib/schemas-data/3.1/pricing-options/price-breakdown.json +2 -2
  799. package/dist/lib/schemas-data/3.1/pricing-options/price-guidance.json +1 -1
  800. package/dist/lib/schemas-data/3.1/pricing-options/time-option.json +4 -4
  801. package/dist/lib/schemas-data/3.1/pricing-options/vcpm-option.json +4 -4
  802. package/dist/lib/schemas-data/3.1/property/authorization-result.json +1 -1
  803. package/dist/lib/schemas-data/3.1/property/base-property-source.json +4 -4
  804. package/dist/lib/schemas-data/3.1/property/create-property-list-request.json +8 -8
  805. package/dist/lib/schemas-data/3.1/property/create-property-list-response.json +6 -6
  806. package/dist/lib/schemas-data/3.1/property/delete-property-list-request.json +5 -5
  807. package/dist/lib/schemas-data/3.1/property/delete-property-list-response.json +5 -5
  808. package/dist/lib/schemas-data/3.1/property/delivery-record.json +3 -3
  809. package/dist/lib/schemas-data/3.1/property/get-property-list-request.json +5 -5
  810. package/dist/lib/schemas-data/3.1/property/get-property-list-response.json +9 -9
  811. package/dist/lib/schemas-data/3.1/property/list-property-lists-request.json +6 -6
  812. package/dist/lib/schemas-data/3.1/property/list-property-lists-response.json +7 -7
  813. package/dist/lib/schemas-data/3.1/property/property-error.json +2 -2
  814. package/dist/lib/schemas-data/3.1/property/property-feature-definition.json +2 -2
  815. package/dist/lib/schemas-data/3.1/property/property-feature-result.json +4 -4
  816. package/dist/lib/schemas-data/3.1/property/property-feature-value.json +2 -2
  817. package/dist/lib/schemas-data/3.1/property/property-feature.json +1 -1
  818. package/dist/lib/schemas-data/3.1/property/property-list-changed-webhook.json +2 -2
  819. package/dist/lib/schemas-data/3.1/property/property-list-filters.json +5 -5
  820. package/dist/lib/schemas-data/3.1/property/property-list.json +6 -6
  821. package/dist/lib/schemas-data/3.1/property/update-property-list-request.json +8 -8
  822. package/dist/lib/schemas-data/3.1/property/update-property-list-response.json +6 -6
  823. package/dist/lib/schemas-data/3.1/property/validate-property-delivery-request.json +6 -6
  824. package/dist/lib/schemas-data/3.1/property/validate-property-delivery-response.json +6 -6
  825. package/dist/lib/schemas-data/3.1/property/validation-result.json +5 -5
  826. package/dist/lib/schemas-data/3.1/protocol/get-adcp-capabilities-request.json +4 -4
  827. package/dist/lib/schemas-data/3.1/protocol/get-adcp-capabilities-response.json +33 -33
  828. package/dist/lib/schemas-data/3.1/protocol/get-task-status-request.json +5 -5
  829. package/dist/lib/schemas-data/3.1/protocol/get-task-status-response.json +10 -10
  830. package/dist/lib/schemas-data/3.1/protocol/list-tasks-request.json +13 -13
  831. package/dist/lib/schemas-data/3.1/protocol/list-tasks-response.json +8 -8
  832. package/dist/lib/schemas-data/3.1/registries/v1-canonical-mapping.json +5 -5
  833. package/dist/lib/schemas-data/3.1/signals/activate-signal-request.json +6 -6
  834. package/dist/lib/schemas-data/3.1/signals/activate-signal-response.json +9 -9
  835. package/dist/lib/schemas-data/3.1/signals/get-signals-async-response-submitted.json +4 -4
  836. package/dist/lib/schemas-data/3.1/signals/get-signals-async-response-working.json +3 -3
  837. package/dist/lib/schemas-data/3.1/signals/get-signals-request.json +11 -11
  838. package/dist/lib/schemas-data/3.1/signals/get-signals-response.json +17 -17
  839. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-capabilities.json +1 -1
  840. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-context-use.json +1 -1
  841. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-get-offering-request.json +4 -4
  842. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-get-offering-response.json +9 -9
  843. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-identity.json +1 -1
  844. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-initiate-session-request.json +7 -7
  845. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-initiate-session-response.json +10 -10
  846. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-send-message-request.json +5 -5
  847. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-send-message-response.json +10 -10
  848. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-sponsored-context-receipt.json +4 -4
  849. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-sponsored-context.json +4 -4
  850. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-terminate-session-request.json +4 -4
  851. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-terminate-session-response.json +7 -7
  852. package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-ui-element.json +1 -1
  853. package/dist/lib/schemas-data/3.1/trusted-match/available-package.json +4 -4
  854. package/dist/lib/schemas-data/3.1/trusted-match/context-match-request.json +5 -5
  855. package/dist/lib/schemas-data/3.1/trusted-match/context-match-response.json +4 -4
  856. package/dist/lib/schemas-data/3.1/trusted-match/error.json +1 -1
  857. package/dist/lib/schemas-data/3.1/trusted-match/identity-match-request.json +4 -4
  858. package/dist/lib/schemas-data/3.1/trusted-match/identity-match-response.json +4 -4
  859. package/dist/lib/schemas-data/3.1/trusted-match/offer-price.json +1 -1
  860. package/dist/lib/schemas-data/3.1/trusted-match/offer.json +5 -5
  861. package/dist/lib/schemas-data/3.1/trusted-match/provider-identity-match-response.json +4 -4
  862. package/dist/lib/schemas-data/3.1/trusted-match/provider-registration.json +2 -2
  863. package/dist/lib/schemas-data/3.1/trusted-match/publisher-tmpx-config.json +1 -1
  864. package/dist/lib/schemas-data/3.1/trusted-match/tmpx-chunk.json +1 -1
  865. package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
  866. package/dist/lib/server/account-mode.d.mts +2 -1
  867. package/dist/lib/server/account-mode.d.ts +2 -1
  868. package/dist/lib/server/account-mode.d.ts.map +1 -1
  869. package/dist/lib/server/account-mode.js +1 -0
  870. package/dist/lib/server/account-mode.js.map +1 -1
  871. package/dist/lib/server/account-mode.mjs +1 -0
  872. package/dist/lib/server/account-mode.mjs.map +1 -1
  873. package/dist/lib/server/create-adcp-server.d.mts +10 -6
  874. package/dist/lib/server/create-adcp-server.d.ts +10 -6
  875. package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
  876. package/dist/lib/server/create-adcp-server.js +2 -1
  877. package/dist/lib/server/create-adcp-server.js.map +1 -1
  878. package/dist/lib/server/create-adcp-server.mjs +2 -1
  879. package/dist/lib/server/create-adcp-server.mjs.map +1 -1
  880. package/dist/lib/server/decisioning/account.d.mts +16 -11
  881. package/dist/lib/server/decisioning/account.d.ts +16 -11
  882. package/dist/lib/server/decisioning/account.d.ts.map +1 -1
  883. package/dist/lib/server/decisioning/account.js.map +1 -1
  884. package/dist/lib/server/decisioning/account.mjs.map +1 -1
  885. package/dist/lib/server/decisioning/pagination.d.mts +2 -0
  886. package/dist/lib/server/decisioning/pagination.d.ts +2 -0
  887. package/dist/lib/server/decisioning/pagination.d.ts.map +1 -1
  888. package/dist/lib/server/decisioning/pagination.js.map +1 -1
  889. package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js.map +1 -1
  890. package/dist/lib/server/decisioning/runtime/entity-hydration.generated.mjs.map +1 -1
  891. package/dist/lib/server/decisioning/runtime/from-platform.d.mts +20 -14
  892. package/dist/lib/server/decisioning/runtime/from-platform.d.ts +20 -14
  893. package/dist/lib/server/decisioning/runtime/from-platform.d.ts.map +1 -1
  894. package/dist/lib/server/decisioning/runtime/from-platform.js +32 -6
  895. package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
  896. package/dist/lib/server/decisioning/runtime/from-platform.mjs +32 -6
  897. package/dist/lib/server/decisioning/runtime/from-platform.mjs.map +1 -1
  898. package/dist/lib/server/decisioning/specialisms/sales.d.mts +16 -4
  899. package/dist/lib/server/decisioning/specialisms/sales.d.ts +16 -4
  900. package/dist/lib/server/decisioning/specialisms/sales.d.ts.map +1 -1
  901. package/dist/lib/server/decisioning/specialisms/sales.js.map +1 -1
  902. package/dist/lib/server/index.d.ts.map +1 -1
  903. package/dist/lib/server/index.js.map +1 -1
  904. package/dist/lib/server/index.mjs.map +1 -1
  905. package/dist/lib/server/legacy/v5/index.d.mts +2 -1
  906. package/dist/lib/server/legacy/v5/index.d.ts +2 -1
  907. package/dist/lib/server/legacy/v5/index.d.ts.map +1 -1
  908. package/dist/lib/server/legacy/v5/index.js.map +1 -1
  909. package/dist/lib/server/legacy/v5/index.mjs.map +1 -1
  910. package/dist/lib/server/wire-spec-fields.generated.d.mts +29 -29
  911. package/dist/lib/server/wire-spec-fields.generated.d.ts +29 -29
  912. package/dist/lib/server/wire-spec-fields.generated.js +29 -29
  913. package/dist/lib/server/wire-spec-fields.generated.js.map +1 -1
  914. package/dist/lib/server/wire-spec-fields.generated.mjs +29 -29
  915. package/dist/lib/server/wire-spec-fields.generated.mjs.map +1 -1
  916. package/dist/lib/testing/compliance/comply.d.mts +2 -0
  917. package/dist/lib/testing/compliance/comply.d.ts +2 -0
  918. package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
  919. package/dist/lib/testing/compliance/comply.js +45 -14
  920. package/dist/lib/testing/compliance/comply.js.map +1 -1
  921. package/dist/lib/testing/compliance/comply.mjs +45 -14
  922. package/dist/lib/testing/compliance/comply.mjs.map +1 -1
  923. package/dist/lib/testing/compliance/index.d.mts +1 -1
  924. package/dist/lib/testing/compliance/index.d.ts +1 -1
  925. package/dist/lib/testing/compliance/index.d.ts.map +1 -1
  926. package/dist/lib/testing/compliance/index.js.map +1 -1
  927. package/dist/lib/testing/compliance/index.mjs.map +1 -1
  928. package/dist/lib/testing/compliance/storyboard-tracks.d.ts.map +1 -1
  929. package/dist/lib/testing/compliance/storyboard-tracks.js +9 -1
  930. package/dist/lib/testing/compliance/storyboard-tracks.js.map +1 -1
  931. package/dist/lib/testing/compliance/storyboard-tracks.mjs +9 -1
  932. package/dist/lib/testing/compliance/storyboard-tracks.mjs.map +1 -1
  933. package/dist/lib/testing/compliance/types.d.mts +26 -25
  934. package/dist/lib/testing/compliance/types.d.ts +26 -25
  935. package/dist/lib/testing/compliance/types.d.ts.map +1 -1
  936. package/dist/lib/testing/compliance/types.js.map +1 -1
  937. package/dist/lib/testing/index.d.mts +2 -2
  938. package/dist/lib/testing/index.d.ts +2 -2
  939. package/dist/lib/testing/index.d.ts.map +1 -1
  940. package/dist/lib/testing/index.js +28 -0
  941. package/dist/lib/testing/index.js.map +1 -1
  942. package/dist/lib/testing/index.mjs +28 -0
  943. package/dist/lib/testing/index.mjs.map +1 -1
  944. package/dist/lib/testing/scenarios/media-buy.d.ts.map +1 -1
  945. package/dist/lib/testing/scenarios/media-buy.js +20 -12
  946. package/dist/lib/testing/scenarios/media-buy.js.map +1 -1
  947. package/dist/lib/testing/scenarios/media-buy.mjs +20 -12
  948. package/dist/lib/testing/scenarios/media-buy.mjs.map +1 -1
  949. package/dist/lib/testing/storyboard/canonical-format-satisfaction.d.mts +6 -0
  950. package/dist/lib/testing/storyboard/canonical-format-satisfaction.d.ts +6 -0
  951. package/dist/lib/testing/storyboard/canonical-format-satisfaction.d.ts.map +1 -1
  952. package/dist/lib/testing/storyboard/canonical-format-satisfaction.js +11 -0
  953. package/dist/lib/testing/storyboard/canonical-format-satisfaction.js.map +1 -1
  954. package/dist/lib/testing/storyboard/canonical-format-satisfaction.mjs +10 -0
  955. package/dist/lib/testing/storyboard/canonical-format-satisfaction.mjs.map +1 -1
  956. package/dist/lib/testing/storyboard/creative-assets.d.mts +28 -0
  957. package/dist/lib/testing/storyboard/creative-assets.d.ts +29 -0
  958. package/dist/lib/testing/storyboard/creative-assets.d.ts.map +1 -0
  959. package/dist/lib/testing/storyboard/creative-assets.js +457 -0
  960. package/dist/lib/testing/storyboard/creative-assets.js.map +1 -0
  961. package/dist/lib/testing/storyboard/creative-assets.mjs +430 -0
  962. package/dist/lib/testing/storyboard/creative-assets.mjs.map +1 -0
  963. package/dist/lib/testing/storyboard/fixture-resolution.d.mts +37 -0
  964. package/dist/lib/testing/storyboard/fixture-resolution.d.ts +38 -0
  965. package/dist/lib/testing/storyboard/fixture-resolution.d.ts.map +1 -0
  966. package/dist/lib/testing/storyboard/fixture-resolution.js +424 -0
  967. package/dist/lib/testing/storyboard/fixture-resolution.js.map +1 -0
  968. package/dist/lib/testing/storyboard/fixture-resolution.mjs +395 -0
  969. package/dist/lib/testing/storyboard/fixture-resolution.mjs.map +1 -0
  970. package/dist/lib/testing/storyboard/index.d.mts +5 -1
  971. package/dist/lib/testing/storyboard/index.d.ts +5 -1
  972. package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
  973. package/dist/lib/testing/storyboard/index.js +33 -0
  974. package/dist/lib/testing/storyboard/index.js.map +1 -1
  975. package/dist/lib/testing/storyboard/index.mjs +33 -0
  976. package/dist/lib/testing/storyboard/index.mjs.map +1 -1
  977. package/dist/lib/testing/storyboard/junit.js +14 -1
  978. package/dist/lib/testing/storyboard/junit.js.map +1 -1
  979. package/dist/lib/testing/storyboard/junit.mjs +14 -1
  980. package/dist/lib/testing/storyboard/junit.mjs.map +1 -1
  981. package/dist/lib/testing/storyboard/loader.d.ts.map +1 -1
  982. package/dist/lib/testing/storyboard/loader.js +2 -0
  983. package/dist/lib/testing/storyboard/loader.js.map +1 -1
  984. package/dist/lib/testing/storyboard/loader.mjs +2 -0
  985. package/dist/lib/testing/storyboard/loader.mjs.map +1 -1
  986. package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.d.mts +21 -0
  987. package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.d.ts +22 -0
  988. package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.d.ts.map +1 -0
  989. package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.js +668 -0
  990. package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.js.map +1 -0
  991. package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.mjs +638 -0
  992. package/dist/lib/testing/storyboard/oauth-metadata-graph/grader.mjs.map +1 -0
  993. package/dist/lib/testing/storyboard/oauth-metadata-graph/index.d.mts +5 -0
  994. package/dist/lib/testing/storyboard/oauth-metadata-graph/index.d.ts +6 -0
  995. package/dist/lib/testing/storyboard/oauth-metadata-graph/index.d.ts.map +1 -0
  996. package/dist/lib/testing/storyboard/oauth-metadata-graph/index.js +44 -0
  997. package/dist/lib/testing/storyboard/oauth-metadata-graph/index.js.map +1 -0
  998. package/dist/lib/testing/storyboard/oauth-metadata-graph/index.mjs +20 -0
  999. package/dist/lib/testing/storyboard/oauth-metadata-graph/index.mjs.map +1 -0
  1000. package/dist/lib/testing/storyboard/oauth-metadata-graph/types.d.mts +38 -0
  1001. package/dist/lib/testing/storyboard/oauth-metadata-graph/types.d.ts +39 -0
  1002. package/dist/lib/testing/storyboard/oauth-metadata-graph/types.d.ts.map +1 -0
  1003. package/dist/lib/testing/storyboard/oauth-metadata-graph/types.js +17 -0
  1004. package/dist/lib/testing/storyboard/oauth-metadata-graph/types.js.map +1 -0
  1005. package/dist/lib/testing/storyboard/oauth-metadata-graph/types.mjs +1 -0
  1006. package/dist/lib/testing/storyboard/oauth-metadata-graph/types.mjs.map +1 -0
  1007. package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.d.mts +32 -0
  1008. package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.d.ts +33 -0
  1009. package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.d.ts.map +1 -0
  1010. package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.js +105 -0
  1011. package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.js.map +1 -0
  1012. package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.mjs +80 -0
  1013. package/dist/lib/testing/storyboard/oauth-metadata-graph/vector-loader.mjs.map +1 -0
  1014. package/dist/lib/testing/storyboard/probes.d.ts.map +1 -1
  1015. package/dist/lib/testing/storyboard/probes.js +2 -1
  1016. package/dist/lib/testing/storyboard/probes.js.map +1 -1
  1017. package/dist/lib/testing/storyboard/probes.mjs +2 -1
  1018. package/dist/lib/testing/storyboard/probes.mjs.map +1 -1
  1019. package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
  1020. package/dist/lib/testing/storyboard/runner.js +546 -75
  1021. package/dist/lib/testing/storyboard/runner.js.map +1 -1
  1022. package/dist/lib/testing/storyboard/runner.mjs +555 -76
  1023. package/dist/lib/testing/storyboard/runner.mjs.map +1 -1
  1024. package/dist/lib/testing/storyboard/seeding.d.mts +10 -3
  1025. package/dist/lib/testing/storyboard/seeding.d.ts +10 -3
  1026. package/dist/lib/testing/storyboard/seeding.d.ts.map +1 -1
  1027. package/dist/lib/testing/storyboard/seeding.js +552 -2
  1028. package/dist/lib/testing/storyboard/seeding.js.map +1 -1
  1029. package/dist/lib/testing/storyboard/seeding.mjs +557 -2
  1030. package/dist/lib/testing/storyboard/seeding.mjs.map +1 -1
  1031. package/dist/lib/testing/storyboard/task-map.d.ts.map +1 -1
  1032. package/dist/lib/testing/storyboard/task-map.js +16 -2
  1033. package/dist/lib/testing/storyboard/task-map.js.map +1 -1
  1034. package/dist/lib/testing/storyboard/task-map.mjs +16 -2
  1035. package/dist/lib/testing/storyboard/task-map.mjs.map +1 -1
  1036. package/dist/lib/testing/storyboard/trusted-match-context-replay.d.mts +11 -0
  1037. package/dist/lib/testing/storyboard/trusted-match-context-replay.d.ts +12 -0
  1038. package/dist/lib/testing/storyboard/trusted-match-context-replay.d.ts.map +1 -0
  1039. package/dist/lib/testing/storyboard/trusted-match-context-replay.js +340 -0
  1040. package/dist/lib/testing/storyboard/trusted-match-context-replay.js.map +1 -0
  1041. package/dist/lib/testing/storyboard/trusted-match-context-replay.mjs +316 -0
  1042. package/dist/lib/testing/storyboard/trusted-match-context-replay.mjs.map +1 -0
  1043. package/dist/lib/testing/storyboard/types.d.mts +190 -15
  1044. package/dist/lib/testing/storyboard/types.d.ts +190 -15
  1045. package/dist/lib/testing/storyboard/types.d.ts.map +1 -1
  1046. package/dist/lib/testing/storyboard/types.js +3 -0
  1047. package/dist/lib/testing/storyboard/types.js.map +1 -1
  1048. package/dist/lib/testing/storyboard/types.mjs +3 -0
  1049. package/dist/lib/testing/storyboard/types.mjs.map +1 -1
  1050. package/dist/lib/testing/storyboard/validations.d.mts +3 -0
  1051. package/dist/lib/testing/storyboard/validations.d.ts +3 -0
  1052. package/dist/lib/testing/storyboard/validations.d.ts.map +1 -1
  1053. package/dist/lib/testing/storyboard/validations.js +64 -24
  1054. package/dist/lib/testing/storyboard/validations.js.map +1 -1
  1055. package/dist/lib/testing/storyboard/validations.mjs +64 -24
  1056. package/dist/lib/testing/storyboard/validations.mjs.map +1 -1
  1057. package/dist/lib/testing/stubs/governance-agent-stub.d.ts.map +1 -1
  1058. package/dist/lib/testing/stubs/governance-agent-stub.js +4 -1
  1059. package/dist/lib/testing/stubs/governance-agent-stub.js.map +1 -1
  1060. package/dist/lib/testing/stubs/governance-agent-stub.mjs +4 -1
  1061. package/dist/lib/testing/stubs/governance-agent-stub.mjs.map +1 -1
  1062. package/dist/lib/types/core.generated.d.mts +3 -1
  1063. package/dist/lib/types/core.generated.d.ts +3 -1
  1064. package/dist/lib/types/core.generated.d.ts.map +1 -1
  1065. package/dist/lib/types/core.generated.js.map +1 -1
  1066. package/dist/lib/types/inline-enums.generated.d.mts +2 -0
  1067. package/dist/lib/types/inline-enums.generated.d.ts +2 -0
  1068. package/dist/lib/types/inline-enums.generated.d.ts.map +1 -1
  1069. package/dist/lib/types/inline-enums.generated.js +3 -0
  1070. package/dist/lib/types/inline-enums.generated.js.map +1 -1
  1071. package/dist/lib/types/inline-enums.generated.mjs +2 -0
  1072. package/dist/lib/types/inline-enums.generated.mjs.map +1 -1
  1073. package/dist/lib/types/manifest.generated.d.mts +3 -3
  1074. package/dist/lib/types/manifest.generated.d.ts +3 -3
  1075. package/dist/lib/types/manifest.generated.js.map +1 -1
  1076. package/dist/lib/types/manifest.generated.mjs.map +1 -1
  1077. package/dist/lib/types/per-tool-index.json +1 -1
  1078. package/dist/lib/types/server-payload-aliases.d.mts +8 -2
  1079. package/dist/lib/types/server-payload-aliases.d.ts +8 -2
  1080. package/dist/lib/types/server-payload-aliases.d.ts.map +1 -1
  1081. package/dist/lib/types/server-payload-aliases.js.map +1 -1
  1082. package/dist/lib/upstream-recorder/recorder.d.mts +7 -18
  1083. package/dist/lib/upstream-recorder/recorder.d.ts +7 -18
  1084. package/dist/lib/upstream-recorder/recorder.d.ts.map +1 -1
  1085. package/dist/lib/upstream-recorder/recorder.js +17 -10
  1086. package/dist/lib/upstream-recorder/recorder.js.map +1 -1
  1087. package/dist/lib/upstream-recorder/recorder.mjs +12 -5
  1088. package/dist/lib/upstream-recorder/recorder.mjs.map +1 -1
  1089. package/dist/lib/utils/redact-secrets.d.ts.map +1 -1
  1090. package/dist/lib/utils/redact-secrets.js +7 -1
  1091. package/dist/lib/utils/redact-secrets.js.map +1 -1
  1092. package/dist/lib/utils/redact-secrets.mjs +7 -1
  1093. package/dist/lib/utils/redact-secrets.mjs.map +1 -1
  1094. package/dist/lib/validation/schema-loader.d.mts +16 -0
  1095. package/dist/lib/validation/schema-loader.d.ts +16 -0
  1096. package/dist/lib/validation/schema-loader.d.ts.map +1 -1
  1097. package/dist/lib/validation/schema-loader.js +116 -0
  1098. package/dist/lib/validation/schema-loader.js.map +1 -1
  1099. package/dist/lib/validation/schema-loader.mjs +115 -0
  1100. package/dist/lib/validation/schema-loader.mjs.map +1 -1
  1101. package/dist/lib/version.d.mts +7 -7
  1102. package/dist/lib/version.d.ts +7 -7
  1103. package/dist/lib/version.d.ts.map +1 -1
  1104. package/dist/lib/version.js +7 -6
  1105. package/dist/lib/version.js.map +1 -1
  1106. package/dist/lib/version.mjs +7 -6
  1107. package/dist/lib/version.mjs.map +1 -1
  1108. package/docs/guides/BUILD-AN-AGENT.md +4 -2
  1109. package/docs/llms.txt +4 -4
  1110. package/package.json +3 -3
  1111. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/brand/index.yaml +0 -0
  1112. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/brand/scenarios/distributed_brand_resolution.yaml +0 -0
  1113. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/brand/scenarios/single_side_trust_extension.yaml +0 -0
  1114. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/creative/index.yaml +0 -0
  1115. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/creative/scenarios/billing_out_of_band.yaml +0 -0
  1116. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/creative/scenarios/canonical_supported_formats.yaml +0 -0
  1117. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -0
  1118. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/creative/scenarios/evaluator_auth.yaml +0 -0
  1119. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/creative/scenarios/native_in_feed.yaml +0 -0
  1120. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/governance/index.yaml +0 -0
  1121. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/index.yaml +0 -0
  1122. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/audience_buy_flow.yaml +0 -0
  1123. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/available_actions.yaml +0 -0
  1124. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/billing_finality_delivery.yaml +0 -0
  1125. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/canonical_formats.yaml +0 -0
  1126. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/clicks_buy_flow.yaml +0 -0
  1127. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/completed_views_buy_flow.yaml +0 -0
  1128. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -0
  1129. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/creative_reception.yaml +0 -0
  1130. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/delivery_reporting.yaml +0 -0
  1131. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/dependency_impairment.yaml +0 -0
  1132. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/dependency_impairment_audience.yaml +0 -0
  1133. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -0
  1134. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/event_dedup_flow.yaml +0 -0
  1135. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -0
  1136. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/get_products_async.yaml +0 -0
  1137. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/governance_approved.yaml +0 -0
  1138. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/governance_conditions.yaml +0 -0
  1139. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/governance_denied.yaml +0 -0
  1140. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
  1141. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/inline_creatives_without_sync.yaml +0 -0
  1142. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/invalid_transitions.yaml +0 -0
  1143. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
  1144. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
  1145. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/measurement_accountability.yaml +0 -0
  1146. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
  1147. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/package_correlation_legacy_fallback.yaml +0 -0
  1148. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
  1149. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -0
  1150. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/performance_buy_flow.yaml +0 -0
  1151. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -0
  1152. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/pricing_currency_filter.yaml +0 -0
  1153. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/product_signal_targeting.yaml +0 -0
  1154. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/proposal_finalize.yaml +0 -0
  1155. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -0
  1156. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/proposal_not_found_errors.yaml +0 -0
  1157. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/provenance_audit_observation.yaml +0 -0
  1158. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/provenance_enforcement.yaml +0 -0
  1159. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -0
  1160. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/reach_buy_flow.yaml +0 -0
  1161. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -0
  1162. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/refine_products.yaml +0 -0
  1163. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/vendor_metric_accountability.yaml +0 -0
  1164. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -0
  1165. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -0
  1166. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/media-buy/state-machine.yaml +0 -0
  1167. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/signals/index.yaml +0 -0
  1168. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/signals/scenarios/get_signals_async.yaml +0 -0
  1169. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/sponsored-intelligence/index.yaml +0 -0
  1170. /package/compliance/cache/{3.1.10 → 3.1.11}/domains/sponsored-intelligence/sponsored-context-accountability.yaml +0 -0
  1171. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/brand/index.yaml +0 -0
  1172. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/brand/scenarios/distributed_brand_resolution.yaml +0 -0
  1173. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/brand/scenarios/single_side_trust_extension.yaml +0 -0
  1174. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/creative/index.yaml +0 -0
  1175. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/creative/scenarios/billing_out_of_band.yaml +0 -0
  1176. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/creative/scenarios/canonical_supported_formats.yaml +0 -0
  1177. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -0
  1178. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/creative/scenarios/evaluator_auth.yaml +0 -0
  1179. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/creative/scenarios/native_in_feed.yaml +0 -0
  1180. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/governance/index.yaml +0 -0
  1181. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/index.yaml +0 -0
  1182. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/audience_buy_flow.yaml +0 -0
  1183. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/available_actions.yaml +0 -0
  1184. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/billing_finality_delivery.yaml +0 -0
  1185. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/canonical_formats.yaml +0 -0
  1186. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/clicks_buy_flow.yaml +0 -0
  1187. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/completed_views_buy_flow.yaml +0 -0
  1188. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -0
  1189. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/creative_reception.yaml +0 -0
  1190. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -0
  1191. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/dependency_impairment.yaml +0 -0
  1192. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/dependency_impairment_audience.yaml +0 -0
  1193. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -0
  1194. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/event_dedup_flow.yaml +0 -0
  1195. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -0
  1196. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/get_products_async.yaml +0 -0
  1197. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/governance_approved.yaml +0 -0
  1198. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/governance_conditions.yaml +0 -0
  1199. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/governance_denied.yaml +0 -0
  1200. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
  1201. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/inline_creatives_without_sync.yaml +0 -0
  1202. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -0
  1203. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
  1204. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
  1205. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/measurement_accountability.yaml +0 -0
  1206. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
  1207. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/package_correlation_legacy_fallback.yaml +0 -0
  1208. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
  1209. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -0
  1210. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/performance_buy_flow.yaml +0 -0
  1211. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -0
  1212. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/pricing_currency_filter.yaml +0 -0
  1213. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/product_signal_targeting.yaml +0 -0
  1214. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -0
  1215. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -0
  1216. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/proposal_not_found_errors.yaml +0 -0
  1217. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/provenance_audit_observation.yaml +0 -0
  1218. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/provenance_enforcement.yaml +0 -0
  1219. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -0
  1220. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/reach_buy_flow.yaml +0 -0
  1221. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -0
  1222. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/refine_products.yaml +0 -0
  1223. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/vendor_metric_accountability.yaml +0 -0
  1224. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -0
  1225. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -0
  1226. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/media-buy/state-machine.yaml +0 -0
  1227. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/signals/index.yaml +0 -0
  1228. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/signals/scenarios/get_signals_async.yaml +0 -0
  1229. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/sponsored-intelligence/index.yaml +0 -0
  1230. /package/compliance/cache/{3.1.10 → 3.1.11}/protocols/sponsored-intelligence/sponsored-context-accountability.yaml +0 -0
  1231. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/audience-sync/index.yaml +0 -0
  1232. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/brand-rights/index.yaml +0 -0
  1233. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -0
  1234. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/collection-lists/index.yaml +0 -0
  1235. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/content-standards/index.yaml +0 -0
  1236. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/creative-ad-server/index.yaml +0 -0
  1237. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/creative-generative/generative-seller.yaml +0 -0
  1238. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/creative-generative/index.yaml +0 -0
  1239. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/creative-template/index.yaml +0 -0
  1240. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/creative-transformers/index.yaml +0 -0
  1241. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/governance-aware-seller/index.yaml +0 -0
  1242. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/governance-aware-seller/scenarios/governance_multi_agent_rejected.yaml +0 -0
  1243. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/governance-delivery-monitor/index.yaml +0 -0
  1244. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/governance-spend-authority/denied.yaml +0 -0
  1245. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/governance-spend-authority/index.yaml +0 -0
  1246. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/property-lists/index.yaml +0 -0
  1247. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/sales-broadcast-tv/index.yaml +0 -0
  1248. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/sales-catalog-driven/index.yaml +0 -0
  1249. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/sales-guaranteed/index.yaml +0 -0
  1250. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/sales-non-guaranteed/index.yaml +0 -0
  1251. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/sales-proposal-mode/index.yaml +0 -0
  1252. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/sales-social/index.yaml +0 -0
  1253. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/signal-marketplace/index.yaml +0 -0
  1254. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -0
  1255. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/signal-owned/index.yaml +0 -0
  1256. /package/compliance/cache/{3.1.10 → 3.1.11}/specialisms/sponsored-intelligence/index.yaml +0 -0
  1257. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/acme-outdoor-live.yaml +0 -0
  1258. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/acme-outdoor.yaml +0 -0
  1259. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/billing-gate-runner.yaml +0 -0
  1260. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/bistro-oranje.yaml +0 -0
  1261. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/distributed-brand-runner.yaml +0 -0
  1262. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/nova-motors.yaml +0 -0
  1263. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/osei-natural.yaml +0 -0
  1264. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/parallel-dispatch-runner.yaml +0 -0
  1265. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/rate-limit-trip-runner.yaml +0 -0
  1266. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/signed-requests-runner.yaml +0 -0
  1267. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/single-side-trust-runner.yaml +0 -0
  1268. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/substitution-observer-runner.yaml +0 -0
  1269. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/summit-foods.yaml +0 -0
  1270. /package/compliance/cache/{3.1.10 → 3.1.11}/test-kits/webhook-receiver-runner.yaml +0 -0
  1271. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/catalog-macro-substitution.json +0 -0
  1272. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/001-minimal-plan.json +0 -0
  1273. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/002-full-plan.json +0 -0
  1274. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -0
  1275. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/004a-human-review-omitted.json +0 -0
  1276. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -0
  1277. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -0
  1278. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -0
  1279. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -0
  1280. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -0
  1281. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/007-unicode-objectives.json +0 -0
  1282. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -0
  1283. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/README.md +0 -0
  1284. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/canonicalization.json +0 -0
  1285. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/keys.json +0 -0
  1286. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/001-no-signature-header.json +0 -0
  1287. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/002-wrong-tag.json +0 -0
  1288. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/003-expired-signature.json +0 -0
  1289. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/004-window-too-long.json +0 -0
  1290. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -0
  1291. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -0
  1292. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -0
  1293. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -0
  1294. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -0
  1295. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -0
  1296. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/011-malformed-header.json +0 -0
  1297. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -0
  1298. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/013-expires-le-created.json +0 -0
  1299. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -0
  1300. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/015-signature-invalid.json +0 -0
  1301. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -0
  1302. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/017-key-revoked.json +0 -0
  1303. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -0
  1304. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -0
  1305. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/020-rate-abuse.json +0 -0
  1306. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -0
  1307. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -0
  1308. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -0
  1309. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -0
  1310. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -0
  1311. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -0
  1312. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -0
  1313. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/negative/028-unsigned-protocol-method-required.json +0 -0
  1314. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/001-basic-post.json +0 -0
  1315. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -0
  1316. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/003-es256-post.json +0 -0
  1317. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -0
  1318. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -0
  1319. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -0
  1320. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -0
  1321. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -0
  1322. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -0
  1323. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -0
  1324. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -0
  1325. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +0 -0
  1326. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-receiver-envelope.json +0 -0
  1327. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/README.md +0 -0
  1328. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/keys.json +0 -0
  1329. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -0
  1330. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -0
  1331. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -0
  1332. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -0
  1333. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -0
  1334. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -0
  1335. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -0
  1336. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -0
  1337. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -0
  1338. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -0
  1339. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -0
  1340. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -0
  1341. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -0
  1342. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -0
  1343. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -0
  1344. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -0
  1345. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -0
  1346. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -0
  1347. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -0
  1348. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -0
  1349. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -0
  1350. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/001-basic-post.json +0 -0
  1351. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/002-es256-post.json +0 -0
  1352. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -0
  1353. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -0
  1354. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -0
  1355. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -0
  1356. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -0
  1357. /package/compliance/cache/{3.1.10 → 3.1.11}/test-vectors/webhook-signing/positive/008-request-signing-key-reuse.json +0 -0
  1358. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/billing-gate-dispatch.yaml +0 -0
  1359. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/canonical-format-validate-input.yaml +0 -0
  1360. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/capability-discovery.yaml +0 -0
  1361. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/collection-lists-pagination-integrity.yaml +0 -0
  1362. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/comply-controller-mode-gate.yaml +0 -0
  1363. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/content-standards-pagination-integrity.yaml +0 -0
  1364. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/deterministic-testing.yaml +0 -0
  1365. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/error-compliance-signals.yaml +0 -0
  1366. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/error-compliance.yaml +0 -0
  1367. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/fictional-entities.yaml +0 -0
  1368. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/get-media-buys-pagination-integrity.yaml +0 -0
  1369. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/get-products-pagination-integrity.yaml +0 -0
  1370. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/get-signals-pagination-integrity.yaml +0 -0
  1371. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/idempotency.yaml +0 -0
  1372. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/notification-config-event-scope.yaml +0 -0
  1373. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/notification-config-lifecycle.yaml +0 -0
  1374. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/notification-config-rejections.yaml +0 -0
  1375. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/pagination-integrity-creative-formats.yaml +0 -0
  1376. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/pagination-integrity-list-accounts.yaml +0 -0
  1377. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/pagination-integrity.yaml +0 -0
  1378. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/property-lists-pagination-integrity.yaml +0 -0
  1379. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/read-tool-idempotency.yaml +0 -0
  1380. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/runner-output-contract.yaml +0 -0
  1381. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/schema-validation-signals.yaml +0 -0
  1382. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/schema-validation.yaml +0 -0
  1383. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/security.yaml +0 -0
  1384. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/signed-requests.yaml +0 -0
  1385. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/stale-response-advisory.yaml +0 -0
  1386. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/v3-envelope-integrity.yaml +0 -0
  1387. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/version-negotiation.yaml +0 -0
  1388. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/webhook-emission.yaml +0 -0
  1389. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/webhook-receiver-envelope.yaml +0 -0
  1390. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/wholesale-feed-bulk-webhooks.yaml +0 -0
  1391. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/wholesale-feed-product-webhooks.yaml +0 -0
  1392. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/wholesale-feed-products.yaml +0 -0
  1393. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/wholesale-feed-signal-webhooks.yaml +0 -0
  1394. /package/compliance/cache/{3.1.10 → 3.1.11}/universal/wholesale-feed-signals.yaml +0 -0
  1395. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/brand/index.yaml +0 -0
  1396. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/brand/scenarios/distributed_brand_resolution.yaml +0 -0
  1397. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/brand/scenarios/single_side_trust_extension.yaml +0 -0
  1398. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/creative/index.yaml +0 -0
  1399. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/creative/scenarios/billing_out_of_band.yaml +0 -0
  1400. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/creative/scenarios/canonical_supported_formats.yaml +0 -0
  1401. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -0
  1402. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/creative/scenarios/evaluator_auth.yaml +0 -0
  1403. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/creative/scenarios/native_in_feed.yaml +0 -0
  1404. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/governance/index.yaml +0 -0
  1405. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/index.yaml +0 -0
  1406. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/audience_buy_flow.yaml +0 -0
  1407. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/available_actions.yaml +0 -0
  1408. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/billing_finality_delivery.yaml +0 -0
  1409. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/canonical_formats.yaml +0 -0
  1410. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/clicks_buy_flow.yaml +0 -0
  1411. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/completed_views_buy_flow.yaml +0 -0
  1412. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -0
  1413. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/creative_reception.yaml +0 -0
  1414. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/delivery_reporting.yaml +0 -0
  1415. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/dependency_impairment.yaml +0 -0
  1416. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/dependency_impairment_audience.yaml +0 -0
  1417. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -0
  1418. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/event_dedup_flow.yaml +0 -0
  1419. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -0
  1420. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/get_products_async.yaml +0 -0
  1421. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/governance_approved.yaml +0 -0
  1422. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/governance_conditions.yaml +0 -0
  1423. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/governance_denied.yaml +0 -0
  1424. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
  1425. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/inline_creatives_without_sync.yaml +0 -0
  1426. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/invalid_transitions.yaml +0 -0
  1427. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
  1428. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
  1429. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/measurement_accountability.yaml +0 -0
  1430. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
  1431. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/package_correlation_legacy_fallback.yaml +0 -0
  1432. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
  1433. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -0
  1434. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/performance_buy_flow.yaml +0 -0
  1435. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -0
  1436. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/pricing_currency_filter.yaml +0 -0
  1437. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/product_signal_targeting.yaml +0 -0
  1438. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/proposal_finalize.yaml +0 -0
  1439. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -0
  1440. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/proposal_not_found_errors.yaml +0 -0
  1441. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/provenance_audit_observation.yaml +0 -0
  1442. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/provenance_enforcement.yaml +0 -0
  1443. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -0
  1444. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/reach_buy_flow.yaml +0 -0
  1445. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -0
  1446. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/refine_products.yaml +0 -0
  1447. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/vendor_metric_accountability.yaml +0 -0
  1448. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -0
  1449. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -0
  1450. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/media-buy/state-machine.yaml +0 -0
  1451. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/signals/index.yaml +0 -0
  1452. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/signals/scenarios/get_signals_async.yaml +0 -0
  1453. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/sponsored-intelligence/index.yaml +0 -0
  1454. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/domains/sponsored-intelligence/sponsored-context-accountability.yaml +0 -0
  1455. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/brand/index.yaml +0 -0
  1456. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/brand/scenarios/distributed_brand_resolution.yaml +0 -0
  1457. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/brand/scenarios/single_side_trust_extension.yaml +0 -0
  1458. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/creative/index.yaml +0 -0
  1459. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/creative/scenarios/billing_out_of_band.yaml +0 -0
  1460. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/creative/scenarios/canonical_supported_formats.yaml +0 -0
  1461. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -0
  1462. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/creative/scenarios/evaluator_auth.yaml +0 -0
  1463. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/creative/scenarios/native_in_feed.yaml +0 -0
  1464. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/governance/index.yaml +0 -0
  1465. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/index.yaml +0 -0
  1466. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/audience_buy_flow.yaml +0 -0
  1467. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/available_actions.yaml +0 -0
  1468. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/billing_finality_delivery.yaml +0 -0
  1469. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/canonical_formats.yaml +0 -0
  1470. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/clicks_buy_flow.yaml +0 -0
  1471. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/completed_views_buy_flow.yaml +0 -0
  1472. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -0
  1473. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/creative_reception.yaml +0 -0
  1474. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -0
  1475. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/dependency_impairment.yaml +0 -0
  1476. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/dependency_impairment_audience.yaml +0 -0
  1477. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -0
  1478. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/event_dedup_flow.yaml +0 -0
  1479. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -0
  1480. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/get_products_async.yaml +0 -0
  1481. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/governance_approved.yaml +0 -0
  1482. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/governance_conditions.yaml +0 -0
  1483. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/governance_denied.yaml +0 -0
  1484. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
  1485. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/inline_creatives_without_sync.yaml +0 -0
  1486. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -0
  1487. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
  1488. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
  1489. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/measurement_accountability.yaml +0 -0
  1490. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
  1491. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/package_correlation_legacy_fallback.yaml +0 -0
  1492. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
  1493. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -0
  1494. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/performance_buy_flow.yaml +0 -0
  1495. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -0
  1496. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/pricing_currency_filter.yaml +0 -0
  1497. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/product_signal_targeting.yaml +0 -0
  1498. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -0
  1499. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -0
  1500. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/proposal_not_found_errors.yaml +0 -0
  1501. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/provenance_audit_observation.yaml +0 -0
  1502. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/provenance_enforcement.yaml +0 -0
  1503. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -0
  1504. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/reach_buy_flow.yaml +0 -0
  1505. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -0
  1506. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/refine_products.yaml +0 -0
  1507. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/vendor_metric_accountability.yaml +0 -0
  1508. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -0
  1509. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -0
  1510. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/media-buy/state-machine.yaml +0 -0
  1511. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/signals/index.yaml +0 -0
  1512. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/signals/scenarios/get_signals_async.yaml +0 -0
  1513. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/sponsored-intelligence/index.yaml +0 -0
  1514. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/protocols/sponsored-intelligence/sponsored-context-accountability.yaml +0 -0
  1515. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/audience-sync/index.yaml +0 -0
  1516. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/brand-rights/index.yaml +0 -0
  1517. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -0
  1518. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/collection-lists/index.yaml +0 -0
  1519. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/content-standards/index.yaml +0 -0
  1520. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/creative-ad-server/index.yaml +0 -0
  1521. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/creative-generative/generative-seller.yaml +0 -0
  1522. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/creative-generative/index.yaml +0 -0
  1523. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/creative-template/index.yaml +0 -0
  1524. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/creative-transformers/index.yaml +0 -0
  1525. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/governance-aware-seller/index.yaml +0 -0
  1526. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/governance-aware-seller/scenarios/governance_multi_agent_rejected.yaml +0 -0
  1527. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/governance-delivery-monitor/index.yaml +0 -0
  1528. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/governance-spend-authority/denied.yaml +0 -0
  1529. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/governance-spend-authority/index.yaml +0 -0
  1530. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/property-lists/index.yaml +0 -0
  1531. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/sales-broadcast-tv/index.yaml +0 -0
  1532. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/sales-catalog-driven/index.yaml +0 -0
  1533. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/sales-guaranteed/index.yaml +0 -0
  1534. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/sales-non-guaranteed/index.yaml +0 -0
  1535. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/sales-proposal-mode/index.yaml +0 -0
  1536. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/sales-social/index.yaml +0 -0
  1537. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/signal-marketplace/index.yaml +0 -0
  1538. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -0
  1539. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/signal-owned/index.yaml +0 -0
  1540. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/specialisms/sponsored-intelligence/index.yaml +0 -0
  1541. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/acme-outdoor-live.yaml +0 -0
  1542. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/acme-outdoor.yaml +0 -0
  1543. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/billing-gate-runner.yaml +0 -0
  1544. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/bistro-oranje.yaml +0 -0
  1545. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/distributed-brand-runner.yaml +0 -0
  1546. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/nova-motors.yaml +0 -0
  1547. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/osei-natural.yaml +0 -0
  1548. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/parallel-dispatch-runner.yaml +0 -0
  1549. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/rate-limit-trip-runner.yaml +0 -0
  1550. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/signed-requests-runner.yaml +0 -0
  1551. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/single-side-trust-runner.yaml +0 -0
  1552. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/substitution-observer-runner.yaml +0 -0
  1553. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/summit-foods.yaml +0 -0
  1554. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-kits/webhook-receiver-runner.yaml +0 -0
  1555. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/catalog-macro-substitution.json +0 -0
  1556. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/001-minimal-plan.json +0 -0
  1557. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/002-full-plan.json +0 -0
  1558. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -0
  1559. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/004a-human-review-omitted.json +0 -0
  1560. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -0
  1561. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -0
  1562. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -0
  1563. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -0
  1564. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -0
  1565. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/007-unicode-objectives.json +0 -0
  1566. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -0
  1567. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/README.md +0 -0
  1568. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/canonicalization.json +0 -0
  1569. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/keys.json +0 -0
  1570. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/001-no-signature-header.json +0 -0
  1571. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/002-wrong-tag.json +0 -0
  1572. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/003-expired-signature.json +0 -0
  1573. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/004-window-too-long.json +0 -0
  1574. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -0
  1575. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -0
  1576. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -0
  1577. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -0
  1578. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -0
  1579. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -0
  1580. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/011-malformed-header.json +0 -0
  1581. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -0
  1582. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/013-expires-le-created.json +0 -0
  1583. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -0
  1584. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/015-signature-invalid.json +0 -0
  1585. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -0
  1586. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/017-key-revoked.json +0 -0
  1587. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -0
  1588. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -0
  1589. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/020-rate-abuse.json +0 -0
  1590. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -0
  1591. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -0
  1592. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -0
  1593. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -0
  1594. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -0
  1595. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -0
  1596. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -0
  1597. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/negative/028-unsigned-protocol-method-required.json +0 -0
  1598. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/001-basic-post.json +0 -0
  1599. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -0
  1600. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/003-es256-post.json +0 -0
  1601. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -0
  1602. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -0
  1603. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -0
  1604. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -0
  1605. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -0
  1606. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -0
  1607. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -0
  1608. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -0
  1609. /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
  1610. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-receiver-envelope.json +0 -0
  1611. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/README.md +0 -0
  1612. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/keys.json +0 -0
  1613. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -0
  1614. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -0
  1615. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -0
  1616. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -0
  1617. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -0
  1618. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -0
  1619. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -0
  1620. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -0
  1621. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -0
  1622. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -0
  1623. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -0
  1624. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -0
  1625. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -0
  1626. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -0
  1627. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -0
  1628. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -0
  1629. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -0
  1630. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -0
  1631. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -0
  1632. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -0
  1633. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -0
  1634. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/001-basic-post.json +0 -0
  1635. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/002-es256-post.json +0 -0
  1636. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -0
  1637. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -0
  1638. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -0
  1639. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -0
  1640. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -0
  1641. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/008-request-signing-key-reuse.json +0 -0
  1642. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/billing-gate-dispatch.yaml +0 -0
  1643. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/canonical-format-validate-input.yaml +0 -0
  1644. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/capability-discovery.yaml +0 -0
  1645. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/collection-lists-pagination-integrity.yaml +0 -0
  1646. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/comply-controller-mode-gate.yaml +0 -0
  1647. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/content-standards-pagination-integrity.yaml +0 -0
  1648. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/deterministic-testing.yaml +0 -0
  1649. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/error-compliance-signals.yaml +0 -0
  1650. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/error-compliance.yaml +0 -0
  1651. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/fictional-entities.yaml +0 -0
  1652. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/get-media-buys-pagination-integrity.yaml +0 -0
  1653. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/get-products-pagination-integrity.yaml +0 -0
  1654. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/get-signals-pagination-integrity.yaml +0 -0
  1655. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/idempotency.yaml +0 -0
  1656. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/notification-config-event-scope.yaml +0 -0
  1657. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/notification-config-lifecycle.yaml +0 -0
  1658. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/notification-config-rejections.yaml +0 -0
  1659. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/pagination-integrity-creative-formats.yaml +0 -0
  1660. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/pagination-integrity-list-accounts.yaml +0 -0
  1661. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/pagination-integrity.yaml +0 -0
  1662. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/property-lists-pagination-integrity.yaml +0 -0
  1663. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/read-tool-idempotency.yaml +0 -0
  1664. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/runner-output-contract.yaml +0 -0
  1665. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/schema-validation-signals.yaml +0 -0
  1666. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/schema-validation.yaml +0 -0
  1667. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/security.yaml +0 -0
  1668. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/signed-requests.yaml +0 -0
  1669. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/stale-response-advisory.yaml +0 -0
  1670. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/v3-envelope-integrity.yaml +0 -0
  1671. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/version-negotiation.yaml +0 -0
  1672. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/webhook-emission.yaml +0 -0
  1673. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/webhook-receiver-envelope.yaml +0 -0
  1674. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/wholesale-feed-bulk-webhooks.yaml +0 -0
  1675. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/wholesale-feed-product-webhooks.yaml +0 -0
  1676. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/wholesale-feed-products.yaml +0 -0
  1677. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/wholesale-feed-signal-webhooks.yaml +0 -0
  1678. /package/compliance/cache/{3.1.10.previous → 3.1.11.previous}/universal/wholesale-feed-signals.yaml +0 -0
@@ -2,6 +2,7 @@ import { fromMCPTokens } from "./types.mjs";
2
2
  import { resolveSecret } from "./secret-resolver.mjs";
3
3
  import { isLikelyPrivateUrl } from "../../net/index.mjs";
4
4
  import { wrapFetchWithSizeLimit } from "../../protocols/responseSizeLimit.mjs";
5
+ import { createAbortError, throwIfAborted, withAbortSignal } from "../../protocols/abort.mjs";
5
6
  const MAX_AS_ERROR_LENGTH = 200;
6
7
  class ClientCredentialsExchangeError extends Error {
7
8
  constructor(message, kind, oauthError, oauthErrorDescription, httpStatus) {
@@ -56,6 +57,7 @@ function validateTokenEndpoint(tokenEndpoint, options = {}) {
56
57
  return url;
57
58
  }
58
59
  async function exchangeClientCredentials(credentials, options = {}) {
60
+ throwIfAborted(options.signal);
59
61
  const fetchImpl = wrapFetchWithSizeLimit(options.fetch ?? fetch);
60
62
  const timeoutMs = options.timeoutMs ?? 3e4;
61
63
  validateTokenEndpoint(credentials.token_endpoint, { allowPrivateIp: options.allowPrivateIp });
@@ -87,18 +89,30 @@ async function exchangeClientCredentials(credentials, options = {}) {
87
89
  body.set("client_id", clientId);
88
90
  body.set("client_secret", clientSecret);
89
91
  }
90
- const controller = new AbortController();
91
- const timeout = setTimeout(() => controller.abort(), timeoutMs);
92
92
  let response;
93
+ let bodyText;
94
+ const timeoutError = new Error(`Client credentials exchange timed out after ${timeoutMs}ms`);
95
+ timeoutError.name = "TimeoutError";
93
96
  try {
94
- response = await fetchImpl(credentials.token_endpoint, {
95
- method: "POST",
96
- headers,
97
- body: body.toString(),
98
- signal: controller.signal
99
- });
97
+ ({ response, bodyText } = await withAbortSignal(
98
+ [options.signal],
99
+ timeoutMs,
100
+ async (signal) => {
101
+ const tokenResponse = await fetchImpl(credentials.token_endpoint, {
102
+ method: "POST",
103
+ headers,
104
+ body: body.toString(),
105
+ signal
106
+ });
107
+ return { response: tokenResponse, bodyText: await tokenResponse.text() };
108
+ },
109
+ { timeoutError }
110
+ ));
100
111
  } catch (err) {
101
- if (err.name === "AbortError") {
112
+ if (options.signal?.aborted) {
113
+ throw createAbortError(options.signal.reason);
114
+ }
115
+ if (err === timeoutError) {
102
116
  throw new ClientCredentialsExchangeError(
103
117
  `Token endpoint ${credentials.token_endpoint} did not respond within ${timeoutMs}ms.`,
104
118
  "network"
@@ -108,10 +122,7 @@ async function exchangeClientCredentials(credentials, options = {}) {
108
122
  `Failed to reach token endpoint ${credentials.token_endpoint}: ${err.message}`,
109
123
  "network"
110
124
  );
111
- } finally {
112
- clearTimeout(timeout);
113
125
  }
114
- const bodyText = await response.text();
115
126
  let parsed;
116
127
  try {
117
128
  parsed = bodyText ? JSON.parse(bodyText) : void 0;
@@ -137,11 +148,28 @@ async function exchangeClientCredentials(credentials, options = {}) {
137
148
  }
138
149
  return fromMCPTokens(parsed);
139
150
  }
140
- const inFlightRefresh = /* @__PURE__ */ new Map();
141
- function coalesceKeyFor(agent, credentials, force) {
142
- return `${force ? "force" : "normal"}\0${agent.id}\0${credentials.token_endpoint}\0${credentials.client_id}`;
151
+ const inFlightRefresh = /* @__PURE__ */ new WeakMap();
152
+ async function waitForRefresh(entry, signal) {
153
+ if (signal?.aborted) throw createAbortError(signal.reason);
154
+ entry.waiters += 1;
155
+ let abortListener;
156
+ try {
157
+ if (!signal) return await entry.promise;
158
+ const aborted = new Promise((_resolve, reject) => {
159
+ abortListener = () => reject(createAbortError(signal.reason));
160
+ signal.addEventListener("abort", abortListener, { once: true });
161
+ });
162
+ return await Promise.race([entry.promise, aborted]);
163
+ } finally {
164
+ if (abortListener && signal) signal.removeEventListener("abort", abortListener);
165
+ entry.waiters -= 1;
166
+ if (entry.waiters === 0 && !entry.settled && !entry.controller.signal.aborted) {
167
+ entry.controller.abort(createAbortError(signal?.reason ?? "No callers remain for token refresh"));
168
+ }
169
+ }
143
170
  }
144
171
  async function ensureClientCredentialsTokens(agent, options = {}) {
172
+ throwIfAborted(options.signal);
145
173
  if (!agent.oauth_client_credentials) {
146
174
  throw new Error(
147
175
  `ensureClientCredentialsTokens called for agent '${agent.id}' with no oauth_client_credentials configured.`
@@ -153,19 +181,32 @@ async function ensureClientCredentialsTokens(agent, options = {}) {
153
181
  if (cachedIsValid) {
154
182
  return cached;
155
183
  }
156
- const coalesceKey = coalesceKeyFor(agent, agent.oauth_client_credentials, options.force === true);
157
- const existing = inFlightRefresh.get(coalesceKey);
158
- if (existing) {
159
- const tokens = await existing;
184
+ const refreshMode = options.force ? "force" : "normal";
185
+ let agentRefreshes = inFlightRefresh.get(agent);
186
+ const existing = agentRefreshes?.get(refreshMode);
187
+ if (existing && !existing.controller.signal.aborted) {
188
+ const tokens = await waitForRefresh(existing, options.signal);
160
189
  agent.oauth_tokens = tokens;
161
190
  return tokens;
162
191
  }
163
- const exchange = (async () => {
192
+ const controller = new AbortController();
193
+ const entry = {
194
+ promise: void 0,
195
+ controller,
196
+ waiters: 0,
197
+ settled: false
198
+ };
199
+ if (!agentRefreshes) {
200
+ agentRefreshes = /* @__PURE__ */ new Map();
201
+ inFlightRefresh.set(agent, agentRefreshes);
202
+ }
203
+ entry.promise = (async () => {
164
204
  try {
165
205
  const tokens = await exchangeClientCredentials(agent.oauth_client_credentials, {
166
206
  fetch: options.fetch,
167
207
  timeoutMs: options.timeoutMs,
168
- allowPrivateIp: options.allowPrivateIp
208
+ allowPrivateIp: options.allowPrivateIp,
209
+ signal: controller.signal
169
210
  });
170
211
  agent.oauth_tokens = tokens;
171
212
  if (options.storage) {
@@ -173,11 +214,15 @@ async function ensureClientCredentialsTokens(agent, options = {}) {
173
214
  }
174
215
  return tokens;
175
216
  } finally {
176
- inFlightRefresh.delete(coalesceKey);
217
+ entry.settled = true;
218
+ if (agentRefreshes?.get(refreshMode) === entry) {
219
+ agentRefreshes.delete(refreshMode);
220
+ if (agentRefreshes.size === 0) inFlightRefresh.delete(agent);
221
+ }
177
222
  }
178
223
  })();
179
- inFlightRefresh.set(coalesceKey, exchange);
180
- return exchange;
224
+ agentRefreshes.set(refreshMode, entry);
225
+ return waitForRefresh(entry, options.signal);
181
226
  }
182
227
  export {
183
228
  ClientCredentialsExchangeError,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/auth/oauth/ClientCredentialsFlow.ts"],"sourcesContent":["/**\n * OAuth 2.0 client credentials grant — RFC 6749 §4.4.\n *\n * For machine-to-machine use cases (CI compliance runs, automated checks)\n * where there is no user to walk through an authorization-code flow. The\n * client POSTs its ID + secret to the authorization server's token endpoint\n * and gets back an access token directly.\n *\n * This file provides:\n * - {@link exchangeClientCredentials}: one-shot token exchange. Use for the\n * initial fetch during `--save-auth` and for forced refresh.\n * - {@link ensureClientCredentialsTokens}: reads the cached tokens on an\n * `AgentConfig`, checks expiry, re-exchanges if needed, and persists the\n * refreshed tokens via an optional {@link OAuthConfigStorage}.\n *\n * Why a dedicated module instead of the MCP SDK's `OAuthClientProvider`:\n * client credentials doesn't need discovery, dynamic client registration,\n * PKCE, or authorization code exchange — all the plumbing that provider\n * exists to coordinate. A direct token POST and a cached-token check is the\n * entire protocol. The call path keeps using the plain `Authorization:\n * Bearer` header path — the same path it already uses for `auth_token`.\n *\n * **Security note (library consumers):** `token_endpoint` is passed to\n * `fetch` directly. Callers that accept untrusted `AgentConfig` values\n * from network requests (e.g. a hosted compliance service accepting\n * user-supplied configs) MUST validate the URL against an allowlist or\n * SSRF-block private IPs before invoking these helpers. The CLI and\n * operator-driven flows are already trusted.\n */\n\nimport { fromMCPTokens, type OAuthTokens, type AgentConfig, type AgentOAuthTokens } from './types';\nimport type { AgentOAuthClientCredentials } from '../../types/adcp';\nimport type { OAuthConfigStorage } from './types';\nimport { resolveSecret } from './secret-resolver';\nimport { isLikelyPrivateUrl } from '../../net';\nimport { wrapFetchWithSizeLimit } from '../../protocols/responseSizeLimit';\n\n/** Max length we'll echo from an AS-supplied error description into errors. */\nconst MAX_AS_ERROR_LENGTH = 200;\n\n/**\n * Raised when the authorization server rejects a client credentials\n * exchange or the token endpoint is unreachable/malformed.\n *\n * The {@link kind} discriminator lets callers branch without\n * string-matching on the message:\n * - `oauth`: the AS returned a structured OAuth error (RFC 6749 §5.2 —\n * `invalid_client`, `invalid_grant`, `invalid_scope`, …). Read\n * {@link oauthError} / {@link oauthErrorDescription}.\n * - `malformed`: the AS returned HTTP 200 but no `access_token`, or a\n * non-JSON body.\n * - `network`: the exchange never reached the AS (DNS failure, connection\n * refused, timeout, TLS error).\n */\nexport class ClientCredentialsExchangeError extends Error {\n readonly code = 'client_credentials_exchange_failed';\n constructor(\n message: string,\n public readonly kind: 'oauth' | 'malformed' | 'network',\n public readonly oauthError?: string,\n public readonly oauthErrorDescription?: string,\n public readonly httpStatus?: number\n ) {\n super(message);\n this.name = 'ClientCredentialsExchangeError';\n }\n}\n\n/**\n * Options for {@link exchangeClientCredentials}.\n */\nexport interface ExchangeClientCredentialsOptions {\n /**\n * Custom fetch implementation (default: global `fetch`).\n * Primarily a testing hook — lets unit tests stub the authorization server\n * without intercepting the global.\n */\n fetch?: typeof fetch;\n /**\n * Request timeout in milliseconds (default: 30_000). Guards against a\n * silently hung authorization server blocking the caller indefinitely.\n */\n timeoutMs?: number;\n /**\n * Allow `token_endpoint` to resolve to a private / loopback IP address.\n * Default: false (SSRF guard). The CLI opts in because the operator is\n * explicitly configuring the endpoint; hosted consumers accepting\n * user-supplied configs should leave this off.\n */\n allowPrivateIp?: boolean;\n}\n\n/**\n * RFC 6749 §2.3.1 application/x-www-form-urlencoded encoding.\n *\n * Differs from `encodeURIComponent` in two important ways:\n * 1. Spaces are encoded as `+`, not `%20`.\n * 2. The characters `!'()*` are percent-encoded (URI component leaves them\n * alone).\n *\n * A secret containing any of those chars would hash to a different Basic\n * string than the AS computes, producing a spurious `invalid_client`.\n */\nfunction formUrlEncode(value: string): string {\n return encodeURIComponent(value)\n .replace(/%20/g, '+')\n .replace(/!/g, '%21')\n .replace(/'/g, '%27')\n .replace(/\\(/g, '%28')\n .replace(/\\)/g, '%29')\n .replace(/\\*/g, '%2A');\n}\n\n/**\n * Strip control chars (C0, C1, DEL) and truncate.\n *\n * Defensive cleanup on AS-controlled strings we print to a TTY. A\n * malicious or compromised AS could emit ANSI escape sequences or CRLF\n * payloads in `error_description`; we don't want those rewriting terminal\n * titles or forging log lines.\n */\nfunction sanitizeAsMessage(raw: string): string {\n // eslint-disable-next-line no-control-regex\n const stripped = raw.replace(/[\\x00-\\x1F\\x7F-\\x9F]/g, ' ');\n if (stripped.length <= MAX_AS_ERROR_LENGTH) return stripped;\n return stripped.slice(0, MAX_AS_ERROR_LENGTH) + '…';\n}\n\n/**\n * Validate the token endpoint before we hit it. Three checks, in order:\n *\n * 1. Parse as a URL. Unparseable → `malformed`.\n * 2. Reject URLs that carry `user:pass@` userinfo — they'd leak via error\n * messages and log aggregators, and the OAuth client credentials live\n * in `client_id` / `client_secret`, never the URL.\n * 3. Reject plaintext `http://` outside `localhost` / loopback IPs.\n * RFC 6749 §3.1 requires TLS; the loopback carve-out covers local dev\n * authorization servers where plaintext is not a leak risk.\n * 4. Reject private / loopback / link-local IPs unless `allowPrivateIp`.\n * The library default is a SSRF guard; the CLI (operator-driven) opts\n * in because a user pointing at `localhost:8080` is legitimate. Network\n * code behind this call will still do DNS resolution, so this is a\n * best-effort literal-IP / known-loopback check — host allowlisting\n * upstream is the right control for adversarial environments.\n */\nfunction validateTokenEndpoint(tokenEndpoint: string, options: { allowPrivateIp?: boolean } = {}): URL {\n let url: URL;\n try {\n url = new URL(tokenEndpoint);\n } catch {\n throw new ClientCredentialsExchangeError(`Invalid token_endpoint URL: ${tokenEndpoint}`, 'malformed');\n }\n\n if (url.username || url.password) {\n throw new ClientCredentialsExchangeError(\n `token_endpoint must not contain userinfo (user:pass@). Put credentials in client_id / client_secret instead.`,\n 'malformed'\n );\n }\n\n const host = url.hostname;\n const isLoopback = host === 'localhost' || host === '127.0.0.1' || host === '[::1]' || host === '::1';\n\n if (url.protocol !== 'https:' && !(url.protocol === 'http:' && isLoopback)) {\n throw new ClientCredentialsExchangeError(\n `token_endpoint must be HTTPS (got ${url.protocol}//${host}). The client secret would be sent in plaintext over HTTP. Use https:// (or http://localhost for local dev).`,\n 'malformed'\n );\n }\n\n if (!options.allowPrivateIp && isLikelyPrivateUrl(tokenEndpoint)) {\n throw new ClientCredentialsExchangeError(\n `token_endpoint resolves to a private or loopback address (${host}). Pass { allowPrivateIp: true } to exchangeClientCredentials / ensureClientCredentialsTokens if this is intentional (operator-driven CLI or local test setups).`,\n 'malformed'\n );\n }\n\n return url;\n}\n\n/**\n * Exchange client credentials for an access token.\n *\n * Secret values in `credentials.client_id` / `client_secret` may be `$ENV:VAR`\n * references — they are resolved here at exchange time. Missing env vars\n * surface as `MissingEnvSecretError` (from `secret-resolver`), which\n * callers typically print with the variable name for the user to fix.\n *\n * @throws {ClientCredentialsExchangeError} on any non-2xx response, malformed 200, or network failure\n * @throws {MissingEnvSecretError} if a `$ENV:VAR` ref points at an unset var\n */\nexport async function exchangeClientCredentials(\n credentials: AgentOAuthClientCredentials,\n options: ExchangeClientCredentialsOptions = {}\n): Promise<AgentOAuthTokens> {\n // Wrap with the response-size-limit guard so a hostile token endpoint\n // can't buffer-bomb on every refresh. Pass-through when no\n // `withResponseSizeLimit` slot is active. (#1175)\n const fetchImpl = wrapFetchWithSizeLimit(options.fetch ?? fetch);\n const timeoutMs = options.timeoutMs ?? 30_000;\n\n validateTokenEndpoint(credentials.token_endpoint, { allowPrivateIp: options.allowPrivateIp });\n\n const clientId = resolveSecret(credentials.client_id);\n const clientSecret = resolveSecret(credentials.client_secret);\n const authMethod = credentials.auth_method ?? 'basic';\n\n const body = new URLSearchParams();\n body.set('grant_type', 'client_credentials');\n if (credentials.scope) {\n body.set('scope', credentials.scope);\n }\n // RFC 8707 resource indicators — emitted as one `resource` field per URI\n // so the AS receives the full list. URLSearchParams#append is the only\n // way to produce repeated keys in form encoding.\n if (credentials.resource) {\n const resources = Array.isArray(credentials.resource) ? credentials.resource : [credentials.resource];\n for (const r of resources) body.append('resource', r);\n }\n if (credentials.audience) {\n body.set('audience', credentials.audience);\n }\n\n const headers: Record<string, string> = {\n 'content-type': 'application/x-www-form-urlencoded',\n accept: 'application/json',\n };\n\n if (authMethod === 'basic') {\n // RFC 6749 §2.3.1: form-urlencode ID/secret before base64 (NOT URI\n // component encoding — space is `+`, and `!'()*` must be percent-\n // encoded). Most deployed servers accept raw values too, but spec\n // compliance avoids a footgun with secrets containing those chars.\n const encoded = Buffer.from(`${formUrlEncode(clientId)}:${formUrlEncode(clientSecret)}`, 'utf-8').toString(\n 'base64'\n );\n headers.authorization = `Basic ${encoded}`;\n } else {\n body.set('client_id', clientId);\n body.set('client_secret', clientSecret);\n }\n\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), timeoutMs);\n\n let response: Response;\n try {\n response = await fetchImpl(credentials.token_endpoint, {\n method: 'POST',\n headers,\n body: body.toString(),\n signal: controller.signal,\n });\n } catch (err) {\n if ((err as { name?: string }).name === 'AbortError') {\n throw new ClientCredentialsExchangeError(\n `Token endpoint ${credentials.token_endpoint} did not respond within ${timeoutMs}ms.`,\n 'network'\n );\n }\n throw new ClientCredentialsExchangeError(\n `Failed to reach token endpoint ${credentials.token_endpoint}: ${(err as Error).message}`,\n 'network'\n );\n } finally {\n clearTimeout(timeout);\n }\n\n const bodyText = await response.text();\n let parsed: Record<string, unknown> | undefined;\n try {\n parsed = bodyText ? (JSON.parse(bodyText) as Record<string, unknown>) : undefined;\n } catch {\n // Non-JSON response; parsed stays undefined, handled below.\n }\n\n if (!response.ok) {\n const rawOauthError = typeof parsed?.error === 'string' ? parsed.error : undefined;\n const rawOauthDesc = typeof parsed?.error_description === 'string' ? parsed.error_description : undefined;\n const oauthError = rawOauthError ? sanitizeAsMessage(rawOauthError) : undefined;\n const oauthDesc = rawOauthDesc ? sanitizeAsMessage(rawOauthDesc) : undefined;\n const message =\n oauthError || oauthDesc\n ? `Client credentials exchange failed: ${oauthError ?? 'error'}${oauthDesc ? ` — ${oauthDesc}` : ''}`\n : `Client credentials exchange failed with HTTP ${response.status}: ${sanitizeAsMessage(bodyText) || '(empty body)'}`;\n const kind = rawOauthError ? 'oauth' : 'malformed';\n throw new ClientCredentialsExchangeError(message, kind, oauthError, oauthDesc, response.status);\n }\n\n if (!parsed || typeof parsed.access_token !== 'string') {\n throw new ClientCredentialsExchangeError(\n `Token endpoint returned HTTP ${response.status} but no access_token. Body: ${sanitizeAsMessage(bodyText)}`,\n 'malformed',\n undefined,\n undefined,\n response.status\n );\n }\n\n return fromMCPTokens(parsed as unknown as OAuthTokens);\n}\n\n/**\n * Options for {@link ensureClientCredentialsTokens}.\n */\nexport interface EnsureClientCredentialsOptions extends ExchangeClientCredentialsOptions {\n /**\n * Storage backend used to persist refreshed tokens. Optional — if omitted,\n * tokens are only mutated on the in-memory `agent` object and the caller\n * is responsible for persisting.\n */\n storage?: OAuthConfigStorage;\n /**\n * Force a re-exchange even if the cached token looks valid. Useful after a\n * 401 in case the authorization server rotated something out-of-band.\n */\n force?: boolean;\n /**\n * Expiration skew (ms). Treat the token as expired this many milliseconds\n * before its nominal `expires_at` — protects against clock skew and\n * in-flight requests. Default: 60_000 (1 minute). The interactive auth\n * code flow uses 5 minutes; client credentials refresh is cheap (single\n * POST) so the shorter window is fine here.\n */\n expirationSkewMs?: number;\n}\n\n/**\n * In-flight refresh coalescing map. Keyed by the tuple\n * `(agent.id, token_endpoint, client_id)` — concurrent\n * `ensureClientCredentialsTokens` calls for the same credentials share a\n * single token POST instead of each racing to exchange the same secret.\n *\n * Two different `AgentConfig` objects that accidentally reuse the same\n * `id` (e.g. two tenants both creating `cli-agent`) but hold different\n * credentials won't cross-contaminate — the endpoint + client_id in the\n * key keeps them distinct.\n *\n * Cleared on completion regardless of success/failure.\n *\n * Note: this is an in-process map. Multi-process deployments (worker\n * pools, multiple CLI invocations, horizontally scaled Node servers)\n * don't coalesce across workers — each process will do its own refresh.\n * For the CLI this is fine; for high-throughput server deployments,\n * coalesce upstream at the storage layer.\n */\nconst inFlightRefresh = new Map<string, Promise<AgentOAuthTokens>>();\n\n/**\n * Compute the coalesce key for `ensureClientCredentialsTokens`. `force: true`\n * uses a distinct bucket so a 401-triggered forced refresh never piggybacks\n * on a still-pending non-forced exchange — the whole point of forcing is\n * that the in-flight token is *known* stale, so awaiting it would defeat\n * the retry.\n */\nfunction coalesceKeyFor(agent: AgentConfig, credentials: AgentOAuthClientCredentials, force: boolean): string {\n return `${force ? 'force' : 'normal'}\\u0000${agent.id}\\u0000${credentials.token_endpoint}\\u0000${credentials.client_id}`;\n}\n\n/**\n * Ensure an agent has a valid access token, refreshing via client credentials\n * if the cached one is missing or expired. Idempotent and safe to call\n * before every request.\n *\n * Concurrent calls for the same `agent.id` are coalesced into a single\n * token POST via an in-process promise map — the common case of a\n * storyboard fan-out firing 10 tool calls in parallel does one refresh,\n * not ten.\n *\n * **Mutation:** this function writes `agent.oauth_tokens` in place. That is\n * the contract the MCP SDK's `OAuthClientProvider` pattern also uses, and\n * it lets the CLI's file-backed storage see the same object. Callers that\n * share an `AgentConfig` across different logical agents must copy first.\n *\n * Precondition: `agent.oauth_client_credentials` must be set. Throws a plain\n * Error if not — callers are expected to branch on its presence before\n * calling this.\n */\nexport async function ensureClientCredentialsTokens(\n agent: AgentConfig,\n options: EnsureClientCredentialsOptions = {}\n): Promise<AgentOAuthTokens> {\n if (!agent.oauth_client_credentials) {\n throw new Error(\n `ensureClientCredentialsTokens called for agent '${agent.id}' with no oauth_client_credentials configured.`\n );\n }\n\n const skew = options.expirationSkewMs ?? 60_000;\n const cached = agent.oauth_tokens;\n const cachedIsValid =\n !options.force &&\n cached?.access_token &&\n (!cached.expires_at || new Date(cached.expires_at).getTime() - Date.now() > skew);\n\n if (cachedIsValid) {\n return cached!;\n }\n\n const coalesceKey = coalesceKeyFor(agent, agent.oauth_client_credentials, options.force === true);\n const existing = inFlightRefresh.get(coalesceKey);\n if (existing) {\n const tokens = await existing;\n agent.oauth_tokens = tokens;\n return tokens;\n }\n\n const exchange = (async () => {\n try {\n const tokens = await exchangeClientCredentials(agent.oauth_client_credentials!, {\n fetch: options.fetch,\n timeoutMs: options.timeoutMs,\n allowPrivateIp: options.allowPrivateIp,\n });\n agent.oauth_tokens = tokens;\n if (options.storage) {\n await options.storage.saveAgent(agent);\n }\n return tokens;\n } finally {\n inFlightRefresh.delete(coalesceKey);\n }\n })();\n\n inFlightRefresh.set(coalesceKey, exchange);\n return exchange;\n}\n"],"mappings":"AA8BA,SAAS,qBAAgF;AAGzF,SAAS,qBAAqB;AAC9B,SAAS,0BAA0B;AACnC,SAAS,8BAA8B;AAGvC,MAAM,sBAAsB;AAgBrB,MAAM,uCAAuC,MAAM;AAAA,EAExD,YACE,SACgB,MACA,YACA,uBACA,YAChB;AACA,UAAM,OAAO;AALG;AACA;AACA;AACA;AAGhB,SAAK,OAAO;AAAA,EACd;AAAA,EAPkB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EANT,OAAO;AAWlB;AAqCA,SAAS,cAAc,OAAuB;AAC5C,SAAO,mBAAmB,KAAK,EAC5B,QAAQ,QAAQ,GAAG,EACnB,QAAQ,MAAM,KAAK,EACnB,QAAQ,MAAM,KAAK,EACnB,QAAQ,OAAO,KAAK,EACpB,QAAQ,OAAO,KAAK,EACpB,QAAQ,OAAO,KAAK;AACzB;AAUA,SAAS,kBAAkB,KAAqB;AAE9C,QAAM,WAAW,IAAI,QAAQ,yBAAyB,GAAG;AACzD,MAAI,SAAS,UAAU,oBAAqB,QAAO;AACnD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AEA,QAAM,cAAc,eAAe,OAAO,MAAM,0BAA0B,QAAQ,UAAU,IAAI;AAChG,QAAM,WAAW,gBAAgB,IAAI,WAAW;AAChD,MAAI,UAAU;AACZ,UAAM,SAAS,MAAM;AACrB,UAAM,eAAe;AACrB,WAAO;AAAA,EACT;AAEA,QAAM,YAAY,YAAY;AAC5B,QAAI;AACF,YAAM,SAAS,MAAM,0BAA0B,MAAM,0BAA2B;AAAA,QAC9E,OAAO,QAAQ;AAAA,QACf,WAAW,QAAQ;AAAA,QACnB,gBAAgB,QAAQ;AAAA,MAC1B,CAAC;AACD,YAAM,eAAe;AACrB,UAAI,QAAQ,SAAS;AACnB,cAAM,QAAQ,QAAQ,UAAU,KAAK;AAAA,MACvC;AACA,aAAO;AAAA,IACT,UAAE;AACA,sBAAgB,OAAO,WAAW;AAAA,IACpC;AAAA,EACF,GAAG;AAEH,kBAAgB,IAAI,aAAa,QAAQ;AACzC,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../../../src/lib/auth/oauth/ClientCredentialsFlow.ts"],"sourcesContent":["/**\n * OAuth 2.0 client credentials grant — RFC 6749 §4.4.\n *\n * For machine-to-machine use cases (CI compliance runs, automated checks)\n * where there is no user to walk through an authorization-code flow. The\n * client POSTs its ID + secret to the authorization server's token endpoint\n * and gets back an access token directly.\n *\n * This file provides:\n * - {@link exchangeClientCredentials}: one-shot token exchange. Use for the\n * initial fetch during `--save-auth` and for forced refresh.\n * - {@link ensureClientCredentialsTokens}: reads the cached tokens on an\n * `AgentConfig`, checks expiry, re-exchanges if needed, and persists the\n * refreshed tokens via an optional {@link OAuthConfigStorage}.\n *\n * Why a dedicated module instead of the MCP SDK's `OAuthClientProvider`:\n * client credentials doesn't need discovery, dynamic client registration,\n * PKCE, or authorization code exchange — all the plumbing that provider\n * exists to coordinate. A direct token POST and a cached-token check is the\n * entire protocol. The call path keeps using the plain `Authorization:\n * Bearer` header path — the same path it already uses for `auth_token`.\n *\n * **Security note (library consumers):** `token_endpoint` is passed to\n * `fetch` directly. Callers that accept untrusted `AgentConfig` values\n * from network requests (e.g. a hosted compliance service accepting\n * user-supplied configs) MUST validate the URL against an allowlist or\n * SSRF-block private IPs before invoking these helpers. The CLI and\n * operator-driven flows are already trusted.\n */\n\nimport { fromMCPTokens, type OAuthTokens, type AgentConfig, type AgentOAuthTokens } from './types';\nimport type { AgentOAuthClientCredentials } from '../../types/adcp';\nimport type { OAuthConfigStorage } from './types';\nimport { resolveSecret } from './secret-resolver';\nimport { isLikelyPrivateUrl } from '../../net';\nimport { wrapFetchWithSizeLimit } from '../../protocols/responseSizeLimit';\nimport { createAbortError, throwIfAborted, withAbortSignal } from '../../protocols/abort';\n\n/** Max length we'll echo from an AS-supplied error description into errors. */\nconst MAX_AS_ERROR_LENGTH = 200;\n\n/**\n * Raised when the authorization server rejects a client credentials\n * exchange or the token endpoint is unreachable/malformed.\n *\n * The {@link kind} discriminator lets callers branch without\n * string-matching on the message:\n * - `oauth`: the AS returned a structured OAuth error (RFC 6749 §5.2 —\n * `invalid_client`, `invalid_grant`, `invalid_scope`, …). Read\n * {@link oauthError} / {@link oauthErrorDescription}.\n * - `malformed`: the AS returned HTTP 200 but no `access_token`, or a\n * non-JSON body.\n * - `network`: the exchange never reached the AS (DNS failure, connection\n * refused, timeout, TLS error).\n */\nexport class ClientCredentialsExchangeError extends Error {\n readonly code = 'client_credentials_exchange_failed';\n constructor(\n message: string,\n public readonly kind: 'oauth' | 'malformed' | 'network',\n public readonly oauthError?: string,\n public readonly oauthErrorDescription?: string,\n public readonly httpStatus?: number\n ) {\n super(message);\n this.name = 'ClientCredentialsExchangeError';\n }\n}\n\n/**\n * Options for {@link exchangeClientCredentials}.\n */\nexport interface ExchangeClientCredentialsOptions {\n /**\n * Custom fetch implementation (default: global `fetch`).\n * Primarily a testing hook — lets unit tests stub the authorization server\n * without intercepting the global.\n */\n fetch?: typeof fetch;\n /**\n * Request timeout in milliseconds (default: 30_000). Guards against a\n * silently hung authorization server blocking the caller indefinitely.\n */\n timeoutMs?: number;\n /**\n * Allow `token_endpoint` to resolve to a private / loopback IP address.\n * Default: false (SSRF guard). The CLI opts in because the operator is\n * explicitly configuring the endpoint; hosted consumers accepting\n * user-supplied configs should leave this off.\n */\n allowPrivateIp?: boolean;\n /** Caller-owned cancellation signal, composed with `timeoutMs`. */\n signal?: AbortSignal;\n}\n\n/**\n * RFC 6749 §2.3.1 application/x-www-form-urlencoded encoding.\n *\n * Differs from `encodeURIComponent` in two important ways:\n * 1. Spaces are encoded as `+`, not `%20`.\n * 2. The characters `!'()*` are percent-encoded (URI component leaves them\n * alone).\n *\n * A secret containing any of those chars would hash to a different Basic\n * string than the AS computes, producing a spurious `invalid_client`.\n */\nfunction formUrlEncode(value: string): string {\n return encodeURIComponent(value)\n .replace(/%20/g, '+')\n .replace(/!/g, '%21')\n .replace(/'/g, '%27')\n .replace(/\\(/g, '%28')\n .replace(/\\)/g, '%29')\n .replace(/\\*/g, '%2A');\n}\n\n/**\n * Strip control chars (C0, C1, DEL) and truncate.\n *\n * Defensive cleanup on AS-controlled strings we print to a TTY. A\n * malicious or compromised AS could emit ANSI escape sequences or CRLF\n * payloads in `error_description`; we don't want those rewriting terminal\n * titles or forging log lines.\n */\nfunction sanitizeAsMessage(raw: string): string {\n // eslint-disable-next-line no-control-regex\n const stripped = raw.replace(/[\\x00-\\x1F\\x7F-\\x9F]/g, ' ');\n if (stripped.length <= MAX_AS_ERROR_LENGTH) return stripped;\n return stripped.slice(0, MAX_AS_ERROR_LENGTH) + '…';\n}\n\n/**\n * Validate the token endpoint before we hit it. Three checks, in order:\n *\n * 1. Parse as a URL. Unparseable → `malformed`.\n * 2. Reject URLs that carry `user:pass@` userinfo — they'd leak via error\n * messages and log aggregators, and the OAuth client credentials live\n * in `client_id` / `client_secret`, never the URL.\n * 3. Reject plaintext `http://` outside `localhost` / loopback IPs.\n * RFC 6749 §3.1 requires TLS; the loopback carve-out covers local dev\n * authorization servers where plaintext is not a leak risk.\n * 4. Reject private / loopback / link-local IPs unless `allowPrivateIp`.\n * The library default is a SSRF guard; the CLI (operator-driven) opts\n * in because a user pointing at `localhost:8080` is legitimate. Network\n * code behind this call will still do DNS resolution, so this is a\n * best-effort literal-IP / known-loopback check — host allowlisting\n * upstream is the right control for adversarial environments.\n */\nfunction validateTokenEndpoint(tokenEndpoint: string, options: { allowPrivateIp?: boolean } = {}): URL {\n let url: URL;\n try {\n url = new URL(tokenEndpoint);\n } catch {\n throw new ClientCredentialsExchangeError(`Invalid token_endpoint URL: ${tokenEndpoint}`, 'malformed');\n }\n\n if (url.username || url.password) {\n throw new ClientCredentialsExchangeError(\n `token_endpoint must not contain userinfo (user:pass@). Put credentials in client_id / client_secret instead.`,\n 'malformed'\n );\n }\n\n const host = url.hostname;\n const isLoopback = host === 'localhost' || host === '127.0.0.1' || host === '[::1]' || host === '::1';\n\n if (url.protocol !== 'https:' && !(url.protocol === 'http:' && isLoopback)) {\n throw new ClientCredentialsExchangeError(\n `token_endpoint must be HTTPS (got ${url.protocol}//${host}). The client secret would be sent in plaintext over HTTP. Use https:// (or http://localhost for local dev).`,\n 'malformed'\n );\n }\n\n if (!options.allowPrivateIp && isLikelyPrivateUrl(tokenEndpoint)) {\n throw new ClientCredentialsExchangeError(\n `token_endpoint resolves to a private or loopback address (${host}). Pass { allowPrivateIp: true } to exchangeClientCredentials / ensureClientCredentialsTokens if this is intentional (operator-driven CLI or local test setups).`,\n 'malformed'\n );\n }\n\n return url;\n}\n\n/**\n * Exchange client credentials for an access token.\n *\n * Secret values in `credentials.client_id` / `client_secret` may be `$ENV:VAR`\n * references — they are resolved here at exchange time. Missing env vars\n * surface as `MissingEnvSecretError` (from `secret-resolver`), which\n * callers typically print with the variable name for the user to fix.\n *\n * @throws {ClientCredentialsExchangeError} on any non-2xx response, malformed 200, or network failure\n * @throws {MissingEnvSecretError} if a `$ENV:VAR` ref points at an unset var\n */\nexport async function exchangeClientCredentials(\n credentials: AgentOAuthClientCredentials,\n options: ExchangeClientCredentialsOptions = {}\n): Promise<AgentOAuthTokens> {\n throwIfAborted(options.signal);\n\n // Wrap with the response-size-limit guard so a hostile token endpoint\n // can't buffer-bomb on every refresh. Pass-through when no\n // `withResponseSizeLimit` slot is active. (#1175)\n const fetchImpl = wrapFetchWithSizeLimit(options.fetch ?? fetch);\n const timeoutMs = options.timeoutMs ?? 30_000;\n\n validateTokenEndpoint(credentials.token_endpoint, { allowPrivateIp: options.allowPrivateIp });\n\n const clientId = resolveSecret(credentials.client_id);\n const clientSecret = resolveSecret(credentials.client_secret);\n const authMethod = credentials.auth_method ?? 'basic';\n\n const body = new URLSearchParams();\n body.set('grant_type', 'client_credentials');\n if (credentials.scope) {\n body.set('scope', credentials.scope);\n }\n // RFC 8707 resource indicators — emitted as one `resource` field per URI\n // so the AS receives the full list. URLSearchParams#append is the only\n // way to produce repeated keys in form encoding.\n if (credentials.resource) {\n const resources = Array.isArray(credentials.resource) ? credentials.resource : [credentials.resource];\n for (const r of resources) body.append('resource', r);\n }\n if (credentials.audience) {\n body.set('audience', credentials.audience);\n }\n\n const headers: Record<string, string> = {\n 'content-type': 'application/x-www-form-urlencoded',\n accept: 'application/json',\n };\n\n if (authMethod === 'basic') {\n // RFC 6749 §2.3.1: form-urlencode ID/secret before base64 (NOT URI\n // component encoding — space is `+`, and `!'()*` must be percent-\n // encoded). Most deployed servers accept raw values too, but spec\n // compliance avoids a footgun with secrets containing those chars.\n const encoded = Buffer.from(`${formUrlEncode(clientId)}:${formUrlEncode(clientSecret)}`, 'utf-8').toString(\n 'base64'\n );\n headers.authorization = `Basic ${encoded}`;\n } else {\n body.set('client_id', clientId);\n body.set('client_secret', clientSecret);\n }\n\n let response: Response;\n let bodyText: string;\n const timeoutError = new Error(`Client credentials exchange timed out after ${timeoutMs}ms`);\n timeoutError.name = 'TimeoutError';\n try {\n ({ response, bodyText } = await withAbortSignal(\n [options.signal],\n timeoutMs,\n async signal => {\n const tokenResponse = await fetchImpl(credentials.token_endpoint, {\n method: 'POST',\n headers,\n body: body.toString(),\n signal,\n });\n return { response: tokenResponse, bodyText: await tokenResponse.text() };\n },\n { timeoutError }\n ));\n } catch (err) {\n if (options.signal?.aborted) {\n throw createAbortError(options.signal.reason);\n }\n if (err === timeoutError) {\n throw new ClientCredentialsExchangeError(\n `Token endpoint ${credentials.token_endpoint} did not respond within ${timeoutMs}ms.`,\n 'network'\n );\n }\n throw new ClientCredentialsExchangeError(\n `Failed to reach token endpoint ${credentials.token_endpoint}: ${(err as Error).message}`,\n 'network'\n );\n }\n\n let parsed: Record<string, unknown> | undefined;\n try {\n parsed = bodyText ? (JSON.parse(bodyText) as Record<string, unknown>) : undefined;\n } catch {\n // Non-JSON response; parsed stays undefined, handled below.\n }\n\n if (!response.ok) {\n const rawOauthError = typeof parsed?.error === 'string' ? parsed.error : undefined;\n const rawOauthDesc = typeof parsed?.error_description === 'string' ? parsed.error_description : undefined;\n const oauthError = rawOauthError ? sanitizeAsMessage(rawOauthError) : undefined;\n const oauthDesc = rawOauthDesc ? sanitizeAsMessage(rawOauthDesc) : undefined;\n const message =\n oauthError || oauthDesc\n ? `Client credentials exchange failed: ${oauthError ?? 'error'}${oauthDesc ? ` — ${oauthDesc}` : ''}`\n : `Client credentials exchange failed with HTTP ${response.status}: ${sanitizeAsMessage(bodyText) || '(empty body)'}`;\n const kind = rawOauthError ? 'oauth' : 'malformed';\n throw new ClientCredentialsExchangeError(message, kind, oauthError, oauthDesc, response.status);\n }\n\n if (!parsed || typeof parsed.access_token !== 'string') {\n throw new ClientCredentialsExchangeError(\n `Token endpoint returned HTTP ${response.status} but no access_token. Body: ${sanitizeAsMessage(bodyText)}`,\n 'malformed',\n undefined,\n undefined,\n response.status\n );\n }\n\n return fromMCPTokens(parsed as unknown as OAuthTokens);\n}\n\n/**\n * Options for {@link ensureClientCredentialsTokens}.\n */\nexport interface EnsureClientCredentialsOptions extends ExchangeClientCredentialsOptions {\n /**\n * Storage backend used to persist refreshed tokens. Optional — if omitted,\n * tokens are only mutated on the in-memory `agent` object and the caller\n * is responsible for persisting.\n */\n storage?: OAuthConfigStorage;\n /**\n * Force a re-exchange even if the cached token looks valid. Useful after a\n * 401 in case the authorization server rotated something out-of-band.\n */\n force?: boolean;\n /**\n * Expiration skew (ms). Treat the token as expired this many milliseconds\n * before its nominal `expires_at` — protects against clock skew and\n * in-flight requests. Default: 60_000 (1 minute). The interactive auth\n * code flow uses 5 minutes; client credentials refresh is cheap (single\n * POST) so the shorter window is fine here.\n */\n expirationSkewMs?: number;\n}\n\n/**\n * In-flight refresh coalescing map. Scoped by `AgentConfig` object identity\n * so only callers deliberately sharing one configuration can share a bearer.\n * A string key built from public OAuth fields is insufficient here: two\n * tenants can reuse an agent id, endpoint, and client id while differing in\n * secret, scope, audience, or resource.\n *\n * Cleared on completion regardless of success/failure.\n *\n * Note: this is an in-process map. Multi-process deployments (worker\n * pools, multiple CLI invocations, horizontally scaled Node servers)\n * don't coalesce across workers — each process will do its own refresh.\n * For the CLI this is fine; for high-throughput server deployments,\n * coalesce upstream at the storage layer.\n */\ninterface InFlightRefresh {\n promise: Promise<AgentOAuthTokens>;\n controller: AbortController;\n waiters: number;\n settled: boolean;\n}\n\ntype RefreshMode = 'normal' | 'force';\n\nconst inFlightRefresh = new WeakMap<AgentConfig, Map<RefreshMode, InFlightRefresh>>();\n\nasync function waitForRefresh(entry: InFlightRefresh, signal?: AbortSignal): Promise<AgentOAuthTokens> {\n if (signal?.aborted) throw createAbortError(signal.reason);\n entry.waiters += 1;\n let abortListener: (() => void) | undefined;\n try {\n if (!signal) return await entry.promise;\n const aborted = new Promise<never>((_resolve, reject) => {\n abortListener = () => reject(createAbortError(signal.reason));\n signal.addEventListener('abort', abortListener, { once: true });\n });\n return await Promise.race([entry.promise, aborted]);\n } finally {\n if (abortListener && signal) signal.removeEventListener('abort', abortListener);\n entry.waiters -= 1;\n if (entry.waiters === 0 && !entry.settled && !entry.controller.signal.aborted) {\n entry.controller.abort(createAbortError(signal?.reason ?? 'No callers remain for token refresh'));\n }\n }\n}\n\n/**\n * Ensure an agent has a valid access token, refreshing via client credentials\n * if the cached one is missing or expired. Idempotent and safe to call\n * before every request.\n *\n * Concurrent calls for the same `agent.id` are coalesced into a single\n * token POST via an in-process promise map — the common case of a\n * storyboard fan-out firing 10 tool calls in parallel does one refresh,\n * not ten.\n *\n * **Mutation:** this function writes `agent.oauth_tokens` in place. That is\n * the contract the MCP SDK's `OAuthClientProvider` pattern also uses, and\n * it lets the CLI's file-backed storage see the same object. Callers that\n * share an `AgentConfig` across different logical agents must copy first.\n *\n * Precondition: `agent.oauth_client_credentials` must be set. Throws a plain\n * Error if not — callers are expected to branch on its presence before\n * calling this.\n */\nexport async function ensureClientCredentialsTokens(\n agent: AgentConfig,\n options: EnsureClientCredentialsOptions = {}\n): Promise<AgentOAuthTokens> {\n throwIfAborted(options.signal);\n\n if (!agent.oauth_client_credentials) {\n throw new Error(\n `ensureClientCredentialsTokens called for agent '${agent.id}' with no oauth_client_credentials configured.`\n );\n }\n\n const skew = options.expirationSkewMs ?? 60_000;\n const cached = agent.oauth_tokens;\n const cachedIsValid =\n !options.force &&\n cached?.access_token &&\n (!cached.expires_at || new Date(cached.expires_at).getTime() - Date.now() > skew);\n\n if (cachedIsValid) {\n return cached!;\n }\n\n const refreshMode: RefreshMode = options.force ? 'force' : 'normal';\n let agentRefreshes = inFlightRefresh.get(agent);\n const existing = agentRefreshes?.get(refreshMode);\n if (existing && !existing.controller.signal.aborted) {\n const tokens = await waitForRefresh(existing, options.signal);\n agent.oauth_tokens = tokens;\n return tokens;\n }\n\n const controller = new AbortController();\n const entry: InFlightRefresh = {\n promise: undefined as unknown as Promise<AgentOAuthTokens>,\n controller,\n waiters: 0,\n settled: false,\n };\n if (!agentRefreshes) {\n agentRefreshes = new Map();\n inFlightRefresh.set(agent, agentRefreshes);\n }\n entry.promise = (async () => {\n try {\n const tokens = await exchangeClientCredentials(agent.oauth_client_credentials!, {\n fetch: options.fetch,\n timeoutMs: options.timeoutMs,\n allowPrivateIp: options.allowPrivateIp,\n signal: controller.signal,\n });\n agent.oauth_tokens = tokens;\n if (options.storage) {\n await options.storage.saveAgent(agent);\n }\n return tokens;\n } finally {\n entry.settled = true;\n if (agentRefreshes?.get(refreshMode) === entry) {\n agentRefreshes.delete(refreshMode);\n if (agentRefreshes.size === 0) inFlightRefresh.delete(agent);\n }\n }\n })();\n\n agentRefreshes.set(refreshMode, entry);\n return waitForRefresh(entry, options.signal);\n}\n"],"mappings":"AA8BA,SAAS,qBAAgF;AAGzF,SAAS,qBAAqB;AAC9B,SAAS,0BAA0B;AACnC,SAAS,8BAA8B;AACvC,SAAS,kBAAkB,gBAAgB,uBAAuB;AAGlE,MAAM,sBAAsB;AAgBrB,MAAM,uCAAuC,MAAM;AAAA,EAExD,YACE,SACgB,MACA,YACA,uBACA,YAChB;AACA,UAAM,OAAO;AALG;AACA;AACA;AACA;AAGhB,SAAK,OAAO;AAAA,EACd;AAAA,EAPkB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EANT,OAAO;AAWlB;AAuCA,SAAS,cAAc,OAAuB;AAC5C,SAAO,mBAAmB,KAAK,EAC5B,QAAQ,QAAQ,GAAG,EACnB,QAAQ,MAAM,KAAK,EACnB,QAAQ,MAAM,KAAK,EACnB,QAAQ,OAAO,KAAK,EACpB,QAAQ,OAAO,KAAK,EACpB,QAAQ,OAAO,KAAK;AACzB;AAUA,SAAS,kBAAkB,KAAqB;AAE9C,QAAM,WAAW,IAAI,QAAQ,yBAAyB,GAAG;AACzD,MAAI,SAAS,UAAU,oBAAqB,QAAO;AACnD,SAAO,SAAS,MAAM,GAAG,mBAAmB,IAAI;AAClD;AAmBA,SAAS,sBAAsB,eAAuB,UAAwC,CAAC,GAAQ;AACrG,MAAI;AACJ,MAAI;AACF,UAAM,IAAI,IAAI,aAAa;AAAA,EAC7B,QAAQ;AACN,UAAM,IAAI,+BAA+B,+BAA+B,aAAa,IAAI,WAAW;AAAA,EACtG;AAEA,MAAI,IAAI,YAAY,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AAe;AACrB,UAAI,QAAQ,SAAS;AACnB,cAAM,QAAQ,QAAQ,UAAU,KAAK;AAAA,MACvC;AACA,aAAO;AAAA,IACT,UAAE;AACA,YAAM,UAAU;AAChB,UAAI,gBAAgB,IAAI,WAAW,MAAM,OAAO;AAC9C,uBAAe,OAAO,WAAW;AACjC,YAAI,eAAe,SAAS,EAAG,iBAAgB,OAAO,KAAK;AAAA,MAC7D;AAAA,IACF;AAAA,EACF,GAAG;AAEH,iBAAe,IAAI,aAAa,KAAK;AACrC,SAAO,eAAe,OAAO,QAAQ,MAAM;AAC7C;","names":[]}
@@ -85,6 +85,8 @@ export interface DiscoverAuthorizationOptions {
85
85
  timeoutMs?: number;
86
86
  /** Scoped fetch implementation for the agent, PRM, and AS metadata probes. */
87
87
  fetchFn?: typeof fetch;
88
+ /** Caller cancellation, including the absolute task deadline. */
89
+ signal?: AbortSignal;
88
90
  /**
89
91
  * If provided, use this `WWW-Authenticate` header verbatim instead of
90
92
  * re-probing the agent. Use this when you already have a 401 response in
@@ -128,4 +130,5 @@ export declare function probeAuthChallenge(agentUrl: string, options?: {
128
130
  allowPrivateIp?: boolean;
129
131
  timeoutMs?: number;
130
132
  fetchFn?: typeof fetch;
133
+ signal?: AbortSignal;
131
134
  }): Promise<WWWAuthenticateChallenge | null>;
@@ -85,6 +85,8 @@ export interface DiscoverAuthorizationOptions {
85
85
  timeoutMs?: number;
86
86
  /** Scoped fetch implementation for the agent, PRM, and AS metadata probes. */
87
87
  fetchFn?: typeof fetch;
88
+ /** Caller cancellation, including the absolute task deadline. */
89
+ signal?: AbortSignal;
88
90
  /**
89
91
  * If provided, use this `WWW-Authenticate` header verbatim instead of
90
92
  * re-probing the agent. Use this when you already have a 401 response in
@@ -128,5 +130,6 @@ export declare function probeAuthChallenge(agentUrl: string, options?: {
128
130
  allowPrivateIp?: boolean;
129
131
  timeoutMs?: number;
130
132
  fetchFn?: typeof fetch;
133
+ signal?: AbortSignal;
131
134
  }): Promise<WWWAuthenticateChallenge | null>;
132
135
  //# sourceMappingURL=authorization-required.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authorization-required.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/oauth/authorization-required.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,2BAA2B,EAA0B,MAAM,cAAc,CAAC;AACnF,OAAO,EAAwB,KAAK,wBAAwB,EAAE,MAAM,eAAe,CAAC;AA8DpF;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sGAAsG;IACtG,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,6EAA6E;IAC7E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,kFAAkF;IAClF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uFAAuF;IACvF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iEAAiE;IACjE,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,sFAAsF;IACtF,cAAc,CAAC,EAAE,UAAU,GAAG,sBAAsB,CAAC;IACrD,6EAA6E;IAC7E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0DAA0D;IAC1D,SAAS,EAAE,wBAAwB,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,uBAAwB,SAAQ,2BAA2B;IACtE,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAG,qBAAqB,CAAU;IAClD,QAAQ,CAAC,YAAY,EAAE,yBAAyB,CAAC;gBAErC,YAAY,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,MAAM;CAStE;AA+BD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,iEAAiE;IACjE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uFAAuF;IACvF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;IACvB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,iCAAiC,CACrD,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,4BAAiC,GACzC,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAiH3C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;CAAO,GACrF,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAI1C"}
1
+ {"version":3,"file":"authorization-required.d.ts","sourceRoot":"","sources":["../../../../src/lib/auth/oauth/authorization-required.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,2BAA2B,EAA0B,MAAM,cAAc,CAAC;AAEnF,OAAO,EAAwB,KAAK,wBAAwB,EAAE,MAAM,eAAe,CAAC;AA8DpF;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sGAAsG;IACtG,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,6EAA6E;IAC7E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IACh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ChB,OAAO,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;IAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAAO,GAC3G,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAU1C"}
@@ -25,6 +25,7 @@ __export(authorization_required_exports, {
25
25
  module.exports = __toCommonJS(authorization_required_exports);
26
26
  var import_net = require('../../net/index.js');
27
27
  var import_errors = require('../../errors/index.js');
28
+ var import_abort = require('../../protocols/abort.js');
28
29
  var import_diagnostics = require('./diagnostics.js');
29
30
  const MAX_DISPLAY_STRING = 256;
30
31
  const MAX_SCOPES = 64;
@@ -87,7 +88,13 @@ async function discoverAuthorizationRequirements(agentUrl, options = {}) {
87
88
  const allowPrivateIpForHop = (url) => allowPrivateIpOnAgent && agentOrigin !== void 0 && originOf(url) === agentOrigin;
88
89
  let challengeHeader = options.wwwAuthenticate;
89
90
  if (!challengeHeader) {
90
- const probe = await probeAgent401(agentUrl, allowPrivateIpOnAgent, options.timeoutMs, options.fetchFn);
91
+ const probe = await probeAgent401(
92
+ agentUrl,
93
+ allowPrivateIpOnAgent,
94
+ options.timeoutMs,
95
+ options.fetchFn,
96
+ options.signal
97
+ );
91
98
  if (probe.status !== 401) {
92
99
  return null;
93
100
  }
@@ -108,7 +115,8 @@ async function discoverAuthorizationRequirements(agentUrl, options = {}) {
108
115
  challenge.resource_metadata,
109
116
  allowPrivateIpForHop(challenge.resource_metadata),
110
117
  options.timeoutMs,
111
- options.fetchFn
118
+ options.fetchFn,
119
+ options.signal
112
120
  );
113
121
  if (prm && typeof prm === "object") {
114
122
  const resource = prm.resource;
@@ -128,7 +136,13 @@ async function discoverAuthorizationRequirements(agentUrl, options = {}) {
128
136
  let md;
129
137
  let source;
130
138
  if (asUrl) {
131
- const res = await fetchJson(asUrl, allowPrivateIpForHop(asUrl), options.timeoutMs, options.fetchFn);
139
+ const res = await fetchJson(
140
+ asUrl,
141
+ allowPrivateIpForHop(asUrl),
142
+ options.timeoutMs,
143
+ options.fetchFn,
144
+ options.signal
145
+ );
132
146
  if (res && typeof res === "object") {
133
147
  md = res;
134
148
  source = "rfc-8414";
@@ -137,7 +151,13 @@ async function discoverAuthorizationRequirements(agentUrl, options = {}) {
137
151
  if (!md) {
138
152
  const oidcUrl = buildOidcDiscoveryUrl(requirements.authorizationServer);
139
153
  if (oidcUrl) {
140
- const res = await fetchJson(oidcUrl, allowPrivateIpForHop(oidcUrl), options.timeoutMs, options.fetchFn);
154
+ const res = await fetchJson(
155
+ oidcUrl,
156
+ allowPrivateIpForHop(oidcUrl),
157
+ options.timeoutMs,
158
+ options.fetchFn,
159
+ options.signal
160
+ );
141
161
  if (res && typeof res === "object") {
142
162
  md = res;
143
163
  source = "openid-configuration";
@@ -168,11 +188,17 @@ async function discoverAuthorizationRequirements(agentUrl, options = {}) {
168
188
  return requirements;
169
189
  }
170
190
  async function probeAuthChallenge(agentUrl, options = {}) {
171
- const probe = await probeAgent401(agentUrl, options.allowPrivateIp ?? false, options.timeoutMs, options.fetchFn);
191
+ const probe = await probeAgent401(
192
+ agentUrl,
193
+ options.allowPrivateIp ?? false,
194
+ options.timeoutMs,
195
+ options.fetchFn,
196
+ options.signal
197
+ );
172
198
  if (probe.status !== 401) return null;
173
199
  return (0, import_diagnostics.parseWWWAuthenticate)(probe.wwwAuthenticate ?? null);
174
200
  }
175
- async function probeAgent401(agentUrl, allowPrivateIp, timeoutMs, fetchFn) {
201
+ async function probeAgent401(agentUrl, allowPrivateIp, timeoutMs, fetchFn, signal) {
176
202
  const body = JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" });
177
203
  try {
178
204
  const res = await (0, import_net.ssrfSafeFetch)(agentUrl, {
@@ -183,11 +209,13 @@ async function probeAgent401(agentUrl, allowPrivateIp, timeoutMs, fetchFn) {
183
209
  },
184
210
  body,
185
211
  allowPrivateIp,
212
+ signal,
186
213
  ...timeoutMs !== void 0 ? { timeoutMs } : {},
187
214
  ...fetchFn ? { trustedFetchFn: fetchFn } : {}
188
215
  });
189
216
  return { status: res.status, wwwAuthenticate: res.headers["www-authenticate"] };
190
217
  } catch {
218
+ (0, import_abort.throwIfAborted)(signal);
191
219
  return { status: 0 };
192
220
  }
193
221
  }
@@ -218,18 +246,20 @@ function buildOidcDiscoveryUrl(issuer) {
218
246
  const base = u.pathname.endsWith("/") ? `${u.origin}${u.pathname.slice(0, -1)}` : `${u.origin}${u.pathname}`;
219
247
  return `${base}/.well-known/openid-configuration`;
220
248
  }
221
- async function fetchJson(url, allowPrivateIp, timeoutMs, fetchFn) {
249
+ async function fetchJson(url, allowPrivateIp, timeoutMs, fetchFn, signal) {
222
250
  try {
223
251
  const res = await (0, import_net.ssrfSafeFetch)(url, {
224
252
  method: "GET",
225
253
  headers: { accept: "application/json" },
226
254
  allowPrivateIp,
255
+ signal,
227
256
  ...timeoutMs !== void 0 ? { timeoutMs } : {},
228
257
  ...fetchFn ? { trustedFetchFn: fetchFn } : {}
229
258
  });
230
259
  if (res.status !== 200) return void 0;
231
260
  return (0, import_net.decodeBodyAsJsonOrText)(res.body, res.headers["content-type"]);
232
261
  } catch {
262
+ (0, import_abort.throwIfAborted)(signal);
233
263
  return void 0;
234
264
  }
235
265
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/auth/oauth/authorization-required.ts"],"sourcesContent":["/**\n * Zero-config OAuth discovery + actionable authorization errors.\n *\n * When a library consumer calls an OAuth-gated MCP agent without saved\n * credentials, they get a `NeedsAuthorizationError` containing everything\n * needed to either run an interactive flow or present a clear prompt — no\n * re-probing required.\n *\n * Design note: this module only *discovers* — it never opens a browser or\n * writes state. Interactive flow handling stays in the caller (CLI or a\n * bespoke `OAuthFlowHandler`) so library behavior is predictable.\n */\nimport { ssrfSafeFetch, decodeBodyAsJsonOrText } from '../../net';\nimport { AuthenticationRequiredError, type OAuthMetadataInfo } from '../../errors';\nimport { parseWWWAuthenticate, type WWWAuthenticateChallenge } from './diagnostics';\n\n/**\n * Maximum length of an individual server-supplied string we copy into the\n * `AuthorizationRequirements` payload. Anything longer is truncated with a\n * `…` suffix so hostile agents can't smuggle megabyte error-descriptions\n * into operator-facing prompts and logs.\n */\nconst MAX_DISPLAY_STRING = 256;\n\n/**\n * Maximum number of scope strings we copy into `scopesSupported`. RFC 8414\n * allows an unbounded array; hostile servers have sent thousands.\n */\nconst MAX_SCOPES = 64;\n\n/**\n * Maximum number of auth-params we preserve under `challenge.params`. Bounds\n * memory pressure from hostile servers that pack the `WWW-Authenticate`\n * header with unknown auth-params.\n */\nconst MAX_CHALLENGE_PARAMS = 32;\n\n/**\n * Strip ASCII control characters (excluding TAB) from a server-supplied\n * string that may be shown to a human. Defeats terminal-hijack tricks like\n * `\\x1b]0;pwned\\x07` (rewrites terminal title), `\\r` (overwrites prompt),\n * and `\\x1b[2J` (clears screen). Also truncates over-long values.\n */\nfunction sanitizeDisplay(value: string): string {\n const stripped = value.replace(/[\\x00-\\x08\\x0b-\\x1f\\x7f]/g, '');\n if (stripped.length <= MAX_DISPLAY_STRING) return stripped;\n return `${stripped.slice(0, MAX_DISPLAY_STRING - 1)}…`;\n}\n\n/**\n * Sanitize the parsed `WWW-Authenticate` challenge before embedding it in a\n * `NeedsAuthorizationError`. Consumers that render `requirements.challenge`\n * to a terminal should never see control characters. Caps `params` count to\n * bound hostile servers.\n *\n * The `scheme` is already lowercased + token-constrained by the parser.\n * Param keys are also token-constrained so they're safe; only values need\n * sanitizing.\n */\nfunction sanitizeChallenge(c: WWWAuthenticateChallenge): WWWAuthenticateChallenge {\n const params: Record<string, string> = {};\n for (const [k, v] of Object.entries(c.params)) {\n if (Object.keys(params).length >= MAX_CHALLENGE_PARAMS) break;\n params[k] = sanitizeDisplay(v);\n }\n return {\n scheme: c.scheme,\n ...(c.realm !== undefined ? { realm: sanitizeDisplay(c.realm) } : {}),\n ...(c.error !== undefined ? { error: sanitizeDisplay(c.error) } : {}),\n ...(c.error_description !== undefined ? { error_description: sanitizeDisplay(c.error_description) } : {}),\n ...(c.scope !== undefined ? { scope: sanitizeDisplay(c.scope) } : {}),\n ...(c.resource_metadata !== undefined ? { resource_metadata: sanitizeDisplay(c.resource_metadata) } : {}),\n params,\n };\n}\n\n/**\n * Structured description of what an agent's authorization server requires\n * before it will accept a `tools/call`. Produced by\n * {@link discoverAuthorizationRequirements}.\n */\nexport interface AuthorizationRequirements {\n /** The agent URL we probed. */\n agentUrl: string;\n /** Resource URL the agent advertises in its `WWW-Authenticate` / PRM (RFC 9728). */\n resource?: string;\n /** URL of the protected-resource-metadata document (from `WWW-Authenticate: resource_metadata=…`). */\n resourceMetadataUrl?: string;\n /** First `authorization_servers[0]` from the protected-resource metadata. */\n authorizationServer?: string;\n /**\n * All `authorization_servers` advertised by the PRM, in declaration order.\n * The walker only probes `[0]` (PRM preference order — see RFC 9728 §3.3);\n * the full list is exposed so callers can surface multi-issuer deployments\n * in diagnostics. A length > 1 is uncommon and worth flagging to the\n * operator — typically a federation partner or a staged migration.\n */\n authorizationServers?: string[];\n /** `authorization_endpoint` from the authorization-server metadata (RFC 8414). */\n authorizationEndpoint?: string;\n /** `token_endpoint` from the authorization-server metadata. */\n tokenEndpoint?: string;\n /** `registration_endpoint` if the AS supports RFC 7591 dynamic client registration. */\n registrationEndpoint?: string;\n /** Scopes advertised by the AS (RFC 8414 `scopes_supported`). */\n scopesSupported?: string[];\n /**\n * `grant_types_supported` advertised by the AS (RFC 8414). `undefined` when\n * the AS didn't publish the field — per RFC 8414 that defaults to\n * `[\"authorization_code\", \"implicit\"]`. Clients should treat absence as\n * \"unknown, try your grant and see,\" not as proof the grant is unsupported.\n */\n grantTypesSupported?: string[];\n /** True when the AS metadata came from the OIDC fallback URL rather than RFC 8414. */\n metadataSource?: 'rfc-8414' | 'openid-configuration';\n /** Scope hinted in the `WWW-Authenticate` challenge's `scope` auth-param. */\n challengeScope?: string;\n /** Raw parsed challenge the agent returned on the 401. */\n challenge: WWWAuthenticateChallenge;\n}\n\n/**\n * Error raised when an agent returns a 401 and we do not have credentials\n * to satisfy it. Carries everything needed to run an interactive OAuth flow\n * or show the operator an actionable prompt.\n *\n * Extends {@link AuthenticationRequiredError} so existing callers that catch\n * `AuthenticationRequiredError` automatically receive the richer variant —\n * they can downcast with `instanceof NeedsAuthorizationError` when they\n * want walked discovery metadata.\n *\n * Note on `code` vs `subCode`:\n * The parent class declares `readonly code = 'AUTHENTICATION_REQUIRED'` as\n * a class field that re-initializes on every construction, so a child-side\n * override attempt is silently overwritten under `useDefineForClassFields`.\n * The narrow discriminator is exposed as `subCode` — prefer\n * `instanceof NeedsAuthorizationError` for type-narrowing and use `subCode`\n * only for structured-log keying.\n *\n * Note on `hasOAuth`:\n * The inherited getter returns `true` only when both `authorization_endpoint`\n * and `token_endpoint` were walked successfully. A partially-walked\n * requirements record (PRM reachable but AS metadata missing) still yields\n * `hasOAuth === false` even though `requirements.authorizationServer` is set.\n * Treat it as \"we have enough to start a flow,\" not \"server wants OAuth.\"\n */\nexport class NeedsAuthorizationError extends AuthenticationRequiredError {\n /** Narrow discriminator for consumers that already know about this class. */\n readonly subCode = 'needs_authorization' as const;\n readonly requirements: AuthorizationRequirements;\n\n constructor(requirements: AuthorizationRequirements, message?: string) {\n super(requirements.agentUrl, synthesizeOAuthMetadata(requirements), message ?? defaultMessage(requirements));\n this.name = 'NeedsAuthorizationError';\n this.requirements = requirements;\n // Extend the parent's `details` payload so structured-logging consumers\n // that read `err.details` (via `extractErrorInfo` or equivalent) see the\n // full walked chain, not just the synthesized one-hop oauthMetadata.\n this.details = { ...(this.details as object | undefined), requirements };\n }\n}\n\n/**\n * Build an {@link OAuthMetadataInfo} for the base-class constructor so that\n * legacy callers still see a non-empty `oauthMetadata` + working\n * `hasOAuth`/`authorizationUrl` getters on the error. When discovery didn't\n * yield enough info, return undefined and let the base class degrade\n * gracefully.\n */\nfunction synthesizeOAuthMetadata(req: AuthorizationRequirements): OAuthMetadataInfo | undefined {\n if (!req.authorizationEndpoint || !req.tokenEndpoint) return undefined;\n return {\n authorization_endpoint: req.authorizationEndpoint,\n token_endpoint: req.tokenEndpoint,\n ...(req.registrationEndpoint ? { registration_endpoint: req.registrationEndpoint } : {}),\n ...(req.authorizationServer ? { issuer: req.authorizationServer } : {}),\n };\n}\n\nfunction defaultMessage(req: AuthorizationRequirements): string {\n const parts = [`Agent ${sanitizeDisplay(req.agentUrl)} requires OAuth authorization.`];\n if (req.authorizationServer) {\n parts.push(`Authorization server: ${req.authorizationServer}.`);\n }\n if (req.challenge.error_description) {\n parts.push(`Server said: ${sanitizeDisplay(req.challenge.error_description)}.`);\n }\n parts.push('Provide an OAuthFlowHandler or run an interactive flow to complete authorization.');\n return parts.join(' ');\n}\n\n/**\n * Options for {@link discoverAuthorizationRequirements}.\n */\nexport interface DiscoverAuthorizationOptions {\n /** Allow http:// and private-IP probe targets. Default false. */\n allowPrivateIp?: boolean;\n /** Override per-probe HTTP timeout (ms). Default inherits from ssrfSafeFetch (10s). */\n timeoutMs?: number;\n /** Scoped fetch implementation for the agent, PRM, and AS metadata probes. */\n fetchFn?: typeof fetch;\n /**\n * If provided, use this `WWW-Authenticate` header verbatim instead of\n * re-probing the agent. Use this when you already have a 401 response in\n * hand and want to avoid a second round-trip.\n */\n wwwAuthenticate?: string;\n}\n\n/**\n * Walk the OAuth discovery chain starting from an agent URL. Returns\n * `AuthorizationRequirements` when the agent demands OAuth, or `null` when a\n * `tools/list` call succeeds without credentials.\n *\n * Strategy:\n * 1. POST `tools/list` to the agent with no `Authorization` header.\n * 2. If 401 + `WWW-Authenticate: Bearer`: parse the challenge.\n * 3. If the challenge carries `resource_metadata=…`: GET it and read\n * `resource` + `authorization_servers`.\n * 4. For the first `authorization_servers[0]`: GET `/.well-known/oauth-authorization-server`\n * and read `authorization_endpoint`, `token_endpoint`, `registration_endpoint`,\n * `scopes_supported`.\n * 5. Return a structured record.\n *\n * Anything missing from the chain surfaces as `undefined` on the result —\n * callers can still present a partial picture without re-probing.\n */\nexport async function discoverAuthorizationRequirements(\n agentUrl: string,\n options: DiscoverAuthorizationOptions = {}\n): Promise<AuthorizationRequirements | null> {\n // `allowPrivateIp` authorizes the agent probe. Chain hops (PRM, AS\n // metadata) inherit that trust ONLY when they share the agent's origin —\n // a compromised agent that advertises a private-IP authorization server\n // on a different origin would otherwise pivot a discovery walk into the\n // host's internal network.\n const allowPrivateIpOnAgent = options.allowPrivateIp ?? false;\n const agentOrigin = originOf(agentUrl);\n const allowPrivateIpForHop = (url: string): boolean =>\n allowPrivateIpOnAgent && agentOrigin !== undefined && originOf(url) === agentOrigin;\n\n let challengeHeader = options.wwwAuthenticate;\n if (!challengeHeader) {\n const probe = await probeAgent401(agentUrl, allowPrivateIpOnAgent, options.timeoutMs, options.fetchFn);\n if (probe.status !== 401) {\n // 200, 403, 5xx, or network error — not an OAuth 401 we can act on.\n return null;\n }\n challengeHeader = probe.wwwAuthenticate;\n }\n\n const challenge = parseWWWAuthenticate(challengeHeader ?? null);\n if (!challenge || challenge.scheme !== 'bearer') {\n // A 401 without a Bearer challenge isn't our kind of problem — let it propagate.\n return null;\n }\n\n const requirements: AuthorizationRequirements = {\n agentUrl,\n resourceMetadataUrl: challenge.resource_metadata ? sanitizeDisplay(challenge.resource_metadata) : undefined,\n challengeScope: challenge.scope ? sanitizeDisplay(challenge.scope) : undefined,\n challenge: sanitizeChallenge(challenge),\n };\n\n // Walk protected-resource metadata (RFC 9728 §3). Private-IP targets are\n // only allowed when the hop's origin matches the agent's.\n if (challenge.resource_metadata && isSafeHttpUrl(challenge.resource_metadata)) {\n const prm = await fetchJson(\n challenge.resource_metadata,\n allowPrivateIpForHop(challenge.resource_metadata),\n options.timeoutMs,\n options.fetchFn\n );\n if (prm && typeof prm === 'object') {\n const resource = (prm as { resource?: unknown }).resource;\n const servers = (prm as { authorization_servers?: unknown }).authorization_servers;\n if (typeof resource === 'string') requirements.resource = sanitizeDisplay(resource);\n if (Array.isArray(servers)) {\n const validServers = servers\n .filter((s: unknown): s is string => typeof s === 'string' && isSafeHttpUrl(s))\n .map(sanitizeDisplay);\n if (validServers.length > 0) {\n requirements.authorizationServers = validServers;\n requirements.authorizationServer = validServers[0];\n }\n }\n }\n }\n\n // Walk authorization-server metadata using the first issuer. RFC 8414 §3\n // first, then OIDC Discovery 1.0 fallback for AS deployments (Keycloak in\n // OIDC mode, Ping, ADFS) that only publish at\n // `{issuer}/.well-known/openid-configuration`.\n if (requirements.authorizationServer) {\n const asUrl = buildAuthorizationServerMetadataUrl(requirements.authorizationServer);\n let md: Record<string, unknown> | undefined;\n let source: 'rfc-8414' | 'openid-configuration' | undefined;\n if (asUrl) {\n const res = await fetchJson(asUrl, allowPrivateIpForHop(asUrl), options.timeoutMs, options.fetchFn);\n if (res && typeof res === 'object') {\n md = res as Record<string, unknown>;\n source = 'rfc-8414';\n }\n }\n if (!md) {\n const oidcUrl = buildOidcDiscoveryUrl(requirements.authorizationServer);\n if (oidcUrl) {\n const res = await fetchJson(oidcUrl, allowPrivateIpForHop(oidcUrl), options.timeoutMs, options.fetchFn);\n if (res && typeof res === 'object') {\n md = res as Record<string, unknown>;\n source = 'openid-configuration';\n }\n }\n }\n if (md) {\n requirements.metadataSource = source;\n if (typeof md.authorization_endpoint === 'string') {\n requirements.authorizationEndpoint = sanitizeDisplay(md.authorization_endpoint);\n }\n if (typeof md.token_endpoint === 'string') {\n requirements.tokenEndpoint = sanitizeDisplay(md.token_endpoint);\n }\n if (typeof md.registration_endpoint === 'string') {\n requirements.registrationEndpoint = sanitizeDisplay(md.registration_endpoint);\n }\n if (Array.isArray(md.scopes_supported)) {\n const scopes = md.scopes_supported\n .filter((s: unknown): s is string => typeof s === 'string')\n .slice(0, MAX_SCOPES)\n .map(sanitizeDisplay);\n if (scopes.length > 0) requirements.scopesSupported = scopes;\n }\n if (Array.isArray(md.grant_types_supported)) {\n const grants = md.grant_types_supported\n .filter((g: unknown): g is string => typeof g === 'string')\n .slice(0, 32)\n .map(sanitizeDisplay);\n if (grants.length > 0) requirements.grantTypesSupported = grants;\n }\n }\n }\n\n return requirements;\n}\n\n/**\n * Probe the agent for the parsed `WWW-Authenticate` challenge on a 401.\n *\n * Where `discoverAuthorizationRequirements` walks the full RFC 9728 → 8414\n * chain for Bearer/OAuth challenges, this helper is the catch-all: it works\n * for ANY scheme (Basic, Digest, Bearer-without-PRM, …) and returns the\n * structured challenge so callers can surface scheme-specific remediation\n * (e.g. \"use `--auth-scheme basic`\" when the gateway speaks RFC 7617).\n *\n * Returns `null` when the agent isn't responding with a 401, or when the\n * response carries no parseable `WWW-Authenticate`. Reuses `probeAgent401`\n * so the SSRF gate and timeout policy stay consistent with the OAuth path.\n */\nexport async function probeAuthChallenge(\n agentUrl: string,\n options: { allowPrivateIp?: boolean; timeoutMs?: number; fetchFn?: typeof fetch } = {}\n): Promise<WWWAuthenticateChallenge | null> {\n const probe = await probeAgent401(agentUrl, options.allowPrivateIp ?? false, options.timeoutMs, options.fetchFn);\n if (probe.status !== 401) return null;\n return parseWWWAuthenticate(probe.wwwAuthenticate ?? null);\n}\n\n/**\n * Fire a single unauthenticated `tools/list` at the agent and return the\n * status + `WWW-Authenticate` header. Used when the caller hasn't provided\n * a cached 401 response.\n */\nasync function probeAgent401(\n agentUrl: string,\n allowPrivateIp: boolean,\n timeoutMs?: number,\n fetchFn?: typeof fetch\n): Promise<{ status: number; wwwAuthenticate?: string }> {\n const body = JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'tools/list' });\n try {\n const res = await ssrfSafeFetch(agentUrl, {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n accept: 'application/json',\n },\n body,\n allowPrivateIp,\n ...(timeoutMs !== undefined ? { timeoutMs } : {}),\n ...(fetchFn ? { trustedFetchFn: fetchFn } : {}),\n });\n return { status: res.status, wwwAuthenticate: res.headers['www-authenticate'] };\n } catch {\n return { status: 0 };\n }\n}\n\n/**\n * Check a URL is an absolute `http:`/`https:` URL before we hand it to\n * `ssrfSafeFetch`. Defeats `javascript:`, `file:`, `data:`, etc. the agent\n * might echo back in PRM or AS metadata. `ssrfSafeFetch` refuses non-HTTP\n * schemes too, but failing fast here gives a cleaner discovery flow and\n * avoids surfacing scheme errors as mysterious discovery misses.\n */\nfunction originOf(value: string): string | undefined {\n try {\n return new URL(value).origin;\n } catch {\n return undefined;\n }\n}\n\nfunction isSafeHttpUrl(value: string): boolean {\n try {\n const u = new URL(value);\n return u.protocol === 'https:' || u.protocol === 'http:';\n } catch {\n return false;\n }\n}\n\n/**\n * Build the authorization-server metadata URL for an issuer per RFC 8414 §3.\n *\n * For issuer `https://as.example.com/tenant1`, metadata lives at\n * `https://as.example.com/.well-known/oauth-authorization-server/tenant1`\n * (well-known prefix inserted BEFORE the issuer path, not after). This\n * matches how the MCP SDK and most authorization servers advertise metadata.\n */\nfunction buildAuthorizationServerMetadataUrl(issuer: string): string | undefined {\n if (!isSafeHttpUrl(issuer)) return undefined;\n const u = new URL(issuer);\n const pathname = u.pathname.endsWith('/') ? u.pathname.slice(0, -1) : u.pathname;\n return `${u.origin}/.well-known/oauth-authorization-server${pathname}`;\n}\n\n/**\n * OpenID Connect Discovery 1.0 fallback URL. Some authorization servers\n * (Keycloak in OIDC mode, Ping, ADFS) only publish metadata at\n * `{issuer}/.well-known/openid-configuration` — path *suffixed*, not\n * prefixed. The OIDC discovery doc carries `token_endpoint`,\n * `authorization_endpoint`, and `grant_types_supported` with the same\n * semantics as RFC 8414, so it's a safe read-through when the RFC 8414\n * probe misses.\n */\nfunction buildOidcDiscoveryUrl(issuer: string): string | undefined {\n if (!isSafeHttpUrl(issuer)) return undefined;\n const u = new URL(issuer);\n const base = u.pathname.endsWith('/') ? `${u.origin}${u.pathname.slice(0, -1)}` : `${u.origin}${u.pathname}`;\n return `${base}/.well-known/openid-configuration`;\n}\n\nasync function fetchJson(\n url: string,\n allowPrivateIp: boolean,\n timeoutMs?: number,\n fetchFn?: typeof fetch\n): Promise<unknown> {\n try {\n const res = await ssrfSafeFetch(url, {\n method: 'GET',\n headers: { accept: 'application/json' },\n allowPrivateIp,\n ...(timeoutMs !== undefined ? { timeoutMs } : {}),\n ...(fetchFn ? { trustedFetchFn: fetchFn } : {}),\n });\n if (res.status !== 200) return undefined;\n return decodeBodyAsJsonOrText(res.body, res.headers['content-type']);\n } catch {\n return undefined;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA,iBAAsD;AACtD,oBAAoE;AACpE,yBAAoE;AAQpE,MAAM,qBAAqB;AAM3B,MAAM,aAAa;AAOnB,MAAM,uBAAuB;AAQ7B,SAAS,gBAAgB,OAAuB;AAC9C,QAAM,WAAW,MAAM,QAAQ,6BAA6B,EAAE;AAC9D,MAAI,SAAS,UAAU,mBAAoB,QAAO;AAClD,SAAO,GAAG,SAAS,MAAM,GAAG,qBAAqB,CAAC,CAAC;AACrD;AAYA,SAAS,kBAAkB,GAAuD;AAChF,QAAM,SAAiC,CAAC;AACxC,aAAW,CAAC,GAAG,CAAC,KAAK,OAAO,QAAQ,EAAE,MAAM,GAAG;AAC7C,QAAI,OAAO,KAAK,MAAM,EAAE,UAAU,qBAAsB;AACxD,WAAO,CAAC,IAAI,gBAAgB,CAAC;AAAA,EAC/B;AACA,SAAO;AAAA,IACL,QAAQ,EAAE;AAAA,IACV,GAAI,EAAE,UAAU,SAAY,EAAE,OAAO,gBAAgB,EAAE,KAAK,EAAE,IAAI,CAAC;AAAA,IACnE,GAAI,EAAE,UAAU,SAAY,EAAE,OAAO,gBAAgB,EAAE,KAAK,EAAE,IAAI,CAAC;AAAA,IACnE,GAAI,EAAE,sBAAsB,SAAY,EAAE,mBAAmB,gBAAgB,EAAE,iBAAiB,EAAE,IAAI,CAAC;AAAA,IACvG,GAAI,EAAE,UAAU,SAAY,EAAE,OAAO,gBAAgB,EAAE,KAAK,EAAE,IAAI,CAAC;AAAA,IACnE,GAAI,EAAE,sBAAsB,SAAY,EAAE,m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AAS,sBAAsB,QAAoC;AACjE,MAAI,CAAC,cAAc,MAAM,EAAG,QAAO;AACnC,QAAM,IAAI,IAAI,IAAI,MAAM;AACxB,QAAM,OAAO,EAAE,SAAS,SAAS,GAAG,IAAI,GAAG,EAAE,MAAM,GAAG,EAAE,SAAS,MAAM,GAAG,EAAE,CAAC,KAAK,GAAG,EAAE,MAAM,GAAG,EAAE,QAAQ;AAC1G,SAAO,GAAG,IAAI;AAChB;AAEA,eAAe,UACb,KACA,gBACA,WACA,SACkB;AAClB,MAAI;AACF,UAAM,MAAM,UAAM,0BAAc,KAAK;AAAA,MACnC,QAAQ;AAAA,MACR,SAAS,EAAE,QAAQ,mBAAmB;AAAA,MACtC;AAAA,MACA,GAAI,cAAc,SAAY,EAAE,UAAU,IAAI,CAAC;AAAA,MAC/C,GAAI,UAAU,EAAE,gBAAgB,QAAQ,IAAI,CAAC;AAAA,IAC/C,CAAC;AACD,QAAI,IAAI,WAAW,IAAK,QAAO;AAC/B,eAAO,mCAAuB,IAAI,MAAM,IAAI,QAAQ,cAAc,CAAC;AAAA,EACrE,QAAQ;AACN,WAAO;AAAA,EACT;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../../src/lib/auth/oauth/authorization-required.ts"],"sourcesContent":["/**\n * Zero-config OAuth discovery + actionable authorization errors.\n *\n * When a library consumer calls an OAuth-gated MCP agent without saved\n * credentials, they get a `NeedsAuthorizationError` containing everything\n * needed to either run an interactive flow or present a clear prompt — no\n * re-probing required.\n *\n * Design note: this module only *discovers* — it never opens a browser or\n * writes state. Interactive flow handling stays in the caller (CLI or a\n * bespoke `OAuthFlowHandler`) so library behavior is predictable.\n */\nimport { ssrfSafeFetch, decodeBodyAsJsonOrText } from '../../net';\nimport { AuthenticationRequiredError, type OAuthMetadataInfo } from '../../errors';\nimport { throwIfAborted } from '../../protocols/abort';\nimport { parseWWWAuthenticate, type WWWAuthenticateChallenge } from './diagnostics';\n\n/**\n * Maximum length of an individual server-supplied string we copy into the\n * `AuthorizationRequirements` payload. Anything longer is truncated with a\n * `…` suffix so hostile agents can't smuggle megabyte error-descriptions\n * into operator-facing prompts and logs.\n */\nconst MAX_DISPLAY_STRING = 256;\n\n/**\n * Maximum number of scope strings we copy into `scopesSupported`. RFC 8414\n * allows an unbounded array; hostile servers have sent thousands.\n */\nconst MAX_SCOPES = 64;\n\n/**\n * Maximum number of auth-params we preserve under `challenge.params`. Bounds\n * memory pressure from hostile servers that pack the `WWW-Authenticate`\n * header with unknown auth-params.\n */\nconst MAX_CHALLENGE_PARAMS = 32;\n\n/**\n * Strip ASCII control characters (excluding TAB) from a server-supplied\n * string that may be shown to a human. Defeats terminal-hijack tricks like\n * `\\x1b]0;pwned\\x07` (rewrites terminal title), `\\r` (overwrites prompt),\n * and `\\x1b[2J` (clears screen). Also truncates over-long values.\n */\nfunction sanitizeDisplay(value: string): string {\n const stripped = value.replace(/[\\x00-\\x08\\x0b-\\x1f\\x7f]/g, '');\n if (stripped.length <= MAX_DISPLAY_STRING) return stripped;\n return `${stripped.slice(0, MAX_DISPLAY_STRING - 1)}…`;\n}\n\n/**\n * Sanitize the parsed `WWW-Authenticate` challenge before embedding it in a\n * `NeedsAuthorizationError`. Consumers that render `requirements.challenge`\n * to a terminal should never see control characters. Caps `params` count to\n * bound hostile servers.\n *\n * The `scheme` is already lowercased + token-constrained by the parser.\n * Param keys are also token-constrained so they're safe; only values need\n * sanitizing.\n */\nfunction sanitizeChallenge(c: WWWAuthenticateChallenge): WWWAuthenticateChallenge {\n const params: Record<string, string> = {};\n for (const [k, v] of Object.entries(c.params)) {\n if (Object.keys(params).length >= MAX_CHALLENGE_PARAMS) break;\n params[k] = sanitizeDisplay(v);\n }\n return {\n scheme: c.scheme,\n ...(c.realm !== undefined ? { realm: sanitizeDisplay(c.realm) } : {}),\n ...(c.error !== undefined ? { error: sanitizeDisplay(c.error) } : {}),\n ...(c.error_description !== undefined ? { error_description: sanitizeDisplay(c.error_description) } : {}),\n ...(c.scope !== undefined ? { scope: sanitizeDisplay(c.scope) } : {}),\n ...(c.resource_metadata !== undefined ? { resource_metadata: sanitizeDisplay(c.resource_metadata) } : {}),\n params,\n };\n}\n\n/**\n * Structured description of what an agent's authorization server requires\n * before it will accept a `tools/call`. Produced by\n * {@link discoverAuthorizationRequirements}.\n */\nexport interface AuthorizationRequirements {\n /** The agent URL we probed. */\n agentUrl: string;\n /** Resource URL the agent advertises in its `WWW-Authenticate` / PRM (RFC 9728). */\n resource?: string;\n /** URL of the protected-resource-metadata document (from `WWW-Authenticate: resource_metadata=…`). */\n resourceMetadataUrl?: string;\n /** First `authorization_servers[0]` from the protected-resource metadata. */\n authorizationServer?: string;\n /**\n * All `authorization_servers` advertised by the PRM, in declaration order.\n * The walker only probes `[0]` (PRM preference order — see RFC 9728 §3.3);\n * the full list is exposed so callers can surface multi-issuer deployments\n * in diagnostics. A length > 1 is uncommon and worth flagging to the\n * operator — typically a federation partner or a staged migration.\n */\n authorizationServers?: string[];\n /** `authorization_endpoint` from the authorization-server metadata (RFC 8414). */\n authorizationEndpoint?: string;\n /** `token_endpoint` from the authorization-server metadata. */\n tokenEndpoint?: string;\n /** `registration_endpoint` if the AS supports RFC 7591 dynamic client registration. */\n registrationEndpoint?: string;\n /** Scopes advertised by the AS (RFC 8414 `scopes_supported`). */\n scopesSupported?: string[];\n /**\n * `grant_types_supported` advertised by the AS (RFC 8414). `undefined` when\n * the AS didn't publish the field — per RFC 8414 that defaults to\n * `[\"authorization_code\", \"implicit\"]`. Clients should treat absence as\n * \"unknown, try your grant and see,\" not as proof the grant is unsupported.\n */\n grantTypesSupported?: string[];\n /** True when the AS metadata came from the OIDC fallback URL rather than RFC 8414. */\n metadataSource?: 'rfc-8414' | 'openid-configuration';\n /** Scope hinted in the `WWW-Authenticate` challenge's `scope` auth-param. */\n challengeScope?: string;\n /** Raw parsed challenge the agent returned on the 401. */\n challenge: WWWAuthenticateChallenge;\n}\n\n/**\n * Error raised when an agent returns a 401 and we do not have credentials\n * to satisfy it. Carries everything needed to run an interactive OAuth flow\n * or show the operator an actionable prompt.\n *\n * Extends {@link AuthenticationRequiredError} so existing callers that catch\n * `AuthenticationRequiredError` automatically receive the richer variant —\n * they can downcast with `instanceof NeedsAuthorizationError` when they\n * want walked discovery metadata.\n *\n * Note on `code` vs `subCode`:\n * The parent class declares `readonly code = 'AUTHENTICATION_REQUIRED'` as\n * a class field that re-initializes on every construction, so a child-side\n * override attempt is silently overwritten under `useDefineForClassFields`.\n * The narrow discriminator is exposed as `subCode` — prefer\n * `instanceof NeedsAuthorizationError` for type-narrowing and use `subCode`\n * only for structured-log keying.\n *\n * Note on `hasOAuth`:\n * The inherited getter returns `true` only when both `authorization_endpoint`\n * and `token_endpoint` were walked successfully. A partially-walked\n * requirements record (PRM reachable but AS metadata missing) still yields\n * `hasOAuth === false` even though `requirements.authorizationServer` is set.\n * Treat it as \"we have enough to start a flow,\" not \"server wants OAuth.\"\n */\nexport class NeedsAuthorizationError extends AuthenticationRequiredError {\n /** Narrow discriminator for consumers that already know about this class. */\n readonly subCode = 'needs_authorization' as const;\n readonly requirements: AuthorizationRequirements;\n\n constructor(requirements: AuthorizationRequirements, message?: string) {\n super(requirements.agentUrl, synthesizeOAuthMetadata(requirements), message ?? defaultMessage(requirements));\n this.name = 'NeedsAuthorizationError';\n this.requirements = requirements;\n // Extend the parent's `details` payload so structured-logging consumers\n // that read `err.details` (via `extractErrorInfo` or equivalent) see the\n // full walked chain, not just the synthesized one-hop oauthMetadata.\n this.details = { ...(this.details as object | undefined), requirements };\n }\n}\n\n/**\n * Build an {@link OAuthMetadataInfo} for the base-class constructor so that\n * legacy callers still see a non-empty `oauthMetadata` + working\n * `hasOAuth`/`authorizationUrl` getters on the error. When discovery didn't\n * yield enough info, return undefined and let the base class degrade\n * gracefully.\n */\nfunction synthesizeOAuthMetadata(req: AuthorizationRequirements): OAuthMetadataInfo | undefined {\n if (!req.authorizationEndpoint || !req.tokenEndpoint) return undefined;\n return {\n authorization_endpoint: req.authorizationEndpoint,\n token_endpoint: req.tokenEndpoint,\n ...(req.registrationEndpoint ? { registration_endpoint: req.registrationEndpoint } : {}),\n ...(req.authorizationServer ? { issuer: req.authorizationServer } : {}),\n };\n}\n\nfunction defaultMessage(req: AuthorizationRequirements): string {\n const parts = [`Agent ${sanitizeDisplay(req.agentUrl)} requires OAuth authorization.`];\n if (req.authorizationServer) {\n parts.push(`Authorization server: ${req.authorizationServer}.`);\n }\n if (req.challenge.error_description) {\n parts.push(`Server said: ${sanitizeDisplay(req.challenge.error_description)}.`);\n }\n parts.push('Provide an OAuthFlowHandler or run an interactive flow to complete authorization.');\n return parts.join(' ');\n}\n\n/**\n * Options for {@link discoverAuthorizationRequirements}.\n */\nexport interface DiscoverAuthorizationOptions {\n /** Allow http:// and private-IP probe targets. Default false. */\n allowPrivateIp?: boolean;\n /** Override per-probe HTTP timeout (ms). Default inherits from ssrfSafeFetch (10s). */\n timeoutMs?: number;\n /** Scoped fetch implementation for the agent, PRM, and AS metadata probes. */\n fetchFn?: typeof fetch;\n /** Caller cancellation, including the absolute task deadline. */\n signal?: AbortSignal;\n /**\n * If provided, use this `WWW-Authenticate` header verbatim instead of\n * re-probing the agent. Use this when you already have a 401 response in\n * hand and want to avoid a second round-trip.\n */\n wwwAuthenticate?: string;\n}\n\n/**\n * Walk the OAuth discovery chain starting from an agent URL. Returns\n * `AuthorizationRequirements` when the agent demands OAuth, or `null` when a\n * `tools/list` call succeeds without credentials.\n *\n * Strategy:\n * 1. POST `tools/list` to the agent with no `Authorization` header.\n * 2. If 401 + `WWW-Authenticate: Bearer`: parse the challenge.\n * 3. If the challenge carries `resource_metadata=…`: GET it and read\n * `resource` + `authorization_servers`.\n * 4. For the first `authorization_servers[0]`: GET `/.well-known/oauth-authorization-server`\n * and read `authorization_endpoint`, `token_endpoint`, `registration_endpoint`,\n * `scopes_supported`.\n * 5. Return a structured record.\n *\n * Anything missing from the chain surfaces as `undefined` on the result —\n * callers can still present a partial picture without re-probing.\n */\nexport async function discoverAuthorizationRequirements(\n agentUrl: string,\n options: DiscoverAuthorizationOptions = {}\n): Promise<AuthorizationRequirements | null> {\n // `allowPrivateIp` authorizes the agent probe. Chain hops (PRM, AS\n // metadata) inherit that trust ONLY when they share the agent's origin —\n // a compromised agent that advertises a private-IP authorization server\n // on a different origin would otherwise pivot a discovery walk into the\n // host's internal network.\n const allowPrivateIpOnAgent = options.allowPrivateIp ?? false;\n const agentOrigin = originOf(agentUrl);\n const allowPrivateIpForHop = (url: string): boolean =>\n allowPrivateIpOnAgent && agentOrigin !== undefined && originOf(url) === agentOrigin;\n\n let challengeHeader = options.wwwAuthenticate;\n if (!challengeHeader) {\n const probe = await probeAgent401(\n agentUrl,\n allowPrivateIpOnAgent,\n options.timeoutMs,\n options.fetchFn,\n options.signal\n );\n if (probe.status !== 401) {\n // 200, 403, 5xx, or network error — not an OAuth 401 we can act on.\n return null;\n }\n challengeHeader = probe.wwwAuthenticate;\n }\n\n const challenge = parseWWWAuthenticate(challengeHeader ?? null);\n if (!challenge || challenge.scheme !== 'bearer') {\n // A 401 without a Bearer challenge isn't our kind of problem — let it propagate.\n return null;\n }\n\n const requirements: AuthorizationRequirements = {\n agentUrl,\n resourceMetadataUrl: challenge.resource_metadata ? sanitizeDisplay(challenge.resource_metadata) : undefined,\n challengeScope: challenge.scope ? sanitizeDisplay(challenge.scope) : undefined,\n challenge: sanitizeChallenge(challenge),\n };\n\n // Walk protected-resource metadata (RFC 9728 §3). Private-IP targets are\n // only allowed when the hop's origin matches the agent's.\n if (challenge.resource_metadata && isSafeHttpUrl(challenge.resource_metadata)) {\n const prm = await fetchJson(\n challenge.resource_metadata,\n allowPrivateIpForHop(challenge.resource_metadata),\n options.timeoutMs,\n options.fetchFn,\n options.signal\n );\n if (prm && typeof prm === 'object') {\n const resource = (prm as { resource?: unknown }).resource;\n const servers = (prm as { authorization_servers?: unknown }).authorization_servers;\n if (typeof resource === 'string') requirements.resource = sanitizeDisplay(resource);\n if (Array.isArray(servers)) {\n const validServers = servers\n .filter((s: unknown): s is string => typeof s === 'string' && isSafeHttpUrl(s))\n .map(sanitizeDisplay);\n if (validServers.length > 0) {\n requirements.authorizationServers = validServers;\n requirements.authorizationServer = validServers[0];\n }\n }\n }\n }\n\n // Walk authorization-server metadata using the first issuer. RFC 8414 §3\n // first, then OIDC Discovery 1.0 fallback for AS deployments (Keycloak in\n // OIDC mode, Ping, ADFS) that only publish at\n // `{issuer}/.well-known/openid-configuration`.\n if (requirements.authorizationServer) {\n const asUrl = buildAuthorizationServerMetadataUrl(requirements.authorizationServer);\n let md: Record<string, unknown> | undefined;\n let source: 'rfc-8414' | 'openid-configuration' | undefined;\n if (asUrl) {\n const res = await fetchJson(\n asUrl,\n allowPrivateIpForHop(asUrl),\n options.timeoutMs,\n options.fetchFn,\n options.signal\n );\n if (res && typeof res === 'object') {\n md = res as Record<string, unknown>;\n source = 'rfc-8414';\n }\n }\n if (!md) {\n const oidcUrl = buildOidcDiscoveryUrl(requirements.authorizationServer);\n if (oidcUrl) {\n const res = await fetchJson(\n oidcUrl,\n allowPrivateIpForHop(oidcUrl),\n options.timeoutMs,\n options.fetchFn,\n options.signal\n );\n if (res && typeof res === 'object') {\n md = res as Record<string, unknown>;\n source = 'openid-configuration';\n }\n }\n }\n if (md) {\n requirements.metadataSource = source;\n if (typeof md.authorization_endpoint === 'string') {\n requirements.authorizationEndpoint = sanitizeDisplay(md.authorization_endpoint);\n }\n if (typeof md.token_endpoint === 'string') {\n requirements.tokenEndpoint = sanitizeDisplay(md.token_endpoint);\n }\n if (typeof md.registration_endpoint === 'string') {\n requirements.registrationEndpoint = sanitizeDisplay(md.registration_endpoint);\n }\n if (Array.isArray(md.scopes_supported)) {\n const scopes = md.scopes_supported\n .filter((s: unknown): s is string => typeof s === 'string')\n .slice(0, MAX_SCOPES)\n .map(sanitizeDisplay);\n if (scopes.length > 0) requirements.scopesSupported = scopes;\n }\n if (Array.isArray(md.grant_types_supported)) {\n const grants = md.grant_types_supported\n .filter((g: unknown): g is string => typeof g === 'string')\n .slice(0, 32)\n .map(sanitizeDisplay);\n if (grants.length > 0) requirements.grantTypesSupported = grants;\n }\n }\n }\n\n return requirements;\n}\n\n/**\n * Probe the agent for the parsed `WWW-Authenticate` challenge on a 401.\n *\n * Where `discoverAuthorizationRequirements` walks the full RFC 9728 → 8414\n * chain for Bearer/OAuth challenges, this helper is the catch-all: it works\n * for ANY scheme (Basic, Digest, Bearer-without-PRM, …) and returns the\n * structured challenge so callers can surface scheme-specific remediation\n * (e.g. \"use `--auth-scheme basic`\" when the gateway speaks RFC 7617).\n *\n * Returns `null` when the agent isn't responding with a 401, or when the\n * response carries no parseable `WWW-Authenticate`. Reuses `probeAgent401`\n * so the SSRF gate and timeout policy stay consistent with the OAuth path.\n */\nexport async function probeAuthChallenge(\n agentUrl: string,\n options: { allowPrivateIp?: boolean; timeoutMs?: number; fetchFn?: typeof fetch; signal?: AbortSignal } = {}\n): Promise<WWWAuthenticateChallenge | null> {\n const probe = await probeAgent401(\n agentUrl,\n options.allowPrivateIp ?? false,\n options.timeoutMs,\n options.fetchFn,\n options.signal\n );\n if (probe.status !== 401) return null;\n return parseWWWAuthenticate(probe.wwwAuthenticate ?? null);\n}\n\n/**\n * Fire a single unauthenticated `tools/list` at the agent and return the\n * status + `WWW-Authenticate` header. Used when the caller hasn't provided\n * a cached 401 response.\n */\nasync function probeAgent401(\n agentUrl: string,\n allowPrivateIp: boolean,\n timeoutMs?: number,\n fetchFn?: typeof fetch,\n signal?: AbortSignal\n): Promise<{ status: number; wwwAuthenticate?: string }> {\n const body = JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'tools/list' });\n try {\n const res = await ssrfSafeFetch(agentUrl, {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n accept: 'application/json',\n },\n body,\n allowPrivateIp,\n signal,\n ...(timeoutMs !== undefined ? { timeoutMs } : {}),\n ...(fetchFn ? { trustedFetchFn: fetchFn } : {}),\n });\n return { status: res.status, wwwAuthenticate: res.headers['www-authenticate'] };\n } catch {\n throwIfAborted(signal);\n return { status: 0 };\n }\n}\n\n/**\n * Check a URL is an absolute `http:`/`https:` URL before we hand it to\n * `ssrfSafeFetch`. Defeats `javascript:`, `file:`, `data:`, etc. the agent\n * might echo back in PRM or AS metadata. `ssrfSafeFetch` refuses non-HTTP\n * schemes too, but failing fast here gives a cleaner discovery flow and\n * avoids surfacing scheme errors as mysterious discovery misses.\n */\nfunction originOf(value: string): string | undefined {\n try {\n return new URL(value).origin;\n } catch {\n return undefined;\n }\n}\n\nfunction isSafeHttpUrl(value: string): boolean {\n try {\n const u = new URL(value);\n return u.protocol === 'https:' || u.protocol === 'http:';\n } catch {\n return false;\n }\n}\n\n/**\n * Build the authorization-server metadata URL for an issuer per RFC 8414 §3.\n *\n * For issuer `https://as.example.com/tenant1`, metadata lives at\n * `https://as.example.com/.well-known/oauth-authorization-server/tenant1`\n * (well-known prefix inserted BEFORE the issuer path, not after). This\n * matches how the MCP SDK and most authorization servers advertise metadata.\n */\nfunction buildAuthorizationServerMetadataUrl(issuer: string): string | undefined {\n if (!isSafeHttpUrl(issuer)) return undefined;\n const u = new URL(issuer);\n const pathname = u.pathname.endsWith('/') ? u.pathname.slice(0, -1) : u.pathname;\n return `${u.origin}/.well-known/oauth-authorization-server${pathname}`;\n}\n\n/**\n * OpenID Connect Discovery 1.0 fallback URL. Some authorization servers\n * (Keycloak in OIDC mode, Ping, ADFS) only publish metadata at\n * `{issuer}/.well-known/openid-configuration` — path *suffixed*, not\n * prefixed. The OIDC discovery doc carries `token_endpoint`,\n * `authorization_endpoint`, and `grant_types_supported` with the same\n * semantics as RFC 8414, so it's a safe read-through when the RFC 8414\n * probe misses.\n */\nfunction buildOidcDiscoveryUrl(issuer: string): string | undefined {\n if (!isSafeHttpUrl(issuer)) return undefined;\n const u = new URL(issuer);\n const base = u.pathname.endsWith('/') ? `${u.origin}${u.pathname.slice(0, -1)}` : `${u.origin}${u.pathname}`;\n return `${base}/.well-known/openid-configuration`;\n}\n\nasync function fetchJson(\n url: string,\n allowPrivateIp: boolean,\n timeoutMs?: number,\n fetchFn?: typeof fetch,\n signal?: AbortSignal\n): Promise<unknown> {\n try {\n const res = await ssrfSafeFetch(url, {\n method: 'GET',\n headers: { accept: 'application/json' },\n allowPrivateIp,\n signal,\n ...(timeoutMs !== undefined ? { timeoutMs } : {}),\n ...(fetchFn ? { trustedFetchFn: fetchFn } : {}),\n });\n if (res.status !== 200) return undefined;\n return decodeBodyAsJsonOrText(res.body, res.headers['content-type']);\n } catch {\n throwIfAborted(signal);\n return undefined;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA,iBAAsD;AACtD,oBAAoE;AACpE,mBAA+B;AAC/B,yBAAoE;AAQpE,MAAM,qBAAqB;AAM3B,MAAM,aAAa;AAOnB,MAAM,uBAAuB;AAQ7B,SAAS,gBAAgB,OAAuB;AAC9C,QAAM,WAAW,MAAM,QAAQ,6BAA6B,EAAE;AAC9D,MAAI,SAAS,UAAU,mBAAoB,QAAO;AAClD,SAAO,GAAG,SAAS,MAAM,GAAG,qBAAqB,CAAC,CAAC;AACrD;AAYA,SAAS,kBAAkB,GAAuD;AAChF,QAAM,SAAiC,CAAC;AACxC,aAAW,CAAC,GAAG,CAAC,KAAK,OAAO,QAAQ,EAAE,MAAM,GAAG;AAC7C,QAAI,OAAO,KAAK,MAAM,EAAE,UAAU,qBAAsB;AACxD,WAAO,CAAC,IAAI,gBAAgB,CAAC;AAAA,EAC/B;AACA,SAAO;AAAA,IACL,QAAQ,EAAE;AAAA,IACV,GAAI,EAAE,UAAU,SAAY,EAAE,OAAO,gBAAgB,EAAE,KAAK,EAAE,IAAI,CAAC;AAAA,IACnE,GAAI,EAAE,UAAU,SAAY,EAAE,OAAO,gBAAgB,EAAE,KAAK,EAAE,IAAI,CAAC;AAAA,IACnE,GAAI,EAAE,sBAAsB,SAAY,EAAE,mBAAmB,gBAAgB,EAAE,iBAAiB,EAA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