Documentation
¶
Overview ¶
Package runtime assembles and owns a deployment, its event routing, and transport-neutral sessions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrBuilderUsed = errdefs.Conflictf("runtime Builder has already been used")
ErrBuilderUsed reports an attempted registration or Build after a Builder's single construction attempt has started.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder transactionally assembles one Runtime over a resource registry. It is single-use.
func NewBuilder ¶
NewBuilder creates a Runtime builder over a resource registry. The registry must already hold every resource factory the document references (event bus, checkpoint store, tool assemblies, engines, hooks, ...).
func (*Builder) Build ¶
Build constructs one fully started Runtime. A Builder may be used for exactly one Build attempt.
func (*Builder) WithHostFactory ¶
func (b *Builder) WithHostFactory(decorator HostFactoryDecorator) error
WithHostFactory installs a decorator over the runtime's base host factory. It is rejected when nil or after Build starts.
type Config ¶
type Config struct {
// EventBus names the deployment resource providing event.Bus.
EventBus string
// CheckpointStore names the deployment resource providing
// agent.CheckpointStore; empty keeps checkpoints as a host no-op.
CheckpointStore string
// Sessions configures the runtime-owned session manager.
Sessions SessionConfig
DynamicCatalog *DynamicCatalogConfig
}
Config is the strictly decoded deploy.Document.Runtime subtree.
type DynamicCatalogConfig ¶
DynamicCatalogConfig maps agent IDs to tool.Assembly resource names; the reserved "default" key is the fallback for agents without an explicit entry. The injection policy itself lives in each tool.Assembly's dynamic settings — the runtime only wires the assembly and creates per-session views.
type HostFactoryDecorator ¶
type HostFactoryDecorator func(session.HostFactory) (session.HostFactory, error)
HostFactoryDecorator wraps the runtime's built-in base host factory. The decorator receives the base factory (event publishing, interrupts, ask-user, checkpointing) and MUST delegate anything it does not override back to it — the canonical shape is agent.HostFuncs{Inner: base, ...}.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime owns the complete application object graph built by Builder.