-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathroutes.go
57 lines (44 loc) · 1.67 KB
/
routes.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// routes.go
package main
import (
"net/http"
"github.com/labstack/echo/v4"
)
func registerRoutes(e *echo.Echo, config *Config) {
// Serve static frontend files.
e.GET("/*", echo.WrapHandler(http.FileServer(getFileSystem())))
api := e.Group("/api")
api.GET("/config", configHandler)
// SEFII endpoints.
sefiiGroup := api.Group("/sefii")
sefiiGroup.POST("/ingest", sefiiIngestHandler(config))
sefiiGroup.POST("/search", sefiiSearchHandler(config))
sefiiGroup.POST("/combined-retrieve", sefiiCombinedRetrieveHandler(config))
// Git-related endpoints.
api.GET("/git-files", gitFilesHandler)
api.POST("/git-files/ingest", gitFilesIngestHandler(config))
// Anthropic endpoints.
anthropicGroup := api.Group("/anthropic")
anthropicGroup.POST("/messages", func(c echo.Context) error {
return handleAnthropicMessages(c, config)
})
api.POST("/run-fmlx", runFMLXHandler)
e.GET("/mlx_out.png", imageHandler)
api.POST("/run-sd", runSDHandler)
api.POST("/repoconcat", repoconcatHandler)
api.POST("/split-text", splitTextHandler)
api.POST("/save-file", saveFileHandler)
api.POST("/open-file", openFileHandler)
api.GET("/web-content", webContentHandler)
api.GET("/web-search", webSearchHandler)
api.POST("/executePython", executePythonHandler)
// NEW: Execute MCP endpoint to work with MCPNode.vue.
api.POST("/executeMCP", executeMCPHandler)
api.POST("/datadog", datadogHandler)
api.POST("/download-llama", downloadLlamaHandler)
api.POST("/comfy-proxy", comfyProxyHandler)
// Agentic Memory endpoints.
agenticGroup := api.Group("/agentic-memory")
agenticGroup.POST("/ingest", agenticMemoryIngestHandler(config))
agenticGroup.POST("/search", agenticMemorySearchHandler(config))
}