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/approval.py
Normal file
18
pipelines/approval.py
Normal file
@@ -0,0 +1,18 @@
|
||||
"""Approval handling — maps Matrix reactions to pipeline approvals."""
|
||||
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Reaction emoji to response mapping
|
||||
APPROVAL_REACTIONS = {
|
||||
"\U0001f44d": "approve", # thumbs up
|
||||
"\U0001f44e": "decline", # thumbs down
|
||||
"\u2705": "approve", # check mark
|
||||
"\u274c": "decline", # cross mark
|
||||
}
|
||||
|
||||
|
||||
def reaction_to_response(reaction_key: str) -> str | None:
|
||||
"""Map a reaction emoji to an approval response."""
|
||||
return APPROVAL_REACTIONS.get(reaction_key)
|
||||
Reference in New Issue
Block a user