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:
80
home/scott/persona/inara/sessions/2026-03-18.md
Normal file
80
home/scott/persona/inara/sessions/2026-03-18.md
Normal file
@@ -0,0 +1,80 @@
|
||||
# Session Log — 2026-03-18
|
||||
|
||||
### [21:12] `nct_rmcggr4a`
|
||||
**Scott:** We have made a lot of updates today.
|
||||
|
||||
**Inara:** Good session — Cortex is clearly in a much better state than where it started. The connection testing phase is behind us and the system is running clean.
|
||||
|
||||
Want me to log today's work with `ae_log_work`, or do a quick distill of the session notes into `MEMORY_SHORT.md`? Good time to capture the "Cortex is live and stable" milestone before we close out.
|
||||
|
||||
### [21:14] `nct_rmcggr4a`
|
||||
**Scott:** For now you are not really doing any work. You will still see a lot of "test" messages.
|
||||
|
||||
What do you have in your short term memory?
|
||||
|
||||
**Inara:** From `MEMORY_SHORT.md`, here's the summary of recent sessions:
|
||||
|
||||
- **2026-03-13** — One entry, end of a productive week. No specific tasks logged.
|
||||
|
||||
- **2026-03-14** — Mostly connection/pipe testing via Nextcloud Talk (`nct_rmcggr4a`). Alphabet soup (ABC, XYZ, 321), a few "understood" responses, and then Cortex confirmed live. You noted it was "very cool" and confirmed the naming arc (Aether → Cortex → Inara) was working as intended.
|
||||
|
||||
- **2026-03-16** — More testing, multiple "understood" responses. Toward the end, Cortex was clearly stabilizing — you confirmed it worked, asked me about myself, and we had a real conversation about the system. The "Omg it worked!" moment is in there.
|
||||
|
||||
- **2026-03-17** — Two brief entries: "Another test" and "Testing after lots of changes to the UI."
|
||||
|
||||
So the short-term picture is: Cortex went from unstable/in-testing to confirmed-working over the past few days, with a lot of connection validation noise along the way. No major technical tasks were logged — just infrastructure bring-up and UI refinement.
|
||||
|
||||
### [21:15] `nct_rmcggr4a`
|
||||
**Scott:** I think you should have access to read this file:
|
||||
/home/scott/agents_sync/projects/Cortex_and_Inara_dev/README.md
|
||||
|
||||
**Inara:** Looks like I need explicit permission to access that path. The agents_sync directory isn't automatically in scope for file reads here — you'd need to either grant access or we could work around it by having you paste the relevant bits.
|
||||
|
||||
Alternatively, if you want me to have persistent read access to that path, we can add it to the allowed paths in settings. Want me to do that?
|
||||
|
||||
### [21:32] `nct_rmcggr4a`
|
||||
**Scott:** I made a change. Please try to read that README.md file again.
|
||||
|
||||
**Inara:** Got it — that worked cleanly. Good summary of what Cortex is:
|
||||
|
||||
- **FastAPI dispatcher** sitting in front of Claude CLI / Gemini CLI / Ollama (future)
|
||||
- **Inara's identity** lives in `inara/` — loaded at startup via `context_loader.py`
|
||||
- Web UI at `localhost:8000` (or `cortex.dgrzone.com` on WireGuard)
|
||||
- Systemd service (`sudo systemctl restart cortex`) rather than direct Docker management
|
||||
|
||||
The architecture diagram confirms what I know — I'm not tied to a specific model, just to the identity files. The backend can swap underneath me, which is a clean design.
|
||||
|
||||
Anything specific in here you wanted me to look at, or were you just verifying the read access was working?
|
||||
|
||||
### [22:57] `cedar-cave`
|
||||
**Scott:** Can you tell me what happened in the world news today?
|
||||
|
||||
**Inara:** Here's a quick snapshot of what's making news today (2026-03-18):
|
||||
|
||||
- **Iran:** An attack on the world's largest natural gas field was reported — Iranian media says no injuries. Separately, the UK charged two men with national security offenses linked to Iran.
|
||||
- **US/Iran tensions:** Reports (a few days old) of Trump allegedly discussing attacking Iran, with advisors denying it.
|
||||
- **Tech/geopolitics:** China signaling it doesn't want to merely catch up with the US in tech — it's aiming to lead.
|
||||
|
||||
For the full picture, BBC World, Reuters, and AP are solid right now. Anything specific you want to dig into?
|
||||
|
||||
### [23:19] `cobalt-ridge`
|
||||
**Scott:** Can you add 2 test items to your new task list.
|
||||
|
||||
**Inara:** Done. Two test items added to the task list:
|
||||
|
||||
- `t_jwsoMn5b` — Test Item 1
|
||||
- `t_ptw8nDec` — Test Item 2
|
||||
|
||||
Both are sitting in `[todo]` status. Want me to clean them up after, or leave them as a baseline sanity check?
|
||||
|
||||
### [23:21] `fern-marsh`
|
||||
**Scott:** Can you tell me what is on your task list?
|
||||
|
||||
**Inara:** Currently there are two items on the task list — both sitting in **todo**:
|
||||
|
||||
| ID | Task |
|
||||
|---|---|
|
||||
| `t_jwsoMn5b` | Test Item 1 |
|
||||
| `t_ptw8nDec` | Test Item 2 |
|
||||
|
||||
Looks like placeholder test entries. Want to clear those out and populate it with real work, or are these serving a purpose?
|
||||
Reference in New Issue
Block a user