profiles

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

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 Remove

func Remove(name string) (bool, error)

Remove deletes a profile by name, then saves. Returns false if not found.

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.

func Lookup

func Lookup(name string) (AgentProfile, bool, error)

Lookup finds a profile by name. Configuration read/parse failures remain distinct from an ordinary miss so callers do not misreport operational corruption as a 404.

Jump to

Keyboard shortcuts

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