moo.core.current_provenance

moo.core.current_provenance()

Return the always-on provenance triple for the running task, server-side.

The triple is {"origin", "verb", "owner"} taken from the top of the caller stack: origin is the object the running verb is acting on, verb the responsible verb name, and owner the pk of the verb’s permission owner (its context.caller). All three are read from the in-memory caller stack — no database query — so attaching this to every outbound message stays a tag-and-id on the hot path. Full caller-stack capture for a report/audit happens separately via moo.sdk.provenance.capture_provenance_stack().

Returns None outside an active task (no caller stack).