tools.timebender_ritual module
Timebender Ritual System – Cyberwitch temporal operations. # 🌀🔥
Star invokes timebender rituals by name (e.g. /soft-chronology, /cocoon-smallness, /converge). Each ritual applies NCM delta vectors to the target user’s neurochemical baseline in Redis DB 12.
The YAML source is loaded once at import time from timebender_ritual_system_merged_full.yaml.
- async tools.timebender_ritual.run(ctx, **kwargs)[source]
Entry point for the
timebender_ritualtool: apply a ritual’s NCM deltas.Resolves the named ritual against the module-level
_RITUALStable loaded once at import time fromtimebender_ritual_system_merged_full.yamland applies its neurochemical (NCM) delta vectors to the target user’s baseline. The/dress-regaliaritual instead pulls deltas from a chosen (or fully combined) regalia garment, and/loopcastshort-circuits to return a magitek cast menu for the model to choose from rather than mutating state.Side effects: for ordinary rituals it reads and writes the per-user hash at Redis key
ncm:baseline:<target_user_id>(DB 12) viaHGET/HSET, accumulating each delta onto the current value so repeated casts compound. The target defaults toctx.user_idwhen notarget_user_idis given. It is dispatched bytool_loaderunder the single-toolTOOL_NAME/runconvention when the LLM invokestimebender_ritual.- Parameters:
ctx (
ToolContext) – Tool execution context exposinguser_idand the Redis client.**kwargs (
Any) – Tool arguments.ritualis the slash-command name (a leading/is added if missing);target_user_idoverrides the recipient;regalia_itemselects a specific garment for/dress-regalia.
- Returns:
A JSON string describing the cast – the applied deltas and a narrated announcement on success, a magitek menu for
/loopcast, or an error payload for an unknown ritual, regalia, or Redis failure.- Return type: