a4761df3f6
gates / consistency-and-conventions (push) Successful in 2m3s
Generalizes the Telegram listener with a configurable text-prefix map (telegram_prefixes.env): any non-command message '<word> <text>' runs the mapped command with <text> appended as ONE quoted argument — e.g. opencode=opencode turns 'opencode check cpu' into opencode "check cpu". Routing order per message: text-prefix map → built-in Gemini ai bridge → /command map → Unknown command. A mapped word shadows the Gemini bridge. The prefix verb is reworked: bare = list map + bridge word; 'prefix <word> <cmd...>' = map; 'prefix <word>' = show; 'prefix -r <word>' = remove. The Gemini trigger word itself is now set via 'pos config telegram' (TELEGRAM_AI_PREFIX). Also extracted run_and_reply() to share the /command-map (60s) and prefix (120s) execution semantics; fixed a latent set -e abort on invalid templates in prefix_map_set's check_syntax call. Verified: 27/27 routing-harness assertions, full CLI verb suite, dispatch smoke, pos config telegram render, bash -n, make gen && make check, make lint 0 FAIL / 0 WARN, shellcheck -S style (0 new findings).