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, readScope store.ReadScope, workspaceID string) (grants []toolspkg.ApprovalGrant, err 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, profileID, workspaceID, id string) error
- type ApprovalPendingRepo
- func (g *ApprovalPendingRepo) CompleteApprovalExecution(ctx context.Context, approvalID string, ...) (toolspkg.ApprovalStatus, error)
- func (g *ApprovalPendingRepo) CreateApproval(ctx context.Context, approvalID string, request toolspkg.ApprovalRequest, ...) (toolspkg.ApprovalStatus, error)
- func (g *ApprovalPendingRepo) ExpireApprovals(ctx context.Context, now time.Time) ([]toolspkg.ApprovalStatus, error)
- func (g *ApprovalPendingRepo) GetApproval(ctx context.Context, approvalID string) (toolspkg.ApprovalStatus, error)
- func (g *ApprovalPendingRepo) ListPendingApprovals(ctx context.Context) ([]toolspkg.ApprovalStatus, error)
- func (g *ApprovalPendingRepo) RecoverDispatchingApprovals(ctx context.Context, now time.Time) ([]toolspkg.ApprovalStatus, error)
- func (g *ApprovalPendingRepo) ResolveApproval(ctx context.Context, approvalID string, outcome toolspkg.ApprovalOutcome, ...) (toolspkg.ApprovalStatus, error)
- type AttentionRepo
- func (r *AttentionRepo) IsAttentionWorkspaceMuted(ctx context.Context, profileID string, workspaceID string) (bool, error)
- func (r *AttentionRepo) ListAttentionWorkspaceMutes(ctx context.Context, profileID string) ([]string, error)
- func (r *AttentionRepo) ReplaceAttentionWorkspaceMutes(ctx context.Context, profileID string, workspaceIDs []string) (err 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) (err 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, profileID string, 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, readScope store.ReadScope, workspaceID string, ...) ([]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) ReserveRun(ctx context.Context, reservation automation.RunReservation) (automation.RunReservationResult, error)
- func (g *AutomationRepo) ResolveSuggestion(ctx context.Context, profileID string, workspaceID string, id string, ...) (resolved automation.Suggestion, err error)
- func (g *AutomationRepo) RollbackSuggestionAcceptance(ctx context.Context, profileID string, workspaceID string, id string, ...) 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) (err 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, readScope store.ReadScope, 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, readScope store.ReadScope, 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, readScope store.ReadScope) (instances []bridges.BridgeInstance, err error)
- func (g *BridgeRepo) ListBridgeInstancesByIDs(ctx context.Context, readScope store.ReadScope, bridgeInstanceIDs []string) (instances []bridges.BridgeInstance, err error)
- func (g *BridgeRepo) ListBridgeRoutes(ctx context.Context, readScope store.ReadScope, 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) 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 CmdPaletteRepo
- func (r *CmdPaletteRepo) CmdPalettePersonalization(ctx context.Context, profileLensID cmdpalette.ProfileLensID, ...) (cmdpalette.PersonalizationRows, error)
- func (r *CmdPaletteRepo) DeleteCmdPalettePin(ctx context.Context, profileLensID cmdpalette.ProfileLensID, ...) error
- func (r *CmdPaletteRepo) PruneCmdPaletteCommand(ctx context.Context, profileLensID cmdpalette.ProfileLensID, ...) error
- func (r *CmdPaletteRepo) PruneCmdPaletteQueryHit(ctx context.Context, profileLensID cmdpalette.ProfileLensID, ...) error
- func (r *CmdPaletteRepo) PruneCmdPaletteUsage(ctx context.Context, profileLensID cmdpalette.ProfileLensID, ...) error
- func (r *CmdPaletteRepo) PutCmdPalettePin(ctx context.Context, profileLensID cmdpalette.ProfileLensID, ...) error
- func (r *CmdPaletteRepo) RecordCmdPaletteUsage(ctx context.Context, usage cmdpalette.Usage, weights cmdpalette.Weights) error
- func (r *CmdPaletteRepo) ResetCmdPalettePersonalization(ctx context.Context, profileLensID cmdpalette.ProfileLensID, ...) error
- type DeadEntityRepo
- func (g *DeadEntityRepo) ClearDeadEntity(ctx context.Context, key store.DeadEntityKey) error
- func (g *DeadEntityRepo) FindDeadEntity(ctx context.Context, key store.DeadEntityKey) (store.DeadEntity, bool, error)
- func (g *DeadEntityRepo) ListDeadEntities(ctx context.Context, readScope store.ReadScope, workspaceID string) (entities []store.DeadEntity, err error)
- func (g *DeadEntityRepo) MarkDeadEntity(ctx context.Context, entity store.DeadEntity) error
- type EventRecordInsert
- type ExtensionEnvRepo
- func (r *ExtensionEnvRepo) CountEnvBindingsBySecretRef(ctx context.Context, secretRef string) (int64, error)
- func (r *ExtensionEnvRepo) DeleteEnvBinding(ctx context.Context, extension, profileID, workspaceID, envName string) error
- func (r *ExtensionEnvRepo) DeleteEnvBindings(ctx context.Context, extension, profileID, workspaceID string) error
- func (r *ExtensionEnvRepo) ListEnvBindings(ctx context.Context, extension string, profileID string, workspaceID string) ([]extensionenv.Binding, error)
- func (r *ExtensionEnvRepo) PutEnvBinding(ctx context.Context, binding extensionenv.Binding) error
- func (r *ExtensionEnvRepo) ResolveEnvBindings(ctx context.Context, extension string, profileID string, workspaceID string) (bindings []extensionenv.Binding, err error)
- type GatewayRepo
- func (g *GatewayRepo) CreateDevice(ctx context.Context, record gateway.StoredDeviceSession) error
- func (g *GatewayRepo) DeleteIngressBinding(ctx context.Context, expected gateway.IngressSubject) (bool, error)
- func (g *GatewayRepo) DisableAll(ctx context.Context) (bool, error)
- func (g *GatewayRepo) FindDeviceByTokenHash(ctx context.Context, tokenHash string, now time.Time) (gateway.StoredDeviceSession, error)
- func (g *GatewayRepo) GetDevice(ctx context.Context, deviceID string) (gateway.DeviceSession, error)
- func (g *GatewayRepo) GetIngressBinding(ctx context.Context, ref gateway.IngressSubjectRef) (gateway.IngressBinding, error)
- func (g *GatewayRepo) GetIngressEndpoint(ctx context.Context, tier gateway.Tier) (gateway.IngressEndpointState, error)
- func (g *GatewayRepo) ListDevices(ctx context.Context) ([]gateway.DeviceSession, error)
- func (g *GatewayRepo) ListIngressBindings(ctx context.Context) ([]gateway.IngressBinding, error)
- func (g *GatewayRepo) MarkIngressEndpointUnavailable(ctx context.Context, tier gateway.Tier, now time.Time) error
- func (g *GatewayRepo) ProviderIdentity(ctx context.Context, name string) (gateway.ProviderIdentity, error)
- func (g *GatewayRepo) PutIngressBinding(ctx context.Context, expected gateway.IngressSubject, ...) (_ gateway.IngressBinding, changed bool, err error)
- func (g *GatewayRepo) RenameDevice(ctx context.Context, deviceID string, name string) (gateway.DeviceSession, error)
- func (g *GatewayRepo) RenameDeviceForActor(ctx context.Context, actorID string, actorEpoch uint64, deviceID string, ...) (gateway.DeviceSession, error)
- func (g *GatewayRepo) ResolveIngressSubject(ctx context.Context, ref gateway.IngressSubjectRef) (gateway.IngressSubject, error)
- func (g *GatewayRepo) RevalidateDeviceEpoch(ctx context.Context, deviceID string, epoch uint64) error
- func (g *GatewayRepo) RevokeDevice(ctx context.Context, deviceID string, now time.Time) (gateway.DeviceSession, bool, error)
- func (g *GatewayRepo) RevokeDeviceForActor(ctx context.Context, actorID string, actorEpoch uint64, deviceID string, ...) (gateway.DeviceSession, bool, error)
- func (g *GatewayRepo) SetObserved(ctx context.Context, plan gateway.TierPlan, ...) (bool, error)
- func (g *GatewayRepo) Snapshot(ctx context.Context) (_ gateway.Snapshot, err error)
- func (g *GatewayRepo) SweepOrphanedIngressBindings(ctx context.Context) (int64, error)
- func (g *GatewayRepo) SyncIngressEndpoint(ctx context.Context, tier gateway.Tier, endpointURL string, now time.Time) (_ gateway.IngressEndpointState, changed bool, err error)
- func (g *GatewayRepo) Transition(ctx context.Context, req gateway.TransitionRequest, now time.Time) (bool, error)
- type GlobalDB
- func (g *GlobalDB) Close(ctx context.Context) error
- func (g *GlobalDB) DB() *sql.DB
- func (g *GlobalDB) ExecuteProfileWrite(ctx context.Context, action string, run func(ProfileWriteExecutor) error) error
- func (g *GlobalDB) FinishExitOperationWithEvent(ctx context.Context, workspaceID string, worktreeID string, opID string, ...) (bool, error)
- func (g *GlobalDB) HasActiveWorktreeSession(ctx context.Context, workspaceID string, worktreeID string) (bool, error)
- func (g *GlobalDB) Path() string
- func (g *GlobalDB) PublishWorktreeEvent(ctx context.Context, event worktree.LifecycleEvent) error
- func (g *GlobalDB) VerifyDefaultProfile(ctx context.Context) error
- func (g *GlobalDB) WorktreeStore() worktree.Store
- 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) AllocateSessionBindingAttempt(ctx context.Context, req *goal.AllocateBindingAttemptRequest) (goal.SessionBinding, 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)
- 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) AcknowledgeLoopEffect(ctx context.Context, ack looppkg.EffectAcknowledgement) (bool, error)
- func (g *LoopRepo) AdvanceLoopRunProgress(ctx context.Context, loopRunID string, at time.Time) error
- func (g *LoopRepo) AdvanceNodeCancellation(ctx context.Context, mutation looppkg.CancellationMutation, ...) (looppkg.CancellationResult, error)
- func (g *LoopRepo) AdvanceRunCancellation(ctx context.Context, mutation looppkg.CancellationMutation, ...) (looppkg.CancellationResult, error)
- func (g *LoopRepo) AmendNodeOutput(ctx context.Context, input looppkg.AmendInput) (looppkg.NodeAmendment, error)
- func (g *LoopRepo) ApplyGenerationOutputOverlays(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ...) ([]looppkg.GenerationOutput, error)
- func (g *LoopRepo) BackfillLoopProvenance(ctx context.Context) (int, 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) CreateFork(ctx context.Context, request looppkg.ForkStoreRequest) (created looppkg.Run, replayed bool, err 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) CreateRerun(ctx context.Context, request looppkg.RerunStoreRequest) (result looppkg.RerunResult, replayed bool, err error)
- func (g *LoopRepo) DeleteLoopDefinitionState(ctx context.Context, ws looppkg.WorkspaceID, loopName string) (looppkg.DefinitionState, error)
- func (g *LoopRepo) DeleteRunHistory(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID) error
- func (g *LoopRepo) EnqueueDueLoopRetryWakesPage(ctx context.Context, origin taskpkg.Origin, now time.Time, ...) ([]taskpkg.Run, looppkg.RetryDueCursor, error)
- func (g *LoopRepo) EnqueueLoopCoordinatorWake(ctx context.Context, loopRunID string, idempotencyKey string, ...) (taskpkg.Run, bool, error)
- func (g *LoopRepo) EnqueueLoopRetryWakeIfCurrent(ctx context.Context, origin taskpkg.Origin, cell looppkg.RetryDueCell, ...) (returnRun taskpkg.Run, returnAdded bool, returnCurrent bool, returnErr 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) EscalateDueLoopWaitsPage(ctx context.Context, now time.Time, cursor looppkg.WaitEscalationCursor, ...) (looppkg.WaitEscalationCursor, error)
- func (g *LoopRepo) FindActiveLoopRun(ctx context.Context, ws looppkg.WorkspaceID, loopName string) (*looppkg.Run, error)
- func (g *LoopRepo) GetAdmissionClaim(ctx context.Context, workspaceID looppkg.WorkspaceID, loopName string, ...) (looppkg.AdmissionClaim, error)
- func (g *LoopRepo) GetGenerationOutputPayload(ctx context.Context, key looppkg.GenerationOutputPayloadKey) (json.RawMessage, 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) GetLoopRunEventHead(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID) (int64, error)
- func (g *LoopRepo) GetRequest(ctx context.Context, workspaceID looppkg.WorkspaceID, ref looppkg.RequestRef, ...) (looppkg.Request, error)
- func (g *LoopRepo) ImportRunHistory(ctx context.Context, command *looppkg.RunHistoryImport) error
- func (g *LoopRepo) ImportRunHistoryBatch(ctx context.Context, commands []*looppkg.RunHistoryImport) error
- func (g *LoopRepo) ListAvailableLoopOutputRefs(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID) (map[string]bool, error)
- func (g *LoopRepo) ListDueLoopRetries(ctx context.Context, now time.Time, cursor looppkg.RetryDueCursor, limit int) (returnCells []looppkg.RetryDueCell, returnCursor looppkg.RetryDueCursor, ...)
- func (g *LoopRepo) ListEffectOutbox(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID) ([]looppkg.EffectOutboxEntry, error)
- func (g *LoopRepo) ListForks(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID) (forks []looppkg.ForkRef, err error)
- func (g *LoopRepo) ListGateVerdicts(ctx context.Context, workspaceID string, runID string, generation int64) ([]gate.VerdictRecord, error)
- func (g *LoopRepo) ListGenerationOutputs(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ...) ([]looppkg.GenerationOutput, error)
- func (g *LoopRepo) ListGenerations(ctx context.Context, workspaceID string, runID string) ([]looppkg.LoopGeneration, 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) ListLoopRosterOutputs(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID) ([]looppkg.GenerationOutput, error)
- func (g *LoopRepo) ListLoopRosterRouteCauses(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID) ([]looppkg.RouteCause, error)
- func (g *LoopRepo) ListLoopRunEvents(ctx context.Context, query looppkg.RunEventQuery) ([]looppkg.RunEvent, error)
- func (g *LoopRepo) ListLoopRunEventsBackward(ctx context.Context, query looppkg.RunEventBackwardQuery) ([]looppkg.RunEvent, error)
- func (g *LoopRepo) ListLoopRunSummaries(ctx context.Context, workspaceID looppkg.WorkspaceID, runIDs []looppkg.RunID) (summaries map[looppkg.RunID]looppkg.RunListSummary, err 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) ListNodeAmendments(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID) ([]looppkg.NodeAmendment, error)
- func (g *LoopRepo) ListNodeAttempts(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID) ([]looppkg.NodeAttempt, error)
- func (g *LoopRepo) ListNodeControls(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID) ([]looppkg.NodeControl, error)
- func (g *LoopRepo) ListNodeInventory(ctx context.Context, query looppkg.NodeInventoryQuery) (page looppkg.NodeInventoryPage, returnErr error)
- func (g *LoopRepo) ListNodeWaits(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID) ([]looppkg.NodeWait, error)
- func (g *LoopRepo) ListParkedLoopWaitEventSubscriptions(ctx context.Context) ([]looppkg.ParkedWatchEventSubscription, error)
- func (g *LoopRepo) ListParkedLoopWaitEventSubscriptionsForLoopRun(ctx context.Context, runID string) ([]looppkg.ParkedWatchEventSubscription, error)
- func (g *LoopRepo) ListPendingCancellations(ctx context.Context, limit int) (pending []looppkg.PendingCancellation, err error)
- func (g *LoopRepo) ListPendingLoopEffects(ctx context.Context, limit int) ([]looppkg.EffectOutboxEntry, error)
- func (g *LoopRepo) ListRequests(ctx context.Context, workspaceID looppkg.WorkspaceID, ...) (page looppkg.RequestPage, err error)
- func (g *LoopRepo) ListRouteCauses(ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ...) ([]looppkg.RouteCause, error)
- func (g *LoopRepo) ListRouteCausingVerdicts(ctx context.Context, workspaceID string, runID string, generation int64) ([]gate.VerdictRecord, error)
- func (g *LoopRepo) LookupLoopGenerationOutputStatus(ctx context.Context, workspaceID string, loopRunID string, taskRunID string) (string, bool, error)
- func (g *LoopRepo) LookupRerunReplay(ctx context.Context, workspaceID looppkg.WorkspaceID, key string, ...) (looppkg.RerunResult, bool, error)
- func (g *LoopRepo) NeutralizeLoopRunOrphans(ctx context.Context) (looppkg.SweepReport, error)
- func (g *LoopRepo) PauseNode(ctx context.Context, mutation looppkg.NodePauseMutation) (looppkg.NodePauseResult, error)
- func (g *LoopRepo) PromoteOldestQueuedLoopRun(ctx context.Context, workspaceID string, loopName string, ...) (taskpkg.Run, bool, error)
- func (g *LoopRepo) ReactivateLoopCoordinator(ctx context.Context, req *looppkg.CoordinatorReactivationRequest) (looppkg.CoordinatorReactivationResult, 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) RecordNodeLiveness(ctx context.Context, observation looppkg.NodeLivenessObservation) 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) RequestNodeCancellation(ctx context.Context, mutation looppkg.CancellationMutation) (looppkg.CancellationResult, error)
- func (g *LoopRepo) RequestRunCancellation(ctx context.Context, mutation looppkg.CancellationMutation) (looppkg.CancellationResult, error)
- func (g *LoopRepo) RequeueNode(ctx context.Context, mutation looppkg.NodeRequeueMutation) (looppkg.NodeRequeueResult, error)
- func (g *LoopRepo) RespondRequest(ctx context.Context, input looppkg.RespondInput) (looppkg.RespondResult, error)
- func (g *LoopRepo) RestoreLoopDefinitionState(ctx context.Context, ws looppkg.WorkspaceID, loopName string, ...) error
- func (g *LoopRepo) ResumeDeadNode(ctx context.Context, request looppkg.DeadNodeResumeRequest) (looppkg.DeadNodeResumeResult, error)
- func (g *LoopRepo) ResumeDueLoopWaitsPage(ctx context.Context, now time.Time, cursor looppkg.WaitDueCursor, limit int) ([]taskpkg.Run, looppkg.WaitDueCursor, error)
- func (g *LoopRepo) ResumeNode(ctx context.Context, mutation looppkg.NodeResumeMutation) (looppkg.NodeResumeResult, error)
- func (g *LoopRepo) ResumeWait(ctx context.Context, mutation looppkg.WaitResumeMutation) (looppkg.WaitResumeResult, error)
- func (g *LoopRepo) SetLoopRunPauseRequested(ctx context.Context, ws looppkg.WorkspaceID, runID looppkg.RunID, ...) error
- func (g *LoopRepo) SweepAdmissionClaims(ctx context.Context, now time.Time, limit int) (int, error)
- func (g *LoopRepo) SweepLoopRunOrphans(ctx context.Context) (looppkg.SweepReport, 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
- func (g *ModelCatalogRepo) ReplaceSourceRowsBatch(ctx context.Context, replacements []modelcatalog.SourceRowsReplacement) 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, readScope store.ReadScope, ...) (store.NetworkDirectRoomSummary, error)
- func (g *NetworkRepo) GetNetworkAvailability(ctx context.Context) (store.NetworkAvailability, error)
- func (g *NetworkRepo) GetNetworkChannel(ctx context.Context, readScope store.ReadScope, 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, readScope store.ReadScope, ...) (store.NetworkThreadSummary, error)
- func (g *NetworkRepo) GetWork(ctx context.Context, readScope store.ReadScope, workspaceID 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) (recents []store.NetworkRecentSummary, err 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, readScope store.ReadScope, 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) AcquireDeliveryPermit(ctx context.Context, permit notifications.DeliveryPermit) error
- 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) ListDeliveryPermits(ctx context.Context) (_ []notifications.DeliveryPermit, err error)
- func (n *NotificationRepo) ListPresetsForProfile(ctx context.Context, query presetspkg.Query, profileID string) (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) SetPresetEnabled(ctx context.Context, name string, profileID string, enabled bool) 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) DeleteWorkspaceObservability(ctx context.Context, workspaceID string) error
- func (g *ObserveRepo) LatestEventSummaryAt(ctx context.Context, query store.OverviewWorkspaceQuery) (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) ListTokenUsageByProfile(ctx context.Context, query store.OverviewDayQuery) ([]store.TokenUsageProfileTotal, 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) WriteEventSummaries(ctx context.Context, summaries []store.EventSummary) (err error)
- func (g *ObserveRepo) WriteEventSummary(ctx context.Context, summary store.EventSummary) error
- type OpenOption
- type PermissionRepo
- type ProfileWriteExecutor
- 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) ClaimSessionPromptAdmission(ctx context.Context, req store.SessionPromptAdmissionRequest) (admission store.SessionPromptAdmission, created bool, err error)
- func (g *SessionRepo) CommitSessionPromptDispatch(ctx context.Context, workspaceID string, sessionID string, ...) error
- func (g *SessionRepo) CompleteSessionPromptAdmission(ctx context.Context, workspaceID string, sessionID string, ...) (store.SessionPromptAdmission, error)
- func (g *SessionRepo) CreatePendingInteraction(ctx context.Context, req store.PendingInteractionCreate) (commit store.SessionAttentionCommit, 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) EnqueueAdmittedSessionInput(ctx context.Context, admissionReq store.SessionPromptAdmissionRequest, ...) (admission store.SessionPromptAdmission, entry store.SessionInputQueueEntry, ...)
- func (g *SessionRepo) EnqueueInterruptSessionInput(ctx context.Context, req store.SessionInputQueueInsert) (entry store.SessionInputQueueEntry, canceled int, err 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) GetSessionAttention(ctx context.Context, sessionID string) (store.SessionAttention, 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) ListPendingInteractions(ctx context.Context, sessionID string, statuses []string) (interactions []store.PendingInteraction, err error)
- func (g *SessionRepo) ListPendingSessionInputs(ctx context.Context, sessionID 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) MarkSessionPromptAdmissionIndeterminate(ctx context.Context, workspaceID string, sessionID string, ...) error
- func (g *SessionRepo) MarkSessionSeen(ctx context.Context, sessionID string, at time.Time) (commit store.SessionAttentionCommit, err error)
- func (g *SessionRepo) MarkSessionSettled(ctx context.Context, sessionID string, seen bool, at time.Time) (commit store.SessionAttentionCommit, err 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) PromoteSessionInputToSteer(ctx context.Context, sessionID string, entryID 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) ReplaceSessionInput(ctx context.Context, sessionID string, entryID string, ...) (store.SessionInputQueueEntry, bool, error)
- func (g *SessionRepo) ReplaySessionPromptAdmission(ctx context.Context, req store.SessionPromptAdmissionRequest) (store.SessionPromptAdmission, bool, error)
- func (g *SessionRepo) SessionArchivedAt(ctx context.Context, workspaceID string, sessionID string) (*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) SetSessionArchived(ctx context.Context, workspaceID string, sessionID string, archived bool) (store.SessionInfo, error)
- func (g *SessionRepo) StageAdmittedSessionSteer(ctx context.Context, admissionReq store.SessionPromptAdmissionRequest, ...) (admission store.SessionPromptAdmission, entry store.SessionInputQueueEntry, ...)
- 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) TransitionPendingInteraction(ctx context.Context, req store.PendingInteractionTransition) (commit store.SessionAttentionCommit, err error)
- func (g *SessionRepo) UpdateSessionState(ctx context.Context, update store.SessionStateUpdate) error
- type SkillExposureRepo
- func (r *SkillExposureRepo) CreateSkillExposure(ctx context.Context, record store.SkillExposureRecord) (store.SkillExposureRecord, error)
- func (r *SkillExposureRepo) DeleteSkillExposure(ctx context.Context, id int64) error
- func (r *SkillExposureRepo) GetSkillExposureByOwnerTarget(ctx context.Context, skillName string, ...) (store.SkillExposureRecord, error)
- func (r *SkillExposureRepo) ListSkillExposuresByCanonicalDir(ctx context.Context, canonicalDir string) ([]store.SkillExposureRecord, error)
- func (r *SkillExposureRepo) ListSkillExposuresByOwner(ctx context.Context, skillName string, ...) ([]store.SkillExposureRecord, 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) AdvanceTerminalRunCommandPhase(ctx context.Context, command taskpkg.TerminalRunCommand, ...) (taskpkg.TerminalRunCommand, error)
- 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) 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) 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) GetTaskInReadScope(ctx context.Context, id string, readScope store.ReadScope) (taskpkg.Task, 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) ImportTerminalRunHistory(ctx context.Context, command *taskpkg.TerminalRunHistoryImport) 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) ListExpiredTaskBlockTargets(ctx context.Context, now time.Time) ([]taskpkg.BlockExpiryTarget, 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) ListTerminalRunCommands(ctx context.Context) ([]taskpkg.TerminalRunCommand, 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) ReleaseTerminalRunCommand(ctx context.Context, command taskpkg.TerminalRunCommand) error
- func (g *TaskRepo) ReserveTerminalRunCommand(ctx context.Context, command taskpkg.TerminalRunCommand) (taskpkg.TerminalRunCommand, 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) SetTaskWorktreePolicy(ctx context.Context, mutation *taskpkg.WorktreePolicyMutation) (stored taskpkg.ExecutionProfile, err 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) UpdateTaskRunMetadata(ctx context.Context, mutation taskpkg.RunMetadataMutation) (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) WithLeaseSettlementTransaction(ctx context.Context, action string, ...) error
- func (g *TaskRepo) WithTaskExecutionTransaction(ctx context.Context, fn func(taskpkg.ExecutionMutationStore) error) error
- func (g *TaskRepo) WithTaskMutationTransaction(ctx context.Context, action string, mutation taskpkg.RunMutation) error
- type TaskRunRepo
- func (g *TaskRunRepo) BindRunReviewSession(ctx context.Context, req taskpkg.BindRunReviewSessionRequest, ...) (stored taskpkg.RunReview, err error)
- func (g *TaskRunRepo) ClearRunStarvation(ctx context.Context, runID string) error
- func (g *TaskRunRepo) CompleteRunLeaseSettlement(ctx context.Context, completion taskpkg.LeaseCompletion) (taskpkg.CompletedRunSettlement, error)
- func (g *TaskRunRepo) GetRunReview(ctx context.Context, reviewID string) (taskpkg.RunReview, 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) 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) RequestRunReview(ctx context.Context, review *taskpkg.RunReview) (stored taskpkg.RunReview, created bool, err 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) DeleteMCPAuthRegistration(ctx context.Context, target mcpauth.Target) error
- func (g *VaultRepo) DeleteMCPAuthToken(ctx context.Context, target mcpauth.Target) error
- func (g *VaultRepo) DeleteMCPAuthorizationState(ctx context.Context, target mcpauth.Target) error
- func (g *VaultRepo) DeleteVaultSecret(ctx context.Context, ref string) error
- func (g *VaultRepo) GetMCPAuthRegistration(ctx context.Context, target mcpauth.Target) (mcpauth.ClientRegistration, 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) SaveMCPAuthRegistration(ctx context.Context, registration mcpauth.ClientRegistration, ...) (mcpauth.ClientRegistration, 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
- type WorktreeRepo
- func (g *WorktreeRepo) CompareAndSwapState(ctx context.Context, workspaceID string, id string, expected worktree.State, ...) (bool, error)
- func (g *WorktreeRepo) CompleteCreate(ctx context.Context, workspaceID string, id string, ...) error
- func (g *WorktreeRepo) DeletePending(ctx context.Context, workspaceID, id string) error
- func (g *WorktreeRepo) DeleteRunMaterialization(ctx context.Context, workspaceID string, id string, runID string) error
- func (g *WorktreeRepo) FailRunningExitOperations(ctx context.Context, finishedAt time.Time) error
- func (g *WorktreeRepo) FinishExitOperation(ctx context.Context, workspaceID string, worktreeID string, opID string, ...) (bool, error)
- func (g *WorktreeRepo) Get(ctx context.Context, workspaceID, idOrName string) (*worktree.Worktree, error)
- func (g *WorktreeRepo) GetByPath(ctx context.Context, workspaceID, path string) (*worktree.Worktree, error)
- func (g *WorktreeRepo) GetForgeStatus(ctx context.Context, workspaceID string, id string) (*worktree.ForgeStatus, error)
- func (g *WorktreeRepo) GetStatus(ctx context.Context, workspaceID string, id string) (*worktree.Status, error)
- func (g *WorktreeRepo) Insert(ctx context.Context, item worktree.Worktree) error
- func (g *WorktreeRepo) InsertExitOperation(ctx context.Context, operation worktree.ExitOperation) error
- func (g *WorktreeRepo) List(ctx context.Context, workspaceID string) ([]worktree.Worktree, error)
- func (g *WorktreeRepo) ListRecoverable(ctx context.Context) ([]worktree.Worktree, error)
- func (g *WorktreeRepo) ListRunningExitOperations(ctx context.Context) ([]worktree.ExitOperation, error)
- func (g *WorktreeRepo) SaveForgeStatus(ctx context.Context, workspaceID string, id string, ...) error
- func (g *WorktreeRepo) SaveStatus(ctx context.Context, workspaceID string, id string, status worktree.Status) error
- func (g *WorktreeRepo) SetState(ctx context.Context, workspaceID string, id string, state worktree.State, ...) error
- func (g *WorktreeRepo) UpdatePending(ctx context.Context, workspaceID string, id string, ...) 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, readScope store.ReadScope, workspaceID string, ) (grants []toolspkg.ApprovalGrant, err error)
ListApprovalGrants returns one workspace's grants under the requested profile scope in stable creation order. Aggregate reads include profile owner labels.
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, profileID, workspaceID, id string) error
RevokeApprovalGrant removes one profile/workspace-scoped remembered decision.
type ApprovalPendingRepo ¶
type ApprovalPendingRepo struct {
// contains filtered or unexported fields
}
func (*ApprovalPendingRepo) CompleteApprovalExecution ¶
func (g *ApprovalPendingRepo) CompleteApprovalExecution( ctx context.Context, approvalID string, status toolspkg.ApprovalExecutionStatus, result json.RawMessage, errorPayload json.RawMessage, executedAt time.Time, ) (toolspkg.ApprovalStatus, error)
func (*ApprovalPendingRepo) CreateApproval ¶
func (g *ApprovalPendingRepo) CreateApproval( ctx context.Context, approvalID string, request toolspkg.ApprovalRequest, requestedAt time.Time, ) (toolspkg.ApprovalStatus, error)
func (*ApprovalPendingRepo) ExpireApprovals ¶
func (g *ApprovalPendingRepo) ExpireApprovals( ctx context.Context, now time.Time, ) ([]toolspkg.ApprovalStatus, error)
func (*ApprovalPendingRepo) GetApproval ¶
func (g *ApprovalPendingRepo) GetApproval( ctx context.Context, approvalID string, ) (toolspkg.ApprovalStatus, error)
func (*ApprovalPendingRepo) ListPendingApprovals ¶
func (g *ApprovalPendingRepo) ListPendingApprovals( ctx context.Context, ) ([]toolspkg.ApprovalStatus, error)
func (*ApprovalPendingRepo) RecoverDispatchingApprovals ¶
func (g *ApprovalPendingRepo) RecoverDispatchingApprovals( ctx context.Context, now time.Time, ) ([]toolspkg.ApprovalStatus, error)
func (*ApprovalPendingRepo) ResolveApproval ¶
func (g *ApprovalPendingRepo) ResolveApproval( ctx context.Context, approvalID string, outcome toolspkg.ApprovalOutcome, resolvedAt time.Time, ) (toolspkg.ApprovalStatus, error)
type AttentionRepo ¶
type AttentionRepo struct {
// contains filtered or unexported fields
}
func (*AttentionRepo) IsAttentionWorkspaceMuted ¶
func (r *AttentionRepo) IsAttentionWorkspaceMuted( ctx context.Context, profileID string, workspaceID string, ) (bool, error)
IsAttentionWorkspaceMuted reports whether one profile muted one workspace.
func (*AttentionRepo) ListAttentionWorkspaceMutes ¶
func (r *AttentionRepo) ListAttentionWorkspaceMutes(ctx context.Context, profileID string) ([]string, error)
ListAttentionWorkspaceMutes returns the muted workspace registrations for one profile.
func (*AttentionRepo) ReplaceAttentionWorkspaceMutes ¶
func (r *AttentionRepo) ReplaceAttentionWorkspaceMutes( ctx context.Context, profileID string, workspaceIDs []string, ) (err error)
ReplaceAttentionWorkspaceMutes atomically replaces one profile's mute set.
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) (err 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, profileID string, 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, readScope store.ReadScope, 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) ReserveRun ¶
func (g *AutomationRepo) ReserveRun( ctx context.Context, reservation automation.RunReservation, ) (automation.RunReservationResult, error)
ReserveRun atomically checks a rolling fire-limit window and reserves one run.
func (*AutomationRepo) ResolveSuggestion ¶
func (g *AutomationRepo) ResolveSuggestion( ctx context.Context, profileID string, 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) (err 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, readScope store.ReadScope, 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, readScope store.ReadScope, 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, readScope store.ReadScope, ) (instances []bridges.BridgeInstance, err error)
ListBridgeInstances returns bridge instances matching readScope in stable display-name order.
func (*BridgeRepo) ListBridgeInstancesByIDs ¶
func (g *BridgeRepo) ListBridgeInstancesByIDs( ctx context.Context, readScope store.ReadScope, bridgeInstanceIDs []string, ) (instances []bridges.BridgeInstance, err error)
ListBridgeInstancesByIDs returns one bounded bridge batch matching readScope in caller-supplied order.
func (*BridgeRepo) ListBridgeRoutes ¶
func (g *BridgeRepo) ListBridgeRoutes( ctx context.Context, readScope store.ReadScope, 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, ) error
ReplaceBridgeInstances atomically swaps desired bridge fields while preserving newer provider-owned operational state for unchanged enabled runtimes.
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 CmdPaletteRepo ¶
type CmdPaletteRepo struct {
// contains filtered or unexported fields
}
func (*CmdPaletteRepo) CmdPalettePersonalization ¶
func (r *CmdPaletteRepo) CmdPalettePersonalization( ctx context.Context, profileLensID cmdpalette.ProfileLensID, workspaceID cmdpalette.WorkspaceID, ) (cmdpalette.PersonalizationRows, error)
func (*CmdPaletteRepo) DeleteCmdPalettePin ¶
func (r *CmdPaletteRepo) DeleteCmdPalettePin( ctx context.Context, profileLensID cmdpalette.ProfileLensID, workspaceID cmdpalette.WorkspaceID, commandID cmdpalette.CommandID, ) error
func (*CmdPaletteRepo) PruneCmdPaletteCommand ¶
func (r *CmdPaletteRepo) PruneCmdPaletteCommand( ctx context.Context, profileLensID cmdpalette.ProfileLensID, workspaceID cmdpalette.WorkspaceID, commandID cmdpalette.CommandID, ) error
func (*CmdPaletteRepo) PruneCmdPaletteQueryHit ¶
func (r *CmdPaletteRepo) PruneCmdPaletteQueryHit( ctx context.Context, profileLensID cmdpalette.ProfileLensID, workspaceID cmdpalette.WorkspaceID, query string, commandID cmdpalette.CommandID, ) error
func (*CmdPaletteRepo) PruneCmdPaletteUsage ¶
func (r *CmdPaletteRepo) PruneCmdPaletteUsage( ctx context.Context, profileLensID cmdpalette.ProfileLensID, workspaceID cmdpalette.WorkspaceID, commandID cmdpalette.CommandID, ) error
func (*CmdPaletteRepo) PutCmdPalettePin ¶
func (r *CmdPaletteRepo) PutCmdPalettePin( ctx context.Context, profileLensID cmdpalette.ProfileLensID, workspaceID cmdpalette.WorkspaceID, commandID cmdpalette.CommandID, pinnedAt time.Time, ) error
func (*CmdPaletteRepo) RecordCmdPaletteUsage ¶
func (r *CmdPaletteRepo) RecordCmdPaletteUsage( ctx context.Context, usage cmdpalette.Usage, weights cmdpalette.Weights, ) error
func (*CmdPaletteRepo) ResetCmdPalettePersonalization ¶
func (r *CmdPaletteRepo) ResetCmdPalettePersonalization( ctx context.Context, profileLensID cmdpalette.ProfileLensID, workspaceID cmdpalette.WorkspaceID, ) error
type DeadEntityRepo ¶
type DeadEntityRepo struct {
// contains filtered or unexported fields
}
func (*DeadEntityRepo) ClearDeadEntity ¶
func (g *DeadEntityRepo) ClearDeadEntity( ctx context.Context, key store.DeadEntityKey, ) error
ClearDeadEntity removes one dead mark. Missing rows are a successful no-op.
func (*DeadEntityRepo) FindDeadEntity ¶
func (g *DeadEntityRepo) FindDeadEntity( ctx context.Context, key store.DeadEntityKey, ) (store.DeadEntity, bool, error)
FindDeadEntity returns one exact workspace-scoped dead mark.
func (*DeadEntityRepo) ListDeadEntities ¶
func (g *DeadEntityRepo) ListDeadEntities( ctx context.Context, readScope store.ReadScope, workspaceID string, ) (entities []store.DeadEntity, err error)
ListDeadEntities returns dead marks for workspaceID matching readScope 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 ExtensionEnvRepo ¶
type ExtensionEnvRepo struct {
// contains filtered or unexported fields
}
func (*ExtensionEnvRepo) CountEnvBindingsBySecretRef ¶
func (r *ExtensionEnvRepo) CountEnvBindingsBySecretRef(ctx context.Context, secretRef string) (int64, error)
CountEnvBindingsBySecretRef reports how many binding rows still reference one Vault ref.
func (*ExtensionEnvRepo) DeleteEnvBinding ¶
func (r *ExtensionEnvRepo) DeleteEnvBinding( ctx context.Context, extension, profileID, workspaceID, envName string, ) error
DeleteEnvBinding removes one extension instance binding.
func (*ExtensionEnvRepo) DeleteEnvBindings ¶
func (r *ExtensionEnvRepo) DeleteEnvBindings( ctx context.Context, extension, profileID, workspaceID string, ) error
DeleteEnvBindings removes all bindings for exactly one extension instance.
func (*ExtensionEnvRepo) ListEnvBindings ¶
func (r *ExtensionEnvRepo) ListEnvBindings( ctx context.Context, extension string, profileID string, workspaceID string, ) ([]extensionenv.Binding, error)
ListEnvBindings returns one extension instance's bindings in env-name order.
func (*ExtensionEnvRepo) PutEnvBinding ¶
func (r *ExtensionEnvRepo) PutEnvBinding(ctx context.Context, binding extensionenv.Binding) error
PutEnvBinding creates or replaces one extension instance binding.
func (*ExtensionEnvRepo) ResolveEnvBindings ¶
func (r *ExtensionEnvRepo) ResolveEnvBindings( ctx context.Context, extension string, profileID string, workspaceID string, ) (bindings []extensionenv.Binding, err error)
ResolveEnvBindings applies profile-first precedence for each environment name: (profile, workspace), (profile, user), (user, workspace), (user, user).
type GatewayRepo ¶
type GatewayRepo struct {
// contains filtered or unexported fields
}
func (*GatewayRepo) CreateDevice ¶
func (g *GatewayRepo) CreateDevice(ctx context.Context, record gateway.StoredDeviceSession) error
func (*GatewayRepo) DeleteIngressBinding ¶
func (g *GatewayRepo) DeleteIngressBinding( ctx context.Context, expected gateway.IngressSubject, ) (bool, error)
func (*GatewayRepo) DisableAll ¶
func (g *GatewayRepo) DisableAll(ctx context.Context) (bool, error)
DisableAll atomically clears desired and observed exposure for every tier.
func (*GatewayRepo) FindDeviceByTokenHash ¶
func (g *GatewayRepo) FindDeviceByTokenHash( ctx context.Context, tokenHash string, now time.Time, ) (gateway.StoredDeviceSession, error)
func (*GatewayRepo) GetDevice ¶
func (g *GatewayRepo) GetDevice(ctx context.Context, deviceID string) (gateway.DeviceSession, error)
func (*GatewayRepo) GetIngressBinding ¶
func (g *GatewayRepo) GetIngressBinding( ctx context.Context, ref gateway.IngressSubjectRef, ) (gateway.IngressBinding, error)
func (*GatewayRepo) GetIngressEndpoint ¶
func (g *GatewayRepo) GetIngressEndpoint( ctx context.Context, tier gateway.Tier, ) (gateway.IngressEndpointState, error)
GetIngressEndpoint loads the durable address identity for one tier.
func (*GatewayRepo) ListDevices ¶
func (g *GatewayRepo) ListDevices(ctx context.Context) ([]gateway.DeviceSession, error)
func (*GatewayRepo) ListIngressBindings ¶
func (g *GatewayRepo) ListIngressBindings(ctx context.Context) ([]gateway.IngressBinding, error)
func (*GatewayRepo) MarkIngressEndpointUnavailable ¶
func (*GatewayRepo) ProviderIdentity ¶
func (g *GatewayRepo) ProviderIdentity(ctx context.Context, name string) (gateway.ProviderIdentity, error)
ProviderIdentity reads the operator-confirmed gateway provider tuple.
func (*GatewayRepo) PutIngressBinding ¶
func (g *GatewayRepo) PutIngressBinding( ctx context.Context, expected gateway.IngressSubject, endpointGeneration uint64, confirmedAt time.Time, ) (_ gateway.IngressBinding, changed bool, err error)
func (*GatewayRepo) RenameDevice ¶
func (g *GatewayRepo) RenameDevice( ctx context.Context, deviceID string, name string, ) (gateway.DeviceSession, error)
func (*GatewayRepo) RenameDeviceForActor ¶
func (g *GatewayRepo) RenameDeviceForActor( ctx context.Context, actorID string, actorEpoch uint64, deviceID string, name string, ) (gateway.DeviceSession, error)
func (*GatewayRepo) ResolveIngressSubject ¶
func (g *GatewayRepo) ResolveIngressSubject( ctx context.Context, ref gateway.IngressSubjectRef, ) (gateway.IngressSubject, error)
ResolveIngressSubject loads scope and routing from the canonical subject table.
func (*GatewayRepo) RevalidateDeviceEpoch ¶
func (*GatewayRepo) RevokeDevice ¶
func (g *GatewayRepo) RevokeDevice( ctx context.Context, deviceID string, now time.Time, ) (gateway.DeviceSession, bool, error)
func (*GatewayRepo) RevokeDeviceForActor ¶
func (*GatewayRepo) SetObserved ¶
func (g *GatewayRepo) SetObserved( ctx context.Context, plan gateway.TierPlan, providerObserved gateway.ProviderObservedState, surfaceObserved gateway.SurfaceObservedState, at time.Time, cause string, ) (bool, error)
SetObserved atomically applies effect output only to the expected generations.
func (*GatewayRepo) SweepOrphanedIngressBindings ¶
func (g *GatewayRepo) SweepOrphanedIngressBindings(ctx context.Context) (int64, error)
func (*GatewayRepo) SyncIngressEndpoint ¶
func (g *GatewayRepo) SyncIngressEndpoint( ctx context.Context, tier gateway.Tier, endpointURL string, now time.Time, ) (_ gateway.IngressEndpointState, changed bool, err error)
SyncIngressEndpoint preserves generation for a stable URL and advances it on change.
func (*GatewayRepo) Transition ¶
func (g *GatewayRepo) Transition( ctx context.Context, req gateway.TransitionRequest, now time.Time, ) (bool, error)
Transition atomically writes desired state and advances its generation.
type GlobalDB ¶
type GlobalDB struct {
*WorkspaceRepo
*AppMetadataRepo
*PermissionRepo
*SessionRepo
*TaskRepo
*TaskRunRepo
*AutomationRepo
*BridgeRepo
*NetworkRepo
*GatewayRepo
*LoopRepo
*GoalRepo
*HeartbeatRepo
*SoulRepo
*ModelCatalogRepo
*MarketplaceRepo
*SkillExposureRepo
*ObserveRepo
*NotificationRepo
*AttentionRepo
*ToolRuntimeRepo
*VaultRepo
*ExtensionEnvRepo
*WatchEventsRepo
*DeadEntityRepo
*ApprovalGrantRepo
*ApprovalPendingRepo
*CmdPaletteRepo
Worktrees *WorktreeRepo
// 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.
func (*GlobalDB) DB ¶
DB exposes the underlying SQL connection for composition-root adapters such as the extension registry.
func (*GlobalDB) ExecuteProfileWrite ¶
func (g *GlobalDB) ExecuteProfileWrite( ctx context.Context, action string, run func(ProfileWriteExecutor) error, ) error
ExecuteProfileWrite runs one profile lifecycle mutation in an immediate SQLite transaction.
func (*GlobalDB) FinishExitOperationWithEvent ¶
func (*GlobalDB) HasActiveWorktreeSession ¶
func (g *GlobalDB) HasActiveWorktreeSession( ctx context.Context, workspaceID string, worktreeID string, ) (bool, error)
HasActiveWorktreeSession reports whether a live session still owns a workspace-scoped worktree binding.
func (*GlobalDB) PublishWorktreeEvent ¶
func (*GlobalDB) VerifyDefaultProfile ¶
VerifyDefaultProfile proves that migration 00082 installed the permanent default owner. It never repairs or inserts state; schema migration remains the only seed authority.
func (*GlobalDB) WorktreeStore ¶
WorktreeStore exposes the domain repository without widening the daemon registry aggregate.
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) AllocateSessionBindingAttempt ¶
func (g *GoalRepo) AllocateSessionBindingAttempt( ctx context.Context, req *goal.AllocateBindingAttemptRequest, ) (goal.SessionBinding, error)
AllocateSessionBindingAttempt atomically selects and persists the next Goal-owned binding epoch.
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.
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 current 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) AcknowledgeLoopEffect ¶
func (g *LoopRepo) AcknowledgeLoopEffect( ctx context.Context, ack looppkg.EffectAcknowledgement, ) (bool, error)
AcknowledgeLoopEffect atomically appends idempotent result events and closes one pending row.
func (*LoopRepo) AdvanceLoopRunProgress ¶
func (*LoopRepo) AdvanceNodeCancellation ¶
func (g *LoopRepo) AdvanceNodeCancellation( ctx context.Context, mutation looppkg.CancellationMutation, state looppkg.CancelState, ) (looppkg.CancellationResult, error)
AdvanceNodeCancellation advances cooperative delivery for one node.
func (*LoopRepo) AdvanceRunCancellation ¶
func (g *LoopRepo) AdvanceRunCancellation( ctx context.Context, mutation looppkg.CancellationMutation, state looppkg.CancelState, ) (looppkg.CancellationResult, error)
AdvanceRunCancellation moves graceful delivery forward and terminalizes only at canceled.
func (*LoopRepo) AmendNodeOutput ¶
func (g *LoopRepo) AmendNodeOutput( ctx context.Context, input looppkg.AmendInput, ) (looppkg.NodeAmendment, error)
func (*LoopRepo) ApplyGenerationOutputOverlays ¶
func (g *LoopRepo) ApplyGenerationOutputOverlays( ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, generation int, outputs []looppkg.GenerationOutput, ) ([]looppkg.GenerationOutput, error)
func (*LoopRepo) BackfillLoopProvenance ¶
BackfillLoopProvenance repairs coordinator metadata from relational ownership only.
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) CreateFork ¶
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) CreateRerun ¶
func (g *LoopRepo) CreateRerun( ctx context.Context, request looppkg.RerunStoreRequest, ) (result looppkg.RerunResult, replayed bool, err error)
func (*LoopRepo) DeleteLoopDefinitionState ¶
func (g *LoopRepo) DeleteLoopDefinitionState( ctx context.Context, ws looppkg.WorkspaceID, loopName string, ) (looppkg.DefinitionState, error)
DeleteLoopDefinitionState atomically removes mutable sidecars owned by one Loop definition.
func (*LoopRepo) DeleteRunHistory ¶
func (g *LoopRepo) DeleteRunHistory( ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ) error
DeleteRunHistory removes one imported run and its workspace-scoped event ledger. It refuses to touch a run that belongs to another workspace.
func (*LoopRepo) EnqueueDueLoopRetryWakesPage ¶
func (g *LoopRepo) EnqueueDueLoopRetryWakesPage( ctx context.Context, origin taskpkg.Origin, now time.Time, cursor looppkg.RetryDueCursor, limit int, ) ([]taskpkg.Run, looppkg.RetryDueCursor, error)
EnqueueDueLoopRetryWakesPage reserves coordinator wakes for one due-time page.
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) EnqueueLoopRetryWakeIfCurrent ¶
func (g *LoopRepo) EnqueueLoopRetryWakeIfCurrent( ctx context.Context, origin taskpkg.Origin, cell looppkg.RetryDueCell, firedAt time.Time, ) (returnRun taskpkg.Run, returnAdded bool, returnCurrent bool, returnErr error)
EnqueueLoopRetryWakeIfCurrent fences a timer or due-scan fire against the exact retry cell and reserves its coordinator wake in the same transaction.
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) EscalateDueLoopWaitsPage ¶
func (g *LoopRepo) EscalateDueLoopWaitsPage( ctx context.Context, now time.Time, cursor looppkg.WaitEscalationCursor, limit int, ) (looppkg.WaitEscalationCursor, error)
EscalateDueLoopWaitsPage advances one stable page of authored wait ladders.
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) GetAdmissionClaim ¶
func (g *LoopRepo) GetAdmissionClaim( ctx context.Context, workspaceID looppkg.WorkspaceID, loopName string, sourceKey string, eventKey string, ) (looppkg.AdmissionClaim, error)
GetAdmissionClaim returns one workspace-scoped admission tombstone.
func (*LoopRepo) GetGenerationOutputPayload ¶
func (g *LoopRepo) GetGenerationOutputPayload( ctx context.Context, key looppkg.GenerationOutputPayloadKey, ) (json.RawMessage, error)
GetGenerationOutputPayload loads an externalized payload through its workspace-owned cell.
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) GetLoopRunEventHead ¶
func (g *LoopRepo) GetLoopRunEventHead( ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ) (int64, error)
GetLoopRunEventHead returns the durable sequence head for one workspace-owned run.
func (*LoopRepo) GetRequest ¶
func (g *LoopRepo) GetRequest( ctx context.Context, workspaceID looppkg.WorkspaceID, ref looppkg.RequestRef, full bool, ) (looppkg.Request, error)
GetRequest returns one request, optionally hydrating its full redacted context.
func (*LoopRepo) ImportRunHistory ¶
ImportRunHistory atomically imports one already-executed Loop run together with its generation, output, attempt, control, wait, request, verdict, and event ledger.
func (*LoopRepo) ImportRunHistoryBatch ¶
func (g *LoopRepo) ImportRunHistoryBatch(ctx context.Context, commands []*looppkg.RunHistoryImport) error
ImportRunHistoryBatch atomically imports a related set of historical runs. Rows are materialized before lineage validation so parent and child ledgers may reference each other without weakening the single-run boundary.
func (*LoopRepo) ListAvailableLoopOutputRefs ¶
func (g *LoopRepo) ListAvailableLoopOutputRefs( ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ) (map[string]bool, error)
ListAvailableLoopOutputRefs returns retained blob references owned by one workspace run.
func (*LoopRepo) ListDueLoopRetries ¶
func (g *LoopRepo) ListDueLoopRetries( ctx context.Context, now time.Time, cursor looppkg.RetryDueCursor, limit int, ) (returnCells []looppkg.RetryDueCell, returnCursor looppkg.RetryDueCursor, returnErr error)
ListDueLoopRetries returns one stable page of live, unparked retry schedules.
func (*LoopRepo) ListEffectOutbox ¶
func (g *LoopRepo) ListEffectOutbox( ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ) ([]looppkg.EffectOutboxEntry, error)
ListEffectOutbox returns workspace-scoped effect delivery rows for one run.
func (*LoopRepo) ListGateVerdicts ¶
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) ListGenerations ¶
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) ListLoopRosterOutputs ¶
func (g *LoopRepo) ListLoopRosterOutputs( ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ) ([]looppkg.GenerationOutput, error)
ListLoopRosterOutputs returns every generation output for one workspace-owned run.
func (*LoopRepo) ListLoopRosterRouteCauses ¶
func (g *LoopRepo) ListLoopRosterRouteCauses( ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ) ([]looppkg.RouteCause, error)
ListLoopRosterRouteCauses returns every durable route decision for one workspace-owned run.
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) ListLoopRunEventsBackward ¶
func (g *LoopRepo) ListLoopRunEventsBackward( ctx context.Context, query looppkg.RunEventBackwardQuery, ) ([]looppkg.RunEvent, error)
ListLoopRunEventsBackward returns one snapshot-fenced page in descending sequence order.
func (*LoopRepo) ListLoopRunSummaries ¶
func (*LoopRepo) ListLoopRuns ¶
func (g *LoopRepo) ListLoopRuns( ctx context.Context, query looppkg.RunListQuery, ) (runs []looppkg.Run, err error)
ListLoopRuns loads loop runs matching the explicit profile scope and workspace filters 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) ListNodeAmendments ¶
func (g *LoopRepo) ListNodeAmendments( ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ) ([]looppkg.NodeAmendment, error)
func (*LoopRepo) ListNodeAttempts ¶
func (g *LoopRepo) ListNodeAttempts( ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ) ([]looppkg.NodeAttempt, error)
ListNodeAttempts returns the ordered workspace-scoped attempt ledger for one run.
func (*LoopRepo) ListNodeControls ¶
func (g *LoopRepo) ListNodeControls( ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ) ([]looppkg.NodeControl, error)
ListNodeControls returns workspace-scoped control rows for one run.
func (*LoopRepo) ListNodeInventory ¶
func (g *LoopRepo) ListNodeInventory( ctx context.Context, query looppkg.NodeInventoryQuery, ) (page looppkg.NodeInventoryPage, returnErr error)
ListNodeInventory returns one stable, workspace-scoped node-state page.
func (*LoopRepo) ListNodeWaits ¶
func (g *LoopRepo) ListNodeWaits( ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, ) ([]looppkg.NodeWait, error)
ListNodeWaits returns workspace-scoped durable waits for one run.
func (*LoopRepo) ListParkedLoopWaitEventSubscriptions ¶
func (g *LoopRepo) ListParkedLoopWaitEventSubscriptions( ctx context.Context, ) ([]looppkg.ParkedWatchEventSubscription, error)
ListParkedLoopWaitEventSubscriptions rebuilds durable event-wait subscriptions after boot.
func (*LoopRepo) ListParkedLoopWaitEventSubscriptionsForLoopRun ¶
func (g *LoopRepo) ListParkedLoopWaitEventSubscriptionsForLoopRun( ctx context.Context, runID string, ) ([]looppkg.ParkedWatchEventSubscription, error)
ListParkedLoopWaitEventSubscriptionsForLoopRun refreshes one run in the observer index.
func (*LoopRepo) ListPendingCancellations ¶
func (g *LoopRepo) ListPendingCancellations( ctx context.Context, limit int, ) (pending []looppkg.PendingCancellation, err error)
ListPendingCancellations returns a bounded, workspace-scoped delivery batch.
func (*LoopRepo) ListPendingLoopEffects ¶
func (g *LoopRepo) ListPendingLoopEffects( ctx context.Context, limit int, ) ([]looppkg.EffectOutboxEntry, error)
ListPendingLoopEffects pages committed pending rows across workspaces through loop_runs ownership.
func (*LoopRepo) ListRequests ¶
func (g *LoopRepo) ListRequests( ctx context.Context, workspaceID looppkg.WorkspaceID, query looppkg.RequestQuery, ) (page looppkg.RequestPage, err error)
ListRequests returns a stable page without exposing private execution refs.
func (*LoopRepo) ListRouteCauses ¶
func (g *LoopRepo) ListRouteCauses( ctx context.Context, workspaceID looppkg.WorkspaceID, runID looppkg.RunID, generation int64, ) ([]looppkg.RouteCause, error)
ListRouteCauses loads durable route decisions for one workspace-owned generation.
func (*LoopRepo) ListRouteCausingVerdicts ¶
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) LookupRerunReplay ¶
func (*LoopRepo) NeutralizeLoopRunOrphans ¶
NeutralizeLoopRunOrphans removes claim eligibility before daemon recovery starts.
func (*LoopRepo) PauseNode ¶
func (g *LoopRepo) PauseNode( ctx context.Context, mutation looppkg.NodePauseMutation, ) (looppkg.NodePauseResult, error)
PauseNode parks one authored node and fences every schedule it supersedes.
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) ReactivateLoopCoordinator ¶
func (g *LoopRepo) ReactivateLoopCoordinator( ctx context.Context, req *looppkg.CoordinatorReactivationRequest, ) (looppkg.CoordinatorReactivationResult, error)
ReactivateLoopCoordinator atomically transitions a parked Run and reserves its next coordinator.
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) RecordNodeLiveness ¶
func (g *LoopRepo) RecordNodeLiveness( ctx context.Context, observation looppkg.NodeLivenessObservation, ) error
RecordNodeLiveness updates evidence or silence attention for one still-live task-run cell.
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) RequestNodeCancellation ¶
func (g *LoopRepo) RequestNodeCancellation( ctx context.Context, mutation looppkg.CancellationMutation, ) (looppkg.CancellationResult, error)
RequestNodeCancellation records node intent and fences all live cells for that node.
func (*LoopRepo) RequestRunCancellation ¶
func (g *LoopRepo) RequestRunCancellation( ctx context.Context, mutation looppkg.CancellationMutation, ) (looppkg.CancellationResult, error)
RequestRunCancellation records first-writer Run intent and fences every live node cell.
func (*LoopRepo) RequeueNode ¶
func (g *LoopRepo) RequeueNode( ctx context.Context, mutation looppkg.NodeRequeueMutation, ) (looppkg.NodeRequeueResult, error)
RequeueNode clears active quarantine, records provenance, and reserves one coordinator wake.
func (*LoopRepo) RespondRequest ¶
func (g *LoopRepo) RespondRequest( ctx context.Context, input looppkg.RespondInput, ) (looppkg.RespondResult, error)
RespondRequest atomically claims a request and its parked cell, then reserves one coordinator wake.
func (*LoopRepo) RestoreLoopDefinitionState ¶
func (g *LoopRepo) RestoreLoopDefinitionState( ctx context.Context, ws looppkg.WorkspaceID, loopName string, state looppkg.DefinitionState, ) error
RestoreLoopDefinitionState atomically restores sidecars after a failed file-backed delete.
func (*LoopRepo) ResumeDeadNode ¶
func (g *LoopRepo) ResumeDeadNode( ctx context.Context, request looppkg.DeadNodeResumeRequest, ) (looppkg.DeadNodeResumeResult, error)
ResumeDeadNode retires one confirmed-dead worker and reserves exactly one continuation.
func (*LoopRepo) ResumeDueLoopWaitsPage ¶
func (g *LoopRepo) ResumeDueLoopWaitsPage( ctx context.Context, now time.Time, cursor looppkg.WaitDueCursor, limit int, ) ([]taskpkg.Run, looppkg.WaitDueCursor, error)
ResumeDueLoopWaitsPage resolves one stable page of due timer waits.
func (*LoopRepo) ResumeNode ¶
func (g *LoopRepo) ResumeNode( ctx context.Context, mutation looppkg.NodeResumeMutation, ) (looppkg.NodeResumeResult, error)
ResumeNode releases one paused node and reserves its coordinator wake atomically.
func (*LoopRepo) ResumeWait ¶
func (g *LoopRepo) ResumeWait( ctx context.Context, mutation looppkg.WaitResumeMutation, ) (looppkg.WaitResumeResult, error)
ResumeWait atomically admits a payload, resolves the waiting cell, and reserves its coordinator.
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) SweepAdmissionClaims ¶
SweepAdmissionClaims removes claims whose persisted effective horizon has elapsed.
func (*LoopRepo) SweepLoopRunOrphans ¶
SweepLoopRunOrphans converges terminal execution records during daemon operation.
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.
func (*ModelCatalogRepo) ReplaceSourceRowsBatch ¶
func (g *ModelCatalogRepo) ReplaceSourceRowsBatch( ctx context.Context, replacements []modelcatalog.SourceRowsReplacement, ) error
ReplaceSourceRowsBatch publishes a complete model catalog generation in one transaction.
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, readScope store.ReadScope, 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, readScope store.ReadScope, 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, readScope store.ReadScope, channelRef store.NetworkChannelRef, threadID string, ) (store.NetworkThreadSummary, error)
GetThread returns one public-thread summary.
func (*NetworkRepo) GetWork ¶
func (g *NetworkRepo) GetWork( ctx context.Context, readScope store.ReadScope, 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, ) (recents []store.NetworkRecentSummary, err 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, readScope store.ReadScope, 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) AcquireDeliveryPermit ¶
func (n *NotificationRepo) AcquireDeliveryPermit( ctx context.Context, permit notifications.DeliveryPermit, ) error
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) ListDeliveryPermits ¶
func (n *NotificationRepo) ListDeliveryPermits( ctx context.Context, ) (_ []notifications.DeliveryPermit, err error)
ListDeliveryPermits returns durable sends that have not advanced their cursor.
func (*NotificationRepo) ListPresetsForProfile ¶
func (n *NotificationRepo) ListPresetsForProfile( ctx context.Context, query presetspkg.Query, profileID string, ) (items []presetspkg.Preset, err error)
ListPresetsForProfile returns preset definitions with enablement projected for the explicit profile owner. Preset definitions are user-scoped, while disabled exceptions are isolated by stable profile ID.
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) SetPresetEnabled ¶
func (n *NotificationRepo) SetPresetEnabled( ctx context.Context, name string, profileID string, enabled bool, ) error
SetPresetEnabled changes one preset's enabled state for exactly one profile. Enabling removes the profile exception so the user-scoped default applies.
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 session 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) DeleteWorkspaceObservability ¶
func (g *ObserveRepo) DeleteWorkspaceObservability(ctx context.Context, workspaceID string) error
DeleteWorkspaceObservability removes one workspace's event summaries and token usage rollups. Bootstrap importers call it before re-seeding, because the daily usage rollup is additive and would otherwise double on every replace.
func (*ObserveRepo) LatestEventSummaryAt ¶
func (g *ObserveRepo) LatestEventSummaryAt( ctx context.Context, query store.OverviewWorkspaceQuery, ) (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) ListTokenUsageByProfile ¶
func (g *ObserveRepo) ListTokenUsageByProfile( ctx context.Context, query store.OverviewDayQuery, ) ([]store.TokenUsageProfileTotal, error)
ListTokenUsageByProfile returns owner-labeled usage buckets 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) WriteEventSummaries ¶
func (g *ObserveRepo) WriteEventSummaries( ctx context.Context, summaries []store.EventSummary, ) (err error)
WriteEventSummaries stores related observability summaries in one transaction.
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 WithOperatorHomeDir ¶
func WithOperatorHomeDir(operatorHomeDir string) OpenOption
WithOperatorHomeDir supplies the canonical operator home to workspace-removal migrations.
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 ProfileWriteExecutor ¶
type ProfileWriteExecutor interface {
ExecContext(context.Context, string, ...any) (sql.Result, error)
QueryContext(context.Context, string, ...any) (*sql.Rows, error)
QueryRowContext(context.Context, string, ...any) *sql.Row
}
ProfileWriteExecutor is the transaction surface used by the profile domain. The profile manager owns cross-table lifecycle mutations, while GlobalDB retains ownership of SQLite write serialization.
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) ClaimSessionPromptAdmission ¶
func (g *SessionRepo) ClaimSessionPromptAdmission( ctx context.Context, req store.SessionPromptAdmissionRequest, ) (admission store.SessionPromptAdmission, created bool, err error)
ClaimSessionPromptAdmission reserves one exact external prompt command.
func (*SessionRepo) CommitSessionPromptDispatch ¶
func (g *SessionRepo) CommitSessionPromptDispatch( ctx context.Context, workspaceID string, sessionID string, idempotencyKey string, now time.Time, ) error
CommitSessionPromptDispatch crosses the at-most-once boundary before any non-idempotent effect.
func (*SessionRepo) CompleteSessionPromptAdmission ¶
func (g *SessionRepo) CompleteSessionPromptAdmission( ctx context.Context, workspaceID string, sessionID string, idempotencyKey string, result store.SessionPromptAdmissionResult, now time.Time, ) (store.SessionPromptAdmission, error)
CompleteSessionPromptAdmission stores the stable replay result for one command.
func (*SessionRepo) CreatePendingInteraction ¶
func (g *SessionRepo) CreatePendingInteraction( ctx context.Context, req store.PendingInteractionCreate, ) (commit store.SessionAttentionCommit, err error)
CreatePendingInteraction persists the canonical record and count projection together.
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) EnqueueAdmittedSessionInput ¶
func (g *SessionRepo) EnqueueAdmittedSessionInput( ctx context.Context, admissionReq store.SessionPromptAdmissionRequest, queueReq store.SessionInputQueueInsert, ) ( admission store.SessionPromptAdmission, entry store.SessionInputQueueEntry, position int, created bool, err error, )
EnqueueAdmittedSessionInput atomically binds a command receipt and one queue entry.
func (*SessionRepo) EnqueueInterruptSessionInput ¶
func (g *SessionRepo) EnqueueInterruptSessionInput( ctx context.Context, req store.SessionInputQueueInsert, ) (entry store.SessionInputQueueEntry, canceled int, err error)
EnqueueInterruptSessionInput atomically fences stale pending input and persists its replacement.
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) GetSessionAttention ¶
func (g *SessionRepo) GetSessionAttention( ctx context.Context, sessionID string, ) (store.SessionAttention, error)
GetSessionAttention returns the catalog-owned attention fence for one session.
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) ListPendingInteractions ¶
func (g *SessionRepo) ListPendingInteractions( ctx context.Context, sessionID string, statuses []string, ) (interactions []store.PendingInteraction, err error)
ListPendingInteractions returns sanitized durable interactions for one session.
func (*SessionRepo) ListPendingSessionInputs ¶
func (g *SessionRepo) ListPendingSessionInputs( ctx context.Context, sessionID string, ) ([]store.SessionInputQueueEntry, error)
ListPendingSessionInputs returns current-generation operator inputs in dispatch order.
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) MarkSessionPromptAdmissionIndeterminate ¶
func (g *SessionRepo) MarkSessionPromptAdmissionIndeterminate( ctx context.Context, workspaceID string, sessionID string, idempotencyKey string, reason string, now time.Time, ) error
MarkSessionPromptAdmissionIndeterminate permanently fences an uncertain post-admission effect.
func (*SessionRepo) MarkSessionSeen ¶
func (g *SessionRepo) MarkSessionSeen( ctx context.Context, sessionID string, at time.Time, ) (commit store.SessionAttentionCommit, err error)
MarkSessionSeen advances the seen fence only when unseen settled work exists.
func (*SessionRepo) MarkSessionSettled ¶
func (g *SessionRepo) MarkSessionSettled( ctx context.Context, sessionID string, seen bool, at time.Time, ) (commit store.SessionAttentionCommit, err error)
MarkSessionSettled advances the catalog-owned settled fence.
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) PromoteSessionInputToSteer ¶
func (g *SessionRepo) PromoteSessionInputToSteer( ctx context.Context, sessionID string, entryID string, replacement store.SessionInputQueueInsert, ) (store.SessionInputQueueEntry, bool, error)
PromoteSessionInputToSteer atomically replaces one queued entry with priority steering input.
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) ReplaceSessionInput ¶
func (g *SessionRepo) ReplaceSessionInput( ctx context.Context, sessionID string, entryID string, replacement store.SessionInputQueueInsert, ) (store.SessionInputQueueEntry, bool, error)
ReplaceSessionInput atomically cancels one queued entry and inserts its replacement.
func (*SessionRepo) ReplaySessionPromptAdmission ¶
func (g *SessionRepo) ReplaySessionPromptAdmission( ctx context.Context, req store.SessionPromptAdmissionRequest, ) (store.SessionPromptAdmission, bool, error)
ReplaySessionPromptAdmission returns an exact prior receipt without claiming a new identity.
func (*SessionRepo) SessionArchivedAt ¶
func (g *SessionRepo) SessionArchivedAt( ctx context.Context, workspaceID string, sessionID string, ) (*time.Time, error)
SessionArchivedAt returns workspace-scoped archive metadata for one session.
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) SetSessionArchived ¶
func (g *SessionRepo) SetSessionArchived( ctx context.Context, workspaceID string, sessionID string, archived bool, ) (store.SessionInfo, error)
SetSessionArchived archives or restores one workspace-owned session.
func (*SessionRepo) StageAdmittedSessionSteer ¶
func (g *SessionRepo) StageAdmittedSessionSteer( ctx context.Context, admissionReq store.SessionPromptAdmissionRequest, queueReq store.SessionInputQueueInsert, ) (admission store.SessionPromptAdmission, entry store.SessionInputQueueEntry, created bool, err error)
StageAdmittedSessionSteer atomically binds a receipt and replaces the active staged steer.
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) TransitionPendingInteraction ¶
func (g *SessionRepo) TransitionPendingInteraction( ctx context.Context, req store.PendingInteractionTransition, ) (commit store.SessionAttentionCommit, err error)
TransitionPendingInteraction moves one canonical record and updates its projection atomically.
func (*SessionRepo) UpdateSessionState ¶
func (g *SessionRepo) UpdateSessionState(ctx context.Context, update store.SessionStateUpdate) error
UpdateSessionState updates the mutable session state fields.
type SkillExposureRepo ¶
type SkillExposureRepo struct {
// contains filtered or unexported fields
}
func (*SkillExposureRepo) CreateSkillExposure ¶
func (r *SkillExposureRepo) CreateSkillExposure( ctx context.Context, record store.SkillExposureRecord, ) (store.SkillExposureRecord, error)
CreateSkillExposure inserts one durable link-ownership record.
func (*SkillExposureRepo) DeleteSkillExposure ¶
func (r *SkillExposureRepo) DeleteSkillExposure(ctx context.Context, id int64) error
DeleteSkillExposure removes one ownership record after its proven link is gone.
func (*SkillExposureRepo) GetSkillExposureByOwnerTarget ¶
func (r *SkillExposureRepo) GetSkillExposureByOwnerTarget( ctx context.Context, skillName string, ownerScope store.SkillExposureOwnerScope, workspaceID string, targetSlug string, ) (store.SkillExposureRecord, error)
GetSkillExposureByOwnerTarget returns one owner-scoped target record.
func (*SkillExposureRepo) ListSkillExposuresByCanonicalDir ¶
func (r *SkillExposureRepo) ListSkillExposuresByCanonicalDir( ctx context.Context, canonicalDir string, ) ([]store.SkillExposureRecord, error)
ListSkillExposuresByCanonicalDir returns every record that must be cleaned before skill removal.
func (*SkillExposureRepo) ListSkillExposuresByOwner ¶
func (r *SkillExposureRepo) ListSkillExposuresByOwner( ctx context.Context, skillName string, ownerScope store.SkillExposureOwnerScope, workspaceID string, ) ([]store.SkillExposureRecord, error)
ListSkillExposuresByOwner returns deterministic records for one skill owner.
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) AdvanceTerminalRunCommandPhase ¶
func (g *TaskRepo) AdvanceTerminalRunCommandPhase( ctx context.Context, command taskpkg.TerminalRunCommand, next taskpkg.TerminalRunCommandPhase, updatedAt time.Time, ) (taskpkg.TerminalRunCommand, error)
AdvanceTerminalRunCommandPhase durably records the external-effect boundary.
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) 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) 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) GetTaskInReadScope ¶
func (g *TaskRepo) GetTaskInReadScope( ctx context.Context, id string, readScope store.ReadScope, ) (taskpkg.Task, error)
GetTaskInReadScope returns one task only when its immutable owner matches the explicit profile lens. Aggregate reads remain explicit through AllProfiles.
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) ImportTerminalRunHistory ¶
func (g *TaskRepo) ImportTerminalRunHistory( ctx context.Context, command *taskpkg.TerminalRunHistoryImport, ) error
ImportTerminalRunHistory atomically imports one finished bootstrap record, its task projection, and its canonical audit event.
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) ListExpiredTaskBlockTargets ¶
func (g *TaskRepo) ListExpiredTaskBlockTargets( ctx context.Context, now time.Time, ) ([]taskpkg.BlockExpiryTarget, error)
ListExpiredTaskBlockTargets returns the stable block identities eligible at the supplied cutoff.
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) ListTerminalRunCommands ¶
func (g *TaskRepo) ListTerminalRunCommands( ctx context.Context, ) ([]taskpkg.TerminalRunCommand, error)
ListTerminalRunCommands lists durable recovery obligations for daemon boot.
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) ReleaseTerminalRunCommand ¶
func (g *TaskRepo) ReleaseTerminalRunCommand( ctx context.Context, command taskpkg.TerminalRunCommand, ) error
ReleaseTerminalRunCommand removes only the matching receipt while its full source fence is still current.
func (*TaskRepo) ReserveTerminalRunCommand ¶
func (g *TaskRepo) ReserveTerminalRunCommand( ctx context.Context, command taskpkg.TerminalRunCommand, ) (taskpkg.TerminalRunCommand, bool, error)
ReserveTerminalRunCommand admits one exact terminal intent before any external session effect. Existing commands are returned only in the same workspace/task/run scope.
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) SetTaskWorktreePolicy ¶
func (g *TaskRepo) SetTaskWorktreePolicy( ctx context.Context, mutation *taskpkg.WorktreePolicyMutation, ) (stored taskpkg.ExecutionProfile, err error)
SetTaskWorktreePolicy commits one worktree policy patch and its event.
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) UpdateTaskRunMetadata ¶
func (g *TaskRepo) UpdateTaskRunMetadata( ctx context.Context, mutation taskpkg.RunMetadataMutation, ) (taskpkg.Run, error)
UpdateTaskRunMetadata applies a metadata-only compare-and-set. The SQL shape cannot alter lifecycle, identity, session, lease, result, or error fields.
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) WithLeaseSettlementTransaction ¶
func (g *TaskRepo) WithLeaseSettlementTransaction( ctx context.Context, action string, fn func(taskpkg.LeaseSettlementMutationStore) error, ) error
WithLeaseSettlementTransaction runs one lease settlement under the repository's writer transaction.
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.
func (*TaskRepo) WithTaskMutationTransaction ¶
func (g *TaskRepo) WithTaskMutationTransaction( ctx context.Context, action string, mutation taskpkg.RunMutation, ) error
WithTaskMutationTransaction runs one authoritative task mutation under an immediate writer transaction and publishes collected events only after commit.
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) 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) 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) GetRunReview ¶
GetRunReview returns one persisted run review by id.
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) 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) 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) 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) DeleteMCPAuthRegistration ¶
DeleteMCPAuthRegistration removes one target-scoped OAuth client registration and its DCR secrets.
func (*VaultRepo) DeleteMCPAuthToken ¶
DeleteMCPAuthToken removes persisted token state for one server.
func (*VaultRepo) DeleteMCPAuthorizationState ¶
DeleteMCPAuthorizationState atomically removes OAuth tokens, DCR registration state, and their Vault secrets.
func (*VaultRepo) DeleteVaultSecret ¶
DeleteVaultSecret removes one encrypted vault secret record.
func (*VaultRepo) GetMCPAuthRegistration ¶
func (g *VaultRepo) GetMCPAuthRegistration( ctx context.Context, target mcpauth.Target, ) (mcpauth.ClientRegistration, error)
GetMCPAuthRegistration returns one target-scoped OAuth client registration.
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) SaveMCPAuthRegistration ¶
func (g *VaultRepo) SaveMCPAuthRegistration( ctx context.Context, registration mcpauth.ClientRegistration, secrets mcpauth.RegistrationSecrets, ) (mcpauth.ClientRegistration, error)
SaveMCPAuthRegistration atomically persists one registration and its DCR secrets.
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.
type WorktreeRepo ¶
type WorktreeRepo struct {
// contains filtered or unexported fields
}
func (*WorktreeRepo) CompareAndSwapState ¶
func (*WorktreeRepo) CompleteCreate ¶
func (*WorktreeRepo) DeletePending ¶
func (g *WorktreeRepo) DeletePending(ctx context.Context, workspaceID, id string) error
func (*WorktreeRepo) DeleteRunMaterialization ¶
func (*WorktreeRepo) FailRunningExitOperations ¶
func (*WorktreeRepo) FinishExitOperation ¶
func (*WorktreeRepo) Get ¶
func (g *WorktreeRepo) Get(ctx context.Context, workspaceID, idOrName string) (*worktree.Worktree, error)
Get resolves IDs before live names. Dismissed rows remain addressable only by ID.
func (*WorktreeRepo) GetForgeStatus ¶
func (g *WorktreeRepo) GetForgeStatus( ctx context.Context, workspaceID string, id string, ) (*worktree.ForgeStatus, error)
func (*WorktreeRepo) InsertExitOperation ¶
func (g *WorktreeRepo) InsertExitOperation(ctx context.Context, operation worktree.ExitOperation) error
func (*WorktreeRepo) ListRecoverable ¶
func (*WorktreeRepo) ListRunningExitOperations ¶
func (g *WorktreeRepo) ListRunningExitOperations(ctx context.Context) ([]worktree.ExitOperation, error)
func (*WorktreeRepo) SaveForgeStatus ¶
func (g *WorktreeRepo) SaveForgeStatus( ctx context.Context, workspaceID string, id string, status worktree.ForgeStatus, ) error
func (*WorktreeRepo) SaveStatus ¶
func (*WorktreeRepo) UpdatePending ¶
func (g *WorktreeRepo) UpdatePending( ctx context.Context, workspaceID string, id string, update worktree.PendingUpdate, ) error
Source Files
¶
- automation_loop_target_record.go
- automation_record_helpers.go
- automation_record_normalize.go
- automation_run_insert.go
- automation_scan.go
- automation_sqlc_mapping.go
- bridge_sqlc_mapping.go
- column_names.go
- gateway_sqlc_mapping.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_reservation.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_cmd_palette.go
- global_db_constants.go
- global_db_dead_entity.go
- global_db_extension_env.go
- global_db_gateway.go
- global_db_gateway_devices.go
- global_db_gateway_ingress.go
- global_db_gateway_ingress_bindings.go
- global_db_goal_binding_activation_cleanup.go
- global_db_goal_binding_activation_owner.go
- global_db_goal_binding_allocate.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_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_admission_claims.go
- global_db_loop_amendments.go
- global_db_loop_api.go
- global_db_loop_approval_wait.go
- global_db_loop_best.go
- global_db_loop_cancel.go
- global_db_loop_cancel_finalize.go
- global_db_loop_cancel_lane.go
- global_db_loop_cancel_live.go
- global_db_loop_cancel_pending.go
- global_db_loop_cancel_sessions.go
- global_db_loop_cancel_wake.go
- global_db_loop_catalog.go
- global_db_loop_config.go
- global_db_loop_control.go
- global_db_loop_coordinator_seed.go
- global_db_loop_death_resume.go
- global_db_loop_definition_state.go
- global_db_loop_effect_outbox.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_history.go
- global_db_loop_history_import.go
- global_db_loop_history_write.go
- global_db_loop_inline.go
- global_db_loop_lifecycle_errors.go
- global_db_loop_node_attempts.go
- global_db_loop_node_controls.go
- global_db_loop_node_inventory.go
- global_db_loop_node_inventory_details.go
- global_db_loop_node_lane_pause.go
- global_db_loop_node_liveness.go
- global_db_loop_node_output.go
- global_db_loop_node_pause.go
- global_db_loop_node_pause_effects.go
- global_db_loop_node_requeue.go
- global_db_loop_node_requeue_runs.go
- global_db_loop_node_terminal.go
- global_db_loop_node_waits.go
- global_db_loop_normalize.go
- global_db_loop_outputs.go
- global_db_loop_parked_clock.go
- global_db_loop_pause.go
- global_db_loop_pinning.go
- global_db_loop_read_artifacts.go
- global_db_loop_read_roster.go
- global_db_loop_reconcile.go
- global_db_loop_reconcile_queries.go
- global_db_loop_request_query.go
- global_db_loop_request_response.go
- global_db_loop_request_review.go
- global_db_loop_requests.go
- global_db_loop_retry_due.go
- global_db_loop_run_reconciliation.go
- global_db_loop_scan.go
- global_db_loop_scan_control.go
- global_db_loop_summaries.go
- global_db_loop_summary_projection.go
- global_db_loop_task_attention.go
- global_db_loop_task_lifecycle.go
- global_db_loop_task_recovery.go
- global_db_loop_task_recovery_metadata.go
- global_db_loop_terminal_settlement.go
- global_db_loop_timetravel.go
- global_db_loop_timetravel_create.go
- global_db_loop_transition.go
- global_db_loop_wait_due.go
- global_db_loop_wait_escalation.go
- global_db_loop_wait_escalation_apply.go
- global_db_loop_wait_events.go
- global_db_loop_wait_expiry_route.go
- global_db_loop_wait_resume.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_mcp_oauth_registration.go
- global_db_model_catalog.go
- global_db_model_catalog_batch.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_scoped_work.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_permit.go
- global_db_notification_preset.go
- global_db_observe.go
- global_db_observe_cleanup.go
- global_db_observe_overview.go
- global_db_observe_overview_scoped.go
- global_db_observe_retention_tokens.go
- global_db_observe_token_usage.go
- global_db_options.go
- global_db_permission.go
- global_db_preset_bootstrap.go
- global_db_profile_attention.go
- global_db_profile_seed.go
- global_db_profile_transaction.go
- global_db_runtime_metadata_cut.go
- global_db_scheduler_pause.go
- global_db_session.go
- global_db_session_agent_metrics.go
- global_db_session_archive.go
- global_db_session_attachments.go
- global_db_session_attention.go
- global_db_session_attention_order.go
- global_db_session_attention_scan.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_mutation.go
- global_db_session_input_queue_scan.go
- global_db_session_input_queue_terminal.go
- global_db_session_page.go
- global_db_session_pending.go
- global_db_session_pending_scan.go
- global_db_session_prompt_admission.go
- global_db_session_prompt_admission_queue.go
- global_db_session_prompt_admission_scan.go
- global_db_session_prompt_dispatch.go
- global_db_session_scan.go
- global_db_session_scan_liveness.go
- global_db_session_update.go
- global_db_skill_exposure.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_boundary_rules.go
- global_db_task_coordinator_budget.go
- global_db_task_coordinator_cancellation.go
- global_db_task_coordinator_context.go
- global_db_task_coordinator_continue.go
- global_db_task_coordinator_effects.go
- global_db_task_coordinator_event.go
- global_db_task_coordinator_failure.go
- global_db_task_coordinator_intents.go
- global_db_task_coordinator_mutations.go
- global_db_task_coordinator_parent_close.go
- global_db_task_coordinator_progress.go
- global_db_task_coordinator_runtime.go
- global_db_task_coordinator_settlement.go
- global_db_task_coordinator_snapshot.go
- global_db_task_coordinator_strategy.go
- global_db_task_coordinator_wake_publication.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_history_import.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_mutations.go
- global_db_task_lease_recovery.go
- global_db_task_lease_settlement_tx.go
- global_db_task_mutation_runs.go
- global_db_task_mutation_tx.go
- global_db_task_nominal.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_metadata.go
- global_db_task_run_scan.go
- global_db_task_runagent_cleanup.go
- global_db_task_runs.go
- global_db_task_scan.go
- global_db_task_scheduler_status.go
- global_db_task_session_lease_tx.go
- global_db_task_starvation.go
- global_db_task_status.go
- global_db_task_terminal_commands.go
- global_db_task_transaction.go
- global_db_task_watch_event_payloads.go
- global_db_taskless_run_recovery.go
- global_db_tool_approval_grants.go
- global_db_tool_approval_pending.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
- global_db_workspace_mcp_state.go
- global_db_worktree.go
- global_db_worktree_events.go
- global_db_worktree_sessions.go
- global_db_worktree_status.go
- goal_binding_sqlc_mapping.go
- goal_checkpoint_sqlc_mapping.go
- goal_judge_sqlc_mapping.go
- goal_runtime_mapping.go
- goal_sqlc_mapping.go
- goal_verdict_diagnostics.go
- heartbeat_sqlc_mapping.go
- loop_sqlc_mapping.go
- migration_stream.go
- network_preferences_mapping.go
- notification_cursor_mapping.go
- notification_preset_mapping.go
- notification_repo.go
- operator_home_migration_context.go
- participation_mapping.go
- repositories.go
- session_core_mapping.go
- session_runtime_selection_mapping.go
- skill_exposure_sqlc_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
- worktree_sqlc_mapping.go