vault backup: 2026-03-07 14:03:31

This commit is contained in:
AlexAI
2026-03-07 14:03:31 -06:00
parent aeda4e8926
commit 625b493ca9
4 changed files with 243 additions and 3 deletions

View File

@@ -0,0 +1,71 @@
# Mission Control Dashboard — TLC Project
**Status:** In Progress — Needs Consolidation & Refresh
**Created:** 2026-02-17 (Next.js) / 2026-02-20 (Python)
**Goal:** Combine both dashboards into one unified system
---
## Current State
We have **TWO** Mission Control dashboards:
### 1. Next.js Dashboard
| Attribute | Value |
|-----------|-------|
| **Location** | `C:\web\htdocs\mission-control` |
| **URL** | http://localhost:3000 |
| **Tech** | Next.js 14, TypeScript, Tailwind |
| **Status** | Running but needs updates |
| **Features** | Project cards, Kanban boards, Status widgets, Themes |
### 2. Python/Flask Dashboard
| Attribute | Value |
|-----------|-------|
| **Location** | `C:\web\htdocs\mission-control-py` |
| **URL** | http://localhost:5050 |
| **Tech** | Python/Flask, MySQL, HA API |
| **Status** | Running but needs updates |
| **Features** | Admin CRUD, Weather, Gateway status, Projects |
---
## The Problem
Two dashboards doing similar things. Need to decide on architecture.
---
## Features to Preserve
### From Next.js:
- Project cards, Kanban boards
- Drag-and-drop tasks
- Real-time status widgets
- 4 themes (NASA, Luxury, Cyberpunk, Organic)
- GLaDOS voice control
### From Python:
- MySQL persistence
- Home Assistant API
- Weather widget
- Admin CRUD
- News tracking
---
## Possible Directions
**A:** Refactor Next.js (add MySQL, port Python features)
**B:** Enhance Python (add themes, polish UI)
**C:** Start Fresh (new tech stack)
**D:** Hybrid API (Python backend, Next.js frontend)
---
**Notes:**
- Frigate is working (Docker)
- UniFi is parked (auth issues later)
- On hold until direction decided
*Full doc in git: memory/projects/mission-control-dashboard-tlc.md*

View File

@@ -0,0 +1,159 @@
# Supermonkey Memory System
**Status:** ✅ Production
**Created:** 2026-03-02
**Location:** `~/.openclaw/memory.db`
---
## Overview
Local semantic memory search using SQLite + Ollama embeddings. Replaces flaky Supermemory cloud API.
**Why "Supermonkey"?**
- Works offline (like a monkey with a typewriter)
- No cloud dependency
- Just keeps going
---
## Architecture
### File-Based Pipeline (Daily)
```
Memory Files (markdown)
↓
memory_embedding_worker.py
↓
Ollama (nomic-embed-text) → 768-dim vectors
↓
SQLite + sqlite-vector extension
↓
Cosine similarity search
```
### Real-Time Session Pipeline (Live)
```
Discord/Chat Messages
↓
OpenClaw Session Transcript (.jsonl)
↓
session_monitor.py (cron every 2 min)
↓
Count messages → At 15: summarize → embed → store
↓
Ollama (nomic-embed-text)
↓
SQLite + sqlite-vector
```
**The Innovation:** Read OpenClaw's own session transcripts to auto-capture conversations without manual tracking or hooks!
---
## Components
| File | Purpose |
|------|---------|
| `memory_vector.py` | Core SQLite-vector wrapper |
| `memory_embedding_worker.py` | Daily memory file processor |
| `session_monitor.py` | Real-time transcript capture |
| `session_snapshotter.py` | Manual session capture |
| `search_memories.py` | CLI search tool |
| `bulk_memory_loader.py` | One-time historical import |
---
## Quick Commands
```powershell
# Search memories
python tools/search_memories.py "home assistant automation"
# Check stats
python -c "import sqlite3; db=sqlite3.connect(r'C:\Users\admin\.openclaw\memory.db'); c=db.cursor(); c.execute('SELECT COUNT(*) FROM memory_embeddings'); print('Total:', c.fetchone()[0]); c.execute('SELECT COUNT(*) FROM memory_embeddings WHERE source_type=\'auto_session\''); print('Auto snapshots:', c.fetchone()[0]); db.close()"
# Run daily worker manually
python tools/memory_embedding_worker.py --date 2026-03-03
# Run session monitor manually
python tools/session_monitor.py
```
---
## Current Stats
| Metric | Value |
|--------|-------|
| Total embeddings | ~1,623 |
| Daily notes processed | 818 |
| Project files | 332 |
| MEMORY.md sections | 33 |
| Manual session snapshots | 2 |
| **Auto session snapshots** | **27** |
| Tracked sessions | 245 |
| Active sessions | 243 |
| Database size | ~5 MB |
---
## Database Schema
### memory_embeddings
| Column | Type | Description |
|--------|------|-------------|
| id | INTEGER | Primary key |
| source_type | TEXT | daily, memory_md, project, auto_session |
| source_path | TEXT | File path + section |
| content_text | TEXT | First 500 chars |
| embedding | BLOB | 768-dim vector |
| created_at | TIMESTAMP | Auto-set |
### session_tracking
| Column | Type | Description |
|--------|------|-------------|
| session_id | TEXT | OpenClaw UUID |
| transcript_path | TEXT | Path to .jsonl |
| last_message_index | INTEGER | Checkpoint |
| messages_since_snapshot | INTEGER | Counter |
| is_active | BOOLEAN | Active? |
---
## Cron Schedule
| Job | Schedule | Purpose |
|-----|----------|---------|
| Memory Embeddings Daily | 3:00 AM | Process yesterday's memory files |
| Session Monitor | Every 2 min | Auto-snapshot live conversations |
---
## Troubleshooting
**Ollama not running:**
```powershell
ollama serve
```
**Database locked:**
Close DB Browser for SQLite
**Unicode errors in cron:**
All emojis replaced with ASCII-safe markers
---
## Future Enhancements
- [ ] Keyword filtering alongside vector search
- [ ] Date range queries
- [ ] Source type filtering
- [ ] Embedding quality scoring
---
**Credit:** Corey's genius idea to read session.json files 💡
**System:** Operational and self-managing