Documentation
¶
Index ¶
Constants ¶
View Source
const ( PluginID = "channel/feishu" RuntimeName = "bot" )
Variables ¶
This section is empty.
Functions ¶
func DecodeConfig ¶
func DecodeConfig(raw map[string]any) (pkgchannel.FeishuConfig, error)
func NewFeishuManagedRuntime ¶
func NewFeishuManagedRuntime(deps FeishuRuntimeDeps) pkgplugins.Runtime
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot wraps a Feishu bot with agent pool integration.
func (*Bot) Notify ¶
Notify sends a notification message. Implements channel.Channel. Supports both chat IDs (oc_ prefix) and user open IDs (ou_ prefix).
type Config ¶
type Config struct {
AppID string `json:"app_id"`
AppSecret string `json:"app_secret"`
EncryptKey string `json:"encrypt_key"`
VerificationToken string `json:"verification_token"`
GroupMode string `json:"group_mode"` // "mention" | "always" | "disabled"
Groups map[string]GroupConfig `json:"groups"` // per-group overrides keyed by chat_id
}
Config holds Feishu bot settings.
type FeishuRuntimeDeps ¶
type FeishuRuntimeDeps struct {
Parent context.Context
Handler pkgchannel.Handler
Notifications pkgplugins.ChannelRegistry
Log *slog.Logger
Now func() time.Time
NewChannel func(pkgchannel.FeishuConfig, pkgchannel.Handler) (pkgchannel.Channel, error)
}
type GroupConfig ¶
type GroupConfig struct {
GroupMode string `json:"group_mode"` // override global group_mode for this group
SystemPrompt string `json:"system_prompt"` // prepend to user message in this group
ToolAllow []string `json:"tool_allow"` // reserved: only these tools (not yet enforced)
ToolDeny []string `json:"tool_deny"` // reserved: deny these tools (not yet enforced)
}
GroupConfig holds per-group overrides, keyed by chat_id in Config.Groups.
Click to show internal directories.
Click to hide internal directories.