@adcp/sdk 6.0.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.d.ts +4 -0
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.js +10 -0
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.js.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/get_products.d.ts +9 -0
- package/dist/lib/adapters/legacy/v2-5/get_products.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/get_products.js +15 -0
- package/dist/lib/adapters/legacy/v2-5/get_products.js.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/index.d.ts +35 -0
- package/dist/lib/adapters/legacy/v2-5/index.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/index.js +56 -0
- package/dist/lib/adapters/legacy/v2-5/index.js.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.d.ts +9 -0
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.js +15 -0
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.js.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/preview_creative.d.ts +4 -0
- package/dist/lib/adapters/legacy/v2-5/preview_creative.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/preview_creative.js +10 -0
- package/dist/lib/adapters/legacy/v2-5/preview_creative.js.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.ts +11 -0
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.js +16 -0
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.js.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/types.d.ts +40 -0
- package/dist/lib/adapters/legacy/v2-5/types.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/types.js +25 -0
- package/dist/lib/adapters/legacy/v2-5/types.js.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.d.ts +4 -0
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.d.ts.map +1 -0
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.js +12 -0
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.js.map +1 -0
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/ConversationTypes.d.ts +7 -0
- package/dist/lib/core/ConversationTypes.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.ts +9 -14
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +103 -35
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/core/TaskExecutor.d.ts +19 -0
- package/dist/lib/core/TaskExecutor.d.ts.map +1 -1
- package/dist/lib/core/TaskExecutor.js +28 -1
- package/dist/lib/core/TaskExecutor.js.map +1 -1
- package/dist/lib/errors/index.d.ts +30 -0
- package/dist/lib/errors/index.d.ts.map +1 -1
- package/dist/lib/errors/index.js +36 -1
- package/dist/lib/errors/index.js.map +1 -1
- package/dist/lib/index.d.ts +4 -2
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +12 -8
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/protocols/a2a.d.ts.map +1 -1
- package/dist/lib/protocols/a2a.js +5 -1
- package/dist/lib/protocols/a2a.js.map +1 -1
- package/dist/lib/protocols/index.d.ts +53 -3
- package/dist/lib/protocols/index.d.ts.map +1 -1
- package/dist/lib/protocols/index.js +19 -8
- package/dist/lib/protocols/index.js.map +1 -1
- package/dist/lib/protocols/mcp.d.ts.map +1 -1
- package/dist/lib/protocols/mcp.js +13 -5
- package/dist/lib/protocols/mcp.js.map +1 -1
- package/dist/lib/protocols/responseSizeLimit.d.ts +25 -0
- package/dist/lib/protocols/responseSizeLimit.d.ts.map +1 -0
- package/dist/lib/protocols/responseSizeLimit.js +141 -0
- package/dist/lib/protocols/responseSizeLimit.js.map +1 -0
- package/dist/lib/schemas-data/v2.5/_provenance.json +8 -0
- package/dist/lib/schemas-data/v2.5/adagents.json +494 -0
- package/dist/lib/schemas-data/v2.5/core/activation-key.json +50 -0
- package/dist/lib/schemas-data/v2.5/core/assets/audio-asset.json +32 -0
- package/dist/lib/schemas-data/v2.5/core/assets/css-asset.json +21 -0
- package/dist/lib/schemas-data/v2.5/core/assets/daast-asset.json +87 -0
- package/dist/lib/schemas-data/v2.5/core/assets/html-asset.json +21 -0
- package/dist/lib/schemas-data/v2.5/core/assets/image-asset.json +38 -0
- package/dist/lib/schemas-data/v2.5/core/assets/javascript-asset.json +21 -0
- package/dist/lib/schemas-data/v2.5/core/assets/markdown-asset.json +31 -0
- package/dist/lib/schemas-data/v2.5/core/assets/text-asset.json +21 -0
- package/dist/lib/schemas-data/v2.5/core/assets/url-asset.json +26 -0
- package/dist/lib/schemas-data/v2.5/core/assets/vast-asset.json +87 -0
- package/dist/lib/schemas-data/v2.5/core/assets/video-asset.json +44 -0
- package/dist/lib/schemas-data/v2.5/core/assets/webhook-asset.json +71 -0
- package/dist/lib/schemas-data/v2.5/core/async-response-data.json +88 -0
- package/dist/lib/schemas-data/v2.5/core/brand-manifest-ref.json +33 -0
- package/dist/lib/schemas-data/v2.5/core/brand-manifest.json +409 -0
- package/dist/lib/schemas-data/v2.5/core/context.json +8 -0
- package/dist/lib/schemas-data/v2.5/core/creative-asset.json +125 -0
- package/dist/lib/schemas-data/v2.5/core/creative-assignment.json +31 -0
- package/dist/lib/schemas-data/v2.5/core/creative-filters.json +111 -0
- package/dist/lib/schemas-data/v2.5/core/creative-manifest.json +72 -0
- package/dist/lib/schemas-data/v2.5/core/creative-policy.json +27 -0
- package/dist/lib/schemas-data/v2.5/core/delivery-metrics.json +171 -0
- package/dist/lib/schemas-data/v2.5/core/deployment.json +93 -0
- package/dist/lib/schemas-data/v2.5/core/destination.json +53 -0
- package/dist/lib/schemas-data/v2.5/core/error.json +40 -0
- package/dist/lib/schemas-data/v2.5/core/ext.json +8 -0
- package/dist/lib/schemas-data/v2.5/core/format-id.json +47 -0
- package/dist/lib/schemas-data/v2.5/core/format.json +324 -0
- package/dist/lib/schemas-data/v2.5/core/frequency-cap.json +18 -0
- package/dist/lib/schemas-data/v2.5/core/mcp-webhook-payload.json +152 -0
- package/dist/lib/schemas-data/v2.5/core/measurement.json +48 -0
- package/dist/lib/schemas-data/v2.5/core/media-buy.json +62 -0
- package/dist/lib/schemas-data/v2.5/core/package.json +72 -0
- package/dist/lib/schemas-data/v2.5/core/performance-feedback.json +90 -0
- package/dist/lib/schemas-data/v2.5/core/placement.json +34 -0
- package/dist/lib/schemas-data/v2.5/core/pricing-option.json +35 -0
- package/dist/lib/schemas-data/v2.5/core/product-filters.json +102 -0
- package/dist/lib/schemas-data/v2.5/core/product.json +153 -0
- package/dist/lib/schemas-data/v2.5/core/promoted-offerings.json +115 -0
- package/dist/lib/schemas-data/v2.5/core/promoted-products.json +67 -0
- package/dist/lib/schemas-data/v2.5/core/property-id.json +14 -0
- package/dist/lib/schemas-data/v2.5/core/property-tag.json +16 -0
- package/dist/lib/schemas-data/v2.5/core/property.json +62 -0
- package/dist/lib/schemas-data/v2.5/core/protocol-envelope.json +146 -0
- package/dist/lib/schemas-data/v2.5/core/publisher-property-selector.json +92 -0
- package/dist/lib/schemas-data/v2.5/core/push-notification-config.json +48 -0
- package/dist/lib/schemas-data/v2.5/core/reporting-capabilities.json +71 -0
- package/dist/lib/schemas-data/v2.5/core/response.json +24 -0
- package/dist/lib/schemas-data/v2.5/core/signal-filters.json +35 -0
- package/dist/lib/schemas-data/v2.5/core/start-timing.json +18 -0
- package/dist/lib/schemas-data/v2.5/core/sub-asset.json +79 -0
- package/dist/lib/schemas-data/v2.5/core/targeting.json +50 -0
- package/dist/lib/schemas-data/v2.5/core/tasks-get-request.json +43 -0
- package/dist/lib/schemas-data/v2.5/core/tasks-get-response.json +166 -0
- package/dist/lib/schemas-data/v2.5/core/tasks-list-request.json +192 -0
- package/dist/lib/schemas-data/v2.5/core/tasks-list-response.json +183 -0
- package/dist/lib/schemas-data/v2.5/creative/asset-types/index.json +101 -0
- package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-request.json +73 -0
- package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-response.json +61 -0
- package/dist/lib/schemas-data/v2.5/creative/preview-creative-request.json +164 -0
- package/dist/lib/schemas-data/v2.5/creative/preview-creative-response.json +245 -0
- package/dist/lib/schemas-data/v2.5/creative/preview-render.json +225 -0
- package/dist/lib/schemas-data/v2.5/enums/adcp-domain.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/asset-content-type.json +22 -0
- package/dist/lib/schemas-data/v2.5/enums/auth-scheme.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/available-metric.json +18 -0
- package/dist/lib/schemas-data/v2.5/enums/channels.json +18 -0
- package/dist/lib/schemas-data/v2.5/enums/co-branding-requirement.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/creative-action.json +14 -0
- package/dist/lib/schemas-data/v2.5/enums/creative-agent-capability.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/creative-sort-field.json +15 -0
- package/dist/lib/schemas-data/v2.5/enums/creative-status.json +19 -0
- package/dist/lib/schemas-data/v2.5/enums/daast-tracking-event.json +20 -0
- package/dist/lib/schemas-data/v2.5/enums/daast-version.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/delivery-type.json +15 -0
- package/dist/lib/schemas-data/v2.5/enums/dimension-unit.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/feed-format.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/feedback-source.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/format-category.json +16 -0
- package/dist/lib/schemas-data/v2.5/enums/format-id-parameter.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/frequency-cap-scope.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/history-entry-type.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/http-method.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/identifier-types.json +34 -0
- package/dist/lib/schemas-data/v2.5/enums/javascript-module-type.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/landing-page-requirement.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/markdown-flavor.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/media-buy-status.json +19 -0
- package/dist/lib/schemas-data/v2.5/enums/metric-type.json +17 -0
- package/dist/lib/schemas-data/v2.5/enums/notification-type.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/pacing.json +17 -0
- package/dist/lib/schemas-data/v2.5/enums/preview-output-format.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/pricing-model.json +25 -0
- package/dist/lib/schemas-data/v2.5/enums/property-type.json +16 -0
- package/dist/lib/schemas-data/v2.5/enums/publisher-identifier-types.json +19 -0
- package/dist/lib/schemas-data/v2.5/enums/reporting-frequency.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/signal-catalog-type.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/sort-direction.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/standard-format-ids.json +103 -0
- package/dist/lib/schemas-data/v2.5/enums/task-status.json +29 -0
- package/dist/lib/schemas-data/v2.5/enums/task-type.json +27 -0
- package/dist/lib/schemas-data/v2.5/enums/update-frequency.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/url-asset-type.json +12 -0
- package/dist/lib/schemas-data/v2.5/enums/validation-mode.json +11 -0
- package/dist/lib/schemas-data/v2.5/enums/vast-tracking-event.json +25 -0
- package/dist/lib/schemas-data/v2.5/enums/vast-version.json +14 -0
- package/dist/lib/schemas-data/v2.5/enums/webhook-response-type.json +13 -0
- package/dist/lib/schemas-data/v2.5/enums/webhook-security-method.json +12 -0
- package/dist/lib/schemas-data/v2.5/index.json +604 -0
- package/dist/lib/schemas-data/v2.5/media-buy/build-creative-request.json +31 -0
- package/dist/lib/schemas-data/v2.5/media-buy/build-creative-response.json +65 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-input-required.json +31 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-submitted.json +16 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-working.json +36 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-request.json +126 -0
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-response.json +97 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-request.json +54 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-response.json +285 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-input-required.json +38 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-submitted.json +21 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-working.json +34 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-request.json +28 -0
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-response.json +33 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-request.json +26 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-response.json +70 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-request.json +58 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-response.json +61 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-request.json +137 -0
- package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-response.json +437 -0
- package/dist/lib/schemas-data/v2.5/media-buy/package-request.json +80 -0
- package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-request.json +88 -0
- package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-response.json +66 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-input-required.json +25 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-submitted.json +16 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-working.json +46 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-request.json +178 -0
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-response.json +149 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-input-required.json +24 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-submitted.json +16 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-working.json +36 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-request.json +129 -0
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-response.json +99 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpc-option.json +52 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpcv-option.json +52 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpm-auction-option.json +81 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpm-fixed-option.json +52 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpp-option.json +73 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/cpv-option.json +88 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/flat-rate-option.json +93 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-auction-option.json +81 -0
- package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-fixed-option.json +52 -0
- package/dist/lib/schemas-data/v2.5/protocols/adcp-extension.json +33 -0
- package/dist/lib/schemas-data/v2.5/signals/activate-signal-request.json +32 -0
- package/dist/lib/schemas-data/v2.5/signals/activate-signal-response.json +68 -0
- package/dist/lib/schemas-data/v2.5/signals/get-signals-request.json +59 -0
- package/dist/lib/schemas-data/v2.5/signals/get-signals-response.json +100 -0
- package/dist/lib/server/create-adcp-server.d.ts.map +1 -1
- package/dist/lib/server/create-adcp-server.js +40 -25
- package/dist/lib/server/create-adcp-server.js.map +1 -1
- package/dist/lib/server/decisioning/async-outcome.d.ts +16 -10
- package/dist/lib/server/decisioning/async-outcome.d.ts.map +1 -1
- package/dist/lib/server/decisioning/async-outcome.js +15 -56
- package/dist/lib/server/decisioning/async-outcome.js.map +1 -1
- package/dist/lib/server/decisioning/errors-typed.d.ts +10 -4
- package/dist/lib/server/decisioning/errors-typed.d.ts.map +1 -1
- package/dist/lib/server/decisioning/errors-typed.js +13 -29
- package/dist/lib/server/decisioning/errors-typed.js.map +1 -1
- package/dist/lib/server/decisioning/helpers.d.ts.map +1 -1
- package/dist/lib/server/decisioning/helpers.js +0 -2
- package/dist/lib/server/decisioning/helpers.js.map +1 -1
- package/dist/lib/server/decisioning/manifest-helpers.d.ts.map +1 -1
- package/dist/lib/server/decisioning/manifest-helpers.js +0 -2
- package/dist/lib/server/decisioning/manifest-helpers.js.map +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.js +0 -9
- package/dist/lib/server/decisioning/runtime/from-platform.js.map +1 -1
- package/dist/lib/server/decisioning/start-time.d.ts.map +1 -1
- package/dist/lib/server/decisioning/start-time.js +0 -2
- package/dist/lib/server/decisioning/start-time.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +107 -26
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/types/error-codes.d.ts +196 -9
- package/dist/lib/types/error-codes.d.ts.map +1 -1
- package/dist/lib/types/error-codes.js +104 -26
- package/dist/lib/types/error-codes.js.map +1 -1
- package/dist/lib/types/v2-5/index.d.ts +2 -0
- package/dist/lib/types/v2-5/index.d.ts.map +1 -0
- package/dist/lib/types/v2-5/index.js +30 -0
- package/dist/lib/types/v2-5/index.js.map +1 -0
- package/dist/lib/types/v2-5/tools.generated.d.ts +3507 -0
- package/dist/lib/types/v2-5/tools.generated.d.ts.map +1 -0
- package/dist/lib/types/v2-5/tools.generated.js +6 -0
- package/dist/lib/types/v2-5/tools.generated.js.map +1 -0
- package/dist/lib/utils/buyer-retry-policy.d.ts +136 -0
- package/dist/lib/utils/buyer-retry-policy.d.ts.map +1 -0
- package/dist/lib/utils/buyer-retry-policy.js +247 -0
- package/dist/lib/utils/buyer-retry-policy.js.map +1 -0
- package/dist/lib/utils/creative-adapter.d.ts +32 -2
- package/dist/lib/utils/creative-adapter.d.ts.map +1 -1
- package/dist/lib/utils/creative-adapter.js +42 -6
- package/dist/lib/utils/creative-adapter.js.map +1 -1
- package/dist/lib/utils/sync-creatives-adapter.d.ts +18 -8
- package/dist/lib/utils/sync-creatives-adapter.d.ts.map +1 -1
- package/dist/lib/utils/sync-creatives-adapter.js +70 -17
- package/dist/lib/utils/sync-creatives-adapter.js.map +1 -1
- package/dist/lib/validation/client-hooks.d.ts +13 -8
- package/dist/lib/validation/client-hooks.d.ts.map +1 -1
- package/dist/lib/validation/client-hooks.js +12 -12
- package/dist/lib/validation/client-hooks.js.map +1 -1
- package/dist/lib/validation/schema-loader.d.ts.map +1 -1
- package/dist/lib/validation/schema-loader.js +20 -2
- package/dist/lib/validation/schema-loader.js.map +1 -1
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/docs/guides/BUILD-AN-AGENT.md +2 -0
- package/docs/llms.txt +39 -22
- package/package.json +17 -5
- package/skills/build-seller-agent/SKILL.md +38 -5
- package/skills/build-seller-agent/specialisms/sales-guaranteed.md +4 -3
- package/skills/call-adcp-agent.previous/SKILL.md +83 -4
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Response-body byte cap enforcement for hostile-vendor protection.
|
|
3
|
+
//
|
|
4
|
+
// Wraps a base fetch with a streaming size counter so the SDK aborts large
|
|
5
|
+
// responses before any application-layer parsing buffers them. Active when
|
|
6
|
+
// `responseSizeLimitStorage` carries a slot — installed unconditionally as
|
|
7
|
+
// the innermost transport wrapper so production callers without the slot
|
|
8
|
+
// pay only one ALS lookup per request.
|
|
9
|
+
//
|
|
10
|
+
// The wrapper composes inside `wrapFetchWithCapture`: the diagnostic capture
|
|
11
|
+
// reads the size-limited body via `response.clone()`, so a hostile reply
|
|
12
|
+
// can't blow memory through the capture path either.
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.responseSizeLimitStorage = void 0;
|
|
15
|
+
exports.withResponseSizeLimit = withResponseSizeLimit;
|
|
16
|
+
exports.wrapFetchWithSizeLimit = wrapFetchWithSizeLimit;
|
|
17
|
+
const node_async_hooks_1 = require("node:async_hooks");
|
|
18
|
+
const errors_1 = require("../errors");
|
|
19
|
+
exports.responseSizeLimitStorage = new node_async_hooks_1.AsyncLocalStorage();
|
|
20
|
+
/**
|
|
21
|
+
* Run `fn` with a response body byte cap active. Every fetch made through
|
|
22
|
+
* a wrapped transport inside `fn` aborts with `ResponseTooLargeError` when
|
|
23
|
+
* the response body exceeds `maxResponseBytes`. Non-positive caps disable
|
|
24
|
+
* enforcement (ALS slot is not entered).
|
|
25
|
+
*/
|
|
26
|
+
function withResponseSizeLimit(maxResponseBytes, fn) {
|
|
27
|
+
if (!maxResponseBytes || !Number.isFinite(maxResponseBytes) || maxResponseBytes <= 0) {
|
|
28
|
+
return fn();
|
|
29
|
+
}
|
|
30
|
+
return exports.responseSizeLimitStorage.run({ maxResponseBytes }, fn);
|
|
31
|
+
}
|
|
32
|
+
function urlOfInput(input) {
|
|
33
|
+
if (typeof input === 'string')
|
|
34
|
+
return input;
|
|
35
|
+
if (input instanceof URL)
|
|
36
|
+
return input.toString();
|
|
37
|
+
return input.url;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Strip the search component from a URL before storing it on
|
|
41
|
+
* `ResponseTooLargeError`. Some agents publish manifests with auth tokens
|
|
42
|
+
* in the query string (`?api_key=…`); without redaction those land in
|
|
43
|
+
* `err.message`, `err.details.url`, and downstream log sinks.
|
|
44
|
+
*
|
|
45
|
+
* Returns the input unchanged when it can't be parsed (relative paths,
|
|
46
|
+
* non-URL inputs from custom test stubs) — the alternative is throwing,
|
|
47
|
+
* which would mask the original `ResponseTooLargeError`.
|
|
48
|
+
*/
|
|
49
|
+
function redactUrlForError(url) {
|
|
50
|
+
try {
|
|
51
|
+
const parsed = new URL(url);
|
|
52
|
+
parsed.search = '';
|
|
53
|
+
return parsed.toString();
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
return url;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Force `Accept-Encoding: identity` on outgoing requests when the size cap
|
|
61
|
+
* is active. Without this, undici sets `Accept-Encoding: gzip, deflate, br`
|
|
62
|
+
* by default and decompresses the body before our counter sees it — a
|
|
63
|
+
* hostile vendor can ship a 5 KB gzip blob that decompresses to GBs and
|
|
64
|
+
* costs the attacker nothing for asymmetric CPU burn before the cap fires.
|
|
65
|
+
* Forcing identity removes the asymmetry: the bomb has to be sent on the
|
|
66
|
+
* wire at full size, where `Content-Length` pre-check catches it.
|
|
67
|
+
*
|
|
68
|
+
* No-op when the caller already set their own `Accept-Encoding` (signing
|
|
69
|
+
* fetch may need a specific value to keep the signed bytes stable).
|
|
70
|
+
*/
|
|
71
|
+
function withIdentityEncoding(init) {
|
|
72
|
+
const headers = new Headers(init?.headers);
|
|
73
|
+
if (!headers.has('accept-encoding')) {
|
|
74
|
+
headers.set('accept-encoding', 'identity');
|
|
75
|
+
}
|
|
76
|
+
return { ...(init ?? {}), headers };
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Wrap a fetch implementation so its responses honor the size cap from the
|
|
80
|
+
* active `responseSizeLimitStorage` slot. Pass-through when no slot is set.
|
|
81
|
+
*
|
|
82
|
+
* Pre-checks `Content-Length` and refuses to read the body when the declared
|
|
83
|
+
* size already exceeds the cap. Otherwise wraps `Response.body` in a
|
|
84
|
+
* `TransformStream` that counts bytes and errors with `ResponseTooLargeError`
|
|
85
|
+
* at the cap boundary, propagating to anyone reading the response (including
|
|
86
|
+
* `Response.clone()` branches used by the diagnostic capture wrapper).
|
|
87
|
+
*/
|
|
88
|
+
function wrapFetchWithSizeLimit(upstream) {
|
|
89
|
+
const wrapped = async (input, init) => {
|
|
90
|
+
const slot = exports.responseSizeLimitStorage.getStore();
|
|
91
|
+
if (!slot)
|
|
92
|
+
return upstream(input, init);
|
|
93
|
+
const response = await upstream(input, withIdentityEncoding(init));
|
|
94
|
+
return enforceSizeLimit(response, slot.maxResponseBytes, redactUrlForError(urlOfInput(input)));
|
|
95
|
+
};
|
|
96
|
+
return wrapped;
|
|
97
|
+
}
|
|
98
|
+
function enforceSizeLimit(response, maxBytes, url) {
|
|
99
|
+
// Cheap pre-check: if the server declares a Content-Length over the cap,
|
|
100
|
+
// tear the connection down before reading any of the body. Servers can
|
|
101
|
+
// omit or lie about Content-Length, which is why the streaming counter
|
|
102
|
+
// below is the authoritative enforcement.
|
|
103
|
+
const declared = parseContentLength(response.headers.get('content-length'));
|
|
104
|
+
if (declared !== undefined && declared > maxBytes) {
|
|
105
|
+
// Best-effort cancel so the runtime can release the socket. We swallow
|
|
106
|
+
// any rejection because the typed `ResponseTooLargeError` below is the
|
|
107
|
+
// signal the caller acts on — a `cancel()` rejection here would only
|
|
108
|
+
// happen if the body stream is already errored / locked, in which case
|
|
109
|
+
// the socket is already on its way down and there's nothing to recover.
|
|
110
|
+
response.body?.cancel().catch(() => { });
|
|
111
|
+
throw new errors_1.ResponseTooLargeError(maxBytes, 0, url, declared);
|
|
112
|
+
}
|
|
113
|
+
if (!response.body)
|
|
114
|
+
return response;
|
|
115
|
+
let bytesRead = 0;
|
|
116
|
+
const counter = new TransformStream({
|
|
117
|
+
transform(chunk, controller) {
|
|
118
|
+
bytesRead += chunk.byteLength;
|
|
119
|
+
if (bytesRead > maxBytes) {
|
|
120
|
+
controller.error(new errors_1.ResponseTooLargeError(maxBytes, bytesRead, url));
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
controller.enqueue(chunk);
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
return new Response(response.body.pipeThrough(counter), {
|
|
127
|
+
status: response.status,
|
|
128
|
+
statusText: response.statusText,
|
|
129
|
+
headers: response.headers,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function parseContentLength(value) {
|
|
133
|
+
if (value === null)
|
|
134
|
+
return undefined;
|
|
135
|
+
const trimmed = value.trim();
|
|
136
|
+
if (!/^\d+$/.test(trimmed))
|
|
137
|
+
return undefined;
|
|
138
|
+
const parsed = Number(trimmed);
|
|
139
|
+
return Number.isFinite(parsed) ? parsed : undefined;
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=responseSizeLimit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responseSizeLimit.js","sourceRoot":"","sources":["../../../src/lib/protocols/responseSizeLimit.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source_repo": "adcontextprotocol/adcp",
|
|
3
|
+
"source_branch": "2.5-maintenance",
|
|
4
|
+
"source_sha": "4e553ad955f83b49c7d221ab5c3ff78237ad02e3",
|
|
5
|
+
"source_tarball_sha256": "580656d6466ef9f0d1119985e6726c2efea718dc671e2ad30957fcb2fd54af0f",
|
|
6
|
+
"upstream_adcp_version": "2.5.3",
|
|
7
|
+
"synced_at": "2026-05-01T11:46:06.203Z"
|
|
8
|
+
}
|
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "/schemas/adagents.json",
|
|
4
|
+
"title": "Authorized Sales Agents",
|
|
5
|
+
"description": "Declaration of authorized sales agents for advertising inventory. Hosted at /.well-known/adagents.json on publisher domains. Can either contain the full structure inline or reference an authoritative URL.",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{
|
|
8
|
+
"type": "object",
|
|
9
|
+
"description": "URL reference variant - points to the authoritative location of the adagents.json file",
|
|
10
|
+
"properties": {
|
|
11
|
+
"$schema": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "JSON Schema identifier for this adagents.json file"
|
|
14
|
+
},
|
|
15
|
+
"authoritative_location": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"format": "uri",
|
|
18
|
+
"pattern": "^https://",
|
|
19
|
+
"description": "HTTPS URL of the authoritative adagents.json file. When present, this file is a reference and the authoritative location contains the actual agent authorization data."
|
|
20
|
+
},
|
|
21
|
+
"last_updated": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"format": "date-time",
|
|
24
|
+
"description": "ISO 8601 timestamp indicating when this reference was last updated"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"required": [
|
|
28
|
+
"authoritative_location"
|
|
29
|
+
],
|
|
30
|
+
"additionalProperties": true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "object",
|
|
34
|
+
"description": "Inline structure variant - contains full agent authorization data",
|
|
35
|
+
"properties": {
|
|
36
|
+
"$schema": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "JSON Schema identifier for this adagents.json file"
|
|
39
|
+
},
|
|
40
|
+
"contact": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"description": "Contact information for the entity managing this adagents.json file (may be publisher or third-party operator)",
|
|
43
|
+
"properties": {
|
|
44
|
+
"name": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "Name of the entity managing this file (e.g., 'Meta Advertising Operations', 'Clear Channel Digital')",
|
|
47
|
+
"minLength": 1,
|
|
48
|
+
"maxLength": 255
|
|
49
|
+
},
|
|
50
|
+
"email": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"format": "email",
|
|
53
|
+
"description": "Contact email for questions or issues with this authorization file",
|
|
54
|
+
"minLength": 1,
|
|
55
|
+
"maxLength": 255
|
|
56
|
+
},
|
|
57
|
+
"domain": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"description": "Primary domain of the entity managing this file",
|
|
60
|
+
"pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$"
|
|
61
|
+
},
|
|
62
|
+
"seller_id": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "Seller ID from IAB Tech Lab sellers.json (if applicable)",
|
|
65
|
+
"minLength": 1,
|
|
66
|
+
"maxLength": 255
|
|
67
|
+
},
|
|
68
|
+
"tag_id": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"description": "TAG Certified Against Fraud ID for verification (if applicable)",
|
|
71
|
+
"minLength": 1,
|
|
72
|
+
"maxLength": 100
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"required": [
|
|
76
|
+
"name"
|
|
77
|
+
],
|
|
78
|
+
"additionalProperties": true
|
|
79
|
+
},
|
|
80
|
+
"properties": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"description": "Array of all properties covered by this adagents.json file. Defines the canonical property list that authorized agents reference.",
|
|
83
|
+
"items": {
|
|
84
|
+
"$ref": "/schemas/core/property.json"
|
|
85
|
+
},
|
|
86
|
+
"minItems": 1
|
|
87
|
+
},
|
|
88
|
+
"tags": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"description": "Metadata for each tag referenced by properties. Provides human-readable context for property tag values.",
|
|
91
|
+
"additionalProperties": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"properties": {
|
|
94
|
+
"name": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"description": "Human-readable name for this tag"
|
|
97
|
+
},
|
|
98
|
+
"description": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"description": "Description of what this tag represents"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"required": [
|
|
104
|
+
"name",
|
|
105
|
+
"description"
|
|
106
|
+
],
|
|
107
|
+
"additionalProperties": true
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"authorized_agents": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"description": "Array of sales agents authorized to sell inventory for properties in this file",
|
|
113
|
+
"items": {
|
|
114
|
+
"oneOf": [
|
|
115
|
+
{
|
|
116
|
+
"type": "object",
|
|
117
|
+
"properties": {
|
|
118
|
+
"url": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"format": "uri",
|
|
121
|
+
"description": "The authorized agent's API endpoint URL"
|
|
122
|
+
},
|
|
123
|
+
"authorized_for": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"description": "Human-readable description of what this agent is authorized to sell",
|
|
126
|
+
"minLength": 1,
|
|
127
|
+
"maxLength": 500
|
|
128
|
+
},
|
|
129
|
+
"authorization_type": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"const": "property_ids",
|
|
132
|
+
"description": "Discriminator indicating authorization by specific property IDs"
|
|
133
|
+
},
|
|
134
|
+
"property_ids": {
|
|
135
|
+
"type": "array",
|
|
136
|
+
"description": "Property IDs this agent is authorized for. Resolved against the top-level properties array in this file",
|
|
137
|
+
"items": {
|
|
138
|
+
"$ref": "/schemas/core/property-id.json"
|
|
139
|
+
},
|
|
140
|
+
"minItems": 1
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"required": [
|
|
144
|
+
"url",
|
|
145
|
+
"authorized_for",
|
|
146
|
+
"authorization_type",
|
|
147
|
+
"property_ids"
|
|
148
|
+
],
|
|
149
|
+
"additionalProperties": true
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"type": "object",
|
|
153
|
+
"properties": {
|
|
154
|
+
"url": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"format": "uri",
|
|
157
|
+
"description": "The authorized agent's API endpoint URL"
|
|
158
|
+
},
|
|
159
|
+
"authorized_for": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"description": "Human-readable description of what this agent is authorized to sell",
|
|
162
|
+
"minLength": 1,
|
|
163
|
+
"maxLength": 500
|
|
164
|
+
},
|
|
165
|
+
"authorization_type": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"const": "property_tags",
|
|
168
|
+
"description": "Discriminator indicating authorization by property tags"
|
|
169
|
+
},
|
|
170
|
+
"property_tags": {
|
|
171
|
+
"type": "array",
|
|
172
|
+
"description": "Tags identifying which properties this agent is authorized for. Resolved against the top-level properties array in this file using tag matching",
|
|
173
|
+
"items": {
|
|
174
|
+
"$ref": "/schemas/core/property-tag.json"
|
|
175
|
+
},
|
|
176
|
+
"minItems": 1
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"required": [
|
|
180
|
+
"url",
|
|
181
|
+
"authorized_for",
|
|
182
|
+
"authorization_type",
|
|
183
|
+
"property_tags"
|
|
184
|
+
],
|
|
185
|
+
"additionalProperties": true
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"type": "object",
|
|
189
|
+
"properties": {
|
|
190
|
+
"url": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"format": "uri",
|
|
193
|
+
"description": "The authorized agent's API endpoint URL"
|
|
194
|
+
},
|
|
195
|
+
"authorized_for": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"description": "Human-readable description of what this agent is authorized to sell",
|
|
198
|
+
"minLength": 1,
|
|
199
|
+
"maxLength": 500
|
|
200
|
+
},
|
|
201
|
+
"authorization_type": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"const": "inline_properties",
|
|
204
|
+
"description": "Discriminator indicating authorization by inline property definitions"
|
|
205
|
+
},
|
|
206
|
+
"properties": {
|
|
207
|
+
"type": "array",
|
|
208
|
+
"description": "Specific properties this agent is authorized for (alternative to property_ids/property_tags)",
|
|
209
|
+
"items": {
|
|
210
|
+
"$ref": "/schemas/core/property.json"
|
|
211
|
+
},
|
|
212
|
+
"minItems": 1
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"required": [
|
|
216
|
+
"url",
|
|
217
|
+
"authorized_for",
|
|
218
|
+
"authorization_type",
|
|
219
|
+
"properties"
|
|
220
|
+
],
|
|
221
|
+
"additionalProperties": true
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"type": "object",
|
|
225
|
+
"properties": {
|
|
226
|
+
"url": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"format": "uri",
|
|
229
|
+
"description": "The authorized agent's API endpoint URL"
|
|
230
|
+
},
|
|
231
|
+
"authorized_for": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"description": "Human-readable description of what this agent is authorized to sell",
|
|
234
|
+
"minLength": 1,
|
|
235
|
+
"maxLength": 500
|
|
236
|
+
},
|
|
237
|
+
"authorization_type": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"const": "publisher_properties",
|
|
240
|
+
"description": "Discriminator indicating authorization for properties from other publisher domains"
|
|
241
|
+
},
|
|
242
|
+
"publisher_properties": {
|
|
243
|
+
"type": "array",
|
|
244
|
+
"description": "Properties from other publisher domains this agent is authorized for. Each entry specifies a publisher domain and which of their properties this agent can sell",
|
|
245
|
+
"items": {
|
|
246
|
+
"$ref": "/schemas/core/publisher-property-selector.json"
|
|
247
|
+
},
|
|
248
|
+
"minItems": 1
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"required": [
|
|
252
|
+
"url",
|
|
253
|
+
"authorized_for",
|
|
254
|
+
"authorization_type",
|
|
255
|
+
"publisher_properties"
|
|
256
|
+
],
|
|
257
|
+
"additionalProperties": true
|
|
258
|
+
}
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
"minItems": 1
|
|
262
|
+
},
|
|
263
|
+
"last_updated": {
|
|
264
|
+
"type": "string",
|
|
265
|
+
"format": "date-time",
|
|
266
|
+
"description": "ISO 8601 timestamp indicating when this file was last updated"
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"required": [
|
|
270
|
+
"authorized_agents"
|
|
271
|
+
],
|
|
272
|
+
"additionalProperties": true
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"examples": [
|
|
276
|
+
{
|
|
277
|
+
"$schema": "/schemas/adagents.json",
|
|
278
|
+
"authoritative_location": "https://cdn.example.com/adagents/v2/adagents.json",
|
|
279
|
+
"last_updated": "2025-01-15T10:00:00Z"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"$schema": "/schemas/adagents.json",
|
|
283
|
+
"properties": [
|
|
284
|
+
{
|
|
285
|
+
"property_type": "website",
|
|
286
|
+
"name": "Example Site",
|
|
287
|
+
"identifiers": [
|
|
288
|
+
{
|
|
289
|
+
"type": "domain",
|
|
290
|
+
"value": "example.com"
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
"publisher_domain": "example.com"
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
"authorized_agents": [
|
|
297
|
+
{
|
|
298
|
+
"url": "https://agent.example.com",
|
|
299
|
+
"authorized_for": "Official sales agent",
|
|
300
|
+
"authorization_type": "property_tags",
|
|
301
|
+
"property_tags": [
|
|
302
|
+
"all"
|
|
303
|
+
]
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
"tags": {
|
|
307
|
+
"all": {
|
|
308
|
+
"name": "All Properties",
|
|
309
|
+
"description": "All properties in this file"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"last_updated": "2025-01-10T12:00:00Z"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"$schema": "/schemas/adagents.json",
|
|
316
|
+
"contact": {
|
|
317
|
+
"name": "Meta Advertising Operations",
|
|
318
|
+
"email": "adops@meta.com",
|
|
319
|
+
"domain": "meta.com",
|
|
320
|
+
"seller_id": "pub-meta-12345",
|
|
321
|
+
"tag_id": "12345"
|
|
322
|
+
},
|
|
323
|
+
"properties": [
|
|
324
|
+
{
|
|
325
|
+
"property_type": "mobile_app",
|
|
326
|
+
"name": "Instagram",
|
|
327
|
+
"identifiers": [
|
|
328
|
+
{
|
|
329
|
+
"type": "ios_bundle",
|
|
330
|
+
"value": "com.burbn.instagram"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"type": "android_package",
|
|
334
|
+
"value": "com.instagram.android"
|
|
335
|
+
}
|
|
336
|
+
],
|
|
337
|
+
"tags": [
|
|
338
|
+
"meta_network",
|
|
339
|
+
"social_media"
|
|
340
|
+
],
|
|
341
|
+
"publisher_domain": "instagram.com"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"property_type": "mobile_app",
|
|
345
|
+
"name": "Facebook",
|
|
346
|
+
"identifiers": [
|
|
347
|
+
{
|
|
348
|
+
"type": "ios_bundle",
|
|
349
|
+
"value": "com.facebook.Facebook"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"type": "android_package",
|
|
353
|
+
"value": "com.facebook.katana"
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
"tags": [
|
|
357
|
+
"meta_network",
|
|
358
|
+
"social_media"
|
|
359
|
+
],
|
|
360
|
+
"publisher_domain": "facebook.com"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"property_type": "mobile_app",
|
|
364
|
+
"name": "WhatsApp",
|
|
365
|
+
"identifiers": [
|
|
366
|
+
{
|
|
367
|
+
"type": "ios_bundle",
|
|
368
|
+
"value": "net.whatsapp.WhatsApp"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"type": "android_package",
|
|
372
|
+
"value": "com.whatsapp"
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
"tags": [
|
|
376
|
+
"meta_network",
|
|
377
|
+
"messaging"
|
|
378
|
+
],
|
|
379
|
+
"publisher_domain": "whatsapp.com"
|
|
380
|
+
}
|
|
381
|
+
],
|
|
382
|
+
"tags": {
|
|
383
|
+
"meta_network": {
|
|
384
|
+
"name": "Meta Network",
|
|
385
|
+
"description": "All Meta-owned properties"
|
|
386
|
+
},
|
|
387
|
+
"social_media": {
|
|
388
|
+
"name": "Social Media Apps",
|
|
389
|
+
"description": "Social networking applications"
|
|
390
|
+
},
|
|
391
|
+
"messaging": {
|
|
392
|
+
"name": "Messaging Apps",
|
|
393
|
+
"description": "Messaging and communication apps"
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
"authorized_agents": [
|
|
397
|
+
{
|
|
398
|
+
"url": "https://meta-ads.com",
|
|
399
|
+
"authorized_for": "All Meta properties",
|
|
400
|
+
"authorization_type": "property_tags",
|
|
401
|
+
"property_tags": [
|
|
402
|
+
"meta_network"
|
|
403
|
+
]
|
|
404
|
+
}
|
|
405
|
+
],
|
|
406
|
+
"last_updated": "2025-01-10T15:30:00Z"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"$schema": "/schemas/adagents.json",
|
|
410
|
+
"contact": {
|
|
411
|
+
"name": "Tumblr Advertising"
|
|
412
|
+
},
|
|
413
|
+
"properties": [
|
|
414
|
+
{
|
|
415
|
+
"property_type": "website",
|
|
416
|
+
"name": "Tumblr Corporate",
|
|
417
|
+
"identifiers": [
|
|
418
|
+
{
|
|
419
|
+
"type": "domain",
|
|
420
|
+
"value": "tumblr.com"
|
|
421
|
+
}
|
|
422
|
+
],
|
|
423
|
+
"tags": [
|
|
424
|
+
"corporate"
|
|
425
|
+
],
|
|
426
|
+
"publisher_domain": "tumblr.com"
|
|
427
|
+
}
|
|
428
|
+
],
|
|
429
|
+
"tags": {
|
|
430
|
+
"corporate": {
|
|
431
|
+
"name": "Corporate Properties",
|
|
432
|
+
"description": "Tumblr-owned corporate properties (not user blogs)"
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
"authorized_agents": [
|
|
436
|
+
{
|
|
437
|
+
"url": "https://tumblr-sales.com",
|
|
438
|
+
"authorized_for": "Tumblr corporate properties only",
|
|
439
|
+
"authorization_type": "property_tags",
|
|
440
|
+
"property_tags": [
|
|
441
|
+
"corporate"
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
"last_updated": "2025-01-10T16:00:00Z"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"$schema": "/schemas/adagents.json",
|
|
449
|
+
"contact": {
|
|
450
|
+
"name": "Example Third-Party Sales Agent",
|
|
451
|
+
"email": "sales@agent.example",
|
|
452
|
+
"domain": "agent.example"
|
|
453
|
+
},
|
|
454
|
+
"authorized_agents": [
|
|
455
|
+
{
|
|
456
|
+
"url": "https://agent.example/api",
|
|
457
|
+
"authorized_for": "CNN CTV properties via publisher authorization",
|
|
458
|
+
"authorization_type": "publisher_properties",
|
|
459
|
+
"publisher_properties": [
|
|
460
|
+
{
|
|
461
|
+
"publisher_domain": "cnn.com",
|
|
462
|
+
"selection_type": "by_id",
|
|
463
|
+
"property_ids": [
|
|
464
|
+
"cnn_ctv_app"
|
|
465
|
+
]
|
|
466
|
+
}
|
|
467
|
+
]
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"url": "https://agent.example/api",
|
|
471
|
+
"authorized_for": "All CTV properties from multiple publishers",
|
|
472
|
+
"authorization_type": "publisher_properties",
|
|
473
|
+
"publisher_properties": [
|
|
474
|
+
{
|
|
475
|
+
"publisher_domain": "cnn.com",
|
|
476
|
+
"selection_type": "by_tag",
|
|
477
|
+
"property_tags": [
|
|
478
|
+
"ctv"
|
|
479
|
+
]
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"publisher_domain": "espn.com",
|
|
483
|
+
"selection_type": "by_tag",
|
|
484
|
+
"property_tags": [
|
|
485
|
+
"ctv"
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
]
|
|
489
|
+
}
|
|
490
|
+
],
|
|
491
|
+
"last_updated": "2025-01-10T17:00:00Z"
|
|
492
|
+
}
|
|
493
|
+
]
|
|
494
|
+
}
|