Released docs. You are viewing the documentation published with v0.48.0. Development docs are available at Latest.
Use this contract when you consume the explanations that bregctl produces for a Base Registry
Engine (BReg) project. bregctl --format json explain <subject> <project> writes a BRegCtlReport whose explanation
member is a separately versioned document. bregctl inserts the subject’s apiVersion and kind
after it serialises the explanation. The report keeps its own breg/ctl-report/v1alpha1 version.
Subjects and formats
Section titled “Subjects and formats”| Subject | Format | Current version | Schema |
|---|---|---|---|
model | BRegModelExplanation | v1alpha8 | ModelExplanation.schema.json |
access | BRegAccessExplanation | v1alpha9 | AccessExplanation.schema.json |
access --scenario | BRegAccessPreview | v1alpha4 | AccessPreview.schema.json |
actions | BRegActionsExplanation | v1alpha7 | ActionsExplanation.schema.json |
proposals | BRegProposalsExplanation | v1alpha3 | ProposalsExplanation.schema.json |
routes | BRegRoutesExplanation | v1alpha6 | RoutesExplanation.schema.json |
queries | BRegQueriesExplanation | v1alpha5 | QueriesExplanation.schema.json |
events | BRegEventsExplanation | v1alpha6 | EventsExplanation.schema.json |
lifecycle | BRegLifecycleExplanation | v1alpha8 | LifecycleExplanation.schema.json |
The schemas live in the products/breg/contracts/explain/ directory of the
source repository.
Each format’s identifier is id.registrystack.org/formats/breg/<format>/<version>, with the format
name in lowercase kebab-case. For example, the model format is
id.registrystack.org/formats/breg/model-explanation/v1alpha8.
lifecycle accepts no project and describes the engine-owned Proposal state machine. Every other
subject requires a project. proposals returns the same source-free Action definitions as
actions, filtered to Proposal execution.
Schemas and compatibility
Section titled “Schemas and compatibility”Each schema is draft 2020-12 and self-contained. A pinned object seals its members with
additionalProperties: false. Adding, removing, renaming or changing a pinned member requires a
version bump for that format alone. Select the schema that matches the version in the document.
x-registry-passthrough marks compiler-owned values whose internal shape is outside this
contract. Validate any opaque data you use. The annotation states why each node is opaque, and JSON
Schema validators ignore it. The Access authority inventory pins principalClaims and the mutually
exclusive inventory and error relationship, while the remaining inventory members stay opaque.
Casework provider pairing independently verifies its sealed context export and grants no BReg
authority.
The Lifecycle payload is pinned in full, because its model exists only to explain this state machine. Actions and Proposals share a source-free inspection shape, and their schemas describe it independently, without external references.
Version changes
Section titled “Version changes”Each entry names the format version that introduced the change. Select the matching schema.
The local development runner (rstack dev) reads Model requiresPostgis and Access
claimContract.principalClaims and claimContract.requesterClients from these documents.
v1alpha8adds the requiredrequiresPostgis, true when the compiled model needs PostGIS for a bounding-box query, a CRS84 polygon field or a CRS84 polygon Action input.v1alpha7addsrecordTypes[].eventRecord,recordTypes[].groupingandactions[].grouping.eventRecordisnullunless the Record type declares an event record descriptor. Otherwise it is the resolved descriptor (descriptorVersion1, an integer). It names the stored fields that say what a row is about, when it happened, when it takes effect, what it was recorded from and what it corrects.- A declared
occurredAtoreffectivenames its shape intype(pointorinterval) beside that shape’s members. - Undeclared
summary,occurredAt,effective,correctionandsourceEventIdare explicitnull, as are an interval’s openendand asourceEventId’s unsetnamespace,namespaceFieldandconstraint. - A role’s
label, a native role’snamespaceand a field’starget(present only for a reference) are omitted, nevernull. recordedTimeis always{"source": "creation-revision"}, because recorded time is read from record history and is never authored.groupingisnullunless the Record type or Action authorsdisplay.purposeordisplay.group. It is presentation only and never changes identity, access or execution. Do not infer a purpose or an event record from names, routes, dates or references.
v1alpha6adds dataset display inventories, retains field display and module origins, and addsauthoring.documents.- Each document names a project-relative file and lists the RFC 6901 JSON Pointers present in the source before defaults or module composition. Paths expose structure and authored mapping keys, without copying leaf content such as labels or configuration values. Documents also identify their kind and module.
- Each document’s
bindingslinks anexplanationPointeragainst the explanation to asourcePointeragainst that source document. The links follow ids and module origins, so they stay correct when compilation reorders arrays or a module extends a Record type. The root explanation binds to/project. - Bindings cover datasets, project access profiles, review authorities, Record types, stored and derived fields, record hooks, Actions, inputs, Proposal hooks and statistical datasets.
- To test authored display, find the object’s binding and append
/display/labelor/display/descriptionto its source pointer, then look for that exact path in the same document’sauthoredPaths. Use the same approach for an unchanged source member such as a stored field’srequired. Absence means the source did not author that member; it does not mean every generated member has a default. Compiled names such asrevision,canonicalIdandschemahave no implied source counterpart.
v1alpha5names the native model and Proposal contracts. Model inspection returns source-freerecordTypes,actionsand the compiledrevision.- Model field entries always include
id,apiName,required,classification,schemaandfieldType, including fields absent from every query projection. - Current formatters also include boolean
encryptedmetadata in the author-only Model and Actions inventories; derived fields reportfalse. This extends the compiler-owned field metadata without closing its passthrough shape. Validate this value before you use it to propose before and after review context; the schema permits older field metadata without this member. fieldTypecarries the same compiled type object as query field summaries, so a form can distinguish multilinetextfrom a boundedstringand discover a reference’s target. Its internal shape follows the engine field type contract; the JSON valueschemaremains the validation contract for field values.
- Model field entries always include
Access
Section titled “Access”v1alpha9pinsclaimContract.purposeRequiredand adds the pinnedclaimContract.requesterClients: every client any Record profile, statistical dataset, Action or Proposal permission restricts its requester to.v1alpha8adds the requiredtimersinventory. It names each root-enabled autonomous timer, the Record and Action surfaces that can shape its control, predicate and mapped-input fields, and the exact product-owned system grant that bounds its future effect. The report does not turn that authority into a selectable access profile or imply a direct Record grant.v1alpha7names the target Record type, through Record type and route on every read-path grant. ItsrowReachinventory includes aread_pathsurface under the disclosed target Record type, with the root profile’s row boundaries and an exact source path back to the grant.v1alpha6adds the access-profile display inventory.v1alpha5names the top-levelrecordTypes, and usesrecordTypein route references and consent record references.
Each Record type’s access explanation lists its disclosureConditions in full, with the when
literals, because it is author-facing. A profile entry also shows requireAccessReason when set.
The author inspection of a registry carries the same disclosureConditions list.
Access preview
Section titled “Access preview”AccessPreview stays at v1alpha4. It gains an optional disclosureConditions list of the ids of the
conditions that bind the previewed profile on the Record type, present only when one does. It names no
literal.
Actions and Proposals
Section titled “Actions and Proposals”- Actions
v1alpha7and Proposalsv1alpha3addmigrationReviewRevision, the digest of the Action behaviour contract used to decide whether an activation change requires migration review. - Actions
v1alpha6and Proposalsv1alpha2retain optional authored inputdisplayseparately from the existinglabel, whose fallback remainsapiName. Display text is presentation metadata and never changes identity, matching or authority. Keep the id alongside any label in selection and approval interfaces. - At
v1alpha5, Action inspection uses the same normalised definitions as Model inspection, including execution policy, Plan, commit guards, dependencies and bounds. ProposalsExplanationstarted atv1alpha1.
Routes and queries
Section titled “Routes and queries”- Routes
v1alpha6addsavailabilityto the closed Action route kind set, for immediate Actions with reference inputs. - At
v1alpha5, Record routes usetype: record, and Action routes includestartand no longer describe the removed request operations. Query operations userecordType.
Events
Section titled “Events”v1alpha6adds therejectedandreview-returnedProposal transitions to the transition selection a Proposal hook may name.- Event inspection adds the owning hook phase and the Proposal transition selection.
Lifecycle
Section titled “Lifecycle”v1alpha8addsrecoveryReasonsto every transition.retryrecoversdependency-outageandlease-expired; other transitions currently report an empty list.v1alpha7adds each state’s possibleturns. Submitted work has a conditional turn whose ordered rules use the same evaluator as runtime Proposal documents.v1alpha6adds the terminalrejectedstate, therejecttransition fromsubmitted, and thereview-authority-resultenforcement, which allows only a verified review result to perform it.v1alpha5replaces the request state machine with the Proposal state machine.
Cookies on Registry Stack
We use optional cookies to understand how you use the main Registry Stack website and this documentation. If you contact us, we may link this activity to your enquiry. You can change your choice at any time. Read the privacy policy.
Your browser asks sites not to track you, so optional tracking stays off.
We could not use or save that choice. Optional tracking remains off.