Versions in this module Expand all Collapse all v0 v0.14.3 May 2, 2026 v0.14.2 Apr 26, 2026 v0.14.1 Apr 21, 2026 Changes in this version + func BenchmarkHookEventMarshal(b *testing.B) + func BenchmarkHookEventUnmarshal(b *testing.B) + func BenchmarkHookEventWithComplexStructure(b *testing.B) + func BenchmarkHookEventWithLargeToolResponse(b *testing.B) + func GetUserFromContext(r *http.Request) (*auth.User, error) + func InferInboxSourceType(fromAgent, toInbox string) string + func RequireApprover(next http.Handler) http.Handler + func RequireAuth(next http.Handler) http.Handler + func TestHookEventComplexJSONStructures(t *testing.T) + func TestHookEventContextHandling(t *testing.T) + func TestHookEventEdgeCaseToolNames(t *testing.T) + func TestHookEventNullValues(t *testing.T) + func TestHookEventTimestampPrecision(t *testing.T) + func TestHookEventUnknownEventType(t *testing.T) + func WhoAmIHandler(w http.ResponseWriter, r *http.Request) + type AILANGBridge struct + func GetAILANGBridge() *AILANGBridge + func (b *AILANGBridge) BuildHeatmapGrid(cells []HeatmapCell, totalTasks int, totalCost float64, days int) HeatmapGridResponse + func (b *AILANGBridge) CalculateBurnRate(costs []CostRecord, windowMillis int64) float64 + func (b *AILANGBridge) CheckTaskBudget(config BudgetConfig, estimatedCost, workspaceSpend, dailySpend float64) BudgetStatus + func (b *AILANGBridge) Close() error + func (b *AILANGBridge) CountTurns(events []*coordinator.TaskEventRecord) int + func (b *AILANGBridge) ForecastExhaustion(remainingBudget, burnRate float64) int + func (b *AILANGBridge) IsEnabled() bool + func (b *AILANGBridge) SummarizeEvents(events []*coordinator.TaskEventRecord) string + func (b *AILANGBridge) Truncate(text string, maxLen int) string + type AgentProcess struct + InstanceID string + PID int + StartedAt time.Time + type ApprovalsResponse struct + Approvals []UIApproval + Approved int + Pending int + Rejected int + Total int + type AuditLogEntry struct + Action string + Details map[string]interface{} + ID string + IP string + Resource string + ResourceID string + Status string + Timestamp time.Time + UserAgent string + UserEmail string + UserID string + WorkspaceID string + type AuditLogger struct + func NewAuditLogger(fs *firestore.Client) *AuditLogger + func (al *AuditLogger) GetAuditLogs(ctx context.Context, workspaceID string, limit int) ([]*AuditLogEntry, error) + func (al *AuditLogger) LogAction(ctx context.Context, user *auth.User, action, resource, resourceID string, ...) error + func (al *AuditLogger) LogApproval(ctx context.Context, user *auth.User, taskID, action string) error + func (al *AuditLogger) LogFailedAttempt(ctx context.Context, email, reason string) error + func (al *AuditLogger) LogRoleChange(ctx context.Context, user *auth.User, targetUserID, oldRole, newRole string) error + func (al *AuditLogger) LogWorkspaceAccess(ctx context.Context, user *auth.User, workspaceID string) error + type AuthContextKey string + const UserContextKey + const WorkspaceAccessContextKey + type BreakdownItem struct + CacheCreationTokens int64 + CacheReadTokens int64 + CacheSavingsUSD float64 + CostUSD float64 + DurationMs int64 + ID string + Label string + Percentage float64 + SpanCount int + TaskCount int + TokensIn int64 + TokensOut int64 + type BreakdownResponse struct + ByModel []BreakdownItem + ByProvider []BreakdownItem + BySourceType []BreakdownItem + ByWorkspace []BreakdownItem + TotalCost float64 + type BudgetCheckRequest struct + EstimatedCost float64 + Provider string + type BudgetConfig struct + DailyBudget float64 + ProviderBudgets map[string]*ProviderBudget + TaskMaxCost float64 + WarningThreshold float64 + WorkspaceBudget float64 + func DefaultBudgetConfig() BudgetConfig + func LoadBudgetConfig() BudgetConfig + func (c *BudgetConfig) GetProviderBudget(provider string) *ProviderBudget + type BudgetStatus struct + Allowed bool + Message string + RemainingDaily float64 + RemainingWorkspace float64 + WarningLevel string + type BudgetStatusResponse struct + BurnRate BurnRateInfo + ByProvider map[string]*ProviderUsage + Config BudgetConfig + Status BudgetStatus + Usage BudgetUsage + UsingAILANG bool + type BudgetUsage struct + DailySpend float64 + UsagePercent float64 + WorkspaceSpend float64 + type BurnRateInfo struct + CostPerHour float64 + HoursUntilExhaustion int + WindowHours int + type ChatContextPreview struct + AssistantResponse string + FullChatURL string + HasThinking bool + TurnNumber int + UserPrompt string + type ClaudeHistoryHandler struct + func NewClaudeHistoryHandler() *ClaudeHistoryHandler + type ClaudeHookPayload struct + AgentID string + AgentType string + ChainID string + Cwd string + HookEventName string + MessageID string + Model string + PermissionMode string + SessionID string + Source string + StageID string + TaskID string + ToolInput json.RawMessage + ToolName string + ToolResponse json.RawMessage + ToolUseID string + TranscriptPath string + type CoordinatorApprovalStore interface + GetApprovalRequest func(ctx context.Context, id string) (*coordinator.ApprovalRequestRecord, error) + ListPendingApprovals func(ctx context.Context) ([]*coordinator.ApprovalRequestRecord, error) + ListResolvedApprovals func(ctx context.Context, limit int) ([]*coordinator.ApprovalRequestRecord, error) + ResolveApprovalRequest func(ctx context.Context, id string, status string, resolvedBy string) error + type CoordinatorRuntimeStats struct + ActiveAgents int + CompletedTasks int + FailedTasks int + PendingApprovals int + PendingTasks int + Running bool + RunningTasks int + TotalCost float64 + TotalTokens int + type CoordinatorStats struct + FailedTasks int + PID int + PendingTasks int + Running bool + RunningTasks int + TasksRun int + TotalCost float64 + TotalTokens int + Uptime string + type CoordinatorStatus struct + ActiveTasks []*TaskMetrics + FailedTasks int + PID int + PendingTasks int + Running bool + RunningTasks int + TasksRun int + TotalCost float64 + TotalTokens int + Uptime string + type CoordinatorStore interface + GetCoordinatorStats func() (*CoordinatorStats, error) + GetCostByProvider func() (map[string]float64, error) + type CoordinatorSummary struct + ActiveAgents int + ByProvider map[string]int + ByWorkspace map[string]int + CompletedTasks int + FailedTasks int + PendingApprovals int + PendingTasks int + RunningTasks int + SuccessRate float64 + TotalCost float64 + TotalTasks int + TotalTokens int + type CoordinatorTaskEventStore interface + GetTask func(ctx context.Context, id string) (*coordinator.TaskRecord, error) + GetTaskEvents func(ctx context.Context, taskID string, limit int) ([]*coordinator.TaskEventRecord, error) + ListTasks func(ctx context.Context, filter *coordinator.TaskFilter) ([]*coordinator.TaskRecord, error) + type CostRecord struct + Cost float64 + Timestamp int64 + type DataSources struct + CoordinatorDB string + CoordinatorOK bool + ObservatoryDB string + ObservatoryOK bool + type ErrorResponse struct + Error string + Message string + Status int + type ExecEventRequest struct + ErrorMsg string + SessionID string + StreamType string + Text string + ToolInput string + ToolName string + ToolOutput string + TurnNum int + type ExecEventStorer interface + StoreTaskEvent func(ctx context.Context, event *coordinator.TaskEventRecord) error + type ExecSessionRequest struct + Provider string + SessionID string + Workspace string + type HeatmapCell struct + Cost float64 + Date string + SuccessRate float64 + TaskCount int + type HeatmapGridCell struct + Cost float64 + Date string + DayOfWeek int + Intensity float64 + SuccessRate float64 + TaskCount int + type HeatmapGridResponse struct + DateRange struct{ ... } + MonthLabels []HeatmapMonthLabel + Totals struct{ ... } + Weeks [][]HeatmapGridCell + type HeatmapMonthLabel struct + Name string + WeekIndex int + type HeatmapResponse struct + Cells []HeatmapCell + Totals struct{ ... } + type HookEvent struct + ChainID string + ClaudeVersion string + Event string + MessageID string + SessionID string + StageID string + TaskID string + Timestamp time.Time + ToolInput json.RawMessage + ToolName string + ToolResponse json.RawMessage + ToolUseID string + Workspace string + type InboxSourceCount struct + ID string + Label string + MessageCount int + type MonitorResponse struct + History []ProcessStats + Processes []ProcessStats + Summary MonitorSummary + Timestamp time.Time + type MonitorSummary struct + TotalCPU float64 + TotalCost float64 + TotalMemoryMB float64 + TotalProcesses int + WarningCount int + type ObservatoryStats struct + ActiveTimeMs int64 + CacheSavingsUSD float64 + CommitCount int64 + ErrorCount int + LinesAdded int64 + LinesRemoved int64 + PullRequestCount int64 + SuccessRate float64 + ToolCalls int + TotalAgents int + TotalCacheCreationTokens int64 + TotalCacheReadTokens int64 + TotalCostUSD float64 + TotalSpans int + TotalTasks int + TotalTokensIn int64 + TotalTokensOut int64 + TotalWorkspaces int + TurnCount int + type ObservedTopologyEdge struct + Active bool + LastActivity string + MessageCount int + Source string + Target string + type ObservedTopologyNode struct + ID string + Label string + LastActivity string + MessagesRecv int + MessagesSent int + NodeType string + type ObservedTopologyResponse struct + Edges []ObservedTopologyEdge + IsEmpty bool + Nodes []ObservedTopologyNode + type OutliersAnalysisResponse struct + AnalyzedAt string + CliCommand string + Outliers []*observatory.SpanOutlier + RateOfChange *observatory.RateAnalysis + SpanCount int + Stats []*observatory.TaskMetricStats + TaskID string + TaskTitle string + Threshold float64 + type ProcessStats struct + CPUPercent float64 + Command string + Cost float64 + DurationSec int + FullCmd string + InstanceID string + MemoryMB float64 + PID int + Source string + StartedAt time.Time + Status string + StoppedAt *time.Time + TokensIn int + TokensOut int + Turns int + type ProviderBudget struct + DailyBudget float64 + HardLimit bool + TaskMaxCost float64 + WarningThreshold float64 + type ProviderUsage struct + Budget float64 + HardLimit bool + Spend float64 + UsagePercent float64 + WarningLevel string + type PubSubEventSubscriber struct + func NewPubSubEventSubscriber(subscriber *pubsub.Subscriber, wsServer *websocket.Server, subName string, ...) *PubSubEventSubscriber + func (s *PubSubEventSubscriber) Start(ctx context.Context) + func (s *PubSubEventSubscriber) Stop() + type Server struct + func NewServer(dbPath string, httpAddr string, opts ...ServerOption) (*Server, error) + func (s *Server) AddToHistory(proc ProcessStats) + func (s *Server) Close() error + func (s *Server) GetChatContextForSpan(ctx context.Context, span *observatory.Span) *ChatContextPreview + func (s *Server) GetExecEventStorer() ExecEventStorer + func (s *Server) GetExternalTelemetry(pid int) *websocket.TelemetryEvent + func (s *Server) SetApprovalStore(store CoordinatorApprovalStore) + func (s *Server) SetCoordinatorStore(store CoordinatorStore) + func (s *Server) SetCoordinatorStoreRaw(store coordinator.Store) + func (s *Server) SetTaskEventStore(store CoordinatorTaskEventStore) + func (s *Server) Start() error + func (srv *Server) AuthMiddleware(next http.Handler) http.Handler + func (srv *Server) HealthHandler(w http.ResponseWriter, r *http.Request) + func (srv *Server) OptionalAuthMiddleware(next http.Handler) http.Handler + func (srv *Server) RequireWorkspaceAccessMiddleware(next http.Handler) http.Handler + type ServerOption func(*Server) + func WithCoordinatorStore(store CoordinatorStore) ServerOption + func WithFirebaseAuth(projectID string) ServerOption + func WithHookToken(token string) ServerOption + func WithMessagingStore(store messaging.MessageStore) ServerOption + func WithObservatoryBackend(backend observatory.Backend) ServerOption + func WithObservatoryDB(dbPath string) ServerOption + func WithPubSubEvents(subscriber *pubsub.Subscriber, subName string) ServerOption + func WithResourceRegistry(registry *coordinator.ResourceTrackerRegistry) ServerOption + func WithVersion(version string) ServerOption + func WithWebSocketToken(token string) ServerOption + type StatisticsResponse struct + Coordinator *CoordinatorSummary + Threads ThreadStatistics + type TaskEvolutionPoint struct + Cost float64 + DeltaCost float64 + DeltaDurationMs int64 + DeltaSpans int + DurationMs int64 + ElapsedMs int64 + Spans int + Timestamp string + Tokens int64 + TokensIn int64 + TokensOut int64 + Turns int + X int + type TaskEvolutionResponse struct + CliCommand string + Tasks []TaskEvolutionTask + type TaskEvolutionTask struct + EndTime string + Model string + Points []TaskEvolutionPoint + Provider string + StartTime string + Status string + TaskID string + Title string + type TaskHierarchyEdge struct + Source string + Target string + Type string + type TaskHierarchyNode struct + AgentID string + ApprovalStatus string + ApprovalType string + Children []*TaskHierarchyNode + Cost float64 + CreatedAt time.Time + DurationMs int64 + ID string + Iteration int + ParentTaskID string + Provider string + SessionID string + Spans []*TaskSpanNode + Status string + Title string + TokensIn int + TokensOut int + TurnGrouped *observatory.TurnGroupedHierarchy + Turns int + Workspace string + type TaskHierarchyResult struct + Edges []TaskHierarchyEdge + Stats struct{ ... } + Tasks []*TaskHierarchyNode + type TaskMetrics struct + CPUPercent float64 + Cost float64 + DurationSec int + LastEvent string + MemoryMB float64 + PeakCPU float64 + PeakMemory float64 + Status string + TaskID string + ThreadID string + TokensIn int + TokensOut int + TurnNum int + type TaskSpanNode struct + Children []*TaskSpanNode + CostUSD float64 + DurationMs int64 + ID string + Name string + NodeType string + Status string + TokensIn int64 + TokensOut int64 + ToolName string + TurnNumber int + type TaskStreamEventRequest struct + Cost float64 + DurationSec int + ErrorMsg string + Status string + StreamType string + TaskID string + Text string + ThreadID string + TokensIn int + TokensOut int + ToolInput string + ToolName string + ToolOutput string + TurnNum int + type TeeWriter struct + func NewTeeWriter(original io.Writer, parser *TelemetryParser) *TeeWriter + func (t *TeeWriter) Write(p []byte) (n int, err error) + type TelemetryParser struct + func NewTelemetryParser(instanceID string, pid int, wsServer *websocket.Server) *TelemetryParser + func (t *TelemetryParser) GetTelemetry() (turns, tokensIn, tokensOut int, cost float64, status string) + func (t *TelemetryParser) MarkComplete(exitErr error) + func (t *TelemetryParser) PipeReader(r io.Reader) io.Reader + func (t *TelemetryParser) Write(p []byte) (n int, err error) + type TelemetryReportRequest struct + Cost float64 + InstanceID string + PID int + Status string + TokensIn int + TokensOut int + Turns int + type ThreadStatistics struct + ByStatus map[string]int + ByWorkspace map[string]int + Total int + type TokenDistributionBucket struct + Label string + Max int64 + Min int64 + SpanCount int + TaskCount int + TotalCost float64 + type TokenDistributionResponse struct + Buckets []TokenDistributionBucket + CliCommand string + TotalCost float64 + TotalTasks int + type TopologyAgent struct + Cost float64 + ID string + Label string + Status string + TaskCount int + TrustScore int + type TopologyEdge struct + LastActivity string + MessageCount int + Source string + Target string + type TopologyResponse struct + Agents []TopologyAgent + Edges []TopologyEdge + Sinks []TopologySink + type TopologySink struct + ID string + Label string + PendingCount int + type UIApproval struct + BranchName string + CreatedAt int64 + EffectDeltaJSON string + EstimatedCost float64 + ID string + Impact string + InstanceID string + Proposal string + RequestType string + ReviewNotes string + ReviewedAt *int64 + ReviewedBy string + Status string + StatusDisplay *display.StatusDisplay + Summary string + TaskID string + ThreadID string + ThreadTitle string + Workspace string + WorktreePath string + type UnifiedEvent struct + CorrelationID string + CostUSD float64 + CreatedAt string + Directive string + DirectiveFull string + DurationMs int + FromAgent string + ID string + MetricsSummary string + Model string + Payload string + Provider string + Source string + SourceType string + Status string + TaskID string + Title string + ToInbox string + TokensIn int64 + TokensOut int64 + TurnCount int + Type string + Workspace string + type UnifiedStatsResponse struct + Coordinator *CoordinatorRuntimeStats + Observatory *ObservatoryStats + Sources DataSources + type UsageTimeSeriesPoint struct + Bucket string + BucketEnd string + ByDimension map[string]float64 + Cost float64 + DurationMs int64 + Spans int + TaskCount int + Tokens int64 + TokensIn int64 + TokensOut int64 + Turns int + type UsageTimeSeriesResponse struct + CliCommand string + Interval string + Metric string + Points []UsageTimeSeriesPoint + SplitBy string + TotalCost float64 + type WorkspaceAccessInfo struct + AccessibleWorkspaces []string + IsPublicOnly bool + RequestedWorkspace string + Role string + func GetWorkspaceAccessFromContext(r *http.Request) *WorkspaceAccessInfo + type WorkspaceWithAccess struct + ID string + IsPublic bool + Name string + Role string