Per-group custom commands
53 exported Custom/ folders are the trigger list, matched by a filter rather than COMMAND_ALIASES because the names are data; gated per tenant by cb_gateway/packs.py, which is what finally reads tenants.handler_pack
- v1 scenarios
- —
- Ported
- 6
- Green
- 6
- Failing
- —
53 exported Custom/ folders are the trigger list, matched by a filter rather than COMMAND_ALIASES because the names are data; gated per tenant by cb_gateway/packs.py, which is what finally reads tenants.handler_pack
Miscellaneous.py:145-158What it does
Some names are commands. /louie, /momo, /mekhy and 50 others each reply
with a picture from a collection named after that command, captioned with the
collection's name and the picture's number. Add a number — /louie 3 — and you
get that exact picture instead of a random one.
Behaviour that must not change
The 53 names are data, not code. In v1 they were folder names in a private cloud bucket, listed once when the bot started; here they come from the same folders, exported and shipped with the release. That means adding a command is now a release rather than a file upload — a deliberate trade, since it makes the names reviewable, testable and switchable per brand, none of which a bucket listing ever was.
Asking for a picture that does not exist (/louie 999) sends nothing, which is
what v1 did too, though v1 got there by crashing.
These commands are the first thing a handler pack controls: a brand running the bot can turn the whole family off with one field on its tenant row rather than listing 53 command names.
How to verify it
qa/features/x_custom_commands.feature — the random draw, the numbered pick, an
out-of-range number, a name with no collection, the fun switch and a brand that
has the family turned off; run with python scripts/cb.py test. By hand in the
sandbox: /louie twice and check you get different pictures, then /louie 0
twice and check you get the same one.
Conversational AI replies
langchain provider behind the router, tenant budget cap, v1's per-user streak on a new cache.bump_clamped primitive, per-group rate limit; QA authored, not ported (7 scenarios) - see docs/contracts/x_conversational_ai.md
Media distortion
branch chain on the reply path, carve + ffmpeg in cb-worker behind a real semaphore (D3) with per-call temp dirs (D4); v1's video/GIF arms are unreachable and stay disabled; seam carving over numpy replaces ImageMagick liquid_rescale - see docs/contracts/x_distortion.md; QA authored (12 scenarios)