feat: multi-user/multi-persona support with two-level home directory layout

Restructures persona storage from a flat personas/{name}/ layout to
home/{username}/persona/{name}/, mirroring Linux home directories.

Changes:
- persona.py: two ContextVars (user + persona), Linux-style name validation,
  set_context(), get_user(), get_persona(), validate(), list_users(),
  list_user_personas(); persona_path() takes (username, name)
- config.py: replaces personas_dir with home_dir + home_root()
- git mv personas/inara → home/scott/persona/inara (history preserved)
- home/holly/persona/tina/: Holly's persona stub added
- cron_runner.py: all storage functions take (username, persona) params
- tools/cron.py: stamps user + persona on jobs; APScheduler IDs are
  {user}:{persona}:{job_id} to prevent collisions across users
- memory_distiller.py: distill_short/mid/long take (username, persona);
  added missing Path + settings imports
- scheduler.py: _load_user_crons() iterates home/*/persona/* (two-level)
- routers/chat.py, orchestrator.py: user field added; set_context() called
- tests/conftest.py: home_root fixture with two-level structure;
  patches home_dir instead of personas_dir
- tests/test_persona.py: fully rewritten for two-level API
- tests/test_api_files.py: updated fixture name and path
- .env.default: documents HOME_DIR setting; scrubs stale API key
- CLAUDE.md, README.md: directory maps updated for new layout

All 80 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-03-20 22:35:40 -04:00
parent 92a8f5d894
commit 77e770cdb2
51 changed files with 463 additions and 208 deletions

View File

@@ -0,0 +1,44 @@
# Session Log — 2026-03-19
### [23:44] `cedar-cave`
**Scott:** Can you give me an update for the news today. Thursday
**Inara:** Big day, Scott. Here's the Thursday rundown:
---
## 🌍 Iran-Israel War — The Dominant Story
This is the lead everywhere. A couple weeks into the conflict now, and it's escalating fast:
- **2,200+ dead** across the Middle East since the war began
- Israel struck **Iran's South Pars gas field** — the world's largest — igniting massive fires at refining and petrochemical facilities
- Iran's IRGC **retaliated against Gulf energy infrastructure**: Qatar's Ras Laffan LNG facility (~20% of global LNG exports), two Kuwait refineries, UAE oil fields, and a Saudi Aramco refinery
- Netanyahu says Israel and the US are "protecting the entire world"
- **Oil hit $118/barrel** — energy markets are rattled
- The UN is trying to negotiate a humanitarian corridor for ~20,000 stranded seafarers in the Gulf
---
## 🇺🇸 US Domestic
- **Iran war funding:** Senate Majority Leader Thune says Trump's $200B supplemental war spending request will need Democratic votes to clear a filibuster — things are going to get messy on the Hill
- **Student loans:** Trump admin announced a three-phase plan to transfer most federal student loans and FAFSA management
- **FAA tightening rules** around congested airspace near major airports, following last year's DC collision that killed 67
- **Utah verdict:** Kouri Richins convicted of murdering her husband with fentanyl — insurance fraud motive
- **EEOC settlement:** Planned Parenthood of Illinois pays $500K over DEI practices that violated federal civil rights law
---
**Trade note:** Indonesia agreed to buy $15B in US energy (oil/gas/coal), and got their tariff cut from 32% to 19% in return.
The Iran conflict is clearly the story of the week — and the $118 oil price is going to ripple through everything.
---
Sources:
- [CNN Live Updates — Iran War](https://www.cnn.com/world/live-news/iran-war-us-israel-trump-03-19-26)
- [Al Jazeera — Iran War Updates](https://www.aljazeera.com/news/liveblog/2026/3/19/iran-war-live-qatar-saudi-energy-sites-attacked-riyadh-says-trust-gone)
- [CNN Politics — Trump Administration News](https://www.cnn.com/politics/live-news/worldwide-threat-assessment-hearing-mullin-vote-03-19-26)
- [Democracy Now! Headlines](https://www.democracynow.org/2026/3/19/headlines)
- [Just Security — Early Edition](https://www.justsecurity.org/134411/early-edition-march-19-2026/)