http/auth_shape.ts view source
ZodOptional<$ZodBranded<ZodUUID, "Uuid", "out">> acting field shared by every input that needs the caller's acting actor.
Declaring acting: ActingActor on a route or action input signals to the
dispatcher's authorization phase to resolve an actor against the
authenticated account: it runs resolve_acting_actor, builds the
actor-bound RequestContext, and loads role_grants before auth guards fire.
Resolution rules: omitted + 1 actor → use it; omitted + multiple actors →
actor_required with the available list; supplied + on the account → use
it; supplied + foreign actor → actor_not_on_account.
Account-grain routes — input doesn't declare acting and auth doesn't
require role_grants — skip resolution entirely; their RequestContext.actor
is null and the audit envelope's actor_id stays null.
Lives next to RouteAuth because the two are paired by registry-time
invariant 2: auth.actor !== 'none' ⟺ input (or query, on REST GETs)
declares acting?: ActingActor. Keeping the contract in one module
removes the http/ → auth/ import that an earlier split forced.