agent

package
v0.1.0-rc.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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

FS is the embedded agent/ content tree (guidance/, tools.yaml, templates/).

Functions

func Guidance

func Guidance(name string) ([]byte, error)

Guidance returns one embedded guidance file for the model (core.md, journey.md, first-use.md, data-contract.md).

func TemplateFS

func TemplateFS() (fs.FS, error)

TemplateFS returns the embedded templates/ subtree for first-run setup.

Types

type Catalog

type Catalog struct {
	Version int    `yaml:"version"`
	Tools   []Tool `yaml:"tools"`
}

Catalog is the parsed tools.yaml.

func ToolCatalog

func ToolCatalog() (Catalog, error)

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

func (t Tool) IsOpenWorld() bool

IsOpenWorld reports the MCP openWorldHint.

func (Tool) IsReadOnly

func (t Tool) IsReadOnly() bool

IsReadOnly reports the MCP readOnlyHint. Validation requires the field, so a missing value cannot silently become "read-only".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL