Documentation
¶
Index ¶
- Variables
- func NewAgentHandler(agent AgentService, generic services.GenericService) *agentHandler
- func NewAgentSubresourceHandler(agent AgentService, session sessions.SessionService, ...) *agentSubresourceHandler
- func NewIgniteHandler(agent AgentService, session sessions.SessionService, ...) *igniteHandler
- func NewMockAgentDao() *agentDaoMock
- func PresentAgent(agent *Agent) openapi.Agent
- type Agent
- type AgentDao
- type AgentIndex
- type AgentList
- type AgentPatchRequest
- type AgentService
- type IgniteResponse
- type ServiceLocator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DisableAdvisoryLock = false UseBlockingAdvisoryLock = true )
Functions ¶
func NewAgentHandler ¶
func NewAgentHandler(agent AgentService, generic services.GenericService) *agentHandler
func NewAgentSubresourceHandler ¶
func NewAgentSubresourceHandler( agent AgentService, session sessions.SessionService, generic services.GenericService, ) *agentSubresourceHandler
func NewIgniteHandler ¶
func NewIgniteHandler(agent AgentService, session sessions.SessionService, msg sessions.MessageService) *igniteHandler
func NewMockAgentDao ¶
func NewMockAgentDao() *agentDaoMock
func PresentAgent ¶
Types ¶
type Agent ¶
type Agent struct {
api.Meta
ProjectId string `json:"project_id" gorm:"not null;index"`
ParentAgentId *string `json:"parent_agent_id" gorm:"index"`
OwnerUserId string `json:"owner_user_id" gorm:"not null"`
Name string `json:"name" gorm:"not null"`
DisplayName *string `json:"display_name"`
Description *string `json:"description"`
Prompt *string `json:"prompt" gorm:"type:text"`
RepoUrl *string `json:"repo_url"`
WorkflowId *string `json:"workflow_id"`
LlmModel string `json:"llm_model" gorm:"default:'claude-sonnet-4-6'"`
LlmTemperature float64 `json:"llm_temperature" gorm:"default:0.7"`
LlmMaxTokens int32 `json:"llm_max_tokens" gorm:"default:4000"`
BotAccountName *string `json:"bot_account_name"`
ResourceOverrides *string `json:"resource_overrides"`
EnvironmentVariables *string `json:"environment_variables"`
Labels *string `json:"labels"`
Annotations *string `json:"annotations"`
CurrentSessionId *string `json:"current_session_id"`
}
func ConvertAgent ¶
type AgentDao ¶
type AgentDao interface {
Get(ctx context.Context, id string) (*Agent, error)
Create(ctx context.Context, agent *Agent) (*Agent, error)
Replace(ctx context.Context, agent *Agent) (*Agent, error)
Delete(ctx context.Context, id string) error
FindByIDs(ctx context.Context, ids []string) (AgentList, error)
All(ctx context.Context) (AgentList, error)
AllByProjectID(ctx context.Context, projectID string) (AgentList, error)
}
func NewAgentDao ¶
func NewAgentDao(sessionFactory *db.SessionFactory) AgentDao
type AgentIndex ¶
type AgentList ¶
type AgentList []*Agent
func (AgentList) Index ¶
func (l AgentList) Index() AgentIndex
type AgentPatchRequest ¶
type AgentPatchRequest struct {
DisplayName *string `json:"display_name,omitempty"`
Description *string `json:"description,omitempty"`
Prompt *string `json:"prompt,omitempty"`
RepoUrl *string `json:"repo_url,omitempty"`
WorkflowId *string `json:"workflow_id,omitempty"`
LlmModel *string `json:"llm_model,omitempty"`
LlmTemperature *float64 `json:"llm_temperature,omitempty"`
LlmMaxTokens *int32 `json:"llm_max_tokens,omitempty"`
BotAccountName *string `json:"bot_account_name,omitempty"`
ResourceOverrides *string `json:"resource_overrides,omitempty"`
EnvironmentVariables *string `json:"environment_variables,omitempty"`
Labels *string `json:"labels,omitempty"`
Annotations *string `json:"annotations,omitempty"`
CurrentSessionId *string `json:"current_session_id,omitempty"`
ParentAgentId *string `json:"parent_agent_id,omitempty"`
}
type AgentService ¶
type AgentService interface {
Get(ctx context.Context, id string) (*Agent, *errors.ServiceError)
Create(ctx context.Context, agent *Agent) (*Agent, *errors.ServiceError)
Replace(ctx context.Context, agent *Agent) (*Agent, *errors.ServiceError)
Delete(ctx context.Context, id string) *errors.ServiceError
All(ctx context.Context) (AgentList, *errors.ServiceError)
AllByProjectID(ctx context.Context, projectID string) (AgentList, *errors.ServiceError)
FindByIDs(ctx context.Context, ids []string) (AgentList, *errors.ServiceError)
OnUpsert(ctx context.Context, id string) error
OnDelete(ctx context.Context, id string) error
}
func NewAgentService ¶
func NewAgentService(lockFactory db.LockFactory, agentDao AgentDao, events services.EventService) AgentService
func Service ¶
func Service(s *environments.Services) AgentService
type IgniteResponse ¶
type ServiceLocator ¶
type ServiceLocator func() AgentService
func NewServiceLocator ¶
func NewServiceLocator(env *environments.Env) ServiceLocator
Click to show internal directories.
Click to hide internal directories.