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:
18
pipelines/steps/template.py
Normal file
18
pipelines/steps/template.py
Normal file
@@ -0,0 +1,18 @@
|
||||
"""Template step — format and post a message to the target room."""
|
||||
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def execute_template(config: dict, send_text=None, target_room: str = "", **_kwargs) -> str:
|
||||
"""Render a template message and post it to the target room."""
|
||||
template = config.get("template", config.get("message", ""))
|
||||
if not template:
|
||||
raise ValueError("template step requires 'template' or 'message' field")
|
||||
|
||||
# Template is already rendered by the engine before reaching here
|
||||
if send_text and target_room:
|
||||
await send_text(target_room, template)
|
||||
|
||||
return template
|
||||
Reference in New Issue
Block a user