refactor: mutat kb/ -> memory/kb/ pentru memory search

- Mutat toate fișierele din kb/ în memory/kb/
- Actualizat toate referințele în fișiere (.md, .py, .html)
- Actualizat 10 joburi cron cu noi căi
- Memory search indexează acum 58 fișiere din memory/
- TOOLS.md actualizat cu documentație completă
This commit is contained in:
Echo
2026-02-01 21:18:45 +00:00
parent 02c4a1ca1c
commit 10fb3d6fb5
72 changed files with 807 additions and 170 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""
Generează index.json pentru KB din fișierele .md
Scanează: kb/, memory/, conversations/
Scanează: memory/kb/, memory/, conversations/
Extrage titlu, dată, tags, și domenii (@work, @health, etc.)
"""
@@ -12,7 +12,7 @@ from pathlib import Path
from datetime import datetime
BASE_DIR = Path(__file__).parent.parent
KB_ROOT = BASE_DIR / "kb"
KB_ROOT = BASE_DIR / "memory" / "kb"
MEMORY_DIR = BASE_DIR / "memory"
CONVERSATIONS_DIR = BASE_DIR / "conversations"
INDEX_FILE = KB_ROOT / "index.json"
@@ -34,7 +34,7 @@ def load_rules(filepath):
if str(dir_path) in _rules_cache:
return _rules_cache[str(dir_path)]
# Look for .rules.json in current dir and parents (up to kb/)
# Look for .rules.json in current dir and parents (up to memory/kb/)
rules = {
"defaultDomains": [],
"defaultTypes": [],
@@ -150,8 +150,8 @@ def extract_metadata(filepath, category, subcategory=None):
# Construiește path-ul relativ pentru web (din dashboard/)
# Dashboard are symlinks: notes-data -> ../kb, memory -> ../memory, conversations -> ../conversations
rel_path = str(filepath.relative_to(BASE_DIR))
# Transformă kb/... în notes-data/... pentru web
if rel_path.startswith('kb/'):
# Transformă memory/kb/... în notes-data/... pentru web
if rel_path.startswith('memory/kb/'):
rel_path = 'notes-data/' + rel_path[3:]
return {
@@ -231,8 +231,8 @@ def generate_index():
domain_stats = {d: 0 for d in VALID_DOMAINS}
category_stats = {}
# Scanează TOATE subdirectoarele din kb/ recursiv
print("Scanning kb/ (all subdirectories)...")
# Scanează TOATE subdirectoarele din memory/kb/ recursiv
print("Scanning memory/kb/ (all subdirectories)...")
for subdir in sorted(KB_ROOT.iterdir()):
if subdir.is_dir() and not subdir.name.startswith('.'):
category = subdir.name