Adds `anthropic_api` model type so users can authenticate with a direct
Anthropic API key instead of (or alongside) the CLI OAuth session.
- model_registry.py: `anthropic_api` type; `save/get/remove_anthropic_api_key()`
mirroring the Google account pattern; `save_cloud_model()` now picks type
based on credential type (cli → claude_cli, api_key → anthropic_api);
`_resolve_model()` merges api_key from the credential entry
- llm_client.py: `_anthropic_api()` backend (AsyncAnthropic SDK); dispatch
and fallback wiring; usage tracking
- routers/local_llm.py: Anthropic API key management routes
(POST /settings/local/anthropic-key, /anthropic-key/{id}/remove);
`anthropic_api` badge and edit-form credential selector
- static/local_llm.html: Anthropic Cloud Provider block now shows API key
management (add/remove); Add Model → Anthropic tab has credential selector
(CLI vs API key)
- requirements.txt: enable anthropic>=0.40.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 KiB
Cortex / Inara — Agent Task List
Read this file before starting any work on this project. Status: Active development — ongoing.
🔴 High Priority
[UX] User onboarding — guided model setup
New users complete password + persona setup and land directly in the chat with no working AI model configured. This closes that gap with a guided Step 3 and a fallback for existing users who skipped it or were onboarded before this existed.
Design spec: documentation/ARCH__SYSTEM.md § Onboarding Flow
- Setup Step 3 page — new
/setup/modelGET/POST inonboarding.py— 2026-05-06- Recommends OpenRouter: "one API key, access to Claude, Gemini, and dozens of other models"
- API key field + curated model dropdown (claude-3-5-haiku, claude-3-7-sonnet, gemini-2.0-flash, llama-3.3-70b)
- On submit:
save_host()(OpenRouter) +save_model()+set_role(chat, primary, model_id)inmodel_registry.py - Skip:
POST /setup/model/skipreadscx_setup_personacookie, redirects to chat; JS fetch on skip-link click - Step labels updated: setup.html "1 of 3" / "2 of 3" / "3 of 3" (was "1 of 2" / "2 of 2")
- Standalone:
/setup/modelworks without step labels (nocx_setup_personacookie → no label) - Persona creation now redirects to
/setup/modelinstead of directly to chat
- Existing user banner — displayed in chat if no role has a model assigned — 2026-05-06
- Checks
GET /backendon load (usesavailable_roles— already does role-resolution) - Dismissable amber callout strip above chat: "No AI model configured — Set up OpenRouter →"
- Dismissed via
localStoragekeycx_no_model_banner_dismissed; auto-removed when a model is added
- Checks
- Settings quick-link — amber card in settings Model Registry section — 2026-05-06
- Checks
GET /backendon page load; shown ifavailable_rolesis empty - Links to
/setup/model
- Checks
- Update
cortex/static/HELP.md— Getting Started section + model registry quick-connect note — 2026-05-06 - Update
CLAUDE.md— documented/setup/modelendpoint, setup flow description, docs philosophy — 2026-05-06
[Local] Local orchestrator — reach full parity with Gemini orchestrator
openai_orchestrator.py is partially built and wired into POST /orchestrate.
When the orchestrator role resolves to a local_openai model it routes there
automatically. Remaining work is quality/reliability parity, not ground-up design.
- Tool schema conversion — Gemini FunctionDeclaration → OpenAI tools format
- Context budget:
_context_budget()usescontext_k * 1000 * 0.75, min 16k — 2026-05-06 - Context compaction:
_compact_messages()trims old tool results before each round and before the confirmation-gate call — 2026-05-06 - Error handling: malformed tool args caught + logged; tool execution errors returned as strings
- Retry logic on transient API errors (connection timeout, 429, 503) — 2026-05-09
_chat_with_retry()helper inopenai_orchestrator.py; 3 attempts, exponential backoff (1s, 2s)- Retries on
APIConnectionErrorandAPIStatusErrorwith status 429/500/502/503/504
- Test end-to-end with Gemma 4 E4B and 26B A4B on scott_gaming
- Review
ARCH__FUTURE.mdagent architecture ideas before finalising design - Reference:
docs/OPEN_WEBUI_API.md,documentation/ARCH__FUTURE.md§1
🟡 Medium Priority
[UI] Progressive Web App (PWA) ✅ — 2026-04-29
- manifest.json, sw.js, icon-192/512.png, SW registration in app.js
/manifest.jsonand/sw.jsserved at root; added to_PUBLICin auth_middleware- Tested: install prompt confirmed working in Chromium
[Tools] Orchestrator tool expansions — Round 1 ✅
cortex_restart— detached subprocess, 5s delay, admin-only, confirm-required — 2026-04-29cortex_logs—journalctl --user -u cortex -n N, admin-only — 2026-04-29http_fetch— direct URL fetch via httpx, 8192 char cap — 2026-04-29file_list— directory listing with size, dirs first, 200 entry cap, admin-only — 2026-04-29file_write— overwrite/append to home_root paths, admin-only, confirm-required — 2026-04-29nc_talk_send— outbound NC Talk message via notification.py, admin-only — 2026-04-29email_send— SMTP via email_utils, per-user regex allowlist inhome/{user}/email_allowlist.json, managed via Settings UI textarea + Files panel raw editor — 2026-04-29web_push— VAPID push via pywebpush; subscriptions inhome/{user}/push_subscriptions.json; "Enable notifications" toggle in ☰ menu; sw.js push+notificationclick handlers — 2026-05-05
[Tools] Orchestrator tool expansions — Round 2
Next additions identified 2026-05-08. See ARCH__FUTURE.md §2 for design notes.
Note: datetime_now is NOT needed — current date/time is already injected into every
system prompt by context_loader.py at all tiers.
session_search— expose existing session search to the orchestrator — 2026-05-08- Wraps session log grep as a tool callable in
tools/files.py - Params:
query: str,limit: int = 5(max 20) - Returns: excerpts with session date, newest first; own sessions only via ContextVars
- User-level (no TOOL_ROLES entry needed)
- Wraps session log grep as a tool callable in
remindersdue-date support — make reminders time-aware — 2026-05-08- Optional
due: YYYY-MM-DDonreminders_add; stored asdue: datefirst line of body context_loader.pycallsload_due_reminders()— future-dated sections suppressed until duereminders_listshows[OVERDUE],[due TODAY], or[due: YYYY-MM-DD]per entry- Backward compatible — existing undated reminders always surface as before
- Optional
spawn_agent— spawn a synchronous sub-agent using any role's model + tools — 2026-05-08cortex/tools/agents.py—spawn_agent(task, role, tier, timeout, max_rounds)- Per-host asyncio semaphore keyed by
host_id(or model type for cloud);max_concurrentfield in host schema - Supports
local_openaiandgemini_apimodel types; returns error string for others - Admin-only tool (powerful — can spawn arbitrarily long sub-tasks)
- Host UI: "Max parallel" number input in host edit/add forms
spawn_agentper-call tool restrictions —allow_toolsanddeny_toolsparams — 2026-05-12allow_tools: list[str]— intersected with role ceiling; cannot grant beyond role configdeny_tools: list[str]— blocked even when role permits; falls back toconfirm_denygate whentool_listis None- Both params documented in FunctionDeclaration for orchestrator use
file_diff— unified diff between two project-scoped files — 2026-05-12cortex/tools/files.py—diff -u, 50 KB output cap, project-scoped path resolution
git_status/git_log/git_diff— read-only git inspection — 2026-05-12cortex/tools/git.py— new module; all project-scoped, low riskgit_log(n, path, oneline)— last N commits with optional path filtergit_diff(ref_a, ref_b, path, stat_only)— any ref range; no args = unstaged vs HEAD
http_post— POST to external URLs — 2026-05-09- Params:
url: str,body: str,headers: dict | None,max_chars: int - Per-user URL prefix allowlist in
home/{user}/http_allowlist.json(JSON array of prefixes) - Default: blocked if no allowlist or URL doesn't match any prefix
- Admin-only, confirm-required
- Params:
nc_talk_history— read recent Talk messages — 2026-05-09- Params:
conversation_token: str(optional, defaults to notification_room),limit: int = 20 - Returns last N messages with sender + timestamp, chronological order
- Admin-only; requires
nc_usernameandnc_app_passwordin channels.json undernextcloud
- Params:
task_listpriority filter — addpriorityparam alongside existingstatus— 2026-05-12http_fetchmax_chars — optional param, default 8192, cap at 32768 — 2026-05-09web_read(url, max_chars=16000)— clean article extraction via trafilatura; strips ads/nav/boilerplate, returns markdown — 2026-05-09session_read(date)— read a full session log by YYYY-MM-DD date; lists available dates if not found — 2026-05-09
[Channel] Proactive notifications ✅ — 2026-05-08
Inara reaches out on her own initiative via NC Talk, Google Chat, email, or browser push.
notification.py—notify(username, message, channel=None)routes to NCT / email / Google Chat / web_pushweb_pushadded as a routable channel innotification.py(was tool-only before)scheduler.py—_run_reminder_check()daily at 09:00: reads due reminders per persona, firesnotify()with a summarycron_runner.py— already callsnotify()on job completion (was already wired)scheduler.py— distill_mid and distill_long already callnotify()on completion- Settings UI — "Browser Push Notification" option added to Notification Channel selector
notification_channelaccepts"web_push"inrouters/settings.pyGET /settings/notifications— dedicated Notifications page (channel form + test buttons); Settings page now shows a link cardPOST /api/push/test+POST /api/push/reminders/check— on-demand test endpointspush_utils.py— fixedpywebpush2.x key deserialisation (useVapid.from_pem()instead of passing PEM string)
[Channel] Home Assistant integration — design & tools
Inara can already receive HA events via POST /webhook/ha/{username}/{webhook_id} and
respond via web push. Next steps are deciding what events to send and giving Inara the
ability to act on HA via the REST API.
- Event design — decide which HA events are worth routing to Inara (security,
climate thresholds, low battery, unexpected device state). Avoid flooding with
high-frequency sensor polling. Per-automation
"tools": true/falseto choose notify-only vs. agentic response. - Richer payload template — update
rest_commandin HA to includetrigger.to_state.attributes,area_name, andprevious_stateso Inara gets full device context automatically. - HA API tools —
cortex/tools/homeassistant.py— 2026-05-12 -ha_get_state(entity_id)— current state + attributes of any entity -ha_call_service(domain, service, data)— turn on lights, set HVAC, lock doors, etc. -ha_get_states(area=None, domain=None)— list states with optional filter - Auth via Long-Lived Access Token stored inchannels.jsonunderhomeassistant.token- HA URL fromchannels.jsonunderhomeassistant.url - Store HA config in channels.json —
url,token,webhook_idfields underhomeassistant; managed via/settings/notifications— 2026-05-12 ha_call_serviceconfirm-required — 2026-05-12
[UX] Session delete confirmation
- Inline "Delete this session? [Delete] [Cancel]" reveal on
×click inapp.js— 2026-05-12 - Message-level delete: "confirm delete / cancel" inline in the actions bar — 2026-05-12
[UI] File attachments in chat ✅ — 2026-05-12
Upload an image or document inline and have it flow into context.
- Attachment button (paperclip) in input area; hidden file input
- Images sent as base64 inline_data (Gemini API) or image blocks (Claude/local)
- Text/code files read as UTF-8, injected as fenced code block in message
- Thumbnail/filename shown above sent message in UI
[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.pyoutput before writing tosessions/*.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.
- Phase 1 — V2 schema with providers (Anthropic/Google), multi-account Gemini, auto migration, orchestrator uses account API key — 2026-04-27
- Phase 2 — Cloud provider UI: Anthropic + Google sections in
/settings/models, account management, model entry creation for cloud models — 2026-04-27 - Phase 3 — Unified roles + toggle redesign: chat toggle cycles chat-role slot models (Primary/Backup 1/Backup 2) by label; slot sent in chat/orchestrate payload — 2026-05-12
- Phase 4 — Polish: Claude API key, OpenRouter as named provider, catalog sync from API
[Intelligence] Knowledge consolidation — Phase 1
See ARCH__Intelligence_Layer.md for full design.
- Tool:
ae_journal_list— list all journals for the account — 2026-04-28 - Tool:
ae_journal_search— search before creating to avoid duplicates - Tool:
ae_journal_entry_create— write a new entry with source metadata - Tool:
ae_journal_entry_update— PATCH any fields on an existing entry — 2026-04-28 - Tool:
ae_journal_entry_disable— soft-delete via enable=false — 2026-04-28 - Tool:
ae_journal_entry_append— read→append timestamped section→write (running logs) — 2026-04-28 - Tool:
ae_journal_entry_prepend— read→prepend timestamped section→write (newest-first logs) — 2026-04-28 - Import script: walk a markdown directory, chunk by H2 section, create entries — 2026-05-05
- Target: markdown files from
~/DgrZone_Nextcloud/and~/OSIT_Nextcloud/— 2026-05-05 - Tag strategy: source path, topic tags from path components — 2026-05-05
🟢 Lower Priority / Future
[Research] Agent architecture patterns — review before building dev agent pipeline
The Claude Code system prompt was leaked April 2026. Two reimplementation repos have useful design ideas directly applicable to the local orchestrator and dev agent work. Read before finalising either design.
- Review https://github.com/HarnessLab/claw-code-agent (Python, targets local models)
- Review https://github.com/ultraworkers/claw-code (community port, interesting source)
- Key ideas to evaluate for Cortex:
- Tiered permission model (read-only / write / shell / unsafe) — relevant once dev agent is writing and executing code
- Agent lineage tracking — which agent spawned which sub-agent; essential for the orchestrator → specialist → supervisor chain
- Hard token/cost budgets per operation — local models have fixed context ceilings
- Context compaction mid-session — trim stale tool results before hitting limit
- Nested agent delegation with dependency-aware batching
- Plugin/manifest-based tool registration — worth considering before tool suite grows
[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 — local backend (OpenAI
usagefield) + Gemini API (usage_metadata) — 2026-05-05 - Append to
home/{user}/usage.json— daily buckets, per-model breakdown — 2026-05-05 - Expose via
/api/usage+/api/usage/summary+/api/usage/all(admin); usage table in Settings — 2026-05-06 - Optional: soft spending limit with a warning toast when exceeded
[Security] Tool call audit log — 2026-05-05
Every orchestrator tool invocation logged to home/{user}/tool_audit/YYYY-MM-DD.jsonl.
tool_audit.py— JSONL writer with asyncio locks; ContextVars for engine/model set by each orchestrator at run start- Hook in
call_tool()— fire-and-forgetasyncio.create_task; captures status ok/error/denied, 300-char result snippet, args (truncated at 500 chars) GET /api/audit/files— lists available dates for current user (self-service)GET /api/audit/day?date=— returns entries for one date (self-service)GET /api/audit/recent+/stats— cross-user aggregation (admin only)- "Audit Log" group in Files panel sidebar (collapsed by default) — read-only table with time/tool/status/model/args/result columns; colour-coded status
[Intelligence] Dev agent pipeline
See ARCH__Intelligence_Layer.md. Full design not yet started.
- Specialist agent: frontend (SvelteKit) code changes
- Specialist agent: backend (FastAPI) code changes
- Supervisor agent: diff review, syntax check, test runner
- Gitea webhook integration: trigger on push/PR, report back
- Human approval gate before commit
[Intelligence] Supervisor agent
- Runs
py_compile,svelte-check, unit tests after specialist agent work - Reports pass/fail back to orchestrator
- Only commits on explicit approval
[Channel] Gitea webhooks
- Receive push/PR/issue events → route to appropriate agent
cortex/routers/already has pattern; addgitea.py- Gitea Actions (CI) for "run tests on push" — simpler than custom runner
[Local] RAG via Open WebUI
Open WebUI has a full RAG pipeline (file upload → embed → knowledge collections →
reference in chat). Could feed Nextcloud docs or session logs into a local knowledge
base accessible to local models. Endpoints documented in docs/OPEN_WEBUI_API.md.
/api/v1/files/upload +/api/v1/retrieval/process/webfor URLs- Reference in chat via
"files": [{"type": "collection", "id": "..."}]
[Backend] Intelligent model routing — automatic task-type dispatch
Model Registry V2 (2026-04-27) added role-based routing and manual role toggle — that's the foundation. What remains is removing the need to toggle manually.
- Classify incoming messages by task type (heuristic or lightweight classifier)
- Map task type → role → model automatically:
- User conversation →
chatrole → Claude (quality prose, persona fidelity) - Tool/research tasks →
orchestratorrole → Gemini API or local - Private/sensitive →
localrole → Ollama (no data leaves network) - Long context (>50k tokens) → Gemini 2.0 (1M ctx window)
- Fast/cheap queries → local E4B (25 t/s, no API cost)
- User conversation →
- Routing logic in
llm_client.pyor newrouter.py; expose override in UI
[Future] Cortex Mesh — multi-instance fleet coordination
Each fleet device runs its own Cortex instance. Instances delegate tasks to each other based on resources and specialisation. No central coordinator required.
- Concept only — no design yet. Resolve these questions before building:
- Auth between instances (shared JWT secret vs. per-instance API keys)
- Capability advertisement (model registry over HTTP? shared Syncthing file?)
- Whether
ae_send_message/ the inbox system is the right coordination layer - Session continuity — does a conversation stay on one node or migrate?
- Natural foundation already in place: Syncthing-synced
home/and sharedmodel_registry.jsonmean instances share persona memory without a central DB
✅ Completed
[Tools] email_send tool + per-user email allowlist — 2026-04-29
email_send(to, subject, body)incortex/tools/notify.py— SMTP viaemail_utils.py- Per-user regex allowlist at
home/{user}/email_allowlist.json(JSON array of patterns) re.fullmatch(..., re.IGNORECASE)— supports wildcards like.*@oneskyit\\.com- Blocked by default (no allowlist = no sends); non-matching addresses silently blocked
- Registered as admin-only tool in
TOOL_ROLES - Settings UI:
POST /settings/email-allowlist— textarea in Account Settings, one pattern per line - Files panel:
email_allowlist.jsonadded toUSER_FILESinfiles.py; served fromhome/{user}/; appears in new "Settings" group in sidebar
[Models] Edit existing model entries — 2026-04-29
- Inline edit form per model row in
local_llm.html(.model-row-header+ hidden.model-edit-form) - "Edit" toggle shows pre-populated form; "Cancel" collapses it
- "Fetch models" button in edit form — same live-fetch flow as Add Model
POST /settings/local/models/{model_id}/editroute inlocal_llm.pydispatches tosave_model/save_cloud_model(upsert viamodel_id)- Works for both
local_openaiand cloud model types
[Sessions] Cross-session search — 2026-04-29
GET /sessions/search?q=&user=&persona=&limit=infiles.py— full-text grep acrosssessions/*.md, newest first- Returns up to
limitmatches with 120-char excerpt and date;total_files_searchedcount - UI: search input + results panel below Files sidebar;
Ctrl+F/ search icon shortcut;marked.parsehighlights matches
[Tools] Role-based access control + confirmation gate — 2026-04-29
TOOL_ROLESdict maps tool names to minimum required role (admin/user)CONFIRM_REQUIREDset blocks destructive tools; orchestrator injects confirmation prompt insteadget_tools_for_role(role)filters both Gemini declarations and callablesget_user_role(username)added toauth_utils.py; passed through both orchestratorsmanage_passwords.py role <username> admin|user— shell-only admin promotion- Admin-only tools:
shell_exec,claude_allow_dir,cortex_restart,cortex_logs,file_read,file_list,file_write,ae_task_list,nc_talk_send - Confirm-required tools:
cortex_restart,file_write,shell_exec,cron_remove,reminders_clear
[UI] Admin role badge in Account settings — 2026-04-29
GET /settingsnow injectsuser_rolefromauth.jsoninto settings page- Role shown as a styled pill badge (purple ADMIN, muted USER) below username field
[Local] Unsloth Gemma 4 variants — resolved 2026-04-29
- Ollama update resolved the
500: unable to load modelissue - Unsloth Dynamic 2.0 Q4_K_M GGUFs loading correctly
[Distill] Distill quality review — resolved 2026-04-29
- Short/mid/long output reviewed and quality confirmed acceptable
- No prompt tuning needed at this time
[UI] Progressive Web App (PWA) — 2026-04-29
manifest.json,sw.js, PNG icons (192/512) generated via rsvg-convert/manifest.jsonand/sw.jsserved at root via ui.py; exempted in auth_middleware- Theme-color meta tag updated dynamically on light/dark toggle
- Install prompt confirmed working in Chromium desktop; apple-touch-icon for iOS
[UI] CodeMirror markdown editor for identity/memory files — 2026-04-28
- Replaced textarea in Files panel with CodeMirror 5 (markdown mode, CDN)
- Syntax highlighting, line wrapping, Ctrl+S to save, per-file undo history
[UI] Input area polish — 2026-04-28
- Single cycling S/M/L button replaces 3 separate height buttons (same UX as font size)
- S size collapses mode-select to a row (compact); M/L keep vertical column layout
- Input height minimum derived from setting so empty textarea reflects selected size
- Context & Memory panel and Settings dropdown are mutually exclusive (closeAllPanels fix)
- Both panels now use consistent shadow (var(--shadow)) and z-index (200)
[Tools] Tools toggle — decoupled from Role/Backend — 2026-04-28
- Removed "Agent" mode from the mode selector; replaced with independent ⚡ toggle
toolsEnabledpersists in localStorage; routes to orchestrator regardless of active mode- Layout: column (M/L) or row (S) driven by
data-sizeattribute set by JS - chat_role flows from UI → OrchestrateRequest → orchestrator_engine.run(response_role=...)
[Tools] shell_exec tool — 2026-04-28
shell_exec(command, working_dir, timeout)incortex/tools/system.py- Runs any shell command on the Cortex host; timeout clamped 1–120s
- Use for system diagnostics:
df -h,ps aux,journalctl,free -h, etc.
[Tools] Aether Journals full toolkit — 2026-04-28
ae_journal_list— list all journals + ids for the accountae_journal_entry_update— PATCH any fields (title, content, summary, tags, enable)ae_journal_entry_disable— soft-delete via enable=falseae_journal_entry_append— read→append timestamped section→write (running/data logs)ae_journal_entry_prepend— read→prepend timestamped section→write (newest-first)- Shared
_get_entry/_patch_entryhelpers; OpenAI JSON Schema auto-derived from Gemini declarations
[Local] Per-user multi-model local LLM settings — 2026-04-01
home/{username}/local_llm.json—hosts[]+models[]+active_model_idstructurecortex/user_settings.py— CRUD functions: save_host, add_model, remove_model, set_active_model, get_active_local_modelcortex/routers/local_llm.py+cortex/static/local_llm.html— dedicated/settings/localpage- "Fetch models from host" button — proxied via
/api/local-llm/fetch-models, populates dropdown - Active model shown in UI near backend toggle button (amber hint text)
- Migrates old flat
.env-style config automatically on first use
[UI] Copy button for user (sent) messages — 2026-04-01
- Added matching copy-on-hover button to user messages (same pattern as assistant messages)
div.dataset.rawset on send;makeCopyBtn(div)appended inline
[Backend] Local model backend (Open WebUI / Ollama) — 2026-04-01
- OpenAI-compatible API via
httpx— no CLI wrapper needed - Configured via
LOCAL_API_URL/LOCAL_API_KEY/LOCAL_MODELin.env - Backend toggle cycles
claude → gemini → local(amber color in UI) /auth/statusincludes local reachability check (GET /api/models)- Tested end-to-end:
test-agent-simple(Qwen3-8B) onscott-lt-i7-rtx:3000, full persona context flowing correctly
[Testing] Gitea SSH port 2222 — 2026-03-29
- pfSense WAN → 192.168.32.7:2222 port forward confirmed working
ssh -p 2222 git@git.dgrzone.comreaches Gitea (returns "Invalid repository path" — expected, confirms connectivity)- Clone/push via SSH:
git clone ssh://git@git.dgrzone.com:2222/<user>/<repo>.git
[Multi-user] Brian onboarding — 2026-03-29
- Invite sent to
memedrift@gmail.com - Brian completed onboarding, created
wintermutepersona - Google OAuth registered (
google-add brian memedrift@gmail.com)
[Tools] Reminders tools — 2026-03-29
reminders_add,reminders_list,reminders_clearadded to orchestrator tool suite- Tools live in
cortex/tools/reminders.py - All persona PROTOCOLS.md updated with Tools & Modes reference (direct chat vs Agent mode)
persona_template.pyupdated so new personas get the protocol automatically
[Auth] Token expiry — no restart needed — 2026-03-27
llm_client._fresh_claude_token()reads live from~/.claude/.credentials.jsonon every call- systemd service is a user unit (no sudo) —
systemctl --user restart cortexis sufficient - No manual token sync required after
claude auth login
[Multi-user] Per-user channel config — 2026-03-27
- Google Chat and NC Talk secrets/config moved from
.envtohome/{username}/channels.json - New endpoints:
POST /channels/google-chat/{username}andPOST /webhook/nextcloud/{username} - No channel access by default — each user configures their own
channels.json - Setup guides:
docs/GOOGLE_CHAT_BOT.mdanddocs/NEXTCLOUD_TALK_BOT.md
[Auth] Google OAuth sign-in — 2026-03-27
GET /auth/google→ Google consent →GET /auth/google/callbackflow- Users pre-registered via
manage_passwords.py google-add <user> <email> - Google sign-in button on
/login; auth.json storesgoogle_sub+google_email - Active users: scott (scott.idem@oneskyit.com), holly (holly.danner@gmail.com), brian (memedrift@gmail.com)
[Settings] Per-user Gemini API key — 2026-03-27
- Stored in
home/{username}/auth.jsonasgemini_api_key - Orchestrator uses user key if set, falls back to server-level
GEMINI_API_KEY - Manageable via
/settingsUI (add, remove, masked hint)
[UI] Session persistence across navigation — 2026-03-26
- localStorage keyed to
cx_sid_{user}_{persona}with 30-min inactivity TTL - Auto-restored silently on page load; cleared on "New session" or session delete
[UI] Persona picker page — 2026-03-26
GET /{username}shows a card grid of available personas instead of 404- Each card links directly to
/{username}/{persona}
[UI] Lucide icons — 2026-03-25
- Icons throughout: mode selector, send/stop buttons, edit/del/copy, save/cancel
- Loaded via UMD CDN;
icon_html()+render_icons()helpers inapp.js
[UI] Persona-specific favicon — 2026-03-25
- Emoji SVG favicon generated from persona config at load time
[Multi-user] Holly onboarding — 2026-03-20
- Holly's invite sent; onboarding completed via
/setup/{token} home/holly/persona/tina/created from template- Google OAuth registered (
holly.danner@gmail.com)
[Channel] Nextcloud Talk integration ✅ — 2026-03-20, updated 2026-03-27
- HMAC verification: incoming uses
random + raw_body; outgoing reply usesrandom + message_text - Per-user routing added 2026-03-27 (endpoint:
/webhook/nextcloud/{username}) - Docs:
docs/NEXTCLOUD_TALK_BOT.md
[Channel] Google Chat integration ✅ — 2026-03-20, updated 2026-03-27
- JWT verification via
authorizationEventObject.systemIdToken - Workspace Add-on format:
hostAppDataAction.chatDataAction.createMessageAction - Per-user routing added 2026-03-27 (endpoint:
/channels/google-chat/{username}) - Docs:
docs/GOOGLE_CHAT_BOT.md
[Intelligence] Orchestrator service — Phase 1 — 2026-03-18
- Gemini API (google-genai SDK) tool loop → Claude final response
POST /orchestrate(async job),GET /orchestrate/{job_id}(poll)- Tools: web search, AE API, file read, task list, scratch, reminders, cron
- Default model:
gemini-2.5-flash
[Auth] Session auth + persona onboarding — 2026-03-20
- bcrypt passwords in
home/{username}/auth.json - JWT session cookies (HS256, 30-day expiry)
- Invite tokens (72h, one-time-use) —
manage_passwords.py invite <user> [email] - Self-service onboarding:
/setup/{token}→/setup/persona - SMTP invite email via
noreply@oneskyit.com
[UI] Mobile-friendly header — 2026-03
- Backend toggle, font size, theme buttons moved into ⚙ settings panel
- Header reduced to core buttons
[UI] Help & Reference — 2026-03-27
- Shared base at
cortex/static/HELP.md(served to all users) - Persona-specific additions appended from
home/{username}/persona/{name}/HELP.mdif present - Collapsible H2 sections via
<details>elements
[Backend] Gemini CLI backend — 2026-03
gemini -psubprocess, streaming output; auth check at/auth/status
[Backend] Memory distiller — 2026-03
- APScheduler:
distill_short(daily 03:00),distill_mid(weekly Sun 03:30),distill_long(monthly 1st 04:00) - Writes to
MEMORY_SHORT.md,MEMORY_MID.md,MEMORY_LONG.mdper persona
[Backend] Session logging + file browser — 2026-03
- Sessions saved to
home/{user}/persona/{name}/sessions/ - Files panel in UI browses persona directory
[Backend] Dispatcher core — 2026-03-04
- FastAPI service with streaming SSE response
- Claude CLI and Gemini CLI subprocess backends
- Session context management (rolling window,
MAX_HISTORY_MESSAGES)
[Tools] Orchestrator tool expansions — Round 3
spawn_agenttool restrictions —allow_toolsanddeny_toolsper-call params — 2026-05-12- Role config remains the authoritative ceiling; spawner can only restrict further
allow_tools: intersected with role tool list; if role list is None, used directly (role gate still applies)deny_tools: removed from tool list; falls back toconfirm_denygate when tool list is unrestricted- Design spec:
ARCH__FUTURE.md§12
file_diff— unified diff of two project-scoped files (diff -u); low risk, no admin — 2026-05-12git_status/git_log/git_diff— read-only git inspection tools, project-scoped;git.pymodule — 2026-05-12