souls

package
v1.1.28 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

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")
	// ErrBodyAlreadyHasSoul indicates the target local body already has a soul.
	ErrBodyAlreadyHasSoul = errors.New("body 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, username string, agentID string) (*Soul, error)

Incorporate explicitly binds a soul to the authenticated local body.

func (*Service) ListMine

func (s *Service) ListMine(ctx context.Context, username string) ([]Soul, error)

ListMine returns the current user's discoverable souls for this instance.

func (*Service) WithHTTPClient

func (s *Service) WithHTTPClient(client *http.Client) *Service

WithHTTPClient overrides the HTTP client used for lesser-host requests.

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
	BoundUsername          string
	BoundPrincipalAddress  string
	BoundAt                time.Time
	BoundUpdatedAt         time.Time
}

Soul represents a host-discovered soul plus local binding state.

Jump to

Keyboard shortcuts

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