Skip to main content

Module roles

Module roles 

Expand description

Presets: named grant sets. Roles are the built-in presets on a room; an agent’s default delegation and the foreign-device bound are presets too.

Modules§

agent_policy
What an agent is in a room, decided in one place.
governance
The room’s governance actions.

Structs§

Preset
A named grant set people pick instead of writing grants one by one.
Rule
One rule of a preset: a grant without its subject.

Enums§

AgentPreset
What an agent admitted to a room may do there: the room-level grants it receives. Never a human workspace role.
PresetError
A preset that cannot be assigned.

Constants§

COMMENTS_FIELD
The field holding comments, wherever a model keeps them. The Commenter preset covers it at any depth, so field edits and verbs published on it are what a commenter may do.
GOVERNANCE_KIND
The kind of every governance action. Changing who may do what reaches beyond the document — it decides what other people see and do — so an agent’s default asks before it, and the wire never lets one through on an answer that would need asking.
MODERATION_FIELD
The field node every app’s moderation actions sit under (acting on other people’s content: removing their message, locking a channel). One rule on it covers every app’s moderation, so presets need no list of verbs.
MODERATOR_GOVERNANCE
The governance a Moderator may exercise: the membership actions and restrictions, on members ranked below Moderator, and stopping or restarting a bot, so a misbehaving bot can be halted without the authority to widen it.
ROOM_KIND
The kind id of the room’s own resource. Its actions are the room’s governance: membership, roles, grants and settings.

Functions§

agent_default
An agent’s default delegation within the scope a person gives it: Read and Undoable allowed, Outside asks.
agent_delegation
The delegation a delegated agent agent of person carries in room: the preset of agent_policy::ROLE_CAP. The agent acts with its person’s grants bounded by it, so it changes what its person may change, never more than the cap allows, and never the room’s governance.
app_authorship
The grant making application app an author of room: it reads and changes the room’s content as the person using it, and reaches nothing outside it. Given when a person who may change the room opens the app.
block_grant
The grant that keeps person out of room: every kind denied on the whole room, given by granted_by.
block_grant_id
The id of the grant that bans person from a room.
comments
Where comments live in a room, at any depth.
foreign_device_bound
What a person may do from a device that is not theirs, in any room: read and change content, ask first before reaching outside it, never govern.
governance_action
The node of one governance action.
moderation
Where moderation lives in a room, at any depth.
restriction_grant
The grant that stops person changing anything in room until until_ms (Unix milliseconds, exclusive): undoable changes and outside effects denied on the whole room, reading left alone. It lapses by itself, so a temporary restriction needs nobody to come back and lift it.
restriction_grant_id
The id of the grant that restricts person in a room.
role_preset
The preset a role stands for in room.
role_rules
The rules a role carries in room.
room_resource
The room’s own resource: room:<id>/kind:tilo.room.
room_role_grants
Every role’s grants for a new room, given by its owner. Ids are role:<role>:<index>.