registry

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 15 Imported by: 16

Documentation

Overview

Package registry owns the registered-component carrier consumed by runtime lookup. Artifact and SQL compilation remain in consumer-owned compilers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InputCatalog

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

InputCatalog projects the transitive transport contract of exact registered routes. It contains immutable metadata, never providers or binding execution. Publication filtering is deliberately outside this owner: private component inputs may be required to invoke a public parent.

func NewInputCatalog

func NewInputCatalog(entries []*RegisteredComponent) (*InputCatalog, error)

func (*InputCatalog) Fields

func (c *InputCatalog) Fields(ref spec.RouteRef) ([]InputField, error)

Fields returns detached effective HTTP inputs, including every statically declared component dependency. All component fields execute binding regardless of their own Required flag; child requiredness therefore remains authoritative.

func (*InputCatalog) FieldsFor

func (c *InputCatalog) FieldsFor(component spec.Key, ref spec.RouteRef) ([]InputField, error)

FieldsFor selects an exact component contract even when other MCP components have the same HTTP route. Route-only dependencies must still be unambiguous.

type InputContract

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

InputContract owns the canonical component input type and its route-effective plans. It contains no provider or invocation state.

func NewInputContract

func NewInputContract(inputType reflect.Type, projection *bindly.Projection, routes ...RouteInput) (*InputContract, error)

func (*InputContract) ForRoute

func (c *InputContract) ForRoute(route spec.RouteRef) (*RouteInputContract, bool)

func (*InputContract) Resolver

func (c *InputContract) Resolver(target any) bindly.ValueResolver

Resolver binds the canonical immutable projection to one component input.

func (*InputContract) Type

func (c *InputContract) Type() reflect.Type

func (*InputContract) WithDocumentation

func (c *InputContract) WithDocumentation(snapshot *docs.Snapshot) *InputContract

WithDocumentation clones metadata only. The canonical immutable Bindly plans and value projection remain the same, without invoking or rewriting binding.

type InputField

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

InputField is one canonical route-effective component input field.

func (InputField) Anonymous

func (f InputField) Anonymous() bool

func (InputField) Binding

func (f InputField) Binding() bindly.BindingSpec

func (InputField) Dependency

func (f InputField) Dependency() (spec.RouteRef, bool)

Dependency is the canonical exact target of a compiled component input.

func (InputField) DestinationType

func (f InputField) DestinationType() reflect.Type

func (InputField) Documentation

func (f InputField) Documentation() *docs.Snapshot

func (InputField) Origin

func (f InputField) Origin() spec.RouteRef

func (InputField) Path

func (f InputField) Path() string

func (InputField) SourceType

func (f InputField) SourceType() reflect.Type

func (InputField) StructField

func (f InputField) StructField() (reflect.StructField, error)

func (InputField) VerifiesJWT

func (f InputField) VerifiesJWT() bool

VerifiesJWT reports evidence from the constructed verifier codec, captured during registration independently of mutable source parameter metadata.

func (InputField) WireSchema

func (f InputField) WireSchema() *spec.WireSchema

func (InputField) WireSchemas

func (f InputField) WireSchemas() map[string]*spec.WireSchema

type OutputContract

type OutputContract = output.Plan

OutputContract is the immutable encoding plan published with a component. Encoding ownership remains target-neutral; HTTP only selects the format.

type RegisteredComponent

type RegisteredComponent struct {
	Documentation *documentation.Snapshot
	Component     *spec.Component
	Input         *InputContract
	OutputType    reflect.Type
	Output        *OutputContract
	Reader        dexec.Reader
	Handler       rhandler.Handler
	Capabilities  rhandler.InvocationCapabilities
	Providers     []locator.Provider
	DataSource    dexec.DataSource
}

RegisteredComponent is the minimal runtime registration carrier still needed by the thin root runtime facade while richer registration behavior is moved out of root.

type RouteInput

type RouteInput struct {
	Route    spec.RouteRef
	Plan     *bindly.Plan
	Bindings []bindly.BindingSpec
}

RouteInput is compiler output used to construct one immutable route contract.

type RouteInputContract

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

RouteInputContract is the exact binding contract for one component route.

func (*RouteInputContract) Fields

func (c *RouteInputContract) Fields() []InputField

func (*RouteInputContract) Plan

func (c *RouteInputContract) Plan() *bindly.Plan

func (*RouteInputContract) ReplayPlan

func (c *RouteInputContract) ReplayPlan() (*bindly.ReplayPlan, error)

ReplayPlan is compiled from canonical external input authority at registration.

func (*RouteInputContract) Resolver

func (c *RouteInputContract) Resolver(target any) bindly.ValueResolver

func (*RouteInputContract) Route

func (c *RouteInputContract) Route() spec.RouteRef

func (*RouteInputContract) Type

func (c *RouteInputContract) Type() reflect.Type

func (*RouteInputContract) WithOptionalBindings

func (c *RouteInputContract) WithOptionalBindings(names ...string) (*RouteInputContract, error)

WithOptionalBindings returns a detached route contract with matching bindings marked optional. It is used by trusted runtime flows that intentionally remove server-owned inputs while preserving all other canonical binding semantics.

func (*RouteInputContract) Without

func (c *RouteInputContract) Without(target any, names ...string) (any, error)

Without projects a detached input through the canonical Bindly alias owner.

Jump to

Keyboard shortcuts

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