Files
picoclaw/pkg/evolution/paths.go
T
lxowalle b3a7b7ad64 feat: agent self evolution (#2847)
* feat: add agent self-evolution

* fix ci

* delete unused doc

* fix lint

* fix evolution review issues
2026-05-11 16:13:27 +08:00

36 lines
870 B
Go

package evolution
import (
"path/filepath"
"strings"
)
type Paths struct {
Workspace string
RootDir string
LearningRecords string
TaskRecords string
PatternRecords string
SkillDrafts string
ProfilesDir string
BackupsDir string
}
func NewPaths(workspace, override string) Paths {
root := strings.TrimSpace(override)
if root == "" {
root = filepath.Join(workspace, "state", "evolution")
}
return Paths{
Workspace: workspace,
RootDir: root,
LearningRecords: filepath.Join(root, "learning-records.jsonl"),
TaskRecords: filepath.Join(root, "task-records.jsonl"),
PatternRecords: filepath.Join(root, "pattern-records.jsonl"),
SkillDrafts: filepath.Join(root, "skill-drafts.json"),
ProfilesDir: filepath.Join(root, "profiles"),
BackupsDir: filepath.Join(root, "backups"),
}
}