meaninggraph

package
v0.144.8 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 21 Imported by: 1 module, 1 package

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 meaninggraph resolves exact retained DataModel source revisions. It never resolves meanings, executes source code, opens a database or writes.

Index

Constants

View Source
const LegacyRegistryRepository = "https://github.com/modelspec-org/registry"
View Source
const RegistryRepository = "https://github.com/meaninggraph/registry"
View Source
const TransportFixture = "local-fixture"
View Source
const TransportGitHub = "fixed-github-commit"

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchivedSource

type ArchivedSource struct {
	Path      string `json:"path"`
	SHA256    string `json:"sha256"`
	MediaType string `json:"mediaType"`
	Bytes     []byte `json:"bytes"`
}

type Config

type Config struct {
	RegistryCommit string
	CatalogSHA256  string // SHA-256 of exact catalog.json bytes, without sha256: prefix.
	FixtureRoot    string // Optional development transport; NOT proof of the Git commit.
	Limits         Limits
}

type DependencyPin

type DependencyPin struct {
	Alias      string `json:"alias"`
	RevisionID string `json:"revision_id"`
}

type Limits

type Limits struct {
	MaxFiles, MaxModels         int
	MaxFileBytes, MaxTotalBytes int64
	Timeout                     time.Duration
}

type ModelRevision

type ModelRevision struct {
	datatug.DataModelReference
	RevisionID   string           `json:"revisionId"`
	RegistryID   string           `json:"registryId"`
	Title        string           `json:"title"`
	Module       json.RawMessage  `json:"module"`
	Receipt      json.RawMessage  `json:"receipt"`
	Definition   json.RawMessage  `json:"definition"`
	SourceJSON   json.RawMessage  `json:"sourceJSON"`
	SourceHCL    []byte           `json:"sourceHCL"`
	Sources      []ArchivedSource `json:"sources"`
	Dependencies []DependencyPin  `json:"dependencies"`
}

type Resolution

type Resolution struct {
	Reference      datatug.DataModelReference `json:"reference"`
	Transport      string                     `json:"transport"`
	RegistryCommit string                     `json:"registryCommit"`
	CatalogSHA256  string                     `json:"catalogSHA256"`
	Root           ModelRevision              `json:"root"`
	Revisions      []ModelRevision            `json:"revisions"` // Exact dependency closure, root first; cycles visit once.
	ReadPaths      []string                   `json:"readPaths"`
	BytesRead      int64                      `json:"bytesRead"`
}

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

func NewResolver

func NewResolver(c Config) (*Resolver, error)

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, reference datatug.DataModelReference) (*Resolution, error)

Resolve selects solely by exact address+source commit, including historical index rows. Fixture mode verifies bytes and identity but makes no Git admission claim: its transport label remains local-fixture in every returned resolution.

Jump to

Keyboard shortcuts

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