Documentation
¶
Overview ¶
Package taskmaster provides an unstable reusable async message scheduler.
The runtime coordinates local node inboxes and external dispatch targets around one public Message type. Nodes receive one message, can emit many addressed messages while running, and return one terminal Outcome.
Index ¶
- Constants
- Variables
- type CLILogTarget
- type Config
- type EmitFunc
- type Locator
- func NewAgentLocator(id string) Locator
- func NewCLIInputLocator() Locator
- func NewCLILogLocator() Locator
- func NewFakeChatHumanLocator(chatID string) Locator
- func NewLocator(locatorClass string, transport string, key string) Locator
- func NewTelegramHumanLocator(chatID int64, topicID int) Locator
- func NewTimerSourceLocator() Locator
- func NewWhatsAppHumanLocator(phoneNumberID string) Locator
- func NormalizeLocator(locator Locator) (Locator, error)
- type Message
- type Node
- type Outcome
- type OutcomeRouter
- type Runtime
- type Target
Constants ¶
View Source
const ( MessageKindJob = "job" MessageKindProgress = "progress" MessageKindNotification = "notification" MessageKindResult = "result" MessageKindError = "error" OutcomeStatusCompleted = "completed" OutcomeStatusFailed = "failed" OutcomeStatusStopped = "stopped" )
View Source
const ( LocatorClassAgent = "agent" LocatorClassAlias = "alias" LocatorClassHuman = "human" LocatorClassIntegration = "integration" LocatorTransportCLI = "cli" LocatorTransportFakeChat = "fakechat" LocatorTransportLocal = "local" LocatorTransportTelegram = "telegram" LocatorTransportTimer = "timer" LocatorTransportWhatsApp = "whatsapp" CLIInputKey = "input" CLILogKey = "log" DefaultTimerKey = "default" )
Variables ¶
View Source
var ErrUnsupported = errors.New("unsupported locator operation")
Functions ¶
This section is empty.
Types ¶
type CLILogTarget ¶
type CLILogTarget struct {
// contains filtered or unexported fields
}
func (CLILogTarget) DispatchMessage ¶
func (t CLILogTarget) DispatchMessage(_ context.Context, msg Message) error
func (CLILogTarget) Supports ¶
func (t CLILogTarget) Supports(locator Locator) bool
type Locator ¶
type Locator struct {
Class string `json:"class"`
Transport string `json:"transport"`
Key string `json:"key"`
Address map[string]any `json:"address,omitempty"`
}
func NewAgentLocator ¶
func NewCLIInputLocator ¶
func NewCLIInputLocator() Locator
func NewCLILogLocator ¶
func NewCLILogLocator() Locator
func NewFakeChatHumanLocator ¶
func NewTelegramHumanLocator ¶
func NewTimerSourceLocator ¶
func NewTimerSourceLocator() Locator
func NewWhatsAppHumanLocator ¶
func NormalizeLocator ¶
type Message ¶
type Message struct {
ID string `json:"id"`
SessionID string `json:"session_id"`
Kind string `json:"kind"`
From Locator `json:"from"`
To Locator `json:"to"`
ParentID string `json:"parent_id,omitempty"`
Content string `json:"content"`
Metadata map[string]any `json:"metadata,omitempty"`
}
func NormalizeMessage ¶
type OutcomeRouter ¶
Click to show internal directories.
Click to hide internal directories.