Documentation
¶
Overview ¶
Package mcpserver exposes strata's questions as Model Context Protocol tools, so an agent can ask "which prod images are on an EOL base?" and get an answer from the index directly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CleanupInput ¶ added in v0.3.0
type CleanupInput struct {
Where string `json:"where,omitempty" jsonschema:"select candidates with the query language; default stale = \"abandoned\""`
Scope string `` /* 152-byte string literal not displayed */
Limit int `json:"limit,omitempty" jsonschema:"most candidates to list, largest first (default 50); totals count them all"`
}
CleanupInput asks which images can be deleted.
type DescendantsInput ¶
type DescendantsInput struct {
RefInput
Depth int `json:"depth,omitempty" jsonschema:"levels below the base; 0 means the whole subtree (default 0)"`
AllVersions bool `json:"all_versions,omitempty" jsonschema:"match every digest the base tag has ever held"`
}
DescendantsInput asks what is built on a base.
type ExplainInput ¶
type ExplainInput struct {
RefInput
History bool `json:"history,omitempty" jsonschema:"include the build steps from the config history"`
}
ExplainInput asks about one image.
type GraphOutput ¶
GraphOutput wraps a lineage graph.
type QueryInput ¶
type QueryInput struct {
Filter string `json:"filter" jsonschema:"filter in strata's query language, such as label.env = \"prod\" and stale.eol_base"`
Fields []string `json:"fields,omitempty" jsonschema:"columns to return, such as repo, tag, digest, stale, label.team"`
Sort []string `json:"sort,omitempty" jsonschema:"fields to sort by; prefix - for descending"`
Limit int `json:"limit,omitempty" jsonschema:"maximum rows (default 200)"`
GroupBy string `json:"group_by,omitempty" jsonschema:"count images per value of this field instead of listing them"`
}
QueryInput runs a filter.
type RefInput ¶
type RefInput struct {
Ref string `json:"ref" jsonschema:"repo:tag, repo@digest, a digest, or a digest prefix of at least 12 hex characters"`
Platform string `json:"platform,omitempty" jsonschema:"platform to pick when the ref names a multi-platform index, such as linux/arm64"`
}
RefInput names one image.
type RootsOutput ¶
RootsOutput lists root bases.
type StaleInput ¶
type StaleInput struct {
GroupBy string `json:"group_by,omitempty" jsonschema:"group by repo, root or a field such as label.team"`
}
StaleInput asks for the staleness mix.
type TableOutput ¶
TableOutput is a tabular answer.