Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSend ¶
func NewSend(cfg SendConfig, deps SendDeps) (agentkit.Tool, error)
NewSend registers tool/send: Send a proactive user-visible message through the platform.
Best practices:
- Wire the same platform instance runner uses (platform.default).
- Text and path may be sent together (text first, then file). Path needs the workspace dep.
- Platform/channel routing comes from context. Target sessionId, userId, or neither (current inbox).
- Slash: /send <sessionId|SlackChannelId> <message> | /send @<userId> <message>
Types ¶
type SendConfig ¶
type SendConfig struct {
// Root is the workspace subdirectory files are resolved from, matching
// tool/fs-workspace root (typically ".").
Root string `json:"root"`
}
type SendInput ¶
type SendInput struct {
Text string `json:"text,omitempty" jsonschema:"Text message to send"`
Path string `json:"path,omitempty" jsonschema:"Workspace-relative file to send (image or document)"`
SessionID string `json:"sessionId,omitempty" jsonschema:"Optional delivery target; defaults to the current inbox"`
UserID string `json:"userId,omitempty" jsonschema:"Optional user target when sessionId is omitted"`
}
func ParseSlashArgs ¶ added in v0.1.10
ParseSlashArgs parses /send arguments.
- /send <sessionId> <message> → explicit session (contains ":" or Slack channel id)
- /send @<userId> <message> → user in current channel context
type SendOutput ¶
type SendOutput struct {
Sent bool `json:"sent"`
}
Click to show internal directories.
Click to hide internal directories.