Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 103 additions & 24 deletions generated_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -7717,6 +7717,41 @@
],
"description": "Whether new and reactivated informational Patterns send alerts, independent of `pattern_alert_min_severity`. Unset or null sends them."
},
"pattern_sources": {
"type": [
"array",
"null"
],
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"mcp_server_id": {
"type": "string",
"format": "uuid",
"description": "The project MCP server that reads this source."
},
"instructions": {
"type": [
"string",
"null"
],
"maxLength": 4000,
"description": "What the user wants Patterns to look for in this source, in their own words."
}
},
"required": [
"type",
"mcp_server_id"
]
},
"maxItems": 10,
"description": "Sources outside Braintrust that Patterns reads alongside this project's logs, each through a project MCP server."
},
"pattern_excluded_categories": {
"type": [
"array",
Expand Down Expand Up @@ -9155,6 +9190,10 @@
"data": {
"type": "array",
"items": {}
},
"source_dataset_id": {
"type": "string",
"description": "The saved dataset these rows came from. Its project scopes saved simulated-user references; the caller must have read access to the dataset and source project."
}
},
"required": [
Expand Down Expand Up @@ -9338,9 +9377,6 @@
"null"
],
"description": "Name of the AI provider secret to pin this run to."
},
"simulated_user": {
"$ref": "#/components/schemas/SimulatedUserReference"
}
},
"required": [
Expand Down Expand Up @@ -9399,6 +9435,61 @@
}
]
},
"SavedPreprocessorId": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"function"
]
},
"id": {
"type": "string"
},
"version": {
"type": "string",
"description": "The version of the function"
}
},
"required": [
"type",
"id"
],
"title": "function"
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"global"
]
},
"name": {
"type": "string"
},
"function_type": {
"type": "string",
"enum": [
"preprocessor"
],
"default": "preprocessor",
"description": "The type of global function. Defaults to 'preprocessor'."
}
},
"required": [
"type",
"name"
],
"title": "preprocessor_global"
}
],
"description": "Saved preprocessor that renders traces for the project's pattern questions. The project default when unset."
},
"ScoreObject": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -9540,27 +9631,6 @@
"preview_name"
]
},
"SimulatedUserReference": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"simulated_user"
]
},
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for the simulated user"
}
},
"required": [
"type",
"id"
],
"description": "A saved simulated user in `project_id` to run every row of a conversation task against. Each row's input becomes the conversation scenario."
},
"SpanAttributes": {
"type": [
"object",
Expand Down Expand Up @@ -11276,6 +11346,15 @@
],
"description": "Optional Loop agent to run for each triggered window"
},
"patterns": {
"type": "object",
"properties": {
"preprocessor": {
"$ref": "#/components/schemas/SavedPreprocessorId"
}
},
"description": "Settings of the Patterns automation"
},
"actions": {
"type": "array",
"items": {
Expand Down
63 changes: 54 additions & 9 deletions py/src/braintrust/_generated_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2380,6 +2380,18 @@ class ProjectSettingsPatternAlertDestinations2(TypedDict):
"""


class ProjectSettingsPatternSource(TypedDict):
type: str
mcp_server_id: str
"""
The project MCP server that reads this source.
"""
instructions: NotRequired[str | None]
"""
What the user wants Patterns to look for in this source, in their own words.
"""


ProjectSettingsPatternExcludedCategory: TypeAlias = str


Expand Down Expand Up @@ -2446,6 +2458,10 @@ class ProjectSettings(TypedDict):
"""
Whether new and reactivated informational Patterns send alerts, independent of `pattern_alert_min_severity`. Unset or null sends them.
"""
pattern_sources: NotRequired[Sequence[ProjectSettingsPatternSource] | None]
"""
Sources outside Braintrust that Patterns reads alongside this project's logs, each through a project MCP server.
"""
pattern_excluded_categories: NotRequired[
Sequence[ProjectSettingsPatternExcludedCategory]
]
Expand Down Expand Up @@ -2859,6 +2875,10 @@ class RunEvalData1(TypedDict):

class RunEvalData2(TypedDict):
data: Sequence[Any]
source_dataset_id: NotRequired[str | None]
"""
The saved dataset these rows came from. Its project scopes saved simulated-user references; the caller must have read access to the dataset and source project.
"""


class RunEvalData3(TypedDict):
Expand Down Expand Up @@ -3025,6 +3045,32 @@ class SavedFunctionIdSavedFunctionId1(TypedDict):
)


class SavedPreprocessorIdSavedPreprocessorId(TypedDict):
type: Literal['function']
id: str
version: NotRequired[str | None]
"""
The version of the function
"""


class SavedPreprocessorIdSavedPreprocessorId1(TypedDict):
type: Literal['global']
name: str
function_type: NotRequired[Literal['preprocessor'] | None]
"""
The type of global function. Defaults to 'preprocessor'.
"""


SavedPreprocessorId: TypeAlias = (
SavedPreprocessorIdSavedPreprocessorId | SavedPreprocessorIdSavedPreprocessorId1
)
"""
Saved preprocessor that renders traces for the project's pattern questions. The project default when unset.
"""


class ScoreObject(TypedDict):
name: NotRequired[str | None]
"""
Expand Down Expand Up @@ -3085,14 +3131,6 @@ class ServiceToken(TypedDict):
"""


class SimulatedUserReference(TypedDict):
type: Literal['simulated_user']
id: str
"""
Unique identifier for the simulated user
"""


class SpanIFrame(TypedDict):
id: str
"""
Expand Down Expand Up @@ -3688,6 +3726,10 @@ class WindowedAutomationConfigLoop(TypedDict):
"""


class WindowedAutomationConfigPatterns(TypedDict):
preprocessor: NotRequired[SavedPreprocessorId | None]


class WindowedAutomationConfigActionsHeaders(TypedDict):
name: str
"""
Expand Down Expand Up @@ -3796,6 +3838,10 @@ class WindowedAutomationConfig(TypedDict):
"""
Optional Loop agent to run for each triggered window
"""
patterns: NotRequired[WindowedAutomationConfigPatterns | None]
"""
Settings of the Patterns automation
"""
actions: NotRequired[
Sequence[
WindowedAutomationConfigActions
Expand Down Expand Up @@ -5312,7 +5358,6 @@ class RunEval(TypedDict):
"""
Name of the AI provider secret to pin this run to.
"""
simulated_user: NotRequired[SimulatedUserReference | None]


FunctionData: TypeAlias = (
Expand Down
6 changes: 3 additions & 3 deletions py/src/braintrust/generated_types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Auto-generated file (content hash 27700e0e5ff653bc) -- do not modify"""
"""Auto-generated file (content hash 771d6dc8c81f3b48) -- do not modify"""

from ._generated_types import (
Acl,
Expand Down Expand Up @@ -99,10 +99,10 @@
Role,
RunEval,
SavedFunctionId,
SavedPreprocessorId,
ScoreObject,
ScoreResult,
ServiceToken,
SimulatedUserReference,
SpanAttributes,
SpanIFrame,
SpanScope,
Expand Down Expand Up @@ -231,10 +231,10 @@
"SSEConsoleEventData",
"SSEProgressEventData",
"SavedFunctionId",
"SavedPreprocessorId",
"ScoreObject",
"ScoreResult",
"ServiceToken",
"SimulatedUserReference",
"SpanAttributes",
"SpanIFrame",
"SpanScope",
Expand Down