Documentation
¶
Index ¶
- type ActiveSession
- type BoardClient
- type Config
- type Manager
- func (m *Manager) ActiveCardIDs() []string
- func (m *Manager) ApplyRulesConfig(cfg rules.Config) error
- func (m *Manager) BotCardTitle() string
- func (m *Manager) BuildBotCardDescription() string
- func (m *Manager) CheckRules(ctx context.Context, eventType string, message map[string]any) error
- func (m *Manager) DiscoverSkills() []SkillInfo
- func (m *Manager) EnsureBotCard(ctx context.Context) error
- func (m *Manager) EnsureWizardCard(ctx context.Context) error
- func (m *Manager) HandleBoardEvent(ctx context.Context, message map[string]any) error
- func (m *Manager) HandleBotCardCommand(ctx context.Context, cardID string, content string, authorName string) error
- func (m *Manager) HandleCardMoved(ctx context.Context, message map[string]any) error
- func (m *Manager) HandleStopReaction(ctx context.Context, cardID string, commentID string) error
- func (m *Manager) HandleStreamRequested(ctx context.Context, cardID string, streamURL string) error
- func (m *Manager) ProcessCommentCommand(ctx context.Context, cardID string, rule rules.Rule, message map[string]any) error
- func (m *Manager) ProcessMention(ctx context.Context, cardID, commentID, content, authorName string) error
- func (m *Manager) ProcessRule(ctx context.Context, cardID string, rule rules.Rule, message map[string]any) error
- func (m *Manager) ProcessSchedule(ctx context.Context, cardID string, schedule rules.Schedule) error
- func (m *Manager) RegisterSkills(ctx context.Context) error
- func (m *Manager) ReloadAndApply(ctx context.Context) (rules.Config, error)
- func (m *Manager) Start(ctx context.Context) error
- func (m *Manager) Stop(ctx context.Context) error
- func (m *Manager) ValidateRulesConfig(cfg rules.Config) error
- type SkillInfo
- type WebSocketRunner
- type Worktree
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveSession ¶
type ActiveSession struct {
CardID string
Context context.Context
WorktreePath string
CommentID string
Process *exec.Cmd
Cancel context.CancelFunc
SessionID string
Stream api.StreamConn
Streaming bool
Cleanup bool
Stopping bool
Command *commandClaim
Done chan struct{}
// contains filtered or unexported fields
}
type BoardClient ¶
type BoardClient interface {
GetBoard(ctx context.Context, boardID string, includeArchived bool) (json.RawMessage, error)
GetCard(ctx context.Context, cardID string) (json.RawMessage, error)
GetCardMarkdown(ctx context.Context, cardID string) (string, error)
AddComment(ctx context.Context, cardID, content string) (json.RawMessage, error)
AddCommentOnce(ctx context.Context, cardID, content string) (json.RawMessage, error)
GetComment(ctx context.Context, cardID, commentID string) (json.RawMessage, error)
ToggleReaction(ctx context.Context, cardID, commentID, emoji string) (json.RawMessage, error)
UpdateCard(ctx context.Context, cardID string, patch api.CardPatch) (json.RawMessage, error)
CreateCard(ctx context.Context, boardID, listID, title, description string) (json.RawMessage, error)
}
type Config ¶
type Config struct {
BoardID string
APIURL string
Token string
AgentName string
CWD string
Timeout time.Duration
MaxConcurrent int
ExecutorType string
Rules *rules.Engine
Schedules []rules.Schedule
LifecycleFingerprint string
Client BoardClient
Executor executor.Interface
Worktree Worktree
WebSocket WebSocketRunner
Reload func(context.Context) (rules.Config, error)
}
type Manager ¶
type Manager struct {
BoardID string
APIURL string
Token string
AgentName string
Mention string
CWD string
Timeout time.Duration
MaxConcurrent int
ExecutorType string
Rules *rules.Engine
Schedules []rules.Schedule
Active map[string]*ActiveSession
Paused bool
BotCardID string
StartTime time.Time
Client BoardClient
Executor executor.Interface
Worktree Worktree
WebSocket WebSocketRunner
Reload func(context.Context) (rules.Config, error)
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) ActiveCardIDs ¶
func (*Manager) BotCardTitle ¶
func (*Manager) BuildBotCardDescription ¶
func (*Manager) CheckRules ¶
func (*Manager) DiscoverSkills ¶
func (*Manager) HandleBoardEvent ¶
func (*Manager) HandleBotCardCommand ¶
func (*Manager) HandleCardMoved ¶
func (*Manager) HandleStopReaction ¶
func (*Manager) HandleStreamRequested ¶
func (*Manager) ProcessCommentCommand ¶ added in v0.13.0
func (m *Manager) ProcessCommentCommand(ctx context.Context, cardID string, rule rules.Rule, message map[string]any) error
ProcessCommentCommand reserves an exact command before it can execute or queue. A redelivery finds the same claim and never performs a second action or acknowledgement.
func (*Manager) ProcessMention ¶
func (*Manager) ProcessRule ¶
func (*Manager) ProcessSchedule ¶
func (*Manager) ReloadAndApply ¶ added in v0.13.0
ReloadAndApply serializes a complete ordinary-rules reload. The configured loader is responsible for loading and validating its candidate and updating the scheduler only after validation; the engine swap happens under the same transaction lock.
type WebSocketRunner ¶
Click to show internal directories.
Click to hide internal directories.