Embedders that isolate the embedded agent's state from a docker-agent
installation (e.g. the Gordon assistant in Docker Sandboxes, which homes
everything under ~/.sbx/gordon) currently call the three per-directory
setters with hand-built subpaths. SetRoot owns that layout in one place.
Add SetCacheDir, SetConfigDir, and SetDataDir to the paths package,
allowing callers to override the default ~/.config/cagent and ~/.cagent
directories at runtime. The getters check for an override (protected by
a RWMutex) before falling back to the platform-specific defaults.
Two new persistent flags are wired in the root command:
--config-dir overrides ~/.config/cagent
--data-dir overrides ~/.cagent
These are applied in PersistentPreRunE before logging and telemetry
initialization so all downstream consumers honour the overrides. This
is useful when running cagent inside a sandbox where the home directory
is not writable or mapped to a non-standard location.
Assisted-By: cagent
Add support for remote skill sources via the well-known skills discovery
spec (https://github.com/cloudflare/agent-skills-discovery-rfc). The
skills config now accepts both the existing boolean form and a list of
sources:
skills: true # equivalent to ["local"]
skills:
- local
- https://example.com
Remote skills are fetched from /.well-known/skills/index.json, and all
files listed in the index are prefetched into a disk cache under the
XDG cache directory (~/.cache/cagent/skills/ on Linux). Cache-Control
headers are respected for expiry.
Instead of depending on read_file/fetch tools, skills now get their own
dedicated toolset (SkillsToolset) with two tools:
- read_skill: loads a skill's SKILL.md by name
- read_skill_file: loads supporting resources (references, scripts,
assets) by skill name and relative path
The agent never sees whether a skill is local or remote. The toolset
handles progressive disclosure per the spec: only name+description at
startup, SKILL.md on activation, supporting files on demand.
Other changes:
- Replace Skills *bool config field with SkillsConfig supporting both
bool and list-of-sources YAML/JSON formats
- Add paths.GetCacheDir() using os.UserCacheDir() for XDG compliance
- Remove skills system prompt injection from session.go (now handled
by the toolset's Instructable interface)
- Remove filesystem/read_file validation requirement for skills
- Validate skill sources (must be "local" or HTTP/HTTPS URL)
Assisted-By: cagent