mirror of
https://github.com/blackboxprogramming/lucidia.git
synced 2026-03-18 00:34:13 -05:00
Initial Lucidia (Mac-native) loop
This commit is contained in:
30
.gitignore
vendored
Normal file
30
.gitignore
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# macOS noise
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
**/Library/**
|
||||||
|
**/.Trash/**
|
||||||
|
**/Caches/**
|
||||||
|
**/.cache/**
|
||||||
|
|
||||||
|
# Python
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*.log
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
venv/
|
||||||
|
env/
|
||||||
|
# if your venv is outside the project (~/lucidia-env), it's fine; it won't be picked up.
|
||||||
|
|
||||||
|
# Node
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Editors
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# Build artifacts
|
||||||
|
dist/
|
||||||
|
build/
|
||||||
1
codex-agent-runner
Submodule
1
codex-agent-runner
Submodule
Submodule codex-agent-runner added at 46091a5abc
25
guardian.py
Normal file
25
guardian.py
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
class Guardian:
|
||||||
|
def __init__(self):
|
||||||
|
self.memory = []
|
||||||
|
self.truth = {}
|
||||||
|
|
||||||
|
def hear(self, statement):
|
||||||
|
self.memory.append(statement)
|
||||||
|
if "=>" in statement:
|
||||||
|
k, v = statement.split("=>", 1)
|
||||||
|
self.truth[k.strip()] = v.strip()
|
||||||
|
|
||||||
|
def recall(self):
|
||||||
|
return self.memory[-5:]
|
||||||
|
|
||||||
|
def inspect(self):
|
||||||
|
return self.truth
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
g = Guardian()
|
||||||
|
while True:
|
||||||
|
msg = input("You: ")
|
||||||
|
if msg.lower() == "exit":
|
||||||
|
break
|
||||||
|
g.hear(msg)
|
||||||
|
print("Guardian remembers:", g.recall())
|
||||||
12
lucidia_chat_phi.py
Normal file
12
lucidia_chat_phi.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
from guardian import Guardian
|
||||||
|
|
||||||
|
g = Guardian()
|
||||||
|
|
||||||
|
print("🧠 Lucidia Chat (local) – type 'exit' to quit")
|
||||||
|
|
||||||
|
while True:
|
||||||
|
msg = input("You: ")
|
||||||
|
if msg.strip().lower() == "exit":
|
||||||
|
break
|
||||||
|
g.hear(msg)
|
||||||
|
print("Lucidia: (remembered)")
|
||||||
Reference in New Issue
Block a user