Skip to content
Merged
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
122 changes: 118 additions & 4 deletions generated_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -2617,7 +2617,8 @@
"enum": [
"env_var",
"ai_provider",
"sandbox_provider"
"sandbox_provider",
"automation_integration"
],
"default": "env_var",
"description": "The category of the secret: env_var for regular environment variables, ai_provider for AI provider API keys"
Expand Down Expand Up @@ -5783,6 +5784,43 @@
"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": "The action to take when the automation rule is triggered"
Expand Down Expand Up @@ -6128,6 +6166,43 @@
"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": "The action to take when the automation rule is triggered"
Expand Down Expand Up @@ -10038,14 +10113,16 @@
"harness": {
"type": "string",
"enum": [
"native",
"codex",
"native",
"claude-code"
]
],
"description": "Required when saving a Loop automation. Currently only Codex is supported."
},
"model": {
"type": "string",
"minLength": 1
"minLength": 1,
"description": "Required when saving a Loop automation."
},
"endpoint_name": {
"type": "string",
Expand Down Expand Up @@ -10134,6 +10211,43 @@
"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"
Expand Down
78 changes: 73 additions & 5 deletions py/src/braintrust/_generated_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,9 @@ class EnvVar(TypedDict):
"""
Optional classification for the secret (for example, the AI provider name)
"""
secret_category: NotRequired[Literal['env_var', 'ai_provider', 'sandbox_provider'] | None]
secret_category: NotRequired[
Literal['env_var', 'ai_provider', 'sandbox_provider', 'automation_integration']
]
"""
The category of the secret: env_var for regular environment variables, ai_provider for AI provider API keys
"""
Expand Down Expand Up @@ -1740,6 +1742,22 @@ class ProjectAutomationConfigAction1(TypedDict):
"""


class ProjectAutomationConfigAction2(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 ProjectAutomationConfig(TypedDict):
event_type: Literal['logs']
"""
Expand All @@ -1754,7 +1772,11 @@ class ProjectAutomationConfig(TypedDict):
"""
Perform the triggered action at most once in this interval of seconds
"""
action: ProjectAutomationConfigAction | ProjectAutomationConfigAction1
action: (
ProjectAutomationConfigAction
| ProjectAutomationConfigAction1
| ProjectAutomationConfigAction2
)
"""
The action to take when the automation rule is triggered
"""
Expand Down Expand Up @@ -1877,6 +1899,22 @@ class ProjectAutomationConfig4Action1(TypedDict):
"""


class ProjectAutomationConfig4Action2(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 ProjectAutomationConfig4(TypedDict):
event_type: Literal['environment_update']
"""
Expand All @@ -1887,7 +1925,11 @@ class ProjectAutomationConfig4(TypedDict):
"""
Optional list of environment slugs to filter by
"""
action: ProjectAutomationConfig4Action | ProjectAutomationConfig4Action1
action: (
ProjectAutomationConfig4Action
| ProjectAutomationConfig4Action1
| ProjectAutomationConfig4Action2
)
"""
The action to take when the automation rule is triggered
"""
Expand Down Expand Up @@ -3162,8 +3204,14 @@ class WindowedAutomationConfigLoop(TypedDict):
"""
Write tools that may run without interactive approval
"""
harness: NotRequired[Literal['native', 'codex', 'claude-code'] | None]
harness: NotRequired[Literal['codex', 'native', 'claude-code'] | None]
"""
Required when saving a Loop automation. Currently only Codex is supported.
"""
model: NotRequired[str | None]
"""
Required when saving a Loop automation.
"""
endpoint_name: NotRequired[str | None]
reasoning_effort: NotRequired[
Literal['none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max']
Expand Down Expand Up @@ -3219,6 +3267,22 @@ class WindowedAutomationConfigActions1(TypedDict):
"""


class WindowedAutomationConfigActions2(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 WindowedAutomationConfig(TypedDict):
event_type: Literal['windowed']
"""
Expand All @@ -3239,7 +3303,11 @@ class WindowedAutomationConfig(TypedDict):
Optional Loop agent to run for each triggered window
"""
actions: NotRequired[
Sequence[WindowedAutomationConfigActions | WindowedAutomationConfigActions1]
Sequence[
WindowedAutomationConfigActions
| WindowedAutomationConfigActions1
| WindowedAutomationConfigActions2
]
]
"""
Delivery actions exposed to Loop as tools, or run directly when Loop is not configured
Expand Down
2 changes: 1 addition & 1 deletion 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 7351b6dec8a2d13b) -- do not modify"""
"""Auto-generated file (content hash 15ee517da0d5a72c) -- do not modify"""

from ._generated_types import (
Acl,
Expand Down
Loading