feat: add agent skills and guardrails functionality
- Introduced new tools for managing agent skills and guardrails, including add, remove, and list operations. - Updated README.md to document new commands and usage patterns for skills and guardrails. - Enhanced server configuration to support longer read and write timeouts. - Increased maximum upload size for files to 100 MB and adjusted related configurations. - Created database migrations for agent skills, guardrails, and their associations with projects. - Updated relevant code files to integrate new skills and guardrails into the application logic.
This commit is contained in:
@@ -173,6 +173,7 @@ func routes(logger *slog.Logger, cfg *config.Config, db *store.DB, provider ai.P
|
||||
Calendar: tools.NewCalendarTool(db),
|
||||
Meals: tools.NewMealsTool(db),
|
||||
CRM: tools.NewCRMTool(db),
|
||||
Skills: tools.NewSkillsTool(db, activeProjects),
|
||||
}
|
||||
|
||||
mcpHandler := mcpserver.New(cfg.MCP, toolSet)
|
||||
|
||||
@@ -11,7 +11,10 @@ import (
|
||||
"git.warky.dev/wdevs/amcs/internal/tools"
|
||||
)
|
||||
|
||||
const maxUploadBytes = 50 << 20
|
||||
const (
|
||||
maxUploadBytes = 100 << 20
|
||||
multipartFormMemory = 32 << 20
|
||||
)
|
||||
|
||||
func fileUploadHandler(files *tools.FilesTool) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -53,7 +56,7 @@ func parseUploadRequest(r *http.Request) (tools.SaveFileDecodedInput, error) {
|
||||
}
|
||||
|
||||
func parseMultipartUpload(r *http.Request) (tools.SaveFileDecodedInput, error) {
|
||||
if err := r.ParseMultipartForm(maxUploadBytes); err != nil {
|
||||
if err := r.ParseMultipartForm(multipartFormMemory); err != nil {
|
||||
return tools.SaveFileDecodedInput{}, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user