Documentation
¶
Index ¶
- type Agent
- type ChatMsg
- type ChatSession
- type LogEntry
- type Store
- func (s *Store) AppendChatMessage(sessionID, role, content string) error
- func (s *Store) AppendLog(taskID, event string, detail *string) error
- func (s *Store) AppendThread(e *ThreadEntry) error
- func (s *Store) AppendThreadAt(e *ThreadEntry, ts time.Time) error
- func (s *Store) ClearTaskCron(id string) error
- func (s *Store) Close() error
- func (s *Store) CreateChatSession(id, agent string) error
- func (s *Store) CreateTask(t *Task) error
- func (s *Store) DB() *sql.DB
- func (s *Store) DeleteChatSession(id string) error
- func (s *Store) DeleteThreadOlderThan(ts time.Time) (int64, error)
- func (s *Store) GetAgent(name string) (*Agent, error)
- func (s *Store) GetChatSession(id string) (*ChatSession, error)
- func (s *Store) GetTask(id string) (*Task, error)
- func (s *Store) IncrementRetryCount(taskID string) error
- func (s *Store) ListAgents() ([]*Agent, error)
- func (s *Store) ListChatMessages(sessionID string) ([]*ChatMsg, error)
- func (s *Store) ListChatSessions() ([]*ChatSession, error)
- func (s *Store) ListLogByTask(taskID string) ([]*LogEntry, error)
- func (s *Store) ListPending(now time.Time) ([]*Task, error)
- func (s *Store) ListReady(now time.Time) ([]*Task, error)
- func (s *Store) ListRecent(n int) ([]*Task, error)
- func (s *Store) ListRecentThread(n int) ([]*ThreadEntry, error)
- func (s *Store) ListRecurring() ([]*Task, error)
- func (s *Store) ListThreadByDate(date time.Time) ([]*ThreadEntry, error)
- func (s *Store) SetTaskError(id, errMsg string) error
- func (s *Store) SetTaskOutput(id, output string) error
- func (s *Store) SumTokensByDateRange(start, end time.Time) (int, error)
- func (s *Store) ThreadEntryExists(taskID *string, wingID string, timestamp time.Time) (bool, error)
- func (s *Store) ThreadEntryExistsBySummary(wingID string, timestamp time.Time, summary string) (bool, error)
- func (s *Store) UpdateAgentHealth(name string, healthy bool, checkedAt time.Time) error
- func (s *Store) UpdateTaskStatus(id, status string) error
- func (s *Store) UpsertAgent(a *Agent) error
- type Task
- type ThreadEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatSession ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AppendChatMessage ¶
func (*Store) AppendThread ¶
func (s *Store) AppendThread(e *ThreadEntry) error
func (*Store) AppendThreadAt ¶
func (s *Store) AppendThreadAt(e *ThreadEntry, ts time.Time) error
func (*Store) ClearTaskCron ¶
func (*Store) CreateChatSession ¶
func (*Store) CreateTask ¶
func (*Store) DeleteChatSession ¶
func (*Store) DeleteThreadOlderThan ¶
func (*Store) GetChatSession ¶
func (s *Store) GetChatSession(id string) (*ChatSession, error)
func (*Store) IncrementRetryCount ¶
func (*Store) ListAgents ¶
func (*Store) ListChatMessages ¶
func (*Store) ListChatSessions ¶
func (s *Store) ListChatSessions() ([]*ChatSession, error)
func (*Store) ListReady ¶
ListReady returns pending tasks where all dependencies are done (or have no dependencies).
func (*Store) ListRecentThread ¶
func (s *Store) ListRecentThread(n int) ([]*ThreadEntry, error)
func (*Store) ListRecurring ¶
func (*Store) ListThreadByDate ¶
func (s *Store) ListThreadByDate(date time.Time) ([]*ThreadEntry, error)
func (*Store) SetTaskError ¶
func (*Store) SetTaskOutput ¶
func (*Store) SumTokensByDateRange ¶
func (*Store) ThreadEntryExists ¶
ThreadEntryExists checks if a thread entry with the given task_id, wing_id, and timestamp exists.
func (*Store) ThreadEntryExistsBySummary ¶
func (s *Store) ThreadEntryExistsBySummary(wingID string, timestamp time.Time, summary string) (bool, error)
ThreadEntryExistsBySummary checks if a thread entry with the given wing_id, timestamp, and summary exists.
func (*Store) UpdateAgentHealth ¶
func (*Store) UpdateTaskStatus ¶
func (*Store) UpsertAgent ¶
type Task ¶
type Task struct {
ID string
Type string
What string
RunAt time.Time
Agent string
Isolation string
Memory *string
ParentID *string
Status string
Cron *string
WingID *string
CreatedAt time.Time
StartedAt *time.Time
FinishedAt *time.Time
Output *string
Error *string
RetryCount int
MaxRetries int
DependsOn *string
}
Click to show internal directories.
Click to hide internal directories.