Documentation
¶
Overview ¶
Package souls discovers principal-owned lesser souls and manages local incorporation bindings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTrustNotConfigured indicates the instance trust base URL is unavailable. ErrTrustNotConfigured = errors.New("trust not configured") // ErrSoulNotAvailable indicates a soul is not available to the current authenticated principal. ErrSoulNotAvailable = errors.New("soul not available") // ErrSoulAlreadyBound indicates the target soul is already incorporated elsewhere. ErrSoulAlreadyBound = errors.New("soul already bound") // ErrTargetAgentRequired indicates the incorporation target agent identifier was omitted. ErrTargetAgentRequired = errors.New("target agent is required") // ErrTargetAgentNotFound indicates the requested local target agent does not exist. ErrTargetAgentNotFound = errors.New("target agent not found") // ErrTargetAgentMustBeAgent indicates the requested local target exists but is not an agent account. ErrTargetAgentMustBeAgent = errors.New("target account must be an agent") // ErrTargetAgentNotOwned indicates the requested local target agent is not owned by the authenticated principal. ErrTargetAgentNotOwned = errors.New("target agent not owned by authenticated principal") // ErrTargetAgentAlreadyHasSoul indicates the target local agent is already bound to another soul. ErrTargetAgentAlreadyHasSoul = errors.New("target agent already has soul") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service resolves principal-bound souls for a Lesser instance and manages explicit incorporation bindings.
func NewService ¶
func NewService(accountRepo accountRepository, instanceRepo instanceRepository, cfg *config.Config, logger *zap.Logger) *Service
NewService creates a new soul service.
func (*Service) Incorporate ¶
func (s *Service) Incorporate(ctx context.Context, principalUsername string, targetAgentUsername string, agentID string) (*Soul, error)
Incorporate explicitly binds a soul to a local agent chosen by the authenticated principal.
type Soul ¶
type Soul struct {
AgentID string
Domain string
LocalID string
ENSName *string
Wallet string
PrincipalAddress string
Status string
LifecycleStatus string
SelfDescriptionVersion *int
Capabilities []string
MintTxHash string
MintedAt *time.Time
UpdatedAt *time.Time
Bound bool
BoundAgentUsername string
BoundPrincipalAddress string
BoundAt time.Time
BoundUpdatedAt time.Time
}
Soul represents a host-discovered soul plus local binding state.
Click to show internal directories.
Click to hide internal directories.