Documentation
¶
Index ¶
- func New(version string, policy *rootauth.Policy) *mcp.Server
- func Run(ctx context.Context, version string, policy *rootauth.Policy) error
- type AnalyzeChangeScopeInput
- type AnalyzeCodeGraphInput
- type AnalyzeInput
- type AnalyzeOutput
- type ChangeScopeComparisonOutput
- type ChangeScopeOutput
- type CodeGraphNeighborhoodOutput
- type CodeGraphOutput
- type CompareChangeScopeInput
- type GetChangeScopeComparisonInput
- type GetChangeScopeInput
- type GetCodeGraphInput
- type GetCodeGraphNeighborhoodInput
- type GetResultsInput
- type GetReviewChangeInput
- type Page
- type ReviewChangeInput
- type ReviewOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnalyzeChangeScopeInput ¶
type AnalyzeChangeScopeInput struct {
Root string `` /* 150-byte string literal not displayed */
Paths []string `` /* 152-byte string literal not displayed */
CoveragePath string `json:"coveragePath,omitempty" jsonschema:"Optional Cobertura XML or Go coverprofile used to decorate changed callables."`
DiffBase string `json:"diffBase" jsonschema:"Required Git revision whose merge base with HEAD defines actual change scope."`
CRAPThreshold *float64 `json:"crapThreshold,omitempty" jsonschema:"Score above which a changed callable is flagged. Defaults to 30."`
IncludeTests bool `json:"includeTests,omitempty" jsonschema:"Include Go _test.go and TypeScript .spec/.test files. Defaults to false."`
IncludeGenerated bool `json:"includeGenerated,omitempty" jsonschema:"Include generated source conventions. Defaults to false."`
Exclude []string `json:"exclude,omitempty" jsonschema:"Root-relative source exclusion patterns using gitignore syntax."`
StrictCoverage bool `json:"strictCoverage,omitempty" jsonschema:"Fail when coverage paths are unmatched or ambiguous."`
}
type AnalyzeCodeGraphInput ¶
type AnalyzeCodeGraphInput struct {
Root string `` /* 141-byte string literal not displayed */
Paths []string `` /* 136-byte string literal not displayed */
CoveragePath string `json:"coveragePath,omitempty" jsonschema:"Optional Cobertura XML or Go coverprofile used to decorate callable nodes."`
CRAPThreshold *float64 `json:"crapThreshold,omitempty" jsonschema:"Score above which callable nodes are flagged. Defaults to 30."`
IncludeTests bool `json:"includeTests,omitempty" jsonschema:"Include Go _test.go and TypeScript .spec/.test files. Defaults to false."`
IncludeGenerated bool `json:"includeGenerated,omitempty" jsonschema:"Include generated source conventions. Defaults to false."`
Exclude []string `json:"exclude,omitempty" jsonschema:"Root-relative source exclusion patterns using gitignore syntax."`
StrictCoverage bool `json:"strictCoverage,omitempty" jsonschema:"Fail when coverage paths are unmatched or ambiguous."`
ResultMode string `json:"resultMode,omitempty" jsonschema:"Graph detail to return: summary, nodes, edges, or references. Defaults to summary."`
Limit *int `json:"limit,omitempty" jsonschema:"Maximum node or edge details per response, from 1 through 100. Defaults to 20."`
}
type AnalyzeInput ¶
type AnalyzeInput struct {
Root string `` /* 150-byte string literal not displayed */
Paths []string `` /* 152-byte string literal not displayed */
CoveragePath string `` /* 152-byte string literal not displayed */
DiffBase string `` /* 184-byte string literal not displayed */
CRAPThreshold *float64 `json:"crapThreshold,omitempty" jsonschema:"Score above which a callable is flagged. Defaults to 30."`
IncludeTests bool `json:"includeTests,omitempty" jsonschema:"Include Go _test.go and TypeScript .spec/.test files. Defaults to false."`
IncludeGenerated bool `` /* 157-byte string literal not displayed */
Exclude []string `` /* 136-byte string literal not displayed */
StrictCoverage bool `` /* 133-byte string literal not displayed */
ResultMode string `` /* 127-byte string literal not displayed */
Limit *int `json:"limit,omitempty" jsonschema:"Maximum method details per response, from 1 through 100. Defaults to 20."`
Offset int `json:"offset,omitempty" jsonschema:"Deprecated zero-based initial offset. Prefer get_analysis_results continuation cursors."`
}
type AnalyzeOutput ¶
type AnalyzeOutput struct {
PageSchemaVersion string `json:"pageSchemaVersion"`
ReportType string `json:"reportType"`
ReportID string `json:"reportId"`
ExpiresAt string `json:"expiresAt"`
SchemaVersion string `json:"schemaVersion"`
Tool reportcontract.ToolIdentity `json:"tool"`
Fingerprints reportcontract.Fingerprints `json:"fingerprints"`
Coordinates reportcontract.Coordinates `json:"coordinates"`
Grammars []analysis.GrammarIdentity `json:"grammars"`
Mode string `json:"mode"`
Coverage analysis.CoverageMetadata `json:"coverage"`
Discovery analysis.DiscoveryMetadata `json:"discovery"`
DiffBase string `json:"diffBase,omitempty"`
DiffBaseCommit string `json:"diffBaseCommit,omitempty"`
DiffHeadCommit string `json:"diffHeadCommit,omitempty"`
DiffMergeBase string `json:"diffMergeBase,omitempty"`
Threshold float64 `json:"threshold"`
Summary analysis.Summary `json:"summary"`
Page Page `json:"page"`
Methods []analysis.MethodResult `json:"methods"`
Diagnostics []analysis.Diagnostic `json:"diagnostics"`
}
type ChangeScopeComparisonOutput ¶
type ChangeScopeComparisonOutput struct {
PageSchemaVersion string `json:"pageSchemaVersion"`
ReportID string `json:"reportId"`
ExpiresAt string `json:"expiresAt"`
Report analysis.ChangeScopeComparisonReport `json:"report"`
}
type ChangeScopeOutput ¶
type ChangeScopeOutput struct {
PageSchemaVersion string `json:"pageSchemaVersion"`
ReportID string `json:"reportId"`
ExpiresAt string `json:"expiresAt"`
Report analysis.ChangeScopeReport `json:"report"`
}
type CodeGraphNeighborhoodOutput ¶
type CodeGraphNeighborhoodOutput struct {
PageSchemaVersion string `json:"pageSchemaVersion"`
ReportID string `json:"reportId"`
ExpiresAt string `json:"expiresAt"`
Neighborhood analysis.CodeGraphNeighborhood `json:"neighborhood"`
}
type CodeGraphOutput ¶
type CodeGraphOutput struct {
PageSchemaVersion string `json:"pageSchemaVersion"`
ReportType string `json:"reportType"`
ReportID string `json:"reportId"`
ExpiresAt string `json:"expiresAt"`
SchemaVersion string `json:"schemaVersion"`
Tool reportcontract.ToolIdentity `json:"tool"`
Fingerprints reportcontract.Fingerprints `json:"fingerprints"`
Coordinates reportcontract.Coordinates `json:"coordinates"`
Grammars []analysis.GrammarIdentity `json:"grammars"`
Coverage analysis.CoverageMetadata `json:"coverage"`
Discovery analysis.DiscoveryMetadata `json:"discovery"`
Threshold float64 `json:"threshold"`
Policy analysis.CodeGraphPolicy `json:"policy"`
Summary analysis.CodeGraphSummary `json:"summary"`
Page Page `json:"page"`
Nodes []analysis.CodeGraphNode `json:"nodes"`
Edges []analysis.CodeGraphEdge `json:"edges"`
References []analysis.CodeGraphReference `json:"references"`
ResolutionInputs []reportcontract.FileFingerprint `json:"resolutionInputs"`
Limitations []string `json:"limitations"`
Diagnostics []analysis.Diagnostic `json:"diagnostics"`
}
type CompareChangeScopeInput ¶
type CompareChangeScopeInput struct {
Root string `` /* 150-byte string literal not displayed */
Paths []string `` /* 152-byte string literal not displayed */
CoveragePath string `json:"coveragePath,omitempty" jsonschema:"Coverage report generated for current source."`
BaseRevision string `json:"baseRevision" jsonschema:"Required Git revision whose merge base supplies baseline source blobs."`
BaseCoveragePath string `json:"baseCoveragePath,omitempty" jsonschema:"Coverage report generated for the exact baseline source revision."`
CRAPThreshold *float64 `json:"crapThreshold,omitempty" jsonschema:"Threshold used to classify new regressions. Defaults to 30."`
IncludeTests bool `json:"includeTests,omitempty" jsonschema:"Include Go _test.go and TypeScript .spec/.test files. Defaults to false."`
IncludeGenerated bool `json:"includeGenerated,omitempty" jsonschema:"Include generated source conventions. Defaults to false."`
Exclude []string `json:"exclude,omitempty" jsonschema:"Root-relative source exclusion patterns using gitignore syntax."`
StrictCoverage bool `json:"strictCoverage,omitempty" jsonschema:"Fail when either coverage report has unmatched or ambiguous paths."`
}
type GetChangeScopeComparisonInput ¶
type GetChangeScopeComparisonInput struct {
ReportID string `json:"reportId" jsonschema:"Comparison report ID returned by compare_change_scope."`
}
type GetChangeScopeInput ¶
type GetChangeScopeInput struct {
ReportID string `json:"reportId" jsonschema:"Change scope report ID returned by analyze_change_scope."`
}
type GetCodeGraphInput ¶
type GetCodeGraphInput struct {
ReportID string `json:"reportId,omitempty" jsonschema:"Code graph report ID returned by analyze_code_graph."`
ResultMode string `json:"resultMode,omitempty" jsonschema:"Graph detail to return: summary, nodes, edges, or references. Defaults to summary."`
Limit *int `json:"limit,omitempty" jsonschema:"Maximum node or edge details per response, from 1 through 100. Defaults to 20."`
Cursor string `json:"cursor,omitempty" jsonschema:"Opaque continuation cursor. Do not combine with other fields."`
}
type GetCodeGraphNeighborhoodInput ¶
type GetCodeGraphNeighborhoodInput struct {
ReportID string `json:"reportId" jsonschema:"Code graph report ID returned by analyze_code_graph."`
SeedNodeIDs []string `json:"seedNodeIds" jsonschema:"One through 20 graph node IDs used as traversal seeds."`
Direction string `json:"direction,omitempty" jsonschema:"Traversal direction: incoming, outgoing, or both. Defaults to both."`
Depth *int `json:"depth,omitempty" jsonschema:"Maximum traversal depth, from 0 through 5. Defaults to 1."`
EdgeTypes []string `json:"edgeTypes,omitempty" jsonschema:"Edges to traverse: contains, declares, member-of, and imports. Defaults to all."`
MaxNodes *int `json:"maxNodes,omitempty" jsonschema:"Maximum coherent neighborhood nodes, from seed count through 1000. Defaults to 100."`
MaxEdges *int `json:"maxEdges,omitempty" jsonschema:"Maximum neighborhood edges, from 1 through 2000. Defaults to 200."`
}
type GetResultsInput ¶
type GetResultsInput struct {
ReportID string `json:"reportId,omitempty" jsonschema:"Analysis report ID returned by analyze_code."`
ResultMode string `` /* 127-byte string literal not displayed */
Limit *int `json:"limit,omitempty" jsonschema:"Maximum method details per response, from 1 through 100. Defaults to 20."`
Cursor string `json:"cursor,omitempty" jsonschema:"Opaque continuation cursor. Do not combine with other fields."`
}
type GetReviewChangeInput ¶
type GetReviewChangeInput struct {
ReportID string `json:"reportId" jsonschema:"Review report ID returned by review_change."`
}
type Page ¶
type Page struct {
ResultMode string `json:"resultMode"`
TotalMatched int `json:"totalMatched"`
Offset int `json:"offset"`
Limit int `json:"limit"`
Returned int `json:"returned"`
HasMore bool `json:"hasMore"`
NextCursor string `json:"nextCursor,omitempty"`
NextOffset *int `json:"nextOffset,omitempty"`
}
type ReviewChangeInput ¶
type ReviewChangeInput struct {
Root string `` /* 150-byte string literal not displayed */
Paths []string `` /* 135-byte string literal not displayed */
CoveragePath string `json:"coveragePath,omitempty" jsonschema:"Coverage report generated for current source."`
BaseRevision string `` /* 129-byte string literal not displayed */
BaseCoveragePath string `json:"baseCoveragePath,omitempty" jsonschema:"Coverage report generated for the exact baseline source revision."`
CRAPThreshold *float64 `json:"crapThreshold,omitempty" jsonschema:"Score above which a changed callable is flagged. Defaults to 30."`
IncludeTests bool `json:"includeTests,omitempty" jsonschema:"Include Go _test.go and TypeScript .spec/.test files."`
IncludeGenerated bool `json:"includeGenerated,omitempty" jsonschema:"Include generated source conventions."`
Exclude []string `json:"exclude,omitempty" jsonschema:"Root-relative source exclusion patterns using gitignore syntax."`
StrictCoverage bool `json:"strictCoverage,omitempty" jsonschema:"Fail when either coverage report has unmatched or ambiguous paths."`
Rules analysis.ArchitectureRules `json:"rules,omitempty" jsonschema:"Architecture rules evaluated against the selected-source dependency graph."`
IncludeCallGraph bool `json:"includeCallGraph,omitempty" jsonschema:"Include Go compiler-backed affected-test evidence. Requires a go.mod."`
}
type ReviewOutput ¶
type ReviewOutput struct {
PageSchemaVersion string `json:"pageSchemaVersion"`
ReportID string `json:"reportId"`
ExpiresAt string `json:"expiresAt"`
Report analysis.ReviewReport `json:"report"`
}
Click to show internal directories.
Click to hide internal directories.