summaryrefslogtreecommitdiff
path: root/identity.py
diff options
context:
space:
mode:
Diffstat (limited to 'identity.py')
-rw-r--r--identity.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/identity.py b/identity.py
index 9b4faa0..cbcd6ad 100644
--- a/identity.py
+++ b/identity.py
@@ -1,6 +1,7 @@
from dataclasses import dataclass
import tomllib
+
@dataclass
class AgentIdentity:
name: str
@@ -8,11 +9,13 @@ class AgentIdentity:
values: dict[str, bool]
quirks: dict[str, str]
+
@dataclass
class UserProfile:
name: str
preferences: dict[str, str]
+
def load_agent_identity(path: str) -> AgentIdentity:
with open(path, "rb") as file:
data = tomllib.load(file)
@@ -24,6 +27,7 @@ def load_agent_identity(path: str) -> AgentIdentity:
quirks=data["quirks"],
)
+
def load_user_profile(path: str) -> UserProfile:
with open(path, "rb") as file:
data = tomllib.load(file)