Documentation
¶
Overview ¶
Package mcpserver exposes the offload pipeline as MCP tools over stdio so Claude Code can delegate grunt work. Tools return the full Result JSON as text — a defer is a valid result (Claude then does the task itself), not an error.
Index ¶
Constants ¶
const FleetOwnerSuffix = "@fleet"
FleetOwnerSuffix marks a forwarded owner in registerAccelTools' owner map.
Variables ¶
This section is empty.
Functions ¶
func BuildForecastPayload ¶ added in v0.206.0
func BuildForecastPayload(a ForecastArgs) (string, error)
BuildForecastPayload turns the arguments into the canonical JSON object the forecast server takes. Exactly one of Series and SeriesPath names the data; explicit arguments win over keys of an object .json file.
func RunForecast ¶ added in v0.206.0
func RunForecast(ctx context.Context, cfg config.Config, runner forecastRunner, run forecastRunFunc, a ForecastArgs, door string) core.Result
RunForecast is the whole offload_forecast call: build the payload from the arguments, place the request by route (run nil is the production placement), spill a large answer to a file, and project select. A payload that cannot be built is a contract defer, never an error.
Types ¶
type ForecastArgs ¶ added in v0.206.0
type ForecastArgs struct {
Series json.RawMessage `json:"series"`
SeriesPath string `json:"series_path"`
TargetColumns []string `json:"target_columns"`
PastCovariateColumns []string `json:"past_covariate_columns"`
KnownCovariateColumns []string `json:"known_covariate_columns"`
PredictionLength int `json:"prediction_length"`
Quantiles []float64 `json:"quantiles"`
PastCovariates json.RawMessage `json:"past_covariates"`
KnownCovariates json.RawMessage `json:"known_covariates"`
OutPath string `json:"out_path"`
Route string `json:"route"`
Select []string `json:"select"`
}
ForecastArgs are the offload_forecast arguments, shared by the MCP door and the CLI verb.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) WithConfigError ¶ added in v0.206.0
WithConfigError records the config validation error this server is running under and returns the server, so the caller reads as one line. A nil error is the normal case and leaves every surface byte-identical: no config_error key, no gate installed, no behaviour changed.
func (*Server) WithConfigSource ¶ added in v0.206.0
WithConfigSource records the config file this server runs on, so a node added to its delegate_remotes joins the running session instead of waiting for a restart (internal/mediaremote: the ticket re-reads the file when its mtime changes). An empty path (built-in defaults) leaves the roster the server started with.