Documentation
¶
Index ¶
- Constants
- type CallersParams
- type CommitParams
- type CriticalParams
- type DefinitionParams
- type DiagnoseParams
- type DiffParams
- type DreamParams
- type EvolveParams
- type ImpactParams
- type IndexParams
- type MCPMessenger
- type MapParams
- type NeighborhoodParams
- type ObsidianExportParams
- type Options
- type PointerResolver
- type PredictParams
- type PureSignalParams
- type ReadParams
- type RippleRefactorParams
- type RollbackParams
- type SaveAnchorParams
- type SearchParams
- type SelfHealParams
- type Server
- func (s *Server) AppendSessionMessage(msg memory.Message)
- func (s *Server) Close() error
- func (s *Server) GetTranscript(req *mcp.CallToolRequest) []memory.Message
- func (s *Server) GotoDefinition(ctx context.Context, path string, pos lsp.Position) ([]lsp.Location, error)
- func (s *Server) Hover(ctx context.Context, path string, pos lsp.Position) (*lsp.Hover, error)
- func (s *Server) Start(ctx context.Context, transport mcp.Transport) error
- type SnapshotASTParams
- type StructuralSearchParams
- type TypeInfoParams
- type UnlockArsenalParams
- type VerifyASTParams
Constants ¶
View Source
const CompactContextSystemPrompt = `` /* 677-byte string literal not displayed */
View Source
const GEPSystemPrompt = `` /* 377-byte string literal not displayed */
View Source
const JudgeSystemPrompt = `` /* 641-byte string literal not displayed */
View Source
const MaxSessionHistory = 100
View Source
const MaxSnapshots = 20
View Source
const ScouterServerInstructions = `` /* 1076-byte string literal not displayed */
View Source
const SelfHealSystemPrompt = `You are Scouter's Atomic Self-Healing engine.
A test has failed. Review the provided error log and source code.
If historical fixes are provided, carefully consider past patterns to generate your fix.
MANDATES:
1. Fix the specific logic causing the failure.
2. DO NOT output Markdown code blocks (e.g., ` + "```go" + `).
3. DO NOT include explanations, comments, or apologies.
4. Return ONLY the raw code replacement for the target block.
5. Adhere to Go 1.24+ idioms.`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallersParams ¶
type CallersParams struct {
CalleeName string `json:"calleeName" jsonschema:"REQUIRED. The name of the function or method to find callers for"`
Limit int `json:"limit,omitempty" jsonschema:"Optional: Max results to return (default: 50, max: 100)"`
Offset int `json:"offset,omitempty" jsonschema:"Optional: Number of results to skip for pagination"`
Format string `json:"format,omitempty" jsonschema:"Optional: Response format ('text' or 'hakai')"`
}
type CommitParams ¶
type CommitParams struct{}
type CriticalParams ¶
type DefinitionParams ¶
type DiagnoseParams ¶
type DiagnoseParams struct {
ErrorLog string `json:"errorLog" jsonschema:"REQUIRED. The error log output containing the file and line number of the failure"`
}
type DiffParams ¶
type DiffParams struct{}
type DreamParams ¶
type EvolveParams ¶
type ImpactParams ¶
type ImpactParams struct {
SymbolName string `json:"symbolName" jsonschema:"REQUIRED. The name of the symbol to analyze"`
FilePath string `json:"filePath" jsonschema:"REQUIRED. Path to the file containing the symbol"`
MaxDepth int `json:"maxDepth,omitempty" jsonschema:"Optional: Maximum recursion depth for impact analysis"`
Verbose bool `json:"verbose,omitempty" jsonschema:"Optional: Include detailed metrics and Mermaid graph"`
}
type IndexParams ¶
type IndexParams struct {
FilePath string `json:"filePath" jsonschema:"REQUIRED. The absolute or relative path to the file or directory to index"`
}
type MCPMessenger ¶
type MCPMessenger struct {
// contains filtered or unexported fields
}
MCPMessenger adapts the MCP Sampling protocol to the engine.Messenger interface.
func NewMCPMessenger ¶
func NewMCPMessenger(session *mcp.ServerSession) *MCPMessenger
NewMCPMessenger creates a new messenger for the given MCP session.
type MapParams ¶
type MapParams struct {
Path string `json:"path" jsonschema:"REQUIRED. The absolute or relative path to the file or directory to map (skeleton only)"`
}
type NeighborhoodParams ¶
type NeighborhoodParams struct {
FilePath string `json:"filePath" jsonschema:"REQUIRED. The absolute or relative path to the file to extract the neighborhood from"`
}
type ObsidianExportParams ¶
type ObsidianExportParams struct {
SymbolName string `json:"symbolName" jsonschema:"REQUIRED. The name of the symbol to export"`
FilePath string `json:"filePath" jsonschema:"REQUIRED. Path to the file containing the symbol"`
VaultPath string `json:"vaultPath,omitempty" jsonschema:"Optional: Custom path for the Obsidian vault export"`
}
type Options ¶
type Options struct {
Store store.Store
Logger *slog.Logger
LspMgr *lsp.Manager
TruthEngine *engine.TruthEngine
ChronosEngine *engine.ChronosEngine
AppService *memory.AppService
}
Options contains the dependencies required to initialize the MCP Server.
type PointerResolver ¶
type PointerResolver struct {
// contains filtered or unexported fields
}
PointerResolver handles the resolution of MCP pointers to physical file ranges.
func NewPointerResolver ¶
func NewPointerResolver(st store.SymbolRegistry) *PointerResolver
type PredictParams ¶
type PredictParams struct {
Diff string `json:"diff,omitempty" jsonschema:"Optional: Git diff to analyze (defaults to uncommitted changes)"`
}
type PureSignalParams ¶
type PureSignalParams struct {
Text string `json:"text" jsonschema:"REQUIRED. The raw text to filter and extract pure signal from"`
Mode string `json:"mode,omitempty" jsonschema:"Optional: Filtering mode (e.g., 'compact', 'verbose')"`
Level string `json:"level,omitempty" jsonschema:"Optional: Filtering aggressiveness (e.g., 'aggressive', 'balanced')"`
}
type ReadParams ¶
type RippleRefactorParams ¶
type RollbackParams ¶
type RollbackParams struct{}
type SaveAnchorParams ¶
type SaveAnchorParams struct {
Summary string `json:"summary" jsonschema:"REQUIRED. The technical summary of the session to anchor in Engram"`
}
type SearchParams ¶
type SearchParams struct {
Query string `json:"query" jsonschema:"REQUIRED. The search query (supports semantic or text search)"`
Type string `json:"type,omitempty" jsonschema:"Optional: Filter by symbol type (e.g., function, method, struct)"`
Limit int `json:"limit,omitempty" jsonschema:"Optional: Max results to return (default: 50, max: 100)"`
Offset int `json:"offset,omitempty" jsonschema:"Optional: Number of results to skip for pagination"`
Format string `json:"format,omitempty" jsonschema:"Optional: Response format ('text' or 'hakai')"`
}
type SelfHealParams ¶
type SelfHealParams struct {
ErrorLog string `json:"errorLog" jsonschema:"REQUIRED. The raw error log or test failure output containing the failure context"`
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps the official MCP SDK server to provide Scouter-specific domain logic.
func (*Server) AppendSessionMessage ¶
AppendSessionMessage adds a message to the session history with a fixed capacity.
func (*Server) GetTranscript ¶
func (s *Server) GetTranscript(req *mcp.CallToolRequest) []memory.Message
GetTranscript attempts to retrieve the current session transcript.
func (*Server) GotoDefinition ¶
func (s *Server) GotoDefinition(ctx context.Context, path string, pos lsp.Position) ([]lsp.Location, error)
GotoDefinition performs an LSP definition request.
type SnapshotASTParams ¶
type SnapshotASTParams struct {
FilePath string `json:"filePath" jsonschema:"REQUIRED. The absolute or relative path to the file to snapshot"`
}
type StructuralSearchParams ¶
type StructuralSearchParams struct {
Pattern string `json:"pattern,omitempty" jsonschema:"Optional: The structural search pattern (supports $VAR and $$$ wildcards)"`
TargetSymbol string `json:"targetSymbol,omitempty" jsonschema:"Optional: An existing symbol to use as the template pattern (Find Logical Twins)"`
Ext string `json:"ext,omitempty" jsonschema:"Optional: The file extension to search in (e.g., '.go', '.ts')"`
Path string `json:"path,omitempty" jsonschema:"Optional: Root path for the search (defaults to '.')"`
Limit int `json:"limit,omitempty" jsonschema:"Optional: Max results to return (default: 50, max: 100)"`
Offset int `json:"offset,omitempty" jsonschema:"Optional: Number of results to skip for pagination"`
}
type TypeInfoParams ¶
type UnlockArsenalParams ¶
type UnlockArsenalParams struct{}
type VerifyASTParams ¶
Click to show internal directories.
Click to hide internal directories.