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§
- Agent
Preset - What an agent admitted to a room may do there: the room-level grants it receives. Never a human workspace role.
- Preset
Error - 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
agentofpersoncarries inroom: the preset ofagent_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
appan author ofroom: 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
personout ofroom: every kind denied on the whole room, given bygranted_by. - block_
grant_ id - The id of the grant that bans
personfrom 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
personchanging anything inroomuntiluntil_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
personin 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>.