Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface {
// Name returns the command trigger without the leading slash (e.g. "new").
Name() string
// Description returns a short human-readable summary.
Description() string
// Execute runs the command. args is the trimmed text after the command name.
Execute(ctx context.Context, args string, env Env) Result
}
Command is the interface every slash command must implement.
type CronCommand ¶
type CronCommand struct{}
CronCommand implements /cron — manage scheduled jobs. Subcommands: list, remove <id>, enable <id>, disable <id>, run <id>
func (*CronCommand) Description ¶
func (c *CronCommand) Description() string
func (*CronCommand) Name ¶
func (c *CronCommand) Name() string
type Env ¶
type Env struct {
Channel string
ChatID string
SenderID string
SessionKey string
Sessions *session.Manager
WorkspacePath string
Config *config.Config
Metrics *metrics.RuntimeMetrics
ListCommands func() []Command // for /help
}
Env carries per-invocation context for a slash command.
type HelpCommand ¶
type HelpCommand struct{}
HelpCommand implements /help — lists all available slash commands.
func (*HelpCommand) Description ¶
func (c *HelpCommand) Description() string
func (*HelpCommand) Name ¶
func (c *HelpCommand) Name() string
type MemoryCommand ¶
type MemoryCommand struct{}
MemoryCommand implements /memory — read long-term memory and diary entries. Subcommands: (none)|read, diary [date|recent]
func (*MemoryCommand) Description ¶
func (c *MemoryCommand) Description() string
func (*MemoryCommand) Name ¶
func (c *MemoryCommand) Name() string
type NewSessionCommand ¶
type NewSessionCommand struct{}
NewSessionCommand implements /new — resets the current conversation session.
func (*NewSessionCommand) Description ¶
func (c *NewSessionCommand) Description() string
func (*NewSessionCommand) Name ¶
func (c *NewSessionCommand) Name() string
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds registered slash commands and dispatches them.
type Result ¶
type Result struct {
Content string
}
Result is the output of a slash command execution.
type SkillsCommand ¶
type SkillsCommand struct{}
SkillsCommand implements /skills — list and inspect installed skills. Subcommands: list, show <name>
func (*SkillsCommand) Description ¶
func (c *SkillsCommand) Description() string
func (*SkillsCommand) Name ¶
func (c *SkillsCommand) Name() string
type StatusCommand ¶
type StatusCommand struct{}
StatusCommand implements /status — shows runtime status summary.
func (*StatusCommand) Description ¶
func (c *StatusCommand) Description() string
func (*StatusCommand) Name ¶
func (c *StatusCommand) Name() string
type VersionCommand ¶
type VersionCommand struct{}
VersionCommand implements /version — shows build version info.
func (*VersionCommand) Description ¶
func (c *VersionCommand) Description() string
func (*VersionCommand) Name ¶
func (c *VersionCommand) Name() string