meaninggraph

package
v0.77.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 21 Imported by: 0

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