Documentation
¶
Overview ¶
Package profiles loads named agent profiles from ~/.rmote/agent-profiles.json. Profiles bundle agent type + model + effort so users can summon named specialists (e.g. "agent-manager" with opus, "dev" with sonnet) without reconfiguring each time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
func ConfigPath() string
ConfigPath returns the resolved path to agent-profiles.json. Defaults to ~/.rmote/agent-profiles.json, overridable via RMOTE_AGENT_DIR.
func Rename ¶
func Rename(oldName string, p AgentProfile) error
Rename replaces oldName with p in one locked load-modify-save transaction. It refuses to overwrite a different existing profile.
func Save ¶
func Save(profiles []AgentProfile) error
Save writes profiles to the config file atomically (temp + rename). Validates each profile (same rules as Load) before writing.
func Upsert ¶
func Upsert(p AgentProfile) error
Upsert adds or replaces a profile by name, then saves.
Types ¶
type AgentProfile ¶
type AgentProfile struct {
Name string `json:"name"` // kebab-case identifier (e.g. "agent-manager")
Agent string `json:"agent"` // catalog ID: "claude", "codex", etc.
Model string `json:"model,omitempty"` // model ID passed as --model (e.g. "claude-opus-5")
Effort string `json:"effort,omitempty"` // effort level passed as --effort (Claude only)
}
AgentProfile bundles the configuration for a named specialist agent.
func Load ¶
func Load() ([]AgentProfile, error)
Load reads and validates agent profiles from the config file. Returns an empty slice (not an error) when the file doesn't exist.