mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
5a35ef34ac
- Refactor channel manager with support for Sender/Receiver interfaces and hot-swappable adapters. - Implement identity routing and pre-authentication logic for inbound messages. - Update database schema to support bot pre-auth keys and extended channel session metadata. - Add Telegram and Feishu channel configuration and adapter enhancements. - Update Swagger documentation and internal handlers for channel management. Co-authored-by: Cursor <cursoragent@cursor.com>
56 lines
1.6 KiB
Go
56 lines
1.6 KiB
Go
package subagent
|
|
|
|
import "time"
|
|
|
|
type Subagent struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
BotID string `json:"bot_id"`
|
|
Messages []map[string]any `json:"messages"`
|
|
Metadata map[string]any `json:"metadata"`
|
|
Skills []string `json:"skills"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
Deleted bool `json:"deleted"`
|
|
DeletedAt *time.Time `json:"deleted_at,omitempty"`
|
|
}
|
|
|
|
type CreateRequest struct {
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
Messages []map[string]any `json:"messages,omitempty"`
|
|
Metadata map[string]any `json:"metadata,omitempty"`
|
|
Skills []string `json:"skills,omitempty"`
|
|
}
|
|
|
|
type UpdateRequest struct {
|
|
Name *string `json:"name,omitempty"`
|
|
Description *string `json:"description,omitempty"`
|
|
Metadata map[string]any `json:"metadata,omitempty"`
|
|
}
|
|
|
|
type UpdateContextRequest struct {
|
|
Messages []map[string]any `json:"messages"`
|
|
}
|
|
|
|
type UpdateSkillsRequest struct {
|
|
Skills []string `json:"skills"`
|
|
}
|
|
|
|
type AddSkillsRequest struct {
|
|
Skills []string `json:"skills"`
|
|
}
|
|
|
|
type ListResponse struct {
|
|
Items []Subagent `json:"items"`
|
|
}
|
|
|
|
type ContextResponse struct {
|
|
Messages []map[string]any `json:"messages"`
|
|
}
|
|
|
|
type SkillsResponse struct {
|
|
Skills []string `json:"skills"`
|
|
}
|