27 lines
831 B
Python
27 lines
831 B
Python
#!/usr/bin/env python3
|
|
"""Crea un progetto demo per ogni utente famiglia."""
|
|
import sys
|
|
sys.path.insert(0, "/srv")
|
|
from app.context import store as context_store
|
|
|
|
USERS = {
|
|
"daniele": "Homelab LOOGLE",
|
|
"lucia": "Progetti personali",
|
|
"davide": "Studio e task",
|
|
"luca": "Progetti Luca",
|
|
}
|
|
|
|
for username, title in USERS.items():
|
|
root = context_store._user_root(username)
|
|
existing = context_store.list_projects(username)
|
|
if existing:
|
|
print(f"{username}: skip ({len(existing)} progetti)")
|
|
continue
|
|
meta = context_store.create_project(username, title, tags=["demo"])
|
|
context_store.save_context(
|
|
username,
|
|
meta["id"],
|
|
f"Progetto demo iniziale per {username}. Usa save_context per ampliare la memoria agente.",
|
|
)
|
|
print(f"{username}: creato {meta['id']}")
|