feat: add pipeline engine with approval flow and file triggers

Sequential step executor (script, claude_prompt, approval, api_call,
template, skyvern placeholder), reaction-based approvals, file upload
trigger matching, portal API state sync.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-03-18 17:06:07 +02:00
parent f4feb3bfe1
commit bd8d96335e
12 changed files with 755 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
"""API call step — make HTTP requests."""
import logging
import httpx
logger = logging.getLogger(__name__)
async def execute_api_call(config: dict, **_kwargs) -> str:
"""Make an HTTP request and return the response body."""
url = config.get("url", "")
if not url:
raise ValueError("api_call step requires 'url' field")
method = config.get("method", "GET").upper()
headers = config.get("headers", {})
body = config.get("body")
async with httpx.AsyncClient(timeout=30.0) as client:
if method == "GET":
resp = await client.get(url, headers=headers)
elif method == "POST":
resp = await client.post(url, headers=headers, content=body)
elif method == "PUT":
resp = await client.put(url, headers=headers, content=body)
elif method == "DELETE":
resp = await client.delete(url, headers=headers)
else:
raise ValueError(f"Unsupported HTTP method: {method}")
resp.raise_for_status()
return resp.text