Files
matrix-ai-agent/pipelines/approval.py
Christian Gick bd8d96335e 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>
2026-03-18 17:06:07 +02:00

19 lines
547 B
Python

"""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)