adcp 2.18.0__py3-none-any.whl → 3.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. adcp/ADCP_VERSION +1 -1
  2. adcp/__init__.py +6 -14
  3. adcp/__main__.py +94 -51
  4. adcp/adagents.py +91 -19
  5. adcp/client.py +865 -0
  6. adcp/protocols/a2a.py +84 -0
  7. adcp/protocols/base.py +101 -0
  8. adcp/protocols/mcp.py +87 -1
  9. adcp/server/__init__.py +49 -0
  10. adcp/server/base.py +368 -0
  11. adcp/server/content_standards.py +561 -0
  12. adcp/server/governance.py +491 -0
  13. adcp/server/mcp_tools.py +471 -0
  14. adcp/server/proposal.py +334 -0
  15. adcp/server/sponsored_intelligence.py +444 -0
  16. adcp/types/__init__.py +111 -23
  17. adcp/types/_ergonomic.py +35 -18
  18. adcp/types/_generated.py +419 -44
  19. adcp/types/aliases.py +13 -20
  20. adcp/types/base.py +1 -1
  21. adcp/types/generated_poc/adagents.py +103 -6
  22. adcp/types/generated_poc/content_standards/__init__.py +3 -0
  23. adcp/types/generated_poc/content_standards/artifact.py +208 -0
  24. adcp/types/generated_poc/content_standards/artifact_webhook_payload.py +64 -0
  25. adcp/types/generated_poc/content_standards/calibrate_content_request.py +17 -0
  26. adcp/types/generated_poc/content_standards/calibrate_content_response.py +74 -0
  27. adcp/types/generated_poc/content_standards/content_standards.py +66 -0
  28. adcp/types/generated_poc/content_standards/create_content_standards_request.py +97 -0
  29. adcp/types/generated_poc/content_standards/create_content_standards_response.py +52 -0
  30. adcp/types/generated_poc/content_standards/get_content_standards_request.py +21 -0
  31. adcp/types/generated_poc/content_standards/get_content_standards_response.py +43 -0
  32. adcp/types/generated_poc/content_standards/get_media_buy_artifacts_request.py +64 -0
  33. adcp/types/generated_poc/content_standards/get_media_buy_artifacts_response.py +117 -0
  34. adcp/types/generated_poc/content_standards/list_content_standards_request.py +31 -0
  35. adcp/types/generated_poc/content_standards/list_content_standards_response.py +48 -0
  36. adcp/types/generated_poc/content_standards/update_content_standards_request.py +101 -0
  37. adcp/types/generated_poc/content_standards/update_content_standards_response.py +34 -0
  38. adcp/types/generated_poc/content_standards/validate_content_delivery_request.py +59 -0
  39. adcp/types/generated_poc/content_standards/validate_content_delivery_response.py +85 -0
  40. adcp/types/generated_poc/core/activation_key.py +1 -1
  41. adcp/types/generated_poc/core/assets/audio_asset.py +1 -1
  42. adcp/types/generated_poc/core/assets/css_asset.py +1 -1
  43. adcp/types/generated_poc/core/assets/daast_asset.py +1 -1
  44. adcp/types/generated_poc/core/assets/html_asset.py +1 -1
  45. adcp/types/generated_poc/core/assets/image_asset.py +1 -1
  46. adcp/types/generated_poc/core/assets/javascript_asset.py +1 -1
  47. adcp/types/generated_poc/core/assets/text_asset.py +1 -1
  48. adcp/types/generated_poc/core/assets/url_asset.py +1 -1
  49. adcp/types/generated_poc/core/assets/vast_asset.py +1 -1
  50. adcp/types/generated_poc/core/assets/video_asset.py +1 -1
  51. adcp/types/generated_poc/core/assets/webhook_asset.py +1 -1
  52. adcp/types/generated_poc/core/async_response_data.py +1 -1
  53. adcp/types/generated_poc/core/brand_manifest.py +68 -5
  54. adcp/types/generated_poc/core/brand_manifest_ref.py +1 -1
  55. adcp/types/generated_poc/core/context.py +1 -1
  56. adcp/types/generated_poc/core/creative_asset.py +8 -7
  57. adcp/types/generated_poc/core/creative_assignment.py +1 -1
  58. adcp/types/generated_poc/core/creative_filters.py +4 -14
  59. adcp/types/generated_poc/core/creative_manifest.py +1 -1
  60. adcp/types/generated_poc/core/creative_policy.py +1 -1
  61. adcp/types/generated_poc/core/delivery_metrics.py +1 -1
  62. adcp/types/generated_poc/core/deployment.py +1 -1
  63. adcp/types/generated_poc/core/destination.py +1 -1
  64. adcp/types/generated_poc/core/error.py +1 -1
  65. adcp/types/generated_poc/core/ext.py +1 -1
  66. adcp/types/generated_poc/core/format.py +6 -5
  67. adcp/types/generated_poc/core/format_id.py +1 -1
  68. adcp/types/generated_poc/core/frequency_cap.py +1 -1
  69. adcp/types/generated_poc/core/identifier.py +27 -0
  70. adcp/types/generated_poc/core/mcp_webhook_payload.py +1 -1
  71. adcp/types/generated_poc/core/measurement.py +1 -1
  72. adcp/types/generated_poc/core/media_buy.py +1 -1
  73. adcp/types/generated_poc/core/media_buy_features.py +29 -0
  74. adcp/types/generated_poc/core/offering.py +80 -0
  75. adcp/types/generated_poc/core/package.py +1 -1
  76. adcp/types/generated_poc/core/performance_feedback.py +1 -1
  77. adcp/types/generated_poc/core/placement.py +1 -1
  78. adcp/types/generated_poc/core/pricing_option.py +8 -14
  79. adcp/types/generated_poc/core/product.py +1 -1
  80. adcp/types/generated_poc/core/product_allocation.py +48 -0
  81. adcp/types/generated_poc/core/product_filters.py +72 -7
  82. adcp/types/generated_poc/core/promoted_offerings.py +12 -21
  83. adcp/types/generated_poc/core/promoted_products.py +1 -1
  84. adcp/types/generated_poc/core/property.py +1 -1
  85. adcp/types/generated_poc/core/property_id.py +1 -1
  86. adcp/types/generated_poc/core/property_list_ref.py +26 -0
  87. adcp/types/generated_poc/core/property_tag.py +1 -1
  88. adcp/types/generated_poc/core/proposal.py +64 -0
  89. adcp/types/generated_poc/core/protocol_envelope.py +1 -1
  90. adcp/types/generated_poc/core/publisher_property_selector.py +1 -1
  91. adcp/types/generated_poc/core/push_notification_config.py +1 -1
  92. adcp/types/generated_poc/core/reporting_capabilities.py +1 -1
  93. adcp/types/generated_poc/core/reporting_webhook.py +70 -0
  94. adcp/types/generated_poc/core/response.py +1 -1
  95. adcp/types/generated_poc/core/signal_filters.py +1 -1
  96. adcp/types/generated_poc/core/start_timing.py +4 -4
  97. adcp/types/generated_poc/core/sub_asset.py +1 -1
  98. adcp/types/generated_poc/core/targeting.py +55 -14
  99. adcp/types/generated_poc/creative/list_creative_formats_request.py +1 -1
  100. adcp/types/generated_poc/creative/list_creative_formats_response.py +1 -1
  101. adcp/types/generated_poc/creative/preview_creative_request.py +1 -1
  102. adcp/types/generated_poc/creative/preview_creative_response.py +3 -2
  103. adcp/types/generated_poc/creative/preview_render.py +1 -1
  104. adcp/types/generated_poc/enums/adcp_domain.py +3 -1
  105. adcp/types/generated_poc/enums/asset_content_type.py +1 -1
  106. adcp/types/generated_poc/enums/auth_scheme.py +1 -1
  107. adcp/types/generated_poc/enums/available_metric.py +1 -1
  108. adcp/types/generated_poc/enums/channels.py +18 -8
  109. adcp/types/generated_poc/enums/co_branding_requirement.py +1 -1
  110. adcp/types/generated_poc/enums/creative_action.py +1 -1
  111. adcp/types/generated_poc/enums/creative_agent_capability.py +1 -1
  112. adcp/types/generated_poc/enums/creative_sort_field.py +1 -1
  113. adcp/types/generated_poc/enums/creative_status.py +2 -1
  114. adcp/types/generated_poc/enums/daast_tracking_event.py +1 -1
  115. adcp/types/generated_poc/enums/daast_version.py +1 -1
  116. adcp/types/generated_poc/enums/delivery_type.py +1 -1
  117. adcp/types/generated_poc/enums/dimension_unit.py +1 -1
  118. adcp/types/generated_poc/enums/feed_format.py +1 -1
  119. adcp/types/generated_poc/enums/feedback_source.py +1 -1
  120. adcp/types/generated_poc/enums/format_category.py +1 -1
  121. adcp/types/generated_poc/enums/format_id_parameter.py +1 -1
  122. adcp/types/generated_poc/enums/frequency_cap_scope.py +1 -1
  123. adcp/types/generated_poc/enums/geo_level.py +14 -0
  124. adcp/types/generated_poc/enums/history_entry_type.py +1 -1
  125. adcp/types/generated_poc/enums/http_method.py +1 -1
  126. adcp/types/generated_poc/enums/identifier_types.py +1 -1
  127. adcp/types/generated_poc/enums/javascript_module_type.py +1 -1
  128. adcp/types/generated_poc/enums/landing_page_requirement.py +1 -1
  129. adcp/types/generated_poc/enums/markdown_flavor.py +1 -1
  130. adcp/types/generated_poc/enums/media_buy_status.py +1 -1
  131. adcp/types/generated_poc/enums/metric_type.py +1 -1
  132. adcp/types/generated_poc/enums/metro_system.py +15 -0
  133. adcp/types/generated_poc/enums/notification_type.py +1 -1
  134. adcp/types/generated_poc/enums/pacing.py +1 -1
  135. adcp/types/generated_poc/enums/postal_system.py +19 -0
  136. adcp/types/generated_poc/enums/preview_output_format.py +1 -1
  137. adcp/types/generated_poc/enums/pricing_model.py +1 -1
  138. adcp/types/generated_poc/enums/property_type.py +2 -1
  139. adcp/types/generated_poc/enums/publisher_identifier_types.py +1 -1
  140. adcp/types/generated_poc/enums/reporting_frequency.py +1 -1
  141. adcp/types/generated_poc/enums/signal_catalog_type.py +1 -1
  142. adcp/types/generated_poc/enums/sort_direction.py +1 -1
  143. adcp/types/generated_poc/enums/task_status.py +1 -1
  144. adcp/types/generated_poc/enums/task_type.py +7 -1
  145. adcp/types/generated_poc/enums/update_frequency.py +1 -1
  146. adcp/types/generated_poc/enums/url_asset_type.py +1 -1
  147. adcp/types/generated_poc/enums/validation_mode.py +1 -1
  148. adcp/types/generated_poc/enums/vast_tracking_event.py +1 -1
  149. adcp/types/generated_poc/enums/vast_version.py +1 -1
  150. adcp/types/generated_poc/enums/webhook_response_type.py +1 -1
  151. adcp/types/generated_poc/enums/webhook_security_method.py +1 -1
  152. adcp/types/generated_poc/extensions/__init__.py +3 -0
  153. adcp/types/generated_poc/extensions/extension_meta.py +58 -0
  154. adcp/types/generated_poc/media_buy/build_creative_request.py +1 -1
  155. adcp/types/generated_poc/media_buy/build_creative_response.py +1 -1
  156. adcp/types/generated_poc/media_buy/create_media_buy_async_response_input_required.py +1 -1
  157. adcp/types/generated_poc/media_buy/create_media_buy_async_response_submitted.py +1 -1
  158. adcp/types/generated_poc/media_buy/create_media_buy_async_response_working.py +1 -1
  159. adcp/types/generated_poc/media_buy/create_media_buy_request.py +54 -26
  160. adcp/types/generated_poc/media_buy/create_media_buy_response.py +1 -1
  161. adcp/types/generated_poc/media_buy/get_media_buy_delivery_request.py +1 -1
  162. adcp/types/generated_poc/media_buy/get_media_buy_delivery_response.py +1 -1
  163. adcp/types/generated_poc/media_buy/get_products_async_response_input_required.py +1 -1
  164. adcp/types/generated_poc/media_buy/get_products_async_response_submitted.py +1 -1
  165. adcp/types/generated_poc/media_buy/get_products_async_response_working.py +1 -1
  166. adcp/types/generated_poc/media_buy/get_products_request.py +18 -3
  167. adcp/types/generated_poc/media_buy/get_products_response.py +14 -2
  168. adcp/types/generated_poc/media_buy/list_authorized_properties_request.py +1 -1
  169. adcp/types/generated_poc/media_buy/list_authorized_properties_response.py +2 -2
  170. adcp/types/generated_poc/media_buy/list_creative_formats_request.py +1 -1
  171. adcp/types/generated_poc/media_buy/list_creative_formats_response.py +1 -1
  172. adcp/types/generated_poc/media_buy/list_creatives_request.py +2 -2
  173. adcp/types/generated_poc/media_buy/list_creatives_response.py +7 -10
  174. adcp/types/generated_poc/media_buy/package_request.py +15 -6
  175. adcp/types/generated_poc/media_buy/package_update.py +119 -0
  176. adcp/types/generated_poc/media_buy/provide_performance_feedback_request.py +1 -1
  177. adcp/types/generated_poc/media_buy/provide_performance_feedback_response.py +1 -1
  178. adcp/types/generated_poc/media_buy/sync_creatives_async_response_input_required.py +1 -1
  179. adcp/types/generated_poc/media_buy/sync_creatives_async_response_submitted.py +1 -1
  180. adcp/types/generated_poc/media_buy/sync_creatives_async_response_working.py +1 -1
  181. adcp/types/generated_poc/media_buy/sync_creatives_request.py +1 -1
  182. adcp/types/generated_poc/media_buy/sync_creatives_response.py +1 -1
  183. adcp/types/generated_poc/media_buy/update_media_buy_async_response_input_required.py +1 -1
  184. adcp/types/generated_poc/media_buy/update_media_buy_async_response_submitted.py +1 -1
  185. adcp/types/generated_poc/media_buy/update_media_buy_async_response_working.py +1 -1
  186. adcp/types/generated_poc/media_buy/update_media_buy_request.py +20 -108
  187. adcp/types/generated_poc/media_buy/update_media_buy_response.py +1 -1
  188. adcp/types/generated_poc/pricing_options/cpc_option.py +35 -10
  189. adcp/types/generated_poc/pricing_options/cpcv_option.py +35 -10
  190. adcp/types/generated_poc/pricing_options/{cpm_auction_option.py → cpm_option.py} +23 -19
  191. adcp/types/generated_poc/pricing_options/cpp_option.py +39 -16
  192. adcp/types/generated_poc/pricing_options/cpv_option.py +37 -18
  193. adcp/types/generated_poc/pricing_options/flat_rate_option.py +45 -39
  194. adcp/types/generated_poc/pricing_options/{vcpm_auction_option.py → vcpm_option.py} +23 -14
  195. adcp/types/generated_poc/property/__init__.py +3 -0
  196. adcp/types/generated_poc/property/base_property_source.py +86 -0
  197. adcp/types/generated_poc/property/create_property_list_request.py +43 -0
  198. adcp/types/generated_poc/property/create_property_list_response.py +27 -0
  199. adcp/types/generated_poc/property/delete_property_list_request.py +22 -0
  200. adcp/types/generated_poc/property/delete_property_list_response.py +21 -0
  201. adcp/types/generated_poc/property/feature_requirement.py +42 -0
  202. adcp/types/generated_poc/property/get_property_list_request.py +34 -0
  203. adcp/types/generated_poc/property/get_property_list_response.py +61 -0
  204. adcp/types/generated_poc/property/list_property_lists_request.py +29 -0
  205. adcp/types/generated_poc/property/list_property_lists_response.py +39 -0
  206. adcp/types/generated_poc/property/property_error.py +33 -0
  207. adcp/types/generated_poc/property/property_feature.py +22 -0
  208. adcp/types/generated_poc/property/property_feature_definition.py +80 -0
  209. adcp/types/generated_poc/property/property_list.py +62 -0
  210. adcp/types/generated_poc/property/property_list_changed_webhook.py +51 -0
  211. adcp/types/generated_poc/property/property_list_filters.py +47 -0
  212. adcp/types/generated_poc/property/update_property_list_request.py +46 -0
  213. adcp/types/generated_poc/property/update_property_list_response.py +21 -0
  214. adcp/types/generated_poc/protocol/__init__.py +3 -0
  215. adcp/types/generated_poc/protocol/get_adcp_capabilities_request.py +34 -0
  216. adcp/types/generated_poc/protocol/get_adcp_capabilities_response.py +353 -0
  217. adcp/types/generated_poc/protocols/adcp_extension.py +18 -5
  218. adcp/types/generated_poc/signals/activate_signal_request.py +1 -1
  219. adcp/types/generated_poc/signals/activate_signal_response.py +1 -1
  220. adcp/types/generated_poc/signals/get_signals_request.py +1 -1
  221. adcp/types/generated_poc/signals/get_signals_response.py +1 -1
  222. adcp/types/generated_poc/sponsored_intelligence/__init__.py +3 -0
  223. adcp/types/generated_poc/sponsored_intelligence/si_capabilities.py +102 -0
  224. adcp/types/generated_poc/sponsored_intelligence/si_get_offering_request.py +34 -0
  225. adcp/types/generated_poc/sponsored_intelligence/si_get_offering_response.py +100 -0
  226. adcp/types/generated_poc/sponsored_intelligence/si_identity.py +78 -0
  227. adcp/types/generated_poc/sponsored_intelligence/si_initiate_session_request.py +46 -0
  228. adcp/types/generated_poc/sponsored_intelligence/si_initiate_session_response.py +44 -0
  229. adcp/types/generated_poc/sponsored_intelligence/si_send_message_request.py +58 -0
  230. adcp/types/generated_poc/sponsored_intelligence/si_send_message_response.py +101 -0
  231. adcp/types/generated_poc/sponsored_intelligence/si_terminate_session_request.py +60 -0
  232. adcp/types/generated_poc/sponsored_intelligence/si_terminate_session_response.py +54 -0
  233. adcp/types/generated_poc/sponsored_intelligence/si_ui_element.py +30 -0
  234. adcp/utils/format_assets.py +5 -5
  235. adcp/utils/preview_cache.py +2 -2
  236. {adcp-2.18.0.dist-info → adcp-3.0.0.dist-info}/METADATA +1 -1
  237. adcp-3.0.0.dist-info/RECORD +264 -0
  238. {adcp-2.18.0.dist-info → adcp-3.0.0.dist-info}/WHEEL +1 -1
  239. adcp/types/generated_poc/enums/standard_format_ids.py +0 -45
  240. adcp/types/generated_poc/pricing_options/cpm_fixed_option.py +0 -43
  241. adcp/types/generated_poc/pricing_options/vcpm_fixed_option.py +0 -47
  242. adcp-2.18.0.dist-info/RECORD +0 -195
  243. {adcp-2.18.0.dist-info → adcp-3.0.0.dist-info}/entry_points.txt +0 -0
  244. {adcp-2.18.0.dist-info → adcp-3.0.0.dist-info}/licenses/LICENSE +0 -0
  245. {adcp-2.18.0.dist-info → adcp-3.0.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,561 @@
1
+ """Content Standards protocol handler.
2
+
3
+ Provides a base class for implementing Content Standards agents.
4
+ Non-Content-Standards operations return 'not supported' by default.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from abc import abstractmethod
10
+ from typing import Any
11
+
12
+ from pydantic import ValidationError
13
+
14
+ from adcp.server.base import ADCPHandler, NotImplementedResponse, ToolContext, not_supported
15
+ from adcp.types import (
16
+ CalibrateContentRequest,
17
+ CalibrateContentResponse,
18
+ CreateContentStandardsRequest,
19
+ CreateContentStandardsResponse,
20
+ Error,
21
+ GetContentStandardsRequest,
22
+ GetContentStandardsResponse,
23
+ GetMediaBuyArtifactsRequest,
24
+ GetMediaBuyArtifactsResponse,
25
+ ListContentStandardsRequest,
26
+ ListContentStandardsResponse,
27
+ UpdateContentStandardsRequest,
28
+ UpdateContentStandardsResponse,
29
+ ValidateContentDeliveryRequest,
30
+ ValidateContentDeliveryResponse,
31
+ )
32
+
33
+
34
+ class ContentStandardsHandler(ADCPHandler):
35
+ """Handler for Content Standards protocol.
36
+
37
+ Subclass this to implement a Content Standards agent. All Content Standards
38
+ operations must be implemented via the handle_* methods.
39
+ The public methods (create_content_standards, etc.) handle validation and
40
+ error handling automatically.
41
+
42
+ Non-Content-Standards operations (get_products, create_media_buy, etc.)
43
+ return 'not supported'.
44
+
45
+ Example:
46
+ class MyContentStandardsHandler(ContentStandardsHandler):
47
+ async def handle_create_content_standards(
48
+ self,
49
+ request: CreateContentStandardsRequest,
50
+ context: ToolContext | None = None
51
+ ) -> CreateContentStandardsResponse:
52
+ # Your implementation
53
+ return CreateContentStandardsResponse(...)
54
+ """
55
+
56
+ # ========================================================================
57
+ # Content Standards Operations - Override base class with validation
58
+ # ========================================================================
59
+
60
+ async def create_content_standards(
61
+ self,
62
+ params: dict[str, Any],
63
+ context: ToolContext | None = None,
64
+ ) -> CreateContentStandardsResponse | NotImplementedResponse:
65
+ """Create content standards configuration.
66
+
67
+ Validates params and delegates to handle_create_content_standards.
68
+
69
+ Args:
70
+ params: Request parameters as dict
71
+ context: Optional tool context
72
+
73
+ Returns:
74
+ Content standards creation response, or error response
75
+ """
76
+ try:
77
+ request = CreateContentStandardsRequest.model_validate(params)
78
+ except ValidationError as e:
79
+ return NotImplementedResponse(
80
+ supported=False,
81
+ reason=f"Invalid request: {e}",
82
+ error=Error(code="VALIDATION_ERROR", message=str(e)),
83
+ )
84
+ return await self.handle_create_content_standards(request, context)
85
+
86
+ async def get_content_standards(
87
+ self,
88
+ params: dict[str, Any],
89
+ context: ToolContext | None = None,
90
+ ) -> GetContentStandardsResponse | NotImplementedResponse:
91
+ """Get content standards configuration.
92
+
93
+ Validates params and delegates to handle_get_content_standards.
94
+
95
+ Args:
96
+ params: Request parameters as dict
97
+ context: Optional tool context
98
+
99
+ Returns:
100
+ Content standards response, or error response
101
+ """
102
+ try:
103
+ request = GetContentStandardsRequest.model_validate(params)
104
+ except ValidationError as e:
105
+ return NotImplementedResponse(
106
+ supported=False,
107
+ reason=f"Invalid request: {e}",
108
+ error=Error(code="VALIDATION_ERROR", message=str(e)),
109
+ )
110
+ return await self.handle_get_content_standards(request, context)
111
+
112
+ async def list_content_standards(
113
+ self,
114
+ params: dict[str, Any],
115
+ context: ToolContext | None = None,
116
+ ) -> ListContentStandardsResponse | NotImplementedResponse:
117
+ """List content standards configurations.
118
+
119
+ Validates params and delegates to handle_list_content_standards.
120
+
121
+ Args:
122
+ params: Request parameters as dict
123
+ context: Optional tool context
124
+
125
+ Returns:
126
+ List of content standards, or error response
127
+ """
128
+ try:
129
+ request = ListContentStandardsRequest.model_validate(params)
130
+ except ValidationError as e:
131
+ return NotImplementedResponse(
132
+ supported=False,
133
+ reason=f"Invalid request: {e}",
134
+ error=Error(code="VALIDATION_ERROR", message=str(e)),
135
+ )
136
+ return await self.handle_list_content_standards(request, context)
137
+
138
+ async def update_content_standards(
139
+ self,
140
+ params: dict[str, Any],
141
+ context: ToolContext | None = None,
142
+ ) -> UpdateContentStandardsResponse | NotImplementedResponse:
143
+ """Update content standards configuration.
144
+
145
+ Validates params and delegates to handle_update_content_standards.
146
+
147
+ Args:
148
+ params: Request parameters as dict
149
+ context: Optional tool context
150
+
151
+ Returns:
152
+ Updated content standards response, or error response
153
+ """
154
+ try:
155
+ request = UpdateContentStandardsRequest.model_validate(params)
156
+ except ValidationError as e:
157
+ return NotImplementedResponse(
158
+ supported=False,
159
+ reason=f"Invalid request: {e}",
160
+ error=Error(code="VALIDATION_ERROR", message=str(e)),
161
+ )
162
+ return await self.handle_update_content_standards(request, context)
163
+
164
+ async def calibrate_content(
165
+ self,
166
+ params: dict[str, Any],
167
+ context: ToolContext | None = None,
168
+ ) -> CalibrateContentResponse | NotImplementedResponse:
169
+ """Calibrate content against standards.
170
+
171
+ Validates params and delegates to handle_calibrate_content.
172
+
173
+ Args:
174
+ params: Request parameters as dict
175
+ context: Optional tool context
176
+
177
+ Returns:
178
+ Calibration response with scores and feedback, or error response
179
+ """
180
+ try:
181
+ request = CalibrateContentRequest.model_validate(params)
182
+ except ValidationError as e:
183
+ return NotImplementedResponse(
184
+ supported=False,
185
+ reason=f"Invalid request: {e}",
186
+ error=Error(code="VALIDATION_ERROR", message=str(e)),
187
+ )
188
+ return await self.handle_calibrate_content(request, context)
189
+
190
+ async def validate_content_delivery(
191
+ self,
192
+ params: dict[str, Any],
193
+ context: ToolContext | None = None,
194
+ ) -> ValidateContentDeliveryResponse | NotImplementedResponse:
195
+ """Validate content delivery against standards.
196
+
197
+ Validates params and delegates to handle_validate_content_delivery.
198
+
199
+ Args:
200
+ params: Request parameters as dict
201
+ context: Optional tool context
202
+
203
+ Returns:
204
+ Validation response, or error response
205
+ """
206
+ try:
207
+ request = ValidateContentDeliveryRequest.model_validate(params)
208
+ except ValidationError as e:
209
+ return NotImplementedResponse(
210
+ supported=False,
211
+ reason=f"Invalid request: {e}",
212
+ error=Error(code="VALIDATION_ERROR", message=str(e)),
213
+ )
214
+ return await self.handle_validate_content_delivery(request, context)
215
+
216
+ async def get_media_buy_artifacts(
217
+ self,
218
+ params: dict[str, Any],
219
+ context: ToolContext | None = None,
220
+ ) -> GetMediaBuyArtifactsResponse | NotImplementedResponse:
221
+ """Get artifacts associated with a media buy.
222
+
223
+ Validates params and delegates to handle_get_media_buy_artifacts.
224
+
225
+ Args:
226
+ params: Request parameters as dict
227
+ context: Optional tool context
228
+
229
+ Returns:
230
+ Media buy artifacts response, or error response
231
+ """
232
+ try:
233
+ request = GetMediaBuyArtifactsRequest.model_validate(params)
234
+ except ValidationError as e:
235
+ return NotImplementedResponse(
236
+ supported=False,
237
+ reason=f"Invalid request: {e}",
238
+ error=Error(code="VALIDATION_ERROR", message=str(e)),
239
+ )
240
+ return await self.handle_get_media_buy_artifacts(request, context)
241
+
242
+ # ========================================================================
243
+ # Abstract handlers - Implement these in subclasses
244
+ # ========================================================================
245
+
246
+ @abstractmethod
247
+ async def handle_create_content_standards(
248
+ self,
249
+ request: CreateContentStandardsRequest,
250
+ context: ToolContext | None = None,
251
+ ) -> CreateContentStandardsResponse:
252
+ """Handle create content standards request.
253
+
254
+ Must be implemented by Content Standards agents.
255
+
256
+ Args:
257
+ request: Validated content standards creation request
258
+ context: Optional tool context
259
+
260
+ Returns:
261
+ Content standards creation response
262
+ """
263
+ ...
264
+
265
+ @abstractmethod
266
+ async def handle_get_content_standards(
267
+ self,
268
+ request: GetContentStandardsRequest,
269
+ context: ToolContext | None = None,
270
+ ) -> GetContentStandardsResponse:
271
+ """Handle get content standards request.
272
+
273
+ Must be implemented by Content Standards agents.
274
+
275
+ Args:
276
+ request: Validated content standards retrieval request
277
+ context: Optional tool context
278
+
279
+ Returns:
280
+ Content standards response
281
+ """
282
+ ...
283
+
284
+ @abstractmethod
285
+ async def handle_list_content_standards(
286
+ self,
287
+ request: ListContentStandardsRequest,
288
+ context: ToolContext | None = None,
289
+ ) -> ListContentStandardsResponse:
290
+ """Handle list content standards request.
291
+
292
+ Must be implemented by Content Standards agents.
293
+
294
+ Args:
295
+ request: Validated list content standards request
296
+ context: Optional tool context
297
+
298
+ Returns:
299
+ List of content standards
300
+ """
301
+ ...
302
+
303
+ @abstractmethod
304
+ async def handle_update_content_standards(
305
+ self,
306
+ request: UpdateContentStandardsRequest,
307
+ context: ToolContext | None = None,
308
+ ) -> UpdateContentStandardsResponse:
309
+ """Handle update content standards request.
310
+
311
+ Must be implemented by Content Standards agents.
312
+
313
+ Args:
314
+ request: Validated content standards update request
315
+ context: Optional tool context
316
+
317
+ Returns:
318
+ Updated content standards response
319
+ """
320
+ ...
321
+
322
+ @abstractmethod
323
+ async def handle_calibrate_content(
324
+ self,
325
+ request: CalibrateContentRequest,
326
+ context: ToolContext | None = None,
327
+ ) -> CalibrateContentResponse:
328
+ """Handle calibrate content request.
329
+
330
+ Must be implemented by Content Standards agents.
331
+
332
+ Args:
333
+ request: Validated calibration request with content to evaluate
334
+ context: Optional tool context
335
+
336
+ Returns:
337
+ Calibration response with scores and feedback
338
+ """
339
+ ...
340
+
341
+ @abstractmethod
342
+ async def handle_validate_content_delivery(
343
+ self,
344
+ request: ValidateContentDeliveryRequest,
345
+ context: ToolContext | None = None,
346
+ ) -> ValidateContentDeliveryResponse:
347
+ """Handle validate content delivery request.
348
+
349
+ Must be implemented by Content Standards agents.
350
+
351
+ Args:
352
+ request: Validated request with delivery data
353
+ context: Optional tool context
354
+
355
+ Returns:
356
+ Validation response
357
+ """
358
+ ...
359
+
360
+ @abstractmethod
361
+ async def handle_get_media_buy_artifacts(
362
+ self,
363
+ request: GetMediaBuyArtifactsRequest,
364
+ context: ToolContext | None = None,
365
+ ) -> GetMediaBuyArtifactsResponse:
366
+ """Handle get media buy artifacts request.
367
+
368
+ Must be implemented by Content Standards agents.
369
+
370
+ Args:
371
+ request: Validated artifacts retrieval request
372
+ context: Optional tool context
373
+
374
+ Returns:
375
+ Media buy artifacts response
376
+ """
377
+ ...
378
+
379
+ # ========================================================================
380
+ # Non-Content-Standards Operations - Return 'not supported'
381
+ # ========================================================================
382
+
383
+ async def get_products(
384
+ self, params: dict[str, Any], context: ToolContext | None = None
385
+ ) -> NotImplementedResponse:
386
+ """Not supported by Content Standards agents."""
387
+ return not_supported(
388
+ "get_products is not supported by Content Standards agents. "
389
+ "This agent handles content calibration and validation, not product catalog operations."
390
+ )
391
+
392
+ async def list_creative_formats(
393
+ self, params: dict[str, Any], context: ToolContext | None = None
394
+ ) -> NotImplementedResponse:
395
+ """Not supported by Content Standards agents."""
396
+ return not_supported(
397
+ "list_creative_formats is not supported by Content Standards agents."
398
+ )
399
+
400
+ async def list_authorized_properties(
401
+ self, params: dict[str, Any], context: ToolContext | None = None
402
+ ) -> NotImplementedResponse:
403
+ """Not supported by Content Standards agents."""
404
+ return not_supported(
405
+ "list_authorized_properties is not supported by Content Standards agents."
406
+ )
407
+
408
+ async def sync_creatives(
409
+ self, params: dict[str, Any], context: ToolContext | None = None
410
+ ) -> NotImplementedResponse:
411
+ """Not supported by Content Standards agents."""
412
+ return not_supported(
413
+ "sync_creatives is not supported by Content Standards agents."
414
+ )
415
+
416
+ async def list_creatives(
417
+ self, params: dict[str, Any], context: ToolContext | None = None
418
+ ) -> NotImplementedResponse:
419
+ """Not supported by Content Standards agents."""
420
+ return not_supported(
421
+ "list_creatives is not supported by Content Standards agents."
422
+ )
423
+
424
+ async def build_creative(
425
+ self, params: dict[str, Any], context: ToolContext | None = None
426
+ ) -> NotImplementedResponse:
427
+ """Not supported by Content Standards agents."""
428
+ return not_supported(
429
+ "build_creative is not supported by Content Standards agents."
430
+ )
431
+
432
+ async def create_media_buy(
433
+ self, params: dict[str, Any], context: ToolContext | None = None
434
+ ) -> NotImplementedResponse:
435
+ """Not supported by Content Standards agents."""
436
+ return not_supported(
437
+ "create_media_buy is not supported by Content Standards agents. "
438
+ "This agent handles content calibration and validation, not media buying."
439
+ )
440
+
441
+ async def update_media_buy(
442
+ self, params: dict[str, Any], context: ToolContext | None = None
443
+ ) -> NotImplementedResponse:
444
+ """Not supported by Content Standards agents."""
445
+ return not_supported(
446
+ "update_media_buy is not supported by Content Standards agents."
447
+ )
448
+
449
+ async def get_media_buy_delivery(
450
+ self, params: dict[str, Any], context: ToolContext | None = None
451
+ ) -> NotImplementedResponse:
452
+ """Not supported by Content Standards agents."""
453
+ return not_supported(
454
+ "get_media_buy_delivery is not supported by Content Standards agents."
455
+ )
456
+
457
+ async def get_signals(
458
+ self, params: dict[str, Any], context: ToolContext | None = None
459
+ ) -> NotImplementedResponse:
460
+ """Not supported by Content Standards agents."""
461
+ return not_supported(
462
+ "get_signals is not supported by Content Standards agents."
463
+ )
464
+
465
+ async def activate_signal(
466
+ self, params: dict[str, Any], context: ToolContext | None = None
467
+ ) -> NotImplementedResponse:
468
+ """Not supported by Content Standards agents."""
469
+ return not_supported(
470
+ "activate_signal is not supported by Content Standards agents."
471
+ )
472
+
473
+ async def provide_performance_feedback(
474
+ self, params: dict[str, Any], context: ToolContext | None = None
475
+ ) -> NotImplementedResponse:
476
+ """Not supported by Content Standards agents."""
477
+ return not_supported(
478
+ "provide_performance_feedback is not supported by Content Standards agents."
479
+ )
480
+
481
+ # ========================================================================
482
+ # V3 Sponsored Intelligence - Not supported
483
+ # ========================================================================
484
+
485
+ async def si_get_offering(
486
+ self, params: dict[str, Any], context: ToolContext | None = None
487
+ ) -> NotImplementedResponse:
488
+ """Not supported by Content Standards agents."""
489
+ return not_supported(
490
+ "si_get_offering is not supported by Content Standards agents. "
491
+ "Use a Sponsored Intelligence agent for SI operations."
492
+ )
493
+
494
+ async def si_initiate_session(
495
+ self, params: dict[str, Any], context: ToolContext | None = None
496
+ ) -> NotImplementedResponse:
497
+ """Not supported by Content Standards agents."""
498
+ return not_supported(
499
+ "si_initiate_session is not supported by Content Standards agents."
500
+ )
501
+
502
+ async def si_send_message(
503
+ self, params: dict[str, Any], context: ToolContext | None = None
504
+ ) -> NotImplementedResponse:
505
+ """Not supported by Content Standards agents."""
506
+ return not_supported(
507
+ "si_send_message is not supported by Content Standards agents."
508
+ )
509
+
510
+ async def si_terminate_session(
511
+ self, params: dict[str, Any], context: ToolContext | None = None
512
+ ) -> NotImplementedResponse:
513
+ """Not supported by Content Standards agents."""
514
+ return not_supported(
515
+ "si_terminate_session is not supported by Content Standards agents."
516
+ )
517
+
518
+ # ========================================================================
519
+ # V3 Governance (Property Lists) - Not supported
520
+ # ========================================================================
521
+
522
+ async def create_property_list(
523
+ self, params: dict[str, Any], context: ToolContext | None = None
524
+ ) -> NotImplementedResponse:
525
+ """Not supported by Content Standards agents."""
526
+ return not_supported(
527
+ "create_property_list is not supported by Content Standards agents. "
528
+ "Use a Governance agent for property list operations."
529
+ )
530
+
531
+ async def get_property_list(
532
+ self, params: dict[str, Any], context: ToolContext | None = None
533
+ ) -> NotImplementedResponse:
534
+ """Not supported by Content Standards agents."""
535
+ return not_supported(
536
+ "get_property_list is not supported by Content Standards agents."
537
+ )
538
+
539
+ async def list_property_lists(
540
+ self, params: dict[str, Any], context: ToolContext | None = None
541
+ ) -> NotImplementedResponse:
542
+ """Not supported by Content Standards agents."""
543
+ return not_supported(
544
+ "list_property_lists is not supported by Content Standards agents."
545
+ )
546
+
547
+ async def update_property_list(
548
+ self, params: dict[str, Any], context: ToolContext | None = None
549
+ ) -> NotImplementedResponse:
550
+ """Not supported by Content Standards agents."""
551
+ return not_supported(
552
+ "update_property_list is not supported by Content Standards agents."
553
+ )
554
+
555
+ async def delete_property_list(
556
+ self, params: dict[str, Any], context: ToolContext | None = None
557
+ ) -> NotImplementedResponse:
558
+ """Not supported by Content Standards agents."""
559
+ return not_supported(
560
+ "delete_property_list is not supported by Content Standards agents."
561
+ )