Documentation
¶
Overview ¶
Package mcp serves request files to AI agents over the Model Context Protocol (`sonde mcp`): sonde_list and sonde_check read them, and sonde_run, only when the server was started with --allow-run, runs one against the hosts of an allowlist. Every capability is granted on the command line at start; nothing a tool call sends widens it. Tools see only files under the root, and every secret is redacted from what they return.
Index ¶
Constants ¶
View Source
const ( DefaultRunTimeout = time.Minute MaxRunTimeout = 10 * time.Minute )
Run timeout bounds.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Root confines every file a tool reads; it must be absolute, with
// symbolic links resolved.
Root string
// AllowRun registers sonde_run; Hosts must then be set.
AllowRun bool
// Hosts are the hosts sonde_run may contact.
Hosts *netpolicy.Policy
// Env is the environment of --env, used when a call names none;
// EnvVar is SONDE_ENV. Both fall back to a sonde.yaml's defaults.env.
Env, EnvVar string
// Variables (--variable, SONDE_VARIABLE_*) and Secrets (--secret,
// SONDE_SECRET_*) apply to every run; the variables of a call win
// over Variables.
Variables map[string]any
Secrets map[string]string
// RunTimeout bounds each run (default DefaultRunTimeout).
RunTimeout time.Duration
// Version is the sonde version announced to clients.
Version string
// Log receives one audit line per tool call. Nil: discarded.
Log io.Writer
}
Config is what `sonde mcp` was started with.
Click to show internal directories.
Click to hide internal directories.