Documentation
¶
Overview ¶
Package agent embeds the single-source Raminga Agent content tree (agent/) into the binary. The MCP server (internal/mcp) builds its tool set from the embedded catalog and scripts/genplugins renders host shells from the same files, so tool descriptions cannot drift between hosts.
The tree is hand-written here and validated by scripts/genplugins --check; nothing under plugins/ is a source of truth.
Index ¶
Constants ¶
const ( // PermissionAuto tools run without a per-call confirmation prompt. They may // still write locally or reach remote peers; ReadOnly and OpenWorld carry // that distinction for MCP annotations. PermissionAuto = "auto" // PermissionConfirm tools would require a host confirmation prompt. The // current catalog has none: Raminga actions are allowed without per-call // confirmation, while the daemon enforces the agent-origin send guard. PermissionConfirm = "confirm" )
ToolPermission values.
Variables ¶
var FS embed.FS
FS is the embedded agent/ content tree (guidance/, tools.yaml, templates/).
Functions ¶
func Guidance ¶
Guidance returns one embedded guidance file for the model (core.md, journey.md, first-use.md, data-contract.md).
func TemplateFS ¶
TemplateFS returns the embedded templates/ subtree for first-run setup.
Types ¶
type Catalog ¶
Catalog is the parsed tools.yaml.
func ToolCatalog ¶
ToolCatalog parses the embedded tools.yaml. It is the only parser for the catalog; callers must not re-parse the raw file.
type Tool ¶
type Tool struct {
Name string `yaml:"name"`
Summary string `yaml:"summary"`
Description string `yaml:"description"`
Permission string `yaml:"permission"` // "auto" or "confirm"
ResultUntrusted bool `yaml:"result_untrusted"`
// ReadOnly and OpenWorld are MCP tool-annotation hints. They are separate
// from Permission: an auto-permitted tool can still write locally or reach
// the open network, and the annotation must say so truthfully.
ReadOnly *bool `yaml:"read_only"`
OpenWorld *bool `yaml:"open_world"`
Parameters map[string]any `yaml:"parameters"`
}
Tool is one entry of the tool catalog in tools.yaml. Parameters is the JSON-Schema-shaped input contract; it marshals to the MCP inputSchema and is the same object shell renderers print for the model.
func (Tool) IsOpenWorld ¶
IsOpenWorld reports the MCP openWorldHint.
func (Tool) IsReadOnly ¶
IsReadOnly reports the MCP readOnlyHint. Validation requires the field, so a missing value cannot silently become "read-only".