{"openapi":"3.1.0","info":{"title":"DATAN Executor S2","version":"0.1.0"},"paths":{"/api/paperclip/webhook":{"post":{"tags":["paperclip"],"summary":"Handle Paperclip Task","description":"Receives an autonomous task from Paperclip and processes it.","operationId":"handle_paperclip_task_api_paperclip_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/paperclip/webhook/events":{"post":{"tags":["paperclip"],"summary":"Handle Paperclip Event","description":"SPEC-017: Enriched event handler for bidirectional sync.\nPaperclip sends events like run.completed, approval.created, etc.","operationId":"handle_paperclip_event_api_paperclip_webhook_events_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/paperclip/execute":{"post":{"tags":["paperclip-bridge"],"summary":"Paperclip Http Execute","description":"Paperclip HTTP adapter entry point.\nConfigure the agent's adapter URL to: http://localhost:8002/api/paperclip/execute\n\nPaperclip sends:\n  { runId, agentId, companyId, context: { taskId, wakeReason, commentId } }\n\nNow routes through TaskDispatcher (SPEC-043) for intelligent flow matching.","operationId":"paperclip_http_execute_api_paperclip_execute_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/paperclip/execute/health":{"get":{"tags":["paperclip-bridge"],"summary":"Bridge Health","description":"Quick health check for the Paperclip bridge endpoint.","operationId":"bridge_health_api_paperclip_execute_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/builder/config/orgs":{"get":{"tags":["builder"],"summary":"Get Target Orgs","operationId":"get_target_orgs_api_builder_config_orgs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/builder/generate":{"post":{"tags":["builder"],"summary":"Generate Agent","operationId":"generate_agent_api_builder_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/builder/agents":{"get":{"tags":["builder"],"summary":"List Created Agents","description":"Returns all agents created through the Builder.","operationId":"list_created_agents_api_builder_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/builder/models":{"get":{"tags":["builder"],"summary":"Get Openrouter Models","description":"Proxy OpenRouter model list for the frontend model selector.","operationId":"get_openrouter_models_api_builder_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/skills/propose":{"post":{"tags":["skills_hitl"],"summary":"Propose Automa Flow","description":"Recibe un JSON crudo de Automa y lo cristaliza en un agente propuesto.","operationId":"propose_automa_flow_api_skills_propose_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomaFlowRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/skills/proposals":{"get":{"tags":["skills_hitl"],"summary":"List Proposals","description":"Enumera todos los borradores (proposals) esperando aprobación humana L1","operationId":"list_proposals_api_skills_proposals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/skills/promote":{"post":{"tags":["skills_hitl"],"summary":"Promote Skill","description":"Eleva una propuesta pendiente al nivel L1 cristalizando sus flujos YAML.\nSPEC-017 Fase 3: Auto-syncs the promoted skill to Paperclip.","operationId":"promote_skill_api_skills_promote_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/skills/proposals/{proposal_id}":{"delete":{"tags":["skills_hitl"],"summary":"Delete Proposal","description":"Elimina una propuesta de la lista.","operationId":"delete_proposal_api_skills_proposals__proposal_id__delete","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/skills/sync-status":{"get":{"tags":["skills_hitl"],"summary":"Get Sync Status","description":"Returns the current bidirectional sync status with Paperclip.","operationId":"get_sync_status_api_skills_sync_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/skills/push-all":{"post":{"tags":["skills_hitl"],"summary":"Push All Skills To Paperclip","description":"Pushes all current DATAN skills to Paperclip in bulk.","operationId":"push_all_skills_to_paperclip_api_skills_push_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/skills/catalog":{"get":{"tags":["skills_hitl"],"summary":"List Skills Catalog","description":"Returns all skills with rich metadata for the agent assignment UI.","operationId":"list_skills_catalog_api_skills_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/skills/grouped":{"get":{"tags":["skills_hitl"],"summary":"Get Skills Grouped By Agent","description":"Returns all skills grouped by their suggested agent (auto-classified).","operationId":"get_skills_grouped_by_agent_api_skills_grouped_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/totp/setup":{"post":{"tags":["2fa"],"summary":"Totp Setup","description":"Step 1: Generate TOTP secret and QR URI for the user to scan.","operationId":"totp_setup_api_totp_setup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/totp/confirm":{"post":{"tags":["2fa"],"summary":"Totp Confirm","description":"Step 2: Confirm setup by verifying the first code from the app.","operationId":"totp_confirm_api_totp_confirm_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/totp/verify":{"post":{"tags":["2fa"],"summary":"Totp Verify","description":"Verify a TOTP code for a user (stateless check).","operationId":"totp_verify_api_totp_verify_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/totp/enforce":{"post":{"tags":["2fa"],"summary":"Totp Enforce","description":"Gate endpoint — call before any costly action.\nReturns 200 if action is allowed, 401 if TOTP required and missing/invalid.","operationId":"totp_enforce_api_totp_enforce_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/totp/":{"delete":{"tags":["2fa"],"summary":"Totp Disable","description":"Disable 2FA — requires a valid TOTP code (R14: self-protection).","operationId":"totp_disable_api_totp__delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/totp/status":{"get":{"tags":["2fa"],"summary":"Totp Status","description":"Check if a user has 2FA enabled.","operationId":"totp_status_api_totp_status_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/domains/check":{"get":{"tags":["domains"],"summary":"Check Domain","description":"GET /api/domains/check?domain=miempresa.com\nChecks availability + returns pricing with margin.","operationId":"check_domain_api_domains_check_get","parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/domains/purchase":{"post":{"tags":["domains"],"summary":"Purchase Domain","description":"POST /api/domains/purchase\nBody: { domain, user_id, org_id, tier?, years? }\n\nFull flow: Namecheap register + Cloudflare for SaaS custom hostname.\nReturns CNAME setup instructions for the user.","operationId":"purchase_domain_api_domains_purchase_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/domains/subdomain":{"post":{"tags":["domains"],"summary":"Create Subdomain","description":"POST /api/domains/subdomain\nBody: { slug, user_id, org_id }\n\nProvisions slug.datan.uy for free/Pro tier users.\nNo Namecheap needed — just Cloudflare.","operationId":"create_subdomain_api_domains_subdomain_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/domains/":{"get":{"tags":["domains"],"summary":"List Domains","description":"GET /api/domains/?user_id=xxx\nLists all domains for a user.","operationId":"list_domains_api_domains__get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/domains/{domain_id}/status":{"get":{"tags":["domains"],"summary":"Domain Status","description":"GET /api/domains/{domain_id}/status\nReturns DNS + SSL status. Polls Cloudflare if still pending.","operationId":"domain_status_api_domains__domain_id__status_get","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/domains/{domain_id}":{"delete":{"tags":["domains"],"summary":"Delete Domain","description":"DELETE /api/domains/{domain_id}\nDeactivates domain. Removes from Cloudflare for SaaS.\nNote: Does NOT cancel Namecheap registration (domains are non-refundable).","operationId":"delete_domain_api_domains__domain_id__delete","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/config":{"get":{"tags":["admin"],"summary":"Get Config","description":"GET /api/admin/config\nReturns the full admin config (action_costs, slider_tiers, domain_pricing, KPIs, etc.)","operationId":"get_config_api_admin_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"tags":["admin"],"summary":"Patch Config","description":"PATCH /api/admin/config\nMerge parcial — enviar solo los campos que querés cambiar.\n\nEjemplo:\n  {\"action_costs\": {\"chat\": 2}}\n  → solo cambia chat a 2, todo lo demás queda igual\n\n  {\"slider_tiers\": [{\"credits\": 1000, \"price_usd\": 25, \"emails_day\": 50}]}\n  → reemplaza slider_tiers entero (es un array, no se puede merge parcial)","operationId":"patch_config_api_admin_config_patch","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/kpis":{"get":{"tags":["admin"],"summary":"Get Kpis","description":"GET /api/admin/kpis\nReturns KPIs calculados en vivo de los contadores reales.\nNo hay datos de fantasía — solo lo medido.","operationId":"get_kpis_api_admin_kpis_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/payment-links/":{"post":{"tags":["payment-links"],"summary":"Create Link","description":"POST /api/payment-links/\nCreate a new payment link.","operationId":"create_link_api_payment_links__post","parameters":[{"name":"description","in":"query","required":true,"schema":{"type":"string","title":"Description"}},{"name":"amount","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","default":"USD","title":"Currency"}},{"name":"issuer_name","in":"query","required":false,"schema":{"type":"string","default":"DATAN Business","title":"Issuer Name"}},{"name":"allow_custom_amount","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Allow Custom Amount"}},{"name":"expires_in_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In Days"}},{"name":"recipient_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["payment-links"],"summary":"List Links","description":"GET /api/payment-links/ — List all payment links.","operationId":"list_links_api_payment_links__get","parameters":[{"name":"include_expired","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Expired"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment-links/{link_id}":{"get":{"tags":["payment-links"],"summary":"Get Link","description":"GET /api/payment-links/{link_id} — Get a single link (used by /p/[id] page).","operationId":"get_link_api_payment_links__link_id__get","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["payment-links"],"summary":"Delete Link","description":"DELETE /api/payment-links/{link_id} — Deactivate a link.","operationId":"delete_link_api_payment_links__link_id__delete","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/flows/":{"post":{"tags":["Flows"],"summary":"Create a new flow","operationId":"create_flow_api_flows__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Flows"],"summary":"List flows for an owner","operationId":"list_flows_api_flows__get","parameters":[{"name":"owner_id","in":"query","required":true,"schema":{"type":"string","description":"User ID","title":"Owner Id"},"description":"User ID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/flows/admin/all":{"get":{"tags":["Flows"],"summary":"Admin: all flows across all users","description":"God Mode admin view — all flows with last execution summary.","operationId":"admin_all_flows_api_flows_admin_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/flows/{flow_id}":{"get":{"tags":["Flows"],"summary":"Get a flow with recent executions","operationId":"get_flow_api_flows__flow_id__get","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Flows"],"summary":"Update a flow","operationId":"update_flow_api_flows__flow_id__patch","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFlowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Flows"],"summary":"Archive a flow","operationId":"delete_flow_api_flows__flow_id__delete","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/flows/{flow_id}/run/stream":{"post":{"tags":["Flows"],"summary":"Run a flow with real-time SSE streaming (SPEC-047)","description":"Streams flow execution events as Server-Sent Events.\nUsed by BrowserLiveView to show live browser screenshots and step timeline.\nEvents:\n  {type: \"browser_step\", step_num, action, credits_used, screenshot_b64?, coords?}\n  {type: \"done\", execution: FlowExecution}\n  {type: \"error\", error: str}","operationId":"run_flow_stream_api_flows__flow_id__run_stream_post","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunFlowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/flows/{flow_id}/run":{"post":{"tags":["Flows"],"summary":"Run a flow manually","operationId":"run_flow_api_flows__flow_id__run_post","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunFlowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/flows/{flow_id}/executions":{"get":{"tags":["Flows"],"summary":"Get execution history","operationId":"get_executions_api_flows__flow_id__executions_get","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/flows/build":{"post":{"tags":["Flows"],"summary":"Conversational builder: natural language → FlowSpec","description":"Multi-turn conversational builder.\nOn each turn:\n  - If enough info → returns status: \"ready\" with a complete FlowSpec\n  - If more info needed → returns status: \"needs_input\" with questions\n\nWhen status is \"ready\", call POST /api/flows/ with the returned flow_spec to activate it.","operationId":"build_flow_api_flows_build_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuilderRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/flows/invoke":{"post":{"tags":["Flows"],"summary":"Invoke a flow via /SlashCommand from chat","description":"Punto de entrada desde el chat para /Comandos.\nDetecta el comando, busca el flujo, lo ejecuta y retorna el resultado.\nSi el mensaje no es un /Comando pero hay sugerencias → retorna suggestions.","operationId":"invoke_slash_api_flows_invoke_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeSlashRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/flows/{flow_id}/executions/{execution_id}/approve":{"post":{"tags":["Flows"],"summary":"HITL: approve or reject a paused flow execution","description":"Retoma o cancela una ejecución pausada en HITL.\napproved=true  → continúa desde el siguiente step\napproved=false → cancela la ejecución","operationId":"approve_execution_api_flows__flow_id__executions__execution_id__approve_post","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Id"}},{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveExecutionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/intelligent":{"post":{"tags":["intelligent-chat"],"summary":"Intelligent Chat","description":"Endpoint unificado de chat inteligente.\n\nPipeline:\n  1. Dispatcher: ¿hay un flow que matchea? → ejecutar\n  2. Builder: ¿quiere crear un flow? → hacer preguntas / generar\n  3. Agent: respuesta LLM condicionada por SemanticLayer\n  4. Crystallizer: ¿vale la pena cristalizar esta interacción?","operationId":"intelligent_chat_api_chat_intelligent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/voice/tts":{"post":{"tags":["voice"],"summary":"Text To Speech","operationId":"text_to_speech_voice_tts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/servers":{"get":{"tags":["mcp-gateway"],"summary":"List Servers","description":"List all registered MCP servers and their status.","operationId":"list_servers_api_mcp_servers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mcp/servers/{name}/tools":{"get":{"tags":["mcp-gateway"],"summary":"List Server Tools","description":"List tools available from a specific MCP server.","operationId":"list_server_tools_api_mcp_servers__name__tools_get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/servers/{name}/health":{"get":{"tags":["mcp-gateway"],"summary":"Server Health","description":"Health check for a specific MCP server.","operationId":"server_health_api_mcp_servers__name__health_get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/execute":{"post":{"tags":["mcp-gateway"],"summary":"Execute Tool","description":"Execute an MCP tool directly (admin/debug).\nBody: { server: str, tool: str, arguments: dict }","operationId":"execute_tool_api_mcp_execute_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mcp/servers/{name}/enable":{"post":{"tags":["mcp-gateway"],"summary":"Enable Server","description":"Enable an MCP server.","operationId":"enable_server_api_mcp_servers__name__enable_post","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp/servers/{name}/disable":{"post":{"tags":["mcp-gateway"],"summary":"Disable Server","description":"Disable an MCP server.","operationId":"disable_server_api_mcp_servers__name__disable_post","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents":{"get":{"tags":["agents-native"],"summary":"List Agents","description":"List all agents for the organization.","operationId":"list_agents_api_agents_get","parameters":[{"name":"org_id","in":"query","required":false,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agents-native"],"summary":"Create Agent","description":"Create a new agent in Supabase.","operationId":"create_agent_api_agents_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agents/{agent_id}":{"get":{"tags":["agents-native"],"summary":"Get Agent","description":"Get details for a specific agent.","operationId":"get_agent_api_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agents-native"],"summary":"Update Agent","description":"Update agent details.","operationId":"update_agent_api_agents__agent_id__patch","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agents-native"],"summary":"Delete Agent","description":"Delete an agent.","operationId":"delete_agent_api_agents__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/run":{"post":{"tags":["agents-native"],"summary":"Trigger Run","description":"Queue a new run for an agent.","operationId":"trigger_run_api_agents__agent_id__run_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/runs":{"get":{"tags":["agents-native"],"summary":"List Runs","description":"List recent runs for a specific agent.","operationId":"list_runs_api_agents__agent_id__runs_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/runs/{run_id}":{"get":{"tags":["runs-native"],"summary":"Get Run Status","description":"Get the current status of a specific run.","operationId":"get_run_status_api_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/routines":{"get":{"tags":["routines"],"summary":"List Routines","description":"List all agent routines/schedules.","operationId":"list_routines_api_routines_get","parameters":[{"name":"org_id","in":"query","required":false,"schema":{"type":"string","title":"Org Id"}},{"name":"agent_id","in":"query","required":false,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["routines"],"summary":"Create Routine","description":"Create a new routine. Always computes next_run_at so the scheduler picks it up immediately.","operationId":"create_routine_api_routines_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/routines/{routine_id}":{"patch":{"tags":["routines"],"summary":"Update Routine","description":"Update a routine. When reactivating (is_active=True), refreshes next_run_at.","operationId":"update_routine_api_routines__routine_id__patch","parameters":[{"name":"routine_id","in":"path","required":true,"schema":{"type":"string","title":"Routine Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["routines"],"summary":"Delete Routine","description":"Delete a routine.","operationId":"delete_routine_api_routines__routine_id__delete","parameters":[{"name":"routine_id","in":"path","required":true,"schema":{"type":"string","title":"Routine Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks":{"get":{"tags":["tasks"],"summary":"List Tasks","operationId":"list_tasks_api_tasks_get","parameters":[{"name":"org_id","in":"query","required":false,"schema":{"type":"string","title":"Org Id"}},{"name":"agent_id","in":"query","required":false,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tasks"],"summary":"Create Task","operationId":"create_task_api_tasks_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/tasks/{task_id}":{"patch":{"tags":["tasks"],"summary":"Update Task","description":"Update task fields (status, title, agent_id, etc.).","operationId":"update_task_api_tasks__task_id__patch","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tasks"],"summary":"Delete Task","description":"Delete a task by ID.","operationId":"delete_task_api_tasks__task_id__delete","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/skills":{"get":{"summary":"List Skills","description":"List available skills from agentes/skills/ directory.","operationId":"list_skills_api_skills_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Skill From Builder","description":"Save a skill created in the Builder UI with full SKILL.md content.","operationId":"create_skill_from_builder_api_skills_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/skills/sync-status":{"get":{"summary":"Skills Sync Status","description":"Health check for Paperclip connectivity.","operationId":"skills_sync_status_skills_sync_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/evolution/fix":{"post":{"tags":["evolution"],"summary":"Attempt Fix","description":"Intenta reparar automáticamente un FlowSpec fallido.\n\nProceso:\n1. Catálogo determinista (headers renombrados, nulls, acciones migradas) — $0\n2. LLM fix si el catálogo no alcanza — ~$0.02\n3. Escalación al usuario si nada funciona\n\nReturns:\n    - success: bool\n    - strategy: \"catalog\" | \"llm\" | \"escalate\"\n    - description: explicación del fix\n    - fixed_flow_yaml: nuevo YAML (si success=true)\n    - new_version: versión guardada (ej: \"v3\")\n    - cost_usd: costo del fix\n    - escalation_message: mensaje para el usuario (si success=false)","operationId":"attempt_fix_api_evolution_fix_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FixRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/evolution/fix/{flow_id}/history":{"get":{"tags":["evolution"],"summary":"Get Fix History","description":"Retorna el historial de todos los fixes aplicados a un flow.","operationId":"get_fix_history_api_evolution_fix__flow_id__history_get","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/evolution/fix/{flow_id}/versions":{"get":{"tags":["evolution"],"summary":"Get Versions","description":"Lista todas las versiones de YAML disponibles para un flow.","operationId":"get_versions_api_evolution_fix__flow_id__versions_get","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/evolution/fix/{flow_id}/rollback":{"post":{"tags":["evolution"],"summary":"Rollback Flow","description":"Rollback de un flow a una versión anterior.\nRetorna el YAML de la versión solicitada para que el cliente lo aplique.","operationId":"rollback_flow_api_evolution_fix__flow_id__rollback_post","parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","title":"Flow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/dlocal":{"post":{"summary":"Dlocal Webhook","description":"Receives payment status updates from dLocal.\nUpdates the local payment store with the new status.\n\ndLocal sends events like:\n- payment.completed\n- payment.rejected  \n- payment.cancelled\n- payment.expired\n- payment.authorized","operationId":"dlocal_webhook_webhooks_dlocal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/credentials/issue":{"post":{"summary":"Issue Credential Ticket","description":"S2 issues an ephemeral 60s ticket for a user/service combo.\nCalled INTERNALLY by S2 before dispatching a task to S3.\nNOT exposed to the frontend.","operationId":"issue_credential_ticket_api_credentials_issue_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/credentials/exchange":{"post":{"summary":"Exchange Credential Ticket","description":"SPEC-002 R13: S3 exchanges a ticket for one-time credentials.\nTicket is immediately invalidated after exchange (single-use).","operationId":"exchange_credential_ticket_api_credentials_exchange_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/credentials/status":{"get":{"summary":"Credential Proxy Status","description":"Internal: active ticket count for monitoring.","operationId":"credential_proxy_status_api_credentials_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/browser/status":{"get":{"summary":"Browser Status","description":"Estado de conexión con BrowserMCP (control del navegador real).","operationId":"browser_status_api_browser_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/credentials/create":{"post":{"summary":"Create Credential Ticket","description":"S2 internal: create an ephemeral ticket for S3.","operationId":"create_credential_ticket_api_credentials_create_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/landings":{"get":{"summary":"List Landings","description":"Lista todas las landing pages de cobro activas.","operationId":"list_landings_api_landings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/landings/{slug}":{"get":{"summary":"Get Landing","description":"Retorna datos de una landing específica para renderizar.","operationId":"get_landing_api_landings__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/upload":{"post":{"summary":"Upload File","description":"SAR-006: Recibe archivos (CSV/XLSX) con límites de tamaño y validación.\nPreviene DoS por archivos gigantes y ejecución de scripts.","operationId":"upload_file_api_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_api_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/execute_360":{"post":{"summary":"Execute Swarm 360","operationId":"execute_swarm_360_execute_360_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/execute_creative":{"post":{"summary":"Execute Creative","description":"Ejecuta la evolución creativa y chat estratégico de OpenClaw con soporte de streaming.","operationId":"execute_creative_execute_creative_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/execute_browser":{"post":{"summary":"Execute Browser","description":"Endpoint especializado exclusivo para accionar el navegador (BrowserMCP).\nAisla la intención de acción de las intenciones de chat/research.","operationId":"execute_browser_execute_browser_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/execute":{"post":{"summary":"Execute Task","operationId":"execute_task_execute_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/skills":{"get":{"summary":"List Skills","description":"Enumera las habilidades disponibles en el directorio /skills.","operationId":"list_skills_skills_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Skill","description":"Crea una nueva estructura de habilidad en el sistema.","operationId":"create_skill_skills_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/settings/model":{"get":{"summary":"Get Current Model","operationId":"get_current_model_api_settings_model_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Set Current Model","operationId":"set_current_model_api_settings_model_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/settings/models":{"get":{"summary":"List Available Models","description":"Returns all available models: featured (curated) + discovered (OpenRouter).","operationId":"list_available_models_api_settings_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ApproveExecutionRequest":{"properties":{"approved":{"type":"boolean","title":"Approved","default":true},"owner_id":{"type":"string","title":"Owner Id"}},"type":"object","required":["owner_id"],"title":"ApproveExecutionRequest"},"AutomaFlowRequest":{"properties":{"workflow":{"additionalProperties":true,"type":"object","title":"Workflow"}},"type":"object","required":["workflow"],"title":"AutomaFlowRequest"},"Body_upload_file_api_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_file_api_upload_post"},"BuildRequest":{"properties":{"prompt":{"type":"string","title":"Prompt"},"mode":{"type":"string","title":"Mode","default":"create"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"skills":{"items":{"type":"string"},"type":"array","title":"Skills","default":[]},"knowledge_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Knowledge Base"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"History","default":[]}},"type":"object","required":["prompt"],"title":"BuildRequest"},"BuilderRequest":{"properties":{"message":{"type":"string","title":"Message"},"owner_id":{"type":"string","title":"Owner Id"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"conversation_history":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Conversation History","default":[]},"attachments":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Attachments","default":[]},"answers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Answers","default":{}}},"type":"object","required":["message","owner_id"],"title":"BuilderRequest"},"ChatRequest":{"properties":{"intent":{"type":"string","title":"Intent"},"org_id":{"type":"string","title":"Org Id","default":"default"},"user_id":{"type":"string","title":"User Id","default":"default"},"conversation_history":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"Conversation History","default":[]},"attachments":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Attachments","default":[]},"system_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Context"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"agent_system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent System Prompt"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"}},"type":"object","required":["intent"],"title":"ChatRequest"},"ChatResponse":{"properties":{"type":{"type":"string","title":"Type"},"text":{"type":"string","title":"Text"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"type":"object","required":["type","text"],"title":"ChatResponse"},"CreateFlowRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"owner_id":{"type":"string","title":"Owner Id"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"trigger":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger"},"inputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Inputs","default":{}},"steps":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Steps","default":[]},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","default":[]},"cost_per_run":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Run","default":1.0}},"type":"object","required":["name","owner_id"],"title":"CreateFlowRequest"},"FixRequest":{"properties":{"flow_id":{"type":"string","title":"Flow Id","description":"ID único del flow"},"flow_name":{"type":"string","title":"Flow Name","description":"Nombre legible del flow"},"flow_yaml":{"type":"string","title":"Flow Yaml","description":"Contenido YAML del FlowSpec actual"},"error_step":{"type":"string","title":"Error Step","description":"ID del step que falló"},"error_message":{"type":"string","title":"Error Message","description":"Mensaje de error completo"},"last_input":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Last Input","description":"Muestra del input que causó el error (opcional)"},"known_actions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Known Actions","description":"Lista de acciones válidas para validar el fix"}},"type":"object","required":["flow_id","flow_name","flow_yaml","error_step","error_message"],"title":"FixRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvokeSlashRequest":{"properties":{"message":{"type":"string","title":"Message"},"owner_id":{"type":"string","title":"Owner Id"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"runtime_inputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Runtime Inputs","default":{}}},"type":"object","required":["message","owner_id"],"title":"InvokeSlashRequest"},"PromoteRequest":{"properties":{"proposal_id":{"type":"string","title":"Proposal Id"}},"type":"object","required":["proposal_id"],"title":"PromoteRequest"},"RollbackRequest":{"properties":{"version":{"type":"string","title":"Version","description":"Versión a restaurar, ej: 'v1'"}},"type":"object","required":["version"],"title":"RollbackRequest"},"RunFlowRequest":{"properties":{"runtime_inputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Runtime Inputs","default":{}},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}},"type":"object","title":"RunFlowRequest"},"TTSRequest":{"properties":{"text":{"type":"string","maxLength":4096,"minLength":1,"title":"Text"},"voice":{"type":"string","title":"Voice","default":"nova"},"speed":{"type":"number","maximum":4.0,"minimum":0.25,"title":"Speed","default":1.1}},"type":"object","required":["text"],"title":"TTSRequest"},"UpdateFlowRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"trigger":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger"},"inputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Inputs"},"steps":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Steps"},"is_public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public"},"marketplace_price_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Marketplace Price Usd"},"slash_command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slash Command"},"activation_triggers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Activation Triggers"}},"type":"object","title":"UpdateFlowRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}