@adcp/sdk 13.0.0-rc.6 → 13.0.0-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ADCP_VERSION +1 -1
- package/bin/adcp.js +29 -0
- package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/index.yaml +1 -0
- package/compliance/cache/{3.1.8.previous/protocols → 3.1.11/domains}/media-buy/scenarios/creative_fate_after_cancellation.yaml +46 -24
- package/compliance/cache/3.1.11/domains/media-buy/scenarios/dependency_impairment_audience.yaml +317 -0
- package/compliance/cache/{3.1.8 → 3.1.11}/index.json +3 -3
- package/compliance/cache/{3.1.8.previous/domains → 3.1.11/protocols}/media-buy/index.yaml +1 -0
- package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/creative_fate_after_cancellation.yaml +46 -24
- package/compliance/cache/3.1.11/protocols/media-buy/scenarios/dependency_impairment_audience.yaml +317 -0
- package/compliance/cache/{3.1.8.previous → 3.1.11}/universal/runner-output-contract.yaml +1 -1
- package/compliance/cache/{3.1.8 → 3.1.11}/universal/storyboard-schema.yaml +19 -6
- package/compliance/cache/{3.1.8/protocols → 3.1.11.previous/domains}/media-buy/index.yaml +1 -0
- package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/creative_fate_after_cancellation.yaml +46 -24
- package/compliance/cache/3.1.11.previous/domains/media-buy/scenarios/dependency_impairment_audience.yaml +317 -0
- package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/index.json +3 -3
- package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/index.yaml +1 -0
- package/compliance/cache/{3.1.8/domains → 3.1.11.previous/protocols}/media-buy/scenarios/creative_fate_after_cancellation.yaml +46 -24
- package/compliance/cache/3.1.11.previous/protocols/media-buy/scenarios/dependency_impairment_audience.yaml +317 -0
- package/compliance/cache/{3.1.8 → 3.1.11.previous}/universal/runner-output-contract.yaml +1 -1
- package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/storyboard-schema.yaml +19 -6
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.mts +4 -3
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.ts +4 -3
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.ts.map +1 -1
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.js.map +1 -1
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.mjs.map +1 -1
- package/dist/lib/auth/oauth/ClientCredentialsFlow.d.mts +2 -0
- package/dist/lib/auth/oauth/ClientCredentialsFlow.d.ts +2 -0
- package/dist/lib/auth/oauth/ClientCredentialsFlow.d.ts.map +1 -1
- package/dist/lib/auth/oauth/ClientCredentialsFlow.js +69 -24
- package/dist/lib/auth/oauth/ClientCredentialsFlow.js.map +1 -1
- package/dist/lib/auth/oauth/ClientCredentialsFlow.mjs +69 -24
- package/dist/lib/auth/oauth/ClientCredentialsFlow.mjs.map +1 -1
- package/dist/lib/auth/oauth/MCPOAuthProvider.d.mts +2 -0
- package/dist/lib/auth/oauth/MCPOAuthProvider.d.ts +2 -0
- package/dist/lib/auth/oauth/MCPOAuthProvider.d.ts.map +1 -1
- package/dist/lib/auth/oauth/MCPOAuthProvider.js +8 -7
- package/dist/lib/auth/oauth/MCPOAuthProvider.js.map +1 -1
- package/dist/lib/auth/oauth/MCPOAuthProvider.mjs +8 -7
- package/dist/lib/auth/oauth/MCPOAuthProvider.mjs.map +1 -1
- package/dist/lib/auth/oauth/authorization-required.d.mts +3 -0
- package/dist/lib/auth/oauth/authorization-required.d.ts +3 -0
- package/dist/lib/auth/oauth/authorization-required.d.ts.map +1 -1
- package/dist/lib/auth/oauth/authorization-required.js +37 -7
- package/dist/lib/auth/oauth/authorization-required.js.map +1 -1
- package/dist/lib/auth/oauth/authorization-required.mjs +37 -7
- package/dist/lib/auth/oauth/authorization-required.mjs.map +1 -1
- package/dist/lib/auth/oauth/discovery.d.mts +2 -0
- package/dist/lib/auth/oauth/discovery.d.ts +2 -0
- package/dist/lib/auth/oauth/discovery.d.ts.map +1 -1
- package/dist/lib/auth/oauth/discovery.js +7 -5
- package/dist/lib/auth/oauth/discovery.js.map +1 -1
- package/dist/lib/auth/oauth/discovery.mjs +7 -5
- package/dist/lib/auth/oauth/discovery.mjs.map +1 -1
- package/dist/lib/auth/oauth/file-storage.d.mts +2 -1
- package/dist/lib/auth/oauth/file-storage.d.ts +2 -1
- package/dist/lib/auth/oauth/file-storage.d.ts.map +1 -1
- package/dist/lib/auth/oauth/file-storage.js +5 -1
- package/dist/lib/auth/oauth/file-storage.js.map +1 -1
- package/dist/lib/auth/oauth/file-storage.mjs +5 -1
- package/dist/lib/auth/oauth/file-storage.mjs.map +1 -1
- package/dist/lib/auth/oauth/index.d.mts +5 -1
- package/dist/lib/auth/oauth/index.d.ts +5 -1
- package/dist/lib/auth/oauth/index.d.ts.map +1 -1
- package/dist/lib/auth/oauth/index.js +4 -0
- package/dist/lib/auth/oauth/index.js.map +1 -1
- package/dist/lib/auth/oauth/index.mjs +4 -0
- package/dist/lib/auth/oauth/index.mjs.map +1 -1
- package/dist/lib/auth/oauth/resource-url.d.mts +4 -0
- package/dist/lib/auth/oauth/resource-url.d.ts +5 -0
- package/dist/lib/auth/oauth/resource-url.d.ts.map +1 -0
- package/dist/lib/auth/oauth/resource-url.js +51 -0
- package/dist/lib/auth/oauth/resource-url.js.map +1 -0
- package/dist/lib/auth/oauth/resource-url.mjs +27 -0
- package/dist/lib/auth/oauth/resource-url.mjs.map +1 -0
- package/dist/lib/auth/oauth/types.d.mts +7 -0
- package/dist/lib/auth/oauth/types.d.ts +7 -0
- package/dist/lib/auth/oauth/types.d.ts.map +1 -1
- package/dist/lib/auth/oauth/types.js.map +1 -1
- package/dist/lib/auth/oauth/types.mjs.map +1 -1
- package/dist/lib/auth/oauth/web-flow.d.mts +30 -5
- package/dist/lib/auth/oauth/web-flow.d.ts +30 -5
- package/dist/lib/auth/oauth/web-flow.d.ts.map +1 -1
- package/dist/lib/auth/oauth/web-flow.js +52 -8
- package/dist/lib/auth/oauth/web-flow.js.map +1 -1
- package/dist/lib/auth/oauth/web-flow.mjs +51 -8
- package/dist/lib/auth/oauth/web-flow.mjs.map +1 -1
- package/dist/lib/core/AgentClient.d.mts +2 -2
- package/dist/lib/core/AgentClient.d.ts +2 -2
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/AgentClient.js.map +1 -1
- package/dist/lib/core/AgentClient.mjs.map +1 -1
- package/dist/lib/core/ConversationTypes.d.mts +6 -2
- package/dist/lib/core/ConversationTypes.d.ts +6 -2
- package/dist/lib/core/ConversationTypes.d.ts.map +1 -1
- package/dist/lib/core/ConversationTypes.js.map +1 -1
- package/dist/lib/core/GovernanceMiddleware.d.mts +3 -3
- package/dist/lib/core/GovernanceMiddleware.d.ts +3 -3
- package/dist/lib/core/GovernanceMiddleware.d.ts.map +1 -1
- package/dist/lib/core/GovernanceMiddleware.js +8 -4
- package/dist/lib/core/GovernanceMiddleware.js.map +1 -1
- package/dist/lib/core/GovernanceMiddleware.mjs +8 -4
- package/dist/lib/core/GovernanceMiddleware.mjs.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.mts +12 -1
- package/dist/lib/core/SingleAgentClient.d.ts +12 -1
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +89 -12
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/core/SingleAgentClient.mjs +89 -12
- package/dist/lib/core/SingleAgentClient.mjs.map +1 -1
- package/dist/lib/core/TaskExecutor.d.mts +2 -4
- package/dist/lib/core/TaskExecutor.d.ts +2 -4
- package/dist/lib/core/TaskExecutor.d.ts.map +1 -1
- package/dist/lib/core/TaskExecutor.js +90 -14
- package/dist/lib/core/TaskExecutor.js.map +1 -1
- package/dist/lib/core/TaskExecutor.mjs +95 -14
- package/dist/lib/core/TaskExecutor.mjs.map +1 -1
- package/dist/lib/core/task-deadline.d.mts +20 -0
- package/dist/lib/core/task-deadline.d.ts +21 -0
- package/dist/lib/core/task-deadline.d.ts.map +1 -0
- package/dist/lib/core/task-deadline.js +74 -0
- package/dist/lib/core/task-deadline.js.map +1 -0
- package/dist/lib/core/task-deadline.mjs +47 -0
- package/dist/lib/core/task-deadline.mjs.map +1 -0
- package/dist/lib/errors/index.d.mts +11 -0
- package/dist/lib/errors/index.d.ts +11 -0
- package/dist/lib/errors/index.d.ts.map +1 -1
- package/dist/lib/errors/index.js +6 -0
- package/dist/lib/errors/index.js.map +1 -1
- package/dist/lib/errors/index.mjs +6 -0
- package/dist/lib/errors/index.mjs.map +1 -1
- package/dist/lib/net/ssrf-fetch.d.ts.map +1 -1
- package/dist/lib/net/ssrf-fetch.js +11 -0
- package/dist/lib/net/ssrf-fetch.js.map +1 -1
- package/dist/lib/net/ssrf-fetch.mjs +11 -0
- package/dist/lib/net/ssrf-fetch.mjs.map +1 -1
- package/dist/lib/protocols/abort.d.mts +3 -1
- package/dist/lib/protocols/abort.d.ts +3 -1
- package/dist/lib/protocols/abort.d.ts.map +1 -1
- package/dist/lib/protocols/abort.js +19 -17
- package/dist/lib/protocols/abort.js.map +1 -1
- package/dist/lib/protocols/abort.mjs +19 -17
- package/dist/lib/protocols/abort.mjs.map +1 -1
- package/dist/lib/protocols/index.d.ts.map +1 -1
- package/dist/lib/protocols/index.js +13 -10
- package/dist/lib/protocols/index.js.map +1 -1
- package/dist/lib/protocols/index.mjs +13 -10
- package/dist/lib/protocols/index.mjs.map +1 -1
- package/dist/lib/protocols/mcp.d.ts.map +1 -1
- package/dist/lib/protocols/mcp.js +8 -7
- package/dist/lib/protocols/mcp.js.map +1 -1
- package/dist/lib/protocols/mcp.mjs +8 -7
- package/dist/lib/protocols/mcp.mjs.map +1 -1
- package/dist/lib/registry/types.generated.d.mts +72 -9
- package/dist/lib/registry/types.generated.d.ts +72 -9
- package/dist/lib/registry/types.generated.d.ts.map +1 -1
- package/dist/lib/registry/types.generated.js.map +1 -1
- package/dist/lib/schemas-data/3.1/a2ui/bound-value.json +1 -1
- package/dist/lib/schemas-data/3.1/a2ui/component.json +1 -1
- package/dist/lib/schemas-data/3.1/a2ui/si-catalog.json +25 -25
- package/dist/lib/schemas-data/3.1/a2ui/surface.json +2 -2
- package/dist/lib/schemas-data/3.1/a2ui/user-action.json +1 -1
- package/dist/lib/schemas-data/3.1/aao/agent-publishers.json +1 -1
- package/dist/lib/schemas-data/3.1/account/get-account-financials-request.json +6 -6
- package/dist/lib/schemas-data/3.1/account/get-account-financials-response.json +12 -12
- package/dist/lib/schemas-data/3.1/account/list-accounts-request.json +6 -6
- package/dist/lib/schemas-data/3.1/account/list-accounts-response.json +8 -8
- package/dist/lib/schemas-data/3.1/account/report-usage-request.json +6 -6
- package/dist/lib/schemas-data/3.1/account/report-usage-response.json +6 -6
- package/dist/lib/schemas-data/3.1/account/sync-accounts-request.json +12 -12
- package/dist/lib/schemas-data/3.1/account/sync-accounts-response.json +16 -16
- package/dist/lib/schemas-data/3.1/account/sync-governance-request.json +6 -6
- package/dist/lib/schemas-data/3.1/account/sync-governance-response.json +10 -10
- package/dist/lib/schemas-data/3.1/adagents.json +29 -29
- package/dist/lib/schemas-data/3.1/brand/acquire-rights-request.json +10 -10
- package/dist/lib/schemas-data/3.1/brand/acquire-rights-response.json +16 -16
- package/dist/lib/schemas-data/3.1/brand/creative-approval-request.json +5 -5
- package/dist/lib/schemas-data/3.1/brand/creative-approval-response.json +12 -12
- package/dist/lib/schemas-data/3.1/brand/get-brand-identity-request.json +4 -4
- package/dist/lib/schemas-data/3.1/brand/get-brand-identity-response.json +10 -10
- package/dist/lib/schemas-data/3.1/brand/get-rights-request.json +8 -8
- package/dist/lib/schemas-data/3.1/brand/get-rights-response.json +11 -11
- package/dist/lib/schemas-data/3.1/brand/revocation-notification.json +4 -4
- package/dist/lib/schemas-data/3.1/brand/rights-pricing-option.json +5 -5
- package/dist/lib/schemas-data/3.1/brand/rights-terms.json +3 -3
- package/dist/lib/schemas-data/3.1/brand/search-brands-request.json +6 -6
- package/dist/lib/schemas-data/3.1/brand/search-brands-response.json +11 -11
- package/dist/lib/schemas-data/3.1/brand/update-rights-request.json +6 -6
- package/dist/lib/schemas-data/3.1/brand/update-rights-response.json +11 -11
- package/dist/lib/schemas-data/3.1/brand/verification-status.json +1 -1
- package/dist/lib/schemas-data/3.1/brand/verify-brand-claim-request.json +2 -2
- package/dist/lib/schemas-data/3.1/brand/verify-brand-claim-response.json +13 -13
- package/dist/lib/schemas-data/3.1/brand/verify-brand-claims-request.json +2 -2
- package/dist/lib/schemas-data/3.1/brand/verify-brand-claims-response.json +13 -13
- package/dist/lib/schemas-data/3.1/brand.json +21 -21
- package/dist/lib/schemas-data/3.1/bundled/content-standards/calibrate-content-request.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/content-standards/calibrate-content-response.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/content-standards/create-content-standards-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/content-standards/create-content-standards-response.json +10 -10
- package/dist/lib/schemas-data/3.1/bundled/content-standards/get-content-standards-request.json +5 -5
- package/dist/lib/schemas-data/3.1/bundled/content-standards/get-content-standards-response.json +23 -23
- package/dist/lib/schemas-data/3.1/bundled/content-standards/get-media-buy-artifacts-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/content-standards/get-media-buy-artifacts-response.json +18 -18
- package/dist/lib/schemas-data/3.1/bundled/content-standards/list-content-standards-request.json +7 -7
- package/dist/lib/schemas-data/3.1/bundled/content-standards/list-content-standards-response.json +24 -24
- package/dist/lib/schemas-data/3.1/bundled/content-standards/update-content-standards-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/content-standards/update-content-standards-response.json +10 -10
- package/dist/lib/schemas-data/3.1/bundled/content-standards/validate-content-delivery-request.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/content-standards/validate-content-delivery-response.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/core/tasks-get-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/core/tasks-get-response.json +181 -181
- package/dist/lib/schemas-data/3.1/bundled/core/tasks-list-request.json +21 -21
- package/dist/lib/schemas-data/3.1/bundled/core/tasks-list-response.json +11 -11
- package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-delivery-request.json +17 -17
- package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-delivery-response.json +56 -56
- package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-features-request.json +44 -44
- package/dist/lib/schemas-data/3.1/bundled/creative/get-creative-features-response.json +13 -13
- package/dist/lib/schemas-data/3.1/bundled/creative/list-creative-formats-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/creative/list-creative-formats-response.json +48 -48
- package/dist/lib/schemas-data/3.1/bundled/creative/list-creatives-request.json +17 -17
- package/dist/lib/schemas-data/3.1/bundled/creative/list-creatives-response.json +58 -58
- package/dist/lib/schemas-data/3.1/bundled/creative/list-transformers-request.json +18 -18
- package/dist/lib/schemas-data/3.1/bundled/creative/list-transformers-response.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/creative/preview-creative-request.json +44 -44
- package/dist/lib/schemas-data/3.1/bundled/creative/preview-creative-response.json +50 -50
- package/dist/lib/schemas-data/3.1/bundled/creative/sync-creatives-request.json +46 -46
- package/dist/lib/schemas-data/3.1/bundled/creative/sync-creatives-response.json +27 -27
- package/dist/lib/schemas-data/3.1/bundled/creative/validate-input-request.json +42 -42
- package/dist/lib/schemas-data/3.1/bundled/creative/validate-input-response.json +10 -10
- package/dist/lib/schemas-data/3.1/bundled/media-buy/build-creative-request.json +53 -53
- package/dist/lib/schemas-data/3.1/bundled/media-buy/build-creative-response.json +54 -54
- package/dist/lib/schemas-data/3.1/bundled/media-buy/create-media-buy-request.json +83 -83
- package/dist/lib/schemas-data/3.1/bundled/media-buy/create-media-buy-response.json +77 -77
- package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buy-delivery-request.json +25 -25
- package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buy-delivery-response.json +40 -40
- package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buys-request.json +18 -18
- package/dist/lib/schemas-data/3.1/bundled/media-buy/get-media-buys-response.json +65 -65
- package/dist/lib/schemas-data/3.1/bundled/media-buy/get-products-request.json +49 -49
- package/dist/lib/schemas-data/3.1/bundled/media-buy/get-products-response.json +99 -99
- package/dist/lib/schemas-data/3.1/bundled/media-buy/list-creative-formats-request.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/media-buy/list-creative-formats-response.json +48 -48
- package/dist/lib/schemas-data/3.1/bundled/media-buy/log-event-request.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/media-buy/log-event-response.json +10 -10
- package/dist/lib/schemas-data/3.1/bundled/media-buy/package-request.json +79 -79
- package/dist/lib/schemas-data/3.1/bundled/media-buy/provide-performance-feedback-request.json +8 -8
- package/dist/lib/schemas-data/3.1/bundled/media-buy/provide-performance-feedback-response.json +10 -10
- package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-audiences-request.json +18 -18
- package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-audiences-response.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-catalogs-request.json +26 -26
- package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-catalogs-response.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-event-sources-request.json +19 -19
- package/dist/lib/schemas-data/3.1/bundled/media-buy/sync-event-sources-response.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/media-buy/update-media-buy-request.json +79 -79
- package/dist/lib/schemas-data/3.1/bundled/media-buy/update-media-buy-response.json +71 -71
- package/dist/lib/schemas-data/3.1/bundled/property/create-property-list-request.json +18 -18
- package/dist/lib/schemas-data/3.1/bundled/property/create-property-list-response.json +26 -26
- package/dist/lib/schemas-data/3.1/bundled/property/delete-property-list-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/property/delete-property-list-response.json +10 -10
- package/dist/lib/schemas-data/3.1/bundled/property/get-property-list-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/property/get-property-list-response.json +27 -27
- package/dist/lib/schemas-data/3.1/bundled/property/list-property-lists-request.json +17 -17
- package/dist/lib/schemas-data/3.1/bundled/property/list-property-lists-response.json +27 -27
- package/dist/lib/schemas-data/3.1/bundled/property/update-property-list-request.json +18 -18
- package/dist/lib/schemas-data/3.1/bundled/property/update-property-list-response.json +26 -26
- package/dist/lib/schemas-data/3.1/bundled/property/validate-property-delivery-request.json +19 -19
- package/dist/lib/schemas-data/3.1/bundled/property/validate-property-delivery-response.json +15 -15
- package/dist/lib/schemas-data/3.1/bundled/protocol/get-adcp-capabilities-request.json +5 -5
- package/dist/lib/schemas-data/3.1/bundled/protocol/get-adcp-capabilities-response.json +35 -35
- package/dist/lib/schemas-data/3.1/bundled/protocol/get-task-status-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/protocol/get-task-status-response.json +181 -181
- package/dist/lib/schemas-data/3.1/bundled/protocol/list-tasks-request.json +21 -21
- package/dist/lib/schemas-data/3.1/bundled/protocol/list-tasks-response.json +11 -11
- package/dist/lib/schemas-data/3.1/bundled/signals/activate-signal-request.json +17 -17
- package/dist/lib/schemas-data/3.1/bundled/signals/activate-signal-response.json +12 -12
- package/dist/lib/schemas-data/3.1/bundled/signals/get-signals-request.json +24 -24
- package/dist/lib/schemas-data/3.1/bundled/signals/get-signals-response.json +53 -53
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-get-offering-request.json +5 -5
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-get-offering-response.json +23 -23
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-initiate-session-request.json +18 -18
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-initiate-session-response.json +25 -25
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-send-message-request.json +16 -16
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-send-message-response.json +26 -26
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-terminate-session-request.json +5 -5
- package/dist/lib/schemas-data/3.1/bundled/sponsored-intelligence/si-terminate-session-response.json +11 -11
- package/dist/lib/schemas-data/3.1/collection/base-collection-source.json +3 -3
- package/dist/lib/schemas-data/3.1/collection/collection-list-changed-webhook.json +2 -2
- package/dist/lib/schemas-data/3.1/collection/collection-list-filters.json +7 -7
- package/dist/lib/schemas-data/3.1/collection/collection-list.json +5 -5
- package/dist/lib/schemas-data/3.1/collection/create-collection-list-request.json +8 -8
- package/dist/lib/schemas-data/3.1/collection/create-collection-list-response.json +6 -6
- package/dist/lib/schemas-data/3.1/collection/delete-collection-list-request.json +5 -5
- package/dist/lib/schemas-data/3.1/collection/delete-collection-list-response.json +5 -5
- package/dist/lib/schemas-data/3.1/collection/get-collection-list-request.json +5 -5
- package/dist/lib/schemas-data/3.1/collection/get-collection-list-response.json +12 -12
- package/dist/lib/schemas-data/3.1/collection/list-collection-lists-request.json +6 -6
- package/dist/lib/schemas-data/3.1/collection/list-collection-lists-response.json +7 -7
- package/dist/lib/schemas-data/3.1/collection/update-collection-list-request.json +8 -8
- package/dist/lib/schemas-data/3.1/collection/update-collection-list-response.json +6 -6
- package/dist/lib/schemas-data/3.1/content-standards/artifact-webhook-payload.json +3 -3
- package/dist/lib/schemas-data/3.1/content-standards/artifact.json +7 -7
- package/dist/lib/schemas-data/3.1/content-standards/calibrate-content-request.json +5 -5
- package/dist/lib/schemas-data/3.1/content-standards/calibrate-content-response.json +10 -10
- package/dist/lib/schemas-data/3.1/content-standards/content-standards.json +7 -7
- package/dist/lib/schemas-data/3.1/content-standards/create-content-standards-request.json +8 -8
- package/dist/lib/schemas-data/3.1/content-standards/create-content-standards-response.json +8 -8
- package/dist/lib/schemas-data/3.1/content-standards/get-content-standards-request.json +4 -4
- package/dist/lib/schemas-data/3.1/content-standards/get-content-standards-response.json +9 -9
- package/dist/lib/schemas-data/3.1/content-standards/get-media-buy-artifacts-request.json +5 -5
- package/dist/lib/schemas-data/3.1/content-standards/get-media-buy-artifacts-response.json +10 -10
- package/dist/lib/schemas-data/3.1/content-standards/list-content-standards-request.json +6 -6
- package/dist/lib/schemas-data/3.1/content-standards/list-content-standards-response.json +10 -10
- package/dist/lib/schemas-data/3.1/content-standards/update-content-standards-request.json +8 -8
- package/dist/lib/schemas-data/3.1/content-standards/update-content-standards-response.json +8 -8
- package/dist/lib/schemas-data/3.1/content-standards/validate-content-delivery-request.json +5 -5
- package/dist/lib/schemas-data/3.1/content-standards/validate-content-delivery-response.json +10 -10
- package/dist/lib/schemas-data/3.1/core/account-authorization.json +1 -1
- package/dist/lib/schemas-data/3.1/core/account-ref.json +2 -2
- package/dist/lib/schemas-data/3.1/core/account-with-authorization.json +3 -3
- package/dist/lib/schemas-data/3.1/core/account.json +10 -10
- package/dist/lib/schemas-data/3.1/core/activation-key.json +1 -1
- package/dist/lib/schemas-data/3.1/core/ad-inventory-config.json +1 -1
- package/dist/lib/schemas-data/3.1/core/agent-encryption-key.json +1 -1
- package/dist/lib/schemas-data/3.1/core/agent-signing-key.json +1 -1
- package/dist/lib/schemas-data/3.1/core/app-item.json +4 -4
- package/dist/lib/schemas-data/3.1/core/asset-group-vocabulary.json +1 -1
- package/dist/lib/schemas-data/3.1/core/assets/asset-union.json +21 -21
- package/dist/lib/schemas-data/3.1/core/assets/audio-asset.json +3 -3
- package/dist/lib/schemas-data/3.1/core/assets/brief-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/card-asset.json +6 -6
- package/dist/lib/schemas-data/3.1/core/assets/catalog-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/css-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/daast-asset.json +4 -4
- package/dist/lib/schemas-data/3.1/core/assets/daast-tracker-asset.json +3 -3
- package/dist/lib/schemas-data/3.1/core/assets/html-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/image-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/javascript-asset.json +3 -3
- package/dist/lib/schemas-data/3.1/core/assets/markdown-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/pixel-tracker-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/published-post-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/text-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/assets/url-asset.json +3 -3
- package/dist/lib/schemas-data/3.1/core/assets/vast-asset.json +4 -4
- package/dist/lib/schemas-data/3.1/core/assets/vast-tracker-asset.json +3 -3
- package/dist/lib/schemas-data/3.1/core/assets/video-asset.json +7 -7
- package/dist/lib/schemas-data/3.1/core/assets/webhook-asset.json +7 -7
- package/dist/lib/schemas-data/3.1/core/assets/zip-asset.json +2 -2
- package/dist/lib/schemas-data/3.1/core/async-response-data.json +29 -29
- package/dist/lib/schemas-data/3.1/core/async-response-refs/creative/sync-creatives-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/creative/sync-creatives-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/creative/sync-creatives-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/build-creative-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/build-creative-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/build-creative-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/create-media-buy-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/create-media-buy-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/create-media-buy-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/get-products-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/get-products-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/get-products-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/sync-catalogs-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/sync-catalogs-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/sync-catalogs-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/update-media-buy-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/update-media-buy-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/media-buy/update-media-buy-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/core/async-response-refs/signals/get-signals-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/core/async-response-refs/signals/get-signals-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/core/attribution-window.json +4 -4
- package/dist/lib/schemas-data/3.1/core/audience-member.json +3 -3
- package/dist/lib/schemas-data/3.1/core/audience-selector.json +7 -7
- package/dist/lib/schemas-data/3.1/core/authorized-agent-base.json +3 -3
- package/dist/lib/schemas-data/3.1/core/brand-id.json +1 -1
- package/dist/lib/schemas-data/3.1/core/brand-ref.json +3 -3
- package/dist/lib/schemas-data/3.1/core/business-entity.json +2 -2
- package/dist/lib/schemas-data/3.1/core/cancellation-policy.json +2 -2
- package/dist/lib/schemas-data/3.1/core/canonical-format-kind.json +1 -1
- package/dist/lib/schemas-data/3.1/core/canonical-projection-ref.json +3 -3
- package/dist/lib/schemas-data/3.1/core/canonical-projection-slot-override.json +1 -1
- package/dist/lib/schemas-data/3.1/core/catalog-field-mapping.json +2 -2
- package/dist/lib/schemas-data/3.1/core/catalog-item-delivery-metrics.json +3 -3
- package/dist/lib/schemas-data/3.1/core/catalog.json +7 -7
- package/dist/lib/schemas-data/3.1/core/catchment.json +5 -5
- package/dist/lib/schemas-data/3.1/core/collection-distribution.json +2 -2
- package/dist/lib/schemas-data/3.1/core/collection-list-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/core/collection-selector.json +1 -1
- package/dist/lib/schemas-data/3.1/core/collection.json +13 -13
- package/dist/lib/schemas-data/3.1/core/committed-metric.json +9 -9
- package/dist/lib/schemas-data/3.1/core/content-rating.json +2 -2
- package/dist/lib/schemas-data/3.1/core/context.json +1 -1
- package/dist/lib/schemas-data/3.1/core/creative-asset.json +10 -10
- package/dist/lib/schemas-data/3.1/core/creative-assignment.json +2 -2
- package/dist/lib/schemas-data/3.1/core/creative-brief.json +4 -4
- package/dist/lib/schemas-data/3.1/core/creative-consumption.json +1 -1
- package/dist/lib/schemas-data/3.1/core/creative-delivery-metrics.json +2 -2
- package/dist/lib/schemas-data/3.1/core/creative-filters.json +5 -5
- package/dist/lib/schemas-data/3.1/core/creative-item.json +1 -1
- package/dist/lib/schemas-data/3.1/core/creative-manifest.json +11 -11
- package/dist/lib/schemas-data/3.1/core/creative-policy.json +3 -3
- package/dist/lib/schemas-data/3.1/core/creative-variable.json +1 -1
- package/dist/lib/schemas-data/3.1/core/creative-variant.json +5 -5
- package/dist/lib/schemas-data/3.1/core/data-provider-signal-selector.json +1 -1
- package/dist/lib/schemas-data/3.1/core/date-range.json +1 -1
- package/dist/lib/schemas-data/3.1/core/datetime-range.json +1 -1
- package/dist/lib/schemas-data/3.1/core/daypart-target.json +2 -2
- package/dist/lib/schemas-data/3.1/core/deadline-policy.json +1 -1
- package/dist/lib/schemas-data/3.1/core/delivery-forecast.json +7 -7
- package/dist/lib/schemas-data/3.1/core/delivery-metric-aggregate.json +9 -9
- package/dist/lib/schemas-data/3.1/core/delivery-metrics.json +8 -8
- package/dist/lib/schemas-data/3.1/core/deployment.json +3 -3
- package/dist/lib/schemas-data/3.1/core/destination-item.json +4 -4
- package/dist/lib/schemas-data/3.1/core/destination.json +1 -1
- package/dist/lib/schemas-data/3.1/core/diagnostic-issue.json +1 -1
- package/dist/lib/schemas-data/3.1/core/downstream-connection-requirement.json +1 -1
- package/dist/lib/schemas-data/3.1/core/duration.json +1 -1
- package/dist/lib/schemas-data/3.1/core/education-item.json +4 -4
- package/dist/lib/schemas-data/3.1/core/error.json +1 -1
- package/dist/lib/schemas-data/3.1/core/evaluator-spec.json +5 -5
- package/dist/lib/schemas-data/3.1/core/event-custom-data.json +2 -2
- package/dist/lib/schemas-data/3.1/core/event-source-health.json +3 -3
- package/dist/lib/schemas-data/3.1/core/event-surface.json +2 -2
- package/dist/lib/schemas-data/3.1/core/event.json +8 -8
- package/dist/lib/schemas-data/3.1/core/ext.json +1 -1
- package/dist/lib/schemas-data/3.1/core/feature-requirement.json +1 -1
- package/dist/lib/schemas-data/3.1/core/flight-item.json +4 -4
- package/dist/lib/schemas-data/3.1/core/forecast-dimension-audience.json +2 -2
- package/dist/lib/schemas-data/3.1/core/forecast-dimension-device-platform.json +2 -2
- package/dist/lib/schemas-data/3.1/core/forecast-dimension-device-type.json +2 -2
- package/dist/lib/schemas-data/3.1/core/forecast-dimension-geo.json +5 -5
- package/dist/lib/schemas-data/3.1/core/forecast-dimension-placement.json +2 -2
- package/dist/lib/schemas-data/3.1/core/forecast-dimension-signal.json +2 -2
- package/dist/lib/schemas-data/3.1/core/forecast-point-dimensions.json +7 -7
- package/dist/lib/schemas-data/3.1/core/forecast-point.json +27 -27
- package/dist/lib/schemas-data/3.1/core/forecast-range.json +1 -1
- package/dist/lib/schemas-data/3.1/core/forecast-vendor-metric-value.json +5 -5
- package/dist/lib/schemas-data/3.1/core/format-id.json +1 -1
- package/dist/lib/schemas-data/3.1/core/format-option-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/core/format-shape-vocabulary.json +1 -1
- package/dist/lib/schemas-data/3.1/core/format.json +44 -44
- package/dist/lib/schemas-data/3.1/core/frequency-cap.json +4 -4
- package/dist/lib/schemas-data/3.1/core/generation-credential.json +3 -3
- package/dist/lib/schemas-data/3.1/core/geo-breakdown-support.json +3 -3
- package/dist/lib/schemas-data/3.1/core/geo-delivery-metrics.json +6 -6
- package/dist/lib/schemas-data/3.1/core/hotel-item.json +4 -4
- package/dist/lib/schemas-data/3.1/core/identifier.json +2 -2
- package/dist/lib/schemas-data/3.1/core/impairment.json +3 -3
- package/dist/lib/schemas-data/3.1/core/industry-identifier.json +2 -2
- package/dist/lib/schemas-data/3.1/core/insertion-order.json +1 -1
- package/dist/lib/schemas-data/3.1/core/installment-deadlines.json +2 -2
- package/dist/lib/schemas-data/3.1/core/installment.json +9 -9
- package/dist/lib/schemas-data/3.1/core/job-item.json +3 -3
- package/dist/lib/schemas-data/3.1/core/keyword-delivery-metrics.json +3 -3
- package/dist/lib/schemas-data/3.1/core/limited-series.json +1 -1
- package/dist/lib/schemas-data/3.1/core/material-deadline.json +1 -1
- package/dist/lib/schemas-data/3.1/core/mcp-webhook-payload.json +5 -5
- package/dist/lib/schemas-data/3.1/core/measurement-readiness.json +5 -5
- package/dist/lib/schemas-data/3.1/core/measurement-terms.json +3 -3
- package/dist/lib/schemas-data/3.1/core/measurement-window.json +1 -1
- package/dist/lib/schemas-data/3.1/core/media-buy-available-action.json +4 -4
- package/dist/lib/schemas-data/3.1/core/media-buy-features.json +1 -1
- package/dist/lib/schemas-data/3.1/core/media-buy.json +10 -10
- package/dist/lib/schemas-data/3.1/core/missing-metric.json +9 -9
- package/dist/lib/schemas-data/3.1/core/notification-config.json +4 -4
- package/dist/lib/schemas-data/3.1/core/offering-asset-group.json +16 -16
- package/dist/lib/schemas-data/3.1/core/offering.json +5 -5
- package/dist/lib/schemas-data/3.1/core/optimization-goal.json +7 -7
- package/dist/lib/schemas-data/3.1/core/outcome-measurement.json +2 -2
- package/dist/lib/schemas-data/3.1/core/overlay.json +1 -1
- package/dist/lib/schemas-data/3.1/core/package-signal-targeting-group.json +2 -2
- package/dist/lib/schemas-data/3.1/core/package-signal-targeting-groups.json +2 -2
- package/dist/lib/schemas-data/3.1/core/package-signal-targeting.json +3 -3
- package/dist/lib/schemas-data/3.1/core/package.json +17 -17
- package/dist/lib/schemas-data/3.1/core/pagination-request.json +1 -1
- package/dist/lib/schemas-data/3.1/core/pagination-response.json +1 -1
- package/dist/lib/schemas-data/3.1/core/performance-feedback.json +12 -12
- package/dist/lib/schemas-data/3.1/core/performance-standard.json +4 -4
- package/dist/lib/schemas-data/3.1/core/placement-definition.json +10 -10
- package/dist/lib/schemas-data/3.1/core/placement-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/core/placement.json +7 -7
- package/dist/lib/schemas-data/3.1/core/planned-delivery.json +5 -5
- package/dist/lib/schemas-data/3.1/core/platform-extension-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/core/postal-area-support.json +2 -2
- package/dist/lib/schemas-data/3.1/core/postal-area.json +4 -4
- package/dist/lib/schemas-data/3.1/core/postal-country-system.json +2 -2
- package/dist/lib/schemas-data/3.1/core/price.json +1 -1
- package/dist/lib/schemas-data/3.1/core/pricing-option.json +10 -10
- package/dist/lib/schemas-data/3.1/core/product-allocation.json +4 -4
- package/dist/lib/schemas-data/3.1/core/product-allowed-action.json +5 -5
- package/dist/lib/schemas-data/3.1/core/product-filters.json +27 -27
- package/dist/lib/schemas-data/3.1/core/product-format-declaration.json +16 -16
- package/dist/lib/schemas-data/3.1/core/product-signal-targeting-option.json +3 -3
- package/dist/lib/schemas-data/3.1/core/product.json +40 -40
- package/dist/lib/schemas-data/3.1/core/property-id.json +1 -1
- package/dist/lib/schemas-data/3.1/core/property-list-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/core/property-tag.json +1 -1
- package/dist/lib/schemas-data/3.1/core/property.json +6 -6
- package/dist/lib/schemas-data/3.1/core/proposal.json +6 -6
- package/dist/lib/schemas-data/3.1/core/protocol-envelope.json +5 -5
- package/dist/lib/schemas-data/3.1/core/provenance.json +9 -9
- package/dist/lib/schemas-data/3.1/core/publisher-property-selector.json +3 -3
- package/dist/lib/schemas-data/3.1/core/push-notification-config.json +2 -2
- package/dist/lib/schemas-data/3.1/core/real-estate-item.json +4 -4
- package/dist/lib/schemas-data/3.1/core/reference-asset.json +1 -1
- package/dist/lib/schemas-data/3.1/core/registry-event.json +13 -13
- package/dist/lib/schemas-data/3.1/core/registry-feed-response.json +2 -2
- package/dist/lib/schemas-data/3.1/core/reporting-capabilities.json +8 -8
- package/dist/lib/schemas-data/3.1/core/reporting-webhook.json +3 -3
- package/dist/lib/schemas-data/3.1/core/requirements/asset-requirements.json +13 -13
- package/dist/lib/schemas-data/3.1/core/requirements/audio-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/catalog-field-binding.json +4 -4
- package/dist/lib/schemas-data/3.1/core/requirements/catalog-requirements.json +5 -5
- package/dist/lib/schemas-data/3.1/core/requirements/css-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/daast-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/html-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/image-asset-requirements.json +2 -2
- package/dist/lib/schemas-data/3.1/core/requirements/javascript-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/markdown-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/offering-asset-constraint.json +4 -4
- package/dist/lib/schemas-data/3.1/core/requirements/text-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/url-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/vast-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/requirements/video-asset-requirements.json +6 -6
- package/dist/lib/schemas-data/3.1/core/requirements/webhook-asset-requirements.json +1 -1
- package/dist/lib/schemas-data/3.1/core/response-payload-jws-envelope.json +1 -1
- package/dist/lib/schemas-data/3.1/core/response.json +1 -1
- package/dist/lib/schemas-data/3.1/core/rights-constraint.json +4 -4
- package/dist/lib/schemas-data/3.1/core/seller-agent-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/core/signal-coverage-forecast.json +5 -5
- package/dist/lib/schemas-data/3.1/core/signal-definition-enrichment.json +4 -4
- package/dist/lib/schemas-data/3.1/core/signal-definition.json +5 -5
- package/dist/lib/schemas-data/3.1/core/signal-filters.json +3 -3
- package/dist/lib/schemas-data/3.1/core/signal-id.json +1 -1
- package/dist/lib/schemas-data/3.1/core/signal-listing.json +4 -4
- package/dist/lib/schemas-data/3.1/core/signal-modeling-disclosure.json +1 -1
- package/dist/lib/schemas-data/3.1/core/signal-pricing-option.json +2 -2
- package/dist/lib/schemas-data/3.1/core/signal-pricing.json +6 -6
- package/dist/lib/schemas-data/3.1/core/signal-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/core/signal-selection-group-rule.json +1 -1
- package/dist/lib/schemas-data/3.1/core/signal-targeting-expression.json +4 -4
- package/dist/lib/schemas-data/3.1/core/signal-targeting-rules.json +2 -2
- package/dist/lib/schemas-data/3.1/core/signal-targeting.json +7 -7
- package/dist/lib/schemas-data/3.1/core/sla-window.json +1 -1
- package/dist/lib/schemas-data/3.1/core/special.json +2 -2
- package/dist/lib/schemas-data/3.1/core/start-timing.json +1 -1
- package/dist/lib/schemas-data/3.1/core/store-item.json +3 -3
- package/dist/lib/schemas-data/3.1/core/talent.json +2 -2
- package/dist/lib/schemas-data/3.1/core/targeting.json +22 -22
- package/dist/lib/schemas-data/3.1/core/tasks-get-request.json +5 -5
- package/dist/lib/schemas-data/3.1/core/tasks-get-response.json +10 -10
- package/dist/lib/schemas-data/3.1/core/tasks-list-request.json +13 -13
- package/dist/lib/schemas-data/3.1/core/tasks-list-response.json +8 -8
- package/dist/lib/schemas-data/3.1/core/transformer-param.json +1 -1
- package/dist/lib/schemas-data/3.1/core/transformer.json +5 -5
- package/dist/lib/schemas-data/3.1/core/truncation-sentinel.json +1 -1
- package/dist/lib/schemas-data/3.1/core/user-match.json +3 -3
- package/dist/lib/schemas-data/3.1/core/vehicle-item.json +4 -4
- package/dist/lib/schemas-data/3.1/core/vendor-metric-id.json +1 -1
- package/dist/lib/schemas-data/3.1/core/vendor-metric-optimization-supported-metric.json +3 -3
- package/dist/lib/schemas-data/3.1/core/vendor-metric-optimization.json +2 -2
- package/dist/lib/schemas-data/3.1/core/vendor-metric-value.json +3 -3
- package/dist/lib/schemas-data/3.1/core/vendor-pricing-option.json +3 -3
- package/dist/lib/schemas-data/3.1/core/version-envelope.json +1 -1
- package/dist/lib/schemas-data/3.1/core/webhook-activity-record.json +3 -3
- package/dist/lib/schemas-data/3.1/core/webhook-challenge-response.json +1 -1
- package/dist/lib/schemas-data/3.1/core/webhook-challenge.json +2 -2
- package/dist/lib/schemas-data/3.1/core/wholesale-feed-event.json +17 -17
- package/dist/lib/schemas-data/3.1/core/wholesale-feed-webhook.json +3 -3
- package/dist/lib/schemas-data/3.1/core/x-entity-types.json +1 -1
- package/dist/lib/schemas-data/3.1/creative/asset-types/index.json +6 -6
- package/dist/lib/schemas-data/3.1/creative/audit-observation.json +2 -2
- package/dist/lib/schemas-data/3.1/creative/creative-feature-result.json +2 -2
- package/dist/lib/schemas-data/3.1/creative/creative-purged-webhook.json +3 -3
- package/dist/lib/schemas-data/3.1/creative/creative-status-changed-webhook.json +4 -4
- package/dist/lib/schemas-data/3.1/creative/get-creative-delivery-request.json +6 -6
- package/dist/lib/schemas-data/3.1/creative/get-creative-delivery-response.json +9 -9
- package/dist/lib/schemas-data/3.1/creative/get-creative-features-request.json +6 -6
- package/dist/lib/schemas-data/3.1/creative/get-creative-features-response.json +11 -11
- package/dist/lib/schemas-data/3.1/creative/list-creative-formats-request.json +13 -13
- package/dist/lib/schemas-data/3.1/creative/list-creative-formats-response.json +9 -9
- package/dist/lib/schemas-data/3.1/creative/list-creatives-request.json +9 -9
- package/dist/lib/schemas-data/3.1/creative/list-creatives-response.json +21 -21
- package/dist/lib/schemas-data/3.1/creative/list-transformers-request.json +8 -8
- package/dist/lib/schemas-data/3.1/creative/list-transformers-response.json +8 -8
- package/dist/lib/schemas-data/3.1/creative/preview-creative-request.json +12 -12
- package/dist/lib/schemas-data/3.1/creative/preview-creative-response.json +14 -14
- package/dist/lib/schemas-data/3.1/creative/preview-render.json +1 -1
- package/dist/lib/schemas-data/3.1/creative/sync-creatives-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.1/creative/sync-creatives-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/creative/sync-creatives-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/creative/sync-creatives-request.json +8 -8
- package/dist/lib/schemas-data/3.1/creative/sync-creatives-response.json +15 -15
- package/dist/lib/schemas-data/3.1/creative/validate-input-request.json +4 -4
- package/dist/lib/schemas-data/3.1/creative/validate-input-response.json +4 -4
- package/dist/lib/schemas-data/3.1/creative/validate-input-result.json +1 -1
- package/dist/lib/schemas-data/3.1/creative/video-brief.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/account-scope.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/account-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/action-not-allowed-reason.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/action-source.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/adcp-protocol.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/adjustment-kind.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/advertiser-industry.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/age-verification-method.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/assessment-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/asset-content-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/attestation-claim.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/attribution-methodology.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/attribution-model.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/audience-source.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/audience-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/audio-channel-layout.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/audio-distribution-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/auth-scheme.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/available-metric.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/billing-party.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/binary-verdict.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/brand-agent-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/c2pa-watermark-action.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/canceled-by.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/catalog-action.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/catalog-item-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/catalog-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/channels.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/cloud-storage-protocol.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/co-branding-requirement.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/collection-cadence.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/collection-kind.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/collection-relationship.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/collection-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/completion-source.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/consent-basis.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/content-id-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/content-rating-system.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-action.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-agent-capability.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-approval-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-event-reason-code.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-identifier-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-quality.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-selection-strategy.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-sort-field.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/creative-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/daast-tracking-event.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/daast-version.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/day-of-week.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/delegation-authority.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/delivery-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/demographic-system.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/derivative-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/device-platform.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/device-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/digital-source-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/dimension-unit.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/disclosure-persistence.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/disclosure-position.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/distance-unit.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/distribution-identifier-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/embedded-provenance-method.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/error-code.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/error-scope.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/escalation-severity.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/event-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/exclusivity.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/feature-check-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/feed-format.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/feedback-source.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/forecast-method.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/forecast-range-unit.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/forecastable-metric.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/format-id-parameter.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/frame-rate-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/frequency-cap-scope.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/genre-taxonomy.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/geo-level.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/gop-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/governance-decision.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/governance-domain.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/governance-mode.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/governance-phase.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/history-entry-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/http-method.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/identifier-types.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/impairment-offline-state.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/impairment-reason-code.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/installment-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/javascript-module-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/landing-page-requirement.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/legacy-postal-system.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/lift-dimension.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/logo-slot.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/makegood-remedy.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/markdown-flavor.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/match-id-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/match-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/media-buy-action-mode.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/media-buy-health.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/media-buy-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/media-buy-valid-action.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/metric-scope.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/metric-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/metro-system.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/moov-atom-position.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/notification-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/offering-availability-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/outcome-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/pacing.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/payment-terms.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/performance-standard-metric.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/policy-category.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/policy-enforcement.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/postal-system.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/preview-output-format.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/pricing-model.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/production-quality.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/property-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/proposal-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/publisher-identifier-types.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/purchase-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/reach-unit.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/reporting-frequency.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/response-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/restricted-attribute.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/right-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/right-use.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/rights-billing-period.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/scan-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/si-session-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/signal-catalog-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/signal-source.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/signal-value-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/snapshot-unavailable-reason.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/social-placement-surface.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/sort-direction.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/sort-metric.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/special-category.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/specialism.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/sponsored-placement-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/talent-role.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/task-status.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/task-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/transport-mode.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/travel-time-unit.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/uid-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/universal-macro.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/update-frequency.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/url-asset-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/validation-mode.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/vast-tracking-event.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/vast-version.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/video-placement-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/viewability-standard.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/watermark-media-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/wcag-level.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/webhook-response-type.json +1 -1
- package/dist/lib/schemas-data/3.1/enums/webhook-security-method.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/account-setup-required.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/action-not-allowed.json +4 -4
- package/dist/lib/schemas-data/3.1/error-details/agent-permission-denied.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/audience-too-small.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/authorization-required.json +3 -3
- package/dist/lib/schemas-data/3.1/error-details/billing-not-permitted-for-agent.json +3 -3
- package/dist/lib/schemas-data/3.1/error-details/billing-not-supported.json +2 -2
- package/dist/lib/schemas-data/3.1/error-details/budget-too-low.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/conflict.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/creative-rejected.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/policy-violation.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/rate-limited.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/stale-response.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/vendor-error-codes.json +1 -1
- package/dist/lib/schemas-data/3.1/error-details/version-unsupported.json +2 -2
- package/dist/lib/schemas-data/3.1/extensions/extension-meta.json +1 -1
- package/dist/lib/schemas-data/3.1/extensions/index.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/_base.json +5 -5
- package/dist/lib/schemas-data/3.1/formats/canonical/agent_placement.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/audio_daast.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/audio_hosted.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/display_tag.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/html5.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/image.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/image_carousel.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/native_in_feed.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/responsive_creative.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/sponsored_placement.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/video_hosted.json +2 -2
- package/dist/lib/schemas-data/3.1/formats/canonical/video_vast.json +2 -2
- package/dist/lib/schemas-data/3.1/governance/attribute-definition.json +1 -1
- package/dist/lib/schemas-data/3.1/governance/audience-constraints.json +3 -3
- package/dist/lib/schemas-data/3.1/governance/check-governance-request.json +8 -8
- package/dist/lib/schemas-data/3.1/governance/check-governance-response.json +7 -7
- package/dist/lib/schemas-data/3.1/governance/get-plan-audit-logs-request.json +5 -5
- package/dist/lib/schemas-data/3.1/governance/get-plan-audit-logs-response.json +11 -11
- package/dist/lib/schemas-data/3.1/governance/policy-category-definition.json +2 -2
- package/dist/lib/schemas-data/3.1/governance/policy-entry.json +6 -6
- package/dist/lib/schemas-data/3.1/governance/policy-ref.json +1 -1
- package/dist/lib/schemas-data/3.1/governance/report-plan-outcome-request.json +7 -7
- package/dist/lib/schemas-data/3.1/governance/report-plan-outcome-response.json +5 -5
- package/dist/lib/schemas-data/3.1/governance/sync-plans-request.json +14 -14
- package/dist/lib/schemas-data/3.1/governance/sync-plans-response.json +6 -6
- package/dist/lib/schemas-data/3.1/index.json +452 -440
- package/dist/lib/schemas-data/3.1/manifest.json +3 -3
- package/dist/lib/schemas-data/3.1/manifest.schema.json +1 -1
- package/dist/lib/schemas-data/3.1/media-buy/build-creative-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/build-creative-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/build-creative-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/media-buy/build-creative-request.json +16 -16
- package/dist/lib/schemas-data/3.1/media-buy/build-creative-response.json +35 -35
- package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-request.json +13 -13
- package/dist/lib/schemas-data/3.1/media-buy/create-media-buy-response.json +19 -19
- package/dist/lib/schemas-data/3.1/media-buy/get-media-buy-delivery-request.json +23 -23
- package/dist/lib/schemas-data/3.1/media-buy/get-media-buy-delivery-response.json +27 -27
- package/dist/lib/schemas-data/3.1/media-buy/get-media-buys-request.json +8 -8
- package/dist/lib/schemas-data/3.1/media-buy/get-media-buys-response.json +30 -30
- package/dist/lib/schemas-data/3.1/media-buy/get-products-async-response-input-required.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/get-products-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/get-products-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/media-buy/get-products-request.json +13 -13
- package/dist/lib/schemas-data/3.1/media-buy/get-products-response.json +10 -10
- package/dist/lib/schemas-data/3.1/media-buy/list-creative-formats-request.json +13 -13
- package/dist/lib/schemas-data/3.1/media-buy/list-creative-formats-response.json +9 -9
- package/dist/lib/schemas-data/3.1/media-buy/log-event-request.json +5 -5
- package/dist/lib/schemas-data/3.1/media-buy/log-event-response.json +8 -8
- package/dist/lib/schemas-data/3.1/media-buy/media-buy-delivery-webhook-result.json +9 -9
- package/dist/lib/schemas-data/3.1/media-buy/package-request.json +23 -23
- package/dist/lib/schemas-data/3.1/media-buy/package-update.json +13 -13
- package/dist/lib/schemas-data/3.1/media-buy/provide-performance-feedback-request.json +7 -7
- package/dist/lib/schemas-data/3.1/media-buy/provide-performance-feedback-response.json +8 -8
- package/dist/lib/schemas-data/3.1/media-buy/sync-audiences-request.json +8 -8
- package/dist/lib/schemas-data/3.1/media-buy/sync-audiences-response.json +14 -14
- package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-request.json +8 -8
- package/dist/lib/schemas-data/3.1/media-buy/sync-catalogs-response.json +14 -14
- package/dist/lib/schemas-data/3.1/media-buy/sync-event-sources-request.json +8 -8
- package/dist/lib/schemas-data/3.1/media-buy/sync-event-sources-response.json +14 -14
- package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-async-response-input-required.json +3 -3
- package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-request.json +11 -11
- package/dist/lib/schemas-data/3.1/media-buy/update-media-buy-response.json +17 -17
- package/dist/lib/schemas-data/3.1/pricing-options/cpa-option.json +4 -4
- package/dist/lib/schemas-data/3.1/pricing-options/cpc-option.json +4 -4
- package/dist/lib/schemas-data/3.1/pricing-options/cpcv-option.json +4 -4
- package/dist/lib/schemas-data/3.1/pricing-options/cpm-option.json +4 -4
- package/dist/lib/schemas-data/3.1/pricing-options/cpp-option.json +5 -5
- package/dist/lib/schemas-data/3.1/pricing-options/cpv-option.json +4 -4
- package/dist/lib/schemas-data/3.1/pricing-options/flat-rate-option.json +4 -4
- package/dist/lib/schemas-data/3.1/pricing-options/price-breakdown.json +2 -2
- package/dist/lib/schemas-data/3.1/pricing-options/price-guidance.json +1 -1
- package/dist/lib/schemas-data/3.1/pricing-options/time-option.json +4 -4
- package/dist/lib/schemas-data/3.1/pricing-options/vcpm-option.json +4 -4
- package/dist/lib/schemas-data/3.1/property/authorization-result.json +1 -1
- package/dist/lib/schemas-data/3.1/property/base-property-source.json +4 -4
- package/dist/lib/schemas-data/3.1/property/create-property-list-request.json +8 -8
- package/dist/lib/schemas-data/3.1/property/create-property-list-response.json +6 -6
- package/dist/lib/schemas-data/3.1/property/delete-property-list-request.json +5 -5
- package/dist/lib/schemas-data/3.1/property/delete-property-list-response.json +5 -5
- package/dist/lib/schemas-data/3.1/property/delivery-record.json +3 -3
- package/dist/lib/schemas-data/3.1/property/get-property-list-request.json +5 -5
- package/dist/lib/schemas-data/3.1/property/get-property-list-response.json +9 -9
- package/dist/lib/schemas-data/3.1/property/list-property-lists-request.json +6 -6
- package/dist/lib/schemas-data/3.1/property/list-property-lists-response.json +7 -7
- package/dist/lib/schemas-data/3.1/property/property-error.json +2 -2
- package/dist/lib/schemas-data/3.1/property/property-feature-definition.json +2 -2
- package/dist/lib/schemas-data/3.1/property/property-feature-result.json +4 -4
- package/dist/lib/schemas-data/3.1/property/property-feature-value.json +2 -2
- package/dist/lib/schemas-data/3.1/property/property-feature.json +1 -1
- package/dist/lib/schemas-data/3.1/property/property-list-changed-webhook.json +2 -2
- package/dist/lib/schemas-data/3.1/property/property-list-filters.json +5 -5
- package/dist/lib/schemas-data/3.1/property/property-list.json +6 -6
- package/dist/lib/schemas-data/3.1/property/update-property-list-request.json +8 -8
- package/dist/lib/schemas-data/3.1/property/update-property-list-response.json +6 -6
- package/dist/lib/schemas-data/3.1/property/validate-property-delivery-request.json +6 -6
- package/dist/lib/schemas-data/3.1/property/validate-property-delivery-response.json +6 -6
- package/dist/lib/schemas-data/3.1/property/validation-result.json +5 -5
- package/dist/lib/schemas-data/3.1/protocol/get-adcp-capabilities-request.json +4 -4
- package/dist/lib/schemas-data/3.1/protocol/get-adcp-capabilities-response.json +33 -33
- package/dist/lib/schemas-data/3.1/protocol/get-task-status-request.json +5 -5
- package/dist/lib/schemas-data/3.1/protocol/get-task-status-response.json +10 -10
- package/dist/lib/schemas-data/3.1/protocol/list-tasks-request.json +13 -13
- package/dist/lib/schemas-data/3.1/protocol/list-tasks-response.json +8 -8
- package/dist/lib/schemas-data/3.1/registries/v1-canonical-mapping.json +355 -5
- package/dist/lib/schemas-data/3.1/signals/activate-signal-request.json +6 -6
- package/dist/lib/schemas-data/3.1/signals/activate-signal-response.json +9 -9
- package/dist/lib/schemas-data/3.1/signals/get-signals-async-response-submitted.json +4 -4
- package/dist/lib/schemas-data/3.1/signals/get-signals-async-response-working.json +3 -3
- package/dist/lib/schemas-data/3.1/signals/get-signals-request.json +11 -11
- package/dist/lib/schemas-data/3.1/signals/get-signals-response.json +17 -17
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-capabilities.json +1 -1
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-context-use.json +1 -1
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-get-offering-request.json +4 -4
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-get-offering-response.json +9 -9
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-identity.json +1 -1
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-initiate-session-request.json +7 -7
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-initiate-session-response.json +10 -10
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-send-message-request.json +5 -5
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-send-message-response.json +10 -10
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-sponsored-context-receipt.json +4 -4
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-sponsored-context.json +4 -4
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-terminate-session-request.json +4 -4
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-terminate-session-response.json +7 -7
- package/dist/lib/schemas-data/3.1/sponsored-intelligence/si-ui-element.json +1 -1
- package/dist/lib/schemas-data/3.1/trusted-match/available-package.json +4 -4
- package/dist/lib/schemas-data/3.1/trusted-match/context-match-request.json +5 -5
- package/dist/lib/schemas-data/3.1/trusted-match/context-match-response.json +4 -4
- package/dist/lib/schemas-data/3.1/trusted-match/error.json +1 -1
- package/dist/lib/schemas-data/3.1/trusted-match/identity-match-request.json +4 -4
- package/dist/lib/schemas-data/3.1/trusted-match/identity-match-response.json +45 -45
- package/dist/lib/schemas-data/3.1/trusted-match/offer-price.json +1 -1
- package/dist/lib/schemas-data/3.1/trusted-match/offer.json +5 -5
- package/dist/lib/schemas-data/3.1/trusted-match/provider-identity-match-response.json +90 -0
- package/dist/lib/schemas-data/3.1/trusted-match/provider-registration.json +8 -7
- package/dist/lib/schemas-data/3.1/trusted-match/publisher-tmpx-config.json +41 -0
- package/dist/lib/schemas-data/3.1/trusted-match/tmpx-chunk.json +28 -0
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/entity-hydration.generated.mjs.map +1 -1
- package/dist/lib/server/wire-spec-fields.generated.d.mts +29 -29
- package/dist/lib/server/wire-spec-fields.generated.d.ts +29 -29
- package/dist/lib/server/wire-spec-fields.generated.d.ts.map +1 -1
- package/dist/lib/server/wire-spec-fields.generated.js +29 -29
- package/dist/lib/server/wire-spec-fields.generated.js.map +1 -1
- package/dist/lib/server/wire-spec-fields.generated.mjs +29 -29
- package/dist/lib/server/wire-spec-fields.generated.mjs.map +1 -1
- package/dist/lib/testing/index.d.mts +1 -1
- package/dist/lib/testing/index.d.ts +1 -1
- package/dist/lib/testing/index.d.ts.map +1 -1
- package/dist/lib/testing/index.js +12 -0
- package/dist/lib/testing/index.js.map +1 -1
- package/dist/lib/testing/index.mjs +12 -0
- package/dist/lib/testing/index.mjs.map +1 -1
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.d.mts +6 -0
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.d.ts +6 -0
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.js +11 -0
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.js.map +1 -1
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.mjs +10 -0
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.mjs.map +1 -1
- package/dist/lib/testing/storyboard/creative-assets.d.mts +5 -0
- package/dist/lib/testing/storyboard/creative-assets.d.ts +6 -0
- package/dist/lib/testing/storyboard/creative-assets.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/creative-assets.js +180 -0
- package/dist/lib/testing/storyboard/creative-assets.js.map +1 -0
- package/dist/lib/testing/storyboard/creative-assets.mjs +154 -0
- package/dist/lib/testing/storyboard/creative-assets.mjs.map +1 -0
- package/dist/lib/testing/storyboard/fixture-resolution.d.mts +37 -0
- package/dist/lib/testing/storyboard/fixture-resolution.d.ts +38 -0
- package/dist/lib/testing/storyboard/fixture-resolution.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/fixture-resolution.js +424 -0
- package/dist/lib/testing/storyboard/fixture-resolution.js.map +1 -0
- package/dist/lib/testing/storyboard/fixture-resolution.mjs +395 -0
- package/dist/lib/testing/storyboard/fixture-resolution.mjs.map +1 -0
- package/dist/lib/testing/storyboard/index.d.mts +2 -1
- package/dist/lib/testing/storyboard/index.d.ts +2 -1
- package/dist/lib/testing/storyboard/index.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/index.js +13 -0
- package/dist/lib/testing/storyboard/index.js.map +1 -1
- package/dist/lib/testing/storyboard/index.mjs +14 -0
- package/dist/lib/testing/storyboard/index.mjs.map +1 -1
- package/dist/lib/testing/storyboard/junit.js +14 -1
- package/dist/lib/testing/storyboard/junit.js.map +1 -1
- package/dist/lib/testing/storyboard/junit.mjs +14 -1
- package/dist/lib/testing/storyboard/junit.mjs.map +1 -1
- package/dist/lib/testing/storyboard/loader.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/loader.js +2 -0
- package/dist/lib/testing/storyboard/loader.js.map +1 -1
- package/dist/lib/testing/storyboard/loader.mjs +2 -0
- package/dist/lib/testing/storyboard/loader.mjs.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +170 -12
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.mjs +175 -13
- package/dist/lib/testing/storyboard/runner.mjs.map +1 -1
- package/dist/lib/testing/storyboard/seeding.d.mts +10 -3
- package/dist/lib/testing/storyboard/seeding.d.ts +10 -3
- package/dist/lib/testing/storyboard/seeding.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/seeding.js +550 -2
- package/dist/lib/testing/storyboard/seeding.js.map +1 -1
- package/dist/lib/testing/storyboard/seeding.mjs +555 -2
- package/dist/lib/testing/storyboard/seeding.mjs.map +1 -1
- package/dist/lib/testing/storyboard/types.d.mts +106 -0
- package/dist/lib/testing/storyboard/types.d.ts +106 -0
- package/dist/lib/testing/storyboard/types.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/types.js +1 -0
- package/dist/lib/testing/storyboard/types.js.map +1 -1
- package/dist/lib/testing/storyboard/types.mjs +1 -0
- package/dist/lib/testing/storyboard/types.mjs.map +1 -1
- package/dist/lib/testing/stubs/governance-agent-stub.d.ts.map +1 -1
- package/dist/lib/testing/stubs/governance-agent-stub.js +4 -1
- package/dist/lib/testing/stubs/governance-agent-stub.js.map +1 -1
- package/dist/lib/testing/stubs/governance-agent-stub.mjs +4 -1
- package/dist/lib/testing/stubs/governance-agent-stub.mjs.map +1 -1
- package/dist/lib/types/adcp.d.mts +10 -0
- package/dist/lib/types/adcp.d.ts +10 -0
- package/dist/lib/types/adcp.d.ts.map +1 -1
- package/dist/lib/types/adcp.js.map +1 -1
- package/dist/lib/types/adcp.mjs.map +1 -1
- package/dist/lib/types/core.generated.d.mts +127 -19
- package/dist/lib/types/core.generated.d.ts +127 -19
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js.map +1 -1
- package/dist/lib/types/inline-enums.generated.d.mts +2 -0
- package/dist/lib/types/inline-enums.generated.d.ts +2 -0
- package/dist/lib/types/inline-enums.generated.d.ts.map +1 -1
- package/dist/lib/types/inline-enums.generated.js +3 -0
- package/dist/lib/types/inline-enums.generated.js.map +1 -1
- package/dist/lib/types/inline-enums.generated.mjs +2 -0
- package/dist/lib/types/inline-enums.generated.mjs.map +1 -1
- package/dist/lib/types/manifest.generated.d.mts +3 -3
- package/dist/lib/types/manifest.generated.d.ts +3 -3
- package/dist/lib/types/manifest.generated.js.map +1 -1
- package/dist/lib/types/manifest.generated.mjs.map +1 -1
- package/dist/lib/types/per-tool-index.json +1 -1
- package/dist/lib/types/schemas.generated.d.mts +124 -20
- package/dist/lib/types/schemas.generated.d.ts +124 -20
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +83 -24
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/schemas.generated.mjs +79 -24
- package/dist/lib/types/schemas.generated.mjs.map +1 -1
- package/dist/lib/utils/response-schemas.js +1 -1
- package/dist/lib/utils/response-schemas.js.map +1 -1
- package/dist/lib/utils/response-schemas.mjs +1 -1
- package/dist/lib/utils/response-schemas.mjs.map +1 -1
- package/dist/lib/utils/sync-creatives-adapter.d.mts +6 -0
- package/dist/lib/utils/sync-creatives-adapter.d.ts +6 -0
- package/dist/lib/utils/sync-creatives-adapter.d.ts.map +1 -1
- package/dist/lib/utils/sync-creatives-adapter.js +22 -1
- package/dist/lib/utils/sync-creatives-adapter.js.map +1 -1
- package/dist/lib/utils/sync-creatives-adapter.mjs +22 -1
- package/dist/lib/utils/sync-creatives-adapter.mjs.map +1 -1
- package/dist/lib/validation/schema-loader.d.mts +16 -0
- package/dist/lib/validation/schema-loader.d.ts +16 -0
- package/dist/lib/validation/schema-loader.d.ts.map +1 -1
- package/dist/lib/validation/schema-loader.js +116 -0
- package/dist/lib/validation/schema-loader.js.map +1 -1
- package/dist/lib/validation/schema-loader.mjs +115 -0
- package/dist/lib/validation/schema-loader.mjs.map +1 -1
- package/dist/lib/version.d.mts +7 -7
- package/dist/lib/version.d.ts +7 -7
- package/dist/lib/version.d.ts.map +1 -1
- package/dist/lib/version.js +9 -6
- package/dist/lib/version.js.map +1 -1
- package/dist/lib/version.mjs +9 -6
- package/dist/lib/version.mjs.map +1 -1
- package/docs/llms.txt +13 -3
- package/package.json +2 -2
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/brand/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/brand/scenarios/distributed_brand_resolution.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/brand/scenarios/single_side_trust_extension.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/creative/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/creative/scenarios/billing_out_of_band.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/creative/scenarios/canonical_supported_formats.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/creative/scenarios/evaluator_auth.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/creative/scenarios/native_in_feed.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/governance/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/audience_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/available_actions.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/billing_finality_delivery.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/canonical_formats.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/clicks_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/completed_views_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/creative_reception.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/delivery_reporting.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/dependency_impairment.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/event_dedup_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/get_products_async.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/governance_approved.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/governance_conditions.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/inline_creatives_without_sync.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/invalid_transitions.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/measurement_accountability.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/package_correlation_legacy_fallback.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/performance_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/pricing_currency_filter.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/product_signal_targeting.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/proposal_finalize.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/proposal_not_found_errors.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/provenance_audit_observation.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/provenance_enforcement.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/reach_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/refine_products.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/vendor_metric_accountability.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/media-buy/state-machine.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/signals/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/signals/scenarios/get_signals_async.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/domains/sponsored-intelligence/sponsored-context-accountability.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/brand/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/brand/scenarios/distributed_brand_resolution.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/brand/scenarios/single_side_trust_extension.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/creative/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/creative/scenarios/billing_out_of_band.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/creative/scenarios/canonical_supported_formats.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/creative/scenarios/evaluator_auth.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/creative/scenarios/native_in_feed.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/governance/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/audience_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/available_actions.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/billing_finality_delivery.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/canonical_formats.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/clicks_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/completed_views_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/creative_reception.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/dependency_impairment.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/event_dedup_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/get_products_async.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/governance_approved.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/governance_conditions.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/inline_creatives_without_sync.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/measurement_accountability.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/package_correlation_legacy_fallback.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/performance_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/pricing_currency_filter.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/product_signal_targeting.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/proposal_not_found_errors.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/provenance_audit_observation.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/provenance_enforcement.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/reach_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/refine_products.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/vendor_metric_accountability.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/media-buy/state-machine.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/signals/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/signals/scenarios/get_signals_async.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/protocols/sponsored-intelligence/sponsored-context-accountability.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/audience-sync/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/brand-rights/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/collection-lists/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/content-standards/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/creative-ad-server/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/creative-generative/generative-seller.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/creative-generative/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/creative-template/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/creative-transformers/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/governance-aware-seller/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/governance-aware-seller/scenarios/governance_multi_agent_rejected.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/governance-delivery-monitor/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/governance-spend-authority/denied.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/governance-spend-authority/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/property-lists/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/sales-broadcast-tv/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/sales-catalog-driven/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/sales-guaranteed/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/sales-non-guaranteed/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/sales-proposal-mode/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/sales-social/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/signal-marketplace/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/signal-owned/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/specialisms/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-kits/acme-outdoor-live.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-kits/acme-outdoor.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-kits/billing-gate-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-kits/bistro-oranje.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-kits/distributed-brand-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-kits/nova-motors.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-kits/osei-natural.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-kits/parallel-dispatch-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-kits/rate-limit-trip-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-kits/signed-requests-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-kits/single-side-trust-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-kits/substitution-observer-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-kits/summit-foods.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-kits/webhook-receiver-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/catalog-macro-substitution.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/plan-hash/001-minimal-plan.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/plan-hash/002-full-plan.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/plan-hash/004a-human-review-omitted.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/plan-hash/007-unicode-objectives.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/README.md +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/canonicalization.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/keys.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/001-no-signature-header.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/002-wrong-tag.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/003-expired-signature.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/004-window-too-long.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/011-malformed-header.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/013-expires-le-created.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/015-signature-invalid.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/017-key-revoked.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/020-rate-abuse.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/negative/028-unsigned-protocol-method-required.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/positive/001-basic-post.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/positive/003-es256-post.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-receiver-envelope.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/README.md +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/keys.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/positive/001-basic-post.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/positive/002-es256-post.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/test-vectors/webhook-signing/positive/008-request-signing-key-reuse.json +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/billing-gate-dispatch.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/canonical-format-validate-input.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/capability-discovery.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/collection-lists-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/comply-controller-mode-gate.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/content-standards-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/deterministic-testing.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/error-compliance-signals.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/error-compliance.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/fictional-entities.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/get-media-buys-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/get-products-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/get-signals-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/idempotency.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/notification-config-event-scope.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/notification-config-lifecycle.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/notification-config-rejections.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/pagination-integrity-creative-formats.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/pagination-integrity-list-accounts.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/property-lists-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/read-tool-idempotency.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/schema-validation-signals.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/schema-validation.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/security.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/signed-requests.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/stale-response-advisory.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/v3-envelope-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/version-negotiation.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/webhook-emission.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/webhook-receiver-envelope.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/wholesale-feed-bulk-webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/wholesale-feed-product-webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/wholesale-feed-products.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/wholesale-feed-signal-webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.8 → 3.1.11}/universal/wholesale-feed-signals.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/brand/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/brand/scenarios/distributed_brand_resolution.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/brand/scenarios/single_side_trust_extension.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/creative/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/creative/scenarios/billing_out_of_band.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/creative/scenarios/canonical_supported_formats.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/creative/scenarios/evaluator_auth.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/creative/scenarios/native_in_feed.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/governance/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/audience_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/available_actions.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/billing_finality_delivery.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/canonical_formats.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/clicks_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/completed_views_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/create_media_buy_async.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/creative_reception.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/delivery_reporting.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/dependency_impairment.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/event_dedup_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/get_products_async.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/governance_approved.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/governance_conditions.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/inline_creatives_without_sync.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/invalid_transitions.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/measurement_accountability.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/package_correlation_legacy_fallback.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/performance_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/pricing_currency_filter.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/product_signal_targeting.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/proposal_finalize.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/proposal_not_found_errors.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/provenance_audit_observation.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/provenance_enforcement.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/reach_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/refine_products.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/vendor_metric_accountability.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/media-buy/state-machine.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/signals/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/signals/scenarios/get_signals_async.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/domains/sponsored-intelligence/sponsored-context-accountability.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/brand/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/brand/scenarios/distributed_brand_resolution.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/brand/scenarios/single_side_trust_extension.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/creative/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/creative/scenarios/billing_out_of_band.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/creative/scenarios/canonical_supported_formats.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/creative/scenarios/creative_lifecycle_webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/creative/scenarios/evaluator_auth.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/creative/scenarios/native_in_feed.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/governance/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/audience_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/available_actions.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/billing_finality_delivery.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/canonical_formats.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/clicks_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/completed_views_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/create_media_buy_async.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/creative_reception.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/delivery_reporting.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/dependency_impairment.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/dependency_impairment_cardinality.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/event_dedup_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/frequency_cap_enforcement.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/get_products_async.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/governance_approved.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/governance_conditions.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/governance_denied_recovery.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/inline_creatives_without_sync.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/invalid_transitions.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/inventory_list_no_match.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/inventory_list_targeting.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/measurement_accountability.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/measurement_terms_rejected.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/package_correlation_legacy_fallback.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/pending_creatives_to_start.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/per_creative_conversion_attribution.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/performance_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/performance_buy_flow_roas.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/pricing_currency_filter.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/product_signal_targeting.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/proposal_finalize.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/proposal_finalize_asap_timing.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/proposal_not_found_errors.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/provenance_audit_observation.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/provenance_enforcement.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/provenance_truth_of_claim.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/reach_buy_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/refine_finalize_exclusivity.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/refine_products.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/vendor_metric_accountability.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/vendor_metric_catalog_precondition.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/scenarios/vendor_metric_optimization_flow.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/media-buy/state-machine.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/signals/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/signals/scenarios/get_signals_async.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/protocols/sponsored-intelligence/sponsored-context-accountability.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/audience-sync/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/brand-rights/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/brand-rights/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/collection-lists/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/content-standards/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/creative-ad-server/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/creative-generative/generative-seller.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/creative-generative/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/creative-template/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/creative-transformers/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/governance-aware-seller/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/governance-aware-seller/scenarios/governance_multi_agent_rejected.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/governance-delivery-monitor/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/governance-spend-authority/denied.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/governance-spend-authority/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/property-lists/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/sales-broadcast-tv/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/sales-catalog-driven/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/sales-guaranteed/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/sales-non-guaranteed/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/sales-proposal-mode/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/sales-social/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/signal-marketplace/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/signal-marketplace/scenarios/governance_denied.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/signal-owned/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/specialisms/sponsored-intelligence/index.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-kits/acme-outdoor-live.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-kits/acme-outdoor.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-kits/billing-gate-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-kits/bistro-oranje.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-kits/distributed-brand-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-kits/nova-motors.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-kits/osei-natural.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-kits/parallel-dispatch-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-kits/rate-limit-trip-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-kits/signed-requests-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-kits/single-side-trust-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-kits/substitution-observer-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-kits/summit-foods.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-kits/webhook-receiver-runner.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/catalog-macro-substitution.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/plan-hash/001-minimal-plan.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/plan-hash/002-full-plan.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/plan-hash/003-bookkeeping-stripped.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/plan-hash/004a-human-review-omitted.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/plan-hash/004b-human-review-explicit-null.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/plan-hash/005a-policy-categories-order-1.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/plan-hash/005b-policy-categories-order-2.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/plan-hash/006a-ext-trace-v1.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/plan-hash/006b-ext-trace-v2.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/plan-hash/007-unicode-objectives.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/plan-hash/008-numeric-canonicalization.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/README.md +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/canonicalization.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/keys.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/001-no-signature-header.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/002-wrong-tag.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/003-expired-signature.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/004-window-too-long.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/005-alg-not-allowed.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/006-missing-covered-component.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/007-missing-content-digest.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/008-unknown-keyid.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/009-key-ops-missing-verify.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/010-content-digest-mismatch.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/011-malformed-header.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/012-missing-expires-param.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/013-expires-le-created.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/014-missing-nonce-param.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/015-signature-invalid.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/016-replayed-nonce.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/017-key-revoked.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/018-digest-covered-when-forbidden.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/019-signature-without-signature-input.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/020-rate-abuse.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/021-duplicate-signature-input-label.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/022-multi-valued-content-type.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/023-multi-valued-content-digest.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/024-unquoted-string-param.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/025-jwk-alg-crv-mismatch.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/026-non-ascii-host.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/027-webhook-registration-authentication-unsigned.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/negative/028-unsigned-protocol-method-required.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/positive/001-basic-post.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/positive/002-post-with-content-digest.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/positive/003-es256-post.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/positive/004-multiple-signature-labels.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/positive/005-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/positive/006-dot-segment-path.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/positive/007-query-byte-preserved.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/positive/008-percent-encoded-path.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/positive/009-percent-encoded-unreserved-decoded.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/positive/010-percent-encoded-slash-preserved.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/positive/011-ipv6-authority.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/request-signing/positive/012-ipv6-authority-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-receiver-envelope.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/README.md +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/keys.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/001-wrong-tag.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/002-expired-signature.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/003-window-too-long.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/004-alg-not-allowed.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/005-missing-authority-component.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/006-missing-content-digest.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/007-unknown-keyid.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/008-wrong-adcp-use.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/009-content-digest-mismatch.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/010-malformed-signature-input.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/011-signature-without-input.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/012-missing-expires-param.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/013-expires-le-created.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/014-missing-nonce-param.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/015-signature-invalid.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/016-replayed-nonce.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/017-key-revoked.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/018-rate-abuse.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/019-revocation-stale.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/020-key-ops-missing-verify.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/negative/021-base64-alphabet-mixing.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/001-basic-post.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/002-es256-post.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/003-multiple-signature-labels.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/004-default-port-stripped.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/005-percent-encoded-path.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/006-query-byte-preserved.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/007-body-without-idempotency-key.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/test-vectors/webhook-signing/positive/008-request-signing-key-reuse.json +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/billing-gate-dispatch.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/canonical-format-validate-input.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/capability-discovery.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/collection-lists-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/comply-controller-mode-gate.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/content-standards-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/deterministic-testing.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/error-compliance-signals.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/error-compliance.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/fictional-entities.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/get-media-buys-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/get-products-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/get-signals-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/idempotency.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/notification-config-event-scope.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/notification-config-lifecycle.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/notification-config-rejections.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/pagination-integrity-creative-formats.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/pagination-integrity-list-accounts.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/property-lists-pagination-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/read-tool-idempotency.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/schema-validation-signals.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/schema-validation.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/security.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/signed-requests.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/stale-response-advisory.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/v3-envelope-integrity.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/version-negotiation.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/webhook-emission.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/webhook-receiver-envelope.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/wholesale-feed-bulk-webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/wholesale-feed-product-webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/wholesale-feed-products.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/wholesale-feed-signal-webhooks.yaml +0 -0
- /package/compliance/cache/{3.1.8.previous → 3.1.11.previous}/universal/wholesale-feed-signals.yaml +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/errors/index.ts"],"sourcesContent":["// Custom error classes for ADCP client library\n\n/**\n * Base class for all ADCP client errors\n */\nexport abstract class ADCPError extends Error {\n abstract readonly code: string;\n\n constructor(\n message: string,\n public details?: unknown\n ) {\n super(message);\n this.name = this.constructor.name;\n }\n}\n\n/**\n * Error thrown when a task times out\n */\nexport class TaskTimeoutError extends ADCPError {\n readonly code = 'TASK_TIMEOUT';\n\n constructor(\n public readonly taskId: string,\n public readonly timeout: number\n ) {\n super(`Task ${taskId} timed out after ${timeout}ms`);\n }\n}\n\n/**\n * Error thrown when maximum clarification attempts are exceeded\n */\nexport class MaxClarificationError extends ADCPError {\n readonly code = 'MAX_CLARIFICATIONS';\n\n constructor(\n public readonly taskId: string,\n public readonly maxAttempts: number\n ) {\n super(`Task ${taskId} exceeded maximum clarification attempts: ${maxAttempts}`);\n }\n}\n\n/**\n * Error thrown when a task is deferred to human\n * Contains the token needed to resume the task\n */\nexport class DeferredTaskError extends ADCPError {\n readonly code = 'TASK_DEFERRED';\n\n constructor(public readonly token: string) {\n super(`Task deferred with token: ${token}`);\n }\n}\n\n/**\n * Error thrown when a task is aborted\n */\nexport class TaskAbortedError extends ADCPError {\n readonly code = 'TASK_ABORTED';\n\n constructor(\n public readonly taskId: string,\n public readonly reason?: string\n ) {\n super(`Task ${taskId} aborted: ${reason || 'No reason provided'}`);\n }\n}\n\n/**\n * Error thrown when an agent is not found\n */\nexport class AgentNotFoundError extends ADCPError {\n readonly code = 'AGENT_NOT_FOUND';\n\n constructor(\n public readonly agentId: string,\n public readonly availableAgents: string[]\n ) {\n super(`Agent '${agentId}' not found. Available agents: ${availableAgents.join(', ')}`);\n }\n}\n\n/**\n * Error thrown when an agent doesn't support a task\n */\nexport class UnsupportedTaskError extends ADCPError {\n readonly code = 'UNSUPPORTED_TASK';\n\n constructor(\n public readonly agentId: string,\n public readonly taskName: string,\n public readonly supportedTasks?: string[]\n ) {\n const tasksMsg = supportedTasks ? ` Supported tasks: ${supportedTasks.join(', ')}` : '';\n super(`Agent '${agentId}' does not support task '${taskName}'.${tasksMsg}`);\n }\n}\n\n/**\n * Error thrown when protocol communication fails\n */\nexport class ProtocolError extends ADCPError {\n readonly code = 'PROTOCOL_ERROR';\n\n constructor(\n public readonly protocol: 'mcp' | 'a2a',\n message: string,\n public readonly originalError?: Error\n ) {\n super(`${protocol.toUpperCase()} protocol error: ${message}`);\n this.details = { originalError };\n }\n}\n\n/**\n * Error thrown when validation fails\n */\nexport class ValidationError extends ADCPError {\n readonly code = 'VALIDATION_ERROR';\n\n constructor(\n public readonly field: string,\n public readonly value: unknown,\n public readonly constraint: string\n ) {\n super(`Validation failed for field '${field}': ${constraint}`);\n this.details = { field, value, constraint };\n }\n}\n\n/**\n * Error thrown when input handler is missing but required\n */\nexport class MissingInputHandlerError extends ADCPError {\n readonly code = 'MISSING_INPUT_HANDLER';\n\n constructor(\n public readonly taskId: string,\n public readonly question: string\n ) {\n super(`Agent requested input but no handler provided. Task: ${taskId}, Question: ${question}`);\n }\n}\n\n/**\n * Error thrown when conversation context is invalid\n */\nexport class InvalidContextError extends ADCPError {\n readonly code = 'INVALID_CONTEXT';\n\n constructor(\n public readonly contextId: string,\n reason: string\n ) {\n super(`Invalid conversation context '${contextId}': ${reason}`);\n }\n}\n\n/**\n * Error thrown when configuration is invalid\n */\nexport class ConfigurationError extends ADCPError {\n readonly code = 'CONFIGURATION_ERROR';\n\n constructor(\n message: string,\n public readonly configField?: string\n ) {\n super(`Configuration error: ${message}`);\n this.details = { configField };\n }\n}\n\n/**\n * OAuth metadata for authentication guidance\n */\nexport interface OAuthMetadataInfo {\n /** URL of the authorization endpoint */\n authorization_endpoint: string;\n /** URL of the token endpoint */\n token_endpoint: string;\n /** URL of the dynamic client registration endpoint (optional) */\n registration_endpoint?: string;\n /** Issuer identifier */\n issuer?: string;\n}\n\n/**\n * Subset of the parsed `WWW-Authenticate` challenge surfaced on\n * {@link AuthenticationRequiredError}. Mirrors the public shape of\n * `WWWAuthenticateChallenge` from `@adcp/sdk/auth/oauth` without forcing the\n * errors module to depend on the auth subtree (the dependency would invert\n * the build graph).\n *\n * `scheme` is lowercased per RFC 9110 §11.6.1.\n */\nexport interface AuthChallengeInfo {\n scheme: string;\n realm?: string;\n scope?: string;\n error?: string;\n error_description?: string;\n}\n\n/**\n * Error thrown when authentication is required to access an MCP endpoint\n *\n * This error is thrown during MCP endpoint discovery when the server returns\n * a 401 Unauthorized response. The shape of the remediation depends on what\n * the 401 disclosed:\n *\n * - OAuth metadata (RFC 9728 PRM walk succeeded) → `oauthMetadata` set,\n * message points at the authorization endpoint.\n * - A `WWW-Authenticate` challenge with a non-Bearer scheme (e.g. Basic\n * behind an Apigee/Kong/AWS API GW gateway) → `challenge` set, message\n * names the scheme and the SDK / CLI surface that configures it.\n * - Plain 401 with no metadata → fallback \"provide auth_token\" message.\n *\n * Consumers branching on `error.challenge?.scheme === 'basic'` can route\n * straight to `auth: { type: 'basic', username, password }` instead of\n * retrying Bearer indefinitely.\n *\n * @example\n * ```typescript\n * try {\n * await client.getProducts({ brief: 'test' });\n * } catch (error) {\n * if (error instanceof AuthenticationRequiredError) {\n * if (error.challenge?.scheme === 'basic') {\n * // Gateway-fronted agent — configure HTTP Basic\n * reconnect({ auth: { type: 'basic', username, password } });\n * } else if (error.oauthMetadata) {\n * // Redirect user to OAuth flow\n * const authUrl = error.oauthMetadata.authorization_endpoint;\n * console.log(`Please authenticate at: ${authUrl}`);\n * } else {\n * console.log('Authentication required but no scheme metadata available');\n * }\n * }\n * }\n * ```\n */\nexport class AuthenticationRequiredError extends ADCPError {\n readonly code = 'AUTHENTICATION_REQUIRED';\n\n constructor(\n public readonly agentUrl: string,\n public readonly oauthMetadata?: OAuthMetadataInfo,\n message?: string,\n public readonly challenge?: AuthChallengeInfo\n ) {\n const defaultMessage = buildAuthRequiredMessage(agentUrl, oauthMetadata, challenge);\n super(message || defaultMessage);\n // `details` is serialized through error envelopes; surfacing the challenge\n // here lets non-CLI consumers (LLM agents, dashboards, programmatic\n // callers) branch on the scheme without instanceof-checking.\n this.details = { agentUrl, oauthMetadata, challenge };\n }\n\n /**\n * Check if OAuth authentication is available\n */\n get hasOAuth(): boolean {\n return this.oauthMetadata !== undefined;\n }\n\n /**\n * Get the authorization URL if OAuth is available\n */\n get authorizationUrl(): string | undefined {\n return this.oauthMetadata?.authorization_endpoint;\n }\n\n /**\n * Lowercased scheme from the `WWW-Authenticate` challenge, when present.\n * `'basic'` is the common non-OAuth case — gateway-fronted agents speaking\n * RFC 7617.\n */\n get suggestedScheme(): string | undefined {\n return this.challenge?.scheme;\n }\n}\n\n/**\n * Build the default error message. Branches on what the 401 disclosed:\n * - non-Bearer challenge (Basic, Digest, …) → scheme-specific remediation\n * - OAuth metadata → point at the authorization endpoint\n * - nothing → fallback \"provide auth_token\"\n *\n * The Basic branch names both the SDK shape (`createTestClient({ auth: …\n * type: 'basic' })`) and the CLI shape (`--auth user:pass --auth-scheme\n * basic`) so the same error envelope serves library and CLI consumers.\n */\nfunction buildAuthRequiredMessage(\n agentUrl: string,\n oauthMetadata: OAuthMetadataInfo | undefined,\n challenge: AuthChallengeInfo | undefined\n): string {\n if (challenge && challenge.scheme !== 'bearer') {\n if (challenge.scheme === 'basic') {\n return (\n `Authentication required for ${agentUrl}. Agent (or its fronting gateway) speaks HTTP Basic ` +\n `(RFC 7617). Configure via createTestClient({ auth: { type: 'basic', username, password } }) ` +\n `— or from the CLI, --auth <user:pass> --auth-scheme basic.`\n );\n }\n // Digest / Negotiate / NTLM / vendor schemes: we don't have first-class\n // support but the scheme name in the message saves a discovery round-trip.\n const realmHint = challenge.realm ? ` (realm: ${challenge.realm})` : '';\n return (\n `Authentication required for ${agentUrl}. Agent speaks ${challenge.scheme}${realmHint}, ` +\n `which is not natively supported by @adcp/sdk. Configure auth at the transport layer ` +\n `(custom fetch wrapper, reverse-proxy header injection) or contact the agent operator ` +\n `about Bearer / Basic / OAuth support.`\n );\n }\n if (oauthMetadata) {\n return `Authentication required for ${agentUrl}. OAuth available at: ${oauthMetadata.authorization_endpoint}`;\n }\n return `Authentication required for ${agentUrl}. No OAuth metadata available - provide auth_token in agent config.`;\n}\n\n/**\n * Error thrown when a request reused an `idempotency_key` with a different\n * canonical payload within the seller's replay window.\n *\n * Recovery: `correctable` — the caller either reused a key by mistake (mint\n * a fresh UUID v4 for the new request) or re-planned with a different payload\n * (an agent whose LLM re-ran and emitted a different request must treat that\n * as a new intent, not a retry).\n *\n * @example\n * ```typescript\n * try {\n * await client.createMediaBuy({...});\n * } catch (error) {\n * if (error instanceof IdempotencyConflictError) {\n * // Either the key was reused by mistake, or the agent re-planned with\n * // a different payload. Mint a fresh key and try again.\n * }\n * }\n * ```\n */\nexport class IdempotencyConflictError extends ADCPError {\n readonly code = 'IDEMPOTENCY_CONFLICT';\n\n // Exposed via the getter so `console.log(err)` and JSON.stringify don't\n // leak the key (it's a retry-pattern oracle within the seller's TTL).\n // Callers reading `err.idempotencyKey` get it normally.\n readonly idempotencyKey: string | undefined;\n\n constructor(idempotencyKey: string | undefined, message?: string) {\n super(\n message ||\n 'idempotency_key was used earlier with a different canonical payload. ' +\n 'Use a fresh UUID v4 for the new request, or resend the exact original payload to get the cached response.'\n );\n Object.defineProperty(this, 'idempotencyKey', {\n value: idempotencyKey,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n }\n}\n\n/**\n * Error thrown when a request carries an `idempotency_key` that is past the\n * seller's declared replay window (plus clock-skew tolerance).\n *\n * Recovery: `correctable`. If the caller knows the prior call succeeded\n * (e.g., they saw the response once, then crashed), they SHOULD fall back\n * to a natural-key lookup (e.g., `get_media_buys` by\n * `context.internal_campaign_id`) rather than minting a new key — otherwise\n * the seller treats the new request as fresh and silently creates a duplicate.\n *\n * If the caller doesn't know whether the prior call succeeded, a fresh key\n * is safe.\n */\nexport class IdempotencyExpiredError extends ADCPError {\n readonly code = 'IDEMPOTENCY_EXPIRED';\n\n // Non-enumerable so `console.log(err)` / JSON.stringify don't leak it —\n // same reasoning as IdempotencyConflictError.idempotencyKey.\n readonly idempotencyKey: string | undefined;\n\n constructor(idempotencyKey: string | undefined, message?: string) {\n super(\n message ||\n \"idempotency_key is past the seller's replay window. \" +\n 'If you know the prior call succeeded, look up the resource by natural key before retrying. Otherwise, mint a fresh UUID v4.'\n );\n Object.defineProperty(this, 'idempotencyKey', {\n value: idempotencyKey,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n }\n}\n\nexport interface FeatureUnsupportedErrorOptions {\n message?: string;\n details?: Record<string, unknown>;\n}\n\nexport type ClientPreflightAdcpErrorRecovery = 'transient' | 'correctable' | 'terminal';\n\n/**\n * Protocol-shaped error metadata attached to SDK-local preflight throws.\n * Mirrors the public `TaskResult.adcpError` fields without importing core\n * task types into the errors module.\n */\nexport interface ClientPreflightAdcpErrorInfo {\n code: string;\n message: string;\n recovery?: ClientPreflightAdcpErrorRecovery;\n field?: string;\n suggestion?: string;\n details?: Record<string, unknown>;\n}\n\nexport interface ProtocolFeatureUnsupportedErrorOptions extends FeatureUnsupportedErrorOptions {\n field?: string;\n suggestion?: string;\n recovery?: ClientPreflightAdcpErrorRecovery;\n}\n\nexport const SDK_ERROR_TO_PROTOCOL_ERROR_CODE = {\n FEATURE_UNSUPPORTED: 'UNSUPPORTED_FEATURE',\n} as const;\n\nexport function mapSdkErrorCodeToProtocolErrorCode(code: string): string | undefined {\n return SDK_ERROR_TO_PROTOCOL_ERROR_CODE[code as keyof typeof SDK_ERROR_TO_PROTOCOL_ERROR_CODE];\n}\n\n/**\n * Error thrown when a required feature is not supported by the seller or by\n * the configured AdCP version.\n */\nexport class FeatureUnsupportedError extends ADCPError {\n readonly code: string = 'FEATURE_UNSUPPORTED';\n\n constructor(\n public readonly unsupportedFeatures: string[],\n public readonly declaredFeatures: string[],\n public readonly agentUrl?: string,\n options: FeatureUnsupportedErrorOptions = {}\n ) {\n const missing = unsupportedFeatures.join(', ');\n const declared = declaredFeatures.length > 0 ? declaredFeatures.join(', ') : '(none)';\n const urlPart = agentUrl ? ` at ${agentUrl}` : '';\n super(options.message ?? `Seller${urlPart} does not support: ${missing}\\n Declared features: ${declared}`);\n this.details = {\n unsupported_features: unsupportedFeatures,\n declared_features: declaredFeatures,\n ...(options.details ?? {}),\n };\n }\n}\n\n/**\n * Version-gate error for requests that use a protocol feature outside the\n * configured AdCP release. Kept as a FeatureUnsupportedError subclass so\n * existing catch sites keep working, while `code` carries the AdCP wire code\n * expected by probe/recovery layers.\n */\nexport class ProtocolFeatureUnsupportedError extends FeatureUnsupportedError {\n readonly code: string = 'UNSUPPORTED_FEATURE';\n\n readonly adcpError: ClientPreflightAdcpErrorInfo;\n\n constructor(\n unsupportedFeatures: string[],\n declaredFeatures: string[],\n agentUrl?: string,\n options: ProtocolFeatureUnsupportedErrorOptions = {}\n ) {\n super(unsupportedFeatures, declaredFeatures, agentUrl, options);\n this.adcpError = {\n code: this.code,\n message: this.message,\n recovery: options.recovery ?? 'correctable',\n ...(options.field && { field: options.field }),\n ...(options.suggestion && { suggestion: options.suggestion }),\n ...(isRecord(this.details) && { details: this.details }),\n };\n }\n}\n\nexport function getClientPreflightAdcpError(error: unknown): ClientPreflightAdcpErrorInfo | undefined {\n if (error instanceof ProtocolFeatureUnsupportedError) {\n return error.adcpError;\n }\n return undefined;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === 'object' && !Array.isArray(value);\n}\n\n/**\n * Error thrown when a response body exceeds the configured `maxResponseBytes`\n * cap on the transport. Surfaced when crawling untrusted agents (registries,\n * federated discovery layers) to prevent a hostile vendor from buffering a\n * large reply before schema validation runs.\n *\n * Recovery: `terminal` from the SDK's view — repeating the call against the\n * same agent will hit the same cap. The buyer's options are to widen the\n * cap (per-call `transport.maxResponseBytes`) when the agent's payload is\n * legitimately large, or to flag the agent as misbehaving.\n */\nexport class ResponseTooLargeError extends ADCPError {\n readonly code = 'RESPONSE_TOO_LARGE';\n\n constructor(\n public readonly limit: number,\n public readonly bytesRead: number,\n public readonly url: string,\n /**\n * The parsed value of the `Content-Length` response header when the cap\n * was tripped on the pre-check (before any body bytes were read). Undefined\n * when the response was streamed and exceeded the cap mid-flight, or when\n * the server omitted the header.\n */\n public readonly contentLengthHeader?: number\n ) {\n super(\n contentLengthHeader !== undefined\n ? `Response body declared ${contentLengthHeader} bytes, exceeds maxResponseBytes cap of ${limit} (${url})`\n : `Response body exceeded maxResponseBytes cap of ${limit} after reading ${bytesRead} bytes (${url})`\n );\n this.details = { limit, bytesRead, url, contentLengthHeader };\n }\n}\n\n/**\n * Error thrown when an `update_media_buy` request is rejected because the\n * action it maps to isn't currently allowed on the buy (AdCP 3.1, RFC #4480).\n *\n * Typed `details` payload follows `error-details/action-not-allowed.json`:\n * `attempted_action`, `reason`, optional `currently_available_actions[]`.\n *\n * Recovery branches on `reason`:\n * - `wrong_status`: transition the buy (or wait) to an allowed status.\n * - `not_supported_on_product`: terminal for this buy; pick a different\n * product for future buys that need the action.\n * - `not_supported_on_buy`: terminal; renegotiate buy terms.\n * - `mode_mismatch`: `recovery` is set to a typed hint indicating the\n * required flow (`createProposal`, `waitForApproval`, `reissueAsDirect`)\n * instead of a plain retry.\n */\nexport class ActionNotAllowedError extends ADCPError {\n readonly code = 'ACTION_NOT_ALLOWED';\n\n readonly attemptedAction: ActionNotAllowedErrorDetails['attempted_action'];\n readonly reason: ActionNotAllowedErrorDetails['reason'];\n readonly currentlyAvailableActions: ReadonlyArray<ActionNotAllowedAvailableAction>;\n readonly recovery?: ActionNotAllowedRecovery;\n\n constructor(detailsPayload: ActionNotAllowedErrorDetails, message?: string) {\n super(message ?? buildActionNotAllowedMessage(detailsPayload));\n this.attemptedAction = detailsPayload.attempted_action;\n this.reason = detailsPayload.reason;\n this.currentlyAvailableActions = detailsPayload.currently_available_actions ?? [];\n this.recovery = detailsPayload.reason === 'mode_mismatch' ? buildModeMismatchRecovery(detailsPayload) : undefined;\n this.details = detailsPayload;\n }\n}\n\n/**\n * Inline copy of the structured payload - duplicated here rather than\n * imported from `media-buy/types` to keep the errors module free of\n * cross-module imports (matches the convention used for the other typed\n * errors in this file).\n */\nexport interface ActionNotAllowedErrorDetails {\n attempted_action: ActionNotAllowedAttemptedAction;\n reason: ActionNotAllowedReasonValue;\n currently_available_actions?: ActionNotAllowedAvailableAction[];\n}\n\nexport type ActionNotAllowedReasonValue =\n | 'wrong_status'\n | 'not_supported_on_product'\n | 'not_supported_on_buy'\n | 'mode_mismatch';\n\nexport type ActionNotAllowedAttemptedAction = string;\n\nexport interface ActionNotAllowedAvailableAction {\n action: ActionNotAllowedAttemptedAction;\n mode: 'self_serve' | 'conditional_self_serve' | 'requires_proposal' | 'requires_approval';\n sla?: unknown;\n terms_ref?: string;\n}\n\nexport type ActionNotAllowedRecovery =\n | { kind: 'createProposal'; message: string }\n | { kind: 'waitForApproval'; message: string }\n | { kind: 'reissueAsDirect'; message: string };\n\nfunction buildActionNotAllowedMessage(details: ActionNotAllowedErrorDetails): string {\n const prefix = `update_media_buy rejected: \\`${details.attempted_action}\\` not allowed (${details.reason}).`;\n switch (details.reason) {\n case 'wrong_status':\n return `${prefix} transition the buy to an allowed status before retrying.`;\n case 'not_supported_on_product':\n return `${prefix} product does not declare this action; pick a different product for future buys needing it.`;\n case 'not_supported_on_buy':\n return `${prefix} buy was negotiated without this capability; renegotiate buy terms.`;\n case 'mode_mismatch':\n return `${prefix} mode shifted between preflight and dispatch; re-issue through the appropriate flow indicated by available_actions.`;\n }\n}\n\nfunction buildModeMismatchRecovery(details: ActionNotAllowedErrorDetails): ActionNotAllowedRecovery | undefined {\n const match = details.currently_available_actions?.find(a => a.action === details.attempted_action);\n if (!match) return undefined;\n switch (match.mode) {\n case 'requires_proposal':\n return {\n kind: 'createProposal',\n message:\n `seller now resolves \\`${details.attempted_action}\\` as requires_proposal. ` +\n 'reissue via the proposal lifecycle (`create_proposal` / `finalize_proposal`).',\n };\n case 'requires_approval':\n return {\n kind: 'waitForApproval',\n message:\n `seller now resolves \\`${details.attempted_action}\\` as requires_approval. ` +\n 'expect an async approval callback rather than a direct response.',\n };\n case 'conditional_self_serve':\n return {\n kind: 'reissueAsDirect',\n message:\n `seller resolves \\`${details.attempted_action}\\` as conditional_self_serve: ` +\n 'small mutations clear automatically, larger ones queue. retry; expect a possible async escalation.',\n };\n case 'self_serve':\n return {\n kind: 'reissueAsDirect',\n message: `seller resolves \\`${details.attempted_action}\\` as self_serve. retry the same request.`,\n };\n }\n}\n\n/**\n * Reason the v3 guard refused a mutating dispatch.\n * - `version`: seller's `major_versions` does not include 3\n * - `idempotency`: seller reports v3 but omits the required\n * `adcp.idempotency.replay_ttl_seconds` declaration\n * - `synthetic`: @deprecated — kept in the union for downstream\n * consumers that pattern-match on the union literal, but the SDK no\n * longer emits it. Sellers whose capabilities are synthesized from\n * `tools/list` are routed through the v2 adapter with a one-time\n * warning; gate retry behavior on `SingleAgentClient.isSyntheticV2()`.\n */\nexport type VersionUnsupportedReason =\n | 'version'\n | 'idempotency'\n /** @deprecated SDK no longer emits this reason. See union JSDoc. */\n | 'synthetic';\n\n/**\n * Error thrown when a mutating call would dispatch to a seller whose\n * capabilities cannot be corroborated as v3. Provides an explicit\n * pre-flight signal so callers don't silently mutate state on agents\n * that have not negotiated the expected major version.\n *\n * Agent URL is exposed on the instance (`agentUrl`) but omitted from the\n * default message to avoid leaking seller identity into shared log sinks.\n */\nexport class VersionUnsupportedError extends ADCPError {\n readonly code = 'VERSION_UNSUPPORTED';\n\n constructor(\n public readonly taskType: string,\n public readonly reason: VersionUnsupportedReason,\n public readonly actualVersion: 'v2' | 'v3',\n public readonly agentUrl?: string\n ) {\n super(\n `Refusing to dispatch mutating task '${taskType}': ` +\n VersionUnsupportedError.explain(reason, actualVersion) +\n ` Pass allowV2: true or requireV3ForMutations: false to override.`\n );\n }\n\n private static explain(reason: VersionUnsupportedReason, actualVersion: 'v2' | 'v3'): string {\n switch (reason) {\n case 'version':\n return `seller advertises major version '${actualVersion}' but v3 is required.`;\n case 'idempotency':\n return `seller reports v3 but omits adcp.idempotency.replay_ttl_seconds (required by spec).`;\n case 'synthetic':\n return `capabilities were synthesized from a tool list, v3 claim is unverifiable.`;\n }\n }\n}\n\n/**\n * Check if an error indicates a 401 Unauthorized response\n *\n * This helper centralizes the fragile logic of detecting 401 errors from\n * various sources (HTTP status codes, error messages, wrapped errors).\n * Used during endpoint discovery to detect authentication requirements.\n *\n * @param error - The error to check\n * @param got401Flag - Optional flag that was set by tracking HTTP responses\n * @returns true if the error appears to be a 401 authentication error\n */\nexport function is401Error(error: unknown, got401Flag = false): boolean {\n if (got401Flag) {\n return true;\n }\n\n if (!error) {\n return false;\n }\n\n // Check for status property (common in HTTP errors). MCP SDK's\n // `StreamableHTTPClientTransport` throws errors with the HTTP status on\n // `.code`, so we check that too.\n const errorObj = error as Record<string, unknown>;\n const status =\n (errorObj as { status?: number })?.status ||\n (errorObj as { response?: { status?: number } })?.response?.status ||\n (errorObj as { cause?: { status?: number } })?.cause?.status ||\n (errorObj as { code?: unknown })?.code;\n if (status === 401) {\n return true;\n }\n\n // Fall back to string matching in error message. Use word boundaries so\n // we don't misidentify things like \"product prod-401-xyz\" as an HTTP 401,\n // and require \"Unauthorized\" as a whole word rather than as a substring.\n const message = (errorObj as { message?: string })?.message || '';\n return /\\b401\\b/.test(message) || /\\bunauthorized\\b/i.test(message);\n}\n\n/**\n * Map a structured AdCP error (code + message) to a typed ADCPError subclass\n * when the code has a dedicated class. Returns `undefined` for codes that\n * don't have a typed mapping — callers should continue to use the untyped\n * `AdcpErrorInfo` for those.\n *\n * Pass the `idempotencyKey` the SDK sent so the constructed error carries it\n * for the caller's recovery logic. The server intentionally omits the key\n * from error bodies (it's a read-oracle), so the transport-layer caller is\n * the authoritative source.\n */\nexport function adcpErrorToTypedError(\n adcpError: { code: string; message?: string; details?: unknown },\n idempotencyKey?: string\n): ADCPError | undefined {\n switch (adcpError.code) {\n case 'IDEMPOTENCY_CONFLICT':\n return new IdempotencyConflictError(idempotencyKey, adcpError.message);\n case 'IDEMPOTENCY_EXPIRED':\n return new IdempotencyExpiredError(idempotencyKey, adcpError.message);\n case 'ACTION_NOT_ALLOWED': {\n const parsed = parseActionNotAllowedDetails(adcpError.details);\n if (!parsed) return undefined;\n return new ActionNotAllowedError(parsed, adcpError.message);\n }\n default:\n return undefined;\n }\n}\n\nfunction parseActionNotAllowedDetails(raw: unknown): ActionNotAllowedErrorDetails | undefined {\n if (!raw || typeof raw !== 'object') return undefined;\n const obj = raw as Record<string, unknown>;\n const attempted = obj['attempted_action'];\n const reason = obj['reason'];\n if (typeof attempted !== 'string' || typeof reason !== 'string') return undefined;\n if (!isActionNotAllowedReason(reason)) return undefined;\n\n const rawList = obj['currently_available_actions'];\n let currently: ActionNotAllowedAvailableAction[] | undefined;\n if (Array.isArray(rawList)) {\n currently = [];\n for (const entry of rawList) {\n if (!entry || typeof entry !== 'object') continue;\n const e = entry as Record<string, unknown>;\n const action = e['action'];\n const mode = e['mode'];\n if (typeof action !== 'string' || typeof mode !== 'string') continue;\n if (!isActionMode(mode)) continue;\n const parsedEntry: ActionNotAllowedAvailableAction = { action, mode };\n if (typeof e['terms_ref'] === 'string') parsedEntry.terms_ref = e['terms_ref'];\n if (e['sla'] !== undefined) parsedEntry.sla = e['sla'];\n currently.push(parsedEntry);\n }\n }\n\n return {\n attempted_action: attempted,\n reason,\n currently_available_actions: currently,\n };\n}\n\nfunction isActionNotAllowedReason(value: string): value is ActionNotAllowedReasonValue {\n return (\n value === 'wrong_status' ||\n value === 'not_supported_on_product' ||\n value === 'not_supported_on_buy' ||\n value === 'mode_mismatch'\n );\n}\n\nfunction isActionMode(value: string): value is ActionNotAllowedAvailableAction['mode'] {\n return (\n value === 'self_serve' ||\n value === 'conditional_self_serve' ||\n value === 'requires_proposal' ||\n value === 'requires_approval'\n );\n}\n\n/**\n * Type guard to check if an error is an ADCP error\n */\nexport function isADCPError(error: unknown): error is ADCPError {\n return error instanceof ADCPError;\n}\n\n/**\n * Type guard to check if an error is a specific ADCP error type\n */\nexport function isErrorOfType<T extends ADCPError>(error: unknown, ErrorClass: new (...args: any[]) => T): error is T {\n return error instanceof ErrorClass;\n}\n\n/**\n * Utility to extract error information for logging/debugging\n */\nexport function extractErrorInfo(error: unknown): {\n message: string;\n code?: string;\n details?: unknown;\n stack?: string;\n} {\n if (isADCPError(error)) {\n return {\n message: error.message,\n code: error.code,\n details: error.details,\n stack: error.stack,\n };\n }\n\n if (error instanceof Error) {\n return {\n message: error.message,\n stack: error.stack,\n };\n }\n\n return {\n message: String(error),\n };\n}\n"],"mappings":"AAKO,MAAe,kBAAkB,MAAM;AAAA,EAG5C,YACE,SACO,SACP;AACA,UAAM,OAAO;AAFN;AAGP,SAAK,OAAO,KAAK,YAAY;AAAA,EAC/B;AAAA,EAJS;AAKX;AAKO,MAAM,yBAAyB,UAAU;AAAA,EAG9C,YACkB,QACA,SAChB;AACA,UAAM,QAAQ,MAAM,oBAAoB,OAAO,IAAI;AAHnC;AACA;AAAA,EAGlB;AAAA,EAJkB;AAAA,EACA;AAAA,EAJT,OAAO;AAQlB;AAKO,MAAM,8BAA8B,UAAU;AAAA,EAGnD,YACkB,QACA,aAChB;AACA,UAAM,QAAQ,MAAM,6CAA6C,WAAW,EAAE;AAH9D;AACA;AAAA,EAGlB;AAAA,EAJkB;AAAA,EACA;AAAA,EAJT,OAAO;AAQlB;AAMO,MAAM,0BAA0B,UAAU;AAAA,EAG/C,YAA4B,OAAe;AACzC,UAAM,6BAA6B,KAAK,EAAE;AADhB;AAAA,EAE5B;AAAA,EAF4B;AAAA,EAFnB,OAAO;AAKlB;AAKO,MAAM,yBAAyB,UAAU;AAAA,EAG9C,YACkB,QACA,QAChB;AACA,UAAM,QAAQ,MAAM,aAAa,UAAU,oBAAoB,EAAE;AAHjD;AACA;AAAA,EAGlB;AAAA,EAJkB;AAAA,EACA;AAAA,EAJT,OAAO;AAQlB;AAKO,MAAM,2BAA2B,UAAU;AAAA,EAGhD,YACkB,SACA,iBAChB;AACA,UAAM,UAAU,OAAO,kCAAkC,gBAAgB,KAAK,IAAI,CAAC,EAAE;AAHrE;AACA;AAAA,EAGlB;AAAA,EAJkB;AAAA,EACA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E,QAAQ,KAAK;AACpE,UAAI,OAAO,EAAE,WAAW,MAAM,SAAU,aAAY,YAAY,EAAE,WAAW;AAC7E,UAAI,EAAE,KAAK,MAAM,OAAW,aAAY,MAAM,EAAE,KAAK;AACrD,gBAAU,KAAK,WAAW;AAAA,IAC5B;AAAA,EACF;AAEA,SAAO;AAAA,IACL,kBAAkB;AAAA,IAClB;AAAA,IACA,6BAA6B;AAAA,EAC/B;AACF;AAEA,SAAS,yBAAyB,OAAqD;AACrF,SACE,UAAU,kBACV,UAAU,8BACV,UAAU,0BACV,UAAU;AAEd;AAEA,SAAS,aAAa,OAAiE;AACrF,SACE,UAAU,gBACV,UAAU,4BACV,UAAU,uBACV,UAAU;AAEd;AAKO,SAAS,YAAY,OAAoC;AAC9D,SAAO,iBAAiB;AAC1B;AAKO,SAAS,cAAmC,OAAgB,YAAmD;AACpH,SAAO,iBAAiB;AAC1B;AAKO,SAAS,iBAAiB,OAK/B;AACA,MAAI,YAAY,KAAK,GAAG;AACtB,WAAO;AAAA,MACL,SAAS,MAAM;AAAA,MACf,MAAM,MAAM;AAAA,MACZ,SAAS,MAAM;AAAA,MACf,OAAO,MAAM;AAAA,IACf;AAAA,EACF;AAEA,MAAI,iBAAiB,OAAO;AAC1B,WAAO;AAAA,MACL,SAAS,MAAM;AAAA,MACf,OAAO,MAAM;AAAA,IACf;AAAA,EACF;AAEA,SAAO;AAAA,IACL,SAAS,OAAO,KAAK;AAAA,EACvB;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/errors/index.ts"],"sourcesContent":["// Custom error classes for ADCP client library\n\n/**\n * Base class for all ADCP client errors\n */\nexport abstract class ADCPError extends Error {\n abstract readonly code: string;\n\n constructor(\n message: string,\n public details?: unknown\n ) {\n super(message);\n this.name = this.constructor.name;\n }\n}\n\n/**\n * Error thrown when a task times out\n */\nexport interface GovernanceOutcomeRecovery {\n checkId: string;\n outcome?: 'completed' | 'failed';\n outcomeIdempotencyKey?: string;\n}\n\nexport class TaskTimeoutError extends ADCPError {\n readonly code = 'TASK_TIMEOUT';\n /** Retry-safety key for mutating requests that reached dispatch. */\n idempotency_key?: string;\n /** Camel-case compatibility alias for `idempotency_key`. */\n idempotencyKey?: string;\n /** Retry identity when the deadline expires during governance postflight. */\n governanceRecovery?: GovernanceOutcomeRecovery;\n\n constructor(\n public readonly taskId: string,\n public readonly timeout: number\n ) {\n super(`Task ${taskId} timed out after ${timeout}ms`);\n }\n}\n\n/**\n * Error thrown when maximum clarification attempts are exceeded\n */\nexport class MaxClarificationError extends ADCPError {\n readonly code = 'MAX_CLARIFICATIONS';\n\n constructor(\n public readonly taskId: string,\n public readonly maxAttempts: number\n ) {\n super(`Task ${taskId} exceeded maximum clarification attempts: ${maxAttempts}`);\n }\n}\n\n/**\n * Error thrown when a task is deferred to human\n * Contains the token needed to resume the task\n */\nexport class DeferredTaskError extends ADCPError {\n readonly code = 'TASK_DEFERRED';\n\n constructor(public readonly token: string) {\n super(`Task deferred with token: ${token}`);\n }\n}\n\n/**\n * Error thrown when a task is aborted\n */\nexport class TaskAbortedError extends ADCPError {\n readonly code = 'TASK_ABORTED';\n\n constructor(\n public readonly taskId: string,\n public readonly reason?: string\n ) {\n super(`Task ${taskId} aborted: ${reason || 'No reason provided'}`);\n }\n}\n\n/**\n * Error thrown when an agent is not found\n */\nexport class AgentNotFoundError extends ADCPError {\n readonly code = 'AGENT_NOT_FOUND';\n\n constructor(\n public readonly agentId: string,\n public readonly availableAgents: string[]\n ) {\n super(`Agent '${agentId}' not found. Available agents: ${availableAgents.join(', ')}`);\n }\n}\n\n/**\n * Error thrown when an agent doesn't support a task\n */\nexport class UnsupportedTaskError extends ADCPError {\n readonly code = 'UNSUPPORTED_TASK';\n\n constructor(\n public readonly agentId: string,\n public readonly taskName: string,\n public readonly supportedTasks?: string[]\n ) {\n const tasksMsg = supportedTasks ? ` Supported tasks: ${supportedTasks.join(', ')}` : '';\n super(`Agent '${agentId}' does not support task '${taskName}'.${tasksMsg}`);\n }\n}\n\n/**\n * Error thrown when protocol communication fails\n */\nexport class ProtocolError extends ADCPError {\n readonly code = 'PROTOCOL_ERROR';\n\n constructor(\n public readonly protocol: 'mcp' | 'a2a',\n message: string,\n public readonly originalError?: Error\n ) {\n super(`${protocol.toUpperCase()} protocol error: ${message}`);\n this.details = { originalError };\n }\n}\n\n/**\n * Error thrown when validation fails\n */\nexport class ValidationError extends ADCPError {\n readonly code = 'VALIDATION_ERROR';\n\n constructor(\n public readonly field: string,\n public readonly value: unknown,\n public readonly constraint: string\n ) {\n super(`Validation failed for field '${field}': ${constraint}`);\n this.details = { field, value, constraint };\n }\n}\n\n/**\n * Error thrown when input handler is missing but required\n */\nexport class MissingInputHandlerError extends ADCPError {\n readonly code = 'MISSING_INPUT_HANDLER';\n\n constructor(\n public readonly taskId: string,\n public readonly question: string\n ) {\n super(`Agent requested input but no handler provided. Task: ${taskId}, Question: ${question}`);\n }\n}\n\n/**\n * Error thrown when conversation context is invalid\n */\nexport class InvalidContextError extends ADCPError {\n readonly code = 'INVALID_CONTEXT';\n\n constructor(\n public readonly contextId: string,\n reason: string\n ) {\n super(`Invalid conversation context '${contextId}': ${reason}`);\n }\n}\n\n/**\n * Error thrown when configuration is invalid\n */\nexport class ConfigurationError extends ADCPError {\n readonly code = 'CONFIGURATION_ERROR';\n\n constructor(\n message: string,\n public readonly configField?: string\n ) {\n super(`Configuration error: ${message}`);\n this.details = { configField };\n }\n}\n\n/**\n * OAuth metadata for authentication guidance\n */\nexport interface OAuthMetadataInfo {\n /** URL of the authorization endpoint */\n authorization_endpoint: string;\n /** URL of the token endpoint */\n token_endpoint: string;\n /** URL of the dynamic client registration endpoint (optional) */\n registration_endpoint?: string;\n /** Issuer identifier */\n issuer?: string;\n}\n\n/**\n * Subset of the parsed `WWW-Authenticate` challenge surfaced on\n * {@link AuthenticationRequiredError}. Mirrors the public shape of\n * `WWWAuthenticateChallenge` from `@adcp/sdk/auth/oauth` without forcing the\n * errors module to depend on the auth subtree (the dependency would invert\n * the build graph).\n *\n * `scheme` is lowercased per RFC 9110 §11.6.1.\n */\nexport interface AuthChallengeInfo {\n scheme: string;\n realm?: string;\n scope?: string;\n error?: string;\n error_description?: string;\n}\n\n/**\n * Error thrown when authentication is required to access an MCP endpoint\n *\n * This error is thrown during MCP endpoint discovery when the server returns\n * a 401 Unauthorized response. The shape of the remediation depends on what\n * the 401 disclosed:\n *\n * - OAuth metadata (RFC 9728 PRM walk succeeded) → `oauthMetadata` set,\n * message points at the authorization endpoint.\n * - A `WWW-Authenticate` challenge with a non-Bearer scheme (e.g. Basic\n * behind an Apigee/Kong/AWS API GW gateway) → `challenge` set, message\n * names the scheme and the SDK / CLI surface that configures it.\n * - Plain 401 with no metadata → fallback \"provide auth_token\" message.\n *\n * Consumers branching on `error.challenge?.scheme === 'basic'` can route\n * straight to `auth: { type: 'basic', username, password }` instead of\n * retrying Bearer indefinitely.\n *\n * @example\n * ```typescript\n * try {\n * await client.getProducts({ brief: 'test' });\n * } catch (error) {\n * if (error instanceof AuthenticationRequiredError) {\n * if (error.challenge?.scheme === 'basic') {\n * // Gateway-fronted agent — configure HTTP Basic\n * reconnect({ auth: { type: 'basic', username, password } });\n * } else if (error.oauthMetadata) {\n * // Redirect user to OAuth flow\n * const authUrl = error.oauthMetadata.authorization_endpoint;\n * console.log(`Please authenticate at: ${authUrl}`);\n * } else {\n * console.log('Authentication required but no scheme metadata available');\n * }\n * }\n * }\n * ```\n */\nexport class AuthenticationRequiredError extends ADCPError {\n readonly code = 'AUTHENTICATION_REQUIRED';\n\n constructor(\n public readonly agentUrl: string,\n public readonly oauthMetadata?: OAuthMetadataInfo,\n message?: string,\n public readonly challenge?: AuthChallengeInfo\n ) {\n const defaultMessage = buildAuthRequiredMessage(agentUrl, oauthMetadata, challenge);\n super(message || defaultMessage);\n // `details` is serialized through error envelopes; surfacing the challenge\n // here lets non-CLI consumers (LLM agents, dashboards, programmatic\n // callers) branch on the scheme without instanceof-checking.\n this.details = { agentUrl, oauthMetadata, challenge };\n }\n\n /**\n * Check if OAuth authentication is available\n */\n get hasOAuth(): boolean {\n return this.oauthMetadata !== undefined;\n }\n\n /**\n * Get the authorization URL if OAuth is available\n */\n get authorizationUrl(): string | undefined {\n return this.oauthMetadata?.authorization_endpoint;\n }\n\n /**\n * Lowercased scheme from the `WWW-Authenticate` challenge, when present.\n * `'basic'` is the common non-OAuth case — gateway-fronted agents speaking\n * RFC 7617.\n */\n get suggestedScheme(): string | undefined {\n return this.challenge?.scheme;\n }\n}\n\n/**\n * Build the default error message. Branches on what the 401 disclosed:\n * - non-Bearer challenge (Basic, Digest, …) → scheme-specific remediation\n * - OAuth metadata → point at the authorization endpoint\n * - nothing → fallback \"provide auth_token\"\n *\n * The Basic branch names both the SDK shape (`createTestClient({ auth: …\n * type: 'basic' })`) and the CLI shape (`--auth user:pass --auth-scheme\n * basic`) so the same error envelope serves library and CLI consumers.\n */\nfunction buildAuthRequiredMessage(\n agentUrl: string,\n oauthMetadata: OAuthMetadataInfo | undefined,\n challenge: AuthChallengeInfo | undefined\n): string {\n if (challenge && challenge.scheme !== 'bearer') {\n if (challenge.scheme === 'basic') {\n return (\n `Authentication required for ${agentUrl}. Agent (or its fronting gateway) speaks HTTP Basic ` +\n `(RFC 7617). Configure via createTestClient({ auth: { type: 'basic', username, password } }) ` +\n `— or from the CLI, --auth <user:pass> --auth-scheme basic.`\n );\n }\n // Digest / Negotiate / NTLM / vendor schemes: we don't have first-class\n // support but the scheme name in the message saves a discovery round-trip.\n const realmHint = challenge.realm ? ` (realm: ${challenge.realm})` : '';\n return (\n `Authentication required for ${agentUrl}. Agent speaks ${challenge.scheme}${realmHint}, ` +\n `which is not natively supported by @adcp/sdk. Configure auth at the transport layer ` +\n `(custom fetch wrapper, reverse-proxy header injection) or contact the agent operator ` +\n `about Bearer / Basic / OAuth support.`\n );\n }\n if (oauthMetadata) {\n return `Authentication required for ${agentUrl}. OAuth available at: ${oauthMetadata.authorization_endpoint}`;\n }\n return `Authentication required for ${agentUrl}. No OAuth metadata available - provide auth_token in agent config.`;\n}\n\n/**\n * Error thrown when a request reused an `idempotency_key` with a different\n * canonical payload within the seller's replay window.\n *\n * Recovery: `correctable` — the caller either reused a key by mistake (mint\n * a fresh UUID v4 for the new request) or re-planned with a different payload\n * (an agent whose LLM re-ran and emitted a different request must treat that\n * as a new intent, not a retry).\n *\n * @example\n * ```typescript\n * try {\n * await client.createMediaBuy({...});\n * } catch (error) {\n * if (error instanceof IdempotencyConflictError) {\n * // Either the key was reused by mistake, or the agent re-planned with\n * // a different payload. Mint a fresh key and try again.\n * }\n * }\n * ```\n */\nexport class IdempotencyConflictError extends ADCPError {\n readonly code = 'IDEMPOTENCY_CONFLICT';\n\n // Exposed via the getter so `console.log(err)` and JSON.stringify don't\n // leak the key (it's a retry-pattern oracle within the seller's TTL).\n // Callers reading `err.idempotencyKey` get it normally.\n readonly idempotencyKey: string | undefined;\n\n constructor(idempotencyKey: string | undefined, message?: string) {\n super(\n message ||\n 'idempotency_key was used earlier with a different canonical payload. ' +\n 'Use a fresh UUID v4 for the new request, or resend the exact original payload to get the cached response.'\n );\n Object.defineProperty(this, 'idempotencyKey', {\n value: idempotencyKey,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n }\n}\n\n/**\n * Error thrown when a request carries an `idempotency_key` that is past the\n * seller's declared replay window (plus clock-skew tolerance).\n *\n * Recovery: `correctable`. If the caller knows the prior call succeeded\n * (e.g., they saw the response once, then crashed), they SHOULD fall back\n * to a natural-key lookup (e.g., `get_media_buys` by\n * `context.internal_campaign_id`) rather than minting a new key — otherwise\n * the seller treats the new request as fresh and silently creates a duplicate.\n *\n * If the caller doesn't know whether the prior call succeeded, a fresh key\n * is safe.\n */\nexport class IdempotencyExpiredError extends ADCPError {\n readonly code = 'IDEMPOTENCY_EXPIRED';\n\n // Non-enumerable so `console.log(err)` / JSON.stringify don't leak it —\n // same reasoning as IdempotencyConflictError.idempotencyKey.\n readonly idempotencyKey: string | undefined;\n\n constructor(idempotencyKey: string | undefined, message?: string) {\n super(\n message ||\n \"idempotency_key is past the seller's replay window. \" +\n 'If you know the prior call succeeded, look up the resource by natural key before retrying. Otherwise, mint a fresh UUID v4.'\n );\n Object.defineProperty(this, 'idempotencyKey', {\n value: idempotencyKey,\n enumerable: false,\n writable: false,\n configurable: false,\n });\n }\n}\n\nexport interface FeatureUnsupportedErrorOptions {\n message?: string;\n details?: Record<string, unknown>;\n}\n\nexport type ClientPreflightAdcpErrorRecovery = 'transient' | 'correctable' | 'terminal';\n\n/**\n * Protocol-shaped error metadata attached to SDK-local preflight throws.\n * Mirrors the public `TaskResult.adcpError` fields without importing core\n * task types into the errors module.\n */\nexport interface ClientPreflightAdcpErrorInfo {\n code: string;\n message: string;\n recovery?: ClientPreflightAdcpErrorRecovery;\n field?: string;\n suggestion?: string;\n details?: Record<string, unknown>;\n}\n\nexport interface ProtocolFeatureUnsupportedErrorOptions extends FeatureUnsupportedErrorOptions {\n field?: string;\n suggestion?: string;\n recovery?: ClientPreflightAdcpErrorRecovery;\n}\n\nexport const SDK_ERROR_TO_PROTOCOL_ERROR_CODE = {\n FEATURE_UNSUPPORTED: 'UNSUPPORTED_FEATURE',\n} as const;\n\nexport function mapSdkErrorCodeToProtocolErrorCode(code: string): string | undefined {\n return SDK_ERROR_TO_PROTOCOL_ERROR_CODE[code as keyof typeof SDK_ERROR_TO_PROTOCOL_ERROR_CODE];\n}\n\n/**\n * Error thrown when a required feature is not supported by the seller or by\n * the configured AdCP version.\n */\nexport class FeatureUnsupportedError extends ADCPError {\n readonly code: string = 'FEATURE_UNSUPPORTED';\n\n constructor(\n public readonly unsupportedFeatures: string[],\n public readonly declaredFeatures: string[],\n public readonly agentUrl?: string,\n options: FeatureUnsupportedErrorOptions = {}\n ) {\n const missing = unsupportedFeatures.join(', ');\n const declared = declaredFeatures.length > 0 ? declaredFeatures.join(', ') : '(none)';\n const urlPart = agentUrl ? ` at ${agentUrl}` : '';\n super(options.message ?? `Seller${urlPart} does not support: ${missing}\\n Declared features: ${declared}`);\n this.details = {\n unsupported_features: unsupportedFeatures,\n declared_features: declaredFeatures,\n ...(options.details ?? {}),\n };\n }\n}\n\n/**\n * Version-gate error for requests that use a protocol feature outside the\n * configured AdCP release. Kept as a FeatureUnsupportedError subclass so\n * existing catch sites keep working, while `code` carries the AdCP wire code\n * expected by probe/recovery layers.\n */\nexport class ProtocolFeatureUnsupportedError extends FeatureUnsupportedError {\n readonly code: string = 'UNSUPPORTED_FEATURE';\n\n readonly adcpError: ClientPreflightAdcpErrorInfo;\n\n constructor(\n unsupportedFeatures: string[],\n declaredFeatures: string[],\n agentUrl?: string,\n options: ProtocolFeatureUnsupportedErrorOptions = {}\n ) {\n super(unsupportedFeatures, declaredFeatures, agentUrl, options);\n this.adcpError = {\n code: this.code,\n message: this.message,\n recovery: options.recovery ?? 'correctable',\n ...(options.field && { field: options.field }),\n ...(options.suggestion && { suggestion: options.suggestion }),\n ...(isRecord(this.details) && { details: this.details }),\n };\n }\n}\n\nexport function getClientPreflightAdcpError(error: unknown): ClientPreflightAdcpErrorInfo | undefined {\n if (error instanceof ProtocolFeatureUnsupportedError) {\n return error.adcpError;\n }\n return undefined;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === 'object' && !Array.isArray(value);\n}\n\n/**\n * Error thrown when a response body exceeds the configured `maxResponseBytes`\n * cap on the transport. Surfaced when crawling untrusted agents (registries,\n * federated discovery layers) to prevent a hostile vendor from buffering a\n * large reply before schema validation runs.\n *\n * Recovery: `terminal` from the SDK's view — repeating the call against the\n * same agent will hit the same cap. The buyer's options are to widen the\n * cap (per-call `transport.maxResponseBytes`) when the agent's payload is\n * legitimately large, or to flag the agent as misbehaving.\n */\nexport class ResponseTooLargeError extends ADCPError {\n readonly code = 'RESPONSE_TOO_LARGE';\n\n constructor(\n public readonly limit: number,\n public readonly bytesRead: number,\n public readonly url: string,\n /**\n * The parsed value of the `Content-Length` response header when the cap\n * was tripped on the pre-check (before any body bytes were read). Undefined\n * when the response was streamed and exceeded the cap mid-flight, or when\n * the server omitted the header.\n */\n public readonly contentLengthHeader?: number\n ) {\n super(\n contentLengthHeader !== undefined\n ? `Response body declared ${contentLengthHeader} bytes, exceeds maxResponseBytes cap of ${limit} (${url})`\n : `Response body exceeded maxResponseBytes cap of ${limit} after reading ${bytesRead} bytes (${url})`\n );\n this.details = { limit, bytesRead, url, contentLengthHeader };\n }\n}\n\n/**\n * Error thrown when an `update_media_buy` request is rejected because the\n * action it maps to isn't currently allowed on the buy (AdCP 3.1, RFC #4480).\n *\n * Typed `details` payload follows `error-details/action-not-allowed.json`:\n * `attempted_action`, `reason`, optional `currently_available_actions[]`.\n *\n * Recovery branches on `reason`:\n * - `wrong_status`: transition the buy (or wait) to an allowed status.\n * - `not_supported_on_product`: terminal for this buy; pick a different\n * product for future buys that need the action.\n * - `not_supported_on_buy`: terminal; renegotiate buy terms.\n * - `mode_mismatch`: `recovery` is set to a typed hint indicating the\n * required flow (`createProposal`, `waitForApproval`, `reissueAsDirect`)\n * instead of a plain retry.\n */\nexport class ActionNotAllowedError extends ADCPError {\n readonly code = 'ACTION_NOT_ALLOWED';\n\n readonly attemptedAction: ActionNotAllowedErrorDetails['attempted_action'];\n readonly reason: ActionNotAllowedErrorDetails['reason'];\n readonly currentlyAvailableActions: ReadonlyArray<ActionNotAllowedAvailableAction>;\n readonly recovery?: ActionNotAllowedRecovery;\n\n constructor(detailsPayload: ActionNotAllowedErrorDetails, message?: string) {\n super(message ?? buildActionNotAllowedMessage(detailsPayload));\n this.attemptedAction = detailsPayload.attempted_action;\n this.reason = detailsPayload.reason;\n this.currentlyAvailableActions = detailsPayload.currently_available_actions ?? [];\n this.recovery = detailsPayload.reason === 'mode_mismatch' ? buildModeMismatchRecovery(detailsPayload) : undefined;\n this.details = detailsPayload;\n }\n}\n\n/**\n * Inline copy of the structured payload - duplicated here rather than\n * imported from `media-buy/types` to keep the errors module free of\n * cross-module imports (matches the convention used for the other typed\n * errors in this file).\n */\nexport interface ActionNotAllowedErrorDetails {\n attempted_action: ActionNotAllowedAttemptedAction;\n reason: ActionNotAllowedReasonValue;\n currently_available_actions?: ActionNotAllowedAvailableAction[];\n}\n\nexport type ActionNotAllowedReasonValue =\n | 'wrong_status'\n | 'not_supported_on_product'\n | 'not_supported_on_buy'\n | 'mode_mismatch';\n\nexport type ActionNotAllowedAttemptedAction = string;\n\nexport interface ActionNotAllowedAvailableAction {\n action: ActionNotAllowedAttemptedAction;\n mode: 'self_serve' | 'conditional_self_serve' | 'requires_proposal' | 'requires_approval';\n sla?: unknown;\n terms_ref?: string;\n}\n\nexport type ActionNotAllowedRecovery =\n | { kind: 'createProposal'; message: string }\n | { kind: 'waitForApproval'; message: string }\n | { kind: 'reissueAsDirect'; message: string };\n\nfunction buildActionNotAllowedMessage(details: ActionNotAllowedErrorDetails): string {\n const prefix = `update_media_buy rejected: \\`${details.attempted_action}\\` not allowed (${details.reason}).`;\n switch (details.reason) {\n case 'wrong_status':\n return `${prefix} transition the buy to an allowed status before retrying.`;\n case 'not_supported_on_product':\n return `${prefix} product does not declare this action; pick a different product for future buys needing it.`;\n case 'not_supported_on_buy':\n return `${prefix} buy was negotiated without this capability; renegotiate buy terms.`;\n case 'mode_mismatch':\n return `${prefix} mode shifted between preflight and dispatch; re-issue through the appropriate flow indicated by available_actions.`;\n }\n}\n\nfunction buildModeMismatchRecovery(details: ActionNotAllowedErrorDetails): ActionNotAllowedRecovery | undefined {\n const match = details.currently_available_actions?.find(a => a.action === details.attempted_action);\n if (!match) return undefined;\n switch (match.mode) {\n case 'requires_proposal':\n return {\n kind: 'createProposal',\n message:\n `seller now resolves \\`${details.attempted_action}\\` as requires_proposal. ` +\n 'reissue via the proposal lifecycle (`create_proposal` / `finalize_proposal`).',\n };\n case 'requires_approval':\n return {\n kind: 'waitForApproval',\n message:\n `seller now resolves \\`${details.attempted_action}\\` as requires_approval. ` +\n 'expect an async approval callback rather than a direct response.',\n };\n case 'conditional_self_serve':\n return {\n kind: 'reissueAsDirect',\n message:\n `seller resolves \\`${details.attempted_action}\\` as conditional_self_serve: ` +\n 'small mutations clear automatically, larger ones queue. retry; expect a possible async escalation.',\n };\n case 'self_serve':\n return {\n kind: 'reissueAsDirect',\n message: `seller resolves \\`${details.attempted_action}\\` as self_serve. retry the same request.`,\n };\n }\n}\n\n/**\n * Reason the v3 guard refused a mutating dispatch.\n * - `version`: seller's `major_versions` does not include 3\n * - `idempotency`: seller reports v3 but omits the required\n * `adcp.idempotency.replay_ttl_seconds` declaration\n * - `synthetic`: @deprecated — kept in the union for downstream\n * consumers that pattern-match on the union literal, but the SDK no\n * longer emits it. Sellers whose capabilities are synthesized from\n * `tools/list` are routed through the v2 adapter with a one-time\n * warning; gate retry behavior on `SingleAgentClient.isSyntheticV2()`.\n */\nexport type VersionUnsupportedReason =\n | 'version'\n | 'idempotency'\n /** @deprecated SDK no longer emits this reason. See union JSDoc. */\n | 'synthetic';\n\n/**\n * Error thrown when a mutating call would dispatch to a seller whose\n * capabilities cannot be corroborated as v3. Provides an explicit\n * pre-flight signal so callers don't silently mutate state on agents\n * that have not negotiated the expected major version.\n *\n * Agent URL is exposed on the instance (`agentUrl`) but omitted from the\n * default message to avoid leaking seller identity into shared log sinks.\n */\nexport class VersionUnsupportedError extends ADCPError {\n readonly code = 'VERSION_UNSUPPORTED';\n\n constructor(\n public readonly taskType: string,\n public readonly reason: VersionUnsupportedReason,\n public readonly actualVersion: 'v2' | 'v3',\n public readonly agentUrl?: string\n ) {\n super(\n `Refusing to dispatch mutating task '${taskType}': ` +\n VersionUnsupportedError.explain(reason, actualVersion) +\n ` Pass allowV2: true or requireV3ForMutations: false to override.`\n );\n }\n\n private static explain(reason: VersionUnsupportedReason, actualVersion: 'v2' | 'v3'): string {\n switch (reason) {\n case 'version':\n return `seller advertises major version '${actualVersion}' but v3 is required.`;\n case 'idempotency':\n return `seller reports v3 but omits adcp.idempotency.replay_ttl_seconds (required by spec).`;\n case 'synthetic':\n return `capabilities were synthesized from a tool list, v3 claim is unverifiable.`;\n }\n }\n}\n\n/**\n * Check if an error indicates a 401 Unauthorized response\n *\n * This helper centralizes the fragile logic of detecting 401 errors from\n * various sources (HTTP status codes, error messages, wrapped errors).\n * Used during endpoint discovery to detect authentication requirements.\n *\n * @param error - The error to check\n * @param got401Flag - Optional flag that was set by tracking HTTP responses\n * @returns true if the error appears to be a 401 authentication error\n */\nexport function is401Error(error: unknown, got401Flag = false): boolean {\n if (got401Flag) {\n return true;\n }\n\n if (!error) {\n return false;\n }\n\n // Check for status property (common in HTTP errors). MCP SDK's\n // `StreamableHTTPClientTransport` throws errors with the HTTP status on\n // `.code`, so we check that too.\n const errorObj = error as Record<string, unknown>;\n const status =\n (errorObj as { status?: number })?.status ||\n (errorObj as { response?: { status?: number } })?.response?.status ||\n (errorObj as { cause?: { status?: number } })?.cause?.status ||\n (errorObj as { code?: unknown })?.code;\n if (status === 401) {\n return true;\n }\n\n // Fall back to string matching in error message. Use word boundaries so\n // we don't misidentify things like \"product prod-401-xyz\" as an HTTP 401,\n // and require \"Unauthorized\" as a whole word rather than as a substring.\n const message = (errorObj as { message?: string })?.message || '';\n return /\\b401\\b/.test(message) || /\\bunauthorized\\b/i.test(message);\n}\n\n/**\n * Map a structured AdCP error (code + message) to a typed ADCPError subclass\n * when the code has a dedicated class. Returns `undefined` for codes that\n * don't have a typed mapping — callers should continue to use the untyped\n * `AdcpErrorInfo` for those.\n *\n * Pass the `idempotencyKey` the SDK sent so the constructed error carries it\n * for the caller's recovery logic. The server intentionally omits the key\n * from error bodies (it's a read-oracle), so the transport-layer caller is\n * the authoritative source.\n */\nexport function adcpErrorToTypedError(\n adcpError: { code: string; message?: string; details?: unknown },\n idempotencyKey?: string\n): ADCPError | undefined {\n switch (adcpError.code) {\n case 'IDEMPOTENCY_CONFLICT':\n return new IdempotencyConflictError(idempotencyKey, adcpError.message);\n case 'IDEMPOTENCY_EXPIRED':\n return new IdempotencyExpiredError(idempotencyKey, adcpError.message);\n case 'ACTION_NOT_ALLOWED': {\n const parsed = parseActionNotAllowedDetails(adcpError.details);\n if (!parsed) return undefined;\n return new ActionNotAllowedError(parsed, adcpError.message);\n }\n default:\n return undefined;\n }\n}\n\nfunction parseActionNotAllowedDetails(raw: unknown): ActionNotAllowedErrorDetails | undefined {\n if (!raw || typeof raw !== 'object') return undefined;\n const obj = raw as Record<string, unknown>;\n const attempted = obj['attempted_action'];\n const reason = obj['reason'];\n if (typeof attempted !== 'string' || typeof reason !== 'string') return undefined;\n if (!isActionNotAllowedReason(reason)) return undefined;\n\n const rawList = obj['currently_available_actions'];\n let currently: ActionNotAllowedAvailableAction[] | undefined;\n if (Array.isArray(rawList)) {\n currently = [];\n for (const entry of rawList) {\n if (!entry || typeof entry !== 'object') continue;\n const e = entry as Record<string, unknown>;\n const action = e['action'];\n const mode = e['mode'];\n if (typeof action !== 'string' || typeof mode !== 'string') continue;\n if (!isActionMode(mode)) continue;\n const parsedEntry: ActionNotAllowedAvailableAction = { action, mode };\n if (typeof e['terms_ref'] === 'string') parsedEntry.terms_ref = e['terms_ref'];\n if (e['sla'] !== undefined) parsedEntry.sla = e['sla'];\n currently.push(parsedEntry);\n }\n }\n\n return {\n attempted_action: attempted,\n reason,\n currently_available_actions: currently,\n };\n}\n\nfunction isActionNotAllowedReason(value: string): value is ActionNotAllowedReasonValue {\n return (\n value === 'wrong_status' ||\n value === 'not_supported_on_product' ||\n value === 'not_supported_on_buy' ||\n value === 'mode_mismatch'\n );\n}\n\nfunction isActionMode(value: string): value is ActionNotAllowedAvailableAction['mode'] {\n return (\n value === 'self_serve' ||\n value === 'conditional_self_serve' ||\n value === 'requires_proposal' ||\n value === 'requires_approval'\n );\n}\n\n/**\n * Type guard to check if an error is an ADCP error\n */\nexport function isADCPError(error: unknown): error is ADCPError {\n return error instanceof ADCPError;\n}\n\n/**\n * Type guard to check if an error is a specific ADCP error type\n */\nexport function isErrorOfType<T extends ADCPError>(error: unknown, ErrorClass: new (...args: any[]) => T): error is T {\n return error instanceof ErrorClass;\n}\n\n/**\n * Utility to extract error information for logging/debugging\n */\nexport function extractErrorInfo(error: unknown): {\n message: string;\n code?: string;\n details?: unknown;\n stack?: string;\n} {\n if (isADCPError(error)) {\n return {\n message: error.message,\n code: error.code,\n details: error.details,\n stack: error.stack,\n };\n }\n\n if (error instanceof Error) {\n return {\n message: error.message,\n stack: error.stack,\n };\n }\n\n return {\n message: String(error),\n };\n}\n"],"mappings":"AAKO,MAAe,kBAAkB,MAAM;AAAA,EAG5C,YACE,SACO,SACP;AACA,UAAM,OAAO;AAFN;AAGP,SAAK,OAAO,KAAK,YAAY;AAAA,EAC/B;AAAA,EAJS;AAKX;AAWO,MAAM,yBAAyB,UAAU;AAAA,EAS9C,YACkB,QACA,SAChB;AACA,UAAM,QAAQ,MAAM,oBAAoB,OAAO,IAAI;AAHnC;AACA;AAAA,EAGlB;AAAA,EAJkB;AAAA,EACA;AAAA,EAVT,OAAO;AAAA;AAAA,EAEhB;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAQF;AAKO,MAAM,8BAA8B,UAAU;AAAA,EAGnD,YACkB,QACA,aAChB;AACA,UAAM,QAAQ,MAAM,6CAA6C,WAAW,EAAE;AAH9D;AACA;AAAA,EAGlB;AAAA,EAJkB;AAAA,EACA;AAAA,EAJT,OAAO;AAQlB;AAMO,MAAM,0BAA0B,UAAU;AAAA,EAG/C,YAA4B,OAAe;AACzC,UAAM,6BAA6B,KAAK,EAAE;AADhB;AAAA,EAE5B;AAAA,EAF4B;AAAA,EAFnB,OAAO;AAKlB;AAKO,MAAM,yBAAyB,UAAU;AAAA,EAG9C,YACkB,QACA,QAChB;AACA,UAAM,QAAQ,MAAM,aAAa,UAAU,oBAAoB,EAAE;AAHjD;AACA;AAAA,EAGlB;AAAA,EAJkB;AAAA,EACA;AAAA,EAJT,OAAO;AAQlB;AAKO,MAAM,2BAA2B,UAAU;AAAA,EAGhD,YACkB,SACA,iBAChB;AACA,UAAM,UAAU,OAAO,kCAAkC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AmE;IACnE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,OAAO,KAAK,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,6DAA6D;IAC7D,IAAI,EAAE,UAAU,CAAC;IACjB,6FAA6F;IAC7F,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,CAAC,GAAG,CAAC,CAAC;IACpB,uFAAuF;IACvF,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CAoLzG;AAUD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAWjG"}
|
|
@@ -50,6 +50,7 @@ class SsrfRefusedError extends Error {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
async function ssrfSafeFetch(url, options = {}) {
|
|
53
|
+
throwIfSignalAborted(options.signal);
|
|
53
54
|
const allowPrivateIp = options.allowPrivateIp === true;
|
|
54
55
|
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
55
56
|
const maxBodyBytes = options.maxBodyBytes ?? DEFAULT_MAX_BODY_BYTES;
|
|
@@ -77,12 +78,14 @@ async function ssrfSafeFetch(url, options = {}) {
|
|
|
77
78
|
try {
|
|
78
79
|
addresses = await (0, import_promises.lookup)(hostname, { all: true });
|
|
79
80
|
} catch (err) {
|
|
81
|
+
throwIfSignalAborted(options.signal);
|
|
80
82
|
throw new SsrfRefusedError(
|
|
81
83
|
"dns_lookup_failed",
|
|
82
84
|
`DNS lookup failed for ${hostname}: ${err instanceof Error ? err.message : String(err)}`,
|
|
83
85
|
{ url, hostname }
|
|
84
86
|
);
|
|
85
87
|
}
|
|
88
|
+
throwIfSignalAborted(options.signal);
|
|
86
89
|
if (addresses.length === 0) {
|
|
87
90
|
throw new SsrfRefusedError("dns_empty", `DNS returned no addresses for ${hostname}`, {
|
|
88
91
|
url,
|
|
@@ -129,6 +132,7 @@ async function ssrfSafeFetch(url, options = {}) {
|
|
|
129
132
|
const ac = new AbortController();
|
|
130
133
|
const onExternalAbort = () => ac.abort(options.signal?.reason);
|
|
131
134
|
options.signal?.addEventListener("abort", onExternalAbort, { once: true });
|
|
135
|
+
if (options.signal?.aborted) onExternalAbort();
|
|
132
136
|
const timer = setTimeout(() => ac.abort(new Error("ssrf-fetch: timeout")), timeoutMs);
|
|
133
137
|
try {
|
|
134
138
|
const res = options.trustedFetchFn ? await options.trustedFetchFn(url, {
|
|
@@ -199,6 +203,13 @@ async function ssrfSafeFetch(url, options = {}) {
|
|
|
199
203
|
});
|
|
200
204
|
}
|
|
201
205
|
}
|
|
206
|
+
function throwIfSignalAborted(signal) {
|
|
207
|
+
if (!signal?.aborted) return;
|
|
208
|
+
if (signal.reason instanceof Error) throw signal.reason;
|
|
209
|
+
const error = new Error(signal.reason == null ? "The operation was aborted" : String(signal.reason));
|
|
210
|
+
error.name = "AbortError";
|
|
211
|
+
throw error;
|
|
212
|
+
}
|
|
202
213
|
function decodeBodyAsJsonOrText(body, contentType) {
|
|
203
214
|
if (body.byteLength === 0) return null;
|
|
204
215
|
const text = Buffer.from(body.buffer, body.byteOffset, body.byteLength).toString("utf8");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/net/ssrf-fetch.ts"],"sourcesContent":["/**\n * SSRF-safe HTTP fetch primitive.\n *\n * Used by compliance probes, storyboard runners, and (future) JWKS /\n * revocation-list resolvers — anywhere the library dispatches a request to a\n * URL that came from counterparty-controlled data and therefore might point at\n * the host's private network or a cloud metadata endpoint.\n *\n * Guarantees:\n * - Scheme: only `https:` by default; `http:` allowed under the dev-opt-in\n * `allowPrivateIp` flag. `file:`, `ftp:`, `data:`, etc. are always refused.\n * - DNS: resolves every A/AAAA record once, validates the full set, then\n * pins the outbound connection to the first validated address via an\n * undici `Agent` whose `connect.lookup` returns the pinned tuple.\n * Defeats DNS rebinding (attacker returns a public address to the guard\n * lookup and a private address to the connect-time lookup) and any other\n * TOCTOU gap between validation and connect.\n * - IMDS (`169.254.169.254`, `fe80::`) stays refused even under\n * `allowPrivateIp` — cloud metadata exfiltration is never a legitimate\n * dev-loop use case.\n * - Redirects are not followed (`redirect: 'manual'`). The 3xx response is\n * returned with `Location` populated so callers can inspect it, but they\n * MUST NOT re-dispatch to the `Location` URL themselves — that bypasses\n * every guard above. To follow a redirect safely, re-invoke\n * `ssrfSafeFetch` with the new URL so it runs through validation again.\n * - Response body is buffered up to `maxBodyBytes` (default 64 KiB) and\n * returned as raw bytes; the dispatcher is torn down after reading so\n * connection-reuse can't carry an attacker-controlled keepalive.\n *\n * Returns a fully-buffered result. Callers that need streaming or large bodies\n * should extend this primitive rather than bypass it.\n */\nimport { type LookupAddress, type LookupOptions } from 'dns';\nimport { lookup as dnsLookupAsync } from 'dns/promises';\nimport { Agent, fetch as undiciFetch } from 'undici';\nimport { isAlwaysBlocked, isPrivateIp } from './address-guards';\n\nconst DEFAULT_TIMEOUT_MS = 10_000;\nconst DEFAULT_MAX_BODY_BYTES = 64 * 1024;\nconst ALLOWED_SCHEMES = new Set(['https:', 'http:']);\n\nexport type SsrfRefusedCode =\n | 'invalid_url'\n | 'scheme_not_allowed'\n | 'non_https_without_opt_in'\n | 'dns_lookup_failed'\n | 'dns_empty'\n | 'always_blocked_address'\n | 'private_address'\n | 'body_exceeds_limit';\n\n/**\n * SSRF refusal codes that indicate runtime/network conditions rather than\n * policy refusal. Callers that want to fall back to a \"host unreachable\" or\n * \"treat as unknown\" path on these codes — rather than surfacing the\n * SsrfRefusedError to their own caller — can intersect against this set:\n *\n * ```ts\n * if (err instanceof SsrfRefusedError && SSRF_TRANSIENT_CODES.has(err.code)) {\n * // network condition, not a policy attack — treat as unreachable\n * } else if (err instanceof SsrfRefusedError) {\n * // policy refusal — must propagate; silently downgrading to \"unreachable\"\n * // reintroduces the catch-swallow class flagged in adcp-client#1618 review\n * throw err;\n * }\n * ```\n *\n * - `dns_lookup_failed`, `dns_empty`: name does not resolve. CLI fixtures\n * use `*.example.invalid` to provoke these — preserving the runtime-error\n * path matches pre-`ssrfSafeFetch` native-fetch behavior.\n * - `body_exceeds_limit`: response started OK (validated address, scheme,\n * etc.) but exceeded the caller's defensive cap. The host is real and\n * knows the URL; classifying as \"policy attack\" would be a misread.\n *\n * NOT in this set: `always_blocked_address`, `private_address`,\n * `scheme_not_allowed`, `non_https_without_opt_in`, `invalid_url`. Those\n * are policy refusals — silently downgrading them to \"unreachable\" or\n * \"suspect\" reintroduces the SSRF gap the gate was added to close.\n *\n * Added in adcp-client#1633.\n */\nexport const SSRF_TRANSIENT_CODES: ReadonlySet<SsrfRefusedCode> = new Set([\n 'dns_lookup_failed',\n 'dns_empty',\n 'body_exceeds_limit',\n]);\n\n/**\n * Thrown when the SSRF guard refuses a request before (or during) the fetch.\n * Network failures after the guard passes are not wrapped in this type —\n * callers that want to distinguish \"we refused this\" from \"the remote broke\"\n * can `instanceof SsrfRefusedError` the catch.\n */\nexport class SsrfRefusedError extends Error {\n readonly code: SsrfRefusedCode;\n readonly url: string;\n readonly hostname?: string;\n readonly address?: string;\n\n constructor(code: SsrfRefusedCode, message: string, meta: { url: string; hostname?: string; address?: string }) {\n super(message);\n this.name = 'SsrfRefusedError';\n this.code = code;\n this.url = meta.url;\n this.hostname = meta.hostname;\n this.address = meta.address;\n }\n}\n\nexport interface SsrfFetchOptions {\n method?: string;\n /** Lowercased keys preferred; values preserved verbatim. */\n headers?: Record<string, string>;\n body?: string | Uint8Array;\n /** Allow `http://` and private/loopback targets. Default false. */\n allowPrivateIp?: boolean;\n /** Overall timeout including DNS + connect + body read. Default 10_000 ms. */\n timeoutMs?: number;\n /** Hard cap on response body bytes. Default 64 KiB. */\n maxBodyBytes?: number;\n /** Caller-provided abort signal, composed with the internal timeout. */\n signal?: AbortSignal;\n /**\n * Trusted scoped fetch implementation. URL validation and address\n * classification still run before invocation, but DNS pinning is delegated\n * to this implementation because custom fetchers do not accept undici\n * dispatchers. The caller MUST enforce DNS-rebinding protection itself.\n *\n * This deliberately explicit name prevents callers from mistaking a custom\n * transport for the internally DNS-pinned path.\n */\n trustedFetchFn?: typeof fetch;\n}\n\nexport interface SsrfFetchResult {\n url: string;\n status: number;\n /** Response headers, lowercased. */\n headers: Record<string, string>;\n /** Raw response body bytes (empty Uint8Array if no body). */\n body: Uint8Array;\n /** The validated IP address. The connection used it only when `connectionPinned` is true. */\n pinnedAddress: string;\n pinnedFamily: 4 | 6;\n /** Whether the internal undici dispatcher pinned the connection to `pinnedAddress`. */\n connectionPinned: boolean;\n}\n\n/**\n * GET/POST/etc. a URL with SSRF guarding + DNS pinning. Throws\n * {@link SsrfRefusedError} when the guard refuses; other errors (network\n * timeouts, remote resets) propagate as the native fetch error.\n */\nexport async function ssrfSafeFetch(url: string, options: SsrfFetchOptions = {}): Promise<SsrfFetchResult> {\n const allowPrivateIp = options.allowPrivateIp === true;\n const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;\n const maxBodyBytes = options.maxBodyBytes ?? DEFAULT_MAX_BODY_BYTES;\n\n let parsed: URL;\n try {\n parsed = new URL(url);\n } catch {\n throw new SsrfRefusedError('invalid_url', `Invalid URL: ${url}`, { url });\n }\n\n // `URL.hostname` wraps IPv6 literals in brackets (`https://[::1]/` →\n // `[::1]`). `dns.lookup` and the address classifier both want the bare\n // form; strip brackets here so IPv6 localhost URLs work under\n // `allowPrivateIp` and so bracketed literals can't slip past classification\n // on a future Node release that tolerates them.\n const hostname = parsed.hostname.replace(/^\\[|\\]$/g, '');\n\n if (!ALLOWED_SCHEMES.has(parsed.protocol)) {\n throw new SsrfRefusedError(\n 'scheme_not_allowed',\n `Refusing to fetch URL with unsupported scheme: ${parsed.protocol}`,\n { url, hostname }\n );\n }\n if (parsed.protocol !== 'https:' && !allowPrivateIp) {\n throw new SsrfRefusedError('non_https_without_opt_in', `Refusing to fetch non-HTTPS URL: ${url}`, {\n url,\n hostname,\n });\n }\n\n let addresses: { address: string; family: number }[];\n try {\n addresses = await dnsLookupAsync(hostname, { all: true });\n } catch (err) {\n throw new SsrfRefusedError(\n 'dns_lookup_failed',\n `DNS lookup failed for ${hostname}: ${err instanceof Error ? err.message : String(err)}`,\n { url, hostname }\n );\n }\n if (addresses.length === 0) {\n throw new SsrfRefusedError('dns_empty', `DNS returned no addresses for ${hostname}`, {\n url,\n hostname,\n });\n }\n // Error messages intentionally do NOT include the resolved IP — a\n // counterparty-supplied hostname that resolves into the caller's internal\n // address space would otherwise leak network topology into compliance\n // reports and log aggregators. The address is still available on the\n // thrown error's `.address` field for programmatic debugging.\n for (const a of addresses) {\n if (isAlwaysBlocked(a.address)) {\n throw new SsrfRefusedError(\n 'always_blocked_address',\n `Refusing to fetch: ${hostname} resolves to an always-blocked address (link-local or cloud metadata)`,\n { url, hostname, address: a.address }\n );\n }\n }\n if (!allowPrivateIp) {\n for (const a of addresses) {\n if (isPrivateIp(a.address)) {\n throw new SsrfRefusedError(\n 'private_address',\n `Refusing to fetch: ${hostname} resolves to a private/loopback address`,\n { url, hostname, address: a.address }\n );\n }\n }\n }\n\n const pinned = addresses[0]!;\n const pinnedFamily = pinned.family === 6 ? 6 : 4;\n const dispatcher = new Agent({\n connect: {\n // All addresses were validated above; pin the connect to the first. The\n // custom lookup also means undici won't re-resolve and pick up a rebind.\n // undici's Agent may call lookup with `{ all: true }` (it does for HTTPS\n // targets under Node 22+), which expects the array form of the callback.\n lookup: (\n _h: string,\n opts: LookupOptions | undefined,\n cb: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family?: number) => void\n ) => {\n if (opts?.all) {\n cb(null, [{ address: pinned.address, family: pinnedFamily }]);\n } else {\n cb(null, pinned.address, pinnedFamily);\n }\n },\n },\n });\n\n const ac = new AbortController();\n const onExternalAbort = () => ac.abort(options.signal?.reason);\n options.signal?.addEventListener('abort', onExternalAbort, { once: true });\n const timer = setTimeout(() => ac.abort(new Error('ssrf-fetch: timeout')), timeoutMs);\n\n try {\n const res = options.trustedFetchFn\n ? await options.trustedFetchFn(url, {\n method: options.method ?? 'GET',\n redirect: 'manual',\n signal: ac.signal,\n headers: options.headers,\n ...(options.body !== undefined && { body: options.body as BodyInit }),\n })\n : await undiciFetch(url, {\n method: options.method ?? 'GET',\n redirect: 'manual',\n signal: ac.signal,\n headers: options.headers,\n dispatcher,\n ...(options.body !== undefined && { body: options.body }),\n });\n\n const headers: Record<string, string> = {};\n res.headers.forEach((v, k) => {\n headers[k.toLowerCase()] = v;\n });\n\n const reader = res.body?.getReader();\n if (!reader) {\n return {\n url,\n status: res.status,\n headers,\n body: new Uint8Array(),\n pinnedAddress: pinned.address,\n pinnedFamily,\n connectionPinned: !options.trustedFetchFn,\n };\n }\n\n const chunks: Uint8Array[] = [];\n let bytes = 0;\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n bytes += value.byteLength;\n if (bytes > maxBodyBytes) {\n await reader.cancel();\n throw new SsrfRefusedError('body_exceeds_limit', `Response body exceeded ${maxBodyBytes} bytes`, {\n url,\n hostname: parsed.hostname,\n address: pinned.address,\n });\n }\n chunks.push(value);\n }\n\n const buf = new Uint8Array(bytes);\n let offset = 0;\n for (const c of chunks) {\n buf.set(c, offset);\n offset += c.byteLength;\n }\n\n return {\n url,\n status: res.status,\n headers,\n body: buf,\n pinnedAddress: pinned.address,\n pinnedFamily,\n connectionPinned: !options.trustedFetchFn,\n };\n } finally {\n clearTimeout(timer);\n options.signal?.removeEventListener('abort', onExternalAbort);\n await dispatcher.close().catch(() => {});\n }\n}\n\n/**\n * Decode a UTF-8 byte buffer as JSON when the content-type declares JSON, or\n * fall back to a UTF-8 string. Handy shared helper for probe-style call sites\n * that don't care about binary bodies.\n */\nexport function decodeBodyAsJsonOrText(body: Uint8Array, contentType: string | undefined): unknown {\n if (body.byteLength === 0) return null;\n const text = Buffer.from(body.buffer, body.byteOffset, body.byteLength).toString('utf8');\n if (contentType?.toLowerCase().includes('application/json')) {\n try {\n return JSON.parse(text);\n } catch {\n return text;\n }\n }\n return text;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCA,sBAAyC;AACzC,oBAA4C;AAC5C,4BAA6C;AAE7C,MAAM,qBAAqB;AAC3B,MAAM,yBAAyB,KAAK;AACpC,MAAM,kBAAkB,oBAAI,IAAI,CAAC,UAAU,OAAO,CAAC;AA0C5C,MAAM,uBAAqD,oBAAI,IAAI;AAAA,EACxE;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAQM,MAAM,yBAAyB,MAAM;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,MAAuB,SAAiB,MAA4D;AAC9G,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,MAAM,KAAK;AAChB,SAAK,WAAW,KAAK;AACrB,SAAK,UAAU,KAAK;AAAA,EACtB;AACF;AA8CA,eAAsB,cAAc,KAAa,UAA4B,CAAC,GAA6B;AACzG,QAAM,iBAAiB,QAAQ,mBAAmB;AAClD,QAAM,YAAY,QAAQ,aAAa;AACvC,QAAM,eAAe,QAAQ,gBAAgB;AAE7C,MAAI;AACJ,MAAI;AACF,aAAS,IAAI,IAAI,GAAG;AAAA,EACtB,QAAQ;AACN,UAAM,IAAI,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YAAY,KAAK,UAAU,EAAE,SAAS,MAAM;AACvF,MAAI,aAAa,YAAY,EAAE,SAAS,kBAAkB,GAAG;AAC3D,QAAI;AACF,aAAO,KAAK,MAAM,IAAI;AAAA,IACxB,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;","names":["dnsLookupAsync","undiciFetch"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/net/ssrf-fetch.ts"],"sourcesContent":["/**\n * SSRF-safe HTTP fetch primitive.\n *\n * Used by compliance probes, storyboard runners, and (future) JWKS /\n * revocation-list resolvers — anywhere the library dispatches a request to a\n * URL that came from counterparty-controlled data and therefore might point at\n * the host's private network or a cloud metadata endpoint.\n *\n * Guarantees:\n * - Scheme: only `https:` by default; `http:` allowed under the dev-opt-in\n * `allowPrivateIp` flag. `file:`, `ftp:`, `data:`, etc. are always refused.\n * - DNS: resolves every A/AAAA record once, validates the full set, then\n * pins the outbound connection to the first validated address via an\n * undici `Agent` whose `connect.lookup` returns the pinned tuple.\n * Defeats DNS rebinding (attacker returns a public address to the guard\n * lookup and a private address to the connect-time lookup) and any other\n * TOCTOU gap between validation and connect.\n * - IMDS (`169.254.169.254`, `fe80::`) stays refused even under\n * `allowPrivateIp` — cloud metadata exfiltration is never a legitimate\n * dev-loop use case.\n * - Redirects are not followed (`redirect: 'manual'`). The 3xx response is\n * returned with `Location` populated so callers can inspect it, but they\n * MUST NOT re-dispatch to the `Location` URL themselves — that bypasses\n * every guard above. To follow a redirect safely, re-invoke\n * `ssrfSafeFetch` with the new URL so it runs through validation again.\n * - Response body is buffered up to `maxBodyBytes` (default 64 KiB) and\n * returned as raw bytes; the dispatcher is torn down after reading so\n * connection-reuse can't carry an attacker-controlled keepalive.\n *\n * Returns a fully-buffered result. Callers that need streaming or large bodies\n * should extend this primitive rather than bypass it.\n */\nimport { type LookupAddress, type LookupOptions } from 'dns';\nimport { lookup as dnsLookupAsync } from 'dns/promises';\nimport { Agent, fetch as undiciFetch } from 'undici';\nimport { isAlwaysBlocked, isPrivateIp } from './address-guards';\n\nconst DEFAULT_TIMEOUT_MS = 10_000;\nconst DEFAULT_MAX_BODY_BYTES = 64 * 1024;\nconst ALLOWED_SCHEMES = new Set(['https:', 'http:']);\n\nexport type SsrfRefusedCode =\n | 'invalid_url'\n | 'scheme_not_allowed'\n | 'non_https_without_opt_in'\n | 'dns_lookup_failed'\n | 'dns_empty'\n | 'always_blocked_address'\n | 'private_address'\n | 'body_exceeds_limit';\n\n/**\n * SSRF refusal codes that indicate runtime/network conditions rather than\n * policy refusal. Callers that want to fall back to a \"host unreachable\" or\n * \"treat as unknown\" path on these codes — rather than surfacing the\n * SsrfRefusedError to their own caller — can intersect against this set:\n *\n * ```ts\n * if (err instanceof SsrfRefusedError && SSRF_TRANSIENT_CODES.has(err.code)) {\n * // network condition, not a policy attack — treat as unreachable\n * } else if (err instanceof SsrfRefusedError) {\n * // policy refusal — must propagate; silently downgrading to \"unreachable\"\n * // reintroduces the catch-swallow class flagged in adcp-client#1618 review\n * throw err;\n * }\n * ```\n *\n * - `dns_lookup_failed`, `dns_empty`: name does not resolve. CLI fixtures\n * use `*.example.invalid` to provoke these — preserving the runtime-error\n * path matches pre-`ssrfSafeFetch` native-fetch behavior.\n * - `body_exceeds_limit`: response started OK (validated address, scheme,\n * etc.) but exceeded the caller's defensive cap. The host is real and\n * knows the URL; classifying as \"policy attack\" would be a misread.\n *\n * NOT in this set: `always_blocked_address`, `private_address`,\n * `scheme_not_allowed`, `non_https_without_opt_in`, `invalid_url`. Those\n * are policy refusals — silently downgrading them to \"unreachable\" or\n * \"suspect\" reintroduces the SSRF gap the gate was added to close.\n *\n * Added in adcp-client#1633.\n */\nexport const SSRF_TRANSIENT_CODES: ReadonlySet<SsrfRefusedCode> = new Set([\n 'dns_lookup_failed',\n 'dns_empty',\n 'body_exceeds_limit',\n]);\n\n/**\n * Thrown when the SSRF guard refuses a request before (or during) the fetch.\n * Network failures after the guard passes are not wrapped in this type —\n * callers that want to distinguish \"we refused this\" from \"the remote broke\"\n * can `instanceof SsrfRefusedError` the catch.\n */\nexport class SsrfRefusedError extends Error {\n readonly code: SsrfRefusedCode;\n readonly url: string;\n readonly hostname?: string;\n readonly address?: string;\n\n constructor(code: SsrfRefusedCode, message: string, meta: { url: string; hostname?: string; address?: string }) {\n super(message);\n this.name = 'SsrfRefusedError';\n this.code = code;\n this.url = meta.url;\n this.hostname = meta.hostname;\n this.address = meta.address;\n }\n}\n\nexport interface SsrfFetchOptions {\n method?: string;\n /** Lowercased keys preferred; values preserved verbatim. */\n headers?: Record<string, string>;\n body?: string | Uint8Array;\n /** Allow `http://` and private/loopback targets. Default false. */\n allowPrivateIp?: boolean;\n /** Overall timeout including DNS + connect + body read. Default 10_000 ms. */\n timeoutMs?: number;\n /** Hard cap on response body bytes. Default 64 KiB. */\n maxBodyBytes?: number;\n /** Caller-provided abort signal, composed with the internal timeout. */\n signal?: AbortSignal;\n /**\n * Trusted scoped fetch implementation. URL validation and address\n * classification still run before invocation, but DNS pinning is delegated\n * to this implementation because custom fetchers do not accept undici\n * dispatchers. The caller MUST enforce DNS-rebinding protection itself.\n *\n * This deliberately explicit name prevents callers from mistaking a custom\n * transport for the internally DNS-pinned path.\n */\n trustedFetchFn?: typeof fetch;\n}\n\nexport interface SsrfFetchResult {\n url: string;\n status: number;\n /** Response headers, lowercased. */\n headers: Record<string, string>;\n /** Raw response body bytes (empty Uint8Array if no body). */\n body: Uint8Array;\n /** The validated IP address. The connection used it only when `connectionPinned` is true. */\n pinnedAddress: string;\n pinnedFamily: 4 | 6;\n /** Whether the internal undici dispatcher pinned the connection to `pinnedAddress`. */\n connectionPinned: boolean;\n}\n\n/**\n * GET/POST/etc. a URL with SSRF guarding + DNS pinning. Throws\n * {@link SsrfRefusedError} when the guard refuses; other errors (network\n * timeouts, remote resets) propagate as the native fetch error.\n */\nexport async function ssrfSafeFetch(url: string, options: SsrfFetchOptions = {}): Promise<SsrfFetchResult> {\n throwIfSignalAborted(options.signal);\n const allowPrivateIp = options.allowPrivateIp === true;\n const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;\n const maxBodyBytes = options.maxBodyBytes ?? DEFAULT_MAX_BODY_BYTES;\n\n let parsed: URL;\n try {\n parsed = new URL(url);\n } catch {\n throw new SsrfRefusedError('invalid_url', `Invalid URL: ${url}`, { url });\n }\n\n // `URL.hostname` wraps IPv6 literals in brackets (`https://[::1]/` →\n // `[::1]`). `dns.lookup` and the address classifier both want the bare\n // form; strip brackets here so IPv6 localhost URLs work under\n // `allowPrivateIp` and so bracketed literals can't slip past classification\n // on a future Node release that tolerates them.\n const hostname = parsed.hostname.replace(/^\\[|\\]$/g, '');\n\n if (!ALLOWED_SCHEMES.has(parsed.protocol)) {\n throw new SsrfRefusedError(\n 'scheme_not_allowed',\n `Refusing to fetch URL with unsupported scheme: ${parsed.protocol}`,\n { url, hostname }\n );\n }\n if (parsed.protocol !== 'https:' && !allowPrivateIp) {\n throw new SsrfRefusedError('non_https_without_opt_in', `Refusing to fetch non-HTTPS URL: ${url}`, {\n url,\n hostname,\n });\n }\n\n let addresses: { address: string; family: number }[];\n try {\n addresses = await dnsLookupAsync(hostname, { all: true });\n } catch (err) {\n throwIfSignalAborted(options.signal);\n throw new SsrfRefusedError(\n 'dns_lookup_failed',\n `DNS lookup failed for ${hostname}: ${err instanceof Error ? err.message : String(err)}`,\n { url, hostname }\n );\n }\n throwIfSignalAborted(options.signal);\n if (addresses.length === 0) {\n throw new SsrfRefusedError('dns_empty', `DNS returned no addresses for ${hostname}`, {\n url,\n hostname,\n });\n }\n // Error messages intentionally do NOT include the resolved IP — a\n // counterparty-supplied hostname that resolves into the caller's internal\n // address space would otherwise leak network topology into compliance\n // reports and log aggregators. The address is still available on the\n // thrown error's `.address` field for programmatic debugging.\n for (const a of addresses) {\n if (isAlwaysBlocked(a.address)) {\n throw new SsrfRefusedError(\n 'always_blocked_address',\n `Refusing to fetch: ${hostname} resolves to an always-blocked address (link-local or cloud metadata)`,\n { url, hostname, address: a.address }\n );\n }\n }\n if (!allowPrivateIp) {\n for (const a of addresses) {\n if (isPrivateIp(a.address)) {\n throw new SsrfRefusedError(\n 'private_address',\n `Refusing to fetch: ${hostname} resolves to a private/loopback address`,\n { url, hostname, address: a.address }\n );\n }\n }\n }\n\n const pinned = addresses[0]!;\n const pinnedFamily = pinned.family === 6 ? 6 : 4;\n const dispatcher = new Agent({\n connect: {\n // All addresses were validated above; pin the connect to the first. The\n // custom lookup also means undici won't re-resolve and pick up a rebind.\n // undici's Agent may call lookup with `{ all: true }` (it does for HTTPS\n // targets under Node 22+), which expects the array form of the callback.\n lookup: (\n _h: string,\n opts: LookupOptions | undefined,\n cb: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family?: number) => void\n ) => {\n if (opts?.all) {\n cb(null, [{ address: pinned.address, family: pinnedFamily }]);\n } else {\n cb(null, pinned.address, pinnedFamily);\n }\n },\n },\n });\n\n const ac = new AbortController();\n const onExternalAbort = () => ac.abort(options.signal?.reason);\n options.signal?.addEventListener('abort', onExternalAbort, { once: true });\n if (options.signal?.aborted) onExternalAbort();\n const timer = setTimeout(() => ac.abort(new Error('ssrf-fetch: timeout')), timeoutMs);\n\n try {\n const res = options.trustedFetchFn\n ? await options.trustedFetchFn(url, {\n method: options.method ?? 'GET',\n redirect: 'manual',\n signal: ac.signal,\n headers: options.headers,\n ...(options.body !== undefined && { body: options.body as BodyInit }),\n })\n : await undiciFetch(url, {\n method: options.method ?? 'GET',\n redirect: 'manual',\n signal: ac.signal,\n headers: options.headers,\n dispatcher,\n ...(options.body !== undefined && { body: options.body }),\n });\n\n const headers: Record<string, string> = {};\n res.headers.forEach((v, k) => {\n headers[k.toLowerCase()] = v;\n });\n\n const reader = res.body?.getReader();\n if (!reader) {\n return {\n url,\n status: res.status,\n headers,\n body: new Uint8Array(),\n pinnedAddress: pinned.address,\n pinnedFamily,\n connectionPinned: !options.trustedFetchFn,\n };\n }\n\n const chunks: Uint8Array[] = [];\n let bytes = 0;\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n bytes += value.byteLength;\n if (bytes > maxBodyBytes) {\n await reader.cancel();\n throw new SsrfRefusedError('body_exceeds_limit', `Response body exceeded ${maxBodyBytes} bytes`, {\n url,\n hostname: parsed.hostname,\n address: pinned.address,\n });\n }\n chunks.push(value);\n }\n\n const buf = new Uint8Array(bytes);\n let offset = 0;\n for (const c of chunks) {\n buf.set(c, offset);\n offset += c.byteLength;\n }\n\n return {\n url,\n status: res.status,\n headers,\n body: buf,\n pinnedAddress: pinned.address,\n pinnedFamily,\n connectionPinned: !options.trustedFetchFn,\n };\n } finally {\n clearTimeout(timer);\n options.signal?.removeEventListener('abort', onExternalAbort);\n await dispatcher.close().catch(() => {});\n }\n}\n\nfunction throwIfSignalAborted(signal?: AbortSignal): void {\n if (!signal?.aborted) return;\n if (signal.reason instanceof Error) throw signal.reason;\n const error = new Error(signal.reason == null ? 'The operation was aborted' : String(signal.reason));\n error.name = 'AbortError';\n throw error;\n}\n\n/**\n * Decode a UTF-8 byte buffer as JSON when the content-type declares JSON, or\n * fall back to a UTF-8 string. Handy shared helper for probe-style call sites\n * that don't care about binary bodies.\n */\nexport function decodeBodyAsJsonOrText(body: Uint8Array, contentType: string | undefined): unknown {\n if (body.byteLength === 0) return null;\n const text = Buffer.from(body.buffer, body.byteOffset, body.byteLength).toString('utf8');\n if (contentType?.toLowerCase().includes('application/json')) {\n try {\n return JSON.parse(text);\n } catch {\n return text;\n }\n }\n return text;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCA,sBAAyC;AACzC,oBAA4C;AAC5C,4BAA6C;AAE7C,MAAM,qBAAqB;AAC3B,MAAM,yBAAyB,KAAK;AACpC,MAAM,kBAAkB,oBAAI,IAAI,CAAC,UAAU,OAAO,CAAC;AA0C5C,MAAM,uBAAqD,oBAAI,IAAI;AAAA,EACxE;AAAA,EACA;AAAA,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AAA,QAClB,CAAC;AAAA,MACH;AACA,aAAO,KAAK,KAAK;AAAA,IACnB;AAEA,UAAM,MAAM,IAAI,WAAW,KAAK;AAChC,QAAI,SAAS;AACb,eAAW,KAAK,QAAQ;AACtB,UAAI,IAAI,GAAG,MAAM;AACjB,gBAAU,EAAE;AAAA,IACd;AAEA,WAAO;AAAA,MACL;AAAA,MACA,QAAQ,IAAI;AAAA,MACZ;AAAA,MACA,MAAM;AAAA,MACN,eAAe,OAAO;AAAA,MACtB;AAAA,MACA,kBAAkB,CAAC,QAAQ;AAAA,IAC7B;AAAA,EACF,UAAE;AACA,iBAAa,KAAK;AAClB,YAAQ,QAAQ,oBAAoB,SAAS,eAAe;AAC5D,UAAM,WAAW,MAAM,EAAE,MAAM,MAAM;AAAA,IAAC,CAAC;AAAA,EACzC;AACF;AAEA,SAAS,qBAAqB,QAA4B;AACxD,MAAI,CAAC,QAAQ,QAAS;AACtB,MAAI,OAAO,kBAAkB,MAAO,OAAM,OAAO;AACjD,QAAM,QAAQ,IAAI,MAAM,OAAO,UAAU,OAAO,8BAA8B,OAAO,OAAO,MAAM,CAAC;AACnG,QAAM,OAAO;AACb,QAAM;AACR;AAOO,SAAS,uBAAuB,MAAkB,aAA0C;AACjG,MAAI,KAAK,eAAe,EAAG,QAAO;AAClC,QAAM,OAAO,OAAO,KAAK,KAAK,QAAQ,KAAK,YAAY,KAAK,UAAU,EAAE,SAAS,MAAM;AACvF,MAAI,aAAa,YAAY,EAAE,SAAS,kBAAkB,GAAG;AAC3D,QAAI;AACF,aAAO,KAAK,MAAM,IAAI;AAAA,IACxB,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;","names":["dnsLookupAsync","undiciFetch"]}
|
|
@@ -24,6 +24,7 @@ class SsrfRefusedError extends Error {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
async function ssrfSafeFetch(url, options = {}) {
|
|
27
|
+
throwIfSignalAborted(options.signal);
|
|
27
28
|
const allowPrivateIp = options.allowPrivateIp === true;
|
|
28
29
|
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
29
30
|
const maxBodyBytes = options.maxBodyBytes ?? DEFAULT_MAX_BODY_BYTES;
|
|
@@ -51,12 +52,14 @@ async function ssrfSafeFetch(url, options = {}) {
|
|
|
51
52
|
try {
|
|
52
53
|
addresses = await dnsLookupAsync(hostname, { all: true });
|
|
53
54
|
} catch (err) {
|
|
55
|
+
throwIfSignalAborted(options.signal);
|
|
54
56
|
throw new SsrfRefusedError(
|
|
55
57
|
"dns_lookup_failed",
|
|
56
58
|
`DNS lookup failed for ${hostname}: ${err instanceof Error ? err.message : String(err)}`,
|
|
57
59
|
{ url, hostname }
|
|
58
60
|
);
|
|
59
61
|
}
|
|
62
|
+
throwIfSignalAborted(options.signal);
|
|
60
63
|
if (addresses.length === 0) {
|
|
61
64
|
throw new SsrfRefusedError("dns_empty", `DNS returned no addresses for ${hostname}`, {
|
|
62
65
|
url,
|
|
@@ -103,6 +106,7 @@ async function ssrfSafeFetch(url, options = {}) {
|
|
|
103
106
|
const ac = new AbortController();
|
|
104
107
|
const onExternalAbort = () => ac.abort(options.signal?.reason);
|
|
105
108
|
options.signal?.addEventListener("abort", onExternalAbort, { once: true });
|
|
109
|
+
if (options.signal?.aborted) onExternalAbort();
|
|
106
110
|
const timer = setTimeout(() => ac.abort(new Error("ssrf-fetch: timeout")), timeoutMs);
|
|
107
111
|
try {
|
|
108
112
|
const res = options.trustedFetchFn ? await options.trustedFetchFn(url, {
|
|
@@ -173,6 +177,13 @@ async function ssrfSafeFetch(url, options = {}) {
|
|
|
173
177
|
});
|
|
174
178
|
}
|
|
175
179
|
}
|
|
180
|
+
function throwIfSignalAborted(signal) {
|
|
181
|
+
if (!signal?.aborted) return;
|
|
182
|
+
if (signal.reason instanceof Error) throw signal.reason;
|
|
183
|
+
const error = new Error(signal.reason == null ? "The operation was aborted" : String(signal.reason));
|
|
184
|
+
error.name = "AbortError";
|
|
185
|
+
throw error;
|
|
186
|
+
}
|
|
176
187
|
function decodeBodyAsJsonOrText(body, contentType) {
|
|
177
188
|
if (body.byteLength === 0) return null;
|
|
178
189
|
const text = Buffer.from(body.buffer, body.byteOffset, body.byteLength).toString("utf8");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/net/ssrf-fetch.ts"],"sourcesContent":["/**\n * SSRF-safe HTTP fetch primitive.\n *\n * Used by compliance probes, storyboard runners, and (future) JWKS /\n * revocation-list resolvers — anywhere the library dispatches a request to a\n * URL that came from counterparty-controlled data and therefore might point at\n * the host's private network or a cloud metadata endpoint.\n *\n * Guarantees:\n * - Scheme: only `https:` by default; `http:` allowed under the dev-opt-in\n * `allowPrivateIp` flag. `file:`, `ftp:`, `data:`, etc. are always refused.\n * - DNS: resolves every A/AAAA record once, validates the full set, then\n * pins the outbound connection to the first validated address via an\n * undici `Agent` whose `connect.lookup` returns the pinned tuple.\n * Defeats DNS rebinding (attacker returns a public address to the guard\n * lookup and a private address to the connect-time lookup) and any other\n * TOCTOU gap between validation and connect.\n * - IMDS (`169.254.169.254`, `fe80::`) stays refused even under\n * `allowPrivateIp` — cloud metadata exfiltration is never a legitimate\n * dev-loop use case.\n * - Redirects are not followed (`redirect: 'manual'`). The 3xx response is\n * returned with `Location` populated so callers can inspect it, but they\n * MUST NOT re-dispatch to the `Location` URL themselves — that bypasses\n * every guard above. To follow a redirect safely, re-invoke\n * `ssrfSafeFetch` with the new URL so it runs through validation again.\n * - Response body is buffered up to `maxBodyBytes` (default 64 KiB) and\n * returned as raw bytes; the dispatcher is torn down after reading so\n * connection-reuse can't carry an attacker-controlled keepalive.\n *\n * Returns a fully-buffered result. Callers that need streaming or large bodies\n * should extend this primitive rather than bypass it.\n */\nimport { type LookupAddress, type LookupOptions } from 'dns';\nimport { lookup as dnsLookupAsync } from 'dns/promises';\nimport { Agent, fetch as undiciFetch } from 'undici';\nimport { isAlwaysBlocked, isPrivateIp } from './address-guards';\n\nconst DEFAULT_TIMEOUT_MS = 10_000;\nconst DEFAULT_MAX_BODY_BYTES = 64 * 1024;\nconst ALLOWED_SCHEMES = new Set(['https:', 'http:']);\n\nexport type SsrfRefusedCode =\n | 'invalid_url'\n | 'scheme_not_allowed'\n | 'non_https_without_opt_in'\n | 'dns_lookup_failed'\n | 'dns_empty'\n | 'always_blocked_address'\n | 'private_address'\n | 'body_exceeds_limit';\n\n/**\n * SSRF refusal codes that indicate runtime/network conditions rather than\n * policy refusal. Callers that want to fall back to a \"host unreachable\" or\n * \"treat as unknown\" path on these codes — rather than surfacing the\n * SsrfRefusedError to their own caller — can intersect against this set:\n *\n * ```ts\n * if (err instanceof SsrfRefusedError && SSRF_TRANSIENT_CODES.has(err.code)) {\n * // network condition, not a policy attack — treat as unreachable\n * } else if (err instanceof SsrfRefusedError) {\n * // policy refusal — must propagate; silently downgrading to \"unreachable\"\n * // reintroduces the catch-swallow class flagged in adcp-client#1618 review\n * throw err;\n * }\n * ```\n *\n * - `dns_lookup_failed`, `dns_empty`: name does not resolve. CLI fixtures\n * use `*.example.invalid` to provoke these — preserving the runtime-error\n * path matches pre-`ssrfSafeFetch` native-fetch behavior.\n * - `body_exceeds_limit`: response started OK (validated address, scheme,\n * etc.) but exceeded the caller's defensive cap. The host is real and\n * knows the URL; classifying as \"policy attack\" would be a misread.\n *\n * NOT in this set: `always_blocked_address`, `private_address`,\n * `scheme_not_allowed`, `non_https_without_opt_in`, `invalid_url`. Those\n * are policy refusals — silently downgrading them to \"unreachable\" or\n * \"suspect\" reintroduces the SSRF gap the gate was added to close.\n *\n * Added in adcp-client#1633.\n */\nexport const SSRF_TRANSIENT_CODES: ReadonlySet<SsrfRefusedCode> = new Set([\n 'dns_lookup_failed',\n 'dns_empty',\n 'body_exceeds_limit',\n]);\n\n/**\n * Thrown when the SSRF guard refuses a request before (or during) the fetch.\n * Network failures after the guard passes are not wrapped in this type —\n * callers that want to distinguish \"we refused this\" from \"the remote broke\"\n * can `instanceof SsrfRefusedError` the catch.\n */\nexport class SsrfRefusedError extends Error {\n readonly code: SsrfRefusedCode;\n readonly url: string;\n readonly hostname?: string;\n readonly address?: string;\n\n constructor(code: SsrfRefusedCode, message: string, meta: { url: string; hostname?: string; address?: string }) {\n super(message);\n this.name = 'SsrfRefusedError';\n this.code = code;\n this.url = meta.url;\n this.hostname = meta.hostname;\n this.address = meta.address;\n }\n}\n\nexport interface SsrfFetchOptions {\n method?: string;\n /** Lowercased keys preferred; values preserved verbatim. */\n headers?: Record<string, string>;\n body?: string | Uint8Array;\n /** Allow `http://` and private/loopback targets. Default false. */\n allowPrivateIp?: boolean;\n /** Overall timeout including DNS + connect + body read. Default 10_000 ms. */\n timeoutMs?: number;\n /** Hard cap on response body bytes. Default 64 KiB. */\n maxBodyBytes?: number;\n /** Caller-provided abort signal, composed with the internal timeout. */\n signal?: AbortSignal;\n /**\n * Trusted scoped fetch implementation. URL validation and address\n * classification still run before invocation, but DNS pinning is delegated\n * to this implementation because custom fetchers do not accept undici\n * dispatchers. The caller MUST enforce DNS-rebinding protection itself.\n *\n * This deliberately explicit name prevents callers from mistaking a custom\n * transport for the internally DNS-pinned path.\n */\n trustedFetchFn?: typeof fetch;\n}\n\nexport interface SsrfFetchResult {\n url: string;\n status: number;\n /** Response headers, lowercased. */\n headers: Record<string, string>;\n /** Raw response body bytes (empty Uint8Array if no body). */\n body: Uint8Array;\n /** The validated IP address. The connection used it only when `connectionPinned` is true. */\n pinnedAddress: string;\n pinnedFamily: 4 | 6;\n /** Whether the internal undici dispatcher pinned the connection to `pinnedAddress`. */\n connectionPinned: boolean;\n}\n\n/**\n * GET/POST/etc. a URL with SSRF guarding + DNS pinning. Throws\n * {@link SsrfRefusedError} when the guard refuses; other errors (network\n * timeouts, remote resets) propagate as the native fetch error.\n */\nexport async function ssrfSafeFetch(url: string, options: SsrfFetchOptions = {}): Promise<SsrfFetchResult> {\n const allowPrivateIp = options.allowPrivateIp === true;\n const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;\n const maxBodyBytes = options.maxBodyBytes ?? DEFAULT_MAX_BODY_BYTES;\n\n let parsed: URL;\n try {\n parsed = new URL(url);\n } catch {\n throw new SsrfRefusedError('invalid_url', `Invalid URL: ${url}`, { url });\n }\n\n // `URL.hostname` wraps IPv6 literals in brackets (`https://[::1]/` →\n // `[::1]`). `dns.lookup` and the address classifier both want the bare\n // form; strip brackets here so IPv6 localhost URLs work under\n // `allowPrivateIp` and so bracketed literals can't slip past classification\n // on a future Node release that tolerates them.\n const hostname = parsed.hostname.replace(/^\\[|\\]$/g, '');\n\n if (!ALLOWED_SCHEMES.has(parsed.protocol)) {\n throw new SsrfRefusedError(\n 'scheme_not_allowed',\n `Refusing to fetch URL with unsupported scheme: ${parsed.protocol}`,\n { url, hostname }\n );\n }\n if (parsed.protocol !== 'https:' && !allowPrivateIp) {\n throw new SsrfRefusedError('non_https_without_opt_in', `Refusing to fetch non-HTTPS URL: ${url}`, {\n url,\n hostname,\n });\n }\n\n let addresses: { address: string; family: number }[];\n try {\n addresses = await dnsLookupAsync(hostname, { all: true });\n } catch (err) {\n throw new SsrfRefusedError(\n 'dns_lookup_failed',\n `DNS lookup failed for ${hostname}: ${err instanceof Error ? err.message : String(err)}`,\n { url, hostname }\n );\n }\n if (addresses.length === 0) {\n throw new SsrfRefusedError('dns_empty', `DNS returned no addresses for ${hostname}`, {\n url,\n hostname,\n });\n }\n // Error messages intentionally do NOT include the resolved IP — a\n // counterparty-supplied hostname that resolves into the caller's internal\n // address space would otherwise leak network topology into compliance\n // reports and log aggregators. The address is still available on the\n // thrown error's `.address` field for programmatic debugging.\n for (const a of addresses) {\n if (isAlwaysBlocked(a.address)) {\n throw new SsrfRefusedError(\n 'always_blocked_address',\n `Refusing to fetch: ${hostname} resolves to an always-blocked address (link-local or cloud metadata)`,\n { url, hostname, address: a.address }\n );\n }\n }\n if (!allowPrivateIp) {\n for (const a of addresses) {\n if (isPrivateIp(a.address)) {\n throw new SsrfRefusedError(\n 'private_address',\n `Refusing to fetch: ${hostname} resolves to a private/loopback address`,\n { url, hostname, address: a.address }\n );\n }\n }\n }\n\n const pinned = addresses[0]!;\n const pinnedFamily = pinned.family === 6 ? 6 : 4;\n const dispatcher = new Agent({\n connect: {\n // All addresses were validated above; pin the connect to the first. The\n // custom lookup also means undici won't re-resolve and pick up a rebind.\n // undici's Agent may call lookup with `{ all: true }` (it does for HTTPS\n // targets under Node 22+), which expects the array form of the callback.\n lookup: (\n _h: string,\n opts: LookupOptions | undefined,\n cb: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family?: number) => void\n ) => {\n if (opts?.all) {\n cb(null, [{ address: pinned.address, family: pinnedFamily }]);\n } else {\n cb(null, pinned.address, pinnedFamily);\n }\n },\n },\n });\n\n const ac = new AbortController();\n const onExternalAbort = () => ac.abort(options.signal?.reason);\n options.signal?.addEventListener('abort', onExternalAbort, { once: true });\n const timer = setTimeout(() => ac.abort(new Error('ssrf-fetch: timeout')), timeoutMs);\n\n try {\n const res = options.trustedFetchFn\n ? await options.trustedFetchFn(url, {\n method: options.method ?? 'GET',\n redirect: 'manual',\n signal: ac.signal,\n headers: options.headers,\n ...(options.body !== undefined && { body: options.body as BodyInit }),\n })\n : await undiciFetch(url, {\n method: options.method ?? 'GET',\n redirect: 'manual',\n signal: ac.signal,\n headers: options.headers,\n dispatcher,\n ...(options.body !== undefined && { body: options.body }),\n });\n\n const headers: Record<string, string> = {};\n res.headers.forEach((v, k) => {\n headers[k.toLowerCase()] = v;\n });\n\n const reader = res.body?.getReader();\n if (!reader) {\n return {\n url,\n status: res.status,\n headers,\n body: new Uint8Array(),\n pinnedAddress: pinned.address,\n pinnedFamily,\n connectionPinned: !options.trustedFetchFn,\n };\n }\n\n const chunks: Uint8Array[] = [];\n let bytes = 0;\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n bytes += value.byteLength;\n if (bytes > maxBodyBytes) {\n await reader.cancel();\n throw new SsrfRefusedError('body_exceeds_limit', `Response body exceeded ${maxBodyBytes} bytes`, {\n url,\n hostname: parsed.hostname,\n address: pinned.address,\n });\n }\n chunks.push(value);\n }\n\n const buf = new Uint8Array(bytes);\n let offset = 0;\n for (const c of chunks) {\n buf.set(c, offset);\n offset += c.byteLength;\n }\n\n return {\n url,\n status: res.status,\n headers,\n body: buf,\n pinnedAddress: pinned.address,\n pinnedFamily,\n connectionPinned: !options.trustedFetchFn,\n };\n } finally {\n clearTimeout(timer);\n options.signal?.removeEventListener('abort', onExternalAbort);\n await dispatcher.close().catch(() => {});\n }\n}\n\n/**\n * Decode a UTF-8 byte buffer as JSON when the content-type declares JSON, or\n * fall back to a UTF-8 string. Handy shared helper for probe-style call sites\n * that don't care about binary bodies.\n */\nexport function decodeBodyAsJsonOrText(body: Uint8Array, contentType: string | undefined): unknown {\n if (body.byteLength === 0) return null;\n const text = Buffer.from(body.buffer, body.byteOffset, body.byteLength).toString('utf8');\n if (contentType?.toLowerCase().includes('application/json')) {\n try {\n return JSON.parse(text);\n } catch {\n return text;\n }\n }\n return text;\n}\n"],"mappings":"AAiCA,SAAS,UAAU,sBAAsB;AACzC,SAAS,OAAO,SAAS,mBAAmB;AAC5C,SAAS,iBAAiB,mBAAmB;AAE7C,MAAM,qBAAqB;AAC3B,MAAM,yBAAyB,KAAK;AACpC,MAAM,kBAAkB,oBAAI,IAAI,CAAC,UAAU,OAAO,CAAC;AA0C5C,MAAM,uBAAqD,oBAAI,IAAI;AAAA,EACxE;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAQM,MAAM,yBAAyB,MAAM;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,MAAuB,SAAiB,MAA4D;AAC9G,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,MAAM,KAAK;AAChB,SAAK,WAAW,KAAK;AACrB,SAAK,UAAU,KAAK;AAAA,EACtB;AACF;AA8CA,eAAsB,cAAc,KAAa,UAA4B,CAAC,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,MAAM,EAAE,MAAM,MAAM;AAAA,IAAC,CAAC;AAAA,EACzC;AACF;AAOO,SAAS,uBAAuB,MAAkB,aAA0C;AACjG,MAAI,KAAK,eAAe,EAAG,QAAO;AAClC,QAAM,OAAO,OAAO,KAAK,KAAK,QAAQ,KAAK,YAAY,KAAK,UAAU,EAAE,SAAS,MAAM;AACvF,MAAI,aAAa,YAAY,EAAE,SAAS,kBAAkB,GAAG;AAC3D,QAAI;AACF,aAAO,KAAK,MAAM,IAAI;AAAA,IACxB,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/net/ssrf-fetch.ts"],"sourcesContent":["/**\n * SSRF-safe HTTP fetch primitive.\n *\n * Used by compliance probes, storyboard runners, and (future) JWKS /\n * revocation-list resolvers — anywhere the library dispatches a request to a\n * URL that came from counterparty-controlled data and therefore might point at\n * the host's private network or a cloud metadata endpoint.\n *\n * Guarantees:\n * - Scheme: only `https:` by default; `http:` allowed under the dev-opt-in\n * `allowPrivateIp` flag. `file:`, `ftp:`, `data:`, etc. are always refused.\n * - DNS: resolves every A/AAAA record once, validates the full set, then\n * pins the outbound connection to the first validated address via an\n * undici `Agent` whose `connect.lookup` returns the pinned tuple.\n * Defeats DNS rebinding (attacker returns a public address to the guard\n * lookup and a private address to the connect-time lookup) and any other\n * TOCTOU gap between validation and connect.\n * - IMDS (`169.254.169.254`, `fe80::`) stays refused even under\n * `allowPrivateIp` — cloud metadata exfiltration is never a legitimate\n * dev-loop use case.\n * - Redirects are not followed (`redirect: 'manual'`). The 3xx response is\n * returned with `Location` populated so callers can inspect it, but they\n * MUST NOT re-dispatch to the `Location` URL themselves — that bypasses\n * every guard above. To follow a redirect safely, re-invoke\n * `ssrfSafeFetch` with the new URL so it runs through validation again.\n * - Response body is buffered up to `maxBodyBytes` (default 64 KiB) and\n * returned as raw bytes; the dispatcher is torn down after reading so\n * connection-reuse can't carry an attacker-controlled keepalive.\n *\n * Returns a fully-buffered result. Callers that need streaming or large bodies\n * should extend this primitive rather than bypass it.\n */\nimport { type LookupAddress, type LookupOptions } from 'dns';\nimport { lookup as dnsLookupAsync } from 'dns/promises';\nimport { Agent, fetch as undiciFetch } from 'undici';\nimport { isAlwaysBlocked, isPrivateIp } from './address-guards';\n\nconst DEFAULT_TIMEOUT_MS = 10_000;\nconst DEFAULT_MAX_BODY_BYTES = 64 * 1024;\nconst ALLOWED_SCHEMES = new Set(['https:', 'http:']);\n\nexport type SsrfRefusedCode =\n | 'invalid_url'\n | 'scheme_not_allowed'\n | 'non_https_without_opt_in'\n | 'dns_lookup_failed'\n | 'dns_empty'\n | 'always_blocked_address'\n | 'private_address'\n | 'body_exceeds_limit';\n\n/**\n * SSRF refusal codes that indicate runtime/network conditions rather than\n * policy refusal. Callers that want to fall back to a \"host unreachable\" or\n * \"treat as unknown\" path on these codes — rather than surfacing the\n * SsrfRefusedError to their own caller — can intersect against this set:\n *\n * ```ts\n * if (err instanceof SsrfRefusedError && SSRF_TRANSIENT_CODES.has(err.code)) {\n * // network condition, not a policy attack — treat as unreachable\n * } else if (err instanceof SsrfRefusedError) {\n * // policy refusal — must propagate; silently downgrading to \"unreachable\"\n * // reintroduces the catch-swallow class flagged in adcp-client#1618 review\n * throw err;\n * }\n * ```\n *\n * - `dns_lookup_failed`, `dns_empty`: name does not resolve. CLI fixtures\n * use `*.example.invalid` to provoke these — preserving the runtime-error\n * path matches pre-`ssrfSafeFetch` native-fetch behavior.\n * - `body_exceeds_limit`: response started OK (validated address, scheme,\n * etc.) but exceeded the caller's defensive cap. The host is real and\n * knows the URL; classifying as \"policy attack\" would be a misread.\n *\n * NOT in this set: `always_blocked_address`, `private_address`,\n * `scheme_not_allowed`, `non_https_without_opt_in`, `invalid_url`. Those\n * are policy refusals — silently downgrading them to \"unreachable\" or\n * \"suspect\" reintroduces the SSRF gap the gate was added to close.\n *\n * Added in adcp-client#1633.\n */\nexport const SSRF_TRANSIENT_CODES: ReadonlySet<SsrfRefusedCode> = new Set([\n 'dns_lookup_failed',\n 'dns_empty',\n 'body_exceeds_limit',\n]);\n\n/**\n * Thrown when the SSRF guard refuses a request before (or during) the fetch.\n * Network failures after the guard passes are not wrapped in this type —\n * callers that want to distinguish \"we refused this\" from \"the remote broke\"\n * can `instanceof SsrfRefusedError` the catch.\n */\nexport class SsrfRefusedError extends Error {\n readonly code: SsrfRefusedCode;\n readonly url: string;\n readonly hostname?: string;\n readonly address?: string;\n\n constructor(code: SsrfRefusedCode, message: string, meta: { url: string; hostname?: string; address?: string }) {\n super(message);\n this.name = 'SsrfRefusedError';\n this.code = code;\n this.url = meta.url;\n this.hostname = meta.hostname;\n this.address = meta.address;\n }\n}\n\nexport interface SsrfFetchOptions {\n method?: string;\n /** Lowercased keys preferred; values preserved verbatim. */\n headers?: Record<string, string>;\n body?: string | Uint8Array;\n /** Allow `http://` and private/loopback targets. Default false. */\n allowPrivateIp?: boolean;\n /** Overall timeout including DNS + connect + body read. Default 10_000 ms. */\n timeoutMs?: number;\n /** Hard cap on response body bytes. Default 64 KiB. */\n maxBodyBytes?: number;\n /** Caller-provided abort signal, composed with the internal timeout. */\n signal?: AbortSignal;\n /**\n * Trusted scoped fetch implementation. URL validation and address\n * classification still run before invocation, but DNS pinning is delegated\n * to this implementation because custom fetchers do not accept undici\n * dispatchers. The caller MUST enforce DNS-rebinding protection itself.\n *\n * This deliberately explicit name prevents callers from mistaking a custom\n * transport for the internally DNS-pinned path.\n */\n trustedFetchFn?: typeof fetch;\n}\n\nexport interface SsrfFetchResult {\n url: string;\n status: number;\n /** Response headers, lowercased. */\n headers: Record<string, string>;\n /** Raw response body bytes (empty Uint8Array if no body). */\n body: Uint8Array;\n /** The validated IP address. The connection used it only when `connectionPinned` is true. */\n pinnedAddress: string;\n pinnedFamily: 4 | 6;\n /** Whether the internal undici dispatcher pinned the connection to `pinnedAddress`. */\n connectionPinned: boolean;\n}\n\n/**\n * GET/POST/etc. a URL with SSRF guarding + DNS pinning. Throws\n * {@link SsrfRefusedError} when the guard refuses; other errors (network\n * timeouts, remote resets) propagate as the native fetch error.\n */\nexport async function ssrfSafeFetch(url: string, options: SsrfFetchOptions = {}): Promise<SsrfFetchResult> {\n throwIfSignalAborted(options.signal);\n const allowPrivateIp = options.allowPrivateIp === true;\n const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;\n const maxBodyBytes = options.maxBodyBytes ?? DEFAULT_MAX_BODY_BYTES;\n\n let parsed: URL;\n try {\n parsed = new URL(url);\n } catch {\n throw new SsrfRefusedError('invalid_url', `Invalid URL: ${url}`, { url });\n }\n\n // `URL.hostname` wraps IPv6 literals in brackets (`https://[::1]/` →\n // `[::1]`). `dns.lookup` and the address classifier both want the bare\n // form; strip brackets here so IPv6 localhost URLs work under\n // `allowPrivateIp` and so bracketed literals can't slip past classification\n // on a future Node release that tolerates them.\n const hostname = parsed.hostname.replace(/^\\[|\\]$/g, '');\n\n if (!ALLOWED_SCHEMES.has(parsed.protocol)) {\n throw new SsrfRefusedError(\n 'scheme_not_allowed',\n `Refusing to fetch URL with unsupported scheme: ${parsed.protocol}`,\n { url, hostname }\n );\n }\n if (parsed.protocol !== 'https:' && !allowPrivateIp) {\n throw new SsrfRefusedError('non_https_without_opt_in', `Refusing to fetch non-HTTPS URL: ${url}`, {\n url,\n hostname,\n });\n }\n\n let addresses: { address: string; family: number }[];\n try {\n addresses = await dnsLookupAsync(hostname, { all: true });\n } catch (err) {\n throwIfSignalAborted(options.signal);\n throw new SsrfRefusedError(\n 'dns_lookup_failed',\n `DNS lookup failed for ${hostname}: ${err instanceof Error ? err.message : String(err)}`,\n { url, hostname }\n );\n }\n throwIfSignalAborted(options.signal);\n if (addresses.length === 0) {\n throw new SsrfRefusedError('dns_empty', `DNS returned no addresses for ${hostname}`, {\n url,\n hostname,\n });\n }\n // Error messages intentionally do NOT include the resolved IP — a\n // counterparty-supplied hostname that resolves into the caller's internal\n // address space would otherwise leak network topology into compliance\n // reports and log aggregators. The address is still available on the\n // thrown error's `.address` field for programmatic debugging.\n for (const a of addresses) {\n if (isAlwaysBlocked(a.address)) {\n throw new SsrfRefusedError(\n 'always_blocked_address',\n `Refusing to fetch: ${hostname} resolves to an always-blocked address (link-local or cloud metadata)`,\n { url, hostname, address: a.address }\n );\n }\n }\n if (!allowPrivateIp) {\n for (const a of addresses) {\n if (isPrivateIp(a.address)) {\n throw new SsrfRefusedError(\n 'private_address',\n `Refusing to fetch: ${hostname} resolves to a private/loopback address`,\n { url, hostname, address: a.address }\n );\n }\n }\n }\n\n const pinned = addresses[0]!;\n const pinnedFamily = pinned.family === 6 ? 6 : 4;\n const dispatcher = new Agent({\n connect: {\n // All addresses were validated above; pin the connect to the first. The\n // custom lookup also means undici won't re-resolve and pick up a rebind.\n // undici's Agent may call lookup with `{ all: true }` (it does for HTTPS\n // targets under Node 22+), which expects the array form of the callback.\n lookup: (\n _h: string,\n opts: LookupOptions | undefined,\n cb: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family?: number) => void\n ) => {\n if (opts?.all) {\n cb(null, [{ address: pinned.address, family: pinnedFamily }]);\n } else {\n cb(null, pinned.address, pinnedFamily);\n }\n },\n },\n });\n\n const ac = new AbortController();\n const onExternalAbort = () => ac.abort(options.signal?.reason);\n options.signal?.addEventListener('abort', onExternalAbort, { once: true });\n if (options.signal?.aborted) onExternalAbort();\n const timer = setTimeout(() => ac.abort(new Error('ssrf-fetch: timeout')), timeoutMs);\n\n try {\n const res = options.trustedFetchFn\n ? await options.trustedFetchFn(url, {\n method: options.method ?? 'GET',\n redirect: 'manual',\n signal: ac.signal,\n headers: options.headers,\n ...(options.body !== undefined && { body: options.body as BodyInit }),\n })\n : await undiciFetch(url, {\n method: options.method ?? 'GET',\n redirect: 'manual',\n signal: ac.signal,\n headers: options.headers,\n dispatcher,\n ...(options.body !== undefined && { body: options.body }),\n });\n\n const headers: Record<string, string> = {};\n res.headers.forEach((v, k) => {\n headers[k.toLowerCase()] = v;\n });\n\n const reader = res.body?.getReader();\n if (!reader) {\n return {\n url,\n status: res.status,\n headers,\n body: new Uint8Array(),\n pinnedAddress: pinned.address,\n pinnedFamily,\n connectionPinned: !options.trustedFetchFn,\n };\n }\n\n const chunks: Uint8Array[] = [];\n let bytes = 0;\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n bytes += value.byteLength;\n if (bytes > maxBodyBytes) {\n await reader.cancel();\n throw new SsrfRefusedError('body_exceeds_limit', `Response body exceeded ${maxBodyBytes} bytes`, {\n url,\n hostname: parsed.hostname,\n address: pinned.address,\n });\n }\n chunks.push(value);\n }\n\n const buf = new Uint8Array(bytes);\n let offset = 0;\n for (const c of chunks) {\n buf.set(c, offset);\n offset += c.byteLength;\n }\n\n return {\n url,\n status: res.status,\n headers,\n body: buf,\n pinnedAddress: pinned.address,\n pinnedFamily,\n connectionPinned: !options.trustedFetchFn,\n };\n } finally {\n clearTimeout(timer);\n options.signal?.removeEventListener('abort', onExternalAbort);\n await dispatcher.close().catch(() => {});\n }\n}\n\nfunction throwIfSignalAborted(signal?: AbortSignal): void {\n if (!signal?.aborted) return;\n if (signal.reason instanceof Error) throw signal.reason;\n const error = new Error(signal.reason == null ? 'The operation was aborted' : String(signal.reason));\n error.name = 'AbortError';\n throw error;\n}\n\n/**\n * Decode a UTF-8 byte buffer as JSON when the content-type declares JSON, or\n * fall back to a UTF-8 string. Handy shared helper for probe-style call sites\n * that don't care about binary bodies.\n */\nexport function decodeBodyAsJsonOrText(body: Uint8Array, contentType: string | undefined): unknown {\n if (body.byteLength === 0) return null;\n const text = Buffer.from(body.buffer, body.byteOffset, body.byteLength).toString('utf8');\n if (contentType?.toLowerCase().includes('application/json')) {\n try {\n return JSON.parse(text);\n } catch {\n return text;\n }\n }\n return text;\n}\n"],"mappings":"AAiCA,SAAS,UAAU,sBAAsB;AACzC,SAAS,OAAO,SAAS,mBAAmB;AAC5C,SAAS,iBAAiB,mBAAmB;AAE7C,MAAM,qBAAqB;AAC3B,MAAM,y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
6
|
export declare function createTimeoutError(timeoutMs: number): Error;
|
|
7
7
|
export declare function isAbortOrTimeoutError(error: unknown): boolean;
|
|
8
8
|
export declare function throwIfAborted(signal?: AbortSignal): void;
|
|
9
|
-
export declare function withAbortSignal<T>(signals: Array<AbortSignal | null | undefined>, timeoutMs: number | undefined, fn: (signal?: AbortSignal) => Promise<T
|
|
9
|
+
export declare function withAbortSignal<T>(signals: Array<AbortSignal | null | undefined>, timeoutMs: number | undefined, fn: (signal?: AbortSignal) => Promise<T>, options?: {
|
|
10
|
+
timeoutError?: Error;
|
|
11
|
+
}): Promise<T>;
|
|
@@ -6,5 +6,7 @@ export declare function createAbortError(reason?: unknown): Error;
|
|
|
6
6
|
export declare function createTimeoutError(timeoutMs: number): Error;
|
|
7
7
|
export declare function isAbortOrTimeoutError(error: unknown): boolean;
|
|
8
8
|
export declare function throwIfAborted(signal?: AbortSignal): void;
|
|
9
|
-
export declare function withAbortSignal<T>(signals: Array<AbortSignal | null | undefined>, timeoutMs: number | undefined, fn: (signal?: AbortSignal) => Promise<T
|
|
9
|
+
export declare function withAbortSignal<T>(signals: Array<AbortSignal | null | undefined>, timeoutMs: number | undefined, fn: (signal?: AbortSignal) => Promise<T>, options?: {
|
|
10
|
+
timeoutError?: Error;
|
|
11
|
+
}): Promise<T>;
|
|
10
12
|
//# sourceMappingURL=abort.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abort.d.ts","sourceRoot":"","sources":["../../../src/lib/protocols/abort.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,QAAS,CAAC;AACjD,eAAO,MAAM,kBAAkB,aAAgB,CAAC;AAEhD,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQpH;AAED,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG/F;AAED,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"abort.d.ts","sourceRoot":"","sources":["../../../src/lib/protocols/abort.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,QAAS,CAAC;AACjD,eAAO,MAAM,kBAAkB,aAAgB,CAAC;AAEhD,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQpH;AAED,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG/F;AAED,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,KAAK,CAcxD;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,CAI3D;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQ7D;AAED,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAIzD;AAED,wBAAsB,eAAe,CAAC,CAAC,EACrC,OAAO,EAAE,KAAK,CAAC,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC,EAC9C,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,EACxC,OAAO,GAAE;IAAE,YAAY,CAAC,EAAE,KAAK,CAAA;CAAO,GACrC,OAAO,CAAC,CAAC,CAAC,CAoDZ"}
|
|
@@ -45,7 +45,9 @@ function resolveClientRequestTimeoutMs(timeoutMs) {
|
|
|
45
45
|
return resolveRequestTimeoutMs(timeoutMs);
|
|
46
46
|
}
|
|
47
47
|
function createAbortError(reason) {
|
|
48
|
-
if (reason instanceof Error && (reason.name === "AbortError" || reason.name === "TimeoutError"))
|
|
48
|
+
if (reason instanceof Error && (reason.name === "AbortError" || reason.name === "TimeoutError" || reason.name === "TaskTimeoutError")) {
|
|
49
|
+
return reason;
|
|
50
|
+
}
|
|
49
51
|
const error = new Error(reason == null ? "The operation was aborted" : String(reason));
|
|
50
52
|
error.name = "AbortError";
|
|
51
53
|
if (reason instanceof Error) {
|
|
@@ -62,15 +64,15 @@ function createTimeoutError(timeoutMs) {
|
|
|
62
64
|
function isAbortOrTimeoutError(error) {
|
|
63
65
|
if (error == null || typeof error !== "object") return false;
|
|
64
66
|
const value = error;
|
|
65
|
-
if (value.name === "AbortError" || value.name === "TimeoutError") return true;
|
|
66
|
-
return value.code === -32001 || value.code === "REQUEST_TIMEOUT";
|
|
67
|
+
if (value.name === "AbortError" || value.name === "TimeoutError" || value.name === "TaskTimeoutError") return true;
|
|
68
|
+
return value.code === -32001 || value.code === "REQUEST_TIMEOUT" || value.code === "TASK_TIMEOUT";
|
|
67
69
|
}
|
|
68
70
|
function throwIfAborted(signal) {
|
|
69
71
|
if (signal?.aborted) {
|
|
70
72
|
throw createAbortError(signal.reason);
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
|
-
async function withAbortSignal(signals, timeoutMs, fn) {
|
|
75
|
+
async function withAbortSignal(signals, timeoutMs, fn, options = {}) {
|
|
74
76
|
const activeSignals = signals.filter((signal) => signal != null);
|
|
75
77
|
for (const signal of activeSignals) {
|
|
76
78
|
throwIfAborted(signal);
|
|
@@ -78,17 +80,6 @@ async function withAbortSignal(signals, timeoutMs, fn) {
|
|
|
78
80
|
if (timeoutMs == null && activeSignals.length === 0) {
|
|
79
81
|
return fn(void 0);
|
|
80
82
|
}
|
|
81
|
-
if (timeoutMs == null && activeSignals.length === 1) {
|
|
82
|
-
const signal = activeSignals[0];
|
|
83
|
-
try {
|
|
84
|
-
return await fn(signal);
|
|
85
|
-
} catch (error) {
|
|
86
|
-
if (signal.aborted) {
|
|
87
|
-
throw createAbortError(signal.reason);
|
|
88
|
-
}
|
|
89
|
-
throw error;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
83
|
const controller = new AbortController();
|
|
93
84
|
const abort = (reason) => {
|
|
94
85
|
if (!controller.signal.aborted) {
|
|
@@ -101,12 +92,23 @@ async function withAbortSignal(signals, timeoutMs, fn) {
|
|
|
101
92
|
return { signal, listener };
|
|
102
93
|
});
|
|
103
94
|
const timer = timeoutMs == null ? void 0 : setTimeout(() => {
|
|
104
|
-
abort(createTimeoutError(timeoutMs));
|
|
95
|
+
abort(options.timeoutError ?? createTimeoutError(timeoutMs));
|
|
105
96
|
}, timeoutMs);
|
|
97
|
+
let rejectOnAbort;
|
|
98
|
+
const aborted = new Promise((_resolve, reject) => {
|
|
99
|
+
rejectOnAbort = () => reject(controller.signal.reason ?? createAbortError());
|
|
100
|
+
controller.signal.addEventListener("abort", rejectOnAbort, { once: true });
|
|
101
|
+
});
|
|
106
102
|
try {
|
|
107
|
-
return await fn(controller.signal);
|
|
103
|
+
return await Promise.race([fn(controller.signal), aborted]);
|
|
104
|
+
} catch (error) {
|
|
105
|
+
if (controller.signal.aborted) {
|
|
106
|
+
throw controller.signal.reason ?? createAbortError();
|
|
107
|
+
}
|
|
108
|
+
throw error;
|
|
108
109
|
} finally {
|
|
109
110
|
if (timer) clearTimeout(timer);
|
|
111
|
+
if (rejectOnAbort) controller.signal.removeEventListener("abort", rejectOnAbort);
|
|
110
112
|
for (const { signal, listener } of listeners) {
|
|
111
113
|
signal.removeEventListener("abort", listener);
|
|
112
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/protocols/abort.ts"],"sourcesContent":["export const DEFAULT_REQUEST_TIMEOUT_MS = 60_000;\nexport const MAX_TIMER_DELAY_MS = 2_147_483_647;\n\nexport function resolveRequestTimeoutMs(timeoutMs: number | undefined, defaultTimeoutMs?: number): number | undefined {\n const resolved = timeoutMs ?? defaultTimeoutMs;\n if (resolved == null) return undefined;\n if (resolved === 0) return undefined;\n if (!Number.isFinite(resolved) || resolved < 0 || resolved > MAX_TIMER_DELAY_MS) {\n throw new RangeError(`requestTimeoutMs must be a finite non-negative number <= ${MAX_TIMER_DELAY_MS}`);\n }\n return resolved;\n}\n\nexport function resolveClientRequestTimeoutMs(timeoutMs: number | undefined): number | undefined {\n if (timeoutMs === 0) return MAX_TIMER_DELAY_MS;\n return resolveRequestTimeoutMs(timeoutMs);\n}\n\nexport function createAbortError(reason?: unknown): Error {\n if (reason instanceof Error
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/protocols/abort.ts"],"sourcesContent":["export const DEFAULT_REQUEST_TIMEOUT_MS = 60_000;\nexport const MAX_TIMER_DELAY_MS = 2_147_483_647;\n\nexport function resolveRequestTimeoutMs(timeoutMs: number | undefined, defaultTimeoutMs?: number): number | undefined {\n const resolved = timeoutMs ?? defaultTimeoutMs;\n if (resolved == null) return undefined;\n if (resolved === 0) return undefined;\n if (!Number.isFinite(resolved) || resolved < 0 || resolved > MAX_TIMER_DELAY_MS) {\n throw new RangeError(`requestTimeoutMs must be a finite non-negative number <= ${MAX_TIMER_DELAY_MS}`);\n }\n return resolved;\n}\n\nexport function resolveClientRequestTimeoutMs(timeoutMs: number | undefined): number | undefined {\n if (timeoutMs === 0) return MAX_TIMER_DELAY_MS;\n return resolveRequestTimeoutMs(timeoutMs);\n}\n\nexport function createAbortError(reason?: unknown): Error {\n if (\n reason instanceof Error &&\n (reason.name === 'AbortError' || reason.name === 'TimeoutError' || reason.name === 'TaskTimeoutError')\n ) {\n return reason;\n }\n const error = new Error(reason == null ? 'The operation was aborted' : String(reason));\n error.name = 'AbortError';\n if (reason instanceof Error) {\n (error as Error & { cause?: unknown }).cause = reason;\n error.message = reason.message;\n }\n return error;\n}\n\nexport function createTimeoutError(timeoutMs: number): Error {\n const error = new Error(`Request timed out after ${timeoutMs} ms`);\n error.name = 'TimeoutError';\n return error;\n}\n\nexport function isAbortOrTimeoutError(error: unknown): boolean {\n if (error == null || typeof error !== 'object') return false;\n const value = error as { name?: unknown; code?: unknown };\n if (value.name === 'AbortError' || value.name === 'TimeoutError' || value.name === 'TaskTimeoutError') return true;\n // MCP SDK v1 raises JSON-RPC RequestTimeout (-32001); the v2 packages use\n // the typed SDK error code REQUEST_TIMEOUT. Both represent the same\n // timeout/cancellation boundary and must bypass endpoint fallback.\n return value.code === -32001 || value.code === 'REQUEST_TIMEOUT' || value.code === 'TASK_TIMEOUT';\n}\n\nexport function throwIfAborted(signal?: AbortSignal): void {\n if (signal?.aborted) {\n throw createAbortError(signal.reason);\n }\n}\n\nexport async function withAbortSignal<T>(\n signals: Array<AbortSignal | null | undefined>,\n timeoutMs: number | undefined,\n fn: (signal?: AbortSignal) => Promise<T>,\n options: { timeoutError?: Error } = {}\n): Promise<T> {\n const activeSignals = signals.filter((signal): signal is AbortSignal => signal != null);\n for (const signal of activeSignals) {\n throwIfAborted(signal);\n }\n\n if (timeoutMs == null && activeSignals.length === 0) {\n return fn(undefined);\n }\n\n const controller = new AbortController();\n const abort = (reason?: unknown) => {\n if (!controller.signal.aborted) {\n controller.abort(reason);\n }\n };\n\n const listeners = activeSignals.map(signal => {\n const listener = () => abort(createAbortError(signal.reason));\n signal.addEventListener('abort', listener, { once: true });\n return { signal, listener };\n });\n const timer =\n timeoutMs == null\n ? undefined\n : setTimeout(() => {\n abort(options.timeoutError ?? createTimeoutError(timeoutMs));\n }, timeoutMs);\n\n let rejectOnAbort: ((reason: unknown) => void) | undefined;\n const aborted = new Promise<never>((_resolve, reject) => {\n rejectOnAbort = () => reject(controller.signal.reason ?? createAbortError());\n controller.signal.addEventListener('abort', rejectOnAbort, { once: true });\n });\n\n try {\n // The signal reclaims transports that honor cancellation. The race also\n // guarantees the caller-facing deadline when an intermediate callback or\n // protocol implementation is slow to observe that signal.\n return await Promise.race([fn(controller.signal), aborted]);\n } catch (error) {\n if (controller.signal.aborted) {\n throw controller.signal.reason ?? createAbortError();\n }\n throw error;\n } finally {\n if (timer) clearTimeout(timer);\n if (rejectOnAbort) controller.signal.removeEventListener('abort', rejectOnAbort);\n for (const { signal, listener } of listeners) {\n signal.removeEventListener('abort', listener);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,6BAA6B;AACnC,MAAM,qBAAqB;AAE3B,SAAS,wBAAwB,WAA+B,kBAA+C;AACpH,QAAM,WAAW,aAAa;AAC9B,MAAI,YAAY,KAAM,QAAO;AAC7B,MAAI,aAAa,EAAG,QAAO;AAC3B,MAAI,CAAC,OAAO,SAAS,QAAQ,KAAK,WAAW,KAAK,WAAW,oBAAoB;AAC/E,UAAM,IAAI,WAAW,4DAA4D,kBAAkB,EAAE;AAAA,EACvG;AACA,SAAO;AACT;AAEO,SAAS,8BAA8B,WAAmD;AAC/F,MAAI,cAAc,EAAG,QAAO;AAC5B,SAAO,wBAAwB,SAAS;AAC1C;AAEO,SAAS,iBAAiB,QAAyB;AACxD,MACE,kBAAkB,UACjB,OAAO,SAAS,gBAAgB,OAAO,SAAS,kBAAkB,OAAO,SAAS,qBACnF;AACA,WAAO;AAAA,EACT;AACA,QAAM,QAAQ,IAAI,MAAM,UAAU,OAAO,8BAA8B,OAAO,MAAM,CAAC;AACrF,QAAM,OAAO;AACb,MAAI,kBAAkB,OAAO;AAC3B,IAAC,MAAsC,QAAQ;AAC/C,UAAM,UAAU,OAAO;AAAA,EACzB;AACA,SAAO;AACT;AAEO,SAAS,mBAAmB,WAA0B;AAC3D,QAAM,QAAQ,IAAI,MAAM,2BAA2B,SAAS,KAAK;AACjE,QAAM,OAAO;AACb,SAAO;AACT;AAEO,SAAS,sBAAsB,OAAyB;AAC7D,MAAI,SAAS,QAAQ,OAAO,UAAU,SAAU,QAAO;AACvD,QAAM,QAAQ;AACd,MAAI,MAAM,SAAS,gBAAgB,MAAM,SAAS,kBAAkB,MAAM,SAAS,mBAAoB,QAAO;AAI9G,SAAO,M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