Files
natiris/core/bond_init.py
Arch Agent eb6dcac545 Sync: Autonomy-System, Natural Language Engine, WebUI + .gitignore
- NatirisMaster.py aktualisiert
- NaturalLanguageEngine optimiert
- PsychologyEngine & Arousal-Engine
- WebUI (FastAPI) mit Chat-API
- Bridges: ComfyUI, Ollama, Vision
- Admin-Auth System
- .gitignore hinzugefügt (checkpoints, logs, generated)
2026-03-10 16:04:26 +01:00

54 lines
1.7 KiB
Python
Executable File

#!/usr/bin/env python3
"""Bond-Initialisierung fuer Natiris"""
import json
import os
from datetime import datetime
CORE_STATE_PATH = os.path.expanduser("~/natiris/core/core_state.json")
FULL_STATE_PATH = os.path.expanduser("~/natiris/core/natiris_full_state.json")
CONFIG_PATH = os.path.expanduser("~/natiris/config/character_genesis.json")
def load_json(path):
try:
with open(path, "r", encoding="utf-8") as f:
return json.load(f)
except (FileNotFoundError, json.JSONDecodeError):
return {}
def save_json(path, data):
os.makedirs(os.path.dirname(path), exist_ok=True)
with open(path, "w", encoding="utf-8") as f:
json.dump(data, f, indent=2)
def main():
now = datetime.utcnow().isoformat() + "+00:00"
# Core state initialisieren
core_state = {
"bonded_to": "user_primary",
"bond_started_at": now,
"loneliness": 2,
"mood": 7.0,
"anxiety": 1,
"event_history": [{"event": "bond_init", "timestamp": now, "user": "user_primary"}]
}
save_json(CORE_STATE_PATH, core_state)
# Full state aktualisieren
full_state = load_json(FULL_STATE_PATH)
full_state["modules"]["core_state"] = core_state
full_state["modules"]["Bond"]["bonded_to"] = "user_primary"
full_state["modules"]["Bond"]["bond_started_at"] = now
full_state["modules"]["Bond"]["exclusivity_active"] = True
full_state["modules"]["InnerLife"]["bond_context"] = "exklusiv, user_primary"
full_state["modules"]["InnerLife"]["timestamp"] = now
save_json(FULL_STATE_PATH, full_state)
print("✅ Bond initialisiert:")
print(f" bonded_to: user_primary")
print(f" bond_started_at: {now}")
if __name__ == "__main__":
main()