diff --git a/documentation/TODO__Agents.md b/documentation/TODO__Agents.md index 02ecc0c..24ea942 100644 --- a/documentation/TODO__Agents.md +++ b/documentation/TODO__Agents.md @@ -27,6 +27,54 @@ Gemini API orchestrator for private/offline tasks. ## 🟡 Medium Priority +### [UI] Progressive Web App (PWA) +Low effort, meaningful mobile UX improvement — install Cortex as a home screen app. +- [ ] Add `manifest.json` (name, icons, theme color, display: standalone, start_url) +- [ ] Serve `manifest.json` from `cortex/routers/ui.py` or as a static file +- [ ] Add `` to `index.html` +- [ ] Basic service worker for offline shell (cache static assets; network-first for API) +- [ ] Register service worker in `app.js` +- [ ] Test on iOS (Safari) and Android (Chrome) — both support PWA install prompts + +### [Channel] Proactive notifications +Inara reaches out on her own initiative via NC Talk or Google Chat when a reminder +fires, a cron job completes, or something else warrants attention. The cron/reminder +infrastructure already exists — this closes the loop so she can interrupt the user. +- [ ] Add outbound message helper for NC Talk (`send_nextcloud_message(user, text)`) +- [ ] Add outbound message helper for Google Chat (`send_google_chat_message(user, text)`) +- [ ] Wire cron job completion and reminder triggers to call outbound helper +- [ ] Store user preference: which channel to use for proactive notifications +- [ ] `channels.json` already per-user — add `notify_channel: "nextcloud" | "google_chat" | null` + +### [UI] File attachments in chat +Upload an image or document inline and have it flow into context. Natural workflow +("here's this PDF, summarize it"); local backend already supports multimodal via Open WebUI. +- [ ] Add attachment button to input area (paperclip icon, hidden file input) +- [ ] Client: encode file as base64 or multipart; send alongside message text +- [ ] Server: accept file in `POST /chat`; route to appropriate backend + - Claude: `content` array with `image` blocks (base64 or URL) + - Gemini: `parts` array with `inline_data` + - Local (Open WebUI): `content` array with image_url items +- [ ] UI: show thumbnail/filename above the sent message + +### [Models] Edit existing model entries +Currently models can only be removed and re-added. Add an edit flow so fields +(display name, model ID, context size, tags, notes) can be updated in-place. +- [ ] Add "Edit" button next to each model row in `local_llm.html` (alongside Remove) +- [ ] Populate the Add Model form with the model's current values when edit is clicked +- [ ] On save, `PATCH` or delete+recreate via `user_settings.py` +- [ ] Applies to both local and (future) cloud model entries + +### [Auth] Encrypted sessions +Allow users to opt-in to per-session encryption so session logs on disk cannot be +read without the user's key. +- [ ] Design key derivation: password-based (PBKDF2/Argon2) or separate passphrase +- [ ] Encrypt `session_logger.py` output before writing to `sessions/*.md` +- [ ] Decrypt on read in `session_store.py` (history reload, file browser) +- [ ] UI toggle in Settings to enable/disable encrypted sessions per persona +- [ ] Decide: encrypt at rest only, or also in-memory session store? +- [ ] Consider: how distillation and session search interact with encrypted files + ### [Models] Model Registry V2 — Unified Provider System See `DESIGN__Model_Registry_V2.md` for full design. - [x] **Phase 1** — V2 schema with providers (Anthropic/Google), multi-account Gemini, auto migration, orchestrator uses account API key — 2026-04-27 @@ -67,6 +115,21 @@ See `ARCH__Intelligence_Layer.md` for full design. ## 🟢 Lower Priority / Future +### [Sessions] Cross-session search +The file browser has per-file session search, but no way to query across all sessions +for a persona. A unified search would make the session archive useful as a knowledge source. +- [ ] `POST /sessions/search?q=...` — walks `home/{user}/persona/{name}/sessions/*.md`, returns matching excerpts with date + line context +- [ ] UI: search input in file browser sidebar already present — wire to new endpoint +- [ ] Consider: index on startup vs. live grep (live grep is fine at typical session volume) + +### [Backend] API usage / cost tracking +Multi-user setup with real Gemini/Claude API costs. Track per-user token consumption +so Scott can see who's spending what. +- [ ] Count input + output tokens per `/chat` and `/orchestrate` call (all backends return usage) +- [ ] Append to `home/{user}/usage.json` — daily buckets, per-model breakdown +- [ ] Expose via `/api/usage` endpoint; add a summary row to the Settings page +- [ ] Optional: soft spending limit with a warning toast when exceeded + ### [Intelligence] Dev agent pipeline See `ARCH__Intelligence_Layer.md`. Full design not yet started. - [ ] Specialist agent: frontend (SvelteKit) code changes