jmaple.context¶
The per-invocation MethodContext passed to every method handler. Carries
the authenticated principal, the database session, runtime settings, the
capability registry, and helpers for bumping state strings and tracking
created ids.
MethodContext
dataclass
¶
Per-invocation context — one instance per method call within a batch.
state_changes
class-attribute
instance-attribute
¶
(account_id, data_type) → new state string; harvested by the dispatcher.
bump_state
async
¶
Atomically increment and return the new state string.
Also records the bump so the dispatcher can fan it out as a StateChange
to the push broker after the request completes.
require_account ¶
Return the accessible :class:AccessibleAccount or raise accountNotFound.
require_capability ¶
Raise forbidden if the request didn't declare this capability in using.