config: unify memory and agent config into single module

Both hippocampus/config.rs and agent/config.rs read from the same
config file (~/.config/poc-agent/config.json5). Having two separate
implementations was a footgun — load_context_groups() was duplicated
three times across the codebase.

Merged into src/config.rs:
- Config (memory settings, global get()/reload())
- AppConfig (agent backend/model settings, figment-based loading)
- SessionConfig (resolved agent session, renamed from agent's Config)
- Single ContextGroup/ContextSource definition used everywhere

Eliminated: duplicate load_context_groups(), duplicate ContextGroup
definition in identity.rs, duplicate config file path constants.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-03-25 01:23:12 -04:00
parent 2f3fbb3353
commit 228815d807
7 changed files with 393 additions and 467 deletions

View file

@ -19,7 +19,8 @@ macro_rules! dbglog {
// - tools/ — tool definitions and dispatch
// - ui_channel — streaming UI communication
// - runner — the interactive agent loop
// - cli, config, context, dmn, identity, log, observe, parsing, tui
// - cli, context, dmn, identity, log, observe, parsing, tui
// Config moved to crate::config (unified with memory config)
pub mod api;
pub mod types;
@ -29,7 +30,6 @@ pub mod journal;
pub mod runner;
pub mod cli;
pub mod config;
pub mod context;
pub mod dmn;
pub mod identity;