Versions in this module Expand all Collapse all v0 v0.0.50 Sep 1, 2026 Changes in this version + const GoalStatusActive + const GoalStatusBlocked + const GoalStatusBudgetExhausted + const GoalStatusComplete + const GoalStatusProgress + const GoalStatusStopped + const RawRunExposedToolName + var ErrRestartRequested = errors.New("restart requested") + func DeleteSessionIn(ctx context.Context, databaseURL, conversationID string) (int64, error) + func ExternalMCPAgentsIn(cfg *config.Config, runtimeDir string) ([]string, error) + func IsBridgeStopped(err error) bool + func LintTry(workspace, runtimeDir string, overlays []string, baseOverlay string, ...) (protocol.LintResult, error) + func LoadRuntimeDefinitions(cfg *config.Config, runtimeDir string) (rocketcode.Agents, rocketcode.Skills, error) + func NoopActivationHook(_ context.Context, _ *protocol.InboundMessage) error + func OverlayContextFromSkel(got skel.OverlayContext) protocol.OverlayContext + func Run(ctx context.Context, cfg *config.Config, configPath string, ...) error + func RunTryTurn(ctx context.Context, workspace, runtimeDir string, overlays []string, ...) (thinking, answer string, err error) + func ValidateGoalCheckScriptStart(cfg *config.Config, agentName, script string) error + func ValidateRuntimeDefinitions(workspace, runtimeDir string, channels []string) error + type ActiveTurnState struct + Checkpoint harness.ActiveTurnCheckpoint + CreatedAt time.Time + PendingSteers []protocol.PendingSteer + SourceMetadata map[string]string + UpdatedAt time.Time + type Bridge struct + func NewConversation(cfg *config.Config, publisher protocol.OutboundPublisher, bridgeCfg *Config, ...) *Bridge + func (b *Bridge) InterruptActiveTurn() *protocol.InboundMessage + func (b *Bridge) PickLaterWork(ctx context.Context) error + func (b *Bridge) RecoverActiveTurn(ctx context.Context, turn *ActiveTurnState) error + func (b *Bridge) ResetScheduledMessages() error + func (b *Bridge) ScheduleMessage(delay time.Duration, message string, recurring bool) error + func (b *Bridge) Start(ctx context.Context) error + func (b *Bridge) Stop() error + func (b *Bridge) Submit(ctx context.Context, msg *protocol.InboundMessage) error + func (b *Bridge) SubmitWhenActive(ctx context.Context, msg *protocol.InboundMessage, ...) error + func (b *Bridge) SwitchAgent(agent string) + type Config struct + Agent string + AgentAfterRecovery string + ConversationID string + EnqueueActivation EnqueueActivation + ExternalConversationID string + ManagedConversationID string + OutputTargets []protocol.OutputTarget + RecoveringActiveTurn bool + RequestReload func(context.Context, string) (string, error) + RequestRestart func(context.Context, string) (string, error) + SessionService *SessionService + StartNewThread func(context.Context, *protocol.StartNewThreadRequest) (protocol.StartNewThreadResult, error) + SteerDrain rocketcode.SteerDrain + UserQuestionAsker protocol.UserQuestionAsker + type CronScheduleRun struct + DueAt time.Time + RelativePath string + ScheduleID string + type CronScheduleState struct + NextDue time.Time + RelativePath string + ScheduleID string + type DevelopmentChat struct + type DevelopmentTurnResult struct + Answer string + Thinking string + func RunDevelopmentTurn(ctx context.Context, cfg *config.Config, runtimeDir, agent, prompt string, ...) (DevelopmentTurnResult, error) + type EnqueueActivation struct + Fn func(context.Context, *protocol.ThreadQueueItem, *protocol.InboundMessage) error + func (a EnqueueActivation) Activate(ctx context.Context, item *protocol.ThreadQueueItem, ...) error + type ExternalMCPSessionState struct + Agent string + ManagedConversationID string + PrivateConversationID string + SlackChannel string + type GoalState struct + CheckScript string + CreatedAt time.Time + MaxTurns int + Note string + Objective string + SlackRecipientTeamID string + SlackRecipientUserID string + Status string + TurnsUsed int + UpdatedAt time.Time + type KeyedConversationLocks struct + func NewKeyedConversationLocks() *KeyedConversationLocks + func (l *KeyedConversationLocks) Lock(key string) func() + type Manager struct + func New(workspace, runtimeDir string, channels []string, ...) *Manager + func (m *Manager) ListCronjobs(channel string) ([]string, error) + func (m *Manager) LoadOneOffCronjob(target string) (protocol.OneOffCronjob, error) + func (m *Manager) RunOneOffCronjob(ctx context.Context, job protocol.OneOffCronjob, ...) + func (m *Manager) Start(ctx context.Context) error + func (m *Manager) Stop(ctx context.Context) error + type ObservedSessionEntry struct + Entry harness.SessionEntry + ID int64 + func ObserveSessionEntries(ctx context.Context, databaseURL, conversationID string, lastID int64) ([]ObservedSessionEntry, error) + type PruneStateStats struct + ExternalMCPSessions int + SessionRows int64 + Threads int + type RawRunProgress struct + ConversationID string + Message func(context.Context, string) error + RequestReload func(context.Context, string) (string, error) + RequestRestart func(context.Context, string) (string, error) + SessionService *SessionService + StartNewThread func(context.Context, *protocol.StartNewThreadRequest) (protocol.StartNewThreadResult, error) + TextChannel string + Thinking func(context.Context, string) error + type RawRunResult struct + Attachments []protocol.OutboundAttachment + Text string + VerbatimMessage string + func RunRawWithProgress(ctx context.Context, cfg *config.Config, agent, prompt string, ...) (result RawRunResult, err error) + type RunFunc func(context.Context, string, string, *slog.Logger, *RawRunProgress) (protocol.CronRunResult, error) + type Runtime struct + CannotResume []cannotResumeItem + Cfg *config.Config + Channels protocol.Channels + ConfigPath string + Cron *Manager + ExternalMCPUsers map[string]string + Log *slog.Logger + OverlayMu *sync.Mutex + RecoveredTurns []ActiveTurnState + RefreshExternalMCPAgents *func() error + Reload func(context.Context, string) (string, error) + Restart func(context.Context, string) (string, error) + RunCtx context.Context + Sessions *SessionService + TextRouter protocol.PrimaryTextRouter + func (r *Runtime) AttachSlack(slack SlackFrontend) + func (r *Runtime) SubmitExternalMCP(ctx context.Context, agent, conversationID string, ...) error + type SessionListOptions struct + Limit int + Since time.Time + Until time.Time + type SessionService struct + func NewSessionServiceIn(databaseURL string, logger *slog.Logger) (*SessionService, error) + func (s *SessionService) AccountGoalTurn(conversationID string) (GoalState, bool, error) + func (s *SessionService) ActiveGoalThreads() (map[string]ThreadState, error) + func (s *SessionService) ActiveGoals() (map[string]GoalState, error) + func (s *SessionService) ActiveTurn(ctx context.Context, turnID string) (ActiveTurnState, bool, error) + func (s *SessionService) AppendEntryID(ctx context.Context, conversationID string, entry *harness.SessionEntry) (int64, error) + func (s *SessionService) ApplyPendingRestartNotifications(ctx context.Context) error + func (s *SessionService) BeginGoal(conversationID, objective, checkScript string, maxTurns int, ...) error + func (s *SessionService) ClaimCronSchedule(due CronScheduleState, nextDue, now time.Time) (CronScheduleRun, bool, error) + func (s *SessionService) ClaimScheduledMessage(id, conversationID string, dueAt, now time.Time) (message protocol.ScheduledMessageState, claimed bool, err error) + func (s *SessionService) ClearActiveTurn(ctx context.Context, turnID string) error + func (s *SessionService) CompleteCronRun(relativePath string, now time.Time) error + func (s *SessionService) DeleteScheduledMessage(id string) error + func (s *SessionService) DeleteThreadQueueItem(id string) error + func (s *SessionService) DueCronSchedules(now time.Time, limit int) ([]CronScheduleState, error) + func (s *SessionService) ExternalMCPSession(externalConversationID string) (ExternalMCPSessionState, bool, error) + func (s *SessionService) ExternalMCPSessionByConversationID(conversationID string) (externalConversationID string, session ExternalMCPSessionState, ok bool, ...) + func (s *SessionService) Goal(conversationID string) (GoalState, bool, error) + func (s *SessionService) MarkRestartRequester(ctx context.Context, conversationID string) error + func (s *SessionService) ObserveEntries(ctx context.Context, conversationID string, lastID int64) ([]ObservedSessionEntry, error) + func (s *SessionService) PairBusy(pairID string) bool + func (s *SessionService) PairBusyFor(pairID, conversationID string) bool + func (s *SessionService) PruneStateBefore(ctx context.Context, cutoff time.Time) (PruneStateStats, error) + func (s *SessionService) PutMCPWaiter(id string, inbound *protocol.InboundMessage) + func (s *SessionService) PutScheduledMessage(id string, message *protocol.ScheduledMessageState) error + func (s *SessionService) PutThreadQueueItem(id string, item *protocol.ThreadQueueItem) error + func (s *SessionService) RecoverableActiveTurns(ctx context.Context) ([]ActiveTurnState, error) + func (s *SessionService) RegisterExternalMCPConversation(externalConversationID, managedAgent string, session *ExternalMCPSessionState) error + func (s *SessionService) ReleaseExternalMCPRecovery(conversationID string) error + func (s *SessionService) RemoveExternalMCPConversation(externalConversationID string) error + func (s *SessionService) ReserveExternalMCPRecovery(conversationID string) error + func (s *SessionService) ReserveWorkflowTurn(conversationID string) (release func(), reserved bool, err error) + func (s *SessionService) ResetCronSchedules() error + func (s *SessionService) ResetScheduledMessages(conversationID string) error + func (s *SessionService) ScheduledMessages() (map[string]protocol.ScheduledMessageState, error) + func (s *SessionService) ScheduledMessagesForConversation(conversationID string) (map[string]protocol.ScheduledMessageState, error) + func (s *SessionService) SetPendingSteers(conversationID string, steers []protocol.PendingSteer) error + func (s *SessionService) SetThreadAgentIfExists(conversationID, agent string) (bool, error) + func (s *SessionService) StartActiveTurn(ctx context.Context, checkpoint *harness.ActiveTurnCheckpoint) error + func (s *SessionService) Stop(context.Context) error + func (s *SessionService) StopGoal(conversationID string) error + func (s *SessionService) SyncCronSchedules(schedules []CronScheduleState, now time.Time) error + func (s *SessionService) TakeMCPWaiter(id string) *protocol.InboundMessage + func (s *SessionService) Thread(conversationID string) (ThreadState, bool, error) + func (s *SessionService) ThreadQueueForConversation(conversationID string) ([]protocol.ThreadQueueItem, error) + func (s *SessionService) UpdateGoalStatus(conversationID, status, note string) (GoalState, error) + func (s *SessionService) UpsertActiveTurn(ctx context.Context, checkpoint *harness.ActiveTurnCheckpoint, ...) error + func (s *SessionService) UpsertExternalMCPSession(externalConversationID string, session *ExternalMCPSessionState) error + func (s *SessionService) UpsertThread(conversationID string, thread ThreadState) error + type SessionSummary struct + ConversationID string + LastAssistantMessage string + LastUpdated time.Time + LastUserMessage string + Turns int + func ListSessionsInOptions(ctx context.Context, databaseURL string, options SessionListOptions) ([]SessionSummary, error) + type SideAskRunner struct + Config *config.Config + Logger *slog.Logger + Sessions *SessionService + func (r SideAskRunner) Run(ctx context.Context, req protocol.SideAskRequest) error + type SlackFrontend interface + AbortResponse func(*protocol.OutboundMessage) + ActivateEnqueue func(context.Context, *protocol.ThreadQueueItem, *protocol.InboundMessage) error + AskUserQuestion func(context.Context, *protocol.AskUserQuestionRequest) (protocol.AskUserQuestionAnswer, error) + DiscardPendingSteers func(context.Context, []protocol.PendingSteer) + DrainSteers func(context.Context, string) []string + HandleBroadcast func(context.Context, *protocol.Broadcast) protocol.BroadcastAcknowledgement + RestorePendingSteers func(string, []protocol.PendingSteer) + SendResponse func(context.Context, *protocol.OutboundMessage) error + SetPendingSteersSink func(protocol.PendingSteersSink) + Start func(context.Context) error + StartNewThreadRoot func(context.Context, *protocol.StartNewThreadRequest) (protocol.StartNewThreadRootResult, error) + Stop func(context.Context) error + type ThreadCreator string + const ThreadCreatedByCron + type ThreadState struct + Agent string + CreatedBy ThreadCreator