Documentation
¶
Index ¶
- func NewClient() database.Client
- type InMemoryFakeClient
- func (c *InMemoryFakeClient) AddTask(task *database.Task)
- func (c *InMemoryFakeClient) AddTool(tool *database.Tool)
- func (c *InMemoryFakeClient) Clear()
- func (c *InMemoryFakeClient) CreateTool(tool *database.Tool) error
- func (c *InMemoryFakeClient) DeleteAgent(agentName string) error
- func (c *InMemoryFakeClient) DeleteAgentMemory(agentName, userID string) error
- func (c *InMemoryFakeClient) DeleteCheckpoint(userID, threadID string) error
- func (c *InMemoryFakeClient) DeletePushNotification(taskID string) error
- func (c *InMemoryFakeClient) DeleteSession(sessionID string, userID string) error
- func (c *InMemoryFakeClient) DeleteTask(taskID string) error
- func (c *InMemoryFakeClient) DeleteToolServer(serverName string, groupKind string) error
- func (c *InMemoryFakeClient) DeleteToolsForServer(serverName string, groupKind string) error
- func (c *InMemoryFakeClient) GetAgent(agentName string) (*database.Agent, error)
- func (c *InMemoryFakeClient) GetCheckpoint(userID, threadID, checkpointNS, checkpointID string) (*database.LangGraphCheckpoint, []*database.LangGraphCheckpointWrite, error)
- func (c *InMemoryFakeClient) GetCrewAIFlowState(userID, threadID string) (*database.CrewAIFlowState, error)
- func (c *InMemoryFakeClient) GetLatestCheckpoint(userID, threadID, checkpointNS string) (*database.LangGraphCheckpoint, []*database.LangGraphCheckpointWrite, error)
- func (c *InMemoryFakeClient) GetPushNotification(taskID string, configID string) (*protocol.TaskPushNotificationConfig, error)
- func (c *InMemoryFakeClient) GetSession(sessionID string, userID string) (*database.Session, error)
- func (c *InMemoryFakeClient) GetTask(taskID string) (*protocol.Task, error)
- func (c *InMemoryFakeClient) GetTool(toolName string) (*database.Tool, error)
- func (c *InMemoryFakeClient) GetToolServer(serverName string) (*database.ToolServer, error)
- func (c *InMemoryFakeClient) ListAgentMemories(agentName, userID string) ([]database.Memory, error)
- func (c *InMemoryFakeClient) ListAgents() ([]database.Agent, error)
- func (c *InMemoryFakeClient) ListCheckpoints(userID, threadID, checkpointNS string, checkpointID *string, limit int) ([]*database.LangGraphCheckpointTuple, error)
- func (c *InMemoryFakeClient) ListEventsForSession(sessionID, userID string, options database.QueryOptions) ([]*database.Event, error)
- func (c *InMemoryFakeClient) ListFeedback(userID string) ([]database.Feedback, error)
- func (c *InMemoryFakeClient) ListPushNotifications(taskID string) ([]*protocol.TaskPushNotificationConfig, error)
- func (c *InMemoryFakeClient) ListSessions(userID string) ([]database.Session, error)
- func (c *InMemoryFakeClient) ListSessionsForAgent(agentID string, userID string) ([]database.Session, error)
- func (c *InMemoryFakeClient) ListTasksForSession(sessionID string) ([]*protocol.Task, error)
- func (c *InMemoryFakeClient) ListToolServers() ([]database.ToolServer, error)
- func (c *InMemoryFakeClient) ListTools() ([]database.Tool, error)
- func (c *InMemoryFakeClient) ListToolsForServer(serverName string, groupKind string) ([]database.Tool, error)
- func (c *InMemoryFakeClient) ListWrites(userID, threadID, checkpointNS, checkpointID string, offset, limit int) ([]*database.LangGraphCheckpointWrite, error)
- func (c *InMemoryFakeClient) PruneExpiredMemories() error
- func (c *InMemoryFakeClient) RefreshToolsForServer(serverName string, groupKind string, tools ...*v1alpha2.MCPTool) error
- func (c *InMemoryFakeClient) ResetCrewAIMemory(userID, threadID string) error
- func (c *InMemoryFakeClient) SearchAgentMemory(agentName, userID string, embedding pgvector.Vector, limit int) ([]database.AgentMemorySearchResult, error)
- func (c *InMemoryFakeClient) SearchCrewAIMemoryByTask(userID, threadID, taskDescription string, limit int) ([]*database.CrewAIAgentMemory, error)
- func (c *InMemoryFakeClient) StoreAgent(agent *database.Agent) error
- func (c *InMemoryFakeClient) StoreAgentMemories(memories []*database.Memory) error
- func (c *InMemoryFakeClient) StoreAgentMemory(memory *database.Memory) error
- func (c *InMemoryFakeClient) StoreCheckpoint(checkpoint *database.LangGraphCheckpoint) error
- func (c *InMemoryFakeClient) StoreCheckpointWrites(writes []*database.LangGraphCheckpointWrite) error
- func (c *InMemoryFakeClient) StoreCrewAIFlowState(state *database.CrewAIFlowState) error
- func (c *InMemoryFakeClient) StoreCrewAIMemory(memory *database.CrewAIAgentMemory) error
- func (c *InMemoryFakeClient) StoreEvents(events ...*database.Event) error
- func (c *InMemoryFakeClient) StoreFeedback(feedback *database.Feedback) error
- func (c *InMemoryFakeClient) StorePushNotification(config *protocol.TaskPushNotificationConfig) error
- func (c *InMemoryFakeClient) StoreSession(session *database.Session) error
- func (c *InMemoryFakeClient) StoreTask(task *protocol.Task) error
- func (c *InMemoryFakeClient) StoreToolServer(toolServer *database.ToolServer) (*database.ToolServer, error)
- func (c *InMemoryFakeClient) UpdateAgent(agent *database.Agent) error
- func (c *InMemoryFakeClient) UpdateSession(session *database.Session) error
- func (c *InMemoryFakeClient) UpdateTask(task *database.Task) error
- func (c *InMemoryFakeClient) UpdateToolServer(server *database.ToolServer) error
- func (c *InMemoryFakeClient) UpsertAgent(agent *database.Agent) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InMemoryFakeClient ¶
type InMemoryFakeClient struct {
// contains filtered or unexported fields
}
InMemoryFakeClient is a fake implementation of database.Client for testing
func (*InMemoryFakeClient) AddTask ¶
func (c *InMemoryFakeClient) AddTask(task *database.Task)
AddTask adds a task for testing purposes
func (*InMemoryFakeClient) AddTool ¶
func (c *InMemoryFakeClient) AddTool(tool *database.Tool)
AddTool adds a tool for testing purposes
func (*InMemoryFakeClient) Clear ¶
func (c *InMemoryFakeClient) Clear()
Clear clears all data for testing purposes
func (*InMemoryFakeClient) CreateTool ¶
func (c *InMemoryFakeClient) CreateTool(tool *database.Tool) error
CreateTool creates a new tool record
func (*InMemoryFakeClient) DeleteAgent ¶
func (c *InMemoryFakeClient) DeleteAgent(agentName string) error
DeleteAgent deletes an agent by name
func (*InMemoryFakeClient) DeleteAgentMemory ¶
func (c *InMemoryFakeClient) DeleteAgentMemory(agentName, userID string) error
DeleteAgentMemory deletes all agent memory for a given agent and user
func (*InMemoryFakeClient) DeleteCheckpoint ¶
func (c *InMemoryFakeClient) DeleteCheckpoint(userID, threadID string) error
DeleteCheckpoint deletes a checkpoint and its writes atomically
func (*InMemoryFakeClient) DeletePushNotification ¶
func (c *InMemoryFakeClient) DeletePushNotification(taskID string) error
func (*InMemoryFakeClient) DeleteSession ¶
func (c *InMemoryFakeClient) DeleteSession(sessionID string, userID string) error
DeleteSession deletes a session by ID and user ID
func (*InMemoryFakeClient) DeleteTask ¶
func (c *InMemoryFakeClient) DeleteTask(taskID string) error
func (*InMemoryFakeClient) DeleteToolServer ¶
func (c *InMemoryFakeClient) DeleteToolServer(serverName string, groupKind string) error
DeleteToolServer deletes a tool server by name
func (*InMemoryFakeClient) DeleteToolsForServer ¶
func (c *InMemoryFakeClient) DeleteToolsForServer(serverName string, groupKind string) error
DeleteToolsForServer deletes tools for a tool server by name
func (*InMemoryFakeClient) GetAgent ¶
func (c *InMemoryFakeClient) GetAgent(agentName string) (*database.Agent, error)
GetAgent retrieves an agent by name
func (*InMemoryFakeClient) GetCheckpoint ¶
func (c *InMemoryFakeClient) GetCheckpoint(userID, threadID, checkpointNS, checkpointID string) (*database.LangGraphCheckpoint, []*database.LangGraphCheckpointWrite, error)
GetCheckpoint retrieves a specific checkpoint by ID
func (*InMemoryFakeClient) GetCrewAIFlowState ¶
func (c *InMemoryFakeClient) GetCrewAIFlowState(userID, threadID string) (*database.CrewAIFlowState, error)
GetCrewAIFlowState retrieves CrewAI flow state
func (*InMemoryFakeClient) GetLatestCheckpoint ¶
func (c *InMemoryFakeClient) GetLatestCheckpoint(userID, threadID, checkpointNS string) (*database.LangGraphCheckpoint, []*database.LangGraphCheckpointWrite, error)
GetLatestCheckpoint retrieves the most recent checkpoint for a thread
func (*InMemoryFakeClient) GetPushNotification ¶
func (c *InMemoryFakeClient) GetPushNotification(taskID string, configID string) (*protocol.TaskPushNotificationConfig, error)
func (*InMemoryFakeClient) GetSession ¶
GetSession retrieves a session by ID and user ID
func (*InMemoryFakeClient) GetTask ¶
func (c *InMemoryFakeClient) GetTask(taskID string) (*protocol.Task, error)
func (*InMemoryFakeClient) GetTool ¶
func (c *InMemoryFakeClient) GetTool(toolName string) (*database.Tool, error)
GetTool retrieves a tool by name
func (*InMemoryFakeClient) GetToolServer ¶
func (c *InMemoryFakeClient) GetToolServer(serverName string) (*database.ToolServer, error)
GetToolServer retrieves a tool server by name
func (*InMemoryFakeClient) ListAgentMemories ¶
func (c *InMemoryFakeClient) ListAgentMemories(agentName, userID string) ([]database.Memory, error)
ListAgentMemories lists agent memories ordered by access count descending
func (*InMemoryFakeClient) ListAgents ¶
func (c *InMemoryFakeClient) ListAgents() ([]database.Agent, error)
ListAgents lists all agents
func (*InMemoryFakeClient) ListCheckpoints ¶
func (c *InMemoryFakeClient) ListCheckpoints(userID, threadID, checkpointNS string, checkpointID *string, limit int) ([]*database.LangGraphCheckpointTuple, error)
ListCheckpoints lists checkpoints for a thread, optionally filtered by checkpointID
func (*InMemoryFakeClient) ListEventsForSession ¶
func (c *InMemoryFakeClient) ListEventsForSession(sessionID, userID string, options database.QueryOptions) ([]*database.Event, error)
ListEventsForSession retrieves events for a specific session
func (*InMemoryFakeClient) ListFeedback ¶
func (c *InMemoryFakeClient) ListFeedback(userID string) ([]database.Feedback, error)
ListFeedback lists all feedback for a user
func (*InMemoryFakeClient) ListPushNotifications ¶
func (c *InMemoryFakeClient) ListPushNotifications(taskID string) ([]*protocol.TaskPushNotificationConfig, error)
func (*InMemoryFakeClient) ListSessions ¶
func (c *InMemoryFakeClient) ListSessions(userID string) ([]database.Session, error)
ListSessions lists all sessions for a user
func (*InMemoryFakeClient) ListSessionsForAgent ¶
func (c *InMemoryFakeClient) ListSessionsForAgent(agentID string, userID string) ([]database.Session, error)
ListSessionsForAgent lists all sessions for an agent
func (*InMemoryFakeClient) ListTasksForSession ¶
func (c *InMemoryFakeClient) ListTasksForSession(sessionID string) ([]*protocol.Task, error)
func (*InMemoryFakeClient) ListToolServers ¶
func (c *InMemoryFakeClient) ListToolServers() ([]database.ToolServer, error)
ListToolServers lists all tool servers
func (*InMemoryFakeClient) ListTools ¶
func (c *InMemoryFakeClient) ListTools() ([]database.Tool, error)
ListTools lists all tools for a user
func (*InMemoryFakeClient) ListToolsForServer ¶
func (c *InMemoryFakeClient) ListToolsForServer(serverName string, groupKind string) ([]database.Tool, error)
ListToolsForServer lists all tools for a specific server and toolserver type
func (*InMemoryFakeClient) ListWrites ¶
func (c *InMemoryFakeClient) ListWrites(userID, threadID, checkpointNS, checkpointID string, offset, limit int) ([]*database.LangGraphCheckpointWrite, error)
ListWrites retrieves writes for a specific checkpoint
func (*InMemoryFakeClient) PruneExpiredMemories ¶
func (c *InMemoryFakeClient) PruneExpiredMemories() error
PruneExpiredMemories removes all memories whose ExpiresAt is in the past
func (*InMemoryFakeClient) RefreshToolsForServer ¶
func (c *InMemoryFakeClient) RefreshToolsForServer(serverName string, groupKind string, tools ...*v1alpha2.MCPTool) error
RefreshToolsForServer refreshes a tool server
func (*InMemoryFakeClient) ResetCrewAIMemory ¶
func (c *InMemoryFakeClient) ResetCrewAIMemory(userID, threadID string) error
ResetCrewAIMemory deletes all CrewAI agent memory for a session
func (*InMemoryFakeClient) SearchAgentMemory ¶
func (c *InMemoryFakeClient) SearchAgentMemory(agentName, userID string, embedding pgvector.Vector, limit int) ([]database.AgentMemorySearchResult, error)
SearchAgentMemory searches agent memory by vector similarity
func (*InMemoryFakeClient) SearchCrewAIMemoryByTask ¶
func (c *InMemoryFakeClient) SearchCrewAIMemoryByTask(userID, threadID, taskDescription string, limit int) ([]*database.CrewAIAgentMemory, error)
SearchCrewAIMemoryByTask searches CrewAI agent memory by task description across all agents for a session
func (*InMemoryFakeClient) StoreAgent ¶
func (c *InMemoryFakeClient) StoreAgent(agent *database.Agent) error
StoreAgent creates a new agent record
func (*InMemoryFakeClient) StoreAgentMemories ¶
func (c *InMemoryFakeClient) StoreAgentMemories(memories []*database.Memory) error
StoreAgentMemories stores multiple agent memories
func (*InMemoryFakeClient) StoreAgentMemory ¶
func (c *InMemoryFakeClient) StoreAgentMemory(memory *database.Memory) error
StoreAgentMemory stores agent memory
func (*InMemoryFakeClient) StoreCheckpoint ¶
func (c *InMemoryFakeClient) StoreCheckpoint(checkpoint *database.LangGraphCheckpoint) error
StoreCheckpoint stores a LangGraph checkpoint
func (*InMemoryFakeClient) StoreCheckpointWrites ¶
func (c *InMemoryFakeClient) StoreCheckpointWrites(writes []*database.LangGraphCheckpointWrite) error
StoreCheckpointWrites stores checkpoint writes
func (*InMemoryFakeClient) StoreCrewAIFlowState ¶
func (c *InMemoryFakeClient) StoreCrewAIFlowState(state *database.CrewAIFlowState) error
StoreCrewAIFlowState stores CrewAI flow state
func (*InMemoryFakeClient) StoreCrewAIMemory ¶
func (c *InMemoryFakeClient) StoreCrewAIMemory(memory *database.CrewAIAgentMemory) error
StoreCrewAIMemory stores CrewAI agent memory
func (*InMemoryFakeClient) StoreEvents ¶
func (c *InMemoryFakeClient) StoreEvents(events ...*database.Event) error
StoreEvents creates a new event record
func (*InMemoryFakeClient) StoreFeedback ¶
func (c *InMemoryFakeClient) StoreFeedback(feedback *database.Feedback) error
StoreFeedback creates a new feedback record
func (*InMemoryFakeClient) StorePushNotification ¶
func (c *InMemoryFakeClient) StorePushNotification(config *protocol.TaskPushNotificationConfig) error
StorePushNotification creates a new push notification record
func (*InMemoryFakeClient) StoreSession ¶
func (c *InMemoryFakeClient) StoreSession(session *database.Session) error
StoreSession creates a new session record
func (*InMemoryFakeClient) StoreTask ¶
func (c *InMemoryFakeClient) StoreTask(task *protocol.Task) error
StoreTask creates a new task record
func (*InMemoryFakeClient) StoreToolServer ¶
func (c *InMemoryFakeClient) StoreToolServer(toolServer *database.ToolServer) (*database.ToolServer, error)
StoreToolServer creates a new tool server record
func (*InMemoryFakeClient) UpdateAgent ¶
func (c *InMemoryFakeClient) UpdateAgent(agent *database.Agent) error
UpdateAgent updates an agent record
func (*InMemoryFakeClient) UpdateSession ¶
func (c *InMemoryFakeClient) UpdateSession(session *database.Session) error
UpdateSession updates a session
func (*InMemoryFakeClient) UpdateTask ¶
func (c *InMemoryFakeClient) UpdateTask(task *database.Task) error
UpdateTask updates a task record
func (*InMemoryFakeClient) UpdateToolServer ¶
func (c *InMemoryFakeClient) UpdateToolServer(server *database.ToolServer) error
UpdateToolServer updates a tool server
func (*InMemoryFakeClient) UpsertAgent ¶
func (c *InMemoryFakeClient) UpsertAgent(agent *database.Agent) error
UpsertAgent upserts an agent record