Documentation
¶
Index ¶
- func FireWebhook(webhookURL, projectName string, payload WebhookPayload)
- type Lifecycle
- type SessionManager
- func (sm *SessionManager) Cleanup(session *core.Session) error
- func (sm *SessionManager) Get(sessionID string) (*core.Session, error)
- func (sm *SessionManager) Kill(sessionID string) error
- func (sm *SessionManager) List(projectID string) ([]*core.Session, error)
- func (sm *SessionManager) ListAll() ([]*core.Session, error)
- func (sm *SessionManager) Resume(sessionID string) error
- func (sm *SessionManager) SendMessage(sessionID, message string) error
- func (sm *SessionManager) Spawn(projectID string, issue github.Issue) (*core.Session, error)
- func (sm *SessionManager) UpdateStatus(sessionID string, status core.SessionStatus) error
- type WebhookPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FireWebhook ¶
func FireWebhook(webhookURL, projectName string, payload WebhookPayload)
FireWebhook sends a status change notification to the configured webhook URL. Fire-and-forget: errors are logged but don't block.
Types ¶
type Lifecycle ¶
type Lifecycle struct {
// contains filtered or unexported fields
}
Lifecycle manages the polling loops and state transitions.
func NewLifecycle ¶
func NewLifecycle(sm *SessionManager, cfg *config.Config) *Lifecycle
NewLifecycle creates a new Lifecycle manager.
type SessionManager ¶
SessionManager handles session CRUD operations.
func NewSessionManager ¶
func NewSessionManager(cfg *config.Config) *SessionManager
NewSessionManager creates a new SessionManager.
func (*SessionManager) Cleanup ¶
func (sm *SessionManager) Cleanup(session *core.Session) error
Cleanup destroys the tmux session and worktree, then marks as done.
func (*SessionManager) Get ¶
func (sm *SessionManager) Get(sessionID string) (*core.Session, error)
Get returns a single session by ID, searching across all projects.
func (*SessionManager) Kill ¶
func (sm *SessionManager) Kill(sessionID string) error
Kill terminates a session's tmux process, destroys worktree, and removes metadata.
func (*SessionManager) List ¶
func (sm *SessionManager) List(projectID string) ([]*core.Session, error)
List returns all sessions for a project.
func (*SessionManager) ListAll ¶
func (sm *SessionManager) ListAll() ([]*core.Session, error)
ListAll returns sessions across all projects.
func (*SessionManager) Resume ¶ added in v0.5.0
func (sm *SessionManager) Resume(sessionID string) error
Resume resets a stuck session back to working and refreshes its created-at timestamp so the inactivity timer starts over.
func (*SessionManager) SendMessage ¶
func (sm *SessionManager) SendMessage(sessionID, message string) error
SendMessage sends a message to a running session.
func (*SessionManager) UpdateStatus ¶
func (sm *SessionManager) UpdateStatus(sessionID string, status core.SessionStatus) error
UpdateStatus updates the status of a session.
type WebhookPayload ¶
type WebhookPayload struct {
Event string `json:"event"`
SessionID string `json:"session_id"`
IssueID string `json:"issue_id"`
IssueTitle string `json:"issue_title"`
OldStatus string `json:"old_status"`
NewStatus string `json:"new_status"`
PRURL string `json:"pr_url,omitempty"`
Timestamp string `json:"timestamp"`
}
WebhookPayload is sent on every session status change.