Skip to main content

Module turn

Module turn 

Expand description

A turn: the person’s message an agent acts for.

An agent holds no authority of its own. It acts inside a turn, and a turn is caused by a person’s message in a conversation the agent takes part in. Its authority is that person’s grants, capped at roles::agent_policy::ROLE_CAP, narrowed by the bound the agent’s record keeps (roles::agent_turn).

Every one of those four facts is checked here, in one place, so every door and every receiver asks the same question:

  1. the turn names a cause, and the cause was authored by the person;
  2. the agent takes part in the cause’s conversation at the op’s heads;
  3. the turn has not ended (Looked::ended: its work is done or stopped);
  4. the action’s kind is within the person’s grants at its heads ∩ roles::agent_policy::ROLE_CAP ∩ the agent’s recorded bound — which roles::agent_turn turns into grants the door decides with.

A cause that has not reached the receiver yet is not a refusal: the op waits for it (Held::waits), the same way an op from a late joiner does.

Structs§

Looked
What a receiver looked up about a turn’s cause, as it holds it now.
Turn
The person’s message an agent acts for.

Enums§

Held
Why an agent’s op is not admitted on its turn.

Functions§

authority
The authority agent agent acts with for person on turn in workspace: the person’s grants, capped and narrowed by the agent’s record, once the turn is admitted.
node
The node an agent’s turn decides an action at.
subject
The subject an agent’s turn carries in a workspace: the agent, acting for its person.