#!/usr/bin/env bash
# Read the event JSON, extract the text, return a transform_text action
# that prepends "[ext] ".
event=$(cat)
# Bash-only JSON field extract (no jq). Look for "text":"..." pattern.
# This is brittle but adequate for fixtures.
text=$(printf '%s' "$event" | sed -n 's/.*"text":"\([^"]*\)".*/\1/p')
printf '{"action":"transform_text","text":"[ext] %s"}\n' "$text"
