airbyte-agent-amazon-ads 0.1.15__py3-none-any.whl → 0.1.17__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.
@@ -380,7 +380,11 @@ def describe_entities(model: ConnectorModelProtocol) -> list[dict[str, Any]]:
380
380
  return entities
381
381
 
382
382
 
383
- def generate_tool_description(model: ConnectorModelProtocol) -> str:
383
+ def generate_tool_description(
384
+ model: ConnectorModelProtocol,
385
+ *,
386
+ enable_hosted_mode_features: bool = True,
387
+ ) -> str:
384
388
  """Generate AI tool description from connector metadata.
385
389
 
386
390
  Produces a detailed description that includes:
@@ -393,6 +397,7 @@ def generate_tool_description(model: ConnectorModelProtocol) -> str:
393
397
 
394
398
  Args:
395
399
  model: Object conforming to ConnectorModelProtocol (e.g., ConnectorModel)
400
+ enable_hosted_mode_features: When False, omit hosted-mode search guidance from the docstring.
396
401
 
397
402
  Returns:
398
403
  Formatted description string suitable for AI tool documentation
@@ -402,8 +407,9 @@ def generate_tool_description(model: ConnectorModelProtocol) -> str:
402
407
  # at the first empty line and only keeps the initial section.
403
408
 
404
409
  # Entity/action parameter details (including pagination params like limit, starting_after)
405
- search_field_paths = _collect_search_field_paths(model)
406
- lines.append("ENTITIES AND PARAMETERS:")
410
+ search_field_paths = _collect_search_field_paths(model) if enable_hosted_mode_features else {}
411
+ # Avoid a "PARAMETERS:" header because some docstring parsers treat it as a params section marker.
412
+ lines.append("ENTITIES (ACTIONS + PARAMS):")
407
413
  for entity in model.entities:
408
414
  lines.append(f" {entity.name}:")
409
415
  actions = getattr(entity, "actions", []) or []
@@ -427,8 +433,9 @@ def generate_tool_description(model: ConnectorModelProtocol) -> str:
427
433
  lines.append(" To paginate: pass starting_after=<last_id> while has_more is true")
428
434
 
429
435
  lines.append("GUIDELINES:")
430
- lines.append(' - Prefer cached search over direct API calls when using execute(): action="search" whenever possible.')
431
- lines.append(" - Direct API actions (list/get/download) are slower and should be used only if search cannot answer the query.")
436
+ if enable_hosted_mode_features:
437
+ lines.append(' - Prefer cached search over direct API calls when using execute(): action="search" whenever possible.')
438
+ lines.append(" - Direct API actions (list/get/download) are slower and should be used only if search cannot answer the query.")
432
439
  lines.append(" - Keep results small: use params.fields, params.query.filter, small params.limit, and cursor pagination.")
433
440
  lines.append(" - If output is too large, refine the query with tighter filters/fields/limit.")
434
441
 
@@ -338,6 +338,7 @@ class AmazonAdsConnector:
338
338
  func: _F | None = None,
339
339
  *,
340
340
  update_docstring: bool = True,
341
+ enable_hosted_mode_features: bool = True,
341
342
  max_output_chars: int | None = DEFAULT_MAX_OUTPUT_CHARS,
342
343
  ) -> _F | Callable[[_F], _F]:
343
344
  """
@@ -356,12 +357,16 @@ class AmazonAdsConnector:
356
357
 
357
358
  Args:
358
359
  update_docstring: When True, append connector capabilities to __doc__.
360
+ enable_hosted_mode_features: When False, omit hosted-mode search sections from docstrings.
359
361
  max_output_chars: Max serialized output size before raising. Use None to disable.
