Documentation
¶
Index ¶
- Constants
- Variables
- func ValidateConfiguration(agent BotAgent, botMetadata map[string]any) error
- type BotAgent
- type ConfigurationError
- type CreateRequest
- type Descriptor
- type ListResponse
- type Service
- func (s *Service) Create(ctx context.Context, botID string, req CreateRequest) (BotAgent, error)
- func (s *Service) Delete(ctx context.Context, botID, id string) error
- func (s *Service) FindActiveByProvider(ctx context.Context, botID, provider string) (BotAgent, error)
- func (s *Service) Get(ctx context.Context, botID, id string) (BotAgent, error)
- func (s *Service) GetActive(ctx context.Context, botID, id string) (BotAgent, error)
- func (s *Service) List(ctx context.Context, botID string) ([]BotAgent, error)
- func (s *Service) Update(ctx context.Context, botID, id string, req UpdateRequest) (BotAgent, error)
- type UpdateRequest
Constants ¶
View Source
const ( RuntimeACP = "acp" MetadataProviderKey = "provider" )
Variables ¶
View Source
var ( ErrNotFound = errors.New("bot agent not found") ErrNameTaken = errors.New("bot agent name already taken") ErrInvalidRuntime = errors.New("invalid bot agent runtime") ErrInvalidMetadata = errors.New("invalid bot agent metadata") ErrDefaultInUse = errors.New("default bot agent cannot be disabled or deleted") )
Functions ¶
Types ¶
type BotAgent ¶
type BotAgent struct {
ID string `json:"id"`
BotID string `json:"bot_id"`
Name string `json:"name"`
Runtime string `json:"runtime"`
Enabled bool `json:"enabled"`
Metadata map[string]any `json:"metadata"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
}
BotAgent is a user-managed Agent entry attached to a bot. Native is the built-in fallback and is intentionally represented by the absence of a row.
type ConfigurationError ¶
type ConfigurationError struct {
Field string
}
func (*ConfigurationError) Error ¶
func (e *ConfigurationError) Error() string
type CreateRequest ¶
type Descriptor ¶
Descriptor is the stable runtime selection projected into a session. The provider is temporary ACP compatibility metadata, not a first-class model.
func DescriptorFor ¶
func DescriptorFor(agent BotAgent) (Descriptor, error)
type ListResponse ¶
type ListResponse struct {
Items []BotAgent `json:"items"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) FindActiveByProvider ¶
func (*Service) GetActive ¶
GetActive is used for new defaults and new sessions. Existing sessions may keep using Get so disabling an Agent does not terminate established work.
type UpdateRequest ¶
Click to show internal directories.
Click to hide internal directories.