Documentation
¶
Overview ¶
Package mcp provides the MCP server and tool handlers for git-courer.
Index ¶
Constants ¶
View Source
const ( OpCommit = "commit" OpRelease = "release" OpBranch = "branch" OpTag = "tag" OpMerge = "merge" OpReset = "reset" OpCherryPick = "cherry_pick" OpRevert = "revert" OpClean = "clean" OpRemote = "remote" OpClone = "clone" OpInit = "init" OpGeneric = "generic" OpProcessing = "processing" )
Operation types constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶ added in v1.4.2
type Action struct {
Label string `json:"label"` // Human-readable (e.g., "Execute")
Key string `json:"key"` // Machine-actionable (e.g., "apply")
}
Action represents an actionable option for the user
type OllamaLifecycle ¶
OllamaLifecycle abstracts Ollama runtime operations (start, stop, pre-warm).
type PreviewSection ¶ added in v1.4.2
type PreviewSection struct {
Title string `json:"title"`
Content string `json:"content"`
Type string `json:"type,omitempty"` // "text", "list", "code", "warning"
}
PreviewSection is a categorized section of the preview content
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds the MCP server and all injected dependencies.
func ServeWithAdapter ¶
func ServeWithAdapter(cfg *config.Config, git ports.Git, llm ports.LLM, ollamaLifecycle OllamaLifecycle) *Server
ServeWithAdapter wires everything together and starts serving asynchronously.
func (*Server) SetClientInfo ¶
func (s *Server) SetClientInfo(info *domain.ClientInfo, caps *domain.ClientCapabilities)
SetClientInfo stores client information captured during the MCP initialize handshake.
func (*Server) Stop ¶
func (s *Server) Stop(ollamaLifecycle OllamaLifecycle)
Stop stops Ollama if we started it.
type StructuredPreview ¶ added in v1.4.2
type StructuredPreview struct {
Header string `json:"header"`
Sections []PreviewSection `json:"sections"`
Actions []Action `json:"actions"`
}
StructuredPreview represents a preview broken down into sections with actionable options
Click to show internal directories.
Click to hide internal directories.