Documentation
¶
Overview ¶
Package config loads and version-routes .mcpsmithy.yaml configs.
Each config schema version lives in its own sub-package (v1/, v2/, …) and satisfies the VersionSchema interface. The loader reads raw YAML, detects the "version" field, and delegates to the correct version.
Adding a new version:
- Create the vN/ sub-package satisfying VersionSchema
- Register it in the versions map in this file
Type aliases below re-export the latest version's types so that consumers can keep importing "internal/config" without change.
Index ¶
- Constants
- Variables
- type BuiltinFunc
- type Config
- type Convention
- type ConventionRelations
- type DocRef
- type GitSource
- type HTTPSource
- type LocalSource
- type ParamConstraints
- type ParamType
- type Project
- type ProjectSources
- type PullPolicy
- type ScrapeSource
- type TemplateString
- type Tool
- type ToolParam
- type VersionSchema
Constants ¶
const ( // ReservedContextKey is the single template context key owned by the // engine. User params with this name collide with the injected config namespace. // Canonical definition is in the schema package; this alias keeps the existing export path stable. ReservedContextKey = schema.ReservedContextKey // Constant aliases; re-export values so consumers never import v1 directly. // PullPolicy values control when external sources are fetched. PullPolicyAlways = v1.PullPolicyAlways PullPolicyIfNotPresent = v1.PullPolicyIfNotPresent PullPolicyNever = v1.PullPolicyNever // ParamType values for tool parameter types. ParamTypeString = v1.ParamTypeString ParamTypeNumber = v1.ParamTypeNumber ParamTypeBool = v1.ParamTypeBool ParamTypeArray = v1.ParamTypeArray ParamTypeProjectFilePath = v1.ParamTypeProjectFilePath // BuiltinFunc names; the template functions available inside tool templates. BuiltinFuncConventionsFor = v1.BuiltinFuncConventionsFor BuiltinFuncSearchFor = v1.BuiltinFuncSearchFor BuiltinFuncFileRead = v1.BuiltinFuncFileRead BuiltinFuncHTTPGet = v1.BuiltinFuncHTTPGet BuiltinFuncHTTPPost = v1.BuiltinFuncHTTPPost BuiltinFuncHTTPPut = v1.BuiltinFuncHTTPPut BuiltinFuncGrep = v1.BuiltinFuncGrep )
Variables ¶
var TypesSources = v1.TypesSources
TypesSources returns the raw Go source files for the latest version's types. Callers that only need the latest version can use this directly.
var Versions = map[string]VersionSchema{ v1.Version: v1.Schema{}, }
Versions is the single source of truth for which schema versions are accepted. Each entry satisfies VersionSchema.
Functions ¶
This section is empty.
Types ¶
type BuiltinFunc ¶
type BuiltinFunc = v1.BuiltinFunc
Type aliases; always point to the latest version.
type ConventionRelations ¶
type ConventionRelations = v1.ConventionRelations
Type aliases; always point to the latest version.
type LocalSource ¶
type LocalSource = v1.LocalSource
Type aliases; always point to the latest version.
type ParamConstraints ¶
type ParamConstraints = v1.ParamConstraints
Type aliases; always point to the latest version.
type ProjectSources ¶
type ProjectSources = v1.ProjectSources
Type aliases; always point to the latest version.
type ScrapeSource ¶
type ScrapeSource = v1.ScrapeSource
Type aliases; always point to the latest version.
type TemplateString ¶
type TemplateString = v1.TemplateString
Type aliases; always point to the latest version.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package schema provides tag-driven defaults and validation for config structs.
|
Package schema provides tag-driven defaults and validation for config structs. |
|
Package v1 defines the v1 config schema types for .mcpsmithy.yaml.
|
Package v1 defines the v1 config schema types for .mcpsmithy.yaml. |