asobi_ops_caps (asobi v0.75.1)
View SourceCapability classes for the ops plane, and the table that tags every route with exactly one of them (ADR 0007).
read is everything non-mutating, player_data acts on one identified
player's data (ban, grant, broadcast, roster edits, and the full export of
one account), config is economy definitions, credentials and deploy-adjacent
settings. erasure is player erasure and nothing else. The only
authorisation decision anywhere in the plane is membership of a route's class
in the actor's caps.
erasure is its own class for one reason, and it is not sensitivity: it is
the only irreversible one. An erased account cannot be un-erased by a second
call the way a ban can be lifted, so it does not belong in the same grant as
"give this player 100 coins" - and asobi_console_session hands a browser
every other class by default.
Role names are deliberately absent. They are not stable wire surface -
capability classes are, and a further class later is additive the same way
erasure was. asobi_saas maps its own roles onto these classes once, at
token-mint time, so the string "owner" never reaches this plane.
A route with no entry in classes/0 has no class and authorised/2 denies
it, so an untagged or mis-mounted route is closed rather than open.
Summary
Functions
Whether an actor holding Caps may call a route of class Class.
The class of an ops route, from the request method and path.
Every class, for validating one declared in an extension manifest.
The route table: method, path segments below /api/v1/ops, and class.
Types
Functions
Whether an actor holding Caps may call a route of class Class.
The class of an ops route, from the request method and path.
undefined for anything that is not a tagged ops route, including a path
outside /api/v1/ops and a method the table does not carry.
-spec class_names() -> [class()].
Every class, for validating one declared in an extension manifest.
-spec classes() -> [route()].
The route table: method, path segments below /api/v1/ops, and class.
A router meta-test holds this table and the router's ops group to each other, so a new ops route cannot ship untagged.