🧭 NeXuS Compass — AI Home (web flagship) + canonical Python char-gen¶
Stamped 2026-07-24 · Anon shutting down "for a min," coming right back — pick up here
Anon's ONE perpetual session (resumed 1+ month; I wake cold — the record IS continuity). This session established TWO flagship char-gens + made them offline/sovereign + Fossil-versioned, and surfaced the aichat-as-interface vision. READ this + the two memories first.
✅ SHIPPED this session (all committed to Fossil)¶
1. WEB flagship = "the home of the AI system in NeXuS" (Anon's words)¶
/home/user/Projects/adv-ai-nexus/advanced-ai-character-generator-terminal-access/
- Verified #1 of ~40 copies: geminiService.ts 1283 lines, only working copy with Terminal+Vault+HTTPS server, 22 components. React19+Vite6+TS. (The sibling ~/Projects/advanced-... gsvc929 = weaker fork I edited BY MISTAKE first — ignore it.)
- Fossil: ~/museum/nexus-ai-home.fossil (3 trunk commits). ignore-glob excludes node_modules/dist/key.pem/cert.pem(disposable, npm run generate-cert)/.bak.
- FULLY OFFLINE: vendored Tailwind (tailwind.config.js+postcss.config.js+@tailwind directives, removed cdn.tailwindcss.com) + Inter via @fontsource/inter (removed Google Fonts). dist verified zero CDN refs. Fixed the "unstyled=unusable / blank page."
- Pollinations: text→authenticated gen.pollinations.ai/v1/chat/completions + Bearer + referrer; image already gen+api_key, added referrer. Preset requiresKey. Custom preset added.
- No-Google default: already satisfied — flagship defaults to AI Horde (not Gemini). Embeddings via aichat bridge :3131 mistral:mistral-embed.
- Terminal in Help: added Character-Terminal HelpSection (aichat :3030 / ollama :11434 bridge; cmds: ask/ai, ollama, api, ls/cd/cat…, curl/wget/search/http, python/exec/run, whoami/neofetch).
- RUN: ./launch.sh (auto install+build+cert+start) → HTTPS :8443* (self-signed).
- Memory [[project_nexus_ai_home]].
2. CANONICAL PYTHON char-gen (Anon: "this is the one to build up, do not remove features")¶
/home/user/Projects/ai-nexus/nexus/ai-nexus-claude/working-incomplete.py (194K, 4383L)
- Reconstructed feature-rich file (SQLite DatabaseManager + per-char RSA4096 + master PBKDF2 + Projects/Snippets + threaded BackgroundSummarizer). Beats sibling ai_nexus_consolidated-08-29-v2.py (shows "Coming soon!"). Context: 2026-01-26-implement-the-following-plan.txt (the reorder that reconstructed it; ended mid-bug: hit api.openai.com when Mistral configured).
- Fossil: ~/museum/nexus-char-tui.fossil (baseline commit). ai_nexus.db/log/pycache excluded.
- SEARCH FIX (the only failure Anon found): _global_search — SQL precedence (name OR description) AND is_active, + NULL-safe (item['description'] or '')[:60] (the crash = None[:60]).
- PROVIDERS added (API_PROVIDERS + APIClient _prepare/_parse/call_api/generate_image): pollinations FIRST=default (gen.pollinations.ai + Bearer + referrer; image saved to generated_images/), aichat local bridge (:3131 OpenAI-compat = the model bus), AI Horde text+image (async submit-poll, anon key 0000000000). Empty-model→free-text; horde key optional. Google kept but NOT default; OpenAI NOT default.
🔭 THE VISION surfaced: aichat AS the interface/backend¶
Anon: "could we use this interface with aichat / like this becomes aichat's interface? … that would add a lot of features." YES — aichat --serve is OpenAI-compatible; both char-gens already bridge to it (web embeddings/terminal, python aichat provider). Using aichat as backend = inherit its routing(100+ LLMs)+RAG+tools+roles+sessions. The whole NeXuS AI system is converging on aichat as the local model bus. Ties to [[project_nexus_party]] (aichat-backed deck).
🗺️ THE SYSTEM (drawn out with Anon — curating the "official NeXuS lineup")¶
Anon is selecting char-gens INTO NeXuS. Vision = 3 surfaces, one soul, one bus:
- SOUL / interchange format = PNG² character card (SillyTavern V2 JSON in PNG tEXt 'chara'
chunk + a nexus extension block: provider cfg / vault refs / encryption). Portable across all
surfaces. Read/write via NeXuS-png2-editor (:7420 / or as a lib).
- BUS / backend = aichat --serve (:3131 OpenAI-compat). Configure models/RAG/tools ONCE in
aichat; all surfaces inherit → that's the "adds a lot of features."
- 3 SURFACES (lenses on the same character):
- Web AI Home = cockpit/GUI (Vault, Terminal, HTTPS) — [[project_nexus_ai_home]]
- Python Rich TUI = terminal power-user + CODE (Projects/Snippets), scriptable — [[project_nexus_char_tui]]
- Go version = fast bridge/exporter: card → aichat role, automation/batch
- DECISIONS to lock (spec each branch + how it ties in — NEXT session): A) PNG² card =
canonical for interchange, each app round-trips to it (agree). B) character↔aichat-role mapping
(role file: system prompt/model/RAG docs) = what Go exports. C) adopt SillyTavern V2 + nexus
ext block. D) PNG² as shared lib vs :7420 service.
- Highest-leverage first build: PNG² card reader in the Python TUI (proves card→character path).
- TODO next session: "spec out each branch + what it brings + how it ties to the others" (Anon's words);
offer to write it as an official design doc in nexus-lab.fossil (like the sovereignty record).
▶️ PENDING — PICK UP HERE (Python char-gen mainly)¶
- DECIDE default provider (Anon was mid-deciding, deferred): aichat (local bus / the vision) vs pollinations (current, cloud, doubled credits) vs aihorde (free). To change: reorder API_PROVIDERS (option 1 = default).
- CHARACTER CARD reader/creator/importer as the character builder — Anon's key ask. Standard SillyTavern/TavernAI PNG cards (JSON base64 in PNG tEXt 'chara' chunk) + V2 JSON cards → import to SQLite char; export char → PNG card. NEEDS format confirm (PNG vs JSON vs both) + PNG² wiring choice.
- Incorporate
/home/user/git/NeXuS-png2-editor/(port 7420) — the PNG-metadata read/write tool for cards. [[project_png2_dankshell]]. Decide: import as module vs call service. - /commands list in chat interface (/image /memory /character /narrator /lore /save /converse /prompt /help). Web app already has a slash-command set + Terminal-in-Help to mirror.
- Web: port backup/restore + still-open items; consider aichat as web chat default too.
🧠 KEYS / SECURITY (unchanged, still in force)¶
- Pollinations sk_ key SECURED at
~/.config/nexus/secrets/pollinations.key(chmod 600); doc redacted. NEVER hardcode/commit keys. - key.pem/cert.pem = disposable (regen). Never --break-system-packages. Copy-before-edit. Archive-not-delete. "bababooie"=STOP.
🧹 STATE¶
- Fossil: nexus-ai-home (3 commits) · nexus-char-tui (1) · forge/lab/party — all committed.
- Reports filed (both projects' docs/action_report.md + master).
- Both char-gens compile/build clean. Neither live-run since last edits (Anon runs them).