From 5ed3b90d8076880142b2d5223cb4ff1c753a830a Mon Sep 17 00:00:00 2001 From: "braintrust-bot[bot]" <215900051+braintrust-bot[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 02:22:41 +0000 Subject: [PATCH] chore: Update platform types --- generated_types.json | 146 +++++++++++++++++++++++++- py/src/braintrust/_generated_types.py | 75 ++++++++++++- py/src/braintrust/generated_types.py | 2 +- 3 files changed, 220 insertions(+), 3 deletions(-) diff --git a/generated_types.json b/generated_types.json index 8a9e7097..f94ed7c0 100644 --- a/generated_types.json +++ b/generated_types.json @@ -7311,6 +7311,134 @@ ], "description": "If true, automatically complete a review after every assigned reviewer fills all human review scores visible to them." }, + "user_id_fields": { + "type": [ + "array", + "null" + ], + "items": { + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 256 + }, + "minItems": 2, + "maxItems": 32, + "description": "Path to the application's end-user identifier in metadata or span_attributes, for example [\"metadata\", \"customer_id\"]. This identifies an end user, not a session, request, organization, or the Braintrust user who created the project." + } + }, + "pattern_alert_destinations": { + "type": [ + "array", + "null" + ], + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "webhook" + ], + "description": "The type of action to take" + }, + "url": { + "type": "string", + "description": "The webhook URL to send the request to" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" + } + }, + "required": [ + "type", + "url" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "slack" + ], + "description": "The type of action to take" + }, + "workspace_id": { + "type": "string", + "description": "The Slack workspace ID to post to" + }, + "channel": { + "type": "string", + "description": "The Slack channel ID to post to" + }, + "message_template": { + "type": "string", + "description": "Custom message template for the alert" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" + } + }, + "required": [ + "type", + "workspace_id", + "channel" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "pagerduty" + ], + "description": "The type of action to take" + }, + "routing_key_secret_name": { + "type": "string", + "format": "uuid", + "description": "The data-plane secret containing the PagerDuty routing key" + }, + "severity": { + "type": "string", + "enum": [ + "critical", + "error", + "warning", + "info" + ] + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" + } + }, + "required": [ + "type", + "routing_key_secret_name", + "severity" + ] + } + ], + "description": "A delivery action available to an automation" + }, + "maxItems": 20, + "description": "Project-wide Slack, webhook, and PagerDuty destinations for new and reactivated Pattern alerts. An empty array disables alerts." + }, "default_preprocessor": { "$ref": "#/components/schemas/NullableSavedFunctionId" } @@ -10495,7 +10623,8 @@ ], "enum": [ "patterns", - "dashboard" + "dashboard", + "digest" ], "description": "The product surface that created and manages the automation" }, @@ -10717,6 +10846,21 @@ "maxLength": 10000, "description": "Instructions for the Loop agent" }, + "digest": { + "type": "object", + "properties": { + "writing_style": { + "type": "string", + "enum": [ + "compact", + "detailed" + ] + } + }, + "required": [ + "writing_style" + ] + }, "include_trigger_input": { "type": "boolean", "default": false, diff --git a/py/src/braintrust/_generated_types.py b/py/src/braintrust/_generated_types.py index 2ebbbcd5..82bf289f 100644 --- a/py/src/braintrust/_generated_types.py +++ b/py/src/braintrust/_generated_types.py @@ -2183,6 +2183,63 @@ class ProjectSettingsRemoteEvalSource(TypedDict): description: NotRequired[str | None] +ProjectSettingsUserIdField: TypeAlias = str + + +class ProjectSettingsPatternAlertDestinations(TypedDict): + type: Literal['webhook'] + """ + The type of action to take + """ + url: str + """ + The webhook URL to send the request to + """ + formatting_prompt: NotRequired[str | None] + """ + Instructions for Loop to format content sent to this destination + """ + + +class ProjectSettingsPatternAlertDestinations1(TypedDict): + type: Literal['slack'] + """ + The type of action to take + """ + workspace_id: str + """ + The Slack workspace ID to post to + """ + channel: str + """ + The Slack channel ID to post to + """ + message_template: NotRequired[str | None] + """ + Custom message template for the alert + """ + formatting_prompt: NotRequired[str | None] + """ + Instructions for Loop to format content sent to this destination + """ + + +class ProjectSettingsPatternAlertDestinations2(TypedDict): + type: Literal['pagerduty'] + """ + The type of action to take + """ + routing_key_secret_name: str + """ + The data-plane secret containing the PagerDuty routing key + """ + severity: Literal['critical', 'error', 'warning', 'info'] + formatting_prompt: NotRequired[str | None] + """ + Instructions for Loop to format content sent to this destination + """ + + class ProjectSettings(TypedDict): comparison_key: NotRequired[str | None] """ @@ -2220,6 +2277,17 @@ class ProjectSettings(TypedDict): """ If true, automatically complete a review after every assigned reviewer fills all human review scores visible to them. """ + user_id_fields: NotRequired[Sequence[Sequence[ProjectSettingsUserIdField]] | None] + pattern_alert_destinations: NotRequired[ + Sequence[ + ProjectSettingsPatternAlertDestinations + | ProjectSettingsPatternAlertDestinations1 + | ProjectSettingsPatternAlertDestinations2 + ] + ] + """ + Project-wide Slack, webhook, and PagerDuty destinations for new and reactivated Pattern alerts. An empty array disables alerts. + """ default_preprocessor: NotRequired[NullableSavedFunctionId | None] @@ -3402,6 +3470,10 @@ class WindowedAutomationConfigWindow(TypedDict): """ +class WindowedAutomationConfigLoopDigest(TypedDict): + writing_style: Literal['compact', 'detailed'] + + class WindowedAutomationConfigLoopTarget(TypedDict): type: Literal['dashboard'] id: Literal['overview'] @@ -3412,6 +3484,7 @@ class WindowedAutomationConfigLoop(TypedDict): """ Instructions for the Loop agent """ + digest: NotRequired[WindowedAutomationConfigLoopDigest | None] include_trigger_input: NotRequired[bool | None] """ Whether to include the automation trigger payload as input @@ -3501,7 +3574,7 @@ class WindowedAutomationConfig(TypedDict): """ The type of automation. """ - product_origin: NotRequired[Literal['patterns', 'dashboard'] | None] + product_origin: NotRequired[Literal['patterns', 'dashboard', 'digest'] | None] """ The product surface that created and manages the automation """ diff --git a/py/src/braintrust/generated_types.py b/py/src/braintrust/generated_types.py index 988c63d0..1589afa4 100644 --- a/py/src/braintrust/generated_types.py +++ b/py/src/braintrust/generated_types.py @@ -1,4 +1,4 @@ -"""Auto-generated file (content hash 1b6e35c5c24bba44) -- do not modify""" +"""Auto-generated file (content hash 986b8a9b0d902f2d) -- do not modify""" from ._generated_types import ( Acl,