Documentation
¶
Overview ¶
Package loaderkit is the importable form of charly's unified-config PARSE — the parse half of LoadUnified relocated out of charly core (P6). It decomposes one node-form YAML document into the generic, sdk-expressible spec.ParsedProject the host MATERIALIZES into the typed *UnifiedFile. Shared by the loader plugin candy (candy/plugin-loader, its OpLoad) and, during the transition, by charly core — the SAME parse, one copy (R3), the way sdk/kit is the one copy of the check walk.
The parse consults ONLY spec vocabulary (CUE-sourced) + yaml + host-threaded kind-recognition DATA (Threaded) — never the provider registry directly. The registry is core fabric; the host snapshots which words it recognizes (kinds / deploy substrates / structural / scalar-sugar primaries) into Threaded before the parse, and the re-entrant connect-then-reload re-parses with an updated snapshot. That keeps the parse a kind-blind mechanism (boundary law clause D).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseDoc ¶
func ParseDoc(doc *yaml.Node, t Threaded) (directives map[string]*yaml.Node, pp spec.ParsedProject, err error)
ParseDoc decomposes a node-form document mapping into its reserved directives + the generic spec.ParsedProject (its top-level entity nodes, each with the opaque JSON body the host materializes). Faithful port of core's parseNodeTree + genericNodeToParsed.
Types ¶
type DefaultParser ¶
type DefaultParser struct{}
DefaultParser is the built-in node-form DocParser — the package ParseDoc. It is what candy/plugin-loader serves and the host's fallback before any loader plugin registers.
type DocParser ¶
type DocParser interface {
ParseDoc(doc *yaml.Node, t Threaded) (directives map[string]*yaml.Node, pp spec.ParsedProject, err error)
}
DocParser is the swappable per-document PARSE seam (P6): the loader plugin candy implements it (the default via the package ParseDoc), and the host resolves the registered loader provider to it and calls it for every document — so an alternative loader plugin serves a different config front-end by implementing this. Typed (no wire envelope) since it runs on every document load.
type Threaded ¶
type Threaded struct {
Kinds map[string]bool // recognizedKind
DeploySubstrates map[string]bool // recognizedDeploySubstrate
StructuralKinds map[string]bool // externalKindMayNestMembers
Primaries map[string]string // pluginPrimaryFor: verb word → scalar-sugar primary field
}
Threaded is the host-computed, registry-derived DATA the parse consults instead of querying the provider registry: which words are recognized kinds / deploy substrates, which external kinds may nest sub-entity members, and each plugin verb's scalar-sugar primary field.