Documentation
¶
Overview ¶
Package registry resolves normalized item artifacts into immutable grounding data for future D&D consumers.
Index ¶
- Constants
- type Registry
- func (r *Registry) Bound() bool
- func (r *Registry) CanonicalBytes() []byte
- func (r *Registry) Count() int
- func (r *Registry) Digest() string
- func (r *Registry) Items() []dnd.Item
- func (r *Registry) List() dnd.ItemRegistry
- func (r *Registry) Lookup(value string) (dnd.Item, bool)
- func (r *Registry) LookupID(value string) (dnd.Item, bool)
- func (r *Registry) ProjectionDigest() string
- func (r *Registry) PromptInput() contracts.LLMInputMaterial
- type Resolver
Constants ¶
const ( ReferenceSlot = "item_registry" MaxBytes = 1048576 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is an immutable, validated item registry prepared for grounding. All accessors return defensive copies.
func Resolve ¶
func Resolve(references contracts.ReferenceSet) (*Registry, error)
Resolve prepares the optional item registry reference. An absent slot uses the exact empty prompt input and has no durable registry identity.
func (*Registry) CanonicalBytes ¶
CanonicalBytes returns a defensive copy of the canonical durable JSON.
func (*Registry) Digest ¶
Digest returns the semantic SHA-256 digest of the canonical JSON, or an empty string when the registry is unbound.
func (*Registry) List ¶
func (r *Registry) List() dnd.ItemRegistry
List returns a defensive copy of the validated item registry.
func (*Registry) Lookup ¶
Lookup returns the canonical item for an exact canonical-name match under the item identity comparison policy.
func (*Registry) ProjectionDigest ¶
ProjectionDigest returns the SHA-256 digest of the exact names-only prompt projection, including for an unbound or empty registry.
func (*Registry) PromptInput ¶
func (r *Registry) PromptInput() contracts.LLMInputMaterial
PromptInput returns the ordered names-only registry projection as a content-safe prompt input. Durable IDs, evidence, and provenance are omitted.
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver selects and memoizes immutable item registry views.
func NewResolver ¶
func NewResolver(references contracts.ReferenceSet) (*Resolver, error)
NewResolver validates the optional construction-time item reference and prepares the operation-time registry cache.