mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
6aebbe9279
Major changes: 1. Core Architecture: Decoupled Bots from Users. Bots now have independent lifecycles, member management (bot_members), and dedicated configurations. 2. Channel Gateway: - Implemented a unified Channel Manager supporting Feishu, Telegram, and Local (Web/CLI) adapters. - Added message processing pipeline to normalize interactions across different platforms. - Introduced a Contact system for identity binding and guest access policies. 3. Database & Tooling: - Consolidated all migrations into 0001_init with updated schema for bots, channels, and contacts. - Optimized sqlc.yaml to automatically track the migrations directory. 4. Agent Enhancements: - Introduced ToolContext to provide Agents with platform-aware execution capabilities (e.g., messaging, contact lookups). - Added tool logging and fallback mechanisms for toolChoice execution. 5. UI & Docs: Updated frontend stores, UI components, and Swagger documentation to align with the new Bot-centric model.
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]interface{} `json:"messages"`
|
|
Metadata map[string]interface{} `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]interface{} `json:"messages,omitempty"`
|
|
Metadata map[string]interface{} `json:"metadata,omitempty"`
|
|
Skills []string `json:"skills,omitempty"`
|
|
}
|
|
|
|
type UpdateRequest struct {
|
|
Name *string `json:"name,omitempty"`
|
|
Description *string `json:"description,omitempty"`
|
|
Metadata map[string]interface{} `json:"metadata,omitempty"`
|
|
}
|
|
|
|
type UpdateContextRequest struct {
|
|
Messages []map[string]interface{} `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]interface{} `json:"messages"`
|
|
}
|
|
|
|
type SkillsResponse struct {
|
|
Skills []string `json:"skills"`
|
|
}
|