Documentation
¶
Overview ¶
Package store provides database storage implementations.
Package store provides database storage implementations.
Package store provides database storage implementations.
Package store provides database storage implementations.
Package store provides database storage implementations.
Package store provides database storage implementations.
Package store provides database storage implementations.
Package store provides database storage implementations.
Package store provides database storage implementations.
Package store provides database storage implementations.
Package store provides database storage implementations.
Package store provides database storage implementations.
Package store provides database storage implementations.
Package store provides database storage implementations.
Package store provides database storage implementations.
Index ¶
- Constants
- func ClientFromDB() *gen.Client
- func Init()
- func MaskNotifyURI(protocol, uri string) string
- func Migrate() error
- func NewFunctionCatalogAdapter(s *FunctionStore) functions.Catalog
- func NewPipelineCatalogAdapter(s *PipelineStore) pipeline.DefinitionCatalog
- func NewPipelineRunStoreAdapter(s *PipelineStore) pipeline.RunStore
- func NewWorkflowCatalogAdapter(s *WorkflowStore) workflow.Catalog
- func NewWorkflowRunStoreAdapter(s *WorkflowRunStore) workflow.WorkflowRunStore
- func ParameterIsExpired(p gen.Parameter) bool
- func RegisterAdapter(a Adapter)
- func SetQueryLimits(maxResults, maxMessageResults int)
- type Adapter
- type AgentKnowledgeListFilter
- type AgentKnowledgeSearchParams
- type AgentMemoryFactUpsert
- type AgentMemoryFactsFingerprint
- type AgentMemoryInjectableParams
- type AgentSessionSummaryListFilter
- type AgentSessionSummarySearchParams
- type AgentStore
- func (s *AgentStore) ClaimAgentSessionSummaryPending(ctx context.Context, claimToken string) (*gen.AgentSessionSummary, error)
- func (s *AgentStore) Client() *gen.Client
- func (s *AgentStore) CreateAgentKnowledge(ctx context.Context, doc *gen.AgentKnowledge) error
- func (s *AgentStore) CreateAgentPlan(ctx context.Context, plan *gen.AgentPlan) error
- func (s *AgentStore) CreateAgentSkill(ctx context.Context, skill *gen.AgentSkill) error
- func (s *AgentStore) CreateAgentSkillFile(ctx context.Context, file *gen.AgentSkillFile) error
- func (s *AgentStore) CreateAgentSubagent(ctx context.Context, subagent *gen.AgentSubagent) error
- func (s *AgentStore) CreateAgentSubagentTask(ctx context.Context, task *gen.AgentSubagentTask) error
- func (s *AgentStore) DeleteAgentKnowledge(ctx context.Context, id int64) error
- func (s *AgentStore) DeleteAgentMemoryFact(ctx context.Context, scope, key string) error
- func (s *AgentStore) DeleteAgentSkill(ctx context.Context, flag string) error
- func (s *AgentStore) DeleteAgentSkillFile(ctx context.Context, skillFlag, path string) error
- func (s *AgentStore) DeleteAgentSkillFilesByFlag(ctx context.Context, skillFlag string) error
- func (s *AgentStore) DeleteAgentSubagent(ctx context.Context, flag string) error
- func (s *AgentStore) GetAgentKnowledgeByID(ctx context.Context, id int64) (*gen.AgentKnowledge, error)
- func (s *AgentStore) GetAgentKnowledgeByPath(ctx context.Context, path string) (*gen.AgentKnowledge, error)
- func (s *AgentStore) GetAgentMemoryFact(ctx context.Context, scope, key string) (*gen.AgentMemoryFact, error)
- func (s *AgentStore) GetAgentMemoryFactsFingerprint(ctx context.Context, scope string) (AgentMemoryFactsFingerprint, error)
- func (s *AgentStore) GetAgentPlan(ctx context.Context, flag string) (*gen.AgentPlan, error)
- func (s *AgentStore) GetAgentPlanInSession(ctx context.Context, sessionID, flag string) (*gen.AgentPlan, error)
- func (s *AgentStore) GetAgentSessionSummaryBySession(ctx context.Context, sessionFlag string) (*gen.AgentSessionSummary, error)
- func (s *AgentStore) GetAgentSkillByFlag(ctx context.Context, flag string) (*gen.AgentSkill, error)
- func (s *AgentStore) GetAgentSkillByName(ctx context.Context, name string) (*gen.AgentSkill, error)
- func (s *AgentStore) GetAgentSkillFile(ctx context.Context, skillFlag, path string) (*gen.AgentSkillFile, error)
- func (s *AgentStore) GetAgentSkillsMaxUpdatedAt(ctx context.Context) (time.Time, error)
- func (s *AgentStore) GetAgentSubagentByFlag(ctx context.Context, flag string) (*gen.AgentSubagent, error)
- func (s *AgentStore) GetAgentSubagentByName(ctx context.Context, name string) (*gen.AgentSubagent, error)
- func (s *AgentStore) GetAgentSubagentTask(ctx context.Context, id int64) (*gen.AgentSubagentTask, error)
- func (s *AgentStore) GetAgentSubagentsMaxUpdatedAt(ctx context.Context) (time.Time, error)
- func (s *AgentStore) ListAgentKnowledge(ctx context.Context, filter AgentKnowledgeListFilter) ([]*gen.AgentKnowledge, error)
- func (s *AgentStore) ListAgentMemoryFacts(ctx context.Context, scope string) ([]*gen.AgentMemoryFact, error)
- func (s *AgentStore) ListAgentPlansBySession(ctx context.Context, sessionID string) ([]*gen.AgentPlan, error)
- func (s *AgentStore) ListAgentSessionSummaries(ctx context.Context, filter AgentSessionSummaryListFilter) ([]*gen.AgentSessionSummary, error)
- func (s *AgentStore) ListAgentSkillFiles(ctx context.Context, skillFlag string) ([]*gen.AgentSkillFile, error)
- func (s *AgentStore) ListAgentSkills(ctx context.Context, enabledOnly bool) ([]*gen.AgentSkill, error)
- func (s *AgentStore) ListAgentSubagentTasks(ctx context.Context, sessionID string, limit int) ([]*gen.AgentSubagentTask, error)
- func (s *AgentStore) ListAgentSubagents(ctx context.Context, enabledOnly bool) ([]*gen.AgentSubagent, error)
- func (s *AgentStore) ListAgentTodosBySession(ctx context.Context, sessionID string) ([]*gen.AgentTodo, error)
- func (s *AgentStore) ListAgentTodosBySessions(ctx context.Context, sessionIDs []string) ([]*gen.AgentTodo, error)
- func (s *AgentStore) ListInjectableAgentMemoryFacts(ctx context.Context, params AgentMemoryInjectableParams) ([]*gen.AgentMemoryFact, error)
- func (s *AgentStore) MarkAgentSessionSummaryFailed(ctx context.Context, sessionFlag, claimToken, errMsg string) error
- func (s *AgentStore) MarkAgentSessionSummaryReady(ctx context.Context, sessionFlag, claimToken, title, summary string) error
- func (s *AgentStore) MergeAgentTodosForSession(ctx context.Context, sessionID string, items []*gen.AgentTodo) error
- func (s *AgentStore) ReplaceAgentTodosForSession(ctx context.Context, sessionID string, items []*gen.AgentTodo) error
- func (s *AgentStore) RequeueStaleAgentSessionSummaryPending(ctx context.Context, olderThan time.Duration) (int, error)
- func (s *AgentStore) SearchAgentKnowledge(ctx context.Context, params AgentKnowledgeSearchParams) ([]*gen.AgentKnowledge, error)
- func (s *AgentStore) SearchAgentSessionSummaries(ctx context.Context, params AgentSessionSummarySearchParams) ([]*gen.AgentSessionSummary, error)
- func (s *AgentStore) UpdateAgentKnowledge(ctx context.Context, doc *gen.AgentKnowledge) error
- func (s *AgentStore) UpdateAgentSkill(ctx context.Context, skill *gen.AgentSkill) error
- func (s *AgentStore) UpdateAgentSkillFile(ctx context.Context, file *gen.AgentSkillFile) error
- func (s *AgentStore) UpdateAgentSubagent(ctx context.Context, subagent *gen.AgentSubagent) error
- func (s *AgentStore) UpdateAgentSubagentTask(ctx context.Context, task *gen.AgentSubagentTask) error
- func (s *AgentStore) UpsertAgentMemoryFact(ctx context.Context, fact AgentMemoryFactUpsert) (*gen.AgentMemoryFact, error)
- func (s *AgentStore) UpsertAgentSessionSummaryPending(ctx context.Context, sessionFlag, scope, title string) (*gen.AgentSessionSummary, error)
- type AppInfo
- type AuditStore
- func (s *AuditStore) Record(ctx context.Context, entry audit.Entry) error
- func (s *AuditStore) RecordFailure(ctx context.Context, entry audit.Entry, err error) error
- func (s *AuditStore) RecordRejected(ctx context.Context, entry audit.Entry, reason string) error
- func (s *AuditStore) RecordSuccess(ctx context.Context, entry audit.Entry) error
- type ChatStore
- func (s *ChatStore) AppendChatSessionEntry(ctx context.Context, entry *gen.ChatSessionEntry) error
- func (s *ChatStore) Client() *gen.Client
- func (s *ChatStore) CloseChatSession(ctx context.Context, flag string) error
- func (s *ChatStore) CountChatSessions(ctx context.Context, opts ListChatSessionsOptions) (int, error)
- func (s *ChatStore) CreateChatScheduledTask(ctx context.Context, task *gen.ChatScheduledTask) error
- func (s *ChatStore) CreateChatScheduledTaskRun(ctx context.Context, run *gen.ChatScheduledTaskRun) error
- func (s *ChatStore) CreateChatSession(ctx context.Context, session *gen.ChatSession) error
- func (s *ChatStore) CreateChatSessionEntry(ctx context.Context, entry *gen.ChatSessionEntry) error
- func (s *ChatStore) DeleteChatScheduledTask(ctx context.Context, flag string) error
- func (s *ChatStore) FailStaleChatScheduledTaskRuns(ctx context.Context) error
- func (s *ChatStore) GetChatScheduledTask(ctx context.Context, flag string) (*gen.ChatScheduledTask, error)
- func (s *ChatStore) GetChatScheduledTaskForUID(ctx context.Context, flag, uid string) (*gen.ChatScheduledTask, error)
- func (s *ChatStore) GetChatSession(ctx context.Context, flag string) (*gen.ChatSession, error)
- func (s *ChatStore) GetChatSessionEntry(ctx context.Context, flag string) (*gen.ChatSessionEntry, error)
- func (s *ChatStore) GetChatSessionEntryInSession(ctx context.Context, sessionID, flag string) (*gen.ChatSessionEntry, error)
- func (s *ChatStore) ListChatScheduledTaskRuns(ctx context.Context, taskID string, limit int) ([]*gen.ChatScheduledTaskRun, error)
- func (s *ChatStore) ListChatScheduledTasks(ctx context.Context, opts ListChatScheduledTasksOptions) ([]*gen.ChatScheduledTask, error)
- func (s *ChatStore) ListChatSessionEntries(ctx context.Context, sessionID string) ([]*gen.ChatSessionEntry, error)
- func (s *ChatStore) ListChatSessionEntriesBySessions(ctx context.Context, sessionIDs []string) ([]*gen.ChatSessionEntry, error)
- func (s *ChatStore) ListChatSessions(ctx context.Context, opts ListChatSessionsOptions) ([]*gen.ChatSession, string, error)
- func (s *ChatStore) UpdateChatScheduledTask(ctx context.Context, flag string, params UpdateChatScheduledTaskParams) error
- func (s *ChatStore) UpdateChatScheduledTaskRun(ctx context.Context, flag string, params UpdateChatScheduledTaskRunParams) error
- func (s *ChatStore) UpdateChatSessionArchived(ctx context.Context, flag string, archived bool) error
- func (s *ChatStore) UpdateChatSessionLeaf(ctx context.Context, flag, leafID string) error
- func (s *ChatStore) UpdateChatSessionMode(ctx context.Context, flag, mode string) error
- func (s *ChatStore) UpdateChatSessionPinned(ctx context.Context, flag string, pinned bool) error
- func (s *ChatStore) UpdateChatSessionPreview(ctx context.Context, flag, preview string) error
- func (s *ChatStore) UpdateChatSessionSettings(ctx context.Context, flag, modelName, thinkingLevel string) error
- func (s *ChatStore) UpdateChatSessionTitle(ctx context.Context, flag, title string) error
- type Client
- type ClipStore
- type CreateAccountInput
- type EventStore
- func (s *EventStore) AppendDataEvent(ctx context.Context, event types.DataEvent) error
- func (s *EventStore) AppendEventOutbox(ctx context.Context, event types.DataEvent) error
- func (s *EventStore) CountDataEvents(ctx context.Context, opts ListDataEventsOptions) (int64, error)
- func (s *EventStore) DeleteDataEventsOlderThan(ctx context.Context, cutoff time.Time) (int, error)
- func (s *EventStore) GetDataEventByEventID(ctx context.Context, eventID string) (*gen.DataEvent, error)
- func (s *EventStore) GetPipelineRunsForEvents(ctx context.Context, eventIDs []string) (map[string][]PipelineRunInfo, error)
- func (s *EventStore) ListDataEvents(ctx context.Context, opts ListDataEventsOptions) ([]*gen.DataEvent, string, error)
- func (s *EventStore) ListDistinctEventPipelineNames(ctx context.Context) ([]string, error)
- func (s *EventStore) ListDistinctEventSources(ctx context.Context, since time.Duration) ([]string, error)
- func (s *EventStore) ListDistinctEventTypes(ctx context.Context, since time.Duration) ([]string, error)
- func (s *EventStore) ListPendingDataEventOutbox(ctx context.Context, olderThan time.Time, limit int) ([]types.DataEvent, error)
- func (s *EventStore) MarkOutboxPublished(ctx context.Context, eventID string) error
- type FileStore
- func (s *FileStore) Client() *gen.Client
- func (s *FileStore) FileDeleteUnused(ctx context.Context, olderThan time.Time, limit int) ([]string, error)
- func (s *FileStore) FileFinishUpload(ctx context.Context, fd *types.FileDef, success bool, size int64) (*types.FileDef, error)
- func (s *FileStore) FileGet(ctx context.Context, fid string) (*types.FileDef, error)
- func (s *FileStore) FileStartUpload(ctx context.Context, fd *types.FileDef) error
- type FunctionCatalogAdapter
- func (a FunctionCatalogAdapter) CompleteRun(ctx context.Context, id int64, status string, durationMs int64, exitCode *int, ...) (*model.FunctionRun, error)
- func (a FunctionCatalogAdapter) Create(ctx context.Context, name, metadata, entrypoint, source, createdBy string) error
- func (a FunctionCatalogAdapter) CreateRun(ctx context.Context, name string, version int, idempotencyKey *string) (*model.FunctionRun, error)
- func (a FunctionCatalogAdapter) Delete(ctx context.Context, name string) (int64, error)
- func (a FunctionCatalogAdapter) GetByName(ctx context.Context, name string) (*model.FunctionDefinition, error)
- func (a FunctionCatalogAdapter) GetLatestPublished(ctx context.Context, name string) (*model.FunctionDefinitionVersion, error)
- func (a FunctionCatalogAdapter) GetRunByIdempotency(ctx context.Context, name, key string) (*model.FunctionRun, error)
- func (a FunctionCatalogAdapter) GetVersion(ctx context.Context, name string, version int) (*model.FunctionDefinitionVersion, error)
- func (a FunctionCatalogAdapter) ListAll(ctx context.Context) ([]*model.FunctionDefinition, error)
- func (a FunctionCatalogAdapter) ListPublished(ctx context.Context) ([]*model.FunctionDefinition, error)
- func (a FunctionCatalogAdapter) ListRuns(ctx context.Context, name string) ([]*model.FunctionRun, error)
- func (a FunctionCatalogAdapter) Publish(ctx context.Context, name string, version int) (*model.FunctionDefinition, error)
- func (a FunctionCatalogAdapter) UpdateDraft(ctx context.Context, name, metadata, entrypoint, source string, version int) (*model.FunctionDefinition, error)
- type FunctionStore
- func (s *FunctionStore) Create(ctx context.Context, name, metadata, entrypoint, source, createdBy string) error
- func (s *FunctionStore) CreateDefinition(ctx context.Context, name, createdBy string) error
- func (s *FunctionStore) CreateRun(ctx context.Context, functionName string, version int, ...) (*gen.FunctionRun, error)
- func (s *FunctionStore) DeleteDefinitionByName(ctx context.Context, name string) (int64, error)
- func (s *FunctionStore) FunctionStats(ctx context.Context, name string, since time.Time, groupBy string) (*types.FunctionStats, error)
- func (s *FunctionStore) GetDefinitionByName(ctx context.Context, name string) (*gen.FunctionDefinition, error)
- func (s *FunctionStore) GetLatestPublished(ctx context.Context, name string) (*gen.FunctionDefinitionVersion, error)
- func (s *FunctionStore) GetPublishedVersion(ctx context.Context, name string, version int) (*gen.FunctionDefinitionVersion, error)
- func (s *FunctionStore) GetRunByIdempotencyKey(ctx context.Context, functionName, idempotencyKey string) (*gen.FunctionRun, error)
- func (s *FunctionStore) ListAllDefinitions(ctx context.Context) ([]*gen.FunctionDefinition, error)
- func (s *FunctionStore) ListPublishedDefinitions(ctx context.Context) ([]*gen.FunctionDefinition, error)
- func (s *FunctionStore) ListRunsByName(ctx context.Context, functionName string) ([]*gen.FunctionRun, error)
- func (s *FunctionStore) PublishDefinition(ctx context.Context, name string, version int) (*gen.FunctionDefinition, error)
- func (s *FunctionStore) UpdateDefinitionDraft(ctx context.Context, name, metadata, entrypoint, source string, ...) (*gen.FunctionDefinition, error)
- func (s *FunctionStore) UpdateRun(ctx context.Context, runID int64, status string, durationMs int64, ...) (*gen.FunctionRun, error)
- type GatewayStore
- func (s *GatewayStore) Cancel(ctx context.Context, jobID string) (*types.GatewayJob, error)
- func (s *GatewayStore) Claim(ctx context.Context, workerID string, leaseTTL time.Duration) (*types.GatewayJob, error)
- func (s *GatewayStore) Complete(ctx context.Context, jobID string, in types.GatewayCompleteRequest, ...) (*types.GatewayJob, error)
- func (s *GatewayStore) Create(ctx context.Context, in types.GatewayCreateJob) (*types.GatewayJob, error)
- func (s *GatewayStore) Get(ctx context.Context, jobID string) (*types.GatewayJob, error)
- func (s *GatewayStore) HasFreshWorker(ctx context.Context, staleAfter time.Duration) (bool, error)
- func (s *GatewayStore) ReclaimExpired(ctx context.Context) error
- func (s *GatewayStore) TouchWorker(ctx context.Context, workerID string) error
- func (s *GatewayStore) TouchWorkerLease(ctx context.Context, workerID, jobID string, leaseTTL time.Duration) error
- type HubStore
- type LLMUsageStore
- type LifeAchievementUpsert
- type LifeAdjudicationInput
- type LifeCompleteOccurrenceInput
- type LifeCompletePersist
- type LifeCompleteResult
- type LifeCreateOccurrenceInput
- type LifeCreatePlanNodeInput
- type LifeEvidenceInput
- type LifeHabitCheckinInput
- type LifePlanActionSpecInput
- type LifeRewardCreate
- type LifeSkipOccurrenceInput
- type LifeStore
- func (s *LifeStore) AppendLoreOutbox(ctx context.Context, profileID, inventoryID int64) (string, error)
- func (s *LifeStore) ClearGoalAreaRefs(ctx context.Context, areaID int64) error
- func (s *LifeStore) Client() *gen.Client
- func (s *LifeStore) CompleteActionOccurrence(ctx context.Context, in LifeCompleteOccurrenceInput) error
- func (s *LifeStore) ConfirmHabitAction(ctx context.Context, planNodeID int64) (*gen.LifeActionSpec, error)
- func (s *LifeStore) CreateActionLog(ctx context.Context, profileID, questID int64, exp, gold int, invID *int64, ...) (*gen.LifeActionLog, error)
- func (s *LifeStore) CreateActionOccurrence(ctx context.Context, in LifeCreateOccurrenceInput) (*gen.LifeActionOccurrence, error)
- func (s *LifeStore) CreateAdjudication(ctx context.Context, in LifeAdjudicationInput) (*gen.LifeAdjudication, error)
- func (s *LifeStore) CreateCharacteristic(ctx context.Context, profileID int64, code, name string) (*gen.LifeCharacteristic, error)
- func (s *LifeStore) CreateEvidence(ctx context.Context, in LifeEvidenceInput) (*gen.LifeEvidence, error)
- func (s *LifeStore) CreateGoal(ctx context.Context, profileID int64, title, category string, areaID *int64) (*gen.LifeGoal, error)
- func (s *LifeStore) CreateInventory(ctx context.Context, profileID, equipmentID int64, questID *int64, ...) (*gen.LifeInventory, error)
- func (s *LifeStore) CreatePlanNode(ctx context.Context, in LifeCreatePlanNodeInput) (*gen.LifePlanNode, *gen.LifeActionSpec, error)
- func (s *LifeStore) CreateProfile(ctx context.Context, userID, nickname, classType string) (*gen.LifeProfile, error)
- func (s *LifeStore) CreateQuest(ctx context.Context, q *gen.LifeQuest) (*gen.LifeQuest, error)
- func (s *LifeStore) CreateReward(ctx context.Context, profileID int64, in LifeRewardCreate) (*gen.LifeReward, error)
- func (s *LifeStore) CreateRewardRedemption(ctx context.Context, profileID, rewardID int64, rewardName string, ...) (*gen.LifeRewardRedemption, error)
- func (s *LifeStore) CreateSkill(ctx context.Context, profileID, characteristicID int64, name string, ...) (*gen.LifeSkill, error)
- func (s *LifeStore) DeactivateAchievementsNotInFlags(ctx context.Context, keepFlags []string) error
- func (s *LifeStore) DeleteGoal(ctx context.Context, id int64) error
- func (s *LifeStore) DeletePlanNode(ctx context.Context, profileID, id int64) error
- func (s *LifeStore) EnsureAIContext(ctx context.Context, profileID int64) error
- func (s *LifeStore) EnsureEquippedSlots(ctx context.Context, profileID int64) (*gen.LifeEquippedSlots, error)
- func (s *LifeStore) EnsureRecurringOccurrences(ctx context.Context, profileID int64, now time.Time) error
- func (s *LifeStore) EnsureTodoOccurrence(ctx context.Context, profileID, planNodeID int64) (*gen.LifeActionOccurrence, error)
- func (s *LifeStore) GetAIContext(ctx context.Context, profileID int64) (*gen.LifeAIContext, error)
- func (s *LifeStore) GetActionOccurrenceByFlag(ctx context.Context, profileID int64, flag string) (*gen.LifeActionOccurrence, error)
- func (s *LifeStore) GetActionSpecByPlanNodeID(ctx context.Context, planNodeID int64) (*gen.LifeActionSpec, error)
- func (s *LifeStore) GetAdjudicationByFlag(ctx context.Context, profileID int64, flag string) (*gen.LifeAdjudication, error)
- func (s *LifeStore) GetCharacteristic(ctx context.Context, id int64) (*gen.LifeCharacteristic, error)
- func (s *LifeStore) GetEquipment(ctx context.Context, id int64) (*gen.LifeEquipment, error)
- func (s *LifeStore) GetEquipmentByFlag(ctx context.Context, flag string) (*gen.LifeEquipment, error)
- func (s *LifeStore) GetEquippedSlots(ctx context.Context, profileID int64) (*gen.LifeEquippedSlots, error)
- func (s *LifeStore) GetGoalByFlag(ctx context.Context, profileID int64, flag string) (*gen.LifeGoal, error)
- func (s *LifeStore) GetInventory(ctx context.Context, id int64) (*gen.LifeInventory, error)
- func (s *LifeStore) GetInventoryByFlag(ctx context.Context, profileID int64, flag string) (*gen.LifeInventory, error)
- func (s *LifeStore) GetLatestAdjudicationByQuest(ctx context.Context, profileID, questID int64) (*gen.LifeAdjudication, error)
- func (s *LifeStore) GetLootTable(ctx context.Context, tier string) (*gen.LifeLootTable, error)
- func (s *LifeStore) GetPlanNode(ctx context.Context, id int64) (*gen.LifePlanNode, error)
- func (s *LifeStore) GetPlanNodeByFlag(ctx context.Context, profileID int64, flag string) (*gen.LifePlanNode, error)
- func (s *LifeStore) GetProfileByID(ctx context.Context, id int64) (*gen.LifeProfile, error)
- func (s *LifeStore) GetProfileByUserID(ctx context.Context, userID string) (*gen.LifeProfile, error)
- func (s *LifeStore) GetQuest(ctx context.Context, id int64) (*gen.LifeQuest, error)
- func (s *LifeStore) GetQuestByFlag(ctx context.Context, profileID int64, flag string) (*gen.LifeQuest, error)
- func (s *LifeStore) GetRewardByFlag(ctx context.Context, profileID int64, flag string) (*gen.LifeReward, error)
- func (s *LifeStore) GetSkill(ctx context.Context, id int64) (*gen.LifeSkill, error)
- func (s *LifeStore) GetSkillByName(ctx context.Context, profileID int64, name string) (*gen.LifeSkill, error)
- func (s *LifeStore) ListAchievementProgress(ctx context.Context, profileID int64) ([]*gen.LifeAchievementProgress, error)
- func (s *LifeStore) ListAchievementUnlocks(ctx context.Context, profileID int64) ([]*gen.LifeAchievementUnlock, error)
- func (s *LifeStore) ListAchievementUnlocksInRange(ctx context.Context, profileID int64, since, until time.Time) ([]*gen.LifeAchievementUnlock, error)
- func (s *LifeStore) ListAchievements(ctx context.Context) ([]*gen.LifeAchievement, error)
- func (s *LifeStore) ListActionLogs(ctx context.Context, profileID int64, limit int) ([]*gen.LifeActionLog, error)
- func (s *LifeStore) ListActionLogsInRange(ctx context.Context, profileID int64, since, until time.Time) ([]*gen.LifeActionLog, error)
- func (s *LifeStore) ListActionLogsPage(ctx context.Context, profileID int64, limit, offset int) ([]*gen.LifeActionLog, int, error)
- func (s *LifeStore) ListActionOccurrences(ctx context.Context, profileID int64, state string) ([]*gen.LifeActionOccurrence, error)
- func (s *LifeStore) ListActionSpecs(ctx context.Context, profileID int64) ([]*gen.LifeActionSpec, error)
- func (s *LifeStore) ListCharacteristics(ctx context.Context, profileID int64) ([]*gen.LifeCharacteristic, error)
- func (s *LifeStore) ListEvidenceByQuest(ctx context.Context, profileID, questID int64) ([]*gen.LifeEvidence, error)
- func (s *LifeStore) ListEvidenceByQuestIDs(ctx context.Context, profileID int64, questIDs []int64) ([]*gen.LifeEvidence, error)
- func (s *LifeStore) ListGoals(ctx context.Context, profileID int64, status string) ([]*gen.LifeGoal, error)
- func (s *LifeStore) ListHabitCheckins(ctx context.Context, profileID, planNodeID int64, from, to time.Time) ([]*gen.LifeHabitCheckin, error)
- func (s *LifeStore) ListInventory(ctx context.Context, profileID int64) ([]*gen.LifeInventory, error)
- func (s *LifeStore) ListInventoryPage(ctx context.Context, profileID int64, limit, offset int) ([]*gen.LifeInventory, int, error)
- func (s *LifeStore) ListPendingLoreOutbox(ctx context.Context, limit int) ([]*gen.EventOutbox, error)
- func (s *LifeStore) ListPlanNodes(ctx context.Context, profileID int64) ([]*gen.LifePlanNode, error)
- func (s *LifeStore) ListQuests(ctx context.Context, profileID int64, status string) ([]*gen.LifeQuest, error)
- func (s *LifeStore) ListQuestsByIDs(ctx context.Context, profileID int64, ids []int64) ([]*gen.LifeQuest, error)
- func (s *LifeStore) ListQuestsCompletedInRange(ctx context.Context, profileID int64, since, until time.Time) ([]*gen.LifeQuest, error)
- func (s *LifeStore) ListQuestsPage(ctx context.Context, profileID int64, status string, limit, offset int) ([]*gen.LifeQuest, int, error)
- func (s *LifeStore) ListRecurringActionSpecs(ctx context.Context, profileID int64) ([]*gen.LifeActionSpec, map[int64]*gen.LifePlanNode, error)
- func (s *LifeStore) ListRewardRedemptions(ctx context.Context, profileID int64, limit int) ([]*gen.LifeRewardRedemption, error)
- func (s *LifeStore) ListRewardRedemptionsInRange(ctx context.Context, profileID int64, since, until time.Time) ([]*gen.LifeRewardRedemption, error)
- func (s *LifeStore) ListRewardRedemptionsPage(ctx context.Context, profileID int64, limit, offset int) ([]*gen.LifeRewardRedemption, int, error)
- func (s *LifeStore) ListRewards(ctx context.Context, profileID int64, activeOnly *bool) ([]*gen.LifeReward, error)
- func (s *LifeStore) ListRewardsPage(ctx context.Context, profileID int64, activeOnly *bool, limit, offset int) ([]*gen.LifeReward, int, error)
- func (s *LifeStore) ListSkills(ctx context.Context, profileID int64) ([]*gen.LifeSkill, error)
- func (s *LifeStore) MapEquipmentByIDs(ctx context.Context, ids []int64) (map[int64]*gen.LifeEquipment, error)
- func (s *LifeStore) MapInventoryByIDs(ctx context.Context, ids []int64) (map[int64]*gen.LifeInventory, error)
- func (s *LifeStore) MapLatestAdjudicationsByQuestIDs(ctx context.Context, profileID int64, questIDs []int64) (map[int64]*gen.LifeAdjudication, error)
- func (s *LifeStore) MapLootTablesByTiers(ctx context.Context, tiers []string) (map[string]*gen.LifeLootTable, error)
- func (s *LifeStore) MarkAdjudicationApplied(ctx context.Context, id int64) error
- func (s *LifeStore) MarkOutboxPublished(ctx context.Context, eventID string) error
- func (s *LifeStore) MarkQuestCompleted(ctx context.Context, id int64) error
- func (s *LifeStore) MarkQuestStatus(ctx context.Context, id int64, status string) error
- func (s *LifeStore) MarkRewardRedeemed(ctx context.Context, id int64, at time.Time) error
- func (s *LifeStore) PersistCompleteQuest(ctx context.Context, in LifeCompletePersist) (*LifeCompleteResult, error)
- func (s *LifeStore) PersistFailQuest(ctx context.Context, profileID, questID int64, rustInvIDs []int64, ...) error
- func (s *LifeStore) SetEquippedSlot(ctx context.Context, profileID int64, slotField string, inventoryID *int64) error
- func (s *LifeStore) SetEquippedSlotsTarnishedUntil(ctx context.Context, profileID int64, until *time.Time) error
- func (s *LifeStore) SetInventoryTarnishedUntil(ctx context.Context, id int64, until *time.Time) error
- func (s *LifeStore) SetProfileGold(ctx context.Context, id int64, gold int) error
- func (s *LifeStore) SetRewardActive(ctx context.Context, id int64, active bool) error
- func (s *LifeStore) SkipActionOccurrence(ctx context.Context, in LifeSkipOccurrenceInput) error
- func (s *LifeStore) UpdateAIContext(ctx context.Context, profileID int64, rate float64, mood map[string]any, ...) error
- func (s *LifeStore) UpdateCharacteristicStats(ctx context.Context, id int64, level int, exp int64) error
- func (s *LifeStore) UpdateGoal(ctx context.Context, id int64, title, category string, areaID *int64) error
- func (s *LifeStore) UpdateGoalStatus(ctx context.Context, id int64, status string) error
- func (s *LifeStore) UpdateInventoryLore(ctx context.Context, id int64, name, lore, status string) error
- func (s *LifeStore) UpdateInventoryLoreStatus(ctx context.Context, id int64, status string) error
- func (s *LifeStore) UpdatePlanNode(ctx context.Context, id int64, title, description, status string, ...) error
- func (s *LifeStore) UpdateProfileClass(ctx context.Context, id int64, classType string) error
- func (s *LifeStore) UpdateProfileStats(ctx context.Context, id int64, level int, exp int64, gold int, ...) error
- func (s *LifeStore) UpdateReward(ctx context.Context, id int64, in LifeRewardCreate) error
- func (s *LifeStore) UpdateSkillStats(ctx context.Context, id int64, level int, exp int64) error
- func (s *LifeStore) UpsertAchievement(ctx context.Context, in LifeAchievementUpsert) error
- func (s *LifeStore) UpsertEquipment(ctx context.Context, flag, name, rarity, slotType, lore string, ...) (*gen.LifeEquipment, error)
- func (s *LifeStore) UpsertHabitCheckin(ctx context.Context, in LifeHabitCheckinInput) (*gen.LifeHabitCheckin, error)
- func (s *LifeStore) UpsertLootTable(ctx context.Context, tier string, chance float64, pool []string) error
- func (s *LifeStore) WithTx(ctx context.Context, fn func(*LifeStore) error) error
- type ListChatScheduledTasksOptions
- type ListChatSessionsOptions
- type ListConfigOptions
- type ListDataEventsOptions
- type ListNotifyChannelOptions
- type ListNotifyRecordsOptions
- type ListNotifyRuleOptions
- type ListNotifyTemplateOptions
- type MessageStore
- func (s *MessageStore) Client() *gen.Client
- func (s *MessageStore) CreateMessage(ctx context.Context, msg gen.Message) error
- func (s *MessageStore) GetMessage(ctx context.Context, flag string) (*gen.Message, error)
- func (s *MessageStore) GetMessageByPlatform(ctx context.Context, platformId int64, platformMsgId string) (*gen.Message, error)
- func (s *MessageStore) GetMessagesBySession(ctx context.Context, session string) ([]*gen.Message, error)
- type ModuleDataStore
- func (s *ModuleDataStore) BehaviorGet(ctx context.Context, uid types.Uid, flag string) (gen.Behavior, error)
- func (s *ModuleDataStore) BehaviorIncrease(ctx context.Context, uid types.Uid, flag string, number int) error
- func (s *ModuleDataStore) BehaviorList(ctx context.Context, uid types.Uid) ([]*gen.Behavior, error)
- func (s *ModuleDataStore) BehaviorSet(ctx context.Context, behaviorModel gen.Behavior) error
- func (s *ModuleDataStore) Client() *gen.Client
- func (s *ModuleDataStore) ConfigDelete(ctx context.Context, uid types.Uid, topic, key string) error
- func (s *ModuleDataStore) ConfigGet(ctx context.Context, uid types.Uid, topic, key string) (types.KV, error)
- func (s *ModuleDataStore) ConfigSet(ctx context.Context, uid types.Uid, topic, key string, value types.KV) error
- func (s *ModuleDataStore) CreateCounter(ctx context.Context, counterModel *gen.Counter) (int64, error)
- func (s *ModuleDataStore) CreateInstruct(ctx context.Context, instructModel *gen.Instruct) (int64, error)
- func (s *ModuleDataStore) CreateToken(ctx context.Context, uid types.Uid, expiresAt time.Time, scopes []string) (string, error)
- func (s *ModuleDataStore) DataDelete(ctx context.Context, uid types.Uid, topic, key string) error
- func (s *ModuleDataStore) DataGet(ctx context.Context, uid types.Uid, topic, key string) (types.KV, error)
- func (s *ModuleDataStore) DataList(ctx context.Context, uid types.Uid, topic string, filter types.DataFilter) ([]*gen.Data, error)
- func (s *ModuleDataStore) DataSet(ctx context.Context, uid types.Uid, topic, key string, value types.KV) error
- func (s *ModuleDataStore) DecreaseCounter(ctx context.Context, id, amount int64) error
- func (s *ModuleDataStore) FormGet(ctx context.Context, formId string) (gen.Form, error)
- func (s *ModuleDataStore) FormSet(ctx context.Context, formId string, formModel gen.Form) error
- func (s *ModuleDataStore) GetCounter(ctx context.Context, id int64) (gen.Counter, error)
- func (s *ModuleDataStore) GetCounterByFlag(ctx context.Context, uid types.Uid, topic, flag string) (gen.Counter, error)
- func (s *ModuleDataStore) IncreaseCounter(ctx context.Context, id, amount int64) error
- func (s *ModuleDataStore) ListConfigByPrefix(ctx context.Context, uid types.Uid, topic, prefix string) ([]*gen.ConfigData, error)
- func (s *ModuleDataStore) ListConfigs(ctx context.Context, opts ListConfigOptions) ([]model.ConfigItem, error)
- func (s *ModuleDataStore) ListCounter(ctx context.Context, uid types.Uid, topic string) ([]*gen.Counter, error)
- func (s *ModuleDataStore) ListInstruct(ctx context.Context, uid types.Uid, isExpire bool, limit int) ([]*gen.Instruct, error)
- func (s *ModuleDataStore) ListTokens(ctx context.Context) ([]model.TokenItem, error)
- func (s *ModuleDataStore) OAuthGet(ctx context.Context, uid types.Uid, topic, t string) (gen.OAuth, error)
- func (s *ModuleDataStore) OAuthGetAvailable(ctx context.Context, t string) ([]gen.OAuth, error)
- func (s *ModuleDataStore) OAuthSet(ctx context.Context, oauthModel gen.OAuth) error
- func (s *ModuleDataStore) PageGet(ctx context.Context, pageId string) (gen.Page, error)
- func (s *ModuleDataStore) PageSet(ctx context.Context, pageId string, pageModel gen.Page) error
- func (s *ModuleDataStore) ParameterDelete(ctx context.Context, flag string) error
- func (s *ModuleDataStore) ParameterGet(ctx context.Context, flag string) (gen.Parameter, error)
- func (s *ModuleDataStore) ParameterSet(ctx context.Context, flag string, params types.KV, expiredAt time.Time) error
- func (s *ModuleDataStore) RevokeToken(ctx context.Context, flag string) error
- func (s *ModuleDataStore) UpdateInstruct(ctx context.Context, instructModel *gen.Instruct) error
- type NotifyConfigStore
- func (s *NotifyConfigStore) Client() *gen.Client
- func (s *NotifyConfigStore) CreateNotifyChannel(ctx context.Context, name, protocol, uri string) (int64, error)
- func (s *NotifyConfigStore) CreateNotifyRule(ctx context.Context, rule model.NotifyRule) (int64, error)
- func (s *NotifyConfigStore) CreateNotifyTemplate(ctx context.Context, tmpl model.NotifyTemplate) (int64, error)
- func (s *NotifyConfigStore) DeleteNotifyChannel(ctx context.Context, id int64) error
- func (s *NotifyConfigStore) DeleteNotifyRule(ctx context.Context, id int64) error
- func (s *NotifyConfigStore) DeleteNotifyTemplate(ctx context.Context, id int64) error
- func (s *NotifyConfigStore) GetDefaultNotifyChannelRaw(ctx context.Context) (model.NotifyChannel, error)
- func (s *NotifyConfigStore) GetDefaultNotifyTemplate(ctx context.Context) (model.NotifyTemplate, error)
- func (s *NotifyConfigStore) GetNotifyChannel(ctx context.Context, id int64) (model.NotifyChannel, error)
- func (s *NotifyConfigStore) GetNotifyChannelByNameRaw(ctx context.Context, name string) (model.NotifyChannel, error)
- func (s *NotifyConfigStore) GetNotifyChannelRaw(ctx context.Context, id int64) (model.NotifyChannel, error)
- func (s *NotifyConfigStore) GetNotifyRule(ctx context.Context, id int64) (model.NotifyRule, error)
- func (s *NotifyConfigStore) GetNotifyTemplate(ctx context.Context, id int64) (model.NotifyTemplate, error)
- func (s *NotifyConfigStore) GetNotifyTemplateByTemplateID(ctx context.Context, templateID string) (model.NotifyTemplate, error)
- func (s *NotifyConfigStore) ListNotifyChannels(ctx context.Context, opts ListNotifyChannelOptions) ([]model.NotifyChannel, error)
- func (s *NotifyConfigStore) ListNotifyRules(ctx context.Context, opts ListNotifyRuleOptions) ([]model.NotifyRule, error)
- func (s *NotifyConfigStore) ListNotifyTemplates(ctx context.Context, _ ListNotifyTemplateOptions) ([]model.NotifyTemplate, error)
- func (s *NotifyConfigStore) SetDefaultNotifyChannel(ctx context.Context, id int64) error
- func (s *NotifyConfigStore) SetDefaultNotifyTemplate(ctx context.Context, id int64) error
- func (s *NotifyConfigStore) UpdateNotifyChannel(ctx context.Context, id int64, name, protocol, uri string, enabled bool) error
- func (s *NotifyConfigStore) UpdateNotifyRule(ctx context.Context, id int64, rule model.NotifyRule) error
- func (s *NotifyConfigStore) UpdateNotifyTemplate(ctx context.Context, id int64, tmpl model.NotifyTemplate) error
- type NotifyStore
- func (s *NotifyStore) CancelDeferredByCorrelation(ctx context.Context, uid, correlationID string) error
- func (s *NotifyStore) CancelDeferredByCorrelations(ctx context.Context, uid string, correlationIDs ...string) error
- func (s *NotifyStore) CountUnread(ctx context.Context, uid, channel, status string) (int, error)
- func (s *NotifyStore) DeleteOldest(ctx context.Context, uid string, keepN int) error
- func (s *NotifyStore) GetRecord(ctx context.Context, id int64) (*gen.NotificationRecord, error)
- func (s *NotifyStore) HasUnreadSuccessByCorrelation(ctx context.Context, uid, correlationID string) (bool, error)
- func (s *NotifyStore) ListDueDeferred(ctx context.Context, now time.Time, limit int) ([]*gen.NotificationRecord, error)
- func (s *NotifyStore) ListRecords(ctx context.Context, uid string, opts ListNotifyRecordsOptions) ([]*gen.NotificationRecord, string, error)
- func (s *NotifyStore) MarkRead(ctx context.Context, uid string, ids ...int64) error
- func (s *NotifyStore) MarkReadByCorrelation(ctx context.Context, uid, correlationID string) error
- func (s *NotifyStore) Record(ctx context.Context, ...) (int64, error)
- func (s *NotifyStore) RecordParams(ctx context.Context, p RecordParams) (int64, error)
- func (s *NotifyStore) UpdateRecordStatus(ctx context.Context, id int64, status, errorMsg string) error
- type PageDataStore
- func (s *PageDataStore) CreatePageData(ctx context.Context, token, pageType, title string, data types.KV, ...) error
- func (s *PageDataStore) DeleteExpiredPageData(ctx context.Context) (int64, error)
- func (s *PageDataStore) DeletePageData(ctx context.Context, token string) (int, error)
- func (s *PageDataStore) GetPageDataByToken(ctx context.Context, token string) (*gen.PageData, error)
- type PersistentStorageInterface
- type PipelineCatalogAdapter
- func (a PipelineCatalogAdapter) CreateDefinition(ctx context.Context, name, description, createdBy string) error
- func (a PipelineCatalogAdapter) DeleteDefinitionByName(ctx context.Context, name string) (int64, error)
- func (a PipelineCatalogAdapter) EnsureDefinitionCreatedBy(ctx context.Context, name, createdBy string) error
- func (a PipelineCatalogAdapter) GetDefinitionByName(ctx context.Context, name string) (*model.PipelineDefinition, error)
- func (a PipelineCatalogAdapter) GetRunsByParentName(ctx context.Context, parentName string) ([]*model.PipelineRun, error)
- func (a PipelineCatalogAdapter) ListPublishedDefinitions(ctx context.Context) ([]pipeline.DefinitionRecord, error)
- func (a PipelineCatalogAdapter) PublishDefinition(ctx context.Context, name string, version int) (*model.PipelineDefinition, error)
- func (a PipelineCatalogAdapter) UpdateDefinitionDraft(ctx context.Context, name, yamlDraft string, version int) (*model.PipelineDefinition, error)
- type PipelineRunInfo
- type PipelineRunStoreAdapter
- func (a PipelineRunStoreAdapter) CreateRun(ctx context.Context, pipelineName, eventID, eventType, triggerSource string) (*model.PipelineRun, error)
- func (a PipelineRunStoreAdapter) CreateStepRun(ctx context.Context, runID int64, stepName, capName, operation string, ...) (*model.PipelineStepRun, error)
- func (a PipelineRunStoreAdapter) GetCheckpoint(ctx context.Context, runID int64, target any) error
- func (a PipelineRunStoreAdapter) GetIncompleteRuns(ctx context.Context) ([]*model.PipelineRun, error)
- func (a PipelineRunStoreAdapter) GetRun(ctx context.Context, runID int64) (*model.PipelineRun, error)
- func (a PipelineRunStoreAdapter) HasConsumed(ctx context.Context, consumerName, eventID string) (bool, error)
- func (a PipelineRunStoreAdapter) RecordConsumption(ctx context.Context, consumerName, eventID string) error
- func (a PipelineRunStoreAdapter) RecordResourceLink(ctx context.Context, link model.ResourceLink) error
- func (a PipelineRunStoreAdapter) SaveCheckpoint(ctx context.Context, runID int64, data any) error
- func (a PipelineRunStoreAdapter) UpdateRunHeartbeat(ctx context.Context, runID int64) error
- func (a PipelineRunStoreAdapter) UpdateRunStatus(ctx context.Context, runID int64, status int, errMsg string) error
- func (a PipelineRunStoreAdapter) UpdateStepRun(ctx context.Context, stepRunID int64, status int, result map[string]any, ...) error
- type PipelineStore
- func (s *PipelineStore) CreateDefinition(ctx context.Context, name, description, createdBy string) error
- func (s *PipelineStore) CreateRun(ctx context.Context, pipelineName, eventID, eventType, triggerSource string) (*gen.PipelineRun, error)
- func (s *PipelineStore) CreateStepRun(ctx context.Context, runID int64, stepName, capability, operation string, ...) (*gen.PipelineStepRun, error)
- func (s *PipelineStore) DeleteDefinitionByName(ctx context.Context, name string) (int64, error)
- func (s *PipelineStore) EnsureDefinitionCreatedBy(ctx context.Context, name, createdBy string) error
- func (s *PipelineStore) GetCheckpoint(ctx context.Context, runID int64, target any) error
- func (s *PipelineStore) GetDefinitionByName(ctx context.Context, name string) (*gen.PipelineDefinition, error)
- func (s *PipelineStore) GetDefinitionVersion(ctx context.Context, name string, version int) (*gen.PipelineDefinitionVersion, error)
- func (s *PipelineStore) GetIncompleteRuns(ctx context.Context) ([]*gen.PipelineRun, error)
- func (s *PipelineStore) GetRun(ctx context.Context, runID int64) (*gen.PipelineRun, error)
- func (s *PipelineStore) GetRunByID(ctx context.Context, id int64) (*gen.PipelineRun, error)
- func (s *PipelineStore) GetRunsByParentName(ctx context.Context, parentName string) ([]*gen.PipelineRun, error)
- func (s *PipelineStore) GetStepRunsByRunID(ctx context.Context, runID int64) ([]*gen.PipelineStepRun, error)
- func (s *PipelineStore) HasConsumed(ctx context.Context, consumerName, eventID string) (bool, error)
- func (s *PipelineStore) LatestRunStartedAtByParentNames(ctx context.Context, names []string) (map[string]time.Time, error)
- func (s *PipelineStore) ListDefinitionVersions(ctx context.Context, name string) ([]*gen.PipelineDefinitionVersion, error)
- func (s *PipelineStore) ListDefinitions(ctx context.Context) ([]*gen.PipelineDefinition, error)
- func (s *PipelineStore) ListPublishedDefinitions(ctx context.Context) ([]pipeline.DefinitionRecord, error)
- func (s *PipelineStore) ListStepRunsByRunID(ctx context.Context, runID int64) ([]*gen.PipelineStepRun, error)
- func (s *PipelineStore) PipelineStats(ctx context.Context, name string, since time.Time, groupBy string) (*types.PipelineStats, error)
- func (s *PipelineStore) PublishDefinition(ctx context.Context, name string, version int) (*gen.PipelineDefinition, error)
- func (s *PipelineStore) RecordConsumption(ctx context.Context, consumerName, eventID string) error
- func (s *PipelineStore) RecordResourceLink(ctx context.Context, link *gen.ResourceLink) error
- func (s *PipelineStore) RenameDefinition(ctx context.Context, oldName, newName string) (*gen.PipelineDefinition, error)
- func (s *PipelineStore) RunLatencyStatsByParentNames(ctx context.Context, names []string, since time.Time) (map[string]types.RunLatencyStats, error)
- func (s *PipelineStore) SaveCheckpoint(ctx context.Context, runID int64, data any) error
- func (s *PipelineStore) SetDefinitionEnabled(ctx context.Context, name string, enabled bool) (*gen.PipelineDefinition, error)
- func (s *PipelineStore) UpdateDefinitionDraft(ctx context.Context, name, yamlDraft string, version int) (*gen.PipelineDefinition, error)
- func (s *PipelineStore) UpdateRunHeartbeat(ctx context.Context, runID int64) error
- func (s *PipelineStore) UpdateRunStatus(ctx context.Context, runID int64, status int, errMsg string) error
- func (s *PipelineStore) UpdateStepRun(ctx context.Context, stepRunID int64, status int, result map[string]any, ...) error
- type PlatformStore
- func (s *PlatformStore) Client() *gen.Client
- func (s *PlatformStore) CreateBot(ctx context.Context, botModel *gen.Bot) (int64, error)
- func (s *PlatformStore) CreateChannel(ctx context.Context, channelModel *gen.Channel) (int64, error)
- func (s *PlatformStore) CreatePlatform(ctx context.Context, platformModel *gen.Platform) (int64, error)
- func (s *PlatformStore) CreatePlatformChannel(ctx context.Context, item *gen.PlatformChannel) (int64, error)
- func (s *PlatformStore) CreatePlatformChannelUser(ctx context.Context, item *gen.PlatformChannelUser) (int64, error)
- func (s *PlatformStore) DeleteBot(ctx context.Context, name string) error
- func (s *PlatformStore) DeleteChannel(ctx context.Context, name string) error
- func (s *PlatformStore) GetBot(ctx context.Context, id int64) (*gen.Bot, error)
- func (s *PlatformStore) GetBotByName(ctx context.Context, name string) (*gen.Bot, error)
- func (s *PlatformStore) GetBots(ctx context.Context) ([]*gen.Bot, error)
- func (s *PlatformStore) GetChannel(ctx context.Context, id int64) (*gen.Channel, error)
- func (s *PlatformStore) GetChannelByName(ctx context.Context, name string) (*gen.Channel, error)
- func (s *PlatformStore) GetChannels(ctx context.Context) ([]*gen.Channel, error)
- func (s *PlatformStore) GetPlatform(ctx context.Context, id int64) (*gen.Platform, error)
- func (s *PlatformStore) GetPlatformByName(ctx context.Context, name string) (*gen.Platform, error)
- func (s *PlatformStore) GetPlatformChannelByFlag(ctx context.Context, flag string) (*gen.PlatformChannel, error)
- func (s *PlatformStore) GetPlatformChannelUsersByUserFlag(ctx context.Context, userFlag string) ([]*gen.PlatformChannelUser, error)
- func (s *PlatformStore) GetPlatformChannelUsersByUserFlags(ctx context.Context, userFlags []string) ([]*gen.PlatformChannelUser, error)
- func (s *PlatformStore) GetPlatformChannelsByChannelId(ctx context.Context, channelId int64) (*gen.PlatformChannel, error)
- func (s *PlatformStore) GetPlatformChannelsByPlatformIds(ctx context.Context, platformIds []int64) ([]*gen.PlatformChannel, error)
- func (s *PlatformStore) GetPlatforms(ctx context.Context) ([]*gen.Platform, error)
- func (s *PlatformStore) UpdateBot(ctx context.Context, botModel *gen.Bot) error
- func (s *PlatformStore) UpdateChannel(ctx context.Context, channelModel *gen.Channel) error
- func (s *PlatformStore) UpdatePlatformChannelChannelID(ctx context.Context, platformChannelID, channelID int64) error
- type PollingStateEntry
- type PollingStateStore
- type RecordParams
- type ResourceChainStore
- func (s *ResourceChainStore) FindNodeRelations(ctx context.Context, appName, capability, entityID, pipelineName string, ...) ([]schema.ResourceEdge, []schema.ResourceEdge, error)
- func (s *ResourceChainStore) FindRelations(ctx context.Context, appName, entityID string) (*schema.ResourceRelations, error)
- func (s *ResourceChainStore) FindResourceLinks(ctx context.Context, eventIDs []string) ([]*gen.ResourceLink, error)
- func (s *ResourceChainStore) FindResourcesByTag(ctx context.Context, key, value string, limit int, cursor string) ([]*gen.DataEvent, string, error)
- func (s *ResourceChainStore) SearchNodes(ctx context.Context, query string, limit int, cursor string) ([]schema.ResourceRef, string, error)
- type RuntimeAgentStore
- func (s *RuntimeAgentStore) Client() *gen.Client
- func (s *RuntimeAgentStore) CreateAgent(ctx context.Context, agentModel *gen.Agent) (int64, error)
- func (s *RuntimeAgentStore) GetAgentByHostid(ctx context.Context, uid types.Uid, topic, hostid string) (*gen.Agent, error)
- func (s *RuntimeAgentStore) GetAgents(ctx context.Context) ([]*gen.Agent, error)
- func (s *RuntimeAgentStore) UpdateAgentLastOnlineAt(ctx context.Context, uid types.Uid, topic, hostid string, ...) error
- func (s *RuntimeAgentStore) UpdateAgentOnlineDuration(ctx context.Context, uid types.Uid, topic, hostid string, ...) error
- type UpdateChatScheduledTaskParams
- type UpdateChatScheduledTaskRunParams
- type UserStore
- func (s *UserStore) Client() *gen.Client
- func (s *UserStore) CreatePlatformUser(ctx context.Context, item *gen.PlatformUser) (int64, error)
- func (s *UserStore) FirstUser(ctx context.Context) (*gen.User, error)
- func (s *UserStore) GetPlatformUserByFlag(ctx context.Context, flag string) (*gen.PlatformUser, error)
- func (s *UserStore) GetPlatformUsersByUserId(ctx context.Context, userId int64) ([]*gen.PlatformUser, error)
- func (s *UserStore) GetUserByFlag(ctx context.Context, flag string) (*gen.User, error)
- func (s *UserStore) GetUserById(ctx context.Context, id int64) (*gen.User, error)
- func (s *UserStore) GetUsers(ctx context.Context) ([]*gen.User, error)
- func (s *UserStore) UpdatePlatformUser(ctx context.Context, item *gen.PlatformUser) error
- func (s *UserStore) UserCreate(ctx context.Context, usr *gen.User) error
- func (s *UserStore) UserDelete(ctx context.Context, uid types.Uid, hard bool) error
- func (s *UserStore) UserGet(ctx context.Context, uid types.Uid) (*gen.User, error)
- func (s *UserStore) UserGetAll(ctx context.Context, ids ...types.Uid) ([]*gen.User, error)
- func (s *UserStore) UserUpdate(ctx context.Context, uid types.Uid, update types.KV) error
- type WebAccountStore
- func (s *WebAccountStore) Client() *gen.Client
- func (s *WebAccountStore) Count(ctx context.Context) (int, error)
- func (s *WebAccountStore) CreateFirstAccount(ctx context.Context, in CreateAccountInput) (*gen.WebAccount, error)
- func (s *WebAccountStore) DeleteWebSessionsForUID(ctx context.Context, uid string) (int, error)
- func (s *WebAccountStore) EnableTOTP(ctx context.Context, username string, ciphertext, nonce []byte, ...) error
- func (s *WebAccountStore) EnsureUser(ctx context.Context, uid, username string) error
- func (s *WebAccountStore) GetByUID(ctx context.Context, uid string) (*gen.WebAccount, error)
- func (s *WebAccountStore) GetByUsername(ctx context.Context, username string) (*gen.WebAccount, error)
- func (s *WebAccountStore) ResetTOTP(ctx context.Context, username string) error
- func (s *WebAccountStore) RevokeLegacyWebSessions(ctx context.Context) (int, error)
- func (s *WebAccountStore) SetBackupCodeHashes(ctx context.Context, username string, hashes []string) error
- func (s *WebAccountStore) SetTOTPLastStep(ctx context.Context, username string, step int64) error
- func (s *WebAccountStore) SoleAccount(ctx context.Context) (*gen.WebAccount, bool, error)
- func (s *WebAccountStore) UpdatePasswordHash(ctx context.Context, username, hash string) error
- type WorkflowCatalogAdapter
- func (a WorkflowCatalogAdapter) ApplyDefinition(ctx context.Context, meta *types.WorkflowMetadata) (*model.Workflow, error)
- func (a WorkflowCatalogAdapter) DeleteDefinitionByName(ctx context.Context, name string) error
- func (a WorkflowCatalogAdapter) GetMetadata(ctx context.Context, name string) (*types.WorkflowMetadata, error)
- func (a WorkflowCatalogAdapter) ListDefinitions(ctx context.Context) ([]*model.Workflow, error)
- func (a WorkflowCatalogAdapter) ListRunsByName(ctx context.Context, name string) ([]*model.WorkflowRun, error)
- type WorkflowDefinitionDTO
- type WorkflowRunStore
- func (s *WorkflowRunStore) CreateRun(ctx context.Context, workflowID int64, ...) (*gen.WorkflowRun, error)
- func (s *WorkflowRunStore) CreateStepRun(ctx context.Context, runID int64, stepID, stepName, action, actionType string, ...) (*gen.WorkflowStepRun, error)
- func (s *WorkflowRunStore) GetCheckpoint(ctx context.Context, runID int64, target any) error
- func (s *WorkflowRunStore) GetIncompleteRuns(ctx context.Context) ([]*gen.WorkflowRun, error)
- func (s *WorkflowRunStore) GetRun(ctx context.Context, runID int64) (*gen.WorkflowRun, error)
- func (s *WorkflowRunStore) GetStepRunsByRunID(ctx context.Context, runID int64) ([]*gen.WorkflowStepRun, error)
- func (s *WorkflowRunStore) SaveCheckpoint(ctx context.Context, runID int64, data any) error
- func (s *WorkflowRunStore) UpdateRunHeartbeat(ctx context.Context, runID int64) error
- func (s *WorkflowRunStore) UpdateRunStatus(ctx context.Context, runID int64, status int, errMsg string) error
- func (s *WorkflowRunStore) UpdateStepRun(ctx context.Context, stepRunID int64, status int, result map[string]any, ...) error
- type WorkflowRunStoreAdapter
- func (a WorkflowRunStoreAdapter) CreateRun(ctx context.Context, workflowID int64, ...) (*model.WorkflowRun, error)
- func (a WorkflowRunStoreAdapter) CreateStepRun(ctx context.Context, runID int64, stepID, stepName, action, actionType string, ...) (*model.WorkflowStepRun, error)
- func (a WorkflowRunStoreAdapter) GetCheckpoint(ctx context.Context, runID int64, target any) error
- func (a WorkflowRunStoreAdapter) GetIncompleteRuns(ctx context.Context) ([]*model.WorkflowRun, error)
- func (a WorkflowRunStoreAdapter) GetRun(ctx context.Context, runID int64) (*model.WorkflowRun, error)
- func (a WorkflowRunStoreAdapter) SaveCheckpoint(ctx context.Context, runID int64, data any) error
- func (a WorkflowRunStoreAdapter) UpdateRunHeartbeat(ctx context.Context, runID int64) error
- func (a WorkflowRunStoreAdapter) UpdateRunStatus(ctx context.Context, runID int64, status int, errMsg string) error
- func (a WorkflowRunStoreAdapter) UpdateStepRun(ctx context.Context, stepRunID int64, status int, result map[string]any, ...) error
- type WorkflowStore
- func (s *WorkflowStore) ApplyDefinition(ctx context.Context, meta *types.WorkflowMetadata) (*gen.Workflow, error)
- func (s *WorkflowStore) DeleteDefinitionByName(ctx context.Context, name string) error
- func (s *WorkflowStore) GetDefinitionByName(ctx context.Context, name string) (*WorkflowDefinitionDTO, error)
- func (s *WorkflowStore) LatestRunStartedAtByNames(ctx context.Context, names []string) (map[string]time.Time, error)
- func (s *WorkflowStore) ListDefinitions(ctx context.Context) ([]*gen.Workflow, error)
- func (s *WorkflowStore) ListRunsByName(ctx context.Context, name string) ([]*gen.WorkflowRun, error)
- func (s *WorkflowStore) ListTriggers(ctx context.Context) ([]*gen.WorkflowTrigger, error)
- func (s *WorkflowStore) RunLatencyStatsByNames(ctx context.Context, names []string, since time.Time) (map[string]types.RunLatencyStats, error)
- func (s *WorkflowStore) SetEnabled(ctx context.Context, name string, enabled bool) (*gen.Workflow, error)
- func (s *WorkflowStore) SetTriggerEnabled(ctx context.Context, workflowName string, triggerID int64, enabled bool) (*gen.WorkflowTrigger, error)
- func (s *WorkflowStore) WorkflowStats(ctx context.Context, name string, since time.Time, groupBy string) (*types.WorkflowStats, error)
Constants ¶
const LifeLoreRequestedType = "life.inventory.lore_requested"
LifeLoreRequestedType is the Life lore outbox event type (payload["type"]).
Variables ¶
This section is empty.
Functions ¶
func ClientFromDB ¶ added in v0.99.0
ClientFromDB returns the ent client from the global Database adapter. Prefer GetDB(*gen.Client) so BDD stubs that only implement GetDB work; calling GetClient on a nil embedded Adapter panics. Fall back to GetClient otherwise.
func MaskNotifyURI ¶ added in v0.99.0
MaskNotifyURI produces a display-safe masked form of a notification URI.
func NewFunctionCatalogAdapter ¶ added in v0.99.0
func NewFunctionCatalogAdapter(s *FunctionStore) functions.Catalog
NewFunctionCatalogAdapter wraps a FunctionStore as functions.Catalog.
func NewPipelineCatalogAdapter ¶ added in v0.99.0
func NewPipelineCatalogAdapter(s *PipelineStore) pipeline.DefinitionCatalog
NewPipelineCatalogAdapter wraps a PipelineStore as pipeline.DefinitionCatalog.
func NewPipelineRunStoreAdapter ¶ added in v0.99.0
func NewPipelineRunStoreAdapter(s *PipelineStore) pipeline.RunStore
NewPipelineRunStoreAdapter wraps a PipelineStore as pipeline.RunStore.
func NewWorkflowCatalogAdapter ¶ added in v0.99.0
func NewWorkflowCatalogAdapter(s *WorkflowStore) workflow.Catalog
NewWorkflowCatalogAdapter wraps a WorkflowStore as workflow.Catalog.
func NewWorkflowRunStoreAdapter ¶ added in v0.99.0
func NewWorkflowRunStoreAdapter(s *WorkflowRunStore) workflow.WorkflowRunStore
NewWorkflowRunStoreAdapter wraps a WorkflowRunStore as workflow.WorkflowRunStore.
func ParameterIsExpired ¶ added in v0.92.0
ParameterIsExpired checks whether the given access token parameter has expired.
func RegisterAdapter ¶
func RegisterAdapter(a Adapter)
func SetQueryLimits ¶ added in v0.99.0
func SetQueryLimits(maxResults, maxMessageResults int)
SetQueryLimits updates package-level query caps (called from adapter Open).
Types ¶
type Adapter ¶
type Adapter interface {
// Open and configure the adapter
Open(storeConfig config.StoreType) error
// Close the adapter
Close() error
// IsOpen checks if the adapter is ready for use
IsOpen() bool
// GetName returns the name of the adapter
GetName() string
// Stats returns the DB connection stats object.
Stats() any
// Ping checks database connectivity and returns the round-trip latency.
Ping(ctx context.Context) (time.Duration, error)
// GetDB returns the underlying DB connection (ent client as any).
GetDB() any
// GetClient returns the ent client.
GetClient() *gen.Client
}
Adapter is the database connection facade (open/close/ping/client). Domain persistence lives on *Store types (ChatStore, AgentStore, …).
var Database Adapter
type AgentKnowledgeListFilter ¶ added in v0.98.1
type AgentKnowledgeListFilter struct {
// Q matches a substring of path or title when non-empty.
Q string
}
AgentKnowledgeListFilter filters knowledge documents for the management UI.
type AgentKnowledgeSearchParams ¶ added in v0.98.1
type AgentKnowledgeSearchParams struct {
// Query matches path, title, tags, summary, or content via case-insensitive substring.
Query string
// PathPrefix restricts results to paths with this prefix.
PathPrefix string
// Tag requires an exact tag match when non-empty.
Tag string
// Limit caps results (default 10, max 50).
Limit int
}
AgentKnowledgeSearchParams controls agent knowledge search over path, title, tags, summary, content (DB substring match), plus optional exact tag filter.
type AgentMemoryFactUpsert ¶ added in v0.98.1
type AgentMemoryFactUpsert struct {
// Scope isolates facts (interactive chat uses "default").
Scope string
// Key is the fact name within the scope.
Key string
// Value is the stored fact text.
Value string
// Pinned prefers the fact for system-prompt injection.
Pinned bool
}
AgentMemoryFactUpsert carries fields for inserting or updating one memory fact.
type AgentMemoryFactsFingerprint ¶ added in v0.98.1
type AgentMemoryFactsFingerprint struct {
// Count is the number of facts in the scope.
Count int
// MaxUpdatedAt is the newest updated_at among facts in the scope.
MaxUpdatedAt time.Time
// ContentHash digests key/value/pinned/updated_at for cache invalidation.
ContentHash string
}
AgentMemoryFactsFingerprint is a cache-busting digest for injectable facts in a scope.
type AgentMemoryInjectableParams ¶ added in v0.98.1
type AgentMemoryInjectableParams struct {
// Scope selects which memory scope to read.
Scope string
// MaxCount caps how many facts are returned (default 30).
MaxCount int
// MaxChars caps total key+value characters across returned facts (default 4000).
MaxChars int
}
AgentMemoryInjectableParams controls which facts are selected for system-prompt injection.
type AgentSessionSummaryListFilter ¶ added in v0.98.1
type AgentSessionSummaryListFilter struct {
// Scope restricts results when non-empty.
Scope string
// Status filters by pending|ready|failed when non-empty.
Status string
// Q matches title or summary via case-insensitive substring when non-empty.
Q string
}
AgentSessionSummaryListFilter filters session summaries for the management UI.
type AgentSessionSummarySearchParams ¶ added in v0.98.1
type AgentSessionSummarySearchParams struct {
// Query matches title or summary via case-insensitive substring.
Query string
// Scope restricts results when non-empty.
Scope string
// Limit caps results (default 10, max 50).
Limit int
}
AgentSessionSummarySearchParams controls session summary search.
type AgentStore ¶ added in v0.99.0
type AgentStore struct {
// contains filtered or unexported fields
}
AgentStore persists chat-agent plans, skills, knowledge, memory, and subagents.
func AgentStoreFromDB ¶ added in v0.99.0
func AgentStoreFromDB() *AgentStore
AgentStoreFromDB returns an AgentStore using the global database client.
func NewAgentStore ¶ added in v0.99.0
func NewAgentStore(client *gen.Client) *AgentStore
NewAgentStore creates an AgentStore with the given ent client.
func (*AgentStore) ClaimAgentSessionSummaryPending ¶ added in v0.99.0
func (s *AgentStore) ClaimAgentSessionSummaryPending(ctx context.Context, claimToken string) (*gen.AgentSessionSummary, error)
ClaimAgentSessionSummaryPending claims agent session summary pending.
func (*AgentStore) Client ¶ added in v0.99.0
func (s *AgentStore) Client() *gen.Client
Client returns the underlying ent client.
func (*AgentStore) CreateAgentKnowledge ¶ added in v0.99.0
func (s *AgentStore) CreateAgentKnowledge(ctx context.Context, doc *gen.AgentKnowledge) error
CreateAgentKnowledge persists a new agent knowledge.
func (*AgentStore) CreateAgentPlan ¶ added in v0.99.0
CreateAgentPlan persists a new agent plan.
func (*AgentStore) CreateAgentSkill ¶ added in v0.99.0
func (s *AgentStore) CreateAgentSkill(ctx context.Context, skill *gen.AgentSkill) error
CreateAgentSkill persists a new agent skill.
func (*AgentStore) CreateAgentSkillFile ¶ added in v0.99.0
func (s *AgentStore) CreateAgentSkillFile(ctx context.Context, file *gen.AgentSkillFile) error
CreateAgentSkillFile persists a new agent skill file.
func (*AgentStore) CreateAgentSubagent ¶ added in v0.99.0
func (s *AgentStore) CreateAgentSubagent(ctx context.Context, subagent *gen.AgentSubagent) error
CreateAgentSubagent persists a new agent subagent.
func (*AgentStore) CreateAgentSubagentTask ¶ added in v0.99.0
func (s *AgentStore) CreateAgentSubagentTask(ctx context.Context, task *gen.AgentSubagentTask) error
CreateAgentSubagentTask persists a new agent subagent task.
func (*AgentStore) DeleteAgentKnowledge ¶ added in v0.99.0
func (s *AgentStore) DeleteAgentKnowledge(ctx context.Context, id int64) error
DeleteAgentKnowledge deletes the agent knowledge.
func (*AgentStore) DeleteAgentMemoryFact ¶ added in v0.99.0
func (s *AgentStore) DeleteAgentMemoryFact(ctx context.Context, scope, key string) error
DeleteAgentMemoryFact deletes the agent memory fact.
func (*AgentStore) DeleteAgentSkill ¶ added in v0.99.0
func (s *AgentStore) DeleteAgentSkill(ctx context.Context, flag string) error
DeleteAgentSkill deletes the agent skill.
func (*AgentStore) DeleteAgentSkillFile ¶ added in v0.99.0
func (s *AgentStore) DeleteAgentSkillFile(ctx context.Context, skillFlag, path string) error
DeleteAgentSkillFile deletes the agent skill file.
func (*AgentStore) DeleteAgentSkillFilesByFlag ¶ added in v0.99.0
func (s *AgentStore) DeleteAgentSkillFilesByFlag(ctx context.Context, skillFlag string) error
DeleteAgentSkillFilesByFlag deletes the agent skill files by flag.
func (*AgentStore) DeleteAgentSubagent ¶ added in v0.99.0
func (s *AgentStore) DeleteAgentSubagent(ctx context.Context, flag string) error
DeleteAgentSubagent deletes the agent subagent.
func (*AgentStore) GetAgentKnowledgeByID ¶ added in v0.99.0
func (s *AgentStore) GetAgentKnowledgeByID(ctx context.Context, id int64) (*gen.AgentKnowledge, error)
GetAgentKnowledgeByID returns the agent knowledge with the given id.
func (*AgentStore) GetAgentKnowledgeByPath ¶ added in v0.99.0
func (s *AgentStore) GetAgentKnowledgeByPath(ctx context.Context, path string) (*gen.AgentKnowledge, error)
GetAgentKnowledgeByPath returns the agent knowledge by path.
func (*AgentStore) GetAgentMemoryFact ¶ added in v0.99.0
func (s *AgentStore) GetAgentMemoryFact(ctx context.Context, scope, key string) (*gen.AgentMemoryFact, error)
GetAgentMemoryFact returns the agent memory fact.
func (*AgentStore) GetAgentMemoryFactsFingerprint ¶ added in v0.99.0
func (s *AgentStore) GetAgentMemoryFactsFingerprint(ctx context.Context, scope string) (AgentMemoryFactsFingerprint, error)
GetAgentMemoryFactsFingerprint returns the agent memory facts fingerprint.
func (*AgentStore) GetAgentPlan ¶ added in v0.99.0
GetAgentPlan returns the agent plan.
func (*AgentStore) GetAgentPlanInSession ¶ added in v0.99.0
func (s *AgentStore) GetAgentPlanInSession(ctx context.Context, sessionID, flag string) (*gen.AgentPlan, error)
GetAgentPlanInSession returns the agent plan in session.
func (*AgentStore) GetAgentSessionSummaryBySession ¶ added in v0.99.0
func (s *AgentStore) GetAgentSessionSummaryBySession(ctx context.Context, sessionFlag string) (*gen.AgentSessionSummary, error)
GetAgentSessionSummaryBySession returns the agent session summary by session.
func (*AgentStore) GetAgentSkillByFlag ¶ added in v0.99.0
func (s *AgentStore) GetAgentSkillByFlag(ctx context.Context, flag string) (*gen.AgentSkill, error)
GetAgentSkillByFlag returns the agent skill by flag.
func (*AgentStore) GetAgentSkillByName ¶ added in v0.99.0
func (s *AgentStore) GetAgentSkillByName(ctx context.Context, name string) (*gen.AgentSkill, error)
GetAgentSkillByName returns the agent skill by name.
func (*AgentStore) GetAgentSkillFile ¶ added in v0.99.0
func (s *AgentStore) GetAgentSkillFile(ctx context.Context, skillFlag, path string) (*gen.AgentSkillFile, error)
GetAgentSkillFile returns the agent skill file.
func (*AgentStore) GetAgentSkillsMaxUpdatedAt ¶ added in v0.99.0
GetAgentSkillsMaxUpdatedAt returns the agent skills max updated at.
func (*AgentStore) GetAgentSubagentByFlag ¶ added in v0.99.0
func (s *AgentStore) GetAgentSubagentByFlag(ctx context.Context, flag string) (*gen.AgentSubagent, error)
GetAgentSubagentByFlag returns the agent subagent by flag.
func (*AgentStore) GetAgentSubagentByName ¶ added in v0.99.0
func (s *AgentStore) GetAgentSubagentByName(ctx context.Context, name string) (*gen.AgentSubagent, error)
GetAgentSubagentByName returns the agent subagent by name.
func (*AgentStore) GetAgentSubagentTask ¶ added in v0.99.0
func (s *AgentStore) GetAgentSubagentTask(ctx context.Context, id int64) (*gen.AgentSubagentTask, error)
GetAgentSubagentTask returns the agent subagent task.
func (*AgentStore) GetAgentSubagentsMaxUpdatedAt ¶ added in v0.99.0
GetAgentSubagentsMaxUpdatedAt returns the agent subagents max updated at.
func (*AgentStore) ListAgentKnowledge ¶ added in v0.99.0
func (s *AgentStore) ListAgentKnowledge(ctx context.Context, filter AgentKnowledgeListFilter) ([]*gen.AgentKnowledge, error)
ListAgentKnowledge returns agent knowledge.
func (*AgentStore) ListAgentMemoryFacts ¶ added in v0.99.0
func (s *AgentStore) ListAgentMemoryFacts(ctx context.Context, scope string) ([]*gen.AgentMemoryFact, error)
ListAgentMemoryFacts returns agent memory facts.
func (*AgentStore) ListAgentPlansBySession ¶ added in v0.99.0
func (s *AgentStore) ListAgentPlansBySession(ctx context.Context, sessionID string) ([]*gen.AgentPlan, error)
ListAgentPlansBySession returns agent plans by session.
func (*AgentStore) ListAgentSessionSummaries ¶ added in v0.99.0
func (s *AgentStore) ListAgentSessionSummaries(ctx context.Context, filter AgentSessionSummaryListFilter) ([]*gen.AgentSessionSummary, error)
ListAgentSessionSummaries returns agent session summaries.
func (*AgentStore) ListAgentSkillFiles ¶ added in v0.99.0
func (s *AgentStore) ListAgentSkillFiles(ctx context.Context, skillFlag string) ([]*gen.AgentSkillFile, error)
ListAgentSkillFiles returns agent skill files.
func (*AgentStore) ListAgentSkills ¶ added in v0.99.0
func (s *AgentStore) ListAgentSkills(ctx context.Context, enabledOnly bool) ([]*gen.AgentSkill, error)
ListAgentSkills returns agent skills.
func (*AgentStore) ListAgentSubagentTasks ¶ added in v0.99.0
func (s *AgentStore) ListAgentSubagentTasks(ctx context.Context, sessionID string, limit int) ([]*gen.AgentSubagentTask, error)
ListAgentSubagentTasks returns agent subagent tasks.
func (*AgentStore) ListAgentSubagents ¶ added in v0.99.0
func (s *AgentStore) ListAgentSubagents(ctx context.Context, enabledOnly bool) ([]*gen.AgentSubagent, error)
ListAgentSubagents returns agent subagents.
func (*AgentStore) ListAgentTodosBySession ¶ added in v0.99.0
func (s *AgentStore) ListAgentTodosBySession(ctx context.Context, sessionID string) ([]*gen.AgentTodo, error)
ListAgentTodosBySession returns agent todos by session.
func (*AgentStore) ListAgentTodosBySessions ¶ added in v0.99.0
func (s *AgentStore) ListAgentTodosBySessions(ctx context.Context, sessionIDs []string) ([]*gen.AgentTodo, error)
ListAgentTodosBySessions returns agent todos by sessions.
func (*AgentStore) ListInjectableAgentMemoryFacts ¶ added in v0.99.0
func (s *AgentStore) ListInjectableAgentMemoryFacts(ctx context.Context, params AgentMemoryInjectableParams) ([]*gen.AgentMemoryFact, error)
ListInjectableAgentMemoryFacts returns injectable agent memory facts.
func (*AgentStore) MarkAgentSessionSummaryFailed ¶ added in v0.99.0
func (s *AgentStore) MarkAgentSessionSummaryFailed(ctx context.Context, sessionFlag, claimToken, errMsg string) error
MarkAgentSessionSummaryFailed marks agent session summary failed.
func (*AgentStore) MarkAgentSessionSummaryReady ¶ added in v0.99.0
func (s *AgentStore) MarkAgentSessionSummaryReady(ctx context.Context, sessionFlag, claimToken, title, summary string) error
MarkAgentSessionSummaryReady marks agent session summary ready.
func (*AgentStore) MergeAgentTodosForSession ¶ added in v0.99.0
func (s *AgentStore) MergeAgentTodosForSession(ctx context.Context, sessionID string, items []*gen.AgentTodo) error
MergeAgentTodosForSession merges agent todos for session.
func (*AgentStore) ReplaceAgentTodosForSession ¶ added in v0.99.0
func (s *AgentStore) ReplaceAgentTodosForSession(ctx context.Context, sessionID string, items []*gen.AgentTodo) error
ReplaceAgentTodosForSession replaces agent todos for session.
func (*AgentStore) RequeueStaleAgentSessionSummaryPending ¶ added in v0.99.0
func (s *AgentStore) RequeueStaleAgentSessionSummaryPending(ctx context.Context, olderThan time.Duration) (int, error)
RequeueStaleAgentSessionSummaryPending requeues stale agent session summary pending.
func (*AgentStore) SearchAgentKnowledge ¶ added in v0.99.0
func (s *AgentStore) SearchAgentKnowledge(ctx context.Context, params AgentKnowledgeSearchParams) ([]*gen.AgentKnowledge, error)
SearchAgentKnowledge searches agent knowledge.
func (*AgentStore) SearchAgentSessionSummaries ¶ added in v0.99.0
func (s *AgentStore) SearchAgentSessionSummaries(ctx context.Context, params AgentSessionSummarySearchParams) ([]*gen.AgentSessionSummary, error)
SearchAgentSessionSummaries searches agent session summaries.
func (*AgentStore) UpdateAgentKnowledge ¶ added in v0.99.0
func (s *AgentStore) UpdateAgentKnowledge(ctx context.Context, doc *gen.AgentKnowledge) error
UpdateAgentKnowledge updates the agent knowledge.
func (*AgentStore) UpdateAgentSkill ¶ added in v0.99.0
func (s *AgentStore) UpdateAgentSkill(ctx context.Context, skill *gen.AgentSkill) error
UpdateAgentSkill updates the agent skill.
func (*AgentStore) UpdateAgentSkillFile ¶ added in v0.99.0
func (s *AgentStore) UpdateAgentSkillFile(ctx context.Context, file *gen.AgentSkillFile) error
UpdateAgentSkillFile updates the agent skill file.
func (*AgentStore) UpdateAgentSubagent ¶ added in v0.99.0
func (s *AgentStore) UpdateAgentSubagent(ctx context.Context, subagent *gen.AgentSubagent) error
UpdateAgentSubagent updates the agent subagent.
func (*AgentStore) UpdateAgentSubagentTask ¶ added in v0.99.0
func (s *AgentStore) UpdateAgentSubagentTask(ctx context.Context, task *gen.AgentSubagentTask) error
UpdateAgentSubagentTask updates the agent subagent task.
func (*AgentStore) UpsertAgentMemoryFact ¶ added in v0.99.0
func (s *AgentStore) UpsertAgentMemoryFact(ctx context.Context, fact AgentMemoryFactUpsert) (*gen.AgentMemoryFact, error)
UpsertAgentMemoryFact inserts or updates agent memory fact.
func (*AgentStore) UpsertAgentSessionSummaryPending ¶ added in v0.99.0
func (s *AgentStore) UpsertAgentSessionSummaryPending(ctx context.Context, sessionFlag, scope, title string) (*gen.AgentSessionSummary, error)
UpsertAgentSessionSummaryPending inserts or updates agent session summary pending.
type AuditStore ¶ added in v0.92.0
type AuditStore struct {
// contains filtered or unexported fields
}
func AuditStoreFromDB ¶ added in v0.99.0
func AuditStoreFromDB() *AuditStore
AuditStoreFromDB returns an AuditStore using the global database client.
func NewAuditStore ¶ added in v0.92.0
func NewAuditStore(client *gen.Client) *AuditStore
func (*AuditStore) Record ¶ added in v0.92.0
Record writes an audit entry to persistent storage. If the store or client is nil, the call is silently skipped. Audit write failures are logged and do not propagate to the caller. Sensitive fields in entry.Request are redacted before storage.
func (*AuditStore) RecordFailure ¶ added in v0.92.0
RecordFailure writes a failure audit entry with the error message.
func (*AuditStore) RecordRejected ¶ added in v0.92.0
RecordRejected writes a rejected audit entry with the reason.
func (*AuditStore) RecordSuccess ¶ added in v0.92.0
RecordSuccess writes a success audit entry.
type ChatStore ¶ added in v0.99.0
type ChatStore struct {
// contains filtered or unexported fields
}
ChatStore persists chat sessions, entries, and scheduled tasks.
func ChatStoreFromDB ¶ added in v0.99.0
func ChatStoreFromDB() *ChatStore
ChatStoreFromDB returns a ChatStore using the global database client.
func NewChatStore ¶ added in v0.99.0
NewChatStore creates a ChatStore with the given ent client.
func (*ChatStore) AppendChatSessionEntry ¶ added in v0.99.0
AppendChatSessionEntry appends a chat session entry.
func (*ChatStore) CloseChatSession ¶ added in v0.99.0
CloseChatSession closes the chat session.
func (*ChatStore) CountChatSessions ¶ added in v0.99.0
func (s *ChatStore) CountChatSessions(ctx context.Context, opts ListChatSessionsOptions) (int, error)
CountChatSessions returns the number of chat sessions.
func (*ChatStore) CreateChatScheduledTask ¶ added in v0.99.0
CreateChatScheduledTask persists a new chat scheduled task.
func (*ChatStore) CreateChatScheduledTaskRun ¶ added in v0.99.0
func (s *ChatStore) CreateChatScheduledTaskRun(ctx context.Context, run *gen.ChatScheduledTaskRun) error
CreateChatScheduledTaskRun persists a new chat scheduled task run.
func (*ChatStore) CreateChatSession ¶ added in v0.99.0
CreateChatSession persists a new chat session.
func (*ChatStore) CreateChatSessionEntry ¶ added in v0.99.0
CreateChatSessionEntry persists a new chat session entry.
func (*ChatStore) DeleteChatScheduledTask ¶ added in v0.99.0
DeleteChatScheduledTask deletes the chat scheduled task.
func (*ChatStore) FailStaleChatScheduledTaskRuns ¶ added in v0.99.0
FailStaleChatScheduledTaskRuns marks stale chat scheduled task runs.
func (*ChatStore) GetChatScheduledTask ¶ added in v0.99.0
func (s *ChatStore) GetChatScheduledTask(ctx context.Context, flag string) (*gen.ChatScheduledTask, error)
GetChatScheduledTask returns the chat scheduled task.
func (*ChatStore) GetChatScheduledTaskForUID ¶ added in v0.99.0
func (s *ChatStore) GetChatScheduledTaskForUID(ctx context.Context, flag, uid string) (*gen.ChatScheduledTask, error)
GetChatScheduledTaskForUID returns the chat scheduled task for uid.
func (*ChatStore) GetChatSession ¶ added in v0.99.0
GetChatSession returns the chat session.
func (*ChatStore) GetChatSessionEntry ¶ added in v0.99.0
func (s *ChatStore) GetChatSessionEntry(ctx context.Context, flag string) (*gen.ChatSessionEntry, error)
GetChatSessionEntry returns the chat session entry.
func (*ChatStore) GetChatSessionEntryInSession ¶ added in v0.99.0
func (s *ChatStore) GetChatSessionEntryInSession(ctx context.Context, sessionID, flag string) (*gen.ChatSessionEntry, error)
GetChatSessionEntryInSession returns the chat session entry in session.
func (*ChatStore) ListChatScheduledTaskRuns ¶ added in v0.99.0
func (s *ChatStore) ListChatScheduledTaskRuns(ctx context.Context, taskID string, limit int) ([]*gen.ChatScheduledTaskRun, error)
ListChatScheduledTaskRuns returns chat scheduled task runs.
func (*ChatStore) ListChatScheduledTasks ¶ added in v0.99.0
func (s *ChatStore) ListChatScheduledTasks(ctx context.Context, opts ListChatScheduledTasksOptions) ([]*gen.ChatScheduledTask, error)
ListChatScheduledTasks returns chat scheduled tasks.
func (*ChatStore) ListChatSessionEntries ¶ added in v0.99.0
func (s *ChatStore) ListChatSessionEntries(ctx context.Context, sessionID string) ([]*gen.ChatSessionEntry, error)
ListChatSessionEntries returns chat session entries.
func (*ChatStore) ListChatSessionEntriesBySessions ¶ added in v0.99.0
func (s *ChatStore) ListChatSessionEntriesBySessions(ctx context.Context, sessionIDs []string) ([]*gen.ChatSessionEntry, error)
ListChatSessionEntriesBySessions returns chat session entries by sessions.
func (*ChatStore) ListChatSessions ¶ added in v0.99.0
func (s *ChatStore) ListChatSessions(ctx context.Context, opts ListChatSessionsOptions) ([]*gen.ChatSession, string, error)
ListChatSessions returns chat sessions.
func (*ChatStore) UpdateChatScheduledTask ¶ added in v0.99.0
func (s *ChatStore) UpdateChatScheduledTask(ctx context.Context, flag string, params UpdateChatScheduledTaskParams) error
UpdateChatScheduledTask updates the chat scheduled task.
func (*ChatStore) UpdateChatScheduledTaskRun ¶ added in v0.99.0
func (s *ChatStore) UpdateChatScheduledTaskRun(ctx context.Context, flag string, params UpdateChatScheduledTaskRunParams) error
UpdateChatScheduledTaskRun updates the chat scheduled task run.
func (*ChatStore) UpdateChatSessionArchived ¶ added in v0.99.0
func (s *ChatStore) UpdateChatSessionArchived(ctx context.Context, flag string, archived bool) error
UpdateChatSessionArchived updates the chat session archived.
func (*ChatStore) UpdateChatSessionLeaf ¶ added in v0.99.0
UpdateChatSessionLeaf updates the chat session leaf.
func (*ChatStore) UpdateChatSessionMode ¶ added in v0.99.0
UpdateChatSessionMode updates the chat session mode.
func (*ChatStore) UpdateChatSessionPinned ¶ added in v0.99.0
UpdateChatSessionPinned updates the chat session pinned.
func (*ChatStore) UpdateChatSessionPreview ¶ added in v0.99.0
UpdateChatSessionPreview updates the chat session preview.
type ClipStore ¶ added in v0.97.0
type ClipStore struct {
// contains filtered or unexported fields
}
ClipStore persists shareable markdown clips keyed by short slugs.
func ClipStoreFromDB ¶ added in v0.99.0
func ClipStoreFromDB() *ClipStore
ClipStoreFromDB returns a ClipStore using the global database client.
func NewClipStore ¶ added in v0.97.0
NewClipStore creates a ClipStore with the given ent client.
func (*ClipStore) CreateClip ¶ added in v0.97.0
func (s *ClipStore) CreateClip(ctx context.Context, slug, title, description, content, createdBy string) error
CreateClip inserts a new clip row.
func (*ClipStore) GetClipBySlug ¶ added in v0.97.0
GetClipBySlug retrieves a clip by slug. Returns nil if not found.
type CreateAccountInput ¶ added in v0.99.0
CreateAccountInput holds fields for creating a web account and ensuring a users row.
type EventStore ¶ added in v0.92.0
type EventStore struct {
// contains filtered or unexported fields
}
func EventStoreFromDB ¶ added in v0.99.0
func EventStoreFromDB() *EventStore
EventStoreFromDB returns an EventStore using the global database client.
func NewEventStore ¶ added in v0.92.0
func NewEventStore(client *gen.Client) *EventStore
func (*EventStore) AppendDataEvent ¶ added in v0.92.0
func (*EventStore) AppendEventOutbox ¶ added in v0.92.0
func (*EventStore) CountDataEvents ¶ added in v0.92.0
func (s *EventStore) CountDataEvents(ctx context.Context, opts ListDataEventsOptions) (int64, error)
CountDataEvents returns the total number of data_events matching the given filters. Uses the same filter predicates as ListDataEvents without pagination.
func (*EventStore) DeleteDataEventsOlderThan ¶ added in v0.97.1
DeleteDataEventsOlderThan deletes data_events with created_at before cutoff and related history (pipeline step runs, pipeline runs, event consumptions, event outbox rows, and resource links that reference those events). Returns the number of deleted data_events rows.
func (*EventStore) GetDataEventByEventID ¶ added in v0.92.0
func (s *EventStore) GetDataEventByEventID(ctx context.Context, eventID string) (*gen.DataEvent, error)
GetDataEventByEventID looks up a single data event by its event_id.
func (*EventStore) GetPipelineRunsForEvents ¶ added in v0.92.0
func (s *EventStore) GetPipelineRunsForEvents(ctx context.Context, eventIDs []string) (map[string][]PipelineRunInfo, error)
GetPipelineRunsForEvents batch-looks up pipeline runs for the given event IDs. Returns a map of eventID -> []PipelineRunInfo.
func (*EventStore) ListDataEvents ¶ added in v0.92.0
func (s *EventStore) ListDataEvents(ctx context.Context, opts ListDataEventsOptions) ([]*gen.DataEvent, string, error)
ListDataEvents returns paginated data_events ordered by created_at DESC. Supports offset-based pagination (when Offset > 0) and cursor-based (backward compatible).
func (*EventStore) ListDistinctEventPipelineNames ¶ added in v0.92.0
func (s *EventStore) ListDistinctEventPipelineNames(ctx context.Context) ([]string, error)
ListDistinctEventPipelineNames returns distinct pipeline names from pipeline_runs that have matched events, ordered alphabetically.
func (*EventStore) ListDistinctEventSources ¶ added in v0.92.0
func (s *EventStore) ListDistinctEventSources(ctx context.Context, since time.Duration) ([]string, error)
ListDistinctEventSources returns unique source values from data_events created within the given duration (e.g. 30*24*time.Hour for last 30 days).
func (*EventStore) ListDistinctEventTypes ¶ added in v0.92.0
func (s *EventStore) ListDistinctEventTypes(ctx context.Context, since time.Duration) ([]string, error)
ListDistinctEventTypes returns unique event_type values from data_events created within the given duration.
func (*EventStore) ListPendingDataEventOutbox ¶ added in v0.99.0
func (s *EventStore) ListPendingDataEventOutbox(ctx context.Context, olderThan time.Time, limit int) ([]types.DataEvent, error)
ListPendingDataEventOutbox returns unpublished DataEvent outbox rows older than olderThan. Skips domain-specific outbox rows (e.g. life lore) that share the same table but lack event_type. Scans in batches so a long run of lore rows cannot starve DataEvent redelivery.
func (*EventStore) MarkOutboxPublished ¶ added in v0.92.0
func (s *EventStore) MarkOutboxPublished(ctx context.Context, eventID string) error
type FileStore ¶ added in v0.99.0
type FileStore struct {
// contains filtered or unexported fields
}
FileStore persists file upload records.
func FileStoreFromDB ¶ added in v0.99.0
func FileStoreFromDB() *FileStore
FileStoreFromDB returns a FileStore using the global database client.
func NewFileStore ¶ added in v0.99.0
NewFileStore creates a FileStore with the given ent client.
func (*FileStore) FileDeleteUnused ¶ added in v0.99.0
func (s *FileStore) FileDeleteUnused(ctx context.Context, olderThan time.Time, limit int) ([]string, error)
FileDeleteUnused delete unused a file upload.
func (*FileStore) FileFinishUpload ¶ added in v0.99.0
func (s *FileStore) FileFinishUpload(ctx context.Context, fd *types.FileDef, success bool, size int64) (*types.FileDef, error)
FileFinishUpload finish upload a file upload.
type FunctionCatalogAdapter ¶ added in v0.99.0
type FunctionCatalogAdapter struct {
S *FunctionStore
}
FunctionCatalogAdapter adapts FunctionStore to functions.Catalog (model DTOs).
func (FunctionCatalogAdapter) CompleteRun ¶ added in v0.99.0
func (a FunctionCatalogAdapter) CompleteRun(ctx context.Context, id int64, status string, durationMs int64, exitCode *int, errMsg string, resultJSON *string) (*model.FunctionRun, error)
CompleteRun implements functions.Catalog.
func (FunctionCatalogAdapter) Create ¶ added in v0.99.0
func (a FunctionCatalogAdapter) Create(ctx context.Context, name, metadata, entrypoint, source, createdBy string) error
Create implements functions.Catalog.
func (FunctionCatalogAdapter) CreateRun ¶ added in v0.99.0
func (a FunctionCatalogAdapter) CreateRun(ctx context.Context, name string, version int, idempotencyKey *string) (*model.FunctionRun, error)
CreateRun implements functions.Catalog.
func (FunctionCatalogAdapter) GetByName ¶ added in v0.99.0
func (a FunctionCatalogAdapter) GetByName(ctx context.Context, name string) (*model.FunctionDefinition, error)
GetByName implements functions.Catalog.
func (FunctionCatalogAdapter) GetLatestPublished ¶ added in v0.99.0
func (a FunctionCatalogAdapter) GetLatestPublished(ctx context.Context, name string) (*model.FunctionDefinitionVersion, error)
GetLatestPublished implements functions.Catalog.
func (FunctionCatalogAdapter) GetRunByIdempotency ¶ added in v0.99.0
func (a FunctionCatalogAdapter) GetRunByIdempotency(ctx context.Context, name, key string) (*model.FunctionRun, error)
GetRunByIdempotency implements functions.Catalog.
func (FunctionCatalogAdapter) GetVersion ¶ added in v0.99.0
func (a FunctionCatalogAdapter) GetVersion(ctx context.Context, name string, version int) (*model.FunctionDefinitionVersion, error)
GetVersion implements functions.Catalog.
func (FunctionCatalogAdapter) ListAll ¶ added in v0.99.0
func (a FunctionCatalogAdapter) ListAll(ctx context.Context) ([]*model.FunctionDefinition, error)
ListAll implements functions.Catalog.
func (FunctionCatalogAdapter) ListPublished ¶ added in v0.99.0
func (a FunctionCatalogAdapter) ListPublished(ctx context.Context) ([]*model.FunctionDefinition, error)
ListPublished implements functions.Catalog.
func (FunctionCatalogAdapter) ListRuns ¶ added in v0.99.0
func (a FunctionCatalogAdapter) ListRuns(ctx context.Context, name string) ([]*model.FunctionRun, error)
ListRuns implements functions.Catalog.
func (FunctionCatalogAdapter) Publish ¶ added in v0.99.0
func (a FunctionCatalogAdapter) Publish(ctx context.Context, name string, version int) (*model.FunctionDefinition, error)
Publish implements functions.Catalog.
func (FunctionCatalogAdapter) UpdateDraft ¶ added in v0.99.0
func (a FunctionCatalogAdapter) UpdateDraft(ctx context.Context, name, metadata, entrypoint, source string, version int) (*model.FunctionDefinition, error)
UpdateDraft implements functions.Catalog.
type FunctionStore ¶ added in v0.99.0
type FunctionStore struct {
// contains filtered or unexported fields
}
FunctionStore persists named function definitions, published versions, and runs.
func FunctionStoreFromDB ¶ added in v0.99.0
func FunctionStoreFromDB() *FunctionStore
FunctionStoreFromDB returns a FunctionStore using the global database client.
func NewFunctionStore ¶ added in v0.99.0
func NewFunctionStore(client *gen.Client) *FunctionStore
NewFunctionStore returns a FunctionStore backed by the given ent client.
func (*FunctionStore) Create ¶ added in v0.99.0
func (s *FunctionStore) Create(ctx context.Context, name, metadata, entrypoint, source, createdBy string) error
Create creates a new function definition in draft status at version 1 with draft fields set. createdBy is the Web UI user UID that created the function (may be empty in tests).
func (*FunctionStore) CreateDefinition ¶ added in v0.99.0
func (s *FunctionStore) CreateDefinition(ctx context.Context, name, createdBy string) error
CreateDefinition creates an empty draft definition (tests / callers that fill draft later).
func (*FunctionStore) CreateRun ¶ added in v0.99.0
func (s *FunctionStore) CreateRun(ctx context.Context, functionName string, version int, status, idempotencyKey string) (*gen.FunctionRun, error)
CreateRun inserts a new function run. Empty idempotencyKey is stored as NULL so empty keys do not collide.
func (*FunctionStore) DeleteDefinitionByName ¶ added in v0.99.0
DeleteDefinitionByName removes a function definition, its version snapshots, and runs. Returns the number of runs deleted.
func (*FunctionStore) FunctionStats ¶ added in v0.99.0
func (s *FunctionStore) FunctionStats(ctx context.Context, name string, since time.Time, groupBy string) (*types.FunctionStats, error)
FunctionStats returns aggregated function run statistics for chart rendering. name empty = all functions. since zero = no time filter. groupBy = "day"|"week"|"month".
func (*FunctionStore) GetDefinitionByName ¶ added in v0.99.0
func (s *FunctionStore) GetDefinitionByName(ctx context.Context, name string) (*gen.FunctionDefinition, error)
GetDefinitionByName returns a function definition by name.
func (*FunctionStore) GetLatestPublished ¶ added in v0.99.0
func (s *FunctionStore) GetLatestPublished(ctx context.Context, name string) (*gen.FunctionDefinitionVersion, error)
GetLatestPublished returns the newest published version snapshot for a function name.
func (*FunctionStore) GetPublishedVersion ¶ added in v0.99.0
func (s *FunctionStore) GetPublishedVersion(ctx context.Context, name string, version int) (*gen.FunctionDefinitionVersion, error)
GetPublishedVersion returns a published version snapshot by function name and version number.
func (*FunctionStore) GetRunByIdempotencyKey ¶ added in v0.99.0
func (s *FunctionStore) GetRunByIdempotencyKey(ctx context.Context, functionName, idempotencyKey string) (*gen.FunctionRun, error)
GetRunByIdempotencyKey returns a run for the given function name and non-empty idempotency key.
func (*FunctionStore) ListAllDefinitions ¶ added in v0.99.0
func (s *FunctionStore) ListAllDefinitions(ctx context.Context) ([]*gen.FunctionDefinition, error)
ListAllDefinitions returns all function definitions ordered by name.
func (*FunctionStore) ListPublishedDefinitions ¶ added in v0.99.0
func (s *FunctionStore) ListPublishedDefinitions(ctx context.Context) ([]*gen.FunctionDefinition, error)
ListPublishedDefinitions returns published function definitions ordered by name.
func (*FunctionStore) ListRunsByName ¶ added in v0.99.0
func (s *FunctionStore) ListRunsByName(ctx context.Context, functionName string) ([]*gen.FunctionRun, error)
ListRunsByName returns recent runs for a function name, newest first.
func (*FunctionStore) PublishDefinition ¶ added in v0.99.0
func (s *FunctionStore) PublishDefinition(ctx context.Context, name string, version int) (*gen.FunctionDefinition, error)
PublishDefinition copies draft fields to published with optimistic locking and inserts a version snapshot.
func (*FunctionStore) UpdateDefinitionDraft ¶ added in v0.99.0
func (s *FunctionStore) UpdateDefinitionDraft(ctx context.Context, name, metadata, entrypoint, source string, expectedVersion int) (*gen.FunctionDefinition, error)
UpdateDefinitionDraft updates draft metadata/entrypoint/source with optimistic locking. Uses conditional UPDATE WHERE version=expectedVersion. Returns ErrConflict if no row matched.
func (*FunctionStore) UpdateRun ¶ added in v0.99.0
func (s *FunctionStore) UpdateRun(ctx context.Context, runID int64, status string, durationMs int64, exitCode *int, errMsg string, resultJSON *string) (*gen.FunctionRun, error)
UpdateRun updates status and result fields for an existing function run.
type GatewayStore ¶ added in v0.99.0
type GatewayStore struct {
// contains filtered or unexported fields
}
GatewayStore persists local-CLI gateway jobs and worker heartbeats.
func GatewayStoreFromDB ¶ added in v0.99.0
func GatewayStoreFromDB() *GatewayStore
GatewayStoreFromDB returns a GatewayStore using the global database client.
func NewGatewayStore ¶ added in v0.99.0
func NewGatewayStore(client *gen.Client) *GatewayStore
NewGatewayStore creates a GatewayStore with the given ent client.
func (*GatewayStore) Cancel ¶ added in v0.99.0
func (s *GatewayStore) Cancel(ctx context.Context, jobID string) (*types.GatewayJob, error)
Cancel marks a non-terminal job as canceled.
func (*GatewayStore) Claim ¶ added in v0.99.0
func (s *GatewayStore) Claim(ctx context.Context, workerID string, leaseTTL time.Duration) (*types.GatewayJob, error)
Claim atomically takes the oldest pending job for workerID with a lease.
func (*GatewayStore) Complete ¶ added in v0.99.0
func (s *GatewayStore) Complete(ctx context.Context, jobID string, in types.GatewayCompleteRequest, maxOutputBytes int) (*types.GatewayJob, error)
Complete writes a terminal result for a running (or already canceled) job.
func (*GatewayStore) Create ¶ added in v0.99.0
func (s *GatewayStore) Create(ctx context.Context, in types.GatewayCreateJob) (*types.GatewayJob, error)
Create inserts a pending gateway job and returns its view.
func (*GatewayStore) Get ¶ added in v0.99.0
func (s *GatewayStore) Get(ctx context.Context, jobID string) (*types.GatewayJob, error)
Get returns a job by job_id, or nil when not found.
func (*GatewayStore) HasFreshWorker ¶ added in v0.99.0
HasFreshWorker reports whether any worker heartbeated within staleAfter.
func (*GatewayStore) ReclaimExpired ¶ added in v0.99.0
func (s *GatewayStore) ReclaimExpired(ctx context.Context) error
ReclaimExpired returns running jobs with expired leases to pending for re-claim.
func (*GatewayStore) TouchWorker ¶ added in v0.99.0
func (s *GatewayStore) TouchWorker(ctx context.Context, workerID string) error
TouchWorker upserts worker last-seen and optionally renews a running job lease.
func (*GatewayStore) TouchWorkerLease ¶ added in v0.99.0
func (s *GatewayStore) TouchWorkerLease(ctx context.Context, workerID, jobID string, leaseTTL time.Duration) error
TouchWorkerLease updates worker last-seen and renews lease for jobID when set.
type HubStore ¶ added in v0.92.0
type HubStore struct {
// contains filtered or unexported fields
}
HubStore persists homelab discovery data to the database.
func NewHubStore ¶ added in v0.92.0
NewHubStore returns a HubStore backed by the given Ent client.
func (*HubStore) ListApps ¶ added in v0.92.0
ListApps returns all apps from the database with Name and UpdatedAt. When the client is nil, returns nil (safe for no-DB environments).
func (*HubStore) SaveHomelabApps ¶ added in v0.92.0
SaveHomelabApps upserts a batch of discovered homelab apps. Existing rows are loaded once by name, new rows use CreateBulk, and updates run in one transaction. Duplicate names in the input keep the last occurrence.
type LLMUsageStore ¶ added in v0.95.0
type LLMUsageStore struct {
// contains filtered or unexported fields
}
func NewLLMUsageStore ¶ added in v0.95.0
func NewLLMUsageStore(client *gen.Client) *LLMUsageStore
NewLLMUsageStore returns a store backed by the given ent client.
func NewLLMUsageStoreFromDatabase ¶ added in v0.95.0
func NewLLMUsageStoreFromDatabase() *LLMUsageStore
NewLLMUsageStoreFromDatabase returns a store using the global database client.
func (*LLMUsageStore) RecordLLMUsage ¶ added in v0.95.0
func (s *LLMUsageStore) RecordLLMUsage(ctx context.Context, record *types.LLMUsageRecordInput) error
RecordLLMUsage inserts one LLM usage row.
func (*LLMUsageStore) TokenUsageStats ¶ added in v0.95.0
func (s *LLMUsageStore) TokenUsageStats(ctx context.Context, uid string, since, until time.Time, groupBy string) (*types.TokenUsageStats, error)
TokenUsageStats aggregates usage for charts filtered by user and time range.
type LifeAchievementUpsert ¶ added in v0.99.0
type LifeAchievementUpsert struct {
Flag string
Name string
Description string
Active bool
Kind string
QuestType string
Difficulty string
Threshold int
SortOrder int
}
LifeAchievementUpsert is the seed write shape for one catalog achievement.
type LifeAdjudicationInput ¶ added in v0.99.0
type LifeAdjudicationInput struct {
ProfileID int64
QuestID int64
Status string
Verdict string
Reason string
SuggestedExp int
SuggestedGold int
SuggestedNextSteps []string
EvidenceSnapshot []map[string]any
}
LifeAdjudicationInput is the write shape for a suggested quest ruling.
type LifeCompleteOccurrenceInput ¶ added in v0.99.0
type LifeCompleteOccurrenceInput struct {
OccurrenceID int64
ProfileID int64
PlanNodeID int64
Summary string
GainedExp int
GainedGold int
SkillID int64
CharID int64
SkillLevel int
SkillExp int64
CharLevel int
CharExp int64
ProfLevel int
ProfExp int64
ProfGold int
}
LifeCompleteOccurrenceInput is the transaction write shape for one completed occurrence.
type LifeCompletePersist ¶ added in v0.99.0
type LifeCompletePersist struct {
ProfileID int64
QuestID int64
SkillID int64
CharID int64
SkillLevel int
SkillExp int64
CharLevel int
CharExp int64
ProfLevel int
ProfExp int64
ProfGold int
Pity map[string]int
RustInvIDs []int64
DropEquipID int64 // 0 = no drop; set by ResolveLootInTx when enabled
DropQuestID int64
LoreStatus string
NeedLore bool
ActionExp int
ActionGold int
Dice float64
QuestType string
Difficulty string
// DailyRespawn clones a pending Daily quest after completion when non-nil.
DailyRespawn *gen.LifeQuest
// ResolveLootInTx rolls loot from the live profile pity inside the completion transaction.
ResolveLootInTx bool
DropTier string
LootBaseChance float64
LootPool []string
ProfileBonus float64
EquippedDropRate float64
}
LifeCompletePersist is the write-set for an atomic quest completion.
type LifeCompleteResult ¶ added in v0.99.0
type LifeCompleteResult struct {
Inventory *gen.LifeInventory
Equipment *gen.LifeEquipment
NewlyUnlocked []*gen.LifeAchievement
Dice float64
Loot pkglife.LootResult
}
LifeCompleteResult is returned from PersistCompleteQuest.
type LifeCreateOccurrenceInput ¶ added in v0.99.0
type LifeCreateOccurrenceInput struct {
ProfileID int64
PlanNodeID int64
Kind string
State string
DueAt time.Time
CadenceSnapshot string
SourceOccurrenceID *int64
}
LifeCreateOccurrenceInput is the write shape for creating one action occurrence.
type LifeCreatePlanNodeInput ¶ added in v0.99.0
type LifeCreatePlanNodeInput struct {
ProfileID int64
ParentID *int64
NodeType string
Title string
Description string
Status string
SortOrder int
ActionSpec *LifePlanActionSpecInput
DependencyPlanNodeIDs []int64
}
LifeCreatePlanNodeInput is the write shape for creating one plan node.
type LifeEvidenceInput ¶ added in v0.99.0
type LifeEvidenceInput struct {
ProfileID int64
QuestID *int64
SourceType string
Content string
SourceURL string
Summary string
}
LifeEvidenceInput is the write shape for quest evidence.
type LifeHabitCheckinInput ¶ added in v0.99.0
type LifeHabitCheckinInput struct {
ProfileID int64
PlanNodeID int64
CheckinAt time.Time
Status string
Note string
Summary string
}
LifeHabitCheckinInput is the write shape for a habit check-in.
type LifePlanActionSpecInput ¶ added in v0.99.0
type LifePlanActionSpecInput struct {
TaskType string
TrackingMode string
IsRepeatable bool
RepeatTrigger string
SuggestedCadence string
IsIdentityBuilding bool
Reason string
NeedsUserConfirmation bool
Difficulty string
BaseExpReward int
BaseGoldReward int
ConfirmedAt *time.Time
}
LifePlanActionSpecInput is the write shape for action metadata.
type LifeRewardCreate ¶ added in v0.99.0
LifeRewardCreate is the write-set for inserting a player reward.
type LifeSkipOccurrenceInput ¶ added in v0.99.0
LifeSkipOccurrenceInput is the write shape for skipping one occurrence.
type LifeStore ¶ added in v0.99.0
type LifeStore struct {
// contains filtered or unexported fields
}
LifeStore persists Life domain entities.
func LifeStoreFromDB ¶ added in v0.99.0
func LifeStoreFromDB() *LifeStore
LifeStoreFromDB returns a LifeStore using the global database client.
func NewLifeStore ¶ added in v0.99.0
NewLifeStore creates a LifeStore with the given ent client.
func (*LifeStore) AppendLoreOutbox ¶ added in v0.99.0
func (s *LifeStore) AppendLoreOutbox(ctx context.Context, profileID, inventoryID int64) (string, error)
AppendLoreOutbox writes an unpublished outbox row for lore generation.
func (*LifeStore) ClearGoalAreaRefs ¶ added in v0.99.0
ClearGoalAreaRefs clears area_id on goals that point at the given Area goal id.
func (*LifeStore) Client ¶ added in v0.99.0
Client returns the underlying ent client for transactional use-cases.
func (*LifeStore) CompleteActionOccurrence ¶ added in v0.99.0
func (s *LifeStore) CompleteActionOccurrence(ctx context.Context, in LifeCompleteOccurrenceInput) error
CompleteActionOccurrence completes one occurrence and writes an action log.
func (*LifeStore) ConfirmHabitAction ¶ added in v0.99.0
func (s *LifeStore) ConfirmHabitAction(ctx context.Context, planNodeID int64) (*gen.LifeActionSpec, error)
ConfirmHabitAction promotes a habit candidate to a confirmed habit.
func (*LifeStore) CreateActionLog ¶ added in v0.99.0
func (s *LifeStore) CreateActionLog(ctx context.Context, profileID, questID int64, exp, gold int, invID *int64, dice *float64) (*gen.LifeActionLog, error)
CreateActionLog inserts an action log row.
func (*LifeStore) CreateActionOccurrence ¶ added in v0.99.0
func (s *LifeStore) CreateActionOccurrence(ctx context.Context, in LifeCreateOccurrenceInput) (*gen.LifeActionOccurrence, error)
CreateActionOccurrence inserts one occurrence row.
func (*LifeStore) CreateAdjudication ¶ added in v0.99.0
func (s *LifeStore) CreateAdjudication(ctx context.Context, in LifeAdjudicationInput) (*gen.LifeAdjudication, error)
CreateAdjudication inserts one suggested quest ruling.
func (*LifeStore) CreateCharacteristic ¶ added in v0.99.0
func (s *LifeStore) CreateCharacteristic(ctx context.Context, profileID int64, code, name string) (*gen.LifeCharacteristic, error)
CreateCharacteristic inserts a characteristic row.
func (*LifeStore) CreateEvidence ¶ added in v0.99.0
func (s *LifeStore) CreateEvidence(ctx context.Context, in LifeEvidenceInput) (*gen.LifeEvidence, error)
CreateEvidence inserts one quest evidence row.
func (*LifeStore) CreateGoal ¶ added in v0.99.0
func (s *LifeStore) CreateGoal(ctx context.Context, profileID int64, title, category string, areaID *int64) (*gen.LifeGoal, error)
CreateGoal inserts an active PARA goal. areaID is optional parent Area for Project/Resource.
func (*LifeStore) CreateInventory ¶ added in v0.99.0
func (s *LifeStore) CreateInventory(ctx context.Context, profileID, equipmentID int64, questID *int64, loreStatus string) (*gen.LifeInventory, error)
CreateInventory inserts an inventory instance.
func (*LifeStore) CreatePlanNode ¶ added in v0.99.0
func (s *LifeStore) CreatePlanNode(ctx context.Context, in LifeCreatePlanNodeInput) (*gen.LifePlanNode, *gen.LifeActionSpec, error)
CreatePlanNode inserts one life plan node and its action spec when needed.
func (*LifeStore) CreateProfile ¶ added in v0.99.0
func (s *LifeStore) CreateProfile(ctx context.Context, userID, nickname, classType string) (*gen.LifeProfile, error)
CreateProfile inserts a new life profile.
func (*LifeStore) CreateQuest ¶ added in v0.99.0
CreateQuest inserts a quest.
func (*LifeStore) CreateReward ¶ added in v0.99.0
func (s *LifeStore) CreateReward(ctx context.Context, profileID int64, in LifeRewardCreate) (*gen.LifeReward, error)
CreateReward inserts an active player-defined reward.
func (*LifeStore) CreateRewardRedemption ¶ added in v0.99.0
func (s *LifeStore) CreateRewardRedemption(ctx context.Context, profileID, rewardID int64, rewardName string, pricePaid int, at time.Time) (*gen.LifeRewardRedemption, error)
CreateRewardRedemption inserts one redemption audit row with price/name snapshots.
func (*LifeStore) CreateSkill ¶ added in v0.99.0
func (s *LifeStore) CreateSkill(ctx context.Context, profileID, characteristicID int64, name string, ratio float64) (*gen.LifeSkill, error)
CreateSkill inserts a skill.
func (*LifeStore) DeactivateAchievementsNotInFlags ¶ added in v0.99.0
DeactivateAchievementsNotInFlags sets active=false for catalog rows whose flag is not listed.
func (*LifeStore) DeleteGoal ¶ added in v0.99.0
DeleteGoal removes a goal row.
func (*LifeStore) DeletePlanNode ¶ added in v0.99.0
DeletePlanNode removes one plan node and its descendants.
func (*LifeStore) EnsureAIContext ¶ added in v0.99.0
EnsureAIContext creates AI context if missing.
func (*LifeStore) EnsureEquippedSlots ¶ added in v0.99.0
func (s *LifeStore) EnsureEquippedSlots(ctx context.Context, profileID int64) (*gen.LifeEquippedSlots, error)
EnsureEquippedSlots creates empty slots row if missing.
func (*LifeStore) EnsureRecurringOccurrences ¶ added in v0.99.0
func (s *LifeStore) EnsureRecurringOccurrences(ctx context.Context, profileID int64, now time.Time) error
EnsureRecurringOccurrences lazily creates due daily/weekly occurrences.
func (*LifeStore) EnsureTodoOccurrence ¶ added in v0.99.0
func (s *LifeStore) EnsureTodoOccurrence(ctx context.Context, profileID, planNodeID int64) (*gen.LifeActionOccurrence, error)
EnsureTodoOccurrence creates a pending one-time occurrence if missing.
func (*LifeStore) GetAIContext ¶ added in v0.99.0
GetAIContext returns the AI context row for a profile.
func (*LifeStore) GetActionOccurrenceByFlag ¶ added in v0.99.0
func (s *LifeStore) GetActionOccurrenceByFlag(ctx context.Context, profileID int64, flag string) (*gen.LifeActionOccurrence, error)
GetActionOccurrenceByFlag returns one occurrence by flag scoped to profile.
func (*LifeStore) GetActionSpecByPlanNodeID ¶ added in v0.99.0
func (s *LifeStore) GetActionSpecByPlanNodeID(ctx context.Context, planNodeID int64) (*gen.LifeActionSpec, error)
GetActionSpecByPlanNodeID returns one action spec by plan node id.
func (*LifeStore) GetAdjudicationByFlag ¶ added in v0.99.0
func (s *LifeStore) GetAdjudicationByFlag(ctx context.Context, profileID int64, flag string) (*gen.LifeAdjudication, error)
GetAdjudicationByFlag returns a quest ruling by flag scoped to profile.
func (*LifeStore) GetCharacteristic ¶ added in v0.99.0
func (s *LifeStore) GetCharacteristic(ctx context.Context, id int64) (*gen.LifeCharacteristic, error)
GetCharacteristic returns one characteristic by id.
func (*LifeStore) GetEquipment ¶ added in v0.99.0
GetEquipment returns equipment by id.
func (*LifeStore) GetEquipmentByFlag ¶ added in v0.99.0
func (s *LifeStore) GetEquipmentByFlag(ctx context.Context, flag string) (*gen.LifeEquipment, error)
GetEquipmentByFlag returns equipment by flag.
func (*LifeStore) GetEquippedSlots ¶ added in v0.99.0
func (s *LifeStore) GetEquippedSlots(ctx context.Context, profileID int64) (*gen.LifeEquippedSlots, error)
GetEquippedSlots returns equipped slots for a profile.
func (*LifeStore) GetGoalByFlag ¶ added in v0.99.0
func (s *LifeStore) GetGoalByFlag(ctx context.Context, profileID int64, flag string) (*gen.LifeGoal, error)
GetGoalByFlag returns a goal by flag for a profile.
func (*LifeStore) GetInventory ¶ added in v0.99.0
GetInventory returns inventory by id.
func (*LifeStore) GetInventoryByFlag ¶ added in v0.99.0
func (s *LifeStore) GetInventoryByFlag(ctx context.Context, profileID int64, flag string) (*gen.LifeInventory, error)
GetInventoryByFlag returns inventory by flag scoped to profile.
func (*LifeStore) GetLatestAdjudicationByQuest ¶ added in v0.99.0
func (s *LifeStore) GetLatestAdjudicationByQuest(ctx context.Context, profileID, questID int64) (*gen.LifeAdjudication, error)
GetLatestAdjudicationByQuest returns the newest ruling for one quest.
func (*LifeStore) GetLootTable ¶ added in v0.99.0
GetLootTable returns loot table by tier.
func (*LifeStore) GetPlanNode ¶ added in v0.99.0
GetPlanNode fetches a plan node by id.
func (*LifeStore) GetPlanNodeByFlag ¶ added in v0.99.0
func (s *LifeStore) GetPlanNodeByFlag(ctx context.Context, profileID int64, flag string) (*gen.LifePlanNode, error)
GetPlanNodeByFlag returns one plan node scoped to profile.
func (*LifeStore) GetProfileByID ¶ added in v0.99.0
GetProfileByID returns a profile by primary key.
func (*LifeStore) GetProfileByUserID ¶ added in v0.99.0
func (s *LifeStore) GetProfileByUserID(ctx context.Context, userID string) (*gen.LifeProfile, error)
GetProfileByUserID returns the life profile for a platform user id.
func (*LifeStore) GetQuestByFlag ¶ added in v0.99.0
func (s *LifeStore) GetQuestByFlag(ctx context.Context, profileID int64, flag string) (*gen.LifeQuest, error)
GetQuestByFlag returns a quest by flag scoped to profile.
func (*LifeStore) GetRewardByFlag ¶ added in v0.99.0
func (s *LifeStore) GetRewardByFlag(ctx context.Context, profileID int64, flag string) (*gen.LifeReward, error)
GetRewardByFlag returns a reward by flag for a profile.
func (*LifeStore) GetSkillByName ¶ added in v0.99.0
func (s *LifeStore) GetSkillByName(ctx context.Context, profileID int64, name string) (*gen.LifeSkill, error)
GetSkillByName returns a skill by profile + name.
func (*LifeStore) ListAchievementProgress ¶ added in v0.99.0
func (s *LifeStore) ListAchievementProgress(ctx context.Context, profileID int64) ([]*gen.LifeAchievementProgress, error)
ListAchievementProgress returns progress rows for a profile.
func (*LifeStore) ListAchievementUnlocks ¶ added in v0.99.0
func (s *LifeStore) ListAchievementUnlocks(ctx context.Context, profileID int64) ([]*gen.LifeAchievementUnlock, error)
ListAchievementUnlocks returns unlock rows for a profile.
func (*LifeStore) ListAchievementUnlocksInRange ¶ added in v0.99.0
func (s *LifeStore) ListAchievementUnlocksInRange(ctx context.Context, profileID int64, since, until time.Time) ([]*gen.LifeAchievementUnlock, error)
ListAchievementUnlocksInRange returns unlocks with unlocked_at in [since, until).
func (*LifeStore) ListAchievements ¶ added in v0.99.0
ListAchievements returns the achievement catalog ordered by sort_order.
func (*LifeStore) ListActionLogs ¶ added in v0.99.0
func (s *LifeStore) ListActionLogs(ctx context.Context, profileID int64, limit int) ([]*gen.LifeActionLog, error)
ListActionLogs returns recent action logs.
func (*LifeStore) ListActionLogsInRange ¶ added in v0.99.0
func (s *LifeStore) ListActionLogsInRange(ctx context.Context, profileID int64, since, until time.Time) ([]*gen.LifeActionLog, error)
ListActionLogsInRange returns action logs with created_at in [since, until).
func (*LifeStore) ListActionLogsPage ¶ added in v0.99.0
func (s *LifeStore) ListActionLogsPage(ctx context.Context, profileID int64, limit, offset int) ([]*gen.LifeActionLog, int, error)
ListActionLogsPage returns a page of action logs and the total count. A non-positive limit returns all matching rows (offset ignored).
func (*LifeStore) ListActionOccurrences ¶ added in v0.99.0
func (s *LifeStore) ListActionOccurrences(ctx context.Context, profileID int64, state string) ([]*gen.LifeActionOccurrence, error)
ListActionOccurrences returns occurrences for a profile, optional state filter.
func (*LifeStore) ListActionSpecs ¶ added in v0.99.0
func (s *LifeStore) ListActionSpecs(ctx context.Context, profileID int64) ([]*gen.LifeActionSpec, error)
ListActionSpecs returns all action specs keyed by plan node id.
func (*LifeStore) ListCharacteristics ¶ added in v0.99.0
func (s *LifeStore) ListCharacteristics(ctx context.Context, profileID int64) ([]*gen.LifeCharacteristic, error)
ListCharacteristics returns characteristics for a profile.
func (*LifeStore) ListEvidenceByQuest ¶ added in v0.99.0
func (s *LifeStore) ListEvidenceByQuest(ctx context.Context, profileID, questID int64) ([]*gen.LifeEvidence, error)
ListEvidenceByQuest returns recent evidence rows for one quest.
func (*LifeStore) ListEvidenceByQuestIDs ¶ added in v0.99.0
func (s *LifeStore) ListEvidenceByQuestIDs(ctx context.Context, profileID int64, questIDs []int64) ([]*gen.LifeEvidence, error)
ListEvidenceByQuestIDs returns evidence for many quests, newest first overall. Callers group by QuestID.
func (*LifeStore) ListGoals ¶ added in v0.99.0
func (s *LifeStore) ListGoals(ctx context.Context, profileID int64, status string) ([]*gen.LifeGoal, error)
ListGoals returns goals for a profile, optional status filter.
func (*LifeStore) ListHabitCheckins ¶ added in v0.99.0
func (s *LifeStore) ListHabitCheckins(ctx context.Context, profileID, planNodeID int64, from, to time.Time) ([]*gen.LifeHabitCheckin, error)
ListHabitCheckins returns habit checkins for a node in a time window.
func (*LifeStore) ListInventory ¶ added in v0.99.0
func (s *LifeStore) ListInventory(ctx context.Context, profileID int64) ([]*gen.LifeInventory, error)
ListInventory lists inventory for a profile.
func (*LifeStore) ListInventoryPage ¶ added in v0.99.0
func (s *LifeStore) ListInventoryPage(ctx context.Context, profileID int64, limit, offset int) ([]*gen.LifeInventory, int, error)
ListInventoryPage returns a page of inventory rows and the total count. A non-positive limit returns all matching rows (offset ignored).
func (*LifeStore) ListPendingLoreOutbox ¶ added in v0.99.0
func (s *LifeStore) ListPendingLoreOutbox(ctx context.Context, limit int) ([]*gen.EventOutbox, error)
ListPendingLoreOutbox returns unpublished lore outbox rows.
func (*LifeStore) ListPlanNodes ¶ added in v0.99.0
func (s *LifeStore) ListPlanNodes(ctx context.Context, profileID int64) ([]*gen.LifePlanNode, error)
ListPlanNodes returns plan nodes for one profile in stable tree order.
func (*LifeStore) ListQuests ¶ added in v0.99.0
func (s *LifeStore) ListQuests(ctx context.Context, profileID int64, status string) ([]*gen.LifeQuest, error)
ListQuests lists quests for a profile, optional status filter.
func (*LifeStore) ListQuestsByIDs ¶ added in v0.99.0
func (s *LifeStore) ListQuestsByIDs(ctx context.Context, profileID int64, ids []int64) ([]*gen.LifeQuest, error)
ListQuestsByIDs returns quests for the given ids scoped to a profile.
func (*LifeStore) ListQuestsCompletedInRange ¶ added in v0.99.0
func (s *LifeStore) ListQuestsCompletedInRange(ctx context.Context, profileID int64, since, until time.Time) ([]*gen.LifeQuest, error)
ListQuestsCompletedInRange returns Completed quests with completed_at in [since, until).
func (*LifeStore) ListQuestsPage ¶ added in v0.99.0
func (s *LifeStore) ListQuestsPage(ctx context.Context, profileID int64, status string, limit, offset int) ([]*gen.LifeQuest, int, error)
ListQuestsPage returns a page of quests and the total matching count. Completed quests are ordered by completed_at descending; others by created_at descending. A non-positive limit returns all matching rows (offset ignored).
func (*LifeStore) ListRecurringActionSpecs ¶ added in v0.99.0
func (s *LifeStore) ListRecurringActionSpecs(ctx context.Context, profileID int64) ([]*gen.LifeActionSpec, map[int64]*gen.LifePlanNode, error)
ListRecurringActionSpecs returns active recurring specs and their nodes.
func (*LifeStore) ListRewardRedemptions ¶ added in v0.99.0
func (s *LifeStore) ListRewardRedemptions(ctx context.Context, profileID int64, limit int) ([]*gen.LifeRewardRedemption, error)
ListRewardRedemptions returns recent redemptions newest first.
func (*LifeStore) ListRewardRedemptionsInRange ¶ added in v0.99.0
func (s *LifeStore) ListRewardRedemptionsInRange(ctx context.Context, profileID int64, since, until time.Time) ([]*gen.LifeRewardRedemption, error)
ListRewardRedemptionsInRange returns redemptions with redeemed_at in [since, until).
func (*LifeStore) ListRewardRedemptionsPage ¶ added in v0.99.0
func (s *LifeStore) ListRewardRedemptionsPage(ctx context.Context, profileID int64, limit, offset int) ([]*gen.LifeRewardRedemption, int, error)
ListRewardRedemptionsPage returns a page of redemptions and the total count. A non-positive limit returns all matching rows (offset ignored).
func (*LifeStore) ListRewards ¶ added in v0.99.0
func (s *LifeStore) ListRewards(ctx context.Context, profileID int64, activeOnly *bool) ([]*gen.LifeReward, error)
ListRewards lists rewards for a profile, newest first. When activeOnly is non-nil, filters by active status.
func (*LifeStore) ListRewardsPage ¶ added in v0.99.0
func (s *LifeStore) ListRewardsPage(ctx context.Context, profileID int64, activeOnly *bool, limit, offset int) ([]*gen.LifeReward, int, error)
ListRewardsPage returns a page of rewards and the total matching count. A non-positive limit returns all matching rows (offset ignored).
func (*LifeStore) ListSkills ¶ added in v0.99.0
ListSkills returns skills for a profile.
func (*LifeStore) MapEquipmentByIDs ¶ added in v0.99.0
func (s *LifeStore) MapEquipmentByIDs(ctx context.Context, ids []int64) (map[int64]*gen.LifeEquipment, error)
MapEquipmentByIDs returns equipment templates keyed by id.
func (*LifeStore) MapInventoryByIDs ¶ added in v0.99.0
func (s *LifeStore) MapInventoryByIDs(ctx context.Context, ids []int64) (map[int64]*gen.LifeInventory, error)
MapInventoryByIDs returns inventory rows keyed by id.
func (*LifeStore) MapLatestAdjudicationsByQuestIDs ¶ added in v0.99.0
func (s *LifeStore) MapLatestAdjudicationsByQuestIDs(ctx context.Context, profileID int64, questIDs []int64) (map[int64]*gen.LifeAdjudication, error)
MapLatestAdjudicationsByQuestIDs returns the newest ruling per quest id.
func (*LifeStore) MapLootTablesByTiers ¶ added in v0.99.0
func (s *LifeStore) MapLootTablesByTiers(ctx context.Context, tiers []string) (map[string]*gen.LifeLootTable, error)
MapLootTablesByTiers returns loot tables keyed by drop tier.
func (*LifeStore) MarkAdjudicationApplied ¶ added in v0.99.0
MarkAdjudicationApplied records that the ruling was accepted.
func (*LifeStore) MarkOutboxPublished ¶ added in v0.99.0
MarkOutboxPublished marks an outbox event published.
func (*LifeStore) MarkQuestCompleted ¶ added in v0.99.0
MarkQuestCompleted sets status Completed.
func (*LifeStore) MarkQuestStatus ¶ added in v0.99.0
MarkQuestStatus sets quest status and completed_at when Completed.
func (*LifeStore) MarkRewardRedeemed ¶ added in v0.99.0
MarkRewardRedeemed updates last_redeemed_at after a successful redeem.
func (*LifeStore) PersistCompleteQuest ¶ added in v0.99.0
func (s *LifeStore) PersistCompleteQuest(ctx context.Context, in LifeCompletePersist) (*LifeCompleteResult, error)
PersistCompleteQuest applies cascade, loot inventory, action log, and rust clear in one transaction.
func (*LifeStore) PersistFailQuest ¶ added in v0.99.0
func (s *LifeStore) PersistFailQuest(ctx context.Context, profileID, questID int64, rustInvIDs []int64, until time.Time) error
PersistFailQuest marks a quest failed and applies rust in one transaction.
func (*LifeStore) SetEquippedSlot ¶ added in v0.99.0
func (s *LifeStore) SetEquippedSlot(ctx context.Context, profileID int64, slotField string, inventoryID *int64) error
SetEquippedSlot writes one slot inventory id (nil clears).
func (*LifeStore) SetEquippedSlotsTarnishedUntil ¶ added in v0.99.0
func (s *LifeStore) SetEquippedSlotsTarnishedUntil(ctx context.Context, profileID int64, until *time.Time) error
SetEquippedSlotsTarnishedUntil sets or clears rust on equipped slots.
func (*LifeStore) SetInventoryTarnishedUntil ¶ added in v0.99.0
func (s *LifeStore) SetInventoryTarnishedUntil(ctx context.Context, id int64, until *time.Time) error
SetInventoryTarnishedUntil sets or clears rust on an inventory row.
func (*LifeStore) SetProfileGold ¶ added in v0.99.0
SetProfileGold sets absolute gold balance on a profile.
func (*LifeStore) SetRewardActive ¶ added in v0.99.0
SetRewardActive soft-deletes or restores a reward.
func (*LifeStore) SkipActionOccurrence ¶ added in v0.99.0
func (s *LifeStore) SkipActionOccurrence(ctx context.Context, in LifeSkipOccurrenceInput) error
SkipActionOccurrence marks one occurrence skipped or missed.
func (*LifeStore) UpdateAIContext ¶ added in v0.99.0
func (s *LifeStore) UpdateAIContext(ctx context.Context, profileID int64, rate float64, mood map[string]any, personality string) error
UpdateAIContext writes completion rate, mood, and personality.
func (*LifeStore) UpdateCharacteristicStats ¶ added in v0.99.0
func (s *LifeStore) UpdateCharacteristicStats(ctx context.Context, id int64, level int, exp int64) error
UpdateCharacteristicStats updates level/exp.
func (*LifeStore) UpdateGoal ¶ added in v0.99.0
func (s *LifeStore) UpdateGoal(ctx context.Context, id int64, title, category string, areaID *int64) error
UpdateGoal updates title, category, and optional Area parent for a goal. A nil areaID clears the parent link.
func (*LifeStore) UpdateGoalStatus ¶ added in v0.99.0
UpdateGoalStatus sets goal status (Active / Paused / Completed).
func (*LifeStore) UpdateInventoryLore ¶ added in v0.99.0
func (s *LifeStore) UpdateInventoryLore(ctx context.Context, id int64, name, lore, status string) error
UpdateInventoryLore sets instance lore fields and status.
func (*LifeStore) UpdateInventoryLoreStatus ¶ added in v0.99.0
UpdateInventoryLoreStatus sets only lore_status (keeps instance name/lore).
func (*LifeStore) UpdatePlanNode ¶ added in v0.99.0
func (s *LifeStore) UpdatePlanNode(ctx context.Context, id int64, title, description, status string, sortOrder int) error
UpdatePlanNode edits mutable fields on one plan node.
func (*LifeStore) UpdateProfileClass ¶ added in v0.99.0
UpdateProfileClass sets class_type.
func (*LifeStore) UpdateProfileStats ¶ added in v0.99.0
func (s *LifeStore) UpdateProfileStats(ctx context.Context, id int64, level int, exp int64, gold int, pity map[string]int) error
UpdateProfileStats updates level/exp/gold/pity on a profile.
func (*LifeStore) UpdateReward ¶ added in v0.99.0
UpdateReward updates mutable catalog fields for a reward.
func (*LifeStore) UpdateSkillStats ¶ added in v0.99.0
UpdateSkillStats updates skill level/exp.
func (*LifeStore) UpsertAchievement ¶ added in v0.99.0
func (s *LifeStore) UpsertAchievement(ctx context.Context, in LifeAchievementUpsert) error
UpsertAchievement inserts or updates a catalog achievement by flag.
func (*LifeStore) UpsertEquipment ¶ added in v0.99.0
func (s *LifeStore) UpsertEquipment(ctx context.Context, flag, name, rarity, slotType, lore string, buffs, priv map[string]any) (*gen.LifeEquipment, error)
UpsertEquipment creates equipment if flag missing.
func (*LifeStore) UpsertHabitCheckin ¶ added in v0.99.0
func (s *LifeStore) UpsertHabitCheckin(ctx context.Context, in LifeHabitCheckinInput) (*gen.LifeHabitCheckin, error)
UpsertHabitCheckin creates or refreshes a daily habit checkin and writes an action log.
type ListChatScheduledTasksOptions ¶ added in v0.94.0
ListChatScheduledTasksOptions filters scheduled task queries.
type ListChatSessionsOptions ¶ added in v0.93.0
type ListChatSessionsOptions struct {
Limit int // max 100, default 20
Cursor string // opaque cursor: session ID value as string
UID string // when set, only sessions owned by this user are returned
State *int // when set, only sessions in this state are returned
// Archived filters by archive flag; nil means any.
Archived *bool
// PinnedFirst sorts pinned sessions ahead of unpinned ones.
PinnedFirst bool
// Flags restricts results to the given session flags when non-empty.
Flags []string
}
ListChatSessionsOptions holds pagination for listing chat agent sessions.
type ListConfigOptions ¶ added in v0.92.0
ListConfigOptions controls pagination and search for ListConfigs.
type ListDataEventsOptions ¶ added in v0.92.0
type ListDataEventsOptions struct {
Limit int // max 100, default 20
Offset int // page offset for offset-based pagination
Cursor string // opaque CreatedAt cursor (backward compatible)
Source string // filter by source, empty = all
EventType string // filter by event type, empty = all
Webhook bool // if true, only events where data->>'_webhook_method' IS NOT NULL
Search string // ILIKE match against source and data::text
PipelineName string // filter events that triggered a specific pipeline
TimeStart *time.Time // created_at >= TimeStart
TimeEnd *time.Time // created_at <= TimeEnd
}
ListDataEventsOptions holds filters and pagination for listing data events.
type ListNotifyChannelOptions ¶ added in v0.92.0
type ListNotifyChannelOptions struct {
Protocol string
Enabled *bool // nil = all, true = enabled only, false = disabled only
}
ListNotifyChannelOptions holds filtering options for listing notification channels.
type ListNotifyRecordsOptions ¶ added in v0.92.0
type ListNotifyRecordsOptions = notify.ListNotifyRecordsOptions
ListNotifyRecordsOptions is an alias of notify.ListNotifyRecordsOptions.
type ListNotifyRuleOptions ¶ added in v0.92.0
type ListNotifyRuleOptions struct {
Enabled *bool // nil = all, true = enabled only, false = disabled only
}
ListNotifyRuleOptions holds filtering and sorting options for listing notification rules.
type ListNotifyTemplateOptions ¶ added in v0.97.0
type ListNotifyTemplateOptions struct{}
ListNotifyTemplateOptions holds filtering options for listing notification templates.
type MessageStore ¶ added in v0.99.0
type MessageStore struct {
// contains filtered or unexported fields
}
MessageStore persists chat messages.
func MessageStoreFromDB ¶ added in v0.99.0
func MessageStoreFromDB() *MessageStore
MessageStoreFromDB returns a MessageStore using the global database client.
func NewMessageStore ¶ added in v0.99.0
func NewMessageStore(client *gen.Client) *MessageStore
NewMessageStore creates a MessageStore with the given ent client.
func (*MessageStore) Client ¶ added in v0.99.0
func (s *MessageStore) Client() *gen.Client
Client returns the underlying ent client.
func (*MessageStore) CreateMessage ¶ added in v0.99.0
CreateMessage persists a new message.
func (*MessageStore) GetMessage ¶ added in v0.99.0
GetMessage returns the message.
func (*MessageStore) GetMessageByPlatform ¶ added in v0.99.0
func (s *MessageStore) GetMessageByPlatform(ctx context.Context, platformId int64, platformMsgId string) (*gen.Message, error)
GetMessageByPlatform returns the message by platform.
func (*MessageStore) GetMessagesBySession ¶ added in v0.99.0
func (s *MessageStore) GetMessagesBySession(ctx context.Context, session string) ([]*gen.Message, error)
GetMessagesBySession returns the messages by session.
type ModuleDataStore ¶ added in v0.99.0
type ModuleDataStore struct {
// contains filtered or unexported fields
}
ModuleDataStore persists module KV data, config, OAuth, forms, pages, behaviors, parameters, instructs, and counters.
func ModuleDataStoreFromDB ¶ added in v0.99.0
func ModuleDataStoreFromDB() *ModuleDataStore
ModuleDataStoreFromDB returns a ModuleDataStore using the global database client.
func NewModuleDataStore ¶ added in v0.99.0
func NewModuleDataStore(client *gen.Client) *ModuleDataStore
NewModuleDataStore creates a ModuleDataStore with the given ent client.
func (*ModuleDataStore) BehaviorGet ¶ added in v0.99.0
func (s *ModuleDataStore) BehaviorGet(ctx context.Context, uid types.Uid, flag string) (gen.Behavior, error)
BehaviorGet get behavior records.
func (*ModuleDataStore) BehaviorIncrease ¶ added in v0.99.0
func (s *ModuleDataStore) BehaviorIncrease(ctx context.Context, uid types.Uid, flag string, number int) error
BehaviorIncrease increase behavior records.
func (*ModuleDataStore) BehaviorList ¶ added in v0.99.0
BehaviorList list behavior records.
func (*ModuleDataStore) BehaviorSet ¶ added in v0.99.0
BehaviorSet set behavior records.
func (*ModuleDataStore) Client ¶ added in v0.99.0
func (s *ModuleDataStore) Client() *gen.Client
Client returns the underlying ent client.
func (*ModuleDataStore) ConfigDelete ¶ added in v0.99.0
ConfigDelete delete config data.
func (*ModuleDataStore) ConfigGet ¶ added in v0.99.0
func (s *ModuleDataStore) ConfigGet(ctx context.Context, uid types.Uid, topic, key string) (types.KV, error)
ConfigGet get config data.
func (*ModuleDataStore) ConfigSet ¶ added in v0.99.0
func (s *ModuleDataStore) ConfigSet(ctx context.Context, uid types.Uid, topic, key string, value types.KV) error
ConfigSet set config data.
func (*ModuleDataStore) CreateCounter ¶ added in v0.99.0
func (s *ModuleDataStore) CreateCounter(ctx context.Context, counterModel *gen.Counter) (int64, error)
CreateCounter persists a new counter.
func (*ModuleDataStore) CreateInstruct ¶ added in v0.99.0
func (s *ModuleDataStore) CreateInstruct(ctx context.Context, instructModel *gen.Instruct) (int64, error)
CreateInstruct persists a new instruct.
func (*ModuleDataStore) CreateToken ¶ added in v0.99.0
func (s *ModuleDataStore) CreateToken(ctx context.Context, uid types.Uid, expiresAt time.Time, scopes []string) (string, error)
CreateToken persists a new token.
func (*ModuleDataStore) DataDelete ¶ added in v0.99.0
DataDelete delete module data.
func (*ModuleDataStore) DataGet ¶ added in v0.99.0
func (s *ModuleDataStore) DataGet(ctx context.Context, uid types.Uid, topic, key string) (types.KV, error)
DataGet get module data.
func (*ModuleDataStore) DataList ¶ added in v0.99.0
func (s *ModuleDataStore) DataList(ctx context.Context, uid types.Uid, topic string, filter types.DataFilter) ([]*gen.Data, error)
DataList list module data.
func (*ModuleDataStore) DataSet ¶ added in v0.99.0
func (s *ModuleDataStore) DataSet(ctx context.Context, uid types.Uid, topic, key string, value types.KV) error
DataSet set module data.
func (*ModuleDataStore) DecreaseCounter ¶ added in v0.99.0
func (s *ModuleDataStore) DecreaseCounter(ctx context.Context, id, amount int64) error
DecreaseCounter decreases the counter.
func (*ModuleDataStore) GetCounter ¶ added in v0.99.0
GetCounter returns the counter.
func (*ModuleDataStore) GetCounterByFlag ¶ added in v0.99.0
func (s *ModuleDataStore) GetCounterByFlag(ctx context.Context, uid types.Uid, topic, flag string) (gen.Counter, error)
GetCounterByFlag returns the counter by flag.
func (*ModuleDataStore) IncreaseCounter ¶ added in v0.99.0
func (s *ModuleDataStore) IncreaseCounter(ctx context.Context, id, amount int64) error
IncreaseCounter increases the counter.
func (*ModuleDataStore) ListConfigByPrefix ¶ added in v0.99.0
func (s *ModuleDataStore) ListConfigByPrefix(ctx context.Context, uid types.Uid, topic, prefix string) ([]*gen.ConfigData, error)
ListConfigByPrefix returns config by prefix.
func (*ModuleDataStore) ListConfigs ¶ added in v0.99.0
func (s *ModuleDataStore) ListConfigs(ctx context.Context, opts ListConfigOptions) ([]model.ConfigItem, error)
ListConfigs returns configs.
func (*ModuleDataStore) ListCounter ¶ added in v0.99.0
func (s *ModuleDataStore) ListCounter(ctx context.Context, uid types.Uid, topic string) ([]*gen.Counter, error)
ListCounter returns counter.
func (*ModuleDataStore) ListInstruct ¶ added in v0.99.0
func (s *ModuleDataStore) ListInstruct(ctx context.Context, uid types.Uid, isExpire bool, limit int) ([]*gen.Instruct, error)
ListInstruct returns instruct.
func (*ModuleDataStore) ListTokens ¶ added in v0.99.0
ListTokens returns tokens.
func (*ModuleDataStore) OAuthGet ¶ added in v0.99.0
func (s *ModuleDataStore) OAuthGet(ctx context.Context, uid types.Uid, topic, t string) (gen.OAuth, error)
OAuthGet returns OAuth credentials for uid, topic, and type.
func (*ModuleDataStore) OAuthGetAvailable ¶ added in v0.99.0
OAuthGetAvailable lists OAuth credentials of the given type.
func (*ModuleDataStore) ParameterDelete ¶ added in v0.99.0
func (s *ModuleDataStore) ParameterDelete(ctx context.Context, flag string) error
ParameterDelete delete a parameter.
func (*ModuleDataStore) ParameterGet ¶ added in v0.99.0
ParameterGet get a parameter.
func (*ModuleDataStore) ParameterSet ¶ added in v0.99.0
func (s *ModuleDataStore) ParameterSet(ctx context.Context, flag string, params types.KV, expiredAt time.Time) error
ParameterSet set a parameter.
func (*ModuleDataStore) RevokeToken ¶ added in v0.99.0
func (s *ModuleDataStore) RevokeToken(ctx context.Context, flag string) error
RevokeToken revokes the token.
func (*ModuleDataStore) UpdateInstruct ¶ added in v0.99.0
UpdateInstruct updates the instruct.
type NotifyConfigStore ¶ added in v0.99.0
type NotifyConfigStore struct {
// contains filtered or unexported fields
}
NotifyConfigStore persists notification channels, rules, and templates.
func NewNotifyConfigStore ¶ added in v0.99.0
func NewNotifyConfigStore(client *gen.Client) *NotifyConfigStore
NewNotifyConfigStore creates a NotifyConfigStore with the given ent client.
func NotifyConfigStoreFromDB ¶ added in v0.99.0
func NotifyConfigStoreFromDB() *NotifyConfigStore
NotifyConfigStoreFromDB returns a NotifyConfigStore using the global database client.
func (*NotifyConfigStore) Client ¶ added in v0.99.0
func (s *NotifyConfigStore) Client() *gen.Client
Client returns the underlying ent client.
func (*NotifyConfigStore) CreateNotifyChannel ¶ added in v0.99.0
func (s *NotifyConfigStore) CreateNotifyChannel(ctx context.Context, name, protocol, uri string) (int64, error)
CreateNotifyChannel persists a new notify channel.
func (*NotifyConfigStore) CreateNotifyRule ¶ added in v0.99.0
func (s *NotifyConfigStore) CreateNotifyRule(ctx context.Context, rule model.NotifyRule) (int64, error)
CreateNotifyRule persists a new notify rule.
func (*NotifyConfigStore) CreateNotifyTemplate ¶ added in v0.99.0
func (s *NotifyConfigStore) CreateNotifyTemplate(ctx context.Context, tmpl model.NotifyTemplate) (int64, error)
CreateNotifyTemplate persists a new notify template.
func (*NotifyConfigStore) DeleteNotifyChannel ¶ added in v0.99.0
func (s *NotifyConfigStore) DeleteNotifyChannel(ctx context.Context, id int64) error
DeleteNotifyChannel deletes the notify channel.
func (*NotifyConfigStore) DeleteNotifyRule ¶ added in v0.99.0
func (s *NotifyConfigStore) DeleteNotifyRule(ctx context.Context, id int64) error
DeleteNotifyRule deletes the notify rule.
func (*NotifyConfigStore) DeleteNotifyTemplate ¶ added in v0.99.0
func (s *NotifyConfigStore) DeleteNotifyTemplate(ctx context.Context, id int64) error
DeleteNotifyTemplate deletes the notify template.
func (*NotifyConfigStore) GetDefaultNotifyChannelRaw ¶ added in v0.99.0
func (s *NotifyConfigStore) GetDefaultNotifyChannelRaw(ctx context.Context) (model.NotifyChannel, error)
GetDefaultNotifyChannelRaw returns the default notify channel raw.
func (*NotifyConfigStore) GetDefaultNotifyTemplate ¶ added in v0.99.0
func (s *NotifyConfigStore) GetDefaultNotifyTemplate(ctx context.Context) (model.NotifyTemplate, error)
GetDefaultNotifyTemplate returns the default notify template.
func (*NotifyConfigStore) GetNotifyChannel ¶ added in v0.99.0
func (s *NotifyConfigStore) GetNotifyChannel(ctx context.Context, id int64) (model.NotifyChannel, error)
GetNotifyChannel returns the notify channel.
func (*NotifyConfigStore) GetNotifyChannelByNameRaw ¶ added in v0.99.0
func (s *NotifyConfigStore) GetNotifyChannelByNameRaw(ctx context.Context, name string) (model.NotifyChannel, error)
GetNotifyChannelByNameRaw returns the notify channel by name raw.
func (*NotifyConfigStore) GetNotifyChannelRaw ¶ added in v0.99.0
func (s *NotifyConfigStore) GetNotifyChannelRaw(ctx context.Context, id int64) (model.NotifyChannel, error)
GetNotifyChannelRaw returns the notify channel raw.
func (*NotifyConfigStore) GetNotifyRule ¶ added in v0.99.0
func (s *NotifyConfigStore) GetNotifyRule(ctx context.Context, id int64) (model.NotifyRule, error)
GetNotifyRule returns the notify rule.
func (*NotifyConfigStore) GetNotifyTemplate ¶ added in v0.99.0
func (s *NotifyConfigStore) GetNotifyTemplate(ctx context.Context, id int64) (model.NotifyTemplate, error)
GetNotifyTemplate returns the notify template.
func (*NotifyConfigStore) GetNotifyTemplateByTemplateID ¶ added in v0.99.0
func (s *NotifyConfigStore) GetNotifyTemplateByTemplateID(ctx context.Context, templateID string) (model.NotifyTemplate, error)
GetNotifyTemplateByTemplateID returns the notify template by template id.
func (*NotifyConfigStore) ListNotifyChannels ¶ added in v0.99.0
func (s *NotifyConfigStore) ListNotifyChannels(ctx context.Context, opts ListNotifyChannelOptions) ([]model.NotifyChannel, error)
ListNotifyChannels returns notify channels.
func (*NotifyConfigStore) ListNotifyRules ¶ added in v0.99.0
func (s *NotifyConfigStore) ListNotifyRules(ctx context.Context, opts ListNotifyRuleOptions) ([]model.NotifyRule, error)
ListNotifyRules returns notify rules.
func (*NotifyConfigStore) ListNotifyTemplates ¶ added in v0.99.0
func (s *NotifyConfigStore) ListNotifyTemplates(ctx context.Context, _ ListNotifyTemplateOptions) ([]model.NotifyTemplate, error)
ListNotifyTemplates returns notify templates.
func (*NotifyConfigStore) SetDefaultNotifyChannel ¶ added in v0.99.0
func (s *NotifyConfigStore) SetDefaultNotifyChannel(ctx context.Context, id int64) error
SetDefaultNotifyChannel sets the default notify channel.
func (*NotifyConfigStore) SetDefaultNotifyTemplate ¶ added in v0.99.0
func (s *NotifyConfigStore) SetDefaultNotifyTemplate(ctx context.Context, id int64) error
SetDefaultNotifyTemplate sets the default notify template.
func (*NotifyConfigStore) UpdateNotifyChannel ¶ added in v0.99.0
func (s *NotifyConfigStore) UpdateNotifyChannel(ctx context.Context, id int64, name, protocol, uri string, enabled bool) error
UpdateNotifyChannel updates the notify channel.
func (*NotifyConfigStore) UpdateNotifyRule ¶ added in v0.99.0
func (s *NotifyConfigStore) UpdateNotifyRule(ctx context.Context, id int64, rule model.NotifyRule) error
UpdateNotifyRule updates the notify rule.
func (*NotifyConfigStore) UpdateNotifyTemplate ¶ added in v0.99.0
func (s *NotifyConfigStore) UpdateNotifyTemplate(ctx context.Context, id int64, tmpl model.NotifyTemplate) error
UpdateNotifyTemplate updates the notify template.
type NotifyStore ¶ added in v0.92.0
type NotifyStore struct {
// contains filtered or unexported fields
}
NotifyStore provides CRUD for notification delivery records.
func NewNotifyStore ¶ added in v0.92.0
func NewNotifyStore(client *gen.Client) *NotifyStore
NewNotifyStore returns a NotifyStore backed by the given Ent client.
func NotifyStoreFromDB ¶ added in v0.99.0
func NotifyStoreFromDB() *NotifyStore
NotifyStoreFromDB returns a NotifyStore using the global database client.
func (*NotifyStore) CancelDeferredByCorrelation ¶ added in v0.99.0
func (s *NotifyStore) CancelDeferredByCorrelation(ctx context.Context, uid, correlationID string) error
CancelDeferredByCorrelation sets deferred rows with the correlation id to cancelled.
func (*NotifyStore) CancelDeferredByCorrelations ¶ added in v0.99.0
func (s *NotifyStore) CancelDeferredByCorrelations(ctx context.Context, uid string, correlationIDs ...string) error
CancelDeferredByCorrelations cancels deferred notification records for any of the given correlation ids.
func (*NotifyStore) CountUnread ¶ added in v0.99.0
CountUnread returns how many unread records exist for uid on the given channel and status.
func (*NotifyStore) DeleteOldest ¶ added in v0.92.0
DeleteOldest removes the oldest records for a user exceeding keepN.
func (*NotifyStore) GetRecord ¶ added in v0.92.0
func (s *NotifyStore) GetRecord(ctx context.Context, id int64) (*gen.NotificationRecord, error)
GetRecord returns a single notification record by ID.
func (*NotifyStore) HasUnreadSuccessByCorrelation ¶ added in v0.99.0
func (s *NotifyStore) HasUnreadSuccessByCorrelation(ctx context.Context, uid, correlationID string) (bool, error)
HasUnreadSuccessByCorrelation reports whether an unread success record exists for the correlation.
func (*NotifyStore) ListDueDeferred ¶ added in v0.99.0
func (s *NotifyStore) ListDueDeferred(ctx context.Context, now time.Time, limit int) ([]*gen.NotificationRecord, error)
ListDueDeferred returns deferred records whose escalate_at is at or before now.
func (*NotifyStore) ListRecords ¶ added in v0.92.0
func (s *NotifyStore) ListRecords(ctx context.Context, uid string, opts ListNotifyRecordsOptions) ([]*gen.NotificationRecord, string, error)
ListRecords returns per-user notification records, cursor-paginated (newest first).
func (*NotifyStore) MarkRead ¶ added in v0.98.1
MarkRead sets read_at on the given notification records owned by uid and cancels related deferred rows.
func (*NotifyStore) MarkReadByCorrelation ¶ added in v0.99.0
func (s *NotifyStore) MarkReadByCorrelation(ctx context.Context, uid, correlationID string) error
MarkReadByCorrelation marks unread inapp (or any) records with the correlation id as read and cancels deferred.
func (*NotifyStore) Record ¶ added in v0.92.0
func (s *NotifyStore) Record(ctx context.Context, uid, channel, templateID, summary, status, errorMsg, ruleID string, payload map[string]any) (int64, error)
Record inserts a notification delivery record and returns the new row ID. ruleID is the matched notify rule id when known; empty when no rule applied. New records are unread (read_at nil) until MarkRead.
func (*NotifyStore) RecordParams ¶ added in v0.99.0
func (s *NotifyStore) RecordParams(ctx context.Context, p RecordParams) (int64, error)
RecordParams inserts a notification delivery record with extended fields.
func (*NotifyStore) UpdateRecordStatus ¶ added in v0.99.0
func (s *NotifyStore) UpdateRecordStatus(ctx context.Context, id int64, status, errorMsg string) error
UpdateRecordStatus sets status (and optional error) on a record by id.
type PageDataStore ¶ added in v0.92.0
type PageDataStore struct {
// contains filtered or unexported fields
}
PageDataStore persists shareable view page data keyed by opaque tokens.
func NewPageDataStore ¶ added in v0.92.0
func NewPageDataStore(client *gen.Client) *PageDataStore
NewPageDataStore creates a PageDataStore with the given ent client.
func (*PageDataStore) CreatePageData ¶ added in v0.92.0
func (s *PageDataStore) CreatePageData(ctx context.Context, token, pageType, title string, data types.KV, createdBy string, expiresAt *time.Time) error
CreatePageData inserts a new page_data row.
func (*PageDataStore) DeleteExpiredPageData ¶ added in v0.92.0
func (s *PageDataStore) DeleteExpiredPageData(ctx context.Context) (int64, error)
DeleteExpiredPageData removes rows where expires_at < now(). Returns the number of deleted rows.
func (*PageDataStore) DeletePageData ¶ added in v0.92.0
DeletePageData removes a page_data row by token. Returns the number of deleted rows.
func (*PageDataStore) GetPageDataByToken ¶ added in v0.92.0
func (s *PageDataStore) GetPageDataByToken(ctx context.Context, token string) (*gen.PageData, error)
GetPageDataByToken retrieves a page_data row by token. Returns nil if not found.
type PersistentStorageInterface ¶
type PersistentStorageInterface interface {
Open(jsonConfig config.StoreType) error
Close() error
IsOpen() bool
GetAdapter() Adapter
DbStats() func() any
}
PersistentStorageInterface defines methods used for interaction with persistent storage.
var Store PersistentStorageInterface
Store is the main object for interacting with persistent storage.
type PipelineCatalogAdapter ¶ added in v0.99.0
type PipelineCatalogAdapter struct {
S *PipelineStore
}
PipelineCatalogAdapter adapts PipelineStore to pipeline.DefinitionCatalog.
func (PipelineCatalogAdapter) CreateDefinition ¶ added in v0.99.0
func (a PipelineCatalogAdapter) CreateDefinition(ctx context.Context, name, description, createdBy string) error
CreateDefinition implements pipeline.DefinitionCatalog.
func (PipelineCatalogAdapter) DeleteDefinitionByName ¶ added in v0.99.0
func (a PipelineCatalogAdapter) DeleteDefinitionByName(ctx context.Context, name string) (int64, error)
DeleteDefinitionByName implements pipeline.DefinitionCatalog.
func (PipelineCatalogAdapter) EnsureDefinitionCreatedBy ¶ added in v0.99.0
func (a PipelineCatalogAdapter) EnsureDefinitionCreatedBy(ctx context.Context, name, createdBy string) error
EnsureDefinitionCreatedBy implements pipeline.DefinitionCatalog.
func (PipelineCatalogAdapter) GetDefinitionByName ¶ added in v0.99.0
func (a PipelineCatalogAdapter) GetDefinitionByName(ctx context.Context, name string) (*model.PipelineDefinition, error)
GetDefinitionByName implements pipeline.DefinitionCatalog.
func (PipelineCatalogAdapter) GetRunsByParentName ¶ added in v0.99.0
func (a PipelineCatalogAdapter) GetRunsByParentName(ctx context.Context, parentName string) ([]*model.PipelineRun, error)
GetRunsByParentName implements pipeline.DefinitionCatalog.
func (PipelineCatalogAdapter) ListPublishedDefinitions ¶ added in v0.99.0
func (a PipelineCatalogAdapter) ListPublishedDefinitions(ctx context.Context) ([]pipeline.DefinitionRecord, error)
ListPublishedDefinitions implements pipeline.DefinitionCatalog.
func (PipelineCatalogAdapter) PublishDefinition ¶ added in v0.99.0
func (a PipelineCatalogAdapter) PublishDefinition(ctx context.Context, name string, version int) (*model.PipelineDefinition, error)
PublishDefinition implements pipeline.DefinitionCatalog.
func (PipelineCatalogAdapter) UpdateDefinitionDraft ¶ added in v0.99.0
func (a PipelineCatalogAdapter) UpdateDefinitionDraft(ctx context.Context, name, yamlDraft string, version int) (*model.PipelineDefinition, error)
UpdateDefinitionDraft implements pipeline.DefinitionCatalog.
type PipelineRunInfo ¶ added in v0.92.0
type PipelineRunInfo struct {
ID int64
PipelineName string
EventID string
Status string
TriggerSource string
}
PipelineRunInfo is a lightweight view of a pipeline run for event matching display.
type PipelineRunStoreAdapter ¶ added in v0.99.0
type PipelineRunStoreAdapter struct {
S *PipelineStore
}
PipelineRunStoreAdapter adapts PipelineStore to pipeline.RunStore (model DTOs).
func (PipelineRunStoreAdapter) CreateRun ¶ added in v0.99.0
func (a PipelineRunStoreAdapter) CreateRun(ctx context.Context, pipelineName, eventID, eventType, triggerSource string) (*model.PipelineRun, error)
CreateRun implements pipeline.RunStore.
func (PipelineRunStoreAdapter) CreateStepRun ¶ added in v0.99.0
func (a PipelineRunStoreAdapter) CreateStepRun(ctx context.Context, runID int64, stepName, capName, operation string, params map[string]any, attempt int) (*model.PipelineStepRun, error)
CreateStepRun implements pipeline.RunStore.
func (PipelineRunStoreAdapter) GetCheckpoint ¶ added in v0.99.0
GetCheckpoint implements pipeline.RunStore.
func (PipelineRunStoreAdapter) GetIncompleteRuns ¶ added in v0.99.0
func (a PipelineRunStoreAdapter) GetIncompleteRuns(ctx context.Context) ([]*model.PipelineRun, error)
GetIncompleteRuns implements pipeline.RunStore.
func (PipelineRunStoreAdapter) GetRun ¶ added in v0.99.0
func (a PipelineRunStoreAdapter) GetRun(ctx context.Context, runID int64) (*model.PipelineRun, error)
GetRun implements pipeline.RunStore.
func (PipelineRunStoreAdapter) HasConsumed ¶ added in v0.99.0
func (a PipelineRunStoreAdapter) HasConsumed(ctx context.Context, consumerName, eventID string) (bool, error)
HasConsumed implements pipeline.RunStore.
func (PipelineRunStoreAdapter) RecordConsumption ¶ added in v0.99.0
func (a PipelineRunStoreAdapter) RecordConsumption(ctx context.Context, consumerName, eventID string) error
RecordConsumption implements pipeline.RunStore.
func (PipelineRunStoreAdapter) RecordResourceLink ¶ added in v0.99.0
func (a PipelineRunStoreAdapter) RecordResourceLink(ctx context.Context, link model.ResourceLink) error
RecordResourceLink implements pipeline.RunStore.
func (PipelineRunStoreAdapter) SaveCheckpoint ¶ added in v0.99.0
SaveCheckpoint implements pipeline.RunStore.
func (PipelineRunStoreAdapter) UpdateRunHeartbeat ¶ added in v0.99.0
func (a PipelineRunStoreAdapter) UpdateRunHeartbeat(ctx context.Context, runID int64) error
UpdateRunHeartbeat implements pipeline.RunStore.
func (PipelineRunStoreAdapter) UpdateRunStatus ¶ added in v0.99.0
func (a PipelineRunStoreAdapter) UpdateRunStatus(ctx context.Context, runID int64, status int, errMsg string) error
UpdateRunStatus implements pipeline.RunStore.
type PipelineStore ¶ added in v0.92.0
type PipelineStore struct {
// contains filtered or unexported fields
}
PipelineStore persists pipeline definitions, runs, step runs, and event consumptions.
func NewPipelineStore ¶ added in v0.92.0
func NewPipelineStore(client *gen.Client) *PipelineStore
func PipelineStoreFromDB ¶ added in v0.99.0
func PipelineStoreFromDB() *PipelineStore
PipelineStoreFromDB returns a PipelineStore using the global database client.
func (*PipelineStore) CreateDefinition ¶ added in v0.92.0
func (s *PipelineStore) CreateDefinition(ctx context.Context, name, description, createdBy string) error
CreateDefinition creates a new pipeline definition with initial yaml_draft and version 1. createdBy is the Web UI user UID that created the pipeline (may be empty in tests).
func (*PipelineStore) CreateRun ¶ added in v0.92.0
func (s *PipelineStore) CreateRun(ctx context.Context, pipelineName, eventID, eventType, triggerSource string) (*gen.PipelineRun, error)
func (*PipelineStore) CreateStepRun ¶ added in v0.92.0
func (*PipelineStore) DeleteDefinitionByName ¶ added in v0.92.0
DeleteDefinitionByName removes a pipeline definition and its associated runs. Runs match the parent name and compound trigger engine names (name__trigger_*). Returns the number of pipeline runs that were deleted.
func (*PipelineStore) EnsureDefinitionCreatedBy ¶ added in v0.96.2
func (s *PipelineStore) EnsureDefinitionCreatedBy(ctx context.Context, name, createdBy string) error
EnsureDefinitionCreatedBy sets created_by when it is currently empty. Used to backfill owner UID for pipelines created before the field existed.
func (*PipelineStore) GetCheckpoint ¶ added in v0.92.0
GetCheckpoint loads the checkpoint data for a pipeline run.
func (*PipelineStore) GetDefinitionByName ¶ added in v0.92.0
func (s *PipelineStore) GetDefinitionByName(ctx context.Context, name string) (*gen.PipelineDefinition, error)
GetDefinitionByName returns a pipeline definition by name.
func (*PipelineStore) GetDefinitionVersion ¶ added in v0.92.0
func (s *PipelineStore) GetDefinitionVersion(ctx context.Context, name string, version int) (*gen.PipelineDefinitionVersion, error)
GetDefinitionVersion returns a single version snapshot by pipeline name and version number.
func (*PipelineStore) GetIncompleteRuns ¶ added in v0.92.0
func (s *PipelineStore) GetIncompleteRuns(ctx context.Context) ([]*gen.PipelineRun, error)
GetIncompleteRuns returns pipeline runs that are in Start state and may need recovery.
func (*PipelineStore) GetRun ¶ added in v0.92.0
func (s *PipelineStore) GetRun(ctx context.Context, runID int64) (*gen.PipelineRun, error)
GetRun returns a pipeline run by ID.
func (*PipelineStore) GetRunByID ¶ added in v0.92.0
func (s *PipelineStore) GetRunByID(ctx context.Context, id int64) (*gen.PipelineRun, error)
GetRunByID returns a pipeline run by its database ID.
func (*PipelineStore) GetRunsByParentName ¶ added in v0.92.0
func (s *PipelineStore) GetRunsByParentName(ctx context.Context, parentName string) ([]*gen.PipelineRun, error)
GetRunsByParentName returns pipeline runs matching a parent pipeline name. Matches both exact name and compound trigger names (name__trigger_*).
func (*PipelineStore) GetStepRunsByRunID ¶ added in v0.92.0
func (s *PipelineStore) GetStepRunsByRunID(ctx context.Context, runID int64) ([]*gen.PipelineStepRun, error)
GetStepRunsByRunID returns all step runs for a given pipeline run, ordered by ID.
func (*PipelineStore) HasConsumed ¶ added in v0.92.0
func (*PipelineStore) LatestRunStartedAtByParentNames ¶ added in v0.97.1
func (s *PipelineStore) LatestRunStartedAtByParentNames(ctx context.Context, names []string) (map[string]time.Time, error)
LatestRunStartedAtByParentNames returns the latest started_at for each parent pipeline name. Matches exact pipeline_name and compound trigger names (name__trigger_*). Names without runs are omitted from the result.
func (*PipelineStore) ListDefinitionVersions ¶ added in v0.92.0
func (s *PipelineStore) ListDefinitionVersions(ctx context.Context, name string) ([]*gen.PipelineDefinitionVersion, error)
ListDefinitionVersions returns all published version snapshots for a pipeline, ordered by version descending (newest first).
func (*PipelineStore) ListDefinitions ¶ added in v0.92.0
func (s *PipelineStore) ListDefinitions(ctx context.Context) ([]*gen.PipelineDefinition, error)
ListDefinitions returns all pipeline definitions ordered by updated_at desc.
func (*PipelineStore) ListPublishedDefinitions ¶ added in v0.92.0
func (s *PipelineStore) ListPublishedDefinitions(ctx context.Context) ([]pipeline.DefinitionRecord, error)
ListPublishedDefinitions returns all pipeline definitions that are published and have a non-nil yaml_published field.
func (*PipelineStore) ListStepRunsByRunID ¶ added in v0.92.0
func (s *PipelineStore) ListStepRunsByRunID(ctx context.Context, runID int64) ([]*gen.PipelineStepRun, error)
ListStepRunsByRunID returns all step runs for a pipeline run, ordered by creation time.
func (*PipelineStore) PipelineStats ¶ added in v0.92.0
func (s *PipelineStore) PipelineStats(ctx context.Context, name string, since time.Time, groupBy string) (*types.PipelineStats, error)
PipelineStats returns aggregated pipeline run statistics for chart rendering. name empty = all pipelines. since zero = no time filter. groupBy = "day"|"week"|"month".
func (*PipelineStore) PublishDefinition ¶ added in v0.92.0
func (s *PipelineStore) PublishDefinition(ctx context.Context, name string, version int) (*gen.PipelineDefinition, error)
PublishDefinition copies yaml_draft to yaml_published with atomic optimistic locking. Also inserts a version snapshot into pipeline_definition_versions.
func (*PipelineStore) RecordConsumption ¶ added in v0.92.0
func (s *PipelineStore) RecordConsumption(ctx context.Context, consumerName, eventID string) error
func (*PipelineStore) RecordResourceLink ¶ added in v0.92.0
func (s *PipelineStore) RecordResourceLink(ctx context.Context, link *gen.ResourceLink) error
RecordResourceLink inserts a resource link with UPSERT semantics.
func (*PipelineStore) RenameDefinition ¶ added in v0.98.1
func (s *PipelineStore) RenameDefinition(ctx context.Context, oldName, newName string) (*gen.PipelineDefinition, error)
RenameDefinition renames a pipeline definition and cascades the new name to version snapshots, runs (including compound trigger names), resource links, and top-level name fields in draft/published YAML.
func (*PipelineStore) RunLatencyStatsByParentNames ¶ added in v0.98.1
func (s *PipelineStore) RunLatencyStatsByParentNames(ctx context.Context, names []string, since time.Time) (map[string]types.RunLatencyStats, error)
RunLatencyStatsByParentNames returns success rate and P50/P95 duration stats per parent pipeline name. Matches exact pipeline_name and compound trigger names (name__trigger_*). Only completed runs with started_at >= since (when since is non-zero) are included. Names without qualifying runs are omitted from the result.
func (*PipelineStore) SaveCheckpoint ¶ added in v0.92.0
SaveCheckpoint persists the intermediate pipeline run state.
func (*PipelineStore) SetDefinitionEnabled ¶ added in v0.95.0
func (s *PipelineStore) SetDefinitionEnabled(ctx context.Context, name string, enabled bool) (*gen.PipelineDefinition, error)
SetDefinitionEnabled toggles the top-level enabled flag in draft and published YAML. Only published pipelines can be paused at runtime.
func (*PipelineStore) UpdateDefinitionDraft ¶ added in v0.92.0
func (s *PipelineStore) UpdateDefinitionDraft(ctx context.Context, name, yamlDraft string, version int) (*gen.PipelineDefinition, error)
UpdateDefinitionDraft updates the yaml_draft with atomic optimistic locking. Uses conditional UPDATE WHERE version=X. Returns ErrConflict if no row matched.
func (*PipelineStore) UpdateRunHeartbeat ¶ added in v0.92.0
func (s *PipelineStore) UpdateRunHeartbeat(ctx context.Context, runID int64) error
UpdateRunHeartbeat refreshes the last_heartbeat timestamp for a running pipeline.
func (*PipelineStore) UpdateRunStatus ¶ added in v0.92.0
type PlatformStore ¶ added in v0.99.0
type PlatformStore struct {
// contains filtered or unexported fields
}
PlatformStore persists platforms, channels, bots, and platform channel links.
func NewPlatformStore ¶ added in v0.99.0
func NewPlatformStore(client *gen.Client) *PlatformStore
NewPlatformStore creates a PlatformStore with the given ent client.
func PlatformStoreFromDB ¶ added in v0.99.0
func PlatformStoreFromDB() *PlatformStore
PlatformStoreFromDB returns a PlatformStore using the global database client.
func (*PlatformStore) Client ¶ added in v0.99.0
func (s *PlatformStore) Client() *gen.Client
Client returns the underlying ent client.
func (*PlatformStore) CreateChannel ¶ added in v0.99.0
func (s *PlatformStore) CreateChannel(ctx context.Context, channelModel *gen.Channel) (int64, error)
CreateChannel persists a new channel.
func (*PlatformStore) CreatePlatform ¶ added in v0.99.0
func (s *PlatformStore) CreatePlatform(ctx context.Context, platformModel *gen.Platform) (int64, error)
CreatePlatform persists a new platform.
func (*PlatformStore) CreatePlatformChannel ¶ added in v0.99.0
func (s *PlatformStore) CreatePlatformChannel(ctx context.Context, item *gen.PlatformChannel) (int64, error)
CreatePlatformChannel persists a new platform channel.
func (*PlatformStore) CreatePlatformChannelUser ¶ added in v0.99.0
func (s *PlatformStore) CreatePlatformChannelUser(ctx context.Context, item *gen.PlatformChannelUser) (int64, error)
CreatePlatformChannelUser persists a new platform channel user.
func (*PlatformStore) DeleteBot ¶ added in v0.99.0
func (s *PlatformStore) DeleteBot(ctx context.Context, name string) error
DeleteBot deletes the bot.
func (*PlatformStore) DeleteChannel ¶ added in v0.99.0
func (s *PlatformStore) DeleteChannel(ctx context.Context, name string) error
DeleteChannel deletes the channel.
func (*PlatformStore) GetBotByName ¶ added in v0.99.0
GetBotByName returns the bot by name.
func (*PlatformStore) GetChannel ¶ added in v0.99.0
GetChannel returns the channel.
func (*PlatformStore) GetChannelByName ¶ added in v0.99.0
GetChannelByName returns the channel by name.
func (*PlatformStore) GetChannels ¶ added in v0.99.0
GetChannels returns the channels.
func (*PlatformStore) GetPlatform ¶ added in v0.99.0
GetPlatform returns the platform.
func (*PlatformStore) GetPlatformByName ¶ added in v0.99.0
GetPlatformByName returns the platform by name.
func (*PlatformStore) GetPlatformChannelByFlag ¶ added in v0.99.0
func (s *PlatformStore) GetPlatformChannelByFlag(ctx context.Context, flag string) (*gen.PlatformChannel, error)
GetPlatformChannelByFlag returns the platform channel by flag.
func (*PlatformStore) GetPlatformChannelUsersByUserFlag ¶ added in v0.99.0
func (s *PlatformStore) GetPlatformChannelUsersByUserFlag(ctx context.Context, userFlag string) ([]*gen.PlatformChannelUser, error)
GetPlatformChannelUsersByUserFlag returns the platform channel users by user flag.
func (*PlatformStore) GetPlatformChannelUsersByUserFlags ¶ added in v0.99.0
func (s *PlatformStore) GetPlatformChannelUsersByUserFlags(ctx context.Context, userFlags []string) ([]*gen.PlatformChannelUser, error)
GetPlatformChannelUsersByUserFlags returns platform channel user records for a batch of user flags.
func (*PlatformStore) GetPlatformChannelsByChannelId ¶ added in v0.99.0
func (s *PlatformStore) GetPlatformChannelsByChannelId(ctx context.Context, channelId int64) (*gen.PlatformChannel, error)
GetPlatformChannelsByChannelId returns the platform channels by channel id.
func (*PlatformStore) GetPlatformChannelsByPlatformIds ¶ added in v0.99.0
func (s *PlatformStore) GetPlatformChannelsByPlatformIds(ctx context.Context, platformIds []int64) ([]*gen.PlatformChannel, error)
GetPlatformChannelsByPlatformIds returns the platform channels by platform ids.
func (*PlatformStore) GetPlatforms ¶ added in v0.99.0
GetPlatforms returns the platforms.
func (*PlatformStore) UpdateChannel ¶ added in v0.99.0
UpdateChannel updates the channel.
func (*PlatformStore) UpdatePlatformChannelChannelID ¶ added in v0.99.0
func (s *PlatformStore) UpdatePlatformChannelChannelID(ctx context.Context, platformChannelID, channelID int64) error
UpdatePlatformChannelChannelID updates the platform channel channel id.
type PollingStateEntry ¶ added in v0.92.0
PollingStateEntry represents a single persisted polling state row.
type PollingStateStore ¶ added in v0.92.0
type PollingStateStore struct {
// contains filtered or unexported fields
}
PollingStateStore persists polling state entries for the provider event source framework.
func NewPollingStateStore ¶ added in v0.92.0
func NewPollingStateStore(client *gen.Client) *PollingStateStore
NewPollingStateStore returns a PollingStateStore backed by the given Ent client.
func (*PollingStateStore) LoadAll ¶ added in v0.92.0
func (s *PollingStateStore) LoadAll(ctx context.Context) (map[string]PollingStateEntry, error)
LoadAll loads all polling state entries from the database.
func (*PollingStateStore) Save ¶ added in v0.92.0
func (s *PollingStateStore) Save(ctx context.Context, resourceName, cursor string, knownHashes map[string]string) error
Save upserts a polling state entry for the given resource. If an entry with the same resource name already exists, it is updated; otherwise a new one is created.
type RecordParams ¶ added in v0.99.0
type RecordParams = notify.RecordParams
RecordParams is an alias of notify.RecordParams.
type ResourceChainStore ¶ added in v0.92.0
type ResourceChainStore struct {
// contains filtered or unexported fields
}
ResourceChainStore provides query methods for resource tag and lineage lookups.
func NewResourceChainStore ¶ added in v0.92.0
func NewResourceChainStore(client *gen.Client) *ResourceChainStore
NewResourceChainStore creates a ResourceChainStore with the given ent client.
func (*ResourceChainStore) FindNodeRelations ¶ added in v0.92.0
func (s *ResourceChainStore) FindNodeRelations(ctx context.Context, appName, capability, entityID, pipelineName string, since time.Duration) ([]schema.ResourceEdge, []schema.ResourceEdge, error)
FindNodeRelations returns upstream and downstream edges for a node identified by (appName, capability, entityID). Optional pipelineName filter and time window.
func (*ResourceChainStore) FindRelations ¶ added in v0.92.0
func (s *ResourceChainStore) FindRelations(ctx context.Context, appName, entityID string) (*schema.ResourceRelations, error)
FindRelations returns upstream and downstream resource references for a specific resource identified by appName + entity_id.
func (*ResourceChainStore) FindResourceLinks ¶ added in v0.92.0
func (s *ResourceChainStore) FindResourceLinks(ctx context.Context, eventIDs []string) ([]*gen.ResourceLink, error)
FindResourceLinks returns all links involving any of the given event IDs, either as source or target.
func (*ResourceChainStore) FindResourcesByTag ¶ added in v0.92.0
func (s *ResourceChainStore) FindResourcesByTag(ctx context.Context, key, value string, limit int, cursor string) ([]*gen.DataEvent, string, error)
FindResourcesByTag returns DataEvents matching a tag key-value pair, ordered by created_at descending. Supports limit + opaque cursor pagination.
func (*ResourceChainStore) SearchNodes ¶ added in v0.92.0
func (s *ResourceChainStore) SearchNodes(ctx context.Context, query string, limit int, cursor string) ([]schema.ResourceRef, string, error)
SearchNodes returns distinct (app, capability, entity_id) tuples from resource_links where source_entity_id, target_entity_id, source_app, target_app, source_capability, or target_capability contains the query. cursor is a decimal offset into the deduplicated result stream; empty starts at 0.
type RuntimeAgentStore ¶ added in v0.99.0
type RuntimeAgentStore struct {
// contains filtered or unexported fields
}
RuntimeAgentStore persists host/runtime agent heartbeats.
func NewRuntimeAgentStore ¶ added in v0.99.0
func NewRuntimeAgentStore(client *gen.Client) *RuntimeAgentStore
NewRuntimeAgentStore creates a RuntimeAgentStore with the given ent client.
func RuntimeAgentStoreFromDB ¶ added in v0.99.0
func RuntimeAgentStoreFromDB() *RuntimeAgentStore
RuntimeAgentStoreFromDB returns a RuntimeAgentStore using the global database client.
func (*RuntimeAgentStore) Client ¶ added in v0.99.0
func (s *RuntimeAgentStore) Client() *gen.Client
Client returns the underlying ent client.
func (*RuntimeAgentStore) CreateAgent ¶ added in v0.99.0
CreateAgent persists a new agent.
func (*RuntimeAgentStore) GetAgentByHostid ¶ added in v0.99.0
func (s *RuntimeAgentStore) GetAgentByHostid(ctx context.Context, uid types.Uid, topic, hostid string) (*gen.Agent, error)
GetAgentByHostid returns the agent by hostid.
type UpdateChatScheduledTaskParams ¶ added in v0.94.0
type UpdateChatScheduledTaskParams struct {
Name *string
Cron *string
RunAt *time.Time
Prompt *string
State *string
LastRunAt *time.Time
NextRunAt *time.Time
}
UpdateChatScheduledTaskParams carries partial updates for a scheduled task row.
type UpdateChatScheduledTaskRunParams ¶ added in v0.94.0
type UpdateChatScheduledTaskRunParams struct {
State *string
Reply *string
Error *string
FinishedAt *time.Time
}
UpdateChatScheduledTaskRunParams carries partial updates for one run row.
type UserStore ¶ added in v0.99.0
type UserStore struct {
// contains filtered or unexported fields
}
UserStore persists users and platform user mappings.
func NewUserStore ¶ added in v0.99.0
NewUserStore creates a UserStore with the given ent client.
func UserStoreFromDB ¶ added in v0.99.0
func UserStoreFromDB() *UserStore
UserStoreFromDB returns a UserStore using the global database client.
func (*UserStore) CreatePlatformUser ¶ added in v0.99.0
CreatePlatformUser creates a platform user record.
func (*UserStore) GetPlatformUserByFlag ¶ added in v0.99.0
func (s *UserStore) GetPlatformUserByFlag(ctx context.Context, flag string) (*gen.PlatformUser, error)
GetPlatformUserByFlag returns the platform user by flag.
func (*UserStore) GetPlatformUsersByUserId ¶ added in v0.99.0
func (s *UserStore) GetPlatformUsersByUserId(ctx context.Context, userId int64) ([]*gen.PlatformUser, error)
GetPlatformUsersByUserId returns the platform users by user id.
func (*UserStore) GetUserByFlag ¶ added in v0.99.0
GetUserByFlag returns the user by flag.
func (*UserStore) GetUserById ¶ added in v0.99.0
GetUserById returns the user with the given id.
func (*UserStore) UpdatePlatformUser ¶ added in v0.99.0
UpdatePlatformUser updates the platform user.
func (*UserStore) UserCreate ¶ added in v0.99.0
UserCreate creates a new user.
func (*UserStore) UserDelete ¶ added in v0.99.0
UserDelete soft- or hard-deletes the user for uid.
func (*UserStore) UserGetAll ¶ added in v0.99.0
UserGetAll returns users, optionally filtered by uid flags.
type WebAccountStore ¶ added in v0.99.0
type WebAccountStore struct {
// contains filtered or unexported fields
}
WebAccountStore persists web UI login accounts.
func NewWebAccountStore ¶ added in v0.99.0
func NewWebAccountStore(client *gen.Client) *WebAccountStore
NewWebAccountStore creates a WebAccountStore with the given ent client.
func WebAccountStoreFromDB ¶ added in v0.99.0
func WebAccountStoreFromDB() *WebAccountStore
WebAccountStoreFromDB returns a WebAccountStore using the global database client.
func (*WebAccountStore) Client ¶ added in v0.99.0
func (s *WebAccountStore) Client() *gen.Client
Client returns the underlying ent client.
func (*WebAccountStore) Count ¶ added in v0.99.0
func (s *WebAccountStore) Count(ctx context.Context) (int, error)
Count returns the number of web accounts.
func (*WebAccountStore) CreateFirstAccount ¶ added in v0.99.0
func (s *WebAccountStore) CreateFirstAccount(ctx context.Context, in CreateAccountInput) (*gen.WebAccount, error)
CreateFirstAccount creates the first web account when none exist (setup / migration). It runs in a transaction: COUNT must be 0, then insert web_accounts + users.
func (*WebAccountStore) DeleteWebSessionsForUID ¶ added in v0.99.0
DeleteWebSessionsForUID removes parameter rows for web sessions belonging to uid.
func (*WebAccountStore) EnableTOTP ¶ added in v0.99.0
func (s *WebAccountStore) EnableTOTP(ctx context.Context, username string, ciphertext, nonce []byte, backupHashes []string, lastStep int64) error
EnableTOTP stores encrypted secret, backup hashes, marks enabled, and records the enroll step.
func (*WebAccountStore) EnsureUser ¶ added in v0.99.0
func (s *WebAccountStore) EnsureUser(ctx context.Context, uid, username string) error
EnsureUser creates a users row for uid if missing.
func (*WebAccountStore) GetByUID ¶ added in v0.99.0
func (s *WebAccountStore) GetByUID(ctx context.Context, uid string) (*gen.WebAccount, error)
GetByUID returns the account for uid.
func (*WebAccountStore) GetByUsername ¶ added in v0.99.0
func (s *WebAccountStore) GetByUsername(ctx context.Context, username string) (*gen.WebAccount, error)
GetByUsername returns the account for username.
func (*WebAccountStore) ResetTOTP ¶ added in v0.99.0
func (s *WebAccountStore) ResetTOTP(ctx context.Context, username string) error
ResetTOTP clears TOTP secret, disables 2FA, and clears backup codes.
func (*WebAccountStore) RevokeLegacyWebSessions ¶ added in v0.99.0
func (s *WebAccountStore) RevokeLegacyWebSessions(ctx context.Context) (int, error)
RevokeLegacyWebSessions deletes web sessions that are not full authenticated sessions. This clears pre-2FA legacy cookies (missing kind) and any pending sessions on startup.
func (*WebAccountStore) SetBackupCodeHashes ¶ added in v0.99.0
func (s *WebAccountStore) SetBackupCodeHashes(ctx context.Context, username string, hashes []string) error
SetBackupCodeHashes replaces backup code hashes.
func (*WebAccountStore) SetTOTPLastStep ¶ added in v0.99.0
SetTOTPLastStep records the last accepted TOTP time step (replay protection).
func (*WebAccountStore) SoleAccount ¶ added in v0.99.0
func (s *WebAccountStore) SoleAccount(ctx context.Context) (*gen.WebAccount, bool, error)
SoleAccount returns the only web account when exactly one exists. Homelab installs typically have a single admin; platform chat identities can share it.
func (*WebAccountStore) UpdatePasswordHash ¶ added in v0.99.0
func (s *WebAccountStore) UpdatePasswordHash(ctx context.Context, username, hash string) error
UpdatePasswordHash sets a new password hash.
type WorkflowCatalogAdapter ¶ added in v0.99.0
type WorkflowCatalogAdapter struct {
S *WorkflowStore
}
WorkflowCatalogAdapter adapts WorkflowStore to workflow.Catalog (model DTOs).
func (WorkflowCatalogAdapter) ApplyDefinition ¶ added in v0.99.0
func (a WorkflowCatalogAdapter) ApplyDefinition(ctx context.Context, meta *types.WorkflowMetadata) (*model.Workflow, error)
ApplyDefinition implements workflow.Catalog.
func (WorkflowCatalogAdapter) DeleteDefinitionByName ¶ added in v0.99.0
func (a WorkflowCatalogAdapter) DeleteDefinitionByName(ctx context.Context, name string) error
DeleteDefinitionByName implements workflow.Catalog.
func (WorkflowCatalogAdapter) GetMetadata ¶ added in v0.99.0
func (a WorkflowCatalogAdapter) GetMetadata(ctx context.Context, name string) (*types.WorkflowMetadata, error)
GetMetadata implements workflow.DefinitionStore by loading gen rows and mapping to types.
func (WorkflowCatalogAdapter) ListDefinitions ¶ added in v0.99.0
ListDefinitions implements workflow.Catalog.
func (WorkflowCatalogAdapter) ListRunsByName ¶ added in v0.99.0
func (a WorkflowCatalogAdapter) ListRunsByName(ctx context.Context, name string) ([]*model.WorkflowRun, error)
ListRunsByName implements workflow.Catalog.
type WorkflowDefinitionDTO ¶ added in v0.98.0
type WorkflowDefinitionDTO struct {
Workflow *gen.Workflow
Tasks []*gen.WorkflowTask
Triggers []*gen.WorkflowTrigger
}
WorkflowDefinitionDTO is a workflow definition with its tasks and triggers.
type WorkflowRunStore ¶ added in v0.92.0
type WorkflowRunStore struct {
// contains filtered or unexported fields
}
WorkflowRunStore persists workflow runs, step runs, and checkpoint data.
func NewWorkflowRunStore ¶ added in v0.92.0
func NewWorkflowRunStore(client *gen.Client) *WorkflowRunStore
NewWorkflowRunStore creates a WorkflowRunStore backed by the given ent client.
func (*WorkflowRunStore) CreateRun ¶ added in v0.92.0
func (s *WorkflowRunStore) CreateRun(ctx context.Context, workflowID int64, workflowName, workflowFile, triggerType string, triggerInfo, inputParams map[string]any) (*gen.WorkflowRun, error)
CreateRun inserts a new workflow run record. workflowID may be 0 when unknown; workflowFile is "" or "db" for DB-backed definitions.
func (*WorkflowRunStore) CreateStepRun ¶ added in v0.92.0
func (s *WorkflowRunStore) CreateStepRun(ctx context.Context, runID int64, stepID, stepName, action, actionType string, params map[string]any, attempt int) (*gen.WorkflowStepRun, error)
CreateStepRun inserts a new workflow step run record.
func (*WorkflowRunStore) GetCheckpoint ¶ added in v0.92.0
GetCheckpoint loads the checkpoint data for a workflow run.
func (*WorkflowRunStore) GetIncompleteRuns ¶ added in v0.92.0
func (s *WorkflowRunStore) GetIncompleteRuns(ctx context.Context) ([]*gen.WorkflowRun, error)
GetIncompleteRuns returns workflow runs that are still running and may need recovery.
func (*WorkflowRunStore) GetRun ¶ added in v0.92.0
func (s *WorkflowRunStore) GetRun(ctx context.Context, runID int64) (*gen.WorkflowRun, error)
GetRun returns a workflow run by ID.
func (*WorkflowRunStore) GetStepRunsByRunID ¶ added in v0.98.0
func (s *WorkflowRunStore) GetStepRunsByRunID(ctx context.Context, runID int64) ([]*gen.WorkflowStepRun, error)
GetStepRunsByRunID returns all step runs for a workflow run, ordered by ID.
func (*WorkflowRunStore) SaveCheckpoint ¶ added in v0.92.0
SaveCheckpoint persists the intermediate workflow run state.
func (*WorkflowRunStore) UpdateRunHeartbeat ¶ added in v0.92.0
func (s *WorkflowRunStore) UpdateRunHeartbeat(ctx context.Context, runID int64) error
UpdateRunHeartbeat refreshes the last_heartbeat timestamp for a running workflow.
func (*WorkflowRunStore) UpdateRunStatus ¶ added in v0.92.0
func (s *WorkflowRunStore) UpdateRunStatus(ctx context.Context, runID int64, status int, errMsg string) error
UpdateRunStatus updates the status, error, and completed_at of a workflow run.
func (*WorkflowRunStore) UpdateStepRun ¶ added in v0.92.0
func (s *WorkflowRunStore) UpdateStepRun(ctx context.Context, stepRunID int64, status int, result map[string]any, errMsg string, attempt int) error
UpdateStepRun updates the status, result, error, and attempt count of a workflow step run. completed_at is only set for terminal states (Done, Failed).
type WorkflowRunStoreAdapter ¶ added in v0.99.0
type WorkflowRunStoreAdapter struct {
S *WorkflowRunStore
}
WorkflowRunStoreAdapter adapts WorkflowRunStore to workflow.WorkflowRunStore.
func (WorkflowRunStoreAdapter) CreateRun ¶ added in v0.99.0
func (a WorkflowRunStoreAdapter) CreateRun(ctx context.Context, workflowID int64, workflowName, workflowFile, triggerType string, triggerInfo, inputParams map[string]any) (*model.WorkflowRun, error)
CreateRun implements workflow.WorkflowRunStore.
func (WorkflowRunStoreAdapter) CreateStepRun ¶ added in v0.99.0
func (a WorkflowRunStoreAdapter) CreateStepRun(ctx context.Context, runID int64, stepID, stepName, action, actionType string, params map[string]any, attempt int) (*model.WorkflowStepRun, error)
CreateStepRun implements workflow.WorkflowRunStore.
func (WorkflowRunStoreAdapter) GetCheckpoint ¶ added in v0.99.0
GetCheckpoint implements workflow.WorkflowRunStore.
func (WorkflowRunStoreAdapter) GetIncompleteRuns ¶ added in v0.99.0
func (a WorkflowRunStoreAdapter) GetIncompleteRuns(ctx context.Context) ([]*model.WorkflowRun, error)
GetIncompleteRuns implements workflow.WorkflowRunStore.
func (WorkflowRunStoreAdapter) GetRun ¶ added in v0.99.0
func (a WorkflowRunStoreAdapter) GetRun(ctx context.Context, runID int64) (*model.WorkflowRun, error)
GetRun implements workflow.WorkflowRunStore.
func (WorkflowRunStoreAdapter) SaveCheckpoint ¶ added in v0.99.0
SaveCheckpoint implements workflow.WorkflowRunStore.
func (WorkflowRunStoreAdapter) UpdateRunHeartbeat ¶ added in v0.99.0
func (a WorkflowRunStoreAdapter) UpdateRunHeartbeat(ctx context.Context, runID int64) error
UpdateRunHeartbeat implements workflow.WorkflowRunStore.
func (WorkflowRunStoreAdapter) UpdateRunStatus ¶ added in v0.99.0
func (a WorkflowRunStoreAdapter) UpdateRunStatus(ctx context.Context, runID int64, status int, errMsg string) error
UpdateRunStatus implements workflow.WorkflowRunStore.
type WorkflowStore ¶ added in v0.98.0
type WorkflowStore struct {
// contains filtered or unexported fields
}
WorkflowStore persists normalized workflow definitions (tasks + triggers).
func NewWorkflowStore ¶ added in v0.98.0
func NewWorkflowStore(client *gen.Client) *WorkflowStore
NewWorkflowStore creates a WorkflowStore backed by the given ent client.
func WorkflowStoreFromDB ¶ added in v0.99.0
func WorkflowStoreFromDB() *WorkflowStore
WorkflowStoreFromDB returns a WorkflowStore using the global database client.
func (*WorkflowStore) ApplyDefinition ¶ added in v0.98.0
func (s *WorkflowStore) ApplyDefinition(ctx context.Context, meta *types.WorkflowMetadata) (*gen.Workflow, error)
ApplyDefinition upserts a workflow definition by name and replaces all tasks and triggers.
func (*WorkflowStore) DeleteDefinitionByName ¶ added in v0.98.0
func (s *WorkflowStore) DeleteDefinitionByName(ctx context.Context, name string) error
DeleteDefinitionByName deletes a workflow and its tasks/triggers. Existing runs are kept; their workflow_id is set to NULL.
func (*WorkflowStore) GetDefinitionByName ¶ added in v0.98.0
func (s *WorkflowStore) GetDefinitionByName(ctx context.Context, name string) (*WorkflowDefinitionDTO, error)
GetDefinitionByName returns a workflow definition with tasks and triggers.
func (*WorkflowStore) LatestRunStartedAtByNames ¶ added in v0.98.0
func (s *WorkflowStore) LatestRunStartedAtByNames(ctx context.Context, names []string) (map[string]time.Time, error)
LatestRunStartedAtByNames returns the latest started_at for each workflow name. Names without runs are omitted from the result.
func (*WorkflowStore) ListDefinitions ¶ added in v0.98.0
ListDefinitions returns all workflow definition rows (without tasks/triggers).
func (*WorkflowStore) ListRunsByName ¶ added in v0.98.0
func (s *WorkflowStore) ListRunsByName(ctx context.Context, name string) ([]*gen.WorkflowRun, error)
ListRunsByName returns workflow runs matching the given workflow name.
func (*WorkflowStore) ListTriggers ¶ added in v0.98.0
func (s *WorkflowStore) ListTriggers(ctx context.Context) ([]*gen.WorkflowTrigger, error)
ListTriggers returns all workflow trigger rows.
func (*WorkflowStore) RunLatencyStatsByNames ¶ added in v0.98.1
func (s *WorkflowStore) RunLatencyStatsByNames(ctx context.Context, names []string, since time.Time) (map[string]types.RunLatencyStats, error)
RunLatencyStatsByNames returns success rate and P50/P95 duration stats per workflow name. Only completed runs with started_at >= since (when since is non-zero) are included. Names without qualifying runs are omitted from the result.
func (*WorkflowStore) SetEnabled ¶ added in v0.98.0
func (s *WorkflowStore) SetEnabled(ctx context.Context, name string, enabled bool) (*gen.Workflow, error)
SetEnabled updates the enabled flag for a workflow definition by name.
func (*WorkflowStore) SetTriggerEnabled ¶ added in v0.98.0
func (s *WorkflowStore) SetTriggerEnabled(ctx context.Context, workflowName string, triggerID int64, enabled bool) (*gen.WorkflowTrigger, error)
SetTriggerEnabled updates the enabled flag for one trigger belonging to a named workflow.
func (*WorkflowStore) WorkflowStats ¶ added in v0.98.2
func (s *WorkflowStore) WorkflowStats(ctx context.Context, name string, since time.Time, groupBy string) (*types.WorkflowStats, error)
WorkflowStats returns aggregated workflow run statistics for chart rendering. name empty = all workflows. since zero = no time filter. groupBy = "day"|"week"|"month".
Source Files
¶
- agent.go
- audit.go
- chat.go
- clip.go
- dto.go
- event.go
- file.go
- function.go
- function_adapter.go
- function_stats.go
- gateway.go
- hub.go
- life.go
- life_execution.go
- life_rewards.go
- life_stats.go
- llm_usage.go
- message.go
- module_data.go
- notify.go
- notify_config.go
- page_data.go
- pipeline.go
- pipeline_adapter.go
- platform.go
- polling.go
- query_limits.go
- resource_chain.go
- run_latency_stats.go
- runtime_agent.go
- store.go
- user.go
- web_account.go
- workflow.go
- workflow_adapter.go
- workflow_run.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package ent provides the Ent ORM client initialization and database connectivity.
|
Package ent provides the Ent ORM client initialization and database connectivity. |
|
schema
Package schema provides Ent ORM schema definitions.
|
Package schema provides Ent ORM schema definitions. |
|
Package postgres implements the PostgreSQL storage adapter.
|
Package postgres implements the PostgreSQL storage adapter. |
|
Package sqlitetest opens in-memory SQLite databases for unit tests using modernc.org/sqlite.
|
Package sqlitetest opens in-memory SQLite databases for unit tests using modernc.org/sqlite. |