add update_inner_state tool, life loop with tools, timeout protection

- update_inner_state: LLM can update its own persistent inner state
- inner_state injected into chat loop system prompt (read-only)
- Life Loop now uses run_openai_with_tools (full tool access)
- Life Loop LLM calls wrapped in 120s tokio::time::timeout
- All reqwest clients: 120s timeout (whisper: 60s)
- doc/life.md: life loop architecture design doc
- todo.md: removed completed items
This commit is contained in:
Fam Zheng
2026-04-09 21:06:43 +01:00
parent c3eb13dad3
commit 0b42f22f0f
7 changed files with 159 additions and 55 deletions

View File

@@ -248,7 +248,6 @@ impl AppState {
.unwrap_or_default()
}
#[allow(dead_code)] // used by life loop tools (coming soon)
pub async fn set_inner_state(&self, content: &str) {
let db = self.db.lock().await;
let _ = db.execute(