Documentation
¶
Index ¶
- type GlobalDB
- func (g *GlobalDB) AdvanceCursor(ctx context.Context, update notifications.AdvanceCursor) (cursor notifications.Cursor, err error)
- func (g *GlobalDB) AdvanceSessionInputGeneration(ctx context.Context, sessionID string, now time.Time) (int64, error)
- func (g *GlobalDB) AppendHeartbeatRevision(ctx context.Context, revision heartbeat.Revision) (heartbeat.Revision, error)
- func (g *GlobalDB) AppendHeartbeatWakeEvent(ctx context.Context, event heartbeat.WakeEvent) (heartbeat.WakeEvent, error)
- func (g *GlobalDB) AppendSoulRevision(ctx context.Context, revision soul.Revision) (soul.Revision, error)
- func (g *GlobalDB) AttachSession(ctx context.Context, req store.SessionAttachRequest) (store.SessionAttach, error)
- func (g *GlobalDB) BindRunReviewSession(ctx context.Context, req taskpkg.BindRunReviewSessionRequest, ...) (stored taskpkg.RunReview, err error)
- func (g *GlobalDB) CancelPendingSessionInputs(ctx context.Context, sessionID string, generation int64, now time.Time) (int, error)
- func (g *GlobalDB) CancelSessionInput(ctx context.Context, sessionID string, entryID string, now time.Time) (store.SessionInputQueueEntry, error)
- func (g *GlobalDB) ClaimNextRun(ctx context.Context, criteria taskpkg.ClaimCriteria) (taskpkg.ClaimResult, error)
- func (g *GlobalDB) ClaimNextSessionInput(ctx context.Context, sessionID string, now time.Time) (entry store.SessionInputQueueEntry, ok bool, err error)
- func (g *GlobalDB) ClaimScheduledRun(ctx context.Context, claim automation.SchedulerClaim) (result automation.SchedulerClaimResult, err error)
- func (g *GlobalDB) Close(ctx context.Context) error
- func (g *GlobalDB) CompleteOnboarding(ctx context.Context, completedAt string) (store.OnboardingStatus, error)
- func (g *GlobalDB) CompleteRunLease(ctx context.Context, completion taskpkg.LeaseCompletion) (taskpkg.Run, error)
- func (g *GlobalDB) ConsumeSessionSteer(ctx context.Context, sessionID string, now time.Time) (entry store.SessionInputQueueEntry, ok bool, err error)
- func (g *GlobalDB) CountActiveSessionBindings(ctx context.Context, sessionID string) (int, error)
- func (g *GlobalDB) CountActiveTaskRunClaims(ctx context.Context) (int, error)
- func (g *GlobalDB) CountBundleActivationsForExtension(ctx context.Context, extensionName string) (int, error)
- func (g *GlobalDB) CountDependencies(ctx context.Context, taskID string) (int, error)
- func (g *GlobalDB) CountDirectChildren(ctx context.Context, parentTaskID string) (int, error)
- func (g *GlobalDB) CountPausedTasks(ctx context.Context) (int, error)
- func (g *GlobalDB) CountQueuedTaskRuns(ctx context.Context, includePaused bool) (int, error)
- func (g *GlobalDB) CountRuns(ctx context.Context, query automation.RunQuery) (int64, error)
- func (g *GlobalDB) CreateDependency(ctx context.Context, dependency taskpkg.Dependency) error
- func (g *GlobalDB) CreateJob(ctx context.Context, job automation.Job) (automation.Job, error)
- func (g *GlobalDB) CreatePreset(ctx context.Context, preset presetspkg.Preset) (presetspkg.Preset, error)
- func (g *GlobalDB) CreateRun(ctx context.Context, run automation.Run) (automation.Run, error)
- func (g *GlobalDB) CreateTask(ctx context.Context, record taskpkg.Task) error
- func (g *GlobalDB) CreateTaskEvent(ctx context.Context, event taskpkg.Event) error
- func (g *GlobalDB) CreateTaskRun(ctx context.Context, run taskpkg.Run) error
- func (g *GlobalDB) CreateTrigger(ctx context.Context, trigger automation.Trigger) (automation.Trigger, error)
- func (g *GlobalDB) CurrentSessionInputGeneration(ctx context.Context, sessionID string) (int64, error)
- func (g *GlobalDB) DB() *sql.DB
- func (g *GlobalDB) DeleteAppMetadata(ctx context.Context, key string) error
- func (g *GlobalDB) DeleteBridgeInstance(ctx context.Context, id string) error
- func (g *GlobalDB) DeleteBridgeRoute(ctx context.Context, routingKeyHash string) error
- func (g *GlobalDB) DeleteBridgeSecretBinding(ctx context.Context, bridgeInstanceID string, bindingName string) error
- func (g *GlobalDB) DeleteBridgeTaskSubscription(ctx context.Context, subscriptionID string) error
- func (g *GlobalDB) DeleteDependency(ctx context.Context, taskID string, dependsOnID string) error
- func (g *GlobalDB) DeleteExecutionProfile(ctx context.Context, taskID string) error
- func (g *GlobalDB) DeleteExpiredBridgeIngestDedup(ctx context.Context, now time.Time) (int64, error)
- func (g *GlobalDB) DeleteJob(ctx context.Context, id string) error
- func (g *GlobalDB) DeleteJobEnabledOverlay(ctx context.Context, jobID string) error
- func (g *GlobalDB) DeleteMCPAuthToken(ctx context.Context, serverName string) error
- func (g *GlobalDB) DeleteNetworkChannel(ctx context.Context, ref store.NetworkChannelRef) error
- func (g *GlobalDB) DeletePreset(ctx context.Context, name string) error
- func (g *GlobalDB) DeleteRun(ctx context.Context, id string) error
- func (g *GlobalDB) DeleteSchedulerState(ctx context.Context, jobID string) error
- func (g *GlobalDB) DeleteTask(ctx context.Context, id string) error
- func (g *GlobalDB) DeleteTrigger(ctx context.Context, id string) error
- func (g *GlobalDB) DeleteTriggerEnabledOverlay(ctx context.Context, triggerID string) error
- func (g *GlobalDB) DeleteVaultSecret(ctx context.Context, ref string) error
- func (g *GlobalDB) DeleteWorkspace(ctx context.Context, id string) error
- func (g *GlobalDB) EnqueueSessionInput(ctx context.Context, req store.SessionInputQueueInsert) (entry store.SessionInputQueueEntry, position int, err error)
- func (g *GlobalDB) EnsureBuiltInPresets(ctx context.Context, defaults []presetspkg.Preset) (err error)
- func (g *GlobalDB) FailRunLease(ctx context.Context, failure taskpkg.LeaseFailure) (taskpkg.Run, error)
- func (g *GlobalDB) FindBridgeTargetsByNormalized(ctx context.Context, bridgeID string, normalized string) ([]bridges.BridgeTarget, error)
- func (g *GlobalDB) FindBridgeTargetsByPrefix(ctx context.Context, bridgeID string, normalizedPrefix string) ([]bridges.BridgeTarget, error)
- func (g *GlobalDB) FindBridgeTargetsByQualifiedName(ctx context.Context, bridgeID string, qualifier string, normalized string) ([]bridges.BridgeTarget, error)
- func (g *GlobalDB) FindHeartbeatRevisionForRollback(ctx context.Context, query heartbeat.RollbackLookup) (heartbeat.Revision, error)
- func (g *GlobalDB) FindHeartbeatSnapshotByDigest(ctx context.Context, workspaceID string, agentName string, digest string) (heartbeat.Snapshot, bool, error)
- func (g *GlobalDB) FindSoulRevisionForRollback(ctx context.Context, query soul.RollbackLookup) (soul.Revision, error)
- func (g *GlobalDB) FindSoulSnapshotByDigest(ctx context.Context, workspaceID string, agentName string, digest string) (soul.Snapshot, bool, error)
- func (g *GlobalDB) ForceFailTaskRun(ctx context.Context, failure taskpkg.ForceFailRunMutation) (taskpkg.ForceRunMutationResult, error)
- func (g *GlobalDB) ForceReleaseTaskRun(ctx context.Context, release taskpkg.ForceReleaseRunMutation) (taskpkg.ForceRunMutationResult, error)
- func (g *GlobalDB) GetAppMetadata(ctx context.Context, key string) (string, bool, error)
- func (g *GlobalDB) GetBridgeIngestDedup(ctx context.Context, idempotencyKey string, lookupAt time.Time) (bridges.IngestDedupRecord, error)
- func (g *GlobalDB) GetBridgeInstance(ctx context.Context, id string) (bridges.BridgeInstance, error)
- func (g *GlobalDB) GetBridgeRoute(ctx context.Context, routingKeyHash string) (bridges.BridgeRoute, error)
- func (g *GlobalDB) GetBridgeSecretBinding(ctx context.Context, bridgeInstanceID string, bindingName string) (bridges.BridgeSecretBinding, error)
- func (g *GlobalDB) GetBridgeTargetByCanonical(ctx context.Context, bridgeID string, canonicalRoute string) (bridges.BridgeTarget, error)
- func (g *GlobalDB) GetBridgeTaskSubscription(ctx context.Context, subscriptionID string) (bridges.BridgeTaskSubscription, error)
- func (g *GlobalDB) GetCursor(ctx context.Context, key notifications.CursorKey) (notifications.Cursor, error)
- func (g *GlobalDB) GetDirectRoom(ctx context.Context, channelRef store.NetworkChannelRef, directID string) (store.NetworkDirectRoomSummary, error)
- func (g *GlobalDB) GetExecutionProfile(ctx context.Context, taskID string) (taskpkg.ExecutionProfile, error)
- func (g *GlobalDB) GetHeartbeatRevision(ctx context.Context, id string) (heartbeat.Revision, error)
- func (g *GlobalDB) GetHeartbeatSnapshot(ctx context.Context, id string) (heartbeat.Snapshot, error)
- func (g *GlobalDB) GetHeartbeatWakeEvent(ctx context.Context, id string) (heartbeat.WakeEvent, error)
- func (g *GlobalDB) GetHeartbeatWakeState(ctx context.Context, workspaceID string, agentName string, sessionID string) (heartbeat.WakeState, error)
- func (g *GlobalDB) GetJob(ctx context.Context, id string) (automation.Job, error)
- func (g *GlobalDB) GetJobEnabledOverlay(ctx context.Context, jobID string) (automation.JobEnabledOverlay, error)
- func (g *GlobalDB) GetLatestValidHeartbeatSnapshot(ctx context.Context, workspaceID string, agentName string) (heartbeat.Snapshot, error)
- func (g *GlobalDB) GetMCPAuthToken(ctx context.Context, serverName string) (mcpauth.TokenRecord, error)
- func (g *GlobalDB) GetNetworkChannel(ctx context.Context, ref store.NetworkChannelRef) (store.NetworkChannelEntry, error)
- func (g *GlobalDB) GetOnboardingStatus(ctx context.Context) (store.OnboardingStatus, error)
- func (g *GlobalDB) GetPreset(ctx context.Context, name string) (presetspkg.Preset, error)
- func (g *GlobalDB) GetRun(ctx context.Context, id string) (automation.Run, error)
- func (g *GlobalDB) GetRunReview(ctx context.Context, reviewID string) (taskpkg.RunReview, error)
- func (g *GlobalDB) GetSchedulerPause(ctx context.Context) (taskpkg.SchedulerPauseState, error)
- func (g *GlobalDB) GetSchedulerPauseState(ctx context.Context) (taskpkg.InspectSchedulerState, error)
- func (g *GlobalDB) GetSchedulerState(ctx context.Context, jobID string) (automation.SchedulerState, error)
- func (g *GlobalDB) GetSessionHealth(ctx context.Context, sessionID string) (heartbeat.SessionHealth, error)
- func (g *GlobalDB) GetSoulRevision(ctx context.Context, id string) (soul.Revision, error)
- func (g *GlobalDB) GetSoulSnapshot(ctx context.Context, id string) (soul.Snapshot, error)
- func (g *GlobalDB) GetTask(ctx context.Context, id string) (taskpkg.Task, error)
- func (g *GlobalDB) GetTaskEventRecord(ctx context.Context, eventID string) (taskpkg.EventRecord, error)
- func (g *GlobalDB) GetTaskRun(ctx context.Context, id string) (taskpkg.Run, error)
- func (g *GlobalDB) GetTaskRunByIdempotencyKey(ctx context.Context, key string, origin taskpkg.Origin) (taskpkg.Run, error)
- func (g *GlobalDB) GetTaskTriageState(ctx context.Context, taskID string, actor taskpkg.ActorIdentity) (taskpkg.TriageState, error)
- func (g *GlobalDB) GetThread(ctx context.Context, channelRef store.NetworkChannelRef, threadID string) (store.NetworkThreadSummary, error)
- func (g *GlobalDB) GetTrigger(ctx context.Context, id string) (automation.Trigger, error)
- func (g *GlobalDB) GetTriggerByWebhookID(ctx context.Context, webhookID string) (automation.Trigger, error)
- func (g *GlobalDB) GetTriggerEnabledOverlay(ctx context.Context, triggerID string) (automation.TriggerEnabledOverlay, error)
- func (g *GlobalDB) GetVaultSecret(ctx context.Context, ref string) (vault.Record, error)
- func (g *GlobalDB) GetWork(ctx context.Context, workspaceID string, workID string) (store.NetworkWorkEntry, error)
- func (g *GlobalDB) GetWorkspace(ctx context.Context, id string) (aghworkspace.Workspace, error)
- func (g *GlobalDB) GetWorkspaceByName(ctx context.Context, name string) (aghworkspace.Workspace, error)
- func (g *GlobalDB) GetWorkspaceByPath(ctx context.Context, rootDir string) (aghworkspace.Workspace, error)
- func (g *GlobalDB) HasDependencyPath(ctx context.Context, fromTaskID string, toTaskID string) (bool, error)
- func (g *GlobalDB) HeartbeatRunLease(ctx context.Context, heartbeat taskpkg.LeaseHeartbeat) (taskpkg.Run, error)
- func (g *GlobalDB) InsertBridgeInstance(ctx context.Context, instance bridges.BridgeInstance) error
- func (g *GlobalDB) InsertWorkspace(ctx context.Context, ws aghworkspace.Workspace) error
- func (g *GlobalDB) IsTaskEffectivelyPaused(ctx context.Context, taskID string) (bool, string, error)
- func (g *GlobalDB) ListAutonomyLeaseHandles(ctx context.Context, sessionID string) (handles []taskpkg.AutonomyLeaseHandle, err error)
- func (g *GlobalDB) ListBridgeInstances(ctx context.Context) ([]bridges.BridgeInstance, error)
- func (g *GlobalDB) ListBridgeRoutes(ctx context.Context, bridgeInstanceID string) ([]bridges.BridgeRoute, error)
- func (g *GlobalDB) ListBridgeSecretBindings(ctx context.Context, bridgeInstanceID string) ([]bridges.BridgeSecretBinding, error)
- func (g *GlobalDB) ListBridgeTargets(ctx context.Context, query bridges.BridgeTargetQuery) (bridges.BridgeTargetPage, error)
- func (g *GlobalDB) ListBridgeTaskSubscriptions(ctx context.Context, query bridges.BridgeTaskSubscriptionQuery) (subscriptions []bridges.BridgeTaskSubscription, err error)
- func (g *GlobalDB) ListConversationMessages(ctx context.Context, ref store.NetworkConversationRef, ...) (entries []store.NetworkConversationMessage, err error)
- func (g *GlobalDB) ListCursors(ctx context.Context, query notifications.CursorQuery) (cursors []notifications.Cursor, err error)
- func (g *GlobalDB) ListDependencies(ctx context.Context, taskID string) ([]taskpkg.Dependency, error)
- func (g *GlobalDB) ListDependents(ctx context.Context, dependsOnTaskID string) ([]taskpkg.Dependency, error)
- func (g *GlobalDB) ListDirectRooms(ctx context.Context, ref store.NetworkChannelRef, ...) (summaries []store.NetworkDirectRoomSummary, err error)
- func (g *GlobalDB) ListEventSummaries(ctx context.Context, query store.EventSummaryQuery) ([]store.EventSummary, error)
- func (g *GlobalDB) ListHeartbeatRevisions(ctx context.Context, query heartbeat.RevisionListQuery) (revisions []heartbeat.Revision, err error)
- func (g *GlobalDB) ListHeartbeatSnapshots(ctx context.Context, query heartbeat.SnapshotListQuery) (snapshots []heartbeat.Snapshot, err error)
- func (g *GlobalDB) ListHeartbeatWakeEvents(ctx context.Context, query heartbeat.WakeEventListQuery) (events []heartbeat.WakeEvent, err error)
- func (g *GlobalDB) ListHeartbeatWakeState(ctx context.Context, query heartbeat.WakeStateListQuery) (states []heartbeat.WakeState, err error)
- func (g *GlobalDB) ListJobEnabledOverlays(ctx context.Context) ([]automation.JobEnabledOverlay, error)
- func (g *GlobalDB) ListJobs(ctx context.Context, query automation.JobListQuery) ([]automation.Job, error)
- func (g *GlobalDB) ListMCPAuthTokens(ctx context.Context) ([]mcpauth.TokenRecord, error)
- func (g *GlobalDB) ListNetworkAudit(ctx context.Context, query store.NetworkAuditQuery) (entries []store.NetworkAuditEntry, err error)
- func (g *GlobalDB) ListNetworkChannels(ctx context.Context, query store.NetworkChannelQuery) (entries []store.NetworkChannelEntry, err error)
- func (g *GlobalDB) ListNetworkMessages(ctx context.Context, query store.NetworkMessageQuery) (entries []store.NetworkMessageEntry, err error)
- func (g *GlobalDB) ListPermissionLog(ctx context.Context, query store.PermissionLogQuery) ([]store.PermissionLogEntry, error)
- func (g *GlobalDB) ListPresets(ctx context.Context, query presetspkg.Query) (items []presetspkg.Preset, err error)
- func (g *GlobalDB) ListProcessRecords(ctx context.Context, query toolruntime.ProcessQuery) ([]toolruntime.ProcessRecord, error)
- func (g *GlobalDB) ListRows(ctx context.Context, opts modelcatalog.ListOptions) (catalogRows []modelcatalog.ModelRow, err error)
- func (g *GlobalDB) ListRunReviews(ctx context.Context, query taskpkg.RunReviewQuery) ([]taskpkg.RunReview, error)
- func (g *GlobalDB) ListRuns(ctx context.Context, query automation.RunQuery) ([]automation.Run, error)
- func (g *GlobalDB) ListSchedulerStates(ctx context.Context) ([]automation.SchedulerState, error)
- func (g *GlobalDB) ListSessionHealth(ctx context.Context, query heartbeat.SessionHealthListQuery) (rowsOut []heartbeat.SessionHealth, err error)
- func (g *GlobalDB) ListSessionHealthRecoveryInputs(ctx context.Context, limit int) ([]heartbeat.SessionHealth, error)
- func (g *GlobalDB) ListSessions(ctx context.Context, query store.SessionListQuery) ([]store.SessionInfo, error)
- func (g *GlobalDB) ListSoulRevisions(ctx context.Context, query soul.RevisionListQuery) (revisions []soul.Revision, err error)
- func (g *GlobalDB) ListSoulSnapshots(ctx context.Context, query soul.SnapshotListQuery) (snapshots []soul.Snapshot, err error)
- func (g *GlobalDB) ListSourceStatus(ctx context.Context, providerID string) (statuses []modelcatalog.SourceStatus, err error)
- func (g *GlobalDB) ListTaskEventRecords(ctx context.Context, query taskpkg.EventRecordQuery) ([]taskpkg.EventRecord, error)
- func (g *GlobalDB) ListTaskEvents(ctx context.Context, query taskpkg.EventQuery) ([]taskpkg.Event, error)
- func (g *GlobalDB) ListTaskRuns(ctx context.Context, query taskpkg.RunQuery) ([]taskpkg.Run, error)
- func (g *GlobalDB) ListTaskRunsByStatus(ctx context.Context, statuses []taskpkg.RunStatus) ([]taskpkg.Run, error)
- func (g *GlobalDB) ListTaskTriageStates(ctx context.Context, actor taskpkg.ActorIdentity) ([]taskpkg.TriageState, error)
- func (g *GlobalDB) ListTasks(ctx context.Context, query taskpkg.Query) ([]taskpkg.Summary, error)
- func (g *GlobalDB) ListThreads(ctx context.Context, ref store.NetworkChannelRef, ...) (summaries []store.NetworkThreadSummary, err error)
- func (g *GlobalDB) ListTokenStats(ctx context.Context, query store.TokenStatsQuery) ([]store.TokenStats, error)
- func (g *GlobalDB) ListTriggerEnabledOverlays(ctx context.Context) ([]automation.TriggerEnabledOverlay, error)
- func (g *GlobalDB) ListTriggers(ctx context.Context, query automation.TriggerListQuery) ([]automation.Trigger, error)
- func (g *GlobalDB) ListVaultSecrets(ctx context.Context, prefix string) (_ []vault.Record, err error)
- func (g *GlobalDB) ListWorkspaces(ctx context.Context) ([]aghworkspace.Workspace, error)
- func (g *GlobalDB) LookupRunReviewBySession(ctx context.Context, sessionID string) (taskpkg.RunReview, error)
- func (g *GlobalDB) MarkSessionHealthStale(ctx context.Context, cutoff time.Time, updatedAt time.Time) (int64, error)
- func (g *GlobalDB) MarkSessionInputFailed(ctx context.Context, sessionID string, entryID string, summary string, ...) error
- func (g *GlobalDB) MarkSessionInputSent(ctx context.Context, sessionID string, entryID string, now time.Time) error
- func (g *GlobalDB) Path() string
- func (g *GlobalDB) PauseTask(ctx context.Context, mutation taskpkg.PauseMutation) (taskpkg.Task, error)
- func (g *GlobalDB) PutBridgeIngestDedup(ctx context.Context, record bridges.IngestDedupRecord) error
- func (g *GlobalDB) PutBridgeRoute(ctx context.Context, route bridges.BridgeRoute) error
- func (g *GlobalDB) PutBridgeSecretBinding(ctx context.Context, binding bridges.BridgeSecretBinding) error
- func (g *GlobalDB) PutBridgeTaskSubscription(ctx context.Context, subscription bridges.BridgeTaskSubscription) error
- func (g *GlobalDB) PutVaultSecret(ctx context.Context, record vault.Record) error
- func (g *GlobalDB) ReconcileSessions(ctx context.Context, sessions []store.SessionInfo) (result store.ReconcileResult, err error)
- func (g *GlobalDB) RecordCursorError(ctx context.Context, report notifications.CursorError) (cursor notifications.Cursor, err error)
- func (g *GlobalDB) RecordHeartbeatWakeDecision(ctx context.Context, event heartbeat.WakeEvent, state heartbeat.WakeState) (outEvent heartbeat.WakeEvent, outState heartbeat.WakeState, err error)
- func (g *GlobalDB) RecordRunDeliveryError(ctx context.Context, runID string, runErr error) (automation.Run, error)
- func (g *GlobalDB) RecordRunReview(ctx context.Context, req taskpkg.RecordRunReviewRequest, ...) (result taskpkg.RunReviewResult, err error)
- func (g *GlobalDB) RecoverExpiredRunLeases(ctx context.Context, recovery taskpkg.ExpiredLeaseRecovery) ([]taskpkg.ExpiredLeaseRecoveryResult, error)
- func (g *GlobalDB) RefreshBridgeTargets(ctx context.Context, bridgeID string, targets []bridges.BridgeTarget, ...) error
- func (g *GlobalDB) RegisterSession(ctx context.Context, session store.SessionInfo) error
- func (g *GlobalDB) ReleaseRunLease(ctx context.Context, release taskpkg.LeaseRelease) (taskpkg.Run, error)
- func (g *GlobalDB) ReleaseSessionInput(ctx context.Context, sessionID string, entryID string, now time.Time) error
- func (g *GlobalDB) ReplaceBridgeInstances(ctx context.Context, instances []bridges.BridgeInstance) (err error)
- func (g *GlobalDB) ReplaceSourceRows(ctx context.Context, sourceID string, providerID string, ...) error
- func (g *GlobalDB) RequestRunReview(ctx context.Context, review *taskpkg.RunReview) (stored taskpkg.RunReview, created bool, err error)
- func (g *GlobalDB) ReserveQueuedRun(ctx context.Context, taskID string, runID string, idempotencyKey string, ...) (taskpkg.Task, taskpkg.Run, bool, error)
- func (g *GlobalDB) ResetCursor(ctx context.Context, reset notifications.ResetCursor) (cursor notifications.Cursor, err error)
- func (g *GlobalDB) ResetOnboarding(ctx context.Context) (store.OnboardingStatus, error)
- func (g *GlobalDB) ResolveBridgeRoute(ctx context.Context, key bridges.RoutingKey) (bridges.BridgeRoute, error)
- func (g *GlobalDB) ResolveDirectRoom(ctx context.Context, entry store.NetworkDirectRoomEntry) (summary store.NetworkDirectRoomSummary, err error)
- func (g *GlobalDB) ResumeTask(ctx context.Context, mutation taskpkg.ResumeMutation) (taskpkg.Task, error)
- func (g *GlobalDB) RetryTaskRun(ctx context.Context, retry taskpkg.RetryRunMutation) (taskpkg.RetryRunResult, error)
- func (g *GlobalDB) SaveMCPAuthToken(ctx context.Context, token mcpauth.TokenRecord) error
- func (g *GlobalDB) SaveSchedulerState(ctx context.Context, state automation.SchedulerState) (automation.SchedulerState, error)
- func (g *GlobalDB) SaveTaskRunIdempotency(ctx context.Context, record taskpkg.RunIdempotency) error
- func (g *GlobalDB) SchedulerBacklog(ctx context.Context, query taskpkg.SchedulerBacklogQuery) (backlog taskpkg.SchedulerBacklog, err error)
- func (g *GlobalDB) SessionInputQueueSummary(ctx context.Context, sessionID string) (summary store.SessionInputQueueSummary, err error)
- func (g *GlobalDB) SetAppMetadata(ctx context.Context, key string, value string) error
- func (g *GlobalDB) SetJobEnabledOverlay(ctx context.Context, overlay automation.JobEnabledOverlay) (automation.JobEnabledOverlay, error)
- func (g *GlobalDB) SetSchedulerPaused(ctx context.Context, actor string, reason string) (taskpkg.SchedulerPauseState, error)
- func (g *GlobalDB) SetSchedulerResumed(ctx context.Context) (taskpkg.SchedulerPauseState, error)
- func (g *GlobalDB) SetTriggerEnabledOverlay(ctx context.Context, overlay automation.TriggerEnabledOverlay) (automation.TriggerEnabledOverlay, error)
- func (g *GlobalDB) StageSessionSteer(ctx context.Context, req store.SessionInputQueueInsert) (entry store.SessionInputQueueEntry, err error)
- func (g *GlobalDB) SweepExpiredSessionAttachLocks(ctx context.Context, now time.Time) (int64, error)
- func (g *GlobalDB) SweepHeartbeatWakeEvents(ctx context.Context, cutoff time.Time, limit int) (int64, error)
- func (g *GlobalDB) SweepObservability(ctx context.Context, cutoff time.Time) (result store.ObservabilityRetentionSweepResult, err error)
- func (g *GlobalDB) UpdateBridgeInstance(ctx context.Context, instance bridges.BridgeInstance) error
- func (g *GlobalDB) UpdateJob(ctx context.Context, job automation.Job) (automation.Job, error)
- func (g *GlobalDB) UpdatePreset(ctx context.Context, name string, req presetspkg.UpdateRequest) (presetspkg.Preset, error)
- func (g *GlobalDB) UpdateProcessRecordState(ctx context.Context, update toolruntime.ProcessStateUpdate) error
- func (g *GlobalDB) UpdateRun(ctx context.Context, run automation.Run) (automation.Run, error)
- func (g *GlobalDB) UpdateSessionSoulSnapshot(ctx context.Context, update store.SessionSoulSnapshotUpdate) error
- func (g *GlobalDB) UpdateSessionState(ctx context.Context, update store.SessionStateUpdate) error
- func (g *GlobalDB) UpdateTask(ctx context.Context, record taskpkg.Task) error
- func (g *GlobalDB) UpdateTaskRun(ctx context.Context, run taskpkg.Run) error
- func (g *GlobalDB) UpdateTokenStats(ctx context.Context, update store.TokenStatsUpdate) error
- func (g *GlobalDB) UpdateTrigger(ctx context.Context, trigger automation.Trigger) (automation.Trigger, error)
- func (g *GlobalDB) UpdateWorkspace(ctx context.Context, ws aghworkspace.Workspace) error
- func (g *GlobalDB) UpsertExecutionProfile(ctx context.Context, profile *taskpkg.ExecutionProfile) (stored taskpkg.ExecutionProfile, err error)
- func (g *GlobalDB) UpsertHeartbeatSnapshot(ctx context.Context, snapshot heartbeat.Snapshot) (heartbeat.Snapshot, error)
- func (g *GlobalDB) UpsertHeartbeatWakeState(ctx context.Context, state heartbeat.WakeState) (heartbeat.WakeState, error)
- func (g *GlobalDB) UpsertProcessRecord(ctx context.Context, record toolruntime.ProcessRecord) error
- func (g *GlobalDB) UpsertSessionHealth(ctx context.Context, health heartbeat.SessionHealth) (heartbeat.SessionHealth, error)
- func (g *GlobalDB) UpsertSoulSnapshot(ctx context.Context, snapshot soul.Snapshot) (soul.Snapshot, error)
- func (g *GlobalDB) UpsertTaskTriageState(ctx context.Context, state taskpkg.TriageState) error
- func (g *GlobalDB) WithDeleteTaskTransaction(ctx context.Context, fn func(taskpkg.DeleteTaskMutationStore) error) error
- func (g *GlobalDB) WriteConversationMessage(ctx context.Context, entry store.NetworkConversationMessage) (result store.NetworkConversationWriteResult, err error)
- func (g *GlobalDB) WriteEventSummary(ctx context.Context, summary store.EventSummary) error
- func (g *GlobalDB) WriteNetworkAudit(ctx context.Context, entry store.NetworkAuditEntry) error
- func (g *GlobalDB) WriteNetworkChannel(ctx context.Context, entry store.NetworkChannelEntry) error
- func (g *GlobalDB) WriteNetworkMessage(ctx context.Context, entry store.NetworkMessageEntry) error
- func (g *GlobalDB) WritePermissionLog(ctx context.Context, entry store.PermissionLogEntry) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GlobalDB ¶
type GlobalDB struct {
// contains filtered or unexported fields
}
GlobalDB owns the global session index and observability database.
func OpenGlobalDB ¶
OpenGlobalDB opens or creates the global AGH index database.
func (*GlobalDB) AdvanceCursor ¶
func (g *GlobalDB) AdvanceCursor( ctx context.Context, update notifications.AdvanceCursor, ) (cursor notifications.Cursor, err error)
AdvanceCursor records a monotonic confirmed delivery position.
func (*GlobalDB) AdvanceSessionInputGeneration ¶
func (g *GlobalDB) AdvanceSessionInputGeneration(ctx context.Context, sessionID string, now time.Time) (int64, error)
AdvanceSessionInputGeneration increments the session generation used to fence stale queue entries.
func (*GlobalDB) AppendHeartbeatRevision ¶
func (g *GlobalDB) AppendHeartbeatRevision( ctx context.Context, revision heartbeat.Revision, ) (heartbeat.Revision, error)
AppendHeartbeatRevision appends one managed Heartbeat authoring revision row.
func (*GlobalDB) AppendHeartbeatWakeEvent ¶
func (g *GlobalDB) AppendHeartbeatWakeEvent( ctx context.Context, event heartbeat.WakeEvent, ) (heartbeat.WakeEvent, error)
AppendHeartbeatWakeEvent appends one retained Heartbeat wake audit row.
func (*GlobalDB) AppendSoulRevision ¶
func (g *GlobalDB) AppendSoulRevision(ctx context.Context, revision soul.Revision) (soul.Revision, error)
AppendSoulRevision appends one managed authoring revision row.
func (*GlobalDB) AttachSession ¶
func (g *GlobalDB) AttachSession(ctx context.Context, req store.SessionAttachRequest) (store.SessionAttach, error)
AttachSession acquires a short-lived attach lease for a resumable session.
func (*GlobalDB) BindRunReviewSession ¶
func (g *GlobalDB) 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 (*GlobalDB) CancelPendingSessionInputs ¶
func (g *GlobalDB) CancelPendingSessionInputs( ctx context.Context, sessionID string, generation int64, now time.Time, ) (int, error)
CancelPendingSessionInputs cancels stale entries older than the supplied generation.
func (*GlobalDB) CancelSessionInput ¶
func (g *GlobalDB) CancelSessionInput( ctx context.Context, sessionID string, entryID string, now time.Time, ) (store.SessionInputQueueEntry, error)
CancelSessionInput cancels one pending queue entry.
func (*GlobalDB) ClaimNextRun ¶
func (g *GlobalDB) ClaimNextRun(ctx context.Context, criteria taskpkg.ClaimCriteria) (taskpkg.ClaimResult, error)
ClaimNextRun atomically selects and claims the next eligible queued task run.
func (*GlobalDB) ClaimNextSessionInput ¶
func (g *GlobalDB) 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 (*GlobalDB) ClaimScheduledRun ¶
func (g *GlobalDB) 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 (*GlobalDB) CompleteOnboarding ¶
func (g *GlobalDB) CompleteOnboarding(ctx context.Context, completedAt string) (store.OnboardingStatus, error)
CompleteOnboarding stores the first completion timestamp and preserves it on repeat calls.
func (*GlobalDB) CompleteRunLease ¶
func (g *GlobalDB) CompleteRunLease(ctx context.Context, completion taskpkg.LeaseCompletion) (taskpkg.Run, error)
CompleteRunLease marks one claimed run complete after token verification.
func (*GlobalDB) ConsumeSessionSteer ¶
func (g *GlobalDB) 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 (*GlobalDB) CountActiveSessionBindings ¶
CountActiveSessionBindings reports how many non-terminal runs are bound to one session.
func (*GlobalDB) CountActiveTaskRunClaims ¶
CountActiveTaskRunClaims returns currently leased task runs.
func (*GlobalDB) CountBundleActivationsForExtension ¶
func (*GlobalDB) CountDependencies ¶
CountDependencies reports how many dependency edges are stored for one task.
func (*GlobalDB) CountDirectChildren ¶
CountDirectChildren reports how many persisted tasks reference the supplied parent id.
func (*GlobalDB) CountPausedTasks ¶
CountPausedTasks returns the number of directly paused tasks.
func (*GlobalDB) CountQueuedTaskRuns ¶
CountQueuedTaskRuns returns queued run pressure, optionally excluding paused tasks.
func (*GlobalDB) CountRuns ¶
CountRuns returns the number of automation runs matching the supplied filters.
func (*GlobalDB) CreateDependency ¶
CreateDependency inserts one durable task-dependency edge under a single SQLite write lock.
func (*GlobalDB) CreateJob ¶
func (g *GlobalDB) CreateJob(ctx context.Context, job automation.Job) (automation.Job, error)
CreateJob stores a new automation job definition.
func (*GlobalDB) CreatePreset ¶
func (g *GlobalDB) CreatePreset( ctx context.Context, preset presetspkg.Preset, ) (presetspkg.Preset, error)
func (*GlobalDB) CreateRun ¶
func (g *GlobalDB) CreateRun(ctx context.Context, run automation.Run) (automation.Run, error)
CreateRun stores a new automation run history row.
func (*GlobalDB) CreateTask ¶
CreateTask inserts one durable task record.
func (*GlobalDB) CreateTaskEvent ¶
CreateTaskEvent inserts one immutable task audit event.
func (*GlobalDB) CreateTaskRun ¶
CreateTaskRun inserts one durable task-run record.
func (*GlobalDB) CreateTrigger ¶
func (g *GlobalDB) CreateTrigger(ctx context.Context, trigger automation.Trigger) (automation.Trigger, error)
CreateTrigger stores a new automation trigger definition.
func (*GlobalDB) CurrentSessionInputGeneration ¶
func (g *GlobalDB) CurrentSessionInputGeneration(ctx context.Context, sessionID string) (int64, error)
CurrentSessionInputGeneration returns the persisted busy-input generation for a session.
func (*GlobalDB) DB ¶
DB exposes the underlying SQL connection for composition-root adapters such as the extension registry.
func (*GlobalDB) DeleteAppMetadata ¶
DeleteAppMetadata removes the value stored under key. Missing keys are a no-op.
func (*GlobalDB) DeleteBridgeInstance ¶
DeleteBridgeInstance removes a persisted bridge instance row.
func (*GlobalDB) DeleteBridgeRoute ¶
DeleteBridgeRoute removes one persisted route row.
func (*GlobalDB) DeleteBridgeSecretBinding ¶
func (g *GlobalDB) DeleteBridgeSecretBinding(ctx context.Context, bridgeInstanceID string, bindingName string) error
DeleteBridgeSecretBinding removes one persisted secret binding row.
func (*GlobalDB) DeleteBridgeTaskSubscription ¶
DeleteBridgeTaskSubscription removes one terminal task notification subscription.
func (*GlobalDB) DeleteDependency ¶
DeleteDependency removes one persisted dependency edge.
func (*GlobalDB) DeleteExecutionProfile ¶
DeleteExecutionProfile removes one profile and its selector rows.
func (*GlobalDB) DeleteExpiredBridgeIngestDedup ¶
func (g *GlobalDB) DeleteExpiredBridgeIngestDedup(ctx context.Context, now time.Time) (int64, error)
DeleteExpiredBridgeIngestDedup removes expired dedup rows and reports how many were deleted.
func (*GlobalDB) DeleteJobEnabledOverlay ¶
DeleteJobEnabledOverlay clears a persisted job enabled overlay if it exists.
func (*GlobalDB) DeleteMCPAuthToken ¶
DeleteMCPAuthToken removes persisted token state for one server.
func (*GlobalDB) DeleteNetworkChannel ¶
DeleteNetworkChannel removes one persisted channel metadata row.
func (*GlobalDB) DeletePreset ¶
func (*GlobalDB) DeleteSchedulerState ¶
DeleteSchedulerState removes a durable scheduler cursor if it exists.
func (*GlobalDB) DeleteTask ¶
DeleteTask removes one durable task record and any ON DELETE CASCADE children owned by the task tables.
func (*GlobalDB) DeleteTrigger ¶
DeleteTrigger removes an automation trigger definition.
func (*GlobalDB) DeleteTriggerEnabledOverlay ¶
DeleteTriggerEnabledOverlay clears a persisted trigger enabled overlay if it exists.
func (*GlobalDB) DeleteVaultSecret ¶
DeleteVaultSecret removes one encrypted vault secret record.
func (*GlobalDB) DeleteWorkspace ¶
DeleteWorkspace removes a persisted workspace registration row.
func (*GlobalDB) EnqueueSessionInput ¶
func (g *GlobalDB) 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 (*GlobalDB) EnsureBuiltInPresets ¶
func (g *GlobalDB) EnsureBuiltInPresets( ctx context.Context, defaults []presetspkg.Preset, ) (err error)
EnsureBuiltInPresets inserts disabled built-ins and records default drift without overwriting user edits.
func (*GlobalDB) FailRunLease ¶
func (g *GlobalDB) FailRunLease(ctx context.Context, failure taskpkg.LeaseFailure) (taskpkg.Run, error)
FailRunLease marks one claimed run failed after token verification.
func (*GlobalDB) FindBridgeTargetsByNormalized ¶
func (g *GlobalDB) FindBridgeTargetsByNormalized( ctx context.Context, bridgeID string, normalized string, ) ([]bridges.BridgeTarget, error)
FindBridgeTargetsByNormalized returns exact normalized display-name matches.
func (*GlobalDB) FindBridgeTargetsByPrefix ¶
func (g *GlobalDB) FindBridgeTargetsByPrefix( ctx context.Context, bridgeID string, normalizedPrefix string, ) ([]bridges.BridgeTarget, error)
FindBridgeTargetsByPrefix returns normalized display-name prefix matches.
func (*GlobalDB) FindBridgeTargetsByQualifiedName ¶
func (g *GlobalDB) FindBridgeTargetsByQualifiedName( ctx context.Context, bridgeID string, qualifier string, normalized string, ) ([]bridges.BridgeTarget, error)
FindBridgeTargetsByQualifiedName returns exact qualifier plus normalized-name matches.
func (*GlobalDB) FindHeartbeatRevisionForRollback ¶
func (g *GlobalDB) FindHeartbeatRevisionForRollback( ctx context.Context, query heartbeat.RollbackLookup, ) (heartbeat.Revision, error)
FindHeartbeatRevisionForRollback returns the revision body selected for a managed rollback.
func (*GlobalDB) FindHeartbeatSnapshotByDigest ¶
func (g *GlobalDB) FindHeartbeatSnapshotByDigest( ctx context.Context, workspaceID string, agentName string, digest string, ) (heartbeat.Snapshot, bool, error)
FindHeartbeatSnapshotByDigest returns the snapshot matching an agent digest.
func (*GlobalDB) FindSoulRevisionForRollback ¶
func (g *GlobalDB) FindSoulRevisionForRollback( ctx context.Context, query soul.RollbackLookup, ) (soul.Revision, error)
FindSoulRevisionForRollback returns the revision body selected for a managed rollback.
func (*GlobalDB) FindSoulSnapshotByDigest ¶
func (g *GlobalDB) FindSoulSnapshotByDigest( ctx context.Context, workspaceID string, agentName string, digest string, ) (soul.Snapshot, bool, error)
FindSoulSnapshotByDigest returns the snapshot matching an agent digest.
func (*GlobalDB) ForceFailTaskRun ¶
func (g *GlobalDB) 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 (*GlobalDB) ForceReleaseTaskRun ¶
func (g *GlobalDB) ForceReleaseTaskRun( ctx context.Context, release taskpkg.ForceReleaseRunMutation, ) (taskpkg.ForceRunMutationResult, error)
ForceReleaseTaskRun requeues one claimed run with snapshot fencing.
func (*GlobalDB) GetAppMetadata ¶
GetAppMetadata returns the value stored under key and whether the key exists.
func (*GlobalDB) GetBridgeIngestDedup ¶
func (g *GlobalDB) 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 (*GlobalDB) GetBridgeInstance ¶
func (g *GlobalDB) GetBridgeInstance(ctx context.Context, id string) (bridges.BridgeInstance, error)
GetBridgeInstance loads one persisted bridge instance by primary key.
func (*GlobalDB) GetBridgeRoute ¶
func (g *GlobalDB) GetBridgeRoute(ctx context.Context, routingKeyHash string) (bridges.BridgeRoute, error)
GetBridgeRoute loads one persisted route by routing-key hash.
func (*GlobalDB) GetBridgeSecretBinding ¶
func (g *GlobalDB) GetBridgeSecretBinding( ctx context.Context, bridgeInstanceID string, bindingName string, ) (bridges.BridgeSecretBinding, error)
GetBridgeSecretBinding loads one persisted secret binding by composite primary key.
func (*GlobalDB) GetBridgeTargetByCanonical ¶
func (g *GlobalDB) GetBridgeTargetByCanonical( ctx context.Context, bridgeID string, canonicalRoute string, ) (bridges.BridgeTarget, error)
GetBridgeTargetByCanonical returns one target by immutable provider-derived identity.
func (*GlobalDB) GetBridgeTaskSubscription ¶
func (g *GlobalDB) GetBridgeTaskSubscription( ctx context.Context, subscriptionID string, ) (bridges.BridgeTaskSubscription, error)
GetBridgeTaskSubscription loads one persisted task notification subscription.
func (*GlobalDB) GetCursor ¶
func (g *GlobalDB) GetCursor(ctx context.Context, key notifications.CursorKey) (notifications.Cursor, error)
GetCursor returns one durable notification cursor by key.
func (*GlobalDB) GetDirectRoom ¶
func (g *GlobalDB) GetDirectRoom( ctx context.Context, channelRef store.NetworkChannelRef, directID string, ) (store.NetworkDirectRoomSummary, error)
GetDirectRoom returns one direct-room summary.
func (*GlobalDB) GetExecutionProfile ¶
func (g *GlobalDB) GetExecutionProfile( ctx context.Context, taskID string, ) (taskpkg.ExecutionProfile, error)
GetExecutionProfile returns the persisted typed execution profile for one task.
func (*GlobalDB) GetHeartbeatRevision ¶
GetHeartbeatRevision returns a managed Heartbeat authoring revision by id.
func (*GlobalDB) GetHeartbeatSnapshot ¶
GetHeartbeatSnapshot returns a persisted Heartbeat snapshot by id.
func (*GlobalDB) GetHeartbeatWakeEvent ¶
func (g *GlobalDB) GetHeartbeatWakeEvent(ctx context.Context, id string) (heartbeat.WakeEvent, error)
GetHeartbeatWakeEvent returns one retained Heartbeat wake audit row.
func (*GlobalDB) GetHeartbeatWakeState ¶
func (g *GlobalDB) GetHeartbeatWakeState( ctx context.Context, workspaceID string, agentName string, sessionID string, ) (heartbeat.WakeState, error)
GetHeartbeatWakeState returns one per-session Heartbeat wake summary.
func (*GlobalDB) GetJobEnabledOverlay ¶
func (g *GlobalDB) GetJobEnabledOverlay(ctx context.Context, jobID string) (automation.JobEnabledOverlay, error)
GetJobEnabledOverlay loads one persisted job enabled overlay by job id.
func (*GlobalDB) GetLatestValidHeartbeatSnapshot ¶
func (g *GlobalDB) GetLatestValidHeartbeatSnapshot( ctx context.Context, workspaceID string, agentName string, ) (heartbeat.Snapshot, error)
GetLatestValidHeartbeatSnapshot returns the newest persisted valid Heartbeat policy for an agent.
func (*GlobalDB) GetMCPAuthToken ¶
func (g *GlobalDB) GetMCPAuthToken(ctx context.Context, serverName string) (mcpauth.TokenRecord, error)
GetMCPAuthToken returns one persisted token record.
func (*GlobalDB) GetNetworkChannel ¶
func (g *GlobalDB) GetNetworkChannel( ctx context.Context, ref store.NetworkChannelRef, ) (store.NetworkChannelEntry, error)
GetNetworkChannel returns one persisted network channel metadata row.
func (*GlobalDB) GetOnboardingStatus ¶
GetOnboardingStatus returns the domain status backed by app metadata.
func (*GlobalDB) GetRunReview ¶
GetRunReview returns one persisted run review by id.
func (*GlobalDB) GetSchedulerPause ¶
GetSchedulerPause returns the singleton scheduler pause state.
func (*GlobalDB) GetSchedulerPauseState ¶
func (g *GlobalDB) GetSchedulerPauseState(ctx context.Context) (taskpkg.InspectSchedulerState, error)
GetSchedulerPauseState returns the singleton scheduler pause state for inspect diagnostics.
func (*GlobalDB) GetSchedulerState ¶
func (g *GlobalDB) GetSchedulerState(ctx context.Context, jobID string) (automation.SchedulerState, error)
GetSchedulerState loads one durable automation scheduler cursor by job id.
func (*GlobalDB) GetSessionHealth ¶
func (g *GlobalDB) GetSessionHealth(ctx context.Context, sessionID string) (heartbeat.SessionHealth, error)
GetSessionHealth returns metadata-only health for one session.
func (*GlobalDB) GetSoulRevision ¶
GetSoulRevision returns a managed authoring revision by id.
func (*GlobalDB) GetSoulSnapshot ¶
GetSoulSnapshot returns a persisted Soul snapshot by id.
func (*GlobalDB) GetTaskEventRecord ¶
func (g *GlobalDB) GetTaskEventRecord(ctx context.Context, eventID string) (taskpkg.EventRecord, error)
GetTaskEventRecord returns one persisted task event plus its stable row sequence.
func (*GlobalDB) GetTaskRun ¶
GetTaskRun returns one persisted task run by primary key.
func (*GlobalDB) GetTaskRunByIdempotencyKey ¶
func (g *GlobalDB) 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 (*GlobalDB) GetTaskTriageState ¶
func (g *GlobalDB) GetTaskTriageState( ctx context.Context, taskID string, actor taskpkg.ActorIdentity, ) (taskpkg.TriageState, error)
GetTaskTriageState returns the durable actor-scoped triage state for one task.
func (*GlobalDB) GetThread ¶
func (g *GlobalDB) GetThread( ctx context.Context, channelRef store.NetworkChannelRef, threadID string, ) (store.NetworkThreadSummary, error)
GetThread returns one public-thread summary.
func (*GlobalDB) GetTrigger ¶
GetTrigger loads one persisted automation trigger definition by primary key.
func (*GlobalDB) GetTriggerByWebhookID ¶
func (g *GlobalDB) GetTriggerByWebhookID(ctx context.Context, webhookID string) (automation.Trigger, error)
GetTriggerByWebhookID loads a webhook trigger using its stable webhook identifier.
func (*GlobalDB) GetTriggerEnabledOverlay ¶
func (g *GlobalDB) GetTriggerEnabledOverlay( ctx context.Context, triggerID string, ) (automation.TriggerEnabledOverlay, error)
GetTriggerEnabledOverlay loads one persisted trigger enabled overlay by trigger id.
func (*GlobalDB) GetVaultSecret ¶
GetVaultSecret returns one encrypted vault secret record.
func (*GlobalDB) GetWork ¶
func (g *GlobalDB) GetWork(ctx context.Context, workspaceID string, workID string) (store.NetworkWorkEntry, error)
GetWork returns one network work row by workspace_id and work_id.
func (*GlobalDB) GetWorkspace ¶
GetWorkspace loads a workspace registration by primary key.
func (*GlobalDB) GetWorkspaceByName ¶
func (g *GlobalDB) GetWorkspaceByName(ctx context.Context, name string) (aghworkspace.Workspace, error)
GetWorkspaceByName loads a workspace registration by unique workspace name.
func (*GlobalDB) GetWorkspaceByPath ¶
func (g *GlobalDB) GetWorkspaceByPath(ctx context.Context, rootDir string) (aghworkspace.Workspace, error)
GetWorkspaceByPath loads a workspace registration by canonical root directory.
func (*GlobalDB) HasDependencyPath ¶
func (g *GlobalDB) 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 (*GlobalDB) HeartbeatRunLease ¶
func (g *GlobalDB) HeartbeatRunLease(ctx context.Context, heartbeat taskpkg.LeaseHeartbeat) (taskpkg.Run, error)
HeartbeatRunLease extends one active task-run lease after token verification.
func (*GlobalDB) InsertBridgeInstance ¶
InsertBridgeInstance creates a new persisted bridge instance row.
func (*GlobalDB) InsertWorkspace ¶
InsertWorkspace creates a new persisted workspace registration row.
func (*GlobalDB) IsTaskEffectivelyPaused ¶
func (g *GlobalDB) IsTaskEffectivelyPaused(ctx context.Context, taskID string) (bool, string, error)
IsTaskEffectivelyPaused reports whether a task or one of its ancestors is paused.
func (*GlobalDB) ListAutonomyLeaseHandles ¶
func (g *GlobalDB) 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 (*GlobalDB) ListBridgeInstances ¶
ListBridgeInstances returns all persisted bridge instances in stable display-name order.
func (*GlobalDB) ListBridgeRoutes ¶
func (g *GlobalDB) ListBridgeRoutes(ctx context.Context, bridgeInstanceID string) ([]bridges.BridgeRoute, error)
ListBridgeRoutes returns persisted routes for one bridge instance ordered by recency.
func (*GlobalDB) ListBridgeSecretBindings ¶
func (g *GlobalDB) ListBridgeSecretBindings( ctx context.Context, bridgeInstanceID string, ) ([]bridges.BridgeSecretBinding, error)
ListBridgeSecretBindings returns the persisted secret bindings for one bridge instance.
func (*GlobalDB) ListBridgeTargets ¶
func (g *GlobalDB) ListBridgeTargets( ctx context.Context, query bridges.BridgeTargetQuery, ) (bridges.BridgeTargetPage, error)
ListBridgeTargets returns target-directory rows plus bridge-level refresh freshness.
func (*GlobalDB) ListBridgeTaskSubscriptions ¶
func (g *GlobalDB) ListBridgeTaskSubscriptions( ctx context.Context, query bridges.BridgeTaskSubscriptionQuery, ) (subscriptions []bridges.BridgeTaskSubscription, err error)
ListBridgeTaskSubscriptions returns active bridge task subscriptions matching the query.
func (*GlobalDB) ListConversationMessages ¶
func (g *GlobalDB) ListConversationMessages( ctx context.Context, ref store.NetworkConversationRef, query store.NetworkConversationMessageQuery, ) (entries []store.NetworkConversationMessage, err error)
ListConversationMessages returns messages isolated to one conversation container.
func (*GlobalDB) ListCursors ¶
func (g *GlobalDB) ListCursors( ctx context.Context, query notifications.CursorQuery, ) (cursors []notifications.Cursor, err error)
ListCursors lists durable notification cursors matching the query.
func (*GlobalDB) ListDependencies ¶
func (g *GlobalDB) ListDependencies(ctx context.Context, taskID string) ([]taskpkg.Dependency, error)
ListDependencies returns the persisted dependency edges for one task.
func (*GlobalDB) ListDependents ¶
func (g *GlobalDB) ListDependents(ctx context.Context, dependsOnTaskID string) ([]taskpkg.Dependency, error)
ListDependents returns persisted dependency edges that point at one task.
func (*GlobalDB) ListDirectRooms ¶
func (g *GlobalDB) ListDirectRooms( ctx context.Context, ref store.NetworkChannelRef, query store.NetworkDirectRoomQuery, ) (summaries []store.NetworkDirectRoomSummary, err error)
ListDirectRooms returns direct-room summaries for one channel.
func (*GlobalDB) ListEventSummaries ¶
func (g *GlobalDB) ListEventSummaries( ctx context.Context, query store.EventSummaryQuery, ) ([]store.EventSummary, error)
ListEventSummaries returns global event summaries filtered by the supplied options.
func (*GlobalDB) ListHeartbeatRevisions ¶
func (g *GlobalDB) ListHeartbeatRevisions( ctx context.Context, query heartbeat.RevisionListQuery, ) (revisions []heartbeat.Revision, err error)
ListHeartbeatRevisions lists managed Heartbeat authoring revisions in newest-first order.
func (*GlobalDB) ListHeartbeatSnapshots ¶
func (g *GlobalDB) ListHeartbeatSnapshots( ctx context.Context, query heartbeat.SnapshotListQuery, ) (snapshots []heartbeat.Snapshot, err error)
ListHeartbeatSnapshots lists persisted Heartbeat snapshots in newest-first order.
func (*GlobalDB) ListHeartbeatWakeEvents ¶
func (g *GlobalDB) ListHeartbeatWakeEvents( ctx context.Context, query heartbeat.WakeEventListQuery, ) (events []heartbeat.WakeEvent, err error)
ListHeartbeatWakeEvents lists retained Heartbeat wake audit rows in newest-first order.
func (*GlobalDB) ListHeartbeatWakeState ¶
func (g *GlobalDB) ListHeartbeatWakeState( ctx context.Context, query heartbeat.WakeStateListQuery, ) (states []heartbeat.WakeState, err error)
ListHeartbeatWakeState lists Heartbeat wake state rows in newest-first order.
func (*GlobalDB) ListJobEnabledOverlays ¶
func (g *GlobalDB) ListJobEnabledOverlays(ctx context.Context) ([]automation.JobEnabledOverlay, error)
ListJobEnabledOverlays returns all persisted job enabled overlays.
func (*GlobalDB) ListJobs ¶
func (g *GlobalDB) ListJobs(ctx context.Context, query automation.JobListQuery) ([]automation.Job, error)
ListJobs returns persisted automation jobs using the supplied filters.
func (*GlobalDB) ListMCPAuthTokens ¶
ListMCPAuthTokens returns all persisted token records.
func (*GlobalDB) ListNetworkAudit ¶
func (g *GlobalDB) ListNetworkAudit( ctx context.Context, query store.NetworkAuditQuery, ) (entries []store.NetworkAuditEntry, err error)
ListNetworkAudit returns network audit rows filtered by the supplied options.
func (*GlobalDB) ListNetworkChannels ¶
func (g *GlobalDB) ListNetworkChannels( ctx context.Context, query store.NetworkChannelQuery, ) (entries []store.NetworkChannelEntry, err error)
ListNetworkChannels returns persisted network channel metadata rows.
func (*GlobalDB) ListNetworkMessages ¶
func (g *GlobalDB) ListNetworkMessages( ctx context.Context, query store.NetworkMessageQuery, ) (entries []store.NetworkMessageEntry, err error)
ListNetworkMessages returns persisted network timeline rows filtered by the supplied options.
func (*GlobalDB) ListPermissionLog ¶
func (g *GlobalDB) ListPermissionLog( ctx context.Context, query store.PermissionLogQuery, ) ([]store.PermissionLogEntry, error)
ListPermissionLog returns permission audit rows filtered by the supplied options.
func (*GlobalDB) ListPresets ¶
func (g *GlobalDB) ListPresets( ctx context.Context, query presetspkg.Query, ) (items []presetspkg.Preset, err error)
func (*GlobalDB) ListProcessRecords ¶
func (g *GlobalDB) ListProcessRecords( ctx context.Context, query toolruntime.ProcessQuery, ) ([]toolruntime.ProcessRecord, error)
ListProcessRecords returns process records matching the query.
func (*GlobalDB) ListRows ¶
func (g *GlobalDB) ListRows( ctx context.Context, opts modelcatalog.ListOptions, ) (catalogRows []modelcatalog.ModelRow, err error)
ListRows returns deterministic catalog source rows matching the query.
func (*GlobalDB) ListRunReviews ¶
func (g *GlobalDB) ListRunReviews( ctx context.Context, query taskpkg.RunReviewQuery, ) ([]taskpkg.RunReview, error)
ListRunReviews returns persisted run reviews that match the supplied filters.
func (*GlobalDB) ListRuns ¶
func (g *GlobalDB) ListRuns(ctx context.Context, query automation.RunQuery) ([]automation.Run, error)
ListRuns returns filtered automation run history rows.
func (*GlobalDB) ListSchedulerStates ¶
func (g *GlobalDB) ListSchedulerStates(ctx context.Context) ([]automation.SchedulerState, error)
ListSchedulerStates returns every durable automation scheduler cursor.
func (*GlobalDB) ListSessionHealth ¶
func (g *GlobalDB) ListSessionHealth( ctx context.Context, query heartbeat.SessionHealthListQuery, ) (rowsOut []heartbeat.SessionHealth, err error)
ListSessionHealth lists metadata-only session health rows in newest-first order.
func (*GlobalDB) ListSessionHealthRecoveryInputs ¶
func (g *GlobalDB) ListSessionHealthRecoveryInputs(ctx context.Context, limit int) ([]heartbeat.SessionHealth, error)
ListSessionHealthRecoveryInputs returns persisted rows that restart recovery must recompute before wake.
func (*GlobalDB) ListSessions ¶
func (g *GlobalDB) ListSessions(ctx context.Context, query store.SessionListQuery) ([]store.SessionInfo, error)
ListSessions returns indexed sessions ordered by most recent update.
func (*GlobalDB) ListSoulRevisions ¶
func (g *GlobalDB) ListSoulRevisions( ctx context.Context, query soul.RevisionListQuery, ) (revisions []soul.Revision, err error)
ListSoulRevisions lists managed authoring revisions in newest-first order.
func (*GlobalDB) ListSoulSnapshots ¶
func (g *GlobalDB) ListSoulSnapshots( ctx context.Context, query soul.SnapshotListQuery, ) (snapshots []soul.Snapshot, err error)
ListSoulSnapshots lists persisted Soul snapshots in newest-first order.
func (*GlobalDB) ListSourceStatus ¶
func (g *GlobalDB) ListSourceStatus( ctx context.Context, providerID string, ) (statuses []modelcatalog.SourceStatus, err error)
ListSourceStatus returns provider-scoped source status rows.
func (*GlobalDB) ListTaskEventRecords ¶
func (g *GlobalDB) ListTaskEventRecords( ctx context.Context, query taskpkg.EventRecordQuery, ) ([]taskpkg.EventRecord, error)
ListTaskEventRecords returns persisted task events ordered by stable sequence for live replay.
func (*GlobalDB) ListTaskEvents ¶
func (g *GlobalDB) ListTaskEvents(ctx context.Context, query taskpkg.EventQuery) ([]taskpkg.Event, error)
ListTaskEvents returns persisted audit events that match the supplied filters.
func (*GlobalDB) ListTaskRuns ¶
ListTaskRuns returns persisted runs that match the supplied filters.
func (*GlobalDB) ListTaskRunsByStatus ¶
func (g *GlobalDB) ListTaskRunsByStatus( ctx context.Context, statuses []taskpkg.RunStatus, ) ([]taskpkg.Run, error)
ListTaskRunsByStatus returns persisted runs that match any of the supplied statuses.
func (*GlobalDB) ListTaskTriageStates ¶
func (g *GlobalDB) ListTaskTriageStates( ctx context.Context, actor taskpkg.ActorIdentity, ) ([]taskpkg.TriageState, error)
ListTaskTriageStates returns all durable triage states persisted for one actor.
func (*GlobalDB) ListTasks ¶
ListTasks returns durable task summaries that match the supplied filters.
func (*GlobalDB) ListThreads ¶
func (g *GlobalDB) ListThreads( ctx context.Context, ref store.NetworkChannelRef, query store.NetworkThreadQuery, ) (summaries []store.NetworkThreadSummary, err error)
ListThreads returns public-thread summaries for one channel.
func (*GlobalDB) ListTokenStats ¶
func (g *GlobalDB) ListTokenStats(ctx context.Context, query store.TokenStatsQuery) ([]store.TokenStats, error)
ListTokenStats returns aggregated token usage rows.
func (*GlobalDB) ListTriggerEnabledOverlays ¶
func (g *GlobalDB) ListTriggerEnabledOverlays(ctx context.Context) ([]automation.TriggerEnabledOverlay, error)
ListTriggerEnabledOverlays returns all persisted trigger enabled overlays.
func (*GlobalDB) ListTriggers ¶
func (g *GlobalDB) ListTriggers(ctx context.Context, query automation.TriggerListQuery) ([]automation.Trigger, error)
ListTriggers returns persisted automation triggers using the supplied filters.
func (*GlobalDB) ListVaultSecrets ¶
func (g *GlobalDB) ListVaultSecrets(ctx context.Context, prefix string) (_ []vault.Record, err error)
ListVaultSecrets returns encrypted vault secret records filtered by ref prefix.
func (*GlobalDB) ListWorkspaces ¶
ListWorkspaces returns all registered workspaces in stable name order.
func (*GlobalDB) LookupRunReviewBySession ¶
func (g *GlobalDB) LookupRunReviewBySession(ctx context.Context, sessionID string) (taskpkg.RunReview, error)
LookupRunReviewBySession returns the active run review bound to one reviewer session.
func (*GlobalDB) MarkSessionHealthStale ¶
func (g *GlobalDB) 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 (*GlobalDB) MarkSessionInputFailed ¶
func (g *GlobalDB) MarkSessionInputFailed( ctx context.Context, sessionID string, entryID string, summary string, now time.Time, ) error
MarkSessionInputFailed records a dispatch failure for one queue entry.
func (*GlobalDB) MarkSessionInputSent ¶
func (g *GlobalDB) MarkSessionInputSent( ctx context.Context, sessionID string, entryID string, now time.Time, ) error
MarkSessionInputSent records successful dispatch for one queue entry.
func (*GlobalDB) PauseTask ¶
func (g *GlobalDB) PauseTask(ctx context.Context, mutation taskpkg.PauseMutation) (taskpkg.Task, error)
PauseTask marks one task as paused for future claim eligibility.
func (*GlobalDB) PutBridgeIngestDedup ¶
func (g *GlobalDB) PutBridgeIngestDedup(ctx context.Context, record bridges.IngestDedupRecord) error
PutBridgeIngestDedup inserts or refreshes an ingest dedup record.
func (*GlobalDB) PutBridgeRoute ¶
PutBridgeRoute inserts or refreshes a persisted bridge route row.
func (*GlobalDB) PutBridgeSecretBinding ¶
func (g *GlobalDB) PutBridgeSecretBinding(ctx context.Context, binding bridges.BridgeSecretBinding) error
PutBridgeSecretBinding inserts or refreshes a persisted secret binding row.
func (*GlobalDB) PutBridgeTaskSubscription ¶
func (g *GlobalDB) PutBridgeTaskSubscription( ctx context.Context, subscription bridges.BridgeTaskSubscription, ) error
PutBridgeTaskSubscription inserts or refreshes a terminal task notification subscription.
func (*GlobalDB) PutVaultSecret ¶
PutVaultSecret stores one encrypted vault secret record.
func (*GlobalDB) ReconcileSessions ¶
func (g *GlobalDB) ReconcileSessions( ctx context.Context, sessions []store.SessionInfo, ) (result store.ReconcileResult, err error)
ReconcileSessions upserts on-disk sessions and marks missing ones as orphaned.
func (*GlobalDB) RecordCursorError ¶
func (g *GlobalDB) RecordCursorError( ctx context.Context, report notifications.CursorError, ) (cursor notifications.Cursor, err error)
RecordCursorError stores a cursor diagnostic without moving delivery progress.
func (*GlobalDB) RecordHeartbeatWakeDecision ¶
func (g *GlobalDB) 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 (*GlobalDB) RecordRunDeliveryError ¶
func (g *GlobalDB) 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 (*GlobalDB) RecordRunReview ¶
func (g *GlobalDB) 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 (*GlobalDB) RecoverExpiredRunLeases ¶
func (g *GlobalDB) RecoverExpiredRunLeases( ctx context.Context, recovery taskpkg.ExpiredLeaseRecovery, ) ([]taskpkg.ExpiredLeaseRecoveryResult, error)
RecoverExpiredRunLeases requeues stale active leases without issuing new ownership.
func (*GlobalDB) RefreshBridgeTargets ¶
func (g *GlobalDB) RefreshBridgeTargets( ctx context.Context, bridgeID string, targets []bridges.BridgeTarget, refreshedAt time.Time, ) error
RefreshBridgeTargets transactionally persists one daemon-owned target-directory snapshot.
func (*GlobalDB) RegisterSession ¶
RegisterSession inserts or refreshes a session index row.
func (*GlobalDB) ReleaseRunLease ¶
func (g *GlobalDB) 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 (*GlobalDB) ReleaseSessionInput ¶
func (g *GlobalDB) 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 (*GlobalDB) ReplaceBridgeInstances ¶
func (g *GlobalDB) ReplaceBridgeInstances(ctx context.Context, instances []bridges.BridgeInstance) (err error)
ReplaceBridgeInstances atomically swaps the daemon-visible bridge instance projection.
func (*GlobalDB) ReplaceSourceRows ¶
func (g *GlobalDB) 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.
func (*GlobalDB) RequestRunReview ¶
func (g *GlobalDB) 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 (*GlobalDB) ReserveQueuedRun ¶
func (g *GlobalDB) ReserveQueuedRun( ctx context.Context, taskID string, runID string, idempotencyKey string, origin taskpkg.Origin, requestedChannel string, metadata json.RawMessage, queuedAt time.Time, ) (taskpkg.Task, taskpkg.Run, bool, error)
ReserveQueuedRun atomically allocates one queued run attempt and optional idempotency binding.
func (*GlobalDB) ResetCursor ¶
func (g *GlobalDB) ResetCursor( ctx context.Context, reset notifications.ResetCursor, ) (cursor notifications.Cursor, err error)
ResetCursor rewinds or repairs one cursor after an explicit recovery decision.
func (*GlobalDB) ResetOnboarding ¶
ResetOnboarding clears first-run completion so onboarding is shown again.
func (*GlobalDB) ResolveBridgeRoute ¶
func (g *GlobalDB) 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 (*GlobalDB) ResolveDirectRoom ¶
func (g *GlobalDB) ResolveDirectRoom( ctx context.Context, entry store.NetworkDirectRoomEntry, ) (summary store.NetworkDirectRoomSummary, err error)
ResolveDirectRoom inserts or returns the deterministic two-party room.
func (*GlobalDB) ResumeTask ¶
func (g *GlobalDB) ResumeTask(ctx context.Context, mutation taskpkg.ResumeMutation) (taskpkg.Task, error)
ResumeTask clears one task pause for future claim eligibility.
func (*GlobalDB) RetryTaskRun ¶
func (g *GlobalDB) RetryTaskRun( ctx context.Context, retry taskpkg.RetryRunMutation, ) (taskpkg.RetryRunResult, error)
RetryTaskRun creates one queued retry run linked to a failed source run.
func (*GlobalDB) SaveMCPAuthToken ¶
SaveMCPAuthToken persists one remote MCP OAuth token record.
func (*GlobalDB) SaveSchedulerState ¶
func (g *GlobalDB) SaveSchedulerState( ctx context.Context, state automation.SchedulerState, ) (automation.SchedulerState, error)
SaveSchedulerState upserts one durable automation scheduler cursor.
func (*GlobalDB) SaveTaskRunIdempotency ¶
SaveTaskRunIdempotency inserts one origin-scoped idempotency binding for a persisted run.
func (*GlobalDB) SchedulerBacklog ¶
func (g *GlobalDB) SchedulerBacklog( ctx context.Context, query taskpkg.SchedulerBacklogQuery, ) (backlog taskpkg.SchedulerBacklog, err error)
SchedulerBacklog returns queued task runs ordered by scheduler priority.
func (*GlobalDB) SessionInputQueueSummary ¶
func (g *GlobalDB) SessionInputQueueSummary( ctx context.Context, sessionID string, ) (summary store.SessionInputQueueSummary, err error)
SessionInputQueueSummary returns the current generation and active pending counts for one session.
func (*GlobalDB) SetAppMetadata ¶
SetAppMetadata upserts the value stored under key.
func (*GlobalDB) SetJobEnabledOverlay ¶
func (g *GlobalDB) SetJobEnabledOverlay( ctx context.Context, overlay automation.JobEnabledOverlay, ) (automation.JobEnabledOverlay, error)
SetJobEnabledOverlay upserts the runtime enabled override for a config-backed job.
func (*GlobalDB) SetSchedulerPaused ¶
func (g *GlobalDB) SetSchedulerPaused( ctx context.Context, actor string, reason string, ) (taskpkg.SchedulerPauseState, error)
SetSchedulerPaused marks the scheduler-wide pause singleton as paused.
func (*GlobalDB) SetSchedulerResumed ¶
SetSchedulerResumed clears the scheduler-wide pause singleton.
func (*GlobalDB) SetTriggerEnabledOverlay ¶
func (g *GlobalDB) SetTriggerEnabledOverlay( ctx context.Context, overlay automation.TriggerEnabledOverlay, ) (automation.TriggerEnabledOverlay, error)
SetTriggerEnabledOverlay upserts the runtime enabled override for a config-backed trigger.
func (*GlobalDB) StageSessionSteer ¶
func (g *GlobalDB) StageSessionSteer( ctx context.Context, req store.SessionInputQueueInsert, ) (entry store.SessionInputQueueEntry, err error)
StageSessionSteer replaces any active staged steer entry for the session.
func (*GlobalDB) SweepExpiredSessionAttachLocks ¶
func (g *GlobalDB) SweepExpiredSessionAttachLocks(ctx context.Context, now time.Time) (int64, error)
SweepExpiredSessionAttachLocks clears expired attach leases from the session catalog.
func (*GlobalDB) SweepHeartbeatWakeEvents ¶
func (g *GlobalDB) SweepHeartbeatWakeEvents(ctx context.Context, cutoff time.Time, limit int) (int64, error)
SweepHeartbeatWakeEvents deletes expired wake audit rows in one bounded batch.
func (*GlobalDB) SweepObservability ¶
func (g *GlobalDB) SweepObservability( ctx context.Context, cutoff time.Time, ) (result store.ObservabilityRetentionSweepResult, err error)
SweepObservability removes global observability rows older than cutoff.
func (*GlobalDB) UpdateBridgeInstance ¶
UpdateBridgeInstance updates an existing persisted bridge instance row.
func (*GlobalDB) UpdateJob ¶
func (g *GlobalDB) UpdateJob(ctx context.Context, job automation.Job) (automation.Job, error)
UpdateJob replaces the mutable fields of a persisted automation job definition.
func (*GlobalDB) UpdatePreset ¶
func (g *GlobalDB) UpdatePreset( ctx context.Context, name string, req presetspkg.UpdateRequest, ) (presetspkg.Preset, error)
func (*GlobalDB) UpdateProcessRecordState ¶
func (g *GlobalDB) UpdateProcessRecordState(ctx context.Context, update toolruntime.ProcessStateUpdate) error
UpdateProcessRecordState mutates lifecycle fields for one process record.
func (*GlobalDB) UpdateRun ¶
func (g *GlobalDB) UpdateRun(ctx context.Context, run automation.Run) (automation.Run, error)
UpdateRun replaces the mutable fields of a persisted automation run.
func (*GlobalDB) UpdateSessionSoulSnapshot ¶
func (g *GlobalDB) UpdateSessionSoulSnapshot(ctx context.Context, update store.SessionSoulSnapshotUpdate) error
UpdateSessionSoulSnapshot updates only the Soul provenance fields on a session row.
func (*GlobalDB) UpdateSessionState ¶
UpdateSessionState updates the mutable session state fields.
func (*GlobalDB) UpdateTask ¶
UpdateTask replaces the persisted canonical task record.
func (*GlobalDB) UpdateTaskRun ¶
UpdateTaskRun replaces the persisted canonical task-run record.
func (*GlobalDB) UpdateTokenStats ¶
UpdateTokenStats merges one or more turns of token usage into the session aggregate.
func (*GlobalDB) UpdateTrigger ¶
func (g *GlobalDB) UpdateTrigger(ctx context.Context, trigger automation.Trigger) (automation.Trigger, error)
UpdateTrigger replaces the mutable fields of a persisted automation trigger definition.
func (*GlobalDB) UpdateWorkspace ¶
UpdateWorkspace updates an existing persisted workspace registration row.
func (*GlobalDB) UpsertExecutionProfile ¶
func (g *GlobalDB) UpsertExecutionProfile( ctx context.Context, profile *taskpkg.ExecutionProfile, ) (stored taskpkg.ExecutionProfile, err error)
UpsertExecutionProfile replaces one task-owned execution profile and its selectors atomically.
func (*GlobalDB) UpsertHeartbeatSnapshot ¶
func (g *GlobalDB) 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 (*GlobalDB) UpsertHeartbeatWakeState ¶
func (g *GlobalDB) UpsertHeartbeatWakeState( ctx context.Context, state heartbeat.WakeState, ) (heartbeat.WakeState, error)
UpsertHeartbeatWakeState stores the latest per-session Heartbeat wake summary.
func (*GlobalDB) UpsertProcessRecord ¶
func (g *GlobalDB) UpsertProcessRecord(ctx context.Context, record toolruntime.ProcessRecord) error
UpsertProcessRecord writes one durable process checkpoint.
func (*GlobalDB) UpsertSessionHealth ¶
func (g *GlobalDB) UpsertSessionHealth( ctx context.Context, health heartbeat.SessionHealth, ) (heartbeat.SessionHealth, error)
UpsertSessionHealth stores the latest metadata-only health row for one session.
func (*GlobalDB) UpsertSoulSnapshot ¶
func (g *GlobalDB) UpsertSoulSnapshot(ctx context.Context, snapshot soul.Snapshot) (soul.Snapshot, error)
UpsertSoulSnapshot inserts a resolved Soul snapshot or reuses the existing row for its digest.
func (*GlobalDB) UpsertTaskTriageState ¶
UpsertTaskTriageState inserts or replaces one durable actor-scoped triage state.
func (*GlobalDB) WithDeleteTaskTransaction ¶
func (g *GlobalDB) 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 (*GlobalDB) WriteConversationMessage ¶
func (g *GlobalDB) WriteConversationMessage( ctx context.Context, entry store.NetworkConversationMessage, ) (result store.NetworkConversationWriteResult, err error)
WriteConversationMessage persists one message and its derived state atomically.
func (*GlobalDB) WriteEventSummary ¶
WriteEventSummary stores a lightweight cross-session summary entry.
func (*GlobalDB) WriteNetworkAudit ¶
WriteNetworkAudit stores one network audit row.
func (*GlobalDB) WriteNetworkChannel ¶
WriteNetworkChannel upserts durable network channel metadata.
func (*GlobalDB) WriteNetworkMessage ¶
WriteNetworkMessage stores one persisted network timeline envelope, ignoring duplicate message ids.
func (*GlobalDB) WritePermissionLog ¶
WritePermissionLog stores one permission decision audit row.
Source Files
¶
- global_db.go
- global_db_app_metadata.go
- global_db_automation.go
- global_db_automation_scheduler.go
- global_db_bridge.go
- global_db_bridge_targets.go
- global_db_bundles.go
- global_db_heartbeat.go
- global_db_mcp_auth.go
- global_db_model_catalog.go
- global_db_network_audit.go
- global_db_network_channels.go
- global_db_network_conversations.go
- global_db_network_messages.go
- global_db_notification_cursor.go
- global_db_notification_preset.go
- global_db_observe.go
- global_db_permission.go
- global_db_scheduler_pause.go
- global_db_session.go
- global_db_session_input_queue.go
- global_db_soul.go
- global_db_task.go
- global_db_task_aux.go
- global_db_task_claim.go
- global_db_task_force.go
- global_db_task_pause.go
- global_db_task_profile.go
- global_db_task_projection.go
- global_db_task_review.go
- global_db_toolruntime.go
- global_db_vault.go
- global_db_vault_service.go
- global_db_workspace.go
- migrate_bridge_task_subscription.go
- migrate_heartbeat.go
- migrate_model_catalog.go
- migrate_notification_cursor.go
- migrate_prod_ready_foundation.go
- migrate_soul.go
- migrate_task_orchestration_profile.go
- migrate_task_review_gate.go
- migrate_workspace.go
- schema_bridge_task_subscription.go
- schema_model_catalog.go
- schema_notification_cursor.go
- schema_notification_preset.go
- schema_task_orchestration_profile.go
- schema_task_review_gate.go
- tx_helpers.go