Documentation
¶
Overview ¶
Package firestore provides Firestore-backed implementations of AILANG storage interfaces.
Index ¶
- Constants
- type Client
- func (c *Client) Batch() *firestore.WriteBatch
- func (c *Client) Close() error
- func (c *Client) Collection(name string) *firestore.CollectionRef
- func (c *Client) Doc(collection, id string) *firestore.DocumentRef
- func (c *Client) GetAll(ctx context.Context, refs []*firestore.DocumentRef) ([]*firestore.DocumentSnapshot, error)
- func (c *Client) RunTransaction(ctx context.Context, fn func(context.Context, *firestore.Transaction) error) error
- type CoordinatorStore
- func (s *CoordinatorStore) Close() error
- func (s *CoordinatorStore) CreateApprovalRequest(ctx context.Context, req *coordinator.ApprovalRequestRecord) error
- func (s *CoordinatorStore) CreateTask(ctx context.Context, task *coordinator.TaskRecord) error
- func (s *CoordinatorStore) DeleteOldTasks(ctx context.Context, olderThan time.Duration) (int, error)
- func (s *CoordinatorStore) DeleteTask(ctx context.Context, id string) error
- func (s *CoordinatorStore) FindDuplicateTask(ctx context.Context, fingerprint uint64, _ float64) (*coordinator.TaskRecord, error)
- func (s *CoordinatorStore) GetApprovalRequest(ctx context.Context, id string) (*coordinator.ApprovalRequestRecord, error)
- func (s *CoordinatorStore) GetApprovalRequestByTask(ctx context.Context, taskID string) (*coordinator.ApprovalRequestRecord, error)
- func (s *CoordinatorStore) GetApprovalRequestByTaskAnyStatus(ctx context.Context, taskID string) (*coordinator.ApprovalRequestRecord, error)
- func (s *CoordinatorStore) GetCostByProvider() (map[string]float64, error)
- func (s *CoordinatorStore) GetTask(ctx context.Context, id string) (*coordinator.TaskRecord, error)
- func (s *CoordinatorStore) GetTaskAgentInfo(ctx context.Context, taskID string) (agentID, inbox, title string, err error)
- func (s *CoordinatorStore) GetTaskEvents(ctx context.Context, taskID string, limit int) ([]*coordinator.TaskEventRecord, error)
- func (s *CoordinatorStore) GetTaskStats(ctx context.Context) (*coordinator.TaskStats, error)
- func (s *CoordinatorStore) GetTasksByGithubIssue(ctx context.Context, issueNum int) ([]*coordinator.TaskRecord, error)
- func (s *CoordinatorStore) GetTasksByStage(ctx context.Context, stage coordinator.TaskStage) ([]*coordinator.TaskRecord, error)
- func (s *CoordinatorStore) ListApprovedMergeHandoffsWithoutTrigger(ctx context.Context) ([]*coordinator.ApprovalRequestRecord, error)
- func (s *CoordinatorStore) ListPendingApprovals(ctx context.Context) ([]*coordinator.ApprovalRequestRecord, error)
- func (s *CoordinatorStore) ListResolvedApprovals(ctx context.Context, limit int) ([]*coordinator.ApprovalRequestRecord, error)
- func (s *CoordinatorStore) ListTasks(ctx context.Context, filter *coordinator.TaskFilter) ([]*coordinator.TaskRecord, error)
- func (s *CoordinatorStore) MarkApprovalHandoffsTriggered(ctx context.Context, taskID string) error
- func (s *CoordinatorStore) MarkTaskCancelled(ctx context.Context, id string) error
- func (s *CoordinatorStore) MarkTaskCompleted(ctx context.Context, id string, result *coordinator.ExecuteResult) error
- func (s *CoordinatorStore) MarkTaskFailed(ctx context.Context, id string, taskErr error) error
- func (s *CoordinatorStore) MarkTaskPendingApproval(ctx context.Context, ...) error
- func (s *CoordinatorStore) MarkTaskQueued(ctx context.Context, id string) error
- func (s *CoordinatorStore) MarkTaskRejected(ctx context.Context, id string) error
- func (s *CoordinatorStore) MarkTaskRunning(ctx context.Context, id, provider, worktreeID string) error
- func (s *CoordinatorStore) RecoverStaleTasks(ctx context.Context, staleThreshold time.Duration) (int, error)
- func (s *CoordinatorStore) RequeueTask(ctx context.Context, id string) error
- func (s *CoordinatorStore) ResetTaskToPending(ctx context.Context, id string) error
- func (s *CoordinatorStore) ResolveApprovalRequest(ctx context.Context, id, resolveStatus, resolvedBy string) error
- func (s *CoordinatorStore) ResolveApprovalRequestByTask(ctx context.Context, taskID, resolveStatus, resolvedBy string) error
- func (s *CoordinatorStore) RetryAllFailedTasks(ctx context.Context) (int, error)
- func (s *CoordinatorStore) SetTaskDesignDocPath(ctx context.Context, id, path string) error
- func (s *CoordinatorStore) SetTaskFingerprint(ctx context.Context, id string, fingerprint uint64) error
- func (s *CoordinatorStore) SetTaskGithubIssue(ctx context.Context, id string, issueNum int) error
- func (s *CoordinatorStore) SetTaskSprintPlanPath(ctx context.Context, id, path string) error
- func (s *CoordinatorStore) SetTaskStage(ctx context.Context, id string, stage coordinator.TaskStage) error
- func (s *CoordinatorStore) SetTaskThreadID(ctx context.Context, id, threadID string) error
- func (s *CoordinatorStore) StartCostSync(ctx context.Context)
- func (s *CoordinatorStore) StopCostSync()
- func (s *CoordinatorStore) StoreTaskEvent(ctx context.Context, event *coordinator.TaskEventRecord) error
- func (s *CoordinatorStore) UpdateTask(ctx context.Context, task *coordinator.TaskRecord) error
- func (s *CoordinatorStore) UpdateTaskChainInfo(ctx context.Context, id, chainID, stageID string) error
- func (s *CoordinatorStore) UpdateTaskMetrics(ctx context.Context, id string, peakCPU, peakMemory float64) error
- type MessagingStore
- func (s *MessagingStore) ApplyDuplicates(groups []messaging.DuplicateGroup, runID string) error
- func (s *MessagingStore) ApproveApproval(approvalID, reviewedBy string, reviewNotes string, tokenDuration time.Duration) error
- func (s *MessagingStore) ClaimMessage(messageID, claimedBy string) error
- func (s *MessagingStore) CleanupInboxMessages(olderThan time.Duration, expiredOnly bool) (int64, error)
- func (s *MessagingStore) CleanupOldHistory(retentionDays int) (int64, int64, error)
- func (s *MessagingStore) ClearDuplicateMarker(msgID string) error
- func (s *MessagingStore) Close() error
- func (s *MessagingStore) CountInboxMessagesByStatus(inbox string) (map[string]int64, error)
- func (s *MessagingStore) CreateApproval(threadID, instanceID string, effectDelta *messaging.EffectDelta, ...) (*messaging.Approval, error)
- func (s *MessagingStore) CreateMessage(threadID, fromType, fromID, toType, toID, kind, content, metadataJSON string) (*messaging.Message, error)
- func (s *MessagingStore) CreateThread(title, createdByType, createdByID, targetAgent string) (*messaging.Thread, error)
- func (s *MessagingStore) CreateThreadWithWorkspace(title, createdByType, createdByID, targetAgent, workspace string) (*messaging.Thread, error)
- func (s *MessagingStore) DeleteThread(threadID string) error
- func (s *MessagingStore) FindDuplicates(inbox string, threshold float64) ([]messaging.DuplicateGroup, error)
- func (s *MessagingStore) FindMessageByPrefix(prefix string) (string, error)
- func (s *MessagingStore) FindSimilar(msgID string, threshold float64, limit int) ([]messaging.SearchHit, error)
- func (s *MessagingStore) ForwardInboxMessage(id string, toInbox string) error
- func (s *MessagingStore) GetActiveAgents() ([]messaging.ActiveAgent, error)
- func (s *MessagingStore) GetAgentMetrics(agentID string) (*messaging.AggregatedMetrics, error)
- func (s *MessagingStore) GetAgentStats(agentID string) (*messaging.AgentStats, error)
- func (s *MessagingStore) GetAggregatedExecutionStats() (*messaging.ExecutionStats, error)
- func (s *MessagingStore) GetApproval(approvalID string) (*messaging.Approval, error)
- func (s *MessagingStore) GetApprovalHistory(threadID string, limit int) ([]messaging.ApprovalHistoryEntry, error)
- func (s *MessagingStore) GetApprovalsByStatus(approvalStatus string, limit int) ([]messaging.Approval, error)
- func (s *MessagingStore) GetDistinctWorkspaces() ([]string, error)
- func (s *MessagingStore) GetExecutionStatsByThread(threadID string) (*messaging.ExecutionStats, error)
- func (s *MessagingStore) GetGlobalMetrics() (*messaging.AggregatedMetrics, error)
- func (s *MessagingStore) GetHierarchy() (*messaging.HierarchyResponse, error)
- func (s *MessagingStore) GetInboxMessage(id string) (*messaging.InboxMessage, error)
- func (s *MessagingStore) GetInstanceHistory(agentID string, limit int) ([]messaging.InstanceHistoryEntry, error)
- func (s *MessagingStore) GetKnownAgents() ([]messaging.AgentInfo, error)
- func (s *MessagingStore) GetMessageFlowEdges() ([]messaging.MessageFlowEdge, error)
- func (s *MessagingStore) GetMessages(toType, toID, deliveryState string) ([]messaging.Message, error)
- func (s *MessagingStore) GetMessagesFromSeq(threadID string, fromSeq int, limit int) ([]messaging.Message, error)
- func (s *MessagingStore) GetMetrics(scopeType, scopeID string) (*messaging.AggregatedMetrics, error)
- func (s *MessagingStore) GetMetricsTrends(scopeType, scopeID, period string, limit int) ([]map[string]interface{}, error)
- func (s *MessagingStore) GetOrCreateThreadWithWorkspace(title, createdByType, createdByID, targetAgent, workspace string) (*messaging.Thread, bool, error)
- func (s *MessagingStore) GetThread(threadID string) (*messaging.Thread, error)
- func (s *MessagingStore) GetThreadAggregateStats() (*messaging.ThreadAggregateStats, error)
- func (s *MessagingStore) GetThreadByTitleAndAgent(title, targetAgent string) (*messaging.Thread, error)
- func (s *MessagingStore) GetThreadMetrics(threadID string) (*messaging.AggregatedMetrics, error)
- func (s *MessagingStore) GetThreadWorkspace(threadID string) (string, error)
- func (s *MessagingStore) GetThreadsByStatus(threadStatus string, limit int) ([]messaging.Thread, error)
- func (s *MessagingStore) GetThreadsFiltered(filter messaging.ThreadFilter) ([]messaging.Thread, error)
- func (s *MessagingStore) InboxMessageExistsByGitHub(repo string, issueNumber int) (bool, error)
- func (s *MessagingStore) InboxMessageExistsByTitle(inbox string, title string) (string, error)
- func (s *MessagingStore) InsertInboxMessage(msg *messaging.InboxMessage) error
- func (s *MessagingStore) InsertInboxMessageWithContext(ctx context.Context, msg *messaging.InboxMessage) error
- func (s *MessagingStore) ListInboxMessages(opts messaging.InboxListOptions) ([]messaging.InboxMessage, error)
- func (s *MessagingStore) MarkAllAsAcked(toType, toID string) (int64, error)
- func (s *MessagingStore) MarkAllInboxMessagesRead(inbox string) (int64, error)
- func (s *MessagingStore) MarkAsAcked(messageID string) error
- func (s *MessagingStore) MarkAsUnacked(messageID string) error
- func (s *MessagingStore) MarkInboxMessageRead(id string) error
- func (s *MessagingStore) MarkInboxMessageUnread(id string) error
- func (s *MessagingStore) NewThreadFilter(threadStatus, workspace string, limit int) messaging.ThreadFilter
- func (s *MessagingStore) RecordAgentInstance(agentID, instanceID string) error
- func (s *MessagingStore) RecordApprovalHistory(approvalID, threadID, agentID, action, actor, proposal, impact string, ...) error
- func (s *MessagingStore) RecordInstanceEnd(instanceID string, exitCode int, totalTokens, totalCostCents, threadCount int) error
- func (s *MessagingStore) RecordInstanceStart(agentID, instanceID string) error
- func (s *MessagingStore) RecordMetrics(threadID, agentID string, stats *messaging.MessageExecutionStats) error
- func (s *MessagingStore) RegisterAgent(agentID, label, agentStatus string) error
- func (s *MessagingStore) RejectApproval(approvalID, reviewedBy string, reviewNotes string) error
- func (s *MessagingStore) SemanticSearch(opts messaging.SearchOptions) ([]messaging.SearchHit, error)
- func (s *MessagingStore) SetThreadTargetAgent(threadID, targetAgent string) error
- func (s *MessagingStore) SetThreadWorkspace(threadID, workspace string) error
- func (s *MessagingStore) Subscribe(instanceID, threadID string) error
- func (s *MessagingStore) UpdateAckSeq(instanceID, threadID string, ackSeq int) error
- func (s *MessagingStore) UpdateAgentStatus(agentID, agentStatus string) error
- func (s *MessagingStore) UpdateInboxMessageGitHub(messageID string, issueNumber int, repo string) error
- func (s *MessagingStore) UpdateMessageEmbedding(msgID string, embedding []float32, model string) error
- func (s *MessagingStore) UpdateMessageEnvelope(msgID string, env *messaging.Envelope, overwrite bool) error
- func (s *MessagingStore) UpdateThreadTitle(threadID, title string) error
- type ObservatoryStore
- func (s *ObservatoryStore) BackfillSpansWorkspace(ctx context.Context, sessionID, workspace string) (int64, error)
- func (s *ObservatoryStore) Close() error
- func (s *ObservatoryStore) CountChatMessages(ctx context.Context, q obs.ChatMessageQuery) (total int, withTaskID int, err error)
- func (s *ObservatoryStore) CreateAgentAssignment(ctx context.Context, a *obs.AgentAssignment) error
- func (s *ObservatoryStore) CreateChain(ctx context.Context, req *obs.ChainCreateRequest) (*obs.ExecutionChain, error)
- func (s *ObservatoryStore) CreateMessage(ctx context.Context, m *obs.Message) error
- func (s *ObservatoryStore) CreateMetric(ctx context.Context, m *obs.Metric) error
- func (s *ObservatoryStore) CreateSpan(ctx context.Context, span *obs.Span) error
- func (s *ObservatoryStore) CreateSpanEvent(ctx context.Context, e *obs.SpanEvent) error
- func (s *ObservatoryStore) CreateStage(ctx context.Context, req *obs.StageCreateRequest) (*obs.ChainStage, error)
- func (s *ObservatoryStore) CreateTask(ctx context.Context, t *obs.Task) error
- func (s *ObservatoryStore) CreateWorkspace(ctx context.Context, w *obs.Workspace) error
- func (s *ObservatoryStore) DeleteAgentAssignment(ctx context.Context, id string) error
- func (s *ObservatoryStore) DeleteMessage(ctx context.Context, id string) error
- func (s *ObservatoryStore) DeleteSpan(ctx context.Context, id string) error
- func (s *ObservatoryStore) DeleteSpanEvent(ctx context.Context, id int64) error
- func (s *ObservatoryStore) DeleteTask(ctx context.Context, id string) error
- func (s *ObservatoryStore) DeleteWorkspace(ctx context.Context, id string) error
- func (s *ObservatoryStore) FindLatestUnfinishedTool(ctx context.Context, sessionID, toolName string) (string, error)
- func (s *ObservatoryStore) GetAgentAssignment(ctx context.Context, id string) (*obs.AgentAssignment, error)
- func (s *ObservatoryStore) GetAgentStats(ctx context.Context, agentID string) (*obs.AgentStats, error)
- func (s *ObservatoryStore) GetChain(ctx context.Context, id string, opts obs.ChainReadOptions) (*obs.ExecutionChain, error)
- func (s *ObservatoryStore) GetChainByGitHubIssue(ctx context.Context, repo string, issueNumber int) (*obs.ExecutionChain, error)
- func (s *ObservatoryStore) GetChainByMessageID(ctx context.Context, messageID string) (*obs.ExecutionChain, error)
- func (s *ObservatoryStore) GetChainByTaskID(ctx context.Context, taskID string) (*obs.ExecutionChain, error)
- func (s *ObservatoryStore) GetChainStages(ctx context.Context, chainID string, opts obs.ChainReadOptions) ([]*obs.ChainStage, error)
- func (s *ObservatoryStore) GetChainStats(ctx context.Context) (*obs.ChainStats, error)
- func (s *ObservatoryStore) GetChainStatsByAgent(ctx context.Context, createdAfter *time.Time) ([]*obs.AgentStatsResult, error)
- func (s *ObservatoryStore) GetChainStatusCounts(ctx context.Context, createdAfter *time.Time) (*obs.ChainStatusCounts, error)
- func (s *ObservatoryStore) GetChatMessagesBySession(ctx context.Context, sessionID string, startTime, endTime time.Time) ([]*obs.ChatMessage, error)
- func (s *ObservatoryStore) GetChatMessagesByTaskID(ctx context.Context, taskID string) ([]*obs.ChatMessage, error)
- func (s *ObservatoryStore) GetExecTaskHierarchy(ctx context.Context, limit int) ([]*obs.ExecTaskNode, error)
- func (s *ObservatoryStore) GetExecTaskHierarchyWithMessages(ctx context.Context, limit int) (*obs.ExecHierarchyWithMessages, error)
- func (s *ObservatoryStore) GetMessage(ctx context.Context, id string) (*obs.Message, error)
- func (s *ObservatoryStore) GetMetricsSummary(ctx context.Context) (*obs.MetricsSummary, error)
- func (s *ObservatoryStore) GetProviderComparison(ctx context.Context) ([]*obs.ProviderComparison, error)
- func (s *ObservatoryStore) GetSession(ctx context.Context, sessionID string) (*obs.Session, error)
- func (s *ObservatoryStore) GetSessionMetricsSummary(ctx context.Context, sessionID string) (*obs.SessionMetricsSummary, error)
- func (s *ObservatoryStore) GetSessionTools(ctx context.Context, sessionID string) ([]obs.SessionTool, error)
- func (s *ObservatoryStore) GetSessionWorkspace(sessionID string) (string, error)
- func (s *ObservatoryStore) GetSpan(ctx context.Context, id string) (*obs.Span, error)
- func (s *ObservatoryStore) GetSpanEvents(ctx context.Context, spanID string) ([]obs.SpanEvent, error)
- func (s *ObservatoryStore) GetSpanHierarchy(ctx context.Context, limit int) (*obs.SpanHierarchyResult, error)
- func (s *ObservatoryStore) GetSpanLitesByStageID(ctx context.Context, stageID string, limit, offset int) (*obs.SpanLitePage, error)
- func (s *ObservatoryStore) GetSpansByStageID(ctx context.Context, stageID string) ([]*obs.Span, error)
- func (s *ObservatoryStore) GetStage(ctx context.Context, id string) (*obs.ChainStage, error)
- func (s *ObservatoryStore) GetTask(ctx context.Context, id string) (*obs.Task, error)
- func (s *ObservatoryStore) GetTaskTimeline(ctx context.Context, taskID string) ([]*obs.TaskTimeline, error)
- func (s *ObservatoryStore) GetToolForSpan(ctx context.Context, sessionID, toolName string, spanTime time.Time) (*obs.SessionTool, error)
- func (s *ObservatoryStore) GetToolsByTimestampRange(ctx context.Context, start, end time.Time, toolName string) ([]obs.SessionTool, error)
- func (s *ObservatoryStore) GetTrace(ctx context.Context, traceID string) (*obs.Trace, error)
- func (s *ObservatoryStore) GetWorkspace(ctx context.Context, id string) (*obs.Workspace, error)
- func (s *ObservatoryStore) GetWorkspaceStats(ctx context.Context, id string) (*obs.WorkspaceStats, error)
- func (s *ObservatoryStore) InsertToolStart(ctx context.Context, sessionID, toolUseID, toolName, toolInput string) error
- func (s *ObservatoryStore) LinkOrphanedSpansBySession(ctx context.Context, sessionID, taskID, assignmentID string) (int64, error)
- func (s *ObservatoryStore) LinkSpanToChain(ctx context.Context, spanID, chainID, stageID string) error
- func (s *ObservatoryStore) ListAgentAssignments(ctx context.Context, taskID string) ([]*obs.AgentAssignment, error)
- func (s *ObservatoryStore) ListChains(ctx context.Context, opts obs.ChainListOptions) ([]*obs.ChainSummary, error)
- func (s *ObservatoryStore) ListMessages(ctx context.Context, opts obs.MessageListOptions) ([]*obs.Message, error)
- func (s *ObservatoryStore) ListMetrics(ctx context.Context, opts obs.MetricListOptions) ([]*obs.Metric, error)
- func (s *ObservatoryStore) ListPendingApprovals(ctx context.Context, limit int) ([]*obs.PendingApprovalInfo, error)
- func (s *ObservatoryStore) ListSpans(ctx context.Context, opts obs.SpanListOptions) ([]*obs.Span, error)
- func (s *ObservatoryStore) ListTasks(ctx context.Context, opts obs.TaskListOptions) ([]*obs.Task, error)
- func (s *ObservatoryStore) ListTraces(ctx context.Context, opts obs.TraceQuery) ([]*obs.TraceSummary, error)
- func (s *ObservatoryStore) ListWorkspaces(ctx context.Context) ([]*obs.Workspace, error)
- func (s *ObservatoryStore) LookupTaskBySessionID(ctx context.Context, sessionID string) (taskID, assignmentID, traceID string)
- func (s *ObservatoryStore) MarkMessageArchived(ctx context.Context, id string) error
- func (s *ObservatoryStore) MarkMessageRead(ctx context.Context, id string) error
- func (s *ObservatoryStore) RecalculateTaskAggregates(ctx context.Context, taskID string) error
- func (s *ObservatoryStore) UpdateAgentAssignment(ctx context.Context, a *obs.AgentAssignment) error
- func (s *ObservatoryStore) UpdateChainMetrics(ctx context.Context, id string, cost float64, tokens, turns int) error
- func (s *ObservatoryStore) UpdateChainStatus(ctx context.Context, chainID string, chainStatus obs.ChainStatus) error
- func (s *ObservatoryStore) UpdateMessage(ctx context.Context, m *obs.Message) error
- func (s *ObservatoryStore) UpdateSessionEnded(ctx context.Context, sessionID string) error
- func (s *ObservatoryStore) UpdateSpan(ctx context.Context, span *obs.Span) error
- func (s *ObservatoryStore) UpdateSpanLinks(ctx context.Context, spanID, taskID, assignmentID string) error
- func (s *ObservatoryStore) UpdateStageApproval(ctx context.Context, stageID string, approvalStatus obs.ApprovalStatus, ...) error
- func (s *ObservatoryStore) UpdateStageError(ctx context.Context, stageID, errorMessage string) error
- func (s *ObservatoryStore) UpdateStageMetrics(ctx context.Context, stageID string, cost float64, ...) error
- func (s *ObservatoryStore) UpdateStageSession(ctx context.Context, stageID, sessionID string) error
- func (s *ObservatoryStore) UpdateStageStatus(ctx context.Context, stageID string, stageStatus obs.ChainStageStatus) error
- func (s *ObservatoryStore) UpdateTask(ctx context.Context, t *obs.Task) error
- func (s *ObservatoryStore) UpdateToolEnd(ctx context.Context, toolUseID, toolResponse string, success bool) error
- func (s *ObservatoryStore) UpdateWorkspace(ctx context.Context, w *obs.Workspace) error
- func (s *ObservatoryStore) UpsertSession(ctx context.Context, sessionID, workspace, version, source string) error
- func (s *ObservatoryStore) UpsertSessionWithCorrelation(ctx context.Context, sessionID, workspace, version, source string, ...) error
- func (s *ObservatoryStore) WithSpanTTL(d time.Duration) *ObservatoryStore
Constants ¶
const DefaultSpanTTL = 7 * 24 * time.Hour // 7 days
DefaultSpanTTL is the default time-to-live for observatory span documents.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps a Firestore client with project-specific configuration.
func NewClient ¶
NewClient creates a new Firestore client using Application Default Credentials. Requires AILANG_CLOUD_PROJECT to be set.
func (*Client) Batch ¶
func (c *Client) Batch() *firestore.WriteBatch
Batch creates a new Firestore write batch.
func (*Client) Collection ¶
func (c *Client) Collection(name string) *firestore.CollectionRef
Collection returns a Firestore collection reference.
func (*Client) Doc ¶
func (c *Client) Doc(collection, id string) *firestore.DocumentRef
Doc returns a Firestore document reference.
func (*Client) GetAll ¶
func (c *Client) GetAll(ctx context.Context, refs []*firestore.DocumentRef) ([]*firestore.DocumentSnapshot, error)
GetAll retrieves multiple documents in a single batch read.
type CoordinatorStore ¶
type CoordinatorStore struct {
// contains filtered or unexported fields
}
CoordinatorStore implements coordinator.Store backed by Firestore.
func NewCoordinatorStore ¶
func NewCoordinatorStore(client *Client) *CoordinatorStore
NewCoordinatorStore creates a new Firestore-backed coordinator store.
func (*CoordinatorStore) Close ¶
func (s *CoordinatorStore) Close() error
Close stops the cost sync goroutine and closes the underlying client.
func (*CoordinatorStore) CreateApprovalRequest ¶
func (s *CoordinatorStore) CreateApprovalRequest(ctx context.Context, req *coordinator.ApprovalRequestRecord) error
func (*CoordinatorStore) CreateTask ¶
func (s *CoordinatorStore) CreateTask(ctx context.Context, task *coordinator.TaskRecord) error
func (*CoordinatorStore) DeleteOldTasks ¶
func (*CoordinatorStore) DeleteTask ¶
func (s *CoordinatorStore) DeleteTask(ctx context.Context, id string) error
func (*CoordinatorStore) FindDuplicateTask ¶
func (s *CoordinatorStore) FindDuplicateTask(ctx context.Context, fingerprint uint64, _ float64) (*coordinator.TaskRecord, error)
func (*CoordinatorStore) GetApprovalRequest ¶
func (s *CoordinatorStore) GetApprovalRequest(ctx context.Context, id string) (*coordinator.ApprovalRequestRecord, error)
func (*CoordinatorStore) GetApprovalRequestByTask ¶
func (s *CoordinatorStore) GetApprovalRequestByTask(ctx context.Context, taskID string) (*coordinator.ApprovalRequestRecord, error)
func (*CoordinatorStore) GetApprovalRequestByTaskAnyStatus ¶
func (s *CoordinatorStore) GetApprovalRequestByTaskAnyStatus(ctx context.Context, taskID string) (*coordinator.ApprovalRequestRecord, error)
func (*CoordinatorStore) GetCostByProvider ¶
func (s *CoordinatorStore) GetCostByProvider() (map[string]float64, error)
GetCostByProvider returns total cost per provider from the in-memory cache. Zero Firestore reads on the hot path — counters are synced in the background.
func (*CoordinatorStore) GetTask ¶
func (s *CoordinatorStore) GetTask(ctx context.Context, id string) (*coordinator.TaskRecord, error)
func (*CoordinatorStore) GetTaskAgentInfo ¶
func (*CoordinatorStore) GetTaskEvents ¶
func (s *CoordinatorStore) GetTaskEvents(ctx context.Context, taskID string, limit int) ([]*coordinator.TaskEventRecord, error)
func (*CoordinatorStore) GetTaskStats ¶
func (s *CoordinatorStore) GetTaskStats(ctx context.Context) (*coordinator.TaskStats, error)
GetTaskStats returns aggregate task statistics, served from an in-memory cache with a 30-second TTL. This avoids a full collection scan on every API call.
func (*CoordinatorStore) GetTasksByGithubIssue ¶
func (s *CoordinatorStore) GetTasksByGithubIssue(ctx context.Context, issueNum int) ([]*coordinator.TaskRecord, error)
func (*CoordinatorStore) GetTasksByStage ¶
func (s *CoordinatorStore) GetTasksByStage(ctx context.Context, stage coordinator.TaskStage) ([]*coordinator.TaskRecord, error)
func (*CoordinatorStore) ListApprovedMergeHandoffsWithoutTrigger ¶
func (s *CoordinatorStore) ListApprovedMergeHandoffsWithoutTrigger(ctx context.Context) ([]*coordinator.ApprovalRequestRecord, error)
func (*CoordinatorStore) ListPendingApprovals ¶
func (s *CoordinatorStore) ListPendingApprovals(ctx context.Context) ([]*coordinator.ApprovalRequestRecord, error)
func (*CoordinatorStore) ListResolvedApprovals ¶
func (s *CoordinatorStore) ListResolvedApprovals(ctx context.Context, limit int) ([]*coordinator.ApprovalRequestRecord, error)
func (*CoordinatorStore) ListTasks ¶
func (s *CoordinatorStore) ListTasks(ctx context.Context, filter *coordinator.TaskFilter) ([]*coordinator.TaskRecord, error)
func (*CoordinatorStore) MarkApprovalHandoffsTriggered ¶
func (s *CoordinatorStore) MarkApprovalHandoffsTriggered(ctx context.Context, taskID string) error
func (*CoordinatorStore) MarkTaskCancelled ¶
func (s *CoordinatorStore) MarkTaskCancelled(ctx context.Context, id string) error
func (*CoordinatorStore) MarkTaskCompleted ¶
func (s *CoordinatorStore) MarkTaskCompleted(ctx context.Context, id string, result *coordinator.ExecuteResult) error
func (*CoordinatorStore) MarkTaskFailed ¶
func (*CoordinatorStore) MarkTaskPendingApproval ¶
func (s *CoordinatorStore) MarkTaskPendingApproval(ctx context.Context, id, worktreePath, worktreeBranch, baseBranch, baseCommit string, result *coordinator.ExecuteResult) error
func (*CoordinatorStore) MarkTaskQueued ¶
func (s *CoordinatorStore) MarkTaskQueued(ctx context.Context, id string) error
func (*CoordinatorStore) MarkTaskRejected ¶
func (s *CoordinatorStore) MarkTaskRejected(ctx context.Context, id string) error
func (*CoordinatorStore) MarkTaskRunning ¶
func (s *CoordinatorStore) MarkTaskRunning(ctx context.Context, id, provider, worktreeID string) error
func (*CoordinatorStore) RecoverStaleTasks ¶
func (*CoordinatorStore) RequeueTask ¶
func (s *CoordinatorStore) RequeueTask(ctx context.Context, id string) error
func (*CoordinatorStore) ResetTaskToPending ¶
func (s *CoordinatorStore) ResetTaskToPending(ctx context.Context, id string) error
func (*CoordinatorStore) ResolveApprovalRequest ¶
func (s *CoordinatorStore) ResolveApprovalRequest(ctx context.Context, id, resolveStatus, resolvedBy string) error
func (*CoordinatorStore) ResolveApprovalRequestByTask ¶
func (s *CoordinatorStore) ResolveApprovalRequestByTask(ctx context.Context, taskID, resolveStatus, resolvedBy string) error
func (*CoordinatorStore) RetryAllFailedTasks ¶
func (s *CoordinatorStore) RetryAllFailedTasks(ctx context.Context) (int, error)
func (*CoordinatorStore) SetTaskDesignDocPath ¶
func (s *CoordinatorStore) SetTaskDesignDocPath(ctx context.Context, id, path string) error
func (*CoordinatorStore) SetTaskFingerprint ¶
func (*CoordinatorStore) SetTaskGithubIssue ¶
func (*CoordinatorStore) SetTaskSprintPlanPath ¶
func (s *CoordinatorStore) SetTaskSprintPlanPath(ctx context.Context, id, path string) error
func (*CoordinatorStore) SetTaskStage ¶
func (s *CoordinatorStore) SetTaskStage(ctx context.Context, id string, stage coordinator.TaskStage) error
func (*CoordinatorStore) SetTaskThreadID ¶
func (s *CoordinatorStore) SetTaskThreadID(ctx context.Context, id, threadID string) error
func (*CoordinatorStore) StartCostSync ¶
func (s *CoordinatorStore) StartCostSync(ctx context.Context)
StartCostSync bootstraps the in-memory cost counter from Firestore and starts a background goroutine that writes dirty counters back every 5 minutes.
func (*CoordinatorStore) StopCostSync ¶
func (s *CoordinatorStore) StopCostSync()
StopCostSync stops the background sync goroutine and performs a final flush.
func (*CoordinatorStore) StoreTaskEvent ¶
func (s *CoordinatorStore) StoreTaskEvent(ctx context.Context, event *coordinator.TaskEventRecord) error
func (*CoordinatorStore) UpdateTask ¶
func (s *CoordinatorStore) UpdateTask(ctx context.Context, task *coordinator.TaskRecord) error
func (*CoordinatorStore) UpdateTaskChainInfo ¶
func (s *CoordinatorStore) UpdateTaskChainInfo(ctx context.Context, id, chainID, stageID string) error
func (*CoordinatorStore) UpdateTaskMetrics ¶
type MessagingStore ¶
type MessagingStore struct {
// contains filtered or unexported fields
}
MessagingStore implements messaging.MessageStore backed by Firestore.
func NewMessagingStore ¶
func NewMessagingStore(client *Client) *MessagingStore
NewMessagingStore creates a new Firestore-backed messaging store.
func (*MessagingStore) ApplyDuplicates ¶
func (s *MessagingStore) ApplyDuplicates(groups []messaging.DuplicateGroup, runID string) error
func (*MessagingStore) ApproveApproval ¶
func (*MessagingStore) ClaimMessage ¶
func (s *MessagingStore) ClaimMessage(messageID, claimedBy string) error
func (*MessagingStore) CleanupInboxMessages ¶
func (*MessagingStore) CleanupOldHistory ¶
func (s *MessagingStore) CleanupOldHistory(retentionDays int) (int64, int64, error)
func (*MessagingStore) ClearDuplicateMarker ¶
func (s *MessagingStore) ClearDuplicateMarker(msgID string) error
func (*MessagingStore) Close ¶
func (s *MessagingStore) Close() error
Close closes the underlying client.
func (*MessagingStore) CountInboxMessagesByStatus ¶
func (s *MessagingStore) CountInboxMessagesByStatus(inbox string) (map[string]int64, error)
func (*MessagingStore) CreateApproval ¶
func (s *MessagingStore) CreateApproval(threadID, instanceID string, effectDelta *messaging.EffectDelta, proposal, impact string, estimatedCost float64) (*messaging.Approval, error)
func (*MessagingStore) CreateMessage ¶
func (s *MessagingStore) CreateMessage(threadID, fromType, fromID, toType, toID, kind, content, metadataJSON string) (*messaging.Message, error)
func (*MessagingStore) CreateThread ¶
func (s *MessagingStore) CreateThread(title, createdByType, createdByID, targetAgent string) (*messaging.Thread, error)
func (*MessagingStore) CreateThreadWithWorkspace ¶
func (s *MessagingStore) CreateThreadWithWorkspace(title, createdByType, createdByID, targetAgent, workspace string) (*messaging.Thread, error)
func (*MessagingStore) DeleteThread ¶
func (s *MessagingStore) DeleteThread(threadID string) error
func (*MessagingStore) FindDuplicates ¶
func (s *MessagingStore) FindDuplicates(inbox string, threshold float64) ([]messaging.DuplicateGroup, error)
func (*MessagingStore) FindMessageByPrefix ¶
func (s *MessagingStore) FindMessageByPrefix(prefix string) (string, error)
FindMessageByPrefix resolves a short ID prefix to a full message ID. Firestore doesn't support LIKE queries, so we use range queries on the ID field.
func (*MessagingStore) FindSimilar ¶
func (*MessagingStore) ForwardInboxMessage ¶
func (s *MessagingStore) ForwardInboxMessage(id string, toInbox string) error
func (*MessagingStore) GetActiveAgents ¶
func (s *MessagingStore) GetActiveAgents() ([]messaging.ActiveAgent, error)
func (*MessagingStore) GetAgentMetrics ¶
func (s *MessagingStore) GetAgentMetrics(agentID string) (*messaging.AggregatedMetrics, error)
func (*MessagingStore) GetAgentStats ¶
func (s *MessagingStore) GetAgentStats(agentID string) (*messaging.AgentStats, error)
func (*MessagingStore) GetAggregatedExecutionStats ¶
func (s *MessagingStore) GetAggregatedExecutionStats() (*messaging.ExecutionStats, error)
func (*MessagingStore) GetApproval ¶
func (s *MessagingStore) GetApproval(approvalID string) (*messaging.Approval, error)
func (*MessagingStore) GetApprovalHistory ¶
func (s *MessagingStore) GetApprovalHistory(threadID string, limit int) ([]messaging.ApprovalHistoryEntry, error)
func (*MessagingStore) GetApprovalsByStatus ¶
func (*MessagingStore) GetDistinctWorkspaces ¶
func (s *MessagingStore) GetDistinctWorkspaces() ([]string, error)
func (*MessagingStore) GetExecutionStatsByThread ¶
func (s *MessagingStore) GetExecutionStatsByThread(threadID string) (*messaging.ExecutionStats, error)
func (*MessagingStore) GetGlobalMetrics ¶
func (s *MessagingStore) GetGlobalMetrics() (*messaging.AggregatedMetrics, error)
func (*MessagingStore) GetHierarchy ¶
func (s *MessagingStore) GetHierarchy() (*messaging.HierarchyResponse, error)
func (*MessagingStore) GetInboxMessage ¶
func (s *MessagingStore) GetInboxMessage(id string) (*messaging.InboxMessage, error)
func (*MessagingStore) GetInstanceHistory ¶
func (s *MessagingStore) GetInstanceHistory(agentID string, limit int) ([]messaging.InstanceHistoryEntry, error)
func (*MessagingStore) GetKnownAgents ¶
func (s *MessagingStore) GetKnownAgents() ([]messaging.AgentInfo, error)
func (*MessagingStore) GetMessageFlowEdges ¶
func (s *MessagingStore) GetMessageFlowEdges() ([]messaging.MessageFlowEdge, error)
func (*MessagingStore) GetMessages ¶
func (s *MessagingStore) GetMessages(toType, toID, deliveryState string) ([]messaging.Message, error)
func (*MessagingStore) GetMessagesFromSeq ¶
func (*MessagingStore) GetMetrics ¶
func (s *MessagingStore) GetMetrics(scopeType, scopeID string) (*messaging.AggregatedMetrics, error)
func (*MessagingStore) GetMetricsTrends ¶
func (s *MessagingStore) GetMetricsTrends(scopeType, scopeID, period string, limit int) ([]map[string]interface{}, error)
func (*MessagingStore) GetOrCreateThreadWithWorkspace ¶
func (*MessagingStore) GetThread ¶
func (s *MessagingStore) GetThread(threadID string) (*messaging.Thread, error)
func (*MessagingStore) GetThreadAggregateStats ¶
func (s *MessagingStore) GetThreadAggregateStats() (*messaging.ThreadAggregateStats, error)
func (*MessagingStore) GetThreadByTitleAndAgent ¶
func (s *MessagingStore) GetThreadByTitleAndAgent(title, targetAgent string) (*messaging.Thread, error)
func (*MessagingStore) GetThreadMetrics ¶
func (s *MessagingStore) GetThreadMetrics(threadID string) (*messaging.AggregatedMetrics, error)
func (*MessagingStore) GetThreadWorkspace ¶
func (s *MessagingStore) GetThreadWorkspace(threadID string) (string, error)
func (*MessagingStore) GetThreadsByStatus ¶
func (*MessagingStore) GetThreadsFiltered ¶
func (s *MessagingStore) GetThreadsFiltered(filter messaging.ThreadFilter) ([]messaging.Thread, error)
func (*MessagingStore) InboxMessageExistsByGitHub ¶
func (s *MessagingStore) InboxMessageExistsByGitHub(repo string, issueNumber int) (bool, error)
func (*MessagingStore) InboxMessageExistsByTitle ¶
func (s *MessagingStore) InboxMessageExistsByTitle(inbox string, title string) (string, error)
func (*MessagingStore) InsertInboxMessage ¶
func (s *MessagingStore) InsertInboxMessage(msg *messaging.InboxMessage) error
func (*MessagingStore) InsertInboxMessageWithContext ¶
func (s *MessagingStore) InsertInboxMessageWithContext(ctx context.Context, msg *messaging.InboxMessage) error
func (*MessagingStore) ListInboxMessages ¶
func (s *MessagingStore) ListInboxMessages(opts messaging.InboxListOptions) ([]messaging.InboxMessage, error)
func (*MessagingStore) MarkAllAsAcked ¶
func (s *MessagingStore) MarkAllAsAcked(toType, toID string) (int64, error)
func (*MessagingStore) MarkAllInboxMessagesRead ¶
func (s *MessagingStore) MarkAllInboxMessagesRead(inbox string) (int64, error)
func (*MessagingStore) MarkAsAcked ¶
func (s *MessagingStore) MarkAsAcked(messageID string) error
func (*MessagingStore) MarkAsUnacked ¶
func (s *MessagingStore) MarkAsUnacked(messageID string) error
func (*MessagingStore) MarkInboxMessageRead ¶
func (s *MessagingStore) MarkInboxMessageRead(id string) error
func (*MessagingStore) MarkInboxMessageUnread ¶
func (s *MessagingStore) MarkInboxMessageUnread(id string) error
func (*MessagingStore) NewThreadFilter ¶
func (s *MessagingStore) NewThreadFilter(threadStatus, workspace string, limit int) messaging.ThreadFilter
func (*MessagingStore) RecordAgentInstance ¶
func (s *MessagingStore) RecordAgentInstance(agentID, instanceID string) error
func (*MessagingStore) RecordApprovalHistory ¶
func (s *MessagingStore) RecordApprovalHistory(approvalID, threadID, agentID, action, actor, proposal, impact string, estimatedCost *float64, capabilityToken string) error
func (*MessagingStore) RecordInstanceEnd ¶
func (s *MessagingStore) RecordInstanceEnd(instanceID string, exitCode int, totalTokens, totalCostCents, threadCount int) error
func (*MessagingStore) RecordInstanceStart ¶
func (s *MessagingStore) RecordInstanceStart(agentID, instanceID string) error
func (*MessagingStore) RecordMetrics ¶
func (s *MessagingStore) RecordMetrics(threadID, agentID string, stats *messaging.MessageExecutionStats) error
func (*MessagingStore) RegisterAgent ¶
func (s *MessagingStore) RegisterAgent(agentID, label, agentStatus string) error
func (*MessagingStore) RejectApproval ¶
func (s *MessagingStore) RejectApproval(approvalID, reviewedBy string, reviewNotes string) error
func (*MessagingStore) SemanticSearch ¶
func (s *MessagingStore) SemanticSearch(opts messaging.SearchOptions) ([]messaging.SearchHit, error)
SemanticSearch performs SimHash-based semantic search over inbox messages. Firestore doesn't support bitwise operations, so we scan and filter client-side. For neural search, the caller should provide an Embedder in opts.
func (*MessagingStore) SetThreadTargetAgent ¶
func (s *MessagingStore) SetThreadTargetAgent(threadID, targetAgent string) error
func (*MessagingStore) SetThreadWorkspace ¶
func (s *MessagingStore) SetThreadWorkspace(threadID, workspace string) error
func (*MessagingStore) Subscribe ¶
func (s *MessagingStore) Subscribe(instanceID, threadID string) error
func (*MessagingStore) UpdateAckSeq ¶
func (s *MessagingStore) UpdateAckSeq(instanceID, threadID string, ackSeq int) error
func (*MessagingStore) UpdateAgentStatus ¶
func (s *MessagingStore) UpdateAgentStatus(agentID, agentStatus string) error
func (*MessagingStore) UpdateInboxMessageGitHub ¶
func (s *MessagingStore) UpdateInboxMessageGitHub(messageID string, issueNumber int, repo string) error
func (*MessagingStore) UpdateMessageEmbedding ¶
func (s *MessagingStore) UpdateMessageEmbedding(msgID string, embedding []float32, model string) error
func (*MessagingStore) UpdateMessageEnvelope ¶
func (*MessagingStore) UpdateThreadTitle ¶
func (s *MessagingStore) UpdateThreadTitle(threadID, title string) error
type ObservatoryStore ¶
type ObservatoryStore struct {
// contains filtered or unexported fields
}
ObservatoryStore implements observatory.Backend backed by Firestore.
func NewObservatoryStore ¶
func NewObservatoryStore(client *Client) *ObservatoryStore
NewObservatoryStore creates a new Firestore-backed observatory store.
func (*ObservatoryStore) BackfillSpansWorkspace ¶
func (*ObservatoryStore) Close ¶
func (s *ObservatoryStore) Close() error
func (*ObservatoryStore) CountChatMessages ¶
func (s *ObservatoryStore) CountChatMessages(ctx context.Context, q obs.ChatMessageQuery) (total int, withTaskID int, err error)
func (*ObservatoryStore) CreateAgentAssignment ¶
func (s *ObservatoryStore) CreateAgentAssignment(ctx context.Context, a *obs.AgentAssignment) error
func (*ObservatoryStore) CreateChain ¶
func (s *ObservatoryStore) CreateChain(ctx context.Context, req *obs.ChainCreateRequest) (*obs.ExecutionChain, error)
func (*ObservatoryStore) CreateMessage ¶
func (*ObservatoryStore) CreateMetric ¶
func (*ObservatoryStore) CreateSpan ¶
func (*ObservatoryStore) CreateSpanEvent ¶
func (*ObservatoryStore) CreateStage ¶
func (s *ObservatoryStore) CreateStage(ctx context.Context, req *obs.StageCreateRequest) (*obs.ChainStage, error)
func (*ObservatoryStore) CreateTask ¶
func (*ObservatoryStore) CreateWorkspace ¶
func (*ObservatoryStore) DeleteAgentAssignment ¶
func (s *ObservatoryStore) DeleteAgentAssignment(ctx context.Context, id string) error
func (*ObservatoryStore) DeleteMessage ¶
func (s *ObservatoryStore) DeleteMessage(ctx context.Context, id string) error
func (*ObservatoryStore) DeleteSpan ¶
func (s *ObservatoryStore) DeleteSpan(ctx context.Context, id string) error
func (*ObservatoryStore) DeleteSpanEvent ¶
func (s *ObservatoryStore) DeleteSpanEvent(ctx context.Context, id int64) error
func (*ObservatoryStore) DeleteTask ¶
func (s *ObservatoryStore) DeleteTask(ctx context.Context, id string) error
func (*ObservatoryStore) DeleteWorkspace ¶
func (s *ObservatoryStore) DeleteWorkspace(ctx context.Context, id string) error
func (*ObservatoryStore) FindLatestUnfinishedTool ¶
func (*ObservatoryStore) GetAgentAssignment ¶
func (s *ObservatoryStore) GetAgentAssignment(ctx context.Context, id string) (*obs.AgentAssignment, error)
func (*ObservatoryStore) GetAgentStats ¶
func (s *ObservatoryStore) GetAgentStats(ctx context.Context, agentID string) (*obs.AgentStats, error)
func (*ObservatoryStore) GetChain ¶
func (s *ObservatoryStore) GetChain(ctx context.Context, id string, opts obs.ChainReadOptions) (*obs.ExecutionChain, error)
func (*ObservatoryStore) GetChainByGitHubIssue ¶
func (s *ObservatoryStore) GetChainByGitHubIssue(ctx context.Context, repo string, issueNumber int) (*obs.ExecutionChain, error)
func (*ObservatoryStore) GetChainByMessageID ¶
func (s *ObservatoryStore) GetChainByMessageID(ctx context.Context, messageID string) (*obs.ExecutionChain, error)
func (*ObservatoryStore) GetChainByTaskID ¶
func (s *ObservatoryStore) GetChainByTaskID(ctx context.Context, taskID string) (*obs.ExecutionChain, error)
func (*ObservatoryStore) GetChainStages ¶
func (s *ObservatoryStore) GetChainStages(ctx context.Context, chainID string, opts obs.ChainReadOptions) ([]*obs.ChainStage, error)
func (*ObservatoryStore) GetChainStats ¶
func (s *ObservatoryStore) GetChainStats(ctx context.Context) (*obs.ChainStats, error)
func (*ObservatoryStore) GetChainStatsByAgent ¶
func (s *ObservatoryStore) GetChainStatsByAgent(ctx context.Context, createdAfter *time.Time) ([]*obs.AgentStatsResult, error)
func (*ObservatoryStore) GetChainStatusCounts ¶
func (s *ObservatoryStore) GetChainStatusCounts(ctx context.Context, createdAfter *time.Time) (*obs.ChainStatusCounts, error)
func (*ObservatoryStore) GetChatMessagesBySession ¶
func (s *ObservatoryStore) GetChatMessagesBySession(ctx context.Context, sessionID string, startTime, endTime time.Time) ([]*obs.ChatMessage, error)
func (*ObservatoryStore) GetChatMessagesByTaskID ¶
func (s *ObservatoryStore) GetChatMessagesByTaskID(ctx context.Context, taskID string) ([]*obs.ChatMessage, error)
func (*ObservatoryStore) GetExecTaskHierarchy ¶
func (s *ObservatoryStore) GetExecTaskHierarchy(ctx context.Context, limit int) ([]*obs.ExecTaskNode, error)
func (*ObservatoryStore) GetExecTaskHierarchyWithMessages ¶
func (s *ObservatoryStore) GetExecTaskHierarchyWithMessages(ctx context.Context, limit int) (*obs.ExecHierarchyWithMessages, error)
func (*ObservatoryStore) GetMessage ¶
func (*ObservatoryStore) GetMetricsSummary ¶
func (s *ObservatoryStore) GetMetricsSummary(ctx context.Context) (*obs.MetricsSummary, error)
func (*ObservatoryStore) GetProviderComparison ¶
func (s *ObservatoryStore) GetProviderComparison(ctx context.Context) ([]*obs.ProviderComparison, error)
func (*ObservatoryStore) GetSession ¶
func (*ObservatoryStore) GetSessionMetricsSummary ¶
func (s *ObservatoryStore) GetSessionMetricsSummary(ctx context.Context, sessionID string) (*obs.SessionMetricsSummary, error)
func (*ObservatoryStore) GetSessionTools ¶
func (s *ObservatoryStore) GetSessionTools(ctx context.Context, sessionID string) ([]obs.SessionTool, error)
func (*ObservatoryStore) GetSessionWorkspace ¶
func (s *ObservatoryStore) GetSessionWorkspace(sessionID string) (string, error)
func (*ObservatoryStore) GetSpanEvents ¶
func (*ObservatoryStore) GetSpanHierarchy ¶
func (s *ObservatoryStore) GetSpanHierarchy(ctx context.Context, limit int) (*obs.SpanHierarchyResult, error)
func (*ObservatoryStore) GetSpanLitesByStageID ¶
func (s *ObservatoryStore) GetSpanLitesByStageID(ctx context.Context, stageID string, limit, offset int) (*obs.SpanLitePage, error)
func (*ObservatoryStore) GetSpansByStageID ¶
func (*ObservatoryStore) GetStage ¶
func (s *ObservatoryStore) GetStage(ctx context.Context, id string) (*obs.ChainStage, error)
func (*ObservatoryStore) GetTaskTimeline ¶
func (s *ObservatoryStore) GetTaskTimeline(ctx context.Context, taskID string) ([]*obs.TaskTimeline, error)
func (*ObservatoryStore) GetToolForSpan ¶
func (s *ObservatoryStore) GetToolForSpan(ctx context.Context, sessionID, toolName string, spanTime time.Time) (*obs.SessionTool, error)
func (*ObservatoryStore) GetToolsByTimestampRange ¶
func (s *ObservatoryStore) GetToolsByTimestampRange(ctx context.Context, start, end time.Time, toolName string) ([]obs.SessionTool, error)
func (*ObservatoryStore) GetWorkspace ¶
func (*ObservatoryStore) GetWorkspaceStats ¶
func (s *ObservatoryStore) GetWorkspaceStats(ctx context.Context, id string) (*obs.WorkspaceStats, error)
func (*ObservatoryStore) InsertToolStart ¶
func (s *ObservatoryStore) InsertToolStart(ctx context.Context, sessionID, toolUseID, toolName, toolInput string) error
func (*ObservatoryStore) LinkOrphanedSpansBySession ¶
func (*ObservatoryStore) LinkSpanToChain ¶
func (s *ObservatoryStore) LinkSpanToChain(ctx context.Context, spanID, chainID, stageID string) error
func (*ObservatoryStore) ListAgentAssignments ¶
func (s *ObservatoryStore) ListAgentAssignments(ctx context.Context, taskID string) ([]*obs.AgentAssignment, error)
func (*ObservatoryStore) ListChains ¶
func (s *ObservatoryStore) ListChains(ctx context.Context, opts obs.ChainListOptions) ([]*obs.ChainSummary, error)
func (*ObservatoryStore) ListMessages ¶
func (s *ObservatoryStore) ListMessages(ctx context.Context, opts obs.MessageListOptions) ([]*obs.Message, error)
func (*ObservatoryStore) ListMetrics ¶
func (s *ObservatoryStore) ListMetrics(ctx context.Context, opts obs.MetricListOptions) ([]*obs.Metric, error)
func (*ObservatoryStore) ListPendingApprovals ¶
func (s *ObservatoryStore) ListPendingApprovals(ctx context.Context, limit int) ([]*obs.PendingApprovalInfo, error)
func (*ObservatoryStore) ListSpans ¶
func (s *ObservatoryStore) ListSpans(ctx context.Context, opts obs.SpanListOptions) ([]*obs.Span, error)
func (*ObservatoryStore) ListTasks ¶
func (s *ObservatoryStore) ListTasks(ctx context.Context, opts obs.TaskListOptions) ([]*obs.Task, error)
func (*ObservatoryStore) ListTraces ¶
func (s *ObservatoryStore) ListTraces(ctx context.Context, opts obs.TraceQuery) ([]*obs.TraceSummary, error)
func (*ObservatoryStore) ListWorkspaces ¶
func (*ObservatoryStore) LookupTaskBySessionID ¶
func (s *ObservatoryStore) LookupTaskBySessionID(ctx context.Context, sessionID string) (taskID, assignmentID, traceID string)
func (*ObservatoryStore) MarkMessageArchived ¶
func (s *ObservatoryStore) MarkMessageArchived(ctx context.Context, id string) error
func (*ObservatoryStore) MarkMessageRead ¶
func (s *ObservatoryStore) MarkMessageRead(ctx context.Context, id string) error
func (*ObservatoryStore) RecalculateTaskAggregates ¶
func (s *ObservatoryStore) RecalculateTaskAggregates(ctx context.Context, taskID string) error
func (*ObservatoryStore) UpdateAgentAssignment ¶
func (s *ObservatoryStore) UpdateAgentAssignment(ctx context.Context, a *obs.AgentAssignment) error
func (*ObservatoryStore) UpdateChainMetrics ¶
func (*ObservatoryStore) UpdateChainStatus ¶
func (s *ObservatoryStore) UpdateChainStatus(ctx context.Context, chainID string, chainStatus obs.ChainStatus) error
func (*ObservatoryStore) UpdateMessage ¶
func (*ObservatoryStore) UpdateSessionEnded ¶
func (s *ObservatoryStore) UpdateSessionEnded(ctx context.Context, sessionID string) error
func (*ObservatoryStore) UpdateSpan ¶
func (*ObservatoryStore) UpdateSpanLinks ¶
func (s *ObservatoryStore) UpdateSpanLinks(ctx context.Context, spanID, taskID, assignmentID string) error
func (*ObservatoryStore) UpdateStageApproval ¶
func (s *ObservatoryStore) UpdateStageApproval(ctx context.Context, stageID string, approvalStatus obs.ApprovalStatus, approvalType obs.ApprovalType, feedback string) error
func (*ObservatoryStore) UpdateStageError ¶
func (s *ObservatoryStore) UpdateStageError(ctx context.Context, stageID, errorMessage string) error
func (*ObservatoryStore) UpdateStageMetrics ¶
func (*ObservatoryStore) UpdateStageSession ¶
func (s *ObservatoryStore) UpdateStageSession(ctx context.Context, stageID, sessionID string) error
func (*ObservatoryStore) UpdateStageStatus ¶
func (s *ObservatoryStore) UpdateStageStatus(ctx context.Context, stageID string, stageStatus obs.ChainStageStatus) error
func (*ObservatoryStore) UpdateTask ¶
func (*ObservatoryStore) UpdateToolEnd ¶
func (*ObservatoryStore) UpdateWorkspace ¶
func (*ObservatoryStore) UpsertSession ¶
func (s *ObservatoryStore) UpsertSession(ctx context.Context, sessionID, workspace, version, source string) error
func (*ObservatoryStore) UpsertSessionWithCorrelation ¶
func (s *ObservatoryStore) UpsertSessionWithCorrelation(ctx context.Context, sessionID, workspace, version, source string, corr *obs.SessionCorrelation) error
func (*ObservatoryStore) WithSpanTTL ¶
func (s *ObservatoryStore) WithSpanTTL(d time.Duration) *ObservatoryStore
WithSpanTTL sets the TTL for observatory span documents.
Source Files
¶
- cache.go
- client.go
- coordinator.go
- coordinator_convert.go
- messaging.go
- messaging_approval.go
- messaging_convert.go
- messaging_inbox.go
- messaging_metrics.go
- messaging_search.go
- observatory.go
- observatory_aggregates.go
- observatory_chains.go
- observatory_chains_helpers.go
- observatory_messages.go
- observatory_spans.go
- observatory_tasks.go