Documentation
¶
Overview ¶
Package mcpserver is lockfile's MCP server: one tool per agent command, each a thin adapter over clientcmd. Its outputs are the CLI's: the closed values of docs/security-model.md, as text and as structured content.
Index ¶
- Constants
- Variables
- func Names() []string
- func New(pinned string) *mcp.Server
- func Serve(ctx context.Context, pinned string, r io.Reader, w io.Writer) error
- type HandleIn
- type NoIn
- type PlanIn
- type PlanOut
- type PluginsOut
- type ProfileIn
- type ReleaseOut
- type ResultOut
- type RunIn
- type SourcesOut
- type StatusOut
Constants ¶
View Source
const ( ToolStatus = "lockfile_status" ToolSources = "lockfile_sources" ToolPlugins = "lockfile_plugins" ToolPlan = "lockfile_plan" ToolRun = "lockfile_run" ToolAnswers = "lockfile_answers" ToolRelease = "lockfile_release" )
Tool names.
View Source
const RunningMessage = "running in the lockfile console"
RunningMessage is the one progress text of a run: constant, so that the notifications say nothing the response time does not (docs/security-model.md).
Variables ¶
View Source
var Instructions string
Functions ¶
Types ¶
type PlanIn ¶
type PlanIn struct {
Profile string `json:"profile,omitempty" jsonschema:"profile of the console; may be left out when exactly one console runs"`
Key string `json:"key,omitempty" jsonschema:"exact object key, as the user gave it (or handle, not both)"`
Handle string `json:"handle,omitempty" jsonschema:"handle of a file already fetched, for follow-up questions (or key, not both)"`
Plugins []string `json:"plugins" jsonschema:"plugins to run, from lockfile_plugins"`
Intent string `json:"intent,omitempty" jsonschema:"one line telling the user why, at most 200 bytes"`
}
type PluginsOut ¶
type PluginsOut struct {
Plugins []rpc.PluginInfo `json:"plugins"`
Refusal *refusal.Info `json:"refusal,omitempty"`
}
type ProfileIn ¶
type ProfileIn struct {
Profile string `json:"profile,omitempty" jsonschema:"profile of the console; may be left out when exactly one console runs"`
}
type ReleaseOut ¶
type ResultOut ¶
type ResultOut struct {
Handle string `json:"handle,omitempty"`
Answers []answers.Answer `json:"answers"`
Refusal *refusal.Info `json:"refusal,omitempty"`
// contains filtered or unexported fields
}
ResultOut is answers.Result plus the refusal.
type SourcesOut ¶
type StatusOut ¶
type StatusOut struct {
Consoles []clientcmd.StatusEntry `json:"consoles"`
}
Click to show internal directories.
Click to hide internal directories.