Expand description
Scope records: owned identity records the daemon holds for sessions.
A scope is identified by (owner, ref). The owner is the module whose own
registered connection synced it, never a value in the request, and the
ref is an opaque string unique within that owner only. The design is
docs/designs/daemon-scopes.md; the wire shapes here are the owner-facing
half of it (scope.sync, scope.describe).
Every record type refuses unknown fields. A field this daemon does not know may be one that narrows authority in a later version (a carrier’s target list, say), and silently dropping it would widen what the scope grants, so an owner sending one is told its body is malformed instead.
Structs§
- Scope
Attributes - The attributes the daemon stamps without interpreting. Both grant authority,
so only an owner listed in the daemon’s
scope_authority_ownersmay set either. - Scope
Carrier - Who, besides the owner, may open routes under a scope.
- Scope
Ended - A scope of the syncing owner that the sync ended, by removal or by a higher epoch for the same ref.
- Scope
Parent - A link from a scope to another scope, pinned to that scope’s session by its epoch.
- Scope
Record - One scope as its owner registers it in
scope.sync. - Scope
Record Result - The per-record result in a
scope.syncreply, in request order. - Scope
Selector - The scope a
route.openasks to be admitted under. - Scope
Stamp - The fields the daemon stamps for a live scope.
Enums§
- Parent
State - The state of a scope’s parent link.
- Scope
Kind - What a scope stands for. Closed, and fixed for the life of one
scope_epoch: a different kind needs a new epoch, which ends the old scope. - Scope
Record Outcome - What a
scope.syncdid with one record. - Scope
Status scope.describe’s answer about one(owner, ref).
Constants§
- CAP_
SCOPES_ V1 - The
server.describecapability a daemon advertises when it admits routes under scopes. A carrier that needs a scoped route and does not see it fails the call (scope_unsupported) instead of opening an unscoped route. - MAX_
CARRIER_ TARGETS - Most modules one targeted carrier entry may list.
- MAX_
LIVE_ SCOPES_ PER_ OWNER - Most live scopes one owner may hold. A sync naming more is refused whole.
- MAX_
SCOPE_ ATTRIBUTE_ BYTES - Most bytes one scope’s
attributesmay take, measured as compact JSON. A sync carrying a larger record is refused whole. - MAX_
SCOPE_ TOMBSTONES_ PER_ OWNER - Most ended scopes the daemon remembers per owner. The oldest is forgotten first, and reaching the bound never refuses a sync.
- SCOPE_
DESCRIBE_ OP - Module-to-subc op that reads one scope’s current state.
- SCOPE_
SYNC_ OP - Module-to-subc op that registers an owner’s full scope set.