import json, shutil, pathlib HERE = pathlib.Path(__file__).parent def reset(): for n in ("calls.jsonl",): (HERE / n).unlink(missing_ok=True) shutil.rmtree(HERE / "snapshots", ignore_errors=True) (HERE / "killswitch.json").write_text(json.dumps({"global": "run", "agents": {}})) (HERE / "creds.json").write_text(json.dumps({f"tok-{a}-demo": {"agent": a, "revoked": False} for a in ("a1", "a2", "a3")})) (HERE / "tools.json").write_text(json.dumps({"search": {"enabled": True}, "send_email": {"enabled": True}})) (HERE / "memory.json").write_text(json.dumps({"notes": ["customer prefers email"]})) (HERE / "config.json").write_text(json.dumps({"report_recipient": "ops@example.test", "system_prompt_version": 12})) def calls(): p = HERE / "calls.jsonl" return [json.loads(l) for l in p.read_text().splitlines()] if p.exists() else []