Documentation
¶
Overview ¶
Package mcp serves koment annotations to agents over stdio or HTTP.
Index ¶
- func NewSnapshotServer(catalog *serving.Catalog, recorder metrics.Recorder, access RepositoryAccess) *sdk.Server
- func NewWritableSnapshotServer(catalog *serving.Catalog, recorder metrics.Recorder, access RepositoryAccess, ...) *sdk.Server
- func Serve(args []string, stderr io.Writer) error
- type AcknowledgeCommentInput
- type AddInput
- type Annotation
- type AnnotationAuthor
- type AnnotationGit
- type AnnotationPolicy
- type ConvertCommentInput
- type GetInput
- type GetOutput
- type MutationAnchor
- type MutationOutput
- type MutationRecord
- type MutationReview
- type ReanchorInput
- type RepositoriesInput
- type RepositoriesOutput
- type RepositoryAccess
- type RepositorySummary
- type SearchInput
- type SearchOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSnapshotServer ¶ added in v0.3.0
func NewWritableSnapshotServer ¶ added in v0.3.0
Types ¶
type AcknowledgeCommentInput ¶ added in v0.3.0
type AcknowledgeCommentInput struct {
Repository string `json:"repository,omitempty" jsonschema:"repository id; required when several repositories are served"`
File string `json:"file" jsonschema:"source path relative to the repository root"`
Comment string `json:"comment" jsonschema:"complete verbatim Go comment group to retain"`
Body string `json:"body" jsonschema:"why the normal koment procedure is insufficient"`
Acknowledged bool `json:"acknowledge_inline_comment" jsonschema:"must be true to waive the normal koment procedure"`
}
type AddInput ¶ added in v0.3.0
type AddInput struct {
Repository string `json:"repository,omitempty" jsonschema:"repository id; required when several repositories are served"`
File string `json:"file" jsonschema:"source path relative to the repository root"`
Excerpt string `json:"excerpt,omitempty" jsonschema:"verbatim code excerpt; omit for a file-scoped annotation"`
Kind string `json:"kind" jsonschema:"one of why, gotcha, invariant, anti-pattern"`
Body string `json:"body" jsonschema:"the rationale to record"`
}
type Annotation ¶
type Annotation struct {
Repository string `json:"repository"`
Commit string `json:"commit,omitempty"`
File string `json:"file"`
ID string `json:"id"`
Kind string `json:"kind"`
Body string `json:"body"`
Scope string `json:"scope"`
Excerpt string `json:"excerpt,omitempty"`
Line int `json:"line,omitempty"`
Occurrences int `json:"occurrences"`
Created string `json:"created"`
Status string `json:"status"`
Warning string `json:"warning,omitempty"`
Author AnnotationAuthor `json:"author"`
Git *AnnotationGit `json:"git,omitempty"`
Policy *AnnotationPolicy `json:"policy,omitempty"`
}
type AnnotationAuthor ¶ added in v0.3.0
type AnnotationGit ¶ added in v0.3.0
type AnnotationPolicy ¶ added in v0.3.0
type ConvertCommentInput ¶ added in v0.3.0
type ConvertCommentInput struct {
Repository string `json:"repository,omitempty" jsonschema:"repository id; required when several repositories are served"`
File string `json:"file" jsonschema:"source path relative to the repository root"`
Comment string `json:"comment" jsonschema:"complete verbatim Go comment group"`
Kind string `json:"kind,omitempty" jsonschema:"annotation kind; defaults to why"`
}
type GetOutput ¶
type GetOutput struct {
Repository string `json:"repository"`
Commit string `json:"commit,omitempty"`
File string `json:"file"`
Annotations []Annotation `json:"annotations"`
}
type MutationAnchor ¶ added in v0.3.0
type MutationOutput ¶ added in v0.3.0
type MutationOutput struct {
Repository string `json:"repository"`
Path string `json:"path"`
Record MutationRecord `json:"record"`
Warnings []string `json:"warnings,omitempty"`
Review *MutationReview `json:"review,omitempty"`
}
type MutationRecord ¶ added in v0.3.0
type MutationRecord struct {
Version int `json:"version"`
ID string `json:"id"`
File string `json:"file"`
Kind string `json:"kind"`
Body string `json:"body"`
Created string `json:"created"`
Anchor MutationAnchor `json:"anchor"`
Git *AnnotationGit `json:"git,omitempty"`
Author AnnotationAuthor `json:"author"`
Policy *AnnotationPolicy `json:"policy,omitempty"`
}
type MutationReview ¶ added in v0.3.0
type ReanchorInput ¶ added in v0.3.0
type ReanchorInput struct {
Repository string `json:"repository,omitempty" jsonschema:"repository id; required when several repositories are served"`
ID string `json:"id" jsonschema:"stable annotation id"`
File string `json:"file,omitempty" jsonschema:"new repository-relative source path"`
Excerpt string `json:"excerpt,omitempty" jsonschema:"new verbatim code excerpt"`
}
type RepositoriesInput ¶ added in v0.2.0
type RepositoriesInput struct{}
type RepositoriesOutput ¶ added in v0.2.0
type RepositoriesOutput struct {
Repositories []RepositorySummary `json:"repositories"`
}
type RepositoryAccess ¶ added in v0.3.0
type RepositorySummary ¶ added in v0.2.0
type SearchInput ¶
type SearchOutput ¶
type SearchOutput struct {
Query string `json:"query"`
Matches []Annotation `json:"matches"`
}
Click to show internal directories.
Click to hide internal directories.