{"components":{"schemas":{"Notifications.V2.ActionCompletedPayload":{"description":"Payload for EXECUTION_ACTION_COMPLETED events","properties":{"action_id":{"description":"Unique identifier for the action","type":"string"},"action_name":{"description":"Name/type of the action that was executed (e.g., playwright_script, iris)","type":"string"},"duration":{"description":"Execution duration in milliseconds","format":"int64","type":"integer"},"output":{"description":"Output data from the action execution (contains result, success, console_logs, etc.)","type":"object","unevaluatedProperties":{},"x-typespec-name":"Record\u003cunknown\u003e"},"step_number":{"description":"Step number in the execution workflow","type":"integer"}},"required":["action_name","output","step_number","action_id"],"title":"EXECUTION_ACTION_COMPLETED","type":"object"},"Notifications.V2.ActionFailedPayload":{"description":"Payload for EXECUTION_ACTION_FAILED events","properties":{"action_id":{"description":"Unique identifier for the action","type":"string"},"action_name":{"description":"Name/type of the action that failed","type":"string"},"duration":{"description":"Execution duration in milliseconds","format":"int64","type":"integer"},"failure":{"description":"Failure message","type":"string"},"os_error":{"description":"Error details if available","properties":{"message":{"description":"Error message","type":"string"}},"required":["message"],"type":"object"},"step_number":{"description":"Step number in the execution workflow","type":"integer"}},"required":["action_name","failure","step_number","action_id"],"title":"EXECUTION_ACTION_FAILED","type":"object"},"Notifications.V2.ActionStartedPayload":{"description":"Payload for EXECUTION_ACTION_STARTED events","properties":{"action_id":{"description":"Unique identifier for the action","type":"string"},"action_name":{"description":"Name/type of the action being started","type":"string"},"arguments":{"description":"Arguments passed to the action","type":"object","unevaluatedProperties":{},"x-typespec-name":"Record\u003cunknown\u003e"},"step_number":{"description":"Step number in the execution workflow","type":"integer"}},"required":["action_name","arguments","step_number","action_id"],"title":"EXECUTION_ACTION_STARTED","type":"object"},"Notifications.V2.AwaitingConfirmationPayload":{"description":"Payload for EXECUTION_AWAITING_CONFIRMATION events","properties":{"reason":{"description":"Reason why confirmation is needed","type":"string"}},"required":["reason"],"title":"EXECUTION_AWAITING_CONFIRMATION","type":"object"},"Notifications.V2.BatchCompletedPayload":{"description":"Payload for BATCH_COMPLETED events","properties":{"batch_id":{"description":"Batch execution ID","type":"string"},"batch_name":{"description":"Batch name","type":"string"},"cancelled_count":{"description":"Number of executions that were cancelled","type":"integer"},"triggered_count":{"description":"Number of executions that were triggered","type":"integer"}},"required":["batch_id","batch_name","triggered_count","cancelled_count"],"title":"BATCH_COMPLETED","type":"object"},"Notifications.V2.BatchStartedPayload":{"description":"Payload for BATCH_STARTED events","properties":{"batch_id":{"description":"Batch execution ID","type":"string"},"batch_name":{"description":"Batch name","type":"string"},"item_count":{"description":"Number of items in the batch","type":"integer"}},"required":["batch_id","batch_name","item_count"],"title":"BATCH_STARTED","type":"object"},"Notifications.V2.CancelledPayload":{"description":"Payload for EXECUTION_CANCELLED events","properties":{"cancelled_by":{"description":"Who cancelled the execution (user, system, etc.)","type":"string"},"reason":{"description":"Reason for cancellation","type":"string"}},"required":["reason","cancelled_by"],"title":"EXECUTION_CANCELLED","type":"object"},"Notifications.V2.Category":{"description":"Category of the notification event","enum":["execution"],"type":"string"},"Notifications.V2.CompletedPayload":{"description":"Payload for EXECUTION_COMPLETED events","properties":{"outcome":{"description":"Execution outcome description","type":"string"},"reasoning":{"description":"Reasoning for the execution outcome","type":"string"},"result":{"description":"Execution result data","type":"object","unevaluatedProperties":{},"x-typespec-name":"Record\u003cunknown\u003e"}},"required":["result","reasoning","outcome"],"title":"EXECUTION_COMPLETED","type":"object"},"Notifications.V2.EmptyPayload":{"description":"Empty payload for events with no additional data","title":"EXECUTION_STARTED","type":"object"},"Notifications.V2.ExecutionEvent":{"description":"Execution event types","enum":["EXECUTION_STARTED","EXECUTION_COMPLETED","EXECUTION_FAILED","EXECUTION_CANCELLED","EXECUTION_PAUSED","EXECUTION_RESUMED","EXECUTION_AWAITING_CONFIRMATION","EXECUTION_ACTION_STARTED","EXECUTION_ACTION_COMPLETED","EXECUTION_ACTION_FAILED","EXECUTION_STEP_STARTED","EXECUTION_STEP_PROCESSED","EXECUTION_MESSAGE_ADDED","USER_MESSAGE_RECEIVED","EXECUTION_REASONING_ADDED","EXECUTION_TRANSITIONED","EXECUTION_WORKFLOW_UPDATED","EXECUTION_PLAYWRIGHT_SCRIPT_GENERATED","EXECUTION_FILE_ADDED","EXECUTION_TEST","BATCH_STARTED","BATCH_COMPLETED"],"type":"string"},"Notifications.V2.ExecutionInfo":{"description":"Execution information with event-specific payload","properties":{"agent_id":{"description":"Agent identifier","type":"string"},"agent_name":{"description":"Agent name","type":"string"},"event":{"allOf":[{"$ref":"#/components/schemas/Notifications.V2.ExecutionEvent"}],"description":"The specific execution event type"},"execution_id":{"description":"Unique identifier for the execution","type":"string"},"execution_url":{"description":"URL to view the execution in the Asteroid platform","type":"string"},"metadata":{"description":"Execution metadata key-value pairs, as provided when the execution was created","type":"object","unevaluatedProperties":{"type":"string"},"x-typespec-name":"Record\u003cstring\u003e"},"payload":{"anyOf":[{"$ref":"#/components/schemas/Notifications.V2.EmptyPayload"},{"$ref":"#/components/schemas/Notifications.V2.CompletedPayload"},{"$ref":"#/components/schemas/Notifications.V2.FailedPayload"},{"$ref":"#/components/schemas/Notifications.V2.CancelledPayload"},{"$ref":"#/components/schemas/Notifications.V2.PausedPayload"},{"$ref":"#/components/schemas/Notifications.V2.ResumedPayload"},{"$ref":"#/components/schemas/Notifications.V2.AwaitingConfirmationPayload"},{"$ref":"#/components/schemas/Notifications.V2.ActionCompletedPayload"},{"$ref":"#/components/schemas/Notifications.V2.ActionStartedPayload"},{"$ref":"#/components/schemas/Notifications.V2.ActionFailedPayload"},{"$ref":"#/components/schemas/Notifications.V2.StepStartedPayload"},{"$ref":"#/components/schemas/Notifications.V2.StepProcessedPayload"},{"$ref":"#/components/schemas/Notifications.V2.MessageAddedPayload"},{"$ref":"#/components/schemas/Notifications.V2.UserMessageReceivedPayload"},{"$ref":"#/components/schemas/Notifications.V2.ReasoningAddedPayload"},{"$ref":"#/components/schemas/Notifications.V2.TransitionedPayload"},{"$ref":"#/components/schemas/Notifications.V2.WorkflowUpdatedPayload"},{"$ref":"#/components/schemas/Notifications.V2.PlaywrightScriptGeneratedPayload"},{"$ref":"#/components/schemas/Notifications.V2.FileAddedPayload"},{"$ref":"#/components/schemas/Notifications.V2.TestPayload"},{"$ref":"#/components/schemas/Notifications.V2.BatchStartedPayload"},{"$ref":"#/components/schemas/Notifications.V2.BatchCompletedPayload"}],"description":"Event-specific payload data. The structure depends on the 'event' field."}},"required":["event","execution_id","execution_url","agent_id","agent_name","payload"],"type":"object"},"Notifications.V2.FailedPayload":{"description":"Payload for EXECUTION_FAILED events","properties":{"reason":{"description":"Reason for the failure","type":"string"}},"required":["reason"],"title":"EXECUTION_FAILED","type":"object"},"Notifications.V2.FileAddedPayload":{"description":"Payload for EXECUTION_FILE_ADDED events","properties":{"file_id":{"description":"File ID","type":"string"},"file_name":{"description":"File name","type":"string"},"file_size":{"description":"File size in bytes","type":"integer"},"mime_type":{"description":"MIME type","type":"string"},"presigned_url":{"description":"Presigned URL to access the file","type":"string"},"source":{"description":"Source of the file (upload, download, or agent)","type":"string"}},"required":["file_id","file_name","mime_type","file_size","source","presigned_url"],"title":"EXECUTION_FILE_ADDED","type":"object"},"Notifications.V2.MessageAddedPayload":{"description":"Payload for EXECUTION_MESSAGE_ADDED events","properties":{"message":{"description":"The message that was added","type":"string"}},"required":["message"],"title":"EXECUTION_MESSAGE_ADDED","type":"object"},"Notifications.V2.NotificationV2":{"description":"Top-level V2 notification structure sent to webhook endpoints","properties":{"event_id":{"description":"Unique identifier for this notification event","type":"string"},"info":{"allOf":[{"$ref":"#/components/schemas/Notifications.V2.ExecutionInfo"}],"description":"Category-specific information about the event. Currently only execution events are supported."},"timestamp":{"description":"Timestamp when the event occurred","format":"date-time","type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/Notifications.V2.Category"}],"description":"The category of the notification (execution, agent, workflow, etc.)"}},"required":["type","event_id","timestamp","info"],"type":"object"},"Notifications.V2.PausedPayload":{"description":"Payload for EXECUTION_PAUSED events","properties":{"paused_by":{"description":"Who paused the execution (user, agent, system)","type":"string"},"reason":{"description":"Reason for the pause. For user pauses: \"paused by user\". For agent pauses: the query/message sent via send_user_message.","type":"string"}},"required":["reason","paused_by"],"title":"EXECUTION_PAUSED","type":"object"},"Notifications.V2.PlaywrightScriptGeneratedPayload":{"description":"Payload for EXECUTION_PLAYWRIGHT_SCRIPT_GENERATED events","properties":{"context":{"description":"Context for script generation","type":"string"},"generated_at":{"description":"When the script was generated","format":"date-time","type":"string"},"node_id":{"description":"ID of the node that generated the script","type":"string"},"node_name":{"description":"Name of the node","type":"string"},"script":{"description":"Generated Playwright script","type":"string"}},"required":["node_id","node_name","script","context","generated_at"],"title":"EXECUTION_PLAYWRIGHT_SCRIPT_GENERATED","type":"object"},"Notifications.V2.ReasoningAddedPayload":{"description":"Payload for EXECUTION_REASONING_ADDED events","properties":{"reasoning":{"description":"The reasoning that was added","type":"string"}},"required":["reasoning"],"title":"EXECUTION_REASONING_ADDED","type":"object"},"Notifications.V2.ResumedPayload":{"description":"Payload for EXECUTION_RESUMED events","properties":{"reason":{"description":"Reason for the resumption","type":"string"}},"required":["reason"],"title":"EXECUTION_RESUMED","type":"object"},"Notifications.V2.StepProcessedPayload":{"description":"Payload for EXECUTION_STEP_PROCESSED events","properties":{"step":{"description":"Step number that was processed","type":"integer"}},"required":["step"],"title":"EXECUTION_STEP_PROCESSED","type":"object"},"Notifications.V2.StepStartedPayload":{"description":"Payload for EXECUTION_STEP_STARTED events","properties":{"step":{"description":"Step number that started","type":"integer"}},"required":["step"],"title":"EXECUTION_STEP_STARTED","type":"object"},"Notifications.V2.TestPayload":{"description":"Payload for EXECUTION_TEST events","properties":{"message":{"description":"Test message","type":"string"}},"required":["message"],"title":"EXECUTION_TEST","type":"object"},"Notifications.V2.TransitionedPayload":{"description":"Payload for EXECUTION_TRANSITIONED events","properties":{"from_node_duration":{"description":"Duration spent in previous node (seconds)","type":"integer"},"to_node":{"description":"Node being transitioned to","properties":{"id":{"description":"Node ID","type":"string"},"name":{"description":"Node name","type":"string"},"type":{"description":"Node type","type":"string"}},"required":["id","name","type"],"type":"object"},"transition_type":{"description":"Type of transition","type":"string"}},"required":["to_node"],"title":"EXECUTION_TRANSITIONED","type":"object"},"Notifications.V2.UserMessageReceivedPayload":{"description":"Payload for USER_MESSAGE_RECEIVED events","properties":{"execution_was":{"description":"Execution state when message was received (running, paused, paused_by_agent)","type":"string"},"injected_into":{"description":"Where the message was injected (execution_state, database_only)","type":"string"},"message":{"description":"The message content","type":"string"},"user_id":{"description":"ID of the user who sent the message","type":"string"}},"required":["user_id","message","execution_was","injected_into"],"title":"USER_MESSAGE_RECEIVED","type":"object"},"Notifications.V2.WorkflowUpdatedPayload":{"description":"Payload for EXECUTION_WORKFLOW_UPDATED events","properties":{"workflow_update":{"description":"List of workflow updates","items":{"properties":{"node_details":{"description":"Node details if applicable","properties":{"node_id":{"description":"Node ID","type":"string"},"node_name":{"description":"Node name","type":"string"},"node_type":{"description":"Node type","type":"string"}},"required":["node_id","node_name","node_type"],"type":"object"},"rules_details":{"description":"Rules details if applicable","properties":{"rules":{"description":"Rules content","type":"string"}},"required":["rules"],"type":"object"},"transition_details":{"description":"Transition details if applicable","properties":{"transition_id":{"description":"Transition ID","type":"string"},"transition_type":{"description":"Transition type","type":"string"}},"required":["transition_id","transition_type"],"type":"object"},"update_type":{"description":"Type of update (add, edit, delete)","type":"string"}},"required":["update_type"],"type":"object"},"type":"array","x-typespec-name":"Notifications.V2.{ update_type: string, node_details: Notifications.V2.{ node_id: string, node_name: string, node_type: string }, transition_details: Notifications.V2.{ transition_id: string, transition_type: string }, rules_details: Notifications.V2.{ rules: string } }[]"}},"required":["workflow_update"],"title":"EXECUTION_WORKFLOW_UPDATED","type":"object"}}},"info":{"title":"Asteroid Webhook Notifications","version":"0.0.0"},"openapi":"3.1.0","paths":{"/webhooks/example":{"post":{"description":"Example endpoint to expose the webhook notification schema. This operation is for documentation purposes only.","operationId":"WebhookSchemasExampleWebhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notifications.V2.NotificationV2"}}},"required":true},"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "}},"summary":"Webhook Notification Payload"}}}}
