From 78ebc0ba988291c670dc0e04fb06abea29e6e3b3 Mon Sep 17 00:00:00 2001 From: "braintrust-bot[bot]" <215900051+braintrust-bot[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2026 19:32:59 +0000 Subject: [PATCH] chore: Update platform types --- generated_types.json | 55 +++++++++++++++++++++++++-- py/src/braintrust/_generated_types.py | 32 +++++++++++++++- py/src/braintrust/generated_types.py | 2 +- 3 files changed, 83 insertions(+), 6 deletions(-) diff --git a/generated_types.json b/generated_types.json index 26e0ae4a..56f14fc7 100644 --- a/generated_types.json +++ b/generated_types.json @@ -498,6 +498,14 @@ "format": "uuid", "description": "Unique identifier for the organization" }, + "last_used_at": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "Approximate time this credential was last used to authenticate. Updates are limited to once every 10 minutes and may be delayed by authorization caches. If null, no usage has been recorded." + }, "expires_at": { "type": [ "string", @@ -3733,7 +3741,7 @@ "type": { "type": "string", "enum": [ - "simulation" + "conversation" ] }, "config": { @@ -3956,7 +3964,7 @@ ], "additionalProperties": false, "description": "A task function that runs a conversation between an agent and a simulated user.", - "title": "simulation" + "title": "conversation" } ] }, @@ -3968,7 +3976,7 @@ "global", "graph", "topic_map", - "simulation" + "conversation" ] }, "FunctionId": { @@ -7328,6 +7336,39 @@ "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_mention": { + "type": [ + "object", + "null" + ], + "properties": { + "workspace_id": { + "type": "string", + "minLength": 1 + }, + "mention_user_id": { + "type": "string", + "pattern": "^[UW][A-Z0-9]+$", + "description": "Slack member ID of the user or agent to mention in a Pattern alert's thread to investigate the pattern." + }, + "mention_handle": { + "type": "string", + "maxLength": 80, + "description": "Username shown for the selected user or agent. Mentions use mention_user_id." + }, + "mention_prompt": { + "type": "string", + "maxLength": 2000, + "pattern": "\\{\\{pattern\\}\\}", + "description": "Message posted after the mention in a Pattern alert's thread. {{pattern}} is replaced with a link to the pattern. Defaults to \"Please investigate this pattern: {{pattern}}. Review the evidence, identify the root cause, and suggest a fix.\"" + } + }, + "required": [ + "workspace_id", + "mention_user_id" + ], + "description": "Project-wide Slack user or agent and prompt for Pattern alert threads. Applies only to destinations in the selected workspace. Unset or null disables mentions." + }, "pattern_alert_destinations": { "type": [ "array", @@ -9227,6 +9268,14 @@ "format": "uuid", "description": "Unique identifier for the organization" }, + "last_used_at": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "Approximate time this credential was last used to authenticate. Updates are limited to once every 10 minutes and may be delayed by authorization caches. If null, no usage has been recorded." + }, "expires_at": { "type": [ "string", diff --git a/py/src/braintrust/_generated_types.py b/py/src/braintrust/_generated_types.py index 1a22c324..5be6eb87 100644 --- a/py/src/braintrust/_generated_types.py +++ b/py/src/braintrust/_generated_types.py @@ -160,6 +160,10 @@ class ApiKey(TypedDict): """ Unique identifier for the organization """ + last_used_at: NotRequired[str | None] + """ + Approximate time this credential was last used to authenticate. Updates are limited to once every 10 minutes and may be delayed by authorization caches. If null, no usage has been recorded. + """ expires_at: NotRequired[str | None] """ Date at which the API key expires. If null, the key never expires. @@ -1004,12 +1008,12 @@ class FunctionDataFunctionData5Config1(TypedDict): class FunctionDataFunctionData5(TypedDict): - type: Literal['simulation'] + type: Literal['conversation'] config: FunctionDataFunctionData5Config | FunctionDataFunctionData5Config1 FunctionFormat: TypeAlias = Literal[ - 'llm', 'code', 'global', 'graph', 'topic_map', 'simulation' + 'llm', 'code', 'global', 'graph', 'topic_map', 'conversation' ] @@ -2186,6 +2190,22 @@ class ProjectSettingsRemoteEvalSource(TypedDict): ProjectSettingsUserIdField: TypeAlias = str +class ProjectSettingsPatternAlertMention(TypedDict): + workspace_id: str + mention_user_id: str + """ + Slack member ID of the user or agent to mention in a Pattern alert's thread to investigate the pattern. + """ + mention_handle: NotRequired[str | None] + """ + Username shown for the selected user or agent. Mentions use mention_user_id. + """ + mention_prompt: NotRequired[str | None] + """ + Message posted after the mention in a Pattern alert's thread. {{pattern}} is replaced with a link to the pattern. Defaults to "Please investigate this pattern: {{pattern}}. Review the evidence, identify the root cause, and suggest a fix." + """ + + class ProjectSettingsPatternAlertDestinations(TypedDict): type: Literal['webhook'] """ @@ -2281,6 +2301,10 @@ 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_mention: NotRequired[ProjectSettingsPatternAlertMention | None] + """ + Project-wide Slack user or agent and prompt for Pattern alert threads. Applies only to destinations in the selected workspace. Unset or null disables mentions. + """ pattern_alert_destinations: NotRequired[ Sequence[ ProjectSettingsPatternAlertDestinations @@ -2918,6 +2942,10 @@ class ServiceToken(TypedDict): """ Unique identifier for the organization """ + last_used_at: NotRequired[str | None] + """ + Approximate time this credential was last used to authenticate. Updates are limited to once every 10 minutes and may be delayed by authorization caches. If null, no usage has been recorded. + """ expires_at: NotRequired[str | None] """ Date and time at which the service token expires. If null, the token never expires. diff --git a/py/src/braintrust/generated_types.py b/py/src/braintrust/generated_types.py index 4b5037b3..4ad4f605 100644 --- a/py/src/braintrust/generated_types.py +++ b/py/src/braintrust/generated_types.py @@ -1,4 +1,4 @@ -"""Auto-generated file (content hash a21d9c9b623cbae8) -- do not modify""" +"""Auto-generated file (content hash 05c9dd3c22dac99f) -- do not modify""" from ._generated_types import ( Acl,