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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# π Dunoon Daemon
|
| 2 |
+
|
| 3 |
+
> **Your Personal, Persistent Local AI Companion & Story Engine**
|
| 4 |
+
|
| 5 |
+
Welcome to **Dunoon Daemon** β a fully autonomous, local-first multi-agent companion suite designed for creative writers, tabletop roleplayers, and anyone seeking persistent AI companions that never forget.
|
| 6 |
+
|
| 7 |
+
Everything runs entirely on your local hardware. No cloud subscriptions, no telemetry leaks, and zero mandatory internet connections once your models and weights are loaded[cite: 35].
|
| 8 |
+
|
| 9 |
---
|
| 10 |
+
|
| 11 |
+
## β¨ Key Capabilities
|
| 12 |
+
|
| 13 |
+
* **Strict Session-Scoped Memory**: Tiered storage (Working Memory, Deep Memory, Factual Vaults, and Journals) isolated in per-companion vaults (`data/sessions/<session_id>/vaults/`)[cite: 4, 35].
|
| 14 |
+
* **Dynamic OCEAN Psychology**: Simulates Big Five personality variance and daily emotional shifts affecting tone, vocabulary, and empathy levels[cite: 3, 35].
|
| 15 |
+
* **Dual Arena Debate Deck**: Host live multi-agent debates with dynamic topic intervention, user injection, and autonomous event triggers[cite: 5, 35].
|
| 16 |
+
* **Universal Multimodal Perception**: Ingests images, transcribes spoken audio tracks via local Whisper, parses PDFs, Word docs, and plain text code files.
|
| 17 |
+
* **Expressive Eye Telemetry**: Dual vector digital eyes respond dynamically to hidden LLM affective metadata envelopes (`<!--meta:{...}-->`)[cite: 7, 21, 35].
|
| 18 |
+
* **Multi-Archetype Neural Speech**: Built-in Edge TTS streaming with local SAPI5 fallback and smooth audio fade-out logic[cite: 26, 35].
|
| 19 |
+
|
| 20 |
---
|
| 21 |
+
|
| 22 |
+
## π Quick Start Guide
|
| 23 |
+
|
| 24 |
+
### Prerequisites
|
| 25 |
+
* **OS**: Windows 10/11 (64-bit)[cite: 35]
|
| 26 |
+
* **Python**: 3.11+ (if running from source)[cite: 35]
|
| 27 |
+
* **GPU**: NVIDIA (CUDA) or AMD/Intel (Vulkan) recommended; CPU fallback supported[cite: 4, 35].
|
| 28 |
+
|
| 29 |
+
### 1. Launch the Engine
|
| 30 |
+
Open `controller.py` or run the standalone executable[cite: 35]. Select your preferred inference pipeline:
|
| 31 |
+
* **Native C++ Server**: Click **π Load GGUF Model** to point to any local GGUF file[cite: 5, 35]. The daemon auto-detects your GPU, pulls optimized binaries into `bin/`, and spins up `llama-server.exe`[cite: 5, 8, 20, 35].
|
| 32 |
+
* **LM Studio (Local API)**: Start the Local Server in LM Studio (port 1234), and the Daemon connects automatically[cite: 2, 5, 35].
|
| 33 |
+
|
| 34 |
+
### 2. Create a Companion
|
| 35 |
+
1. Click **β New Chat** and name your session[cite: 5, 35].
|
| 36 |
+
2. Choose a baseline personality mode (**Dynamic OCEAN** recommended)[cite: 3, 5, 35].
|
| 37 |
+
3. Click **π Edit Persona** to roll a random archetype or configure your custom character directives and backstory[cite: 5, 22, 35].
|
| 38 |
+
|
| 39 |
+
### 3. Open Dialogue
|
| 40 |
+
Double-click your companion in the session deck to launch the active chat canvas[cite: 5, 35].
|
| 41 |
+
|
| 42 |
+
---
|
| 43 |
+
|
| 44 |
+
## β‘ Slash Command Reference
|
| 45 |
+
|
| 46 |
+
Execute these commands directly in the dialogue input bar for rapid control[cite: 6, 35]:
|
| 47 |
+
|
| 48 |
+
* `/remember <text>` β Forces direct storage into the permanent Journal Vault[cite: 6, 13, 35].
|
| 49 |
+
* `/memories` or `/vault` β Displays diagnostic counts across all memory tiers[cite: 6, 35].
|
| 50 |
+
* `/forget <n>` β Purges the last *n* conversational turns from context[cite: 6, 35].
|
| 51 |
+
* `/clear` β Clears visual canvas history without altering memory vaults[cite: 6, 35].
|
| 52 |
+
* `/character` β Displays active OCEAN traits and daily mood shifts[cite: 3, 6, 35].
|
| 53 |
+
* `/baseline` β Locks personality into a neutral, analytical state[cite: 6, 35].
|
| 54 |
+
* `/ubaseline` β Re-enables dynamic daily mood variance[cite: 3, 6, 35].
|
| 55 |
+
* `/status` β Displays active model, endpoint, and voice provider[cite: 6, 35].
|
| 56 |
+
* `/see` or `/upload` β Opens file staging browser for multimodal ingestion[cite: 6, 35].
|
| 57 |
+
* `/splash` β Forces Python garbage collection to free RAM/VRAM[cite: 6, 35].
|
| 58 |
+
* `/eject` β Unloads GGUF models and completely flushes VRAM[cite: 5, 6, 35].
|
| 59 |
+
* `/talk 1 | 2 | 3` β Sets vocal reading speed: Slow (1), Medium (2), or Fast (3)[cite: 6, 26, 35].
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
## π Repository Structure
|
| 64 |
+
|
| 65 |
+
```text
|
| 66 |
+
DunoonDaemonApp/
|
| 67 |
+
βββ bin/ # Native engine binaries (llama-server.exe, runtimes)[cite: 4, 20, 35]
|
| 68 |
+
βββ data/[cite: 4, 35]
|
| 69 |
+
β βββ audio_cache/ # Temporary speech cache[cite: 4, 35]
|
| 70 |
+
β βββ sessions/ # Session registry & isolated companion vaults[cite: 4, 24, 35]
|
| 71 |
+
β βββ sessions.json # Master session catalog[cite: 4, 24, 35]
|
| 72 |
+
β βββ <session_id>/ # Isolated per-companion sub-vault[cite: 4, 35]
|
| 73 |
+
β βββ vaults/[cite: 4, 35]
|
| 74 |
+
β βββ working_memory.json # Short-term working buffer[cite: 4, 19, 35]
|
| 75 |
+
β βββ deep_memory.json # Consolidated episodic memory[cite: 4, 13, 35]
|
| 76 |
+
β βββ journal_vault.json # High-salience structured journal entries[cite: 4, 10, 35]
|
| 77 |
+
β βββ embeddings.json # Per-session SentenceTransformer vector store[cite: 4, 14, 35]
|
| 78 |
+
β βββ intent_memory.json # Procedural mandates & directives[cite: 4, 16, 35]
|
| 79 |
+
β βββ task_memory.json # Workflow & step-tracking memory[cite: 4, 16, 35]
|
| 80 |
+
β βββ factual_memory.json # Core biographical facts[cite: 4, 16, 35]
|
| 81 |
+
β βββ continuation_memory.json[cite: 4, 16, 35]
|
| 82 |
+
β βββ reset_memory.json[cite: 4, 16, 35]
|
| 83 |
+
β βββ prune_telemetry.json[cite: 4, 23, 35]
|
| 84 |
+
βββ models/ # Local GGUF models & mmproj vision projectors[cite: 4, 20, 35]
|
| 85 |
+
βββ brain.py # Central cognitive routing & CPU affinity[cite: 1, 35]
|
| 86 |
+
βββ bridge.py # LM Studio local API bridge[cite: 2, 35]
|
| 87 |
+
βββ character.py # OCEAN Big Five profiling & daily mood variance[cite: 3, 35]
|
| 88 |
+
βββ config.py # Portable path resolution & hardware detection[cite: 4, 35]
|
| 89 |
+
βββ controller.py # Main deck UI, session manager, & Dual Arena host[cite: 5, 35]
|
| 90 |
+
βββ dunoon_daemon.py # Autonomous companion chat canvas & multimodal deck[cite: 6, 35]
|
| 91 |
+
βββ eye_engine.py # Expressive vector eye telemetry & pupil dynamics[cite: 7, 35]
|
| 92 |
+
βββ fetch_engine.py # C++ binary & runtime auto-fetcher[cite: 8, 35]
|
| 93 |
+
βββ journal_entry.py / journal_vault.py # Structured salience journaling & atomic storage[cite: 9, 10, 35]
|
| 94 |
+
βββ memory_api.py # Public ingestion gateway[cite: 12, 35]
|
| 95 |
+
βββ memory_deep.py / memory_working.py # Thread-safe tiered memory engines[cite: 13, 19, 35]
|
| 96 |
+
βββ memory_embeddings.py # Local vector embedding & semantic cosine search[cite: 14, 35]
|
| 97 |
+
βββ memory_integrity.py # Vault sanitizer & auto-healer[cite: 15, 35]
|
| 98 |
+
βββ memory_router.py # Semantic intent & vault classification router[cite: 16, 35]
|
| 99 |
+
βββ memory_transfer.py # Cross-persona insight distillation bridge[cite: 17, 35]
|
| 100 |
+
βββ memory_validation.py # Sanitization & private data filter[cite: 18, 35]
|
| 101 |
+
βββ model_handler.py # Native C++ subprocess manager & zombie cleaner[cite: 20, 35]
|
| 102 |
+
βββ overmind.py # Context fusion & dual-channel telemetry engine[cite: 21, 35]
|
| 103 |
+
βββ persona.py # Procedural persona synthesis engine[cite: 22, 35]
|
| 104 |
+
βββ prune.py # Sleep cycle consolidation & capacity controller[cite: 23, 35]
|
| 105 |
+
βββ session_manager.py # Session registry & disk persistence[cite: 24, 35]
|
| 106 |
+
βββ significance.py # Vector salience & entropy scoring engine[cite: 28, 35]
|
| 107 |
+
βββ skin_manager.py # Dynamic theme palettes & widget skinning[cite: 29, 35]
|
| 108 |
+
βββ state_engine.py # Conversation heuristic mood tracker[cite: 25, 35]
|
| 109 |
+
βββ tts_handler.py # Multi-archetype neural voice engine[cite: 26, 35]
|
| 110 |
+
βββ vault_auto_repair.py # Global & session vault format repair[cite: 27, 35]
|
| 111 |
+
[ User Dialogue / Staged Artifact ]
|
| 112 |
+
β
|
| 113 |
+
βΌ
|
| 114 |
+
ββββββββββββββββββββ
|
| 115 |
+
β memory_validationβ βββ Blocks sensitive credentials & malformed payloads
|
| 116 |
+
βββββββββββ¬βββββββββ
|
| 117 |
+
β
|
| 118 |
+
βΌ
|
| 119 |
+
ββββββββββββββββββββ
|
| 120 |
+
β memory_router β βββ Semantic subspace matching across intent/task/facts
|
| 121 |
+
βββββββββββ¬βββββββββ
|
| 122 |
+
β
|
| 123 |
+
βββββββββββββββΌββββββββββββββββββββββββββββ
|
| 124 |
+
β β β
|
| 125 |
+
βΌ βΌ βΌ
|
| 126 |
+
[ Working ] [ Intent / Task / Facts ] [ Deep / Journal ]
|
| 127 |
+
β β β
|
| 128 |
+
β βββββββββββββββ¬ββββββββββββββ
|
| 129 |
+
β β
|
| 130 |
+
βΌ βΌ
|
| 131 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 132 |
+
β Thread-Safe Atomic Persistence Layer (_lock + .tmp swap)β
|
| 133 |
+
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ
|
| 134 |
+
β
|
| 135 |
+
βΌ
|
| 136 |
+
ββββββββββββββββββββββββββββ
|
| 137 |
+
β memory_embeddings β (Local SentenceTransformers)
|
| 138 |
+
β Per-Session Vector DB β
|
| 139 |
+
ββββββββββββββ¬ββββββββββββοΏ½οΏ½β
|
| 140 |
+
β
|
| 141 |
+
βΌ
|
| 142 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 143 |
+
β overmind.py β
|
| 144 |
+
β β
|
| 145 |
+
β β’ System Directives + Dynamic OCEAN Profile (character) β
|
| 146 |
+
β β’ Heuristic State Mood Offsets (state_engine) β
|
| 147 |
+
β β’ Semantic Memory Retrieval (Working + Deep + Journals) β
|
| 148 |
+
β β’ Filtered Cross-Persona Insights (memory_transfer) β
|
| 149 |
+
β β’ Recency-Ranked History Buffer β
|
| 150 |
+
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ
|
| 151 |
+
β
|
| 152 |
+
βΌ
|
| 153 |
+
βββββββββββββββββββββββββββββββββ
|
| 154 |
+
β Dynamic Inference Execution β
|
| 155 |
+
β ββ Native C++ llama-server β
|
| 156 |
+
β ββ LM Studio API (Fallback) β
|
| 157 |
+
βββββββββββββββββ¬ββββββββββββββββ
|
| 158 |
+
β
|
| 159 |
+
βΌ
|
| 160 |
+
[ Dual-Channel Output Stream ]
|
| 161 |
+
βββ <!--meta:{...}--> βββΊ [ Eye Telemetry / Signal Engine ]
|
| 162 |
+
βββ Clean Dialogue βββΊ [ Typewriter UI + Neural Voice TTS ]
|
| 163 |
+
β
|
| 164 |
+
βΌ (Background Idle Hook)
|
| 165 |
+
βββββββββββββββββββββββββββββββ
|
| 166 |
+
β run_session_sleep_cycle β
|
| 167 |
+
β (Consolidation & Prune) β
|
| 168 |
+
βββββββββββββββββββββββββββββββ
|
| 169 |
+
git clone https://github.com/your-username/DunoonDaemonApp.git
|
| 170 |
+
cd DunoonDaemonApp
|
| 171 |
+
pip install requests psutil pygame edge-tts pyttsx3 sentence-transformers numpy Pillow pypdf python-docx faster-whisper
|
| 172 |
+
python controller.py
|
| 173 |
+
π Dedication & License
|
| 174 |
+
Distributed under the MIT License.
|
| 175 |
+
|
| 176 |
+
Dedicated to the loyal companions who walk with us through every realm, and the code that keeps their echoes alive. For Kylo.
|