diff --git a/generated_types.json b/generated_types.json index 44e3313c..9e0843f0 100644 --- a/generated_types.json +++ b/generated_types.json @@ -5102,6 +5102,9 @@ "null" ], "properties": { + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, "sampling_rate": { "type": "number", "minimum": 0, @@ -5484,6 +5487,9 @@ ], "description": "The type of automation." }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, "btql_filter": { "type": "string", "description": "BTQL filter to identify rows for the automation rule" @@ -5509,6 +5515,12 @@ "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": [ @@ -5537,6 +5549,12 @@ "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": [ @@ -5817,6 +5835,9 @@ ], "description": "The type of automation." }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, "environment_filter": { "type": "array", "items": { @@ -5839,6 +5860,12 @@ "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": [ @@ -5867,6 +5894,12 @@ "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": [ @@ -8462,6 +8495,12 @@ "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": [ @@ -9305,6 +9344,16 @@ ], "description": "The type of automation." }, + "product_origin": { + "type": [ + "string", + "null" + ], + "enum": [ + "patterns" + ], + "description": "The product surface that created and manages the automation" + }, "status": { "$ref": "#/components/schemas/AutomationStatus" }, @@ -9510,6 +9559,65 @@ "evaluation_delay_seconds" ] }, + "loop": { + "type": "object", + "properties": { + "prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for the Loop agent" + }, + "include_trigger_input": { + "type": "boolean", + "default": false, + "description": "Whether to include the automation trigger payload as input" + }, + "agent_slug": { + "type": "string", + "minLength": 1, + "description": "The Loop agent to run" + }, + "auto_approve_tools": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "default": [], + "description": "Write tools that may run without interactive approval" + }, + "harness": { + "type": "string", + "enum": [ + "native", + "codex", + "claude-code" + ] + }, + "model": { + "type": "string", + "minLength": 1 + }, + "reasoning_effort": { + "type": "string", + "enum": [ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", + "max" + ] + } + }, + "required": [ + "prompt", + "agent_slug" + ], + "description": "Optional Loop agent to run for each triggered window" + }, "actions": { "type": "array", "items": { @@ -9527,6 +9635,12 @@ "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": [ @@ -9555,6 +9669,12 @@ "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": [ @@ -9566,15 +9686,14 @@ ], "description": "A delivery action available to an automation" }, - "minItems": 1, "maxItems": 20, - "description": "The delivery actions to run on each schedule or threshold lifecycle transition" + "default": [], + "description": "Delivery actions exposed to Loop as tools, or run directly when Loop is not configured" } }, "required": [ "event_type", - "window", - "actions" + "window" ] } }, diff --git a/py/src/braintrust/_generated_types.py b/py/src/braintrust/_generated_types.py index ca1d74d8..a4319be5 100644 --- a/py/src/braintrust/_generated_types.py +++ b/py/src/braintrust/_generated_types.py @@ -1670,6 +1670,10 @@ class ProjectAutomationConfigAction(TypedDict): """ The webhook URL to send the request to """ + formatting_prompt: NotRequired[str | None] + """ + Instructions for Loop to format content sent to this destination + """ class ProjectAutomationConfigAction1(TypedDict): @@ -1689,6 +1693,10 @@ class ProjectAutomationConfigAction1(TypedDict): """ Custom message template for the alert """ + formatting_prompt: NotRequired[str | None] + """ + Instructions for Loop to format content sent to this destination + """ class ProjectAutomationConfig(TypedDict): @@ -1696,6 +1704,7 @@ class ProjectAutomationConfig(TypedDict): """ The type of automation. """ + status: NotRequired[AutomationStatus | None] btql_filter: str """ BTQL filter to identify rows for the automation rule @@ -1787,6 +1796,10 @@ class ProjectAutomationConfig4Action(TypedDict): """ The webhook URL to send the request to """ + formatting_prompt: NotRequired[str | None] + """ + Instructions for Loop to format content sent to this destination + """ class ProjectAutomationConfig4Action1(TypedDict): @@ -1806,6 +1819,10 @@ class ProjectAutomationConfig4Action1(TypedDict): """ Custom message template for the alert """ + formatting_prompt: NotRequired[str | None] + """ + Instructions for Loop to format content sent to this destination + """ class ProjectAutomationConfig4(TypedDict): @@ -1813,6 +1830,7 @@ class ProjectAutomationConfig4(TypedDict): """ The type of automation. """ + status: NotRequired[AutomationStatus | None] environment_filter: NotRequired[Sequence[str] | None] """ Optional list of environment slugs to filter by @@ -2606,6 +2624,10 @@ class TopicDigestAutomationConfigAction(TypedDict): """ Custom message template for the alert """ + formatting_prompt: NotRequired[str | None] + """ + Instructions for Loop to format content sent to this destination + """ class TopicDigestAutomationConfig(TypedDict): @@ -2947,6 +2969,30 @@ class WindowedAutomationConfigWindow(TypedDict): """ +class WindowedAutomationConfigLoop(TypedDict): + prompt: str + """ + Instructions for the Loop agent + """ + include_trigger_input: NotRequired[bool | None] + """ + Whether to include the automation trigger payload as input + """ + agent_slug: str + """ + The Loop agent to run + """ + auto_approve_tools: NotRequired[Sequence[str] | None] + """ + Write tools that may run without interactive approval + """ + harness: NotRequired[Literal['native', 'codex', 'claude-code'] | None] + model: NotRequired[str | None] + reasoning_effort: NotRequired[ + Literal['none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max'] + ] + + class WindowedAutomationConfigActions(TypedDict): type: Literal['webhook'] """ @@ -2956,6 +3002,10 @@ class WindowedAutomationConfigActions(TypedDict): """ The webhook URL to send the request to """ + formatting_prompt: NotRequired[str | None] + """ + Instructions for Loop to format content sent to this destination + """ class WindowedAutomationConfigActions1(TypedDict): @@ -2975,6 +3025,10 @@ class WindowedAutomationConfigActions1(TypedDict): """ Custom message template for the alert """ + formatting_prompt: NotRequired[str | None] + """ + Instructions for Loop to format content sent to this destination + """ class WindowedAutomationConfig(TypedDict): @@ -2982,17 +3036,25 @@ class WindowedAutomationConfig(TypedDict): """ The type of automation. """ + product_origin: NotRequired[Literal['patterns'] | None] + """ + The product surface that created and manages the automation + """ status: NotRequired[AutomationStatus | None] threshold: NotRequired[WindowedAutomationConfigThreshold | None] """ Optional calculation and lifecycle policy that gate scheduled delivery """ window: WindowedAutomationConfigWindow - actions: Sequence[ - WindowedAutomationConfigActions | WindowedAutomationConfigActions1 + loop: NotRequired[WindowedAutomationConfigLoop | None] + """ + Optional Loop agent to run for each triggered window + """ + actions: NotRequired[ + Sequence[WindowedAutomationConfigActions | WindowedAutomationConfigActions1] ] """ - The delivery actions to run on each schedule or threshold lifecycle transition + Delivery actions exposed to Loop as tools, or run directly when Loop is not configured """ @@ -3500,6 +3562,7 @@ class ModelParamsModelParams(TypedDict): class OnlineScoreConfig(TypedDict): + status: NotRequired[AutomationStatus | None] sampling_rate: float """ The sampling rate for online scoring diff --git a/py/src/braintrust/generated_types.py b/py/src/braintrust/generated_types.py index 0a1d36d6..fa4fad98 100644 --- a/py/src/braintrust/generated_types.py +++ b/py/src/braintrust/generated_types.py @@ -1,4 +1,4 @@ -"""Auto-generated file (content hash 7d0333cc2dc03e50) -- do not modify""" +"""Auto-generated file (content hash ec975536334c7afc) -- do not modify""" from ._generated_types import ( Acl,