360
362
  """
361
363
 
362
364
  def decorate(inner: _F) -> _F:
363
365
  if update_docstring:
364
- description = generate_tool_description(AmazonAdsConnectorModel)
366
+ description = generate_tool_description(
367
+ AmazonAdsConnectorModel,
368
+ enable_hosted_mode_features=enable_hosted_mode_features,
369
+ )
365
370
  original_doc = inner.__doc__ or ""
366
371
  if original_doc.strip():
367
372
  full_doc = f"{original_doc.strip()}\n{description}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airbyte-agent-amazon-ads
3
- Version: 0.1.15
3
+ Version: 0.1.17
4
4
  Summary: Airbyte Amazon-Ads Connector for AI platforms
5
5
  Project-URL: Homepage, https://github.com/airbytehq/airbyte-agent-connectors
6
6
  Project-URL: Documentation, https://docs.airbyte.com/ai-agents/
@@ -112,10 +112,11 @@ async def amazon-ads_execute(entity: str, action: str, params: dict | None = Non
112
112
  return await connector.execute(entity, action, params or {})
113
113
  ```
114
114
 
115
-
116
115
  ## Full documentation
117
116
 
118
- This connector supports the following entities and actions.
117
+ ### Entities and actions
118
+
119
+ This connector supports the following entities and actions. For more details, see this connector's [full reference documentation](REFERENCE.md).
119
120
 
120
121
  | Entity | Actions |
121
122
  |--------|---------|
@@ -124,14 +125,16 @@ This connector supports the following entities and actions.
124
125
  | Sponsored Product Campaigns | [List](./REFERENCE.md#sponsored-product-campaigns-list), [Get](./REFERENCE.md#sponsored-product-campaigns-get) |
125
126
 
126
127
 
127
- For all authentication options, see the connector's [authentication documentation](AUTH.md).
128
+ ### Authentication and configuration
129
+
130
+ For all authentication and configuration options, see the connector's [authentication documentation](AUTH.md).
128
131
 
129
- For detailed documentation on available actions and parameters, see this connector's [full reference documentation](./REFERENCE.md).
132
+ ### Amazon-Ads API docs
130
133
 
131
- For the service's official API docs, see the [Amazon-Ads API reference](https://advertising.amazon.com/API/docs/en-us).
134
+ See the official [Amazon-Ads API reference](https://advertising.amazon.com/API/docs/en-us).
132
135
 
133
136
  ## Version information
134
137
 
135
- - **Package version:** 0.1.15
138
+ - **Package version:** 0.1.17
136
139
  - **Connector version:** 1.0.4
137
- - **Generated with Connector SDK commit SHA:** 0f5e1914fa0d7d52de7bc0018afab712184a0847
140
+ - **Generated with Connector SDK commit SHA:** f6c6fca292b291b200b31e4056856465129ae703
@@ -1,5 +1,5 @@
1
1
  airbyte_agent_amazon_ads/__init__.py,sha256=f883U_4eSRjMLgjqpi5rGcKZ0U44ME_Z0IY-XZhwlPc,1896
2
- airbyte_agent_amazon_ads/connector.py,sha256=YrDIUHrjMpBc2fj91SETviF1q5zZVdLLwEHSJUMO8P4,23895
2
+ airbyte_agent_amazon_ads/connector.py,sha256=iN7jP_VemUPoTbpWcpgggUyl8S9ZZvzFYFeGNQ3UhQw,24164
3
3
  airbyte_agent_amazon_ads/connector_model.py,sha256=EBw-dpn0Vf5NpZCxGI-pHxaB52h4e1ApHfOXKGPPuCQ,97995
4
4
  airbyte_agent_amazon_ads/models.py,sha256=TOHCY0p3cE0rWVv3YfYvyvL-lmdYBcoGRTXtFNNBztc,9182
5
5
  airbyte_agent_amazon_ads/types.py,sha256=EW-jvOmXyJQqe2ESiDCs7nCIIsFreDCIZBlA6aplxpA,6728
@@ -12,7 +12,7 @@ airbyte_agent_amazon_ads/_vendored/connector_sdk/constants.py,sha256=AtzOvhDMWbR
12
12
  airbyte_agent_amazon_ads/_vendored/connector_sdk/exceptions.py,sha256=ss5MGv9eVPmsbLcLWetuu3sDmvturwfo6Pw3M37Oq5k,481
13
13
  airbyte_agent_amazon_ads/_vendored/connector_sdk/extensions.py,sha256=XWRRoJOOrwUHSKbuQt5DU7CCu8ePzhd_HuP7c_uD77w,21376
14
14
  airbyte_agent_amazon_ads/_vendored/connector_sdk/http_client.py,sha256=09Fclbq4wrg38EM2Yh2kHiykQVXqdAGby024elcEz8E,28027
15
- airbyte_agent_amazon_ads/_vendored/connector_sdk/introspection.py,sha256=kRVI4TDQDLdcCnTBUML8ycAtdqAQufVh-027sMkb4i8,19165
15
+ airbyte_agent_amazon_ads/_vendored/connector_sdk/introspection.py,sha256=e9uWn2ofpeehoBbzNgts_bjlKLn8ayA1Y3OpDC3b7ZA,19517
16
16
  airbyte_agent_amazon_ads/_vendored/connector_sdk/secrets.py,sha256=J9ezMu4xNnLW11xY5RCre6DHP7YMKZCqwGJfk7ufHAM,6855
17
17
  airbyte_agent_amazon_ads/_vendored/connector_sdk/types.py,sha256=in8gHsn5nsScujOfHZmkOgNmqmJKiPyNNjg59m5fGWc,8807
18
18
  airbyte_agent_amazon_ads/_vendored/connector_sdk/utils.py,sha256=G4LUXOC2HzPoND2v4tQW68R9uuPX9NQyCjaGxb7Kpl0,1958
@@ -52,6 +52,6 @@ airbyte_agent_amazon_ads/_vendored/connector_sdk/telemetry/__init__.py,sha256=Ra
52
52
  airbyte_agent_amazon_ads/_vendored/connector_sdk/telemetry/config.py,sha256=tLmQwAFD0kP1WyBGWBS3ysaudN9H3e-3EopKZi6cGKg,885
53
53
  airbyte_agent_amazon_ads/_vendored/connector_sdk/telemetry/events.py,sha256=8Y1NbXiwISX-V_wRofY7PqcwEXD0dLMnntKkY6XFU2s,1328
54
54
  airbyte_agent_amazon_ads/_vendored/connector_sdk/telemetry/tracker.py,sha256=Ftrk0_ddfM7dZG8hF9xBuPwhbc9D6JZ7Q9qs5o3LEyA,5579
55
- airbyte_agent_amazon_ads-0.1.15.dist-info/METADATA,sha256=n7_0YW3uvFU8L3v8xkzxrmbTTMIBSNSYsshxvM_RnqY,5163
56
- airbyte_agent_amazon_ads-0.1.15.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
57
- airbyte_agent_amazon_ads-0.1.15.dist-info/RECORD,,
55
+ airbyte_agent_amazon_ads-0.1.17.dist-info/METADATA,sha256=qA9FrnyYSqJ2eC3xPetQk8Th5RoF6qKAaULnwB64-0A,5192
56
+ airbyte_agent_amazon_ads-0.1.17.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
57
+ airbyte_agent_amazon_ads-0.1.17.dist-info/RECORD,,