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(_ context.Context, tool *database.Tool) error
- func (c *InMemoryFakeClient) DeleteAgent(_ context.Context, agentName string) error
- func (c *InMemoryFakeClient) DeleteAgentMemory(_ context.Context, agentName, userID string) error
- func (c *InMemoryFakeClient) DeleteCheckpoint(_ context.Context, userID, threadID string) error
- func (c *InMemoryFakeClient) DeletePushNotification(_ context.Context, taskID string) error
- func (c *InMemoryFakeClient) DeleteSession(_ context.Context, sessionID string, userID string) error
- func (c *InMemoryFakeClient) DeleteTask(_ context.Context, taskID string) error
- func (c *InMemoryFakeClient) DeleteToolServer(_ context.Context, serverName string, groupKind string) error
- func (c *InMemoryFakeClient) DeleteToolsForServer(_ context.Context, serverName string, groupKind string) error
- func (c *InMemoryFakeClient) GetAgent(_ context.Context, agentName string) (*database.Agent, error)
- func (c *InMemoryFakeClient) GetCheckpoint(_ context.Context, userID, threadID, checkpointNS, checkpointID string) (*database.LangGraphCheckpoint, []*database.LangGraphCheckpointWrite, error)
- func (c *InMemoryFakeClient) GetCrewAIFlowState(_ context.Context, userID, threadID string) (*database.CrewAIFlowState, error)
- func (c *InMemoryFakeClient) GetLatestCheckpoint(_ context.Context, userID, threadID, checkpointNS string) (*database.LangGraphCheckpoint, []*database.LangGraphCheckpointWrite, error)
- func (c *InMemoryFakeClient) GetPushNotification(_ context.Context, taskID string, configID string) (*protocol.TaskPushNotificationConfig, error)
- func (c *InMemoryFakeClient) GetSession(_ context.Context, sessionID string, userID string) (*database.Session, error)
- func (c *InMemoryFakeClient) GetTask(_ context.Context, taskID string) (*protocol.Task, error)
- func (c *InMemoryFakeClient) GetTool(_ context.Context, toolName string) (*database.Tool, error)
- func (c *InMemoryFakeClient) GetToolServer(_ context.Context, serverName string) (*database.ToolServer, error)
- func (c *InMemoryFakeClient) ListAgentMemories(_ context.Context, agentName, userID string) ([]database.Memory, error)
- func (c *InMemoryFakeClient) ListAgents(_ context.Context) ([]database.Agent, error)
- func (c *InMemoryFakeClient) ListCheckpoints(_ context.Context, userID, threadID, checkpointNS string, checkpointID *string, ...) ([]*database.LangGraphCheckpointTuple, error)
- func (c *InMemoryFakeClient) ListEventsForSession(_ context.Context, sessionID, userID string, options database.QueryOptions) ([]*database.Event, error)
- func (c *InMemoryFakeClient) ListFeedback(_ context.Context, userID string) ([]database.Feedback, error)
- func (c *InMemoryFakeClient) ListPushNotifications(_ context.Context, taskID string) ([]*protocol.TaskPushNotificationConfig, error)
- func (c *InMemoryFakeClient) ListSessions(_ context.Context, userID string) ([]database.Session, error)
- func (c *InMemoryFakeClient) ListSessionsForAgent(_ context.Context, agentID string, userID string) ([]database.Session, error)
- func (c *InMemoryFakeClient) ListTasksForSession(_ context.Context, sessionID string) ([]*protocol.Task, error)
- func (c *InMemoryFakeClient) ListToolServers(_ context.Context) ([]database.ToolServer, error)
- func (c *InMemoryFakeClient) ListTools(_ context.Context) ([]database.Tool, error)
- func (c *InMemoryFakeClient) ListToolsForServer(_ context.Context, serverName string, groupKind string) ([]database.Tool, error)
- func (c *InMemoryFakeClient) ListWrites(_ context.Context, userID, threadID, checkpointNS, checkpointID string, ...) ([]*database.LangGraphCheckpointWrite, error)
- func (c *InMemoryFakeClient) PruneExpiredMemories(_ context.Context) error
- func (c *InMemoryFakeClient) RefreshToolsForServer(_ context.Context, serverName string, groupKind string, ...) error
- func (c *InMemoryFakeClient) ResetCrewAIMemory(_ context.Context, userID, threadID string) error
- func (c *InMemoryFakeClient) SearchAgentMemory(_ context.Context, agentName, userID string, embedding pgvector.Vector, ...) ([]database.AgentMemorySearchResult, error)
- func (c *InMemoryFakeClient) SearchCrewAIMemoryByTask(_ context.Context, userID, threadID, taskDescription string, limit int) ([]*database.CrewAIAgentMemory, error)
- func (c *InMemoryFakeClient) StoreAgent(_ context.Context, agent *database.Agent) error
- func (c *InMemoryFakeClient) StoreAgentMemories(_ context.Context, memories []*database.Memory) error
- func (c *InMemoryFakeClient) StoreAgentMemory(_ context.Context, memory *database.Memory) error
- func (c *InMemoryFakeClient) StoreCheckpoint(_ context.Context, checkpoint *database.LangGraphCheckpoint) error
- func (c *InMemoryFakeClient) StoreCheckpointWrites(_ context.Context, writes []*database.LangGraphCheckpointWrite) error
- func (c *InMemoryFakeClient) StoreCrewAIFlowState(_ context.Context, state *database.CrewAIFlowState) error
- func (c *InMemoryFakeClient) StoreCrewAIMemory(_ context.Context, memory *database.CrewAIAgentMemory) error
- func (c *InMemoryFakeClient) StoreEvents(_ context.Context, events ...*database.Event) error
- func (c *InMemoryFakeClient) StoreFeedback(_ context.Context, feedback *database.Feedback) error
- func (c *InMemoryFakeClient) StorePushNotification(_ context.Context, config *protocol.TaskPushNotificationConfig) error
- func (c *InMemoryFakeClient) StoreSession(_ context.Context, session *database.Session) error
- func (c *InMemoryFakeClient) StoreTask(_ context.Context, task *protocol.Task) error
- func (c *InMemoryFakeClient) StoreToolServer(_ context.Context, toolServer *database.ToolServer) (*database.ToolServer, error)
- func (c *InMemoryFakeClient) UpdateAgent(_ context.Context, agent *database.Agent) error
- func (c *InMemoryFakeClient) UpdateSession(_ context.Context, session *database.Session) error
- func (c *InMemoryFakeClient) UpdateTask(_ context.Context, task *database.Task) error
- func (c *InMemoryFakeClient) UpdateToolServer(_ context.Context, server *database.ToolServer) error
- func (c *InMemoryFakeClient) UpsertAgent(_ context.Context, 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 ¶
CreateTool creates a new tool record
func (*InMemoryFakeClient) DeleteAgent ¶
func (c *InMemoryFakeClient) DeleteAgent(_ context.Context, agentName string) error
DeleteAgent deletes an agent by name
func (*InMemoryFakeClient) DeleteAgentMemory ¶
func (c *InMemoryFakeClient) DeleteAgentMemory(_ context.Context, agentName, userID string) error
DeleteAgentMemory deletes all agent memory for a given agent and user
func (*InMemoryFakeClient) DeleteCheckpoint ¶
func (c *InMemoryFakeClient) DeleteCheckpoint(_ context.Context, userID, threadID string) error
DeleteCheckpoint deletes a checkpoint and its writes atomically
func (*InMemoryFakeClient) DeletePushNotification ¶
func (c *InMemoryFakeClient) DeletePushNotification(_ context.Context, taskID string) error
func (*InMemoryFakeClient) DeleteSession ¶
func (c *InMemoryFakeClient) DeleteSession(_ context.Context, sessionID string, userID string) error
DeleteSession deletes a session by ID and user ID
func (*InMemoryFakeClient) DeleteTask ¶
func (c *InMemoryFakeClient) DeleteTask(_ context.Context, taskID string) error
func (*InMemoryFakeClient) DeleteToolServer ¶
func (c *InMemoryFakeClient) DeleteToolServer(_ context.Context, serverName string, groupKind string) error
DeleteToolServer deletes a tool server by name
func (*InMemoryFakeClient) DeleteToolsForServer ¶
func (c *InMemoryFakeClient) DeleteToolsForServer(_ context.Context, serverName string, groupKind string) error
DeleteToolsForServer deletes tools for a tool server by name
func (*InMemoryFakeClient) GetCheckpoint ¶
func (c *InMemoryFakeClient) GetCheckpoint(_ context.Context, userID, threadID, checkpointNS, checkpointID string) (*database.LangGraphCheckpoint, []*database.LangGraphCheckpointWrite, error)
GetCheckpoint retrieves a specific checkpoint by ID
func (*InMemoryFakeClient) GetCrewAIFlowState ¶
func (c *InMemoryFakeClient) GetCrewAIFlowState(_ context.Context, userID, threadID string) (*database.CrewAIFlowState, error)
GetCrewAIFlowState retrieves CrewAI flow state
func (*InMemoryFakeClient) GetLatestCheckpoint ¶
func (c *InMemoryFakeClient) GetLatestCheckpoint(_ context.Context, 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(_ context.Context, taskID string, configID string) (*protocol.TaskPushNotificationConfig, error)
func (*InMemoryFakeClient) GetSession ¶
func (c *InMemoryFakeClient) GetSession(_ context.Context, sessionID string, userID string) (*database.Session, error)
GetSession retrieves a session by ID and user ID
func (*InMemoryFakeClient) GetToolServer ¶
func (c *InMemoryFakeClient) GetToolServer(_ context.Context, serverName string) (*database.ToolServer, error)
GetToolServer retrieves a tool server by name
func (*InMemoryFakeClient) ListAgentMemories ¶
func (c *InMemoryFakeClient) ListAgentMemories(_ context.Context, agentName, userID string) ([]database.Memory, error)
ListAgentMemories lists agent memories ordered by access count descending
func (*InMemoryFakeClient) ListAgents ¶
ListAgents lists all agents
func (*InMemoryFakeClient) ListCheckpoints ¶
func (c *InMemoryFakeClient) ListCheckpoints(_ context.Context, 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(_ context.Context, sessionID, userID string, options database.QueryOptions) ([]*database.Event, error)
ListEventsForSession retrieves events for a specific session
func (*InMemoryFakeClient) ListFeedback ¶
func (c *InMemoryFakeClient) ListFeedback(_ context.Context, userID string) ([]database.Feedback, error)
ListFeedback lists all feedback for a user
func (*InMemoryFakeClient) ListPushNotifications ¶
func (c *InMemoryFakeClient) ListPushNotifications(_ context.Context, taskID string) ([]*protocol.TaskPushNotificationConfig, error)
func (*InMemoryFakeClient) ListSessions ¶
func (c *InMemoryFakeClient) ListSessions(_ context.Context, userID string) ([]database.Session, error)
ListSessions lists all sessions for a user
func (*InMemoryFakeClient) ListSessionsForAgent ¶
func (c *InMemoryFakeClient) ListSessionsForAgent(_ context.Context, agentID string, userID string) ([]database.Session, error)
ListSessionsForAgent lists all sessions for an agent, excluding agent-initiated sessions.
func (*InMemoryFakeClient) ListTasksForSession ¶
func (*InMemoryFakeClient) ListToolServers ¶
func (c *InMemoryFakeClient) ListToolServers(_ context.Context) ([]database.ToolServer, error)
ListToolServers lists all tool servers
func (*InMemoryFakeClient) ListToolsForServer ¶
func (c *InMemoryFakeClient) ListToolsForServer(_ context.Context, 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(_ context.Context, 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(_ context.Context) error
PruneExpiredMemories removes all memories whose ExpiresAt is in the past
func (*InMemoryFakeClient) RefreshToolsForServer ¶
func (c *InMemoryFakeClient) RefreshToolsForServer(_ context.Context, serverName string, groupKind string, tools ...*v1alpha2.MCPTool) error
RefreshToolsForServer refreshes a tool server
func (*InMemoryFakeClient) ResetCrewAIMemory ¶
func (c *InMemoryFakeClient) ResetCrewAIMemory(_ context.Context, userID, threadID string) error
ResetCrewAIMemory deletes all CrewAI agent memory for a session
func (*InMemoryFakeClient) SearchAgentMemory ¶
func (c *InMemoryFakeClient) SearchAgentMemory(_ context.Context, 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(_ context.Context, 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 ¶
StoreAgent creates a new agent record
func (*InMemoryFakeClient) StoreAgentMemories ¶
func (c *InMemoryFakeClient) StoreAgentMemories(_ context.Context, memories []*database.Memory) error
StoreAgentMemories stores multiple agent memories
func (*InMemoryFakeClient) StoreAgentMemory ¶
StoreAgentMemory stores agent memory
func (*InMemoryFakeClient) StoreCheckpoint ¶
func (c *InMemoryFakeClient) StoreCheckpoint(_ context.Context, checkpoint *database.LangGraphCheckpoint) error
StoreCheckpoint stores a LangGraph checkpoint
func (*InMemoryFakeClient) StoreCheckpointWrites ¶
func (c *InMemoryFakeClient) StoreCheckpointWrites(_ context.Context, writes []*database.LangGraphCheckpointWrite) error
StoreCheckpointWrites stores checkpoint writes
func (*InMemoryFakeClient) StoreCrewAIFlowState ¶
func (c *InMemoryFakeClient) StoreCrewAIFlowState(_ context.Context, state *database.CrewAIFlowState) error
StoreCrewAIFlowState stores CrewAI flow state
func (*InMemoryFakeClient) StoreCrewAIMemory ¶
func (c *InMemoryFakeClient) StoreCrewAIMemory(_ context.Context, memory *database.CrewAIAgentMemory) error
StoreCrewAIMemory stores CrewAI agent memory
func (*InMemoryFakeClient) StoreEvents ¶
StoreEvents creates a new event record
func (*InMemoryFakeClient) StoreFeedback ¶
StoreFeedback creates a new feedback record
func (*InMemoryFakeClient) StorePushNotification ¶
func (c *InMemoryFakeClient) StorePushNotification(_ context.Context, config *protocol.TaskPushNotificationConfig) error
StorePushNotification creates a new push notification record
func (*InMemoryFakeClient) StoreSession ¶
StoreSession creates a new session record
func (*InMemoryFakeClient) StoreToolServer ¶
func (c *InMemoryFakeClient) StoreToolServer(_ context.Context, toolServer *database.ToolServer) (*database.ToolServer, error)
StoreToolServer creates a new tool server record
func (*InMemoryFakeClient) UpdateAgent ¶
UpdateAgent updates an agent record
func (*InMemoryFakeClient) UpdateSession ¶
UpdateSession updates a session
func (*InMemoryFakeClient) UpdateTask ¶
UpdateTask updates a task record
func (*InMemoryFakeClient) UpdateToolServer ¶
func (c *InMemoryFakeClient) UpdateToolServer(_ context.Context, server *database.ToolServer) error
UpdateToolServer updates a tool server
func (*InMemoryFakeClient) UpsertAgent ¶
UpsertAgent upserts an agent record