Documentation
¶
Index ¶
- Constants
- Variables
- func AddOpenCodeSessionBridge(ctx context.Context, cfg *config.LockedConfig, name, session string) error
- func AgentDraftTemplates() []string
- func AgentTagChoices(agent *harness.Agent) []string
- func DecideOrigin(facts *ChatOriginFacts) (origin any, text string)
- func ExternalMCPAgentsIn(cfg *config.LockedConfig, runtimeDir string) ([]string, error)
- func GenerateOneShot(ctx context.Context, locked *config.LockedConfig, ...) (reply string, err error)
- func GenerateTitle(ctx context.Context, cfg *config.Config, request, recent string) (string, error)
- func LoadRuntimeAgents(cfg *config.LockedConfig, runtimeDir string) (agents harness.Agents, err error)
- func LoadRuntimeDefinitions(cfg *config.LockedConfig, runtimeDir string) (harness.Agents, harness.Skills, error)
- func MentionedIDs(hits []MessageSearchHit, mentions map[string]string) []string
- func PromptPrincipal(header string) string
- func ReplayInputMessageRoleText(item *responses.ResponseInputItemUnionParam, raw json.RawMessage) (role, text string, ok bool, err error)
- func RoutineStem(path string) string
- func Run(ctx context.Context, cfg *config.Config, logger *slog.Logger, ...) error
- func SetLogLevel(level *slog.LevelVar, text string)
- func TabConversation(path string) string
- func TestDecisionModel(ctx context.Context, cfg *config.Config, ref string) (time.Duration, error)
- func TestModel(ctx context.Context, cfg *config.Config, ref string) (time.Duration, error)
- func UploadDir(cfg *config.Config, conversationID string) string
- func WithWebPromptAcceptance(ctx context.Context, acceptance webPromptAcceptance) context.Context
- type AgentDraft
- type AgentDraftAsk
- type AgentDraftExternalMCP
- type AgentDraftLayers
- type AgentDraftMessage
- type AgentDraftNameError
- type AgentDraftNotValidError
- type AgentDraftOp
- type AgentDraftOpError
- type AgentDraftOpKind
- type AgentDraftOrigin
- type AgentDraftPending
- type AgentDraftPresence
- type AgentDraftProblem
- type AgentDraftProposal
- type AgentDraftProposalState
- type AgentDraftProposedBody
- type AgentDraftProposedSetting
- type AgentDraftRefusedError
- type AgentDraftReview
- type AgentDraftReviewSetting
- type AgentDraftSave
- type AgentDraftSaveError
- type AgentDraftSaveState
- type AgentDraftSend
- type AgentDraftSetting
- type AgentDraftSplice
- type AgentDraftVariant
- type AgentDraftWaitEnd
- type AgentLayer
- type AgentPausedError
- type Attention
- type AttentionAction
- type Bridge
- func (b *Bridge) AppendChildEntry(ctx context.Context, key harness.ChildKey, entry *harness.SessionEntry) error
- func (b *Bridge) AwaitSubagent(ctx context.Context, key, callKey string) (string, harness.ReplayAttribution, error)
- func (b *Bridge) Drain(ctx context.Context, responseID string, phase harness.TurnPhase, ...) ([]harness.PromptInput, error)
- func (b *Bridge) InterruptActiveTurn() *protocol.InboundMessage
- func (b *Bridge) PickLaterWork(ctx context.Context) error
- func (b *Bridge) ResetScheduledMessages(origin *protocol.InboundMessage) error
- func (b *Bridge) Run(ctx context.Context) error
- func (b *Bridge) ScheduleMessage(origin *protocol.InboundMessage, delay time.Duration, message string, ...) error
- func (b *Bridge) Stop()
- func (b *Bridge) Submit(ctx context.Context, msg *protocol.InboundMessage) error
- func (b *Bridge) SwitchAgent(agent string)
- func (b *Bridge) WriteSubagent(ctx context.Context, write *harness.SubagentWrite) (bool, error)
- type ChatOriginFacts
- type Config
- type ConversationKind
- type Delegation
- type ExternalMCPSessionState
- type FrontendAssembler
- type GoalState
- type HistoryInventory
- type HistorySnapshot
- type KeyedConversationLocks
- type ListTab
- type MessageSearchHit
- type MessageTreeNode
- type ObservedSessionEntry
- type Page
- type PageKind
- type PruneStateStats
- type QuestionNotPendingError
- type RoutineRunProgress
- type RoutineRunSource
- type RoutineScheduleState
- type Runtime
- func (r *Runtime) AgentPaused(ctx context.Context, conversationID string) (bool, error)
- func (r *Runtime) AnswerQuestion(ctx context.Context, conversationID, questionID string, ...) error
- func (r *Runtime) AttachSlack(slack slackLookup)
- func (r *Runtime) BackgroundJobs(ctx context.Context, conversationID string) ([]protocol.BackgroundJob, bool, error)
- func (r *Runtime) CompletionNotes(ctx context.Context, history string, jobIDs []string) ([]protocol.BackgroundJob, error)
- func (r *Runtime) ContinueRun(ctx context.Context, run, conversationID string, shared bool) (string, error)
- func (r *Runtime) CreateConversation(ctx context.Context, conversation protocol.Conversation) error
- func (r *Runtime) DeleteBranch(ctx context.Context, conversationID, messageID string, dryRun bool) (protocol.BranchDeletion, error)
- func (r *Runtime) DeleteQueueItem(ctx context.Context, conversationID, id string) (bool, error)
- func (r *Runtime) EditQueueItem(ctx context.Context, conversationID, id, text, principal, username string) (bool, error)
- func (r *Runtime) MoveToBackground(ctx context.Context, conversationID string) (bool, error)
- func (r *Runtime) OpenCodeMCP() http.Handler
- func (r *Runtime) PendingQuestions(ctx context.Context, conversationID string) ([]protocol.AskUserQuestionRequest, error)
- func (r *Runtime) PopQueueItem(ctx context.Context, conversationID, id string) (bool, error)
- func (r *Runtime) PostPausedMessage(ctx context.Context, inbound *protocol.InboundMessage) error
- func (r *Runtime) PromoteQueueItem(ctx context.Context, conversationID, id string) (bool, error)
- func (r *Runtime) PublishOutbound(ctx context.Context, message *protocol.OutboundMessage) error
- func (r *Runtime) QueueItems(conversationID string) ([]protocol.ThreadQueueItem, error)
- func (r *Runtime) Reload(reason string) (string, error)
- func (r *Runtime) ReorderQueueItems(ctx context.Context, conversationID string, ids []string) error
- func (r *Runtime) Restart(reason string) string
- func (r *Runtime) RunTurn(ctx context.Context, inbound *protocol.InboundMessage) error
- func (r *Runtime) RunningAgent(conversationID string) string
- func (r *Runtime) SandboxError() string
- func (r *Runtime) SaveBehavior(behavior *config.Behavior) error
- func (r *Runtime) SetAgentPaused(ctx context.Context, conversationID, by string, paused bool) error
- func (r *Runtime) SlackWarning() string
- func (r *Runtime) StageRevert(ctx context.Context, conversationID, target string, ...) (marker, prompt string, err error)
- func (r *Runtime) StartGoal(ctx context.Context, inbound *protocol.InboundMessage, ...) error
- func (r *Runtime) StashQueueItem(ctx context.Context, conversationID string, item *protocol.ThreadQueueItem) error
- func (r *Runtime) StopBackgroundJob(ctx context.Context, conversationID, jobID string) (bool, error)
- func (r *Runtime) Subscribe(ctx context.Context) iter.Seq[protocol.Event]
- func (r *Runtime) SwitchConversationAgent(conversationID, agent string) (bool, error)
- func (r *Runtime) ValidateAgentFile(name string, data []byte) error
- type SavedSearch
- type SearchKey
- type SearchPage
- type SearchScope
- type SearchTerm
- type SessionField
- type SessionMatch
- type SessionSearch
- type SessionService
- func (s *SessionService) ActiveGoalThreads() (map[string]ThreadState, error)
- func (s *SessionService) AddToList(ctx context.Context, username string, tab ListTab) error
- func (s *SessionService) AgentDraftLayers(ctx context.Context, id, variant, destination string) (*AgentDraftLayers, error)
- func (s *SessionService) AgentDraftMessages(ctx context.Context, chat string) ([]AgentDraftMessage, error)
- func (s *SessionService) AgentDraftOps(ctx context.Context, id string, since int64) ([]AgentDraftOp, error)
- func (s *SessionService) AgentDraftPresences(ctx context.Context, id string) ([]AgentDraftPresence, error)
- func (s *SessionService) AgentDraftProposals(ctx context.Context, id string) ([]AgentDraftProposal, error)
- func (s *SessionService) AgentOrigin(name string) (string, error)
- func (s *SessionService) AppendBranchSummary(ctx context.Context, conversationID, branchID, summary string) (bool, error)
- func (s *SessionService) AppendEntryID(ctx context.Context, conversationID string, entry *harness.SessionEntry) (int64, error)
- func (s *SessionService) ApplyAgentDraftOp(ctx context.Context, id string, op *AgentDraftOp) (int64, error)
- func (s *SessionService) AttachmentMetadata(ctx context.Context, conversationID, id string, uploadOnly bool) (protocol.OutboundAttachment, error)
- func (s *SessionService) AutoParkAll(ctx context.Context, username string) (bool, error)
- func (s *SessionService) BeginGoal(conversationID string, goal *GoalState) error
- func (s *SessionService) BranchEntries(ctx context.Context, conversationID, branchID string) ([]ObservedSessionEntry, error)
- func (s *SessionService) ChangeAttention(ctx context.Context, username string, paths []string, action AttentionAction, ...) error
- func (s *SessionService) Changes(ctx context.Context, conversationID string) iter.Seq2[protocol.ConversationChange, error]
- func (s *SessionService) ChannelFact(ctx context.Context, workspaceID, channelID string) (name string, found bool, err error)
- func (s *SessionService) ChatOriginFacts(ctx context.Context, id string) iter.Seq2[ChatOriginFacts, error]
- func (s *SessionService) CheckAgentDraftMerge(ctx context.Context, rt agentDraftRuntime, id, author string) (AgentDraftSaveState, error)
- func (s *SessionService) ClaimRoutineSchedule(due RoutineScheduleState, nextDue, now time.Time) (bool, error)
- func (s *SessionService) ClaimScheduledMessage(id, conversationID string, dueAt, now time.Time) (message protocol.ScheduledMessageState, claimed bool, err error)
- func (s *SessionService) ClosedTabs(ctx context.Context, username string) ([]Tab, error)
- func (s *SessionService) ConversationKind(ctx context.Context, id string) (kind ConversationKind, err error)
- func (s *SessionService) CreateAgentDraft(ctx context.Context, author string, origin AgentDraftOrigin) (*AgentDraft, error)
- func (s *SessionService) CreateLimitSpaces(ctx context.Context, names []string) error
- func (s *SessionService) CreateOpenCodeSession(ctx context.Context, name string, server config.OpenCodeConfig, ...) (string, error)
- func (s *SessionService) CreateSpace(ctx context.Context, name string) error
- func (s *SessionService) CreateStickyConversation(ctx context.Context, conversation protocol.Conversation, ...) (id string, resumed bool, err error)
- func (s *SessionService) DecideAgentDraftProposal(ctx context.Context, id, proposalID, username string, accept bool) (*AgentDraftProposal, error)
- func (s *SessionService) Delegations(ctx context.Context, conversationID, sourceConversationID string, ...) ([]Delegation, error)
- func (s *SessionService) DeleteChat(ctx context.Context, conversationID string) error
- func (s *SessionService) DeletePage(ctx context.Context, space string, kind PageKind, name string) (bool, error)
- func (s *SessionService) DeleteSession(ctx context.Context, conversationID string) (int64, error)
- func (s *SessionService) DeleteSpace(ctx context.Context, id string) error
- func (s *SessionService) DeleteThreadQueueItem(ctx context.Context, conversationID, id string) (removed bool, owner string, err error)
- func (s *SessionService) DueRoutineSchedules(now time.Time) ([]RoutineScheduleState, error)
- func (s *SessionService) EditSharedSearch(ctx context.Context, space, path string, base, search *SearchPage) (bool, 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) FindWebLogin(ctx context.Context, email string) (string, error)
- func (s *SessionService) ForgetFromList(ctx context.Context, username string, tab ListTab) error
- func (s *SessionService) ForkConversation(ctx context.Context, source string, destination protocol.Conversation, ...) (string, error)
- func (s *SessionService) ForkOpenCodeSession(ctx context.Context, name string, server config.OpenCodeConfig, ...) (string, error)
- func (s *SessionService) Goal(conversationID string) (GoalState, bool, error)
- func (s *SessionService) HasActiveTurn(ctx context.Context, conversationID string) (bool, error)
- func (s *SessionService) InputAttachments(ctx context.Context, producer, text string) (string, []protocol.OutboundAttachment, error)
- func (s *SessionService) ListAgentDrafts(ctx context.Context) ([]AgentDraft, error)
- func (s *SessionService) LoadAgentDraft(ctx context.Context, id string) (*AgentDraft, error)
- func (s *SessionService) LoadAttachment(ctx context.Context, conversationID, id string, uploadOnly bool) (protocol.OutboundAttachment, error)
- func (s *SessionService) LoadTurnStep(ctx context.Context, conversationID, key string) (value json.RawMessage, found bool, err error)
- func (s *SessionService) MarkSearchFinished(ctx context.Context, username, path string) error
- func (s *SessionService) MessageTree(ctx context.Context, conversationID string) ([]MessageTreeNode, error)
- func (s *SessionService) MoveConversation(ctx context.Context, conversationID, spaceID string) error
- func (s *SessionService) NameGenerated(ctx context.Context, conversationID, title string, replaceChosen bool) (name string, renamed bool, err error)
- func (s *SessionService) ObserveEntries(ctx context.Context, conversationID string) ([]ObservedSessionEntry, error)
- func (s *SessionService) ObserveHistory(ctx context.Context, id, source string, from, before int64, limit int, ...) (view HistorySnapshot, err error)
- func (s *SessionService) OrderList(ctx context.Context, username string, list TabList, order []ListTab) error
- func (s *SessionService) Page(ctx context.Context, space string, kind PageKind, name string) (Page, bool, error)
- func (s *SessionService) Pages(ctx context.Context, space string) ([]Page, error)
- func (s *SessionService) PollAttention(ctx context.Context, username, path string, hold bool) (revision int64, navigation string, err error)
- func (s *SessionService) ProposeAgentDraftChanges(ctx context.Context, id, username string, ask *AgentDraftAsk) (_ *AgentDraftProposal, err error)
- func (s *SessionService) PruneStateBefore(ctx context.Context, cutoff time.Time, pace time.Duration) (PruneStateStats, error)
- func (s *SessionService) PutPage(ctx context.Context, page *Page, conversation, fallback string) error
- func (s *SessionService) PutScheduledMessage(id string, message *protocol.ScheduledMessageState) error
- func (s *SessionService) PutThreadQueueItem(id string, item *protocol.ThreadQueueItem) error
- func (s *SessionService) RecordChannelFact(ctx context.Context, workspaceID, channelID, name string, observedAt time.Time) error
- func (s *SessionService) RegisterExternalMCPConversation(externalConversationID, managedAgent string, session *ExternalMCPSessionState) error
- func (s *SessionService) RemoveExternalMCPConversation(externalConversationID string) error
- func (s *SessionService) RenameSpace(ctx context.Context, id, name string) error
- func (s *SessionService) ReplayAttachments(ctx context.Context, conversationID string, raw json.RawMessage, ...) ([]protocol.OutboundAttachment, error)
- func (s *SessionService) ResetRoutineSchedules() error
- func (s *SessionService) ResetScheduledMessages(conversationID string) error
- func (s *SessionService) RevertAttachmentMetadata(ctx context.Context, conversationID, id string) (protocol.OutboundAttachment, error)
- func (s *SessionService) RevertState(ctx context.Context, conversationID string) (marker string, eligible bool, predecessor string, err error)
- func (s *SessionService) RoutineRun(ctx context.Context, conversationID string) (path string, run bool, err error)
- func (s *SessionService) RoutineRunSources(ctx context.Context) ([]RoutineRunSource, error)
- func (s *SessionService) SaveAgentDraft(ctx context.Context, rt agentDraftRuntime, save *AgentDraftSave) (AgentDraftSaveState, error)
- func (s *SessionService) SaveAttachment(ctx context.Context, conversationID, turnID string, ...) error
- func (s *SessionService) SaveStripLayout(ctx context.Context, username string, layout *StripLayout) error
- func (s *SessionService) SaveTabState(ctx context.Context, username string, state *TabState, revision int64) (bool, error)
- func (s *SessionService) SaveTurnStep(ctx context.Context, conversationID, key string, value json.RawMessage) error
- func (s *SessionService) SaveUpload(ctx context.Context, conversationID string, ...) (err error)
- func (s *SessionService) ScheduleAgents(agents []string)
- func (s *SessionService) ScheduledMessagesForConversation(conversationID string) (map[string]protocol.ScheduledMessageState, error)
- func (s *SessionService) SearchMessages(ctx context.Context, needle string, tagPrefixes []string) ([]MessageSearchHit, error)
- func (s *SessionService) SearchMessagesMentioning(ctx context.Context, needle string, slack slackLookup) (hits []MessageSearchHit, mentions map[string]string, err error)
- func (s *SessionService) SearchSessions(ctx context.Context, username, query string, scope SearchScope, ...) (*SessionSearch, error)
- func (s *SessionService) SendAgentDraft(ctx context.Context, queue agentDraftQueue, send *AgentDraftSend) (string, []AgentDraftProblem, error)
- func (s *SessionService) SetAgentDraftPresence(ctx context.Context, id string, presence AgentDraftPresence) error
- func (s *SessionService) SetAutoParkAll(ctx context.Context, username string, on bool) error
- func (s *SessionService) SetThreadAgentIfExists(conversationID, agent string) (bool, error)
- func (s *SessionService) ShadowParent(ctx context.Context, id string) (string, error)
- func (s *SessionService) ShareTab(ctx context.Context, space, path string, search *SearchPage) error
- func (s *SessionService) SharedTabs(ctx context.Context) ([]Tab, error)
- func (s *SessionService) SidebarChats(ctx context.Context, username string, slack slackLookup, chats []string) iter.Seq2[SidebarChat, error]
- func (s *SessionService) SlackChannelIDs(ctx context.Context) ([]string, error)
- func (s *SessionService) SlackThread(ctx context.Context, conversationID string) (channelID, threadTS string, channelSession bool, err error)
- func (s *SessionService) SpaceLimitFor(ctx context.Context, spaces []string) (SpaceLimit, error)
- func (s *SessionService) Spaces(ctx context.Context) ([]Space, error)
- func (s *SessionService) StickySessions(ctx context.Context, username string, agents harness.Agents) (map[string]string, error)
- func (s *SessionService) Stop() error
- func (s *SessionService) StopAgentDraftWaiting(ctx context.Context, id, author string, reason AgentDraftWaitEnd) (AgentDraftSaveState, error)
- func (s *SessionService) StopGoal(conversationID string) error
- func (s *SessionService) StripLayout(ctx context.Context, username string) (StripLayout, error)
- func (s *SessionService) SyncOpenCode(ctx context.Context, cfg *config.LockedConfig)
- func (s *SessionService) SyncRoutineSchedules(schedules []RoutineScheduleState) error
- func (s *SessionService) TabAttention(ctx context.Context, username string) ([]Attention, error)
- func (s *SessionService) TabLists(ctx context.Context, username string) ([]ListTab, error)
- func (s *SessionService) TabState(ctx context.Context, username string) (TabState, int64, error)
- func (s *SessionService) Thread(conversationID string) (ThreadState, bool, error)
- func (s *SessionService) ThreadQueueForConversation(conversationID string) ([]protocol.ThreadQueueItem, error)
- func (s *SessionService) ToggleManualTag(ctx context.Context, agents harness.Agents, id, tag string) error
- func (s *SessionService) TopLevelSession(ctx context.Context, conversationID string) (SidebarSession, error)
- func (s *SessionService) TurnAttachments(ctx context.Context, conversationID, turnID string) ([]protocol.OutboundAttachment, error)
- func (s *SessionService) TurnProgress(ctx context.Context, turnID string) (protocol.TurnProgress, error)
- func (s *SessionService) UnshareTab(ctx context.Context, space, path string) (*SearchPage, error)
- func (s *SessionService) UpdateConversationDetails(ctx context.Context, conversationID string, name *string) (bool, error)
- func (s *SessionService) UpdateGoalStatus(conversationID, status, note string) (GoalState, error)
- func (s *SessionService) UpsertThread(conversationID string, thread ThreadState) error
- func (s *SessionService) ValidateAgentDraft(draft *AgentDraft) ([]AgentDraftProblem, error)
- func (s *SessionService) WakeParks(ctx context.Context)
- func (s *SessionService) WatchListing(username string) (rings <-chan struct{}, stop func())
- type SidebarChat
- type SidebarSession
- type Space
- type SpaceLimit
- type StripLayout
- type Tab
- type TabGroup
- type TabList
- type TabState
- type ThreadCreator
- type ThreadState
Constants ¶
View Source
const ( GoalStatusActive = "active" GoalStatusProgress = "progress" GoalStatusComplete = "complete" GoalStatusBlocked = "blocked" GoalStatusStopped = "stopped" GoalStatusBudgetExhausted = "budget_exhausted" )
Variables ¶
View Source
var ( ErrInvalidRevertMessage = errors.New("invalid revert message ID") ErrRevertMessageGone = errors.New("revert message is no longer in the session") )
View Source
var ( ErrNotChat = errors.New("only Web chats and Slack threads can be deleted") ErrSessionBusy = errors.New("this session has a running turn, queued or stashed work, a Background Job, or a scheduled message; stop or clear it first") )
View Source
var ErrRemoteSession = errors.New("a remote OpenCode session's history stays on its server")
View Source
var ErrRestartRequested = errors.New("restart requested")
View Source
var ErrSpaceRejected = errors.New("another space has that name, pages left under that name share a path with this space's, or it is the last space")
View Source
var ErrTagNotAllowed = errors.New("the session's agent does not allow this tag")
Functions ¶
func AddOpenCodeSessionBridge ¶ added in v0.2.44
func AgentDraftTemplates ¶ added in v0.2.41
func AgentDraftTemplates() []string
func AgentTagChoices ¶ added in v0.2.48
func DecideOrigin ¶ added in v0.1.27
func DecideOrigin(facts *ChatOriginFacts) (origin any, text string)
func ExternalMCPAgentsIn ¶
func ExternalMCPAgentsIn(cfg *config.LockedConfig, runtimeDir string) ([]string, error)
func GenerateOneShot ¶ added in v0.2.63
func GenerateTitle ¶ added in v0.2.44
func LoadRuntimeAgents ¶ added in v0.2.58
func LoadRuntimeDefinitions ¶
func MentionedIDs ¶ added in v0.1.27
func MentionedIDs(hits []MessageSearchHit, mentions map[string]string) []string
func PromptPrincipal ¶ added in v0.1.40
func ReplayInputMessageRoleText ¶ added in v0.1.0
func ReplayInputMessageRoleText(item *responses.ResponseInputItemUnionParam, raw json.RawMessage) (role, text string, ok bool, err error)
func RoutineStem ¶ added in v0.2.77
func SetLogLevel ¶ added in v0.2.41
func TabConversation ¶ added in v0.2.9
func TestDecisionModel ¶ added in v0.2.70
Types ¶
type AgentDraft ¶ added in v0.2.41
type AgentDraft struct {
ID string `json:"-"`
Revision int64 `json:"-"`
Name string `json:"name"`
Mode harness.AgentMode `json:"mode"`
Variants []AgentDraftVariant `json:"variants"`
ExternalMCP AgentDraftExternalMCP `json:"externalMcp,omitzero"`
TestChat string `json:"testChat,omitempty"`
SaveState AgentDraftSaveState `json:"saveState"`
Bases map[string]*string `json:"bases"`
Pending *AgentDraftPending `json:"pending,omitempty"`
}
type AgentDraftAsk ¶ added in v0.2.41
type AgentDraftAsk struct {
Request, Answer, Variant, Transcript string
}
type AgentDraftExternalMCP ¶ added in v0.2.41
type AgentDraftLayers ¶ added in v0.2.41
type AgentDraftLayers struct {
Layers []AgentLayer
HiddenBy, Replaces string
Next, Branch, Unpushable string
}
type AgentDraftMessage ¶ added in v0.2.41
type AgentDraftMessage struct {
InputID string `json:"-"`
Text string `json:"text"`
Labels map[string]int64 `json:"labels"`
Live string `json:"live,omitempty"`
NotRun []AgentDraftProblem `json:"notRun,omitempty"`
ExternalMCP AgentDraftExternalMCP `json:"externalMcp"`
}
type AgentDraftNameError ¶ added in v0.2.41
type AgentDraftNameError struct{ Name string }
func (*AgentDraftNameError) Error ¶ added in v0.2.41
func (e *AgentDraftNameError) Error() string
type AgentDraftNotValidError ¶ added in v0.2.41
type AgentDraftNotValidError struct{ Line int }
func (*AgentDraftNotValidError) Error ¶ added in v0.2.41
func (e *AgentDraftNotValidError) Error() string
type AgentDraftOp ¶ added in v0.2.41
type AgentDraftOp struct {
Revision int64 `json:"revision,omitempty"`
At time.Time `json:"at,omitzero"`
BaseRevision int64 `json:"baseRevision"`
OpID string `json:"opId"`
Author string `json:"author"`
Kind AgentDraftOpKind `json:"kind"`
Variant string `json:"variant,omitempty"`
Key string `json:"key,omitempty"`
Value string `json:"value,omitempty"`
Splices []AgentDraftSplice `json:"splices,omitempty"`
ExternalMCP AgentDraftExternalMCP `json:"externalMcp,omitzero"`
From int64 `json:"from,omitempty"`
FromFile string `json:"fromFile,omitempty"`
Bases map[string]*string `json:"bases,omitempty"`
}
type AgentDraftOpError ¶ added in v0.2.41
type AgentDraftOpError struct{ Problem string }
func (*AgentDraftOpError) Error ¶ added in v0.2.41
func (e *AgentDraftOpError) Error() string
type AgentDraftOpKind ¶ added in v0.2.41
type AgentDraftOpKind string
const ( AgentDraftCreate AgentDraftOpKind = "create" AgentDraftSetField AgentDraftOpKind = "set_field" AgentDraftEditBody AgentDraftOpKind = "edit_body" AgentDraftAddVariant AgentDraftOpKind = "add_variant" AgentDraftRenameVariant AgentDraftOpKind = "rename_variant" AgentDraftRemoveVariant AgentDraftOpKind = "remove_variant" AgentDraftSetMode AgentDraftOpKind = "set_mode" AgentDraftSetExternalMCP AgentDraftOpKind = "set_external_mcp" AgentDraftSetTestChat AgentDraftOpKind = "set_test_chat" AgentDraftSetSaveState AgentDraftOpKind = "set_save_state" AgentDraftRename AgentDraftOpKind = "rename" AgentDraftEditFile AgentDraftOpKind = "edit_file" AgentDraftRestore AgentDraftOpKind = "restore" )
type AgentDraftOrigin ¶ added in v0.2.41
type AgentDraftPending ¶ added in v0.2.41
type AgentDraftPending struct {
Destination string `json:"destination"`
Base string `json:"base"`
Branch string `json:"branch"`
Commit string `json:"commit"`
Number int `json:"number,omitempty"`
Link string `json:"link,omitempty"`
File string `json:"file"`
Revision int64 `json:"revision"`
Ended AgentDraftWaitEnd `json:"ended,omitempty"`
}
type AgentDraftPresence ¶ added in v0.2.41
type AgentDraftPresence struct {
Client, Username, Variant, Place string
}
type AgentDraftProblem ¶ added in v0.2.41
type AgentDraftProblem struct {
Variant, Key, Sentence string
}
type AgentDraftProposal ¶ added in v0.2.41
type AgentDraftProposal struct {
ID string `json:"-"`
BaseRevision int64 `json:"-"`
State AgentDraftProposalState `json:"-"`
Message string `json:"message"`
Settings []AgentDraftProposedSetting `json:"settings"`
Bodies []AgentDraftProposedBody `json:"bodies"`
}
type AgentDraftProposalState ¶ added in v0.2.41
type AgentDraftProposalState string
const ( AgentDraftProposalOpen AgentDraftProposalState = "open" AgentDraftProposalAccepted AgentDraftProposalState = "accepted" AgentDraftProposalRejected AgentDraftProposalState = "rejected" )
type AgentDraftProposedBody ¶ added in v0.2.41
type AgentDraftProposedSetting ¶ added in v0.2.41
type AgentDraftRefusedError ¶ added in v0.2.41
type AgentDraftRefusedError struct {
Problem string
Restart bool
Problems []AgentDraftProblem
}
func (*AgentDraftRefusedError) Error ¶ added in v0.2.41
func (e *AgentDraftRefusedError) Error() string
type AgentDraftReview ¶ added in v0.2.41
type AgentDraftReview struct {
Revision int64
Base, Live *string
Draft string
Settings []AgentDraftReviewSetting
Splices []AgentDraftSplice
}
type AgentDraftReviewSetting ¶ added in v0.2.41
type AgentDraftSave ¶ added in v0.2.41
type AgentDraftSaveError ¶ added in v0.2.41
type AgentDraftSaveError struct {
Problem string
Problems []AgentDraftProblem
Review *AgentDraftReview
}
func (*AgentDraftSaveError) Error ¶ added in v0.2.41
func (e *AgentDraftSaveError) Error() string
type AgentDraftSaveState ¶ added in v0.2.41
type AgentDraftSaveState string
const ( AgentDraftEditing AgentDraftSaveState = "editing" AgentDraftSaving AgentDraftSaveState = "saving" AgentDraftWaiting AgentDraftSaveState = "waiting" AgentDraftLive AgentDraftSaveState = "live" )
type AgentDraftSend ¶ added in v0.2.41
type AgentDraftSetting ¶ added in v0.2.41
type AgentDraftSplice ¶ added in v0.2.41
type AgentDraftVariant ¶ added in v0.2.41
type AgentDraftVariant struct {
Name string `json:"name"`
Settings []AgentDraftSetting `json:"settings"`
Body string `json:"body"`
}
type AgentDraftWaitEnd ¶ added in v0.2.41
type AgentDraftWaitEnd string
const ( AgentDraftWaitClosed AgentDraftWaitEnd = "closed" AgentDraftWaitStopped AgentDraftWaitEnd = "stopped" AgentDraftWaitEdited AgentDraftWaitEnd = "edited" )
type AgentLayer ¶ added in v0.2.41
type AgentPausedError ¶ added in v0.2.40
type AgentPausedError struct{}
func (AgentPausedError) Error ¶ added in v0.2.40
func (AgentPausedError) Error() string
type AttentionAction ¶ added in v0.2.31
type AttentionAction string
const ( AttentionRead AttentionAction = "read" AttentionUnread AttentionAction = "unread" AttentionPark AttentionAction = "park" AttentionParkUntilDone AttentionAction = "park_done" AttentionUnpark AttentionAction = "unpark" AttentionAutoPark AttentionAction = "auto_park" AttentionNoAutoPark AttentionAction = "no_auto_park" AttentionFollow AttentionAction = "follow" AttentionUnfollow AttentionAction = "unfollow" AttentionSent AttentionAction = "sent" )
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
func NewConversation ¶
func NewConversation(cfg *config.LockedConfig, publisher protocol.OutboundPublisher, bridgeCfg *Config, logger *slog.Logger) *Bridge
func (*Bridge) AppendChildEntry ¶ added in v0.1.44
func (*Bridge) AwaitSubagent ¶ added in v0.1.44
func (*Bridge) InterruptActiveTurn ¶
func (b *Bridge) InterruptActiveTurn() *protocol.InboundMessage
func (*Bridge) ResetScheduledMessages ¶
func (b *Bridge) ResetScheduledMessages(origin *protocol.InboundMessage) error
func (*Bridge) ScheduleMessage ¶
func (*Bridge) SwitchAgent ¶
func (*Bridge) WriteSubagent ¶ added in v0.1.44
type ChatOriginFacts ¶ added in v0.1.14
type ChatOriginFacts struct {
ConversationID string
CreatedBy ThreadCreator
ExternalConversationID string
Binding ExternalMCPSessionState
CreatingSource string
ProducerAgent string
Run *protocol.RoutineRun
}
type Config ¶
type Config struct {
ConversationID, Agent string
RequestRestart runtimeRestarter
RequestReload runtimeReloader
UserQuestionAsker protocol.UserQuestionAsker
SessionService *SessionService
Secrets config.SecretFetcher
}
type ConversationKind ¶ added in v0.2.0
type ConversationKind string
const ( KindWebChat ConversationKind = "web_chat" KindSlackThread ConversationKind = "slack_thread" KindRoutineRun ConversationKind = "routine_run" KindOneOffRoutineRun ConversationKind = "one_off_routine_run" KindExternalMCPRun ConversationKind = "external_mcp_run" KindSubagent ConversationKind = "subagent" KindReview ConversationKind = "review" KindShadow ConversationKind = "shadow" KindRemote ConversationKind = "remote" KindAgentDraft ConversationKind = "agent_draft" )
type Delegation ¶ added in v0.2.0
type Delegation struct {
ID, Parent, CallID string
Legacy bool
Kind ConversationKind
}
type ExternalMCPSessionState ¶
type FrontendAssembler ¶ added in v0.1.0
type GoalState ¶
type GoalState struct {
Objective string `json:"objective,omitempty"`
MaxTurns int `json:"max_turns,omitempty"`
TurnsUsed int `json:"turns_used,omitempty"`
Status string `json:"status,omitempty"`
Note string `json:"note,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero"`
UpdatedAt time.Time `json:"updated_at,omitzero"`
PrincipalName string `json:"principal_name,omitempty"`
PrincipalEmail string `json:"principal_email,omitempty"`
Origin string `json:"origin,omitempty"`
}
type HistoryInventory ¶ added in v0.1.17
type HistoryInventory struct {
ConversationID string `json:"conversation_id"`
Source string `json:"source"`
Entries map[string]string `json:"entries"`
From int64 `json:"from,omitempty"`
Oldest int64 `json:"oldest,omitempty"`
Marker string `json:"revert_message_id,omitempty"`
Shadows string `json:"shadows,omitempty"`
}
type HistorySnapshot ¶ added in v0.1.17
type HistorySnapshot struct {
Inventory HistoryInventory
Entries []ObservedSessionEntry
Delegations []Delegation
Lineage []SidebarSession
Reviews []string
Shadows []protocol.ShadowBinding
Eligible bool
Predecessor string
Floor string
Reset bool
}
type KeyedConversationLocks ¶
type KeyedConversationLocks struct {
// contains filtered or unexported fields
}
func NewKeyedConversationLocks ¶
func NewKeyedConversationLocks() *KeyedConversationLocks
func (*KeyedConversationLocks) Lock ¶
func (l *KeyedConversationLocks) Lock(key string) func()
type MessageSearchHit ¶ added in v0.1.24
type MessageTreeNode ¶ added in v0.2.63
type ObservedSessionEntry ¶
type PruneStateStats ¶
type QuestionNotPendingError ¶ added in v0.1.27
type QuestionNotPendingError struct{ ConversationID, QuestionID string }
func (*QuestionNotPendingError) Error ¶ added in v0.1.27
func (e *QuestionNotPendingError) Error() string
type RoutineRunProgress ¶ added in v0.2.77
type RoutineRunProgress struct {
ConversationID string
Run *protocol.RoutineRun
SyncDestination string
Routine *protocol.RoutineMessage
}
type RoutineRunSource ¶ added in v0.2.77
type RoutineRunSource struct {
ConversationID string
SourceConversationID string
Run protocol.RoutineRun
}
type RoutineScheduleState ¶ added in v0.2.77
type Runtime ¶
type Runtime struct {
Cfg *config.LockedConfig
Log *slog.Logger
RunCtx context.Context
Sessions *SessionService
ExternalMCPAgents runtimeRefresher
Routines runtimeRefresher
Assemble FrontendAssembler
TextRouter protocol.PrimaryTextRouter
// contains filtered or unexported fields
}
func (*Runtime) AgentPaused ¶ added in v0.2.40
func (*Runtime) AnswerQuestion ¶ added in v0.1.27
func (*Runtime) AttachSlack ¶
func (r *Runtime) AttachSlack(slack slackLookup)
func (*Runtime) BackgroundJobs ¶ added in v0.1.19
func (*Runtime) CompletionNotes ¶ added in v0.1.19
func (*Runtime) ContinueRun ¶ added in v0.2.0
func (*Runtime) CreateConversation ¶ added in v0.1.0
func (*Runtime) DeleteBranch ¶ added in v0.2.63
func (*Runtime) DeleteQueueItem ¶ added in v0.1.0
func (*Runtime) EditQueueItem ¶ added in v0.1.63
func (*Runtime) MoveToBackground ¶ added in v0.1.19
func (*Runtime) OpenCodeMCP ¶ added in v0.2.11
func (*Runtime) PendingQuestions ¶ added in v0.1.27
func (*Runtime) PopQueueItem ¶ added in v0.1.0
func (*Runtime) PostPausedMessage ¶ added in v0.2.40
func (*Runtime) PromoteQueueItem ¶ added in v0.1.0
func (*Runtime) PublishOutbound ¶ added in v0.1.0
func (*Runtime) QueueItems ¶ added in v0.1.0
func (r *Runtime) QueueItems(conversationID string) ([]protocol.ThreadQueueItem, error)
func (*Runtime) ReorderQueueItems ¶ added in v0.1.0
func (*Runtime) RunningAgent ¶ added in v0.2.26
func (*Runtime) SandboxError ¶ added in v0.2.24
func (*Runtime) SaveBehavior ¶ added in v0.2.41
func (*Runtime) SetAgentPaused ¶ added in v0.2.40
func (*Runtime) SlackWarning ¶ added in v0.2.48
func (*Runtime) StageRevert ¶ added in v0.1.17
func (*Runtime) StartGoal ¶ added in v0.1.12
func (r *Runtime) StartGoal(ctx context.Context, inbound *protocol.InboundMessage, goal protocol.GoalRequest) error
func (*Runtime) StashQueueItem ¶ added in v0.1.0
func (*Runtime) StopBackgroundJob ¶ added in v0.1.19
func (*Runtime) SwitchConversationAgent ¶ added in v0.1.0
type SavedSearch ¶ added in v0.2.31
type SearchPage ¶ added in v0.2.31
type SearchPage struct {
Name string `json:"name,omitempty"`
Active string `json:"active,omitempty"`
Searches []SavedSearch `json:"searches,omitempty"`
}
func (*SearchPage) Scan ¶ added in v0.2.31
func (p *SearchPage) Scan(src any) error
type SearchScope ¶ added in v0.1.62
type SearchScope int
const ( SearchFields SearchScope = iota SearchMessages SearchFilters )
type SearchTerm ¶ added in v0.1.27
type SessionField ¶ added in v0.1.27
type SessionField string
type SessionMatch ¶ added in v0.1.27
type SessionMatch struct {
Chat SidebarChat
Field SessionField
Text string
}
type SessionSearch ¶ added in v0.1.27
type SessionSearch struct {
Terms []SearchTerm
Text, Needle string
Matches []SessionMatch
Hits []MessageSearchHit
MentionIDs []string
Principals []string
}
type SessionService ¶
type SessionService struct {
// contains filtered or unexported fields
}
func NewSessionServiceIn ¶
func (*SessionService) ActiveGoalThreads ¶
func (s *SessionService) ActiveGoalThreads() (map[string]ThreadState, error)
func (*SessionService) AgentDraftLayers ¶ added in v0.2.41
func (s *SessionService) AgentDraftLayers(ctx context.Context, id, variant, destination string) (*AgentDraftLayers, error)
func (*SessionService) AgentDraftMessages ¶ added in v0.2.41
func (s *SessionService) AgentDraftMessages(ctx context.Context, chat string) ([]AgentDraftMessage, error)
func (*SessionService) AgentDraftOps ¶ added in v0.2.41
func (s *SessionService) AgentDraftOps(ctx context.Context, id string, since int64) ([]AgentDraftOp, error)
func (*SessionService) AgentDraftPresences ¶ added in v0.2.41
func (s *SessionService) AgentDraftPresences(ctx context.Context, id string) ([]AgentDraftPresence, error)
func (*SessionService) AgentDraftProposals ¶ added in v0.2.41
func (s *SessionService) AgentDraftProposals(ctx context.Context, id string) ([]AgentDraftProposal, error)
func (*SessionService) AgentOrigin ¶ added in v0.2.59
func (s *SessionService) AgentOrigin(name string) (string, error)
func (*SessionService) AppendBranchSummary ¶ added in v0.2.63
func (*SessionService) AppendEntryID ¶
func (s *SessionService) AppendEntryID(ctx context.Context, conversationID string, entry *harness.SessionEntry) (int64, error)
func (*SessionService) ApplyAgentDraftOp ¶ added in v0.2.41
func (s *SessionService) ApplyAgentDraftOp(ctx context.Context, id string, op *AgentDraftOp) (int64, error)
func (*SessionService) AttachmentMetadata ¶ added in v0.1.0
func (s *SessionService) AttachmentMetadata(ctx context.Context, conversationID, id string, uploadOnly bool) (protocol.OutboundAttachment, error)
func (*SessionService) AutoParkAll ¶ added in v0.2.31
func (*SessionService) BeginGoal ¶
func (s *SessionService) BeginGoal(conversationID string, goal *GoalState) error
func (*SessionService) BranchEntries ¶ added in v0.2.63
func (s *SessionService) BranchEntries(ctx context.Context, conversationID, branchID string) ([]ObservedSessionEntry, error)
func (*SessionService) ChangeAttention ¶ added in v0.2.31
func (s *SessionService) ChangeAttention(ctx context.Context, username string, paths []string, action AttentionAction, until *time.Time, admitted int64) error
func (*SessionService) Changes ¶ added in v0.1.12
func (s *SessionService) Changes(ctx context.Context, conversationID string) iter.Seq2[protocol.ConversationChange, error]
func (*SessionService) ChannelFact ¶ added in v0.1.0
func (*SessionService) ChatOriginFacts ¶ added in v0.1.14
func (s *SessionService) ChatOriginFacts(ctx context.Context, id string) iter.Seq2[ChatOriginFacts, error]
func (*SessionService) CheckAgentDraftMerge ¶ added in v0.2.41
func (s *SessionService) CheckAgentDraftMerge(ctx context.Context, rt agentDraftRuntime, id, author string) (AgentDraftSaveState, error)
func (*SessionService) ClaimRoutineSchedule ¶ added in v0.2.77
func (s *SessionService) ClaimRoutineSchedule(due RoutineScheduleState, nextDue, now time.Time) (bool, error)
func (*SessionService) ClaimScheduledMessage ¶
func (s *SessionService) ClaimScheduledMessage(id, conversationID string, dueAt, now time.Time) (message protocol.ScheduledMessageState, claimed bool, err error)
func (*SessionService) ClosedTabs ¶ added in v0.2.25
func (*SessionService) ConversationKind ¶ added in v0.2.0
func (s *SessionService) ConversationKind(ctx context.Context, id string) (kind ConversationKind, err error)
func (*SessionService) CreateAgentDraft ¶ added in v0.2.41
func (s *SessionService) CreateAgentDraft(ctx context.Context, author string, origin AgentDraftOrigin) (*AgentDraft, error)
func (*SessionService) CreateLimitSpaces ¶ added in v0.2.26
func (s *SessionService) CreateLimitSpaces(ctx context.Context, names []string) error
func (*SessionService) CreateOpenCodeSession ¶ added in v0.1.47
func (s *SessionService) CreateOpenCodeSession(ctx context.Context, name string, server config.OpenCodeConfig, directory, spaceID string) (string, error)
func (*SessionService) CreateSpace ¶ added in v0.1.53
func (s *SessionService) CreateSpace(ctx context.Context, name string) error
func (*SessionService) CreateStickyConversation ¶ added in v0.2.30
func (s *SessionService) CreateStickyConversation(ctx context.Context, conversation protocol.Conversation, sticky harness.AgentSticky) (id string, resumed bool, err error)
func (*SessionService) DecideAgentDraftProposal ¶ added in v0.2.41
func (s *SessionService) DecideAgentDraftProposal(ctx context.Context, id, proposalID, username string, accept bool) (*AgentDraftProposal, error)
func (*SessionService) Delegations ¶ added in v0.1.11
func (s *SessionService) Delegations(ctx context.Context, conversationID, sourceConversationID string, from, before int64) ([]Delegation, error)
func (*SessionService) DeleteChat ¶ added in v0.2.44
func (s *SessionService) DeleteChat(ctx context.Context, conversationID string) error
func (*SessionService) DeletePage ¶ added in v0.1.52
func (*SessionService) DeleteSession ¶ added in v0.1.0
func (*SessionService) DeleteSpace ¶ added in v0.1.53
func (s *SessionService) DeleteSpace(ctx context.Context, id string) error
func (*SessionService) DeleteThreadQueueItem ¶
func (*SessionService) DueRoutineSchedules ¶ added in v0.2.77
func (s *SessionService) DueRoutineSchedules(now time.Time) ([]RoutineScheduleState, error)
func (*SessionService) EditSharedSearch ¶ added in v0.2.14
func (s *SessionService) EditSharedSearch(ctx context.Context, space, path string, base, search *SearchPage) (bool, error)
func (*SessionService) ExternalMCPSession ¶
func (s *SessionService) ExternalMCPSession(externalConversationID string) (ExternalMCPSessionState, bool, error)
func (*SessionService) ExternalMCPSessionByConversationID ¶
func (s *SessionService) ExternalMCPSessionByConversationID(conversationID string) (externalConversationID string, session ExternalMCPSessionState, ok bool, err error)
func (*SessionService) FindWebLogin ¶ added in v0.2.72
func (*SessionService) ForgetFromList ¶ added in v0.2.74
func (*SessionService) ForkConversation ¶ added in v0.1.3
func (s *SessionService) ForkConversation(ctx context.Context, source string, destination protocol.Conversation, before string) (string, error)
func (*SessionService) ForkOpenCodeSession ¶ added in v0.2.8
func (s *SessionService) ForkOpenCodeSession(ctx context.Context, name string, server config.OpenCodeConfig, source, before string) (string, error)
func (*SessionService) Goal ¶
func (s *SessionService) Goal(conversationID string) (GoalState, bool, error)
func (*SessionService) HasActiveTurn ¶ added in v0.1.14
func (*SessionService) InputAttachments ¶ added in v0.1.24
func (s *SessionService) InputAttachments(ctx context.Context, producer, text string) (string, []protocol.OutboundAttachment, error)
func (*SessionService) ListAgentDrafts ¶ added in v0.2.41
func (s *SessionService) ListAgentDrafts(ctx context.Context) ([]AgentDraft, error)
func (*SessionService) LoadAgentDraft ¶ added in v0.2.41
func (s *SessionService) LoadAgentDraft(ctx context.Context, id string) (*AgentDraft, error)
func (*SessionService) LoadAttachment ¶ added in v0.1.0
func (s *SessionService) LoadAttachment(ctx context.Context, conversationID, id string, uploadOnly bool) (protocol.OutboundAttachment, error)
func (*SessionService) LoadTurnStep ¶ added in v0.1.14
func (s *SessionService) LoadTurnStep(ctx context.Context, conversationID, key string) (value json.RawMessage, found bool, err error)
func (*SessionService) MarkSearchFinished ¶ added in v0.2.31
func (s *SessionService) MarkSearchFinished(ctx context.Context, username, path string) error
func (*SessionService) MessageTree ¶ added in v0.2.63
func (s *SessionService) MessageTree(ctx context.Context, conversationID string) ([]MessageTreeNode, error)
func (*SessionService) MoveConversation ¶ added in v0.2.56
func (s *SessionService) MoveConversation(ctx context.Context, conversationID, spaceID string) error
func (*SessionService) NameGenerated ¶ added in v0.2.70
func (*SessionService) ObserveEntries ¶
func (s *SessionService) ObserveEntries(ctx context.Context, conversationID string) ([]ObservedSessionEntry, error)
func (*SessionService) ObserveHistory ¶ added in v0.1.17
func (s *SessionService) ObserveHistory(ctx context.Context, id, source string, from, before int64, limit int, prior *HistoryInventory) (view HistorySnapshot, err error)
func (*SessionService) PollAttention ¶ added in v0.2.31
func (*SessionService) ProposeAgentDraftChanges ¶ added in v0.2.41
func (s *SessionService) ProposeAgentDraftChanges(ctx context.Context, id, username string, ask *AgentDraftAsk) (_ *AgentDraftProposal, err error)
func (*SessionService) PruneStateBefore ¶
func (s *SessionService) PruneStateBefore(ctx context.Context, cutoff time.Time, pace time.Duration) (PruneStateStats, error)
func (*SessionService) PutScheduledMessage ¶
func (s *SessionService) PutScheduledMessage(id string, message *protocol.ScheduledMessageState) error
func (*SessionService) PutThreadQueueItem ¶
func (s *SessionService) PutThreadQueueItem(id string, item *protocol.ThreadQueueItem) error
func (*SessionService) RecordChannelFact ¶ added in v0.1.0
func (*SessionService) RegisterExternalMCPConversation ¶
func (s *SessionService) RegisterExternalMCPConversation(externalConversationID, managedAgent string, session *ExternalMCPSessionState) error
func (*SessionService) RemoveExternalMCPConversation ¶
func (s *SessionService) RemoveExternalMCPConversation(externalConversationID string) error
func (*SessionService) RenameSpace ¶ added in v0.1.53
func (s *SessionService) RenameSpace(ctx context.Context, id, name string) error
func (*SessionService) ReplayAttachments ¶ added in v0.1.0
func (s *SessionService) ReplayAttachments(ctx context.Context, conversationID string, raw json.RawMessage, calls map[[2]string]bool) ([]protocol.OutboundAttachment, error)
func (*SessionService) ResetRoutineSchedules ¶ added in v0.2.77
func (s *SessionService) ResetRoutineSchedules() error
func (*SessionService) ResetScheduledMessages ¶
func (s *SessionService) ResetScheduledMessages(conversationID string) error
func (*SessionService) RevertAttachmentMetadata ¶ added in v0.1.17
func (s *SessionService) RevertAttachmentMetadata(ctx context.Context, conversationID, id string) (protocol.OutboundAttachment, error)
func (*SessionService) RevertState ¶ added in v0.1.17
func (*SessionService) RoutineRun ¶ added in v0.2.77
func (*SessionService) RoutineRunSources ¶ added in v0.2.77
func (s *SessionService) RoutineRunSources(ctx context.Context) ([]RoutineRunSource, error)
func (*SessionService) SaveAgentDraft ¶ added in v0.2.41
func (s *SessionService) SaveAgentDraft(ctx context.Context, rt agentDraftRuntime, save *AgentDraftSave) (AgentDraftSaveState, error)
func (*SessionService) SaveAttachment ¶ added in v0.1.0
func (s *SessionService) SaveAttachment(ctx context.Context, conversationID, turnID string, attachment *protocol.OutboundAttachment, upload bool) error
func (*SessionService) SaveStripLayout ¶ added in v0.2.44
func (s *SessionService) SaveStripLayout(ctx context.Context, username string, layout *StripLayout) error
func (*SessionService) SaveTabState ¶ added in v0.1.53
func (*SessionService) SaveTurnStep ¶ added in v0.1.14
func (s *SessionService) SaveTurnStep(ctx context.Context, conversationID, key string, value json.RawMessage) error
func (*SessionService) SaveUpload ¶ added in v0.2.59
func (s *SessionService) SaveUpload(ctx context.Context, conversationID string, attachment *protocol.OutboundAttachment, body io.Reader) (err error)
func (*SessionService) ScheduleAgents ¶ added in v0.2.40
func (s *SessionService) ScheduleAgents(agents []string)
func (*SessionService) ScheduledMessagesForConversation ¶
func (s *SessionService) ScheduledMessagesForConversation(conversationID string) (map[string]protocol.ScheduledMessageState, error)
func (*SessionService) SearchMessages ¶ added in v0.1.24
func (s *SessionService) SearchMessages(ctx context.Context, needle string, tagPrefixes []string) ([]MessageSearchHit, error)
func (*SessionService) SearchMessagesMentioning ¶ added in v0.1.27
func (s *SessionService) SearchMessagesMentioning(ctx context.Context, needle string, slack slackLookup) (hits []MessageSearchHit, mentions map[string]string, err error)
func (*SessionService) SearchSessions ¶ added in v0.1.27
func (s *SessionService) SearchSessions(ctx context.Context, username, query string, scope SearchScope, slack slackLookup) (*SessionSearch, error)
func (*SessionService) SendAgentDraft ¶ added in v0.2.41
func (s *SessionService) SendAgentDraft(ctx context.Context, queue agentDraftQueue, send *AgentDraftSend) (string, []AgentDraftProblem, error)
func (*SessionService) SetAgentDraftPresence ¶ added in v0.2.41
func (s *SessionService) SetAgentDraftPresence(ctx context.Context, id string, presence AgentDraftPresence) error
func (*SessionService) SetAutoParkAll ¶ added in v0.2.31
func (*SessionService) SetThreadAgentIfExists ¶
func (s *SessionService) SetThreadAgentIfExists(conversationID, agent string) (bool, error)
func (*SessionService) ShadowParent ¶ added in v0.1.33
func (*SessionService) ShareTab ¶ added in v0.2.9
func (s *SessionService) ShareTab(ctx context.Context, space, path string, search *SearchPage) error
func (*SessionService) SharedTabs ¶ added in v0.2.9
func (s *SessionService) SharedTabs(ctx context.Context) ([]Tab, error)
func (*SessionService) SidebarChats ¶ added in v0.1.27
func (s *SessionService) SidebarChats(ctx context.Context, username string, slack slackLookup, chats []string) iter.Seq2[SidebarChat, error]
func (*SessionService) SlackChannelIDs ¶ added in v0.1.0
func (s *SessionService) SlackChannelIDs(ctx context.Context) ([]string, error)
func (*SessionService) SlackThread ¶ added in v0.2.0
func (*SessionService) SpaceLimitFor ¶ added in v0.2.26
func (s *SessionService) SpaceLimitFor(ctx context.Context, spaces []string) (SpaceLimit, error)
func (*SessionService) Spaces ¶ added in v0.1.53
func (s *SessionService) Spaces(ctx context.Context) ([]Space, error)
func (*SessionService) StickySessions ¶ added in v0.2.30
func (*SessionService) Stop ¶
func (s *SessionService) Stop() error
func (*SessionService) StopAgentDraftWaiting ¶ added in v0.2.41
func (s *SessionService) StopAgentDraftWaiting(ctx context.Context, id, author string, reason AgentDraftWaitEnd) (AgentDraftSaveState, error)
func (*SessionService) StopGoal ¶
func (s *SessionService) StopGoal(conversationID string) error
func (*SessionService) StripLayout ¶ added in v0.2.44
func (s *SessionService) StripLayout(ctx context.Context, username string) (StripLayout, error)
func (*SessionService) SyncOpenCode ¶ added in v0.1.47
func (s *SessionService) SyncOpenCode(ctx context.Context, cfg *config.LockedConfig)
func (*SessionService) SyncRoutineSchedules ¶ added in v0.2.77
func (s *SessionService) SyncRoutineSchedules(schedules []RoutineScheduleState) error
func (*SessionService) TabAttention ¶ added in v0.2.31
func (*SessionService) Thread ¶
func (s *SessionService) Thread(conversationID string) (ThreadState, bool, error)
func (*SessionService) ThreadQueueForConversation ¶
func (s *SessionService) ThreadQueueForConversation(conversationID string) ([]protocol.ThreadQueueItem, error)
func (*SessionService) ToggleManualTag ¶ added in v0.1.47
func (*SessionService) TopLevelSession ¶ added in v0.2.26
func (s *SessionService) TopLevelSession(ctx context.Context, conversationID string) (SidebarSession, error)
func (*SessionService) TurnAttachments ¶ added in v0.1.31
func (s *SessionService) TurnAttachments(ctx context.Context, conversationID, turnID string) ([]protocol.OutboundAttachment, error)
func (*SessionService) TurnProgress ¶ added in v0.2.26
func (s *SessionService) TurnProgress(ctx context.Context, turnID string) (protocol.TurnProgress, error)
func (*SessionService) UnshareTab ¶ added in v0.2.9
func (s *SessionService) UnshareTab(ctx context.Context, space, path string) (*SearchPage, error)
func (*SessionService) UpdateConversationDetails ¶ added in v0.1.0
func (*SessionService) UpdateGoalStatus ¶
func (s *SessionService) UpdateGoalStatus(conversationID, status, note string) (GoalState, error)
func (*SessionService) UpsertThread ¶
func (s *SessionService) UpsertThread(conversationID string, thread ThreadState) error
func (*SessionService) ValidateAgentDraft ¶ added in v0.2.41
func (s *SessionService) ValidateAgentDraft(draft *AgentDraft) ([]AgentDraftProblem, error)
func (*SessionService) WakeParks ¶ added in v0.2.44
func (s *SessionService) WakeParks(ctx context.Context)
func (*SessionService) WatchListing ¶ added in v0.2.69
func (s *SessionService) WatchListing(username string) (rings <-chan struct{}, stop func())
type SidebarChat ¶ added in v0.1.27
type SidebarChat struct {
Session SidebarSession
Room string
Routine bool
RoutineName string
}
type SidebarSession ¶ added in v0.1.0
type SidebarSession struct {
Conversation protocol.Conversation
Kind ConversationKind
RemoteSession string
Summary *protocol.SessionSummary
Running bool
Background bool
Asking bool
Automation bool
Paused bool
Name string
ForkedFrom string
Tags []string
Server string
Directory string
Offline bool
SpaceID string
SlackChannel string
RoutinePath string
Reply string
Model string
Attention Attention
AutoPark bool
Origin ChatOriginFacts
StateSince time.Time
Queued bool
External bool
Pausable bool
ArrivedAt time.Time
}
func (*SidebarSession) Label ¶ added in v0.2.0
func (row *SidebarSession) Label() string
type SpaceLimit ¶ added in v0.2.26
type SpaceLimit struct {
// contains filtered or unexported fields
}
func (SpaceLimit) AllowsAgent ¶ added in v0.2.26
func (l SpaceLimit) AllowsAgent(agent string) bool
func (SpaceLimit) AllowsSession ¶ added in v0.2.26
func (l SpaceLimit) AllowsSession(session *SidebarSession) bool
func (SpaceLimit) AllowsSpaceID ¶ added in v0.2.26
func (l SpaceLimit) AllowsSpaceID(id string) bool
func (SpaceLimit) AllowsSpaceName ¶ added in v0.2.26
func (l SpaceLimit) AllowsSpaceName(name string) bool
func (SpaceLimit) Limited ¶ added in v0.2.26
func (l SpaceLimit) Limited() bool
type StripLayout ¶ added in v0.2.44
type Tab ¶ added in v0.2.2
type Tab struct {
Path string
Group, Space string
Search *SearchPage
}
type ThreadCreator ¶
type ThreadCreator string
const ThreadCreatedByRoutine ThreadCreator = "routine"
type ThreadState ¶
type ThreadState struct {
Agent string `json:"agent,omitempty"`
CreatedBy ThreadCreator `json:"created_by,omitempty"`
// contains filtered or unexported fields
}
func (ThreadState) Sticky ¶ added in v0.2.30
func (t ThreadState) Sticky() harness.AgentSticky
Source Files
¶
- agent_draft_assistant.go
- agent_draft_chat.go
- agent_draft_overlay.go
- agent_draft_save.go
- agent_drafts.go
- app.go
- attachment_storage.go
- attachments.go
- attention.go
- background.go
- background_tools.go
- branches.go
- bridge.go
- conversation_locks.go
- conversations.go
- easy_turn.go
- fork.go
- handoff.go
- health.go
- history.go
- instrumentation.go
- message_search.go
- model_resolver.go
- opencode.go
- opencode_mcp.go
- origin.go
- page_tools.go
- pages.go
- revert.go
- rocketcode.go
- runtime.go
- sandbox.go
- session_search.go
- session_tools.go
- shadows.go
- store.go
- store_dao.go
- store_schema.go
- store_summaries.go
- thread_bridges.go
- transcript.go
- tree.go
- web_prompt_acceptance.go
- web_question.go
Click to show internal directories.
Click to hide internal directories.