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,491 @@
1
+ """Governance protocol handler.
2
+
3
+ Provides a base class for implementing Governance agents that manage
4
+ property lists for brand safety, compliance, and quality filtering.
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
+ CreatePropertyListRequest,
17
+ CreatePropertyListResponse,
18
+ DeletePropertyListRequest,
19
+ DeletePropertyListResponse,
20
+ Error,
21
+ GetPropertyListRequest,
22
+ GetPropertyListResponse,
23
+ ListPropertyListsRequest,
24
+ ListPropertyListsResponse,
25
+ UpdatePropertyListRequest,
26
+ UpdatePropertyListResponse,
27
+ )
28
+
29
+
30
+ class GovernanceHandler(ADCPHandler):
31
+ """Handler for Governance protocol (Property Lists).
32
+
33
+ Subclass this to implement a Governance agent that manages property lists
34
+ for brand safety, compliance scoring, and quality filtering.
35
+
36
+ All property list operations must be implemented via the handle_* methods.
37
+ The public methods (create_property_list, etc.) handle validation and
38
+ error handling automatically.
39
+
40
+ Non-governance operations (get_products, create_media_buy, etc.)
41
+ return 'not supported'.
42
+
43
+ Example:
44
+ class MyGovernanceHandler(GovernanceHandler):
45
+ async def handle_create_property_list(
46
+ self,
47
+ request: CreatePropertyListRequest,
48
+ context: ToolContext | None = None
49
+ ) -> CreatePropertyListResponse:
50
+ # Store the list definition
51
+ list_id = generate_id()
52
+ # ...
53
+ return CreatePropertyListResponse(list=PropertyList(...))
54
+ """
55
+
56
+ # ========================================================================
57
+ # Governance Operations - Override base class with validation
58
+ # ========================================================================
59
+
60
+ async def create_property_list(
61
+ self,
62
+ params: dict[str, Any],
63
+ context: ToolContext | None = None,
64
+ ) -> CreatePropertyListResponse | NotImplementedResponse:
65
+ """Create a property list for governance filtering.
66
+
67
+ Validates params and delegates to handle_create_property_list.
68
+
69
+ Args:
70
+ params: Request parameters as dict
71
+ context: Optional tool context
72
+
73
+ Returns:
74
+ Response with created property list metadata, or error response
75
+ """
76
+ try:
77
+ request = CreatePropertyListRequest.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_property_list(request, context)
85
+
86
+ async def get_property_list(
87
+ self,
88
+ params: dict[str, Any],
89
+ context: ToolContext | None = None,
90
+ ) -> GetPropertyListResponse | NotImplementedResponse:
91
+ """Get a property list with optional resolution.
92
+
93
+ Validates params and delegates to handle_get_property_list.
94
+
95
+ Args:
96
+ params: Request parameters as dict
97
+ context: Optional tool context
98
+
99
+ Returns:
100
+ Response with list metadata and optionally resolved identifiers
101
+ """
102
+ try:
103
+ request = GetPropertyListRequest.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_property_list(request, context)
111
+
112
+ async def list_property_lists(
113
+ self,
114
+ params: dict[str, Any],
115
+ context: ToolContext | None = None,
116
+ ) -> ListPropertyListsResponse | NotImplementedResponse:
117
+ """List property lists.
118
+
119
+ Validates params and delegates to handle_list_property_lists.
120
+
121
+ Args:
122
+ params: Request parameters as dict
123
+ context: Optional tool context
124
+
125
+ Returns:
126
+ Response with array of property list metadata
127
+ """
128
+ try:
129
+ request = ListPropertyListsRequest.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_property_lists(request, context)
137
+
138
+ async def update_property_list(
139
+ self,
140
+ params: dict[str, Any],
141
+ context: ToolContext | None = None,
142
+ ) -> UpdatePropertyListResponse | NotImplementedResponse:
143
+ """Update a property list.
144
+
145
+ Validates params and delegates to handle_update_property_list.
146
+
147
+ Args:
148
+ params: Request parameters as dict
149
+ context: Optional tool context
150
+
151
+ Returns:
152
+ Response with updated property list
153
+ """
154
+ try:
155
+ request = UpdatePropertyListRequest.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_property_list(request, context)
163
+
164
+ async def delete_property_list(
165
+ self,
166
+ params: dict[str, Any],
167
+ context: ToolContext | None = None,
168
+ ) -> DeletePropertyListResponse | NotImplementedResponse:
169
+ """Delete a property list.
170
+
171
+ Validates params and delegates to handle_delete_property_list.
172
+
173
+ Args:
174
+ params: Request parameters as dict
175
+ context: Optional tool context
176
+
177
+ Returns:
178
+ Response confirming deletion
179
+ """
180
+ try:
181
+ request = DeletePropertyListRequest.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_delete_property_list(request, context)
189
+
190
+ # ========================================================================
191
+ # Abstract handlers - Implement these in subclasses
192
+ # ========================================================================
193
+
194
+ @abstractmethod
195
+ async def handle_create_property_list(
196
+ self,
197
+ request: CreatePropertyListRequest,
198
+ context: ToolContext | None = None,
199
+ ) -> CreatePropertyListResponse:
200
+ """Handle create property list request.
201
+
202
+ Must be implemented by Governance agents.
203
+
204
+ Args:
205
+ request: Validated property list creation request
206
+ context: Optional tool context
207
+
208
+ Returns:
209
+ Response with created property list metadata
210
+ """
211
+ ...
212
+
213
+ @abstractmethod
214
+ async def handle_get_property_list(
215
+ self,
216
+ request: GetPropertyListRequest,
217
+ context: ToolContext | None = None,
218
+ ) -> GetPropertyListResponse:
219
+ """Handle get property list request.
220
+
221
+ Must be implemented by Governance agents.
222
+
223
+ When resolve=true, evaluates filters and returns matching property
224
+ identifiers. Otherwise returns only metadata.
225
+
226
+ Args:
227
+ request: Validated request with list_id and optional resolve flag
228
+ context: Optional tool context
229
+
230
+ Returns:
231
+ Response with list metadata and optionally resolved identifiers
232
+ """
233
+ ...
234
+
235
+ @abstractmethod
236
+ async def handle_list_property_lists(
237
+ self,
238
+ request: ListPropertyListsRequest,
239
+ context: ToolContext | None = None,
240
+ ) -> ListPropertyListsResponse:
241
+ """Handle list property lists request.
242
+
243
+ Must be implemented by Governance agents.
244
+
245
+ Args:
246
+ request: Validated request with optional filtering and pagination
247
+ context: Optional tool context
248
+
249
+ Returns:
250
+ Response with array of property list metadata
251
+ """
252
+ ...
253
+
254
+ @abstractmethod
255
+ async def handle_update_property_list(
256
+ self,
257
+ request: UpdatePropertyListRequest,
258
+ context: ToolContext | None = None,
259
+ ) -> UpdatePropertyListResponse:
260
+ """Handle update property list request.
261
+
262
+ Must be implemented by Governance agents.
263
+
264
+ Args:
265
+ request: Validated request with list_id and updates
266
+ context: Optional tool context
267
+
268
+ Returns:
269
+ Response with updated property list
270
+ """
271
+ ...
272
+
273
+ @abstractmethod
274
+ async def handle_delete_property_list(
275
+ self,
276
+ request: DeletePropertyListRequest,
277
+ context: ToolContext | None = None,
278
+ ) -> DeletePropertyListResponse:
279
+ """Handle delete property list request.
280
+
281
+ Must be implemented by Governance agents.
282
+
283
+ Args:
284
+ request: Validated request with list_id
285
+ context: Optional tool context
286
+
287
+ Returns:
288
+ Response confirming deletion
289
+ """
290
+ ...
291
+
292
+ # ========================================================================
293
+ # Non-Governance Operations - Return 'not supported'
294
+ # ========================================================================
295
+
296
+ async def get_products(
297
+ self, params: dict[str, Any], context: ToolContext | None = None
298
+ ) -> NotImplementedResponse:
299
+ """Not supported by Governance agents."""
300
+ return not_supported(
301
+ "get_products is not supported by Governance agents. "
302
+ "This agent manages property lists for filtering, not product catalogs."
303
+ )
304
+
305
+ async def list_creative_formats(
306
+ self, params: dict[str, Any], context: ToolContext | None = None
307
+ ) -> NotImplementedResponse:
308
+ """Not supported by Governance agents."""
309
+ return not_supported(
310
+ "list_creative_formats is not supported by Governance agents."
311
+ )
312
+
313
+ async def list_authorized_properties(
314
+ self, params: dict[str, Any], context: ToolContext | None = None
315
+ ) -> NotImplementedResponse:
316
+ """Not supported by Governance agents."""
317
+ return not_supported(
318
+ "list_authorized_properties is not supported by Governance agents. "
319
+ "Use get_property_list with resolve=true instead."
320
+ )
321
+
322
+ async def sync_creatives(
323
+ self, params: dict[str, Any], context: ToolContext | None = None
324
+ ) -> NotImplementedResponse:
325
+ """Not supported by Governance agents."""
326
+ return not_supported(
327
+ "sync_creatives is not supported by Governance agents."
328
+ )
329
+
330
+ async def list_creatives(
331
+ self, params: dict[str, Any], context: ToolContext | None = None
332
+ ) -> NotImplementedResponse:
333
+ """Not supported by Governance agents."""
334
+ return not_supported(
335
+ "list_creatives is not supported by Governance agents."
336
+ )
337
+
338
+ async def build_creative(
339
+ self, params: dict[str, Any], context: ToolContext | None = None
340
+ ) -> NotImplementedResponse:
341
+ """Not supported by Governance agents."""
342
+ return not_supported(
343
+ "build_creative is not supported by Governance agents."
344
+ )
345
+
346
+ async def create_media_buy(
347
+ self, params: dict[str, Any], context: ToolContext | None = None
348
+ ) -> NotImplementedResponse:
349
+ """Not supported by Governance agents."""
350
+ return not_supported(
351
+ "create_media_buy is not supported by Governance agents. "
352
+ "This agent manages property lists, not media buying."
353
+ )
354
+
355
+ async def update_media_buy(
356
+ self, params: dict[str, Any], context: ToolContext | None = None
357
+ ) -> NotImplementedResponse:
358
+ """Not supported by Governance agents."""
359
+ return not_supported(
360
+ "update_media_buy is not supported by Governance agents."
361
+ )
362
+
363
+ async def get_media_buy_delivery(
364
+ self, params: dict[str, Any], context: ToolContext | None = None
365
+ ) -> NotImplementedResponse:
366
+ """Not supported by Governance agents."""
367
+ return not_supported(
368
+ "get_media_buy_delivery is not supported by Governance agents."
369
+ )
370
+
371
+ async def get_signals(
372
+ self, params: dict[str, Any], context: ToolContext | None = None
373
+ ) -> NotImplementedResponse:
374
+ """Not supported by Governance agents."""
375
+ return not_supported(
376
+ "get_signals is not supported by Governance agents."
377
+ )
378
+
379
+ async def activate_signal(
380
+ self, params: dict[str, Any], context: ToolContext | None = None
381
+ ) -> NotImplementedResponse:
382
+ """Not supported by Governance agents."""
383
+ return not_supported(
384
+ "activate_signal is not supported by Governance agents."
385
+ )
386
+
387
+ async def provide_performance_feedback(
388
+ self, params: dict[str, Any], context: ToolContext | None = None
389
+ ) -> NotImplementedResponse:
390
+ """Not supported by Governance agents."""
391
+ return not_supported(
392
+ "provide_performance_feedback is not supported by Governance agents."
393
+ )
394
+
395
+ # ========================================================================
396
+ # V3 Content Standards - Not supported
397
+ # ========================================================================
398
+
399
+ async def create_content_standards(
400
+ self, params: dict[str, Any], context: ToolContext | None = None
401
+ ) -> NotImplementedResponse:
402
+ """Not supported by Governance agents."""
403
+ return not_supported(
404
+ "create_content_standards is not supported by Governance agents. "
405
+ "Use a Content Standards agent for content calibration."
406
+ )
407
+
408
+ async def get_content_standards(
409
+ self, params: dict[str, Any], context: ToolContext | None = None
410
+ ) -> NotImplementedResponse:
411
+ """Not supported by Governance agents."""
412
+ return not_supported(
413
+ "get_content_standards is not supported by Governance agents."
414
+ )
415
+
416
+ async def list_content_standards(
417
+ self, params: dict[str, Any], context: ToolContext | None = None
418
+ ) -> NotImplementedResponse:
419
+ """Not supported by Governance agents."""
420
+ return not_supported(
421
+ "list_content_standards is not supported by Governance agents."
422
+ )
423
+
424
+ async def update_content_standards(
425
+ self, params: dict[str, Any], context: ToolContext | None = None
426
+ ) -> NotImplementedResponse:
427
+ """Not supported by Governance agents."""
428
+ return not_supported(
429
+ "update_content_standards is not supported by Governance agents."
430
+ )
431
+
432
+ async def calibrate_content(
433
+ self, params: dict[str, Any], context: ToolContext | None = None
434
+ ) -> NotImplementedResponse:
435
+ """Not supported by Governance agents."""
436
+ return not_supported(
437
+ "calibrate_content is not supported by Governance agents."
438
+ )
439
+
440
+ async def validate_content_delivery(
441
+ self, params: dict[str, Any], context: ToolContext | None = None
442
+ ) -> NotImplementedResponse:
443
+ """Not supported by Governance agents."""
444
+ return not_supported(
445
+ "validate_content_delivery is not supported by Governance agents."
446
+ )
447
+
448
+ async def get_media_buy_artifacts(
449
+ self, params: dict[str, Any], context: ToolContext | None = None
450
+ ) -> NotImplementedResponse:
451
+ """Not supported by Governance agents."""
452
+ return not_supported(
453
+ "get_media_buy_artifacts is not supported by Governance agents."
454
+ )
455
+
456
+ # ========================================================================
457
+ # V3 Sponsored Intelligence - Not supported
458
+ # ========================================================================
459
+
460
+ async def si_get_offering(
461
+ self, params: dict[str, Any], context: ToolContext | None = None
462
+ ) -> NotImplementedResponse:
463
+ """Not supported by Governance agents."""
464
+ return not_supported(
465
+ "si_get_offering is not supported by Governance agents. "
466
+ "Use a Sponsored Intelligence agent for SI operations."
467
+ )
468
+
469
+ async def si_initiate_session(
470
+ self, params: dict[str, Any], context: ToolContext | None = None
471
+ ) -> NotImplementedResponse:
472
+ """Not supported by Governance agents."""
473
+ return not_supported(
474
+ "si_initiate_session is not supported by Governance agents."
475
+ )
476
+
477
+ async def si_send_message(
478
+ self, params: dict[str, Any], context: ToolContext | None = None
479
+ ) -> NotImplementedResponse:
480
+ """Not supported by Governance agents."""
481
+ return not_supported(
482
+ "si_send_message is not supported by Governance agents."
483
+ )
484
+
485
+ async def si_terminate_session(
486
+ self, params: dict[str, Any], context: ToolContext | None = None
487
+ ) -> NotImplementedResponse:
488
+ """Not supported by Governance agents."""
489
+ return not_supported(
490
+ "si_terminate_session is not supported by Governance agents."
491
+ )