catalog

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package catalog publishes immutable graph-plan metadata for discovery. It derives exported contracts and requirements from an already validated config.Plan; it never reconstructs topology from legacy ownership flags and never retains values, deployment secret references, or secret locators.

Index

Constants

View Source
const (
	FormatVersion uint64 = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Boundary

type Boundary struct {
	Name      string               `json:"name"`
	Direction ir.BoundaryDirection `json:"direction"`
	Type      string               `json:"type"`
}

type ChannelSummary

type ChannelSummary struct {
	Count    int `json:"count"`
	Lossy    int `json:"lossy"`
	MaxDepth int `json:"max_depth"`
}

type Dependency

type Dependency struct {
	Name     string                      `json:"name"`
	Optional bool                        `json:"optional,omitempty"`
	Artifact *inspect.ArtifactIdentity   `json:"artifact,omitempty"`
	Scope    graphconfig.DependencyScope `json:"scope,omitempty"`
}

type Document

type Document struct {
	FormatVersion uint64  `json:"format_version"`
	Fingerprint   string  `json:"fingerprint"`
	Entries       []Entry `json:"entries"`
}

func Freeze

func Freeze(entries []Entry) (Document, error)

Freeze creates a deterministic immutable catalog snapshot.

func Parse

func Parse(source []byte) (Document, error)

func (Document) Discover

func (document Document) Discover(query Query) ([]Entry, error)

Discover returns entries matching every requested constraint. Type filters are exact canonical protocol/payload strings, not modality booleans.

func (Document) Lookup

func (document Document) Lookup(graphID string, revision uint64, fingerprint string) (Entry, error)

Lookup requires the exact entry fingerprint so mutable graph@revision selectors cannot silently reinterpret a deployment.

func (Document) Marshal

func (document Document) Marshal() ([]byte, error)

func (Document) Validate

func (document Document) Validate() error

type Entry

type Entry struct {
	GraphID      string                     `json:"graph_id"`
	Revision     uint64                     `json:"revision"`
	Fingerprint  string                     `json:"fingerprint"`
	Plan         graphconfig.Identity       `json:"plan"`
	Graph        ir.Graph                   `json:"graph"`
	Stage        Stage                      `json:"stage"`
	Summary      string                     `json:"summary"`
	Change       string                     `json:"change"`
	Tags         []string                   `json:"tags,omitempty"`
	Lineage      []string                   `json:"lineage,omitempty"`
	Boundaries   []Boundary                 `json:"boundaries,omitempty"`
	Nodes        []Node                     `json:"nodes"`
	Dependencies []Dependency               `json:"dependencies,omitempty"`
	Effects      []element.Effect           `json:"effects,omitempty"`
	Channels     ChannelSummary             `json:"channels"`
	Profiles     []inspect.ArtifactIdentity `json:"profiles,omitempty"`
}

Entry is one exact discoverable plan revision. Fingerprint covers metadata, the public plan identity, exact boundary contracts, registered implementations, dependencies, effects, and evidence profiles.

func NewEntry

func NewEntry(plan *graphconfig.Plan, metadata Metadata) (Entry, error)

NewEntry snapshots one Plan. Private deployment identity and all raw artifacts are intentionally inaccessible through this API.

func (Entry) Ref

func (entry Entry) Ref() string

func (Entry) Validate

func (entry Entry) Validate() error

Validate verifies both derived metadata and the stored immutable entry fingerprint. Freeze is the constructor that assigns a new fingerprint.

type Metadata

type Metadata struct {
	Stage    Stage
	Summary  string
	Change   string
	Tags     []string
	Profiles []inspect.ArtifactIdentity
}

type Node

type Node struct {
	ID             string                               `json:"id"`
	Element        element.Identity                     `json:"element"`
	Implementation graphconfig.ImplementationResolution `json:"implementation"`
	ConfigSchema   string                               `json:"config_schema,omitempty"`
	StateSchema    string                               `json:"state_schema,omitempty"`
	StateTransfer  *element.StateTransferCapabilities   `json:"state_transfer,omitempty"`
}

type Query

type Query struct {
	Stages      []Stage
	Tags        []string
	InputTypes  []string
	OutputTypes []string
	Effects     []string
	Limit       int
}

type Stage

type Stage string
const (
	Experimental Stage = "experimental"
	Candidate    Stage = "candidate"
	Stable       Stage = "stable"
	Retired      Stage = "retired"
)

Jump to

Keyboard shortcuts

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