Documentation
¶
Index ¶
- Constants
- Variables
- type BuildInfo
- type Document
- type DriftReport
- type Engine
- func (e *Engine) Discover(ctx context.Context) ([]Record, error)
- func (e *Engine) Drift(ctx context.Context) (DriftReport, error)
- func (e *Engine) Layout() Layout
- func (e *Engine) LoadIndex() (Index, error)
- func (e *Engine) Reconcile(ctx context.Context, apply bool) (ReconcileReport, error)
- func (e *Engine) Reindex(ctx context.Context) (ReindexReport, error)
- func (e *Engine) Search(query string, options SearchOptions) ([]SearchResult, error)
- func (e *Engine) Validate(ctx context.Context) (ValidationReport, error)
- type Entity
- type FilesystemProvider
- type Graph
- type GraphEdge
- type GraphNode
- type Index
- type Layout
- type ProjectionPolicy
- type Provider
- type PublicConnection
- type PublicEntity
- type PublicProjection
- type ReconcileReport
- type Record
- type Ref
- type ReindexReport
- type SearchOptions
- type SearchResult
- type StaticProvider
- type ValidationReport
Constants ¶
const SchemaVersion = 1
Variables ¶
var ( Version = "v0.1.1" Commit = "unknown" )
Functions ¶
This section is empty.
Types ¶
type BuildInfo ¶
type BuildInfo struct {
Version string `json:"version"`
Commit string `json:"commit"`
SchemaVersion int `json:"schema_version"`
Capabilities []string `json:"capabilities"`
}
func VersionInfo ¶
func VersionInfo() BuildInfo
type DriftReport ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is a host-bound catalog compiler. It is safe to construct more than one engine with different Layouts in the same process.
func (*Engine) Discover ¶
Discover collects, normalizes, validates, and deterministically orders all provider records. Duplicate IDs fail closed even across providers.
func (*Engine) Search ¶
func (e *Engine) Search(query string, options SearchOptions) ([]SearchResult, error)
Search performs BM25 full-text retrieval over the deterministic local index.
type Entity ¶
type Entity struct {
ID string `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
Kind string `json:"kind" yaml:"kind"`
Surface string `json:"surface,omitempty" yaml:"surface,omitempty"`
Status string `json:"status,omitempty" yaml:"status,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Entrypoint string `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"`
Owner string `json:"owner,omitempty" yaml:"owner,omitempty"`
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
Refs []Ref `json:"refs,omitempty" yaml:"refs,omitempty"`
PublicURL string `json:"public_url,omitempty" yaml:"public_url,omitempty"`
Visibility string `json:"visibility,omitempty" yaml:"visibility,omitempty"`
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
}
Entity is the portable catalog record. Host-only business, telemetry, and operator fields belong in host adapters rather than this public contract.
type FilesystemProvider ¶
type FilesystemProvider struct {
ProviderName string
ExcludeDirs []string
// Strict rejects unknown fields, malformed frontmatter, trailing documents,
// and entity files without IDs. Public and release paths should enable it.
Strict bool
}
FilesystemProvider reads .md YAML frontmatter, .yaml/.yml, and .json entity records recursively from Layout.CorpusDir.
func (FilesystemProvider) Name ¶
func (p FilesystemProvider) Name() string
type Graph ¶
func BuildGraph ¶
type Index ¶
type Index struct {
SchemaVersion int `json:"schema_version"`
SourceDigest string `json:"source_digest"`
Entities []Entity `json:"entities"`
Documents []Document `json:"documents"`
AverageDocumentLength float64 `json:"average_document_length"`
}
Index is the deterministic, portable catalog cache. It intentionally omits wall-clock timestamps so identical inputs produce byte-identical output.
type Layout ¶
type Layout struct {
CorpusDir string `json:"corpus_dir" yaml:"corpus_dir"`
ConfigDir string `json:"config_dir" yaml:"config_dir"`
CacheDir string `json:"cache_dir" yaml:"cache_dir"`
SidecarDataDir string `json:"sidecar_data_dir" yaml:"sidecar_data_dir"`
}
Layout injects every host-owned filesystem boundary used by the engine. The engine never assumes a repository name, home directory, or corpus shape.
func DefaultLayout ¶
DefaultLayout returns a portable layout rooted at root.
type ProjectionPolicy ¶
type Provider ¶
Provider is the host extension boundary. Providers discover authored facts; the engine owns normalization, validation, indexing, graph, and drift.
type PublicConnection ¶
type PublicEntity ¶
type PublicEntity struct {
ID string `json:"id"`
Name string `json:"name"`
Kind string `json:"kind"`
Status string `json:"status,omitempty"`
Summary string `json:"summary,omitempty"`
Tags []string `json:"tags,omitempty"`
URL string `json:"url,omitempty"`
Connections []PublicConnection `json:"connections,omitempty"`
}
PublicEntity is a closed publication DTO. It cannot represent source paths, host annotations, owner telemetry, sidecars, valuation, or query text.
type PublicProjection ¶
type PublicProjection struct {
SchemaVersion int `json:"schema_version"`
Items []PublicEntity `json:"items"`
}
func ProjectPublic ¶
func ProjectPublic(index Index, policy ProjectionPolicy) (PublicProjection, error)
type ReconcileReport ¶
type ReconcileReport struct {
Drift DriftReport `json:"drift"`
Applied bool `json:"applied"`
Reindex *ReindexReport `json:"reindex,omitempty"`
}
type Record ¶
type Record struct {
Entity Entity `json:"entity"`
Provider string `json:"provider"`
Source string `json:"source"`
Digest string `json:"digest"`
}
Record binds a portable entity to source provenance. Source paths never appear in public projections.
type ReindexReport ¶
type SearchOptions ¶
type SearchResult ¶
type StaticProvider ¶
StaticProvider is useful for tests, embedded demos, and API-backed hosts.
func (StaticProvider) Name ¶
func (p StaticProvider) Name() string