Skip to main content

Module schema

Module schema 

Expand description

Participant-independent catalogue schema.

A multi-participant app (Writer) builds a different resource tree for each participant’s caret, selection and Find hits. What it publishes to the broker, and what grants are checked against, must not be one caret’s snapshot: that would churn the publication revision on every caret move and would hide operations that another participant could use.

Instead an app publishes its catalogue schema: stable addresses whose context-dependent preconditions are declared as flags (ContextRequirement, carried in ActionContract::tags). At invoke time the host rebuilds the invoker’s own tree; an operation whose precondition is not met there is refused with ContextRequirement::refusal.

catalogue_schema reduces a surveyed catalogue to entries keyed by resource kind rather than resource id, so volatile, document-derived ids (a search hit, a selection range) never change the schema.

Structs§

CatalogueSchemaEntry
One participant-independent catalogue entry. Keyed by resource kind and action id, never by the (possibly document- or view-derived) resource id.

Enums§

ContextRequirement
A precondition on the invoking participant’s view. Declared on the published schema as an availability flag; checked against the invoker’s own view at invoke time.

Constants§

PARTICIPANT_VIEW_TAG
Contract tag of a View operation that changes only the invoking participant’s own view (its caret, selection or Find state). Only such an operation may be invoked by a remote participant: every other View operation moves the local person’s private view and stays refused.
REQUIRES_TAG_PREFIX
Prefix of the contract tags that declare a context precondition.

Functions§

catalogue_schema
Reduce a surveyed catalogue to its participant-independent schema: entries keyed by resource kind, sorted, duplicates removed. Two catalogues that differ only in volatile resource ids, labels or order have the same schema.
catalogue_schema_bytes
Canonical bytes of a schema, for a host to digest into a stable publication revision or a frozen grant schema digest.