{ "components": { "schemas": { "APIKeyCreate": { "additionalProperties": false, "properties": { "name": { "maxLength": 100, "title": "Name", "type": "string" }, "scopes": { "default": [ "read", "write" ], "items": { "type": "string" }, "title": "Scopes", "type": "array" } }, "required": [ "name" ], "title": "APIKeyCreate", "type": "object" }, "APIKeyCreated": { "properties": { "created_at": { "format": "date-time", "title": "Created At", "type": "string" }, "id": { "title": "Id", "type": "string" }, "key": { "title": "Key", "type": "string" }, "key_prefix": { "title": "Key Prefix", "type": "string" }, "last_used_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Last Used At" }, "name": { "title": "Name", "type": "string" }, "scopes": { "items": { "type": "string" }, "title": "Scopes", "type": "array" } }, "required": [ "id", "name", "key_prefix", "scopes", "created_at", "key" ], "title": "APIKeyCreated", "type": "object" }, "APIKeyResponse": { "properties": { "created_at": { "format": "date-time", "title": "Created At", "type": "string" }, "id": { "title": "Id", "type": "string" }, "key_prefix": { "title": "Key Prefix", "type": "string" }, "last_used_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Last Used At" }, "name": { "title": "Name", "type": "string" }, "scopes": { "items": { "type": "string" }, "title": "Scopes", "type": "array" } }, "required": [ "id", "name", "key_prefix", "scopes", "created_at" ], "title": "APIKeyResponse", "type": "object" }, "ActivityItem": { "description": "A single recent activity entry.", "properties": { "agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent" }, "squad": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Squad" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" }, "timestamp": { "format": "date-time", "title": "Timestamp", "type": "string" }, "title": { "title": "Title", "type": "string" }, "type": { "title": "Type", "type": "string" } }, "required": [ "type", "title", "timestamp" ], "title": "ActivityItem", "type": "object" }, "ApprovalCreate": { "properties": { "agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent" }, "approval_id": { "title": "Approval Id", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "expires_at": { "format": "date-time", "title": "Expires At", "type": "string" }, "payload": { "additionalProperties": true, "default": {}, "title": "Payload", "type": "object" }, "priority": { "default": 5, "maximum": 10.0, "minimum": 1.0, "title": "Priority", "type": "integer" }, "slack_channel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Slack Channel" }, "slack_ts": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Slack Ts" }, "squad": { "title": "Squad", "type": "string" }, "tenant_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Tenant Id" }, "title": { "title": "Title", "type": "string" }, "type": { "title": "Type", "type": "string" } }, "required": [ "approval_id", "type", "title", "squad", "expires_at" ], "title": "ApprovalCreate", "type": "object" }, "ApprovalDecision": { "properties": { "action": { "title": "Action", "type": "string" }, "actor": { "title": "Actor", "type": "string" }, "outcome_ref": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Outcome Ref" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" } }, "required": [ "action", "actor" ], "title": "ApprovalDecision", "type": "object" }, "BudgetUpdate": { "properties": { "alert_threshold_pct": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Alert Threshold Pct" }, "budget_usd": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Budget Usd" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" } }, "title": "BudgetUpdate", "type": "object" }, "CashMovementCreate": { "properties": { "amount_exempt": { "default": 0, "title": "Amount Exempt", "type": "number" }, "amount_tax": { "default": 0, "title": "Amount Tax", "type": "number" }, "amount_taxable_base": { "default": 0, "title": "Amount Taxable Base", "type": "number" }, "amount_total": { "title": "Amount Total", "type": "number" }, "balance_running": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Balance Running" }, "bank_transaction_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Bank Transaction Id" }, "counterparty_tax_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Counterparty Tax Id" }, "currency": { "default": "CLP", "title": "Currency", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "document_number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Document Number" }, "document_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Document Type" }, "entity_id": { "title": "Entity Id", "type": "integer" }, "expense_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Expense Id" }, "invoice_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Invoice Id" }, "metadata": { "additionalProperties": true, "default": {}, "title": "Metadata", "type": "object" }, "operation_date": { "title": "Operation Date", "type": "string" }, "operation_type": { "description": "0=saldo_inicial, 1=ingreso, 2=egreso", "maximum": 2.0, "minimum": 0.0, "title": "Operation Type", "type": "integer" }, "party_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Party Id" }, "period_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Period Id" } }, "required": [ "operation_type", "operation_date", "amount_total", "entity_id" ], "title": "CashMovementCreate", "type": "object" }, "CashMovementUpdate": { "properties": { "balance_running": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Balance Running" }, "bank_transaction_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Bank Transaction Id" }, "counterparty_tax_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Counterparty Tax Id" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "expense_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Expense Id" }, "invoice_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Invoice Id" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "party_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Party Id" }, "period_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Period Id" } }, "title": "CashMovementUpdate", "type": "object" }, "ChatSessionCreate": { "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" } }, "title": "ChatSessionCreate", "type": "object" }, "ChatSessionResponse": { "properties": { "created_at": { "format": "date-time", "title": "Created At", "type": "string" }, "id": { "format": "uuid", "title": "Id", "type": "string" }, "messages": { "default": [], "items": { "$ref": "#/components/schemas/MessageResponse" }, "title": "Messages", "type": "array" }, "tenant_id": { "title": "Tenant Id", "type": "integer" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "updated_at": { "format": "date-time", "title": "Updated At", "type": "string" }, "user_id": { "format": "uuid", "title": "User Id", "type": "string" } }, "required": [ "id", "tenant_id", "user_id", "title", "created_at", "updated_at" ], "title": "ChatSessionResponse", "type": "object" }, "CheckoutRequest": { "additionalProperties": false, "properties": { "cancel_url": { "title": "Cancel Url", "type": "string" }, "success_url": { "title": "Success Url", "type": "string" }, "tier": { "default": "pro", "title": "Tier", "type": "string" } }, "required": [ "success_url", "cancel_url" ], "title": "CheckoutRequest", "type": "object" }, "CostExecutionComplete": { "properties": { "cache_read_tokens": { "default": 0, "title": "Cache Read Tokens", "type": "integer" }, "cache_write_tokens": { "default": 0, "title": "Cache Write Tokens", "type": "integer" }, "cost_usd": { "default": 0, "title": "Cost Usd", "type": "number" }, "duration_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Seconds" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "execution_id": { "title": "Execution Id", "type": "string" }, "input_tokens": { "default": 0, "title": "Input Tokens", "type": "integer" }, "metadata": { "additionalProperties": true, "default": {}, "title": "Metadata", "type": "object" }, "output_tokens": { "default": 0, "title": "Output Tokens", "type": "integer" }, "status": { "title": "Status", "type": "string" } }, "required": [ "execution_id", "status" ], "title": "CostExecutionComplete", "type": "object" }, "CostExecutionCreate": { "properties": { "agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent" }, "commit_sha": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Commit Sha" }, "execution_id": { "title": "Execution Id", "type": "string" }, "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model" }, "squad": { "title": "Squad", "type": "string" }, "trigger_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trigger Id" } }, "required": [ "execution_id", "squad" ], "title": "CostExecutionCreate", "type": "object" }, "CostMetricCreate": { "properties": { "dimensions": { "additionalProperties": true, "default": {}, "title": "Dimensions", "type": "object" }, "name": { "title": "Name", "type": "string" }, "period_end": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Period End" }, "period_start": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Period Start" }, "source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" }, "unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Unit" }, "value": { "title": "Value", "type": "number" } }, "required": [ "name", "value" ], "title": "CostMetricCreate", "type": "object" }, "CurrentSpendResponse": { "properties": { "amount_cents": { "default": 0, "title": "Amount Cents", "type": "integer" }, "period_start": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Period Start" }, "request_count": { "default": 0, "title": "Request Count", "type": "integer" }, "resets_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resets At" }, "spend_percent": { "default": 0, "title": "Spend Percent", "type": "integer" } }, "title": "CurrentSpendResponse", "type": "object" }, "DashboardSummary": { "description": "Consolidated dashboard response.", "properties": { "cost_today_usd": { "title": "Cost Today Usd", "type": "number" }, "pending_approvals": { "title": "Pending Approvals", "type": "integer" }, "recent_activity": { "items": { "$ref": "#/components/schemas/ActivityItem" }, "title": "Recent Activity", "type": "array" }, "running_agents": { "title": "Running Agents", "type": "integer" }, "squads_active": { "title": "Squads Active", "type": "integer" }, "squads_total": { "title": "Squads Total", "type": "integer" }, "tasks_today": { "title": "Tasks Today", "type": "integer" } }, "required": [ "running_agents", "tasks_today", "cost_today_usd", "pending_approvals", "squads_active", "squads_total", "recent_activity" ], "title": "DashboardSummary", "type": "object" }, "EnqueueRequest": { "properties": { "idempotency_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Idempotency Key" }, "payload": { "additionalProperties": true, "title": "Payload", "type": "object" }, "priority": { "$ref": "#/components/schemas/TaskPriority", "default": "normal" }, "task_type": { "$ref": "#/components/schemas/TaskType" }, "tenant_id": { "title": "Tenant Id", "type": "integer" } }, "required": [ "task_type", "tenant_id" ], "title": "EnqueueRequest", "type": "object" }, "EnqueueResponse": { "properties": { "status": { "default": "queued", "title": "Status", "type": "string" }, "task_id": { "title": "Task Id", "type": "string" } }, "required": [ "task_id" ], "title": "EnqueueResponse", "type": "object" }, "EventIngest": { "description": "Event ingestion request.", "properties": { "data": { "additionalProperties": true, "description": "Event payload", "title": "Data", "type": "object" }, "event_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Optional deduplication ID", "title": "Event Id" }, "event_type": { "description": "Type of event (e.g., push, invoice.paid)", "title": "Event Type", "type": "string" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "description": "Optional routing metadata", "title": "Metadata" }, "source": { "description": "Event source: github, stripe, slack, manual, etc.", "title": "Source", "type": "string" }, "timestamp": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "description": "Optional timestamp (defaults to now)", "title": "Timestamp" } }, "required": [ "source", "event_type", "data" ], "title": "EventIngest", "type": "object" }, "EventResponse": { "description": "Event response.", "properties": { "data": { "additionalProperties": true, "title": "Data", "type": "object" }, "event_type": { "title": "Event Type", "type": "string" }, "id": { "title": "Id", "type": "string" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "source": { "title": "Source", "type": "string" }, "timestamp": { "title": "Timestamp", "type": "number" } }, "required": [ "id", "source", "event_type", "data", "timestamp" ], "title": "EventResponse", "type": "object" }, "ExecutionCompleteRequest": { "description": "Cloud Run worker reports execution completion.", "properties": { "commit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Commit" }, "execution_id": { "title": "Execution Id", "type": "string" }, "result": { "additionalProperties": true, "default": {}, "title": "Result", "type": "object" }, "success": { "title": "Success", "type": "boolean" } }, "required": [ "execution_id", "success" ], "title": "ExecutionCompleteRequest", "type": "object" }, "Filter": { "properties": { "member": { "title": "Member", "type": "string" }, "operator": { "enum": [ "equals", "notEquals", "contains", "gt", "gte", "lt", "lte", "set", "notSet", "inDateRange" ], "title": "Operator", "type": "string" }, "values": { "items": {}, "title": "Values", "type": "array" } }, "required": [ "member", "operator" ], "title": "Filter", "type": "object" }, "GoalStatusUpdate": { "properties": { "status": { "title": "Status", "type": "string" } }, "required": [ "status" ], "title": "GoalStatusUpdate", "type": "object" }, "GoogleChatMessageCreate": { "description": "Request for queueing a Google Chat message.", "properties": { "installation_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Installation Id" }, "message_id": { "title": "Message Id", "type": "string" }, "space_name": { "title": "Space Name", "type": "string" }, "tenant_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Tenant Id" }, "text": { "title": "Text", "type": "string" }, "thread_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Thread Name" }, "user_email": { "title": "User Email", "type": "string" }, "user_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Name" } }, "required": [ "message_id", "space_name", "user_email", "text" ], "title": "GoogleChatMessageCreate", "type": "object" }, "GoogleInstallationCreate": { "description": "Request to create a Google Workspace installation.", "properties": { "admin_email": { "title": "Admin Email", "type": "string" }, "domain": { "title": "Domain", "type": "string" }, "organization_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Organization Name" }, "service_account_json": { "title": "Service Account Json", "type": "string" }, "tenant_slug": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tenant Slug" } }, "required": [ "domain", "service_account_json", "admin_email" ], "title": "GoogleInstallationCreate", "type": "object" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "title": "Detail", "type": "array" } }, "title": "HTTPValidationError", "type": "object" }, "MessageResponse": { "properties": { "content": { "title": "Content", "type": "string" }, "created_at": { "format": "date-time", "title": "Created At", "type": "string" }, "id": { "format": "uuid", "title": "Id", "type": "string" }, "role": { "title": "Role", "type": "string" }, "session_id": { "format": "uuid", "title": "Session Id", "type": "string" } }, "required": [ "id", "session_id", "role", "content", "created_at" ], "title": "MessageResponse", "type": "object" }, "MetricCreate": { "properties": { "agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent" }, "dimensions": { "additionalProperties": true, "default": {}, "title": "Dimensions", "type": "object" }, "name": { "title": "Name", "type": "string" }, "squad": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Squad" }, "unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Unit" }, "value": { "title": "Value", "type": "number" } }, "required": [ "name", "value" ], "title": "MetricCreate", "type": "object" }, "Order": { "properties": { "direction": { "default": "asc", "enum": [ "asc", "desc" ], "title": "Direction", "type": "string" }, "member": { "title": "Member", "type": "string" } }, "required": [ "member" ], "title": "Order", "type": "object" }, "PartyCreate": { "properties": { "address": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Address" }, "country": { "default": "CL", "title": "Country", "type": "string" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email" }, "entity_id": { "title": "Entity Id", "type": "integer" }, "legal_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Legal Name" }, "metadata": { "additionalProperties": true, "default": {}, "title": "Metadata", "type": "object" }, "name": { "title": "Name", "type": "string" }, "party_type": { "default": "both", "pattern": "^(vendor|customer|both)$", "title": "Party Type", "type": "string" }, "phone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Phone" }, "tax_id": { "title": "Tax Id", "type": "string" }, "tax_id_type": { "default": "RUT", "title": "Tax Id Type", "type": "string" } }, "required": [ "tax_id", "name", "entity_id" ], "title": "PartyCreate", "type": "object" }, "PartyUpdate": { "properties": { "address": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Address" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" }, "legal_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Legal Name" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "party_type": { "anyOf": [ { "pattern": "^(vendor|customer|both)$", "type": "string" }, { "type": "null" } ], "title": "Party Type" }, "phone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Phone" } }, "title": "PartyUpdate", "type": "object" }, "PortalRequest": { "additionalProperties": false, "properties": { "return_url": { "title": "Return Url", "type": "string" } }, "required": [ "return_url" ], "title": "PortalRequest", "type": "object" }, "QueryRequest": { "properties": { "cube": { "title": "Cube", "type": "string" }, "dimensions": { "items": { "type": "string" }, "title": "Dimensions", "type": "array" }, "filters": { "items": { "$ref": "#/components/schemas/Filter" }, "title": "Filters", "type": "array" }, "limit": { "default": 1000, "title": "Limit", "type": "integer" }, "measures": { "items": { "type": "string" }, "title": "Measures", "type": "array" }, "order": { "items": { "$ref": "#/components/schemas/Order" }, "title": "Order", "type": "array" }, "timeDimensions": { "items": { "$ref": "#/components/schemas/TimeDimension" }, "title": "Timedimensions", "type": "array" } }, "required": [ "cube" ], "title": "QueryRequest", "type": "object" }, "SlackMessageCreate": { "description": "Request schema for queuing a Slack message.", "properties": { "channel_id": { "title": "Channel Id", "type": "string" }, "context": { "additionalProperties": true, "default": {}, "title": "Context", "type": "object" }, "message_id": { "title": "Message Id", "type": "string" }, "team_id": { "title": "Team Id", "type": "string" }, "text": { "title": "Text", "type": "string" }, "thread_ts": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Thread Ts" }, "user_id": { "title": "User Id", "type": "string" } }, "required": [ "message_id", "team_id", "channel_id", "user_id", "text" ], "title": "SlackMessageCreate", "type": "object" }, "SlackMessageResponded": { "description": "Request schema for marking a message as responded.", "properties": { "response_ts": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Response Ts" } }, "title": "SlackMessageResponded", "type": "object" }, "SlackSendRequest": { "description": "Request schema for sending a proactive Slack message.", "properties": { "blocks": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Blocks" }, "channel": { "title": "Channel", "type": "string" }, "text": { "title": "Text", "type": "string" }, "thread_ts": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Thread Ts" } }, "required": [ "channel", "text" ], "title": "SlackSendRequest", "type": "object" }, "SpendLimitsResponse": { "properties": { "alert_emails": { "items": { "type": "string" }, "title": "Alert Emails", "type": "array" }, "alert_thresholds": { "items": { "type": "integer" }, "title": "Alert Thresholds", "type": "array" }, "enforced": { "title": "Enforced", "type": "boolean" }, "spend_limit_usd": { "title": "Spend Limit Usd", "type": "number" } }, "required": [ "spend_limit_usd", "enforced", "alert_thresholds", "alert_emails" ], "title": "SpendLimitsResponse", "type": "object" }, "SpendLimitsUpdate": { "additionalProperties": false, "properties": { "alert_emails": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Alert Emails" }, "alert_thresholds": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "title": "Alert Thresholds" }, "spend_limit_usd": { "anyOf": [ { "minimum": 0.0, "type": "number" }, { "type": "null" } ], "title": "Spend Limit Usd" } }, "title": "SpendLimitsUpdate", "type": "object" }, "SprintGoalResponse": { "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "id": { "title": "Id", "type": "integer" }, "lead_agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Lead Agent" }, "linked_issues": { "default": [], "items": { "type": "string" }, "title": "Linked Issues", "type": "array" }, "priority": { "title": "Priority", "type": "string" }, "squad": { "title": "Squad", "type": "string" }, "status": { "title": "Status", "type": "string" }, "title": { "title": "Title", "type": "string" } }, "required": [ "id", "squad", "title", "priority", "status" ], "title": "SprintGoalResponse", "type": "object" }, "SprintResponse": { "properties": { "closed_issues": { "title": "Closed Issues", "type": "integer" }, "goals": { "items": { "$ref": "#/components/schemas/SprintGoalResponse" }, "title": "Goals", "type": "array" }, "id": { "title": "Id", "type": "integer" }, "merged_prs": { "title": "Merged Prs", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "sprint_number": { "title": "Sprint Number", "type": "integer" }, "started_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Started At" }, "status": { "title": "Status", "type": "string" }, "target_issues": { "title": "Target Issues", "type": "integer" }, "target_prs": { "title": "Target Prs", "type": "integer" }, "tracking_pr": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tracking Pr" }, "type": { "title": "Type", "type": "string" } }, "required": [ "id", "sprint_number", "name", "status", "type", "target_prs", "merged_prs", "target_issues", "closed_issues", "goals" ], "title": "SprintResponse", "type": "object" }, "SprintUpdateRequest": { "properties": { "closed_issues": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Closed Issues" }, "merged_prs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Merged Prs" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, "title": "SprintUpdateRequest", "type": "object" }, "SubscriptionResponse": { "properties": { "cancel_at_period_end": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Cancel At Period End" }, "current_period_end": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Current Period End" }, "has_subscription": { "title": "Has Subscription", "type": "boolean" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, "required": [ "has_subscription" ], "title": "SubscriptionResponse", "type": "object" }, "TaskPriority": { "enum": [ "low", "normal", "high", "urgent" ], "title": "TaskPriority", "type": "string" }, "TaskResponse": { "properties": { "completed_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Completed At" }, "created_at": { "format": "date-time", "title": "Created At", "type": "string" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "result": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Result" }, "started_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Started At" }, "status": { "title": "Status", "type": "string" }, "task_id": { "title": "Task Id", "type": "string" } }, "required": [ "task_id", "status", "created_at" ], "title": "TaskResponse", "type": "object" }, "TaskType": { "enum": [ "slack_response", "agent_run", "webhook_process" ], "title": "TaskType", "type": "string" }, "TierResponse": { "properties": { "display_name": { "title": "Display Name", "type": "string" }, "features": { "additionalProperties": true, "title": "Features", "type": "object" }, "monthly_request_limit": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Monthly Request Limit" }, "price_cents_monthly": { "title": "Price Cents Monthly", "type": "integer" }, "requests_per_day": { "title": "Requests Per Day", "type": "integer" }, "requests_per_minute": { "title": "Requests Per Minute", "type": "integer" }, "tier": { "title": "Tier", "type": "string" } }, "required": [ "tier", "display_name", "requests_per_minute", "requests_per_day", "monthly_request_limit", "price_cents_monthly", "features" ], "title": "TierResponse", "type": "object" }, "TimeDimension": { "properties": { "dateRange": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Daterange" }, "dimension": { "title": "Dimension", "type": "string" }, "granularity": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Granularity" } }, "required": [ "dimension" ], "title": "TimeDimension", "type": "object" }, "ToolRef": { "properties": { "name": { "title": "Name", "type": "string" }, "type": { "title": "Type", "type": "string" } }, "required": [ "type", "name" ], "title": "ToolRef", "type": "object" }, "TriggerCreate": { "properties": { "agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent" }, "condition": { "title": "Condition", "type": "string" }, "context_template": { "additionalProperties": true, "default": {}, "title": "Context Template", "type": "object" }, "cooldown": { "default": "1 hour", "title": "Cooldown", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "enabled": { "default": true, "title": "Enabled", "type": "boolean" }, "eval_schedule": { "default": "*/5 * * * *", "title": "Eval Schedule", "type": "string" }, "max_concurrent": { "default": 1, "title": "Max Concurrent", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "priority": { "default": 5, "maximum": 10.0, "minimum": 1.0, "title": "Priority", "type": "integer" }, "squad": { "title": "Squad", "type": "string" } }, "required": [ "name", "squad", "condition" ], "title": "TriggerCreate", "type": "object" }, "TriggerResponse": { "properties": { "agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent" }, "condition": { "title": "Condition", "type": "string" }, "context_template": { "additionalProperties": true, "title": "Context Template", "type": "object" }, "cooldown": { "title": "Cooldown", "type": "string" }, "created_at": { "format": "date-time", "title": "Created At", "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "enabled": { "title": "Enabled", "type": "boolean" }, "eval_schedule": { "title": "Eval Schedule", "type": "string" }, "fire_count": { "title": "Fire Count", "type": "integer" }, "id": { "format": "uuid", "title": "Id", "type": "string" }, "last_evaluated": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Last Evaluated" }, "last_fired": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Last Fired" }, "max_concurrent": { "title": "Max Concurrent", "type": "integer" }, "name": { "title": "Name", "type": "string" }, "priority": { "title": "Priority", "type": "integer" }, "squad": { "title": "Squad", "type": "string" } }, "required": [ "id", "name", "description", "squad", "agent", "condition", "eval_schedule", "priority", "cooldown", "max_concurrent", "context_template", "enabled", "last_evaluated", "last_fired", "fire_count", "created_at" ], "title": "TriggerResponse", "type": "object" }, "TriggerSyncItem": { "properties": { "agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent" }, "condition": { "title": "Condition", "type": "string" }, "context": { "additionalProperties": true, "title": "Context", "type": "object" }, "cooldown": { "default": "1 hour", "title": "Cooldown", "type": "string" }, "name": { "title": "Name", "type": "string" }, "priority": { "default": 50, "title": "Priority", "type": "integer" }, "squad": { "title": "Squad", "type": "string" } }, "required": [ "name", "squad", "condition" ], "title": "TriggerSyncItem", "type": "object" }, "TriggerUpdate": { "properties": { "condition": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Condition" }, "context_template": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Context Template" }, "cooldown": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cooldown" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" }, "eval_schedule": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Eval Schedule" }, "max_concurrent": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Concurrent" }, "priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Priority" } }, "title": "TriggerUpdate", "type": "object" }, "TurnMessageUuids": { "properties": { "assistant_message_uuid": { "title": "Assistant Message Uuid", "type": "string" }, "human_message_uuid": { "title": "Human Message Uuid", "type": "string" } }, "required": [ "human_message_uuid", "assistant_message_uuid" ], "title": "TurnMessageUuids", "type": "object" }, "ValidationError": { "properties": { "ctx": { "title": "Context", "type": "object" }, "input": { "title": "Input" }, "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "title": "Location", "type": "array" }, "msg": { "title": "Message", "type": "string" }, "type": { "title": "Error Type", "type": "string" } }, "required": [ "loc", "msg", "type" ], "title": "ValidationError", "type": "object" }, "VerifyResponse": { "properties": { "spend_status": { "default": "ok", "title": "Spend Status", "type": "string" }, "user": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "User" }, "valid": { "title": "Valid", "type": "boolean" }, "workspace": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Workspace" } }, "required": [ "valid" ], "title": "VerifyResponse", "type": "object" }, "ViewContext": { "description": "What the operator is currently looking at in the cockpit.\n\nLets the Chief ground its answer (and scope its tool calls) to the view \u2014\nthe context-aware chat that a generic chat window can't do.", "properties": { "domain": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Domain" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "level": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Level" } }, "title": "ViewContext", "type": "object" }, "routers__chat__MessageCreate": { "properties": { "content": { "title": "Content", "type": "string" }, "role": { "title": "Role", "type": "string" } }, "required": [ "role", "content" ], "title": "MessageCreate", "type": "object" }, "routers__conversations__MessageCreate": { "properties": { "attachments": { "items": { "additionalProperties": true, "type": "object" }, "title": "Attachments", "type": "array" }, "context": { "anyOf": [ { "$ref": "#/components/schemas/ViewContext" }, { "type": "null" } ] }, "locale": { "default": "en-US", "title": "Locale", "type": "string" }, "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model" }, "parent_message_uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parent Message Uuid" }, "prompt": { "title": "Prompt", "type": "string" }, "rendering_mode": { "default": "messages", "title": "Rendering Mode", "type": "string" }, "timezone": { "default": "UTC", "title": "Timezone", "type": "string" }, "tools": { "items": { "$ref": "#/components/schemas/ToolRef" }, "title": "Tools", "type": "array" }, "turn_message_uuids": { "anyOf": [ { "$ref": "#/components/schemas/TurnMessageUuids" }, { "type": "null" } ] } }, "required": [ "prompt" ], "title": "MessageCreate", "type": "object" }, "routers__executions__ExecutionResponse": { "properties": { "agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent" }, "completed_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Completed At" }, "condition_snapshot": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Condition Snapshot" }, "context": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Context" }, "created_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Created At" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "id": { "title": "Id", "type": "integer" }, "result": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Result" }, "squad": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Squad" }, "started_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Started At" }, "status": { "title": "Status", "type": "string" }, "trigger_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Trigger Id" }, "trigger_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trigger Name" } }, "required": [ "id", "status" ], "title": "ExecutionResponse", "type": "object" }, "routers__triggers__ExecutionResponse": { "properties": { "completed_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Completed At" }, "condition_snapshot": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Condition Snapshot" }, "context": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Context" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "fired_at": { "format": "date-time", "title": "Fired At", "type": "string" }, "id": { "format": "uuid", "title": "Id", "type": "string" }, "result": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Result" }, "started_at": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "title": "Started At" }, "status": { "title": "Status", "type": "string" }, "trigger_id": { "format": "uuid", "title": "Trigger Id", "type": "string" } }, "required": [ "id", "trigger_id", "fired_at", "status", "started_at", "completed_at", "condition_snapshot", "context", "result", "error" ], "title": "ExecutionResponse", "type": "object" } }, "securitySchemes": { "APIKeyHeader": { "in": "header", "name": "X-API-Key", "type": "apiKey" } } }, "info": { "description": "Product API for triggers, approvals, Slack, and agent execution", "title": "Squads API", "version": "0.2.0" }, "openapi": "3.1.0", "paths": { "/agent-dispatch": { "post": { "description": "Manually create an agent dispatch request.", "operationId": "create_dispatch_agent_dispatch_post", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Create Dispatch", "tags": [ "agent-dispatch" ] } }, "/agent-dispatch/pending": { "get": { "description": "Get pending agent dispatch requests for workers to process.", "operationId": "get_pending_dispatches_agent_dispatch_pending_get", "parameters": [ { "in": "query", "name": "limit", "required": false, "schema": { "default": 10, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Get Pending Dispatches", "tags": [ "agent-dispatch" ] } }, "/agent-dispatch/{dispatch_id}/complete": { "post": { "description": "Mark a dispatch as completed.", "operationId": "complete_dispatch_agent_dispatch__dispatch_id__complete_post", "parameters": [ { "in": "path", "name": "dispatch_id", "required": true, "schema": { "title": "Dispatch Id", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Complete Dispatch", "tags": [ "agent-dispatch" ] } }, "/agent-executions": { "get": { "description": "List agent executions with optional filters.", "operationId": "list_agent_executions_agent_executions_get", "parameters": [ { "in": "query", "name": "squad", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Squad" } }, { "in": "query", "name": "agent", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent" } }, { "in": "query", "name": "status", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "title": "Limit", "type": "integer" } }, { "in": "query", "name": "offset", "required": false, "schema": { "default": 0, "title": "Offset", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Agent Executions", "tags": [ "agent-dispatch" ] }, "post": { "description": "Log an agent execution start. Returns execution_id for updates.", "operationId": "create_agent_execution_agent_executions_post", "responses": { "201": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Create Agent Execution", "tags": [ "agent-dispatch" ] } }, "/agent-executions/stats": { "get": { "description": "Get execution statistics.", "operationId": "get_agent_execution_stats_agent_executions_stats_get", "parameters": [ { "in": "query", "name": "squad", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Squad" } }, { "in": "query", "name": "days", "required": false, "schema": { "default": 7, "title": "Days", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Agent Execution Stats", "tags": [ "agent-dispatch" ] } }, "/agent-executions/{execution_id}": { "get": { "description": "Get a specific agent execution by ID.", "operationId": "get_agent_execution_agent_executions__execution_id__get", "parameters": [ { "in": "path", "name": "execution_id", "required": true, "schema": { "title": "Execution Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Agent Execution", "tags": [ "agent-dispatch" ] }, "patch": { "description": "Update an agent execution with results.", "operationId": "update_agent_execution_agent_executions__execution_id__patch", "parameters": [ { "in": "path", "name": "execution_id", "required": true, "schema": { "title": "Execution Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Update Agent Execution", "tags": [ "agent-dispatch" ] } }, "/api-keys": { "get": { "description": "List all API keys for the authenticated user.", "operationId": "list_api_keys_api_keys_get", "responses": { "200": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/APIKeyResponse" }, "title": "Response List Api Keys Api Keys Get", "type": "array" } } }, "description": "Successful Response" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "List Api Keys", "tags": [ "api-keys" ] }, "post": { "description": "Create a new API key. The full key is shown only once.", "operationId": "create_api_key_api_keys_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/APIKeyCreate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/APIKeyCreated" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Create Api Key", "tags": [ "api-keys" ] } }, "/api-keys/{key_id}": { "delete": { "description": "Delete an API key.", "operationId": "delete_api_key_api_keys__key_id__delete", "parameters": [ { "in": "path", "name": "key_id", "required": true, "schema": { "title": "Key Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Delete Api Key", "tags": [ "api-keys" ] } }, "/api/chat/sessions": { "get": { "description": "List the authenticated user's chat sessions, newest first.", "operationId": "list_sessions_api_chat_sessions_get", "parameters": [ { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ChatSessionResponse" }, "title": "Response List Sessions Api Chat Sessions Get", "type": "array" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "List Sessions", "tags": [ "chat" ] }, "post": { "description": "Create a new chat session for the authenticated user.", "operationId": "create_session_api_chat_sessions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatSessionCreate" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatSessionResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Create Session", "tags": [ "chat" ] } }, "/api/chat/sessions/{session_id}": { "get": { "description": "Get a chat session with its full message history.", "operationId": "get_session_api_chat_sessions__session_id__get", "parameters": [ { "in": "path", "name": "session_id", "required": true, "schema": { "format": "uuid", "title": "Session Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatSessionResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Get Session", "tags": [ "chat" ] } }, "/api/chat/sessions/{session_id}/messages": { "post": { "description": "Append a message to a chat session and bump session updated_at.", "operationId": "add_message_api_chat_sessions__session_id__messages_post", "parameters": [ { "in": "path", "name": "session_id", "required": true, "schema": { "format": "uuid", "title": "Session Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/routers__chat__MessageCreate" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Add Message", "tags": [ "chat" ] } }, "/api/conversations/{conversation_uuid}/messages": { "post": { "description": "Stream the chief's response to the operator's message as Anthropic SSE.", "operationId": "post_message_api_conversations__conversation_uuid__messages_post", "parameters": [ { "in": "path", "name": "conversation_uuid", "required": true, "schema": { "format": "uuid", "title": "Conversation Uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/routers__conversations__MessageCreate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Post Message", "tags": [ "conversations" ] } }, "/api/dashboard/summary": { "get": { "description": "Consolidated dashboard data in a single API call.\n\nScoped to the authenticated user's tenant. Handles empty state\ngracefully for new tenants with no data.", "operationId": "get_dashboard_summary_api_dashboard_summary_get", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DashboardSummary" } } }, "description": "Successful Response" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Get Dashboard Summary", "tags": [ "dashboard" ] } }, "/api/executions/{execution_id}/complete": { "post": { "description": "Cloud Run worker reports execution completion.", "operationId": "execution_complete_api_executions__execution_id__complete_post", "parameters": [ { "in": "path", "name": "execution_id", "required": true, "schema": { "title": "Execution Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecutionCompleteRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Execution Complete", "tags": [ "webhooks" ] } }, "/api/slack/commands": { "post": { "description": "Handle Slack slash commands (/squads billing, /squads status, /squads help).", "operationId": "handle_slack_commands_api_slack_commands_post", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Handle Slack Commands", "tags": [ "slack" ] } }, "/api/slack/interactions": { "post": { "description": "Handle Slack interactive actions (button clicks, modal submissions).", "operationId": "handle_slack_interactions_api_slack_interactions_post", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Handle Slack Interactions", "tags": [ "slack" ] } }, "/approvals": { "get": { "description": "List approvals, optionally filtered. Tenant-scoped for user callers.", "operationId": "list_approvals_approvals_get", "parameters": [ { "in": "query", "name": "status", "required": false, "schema": { "default": "pending", "title": "Status", "type": "string" } }, { "in": "query", "name": "squad", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Squad" } }, { "in": "query", "name": "type", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Type" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "List Approvals", "tags": [ "approvals" ] }, "post": { "description": "Create a new approval request.", "operationId": "create_approval_approvals_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApprovalCreate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Create Approval", "tags": [ "approvals" ] } }, "/approvals/check": { "post": { "description": "Check approval tier for an action, post to Slack if needed, optionally wait.", "operationId": "check_approval_approvals_check_post", "parameters": [ { "in": "query", "name": "squad", "required": true, "schema": { "title": "Squad", "type": "string" } }, { "in": "query", "name": "action", "required": true, "schema": { "title": "Action", "type": "string" } }, { "in": "query", "name": "description", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, { "in": "query", "name": "agent", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent" } }, { "in": "query", "name": "execution_id", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Execution Id" } }, { "in": "query", "name": "wait", "required": false, "schema": { "default": false, "title": "Wait", "type": "boolean" } }, { "in": "query", "name": "timeout", "required": false, "schema": { "default": 300, "title": "Timeout", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Check Approval", "tags": [ "approvals" ] } }, "/approvals/expire": { "post": { "description": "Expire all overdue pending approvals. Called by scheduler.", "operationId": "expire_approvals_approvals_expire_post", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Expire Approvals", "tags": [ "approvals" ] } }, "/approvals/stats": { "get": { "description": "Approval statistics. Tenant-scoped for user callers.", "operationId": "approval_stats_approvals_stats_get", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Approval Stats", "tags": [ "approvals" ] } }, "/approvals/{approval_id}": { "get": { "description": "Get a single approval by ID. Tenant-scoped for user callers.", "operationId": "get_approval_approvals__approval_id__get", "parameters": [ { "in": "path", "name": "approval_id", "required": true, "schema": { "title": "Approval Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Get Approval", "tags": [ "approvals" ] } }, "/approvals/{approval_id}/decide": { "post": { "description": "Make a decision on an approval. Tenant-scoped for user callers.", "operationId": "decide_approval_approvals__approval_id__decide_post", "parameters": [ { "in": "path", "name": "approval_id", "required": true, "schema": { "title": "Approval Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApprovalDecision" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Decide Approval", "tags": [ "approvals" ] } }, "/approvals/{approval_id}/wait": { "get": { "description": "Long-poll until decision or timeout. Tenant-scoped for user callers.", "operationId": "wait_for_approval_approvals__approval_id__wait_get", "parameters": [ { "in": "path", "name": "approval_id", "required": true, "schema": { "title": "Approval Id", "type": "string" } }, { "in": "query", "name": "timeout", "required": false, "schema": { "default": 300, "title": "Timeout", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Wait For Approval", "tags": [ "approvals" ] } }, "/auth/cli": { "get": { "description": "CLI Auth: Show login form.", "operationId": "cli_auth_start_auth_cli_get", "parameters": [ { "in": "query", "name": "callback", "required": true, "schema": { "title": "Callback", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Cli Auth Start", "tags": [ "auth" ] } }, "/auth/cli/login": { "post": { "description": "Process CLI login form submission.", "operationId": "cli_auth_login_auth_cli_login_post", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Cli Auth Login", "tags": [ "auth" ] } }, "/auth/cli/verify": { "get": { "description": "Verify CLI auth token.", "operationId": "cli_auth_verify_auth_cli_verify_get", "parameters": [ { "in": "header", "name": "Authorization", "required": true, "schema": { "title": "Authorization", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Cli Auth Verify", "tags": [ "auth" ] } }, "/auth/google": { "get": { "description": "Start Google OAuth flow for CLI login.", "operationId": "google_auth_start_auth_google_get", "parameters": [ { "in": "query", "name": "callback", "required": false, "schema": { "default": "http://localhost:54321/callback", "title": "Callback", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Google Auth Start", "tags": [ "auth" ] } }, "/auth/google/callback": { "get": { "description": "Handle Google OAuth callback.", "operationId": "google_auth_callback_auth_google_callback_get", "parameters": [ { "in": "query", "name": "code", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Code" } }, { "in": "query", "name": "state", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "State" } }, { "in": "query", "name": "error", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Google Auth Callback", "tags": [ "auth" ] } }, "/auth/logout": { "get": { "description": "Logout: delete session and clear cookie (GET).", "operationId": "auth_logout_get_auth_logout_get", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Auth Logout Get", "tags": [ "auth" ] }, "post": { "description": "Logout: delete session and clear cookie (POST).", "operationId": "auth_logout_post_auth_logout_post", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Auth Logout Post", "tags": [ "auth" ] } }, "/auth/me": { "get": { "description": "Get current authenticated user and workspace context.", "operationId": "auth_me_auth_me_get", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Auth Me", "tags": [ "auth" ] } }, "/auth/slack": { "get": { "description": "Start Slack OAuth flow.", "operationId": "slack_oauth_start_auth_slack_get", "parameters": [ { "in": "query", "name": "redirect_after", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Redirect After" } }, { "in": "query", "name": "tenant", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tenant" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Slack Oauth Start", "tags": [ "auth" ] } }, "/auth/slack/callback": { "get": { "description": "Handle Slack OAuth callback.", "operationId": "slack_oauth_callback_auth_slack_callback_get", "parameters": [ { "in": "query", "name": "code", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Code" } }, { "in": "query", "name": "state", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "State" } }, { "in": "query", "name": "error", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, { "in": "query", "name": "error_description", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Description" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Slack Oauth Callback", "tags": [ "auth" ] } }, "/auth/verify": { "get": { "description": "Verify an API key and check spend limits.\nReturns user info and spend status.", "operationId": "verify_api_key_auth_verify_get", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyResponse" } } }, "description": "Successful Response" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Verify Api Key", "tags": [ "api-keys" ] } }, "/billing/checkout": { "post": { "description": "Create a Stripe checkout session for subscription upgrade.", "operationId": "create_checkout_billing_checkout_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CheckoutRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Create Checkout", "tags": [ "billing" ] } }, "/billing/current-spend": { "get": { "description": "Get current month's spend for the workspace.", "operationId": "get_current_spend_billing_current_spend_get", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CurrentSpendResponse" } } }, "description": "Successful Response" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Get Current Spend", "tags": [ "billing" ] } }, "/billing/portal": { "post": { "description": "Create a Stripe billing portal session.", "operationId": "create_portal_billing_portal_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortalRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Create Portal", "tags": [ "billing" ] } }, "/billing/spend-limits": { "get": { "description": "Get spend limit configuration for the workspace.", "operationId": "get_spend_limits_billing_spend_limits_get", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpendLimitsResponse" } } }, "description": "Successful Response" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Get Spend Limits", "tags": [ "billing" ] }, "patch": { "description": "Update spend limit configuration.", "operationId": "update_spend_limits_billing_spend_limits_patch", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpendLimitsUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SpendLimitsResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Update Spend Limits", "tags": [ "billing" ] } }, "/billing/subscription": { "get": { "description": "Get current subscription status from Stripe.", "operationId": "get_subscription_billing_subscription_get", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionResponse" } } }, "description": "Successful Response" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Get Subscription", "tags": [ "billing" ] } }, "/billing/tier": { "get": { "description": "Get current tier details for the workspace.", "operationId": "get_tier_info_billing_tier_get", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TierResponse" } } }, "description": "Successful Response" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Get Tier Info", "tags": [ "billing" ] } }, "/brief/actions": { "post": { "description": "Create action items for a brief.", "operationId": "create_brief_actions_brief_actions_post", "parameters": [ { "in": "query", "name": "brief_id", "required": true, "schema": { "title": "Brief Id", "type": "string" } }, { "in": "query", "name": "squad", "required": true, "schema": { "title": "Squad", "type": "string" } }, { "in": "query", "name": "agent", "required": true, "schema": { "title": "Agent", "type": "string" } }, { "in": "query", "name": "slack_channel", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Slack Channel" } }, { "in": "query", "name": "slack_ts", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Slack Ts" } } ], "requestBody": { "content": { "application/json": { "schema": { "items": { "additionalProperties": true, "type": "object" }, "title": "Actions", "type": "array" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Create Brief Actions", "tags": [ "slack" ] } }, "/brief/actions/{brief_id}": { "get": { "description": "Get all actions for a brief.", "operationId": "get_brief_actions_brief_actions__brief_id__get", "parameters": [ { "in": "path", "name": "brief_id", "required": true, "schema": { "title": "Brief Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Brief Actions", "tags": [ "slack" ] } }, "/costs/alerts": { "get": { "description": "Get cost alerts.", "operationId": "get_cost_alerts_costs_alerts_get", "parameters": [ { "in": "query", "name": "acknowledged", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Acknowledged" } }, { "in": "query", "name": "severity", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Severity" } }, { "in": "query", "name": "days", "required": false, "schema": { "default": 7, "title": "Days", "type": "integer" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Cost Alerts", "tags": [ "costs" ] }, "post": { "description": "Create a cost alert.", "operationId": "create_cost_alert_costs_alerts_post", "parameters": [ { "in": "query", "name": "alert_type", "required": true, "schema": { "title": "Alert Type", "type": "string" } }, { "in": "query", "name": "severity", "required": true, "schema": { "title": "Severity", "type": "string" } }, { "in": "query", "name": "message", "required": true, "schema": { "title": "Message", "type": "string" } }, { "in": "query", "name": "cost_usd", "required": false, "schema": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Cost Usd" } }, { "in": "query", "name": "threshold_usd", "required": false, "schema": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Threshold Usd" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": true, "default": {}, "title": "Dimensions", "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Create Cost Alert", "tags": [ "costs" ] } }, "/costs/alerts/{alert_id}/acknowledge": { "post": { "description": "Acknowledge a cost alert.", "operationId": "acknowledge_alert_costs_alerts__alert_id__acknowledge_post", "parameters": [ { "in": "path", "name": "alert_id", "required": true, "schema": { "title": "Alert Id", "type": "integer" } }, { "in": "query", "name": "acknowledged_by", "required": false, "schema": { "default": "system", "title": "Acknowledged By", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Acknowledge Alert", "tags": [ "costs" ] } }, "/costs/budgets": { "get": { "description": "Get all cost budgets.", "operationId": "get_budgets_costs_budgets_get", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Get Budgets", "tags": [ "costs" ] } }, "/costs/budgets/{name}": { "put": { "description": "Update a cost budget.", "operationId": "update_budget_costs_budgets__name__put", "parameters": [ { "in": "path", "name": "name", "required": true, "schema": { "title": "Name", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BudgetUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Update Budget", "tags": [ "costs" ] } }, "/costs/executions": { "get": { "description": "Get recent agent executions.", "operationId": "get_executions_costs_executions_get", "parameters": [ { "in": "query", "name": "squad", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Squad" } }, { "in": "query", "name": "status", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "in": "query", "name": "hours", "required": false, "schema": { "default": 24, "title": "Hours", "type": "integer" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Executions", "tags": [ "costs" ] }, "post": { "description": "Record the start of an agent execution.", "operationId": "start_execution_costs_executions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CostExecutionCreate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Start Execution", "tags": [ "costs" ] } }, "/costs/executions/{execution_id}/complete": { "post": { "description": "Record the completion of an agent execution.", "operationId": "complete_execution_costs_executions__execution_id__complete_post", "parameters": [ { "in": "path", "name": "execution_id", "required": true, "schema": { "title": "Execution Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CostExecutionComplete" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Complete Execution", "tags": [ "costs" ] } }, "/costs/metrics": { "get": { "description": "Get recent metrics, optionally filtered by name.", "operationId": "get_metrics_costs_metrics_get", "parameters": [ { "in": "query", "name": "name", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" } }, { "in": "query", "name": "hours", "required": false, "schema": { "default": 24, "title": "Hours", "type": "integer" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 100, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Metrics", "tags": [ "costs" ] }, "post": { "description": "Record a cost metric.", "operationId": "record_metric_costs_metrics_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CostMetricCreate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Record Metric", "tags": [ "costs" ] } }, "/costs/stats": { "get": { "description": "Get overall cost statistics.", "operationId": "get_cost_stats_costs_stats_get", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Get Cost Stats", "tags": [ "costs" ] } }, "/costs/summary/daily": { "get": { "description": "Get daily cost summaries.", "operationId": "get_daily_summary_costs_summary_daily_get", "parameters": [ { "in": "query", "name": "days", "required": false, "schema": { "default": 7, "title": "Days", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Daily Summary", "tags": [ "costs" ] } }, "/costs/summary/today": { "get": { "description": "Get today's cost summary with live data from executions.", "operationId": "get_today_summary_costs_summary_today_get", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Get Today Summary", "tags": [ "costs" ] } }, "/domains": { "get": { "description": "Per-domain summary cards for the cockpit home grid (over the semantic layer).", "operationId": "list_domains_domains_get", "responses": { "200": { "content": { "application/json": { "schema": { "items": { "additionalProperties": true, "type": "object" }, "title": "Response List Domains Domains Get", "type": "array" } } }, "description": "Successful Response" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "List Domains", "tags": [ "domains" ] } }, "/domains/query": { "post": { "description": "Run an ad-hoc Cube-shaped query against a declared cube.", "operationId": "query_domain_route_domains_query_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueryRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": true, "title": "Response Query Domain Route Domains Query Post", "type": "object" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Query Domain Route", "tags": [ "domains" ] } }, "/domains/schema": { "get": { "description": "Introspection: domains \u2192 cubes \u2192 measures/dimensions.", "operationId": "domains_schema_domains_schema_get", "responses": { "200": { "content": { "application/json": { "schema": { "additionalProperties": true, "title": "Response Domains Schema Domains Schema Get", "type": "object" } } }, "description": "Successful Response" } }, "summary": "Domains Schema", "tags": [ "domains" ] } }, "/erp/accounts-payable": { "get": { "description": "Outstanding invoices we've received but not paid (AP).", "operationId": "list_accounts_payable_erp_accounts_payable_get", "parameters": [ { "in": "query", "name": "entity_id", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Entity Id" } }, { "in": "query", "name": "overdue_only", "required": false, "schema": { "default": false, "title": "Overdue Only", "type": "boolean" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 200, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Accounts Payable", "tags": [ "erp-views" ] } }, "/erp/accounts-receivable": { "get": { "description": "Outstanding invoices we've emitted but not been paid for (AR).", "operationId": "list_accounts_receivable_erp_accounts_receivable_get", "parameters": [ { "in": "query", "name": "entity_id", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Entity Id" } }, { "in": "query", "name": "overdue_only", "required": false, "schema": { "default": false, "title": "Overdue Only", "type": "boolean" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 200, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Accounts Receivable", "tags": [ "erp-views" ] } }, "/erp/cash-movements": { "get": { "description": "List cash movements with flexible filters.", "operationId": "list_cash_movements_erp_cash_movements_get", "parameters": [ { "in": "query", "name": "entity_id", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Entity Id" } }, { "in": "query", "name": "operation_type", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Operation Type" } }, { "in": "query", "name": "party_id", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Party Id" } }, { "in": "query", "name": "period_id", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Period Id" } }, { "in": "query", "name": "date_from", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Date From" } }, { "in": "query", "name": "date_to", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Date To" } }, { "in": "query", "name": "currency", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Currency" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 100, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Cash Movements", "tags": [ "erp-cash-movements" ] }, "post": { "description": "Create a cash movement. Caller is responsible for `balance_running`\n(no auto-compute \u2014 accounting integrity belongs to the source of truth).", "operationId": "create_cash_movement_erp_cash_movements_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CashMovementCreate" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Create Cash Movement", "tags": [ "erp-cash-movements" ] } }, "/erp/cash-movements/{movement_id}": { "get": { "operationId": "get_cash_movement_erp_cash_movements__movement_id__get", "parameters": [ { "in": "path", "name": "movement_id", "required": true, "schema": { "title": "Movement Id", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Cash Movement", "tags": [ "erp-cash-movements" ] }, "patch": { "description": "Update a cash movement. Operation_type, date, and amounts are immutable\nonce recorded (delete + re-create if those need to change).", "operationId": "update_cash_movement_erp_cash_movements__movement_id__patch", "parameters": [ { "in": "path", "name": "movement_id", "required": true, "schema": { "title": "Movement Id", "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CashMovementUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Update Cash Movement", "tags": [ "erp-cash-movements" ] } }, "/erp/cash-position": { "get": { "description": "Daily cash position: net_flow + latest_balance per (entity, currency, day).", "operationId": "get_cash_position_erp_cash_position_get", "parameters": [ { "in": "query", "name": "entity_id", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Entity Id" } }, { "in": "query", "name": "currency", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Currency" } }, { "in": "query", "name": "date_from", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Date From" } }, { "in": "query", "name": "date_to", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Date To" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 90, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Cash Position", "tags": [ "erp-views" ] } }, "/erp/parties": { "get": { "description": "List parties. Filter by entity_id, party_type, tax_id, or name (ILIKE).", "operationId": "list_parties_erp_parties_get", "parameters": [ { "in": "query", "name": "entity_id", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Entity Id" } }, { "in": "query", "name": "party_type", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Party Type" } }, { "in": "query", "name": "tax_id", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tax Id" } }, { "in": "query", "name": "name", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" } }, { "in": "query", "name": "active_only", "required": false, "schema": { "default": true, "title": "Active Only", "type": "boolean" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 100, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Parties", "tags": [ "erp-parties" ] }, "post": { "description": "Create a party (vendor / customer / both). RUT + entity_id must be unique.", "operationId": "create_party_erp_parties_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartyCreate" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Create Party", "tags": [ "erp-parties" ] } }, "/erp/parties/{party_id}": { "delete": { "description": "Soft delete \u2014 sets is_active = false. Preserves history + FK references.", "operationId": "deactivate_party_erp_parties__party_id__delete", "parameters": [ { "in": "path", "name": "party_id", "required": true, "schema": { "title": "Party Id", "type": "integer" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Deactivate Party", "tags": [ "erp-parties" ] }, "get": { "operationId": "get_party_erp_parties__party_id__get", "parameters": [ { "in": "path", "name": "party_id", "required": true, "schema": { "title": "Party Id", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Party", "tags": [ "erp-parties" ] }, "patch": { "operationId": "update_party_erp_parties__party_id__patch", "parameters": [ { "in": "path", "name": "party_id", "required": true, "schema": { "title": "Party Id", "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartyUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Update Party", "tags": [ "erp-parties" ] } }, "/escalations": { "get": { "description": "List escalations, optionally filtered. Tenant-scoped for user callers.", "operationId": "list_escalations_escalations_get", "parameters": [ { "in": "query", "name": "status", "required": false, "schema": { "default": "pending", "title": "Status", "type": "string" } }, { "in": "query", "name": "squad", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Squad" } }, { "in": "query", "name": "type", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Type" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "List Escalations", "tags": [ "escalations" ] }, "post": { "description": "Create an escalation and post to Slack with a Resolve button.", "operationId": "create_escalation_escalations_post", "parameters": [ { "in": "query", "name": "squad", "required": true, "schema": { "title": "Squad", "type": "string" } }, { "in": "query", "name": "type", "required": true, "schema": { "title": "Type", "type": "string" } }, { "in": "query", "name": "title", "required": true, "schema": { "title": "Title", "type": "string" } }, { "in": "query", "name": "description", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, { "in": "query", "name": "agent", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent" } }, { "in": "query", "name": "execution_id", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Execution Id" } }, { "in": "query", "name": "priority", "required": false, "schema": { "default": 5, "title": "Priority", "type": "integer" } }, { "in": "query", "name": "tenant_id", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Tenant Id" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Context" } } } }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Create Escalation", "tags": [ "escalations" ] } }, "/escalations/expire": { "post": { "description": "Expire all overdue pending escalations.", "operationId": "expire_escalations_escalations_expire_post", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Expire Escalations", "tags": [ "escalations" ] } }, "/escalations/stats": { "get": { "description": "Escalation statistics. Tenant-scoped for user callers.", "operationId": "escalation_stats_escalations_stats_get", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Escalation Stats", "tags": [ "escalations" ] } }, "/escalations/{escalation_id}": { "get": { "description": "Get a single escalation by ID. Tenant-scoped for user callers.", "operationId": "get_escalation_escalations__escalation_id__get", "parameters": [ { "in": "path", "name": "escalation_id", "required": true, "schema": { "title": "Escalation Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Get Escalation", "tags": [ "escalations" ] } }, "/escalations/{escalation_id}/resolve": { "post": { "description": "Resolve an escalation with a response. Tenant-scoped for user callers.", "operationId": "resolve_escalation_escalations__escalation_id__resolve_post", "parameters": [ { "in": "path", "name": "escalation_id", "required": true, "schema": { "title": "Escalation Id", "type": "string" } }, { "in": "query", "name": "resolution", "required": true, "schema": { "title": "Resolution", "type": "string" } }, { "in": "query", "name": "actor", "required": true, "schema": { "title": "Actor", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Resolve Escalation", "tags": [ "escalations" ] } }, "/escalations/{escalation_id}/wait": { "get": { "description": "Long-poll until escalation is resolved or timeout. Tenant-scoped for user callers.", "operationId": "wait_for_escalation_resolution_escalations__escalation_id__wait_get", "parameters": [ { "in": "path", "name": "escalation_id", "required": true, "schema": { "title": "Escalation Id", "type": "string" } }, { "in": "query", "name": "timeout", "required": false, "schema": { "default": 3600, "title": "Timeout", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Wait For Escalation Resolution", "tags": [ "escalations" ] } }, "/events": { "get": { "description": "Read events from the buffer.", "operationId": "get_events_events_get", "parameters": [ { "in": "query", "name": "since", "required": false, "schema": { "default": 0, "title": "Since", "type": "number" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 100, "title": "Limit", "type": "integer" } }, { "in": "query", "name": "source", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" } }, { "in": "query", "name": "event_type", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Type" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Events", "tags": [ "events" ] } }, "/events/cleanup": { "post": { "description": "Remove old events from the buffer.", "operationId": "cleanup_events_events_cleanup_post", "parameters": [ { "in": "query", "name": "older_than_days", "required": false, "schema": { "default": 7, "title": "Older Than Days", "type": "integer" } }, { "in": "header", "name": "x-api-key", "required": false, "schema": { "title": "X-Api-Key", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Cleanup Events", "tags": [ "events" ] } }, "/events/consume": { "post": { "description": "Consume events (read and mark as processed for this consumer).", "operationId": "consume_events_events_consume_post", "parameters": [ { "in": "query", "name": "consumer_id", "required": true, "schema": { "title": "Consumer Id", "type": "string" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 100, "title": "Limit", "type": "integer" } }, { "in": "query", "name": "source", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" } }, { "in": "query", "name": "event_type", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Type" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Consume Events", "tags": [ "events" ] } }, "/events/entity/{entity_type}/{entity_id}": { "get": { "description": "Get all events for a specific entity.", "operationId": "get_entity_events_events_entity__entity_type___entity_id__get", "parameters": [ { "in": "path", "name": "entity_type", "required": true, "schema": { "title": "Entity Type", "type": "string" } }, { "in": "path", "name": "entity_id", "required": true, "schema": { "title": "Entity Id", "type": "string" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Entity Events", "tags": [ "events" ] } }, "/events/ingest": { "post": { "description": "Ingest an event into the buffer.", "operationId": "ingest_event_events_ingest_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EventIngest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EventResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Ingest Event", "tags": [ "events" ] } }, "/events/peek": { "get": { "description": "Check how many unconsumed events exist for a consumer.", "operationId": "peek_events_events_peek_get", "parameters": [ { "in": "query", "name": "consumer_id", "required": true, "schema": { "title": "Consumer Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Peek Events", "tags": [ "events" ] } }, "/events/process/all": { "post": { "description": "Process all event types from buffer.", "operationId": "process_all_events_events_process_all_post", "parameters": [ { "in": "query", "name": "consumer_id", "required": false, "schema": { "default": "default-processor", "title": "Consumer Id", "type": "string" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Process All Events", "tags": [ "webhooks" ] } }, "/events/process/github-pr": { "post": { "description": "Process GitHub PR events from buffer and post to Slack.", "operationId": "process_github_pr_events_events_process_github_pr_post", "parameters": [ { "in": "query", "name": "consumer_id", "required": false, "schema": { "default": "slack-pr-notifier", "title": "Consumer Id", "type": "string" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 10, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Process Github Pr Events", "tags": [ "webhooks" ] } }, "/events/reset": { "post": { "description": "Reset a consumer's position to read all events from the beginning.", "operationId": "reset_consumer_events_reset_post", "parameters": [ { "in": "query", "name": "consumer_id", "required": true, "schema": { "title": "Consumer Id", "type": "string" } }, { "in": "header", "name": "x-api-key", "required": false, "schema": { "title": "X-Api-Key", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Reset Consumer", "tags": [ "events" ] } }, "/events/search": { "get": { "description": "Search events in durable storage.", "operationId": "search_events_events_search_get", "parameters": [ { "in": "query", "name": "source", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" } }, { "in": "query", "name": "event_type", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Type" } }, { "in": "query", "name": "entity_type", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Entity Type" } }, { "in": "query", "name": "entity_id", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Entity Id" } }, { "in": "query", "name": "since", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Since" } }, { "in": "query", "name": "until", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Until" } }, { "in": "query", "name": "q", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Q" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "title": "Limit", "type": "integer" } }, { "in": "query", "name": "offset", "required": false, "schema": { "default": 0, "title": "Offset", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Search Events", "tags": [ "events" ] } }, "/events/stats": { "get": { "description": "Get event buffer statistics.", "operationId": "get_event_stats_events_stats_get", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Get Event Stats", "tags": [ "events" ] } }, "/events/summary": { "get": { "description": "Get aggregated event summary for briefings.", "operationId": "get_events_summary_events_summary_get", "parameters": [ { "in": "query", "name": "since", "required": false, "schema": { "default": "24h", "title": "Since", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Events Summary", "tags": [ "events" ] } }, "/executions": { "get": { "description": "List trigger executions. Tenant-scoped if authenticated.", "operationId": "list_executions_executions_get", "parameters": [ { "in": "query", "name": "trigger_id", "required": false, "schema": { "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ], "title": "Trigger Id" } }, { "in": "query", "name": "status", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/routers__executions__ExecutionResponse" }, "title": "Response List Executions Executions Get", "type": "array" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "List Executions", "tags": [ "executions" ] } }, "/executions/{execution_id}": { "get": { "description": "Get execution details. Tenant-scoped if authenticated.", "operationId": "get_execution_executions__execution_id__get", "parameters": [ { "in": "path", "name": "execution_id", "required": true, "schema": { "title": "Execution Id", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/routers__executions__ExecutionResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Get Execution", "tags": [ "executions" ] } }, "/executions/{execution_id}/artifacts": { "get": { "description": "Resolve the artifacts an execution produced (PRs / issues) to live status.\n\nReads the execution's `result.artifacts` \u2014 a list of refs like\n`{\"type\": \"pr\"|\"issue\", \"repo\": \"owner/name\", \"number\": N}` \u2014 and fetches\neach one's current GitHub state (CI / review / merge) so the cockpit can\nshow and act on the real work.", "operationId": "get_execution_artifacts_executions__execution_id__artifacts_get", "parameters": [ { "in": "path", "name": "execution_id", "required": true, "schema": { "title": "Execution Id", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Get Execution Artifacts", "tags": [ "executions" ] } }, "/google/installations": { "get": { "description": "List all Google Workspace installations.", "operationId": "list_google_installations_google_installations_get", "parameters": [ { "in": "query", "name": "active_only", "required": false, "schema": { "default": true, "title": "Active Only", "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Google Installations", "tags": [ "google" ] }, "post": { "description": "Create a Google Workspace installation.", "operationId": "create_google_installation_google_installations_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoogleInstallationCreate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Create Google Installation", "tags": [ "google" ] } }, "/google/installations/{domain}": { "delete": { "description": "Uninstall a Google Workspace integration.", "operationId": "delete_google_installation_google_installations__domain__delete", "parameters": [ { "in": "path", "name": "domain", "required": true, "schema": { "title": "Domain", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Delete Google Installation", "tags": [ "google" ] }, "get": { "description": "Get a specific Google Workspace installation.", "operationId": "get_google_installation_google_installations__domain__get", "parameters": [ { "in": "path", "name": "domain", "required": true, "schema": { "title": "Domain", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Google Installation", "tags": [ "google" ] } }, "/google/messages": { "post": { "description": "Queue a Google Chat message for processing.", "operationId": "queue_google_message_google_messages_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoogleChatMessageCreate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Queue Google Message", "tags": [ "google" ] } }, "/google/messages/expire": { "post": { "description": "Expire old pending Google Chat messages.", "operationId": "expire_google_messages_google_messages_expire_post", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Expire Google Messages", "tags": [ "google" ] } }, "/google/messages/pending": { "get": { "description": "Get pending Google Chat messages waiting for response.", "operationId": "get_pending_google_messages_google_messages_pending_get", "parameters": [ { "in": "query", "name": "limit", "required": false, "schema": { "default": 10, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Pending Google Messages", "tags": [ "google" ] } }, "/google/messages/{message_id}": { "get": { "description": "Get a specific Google Chat message.", "operationId": "get_google_message_google_messages__message_id__get", "parameters": [ { "in": "path", "name": "message_id", "required": true, "schema": { "title": "Message Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Google Message", "tags": [ "google" ] } }, "/google/stats": { "get": { "description": "Google Workspace integration statistics.", "operationId": "google_stats_google_stats_get", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Google Stats", "tags": [ "google" ] } }, "/health": { "get": { "description": "Lightweight health probe for Cloud Run / load balancer.", "operationId": "health_check_health_get", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Health Check" } }, "/learnings/relevant": { "get": { "description": "Get recent/relevant learnings for prompt injection.", "operationId": "get_relevant_learnings_learnings_relevant_get", "parameters": [ { "in": "query", "name": "squad", "required": true, "schema": { "title": "Squad", "type": "string" } }, { "in": "query", "name": "agent", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 5, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Relevant Learnings", "tags": [ "escalations" ] } }, "/memory/learn": { "post": { "description": "Record a learning to the squad's memory file.", "operationId": "record_learning_memory_learn_post", "parameters": [ { "in": "query", "name": "squad", "required": true, "schema": { "title": "Squad", "type": "string" } }, { "in": "query", "name": "content", "required": true, "schema": { "title": "Content", "type": "string" } }, { "in": "query", "name": "source", "required": false, "schema": { "default": "manual", "title": "Source", "type": "string" } }, { "in": "query", "name": "agent", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent" } }, { "in": "query", "name": "importance", "required": false, "schema": { "default": "medium", "title": "Importance", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Context" } } } }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Record Learning", "tags": [ "escalations" ] } }, "/metrics": { "post": { "description": "Push metrics for trigger evaluation.", "operationId": "push_metrics_metrics_post", "requestBody": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/MetricCreate" }, "title": "Metrics", "type": "array" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Push Metrics", "tags": [ "metrics" ] } }, "/metrics/latest": { "get": { "description": "Get latest metrics.", "operationId": "get_latest_metrics_metrics_latest_get", "parameters": [ { "in": "query", "name": "squad", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Squad" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Latest Metrics", "tags": [ "metrics" ] } }, "/orgs/{slug}/install-url": { "get": { "description": "Get Slack install URL for an org (self-service).", "operationId": "get_org_install_url_orgs__slug__install_url_get", "parameters": [ { "in": "path", "name": "slug", "required": true, "schema": { "title": "Slug", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Org Install Url", "tags": [ "orgs" ] } }, "/prs/ready-to-merge": { "post": { "description": "Get all PRs that are ready to merge and optionally send Slack summary.", "operationId": "get_prs_ready_to_merge_prs_ready_to_merge_post", "parameters": [ { "in": "query", "name": "send_slack", "required": false, "schema": { "default": true, "title": "Send Slack", "type": "boolean" } }, { "in": "query", "name": "channel", "required": false, "schema": { "default": "eng-notifications", "title": "Channel", "type": "string" } }, { "in": "query", "name": "include_sprint_progress", "required": false, "schema": { "default": true, "title": "Include Sprint Progress", "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Prs Ready To Merge", "tags": [ "agent-dispatch" ] } }, "/slack/events": { "post": { "description": "Handle Slack Events API webhooks.", "operationId": "handle_slack_events_slack_events_post", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Handle Slack Events", "tags": [ "slack" ] } }, "/slack/messages": { "post": { "description": "Queue a Slack message for Claude Code to handle.", "operationId": "queue_slack_message_slack_messages_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SlackMessageCreate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Queue Slack Message", "tags": [ "slack" ] } }, "/slack/messages/expire": { "post": { "description": "Expire old pending messages.", "operationId": "expire_slack_messages_slack_messages_expire_post", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Expire Slack Messages", "tags": [ "slack" ] } }, "/slack/messages/pending": { "get": { "description": "Get pending Slack messages waiting for response.", "operationId": "get_pending_messages_slack_messages_pending_get", "parameters": [ { "in": "query", "name": "limit", "required": false, "schema": { "default": 10, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Pending Messages", "tags": [ "slack" ] } }, "/slack/messages/{message_id}": { "get": { "description": "Get a specific Slack message by ID.", "operationId": "get_slack_message_slack_messages__message_id__get", "parameters": [ { "in": "path", "name": "message_id", "required": true, "schema": { "title": "Message Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Slack Message", "tags": [ "slack" ] } }, "/slack/messages/{message_id}/responded": { "post": { "description": "Mark a Slack message as responded.", "operationId": "mark_message_responded_slack_messages__message_id__responded_post", "parameters": [ { "in": "path", "name": "message_id", "required": true, "schema": { "title": "Message Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SlackMessageResponded" }, { "type": "null" } ], "title": "Body" } } } }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Mark Message Responded", "tags": [ "slack" ] } }, "/slack/send": { "post": { "description": "Send a proactive message to Slack.", "operationId": "send_slack_message_slack_send_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SlackSendRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Send Slack Message", "tags": [ "slack" ] } }, "/sprint-approvals": { "get": { "description": "List sprint approvals, optionally filtered by status. Requires X-API-Key header.", "operationId": "list_sprint_approvals_sprint_approvals_get", "parameters": [ { "in": "query", "name": "status", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 10, "title": "Limit", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "List Sprint Approvals", "tags": [ "approvals" ] } }, "/sprint-approvals/{sprint_number}": { "get": { "description": "Get sprint approval status for COO to poll. Requires X-API-Key header.", "operationId": "get_sprint_approval_sprint_approvals__sprint_number__get", "parameters": [ { "in": "path", "name": "sprint_number", "required": true, "schema": { "title": "Sprint Number", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Get Sprint Approval", "tags": [ "approvals" ] } }, "/sprint-approvals/{sprint_number}/executed": { "post": { "description": "Mark a sprint as executed. Requires X-API-Key header.", "operationId": "mark_sprint_executed_sprint_approvals__sprint_number__executed_post", "parameters": [ { "in": "path", "name": "sprint_number", "required": true, "schema": { "title": "Sprint Number", "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Mark Sprint Executed", "tags": [ "approvals" ] } }, "/sprints/current": { "get": { "description": "Get the current active sprint with all its goals.", "operationId": "get_current_sprint_sprints_current_get", "responses": { "200": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SprintResponse" }, { "type": "null" } ], "title": "Response Get Current Sprint Sprints Current Get" } } }, "description": "Successful Response" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Get Current Sprint", "tags": [ "agent-dispatch" ] } }, "/sprints/{sprint_number}": { "patch": { "description": "Update sprint metrics.", "operationId": "update_sprint_sprints__sprint_number__patch", "parameters": [ { "in": "path", "name": "sprint_number", "required": true, "schema": { "title": "Sprint Number", "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SprintUpdateRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Update Sprint", "tags": [ "agent-dispatch" ] } }, "/sprints/{sprint_number}/goals/{squad}": { "patch": { "description": "Update a squad's goal status within a sprint.", "operationId": "update_sprint_goal_sprints__sprint_number__goals__squad__patch", "parameters": [ { "in": "path", "name": "sprint_number", "required": true, "schema": { "title": "Sprint Number", "type": "integer" } }, { "in": "path", "name": "squad", "required": true, "schema": { "title": "Squad", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GoalStatusUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Update Sprint Goal", "tags": [ "agent-dispatch" ] } }, "/stats": { "get": { "description": "Scheduler statistics with time-windowed execution data.", "operationId": "stats_stats_get", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Stats", "tags": [ "metrics" ] } }, "/tasks": { "get": { "description": "List tasks, optionally filtered.", "operationId": "list_tasks_tasks_get", "parameters": [ { "in": "query", "name": "tenant_id", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Tenant Id" } }, { "in": "query", "name": "status", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "in": "query", "name": "limit", "required": false, "schema": { "default": 50, "title": "Limit", "type": "integer" } }, { "in": "header", "name": "x-api-key", "required": false, "schema": { "title": "X-Api-Key", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "List Tasks", "tags": [ "tasks" ] } }, "/tasks/enqueue": { "post": { "description": "Queue a task for async processing. Requires X-API-Key header.", "operationId": "enqueue_task_tasks_enqueue_post", "parameters": [ { "in": "header", "name": "x-api-key", "required": false, "schema": { "title": "X-Api-Key", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnqueueRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnqueueResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Enqueue Task", "tags": [ "tasks" ] } }, "/tasks/{task_id}": { "get": { "description": "Get task status by ID.", "operationId": "get_task_tasks__task_id__get", "parameters": [ { "in": "path", "name": "task_id", "required": true, "schema": { "title": "Task Id", "type": "string" } }, { "in": "header", "name": "x-api-key", "required": false, "schema": { "title": "X-Api-Key", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Task", "tags": [ "tasks" ] } }, "/triggers": { "get": { "description": "List triggers, optionally filtered. Tenant-scoped if authenticated.", "operationId": "list_triggers_triggers_get", "parameters": [ { "in": "query", "name": "squad", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Squad" } }, { "in": "query", "name": "enabled", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "List Triggers", "tags": [ "triggers" ] }, "post": { "description": "Create a new trigger. Associates with tenant if authenticated.", "operationId": "create_trigger_triggers_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TriggerCreate" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TriggerResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Create Trigger", "tags": [ "triggers" ] } }, "/triggers/sync": { "post": { "description": "Sync triggers from SQUAD.md definitions. Requires X-API-Key header.", "operationId": "sync_triggers_triggers_sync_post", "requestBody": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/TriggerSyncItem" }, "title": "Triggers", "type": "array" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Sync Triggers", "tags": [ "triggers" ] } }, "/triggers/{trigger_id}": { "delete": { "description": "Delete a trigger. Tenant-scoped if authenticated.", "operationId": "delete_trigger_triggers__trigger_id__delete", "parameters": [ { "in": "path", "name": "trigger_id", "required": true, "schema": { "format": "uuid", "title": "Trigger Id", "type": "string" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Delete Trigger", "tags": [ "triggers" ] }, "get": { "description": "Get a specific trigger. Tenant-scoped if authenticated.", "operationId": "get_trigger_triggers__trigger_id__get", "parameters": [ { "in": "path", "name": "trigger_id", "required": true, "schema": { "format": "uuid", "title": "Trigger Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TriggerResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Get Trigger", "tags": [ "triggers" ] }, "patch": { "description": "Update a trigger. Tenant-scoped if authenticated.", "operationId": "update_trigger_triggers__trigger_id__patch", "parameters": [ { "in": "path", "name": "trigger_id", "required": true, "schema": { "format": "uuid", "title": "Trigger Id", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TriggerUpdate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TriggerResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Update Trigger", "tags": [ "triggers" ] } }, "/triggers/{trigger_id}/fire": { "post": { "description": "Manually fire a trigger, bypassing conditions. Tenant-scoped if authenticated.", "operationId": "fire_trigger_manually_triggers__trigger_id__fire_post", "parameters": [ { "in": "path", "name": "trigger_id", "required": true, "schema": { "format": "uuid", "title": "Trigger Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/routers__triggers__ExecutionResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Fire Trigger Manually", "tags": [ "triggers" ] } }, "/triggers/{trigger_id}/toggle": { "post": { "description": "Toggle trigger enabled state. Tenant-scoped if authenticated.", "operationId": "toggle_trigger_triggers__trigger_id__toggle_post", "parameters": [ { "in": "path", "name": "trigger_id", "required": true, "schema": { "format": "uuid", "title": "Trigger Id", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TriggerResponse" } } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "security": [ { "APIKeyHeader": [] } ], "summary": "Toggle Trigger", "tags": [ "triggers" ] } }, "/usage/limits": { "get": { "description": "Get rate limits and current usage for the workspace.", "operationId": "get_usage_limits_usage_limits_get", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Get Usage Limits", "tags": [ "auth" ] } }, "/usage/stats": { "get": { "description": "Get usage statistics for the workspace.", "operationId": "get_usage_stats_usage_stats_get", "parameters": [ { "in": "query", "name": "period", "required": false, "schema": { "default": "24h", "title": "Period", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Get Usage Stats", "tags": [ "auth" ] } }, "/webhooks/github": { "post": { "description": "Receive GitHub webhook events and ingest into event buffer.", "operationId": "github_webhook_webhooks_github_post", "parameters": [ { "in": "header", "name": "X-GitHub-Event", "required": false, "schema": { "title": "X-Github-Event", "type": "string" } }, { "in": "header", "name": "X-GitHub-Delivery", "required": false, "schema": { "title": "X-Github-Delivery", "type": "string" } }, { "in": "header", "name": "X-Hub-Signature-256", "required": false, "schema": { "title": "X-Hub-Signature-256", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Github Webhook", "tags": [ "webhooks" ] } }, "/webhooks/github/sync": { "post": { "description": "GitHub push webhook \u2192 sync tenant agent definitions.", "operationId": "github_repo_sync_webhooks_github_sync_post", "parameters": [ { "in": "header", "name": "X-GitHub-Event", "required": false, "schema": { "title": "X-Github-Event", "type": "string" } }, { "in": "header", "name": "X-Hub-Signature-256", "required": false, "schema": { "title": "X-Hub-Signature-256", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Github Repo Sync", "tags": [ "webhooks" ] } }, "/webhooks/google-chat": { "post": { "description": "Receive Google Chat events (MESSAGE, ADDED_TO_SPACE, REMOVED_FROM_SPACE).", "operationId": "google_chat_webhook_webhooks_google_chat_post", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Google Chat Webhook", "tags": [ "google" ] } }, "/webhooks/report-email": { "post": { "description": "Handle report lead webhook \u2014 send PDF report via email.", "operationId": "handle_report_email_webhooks_report_email_post", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Handle Report Email", "tags": [ "webhooks" ] } }, "/webhooks/stripe": { "post": { "description": "Receive Stripe webhook events with auto-reconciliation.", "operationId": "stripe_webhook_webhooks_stripe_post", "parameters": [ { "in": "header", "name": "Stripe-Signature", "required": false, "schema": { "title": "Stripe-Signature", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" }, "422": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } }, "description": "Validation Error" } }, "summary": "Stripe Webhook", "tags": [ "webhooks" ] } }, "/webhooks/stripe/stats": { "get": { "description": "Get Stripe event statistics.", "operationId": "stripe_stats_webhooks_stripe_stats_get", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Stripe Stats", "tags": [ "webhooks" ] } }, "/webhooks/vercel": { "post": { "description": "Receive Vercel webhook events for deployment tracking.", "operationId": "vercel_webhook_webhooks_vercel_post", "responses": { "200": { "content": { "application/json": { "schema": {} } }, "description": "Successful Response" } }, "summary": "Vercel Webhook", "tags": [ "webhooks" ] } } } }