Changeset 0.21.4 (#90)
This commit is contained in:
@@ -205,6 +205,15 @@ func main() {
|
||||
// Register workspace_search tool (needs embedder for query embedding)
|
||||
tools.RegisterWorkspaceSearchTool(stores, kbEmbedder)
|
||||
|
||||
// ── Git Integration (v0.21.4) ────────────
|
||||
// GitOps wraps exec-based git operations with vault credential injection.
|
||||
var gitOps *workspace.GitOps
|
||||
if wfs != nil {
|
||||
gitOps = workspace.NewGitOps(wfs, stores, keyResolver, wsIndexer)
|
||||
tools.RegisterGitTools(gitOps)
|
||||
log.Println(" 🔀 Git integration enabled")
|
||||
}
|
||||
|
||||
// Register context recall tools (v0.15.1)
|
||||
tools.RegisterAttachmentRecall(stores, objStore)
|
||||
tools.RegisterConversationSearch(stores)
|
||||
@@ -458,8 +467,28 @@ func main() {
|
||||
protected.POST("/workspaces/:id/reconcile", wsH.Reconcile)
|
||||
protected.GET("/workspaces/:id/stats", wsH.Stats)
|
||||
protected.GET("/workspaces/:id/index-status", wsH.IndexStatus)
|
||||
|
||||
// Git operations (v0.21.4)
|
||||
if gitOps != nil {
|
||||
gitH := handlers.NewGitHandler(stores, gitOps)
|
||||
protected.POST("/workspaces/:id/git/clone", gitH.Clone)
|
||||
protected.POST("/workspaces/:id/git/pull", gitH.Pull)
|
||||
protected.POST("/workspaces/:id/git/push", gitH.Push)
|
||||
protected.GET("/workspaces/:id/git/status", gitH.Status)
|
||||
protected.GET("/workspaces/:id/git/diff", gitH.Diff)
|
||||
protected.POST("/workspaces/:id/git/commit", gitH.Commit)
|
||||
protected.GET("/workspaces/:id/git/log", gitH.Log)
|
||||
protected.GET("/workspaces/:id/git/branches", gitH.Branches)
|
||||
protected.POST("/workspaces/:id/git/checkout", gitH.Checkout)
|
||||
}
|
||||
}
|
||||
|
||||
// Git credentials (v0.21.4) — user-scoped, independent of workspace
|
||||
gitCredH := handlers.NewGitCredentialHandler(stores, keyResolver)
|
||||
protected.POST("/git-credentials", gitCredH.Create)
|
||||
protected.GET("/git-credentials", gitCredH.List)
|
||||
protected.DELETE("/git-credentials/:id", gitCredH.Delete)
|
||||
|
||||
// Attachments (file upload/download)
|
||||
attachH := handlers.NewAttachmentHandler(stores, objStore, extQueue)
|
||||
protected.POST("/channels/:id/attachments", attachH.Upload)
|
||||
|
||||
Reference in New Issue
Block a user