Skip to content

Commit 5ed3b90

Browse files
chore: Update platform types
1 parent 36bbef5 commit 5ed3b90

3 files changed

Lines changed: 220 additions & 3 deletions

File tree

‎generated_types.json‎

Lines changed: 145 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7311,6 +7311,134 @@
73117311
],
73127312
"description": "If true, automatically complete a review after every assigned reviewer fills all human review scores visible to them."
73137313
},
7314+
"user_id_fields": {
7315+
"type": [
7316+
"array",
7317+
"null"
7318+
],
7319+
"items": {
7320+
"type": "array",
7321+
"items": {
7322+
"type": "string",
7323+
"minLength": 1,
7324+
"maxLength": 256
7325+
},
7326+
"minItems": 2,
7327+
"maxItems": 32,
7328+
"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."
7329+
}
7330+
},
7331+
"pattern_alert_destinations": {
7332+
"type": [
7333+
"array",
7334+
"null"
7335+
],
7336+
"items": {
7337+
"oneOf": [
7338+
{
7339+
"type": "object",
7340+
"properties": {
7341+
"type": {
7342+
"type": "string",
7343+
"enum": [
7344+
"webhook"
7345+
],
7346+
"description": "The type of action to take"
7347+
},
7348+
"url": {
7349+
"type": "string",
7350+
"description": "The webhook URL to send the request to"
7351+
},
7352+
"formatting_prompt": {
7353+
"type": "string",
7354+
"minLength": 1,
7355+
"maxLength": 10000,
7356+
"description": "Instructions for Loop to format content sent to this destination"
7357+
}
7358+
},
7359+
"required": [
7360+
"type",
7361+
"url"
7362+
]
7363+
},
7364+
{
7365+
"type": "object",
7366+
"properties": {
7367+
"type": {
7368+
"type": "string",
7369+
"enum": [
7370+
"slack"
7371+
],
7372+
"description": "The type of action to take"
7373+
},
7374+
"workspace_id": {
7375+
"type": "string",
7376+
"description": "The Slack workspace ID to post to"
7377+
},
7378+
"channel": {
7379+
"type": "string",
7380+
"description": "The Slack channel ID to post to"
7381+
},
7382+
"message_template": {
7383+
"type": "string",
7384+
"description": "Custom message template for the alert"
7385+
},
7386+
"formatting_prompt": {
7387+
"type": "string",
7388+
"minLength": 1,
7389+
"maxLength": 10000,
7390+
"description": "Instructions for Loop to format content sent to this destination"
7391+
}
7392+
},
7393+
"required": [
7394+
"type",
7395+
"workspace_id",
7396+
"channel"
7397+
]
7398+
},
7399+
{
7400+
"type": "object",
7401+
"properties": {
7402+
"type": {
7403+
"type": "string",
7404+
"enum": [
7405+
"pagerduty"
7406+
],
7407+
"description": "The type of action to take"
7408+
},
7409+
"routing_key_secret_name": {
7410+
"type": "string",
7411+
"format": "uuid",
7412+
"description": "The data-plane secret containing the PagerDuty routing key"
7413+
},
7414+
"severity": {
7415+
"type": "string",
7416+
"enum": [
7417+
"critical",
7418+
"error",
7419+
"warning",
7420+
"info"
7421+
]
7422+
},
7423+
"formatting_prompt": {
7424+
"type": "string",
7425+
"minLength": 1,
7426+
"maxLength": 10000,
7427+
"description": "Instructions for Loop to format content sent to this destination"
7428+
}
7429+
},
7430+
"required": [
7431+
"type",
7432+
"routing_key_secret_name",
7433+
"severity"
7434+
]
7435+
}
7436+
],
7437+
"description": "A delivery action available to an automation"
7438+
},
7439+
"maxItems": 20,
7440+
"description": "Project-wide Slack, webhook, and PagerDuty destinations for new and reactivated Pattern alerts. An empty array disables alerts."
7441+
},
73147442
"default_preprocessor": {
73157443
"$ref": "#/components/schemas/NullableSavedFunctionId"
73167444
}
@@ -10495,7 +10623,8 @@
1049510623
],
1049610624
"enum": [
1049710625
"patterns",
10498-
"dashboard"
10626+
"dashboard",
10627+
"digest"
1049910628
],
1050010629
"description": "The product surface that created and manages the automation"
1050110630
},
@@ -10717,6 +10846,21 @@
1071710846
"maxLength": 10000,
1071810847
"description": "Instructions for the Loop agent"
1071910848
},
10849+
"digest": {
10850+
"type": "object",
10851+
"properties": {
10852+
"writing_style": {
10853+
"type": "string",
10854+
"enum": [
10855+
"compact",
10856+
"detailed"
10857+
]
10858+
}
10859+
},
10860+
"required": [
10861+
"writing_style"
10862+
]
10863+
},
1072010864
"include_trigger_input": {
1072110865
"type": "boolean",
1072210866
"default": false,

‎py/src/braintrust/_generated_types.py‎

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2183,6 +2183,63 @@ class ProjectSettingsRemoteEvalSource(TypedDict):
21832183
description: NotRequired[str | None]
21842184

21852185

2186+
ProjectSettingsUserIdField: TypeAlias = str
2187+
2188+
2189+
class ProjectSettingsPatternAlertDestinations(TypedDict):
2190+
type: Literal['webhook']
2191+
"""
2192+
The type of action to take
2193+
"""
2194+
url: str
2195+
"""
2196+
The webhook URL to send the request to
2197+
"""
2198+
formatting_prompt: NotRequired[str | None]
2199+
"""
2200+
Instructions for Loop to format content sent to this destination
2201+
"""
2202+
2203+
2204+
class ProjectSettingsPatternAlertDestinations1(TypedDict):
2205+
type: Literal['slack']
2206+
"""
2207+
The type of action to take
2208+
"""
2209+
workspace_id: str
2210+
"""
2211+
The Slack workspace ID to post to
2212+
"""
2213+
channel: str
2214+
"""
2215+
The Slack channel ID to post to
2216+
"""
2217+
message_template: NotRequired[str | None]
2218+
"""
2219+
Custom message template for the alert
2220+
"""
2221+
formatting_prompt: NotRequired[str | None]
2222+
"""
2223+
Instructions for Loop to format content sent to this destination
2224+
"""
2225+
2226+
2227+
class ProjectSettingsPatternAlertDestinations2(TypedDict):
2228+
type: Literal['pagerduty']
2229+
"""
2230+
The type of action to take
2231+
"""
2232+
routing_key_secret_name: str
2233+
"""
2234+
The data-plane secret containing the PagerDuty routing key
2235+
"""
2236+
severity: Literal['critical', 'error', 'warning', 'info']
2237+
formatting_prompt: NotRequired[str | None]
2238+
"""
2239+
Instructions for Loop to format content sent to this destination
2240+
"""
2241+
2242+
21862243
class ProjectSettings(TypedDict):
21872244
comparison_key: NotRequired[str | None]
21882245
"""
@@ -2220,6 +2277,17 @@ class ProjectSettings(TypedDict):
22202277
"""
22212278
If true, automatically complete a review after every assigned reviewer fills all human review scores visible to them.
22222279
"""
2280+
user_id_fields: NotRequired[Sequence[Sequence[ProjectSettingsUserIdField]] | None]
2281+
pattern_alert_destinations: NotRequired[
2282+
Sequence[
2283+
ProjectSettingsPatternAlertDestinations
2284+
| ProjectSettingsPatternAlertDestinations1
2285+
| ProjectSettingsPatternAlertDestinations2
2286+
]
2287+
]
2288+
"""
2289+
Project-wide Slack, webhook, and PagerDuty destinations for new and reactivated Pattern alerts. An empty array disables alerts.
2290+
"""
22232291
default_preprocessor: NotRequired[NullableSavedFunctionId | None]
22242292

22252293

@@ -3402,6 +3470,10 @@ class WindowedAutomationConfigWindow(TypedDict):
34023470
"""
34033471

34043472

3473+
class WindowedAutomationConfigLoopDigest(TypedDict):
3474+
writing_style: Literal['compact', 'detailed']
3475+
3476+
34053477
class WindowedAutomationConfigLoopTarget(TypedDict):
34063478
type: Literal['dashboard']
34073479
id: Literal['overview']
@@ -3412,6 +3484,7 @@ class WindowedAutomationConfigLoop(TypedDict):
34123484
"""
34133485
Instructions for the Loop agent
34143486
"""
3487+
digest: NotRequired[WindowedAutomationConfigLoopDigest | None]
34153488
include_trigger_input: NotRequired[bool | None]
34163489
"""
34173490
Whether to include the automation trigger payload as input
@@ -3501,7 +3574,7 @@ class WindowedAutomationConfig(TypedDict):
35013574
"""
35023575
The type of automation.
35033576
"""
3504-
product_origin: NotRequired[Literal['patterns', 'dashboard'] | None]
3577+
product_origin: NotRequired[Literal['patterns', 'dashboard', 'digest'] | None]
35053578
"""
35063579
The product surface that created and manages the automation
35073580
"""

‎py/src/braintrust/generated_types.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Auto-generated file (content hash 1b6e35c5c24bba44) -- do not modify"""
1+
"""Auto-generated file (content hash 986b8a9b0d902f2d) -- do not modify"""
22

33
from ._generated_types import (
44
Acl,

0 commit comments

Comments
 (0)