Documentation
¶
Overview ¶
Package preparation binds snapshot readers to a scope and callback lifetime.
Index ¶
- type View
- func (v *View) Close()
- func (v *View) Get(ctx context.Context, key id.AgentID) (*agent.Config, error)
- func (v *View) GetByName(ctx context.Context, name string) (*agent.Config, error)
- func (v *View) GetOrchestration(ctx context.Context, key id.OrchestrationConfigID) (*orchestration.Config, error)
- func (v *View) GetOverlayForAgentAt(ctx context.Context, key id.AgentID, scope cortex.Scope) (*prompt.Overlay, error)
- func (v *View) GetPersonaByName(ctx context.Context, name string) (*persona.Persona, error)
- func (v *View) GetSkillByName(ctx context.Context, name string) (*skill.Skill, error)
- func (v *View) GetTraitByName(ctx context.Context, name string) (*trait.Trait, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type View ¶
type View struct {
// contains filtered or unexported fields
}
View exposes only preparation reads and serializes access to a transaction.
func New ¶
func New(ctx context.Context, source store.PreparationSources, bind func(context.Context) context.Context) *View
New creates a callback-lifetime view. bind attaches a backend session, if any.
func (*View) Close ¶
func (v *View) Close()
Close invalidates the view before the backend releases its transaction.
func (*View) GetOrchestration ¶
func (v *View) GetOrchestration(ctx context.Context, key id.OrchestrationConfigID) (*orchestration.Config, error)
GetOrchestration reads strategy, participants and settings in the bound snapshot.
func (*View) GetOverlayForAgentAt ¶
func (v *View) GetOverlayForAgentAt(ctx context.Context, key id.AgentID, scope cortex.Scope) (*prompt.Overlay, error)
GetOverlayForAgentAt reads an ancestor overlay from the bound snapshot.
func (*View) GetPersonaByName ¶
GetPersonaByName reads a persona from the bound snapshot.
func (*View) GetSkillByName ¶
GetSkillByName reads a skill from the bound snapshot.
Click to show internal directories.
Click to hide internal directories.