Documentation
¶
Index ¶
- func MigrationStream() store.MigrationStream
- type AppMetadataRepo
- func (g *AppMetadataRepo) CompleteOnboarding(ctx context.Context, completedAt string) (store.OnboardingStatus, error)
- func (g *AppMetadataRepo) DeleteAppMetadata(ctx context.Context, key string) error
- func (g *AppMetadataRepo) GetAppMetadata(ctx context.Context, key string) (string, bool, error)
- func (g *AppMetadataRepo) GetOnboardingStatus(ctx context.Context) (store.OnboardingStatus, error)
- func (g *AppMetadataRepo) ResetOnboarding(ctx context.Context) (store.OnboardingStatus, error)
- func (g *AppMetadataRepo) SetAppMetadata(ctx context.Context, key string, value string) error
- type ApprovalGrantRepo
- func (g *ApprovalGrantRepo) ListApprovalGrants(ctx context.Context, workspaceID string) ([]toolspkg.ApprovalGrant, error)
- func (g *ApprovalGrantRepo) LookupApprovalGrant(ctx context.Context, key toolspkg.ApprovalGrantKey) (toolspkg.ApprovalGrant, bool, error)
- func (g *ApprovalGrantRepo) PutApprovalGrant(ctx context.Context, grant toolspkg.ApprovalGrant) (toolspkg.ApprovalGrant, error)
- func (g *ApprovalGrantRepo) RevokeApprovalGrant(ctx context.Context, workspaceID, id string) error
- type AutomationRepo
- func (g *AutomationRepo) ClaimScheduledRun(ctx context.Context, claim automation.SchedulerClaim) (result automation.SchedulerClaimResult, err error)
- func (g *AutomationRepo) CountRuns(ctx context.Context, query automation.RunQuery) (int64, error)
- func (g *AutomationRepo) CreateJob(ctx context.Context, job automation.Job) (created automation.Job, err error)
- func (g *AutomationRepo) CreateRun(ctx context.Context, run automation.Run) (automation.Run, error)
- func (g *AutomationRepo) CreateSuggestion(ctx context.Context, suggestion automation.Suggestion, pendingCap int) (created automation.Suggestion, err error)
- func (g *AutomationRepo) CreateTrigger(ctx context.Context, trigger automation.Trigger) (created automation.Trigger, err error)
- func (g *AutomationRepo) DeleteJob(ctx context.Context, id string) error
- func (g *AutomationRepo) DeleteJobEnabledOverlay(ctx context.Context, jobID string) error
- func (g *AutomationRepo) DeleteRun(ctx context.Context, id string) error
- func (g *AutomationRepo) DeleteSchedulerState(ctx context.Context, jobID string) error
- func (g *AutomationRepo) DeleteTrigger(ctx context.Context, id string) error
- func (g *AutomationRepo) DeleteTriggerEnabledOverlay(ctx context.Context, triggerID string) error
- func (g *AutomationRepo) GetJob(ctx context.Context, id string) (automation.Job, error)
- func (g *AutomationRepo) GetJobEnabledOverlay(ctx context.Context, jobID string) (automation.JobEnabledOverlay, error)
- func (g *AutomationRepo) GetRun(ctx context.Context, id string) (automation.Run, error)
- func (g *AutomationRepo) GetSchedulerState(ctx context.Context, jobID string) (automation.SchedulerState, error)
- func (g *AutomationRepo) GetSuggestion(ctx context.Context, workspaceID string, id string) (automation.Suggestion, error)
- func (g *AutomationRepo) GetTrigger(ctx context.Context, id string) (automation.Trigger, error)
- func (g *AutomationRepo) GetTriggerByWebhookID(ctx context.Context, webhookID string) (automation.Trigger, error)
- func (g *AutomationRepo) GetTriggerEnabledOverlay(ctx context.Context, triggerID string) (automation.TriggerEnabledOverlay, error)
- func (g *AutomationRepo) ListAcceptedSuggestions(ctx context.Context) ([]automation.Suggestion, error)
- func (g *AutomationRepo) ListJobDefinitions(ctx context.Context, source automation.JobSource) (jobs []automation.Job, err error)
- func (g *AutomationRepo) ListJobEnabledOverlays(ctx context.Context) (overlays []automation.JobEnabledOverlay, err error)
- func (g *AutomationRepo) ListJobs(ctx context.Context, query automation.JobListQuery) (page automation.JobListPage, err error)
- func (g *AutomationRepo) ListRuns(ctx context.Context, query automation.RunQuery) (runs []automation.Run, err error)
- func (g *AutomationRepo) ListSchedulerStates(ctx context.Context) ([]automation.SchedulerState, error)
- func (g *AutomationRepo) ListSuggestions(ctx context.Context, workspaceID string, status automation.SuggestionStatus) ([]automation.Suggestion, error)
- func (g *AutomationRepo) ListTriggerDefinitions(ctx context.Context, source automation.JobSource) (triggers []automation.Trigger, err error)
- func (g *AutomationRepo) ListTriggerEnabledOverlays(ctx context.Context) (overlays []automation.TriggerEnabledOverlay, err error)
- func (g *AutomationRepo) ListTriggers(ctx context.Context, query automation.TriggerListQuery) (page automation.TriggerListPage, err error)
- func (g *AutomationRepo) RecordRunDeliveryError(ctx context.Context, runID string, runErr error) (automation.Run, error)
- func (g *AutomationRepo) RecordSuggestionTransition(ctx context.Context, suggestion automation.Suggestion, jobID string) error
- func (g *AutomationRepo) ResolveSuggestion(ctx context.Context, workspaceID string, id string, ...) (resolved automation.Suggestion, err error)
- func (g *AutomationRepo) RollbackSuggestionAcceptance(ctx context.Context, workspaceID string, id string, resolvedAt time.Time) error
- func (g *AutomationRepo) SaveSchedulerState(ctx context.Context, state automation.SchedulerState) (automation.SchedulerState, error)
- func (g *AutomationRepo) SetJobEnabledOverlay(ctx context.Context, overlay automation.JobEnabledOverlay) (automation.JobEnabledOverlay, error)
- func (g *AutomationRepo) SetTriggerEnabledOverlay(ctx context.Context, overlay automation.TriggerEnabledOverlay) (automation.TriggerEnabledOverlay, error)
- func (g *AutomationRepo) UpdateJob(ctx context.Context, job automation.Job) (updated automation.Job, err error)
- func (g *AutomationRepo) UpdateRun(ctx context.Context, run automation.Run) (automation.Run, error)
- func (g *AutomationRepo) UpdateTrigger(ctx context.Context, trigger automation.Trigger) (updated automation.Trigger, err error)
- type BridgeRepo
- func (g *BridgeRepo) CheckpointBridgeDelivery(ctx context.Context, checkpoint bridges.DeliveryLedgerCheckpoint) error
- func (g *BridgeRepo) CountBridgeRoutes(ctx context.Context, bridgeInstanceIDs []string) (counts map[string]int, err error)
- func (g *BridgeRepo) CreateBridgeDelivery(ctx context.Context, record bridges.DeliveryLedgerRecord) error
- func (g *BridgeRepo) DeleteBridgeInstance(ctx context.Context, id string) error
- func (g *BridgeRepo) DeleteBridgeRoute(ctx context.Context, routingKeyHash string) error
- func (g *BridgeRepo) DeleteBridgeSecretBinding(ctx context.Context, bridgeInstanceID string, bindingName string) error
- func (g *BridgeRepo) DeleteBridgeTaskSubscription(ctx context.Context, subscriptionID string) error
- func (g *BridgeRepo) DeleteExpiredBridgeIngestDedup(ctx context.Context, now time.Time) (int64, error)
- func (g *BridgeRepo) FindBridgeTargetsByNormalized(ctx context.Context, bridgeID string, normalized string) ([]bridges.BridgeTarget, error)
- func (g *BridgeRepo) FindBridgeTargetsByPrefix(ctx context.Context, bridgeID string, normalizedPrefix string) ([]bridges.BridgeTarget, error)
- func (g *BridgeRepo) FindBridgeTargetsByQualifiedName(ctx context.Context, bridgeID string, qualifier string, normalized string) ([]bridges.BridgeTarget, error)
- func (g *BridgeRepo) GetBridgeIngestDedup(ctx context.Context, idempotencyKey string, lookupAt time.Time) (bridges.IngestDedupRecord, error)
- func (g *BridgeRepo) GetBridgeInstance(ctx context.Context, id string) (bridges.BridgeInstance, error)
- func (g *BridgeRepo) GetBridgeRoute(ctx context.Context, routingKeyHash string) (bridges.BridgeRoute, error)
- func (g *BridgeRepo) GetBridgeSecretBinding(ctx context.Context, bridgeInstanceID string, bindingName string) (bridges.BridgeSecretBinding, error)
- func (g *BridgeRepo) GetBridgeTargetByCanonical(ctx context.Context, bridgeID string, canonicalRoute string) (bridges.BridgeTarget, error)
- func (g *BridgeRepo) GetBridgeTaskSubscription(ctx context.Context, subscriptionID string) (bridges.BridgeTaskSubscription, error)
- func (g *BridgeRepo) InsertBridgeInstance(ctx context.Context, instance bridges.BridgeInstance) error
- func (g *BridgeRepo) ListBridgeCatalogRecords(ctx context.Context, query bridges.BridgeCatalogQuery) (records []bridges.BridgeCatalogRecord, err error)
- func (g *BridgeRepo) ListBridgeDeliveries(ctx context.Context, query bridges.DeliveryLedgerQuery) (records []bridges.DeliveryLedgerRecord, err error)
- func (g *BridgeRepo) ListBridgeDeliveryMetrics(ctx context.Context, query bridges.DeliveryLedgerQuery) (metrics map[string]bridges.BridgeDeliveryMetrics, err error)
- func (g *BridgeRepo) ListBridgeInstances(ctx context.Context) (instances []bridges.BridgeInstance, err error)
- func (g *BridgeRepo) ListBridgeInstancesByIDs(ctx context.Context, bridgeInstanceIDs []string) (instances []bridges.BridgeInstance, err error)
- func (g *BridgeRepo) ListBridgeRoutes(ctx context.Context, bridgeInstanceID string) (routes []bridges.BridgeRoute, err error)
- func (g *BridgeRepo) ListBridgeSecretBindings(ctx context.Context, bridgeInstanceID string) (bindings []bridges.BridgeSecretBinding, err error)
- func (g *BridgeRepo) ListBridgeSecretBindingsForInstances(ctx context.Context, bridgeInstanceIDs []string) (bindings map[string][]bridges.BridgeSecretBinding, err error)
- func (g *BridgeRepo) ListBridgeTargets(ctx context.Context, query bridges.BridgeTargetQuery) (bridges.BridgeTargetPage, error)
- func (g *BridgeRepo) ListBridgeTaskSubscriptions(ctx context.Context, query bridges.BridgeTaskSubscriptionQuery) (subscriptions []bridges.BridgeTaskSubscription, err error)
- func (g *BridgeRepo) PutBridgeDeliveryMetrics(ctx context.Context, record bridges.DeliveryMetricRecord) error
- func (g *BridgeRepo) PutBridgeIngestDedup(ctx context.Context, record bridges.IngestDedupRecord) error
- func (g *BridgeRepo) PutBridgeRoute(ctx context.Context, route bridges.BridgeRoute) error
- func (g *BridgeRepo) PutBridgeSecretBinding(ctx context.Context, binding bridges.BridgeSecretBinding) error
- func (g *BridgeRepo) PutBridgeTaskSubscription(ctx context.Context, subscription bridges.BridgeTaskSubscription) error
- func (g *BridgeRepo) RefreshBridgeTargets(ctx context.Context, bridgeID string, targets []bridges.BridgeTarget, ...) error
- func (g *BridgeRepo) ReplaceBridgeInstances(ctx context.Context, instances []bridges.BridgeInstance) (err error)
- func (g *BridgeRepo) ResolveBridgeRoute(ctx context.Context, key bridges.RoutingKey) (bridges.BridgeRoute, error)
- func (g *BridgeRepo) UpdateBridgeInstance(ctx context.Context, instance bridges.BridgeInstance) error
- type BundleRepo
- type DeadEntityRepo
- func (g *DeadEntityRepo) ClearDeadEntity(ctx context.Context, workspaceID string, kind store.DeadEntityKind, ...) error
- func (g *DeadEntityRepo) FindDeadEntity(ctx context.Context, workspaceID string, kind store.DeadEntityKind, ...) (store.DeadEntity, bool, error)
- func (g *DeadEntityRepo) ListDeadEntities(ctx context.Context, workspaceID string) ([]store.DeadEntity, error)
- func (g *DeadEntityRepo) MarkDeadEntity(ctx context.Context, entity store.DeadEntity) error
- type EventRecordInsert
- type GlobalDB
- type GoalRepo
- func (g *GoalRepo) AcknowledgeGoalSessionCleanup(ctx context.Context, cleanupID string, completedAt time.Time) error
- func (g *GoalRepo) AcknowledgeGoalSessionOutbox(ctx context.Context, eventID string, deliveredAt time.Time) error
- func (g *GoalRepo) ActivateSessionBinding(ctx context.Context, req goal.ActivateBindingRequest) (goal.SessionBinding, error)
- func (g *GoalRepo) AdvanceBindingCreationFailure(ctx context.Context, req goal.AdvanceBindingCreationFailureRequest) error
- func (g *GoalRepo) BeginCompactionCancel(ctx context.Context, req goal.BeginCompactionCancelRequest) error
- func (g *GoalRepo) BeginJudgeAttempt(ctx context.Context, req goal.BeginJudgeAttemptRequest) (goal.JudgeAttempt, error)
- func (g *GoalRepo) CheckpointControl(ctx context.Context, req goal.ControlCheckpointRequest) error
- func (g *GoalRepo) ClaimGoalSessionCleanup(ctx context.Context, limit int) (obligations []goal.SessionCleanupObligation, err error)
- func (g *GoalRepo) ClaimGoalSessionOutbox(ctx context.Context, limit int) (events []goal.SessionOutboxEvent, err error)
- func (g *GoalRepo) ClaimPreparedCompaction(ctx context.Context, req goal.ClaimPreparedCompactionRequest) (goal.ClaimedPrompt, error)
- func (g *GoalRepo) ClaimPreparedWorkPrompt(ctx context.Context, req goal.ClaimPreparedWorkPromptRequest) (goal.ClaimedPrompt, error)
- func (g *GoalRepo) CloseSessionBinding(ctx context.Context, req goal.CloseBindingRequest) error
- func (g *GoalRepo) CompleteCompaction(ctx context.Context, req goal.CompleteCompactionRequest) (goal.Checkpoint, error)
- func (g *GoalRepo) CompleteJudgeAttempt(ctx context.Context, req goal.CompleteJudgeAttemptRequest) (goal.JudgeAttempt, error)
- func (g *GoalRepo) CompleteTurn(ctx context.Context, req goal.CompleteTurnRequest) (goal.Checkpoint, error)
- func (g *GoalRepo) CreateCheckpoint(ctx context.Context, req goal.CreateCheckpointRequest) (goal.Checkpoint, error)
- func (g *GoalRepo) EnqueueGoalSessionOutbox(ctx context.Context, request goal.EnqueueSessionOutboxRequest) (goal.SessionOutboxEvent, error)
- func (g *GoalRepo) FencePreparedPrompt(ctx context.Context, req goal.FencePreparedPromptRequest) error
- func (g *GoalRepo) FinalizeGoalPrompt(ctx context.Context, req goal.FinalizePromptRequest) error
- func (g *GoalRepo) FinalizeSessionBindingCreation(ctx context.Context, req goal.ActivateBindingRequest) (goal.SessionBinding, bool, error)
- func (g *GoalRepo) FindGoalReportTarget(ctx context.Context, workspaceID looppkg.WorkspaceID, sessionID string) (goal.ToolReportTarget, bool, error)
- func (g *GoalRepo) FlushAndCheck(ctx context.Context, snapshot goal.BudgetBoundarySnapshot) (goal.BudgetDecision, error)
- func (g *GoalRepo) GetActiveSessionBinding(ctx context.Context, key goal.BindingKey) (goal.SessionBinding, error)
- func (g *GoalRepo) GetGoalTurnByPromptID(ctx context.Context, key goal.TurnKey, promptID string) (goal.Turn, error)
- func (g *GoalRepo) GetJudgeAttempt(ctx context.Context, key goal.TurnKey, attemptID string) (goal.JudgeAttempt, error)
- func (g *GoalRepo) GetOrCreateSessionBinding(ctx context.Context, req goal.GetOrCreateBindingRequest) (goal.SessionBinding, error)
- func (g *GoalRepo) GetSessionBindingAttempt(ctx context.Context, key goal.BindingKey, epoch int64) (goal.SessionBinding, error)
- func (g *GoalRepo) GetSessionGoalProjection(ctx context.Context, workspaceID looppkg.WorkspaceID, sessionID string) (projection goal.SessionProjection, err error)
- func (g *GoalRepo) GrantAndReactivate(ctx context.Context, req goal.GrantRequest) error
- func (g *GoalRepo) ListGoalTurns(ctx context.Context, query goal.TurnQuery) (page goal.TurnPage, err error)
- func (g *GoalRepo) LoadAwaitingGoalControl(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID) (looppkg.GoalControlState, bool, error)
- func (g *GoalRepo) LoadCheckpoint(ctx context.Context, key goal.TurnKey) (goal.Checkpoint, error)
- func (g *GoalRepo) MarkAmbiguous(ctx context.Context, req goal.AmbiguousRequest) error
- func (g *GoalRepo) MarkJudgeAmbiguous(ctx context.Context, req goal.MarkJudgeAmbiguousRequest) error
- func (g *GoalRepo) PrepareGoalPrompt(ctx context.Context, req goal.PreparePromptRequest) (goal.PromptTicket, error)
- func (g *GoalRepo) PrepareSessionBindingAttempt(ctx context.Context, req goal.PrepareBindingAttemptRequest) (goal.SessionBinding, error)
- func (g *GoalRepo) ReactivateGoalRun(ctx context.Context, req looppkg.GoalReactivationRequest) (looppkg.GoalReactivationResult, error)
- func (g *GoalRepo) ReconcileGoalSessionCleanup(ctx context.Context) error
- func (g *GoalRepo) RecordContextUsage(ctx context.Context, req goal.RecordContextUsageRequest) (goal.Checkpoint, error)
- func (g *GoalRepo) RecordGoalDriverAttached(ctx context.Context, req goal.DriverAttachmentRequest) error
- func (g *GoalRepo) RecordGoalReport(ctx context.Context, req goal.RecordToolReportRequest) (goal.ReportIntent, error)
- func (g *GoalRepo) RecordReportIntent(ctx context.Context, req goal.RecordReportIntentRequest) (goal.ReportIntent, error)
- func (g *GoalRepo) RecoverGoalPromptTerminal(ctx context.Context, req goal.RecoverPromptTerminalRequest) error
- func (g *GoalRepo) RejectPreparedGoalPrompt(ctx context.Context, req goal.RejectPreparedPromptRequest) error
- func (g *GoalRepo) ResolveActiveGoalOriginAlias(ctx context.Context, workspaceID looppkg.WorkspaceID, sessionID string) (originSessionID string, found bool, err error)
- func (g *GoalRepo) RevokeGoalPrompt(ctx context.Context, request goal.RevokePromptRequest) (goal.Checkpoint, error)
- func (g *GoalRepo) SettleStoppedSessionBindingCreation(ctx context.Context, req goal.SettleStoppedBindingCreationRequest) (bool, error)
- func (g *GoalRepo) StopGoalRun(ctx context.Context, request looppkg.GoalRunStopRequest) (looppkg.GoalRunStopResult, error)
- type HeartbeatRepo
- func (g *HeartbeatRepo) AppendHeartbeatRevision(ctx context.Context, revision heartbeat.Revision) (heartbeat.Revision, error)
- func (g *HeartbeatRepo) AppendHeartbeatWakeEvent(ctx context.Context, event heartbeat.WakeEvent) (heartbeat.WakeEvent, error)
- func (g *HeartbeatRepo) DeleteHeartbeatAgentHistory(ctx context.Context, workspaceID string, agentName string, sourcePath string) error
- func (g *HeartbeatRepo) FindHeartbeatRevisionForRollback(ctx context.Context, query heartbeat.RollbackLookup) (heartbeat.Revision, error)
- func (g *HeartbeatRepo) FindHeartbeatSnapshotByDigest(ctx context.Context, workspaceID string, agentName string, digest string) (heartbeat.Snapshot, bool, error)
- func (g *HeartbeatRepo) GetHeartbeatRevision(ctx context.Context, id string) (heartbeat.Revision, error)
- func (g *HeartbeatRepo) GetHeartbeatSnapshot(ctx context.Context, id string) (heartbeat.Snapshot, error)
- func (g *HeartbeatRepo) GetHeartbeatWakeEvent(ctx context.Context, id string) (heartbeat.WakeEvent, error)
- func (g *HeartbeatRepo) GetHeartbeatWakeState(ctx context.Context, workspaceID string, agentName string, sessionID string) (heartbeat.WakeState, error)
- func (g *HeartbeatRepo) GetLatestValidHeartbeatSnapshot(ctx context.Context, workspaceID string, agentName string) (heartbeat.Snapshot, error)
- func (g *HeartbeatRepo) GetSessionHealth(ctx context.Context, sessionID string) (heartbeat.SessionHealth, error)
- func (g *HeartbeatRepo) ListHeartbeatRevisions(ctx context.Context, query heartbeat.RevisionListQuery) (revisions []heartbeat.Revision, err error)
- func (g *HeartbeatRepo) ListHeartbeatSnapshots(ctx context.Context, query heartbeat.SnapshotListQuery) (snapshots []heartbeat.Snapshot, err error)
- func (g *HeartbeatRepo) ListHeartbeatWakeEvents(ctx context.Context, query heartbeat.WakeEventListQuery) (events []heartbeat.WakeEvent, err error)
- func (g *HeartbeatRepo) ListHeartbeatWakeState(ctx context.Context, query heartbeat.WakeStateListQuery) (states []heartbeat.WakeState, err error)
- func (g *HeartbeatRepo) ListSessionHealth(ctx context.Context, query heartbeat.SessionHealthListQuery) (rowsOut []heartbeat.SessionHealth, err error)
- func (g *HeartbeatRepo) ListSessionHealthRecoveryInputs(ctx context.Context, limit int) ([]heartbeat.SessionHealth, error)
- func (g *HeartbeatRepo) MarkSessionHealthStale(ctx context.Context, cutoff time.Time, updatedAt time.Time) (int64, error)
- func (g *HeartbeatRepo) RecordHeartbeatWakeDecision(ctx context.Context, event heartbeat.WakeEvent, state heartbeat.WakeState) (outEvent heartbeat.WakeEvent, outState heartbeat.WakeState, err error)
- func (g *HeartbeatRepo) SweepHeartbeatWakeEvents(ctx context.Context, cutoff time.Time, limit int) (int64, error)
- func (g *HeartbeatRepo) UpsertHeartbeatSnapshot(ctx context.Context, snapshot heartbeat.Snapshot) (heartbeat.Snapshot, error)
- func (g *HeartbeatRepo) UpsertHeartbeatWakeState(ctx context.Context, state heartbeat.WakeState) (heartbeat.WakeState, error)
- func (g *HeartbeatRepo) UpsertSessionHealth(ctx context.Context, health heartbeat.SessionHealth) (heartbeat.SessionHealth, error)
- type LoopRepo
- func (g *LoopRepo) AdvanceLoopRunProgress(ctx context.Context, loopRunID string, at time.Time) error
- func (g *LoopRepo) ClearInlineGoal(ctx context.Context, request looppkg.InlineGoalClearStoreRequest) (looppkg.InlineGoalClearStoreResult, error)
- func (g *LoopRepo) CompareAndSwapLoopRunStatus(ctx context.Context, runID looppkg.RunID, from looppkg.Status, ...) error
- func (g *LoopRepo) CreateInlineLoopRunForStart(ctx context.Context, run looppkg.Run) (looppkg.Run, error)
- func (g *LoopRepo) CreateLoopRunForStart(ctx context.Context, run looppkg.Run, policy dsl.ConcurrencyPolicy) (looppkg.Run, error)
- func (g *LoopRepo) EnqueueLoopCoordinatorWake(ctx context.Context, loopRunID string, idempotencyKey string, ...) (taskpkg.Run, bool, error)
- func (g *LoopRepo) EnqueueWatchEventsGapWakes(ctx context.Context, origin taskpkg.Origin, now time.Time) ([]taskpkg.Run, error)
- func (g *LoopRepo) EnqueueWatchEventsGapWakesPage(ctx context.Context, origin taskpkg.Origin, now time.Time, ...) ([]taskpkg.Run, looppkg.ParkedWatchEventScanCursor, error)
- func (g *LoopRepo) FindActiveLoopRun(ctx context.Context, ws looppkg.WorkspaceID, loopName string) (*looppkg.Run, error)
- func (g *LoopRepo) GetLoopConfig(ctx context.Context, ws looppkg.WorkspaceID, loopName string) (*looppkg.LoopConfig, error)
- func (g *LoopRepo) GetLoopDefinitionSnapshot(ctx context.Context, ws looppkg.WorkspaceID, digest string) (looppkg.DefinitionSnapshot, error)
- func (g *LoopRepo) GetLoopRun(ctx context.Context, ws looppkg.WorkspaceID, runID looppkg.RunID) (looppkg.Run, error)
- func (g *LoopRepo) GetLoopRunByID(ctx context.Context, runID looppkg.RunID) (looppkg.Run, error)
- func (g *LoopRepo) ListGenerationOutputs(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ...) ([]looppkg.GenerationOutput, error)
- func (g *LoopRepo) ListLoopCatalogRunSummaries(ctx context.Context, query looppkg.CatalogRunQuery) (summaries map[string]looppkg.CatalogRunSummary, err error)
- func (g *LoopRepo) ListLoopGateDecisions(ctx context.Context, ws looppkg.WorkspaceID, runID looppkg.RunID, ...) (decisions map[string]gate.HumanDecision, err error)
- func (g *LoopRepo) ListLoopRunEvents(ctx context.Context, query looppkg.RunEventQuery) ([]looppkg.RunEvent, error)
- func (g *LoopRepo) ListLoopRuns(ctx context.Context, query looppkg.RunListQuery) (runs []looppkg.Run, err error)
- func (g *LoopRepo) ListLoopUIAnnotations(ctx context.Context, ws looppkg.WorkspaceID, loopName string) ([]looppkg.UIAnnotation, error)
- func (g *LoopRepo) LookupLoopGenerationOutputStatus(ctx context.Context, workspaceID string, loopRunID string, taskRunID string) (string, bool, error)
- func (g *LoopRepo) PromoteOldestQueuedLoopRun(ctx context.Context, workspaceID string, loopName string, ...) (taskpkg.Run, bool, error)
- func (g *LoopRepo) ReconcileLoopCoordinatorsOnBoot(ctx context.Context, origin taskpkg.Origin, now time.Time) ([]taskpkg.Run, error)
- func (g *LoopRepo) RecordAppliedRuntime(ctx context.Context, workspaceID looppkg.WorkspaceID, loopRunID looppkg.RunID, ...) (returnErr error)
- func (g *LoopRepo) RecordLoopGateDecisions(ctx context.Context, records []looppkg.GateDecisionRecord) error
- func (g *LoopRepo) ReplaceInlineLoopRun(ctx context.Context, request looppkg.InlineReplaceStoreRequest) (looppkg.InlineReplaceStoreResult, error)
- func (g *LoopRepo) ReplaceLoopUIAnnotations(ctx context.Context, ws looppkg.WorkspaceID, loopName string, ...) error
- func (g *LoopRepo) SetLoopRunPauseRequested(ctx context.Context, ws looppkg.WorkspaceID, runID looppkg.RunID, ...) error
- func (g *LoopRepo) UpsertLoopConfig(ctx context.Context, ws looppkg.WorkspaceID, loopName string, ...) error
- type MarketplaceRepo
- func (r *MarketplaceRepo) GetMarketplaceCatalogEntry(ctx context.Context, kind string, entryID string) (store.MarketplaceCatalogEntry, error)
- func (r *MarketplaceRepo) GetMarketplaceCatalogState(ctx context.Context, kind string) (store.MarketplaceCatalogState, error)
- func (r *MarketplaceRepo) GetMarketplaceExtensionByInstallSlug(ctx context.Context, installSlug string, version string) (store.MarketplaceCatalogEntry, error)
- func (r *MarketplaceRepo) ListMarketplaceCatalogEntries(ctx context.Context, kind string, limit int64) ([]store.MarketplaceCatalogEntry, error)
- func (r *MarketplaceRepo) ListMarketplaceSkillsByInstallSlugs(ctx context.Context, installSlugs []string) ([]store.MarketplaceCatalogEntry, error)
- func (r *MarketplaceRepo) MarkMarketplaceCatalogStale(ctx context.Context, kind string, lastError string) error
- func (r *MarketplaceRepo) ReplaceMarketplaceCatalog(ctx context.Context, replacement store.MarketplaceCatalogReplacement) (err error)
- type ModelCatalogRepo
- func (g *ModelCatalogRepo) ListRows(ctx context.Context, opts modelcatalog.ListOptions) (catalogRows []modelcatalog.ModelRow, err error)
- func (g *ModelCatalogRepo) ListSourceStatus(ctx context.Context, providerID string) (statuses []modelcatalog.SourceStatus, err error)
- func (g *ModelCatalogRepo) ReplaceSourceRows(ctx context.Context, sourceID string, providerID string, ...) error
- type NetworkRepo
- func (g *NetworkRepo) AcceptNetworkMessage(ctx context.Context, req store.AcceptNetworkMessageRequest) (result store.AcceptNetworkMessageResult, err error)
- func (g *NetworkRepo) CreateNetworkChannel(ctx context.Context, entry store.NetworkChannelEntry) error
- func (g *NetworkRepo) DeleteNetworkChannel(ctx context.Context, ref store.NetworkChannelRef) error
- func (g *NetworkRepo) DeleteNetworkSubscription(ctx context.Context, ref store.NetworkSubscriptionRef) error
- func (g *NetworkRepo) GetDirectRoom(ctx context.Context, channelRef store.NetworkChannelRef, directID string) (store.NetworkDirectRoomSummary, error)
- func (g *NetworkRepo) GetNetworkAvailability(ctx context.Context) (store.NetworkAvailability, error)
- func (g *NetworkRepo) GetNetworkChannel(ctx context.Context, ref store.NetworkChannelRef) (store.NetworkChannelEntry, error)
- func (g *NetworkRepo) GetNetworkUsage(ctx context.Context, query store.NetworkUsageQuery) (store.NetworkUsageReport, error)
- func (g *NetworkRepo) GetThread(ctx context.Context, channelRef store.NetworkChannelRef, threadID string) (store.NetworkThreadSummary, error)
- func (g *NetworkRepo) GetWork(ctx context.Context, workspaceID string, workID string) (store.NetworkWorkEntry, error)
- func (g *NetworkRepo) ListConversationMessages(ctx context.Context, ref store.NetworkConversationRef, ...) (entries []store.NetworkConversationMessage, err error)
- func (g *NetworkRepo) ListDirectRooms(ctx context.Context, ref store.NetworkChannelRef, ...) (page store.NetworkDirectRoomPage, err error)
- func (g *NetworkRepo) ListNetworkAudit(ctx context.Context, query store.NetworkAuditQuery) (entries []store.NetworkAuditEntry, err error)
- func (g *NetworkRepo) ListNetworkChannelKindCounts(ctx context.Context, ref store.NetworkChannelRef) (counts []store.NetworkChannelKindCount, err error)
- func (g *NetworkRepo) ListNetworkChannelProjections(ctx context.Context, query store.NetworkChannelProjectionQuery) (projections []store.NetworkChannelProjection, err error)
- func (g *NetworkRepo) ListNetworkChannels(ctx context.Context, query store.NetworkChannelQuery) (entries []store.NetworkChannelEntry, err error)
- func (g *NetworkRepo) ListNetworkInbox(ctx context.Context, workspaceID string, sessionID string, channel string, ...) (entries []store.NetworkMessageEntry, err error)
- func (g *NetworkRepo) ListNetworkMessages(ctx context.Context, query store.NetworkMessageQuery) (entries []store.NetworkMessageEntry, err error)
- func (g *NetworkRepo) ListNetworkRecents(ctx context.Context, query store.NetworkRecentQuery) ([]store.NetworkRecentSummary, error)
- func (g *NetworkRepo) ListNetworkSubscriptions(ctx context.Context, query store.NetworkSubscriptionQuery) (entries []store.NetworkSubscriptionEntry, err error)
- func (g *NetworkRepo) ListNetworkTaskStatusProjections(ctx context.Context, query store.NetworkTaskStatusProjectionQuery) (projections []store.NetworkTaskStatusProjection, err error)
- func (g *NetworkRepo) ListNetworkTaskThreadOrigins(ctx context.Context, query store.NetworkTaskThreadOriginQuery) (origins []store.NetworkTaskThreadOrigin, err error)
- func (g *NetworkRepo) ListNetworkThreadSessionTokenStats(ctx context.Context, query store.NetworkThreadSessionTokenStatsQuery) (stats []store.NetworkThreadSessionTokenStats, err error)
- func (g *NetworkRepo) ListQueuedNetworkWakes(ctx context.Context, limit int) (notifications []store.CommittedNetworkNotification, err error)
- func (g *NetworkRepo) ListTaskDesignationRollups(ctx context.Context, query store.TaskDesignationRollupQuery) (rollups []store.TaskDesignationRollup, err error)
- func (g *NetworkRepo) ListThreadParticipants(ctx context.Context, ref store.NetworkChannelRef, threadID string) (participants []store.NetworkThreadParticipant, err error)
- func (g *NetworkRepo) ListThreads(ctx context.Context, ref store.NetworkChannelRef, ...) (page store.NetworkThreadPage, err error)
- func (g *NetworkRepo) LoadNetworkWake(ctx context.Context, workspaceID string, wakeID string) (store.WakeReservation, []store.NetworkMessageEntry, error)
- func (g *NetworkRepo) PatchNetworkChannel(ctx context.Context, ref store.NetworkChannelRef, ...) error
- func (g *NetworkRepo) PutNetworkSubscription(ctx context.Context, entry store.NetworkSubscriptionEntry) error
- func (g *NetworkRepo) PutNetworkSubscriptionWithChannel(ctx context.Context, channel store.NetworkChannelEntry, ...) error
- func (g *NetworkRepo) PutNetworkTaskThreadOrigin(ctx context.Context, origin store.NetworkTaskThreadOrigin) error
- func (g *NetworkRepo) PutTaskDesignationRollup(ctx context.Context, rollup store.TaskDesignationRollup) error
- func (g *NetworkRepo) ResolveDirectRoom(ctx context.Context, entry store.NetworkDirectRoomEntry) (summary store.NetworkDirectRoomSummary, err error)
- func (g *NetworkRepo) ResolveNetworkCausation(ctx context.Context, workspaceID string, causationID string) (string, int, bool, error)
- func (g *NetworkRepo) SetNetworkAvailability(ctx context.Context, enabled bool, updatedBy string) (availability store.NetworkAvailability, err error)
- func (g *NetworkRepo) UpdateNetworkThreadSessionTokenStats(ctx context.Context, update store.NetworkThreadSessionTokenStatsUpdate) error
- func (g *NetworkRepo) WriteConversationMessage(ctx context.Context, entry store.NetworkConversationMessage) (result store.NetworkConversationWriteResult, err error)
- func (g *NetworkRepo) WriteNetworkAudit(ctx context.Context, entry store.NetworkAuditEntry) error
- func (g *NetworkRepo) WriteNetworkChannel(ctx context.Context, entry store.NetworkChannelEntry) error
- func (g *NetworkRepo) WriteNetworkMessage(ctx context.Context, entry store.NetworkMessageEntry) error
- type NotificationRepo
- func (n *NotificationRepo) AdvanceCursor(ctx context.Context, update notifications.AdvanceCursor) (cursor notifications.Cursor, err error)
- func (n *NotificationRepo) CreatePreset(ctx context.Context, preset presetspkg.Preset) (presetspkg.Preset, error)
- func (n *NotificationRepo) DeletePreset(ctx context.Context, name string) error
- func (n *NotificationRepo) EnsureBuiltInPresets(ctx context.Context, defaults []presetspkg.Preset) error
- func (n *NotificationRepo) GetCursor(ctx context.Context, key notifications.CursorKey) (notifications.Cursor, error)
- func (n *NotificationRepo) GetPreset(ctx context.Context, name string) (presetspkg.Preset, error)
- func (n *NotificationRepo) ListCursors(ctx context.Context, query notifications.CursorQuery) (cursors []notifications.Cursor, err error)
- func (n *NotificationRepo) ListPresets(ctx context.Context, query presetspkg.Query) (items []presetspkg.Preset, err error)
- func (n *NotificationRepo) RecordCursorError(ctx context.Context, report notifications.CursorError) (cursor notifications.Cursor, err error)
- func (n *NotificationRepo) ResetCursor(ctx context.Context, reset notifications.ResetCursor) (cursor notifications.Cursor, err error)
- func (n *NotificationRepo) UpdatePreset(ctx context.Context, name string, req presetspkg.UpdateRequest) (presetspkg.Preset, error)
- type ObserveRepo
- func (g *ObserveRepo) CountEventsByHourWeekday(ctx context.Context, query store.OverviewSinceQuery) ([]store.EventHourWeekdayBucket, error)
- func (g *ObserveRepo) CountHookDispatchesSince(ctx context.Context, query store.OverviewSinceQuery) (store.HookDispatchCounts, error)
- func (g *ObserveRepo) CountNetworkMessagesSince(ctx context.Context, query store.OverviewSinceQuery) (int, error)
- func (g *ObserveRepo) CountTaskRunOutcomesByDay(ctx context.Context, query store.OverviewSinceQuery) ([]store.TaskRunOutcomeDay, error)
- func (g *ObserveRepo) CountTasksClosedByDay(ctx context.Context, query store.OverviewSinceQuery) ([]store.TaskClosedDay, error)
- func (g *ObserveRepo) LatestEventSummaryAt(ctx context.Context, workspaceID string) (time.Time, error)
- func (g *ObserveRepo) ListEventSummaries(ctx context.Context, query store.EventSummaryQuery) (summaries []store.EventSummary, err error)
- func (g *ObserveRepo) ListTokenStats(ctx context.Context, query store.TokenStatsQuery) (stats []store.TokenStats, err error)
- func (g *ObserveRepo) ListTokenUsageByAgent(ctx context.Context, query store.OverviewDayQuery) ([]store.TokenUsageAgentTotal, error)
- func (g *ObserveRepo) ListTokenUsageByDay(ctx context.Context, query store.OverviewDayQuery) ([]store.TokenUsageDay, error)
- func (g *ObserveRepo) LongestUserSessionSince(ctx context.Context, query store.OverviewSinceQuery) (*store.LongestSessionSample, error)
- func (g *ObserveRepo) RecordTokenUsage(ctx context.Context, stats store.TokenStatsUpdate, ...) (err error)
- func (g *ObserveRepo) SumTokenUsageCost(ctx context.Context, query store.OverviewDayQuery) ([]store.TokenUsageCostGroup, error)
- func (g *ObserveRepo) SweepObservability(ctx context.Context, cutoff time.Time) (result store.ObservabilityRetentionSweepResult, err error)
- func (g *ObserveRepo) UpdateTokenStats(ctx context.Context, update store.TokenStatsUpdate) error
- func (g *ObserveRepo) UpsertTokenUsageDaily(ctx context.Context, update store.TokenUsageDailyUpdate) error
- func (g *ObserveRepo) WriteEventSummary(ctx context.Context, summary store.EventSummary) error
- type OpenOption
- type PermissionRepo
- type SessionRepo
- func (g *SessionRepo) AdvanceSessionInputGeneration(ctx context.Context, sessionID string, now time.Time) (int64, error)
- func (g *SessionRepo) AggregateSessionsByAgent(ctx context.Context, query store.SessionAgentMetricsQuery) (metrics []store.SessionAgentMetrics, err error)
- func (g *SessionRepo) AttachSession(ctx context.Context, req store.SessionAttachRequest) (store.SessionAttach, error)
- func (g *SessionRepo) CancelPendingSessionInputs(ctx context.Context, sessionID string, generation int64, now time.Time) (int, error)
- func (g *SessionRepo) CancelSessionInput(ctx context.Context, sessionID string, entryID string, now time.Time) (store.SessionInputQueueEntry, error)
- func (g *SessionRepo) ClaimNextSessionInput(ctx context.Context, sessionID string, now time.Time) (entry store.SessionInputQueueEntry, ok bool, err error)
- func (g *SessionRepo) ConsumeSessionSteer(ctx context.Context, sessionID string, now time.Time) (entry store.SessionInputQueueEntry, ok bool, err error)
- func (g *SessionRepo) CurrentSessionInputGeneration(ctx context.Context, sessionID string) (int64, error)
- func (g *SessionRepo) DeleteSession(ctx context.Context, sessionID string) error
- func (g *SessionRepo) EnqueueSessionInput(ctx context.Context, req store.SessionInputQueueInsert) (entry store.SessionInputQueueEntry, position int, err error)
- func (g *SessionRepo) EnsureSessionTranscriptEpoch(ctx context.Context, update store.SessionTranscriptEpochUpdate) (int64, error)
- func (g *SessionRepo) GetSessionCreationIdentity(ctx context.Context, sessionID string) (store.SessionCreationIdentity, error)
- func (g *SessionRepo) GetSessionCreationProfile(ctx context.Context, profileRef string) (store.SessionCreationProfile, error)
- func (g *SessionRepo) GetSessionInputQueueEntry(ctx context.Context, sessionID string, entryID string) (store.SessionInputQueueEntry, error)
- func (g *SessionRepo) GetSessionInputQueueEntryByID(ctx context.Context, entryID string) (store.SessionInputQueueEntry, error)
- func (g *SessionRepo) ListSessionHealthByIDs(ctx context.Context, sessionIDs []string) ([]heartbeat.SessionHealth, error)
- func (g *SessionRepo) ListSessions(ctx context.Context, query store.SessionListQuery) (sessions []store.SessionInfo, err error)
- func (g *SessionRepo) MarkSessionInputFailed(ctx context.Context, sessionID string, entryID string, summary string, ...) error
- func (g *SessionRepo) MarkSessionInputSent(ctx context.Context, sessionID string, entryID string, now time.Time) error
- func (g *SessionRepo) PageSessions(ctx context.Context, query store.SessionCatalogPageQuery) (page store.SessionCatalogPage, err error)
- func (g *SessionRepo) PeekNextSessionInput(ctx context.Context, sessionID string) (store.SessionInputQueueEntry, bool, error)
- func (g *SessionRepo) PutSessionCreationProfile(ctx context.Context, profile store.SessionCreationProfile) (string, error)
- func (g *SessionRepo) ReconcileSessions(ctx context.Context, sessions []store.SessionInfo) (store.ReconcileResult, error)
- func (g *SessionRepo) RegisterSession(ctx context.Context, session store.SessionInfo) error
- func (g *SessionRepo) RegisterSessionWithCreationIdentity(ctx context.Context, session store.SessionInfo, ...) (store.SessionCreationRegistration, error)
- func (g *SessionRepo) ReleaseSessionInput(ctx context.Context, sessionID string, entryID string, now time.Time) error
- func (g *SessionRepo) SessionInputQueueSummary(ctx context.Context, sessionID string) (summary store.SessionInputQueueSummary, err error)
- func (g *SessionRepo) SessionTranscriptEpoch(ctx context.Context, sessionID string) (int64, error)
- func (g *SessionRepo) StageSessionSteer(ctx context.Context, req store.SessionInputQueueInsert) (entry store.SessionInputQueueEntry, err error)
- func (g *SessionRepo) SweepExpiredSessionAttachLocks(ctx context.Context, now time.Time) (int64, error)
- func (g *SessionRepo) UpdateSessionState(ctx context.Context, update store.SessionStateUpdate) error
- type SoulRepo
- func (g *SoulRepo) AppendSoulRevision(ctx context.Context, revision soul.Revision) (soul.Revision, error)
- func (g *SoulRepo) DeleteSoulAgentHistory(ctx context.Context, workspaceID string, agentName string, sourcePath string) error
- func (g *SoulRepo) FindSoulRevisionForRollback(ctx context.Context, query soul.RollbackLookup) (soul.Revision, error)
- func (g *SoulRepo) FindSoulSnapshotByDigest(ctx context.Context, workspaceID string, agentName string, digest string) (soul.Snapshot, bool, error)
- func (g *SoulRepo) GetSoulRevision(ctx context.Context, id string) (soul.Revision, error)
- func (g *SoulRepo) GetSoulSnapshot(ctx context.Context, id string) (soul.Snapshot, error)
- func (g *SoulRepo) ListSoulRevisions(ctx context.Context, query soul.RevisionListQuery) (revisions []soul.Revision, err error)
- func (g *SoulRepo) ListSoulSnapshots(ctx context.Context, query soul.SnapshotListQuery) (snapshots []soul.Snapshot, err error)
- func (g *SoulRepo) UpdateSessionSoulSnapshot(ctx context.Context, update store.SessionSoulSnapshotUpdate) error
- func (g *SoulRepo) UpsertSoulSnapshot(ctx context.Context, snapshot soul.Snapshot) (soul.Snapshot, error)
- type TaskRepo
- func (g *TaskRepo) BlockTaskAndReleaseRun(ctx context.Context, mutation taskpkg.BlockTaskAndReleaseRunMutation) (taskpkg.BlockTaskAndReleaseRunResult, error)
- func (g *TaskRepo) ClearTaskBlock(ctx context.Context, mutation taskpkg.ClearTaskBlockMutation) (taskpkg.TaskBlock, error)
- func (g *TaskRepo) ClearTaskNeedsAttention(ctx context.Context, mutation taskpkg.NeedsAttentionClearMutation) (taskpkg.NeedsAttentionClearResult, error)
- func (g *TaskRepo) CompleteCoordinatorAndEnqueueNext(ctx context.Context, completion taskpkg.CoordinatorCompletion, ...) (taskpkg.CoordinatorCompletionResult, error)
- func (g *TaskRepo) CompleteRunSettlement(ctx context.Context, run taskpkg.Run, actor taskpkg.ActorContext) (taskpkg.CompletedRunSettlement, error)
- func (g *TaskRepo) CountActiveSessionBindings(ctx context.Context, sessionID string) (int, error)
- func (g *TaskRepo) CountActiveTaskRunClaims(ctx context.Context) (int, error)
- func (g *TaskRepo) CountDependencies(ctx context.Context, taskID string) (int, error)
- func (g *TaskRepo) CountDirectChildren(ctx context.Context, parentTaskID string) (int, error)
- func (g *TaskRepo) CountEscalatingQueuedTaskRuns(ctx context.Context) (int, error)
- func (g *TaskRepo) CountNeedsAttentionTaskRuns(ctx context.Context) (int, error)
- func (g *TaskRepo) CountPausedTasks(ctx context.Context) (int, error)
- func (g *TaskRepo) CountQueuedTaskRuns(ctx context.Context, includePaused bool) (int, error)
- func (g *TaskRepo) CreateDependency(ctx context.Context, dependency taskpkg.Dependency) error
- func (g *TaskRepo) CreateTask(ctx context.Context, record taskpkg.Task) error
- func (g *TaskRepo) CreateTaskBlock(ctx context.Context, mutation taskpkg.CreateTaskBlockMutation) (taskpkg.BlockMutationResult, error)
- func (g *TaskRepo) CreateTaskDefinition(ctx context.Context, mutation taskpkg.CreateTaskDefinitionMutation) error
- func (g *TaskRepo) CreateTaskEvent(ctx context.Context, event taskpkg.Event) error
- func (g *TaskRepo) CreateTaskRun(ctx context.Context, run taskpkg.Run) error
- func (g *TaskRepo) DeleteDependency(ctx context.Context, taskID string, dependsOnID string) error
- func (g *TaskRepo) DeleteExecutionProfile(ctx context.Context, taskID string) error
- func (g *TaskRepo) DeleteTask(ctx context.Context, id string) error
- func (g *TaskRepo) DeleteTaskExecutionProfile(ctx context.Context, mutation taskpkg.ExecutionProfileDeleteMutation) error
- func (g *TaskRepo) ExpireTaskBlocks(ctx context.Context, mutation taskpkg.ExpireTaskBlocksMutation) (taskpkg.ExpireTaskBlocksResult, error)
- func (g *TaskRepo) GetExecutionProfile(ctx context.Context, taskID string) (taskpkg.ExecutionProfile, error)
- func (g *TaskRepo) GetSchedulerPause(ctx context.Context) (taskpkg.SchedulerPauseState, error)
- func (g *TaskRepo) GetSchedulerPauseState(ctx context.Context) (taskpkg.InspectSchedulerState, error)
- func (g *TaskRepo) GetTask(ctx context.Context, id string) (taskpkg.Task, error)
- func (g *TaskRepo) GetTaskBlock(ctx context.Context, taskID string, blockID string) (taskpkg.TaskBlock, error)
- func (g *TaskRepo) GetTaskBlockRecurrence(ctx context.Context, taskID string, kind taskpkg.BlockKind) (taskpkg.BlockRecurrence, error)
- func (g *TaskRepo) GetTaskEventRecord(ctx context.Context, eventID string) (taskpkg.EventRecord, error)
- func (g *TaskRepo) GetTaskRun(ctx context.Context, id string) (taskpkg.Run, error)
- func (g *TaskRepo) GetTaskRunByIdempotencyKey(ctx context.Context, key string, origin taskpkg.Origin) (taskpkg.Run, error)
- func (g *TaskRepo) GetTaskTriageState(ctx context.Context, taskID string, actor taskpkg.ActorIdentity) (taskpkg.TriageState, error)
- func (g *TaskRepo) HasDependencyPath(ctx context.Context, fromTaskID string, toTaskID string) (bool, error)
- func (g *TaskRepo) HasOpenTaskBlocks(ctx context.Context, taskID string) (bool, error)
- func (g *TaskRepo) IncrementTaskBlockRecurrence(ctx context.Context, taskID string, kind taskpkg.BlockKind, ...) (taskpkg.BlockRecurrence, error)
- func (g *TaskRepo) IsTaskEffectivelyPaused(ctx context.Context, taskID string) (bool, string, error)
- func (g *TaskRepo) ListDependencies(ctx context.Context, taskID string) ([]taskpkg.Dependency, error)
- func (g *TaskRepo) ListDependents(ctx context.Context, dependsOnTaskID string) ([]taskpkg.Dependency, error)
- func (g *TaskRepo) ListTaskBlocks(ctx context.Context, taskID string, includeCleared bool) ([]taskpkg.TaskBlock, error)
- func (g *TaskRepo) ListTaskCatalog(ctx context.Context, query taskpkg.CatalogQuery) (page taskpkg.CatalogPage, err error)
- func (g *TaskRepo) ListTaskEventRecords(ctx context.Context, query taskpkg.EventRecordQuery) ([]taskpkg.EventRecord, error)
- func (g *TaskRepo) ListTaskEvents(ctx context.Context, query taskpkg.EventQuery) ([]taskpkg.Event, error)
- func (g *TaskRepo) ListTaskInbox(ctx context.Context, query taskpkg.InboxQuery, actor taskpkg.ActorIdentity) (page taskpkg.InboxPage, err error)
- func (g *TaskRepo) ListTaskRuns(ctx context.Context, query taskpkg.RunQuery) ([]taskpkg.Run, error)
- func (g *TaskRepo) ListTaskRunsByStatus(ctx context.Context, statuses []taskpkg.RunStatus) ([]taskpkg.Run, error)
- func (g *TaskRepo) ListTaskTriageStates(ctx context.Context, actor taskpkg.ActorIdentity) ([]taskpkg.TriageState, error)
- func (g *TaskRepo) ListTasks(ctx context.Context, query taskpkg.Query) (summaries []taskpkg.Summary, err error)
- func (g *TaskRepo) MarkTaskNeedsAttention(ctx context.Context, mutation taskpkg.NeedsAttentionMutation) (taskpkg.Task, error)
- func (g *TaskRepo) PauseTask(ctx context.Context, mutation taskpkg.PauseMutation) (taskpkg.Task, error)
- func (g *TaskRepo) ReserveQueuedRun(ctx context.Context, reservation taskpkg.QueueRunReservation) (taskpkg.Task, taskpkg.Run, bool, error)
- func (g *TaskRepo) ResetTaskBlockRecurrences(ctx context.Context, taskID string) error
- func (g *TaskRepo) ResumeTask(ctx context.Context, mutation taskpkg.ResumeMutation) (taskpkg.Task, error)
- func (g *TaskRepo) SaveTaskRunIdempotency(ctx context.Context, record taskpkg.RunIdempotency) error
- func (g *TaskRepo) SchedulerBacklog(ctx context.Context, query taskpkg.SchedulerBacklogQuery) (backlog taskpkg.SchedulerBacklog, err error)
- func (g *TaskRepo) SetSchedulerPaused(ctx context.Context, actor string, reason string) (taskpkg.SchedulerPauseState, error)
- func (g *TaskRepo) SetSchedulerResumed(ctx context.Context) (taskpkg.SchedulerPauseState, error)
- func (g *TaskRepo) SetTaskEventCommitObserver(observer taskpkg.EventObserver)
- func (g *TaskRepo) SetTaskExecutionProfile(ctx context.Context, mutation *taskpkg.ExecutionProfileMutation) (stored taskpkg.ExecutionProfile, err error)
- func (g *TaskRepo) SetTaskWakeCreator(ctx context.Context, mutation taskpkg.WakeCreatorMutation) (taskpkg.Task, error)
- func (g *TaskRepo) TaskWakeEventExists(ctx context.Context, taskID string, wakeEventID string) (bool, error)
- func (g *TaskRepo) UpdateTask(ctx context.Context, record taskpkg.Task, actor taskpkg.ActorContext) error
- func (g *TaskRepo) UpdateTaskDefinition(ctx context.Context, mutation *taskpkg.UpdateTaskDefinitionMutation) (stored taskpkg.ExecutionProfile, err error)
- func (g *TaskRepo) UpdateTaskRun(ctx context.Context, run taskpkg.Run) error
- func (g *TaskRepo) UpsertExecutionProfile(ctx context.Context, profile *taskpkg.ExecutionProfile) (stored taskpkg.ExecutionProfile, err error)
- func (g *TaskRepo) UpsertTaskBlockRecurrence(ctx context.Context, recurrence taskpkg.BlockRecurrence) (taskpkg.BlockRecurrence, error)
- func (g *TaskRepo) UpsertTaskTriageState(ctx context.Context, state taskpkg.TriageState) error
- func (g *TaskRepo) WithDeleteTaskTransaction(ctx context.Context, fn func(taskpkg.DeleteTaskMutationStore) error) error
- func (g *TaskRepo) WithTaskExecutionTransaction(ctx context.Context, fn func(taskpkg.ExecutionMutationStore) error) error
- type TaskRunRepo
- func (g *TaskRunRepo) BindRunReviewSession(ctx context.Context, req taskpkg.BindRunReviewSessionRequest, ...) (stored taskpkg.RunReview, err error)
- func (g *TaskRunRepo) ClaimNextRun(ctx context.Context, criteria taskpkg.ClaimCriteria) (taskpkg.ClaimResult, error)
- func (g *TaskRunRepo) ClearRunStarvation(ctx context.Context, runID string) error
- func (g *TaskRunRepo) CompleteRunLease(ctx context.Context, completion taskpkg.LeaseCompletion) (taskpkg.Run, error)
- func (g *TaskRunRepo) CompleteRunLeaseSettlement(ctx context.Context, completion taskpkg.LeaseCompletion) (taskpkg.CompletedRunSettlement, error)
- func (g *TaskRunRepo) FailRunLease(ctx context.Context, failure taskpkg.LeaseFailure) (taskpkg.Run, error)
- func (g *TaskRunRepo) ForceFailTaskRun(ctx context.Context, failure taskpkg.ForceFailRunMutation) (taskpkg.ForceRunMutationResult, error)
- func (g *TaskRunRepo) ForceReleaseTaskRun(ctx context.Context, release taskpkg.ForceReleaseRunMutation) (taskpkg.ForceRunMutationResult, error)
- func (g *TaskRunRepo) GetRunReview(ctx context.Context, reviewID string) (taskpkg.RunReview, error)
- func (g *TaskRunRepo) HeartbeatRunLease(ctx context.Context, heartbeat taskpkg.LeaseHeartbeat) (taskpkg.Run, error)
- func (g *TaskRunRepo) ListAutonomyLeaseHandles(ctx context.Context, sessionID string) (handles []taskpkg.AutonomyLeaseHandle, err error)
- func (g *TaskRunRepo) ListRunReviews(ctx context.Context, query taskpkg.RunReviewQuery) ([]taskpkg.RunReview, error)
- func (g *TaskRunRepo) ListRunStarvation(ctx context.Context) ([]taskpkg.RunStarvation, error)
- func (g *TaskRunRepo) LoadRunStarvation(ctx context.Context, runID string) (taskpkg.RunStarvation, bool, error)
- func (g *TaskRunRepo) LookupRunReviewBySession(ctx context.Context, sessionID string) (taskpkg.RunReview, error)
- func (g *TaskRunRepo) MarkTaskRunNeedsAttention(ctx context.Context, runID string, diagnostic string) (taskpkg.Run, error)
- func (g *TaskRunRepo) RecordRunReview(ctx context.Context, req taskpkg.RecordRunReviewRequest, ...) (result taskpkg.RunReviewResult, err error)
- func (g *TaskRunRepo) RecoverExpiredRunLeases(ctx context.Context, recovery taskpkg.ExpiredLeaseRecovery) ([]taskpkg.ExpiredLeaseRecoveryResult, error)
- func (g *TaskRunRepo) RecoverTaskRun(ctx context.Context, mutation taskpkg.RecoverRunMutation) (taskpkg.RetryRunResult, error)
- func (g *TaskRunRepo) ReleaseRunLease(ctx context.Context, release taskpkg.LeaseRelease) (taskpkg.Run, error)
- func (g *TaskRunRepo) RequestRunReview(ctx context.Context, review *taskpkg.RunReview) (stored taskpkg.RunReview, created bool, err error)
- func (g *TaskRunRepo) RetryTaskRun(ctx context.Context, retry taskpkg.RetryRunMutation) (taskpkg.RetryRunResult, error)
- func (g *TaskRunRepo) SettleNetworkWake(ctx context.Context, settlement taskpkg.NetworkWakeSettlement) (taskpkg.NetworkWakeSettlementResult, error)
- func (g *TaskRunRepo) UpsertRunStarvation(ctx context.Context, mutation taskpkg.RunStarvationMutation) (taskpkg.RunStarvation, error)
- type ToolRuntimeRepo
- func (g *ToolRuntimeRepo) ListProcessRecords(ctx context.Context, query toolruntime.ProcessQuery) (records []toolruntime.ProcessRecord, err error)
- func (g *ToolRuntimeRepo) UpdateProcessRecordState(ctx context.Context, update toolruntime.ProcessStateUpdate) error
- func (g *ToolRuntimeRepo) UpsertProcessRecord(ctx context.Context, record toolruntime.ProcessRecord) error
- type VaultRepo
- func (g *VaultRepo) DeleteMCPAuthToken(ctx context.Context, target mcpauth.Target) error
- func (g *VaultRepo) DeleteVaultSecret(ctx context.Context, ref string) error
- func (g *VaultRepo) GetMCPAuthToken(ctx context.Context, target mcpauth.Target) (mcpauth.TokenRecord, error)
- func (g *VaultRepo) GetVaultSecret(ctx context.Context, ref string) (vault.Record, error)
- func (g *VaultRepo) ListMCPAuthTokens(ctx context.Context) ([]mcpauth.TokenRecord, error)
- func (g *VaultRepo) ListVaultSecrets(ctx context.Context, prefix string) (_ []vault.Record, err error)
- func (g *VaultRepo) PutVaultSecret(ctx context.Context, record vault.Record) error
- func (g *VaultRepo) SaveMCPAuthToken(ctx context.Context, token mcpauth.TokenRecord) error
- type WatchEventsRepo
- func (g *WatchEventsRepo) ListParkedWatchEventSubscriptions(ctx context.Context) ([]looppkg.ParkedWatchEventSubscription, error)
- func (g *WatchEventsRepo) ListParkedWatchEventSubscriptionsForLoopRun(ctx context.Context, loopRunID string) ([]looppkg.ParkedWatchEventSubscription, error)
- func (g *WatchEventsRepo) ListParkedWatchEventSubscriptionsPage(ctx context.Context, cursor looppkg.ParkedWatchEventScanCursor, limit int) ([]looppkg.ParkedWatchEventSubscription, error)
- func (g *WatchEventsRepo) ReadCursors(ctx context.Context, query looppkg.WatchEventsQuery) (map[string]int64, error)
- func (g *WatchEventsRepo) ReadMatches(ctx context.Context, query looppkg.WatchEventsQuery) ([]looppkg.WatchEvent, error)
- type WorkspaceRepo
- func (g *WorkspaceRepo) DeleteWorkspace(ctx context.Context, id string) error
- func (g *WorkspaceRepo) DismissInvitation(ctx context.Context, workspaceID string, scopeKind string, scopeID string, ...) (invitation workspacepkg.CoordinationInvitation, err error)
- func (g *WorkspaceRepo) Get(ctx context.Context, workspaceID string) (workspacepkg.CoordinationSetting, error)
- func (g *WorkspaceRepo) GetCoordination(ctx context.Context, ref workspacepkg.CoordinationRef) (workspacepkg.CoordinationView, error)
- func (g *WorkspaceRepo) GetInvitation(ctx context.Context, workspaceID string, scopeKind string, scopeID string) (workspacepkg.CoordinationInvitation, error)
- func (g *WorkspaceRepo) GetWorkspace(ctx context.Context, id string) (compozyworkspace.Workspace, error)
- func (g *WorkspaceRepo) GetWorkspaceByName(ctx context.Context, name string) (compozyworkspace.Workspace, error)
- func (g *WorkspaceRepo) GetWorkspaceByPath(ctx context.Context, rootDir string) (compozyworkspace.Workspace, error)
- func (g *WorkspaceRepo) InsertWorkspace(ctx context.Context, ws compozyworkspace.Workspace) error
- func (g *WorkspaceRepo) ListWorkspaces(ctx context.Context) ([]compozyworkspace.Workspace, error)
- func (g *WorkspaceRepo) ResetInvitation(ctx context.Context, workspaceID string, scopeKind string, scopeID string) error
- func (g *WorkspaceRepo) SetCoordination(ctx context.Context, cmd workspacepkg.SetCoordination, ...) (view workspacepkg.CoordinationView, err error)
- func (g *WorkspaceRepo) SetCoordinationInvitation(ctx context.Context, cmd workspacepkg.SetInvitation, ...) (view workspacepkg.CoordinationView, err error)
- func (g *WorkspaceRepo) UpdateWorkspace(ctx context.Context, ws compozyworkspace.Workspace) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MigrationStream ¶
func MigrationStream() store.MigrationStream
MigrationStream returns the embedded global database migration stream.
Types ¶
type AppMetadataRepo ¶
type AppMetadataRepo struct {
// contains filtered or unexported fields
}
func (*AppMetadataRepo) CompleteOnboarding ¶
func (g *AppMetadataRepo) CompleteOnboarding(ctx context.Context, completedAt string) (store.OnboardingStatus, error)
CompleteOnboarding stores the first completion timestamp and preserves it on repeat calls.
func (*AppMetadataRepo) DeleteAppMetadata ¶
func (g *AppMetadataRepo) DeleteAppMetadata(ctx context.Context, key string) error
DeleteAppMetadata removes the value stored under key. Missing keys are a no-op.
func (*AppMetadataRepo) GetAppMetadata ¶
GetAppMetadata returns the value stored under key and whether the key exists.
func (*AppMetadataRepo) GetOnboardingStatus ¶
func (g *AppMetadataRepo) GetOnboardingStatus(ctx context.Context) (store.OnboardingStatus, error)
GetOnboardingStatus returns the domain status backed by app metadata.
func (*AppMetadataRepo) ResetOnboarding ¶
func (g *AppMetadataRepo) ResetOnboarding(ctx context.Context) (store.OnboardingStatus, error)
ResetOnboarding clears first-run completion so onboarding is shown again.
func (*AppMetadataRepo) SetAppMetadata ¶
SetAppMetadata upserts the value stored under key.
type ApprovalGrantRepo ¶
type ApprovalGrantRepo struct {
// contains filtered or unexported fields
}
func (*ApprovalGrantRepo) ListApprovalGrants ¶
func (g *ApprovalGrantRepo) ListApprovalGrants( ctx context.Context, workspaceID string, ) ([]toolspkg.ApprovalGrant, error)
ListApprovalGrants returns one workspace's grants in stable creation order.
func (*ApprovalGrantRepo) LookupApprovalGrant ¶
func (g *ApprovalGrantRepo) LookupApprovalGrant( ctx context.Context, key toolspkg.ApprovalGrantKey, ) (toolspkg.ApprovalGrant, bool, error)
LookupApprovalGrant returns and touches the most-specific remembered decision.
func (*ApprovalGrantRepo) PutApprovalGrant ¶
func (g *ApprovalGrantRepo) PutApprovalGrant( ctx context.Context, grant toolspkg.ApprovalGrant, ) (toolspkg.ApprovalGrant, error)
PutApprovalGrant creates or replaces one exact durable decision.
func (*ApprovalGrantRepo) RevokeApprovalGrant ¶
func (g *ApprovalGrantRepo) RevokeApprovalGrant(ctx context.Context, workspaceID, id string) error
RevokeApprovalGrant removes one workspace-scoped remembered decision.
type AutomationRepo ¶
type AutomationRepo struct {
// contains filtered or unexported fields
}
func (*AutomationRepo) ClaimScheduledRun ¶
func (g *AutomationRepo) ClaimScheduledRun( ctx context.Context, claim automation.SchedulerClaim, ) (result automation.SchedulerClaimResult, err error)
ClaimScheduledRun advances one durable cursor and creates a run reservation before scheduler dispatch begins.
func (*AutomationRepo) CountRuns ¶
func (g *AutomationRepo) CountRuns(ctx context.Context, query automation.RunQuery) (int64, error)
CountRuns returns the number of automation runs matching the supplied filters.
func (*AutomationRepo) CreateJob ¶
func (g *AutomationRepo) CreateJob(ctx context.Context, job automation.Job) (created automation.Job, err error)
CreateJob stores a new automation job definition.
func (*AutomationRepo) CreateRun ¶
func (g *AutomationRepo) CreateRun(ctx context.Context, run automation.Run) (automation.Run, error)
CreateRun stores a new automation run history row.
func (*AutomationRepo) CreateSuggestion ¶
func (g *AutomationRepo) CreateSuggestion( ctx context.Context, suggestion automation.Suggestion, pendingCap int, ) (created automation.Suggestion, err error)
func (*AutomationRepo) CreateTrigger ¶
func (g *AutomationRepo) CreateTrigger( ctx context.Context, trigger automation.Trigger, ) (created automation.Trigger, err error)
CreateTrigger stores a new automation trigger definition.
func (*AutomationRepo) DeleteJob ¶
func (g *AutomationRepo) DeleteJob(ctx context.Context, id string) error
DeleteJob removes an automation job definition.
func (*AutomationRepo) DeleteJobEnabledOverlay ¶
func (g *AutomationRepo) DeleteJobEnabledOverlay(ctx context.Context, jobID string) error
DeleteJobEnabledOverlay clears a persisted job enabled overlay if it exists.
func (*AutomationRepo) DeleteRun ¶
func (g *AutomationRepo) DeleteRun(ctx context.Context, id string) error
DeleteRun removes an automation run history row.
func (*AutomationRepo) DeleteSchedulerState ¶
func (g *AutomationRepo) DeleteSchedulerState(ctx context.Context, jobID string) error
DeleteSchedulerState removes a durable scheduler cursor if it exists.
func (*AutomationRepo) DeleteTrigger ¶
func (g *AutomationRepo) DeleteTrigger(ctx context.Context, id string) error
DeleteTrigger removes an automation trigger definition.
func (*AutomationRepo) DeleteTriggerEnabledOverlay ¶
func (g *AutomationRepo) DeleteTriggerEnabledOverlay(ctx context.Context, triggerID string) error
DeleteTriggerEnabledOverlay clears a persisted trigger enabled overlay if it exists.
func (*AutomationRepo) GetJob ¶
func (g *AutomationRepo) GetJob(ctx context.Context, id string) (automation.Job, error)
GetJob loads one persisted automation job definition by primary key.
func (*AutomationRepo) GetJobEnabledOverlay ¶
func (g *AutomationRepo) GetJobEnabledOverlay(ctx context.Context, jobID string) (automation.JobEnabledOverlay, error)
GetJobEnabledOverlay loads one persisted job enabled overlay by job id.
func (*AutomationRepo) GetRun ¶
func (g *AutomationRepo) GetRun(ctx context.Context, id string) (automation.Run, error)
GetRun loads one persisted automation run by primary key.
func (*AutomationRepo) GetSchedulerState ¶
func (g *AutomationRepo) GetSchedulerState(ctx context.Context, jobID string) (automation.SchedulerState, error)
GetSchedulerState loads one durable automation scheduler cursor by job id.
func (*AutomationRepo) GetSuggestion ¶
func (g *AutomationRepo) GetSuggestion( ctx context.Context, workspaceID string, id string, ) (automation.Suggestion, error)
func (*AutomationRepo) GetTrigger ¶
func (g *AutomationRepo) GetTrigger(ctx context.Context, id string) (automation.Trigger, error)
GetTrigger loads one persisted automation trigger definition by primary key.
func (*AutomationRepo) GetTriggerByWebhookID ¶
func (g *AutomationRepo) GetTriggerByWebhookID(ctx context.Context, webhookID string) (automation.Trigger, error)
GetTriggerByWebhookID loads a webhook trigger using its stable webhook identifier.
func (*AutomationRepo) GetTriggerEnabledOverlay ¶
func (g *AutomationRepo) GetTriggerEnabledOverlay( ctx context.Context, triggerID string, ) (automation.TriggerEnabledOverlay, error)
GetTriggerEnabledOverlay loads one persisted trigger enabled overlay by trigger id.
func (*AutomationRepo) ListAcceptedSuggestions ¶
func (g *AutomationRepo) ListAcceptedSuggestions(ctx context.Context) ([]automation.Suggestion, error)
func (*AutomationRepo) ListJobDefinitions ¶
func (g *AutomationRepo) ListJobDefinitions( ctx context.Context, source automation.JobSource, ) (jobs []automation.Job, err error)
ListJobDefinitions returns complete persisted definitions for internal reconciliation.
func (*AutomationRepo) ListJobEnabledOverlays ¶
func (g *AutomationRepo) ListJobEnabledOverlays( ctx context.Context, ) (overlays []automation.JobEnabledOverlay, err error)
ListJobEnabledOverlays returns all persisted job enabled overlays.
func (*AutomationRepo) ListJobs ¶
func (g *AutomationRepo) ListJobs( ctx context.Context, query automation.JobListQuery, ) (page automation.JobListPage, err error)
ListJobs returns one stable page of effective persisted automation jobs.
func (*AutomationRepo) ListRuns ¶
func (g *AutomationRepo) ListRuns( ctx context.Context, query automation.RunQuery, ) (runs []automation.Run, err error)
ListRuns returns filtered automation run history rows.
func (*AutomationRepo) ListSchedulerStates ¶
func (g *AutomationRepo) ListSchedulerStates(ctx context.Context) ([]automation.SchedulerState, error)
ListSchedulerStates returns every durable automation scheduler cursor.
func (*AutomationRepo) ListSuggestions ¶
func (g *AutomationRepo) ListSuggestions( ctx context.Context, workspaceID string, status automation.SuggestionStatus, ) ([]automation.Suggestion, error)
func (*AutomationRepo) ListTriggerDefinitions ¶
func (g *AutomationRepo) ListTriggerDefinitions( ctx context.Context, source automation.JobSource, ) (triggers []automation.Trigger, err error)
ListTriggerDefinitions returns complete persisted definitions for internal reconciliation.
func (*AutomationRepo) ListTriggerEnabledOverlays ¶
func (g *AutomationRepo) ListTriggerEnabledOverlays( ctx context.Context, ) (overlays []automation.TriggerEnabledOverlay, err error)
ListTriggerEnabledOverlays returns all persisted trigger enabled overlays.
func (*AutomationRepo) ListTriggers ¶
func (g *AutomationRepo) ListTriggers( ctx context.Context, query automation.TriggerListQuery, ) (page automation.TriggerListPage, err error)
ListTriggers returns one stable page of effective persisted automation triggers.
func (*AutomationRepo) RecordRunDeliveryError ¶
func (g *AutomationRepo) RecordRunDeliveryError( ctx context.Context, runID string, runErr error, ) (automation.Run, error)
RecordRunDeliveryError stores delivery diagnostics separately from normal execution errors on an existing automation run.
func (*AutomationRepo) RecordSuggestionTransition ¶
func (g *AutomationRepo) RecordSuggestionTransition( ctx context.Context, suggestion automation.Suggestion, jobID string, ) error
func (*AutomationRepo) ResolveSuggestion ¶
func (g *AutomationRepo) ResolveSuggestion( ctx context.Context, workspaceID string, id string, to automation.SuggestionStatus, ) (resolved automation.Suggestion, err error)
func (*AutomationRepo) RollbackSuggestionAcceptance ¶
func (*AutomationRepo) SaveSchedulerState ¶
func (g *AutomationRepo) SaveSchedulerState( ctx context.Context, state automation.SchedulerState, ) (automation.SchedulerState, error)
SaveSchedulerState upserts one durable automation scheduler cursor.
func (*AutomationRepo) SetJobEnabledOverlay ¶
func (g *AutomationRepo) SetJobEnabledOverlay( ctx context.Context, overlay automation.JobEnabledOverlay, ) (automation.JobEnabledOverlay, error)
SetJobEnabledOverlay upserts the runtime enabled override for a config-backed job.
func (*AutomationRepo) SetTriggerEnabledOverlay ¶
func (g *AutomationRepo) SetTriggerEnabledOverlay( ctx context.Context, overlay automation.TriggerEnabledOverlay, ) (automation.TriggerEnabledOverlay, error)
SetTriggerEnabledOverlay upserts the runtime enabled override for a config-backed trigger.
func (*AutomationRepo) UpdateJob ¶
func (g *AutomationRepo) UpdateJob(ctx context.Context, job automation.Job) (updated automation.Job, err error)
UpdateJob replaces the mutable fields of a persisted automation job definition.
func (*AutomationRepo) UpdateRun ¶
func (g *AutomationRepo) UpdateRun(ctx context.Context, run automation.Run) (automation.Run, error)
UpdateRun replaces the mutable fields of a persisted automation run.
func (*AutomationRepo) UpdateTrigger ¶
func (g *AutomationRepo) UpdateTrigger( ctx context.Context, trigger automation.Trigger, ) (updated automation.Trigger, err error)
UpdateTrigger replaces the mutable fields of a persisted automation trigger definition.
type BridgeRepo ¶
type BridgeRepo struct {
// contains filtered or unexported fields
}
func (*BridgeRepo) CheckpointBridgeDelivery ¶
func (g *BridgeRepo) CheckpointBridgeDelivery( ctx context.Context, checkpoint bridges.DeliveryLedgerCheckpoint, ) error
CheckpointBridgeDelivery advances sequences, remote identity, terminal state, and optional metrics.
func (*BridgeRepo) CountBridgeRoutes ¶
func (g *BridgeRepo) CountBridgeRoutes( ctx context.Context, bridgeInstanceIDs []string, ) (counts map[string]int, err error)
CountBridgeRoutes returns route totals for a bounded bridge catalog page in one query.
func (*BridgeRepo) CreateBridgeDelivery ¶
func (g *BridgeRepo) CreateBridgeDelivery(ctx context.Context, record bridges.DeliveryLedgerRecord) error
CreateBridgeDelivery registers one active checkpoint before delivery starts.
func (*BridgeRepo) DeleteBridgeInstance ¶
func (g *BridgeRepo) DeleteBridgeInstance(ctx context.Context, id string) error
DeleteBridgeInstance removes a persisted bridge instance row.
func (*BridgeRepo) DeleteBridgeRoute ¶
func (g *BridgeRepo) DeleteBridgeRoute(ctx context.Context, routingKeyHash string) error
DeleteBridgeRoute removes one persisted route row.
func (*BridgeRepo) DeleteBridgeSecretBinding ¶
func (g *BridgeRepo) DeleteBridgeSecretBinding(ctx context.Context, bridgeInstanceID string, bindingName string) error
DeleteBridgeSecretBinding removes one persisted secret binding row.
func (*BridgeRepo) DeleteBridgeTaskSubscription ¶
func (g *BridgeRepo) DeleteBridgeTaskSubscription(ctx context.Context, subscriptionID string) error
DeleteBridgeTaskSubscription removes one terminal task notification subscription.
func (*BridgeRepo) DeleteExpiredBridgeIngestDedup ¶
func (g *BridgeRepo) DeleteExpiredBridgeIngestDedup(ctx context.Context, now time.Time) (int64, error)
DeleteExpiredBridgeIngestDedup removes expired dedup rows and reports how many were deleted.
func (*BridgeRepo) FindBridgeTargetsByNormalized ¶
func (g *BridgeRepo) FindBridgeTargetsByNormalized( ctx context.Context, bridgeID string, normalized string, ) ([]bridges.BridgeTarget, error)
FindBridgeTargetsByNormalized returns exact normalized display-name matches.
func (*BridgeRepo) FindBridgeTargetsByPrefix ¶
func (g *BridgeRepo) FindBridgeTargetsByPrefix( ctx context.Context, bridgeID string, normalizedPrefix string, ) ([]bridges.BridgeTarget, error)
FindBridgeTargetsByPrefix returns normalized display-name prefix matches.
func (*BridgeRepo) FindBridgeTargetsByQualifiedName ¶
func (g *BridgeRepo) FindBridgeTargetsByQualifiedName( ctx context.Context, bridgeID string, qualifier string, normalized string, ) ([]bridges.BridgeTarget, error)
FindBridgeTargetsByQualifiedName returns exact qualifier plus normalized-name matches.
func (*BridgeRepo) GetBridgeIngestDedup ¶
func (g *BridgeRepo) GetBridgeIngestDedup( ctx context.Context, idempotencyKey string, lookupAt time.Time, ) (bridges.IngestDedupRecord, error)
GetBridgeIngestDedup loads one active dedup record and excludes expired rows at the supplied lookup time.
func (*BridgeRepo) GetBridgeInstance ¶
func (g *BridgeRepo) GetBridgeInstance(ctx context.Context, id string) (bridges.BridgeInstance, error)
GetBridgeInstance loads one persisted bridge instance by primary key.
func (*BridgeRepo) GetBridgeRoute ¶
func (g *BridgeRepo) GetBridgeRoute(ctx context.Context, routingKeyHash string) (bridges.BridgeRoute, error)
GetBridgeRoute loads one persisted route by routing-key hash.
func (*BridgeRepo) GetBridgeSecretBinding ¶
func (g *BridgeRepo) GetBridgeSecretBinding( ctx context.Context, bridgeInstanceID string, bindingName string, ) (bridges.BridgeSecretBinding, error)
GetBridgeSecretBinding loads one persisted secret binding by composite primary key.
func (*BridgeRepo) GetBridgeTargetByCanonical ¶
func (g *BridgeRepo) GetBridgeTargetByCanonical( ctx context.Context, bridgeID string, canonicalRoute string, ) (bridges.BridgeTarget, error)
GetBridgeTargetByCanonical returns one target by immutable provider-derived identity.
func (*BridgeRepo) GetBridgeTaskSubscription ¶
func (g *BridgeRepo) GetBridgeTaskSubscription( ctx context.Context, subscriptionID string, ) (bridges.BridgeTaskSubscription, error)
GetBridgeTaskSubscription loads one persisted task notification subscription.
func (*BridgeRepo) InsertBridgeInstance ¶
func (g *BridgeRepo) InsertBridgeInstance(ctx context.Context, instance bridges.BridgeInstance) error
InsertBridgeInstance creates a new persisted bridge instance row.
func (*BridgeRepo) ListBridgeCatalogRecords ¶
func (g *BridgeRepo) ListBridgeCatalogRecords( ctx context.Context, query bridges.BridgeCatalogQuery, ) (records []bridges.BridgeCatalogRecord, err error)
ListBridgeCatalogRecords reads only metadata required to filter, count, and page the catalog.
func (*BridgeRepo) ListBridgeDeliveries ¶
func (g *BridgeRepo) ListBridgeDeliveries( ctx context.Context, query bridges.DeliveryLedgerQuery, ) (records []bridges.DeliveryLedgerRecord, err error)
ListBridgeDeliveries lists checkpoint rows inside one exact global or workspace scope.
func (*BridgeRepo) ListBridgeDeliveryMetrics ¶
func (g *BridgeRepo) ListBridgeDeliveryMetrics( ctx context.Context, query bridges.DeliveryLedgerQuery, ) (metrics map[string]bridges.BridgeDeliveryMetrics, err error)
ListBridgeDeliveryMetrics returns durable counters plus backlog derived from active rows.
func (*BridgeRepo) ListBridgeInstances ¶
func (g *BridgeRepo) ListBridgeInstances( ctx context.Context, ) (instances []bridges.BridgeInstance, err error)
ListBridgeInstances returns all persisted bridge instances in stable display-name order.
func (*BridgeRepo) ListBridgeInstancesByIDs ¶
func (g *BridgeRepo) ListBridgeInstancesByIDs( ctx context.Context, bridgeInstanceIDs []string, ) (instances []bridges.BridgeInstance, err error)
ListBridgeInstancesByIDs returns one bounded bridge batch in caller-supplied order.
func (*BridgeRepo) ListBridgeRoutes ¶
func (g *BridgeRepo) ListBridgeRoutes( ctx context.Context, bridgeInstanceID string, ) (routes []bridges.BridgeRoute, err error)
ListBridgeRoutes returns persisted routes for one bridge instance ordered by recency.
func (*BridgeRepo) ListBridgeSecretBindings ¶
func (g *BridgeRepo) ListBridgeSecretBindings( ctx context.Context, bridgeInstanceID string, ) (bindings []bridges.BridgeSecretBinding, err error)
ListBridgeSecretBindings returns the persisted secret bindings for one bridge instance.
func (*BridgeRepo) ListBridgeSecretBindingsForInstances ¶
func (g *BridgeRepo) ListBridgeSecretBindingsForInstances( ctx context.Context, bridgeInstanceIDs []string, ) (bindings map[string][]bridges.BridgeSecretBinding, err error)
ListBridgeSecretBindingsForInstances loads bindings for a bounded bridge catalog page in one query.
func (*BridgeRepo) ListBridgeTargets ¶
func (g *BridgeRepo) ListBridgeTargets( ctx context.Context, query bridges.BridgeTargetQuery, ) (bridges.BridgeTargetPage, error)
ListBridgeTargets returns target-directory rows plus bridge-level refresh freshness.
func (*BridgeRepo) ListBridgeTaskSubscriptions ¶
func (g *BridgeRepo) ListBridgeTaskSubscriptions( ctx context.Context, query bridges.BridgeTaskSubscriptionQuery, ) (subscriptions []bridges.BridgeTaskSubscription, err error)
ListBridgeTaskSubscriptions returns active bridge task subscriptions matching the query.
func (*BridgeRepo) PutBridgeDeliveryMetrics ¶
func (g *BridgeRepo) PutBridgeDeliveryMetrics(ctx context.Context, record bridges.DeliveryMetricRecord) error
PutBridgeDeliveryMetrics persists one complete monotonic counter snapshot.
func (*BridgeRepo) PutBridgeIngestDedup ¶
func (g *BridgeRepo) PutBridgeIngestDedup(ctx context.Context, record bridges.IngestDedupRecord) error
func (*BridgeRepo) PutBridgeRoute ¶
func (g *BridgeRepo) PutBridgeRoute(ctx context.Context, route bridges.BridgeRoute) error
PutBridgeRoute inserts or refreshes a persisted bridge route row.
func (*BridgeRepo) PutBridgeSecretBinding ¶
func (g *BridgeRepo) PutBridgeSecretBinding(ctx context.Context, binding bridges.BridgeSecretBinding) error
func (*BridgeRepo) PutBridgeTaskSubscription ¶
func (g *BridgeRepo) PutBridgeTaskSubscription( ctx context.Context, subscription bridges.BridgeTaskSubscription, ) error
PutBridgeTaskSubscription inserts or refreshes a terminal task notification subscription.
func (*BridgeRepo) RefreshBridgeTargets ¶
func (g *BridgeRepo) RefreshBridgeTargets( ctx context.Context, bridgeID string, targets []bridges.BridgeTarget, refreshedAt time.Time, ) error
RefreshBridgeTargets transactionally persists one daemon-owned target-directory snapshot.
func (*BridgeRepo) ReplaceBridgeInstances ¶
func (g *BridgeRepo) ReplaceBridgeInstances(ctx context.Context, instances []bridges.BridgeInstance) (err error)
ReplaceBridgeInstances atomically swaps the daemon-visible bridge instance projection.
func (*BridgeRepo) ResolveBridgeRoute ¶
func (g *BridgeRepo) ResolveBridgeRoute(ctx context.Context, key bridges.RoutingKey) (bridges.BridgeRoute, error)
ResolveBridgeRoute loads a persisted route by computing the hash for the supplied routing key.
func (*BridgeRepo) UpdateBridgeInstance ¶
func (g *BridgeRepo) UpdateBridgeInstance(ctx context.Context, instance bridges.BridgeInstance) error
UpdateBridgeInstance updates an existing persisted bridge instance row.
type BundleRepo ¶
type BundleRepo struct {
// contains filtered or unexported fields
}
func (*BundleRepo) CountBundleActivationsForExtension ¶
type DeadEntityRepo ¶
type DeadEntityRepo struct {
// contains filtered or unexported fields
}
func (*DeadEntityRepo) ClearDeadEntity ¶
func (g *DeadEntityRepo) ClearDeadEntity( ctx context.Context, workspaceID string, kind store.DeadEntityKind, entityID string, ) error
ClearDeadEntity removes one dead mark. Missing rows are a successful no-op.
func (*DeadEntityRepo) FindDeadEntity ¶
func (g *DeadEntityRepo) FindDeadEntity( ctx context.Context, workspaceID string, kind store.DeadEntityKind, entityID string, ) (store.DeadEntity, bool, error)
FindDeadEntity returns one exact workspace-scoped dead mark.
func (*DeadEntityRepo) ListDeadEntities ¶
func (g *DeadEntityRepo) ListDeadEntities( ctx context.Context, workspaceID string, ) ([]store.DeadEntity, error)
ListDeadEntities returns one workspace's dead marks in stable forensic order.
func (*DeadEntityRepo) MarkDeadEntity ¶
func (g *DeadEntityRepo) MarkDeadEntity(ctx context.Context, entity store.DeadEntity) error
MarkDeadEntity creates or refreshes one confirmed-dead workspace runtime.
type EventRecordInsert ¶
type EventRecordInsert struct {
ID string
TaskID string
RunID string
EventType string
Actor taskpkg.ActorIdentity
Origin taskpkg.Origin
Payload json.RawMessage
Timestamp time.Time
}
EventRecordInsert captures the normalized task-event fields written by an owning transaction.
type GlobalDB ¶
type GlobalDB struct {
*WorkspaceRepo
*AppMetadataRepo
*BundleRepo
*PermissionRepo
*SessionRepo
*TaskRepo
*TaskRunRepo
*AutomationRepo
*BridgeRepo
*NetworkRepo
*LoopRepo
*GoalRepo
*HeartbeatRepo
*SoulRepo
*ModelCatalogRepo
*MarketplaceRepo
*ObserveRepo
*NotificationRepo
*ToolRuntimeRepo
*VaultRepo
*WatchEventsRepo
*DeadEntityRepo
*ApprovalGrantRepo
// contains filtered or unexported fields
}
GlobalDB owns the global session index and observability database.
func OpenGlobalDB ¶
OpenGlobalDB opens or creates the global Compozy index database.
type GoalRepo ¶
type GoalRepo struct {
// contains filtered or unexported fields
}
func (*GoalRepo) AcknowledgeGoalSessionCleanup ¶
func (g *GoalRepo) AcknowledgeGoalSessionCleanup( ctx context.Context, cleanupID string, completedAt time.Time, ) error
AcknowledgeGoalSessionCleanup records the first successful idempotent session Stop.
func (*GoalRepo) AcknowledgeGoalSessionOutbox ¶
func (g *GoalRepo) AcknowledgeGoalSessionOutbox( ctx context.Context, eventID string, deliveredAt time.Time, ) error
AcknowledgeGoalSessionOutbox records the first successful delivery timestamp.
func (*GoalRepo) ActivateSessionBinding ¶
func (g *GoalRepo) ActivateSessionBinding( ctx context.Context, req goal.ActivateBindingRequest, ) (goal.SessionBinding, error)
ActivateSessionBinding swaps one successfully created run-owned attempt into active state.
func (*GoalRepo) AdvanceBindingCreationFailure ¶
func (g *GoalRepo) AdvanceBindingCreationFailure( ctx context.Context, req goal.AdvanceBindingCreationFailureRequest, ) error
AdvanceBindingCreationFailure atomically consumes one proven-no-create Goal attempt.
func (*GoalRepo) BeginCompactionCancel ¶
func (g *GoalRepo) BeginCompactionCancel(ctx context.Context, req goal.BeginCompactionCancelRequest) error
BeginCompactionCancel persists timeout intent before issuing the correlated cancellation effect.
func (*GoalRepo) BeginJudgeAttempt ¶
func (g *GoalRepo) BeginJudgeAttempt( ctx context.Context, req goal.BeginJudgeAttemptRequest, ) (goal.JudgeAttempt, error)
BeginJudgeAttempt persists one aggregate judge attempt before evaluator effects.
func (*GoalRepo) CheckpointControl ¶
CheckpointControl records one typed nonterminal or terminal control boundary by CAS.
func (*GoalRepo) ClaimGoalSessionCleanup ¶
func (g *GoalRepo) ClaimGoalSessionCleanup( ctx context.Context, limit int, ) (obligations []goal.SessionCleanupObligation, err error)
ClaimGoalSessionCleanup lists the oldest unacknowledged run-owned session cleanup effects.
func (*GoalRepo) ClaimGoalSessionOutbox ¶
func (g *GoalRepo) ClaimGoalSessionOutbox( ctx context.Context, limit int, ) (events []goal.SessionOutboxEvent, err error)
ClaimGoalSessionOutbox lists the oldest pending projection events for retryable relay.
func (*GoalRepo) ClaimPreparedCompaction ¶
func (g *GoalRepo) ClaimPreparedCompaction( ctx context.Context, req goal.ClaimPreparedCompactionRequest, ) (goal.ClaimedPrompt, error)
ClaimPreparedCompaction starts one compact operation without allocating a work turn.
func (*GoalRepo) ClaimPreparedWorkPrompt ¶
func (g *GoalRepo) ClaimPreparedWorkPrompt( ctx context.Context, req goal.ClaimPreparedWorkPromptRequest, ) (goal.ClaimedPrompt, error)
ClaimPreparedWorkPrompt is the work-effect linearization: queue claim, token digest, and open turn commit together.
func (*GoalRepo) CloseSessionBinding ¶
CloseSessionBinding closes one exact active epoch idempotently.
func (*GoalRepo) CompleteCompaction ¶
func (g *GoalRepo) CompleteCompaction( ctx context.Context, req goal.CompleteCompactionRequest, ) (goal.Checkpoint, error)
CompleteCompaction settles one correlated compact operation without creating a work-turn row.
func (*GoalRepo) CompleteJudgeAttempt ¶
func (g *GoalRepo) CompleteJudgeAttempt( ctx context.Context, req goal.CompleteJudgeAttemptRequest, ) (goal.JudgeAttempt, error)
CompleteJudgeAttempt records the evaluator terminal exactly once.
func (*GoalRepo) CompleteTurn ¶
func (g *GoalRepo) CompleteTurn( ctx context.Context, req goal.CompleteTurnRequest, ) (goal.Checkpoint, error)
CompleteTurn atomically terminalizes one existing turn, consumes its exact intent, and advances its checkpoint.
func (*GoalRepo) CreateCheckpoint ¶
func (g *GoalRepo) CreateCheckpoint( ctx context.Context, req goal.CreateCheckpointRequest, ) (goal.Checkpoint, error)
CreateCheckpoint inserts one initial Goal checkpoint without overwriting durable progress.
func (*GoalRepo) EnqueueGoalSessionOutbox ¶
func (g *GoalRepo) EnqueueGoalSessionOutbox( ctx context.Context, request goal.EnqueueSessionOutboxRequest, ) (goal.SessionOutboxEvent, error)
EnqueueGoalSessionOutbox inserts or returns one byte-identical projection event.
func (*GoalRepo) FencePreparedPrompt ¶
func (g *GoalRepo) FencePreparedPrompt(ctx context.Context, req goal.FencePreparedPromptRequest) error
FencePreparedPrompt persists one pre-submit budget/control boundary without allocating a turn.
func (*GoalRepo) FinalizeGoalPrompt ¶
FinalizeGoalPrompt records one live token-authenticated terminal without settling its Goal turn.
func (*GoalRepo) FinalizeSessionBindingCreation ¶
func (g *GoalRepo) FinalizeSessionBindingCreation( ctx context.Context, req goal.ActivateBindingRequest, ) (goal.SessionBinding, bool, error)
FinalizeSessionBindingCreation atomically activates a created session or exposes Stop cleanup.
func (*GoalRepo) FindGoalReportTarget ¶
func (g *GoalRepo) FindGoalReportTarget( ctx context.Context, workspaceID looppkg.WorkspaceID, sessionID string, ) (goal.ToolReportTarget, bool, error)
FindGoalReportTarget returns the only currently prompting Goal bound to the session.
func (*GoalRepo) FlushAndCheck ¶
func (g *GoalRepo) FlushAndCheck( ctx context.Context, snapshot goal.BudgetBoundarySnapshot, ) (goal.BudgetDecision, error)
FlushAndCheck synchronously max-flushes one Goal task's cumulative usage and fences the next effect.
func (*GoalRepo) GetActiveSessionBinding ¶
func (g *GoalRepo) GetActiveSessionBinding( ctx context.Context, key goal.BindingKey, ) (goal.SessionBinding, error)
GetActiveSessionBinding returns the exact active epoch for one workspace-owned handle.
func (*GoalRepo) GetGoalTurnByPromptID ¶
func (g *GoalRepo) GetGoalTurnByPromptID( ctx context.Context, key goal.TurnKey, promptID string, ) (goal.Turn, error)
GetGoalTurnByPromptID returns the exact workspace-owned turn identity.
func (*GoalRepo) GetJudgeAttempt ¶
func (g *GoalRepo) GetJudgeAttempt( ctx context.Context, key goal.TurnKey, attemptID string, ) (goal.JudgeAttempt, error)
GetJudgeAttempt returns one workspace-owned judge attempt.
func (*GoalRepo) GetOrCreateSessionBinding ¶
func (g *GoalRepo) GetOrCreateSessionBinding( ctx context.Context, req goal.GetOrCreateBindingRequest, ) (goal.SessionBinding, error)
GetOrCreateSessionBinding atomically adopts an origin session or returns the compatible active epoch.
func (*GoalRepo) GetSessionBindingAttempt ¶
func (g *GoalRepo) GetSessionBindingAttempt( ctx context.Context, key goal.BindingKey, epoch int64, ) (goal.SessionBinding, error)
GetSessionBindingAttempt returns one immutable binding attempt by epoch.
func (*GoalRepo) GetSessionGoalProjection ¶
func (g *GoalRepo) GetSessionGoalProjection( ctx context.Context, workspaceID looppkg.WorkspaceID, sessionID string, ) (projection goal.SessionProjection, err error)
GetSessionGoalProjection selects the newest session-origin Run before applying its clear tombstone.
func (*GoalRepo) GrantAndReactivate ¶
GrantAndReactivate records one monotonic typed grant and advances the control epoch exactly once.
func (*GoalRepo) ListGoalTurns ¶
func (g *GoalRepo) ListGoalTurns( ctx context.Context, query goal.TurnQuery, ) (page goal.TurnPage, err error)
ListGoalTurns returns one stable run-wide sequence page.
func (*GoalRepo) LoadAwaitingGoalControl ¶
func (g *GoalRepo) LoadAwaitingGoalControl( ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ) (looppkg.GoalControlState, bool, error)
LoadAwaitingGoalControl returns the one node checkpoint that currently owns Run re-entry.
func (*GoalRepo) LoadCheckpoint ¶
LoadCheckpoint returns one checkpoint only through its owning workspace.
func (*GoalRepo) MarkAmbiguous ¶
MarkAmbiguous finalizes one already-started Goal operation without replaying or allocating a successor.
func (*GoalRepo) MarkJudgeAmbiguous ¶
func (g *GoalRepo) MarkJudgeAmbiguous(ctx context.Context, req goal.MarkJudgeAmbiguousRequest) error
MarkJudgeAmbiguous terminalizes both the evaluator attempt and its already-open work turn.
func (*GoalRepo) PrepareGoalPrompt ¶
func (g *GoalRepo) PrepareGoalPrompt( ctx context.Context, req goal.PreparePromptRequest, ) (goal.PromptTicket, error)
PrepareGoalPrompt inserts one idempotent non-dispatchable Goal queue ticket.
func (*GoalRepo) PrepareSessionBindingAttempt ¶
func (g *GoalRepo) PrepareSessionBindingAttempt( ctx context.Context, req goal.PrepareBindingAttemptRequest, ) (goal.SessionBinding, error)
PrepareSessionBindingAttempt persists one run-owned creating epoch before session creation.
func (*GoalRepo) ReactivateGoalRun ¶
func (g *GoalRepo) ReactivateGoalRun( ctx context.Context, req looppkg.GoalReactivationRequest, ) (looppkg.GoalReactivationResult, error)
ReactivateGoalRun atomically grants control, clears the Run gate, and queues one successor segment.
func (*GoalRepo) ReconcileGoalSessionCleanup ¶
ReconcileGoalSessionCleanup releases Stop/create races left in-flight by a previous daemon process.
func (*GoalRepo) RecordContextUsage ¶
func (g *GoalRepo) RecordContextUsage( ctx context.Context, req goal.RecordContextUsageRequest, ) (goal.Checkpoint, error)
RecordContextUsage advances the durable freshness cursor for one exact active binding.
func (*GoalRepo) RecordGoalDriverAttached ¶
func (g *GoalRepo) RecordGoalDriverAttached(ctx context.Context, req goal.DriverAttachmentRequest) error
RecordGoalDriverAttached advances one exact claimed operation to sent without allocating a turn.
func (*GoalRepo) RecordGoalReport ¶
func (g *GoalRepo) RecordGoalReport( ctx context.Context, req goal.RecordToolReportRequest, ) (goal.ReportIntent, error)
RecordGoalReport content-addresses evidence and records its prompt-bound intent atomically.
func (*GoalRepo) RecordReportIntent ¶
func (g *GoalRepo) RecordReportIntent( ctx context.Context, req goal.RecordReportIntentRequest, ) (goal.ReportIntent, error)
RecordReportIntent writes the only durable goal_report intent for the current prompt.
func (*GoalRepo) RecoverGoalPromptTerminal ¶
func (g *GoalRepo) RecoverGoalPromptTerminal( ctx context.Context, req goal.RecoverPromptTerminalRequest, ) error
RecoverGoalPromptTerminal records exact session-event proof without exposing the raw dispatch token.
func (*GoalRepo) RejectPreparedGoalPrompt ¶
func (g *GoalRepo) RejectPreparedGoalPrompt( ctx context.Context, req goal.RejectPreparedPromptRequest, ) error
RejectPreparedGoalPrompt records a proven no-effect attempt and advances its prompt identity.
func (*GoalRepo) ResolveActiveGoalOriginAlias ¶
func (g *GoalRepo) ResolveActiveGoalOriginAlias( ctx context.Context, workspaceID looppkg.WorkspaceID, sessionID string, ) (originSessionID string, found bool, err error)
ResolveActiveGoalOriginAlias resolves an active moved binding back to its origin session.
func (*GoalRepo) RevokeGoalPrompt ¶
func (g *GoalRepo) RevokeGoalPrompt( ctx context.Context, request goal.RevokePromptRequest, ) (goal.Checkpoint, error)
RevokeGoalPrompt atomically fences prepared work or terminalizes one already-claimed operation.
func (*GoalRepo) SettleStoppedSessionBindingCreation ¶
func (g *GoalRepo) SettleStoppedSessionBindingCreation( ctx context.Context, req goal.SettleStoppedBindingCreationRequest, ) (bool, error)
SettleStoppedSessionBindingCreation releases cleanup after an in-flight create effect has returned.
func (*GoalRepo) StopGoalRun ¶
func (g *GoalRepo) StopGoalRun( ctx context.Context, request looppkg.GoalRunStopRequest, ) (looppkg.GoalRunStopResult, error)
StopGoalRun atomically revokes every live Goal checkpoint before failing its owning Run.
type HeartbeatRepo ¶
type HeartbeatRepo struct {
// contains filtered or unexported fields
}
func (*HeartbeatRepo) AppendHeartbeatRevision ¶
func (g *HeartbeatRepo) AppendHeartbeatRevision( ctx context.Context, revision heartbeat.Revision, ) (heartbeat.Revision, error)
AppendHeartbeatRevision appends one managed Heartbeat authoring revision row.
func (*HeartbeatRepo) AppendHeartbeatWakeEvent ¶
func (g *HeartbeatRepo) AppendHeartbeatWakeEvent( ctx context.Context, event heartbeat.WakeEvent, ) (heartbeat.WakeEvent, error)
AppendHeartbeatWakeEvent appends one retained Heartbeat wake audit row.
func (*HeartbeatRepo) DeleteHeartbeatAgentHistory ¶
func (g *HeartbeatRepo) DeleteHeartbeatAgentHistory( ctx context.Context, workspaceID string, agentName string, sourcePath string, ) error
DeleteHeartbeatAgentHistory removes revisions owned by one effective authored definition.
func (*HeartbeatRepo) FindHeartbeatRevisionForRollback ¶
func (g *HeartbeatRepo) FindHeartbeatRevisionForRollback( ctx context.Context, query heartbeat.RollbackLookup, ) (heartbeat.Revision, error)
FindHeartbeatRevisionForRollback returns the revision body selected for a managed rollback.
func (*HeartbeatRepo) FindHeartbeatSnapshotByDigest ¶
func (g *HeartbeatRepo) FindHeartbeatSnapshotByDigest( ctx context.Context, workspaceID string, agentName string, digest string, ) (heartbeat.Snapshot, bool, error)
FindHeartbeatSnapshotByDigest returns the snapshot matching an agent digest.
func (*HeartbeatRepo) GetHeartbeatRevision ¶
func (g *HeartbeatRepo) GetHeartbeatRevision(ctx context.Context, id string) (heartbeat.Revision, error)
GetHeartbeatRevision returns a managed Heartbeat authoring revision by id.
func (*HeartbeatRepo) GetHeartbeatSnapshot ¶
func (g *HeartbeatRepo) GetHeartbeatSnapshot(ctx context.Context, id string) (heartbeat.Snapshot, error)
GetHeartbeatSnapshot returns a persisted Heartbeat snapshot by id.
func (*HeartbeatRepo) GetHeartbeatWakeEvent ¶
func (g *HeartbeatRepo) GetHeartbeatWakeEvent(ctx context.Context, id string) (heartbeat.WakeEvent, error)
GetHeartbeatWakeEvent returns one retained Heartbeat wake audit row.
func (*HeartbeatRepo) GetHeartbeatWakeState ¶
func (g *HeartbeatRepo) GetHeartbeatWakeState( ctx context.Context, workspaceID string, agentName string, sessionID string, ) (heartbeat.WakeState, error)
GetHeartbeatWakeState returns one per-session Heartbeat wake summary.
func (*HeartbeatRepo) GetLatestValidHeartbeatSnapshot ¶
func (g *HeartbeatRepo) GetLatestValidHeartbeatSnapshot( ctx context.Context, workspaceID string, agentName string, ) (heartbeat.Snapshot, error)
GetLatestValidHeartbeatSnapshot returns the newest persisted valid Heartbeat policy for an agent.
func (*HeartbeatRepo) GetSessionHealth ¶
func (g *HeartbeatRepo) GetSessionHealth(ctx context.Context, sessionID string) (heartbeat.SessionHealth, error)
GetSessionHealth returns metadata-only health for one session.
func (*HeartbeatRepo) ListHeartbeatRevisions ¶
func (g *HeartbeatRepo) ListHeartbeatRevisions( ctx context.Context, query heartbeat.RevisionListQuery, ) (revisions []heartbeat.Revision, err error)
ListHeartbeatRevisions lists managed Heartbeat authoring revisions in newest-first order.
func (*HeartbeatRepo) ListHeartbeatSnapshots ¶
func (g *HeartbeatRepo) ListHeartbeatSnapshots( ctx context.Context, query heartbeat.SnapshotListQuery, ) (snapshots []heartbeat.Snapshot, err error)
ListHeartbeatSnapshots lists persisted Heartbeat snapshots in newest-first order.
func (*HeartbeatRepo) ListHeartbeatWakeEvents ¶
func (g *HeartbeatRepo) ListHeartbeatWakeEvents( ctx context.Context, query heartbeat.WakeEventListQuery, ) (events []heartbeat.WakeEvent, err error)
ListHeartbeatWakeEvents lists retained Heartbeat wake audit rows in newest-first order.
func (*HeartbeatRepo) ListHeartbeatWakeState ¶
func (g *HeartbeatRepo) ListHeartbeatWakeState( ctx context.Context, query heartbeat.WakeStateListQuery, ) (states []heartbeat.WakeState, err error)
ListHeartbeatWakeState lists Heartbeat wake state rows in newest-first order.
func (*HeartbeatRepo) ListSessionHealth ¶
func (g *HeartbeatRepo) ListSessionHealth( ctx context.Context, query heartbeat.SessionHealthListQuery, ) (rowsOut []heartbeat.SessionHealth, err error)
ListSessionHealth lists metadata-only session health rows in newest-first order.
func (*HeartbeatRepo) ListSessionHealthRecoveryInputs ¶
func (g *HeartbeatRepo) ListSessionHealthRecoveryInputs( ctx context.Context, limit int, ) ([]heartbeat.SessionHealth, error)
ListSessionHealthRecoveryInputs returns persisted rows that restart recovery must recompute before wake.
func (*HeartbeatRepo) MarkSessionHealthStale ¶
func (g *HeartbeatRepo) MarkSessionHealthStale( ctx context.Context, cutoff time.Time, updatedAt time.Time, ) (int64, error)
MarkSessionHealthStale marks stale persisted health rows as wake-ineligible without deleting authored policy.
func (*HeartbeatRepo) RecordHeartbeatWakeDecision ¶
func (g *HeartbeatRepo) RecordHeartbeatWakeDecision( ctx context.Context, event heartbeat.WakeEvent, state heartbeat.WakeState, ) (outEvent heartbeat.WakeEvent, outState heartbeat.WakeState, err error)
RecordHeartbeatWakeDecision appends the audit row and updates cooldown state atomically.
func (*HeartbeatRepo) SweepHeartbeatWakeEvents ¶
func (g *HeartbeatRepo) SweepHeartbeatWakeEvents(ctx context.Context, cutoff time.Time, limit int) (int64, error)
SweepHeartbeatWakeEvents deletes expired wake audit rows in one bounded batch.
func (*HeartbeatRepo) UpsertHeartbeatSnapshot ¶
func (g *HeartbeatRepo) UpsertHeartbeatSnapshot( ctx context.Context, snapshot heartbeat.Snapshot, ) (heartbeat.Snapshot, error)
UpsertHeartbeatSnapshot inserts a resolved Heartbeat snapshot or reuses the existing row for its digest.
func (*HeartbeatRepo) UpsertHeartbeatWakeState ¶
func (*HeartbeatRepo) UpsertSessionHealth ¶
func (g *HeartbeatRepo) UpsertSessionHealth( ctx context.Context, health heartbeat.SessionHealth, ) (heartbeat.SessionHealth, error)
type LoopRepo ¶
type LoopRepo struct {
// contains filtered or unexported fields
}
func (*LoopRepo) AdvanceLoopRunProgress ¶
func (*LoopRepo) ClearInlineGoal ¶
func (g *LoopRepo) ClearInlineGoal( ctx context.Context, request looppkg.InlineGoalClearStoreRequest, ) (looppkg.InlineGoalClearStoreResult, error)
ClearInlineGoal atomically selects and tombstones the newest session Goal, stopping it when live.
func (*LoopRepo) CompareAndSwapLoopRunStatus ¶
func (g *LoopRepo) CompareAndSwapLoopRunStatus( ctx context.Context, runID looppkg.RunID, from looppkg.Status, to looppkg.Status, cause looppkg.TransitionCause, at time.Time, ) error
CompareAndSwapLoopRunStatus updates status only from the expected durable value.
func (*LoopRepo) CreateInlineLoopRunForStart ¶
func (g *LoopRepo) CreateInlineLoopRunForStart( ctx context.Context, run looppkg.Run, ) (looppkg.Run, error)
CreateInlineLoopRunForStart atomically validates the origin, starts the Run, and enqueues discovery.
func (*LoopRepo) CreateLoopRunForStart ¶
func (g *LoopRepo) CreateLoopRunForStart( ctx context.Context, run looppkg.Run, policy dsl.ConcurrencyPolicy, ) (looppkg.Run, error)
CreateLoopRunForStart atomically applies the loop concurrency policy and persists a new run.
func (*LoopRepo) EnqueueLoopCoordinatorWake ¶
func (g *LoopRepo) EnqueueLoopCoordinatorWake( ctx context.Context, loopRunID string, idempotencyKey string, origin taskpkg.Origin, now time.Time, ) (taskpkg.Run, bool, error)
EnqueueLoopCoordinatorWake reserves a coordinator run for one loop_run.
func (*LoopRepo) EnqueueWatchEventsGapWakes ¶
func (g *LoopRepo) EnqueueWatchEventsGapWakes( ctx context.Context, origin taskpkg.Origin, now time.Time, ) ([]taskpkg.Run, error)
EnqueueWatchEventsGapWakes scans parked watch-events nodes for durable cursor gaps and enqueues idempotent coordinator wakes.
func (*LoopRepo) EnqueueWatchEventsGapWakesPage ¶
func (g *LoopRepo) EnqueueWatchEventsGapWakesPage( ctx context.Context, origin taskpkg.Origin, now time.Time, after looppkg.ParkedWatchEventScanCursor, limit int, ) ([]taskpkg.Run, looppkg.ParkedWatchEventScanCursor, error)
EnqueueWatchEventsGapWakesPage checks one bounded page of parked subscriptions and returns the durable cursor for the next scheduler cycle.
func (*LoopRepo) FindActiveLoopRun ¶
func (g *LoopRepo) FindActiveLoopRun( ctx context.Context, ws looppkg.WorkspaceID, loopName string, ) (*looppkg.Run, error)
FindActiveLoopRun returns the oldest live run for a workspace loop.
func (*LoopRepo) GetLoopConfig ¶
func (g *LoopRepo) GetLoopConfig( ctx context.Context, ws looppkg.WorkspaceID, loopName string, ) (*looppkg.LoopConfig, error)
GetLoopConfig loads a no-fork per-loop config override.
func (*LoopRepo) GetLoopDefinitionSnapshot ¶
func (g *LoopRepo) GetLoopDefinitionSnapshot( ctx context.Context, ws looppkg.WorkspaceID, digest string, ) (looppkg.DefinitionSnapshot, error)
func (*LoopRepo) GetLoopRun ¶
func (g *LoopRepo) GetLoopRun( ctx context.Context, ws looppkg.WorkspaceID, runID looppkg.RunID, ) (looppkg.Run, error)
GetLoopRun loads one workspace-scoped loop_run.
func (*LoopRepo) GetLoopRunByID ¶
GetLoopRunByID loads one loop_run without a workspace filter for ancestry/transition internals.
func (*LoopRepo) ListGenerationOutputs ¶
func (g *LoopRepo) ListGenerationOutputs( ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, generation int, ) ([]looppkg.GenerationOutput, error)
ListGenerationOutputs loads loop-owned per-node generation state in deterministic order.
func (*LoopRepo) ListLoopCatalogRunSummaries ¶
func (g *LoopRepo) ListLoopCatalogRunSummaries( ctx context.Context, query looppkg.CatalogRunQuery, ) (summaries map[string]looppkg.CatalogRunSummary, err error)
func (*LoopRepo) ListLoopGateDecisions ¶
func (*LoopRepo) ListLoopRunEvents ¶
func (g *LoopRepo) ListLoopRunEvents( ctx context.Context, query looppkg.RunEventQuery, ) ([]looppkg.RunEvent, error)
ListLoopRunEvents loads retained events after the requested sequence.
func (*LoopRepo) ListLoopRuns ¶
func (g *LoopRepo) ListLoopRuns( ctx context.Context, query looppkg.RunListQuery, ) (runs []looppkg.Run, err error)
ListLoopRuns loads workspace-scoped loop runs in newest-first order.
func (*LoopRepo) ListLoopUIAnnotations ¶
func (g *LoopRepo) ListLoopUIAnnotations( ctx context.Context, ws looppkg.WorkspaceID, loopName string, ) ([]looppkg.UIAnnotation, error)
ListLoopUIAnnotations loads editor node positions for one workspace loop.
func (*LoopRepo) LookupLoopGenerationOutputStatus ¶
func (g *LoopRepo) LookupLoopGenerationOutputStatus( ctx context.Context, workspaceID string, loopRunID string, taskRunID string, ) (string, bool, error)
LookupLoopGenerationOutputStatus returns the output correlated with one worker task run.
func (*LoopRepo) PromoteOldestQueuedLoopRun ¶
func (g *LoopRepo) PromoteOldestQueuedLoopRun( ctx context.Context, workspaceID string, loopName string, origin taskpkg.Origin, now time.Time, ) (taskpkg.Run, bool, error)
PromoteOldestQueuedLoopRun promotes the FIFO queued run for one workspace loop when no run is live.
func (*LoopRepo) ReconcileLoopCoordinatorsOnBoot ¶
func (g *LoopRepo) ReconcileLoopCoordinatorsOnBoot( ctx context.Context, origin taskpkg.Origin, now time.Time, ) ([]taskpkg.Run, error)
ReconcileLoopCoordinatorsOnBoot re-enqueues missing coordinators and parked watch-events runs with durable cursor gaps.
func (*LoopRepo) RecordAppliedRuntime ¶
func (g *LoopRepo) RecordAppliedRuntime( ctx context.Context, workspaceID looppkg.WorkspaceID, loopRunID looppkg.RunID, generation int, nodeID looppkg.NodeID, itemIndex int, resolved looppkg.ResolvedRuntime, ) (returnErr error)
RecordAppliedRuntime persists binder-applied runtime truth for one workspace-owned output.
func (*LoopRepo) RecordLoopGateDecisions ¶
func (*LoopRepo) ReplaceInlineLoopRun ¶
func (g *LoopRepo) ReplaceInlineLoopRun( ctx context.Context, request looppkg.InlineReplaceStoreRequest, ) (looppkg.InlineReplaceStoreResult, error)
ReplaceInlineLoopRun atomically revokes the expected live Goal and starts its prepared successor.
func (*LoopRepo) ReplaceLoopUIAnnotations ¶
func (g *LoopRepo) ReplaceLoopUIAnnotations( ctx context.Context, ws looppkg.WorkspaceID, loopName string, annotations []looppkg.UIAnnotation, ) error
ReplaceLoopUIAnnotations replaces editor node positions for one workspace loop.
func (*LoopRepo) SetLoopRunPauseRequested ¶
func (g *LoopRepo) SetLoopRunPauseRequested( ctx context.Context, ws looppkg.WorkspaceID, runID looppkg.RunID, requested bool, actor taskpkg.ActorContext, ) error
SetLoopRunPauseRequested updates the durable operator pause intent and its authenticated actor.
func (*LoopRepo) UpsertLoopConfig ¶
func (g *LoopRepo) UpsertLoopConfig( ctx context.Context, ws looppkg.WorkspaceID, loopName string, cfg looppkg.LoopConfig, ) error
UpsertLoopConfig persists a no-fork per-loop config override.
type MarketplaceRepo ¶
type MarketplaceRepo struct {
// contains filtered or unexported fields
}
func (*MarketplaceRepo) GetMarketplaceCatalogEntry ¶
func (r *MarketplaceRepo) GetMarketplaceCatalogEntry( ctx context.Context, kind string, entryID string, ) (store.MarketplaceCatalogEntry, error)
GetMarketplaceCatalogEntry returns one projection by immutable feed identity.
func (*MarketplaceRepo) GetMarketplaceCatalogState ¶
func (r *MarketplaceRepo) GetMarketplaceCatalogState( ctx context.Context, kind string, ) (store.MarketplaceCatalogState, error)
GetMarketplaceCatalogState returns persisted freshness plus the projected count.
func (*MarketplaceRepo) GetMarketplaceExtensionByInstallSlug ¶
func (r *MarketplaceRepo) GetMarketplaceExtensionByInstallSlug( ctx context.Context, installSlug string, version string, ) (store.MarketplaceCatalogEntry, error)
GetMarketplaceExtensionByInstallSlug returns the exact curated extension acquisition row.
func (*MarketplaceRepo) ListMarketplaceCatalogEntries ¶
func (r *MarketplaceRepo) ListMarketplaceCatalogEntries( ctx context.Context, kind string, limit int64, ) ([]store.MarketplaceCatalogEntry, error)
ListMarketplaceCatalogEntries returns deterministic filtered projections.
func (*MarketplaceRepo) ListMarketplaceSkillsByInstallSlugs ¶
func (r *MarketplaceRepo) ListMarketplaceSkillsByInstallSlugs( ctx context.Context, installSlugs []string, ) ([]store.MarketplaceCatalogEntry, error)
ListMarketplaceSkillsByInstallSlugs returns curated skill rows for exact acquisition slugs.
func (*MarketplaceRepo) MarkMarketplaceCatalogStale ¶
func (r *MarketplaceRepo) MarkMarketplaceCatalogStale( ctx context.Context, kind string, lastError string, ) error
MarkMarketplaceCatalogStale records a refresh failure without changing entries.
func (*MarketplaceRepo) ReplaceMarketplaceCatalog ¶
func (r *MarketplaceRepo) ReplaceMarketplaceCatalog( ctx context.Context, replacement store.MarketplaceCatalogReplacement, ) (err error)
ReplaceMarketplaceCatalog atomically prunes and replaces one curated kind.
type ModelCatalogRepo ¶
type ModelCatalogRepo struct {
// contains filtered or unexported fields
}
func (*ModelCatalogRepo) ListRows ¶
func (g *ModelCatalogRepo) ListRows( ctx context.Context, opts modelcatalog.ListOptions, ) (catalogRows []modelcatalog.ModelRow, err error)
ListRows returns deterministic catalog source rows matching the query.
func (*ModelCatalogRepo) ListSourceStatus ¶
func (g *ModelCatalogRepo) ListSourceStatus( ctx context.Context, providerID string, ) (statuses []modelcatalog.SourceStatus, err error)
ListSourceStatus returns provider-scoped source status rows.
func (*ModelCatalogRepo) ReplaceSourceRows ¶
func (g *ModelCatalogRepo) ReplaceSourceRows( ctx context.Context, sourceID string, providerID string, rows []modelcatalog.ModelRow, status modelcatalog.SourceStatus, ) error
ReplaceSourceRows atomically replaces all model rows and status for one provider-scoped source.
type NetworkRepo ¶
type NetworkRepo struct {
// contains filtered or unexported fields
}
func (*NetworkRepo) AcceptNetworkMessage ¶
func (g *NetworkRepo) AcceptNetworkMessage( ctx context.Context, req store.AcceptNetworkMessageRequest, ) (result store.AcceptNetworkMessageResult, err error)
AcceptNetworkMessage commits conversation evidence, recipient decisions, and wake work atomically.
func (*NetworkRepo) CreateNetworkChannel ¶
func (g *NetworkRepo) CreateNetworkChannel(ctx context.Context, entry store.NetworkChannelEntry) error
CreateNetworkChannel inserts durable channel authority without replacing an existing row.
func (*NetworkRepo) DeleteNetworkChannel ¶
func (g *NetworkRepo) DeleteNetworkChannel(ctx context.Context, ref store.NetworkChannelRef) error
DeleteNetworkChannel removes one persisted channel metadata row.
func (*NetworkRepo) DeleteNetworkSubscription ¶
func (g *NetworkRepo) DeleteNetworkSubscription(ctx context.Context, ref store.NetworkSubscriptionRef) error
DeleteNetworkSubscription removes one delivery preference.
func (*NetworkRepo) GetDirectRoom ¶
func (g *NetworkRepo) GetDirectRoom( ctx context.Context, channelRef store.NetworkChannelRef, directID string, ) (store.NetworkDirectRoomSummary, error)
GetDirectRoom returns one direct-room summary.
func (*NetworkRepo) GetNetworkAvailability ¶
func (g *NetworkRepo) GetNetworkAvailability(ctx context.Context) (store.NetworkAvailability, error)
GetNetworkAvailability returns the persisted network admission state.
func (*NetworkRepo) GetNetworkChannel ¶
func (g *NetworkRepo) GetNetworkChannel( ctx context.Context, ref store.NetworkChannelRef, ) (store.NetworkChannelEntry, error)
GetNetworkChannel returns one persisted network channel metadata row.
func (*NetworkRepo) GetNetworkUsage ¶
func (g *NetworkRepo) GetNetworkUsage( ctx context.Context, query store.NetworkUsageQuery, ) (store.NetworkUsageReport, error)
GetNetworkUsage returns one bounded workspace-fenced page plus full-filter totals.
func (*NetworkRepo) GetThread ¶
func (g *NetworkRepo) GetThread( ctx context.Context, channelRef store.NetworkChannelRef, threadID string, ) (store.NetworkThreadSummary, error)
GetThread returns one public-thread summary.
func (*NetworkRepo) GetWork ¶
func (g *NetworkRepo) GetWork(ctx context.Context, workspaceID string, workID string) (store.NetworkWorkEntry, error)
GetWork returns one network work row by workspace_id and work_id.
func (*NetworkRepo) ListConversationMessages ¶
func (g *NetworkRepo) ListConversationMessages( ctx context.Context, ref store.NetworkConversationRef, query store.NetworkConversationMessageQuery, ) (entries []store.NetworkConversationMessage, err error)
ListConversationMessages returns messages isolated to one conversation container.
func (*NetworkRepo) ListDirectRooms ¶
func (g *NetworkRepo) ListDirectRooms( ctx context.Context, ref store.NetworkChannelRef, query store.NetworkDirectRoomQuery, ) (page store.NetworkDirectRoomPage, err error)
ListDirectRooms returns one counted, bounded page of direct-room summaries.
func (*NetworkRepo) ListNetworkAudit ¶
func (g *NetworkRepo) ListNetworkAudit( ctx context.Context, query store.NetworkAuditQuery, ) (entries []store.NetworkAuditEntry, err error)
ListNetworkAudit returns network audit rows filtered by the supplied options.
func (*NetworkRepo) ListNetworkChannelKindCounts ¶
func (g *NetworkRepo) ListNetworkChannelKindCounts( ctx context.Context, ref store.NetworkChannelRef, ) (counts []store.NetworkChannelKindCount, err error)
ListNetworkChannelKindCounts returns materialized public-message totals for one workspace-qualified channel.
func (*NetworkRepo) ListNetworkChannelProjections ¶
func (g *NetworkRepo) ListNetworkChannelProjections( ctx context.Context, query store.NetworkChannelProjectionQuery, ) (projections []store.NetworkChannelProjection, err error)
ListNetworkChannelProjections returns one materialized row per persisted channel timeline without scanning the underlying message log.
func (*NetworkRepo) ListNetworkChannels ¶
func (g *NetworkRepo) ListNetworkChannels( ctx context.Context, query store.NetworkChannelQuery, ) (entries []store.NetworkChannelEntry, err error)
ListNetworkChannels returns persisted network channel metadata rows.
func (*NetworkRepo) ListNetworkInbox ¶
func (g *NetworkRepo) ListNetworkInbox( ctx context.Context, workspaceID string, sessionID string, channel string, limit int, ) (entries []store.NetworkMessageEntry, err error)
ListNetworkInbox returns immutable delivered decisions in acceptance order.
func (*NetworkRepo) ListNetworkMessages ¶
func (g *NetworkRepo) ListNetworkMessages( ctx context.Context, query store.NetworkMessageQuery, ) (entries []store.NetworkMessageEntry, err error)
ListNetworkMessages returns persisted network timeline rows filtered by the supplied options.
func (*NetworkRepo) ListNetworkRecents ¶
func (g *NetworkRepo) ListNetworkRecents( ctx context.Context, query store.NetworkRecentQuery, ) ([]store.NetworkRecentSummary, error)
ListNetworkRecents returns the newest thread/direct summaries across every channel in one workspace using the materialized conversation tables.
func (*NetworkRepo) ListNetworkSubscriptions ¶
func (g *NetworkRepo) ListNetworkSubscriptions( ctx context.Context, query store.NetworkSubscriptionQuery, ) (entries []store.NetworkSubscriptionEntry, err error)
ListNetworkSubscriptions returns session delivery preferences in deterministic order.
func (*NetworkRepo) ListNetworkTaskStatusProjections ¶
func (g *NetworkRepo) ListNetworkTaskStatusProjections( ctx context.Context, query store.NetworkTaskStatusProjectionQuery, ) (projections []store.NetworkTaskStatusProjection, err error)
ListNetworkTaskStatusProjections returns bounded recipient-scoped durable projections.
func (*NetworkRepo) ListNetworkTaskThreadOrigins ¶
func (g *NetworkRepo) ListNetworkTaskThreadOrigins( ctx context.Context, query store.NetworkTaskThreadOriginQuery, ) (origins []store.NetworkTaskThreadOrigin, err error)
ListNetworkTaskThreadOrigins returns promoted task origins by task or thread.
func (*NetworkRepo) ListNetworkThreadSessionTokenStats ¶
func (g *NetworkRepo) ListNetworkThreadSessionTokenStats( ctx context.Context, query store.NetworkThreadSessionTokenStatsQuery, ) (stats []store.NetworkThreadSessionTokenStats, err error)
ListNetworkThreadSessionTokenStats returns prompt-cost aggregates for one public thread.
func (*NetworkRepo) ListQueuedNetworkWakes ¶
func (g *NetworkRepo) ListQueuedNetworkWakes( ctx context.Context, limit int, ) (notifications []store.CommittedNetworkNotification, err error)
ListQueuedNetworkWakes returns the durable queue projection used at boot and after lost notifications.
func (*NetworkRepo) ListTaskDesignationRollups ¶
func (g *NetworkRepo) ListTaskDesignationRollups( ctx context.Context, query store.TaskDesignationRollupQuery, ) (rollups []store.TaskDesignationRollup, err error)
ListTaskDesignationRollups returns rollups by task or group.
func (*NetworkRepo) ListThreadParticipants ¶
func (g *NetworkRepo) ListThreadParticipants( ctx context.Context, ref store.NetworkChannelRef, threadID string, ) (participants []store.NetworkThreadParticipant, err error)
ListThreadParticipants returns sessions recorded in one public thread.
func (*NetworkRepo) ListThreads ¶
func (g *NetworkRepo) ListThreads( ctx context.Context, ref store.NetworkChannelRef, query store.NetworkThreadQuery, ) (page store.NetworkThreadPage, err error)
ListThreads returns one counted, bounded page of public-thread summaries.
func (*NetworkRepo) LoadNetworkWake ¶
func (g *NetworkRepo) LoadNetworkWake( ctx context.Context, workspaceID string, wakeID string, ) (store.WakeReservation, []store.NetworkMessageEntry, error)
LoadNetworkWake loads one reservation and its causally ordered source messages.
func (*NetworkRepo) PatchNetworkChannel ¶
func (g *NetworkRepo) PatchNetworkChannel( ctx context.Context, ref store.NetworkChannelRef, patch store.NetworkChannelPatch, ) error
PatchNetworkChannel applies one partial metadata update without overwriting unspecified channel fields.
func (*NetworkRepo) PutNetworkSubscription ¶
func (g *NetworkRepo) PutNetworkSubscription(ctx context.Context, entry store.NetworkSubscriptionEntry) error
PutNetworkSubscription upserts one session delivery preference.
func (*NetworkRepo) PutNetworkSubscriptionWithChannel ¶
func (g *NetworkRepo) PutNetworkSubscriptionWithChannel( ctx context.Context, channel store.NetworkChannelEntry, entry store.NetworkSubscriptionEntry, ) error
PutNetworkSubscriptionWithChannel creates missing channel authority and upserts its subscription atomically without replacing existing metadata.
func (*NetworkRepo) PutNetworkTaskThreadOrigin ¶
func (g *NetworkRepo) PutNetworkTaskThreadOrigin(ctx context.Context, origin store.NetworkTaskThreadOrigin) error
PutNetworkTaskThreadOrigin upserts the origin link for one promoted task.
func (*NetworkRepo) PutTaskDesignationRollup ¶
func (g *NetworkRepo) PutTaskDesignationRollup(ctx context.Context, rollup store.TaskDesignationRollup) error
PutTaskDesignationRollup upserts one terminal rollup artifact.
func (*NetworkRepo) ResolveDirectRoom ¶
func (g *NetworkRepo) ResolveDirectRoom( ctx context.Context, entry store.NetworkDirectRoomEntry, ) (summary store.NetworkDirectRoomSummary, err error)
ResolveDirectRoom inserts or returns the deterministic two-party room.
func (*NetworkRepo) ResolveNetworkCausation ¶
func (g *NetworkRepo) ResolveNetworkCausation( ctx context.Context, workspaceID string, causationID string, ) (string, int, bool, error)
ResolveNetworkCausation returns the next wake depth for one durable source.
func (*NetworkRepo) SetNetworkAvailability ¶
func (g *NetworkRepo) SetNetworkAvailability( ctx context.Context, enabled bool, updatedBy string, ) (availability store.NetworkAvailability, err error)
SetNetworkAvailability changes availability inside the same immediate-write domain used by admission.
func (*NetworkRepo) UpdateNetworkThreadSessionTokenStats ¶
func (g *NetworkRepo) UpdateNetworkThreadSessionTokenStats( ctx context.Context, update store.NetworkThreadSessionTokenStatsUpdate, ) error
UpdateNetworkThreadSessionTokenStats merges one delivered prompt into the thread/session aggregate.
func (*NetworkRepo) WriteConversationMessage ¶
func (g *NetworkRepo) WriteConversationMessage( ctx context.Context, entry store.NetworkConversationMessage, ) (result store.NetworkConversationWriteResult, err error)
WriteConversationMessage persists one message and its derived state atomically.
func (*NetworkRepo) WriteNetworkAudit ¶
func (g *NetworkRepo) WriteNetworkAudit(ctx context.Context, entry store.NetworkAuditEntry) error
WriteNetworkAudit stores one network audit row.
func (*NetworkRepo) WriteNetworkChannel ¶
func (g *NetworkRepo) WriteNetworkChannel(ctx context.Context, entry store.NetworkChannelEntry) error
WriteNetworkChannel upserts durable network channel metadata.
func (*NetworkRepo) WriteNetworkMessage ¶
func (g *NetworkRepo) WriteNetworkMessage(ctx context.Context, entry store.NetworkMessageEntry) error
WriteNetworkMessage stores one persisted network timeline envelope, ignoring duplicate message ids.
type NotificationRepo ¶
type NotificationRepo struct {
// contains filtered or unexported fields
}
NotificationRepo owns notification cursor and preset persistence.
func (*NotificationRepo) AdvanceCursor ¶
func (n *NotificationRepo) AdvanceCursor( ctx context.Context, update notifications.AdvanceCursor, ) (cursor notifications.Cursor, err error)
AdvanceCursor records a monotonic confirmed delivery position.
func (*NotificationRepo) CreatePreset ¶
func (n *NotificationRepo) CreatePreset( ctx context.Context, preset presetspkg.Preset, ) (presetspkg.Preset, error)
func (*NotificationRepo) DeletePreset ¶
func (n *NotificationRepo) DeletePreset(ctx context.Context, name string) error
func (*NotificationRepo) EnsureBuiltInPresets ¶
func (n *NotificationRepo) EnsureBuiltInPresets( ctx context.Context, defaults []presetspkg.Preset, ) error
EnsureBuiltInPresets inserts disabled built-ins and records default drift without overwriting user edits.
func (*NotificationRepo) GetCursor ¶
func (n *NotificationRepo) GetCursor(ctx context.Context, key notifications.CursorKey) (notifications.Cursor, error)
GetCursor returns one durable notification cursor by key.
func (*NotificationRepo) GetPreset ¶
func (n *NotificationRepo) GetPreset(ctx context.Context, name string) (presetspkg.Preset, error)
func (*NotificationRepo) ListCursors ¶
func (n *NotificationRepo) ListCursors( ctx context.Context, query notifications.CursorQuery, ) (cursors []notifications.Cursor, err error)
ListCursors lists durable notification cursors matching the query.
func (*NotificationRepo) ListPresets ¶
func (n *NotificationRepo) ListPresets( ctx context.Context, query presetspkg.Query, ) (items []presetspkg.Preset, err error)
func (*NotificationRepo) RecordCursorError ¶
func (n *NotificationRepo) RecordCursorError( ctx context.Context, report notifications.CursorError, ) (cursor notifications.Cursor, err error)
RecordCursorError stores a cursor diagnostic without moving delivery progress.
func (*NotificationRepo) ResetCursor ¶
func (n *NotificationRepo) ResetCursor( ctx context.Context, reset notifications.ResetCursor, ) (cursor notifications.Cursor, err error)
ResetCursor rewinds or repairs one cursor after an explicit recovery decision.
func (*NotificationRepo) UpdatePreset ¶
func (n *NotificationRepo) UpdatePreset( ctx context.Context, name string, req presetspkg.UpdateRequest, ) (presetspkg.Preset, error)
type ObserveRepo ¶
type ObserveRepo struct {
// contains filtered or unexported fields
}
func (*ObserveRepo) CountEventsByHourWeekday ¶
func (g *ObserveRepo) CountEventsByHourWeekday( ctx context.Context, query store.OverviewSinceQuery, ) ([]store.EventHourWeekdayBucket, error)
CountEventsByHourWeekday returns hour-by-weekday event counts inside the window.
func (*ObserveRepo) CountHookDispatchesSince ¶
func (g *ObserveRepo) CountHookDispatchesSince( ctx context.Context, query store.OverviewSinceQuery, ) (store.HookDispatchCounts, error)
CountHookDispatchesSince counts hook dispatch completions and failures inside the window.
func (*ObserveRepo) CountNetworkMessagesSince ¶
func (g *ObserveRepo) CountNetworkMessagesSince(ctx context.Context, query store.OverviewSinceQuery) (int, error)
CountNetworkMessagesSince counts durable network audit envelopes inside the window.
func (*ObserveRepo) CountTaskRunOutcomesByDay ¶
func (g *ObserveRepo) CountTaskRunOutcomesByDay( ctx context.Context, query store.OverviewSinceQuery, ) ([]store.TaskRunOutcomeDay, error)
CountTaskRunOutcomesByDay returns terminal worker-run outcome counts per daemon-local day.
func (*ObserveRepo) CountTasksClosedByDay ¶
func (g *ObserveRepo) CountTasksClosedByDay( ctx context.Context, query store.OverviewSinceQuery, ) ([]store.TaskClosedDay, error)
CountTasksClosedByDay returns completed-task closure counts per daemon-local day.
func (*ObserveRepo) LatestEventSummaryAt ¶
func (g *ObserveRepo) LatestEventSummaryAt(ctx context.Context, workspaceID string) (time.Time, error)
LatestEventSummaryAt returns the newest event summary timestamp, zero when none exist.
func (*ObserveRepo) ListEventSummaries ¶
func (g *ObserveRepo) ListEventSummaries( ctx context.Context, query store.EventSummaryQuery, ) (summaries []store.EventSummary, err error)
ListEventSummaries returns global event summaries filtered by the supplied options.
func (*ObserveRepo) ListTokenStats ¶
func (g *ObserveRepo) ListTokenStats( ctx context.Context, query store.TokenStatsQuery, ) (stats []store.TokenStats, err error)
ListTokenStats returns aggregated token usage rows.
func (*ObserveRepo) ListTokenUsageByAgent ¶
func (g *ObserveRepo) ListTokenUsageByAgent( ctx context.Context, query store.OverviewDayQuery, ) ([]store.TokenUsageAgentTotal, error)
ListTokenUsageByAgent returns summed per-agent token usage inside the rollup window.
func (*ObserveRepo) ListTokenUsageByDay ¶
func (g *ObserveRepo) ListTokenUsageByDay( ctx context.Context, query store.OverviewDayQuery, ) ([]store.TokenUsageDay, error)
ListTokenUsageByDay returns summed daily token usage inside the rollup window.
func (*ObserveRepo) LongestUserSessionSince ¶
func (g *ObserveRepo) LongestUserSessionSince( ctx context.Context, query store.OverviewSinceQuery, ) (*store.LongestSessionSample, error)
LongestUserSessionSince returns the longest user session started inside the window, nil when none.
func (*ObserveRepo) RecordTokenUsage ¶
func (g *ObserveRepo) RecordTokenUsage( ctx context.Context, stats store.TokenStatsUpdate, daily store.TokenUsageDailyUpdate, ) (err error)
RecordTokenUsage writes the session aggregate and the daily rollup in one transaction so a rollup failure cannot leave overview usage undercounting the tokens already committed to token_stats.
func (*ObserveRepo) SumTokenUsageCost ¶
func (g *ObserveRepo) SumTokenUsageCost( ctx context.Context, query store.OverviewDayQuery, ) ([]store.TokenUsageCostGroup, error)
SumTokenUsageCost returns provenance-grouped cost totals inside the rollup window.
func (*ObserveRepo) SweepObservability ¶
func (g *ObserveRepo) SweepObservability( ctx context.Context, cutoff time.Time, ) (result store.ObservabilityRetentionSweepResult, err error)
func (*ObserveRepo) UpdateTokenStats ¶
func (g *ObserveRepo) UpdateTokenStats(ctx context.Context, update store.TokenStatsUpdate) error
UpdateTokenStats merges one or more turns of token usage into the session aggregate.
func (*ObserveRepo) UpsertTokenUsageDaily ¶
func (g *ObserveRepo) UpsertTokenUsageDaily(ctx context.Context, update store.TokenUsageDailyUpdate) error
UpsertTokenUsageDaily merges one turn of token usage into the daily rollup bucket.
func (*ObserveRepo) WriteEventSummary ¶
func (g *ObserveRepo) WriteEventSummary(ctx context.Context, summary store.EventSummary) error
WriteEventSummary stores a lightweight cross-session summary entry.
type OpenOption ¶
type OpenOption func(*openConfig)
OpenOption configures optional GlobalDB composition dependencies.
func WithSessionEventMetadataOpener ¶
func WithSessionEventMetadataOpener(opener store.SessionEventMetadataOpener) OpenOption
WithSessionEventMetadataOpener supplies the per-session replay reader used by watch-events.
type PermissionRepo ¶
type PermissionRepo struct {
// contains filtered or unexported fields
}
func (*PermissionRepo) ListPermissionLog ¶
func (g *PermissionRepo) ListPermissionLog( ctx context.Context, query store.PermissionLogQuery, ) (entries []store.PermissionLogEntry, err error)
ListPermissionLog returns permission audit rows filtered by the supplied options.
func (*PermissionRepo) WritePermissionLog ¶
func (g *PermissionRepo) WritePermissionLog(ctx context.Context, entry store.PermissionLogEntry) error
WritePermissionLog stores one permission decision audit row.
type SessionRepo ¶
type SessionRepo struct {
// contains filtered or unexported fields
}
func (*SessionRepo) AdvanceSessionInputGeneration ¶
func (g *SessionRepo) AdvanceSessionInputGeneration( ctx context.Context, sessionID string, now time.Time, ) (int64, error)
AdvanceSessionInputGeneration increments the session generation used to fence stale queue entries.
func (*SessionRepo) AggregateSessionsByAgent ¶
func (g *SessionRepo) AggregateSessionsByAgent( ctx context.Context, query store.SessionAgentMetricsQuery, ) (metrics []store.SessionAgentMetrics, err error)
AggregateSessionsByAgent returns exact durable visible-session metrics grouped by agent.
func (*SessionRepo) AttachSession ¶
func (g *SessionRepo) AttachSession(ctx context.Context, req store.SessionAttachRequest) (store.SessionAttach, error)
AttachSession acquires a short-lived attach lease for a resumable session.
func (*SessionRepo) CancelPendingSessionInputs ¶
func (g *SessionRepo) CancelPendingSessionInputs( ctx context.Context, sessionID string, generation int64, now time.Time, ) (int, error)
CancelPendingSessionInputs cancels stale entries older than the supplied generation.
func (*SessionRepo) CancelSessionInput ¶
func (g *SessionRepo) CancelSessionInput( ctx context.Context, sessionID string, entryID string, now time.Time, ) (store.SessionInputQueueEntry, error)
CancelSessionInput cancels one pending queue entry.
func (*SessionRepo) ClaimNextSessionInput ¶
func (g *SessionRepo) ClaimNextSessionInput( ctx context.Context, sessionID string, now time.Time, ) (entry store.SessionInputQueueEntry, ok bool, err error)
ClaimNextSessionInput atomically leases the next eligible input for dispatch.
func (*SessionRepo) ConsumeSessionSteer ¶
func (g *SessionRepo) ConsumeSessionSteer( ctx context.Context, sessionID string, now time.Time, ) (entry store.SessionInputQueueEntry, ok bool, err error)
ConsumeSessionSteer atomically marks the staged steer entry as sent and returns it once.
func (*SessionRepo) CurrentSessionInputGeneration ¶
func (g *SessionRepo) CurrentSessionInputGeneration(ctx context.Context, sessionID string) (int64, error)
CurrentSessionInputGeneration returns the persisted busy-input generation for a session.
func (*SessionRepo) DeleteSession ¶
func (g *SessionRepo) DeleteSession(ctx context.Context, sessionID string) error
DeleteSession removes one durable session catalog row.
func (*SessionRepo) EnqueueSessionInput ¶
func (g *SessionRepo) EnqueueSessionInput( ctx context.Context, req store.SessionInputQueueInsert, ) (entry store.SessionInputQueueEntry, position int, err error)
EnqueueSessionInput appends one queued operator input entry under the configured cap.
func (*SessionRepo) EnsureSessionTranscriptEpoch ¶
func (g *SessionRepo) EnsureSessionTranscriptEpoch( ctx context.Context, update store.SessionTranscriptEpochUpdate, ) (int64, error)
EnsureSessionTranscriptEpoch raises one session transcript epoch to update.Minimum without incrementing past it.
func (*SessionRepo) GetSessionCreationIdentity ¶
func (g *SessionRepo) GetSessionCreationIdentity( ctx context.Context, sessionID string, ) (store.SessionCreationIdentity, error)
GetSessionCreationIdentity loads one complete immutable identity witness.
func (*SessionRepo) GetSessionCreationProfile ¶
func (g *SessionRepo) GetSessionCreationProfile( ctx context.Context, profileRef string, ) (store.SessionCreationProfile, error)
GetSessionCreationProfile loads and verifies one immutable profile.
func (*SessionRepo) GetSessionInputQueueEntry ¶
func (g *SessionRepo) GetSessionInputQueueEntry( ctx context.Context, sessionID string, entryID string, ) (store.SessionInputQueueEntry, error)
GetSessionInputQueueEntry returns one exact queue entry for durable await/recovery.
func (*SessionRepo) GetSessionInputQueueEntryByID ¶
func (g *SessionRepo) GetSessionInputQueueEntryByID( ctx context.Context, entryID string, ) (store.SessionInputQueueEntry, error)
GetSessionInputQueueEntryByID returns one exact internal queue entry by its globally unique ID.
func (*SessionRepo) ListSessionHealthByIDs ¶
func (g *SessionRepo) ListSessionHealthByIDs( ctx context.Context, sessionIDs []string, ) ([]heartbeat.SessionHealth, error)
ListSessionHealthByIDs loads health for one bounded session catalog page in one query.
func (*SessionRepo) ListSessions ¶
func (g *SessionRepo) ListSessions( ctx context.Context, query store.SessionListQuery, ) (sessions []store.SessionInfo, err error)
ListSessions returns indexed sessions ordered by most recent update.
func (*SessionRepo) MarkSessionInputFailed ¶
func (g *SessionRepo) MarkSessionInputFailed( ctx context.Context, sessionID string, entryID string, summary string, now time.Time, ) error
MarkSessionInputFailed records a dispatch failure for one queue entry.
func (*SessionRepo) MarkSessionInputSent ¶
func (g *SessionRepo) MarkSessionInputSent( ctx context.Context, sessionID string, entryID string, now time.Time, ) error
MarkSessionInputSent records successful dispatch for one queue entry.
func (*SessionRepo) PageSessions ¶
func (g *SessionRepo) PageSessions( ctx context.Context, query store.SessionCatalogPageQuery, ) (page store.SessionCatalogPage, err error)
PageSessions returns one bounded durable-catalog page and a filter-scoped total.
func (*SessionRepo) PeekNextSessionInput ¶
func (g *SessionRepo) PeekNextSessionInput( ctx context.Context, sessionID string, ) (store.SessionInputQueueEntry, bool, error)
PeekNextSessionInput returns the oldest eligible human or managed row without claiming it.
func (*SessionRepo) PutSessionCreationProfile ¶
func (g *SessionRepo) PutSessionCreationProfile( ctx context.Context, profile store.SessionCreationProfile, ) (string, error)
PutSessionCreationProfile persists one immutable content-addressed profile.
func (*SessionRepo) ReconcileSessions ¶
func (g *SessionRepo) ReconcileSessions( ctx context.Context, sessions []store.SessionInfo, ) (store.ReconcileResult, error)
ReconcileSessions upserts on-disk sessions and marks missing ones as orphaned.
func (*SessionRepo) RegisterSession ¶
func (g *SessionRepo) RegisterSession(ctx context.Context, session store.SessionInfo) error
RegisterSession inserts or refreshes a session index row.
func (*SessionRepo) RegisterSessionWithCreationIdentity ¶
func (g *SessionRepo) RegisterSessionWithCreationIdentity( ctx context.Context, session store.SessionInfo, identity store.SessionCreationIdentity, ) (store.SessionCreationRegistration, error)
RegisterSessionWithCreationIdentity atomically creates or refreshes one identity-matched session.
func (*SessionRepo) ReleaseSessionInput ¶
func (g *SessionRepo) ReleaseSessionInput(ctx context.Context, sessionID string, entryID string, now time.Time) error
ReleaseSessionInput returns a leased entry to the queued state after a dispatch race.
func (*SessionRepo) SessionInputQueueSummary ¶
func (g *SessionRepo) SessionInputQueueSummary( ctx context.Context, sessionID string, ) (summary store.SessionInputQueueSummary, err error)
SessionInputQueueSummary returns the current generation and active pending counts for one session.
func (*SessionRepo) SessionTranscriptEpoch ¶
SessionTranscriptEpoch returns the durable transcript reset epoch for one session.
func (*SessionRepo) StageSessionSteer ¶
func (g *SessionRepo) StageSessionSteer( ctx context.Context, req store.SessionInputQueueInsert, ) (entry store.SessionInputQueueEntry, err error)
StageSessionSteer replaces any active staged steer entry for the session.
func (*SessionRepo) SweepExpiredSessionAttachLocks ¶
func (g *SessionRepo) SweepExpiredSessionAttachLocks(ctx context.Context, now time.Time) (int64, error)
SweepExpiredSessionAttachLocks clears expired attach leases from the session catalog.
func (*SessionRepo) UpdateSessionState ¶
func (g *SessionRepo) UpdateSessionState(ctx context.Context, update store.SessionStateUpdate) error
UpdateSessionState updates the mutable session state fields.
type SoulRepo ¶
type SoulRepo struct {
// contains filtered or unexported fields
}
func (*SoulRepo) AppendSoulRevision ¶
func (g *SoulRepo) AppendSoulRevision(ctx context.Context, revision soul.Revision) (soul.Revision, error)
AppendSoulRevision appends one managed authoring revision row.
func (*SoulRepo) DeleteSoulAgentHistory ¶
func (g *SoulRepo) DeleteSoulAgentHistory( ctx context.Context, workspaceID string, agentName string, sourcePath string, ) error
DeleteSoulAgentHistory removes revisions owned by one effective authored definition.
func (*SoulRepo) FindSoulRevisionForRollback ¶
func (g *SoulRepo) FindSoulRevisionForRollback( ctx context.Context, query soul.RollbackLookup, ) (soul.Revision, error)
FindSoulRevisionForRollback returns the revision body selected for a managed rollback.
func (*SoulRepo) FindSoulSnapshotByDigest ¶
func (g *SoulRepo) FindSoulSnapshotByDigest( ctx context.Context, workspaceID string, agentName string, digest string, ) (soul.Snapshot, bool, error)
FindSoulSnapshotByDigest returns the snapshot matching an agent digest.
func (*SoulRepo) GetSoulRevision ¶
GetSoulRevision returns a managed authoring revision by id.
func (*SoulRepo) GetSoulSnapshot ¶
GetSoulSnapshot returns a persisted Soul snapshot by id.
func (*SoulRepo) ListSoulRevisions ¶
func (g *SoulRepo) ListSoulRevisions( ctx context.Context, query soul.RevisionListQuery, ) (revisions []soul.Revision, err error)
ListSoulRevisions lists managed authoring revisions in newest-first order.
func (*SoulRepo) ListSoulSnapshots ¶
func (g *SoulRepo) ListSoulSnapshots( ctx context.Context, query soul.SnapshotListQuery, ) (snapshots []soul.Snapshot, err error)
ListSoulSnapshots lists persisted Soul snapshots in newest-first order.
func (*SoulRepo) UpdateSessionSoulSnapshot ¶
func (g *SoulRepo) UpdateSessionSoulSnapshot(ctx context.Context, update store.SessionSoulSnapshotUpdate) error
UpdateSessionSoulSnapshot updates only the Soul provenance fields on a session row.
type TaskRepo ¶
type TaskRepo struct {
// contains filtered or unexported fields
}
func (*TaskRepo) BlockTaskAndReleaseRun ¶
func (g *TaskRepo) BlockTaskAndReleaseRun( ctx context.Context, mutation taskpkg.BlockTaskAndReleaseRunMutation, ) (taskpkg.BlockTaskAndReleaseRunResult, error)
BlockTaskAndReleaseRun inserts a block, evaluates breaker accounting, and releases the active run atomically.
func (*TaskRepo) ClearTaskBlock ¶
func (g *TaskRepo) ClearTaskBlock( ctx context.Context, mutation taskpkg.ClearTaskBlockMutation, ) (taskpkg.TaskBlock, error)
ClearTaskBlock stamps one open block as cleared and rejects repeated clears as conflicts.
func (*TaskRepo) ClearTaskNeedsAttention ¶
func (g *TaskRepo) ClearTaskNeedsAttention( ctx context.Context, mutation taskpkg.NeedsAttentionClearMutation, ) (taskpkg.NeedsAttentionClearResult, error)
ClearTaskNeedsAttention clears escalation metadata and returns its exact co-committed recovery event.
func (*TaskRepo) CompleteCoordinatorAndEnqueueNext ¶
func (g *TaskRepo) CompleteCoordinatorAndEnqueueNext( ctx context.Context, completion taskpkg.CoordinatorCompletion, finalizer taskpkg.GenerationStateFinalizer, ) (taskpkg.CoordinatorCompletionResult, error)
CompleteCoordinatorAndEnqueueNext applies a coordinator plan in one BEGIN IMMEDIATE transaction.
func (*TaskRepo) CompleteRunSettlement ¶
func (g *TaskRepo) CompleteRunSettlement( ctx context.Context, run taskpkg.Run, actor taskpkg.ActorContext, ) (taskpkg.CompletedRunSettlement, error)
CompleteRunSettlement completes one unfenced run and atomically applies successful task-hierarchy aggregation.
func (*TaskRepo) CountActiveSessionBindings ¶
CountActiveSessionBindings reports how many non-terminal runs are bound to one session.
func (*TaskRepo) CountActiveTaskRunClaims ¶
CountActiveTaskRunClaims returns currently leased task runs.
func (*TaskRepo) CountDependencies ¶
CountDependencies reports how many dependency edges are stored for one task.
func (*TaskRepo) CountDirectChildren ¶
CountDirectChildren reports how many persisted tasks reference the supplied parent id.
func (*TaskRepo) CountEscalatingQueuedTaskRuns ¶
CountEscalatingQueuedTaskRuns counts active durable convergence episodes for claimable queued runs.
func (*TaskRepo) CountNeedsAttentionTaskRuns ¶
CountNeedsAttentionTaskRuns counts runs the convergence backstop escalated to needs_attention.
func (*TaskRepo) CountPausedTasks ¶
CountPausedTasks returns the number of directly paused tasks.
func (*TaskRepo) CountQueuedTaskRuns ¶
CountQueuedTaskRuns returns queued run pressure, optionally excluding paused tasks.
func (*TaskRepo) CreateDependency ¶
CreateDependency inserts one durable task-dependency edge under a single SQLite write lock.
func (*TaskRepo) CreateTask ¶
CreateTask inserts one durable task record.
func (*TaskRepo) CreateTaskBlock ¶
func (g *TaskRepo) CreateTaskBlock( ctx context.Context, mutation taskpkg.CreateTaskBlockMutation, ) (taskpkg.BlockMutationResult, error)
CreateTaskBlock inserts one task block, stamping workspace_id from the owning task.
func (*TaskRepo) CreateTaskDefinition ¶
func (g *TaskRepo) CreateTaskDefinition( ctx context.Context, mutation taskpkg.CreateTaskDefinitionMutation, ) error
CreateTaskDefinition commits the task row, optional profile, and causal events in one immediate transaction.
func (*TaskRepo) CreateTaskEvent ¶
CreateTaskEvent inserts one immutable task audit event.
func (*TaskRepo) CreateTaskRun ¶
func (*TaskRepo) DeleteDependency ¶
DeleteDependency removes one persisted dependency edge.
func (*TaskRepo) DeleteExecutionProfile ¶
DeleteExecutionProfile removes one profile and its selector rows.
func (*TaskRepo) DeleteTask ¶
DeleteTask removes one durable task record and any ON DELETE CASCADE children owned by the task tables.
func (*TaskRepo) DeleteTaskExecutionProfile ¶
func (g *TaskRepo) DeleteTaskExecutionProfile( ctx context.Context, mutation taskpkg.ExecutionProfileDeleteMutation, ) error
DeleteTaskExecutionProfile commits a profile deletion and its event.
func (*TaskRepo) ExpireTaskBlocks ¶
func (g *TaskRepo) ExpireTaskBlocks( ctx context.Context, mutation taskpkg.ExpireTaskBlocksMutation, ) (taskpkg.ExpireTaskBlocksResult, error)
ExpireTaskBlocks finalizes expired transient blocks as daemon-cleared rows, grouped one transaction per task.
func (*TaskRepo) GetExecutionProfile ¶
func (g *TaskRepo) GetExecutionProfile( ctx context.Context, taskID string, ) (taskpkg.ExecutionProfile, error)
GetExecutionProfile returns the persisted typed execution profile for one task.
func (*TaskRepo) GetSchedulerPause ¶
GetSchedulerPause returns the singleton scheduler pause state.
func (*TaskRepo) GetSchedulerPauseState ¶
func (g *TaskRepo) GetSchedulerPauseState(ctx context.Context) (taskpkg.InspectSchedulerState, error)
GetSchedulerPauseState returns the singleton scheduler pause state for inspect diagnostics.
func (*TaskRepo) GetTaskBlock ¶
func (g *TaskRepo) GetTaskBlock(ctx context.Context, taskID string, blockID string) (taskpkg.TaskBlock, error)
GetTaskBlock returns one task block when it belongs to the supplied task.
func (*TaskRepo) GetTaskBlockRecurrence ¶
func (g *TaskRepo) GetTaskBlockRecurrence( ctx context.Context, taskID string, kind taskpkg.BlockKind, ) (taskpkg.BlockRecurrence, error)
GetTaskBlockRecurrence returns the counter for one task and block kind, or a zero counter when absent.
func (*TaskRepo) GetTaskEventRecord ¶
func (g *TaskRepo) GetTaskEventRecord(ctx context.Context, eventID string) (taskpkg.EventRecord, error)
GetTaskEventRecord returns one persisted task event plus its stable row sequence.
func (*TaskRepo) GetTaskRun ¶
GetTaskRun returns one persisted task run by primary key.
func (*TaskRepo) GetTaskRunByIdempotencyKey ¶
func (g *TaskRepo) GetTaskRunByIdempotencyKey( ctx context.Context, key string, origin taskpkg.Origin, ) (taskpkg.Run, error)
GetTaskRunByIdempotencyKey returns the original persisted run bound to one origin-scoped idempotency key.
func (*TaskRepo) GetTaskTriageState ¶
func (g *TaskRepo) GetTaskTriageState( ctx context.Context, taskID string, actor taskpkg.ActorIdentity, ) (taskpkg.TriageState, error)
GetTaskTriageState returns the durable actor-scoped triage state for one task.
func (*TaskRepo) HasDependencyPath ¶
func (g *TaskRepo) HasDependencyPath(ctx context.Context, fromTaskID string, toTaskID string) (bool, error)
HasDependencyPath reports whether the dependency graph already contains a path from one task to another.
func (*TaskRepo) HasOpenTaskBlocks ¶
HasOpenTaskBlocks returns whether a task currently has any open, non-expired block.
func (*TaskRepo) IncrementTaskBlockRecurrence ¶
func (g *TaskRepo) IncrementTaskBlockRecurrence( ctx context.Context, taskID string, kind taskpkg.BlockKind, updatedAt time.Time, ) (taskpkg.BlockRecurrence, error)
IncrementTaskBlockRecurrence increments and returns the counter for one task and block kind.
func (*TaskRepo) IsTaskEffectivelyPaused ¶
func (g *TaskRepo) IsTaskEffectivelyPaused(ctx context.Context, taskID string) (bool, string, error)
IsTaskEffectivelyPaused reports whether a task or one of its ancestors is paused.
func (*TaskRepo) ListDependencies ¶
func (g *TaskRepo) ListDependencies(ctx context.Context, taskID string) ([]taskpkg.Dependency, error)
ListDependencies returns the persisted dependency edges for one task.
func (*TaskRepo) ListDependents ¶
func (g *TaskRepo) ListDependents(ctx context.Context, dependsOnTaskID string) ([]taskpkg.Dependency, error)
ListDependents returns persisted dependency edges that point at one task.
func (*TaskRepo) ListTaskBlocks ¶
func (g *TaskRepo) ListTaskBlocks( ctx context.Context, taskID string, includeCleared bool, ) ([]taskpkg.TaskBlock, error)
ListTaskBlocks returns task blocks for one task, open-only by default.
func (*TaskRepo) ListTaskCatalog ¶
func (g *TaskRepo) ListTaskCatalog( ctx context.Context, query taskpkg.CatalogQuery, ) (page taskpkg.CatalogPage, err error)
ListTaskCatalog returns one transactionally consistent task catalog page.
func (*TaskRepo) ListTaskEventRecords ¶
func (g *TaskRepo) ListTaskEventRecords( ctx context.Context, query taskpkg.EventRecordQuery, ) ([]taskpkg.EventRecord, error)
ListTaskEventRecords returns persisted task events ordered by stable sequence for live replay.
func (*TaskRepo) ListTaskEvents ¶
func (g *TaskRepo) ListTaskEvents(ctx context.Context, query taskpkg.EventQuery) ([]taskpkg.Event, error)
ListTaskEvents returns persisted audit events that match the supplied filters.
func (*TaskRepo) ListTaskInbox ¶
func (g *TaskRepo) ListTaskInbox( ctx context.Context, query taskpkg.InboxQuery, actor taskpkg.ActorIdentity, ) (page taskpkg.InboxPage, err error)
ListTaskInbox returns one transactionally consistent actor-scoped inbox page.
func (*TaskRepo) ListTaskRuns ¶
func (g *TaskRepo) ListTaskRuns( ctx context.Context, query taskpkg.RunQuery, ) ([]taskpkg.Run, error)
ListTaskRuns returns persisted runs that match the supplied filters.
func (*TaskRepo) ListTaskRunsByStatus ¶
func (g *TaskRepo) ListTaskRunsByStatus( ctx context.Context, statuses []taskpkg.RunStatus, ) ([]taskpkg.Run, error)
ListTaskRunsByStatus returns persisted runs that match any of the supplied statuses.
func (*TaskRepo) ListTaskTriageStates ¶
func (g *TaskRepo) ListTaskTriageStates( ctx context.Context, actor taskpkg.ActorIdentity, ) ([]taskpkg.TriageState, error)
ListTaskTriageStates returns all durable triage states persisted for one actor.
func (*TaskRepo) ListTasks ¶
func (g *TaskRepo) ListTasks( ctx context.Context, query taskpkg.Query, ) (summaries []taskpkg.Summary, err error)
ListTasks returns durable task summaries that match the supplied filters.
func (*TaskRepo) MarkTaskNeedsAttention ¶
func (g *TaskRepo) MarkTaskNeedsAttention( ctx context.Context, mutation taskpkg.NeedsAttentionMutation, ) (taskpkg.Task, error)
MarkTaskNeedsAttention writes the task-level escalation metadata columns.
func (*TaskRepo) PauseTask ¶
func (g *TaskRepo) PauseTask(ctx context.Context, mutation taskpkg.PauseMutation) (taskpkg.Task, error)
PauseTask marks one task as paused for future claim eligibility.
func (*TaskRepo) ReserveQueuedRun ¶
func (g *TaskRepo) ReserveQueuedRun( ctx context.Context, reservation taskpkg.QueueRunReservation, ) (taskpkg.Task, taskpkg.Run, bool, error)
ReserveQueuedRun atomically allocates one queued run attempt and optional idempotency binding.
func (*TaskRepo) ResetTaskBlockRecurrences ¶
ResetTaskBlockRecurrences clears all breaker counters for one task.
func (*TaskRepo) ResumeTask ¶
func (g *TaskRepo) ResumeTask(ctx context.Context, mutation taskpkg.ResumeMutation) (taskpkg.Task, error)
ResumeTask clears one task pause for future claim eligibility.
func (*TaskRepo) SaveTaskRunIdempotency ¶
SaveTaskRunIdempotency inserts one origin-scoped idempotency binding for a persisted run.
func (*TaskRepo) SchedulerBacklog ¶
func (g *TaskRepo) SchedulerBacklog( ctx context.Context, query taskpkg.SchedulerBacklogQuery, ) (backlog taskpkg.SchedulerBacklog, err error)
SchedulerBacklog returns queued task runs ordered by scheduler priority.
func (*TaskRepo) SetSchedulerPaused ¶
func (g *TaskRepo) SetSchedulerPaused( ctx context.Context, actor string, reason string, ) (taskpkg.SchedulerPauseState, error)
SetSchedulerPaused marks the scheduler-wide pause singleton as paused.
func (*TaskRepo) SetSchedulerResumed ¶
SetSchedulerResumed clears the scheduler-wide pause singleton.
func (*TaskRepo) SetTaskEventCommitObserver ¶
func (g *TaskRepo) SetTaskEventCommitObserver(observer taskpkg.EventObserver)
SetTaskEventCommitObserver installs the single task service that owns live fanout for this database.
func (*TaskRepo) SetTaskExecutionProfile ¶
func (g *TaskRepo) SetTaskExecutionProfile( ctx context.Context, mutation *taskpkg.ExecutionProfileMutation, ) (stored taskpkg.ExecutionProfile, err error)
SetTaskExecutionProfile commits a profile replacement and its event.
func (*TaskRepo) SetTaskWakeCreator ¶
func (g *TaskRepo) SetTaskWakeCreator( ctx context.Context, mutation taskpkg.WakeCreatorMutation, ) (taskpkg.Task, error)
SetTaskWakeCreator writes the per-task creator wake opt-in flag.
func (*TaskRepo) TaskWakeEventExists ¶
func (g *TaskRepo) TaskWakeEventExists( ctx context.Context, taskID string, wakeEventID string, ) (bool, error)
TaskWakeEventExists reports whether the task ledger already contains a delivered or suppressed wake identity.
func (*TaskRepo) UpdateTask ¶
func (g *TaskRepo) UpdateTask(ctx context.Context, record taskpkg.Task, actor taskpkg.ActorContext) error
UpdateTask replaces the persisted canonical task record.
func (*TaskRepo) UpdateTaskDefinition ¶
func (g *TaskRepo) UpdateTaskDefinition( ctx context.Context, mutation *taskpkg.UpdateTaskDefinitionMutation, ) (stored taskpkg.ExecutionProfile, err error)
UpdateTaskDefinition commits task-row/profile changes and causal events in one immediate transaction.
func (*TaskRepo) UpdateTaskRun ¶
UpdateTaskRun replaces the persisted canonical task-run record.
func (*TaskRepo) UpsertExecutionProfile ¶
func (g *TaskRepo) UpsertExecutionProfile( ctx context.Context, profile *taskpkg.ExecutionProfile, ) (stored taskpkg.ExecutionProfile, err error)
UpsertExecutionProfile replaces one task-owned execution profile and its selectors atomically.
func (*TaskRepo) UpsertTaskBlockRecurrence ¶
func (g *TaskRepo) UpsertTaskBlockRecurrence( ctx context.Context, recurrence taskpkg.BlockRecurrence, ) (taskpkg.BlockRecurrence, error)
UpsertTaskBlockRecurrence sets the persisted counter for one task and block kind.
func (*TaskRepo) UpsertTaskTriageState ¶
UpsertTaskTriageState inserts or replaces one durable actor-scoped triage state.
func (*TaskRepo) WithDeleteTaskTransaction ¶
func (g *TaskRepo) WithDeleteTaskTransaction( ctx context.Context, fn func(taskpkg.DeleteTaskMutationStore) error, ) error
WithDeleteTaskTransaction executes one delete-task mutation flow inside a single immediate transaction so reconciliation failures can roll back the primary delete.
func (*TaskRepo) WithTaskExecutionTransaction ¶
func (g *TaskRepo) WithTaskExecutionTransaction( ctx context.Context, fn func(taskpkg.ExecutionMutationStore) error, ) error
WithTaskExecutionTransaction runs one Task execution command under the repository's immediate writer transaction.
type TaskRunRepo ¶
type TaskRunRepo struct {
// contains filtered or unexported fields
}
func (*TaskRunRepo) BindRunReviewSession ¶
func (g *TaskRunRepo) BindRunReviewSession( ctx context.Context, req taskpkg.BindRunReviewSessionRequest, boundAt time.Time, ) (stored taskpkg.RunReview, err error)
BindRunReviewSession binds an active review request to a reviewer session.
func (*TaskRunRepo) ClaimNextRun ¶
func (g *TaskRunRepo) ClaimNextRun( ctx context.Context, criteria taskpkg.ClaimCriteria, ) (taskpkg.ClaimResult, error)
ClaimNextRun atomically selects and claims the next eligible queued task run.
func (*TaskRunRepo) ClearRunStarvation ¶
func (g *TaskRunRepo) ClearRunStarvation(ctx context.Context, runID string) error
ClearRunStarvation removes a run's escalation budget once it leaves the starved set.
func (*TaskRunRepo) CompleteRunLease ¶
func (g *TaskRunRepo) CompleteRunLease( ctx context.Context, completion taskpkg.LeaseCompletion, ) (taskpkg.Run, error)
func (*TaskRunRepo) CompleteRunLeaseSettlement ¶
func (g *TaskRunRepo) CompleteRunLeaseSettlement( ctx context.Context, completion taskpkg.LeaseCompletion, ) (taskpkg.CompletedRunSettlement, error)
CompleteRunLeaseSettlement completes one fenced run and atomically applies successful task-hierarchy aggregation.
func (*TaskRunRepo) FailRunLease ¶
func (g *TaskRunRepo) FailRunLease( ctx context.Context, failure taskpkg.LeaseFailure, ) (taskpkg.Run, error)
func (*TaskRunRepo) ForceFailTaskRun ¶
func (g *TaskRunRepo) ForceFailTaskRun( ctx context.Context, failure taskpkg.ForceFailRunMutation, ) (taskpkg.ForceRunMutationResult, error)
ForceFailTaskRun marks one queued or claimed run as operator-forced failed with snapshot fencing.
func (*TaskRunRepo) ForceReleaseTaskRun ¶
func (g *TaskRunRepo) ForceReleaseTaskRun( ctx context.Context, release taskpkg.ForceReleaseRunMutation, ) (taskpkg.ForceRunMutationResult, error)
ForceReleaseTaskRun requeues one claimed run with snapshot fencing.
func (*TaskRunRepo) GetRunReview ¶
GetRunReview returns one persisted run review by id.
func (*TaskRunRepo) HeartbeatRunLease ¶
func (g *TaskRunRepo) HeartbeatRunLease( ctx context.Context, heartbeat taskpkg.LeaseHeartbeat, ) (taskpkg.Run, error)
HeartbeatRunLease extends one active task-run lease after token verification.
func (*TaskRunRepo) ListAutonomyLeaseHandles ¶
func (g *TaskRunRepo) ListAutonomyLeaseHandles( ctx context.Context, sessionID string, ) (handles []taskpkg.AutonomyLeaseHandle, err error)
ListAutonomyLeaseHandles returns internal-only lease handles for one session. Public task-run read projections keep claim_token masked.
func (*TaskRunRepo) ListRunReviews ¶
func (g *TaskRunRepo) ListRunReviews( ctx context.Context, query taskpkg.RunReviewQuery, ) ([]taskpkg.RunReview, error)
ListRunReviews returns persisted run reviews that match the supplied filters.
func (*TaskRunRepo) ListRunStarvation ¶
func (g *TaskRunRepo) ListRunStarvation(ctx context.Context) ([]taskpkg.RunStarvation, error)
ListRunStarvation returns every escalation budget row so the convergence backstop can reconcile rows whose run has left the queued set.
func (*TaskRunRepo) LoadRunStarvation ¶
func (g *TaskRunRepo) LoadRunStarvation( ctx context.Context, runID string, ) (taskpkg.RunStarvation, bool, error)
LoadRunStarvation reads a run's durable escalation budget. The bool reports row presence; absence is not an error — the convergence backstop treats it as a fresh budget.
func (*TaskRunRepo) LookupRunReviewBySession ¶
func (g *TaskRunRepo) LookupRunReviewBySession(ctx context.Context, sessionID string) (taskpkg.RunReview, error)
LookupRunReviewBySession returns the active run review bound to one reviewer session.
func (*TaskRunRepo) MarkTaskRunNeedsAttention ¶
func (g *TaskRunRepo) MarkTaskRunNeedsAttention( ctx context.Context, runID string, diagnostic string, ) (taskpkg.Run, error)
MarkTaskRunNeedsAttention transitions one nonterminal run to needs_attention via a status CAS.
func (*TaskRunRepo) RecordRunReview ¶
func (g *TaskRunRepo) RecordRunReview( ctx context.Context, req taskpkg.RecordRunReviewRequest, actor taskpkg.ActorContext, recordedAt time.Time, continuationRunID string, ) (result taskpkg.RunReviewResult, err error)
RecordRunReview persists one authoritative review verdict and optional continuation run.
func (*TaskRunRepo) RecoverExpiredRunLeases ¶
func (g *TaskRunRepo) RecoverExpiredRunLeases( ctx context.Context, recovery taskpkg.ExpiredLeaseRecovery, ) ([]taskpkg.ExpiredLeaseRecoveryResult, error)
RecoverExpiredRunLeases requeues stale active leases without issuing new ownership.
func (*TaskRunRepo) RecoverTaskRun ¶
func (g *TaskRunRepo) RecoverTaskRun( ctx context.Context, mutation taskpkg.RecoverRunMutation, ) (taskpkg.RetryRunResult, error)
RecoverTaskRun terminalizes a needs_attention run as failed and queues one fresh child in the same transaction, so the source leaves the open-run set before the requeue reservation.
func (*TaskRunRepo) ReleaseRunLease ¶
func (g *TaskRunRepo) ReleaseRunLease( ctx context.Context, release taskpkg.LeaseRelease, ) (taskpkg.Run, error)
ReleaseRunLease clears an active task-run lease after token verification and requeues the run.
func (*TaskRunRepo) RequestRunReview ¶
func (g *TaskRunRepo) RequestRunReview( ctx context.Context, review *taskpkg.RunReview, ) (stored taskpkg.RunReview, created bool, err error)
RequestRunReview persists one review request or returns the existing idempotent request.
func (*TaskRunRepo) RetryTaskRun ¶
func (g *TaskRunRepo) RetryTaskRun( ctx context.Context, retry taskpkg.RetryRunMutation, ) (taskpkg.RetryRunResult, error)
RetryTaskRun creates one queued retry run linked to a failed source run.
func (*TaskRunRepo) SettleNetworkWake ¶
func (g *TaskRunRepo) SettleNetworkWake( ctx context.Context, settlement taskpkg.NetworkWakeSettlement, ) (taskpkg.NetworkWakeSettlementResult, error)
SettleNetworkWake atomically applies one token-fenced Task and Network terminal outcome.
func (*TaskRunRepo) UpsertRunStarvation ¶
func (g *TaskRunRepo) UpsertRunStarvation( ctx context.Context, mutation taskpkg.RunStarvationMutation, ) (taskpkg.RunStarvation, error)
UpsertRunStarvation writes the run's escalation budget, advancing it in place on conflict.
type ToolRuntimeRepo ¶
type ToolRuntimeRepo struct {
// contains filtered or unexported fields
}
func (*ToolRuntimeRepo) ListProcessRecords ¶
func (g *ToolRuntimeRepo) ListProcessRecords( ctx context.Context, query toolruntime.ProcessQuery, ) (records []toolruntime.ProcessRecord, err error)
ListProcessRecords returns process records matching the query.
func (*ToolRuntimeRepo) UpdateProcessRecordState ¶
func (g *ToolRuntimeRepo) UpdateProcessRecordState(ctx context.Context, update toolruntime.ProcessStateUpdate) error
UpdateProcessRecordState mutates lifecycle fields for one process record.
func (*ToolRuntimeRepo) UpsertProcessRecord ¶
func (g *ToolRuntimeRepo) UpsertProcessRecord(ctx context.Context, record toolruntime.ProcessRecord) error
UpsertProcessRecord writes one durable process checkpoint.
type VaultRepo ¶
type VaultRepo struct {
// contains filtered or unexported fields
}
func (*VaultRepo) DeleteMCPAuthToken ¶
DeleteMCPAuthToken removes persisted token state for one server.
func (*VaultRepo) DeleteVaultSecret ¶
DeleteVaultSecret removes one encrypted vault secret record.
func (*VaultRepo) GetMCPAuthToken ¶
func (g *VaultRepo) GetMCPAuthToken(ctx context.Context, target mcpauth.Target) (mcpauth.TokenRecord, error)
GetMCPAuthToken returns one persisted token record.
func (*VaultRepo) GetVaultSecret ¶
GetVaultSecret returns one encrypted vault secret record.
func (*VaultRepo) ListMCPAuthTokens ¶
ListMCPAuthTokens returns all persisted token records.
func (*VaultRepo) ListVaultSecrets ¶
func (g *VaultRepo) ListVaultSecrets(ctx context.Context, prefix string) (_ []vault.Record, err error)
ListVaultSecrets returns encrypted vault secret records filtered by ref prefix.
func (*VaultRepo) PutVaultSecret ¶
PutVaultSecret stores one encrypted vault secret record.
func (*VaultRepo) SaveMCPAuthToken ¶
SaveMCPAuthToken persists one remote MCP OAuth token record.
type WatchEventsRepo ¶
type WatchEventsRepo struct {
// contains filtered or unexported fields
}
func (*WatchEventsRepo) ListParkedWatchEventSubscriptions ¶
func (g *WatchEventsRepo) ListParkedWatchEventSubscriptions( ctx context.Context, ) ([]looppkg.ParkedWatchEventSubscription, error)
ListParkedWatchEventSubscriptions rebuilds the in-memory daemon index from durable watch-events pending output refs.
func (*WatchEventsRepo) ListParkedWatchEventSubscriptionsForLoopRun ¶
func (g *WatchEventsRepo) ListParkedWatchEventSubscriptionsForLoopRun( ctx context.Context, loopRunID string, ) ([]looppkg.ParkedWatchEventSubscription, error)
ListParkedWatchEventSubscriptionsForLoopRun returns the current parked subscriptions for one loop run without rebuilding the global index.
func (*WatchEventsRepo) ListParkedWatchEventSubscriptionsPage ¶
func (g *WatchEventsRepo) ListParkedWatchEventSubscriptionsPage( ctx context.Context, cursor looppkg.ParkedWatchEventScanCursor, limit int, ) ([]looppkg.ParkedWatchEventSubscription, error)
ListParkedWatchEventSubscriptionsPage returns one bounded recovery page strictly after cursor in the same order as the full parked index.
func (*WatchEventsRepo) ReadCursors ¶
func (g *WatchEventsRepo) ReadCursors( ctx context.Context, query looppkg.WatchEventsQuery, ) (map[string]int64, error)
ReadCursors returns the current max replay cursor for each requested stream.
func (*WatchEventsRepo) ReadMatches ¶
func (g *WatchEventsRepo) ReadMatches( ctx context.Context, query looppkg.WatchEventsQuery, ) ([]looppkg.WatchEvent, error)
ReadMatches returns replay rows strictly after each stream cursor.
type WorkspaceRepo ¶
type WorkspaceRepo struct {
// contains filtered or unexported fields
}
func (*WorkspaceRepo) DeleteWorkspace ¶
func (g *WorkspaceRepo) DeleteWorkspace(ctx context.Context, id string) error
DeleteWorkspace removes a persisted workspace registration row. It refuses to delete if any active sessions reference the workspace. Stopped or orphaned sessions are cleaned up automatically before deletion.
func (*WorkspaceRepo) DismissInvitation ¶
func (g *WorkspaceRepo) DismissInvitation( ctx context.Context, workspaceID string, scopeKind string, scopeID string, actor string, ) (invitation workspacepkg.CoordinationInvitation, err error)
DismissInvitation upserts a dismissal row for the scope.
func (*WorkspaceRepo) Get ¶
func (g *WorkspaceRepo) Get( ctx context.Context, workspaceID string, ) (workspacepkg.CoordinationSetting, error)
Get returns the workspace coordination setting. An absent record is the explicit disabled default and has revision zero.
func (*WorkspaceRepo) GetCoordination ¶
func (g *WorkspaceRepo) GetCoordination( ctx context.Context, ref workspacepkg.CoordinationRef, ) (workspacepkg.CoordinationView, error)
GetCoordination returns one explicit coordination view from persisted daemon truth.
func (*WorkspaceRepo) GetInvitation ¶
func (g *WorkspaceRepo) GetInvitation( ctx context.Context, workspaceID string, scopeKind string, scopeID string, ) (workspacepkg.CoordinationInvitation, error)
GetInvitation returns one persisted dismissal. Absent rows are explicit not-dismissed.
func (*WorkspaceRepo) GetWorkspace ¶
func (g *WorkspaceRepo) GetWorkspace(ctx context.Context, id string) (compozyworkspace.Workspace, error)
GetWorkspace loads a workspace registration by primary key.
func (*WorkspaceRepo) GetWorkspaceByName ¶
func (g *WorkspaceRepo) GetWorkspaceByName(ctx context.Context, name string) (compozyworkspace.Workspace, error)
GetWorkspaceByName loads a workspace registration by unique workspace name.
func (*WorkspaceRepo) GetWorkspaceByPath ¶
func (g *WorkspaceRepo) GetWorkspaceByPath(ctx context.Context, rootDir string) (compozyworkspace.Workspace, error)
GetWorkspaceByPath loads a workspace registration by canonical root directory.
func (*WorkspaceRepo) InsertWorkspace ¶
func (g *WorkspaceRepo) InsertWorkspace(ctx context.Context, ws compozyworkspace.Workspace) error
InsertWorkspace creates a new persisted workspace registration row.
func (*WorkspaceRepo) ListWorkspaces ¶
func (g *WorkspaceRepo) ListWorkspaces(ctx context.Context) ([]compozyworkspace.Workspace, error)
ListWorkspaces returns all registered workspaces in stable name order.
func (*WorkspaceRepo) ResetInvitation ¶
func (g *WorkspaceRepo) ResetInvitation( ctx context.Context, workspaceID string, scopeKind string, scopeID string, ) error
ResetInvitation deletes the dismissal row so the invitation may appear again.
func (*WorkspaceRepo) SetCoordination ¶
func (g *WorkspaceRepo) SetCoordination( ctx context.Context, cmd workspacepkg.SetCoordination, actor taskpkg.ActorContext, ) (view workspacepkg.CoordinationView, err error)
SetCoordination commits the scoped CAS, future Task intent, and canonical events atomically.
func (*WorkspaceRepo) SetCoordinationInvitation ¶
func (g *WorkspaceRepo) SetCoordinationInvitation( ctx context.Context, cmd workspacepkg.SetInvitation, actor taskpkg.ActorContext, ) (view workspacepkg.CoordinationView, err error)
SetCoordinationInvitation commits the invitation mutation, revision, provenance, and event atomically.
func (*WorkspaceRepo) UpdateWorkspace ¶
func (g *WorkspaceRepo) UpdateWorkspace(ctx context.Context, ws compozyworkspace.Workspace) error
UpdateWorkspace updates an existing persisted workspace registration row.
Source Files
¶
- automation_loop_target_record.go
- automation_record_helpers.go
- automation_record_normalize.go
- automation_scan.go
- automation_sqlc_mapping.go
- bridge_sqlc_mapping.go
- column_names.go
- global_db.go
- global_db_agent_history.go
- global_db_app_metadata.go
- global_db_automation.go
- global_db_automation_catalog_projection.go
- global_db_automation_catalog_types.go
- global_db_automation_definition_list.go
- global_db_automation_definitions.go
- global_db_automation_job_catalog.go
- global_db_automation_list.go
- global_db_automation_normalize.go
- global_db_automation_scheduler.go
- global_db_automation_suggestions.go
- global_db_automation_trigger_catalog.go
- global_db_bridge.go
- global_db_bridge_bindings_routes.go
- global_db_bridge_catalog.go
- global_db_bridge_catalog_records.go
- global_db_bridge_dedup_subscriptions.go
- global_db_bridge_delivery.go
- global_db_bridge_delivery_metrics.go
- global_db_bridge_delivery_metrics_scan.go
- global_db_bridge_delivery_scan.go
- global_db_bridge_list.go
- global_db_bridge_scan.go
- global_db_bridge_targets.go
- global_db_bundles.go
- global_db_constants.go
- global_db_dead_entity.go
- global_db_goal_binding_cleanup.go
- global_db_goal_binding_helpers.go
- global_db_goal_binding_retry.go
- global_db_goal_binding_transitions.go
- global_db_goal_binding_validation.go
- global_db_goal_bindings.go
- global_db_goal_budget.go
- global_db_goal_checkpoint.go
- global_db_goal_checkpoint_control.go
- global_db_goal_checkpoint_control_validation.go
- global_db_goal_checkpoint_intents.go
- global_db_goal_checkpoint_scan.go
- global_db_goal_checkpoint_values.go
- global_db_goal_common.go
- global_db_goal_compaction_complete.go
- global_db_goal_constants.go
- global_db_goal_context_usage.go
- global_db_goal_events.go
- global_db_goal_judge_ambiguous.go
- global_db_goal_judge_helpers.go
- global_db_goal_judges.go
- global_db_goal_outbox.go
- global_db_goal_outbox_projection.go
- global_db_goal_projection_reader.go
- global_db_goal_prompt_ambiguous.go
- global_db_goal_prompt_claim.go
- global_db_goal_prompt_claim_helpers.go
- global_db_goal_prompt_common.go
- global_db_goal_prompt_fence.go
- global_db_goal_prompt_owner.go
- global_db_goal_prompt_prepare.go
- global_db_goal_prompt_recovery.go
- global_db_goal_prompt_reject.go
- global_db_goal_prompt_revoke.go
- global_db_goal_prompt_revoke_control.go
- global_db_goal_prompt_revoke_evidence.go
- global_db_goal_prompt_terminal.go
- global_db_goal_reentry.go
- global_db_goal_reentry_helpers.go
- global_db_goal_session_cleanup.go
- global_db_goal_stop.go
- global_db_goal_stop_checkpoints.go
- global_db_goal_tools.go
- global_db_goal_turn_complete.go
- global_db_goal_turn_complete_helpers.go
- global_db_goal_turn_reader.go
- global_db_heartbeat.go
- global_db_heartbeat_health.go
- global_db_heartbeat_scan.go
- global_db_heartbeat_wake.go
- global_db_loop.go
- global_db_loop_api.go
- global_db_loop_catalog.go
- global_db_loop_config.go
- global_db_loop_coordinator_seed.go
- global_db_loop_event_boundaries.go
- global_db_loop_event_nodes.go
- global_db_loop_event_payload.go
- global_db_loop_events.go
- global_db_loop_inline.go
- global_db_loop_node_output.go
- global_db_loop_normalize.go
- global_db_loop_outputs.go
- global_db_loop_pause.go
- global_db_loop_pinning.go
- global_db_loop_reconcile.go
- global_db_loop_reconcile_queries.go
- global_db_loop_scan.go
- global_db_loop_scan_control.go
- global_db_loop_transition.go
- global_db_loop_watch_events_reconcile.go
- global_db_marketplace.go
- global_db_marketplace_extension.go
- global_db_marketplace_skill.go
- global_db_mcp_auth.go
- global_db_model_catalog.go
- global_db_model_catalog_helpers.go
- global_db_model_catalog_persistence.go
- global_db_network_accept.go
- global_db_network_admission.go
- global_db_network_admission_queries.go
- global_db_network_audit.go
- global_db_network_availability.go
- global_db_network_availability_event.go
- global_db_network_channel_projection_write.go
- global_db_network_channel_projections.go
- global_db_network_channels.go
- global_db_network_conversation_cursor_anchor.go
- global_db_network_conversation_list_query.go
- global_db_network_conversation_pages.go
- global_db_network_conversation_query.go
- global_db_network_conversation_summary.go
- global_db_network_conversation_write.go
- global_db_network_conversations.go
- global_db_network_coordination_commands.go
- global_db_network_coordination_events.go
- global_db_network_coordination_invitations.go
- global_db_network_coordination_persistence.go
- global_db_network_coordination_view.go
- global_db_network_dispositions.go
- global_db_network_inbox.go
- global_db_network_messages.go
- global_db_network_preferences.go
- global_db_network_recents.go
- global_db_network_settlement.go
- global_db_network_task_status.go
- global_db_network_token_stats.go
- global_db_network_usage.go
- global_db_network_wake_events.go
- global_db_network_wake_queue.go
- global_db_network_work_mutation.go
- global_db_network_work_projection.go
- global_db_notification_cursor.go
- global_db_notification_preset.go
- global_db_observe.go
- global_db_observe_overview.go
- global_db_observe_retention_tokens.go
- global_db_observe_token_usage.go
- global_db_options.go
- global_db_permission.go
- global_db_scheduler_pause.go
- global_db_session.go
- global_db_session_agent_metrics.go
- global_db_session_creation_identity.go
- global_db_session_creation_profiles.go
- global_db_session_delete.go
- global_db_session_epoch.go
- global_db_session_health_batch.go
- global_db_session_helpers.go
- global_db_session_ids.go
- global_db_session_input_queue.go
- global_db_session_input_queue_get.go
- global_db_session_input_queue_scan.go
- global_db_session_input_queue_terminal.go
- global_db_session_page.go
- global_db_session_scan.go
- global_db_soul.go
- global_db_task.go
- global_db_task_attention_clear.go
- global_db_task_aux.go
- global_db_task_aux_helpers.go
- global_db_task_aux_normalize.go
- global_db_task_block_events.go
- global_db_task_blocks.go
- global_db_task_blocks_codec.go
- global_db_task_blocks_persistence.go
- global_db_task_catalog.go
- global_db_task_catalog_scan.go
- global_db_task_catalog_sql.go
- global_db_task_claim.go
- global_db_task_claim_complete.go
- global_db_task_claim_dependencies.go
- global_db_task_claim_helpers.go
- global_db_task_claim_lease.go
- global_db_task_claim_metadata.go
- global_db_task_claim_select.go
- global_db_task_coordinator.go
- global_db_task_coordinator_boundaries.go
- global_db_task_coordinator_budget.go
- global_db_task_coordinator_failure.go
- global_db_task_coordinator_mutations.go
- global_db_task_coordinator_runtime.go
- global_db_task_coordinator_settlement.go
- global_db_task_definition_commands.go
- global_db_task_delete_tx.go
- global_db_task_event_tx.go
- global_db_task_events.go
- global_db_task_execution_tx.go
- global_db_task_force.go
- global_db_task_force_helpers.go
- global_db_task_helpers.go
- global_db_task_inbox.go
- global_db_task_inbox_scan.go
- global_db_task_inbox_sql.go
- global_db_task_insert.go
- global_db_task_lease_recovery.go
- global_db_task_normalize.go
- global_db_task_observer.go
- global_db_task_parent_rollup.go
- global_db_task_pause.go
- global_db_task_profile.go
- global_db_task_projection.go
- global_db_task_reservation.go
- global_db_task_review.go
- global_db_task_review_helpers.go
- global_db_task_review_record.go
- global_db_task_run_scan.go
- global_db_task_runs.go
- global_db_task_scan.go
- global_db_task_scheduler_status.go
- global_db_task_starvation.go
- global_db_task_status.go
- global_db_task_transaction.go
- global_db_task_watch_event_payloads.go
- global_db_tool_approval_grants.go
- global_db_toolruntime.go
- global_db_type.go
- global_db_vault.go
- global_db_vault_service.go
- global_db_watch_events.go
- global_db_watch_events_automation.go
- global_db_watch_events_index.go
- global_db_watch_events_loop.go
- global_db_watch_events_network.go
- global_db_watch_events_network_projection.go
- global_db_watch_events_observe.go
- global_db_watch_events_session.go
- global_db_workspace.go
- global_db_workspace_coordination.go
- goal_binding_sqlc_mapping.go
- goal_checkpoint_sqlc_mapping.go
- goal_judge_sqlc_mapping.go
- goal_runtime_mapping.go
- goal_sqlc_mapping.go
- heartbeat_sqlc_mapping.go
- loop_sqlc_mapping.go
- migration_stream.go
- network_conversation_mapping.go
- network_preferences_mapping.go
- notification_cursor_mapping.go
- notification_preset_mapping.go
- notification_repo.go
- participation_mapping.go
- repositories.go
- session_core_mapping.go
- soul_sqlc_mapping.go
- sqlite_constraints.go
- task_aux_mapping.go
- task_blocks_mapping.go
- task_core_mapping.go
- task_force_mapping.go
- task_profile_mapping.go
- task_review_mapping.go
- tx_helpers.go