feat: storage.base_path configurable para aislar datos de runtime
Añade BasePath a StorageCfg y resolveDataBase() en runtime.go para centralizar la resolucion del directorio base de datos del agente. Prioridad: config storage.base_path > $AGENTS_DATA_DIR/<id> > agents/<id>/data Esto permite mover los datos de runtime fuera del arbol del proyecto, evitando que herramientas de desarrollo lean bases de datos, logs o crypto stores por accidente. Los paths de memory.db y knowledge.db ahora usan el base resuelto. Los configs existentes no se rompen (fallback al path original). Tareas 1.1 y 1.2 del issue 0019. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -413,9 +413,10 @@ type QueueCfg struct {
|
||||
// ── Storage ───────────────────────────────────────────────────────────────
|
||||
|
||||
type StorageCfg struct {
|
||||
State StateStorageCfg `yaml:"state"`
|
||||
Cache CacheStorageCfg `yaml:"cache"`
|
||||
History HistoryStorageCfg `yaml:"history"`
|
||||
BasePath string `yaml:"base_path"` // root for all data; default $AGENTS_DATA_DIR/<id> or agents/<id>/data
|
||||
State StateStorageCfg `yaml:"state"`
|
||||
Cache CacheStorageCfg `yaml:"cache"`
|
||||
History HistoryStorageCfg `yaml:"history"`
|
||||
}
|
||||
|
||||
type StateStorageCfg struct {
|
||||
|
||||
Reference in New Issue
Block a user