Documentation
¶
Index ¶
- func FlattenSubAgentSessionID(raw string) string
- func IsNoReplySession(metrics MessageMetrics) bool
- func IsZeroMessageSession(metrics MessageMetrics) bool
- func UnflattenSubAgentSessionID(raw string) string
- type ActiveSkill
- type CleanupResult
- type Conversation
- type ConversationAssets
- type ConversationMeta
- type ImageAssetMeta
- type MessageMetrics
- type Session
- type SessionEvent
- type Store
- func (s *Store) CleanupZeroMessageSessions(workspace, activeSessionID string) (CleanupResult, error)
- func (s *Store) Delete(id string) error
- func (s *Store) DeleteInWorkspace(workspace, id string) error
- func (s *Store) List(limit int) ([]Summary, []string, error)
- func (s *Store) ListInWorkspace(workspace string, limit int) ([]Summary, []string, error)
- func (s *Store) Load(id string) (*Session, error)
- func (s *Store) LoadInWorkspace(workspace, id string) (*Session, error)
- func (s *Store) ReadEvents(sessionID string, afterSeq int64) ([]SessionEvent, error)
- func (s *Store) ReadFrom(sessionID string, offset int64, limit int) ([]SessionEvent, int64, error)
- func (s *Store) Replay(sessionID string) (*Session, error)
- func (s *Store) Save(session *Session) error
- func (s *Store) Snapshot(sessionID string) (err error)
- type Summary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlattenSubAgentSessionID ¶ added in v0.1.8
FlattenSubAgentSessionID converts a subagent session ID (which contains '/') into a filesystem-safe ID by replacing '/' with '_'.
func IsNoReplySession ¶
func IsNoReplySession(metrics MessageMetrics) bool
func IsZeroMessageSession ¶
func IsZeroMessageSession(metrics MessageMetrics) bool
func UnflattenSubAgentSessionID ¶ added in v0.1.8
UnflattenSubAgentSessionID reverses FlattenSubAgentSessionID.
Types ¶
type ActiveSkill ¶
type CleanupResult ¶
type CleanupResult struct {
DeletedIDs []string
}
type Conversation ¶
type Conversation struct {
Meta ConversationMeta `json:"meta,omitempty"`
Timeline []llm.Message `json:"timeline"`
Assets ConversationAssets `json:"assets,omitempty"`
}
type ConversationAssets ¶
type ConversationAssets struct {
Images map[llm.AssetID]ImageAssetMeta `json:"images,omitempty"`
}
type ConversationMeta ¶
type ImageAssetMeta ¶
type MessageMetrics ¶
type MessageMetrics struct {
RawMessageCount int
UserEffectiveInputCount int
AssistantEffectiveOutputCount int
}
func CountMessageMetrics ¶
func CountMessageMetrics(messages []llm.Message) MessageMetrics
type Session ¶
type Session struct {
ID string `json:"id"`
Workspace string `json:"workspace"`
Title string `json:"title,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Conversation Conversation `json:"conversation,omitempty"`
Messages []llm.Message `json:"messages,omitempty"`
Mode planpkg.AgentMode `json:"mode,omitempty"`
Plan planpkg.State `json:"plan,omitempty"`
ActiveSkill *ActiveSkill `json:"active_skill,omitempty"`
}
type SessionEvent ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) CleanupZeroMessageSessions ¶
func (s *Store) CleanupZeroMessageSessions(workspace, activeSessionID string) (CleanupResult, error)
func (*Store) DeleteInWorkspace ¶
func (*Store) ListInWorkspace ¶ added in v1.0.0
func (*Store) LoadInWorkspace ¶ added in v1.0.0
func (*Store) ReadEvents ¶
func (s *Store) ReadEvents(sessionID string, afterSeq int64) ([]SessionEvent, error)
type Summary ¶
type Summary struct {
ID string `json:"id"`
Workspace string `json:"workspace"`
Title string `json:"title,omitempty"`
Preview string `json:"preview,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
LastUserMessage string `json:"last_user_message,omitempty"`
MessageCount int `json:"message_count"`
RawMessageCount int `json:"raw_msg_count"`
UserEffectiveInputCount int `json:"user_effective_input_count"`
AssistantEffectiveOutputCount int `json:"assistant_effective_output_count"`
ZeroMsgSession bool `json:"zero_msg_session"`
NoReplySession bool `json:"no_reply_session"`
}
Click to show internal directories.
Click to hide internal directories.