catalogue

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package catalogue is the list of every use case this build has, once.

It is not the registry. The registry is built in the composition root with real dependencies and is what a request runs through; this is the same list with none - `Descriptor()` reads no dependency of a use case, so the zero value answers what it is called, what it declares and what it records. That is what lets a gate and a generator ask the catalogue a question without a database, an HTTP server or a wiring fixture.

The list is maintained by hand, and deliberately so: a list derived from the source would grow a use case that was written and never registered, which is exactly what the parity gate exists to notice. Three things keep it honest - the gate that finds a `Descriptor()` missing from here, the gate that finds one missing from `cmd/server`, and the generated event matrix, which is read by people.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionEntitlements

func ActionEntitlements() map[string]entitlement.Feature

ActionEntitlements is, for every action kind whose use case uses a feature a plan may leave out, that feature (usecase.Descriptor.Entitlement): what the manifest leaves out of the actions it offers where the plan leaves the feature out.

func AutomationActionFields

func AutomationActionFields() map[string][]usecase.Field

AutomationActionFields is, for every action kind AutomationActions names, the fields the use case behind it declares - what the manifest answers so that a rule editor builds an action's form from the declaration rather than from a schema compiled into it. The same []usecase.Field the MCP tool schema is derived from, read off the descriptor here and never declared a second time; a kind with no fields maps to an empty slice rather than being absent, because "no parameters" and "no such kind" are two different answers.

func AutomationActionSummaries

func AutomationActionSummaries() map[string]string

AutomationActionSummaries is, for every action kind AutomationActions names, the one sentence its use case declares as its Summary - the sentence the MCP tool for it carries, read off the descriptor here so that a rule editor's catalogue says what a kind does without a second copy of ninety sentences. Protocol documentation in English, as the Field descriptions are, and for the same reason not a breach of ADR-0011.

func AutomationActions

func AutomationActions() []string

AutomationActions is every action kind a rule may name that is a use case, sorted: what the manifest answers and a rule editor offers. Derived from the descriptors for the reason Scopes is, and handed to the manifest by the composition root for the same reason - the engine's own flow kinds (WAIT, BRANCH, STOP) are not in it because they are in no catalogue; the contract says so, and a client names those three itself.

func Descriptors

func Descriptors() []usecase.Descriptor

Descriptors is every use case, in the order the composition root registers them.

func Scopes

func Scopes() []string

Scopes is every token scope this build declares, sorted and without repeats.

Derived from the descriptors rather than written down, because a list somebody maintains beside them is a list that grows a scope no operation checks - and a scope no operation checks is a bound a token's holder believes in and nothing applies. It is what CreateAccessToken validates a request against, handed to it by the composition root: a use case cannot read the catalogue it is itself part of (ADR-0001).

func SessionScopes

func SessionScopes() []string

SessionScopes is what a session-authenticated person may exercise: every declared scope except the control plane's. A session is the person themselves - but the admin surface is entered by a deliberately minted credential, never by whoever happens to be signed in (identity.md §15.4), so the one scope class sessions never carry is `admin:*`.

**One exception, ADR-0070 §4, written here rather than left to be discovered.** A session *raised* by a registered operator who has just passed a step-up carries `admin:tenants` for an hour - which is not this function's doing: it still answers every scope but the control plane's, and `AuthenticateToken.elevatedScopes` adds the one back for exactly that hour, for exactly that session, and only while the register still names its holder. The rule is therefore weakened to *only for a registered operator, only after a fresh proof, only for an hour, only on the session that proved it, and written down*, and what it buys is that nobody has to mint a long-lived all-powerful token and paste it into a browser to change a switch.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL