Per-hook actor extractors. Each entry maps a hook name to a function that
receives hookArgs and returns { eventSubject, eventTriggerer }:
eventSubject — the actor the hook happened TO.
eventTriggerer — the actor that CAUSED the hook to fire, or null.
Scaffolding for the trigger context scope model (module/helpers/trigger-context.mjs)
— not yet wired into any dispatch code. Consumed by a later phase to populate
context.eventSubject/context.eventTriggerer for hook-fired triggers.
Note: bms.weaponStruck's hookArgs shape is [attacker, { weapon, targetActor, isUnarmed }]
(confirmed against documents/actor.mjs / trigger-outcomes.mjs weaponStruck emission) —
hookArgs[0] is the striking actor (eventTriggerer), not the struck actor. This differs
from the plan's initial guess (eventSubject = hookArgs[0]); the extractor below reflects
the actual observed shape.
Per-hook actor extractors. Each entry maps a hook name to a function that receives hookArgs and returns { eventSubject, eventTriggerer }: eventSubject — the actor the hook happened TO. eventTriggerer — the actor that CAUSED the hook to fire, or null. Scaffolding for the trigger context scope model (module/helpers/trigger-context.mjs) — not yet wired into any dispatch code. Consumed by a later phase to populate context.eventSubject/context.eventTriggerer for hook-fired triggers.
Note: bms.weaponStruck's hookArgs shape is [attacker, { weapon, targetActor, isUnarmed }] (confirmed against documents/actor.mjs / trigger-outcomes.mjs weaponStruck emission) — hookArgs[0] is the striking actor (eventTriggerer), not the struck actor. This differs from the plan's initial guess (eventSubject = hookArgs[0]); the extractor below reflects the actual observed shape.