Documentation
¶
Overview ¶
Package mcp is fuse's stdio MCP server — the agent-facing surface. Agents get four token-disciplined tools (merge_check, preview, resolve, impact); git keeps the merge-driver CLI, CI keeps the GitHub Action, humans keep the CLI. Results are summary-first and compact: a merge check answers with a verdict and counts, attaching per-file detail only where conflicts actually exist.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToolSchemas ¶
ToolSchemas returns the four fuse tools. Descriptions are deliberately terse: these ride in every agent's context window for the whole session.
Types ¶
type BreakingItem ¶
type BreakingItem struct {
File string `json:"file"`
Symbol string `json:"symbol"`
Kind string `json:"kind"`
Severity string `json:"severity"`
}
BreakingItem is one breaking change a clean auto-merge would introduce.
type ConflictItem ¶
type ConflictItem struct {
File string `json:"file"`
Strategy string `json:"strategy"`
Type string `json:"type"`
Severity string `json:"severity"`
Confidence float64 `json:"confidence"`
}
ConflictItem is one file that would not merge cleanly.
type Handler ¶
type Handler struct {
Root string
Grove analysis.GroveLike // nil when Grove is unavailable; tools degrade
Merge *merge.IntelliMerge
}
Handler holds the backend state shared by the fuse_* tools.
func NewHandler ¶
NewHandler constructs a handler rooted at root.
type ImpactNode ¶
type ImpactNode struct {
ID string `json:"id"`
File string `json:"file"`
Name string `json:"name"`
}
ImpactNode is one blast-radius entry.
type ImpactResult ¶
type ImpactResult struct {
Query string `json:"query"`
Count int `json:"count"`
Nodes []ImpactNode `json:"nodes,omitempty"`
Note string `json:"note,omitempty"`
}
ImpactResult is the fuse_impact response.
type MergeCheckResult ¶
type MergeCheckResult struct {
Verdict string `json:"verdict"` // clean | conflicts | error detail in message
Ref string `json:"ref"`
MergeBase string `json:"mergeBase"`
OverlappingFiles int `json:"overlappingFiles"`
AutoMergeable int `json:"autoMergeable"`
ConflictCount int `json:"conflictCount"`
Conflicts []ConflictItem `json:"conflicts,omitempty"`
BreakingCount int `json:"breakingCount"`
Breaking []BreakingItem `json:"breaking,omitempty"`
Note string `json:"note,omitempty"`
}
MergeCheckResult is the fuse_merge_check response. Verdict first; lists only where something needs attention.
type PreviewResult ¶
type PreviewResult struct {
Merged string `json:"merged"`
HasConflict bool `json:"hasConflict"`
Strategy string `json:"strategy"`
Confidence float64 `json:"confidence"`
}
PreviewResult is the fuse_preview response: the merged content is the payload the caller asked for; everything else is one line of metadata.
type ResolveResult ¶
type ResolveResult struct {
File string `json:"file"`
Prompt string `json:"prompt,omitempty"`
Validated bool `json:"validated"`
Applied bool `json:"applied"`
}
ResolveResult is the fuse_resolve response.