Documentation
¶
Index ¶
- func MergePayloadMeta(raw json.RawMessage, meta PayloadMeta) (json.RawMessage, error)
- type CreateInput
- type Job
- type Manager
- type PayloadMeta
- type RunRecord
- type Store
- func (s *Store) Create(name, prompt string) (Job, error)
- func (s *Store) CreateWithOptions(input CreateInput) (Job, error)
- func (s *Store) Delete(id string) error
- func (s *Store) FinishRun(id string)
- func (s *Store) Get(id string) (Job, error)
- func (s *Store) List() ([]Job, error)
- func (s *Store) ListRuns(id string, limit int) ([]RunRecord, error)
- func (s *Store) MarkRunResult(id string, ranAt time.Time, response string, runErr error) (Job, error)
- func (s *Store) RunHistoryLimit() int
- func (s *Store) TryStartRun(id string) bool
- func (s *Store) Update(id string, input UpdateInput) (Job, error)
- func (s *Store) WorkspaceDir() string
- type StoreOptions
- type UpdateInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergePayloadMeta ¶ added in v0.24.0
func MergePayloadMeta(raw json.RawMessage, meta PayloadMeta) (json.RawMessage, error)
Types ¶
type CreateInput ¶
type Job ¶
type Job struct {
ID string `json:"id"`
Name string `json:"name"`
Prompt string `json:"prompt"`
Schedule string `json:"schedule"`
Enabled bool `json:"enabled"`
SessionID string `json:"session_id,omitempty"`
SessionTarget string `json:"session_target,omitempty"`
WakeMode string `json:"wake_mode,omitempty"`
DeliveryMode string `json:"delivery_mode,omitempty"`
Payload json.RawMessage `json:"payload,omitempty"`
DeleteAfterRun bool `json:"delete_after_run,omitempty"`
LastRunAt *time.Time `json:"last_run_at,omitempty"`
LastRunError string `json:"last_run_error,omitempty"`
ConsecutiveFailures int `json:"consecutive_failures,omitempty"`
BackoffUntil *time.Time `json:"backoff_until,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type PayloadMeta ¶ added in v0.24.0
type PayloadMeta struct {
TaskType string `json:"task_type,omitempty"`
ReminderMessage string `json:"reminder_message,omitempty"`
SourceSessionKind string `json:"source_session_kind,omitempty"`
TelegramChatID string `json:"telegram_chat_id,omitempty"`
TelegramThreadID string `json:"telegram_thread_id,omitempty"`
TelegramBotID string `json:"telegram_bot_id,omitempty"`
}
func ExtractPayloadMeta ¶ added in v0.24.0
func ExtractPayloadMeta(raw json.RawMessage) (PayloadMeta, bool)
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStoreWithOptions ¶
func NewStoreWithOptions(workspaceDir string, opts StoreOptions) *Store
func (*Store) CreateWithOptions ¶
func (s *Store) CreateWithOptions(input CreateInput) (Job, error)
func (*Store) MarkRunResult ¶
func (*Store) RunHistoryLimit ¶
func (*Store) TryStartRun ¶
func (*Store) WorkspaceDir ¶
type StoreOptions ¶
type StoreOptions struct {
RunHistoryLimit int
}
Click to show internal directories.
Click to hide internal directories.