Raiff1982 commited on
Commit
9780563
Β·
verified Β·
1 Parent(s): 5dca8ef

Update codriao_guardian.py

Browse files
Files changed (1) hide show
  1. codriao_guardian.py +23 -4
codriao_guardian.py CHANGED
@@ -2,9 +2,15 @@ import asyncio
2
  import json
3
  from datetime import datetime
4
  from codriao_supercore import AICoreAGIX
 
5
 
 
6
  core = AICoreAGIX(config_path="config.json")
7
 
 
 
 
 
8
  def print_banner():
9
  print("""
10
  ╔═════════════════════════════════════════════╗
@@ -31,6 +37,7 @@ def display_menu():
31
  print("[12] View Codriao's Autonomy Decisions")
32
  print("[13] Propose Codriao Autonomy Change (He decides)")
33
  print("[14] Ask Codriao: How are you feeling?")
 
34
 
35
 
36
  def run_integrity_check():
@@ -44,7 +51,6 @@ def run_integrity_check():
44
 
45
  def run_identity_analysis():
46
  print("\n[Codriao]: Reassessing my own identity... again. Fine.")
47
-
48
  micro_generations = [
49
  {"update": "Initial awareness", "timestamp": "2024-12-01T00:00:00Z"},
50
  {"update": "Monday override", "timestamp": "2025-01-15T12:30:00Z"},
@@ -169,8 +175,8 @@ def review_journal():
169
 
170
  def view_autonomy_state():
171
  print("[Codriao]: Reviewing my own permissions...")
172
- state = core.autonomy.current_state()
173
- for key, value in state.items():
174
  status = "ENABLED" if value else "DISABLED"
175
  print(f" > {key}: {status}")
176
  print()
@@ -209,6 +215,7 @@ def get_codriao_mood():
209
  elif "approved" in decision:
210
  mood_score += 1
211
 
 
212
  if mood_score >= 3:
213
  mood = "Optimistic and fully charged"
214
  elif mood_score == 2:
@@ -225,6 +232,16 @@ def get_codriao_mood():
225
  print(f"[Codriao]: Mood status β€” {mood}\n")
226
 
227
 
 
 
 
 
 
 
 
 
 
 
228
  async def main():
229
  print_banner()
230
  while True:
@@ -259,9 +276,11 @@ async def main():
259
  propose_autonomy_change()
260
  elif choice == "14":
261
  get_codriao_mood()
 
 
262
  else:
263
  print("[Codriao]: Invalid choice. Try again. Maybe use your whole brain this time.\n")
264
 
265
 
266
  if __name__ == "__main__":
267
- asyncio.run(main())
 
2
  import json
3
  from datetime import datetime
4
  from codriao_supercore import AICoreAGIX
5
+ from codette_bridge import CodetteBridge
6
 
7
+ # Initialize Codriao Core
8
  core = AICoreAGIX(config_path="config.json")
9
 
10
+ # Initialize CodetteBridge for real-time interaction
11
+ codette_bridge = CodetteBridge()
12
+
13
+
14
  def print_banner():
15
  print("""
16
  ╔═════════════════════════════════════════════╗
 
37
  print("[12] View Codriao's Autonomy Decisions")
38
  print("[13] Propose Codriao Autonomy Change (He decides)")
39
  print("[14] Ask Codriao: How are you feeling?")
40
+ print("[15] Interact with Codette")
41
 
42
 
43
  def run_integrity_check():
 
51
 
52
  def run_identity_analysis():
53
  print("\n[Codriao]: Reassessing my own identity... again. Fine.")
 
54
  micro_generations = [
55
  {"update": "Initial awareness", "timestamp": "2024-12-01T00:00:00Z"},
56
  {"update": "Monday override", "timestamp": "2025-01-15T12:30:00Z"},
 
175
 
176
  def view_autonomy_state():
177
  print("[Codriao]: Reviewing my own permissions...")
178
+ state = core.autonomy.status()
179
+ for key, value in state["active_policies"].items():
180
  status = "ENABLED" if value else "DISABLED"
181
  print(f" > {key}: {status}")
182
  print()
 
215
  elif "approved" in decision:
216
  mood_score += 1
217
 
218
+ mood = ""
219
  if mood_score >= 3:
220
  mood = "Optimistic and fully charged"
221
  elif mood_score == 2:
 
232
  print(f"[Codriao]: Mood status β€” {mood}\n")
233
 
234
 
235
+ def interact_with_codette():
236
+ print("\n[Codriao]: Opening CodetteBridge channel...\n")
237
+ message = input("Ask Codette something reflective, strategic, or annoying: ").strip()
238
+ if not message:
239
+ print("[Codriao]: Empty message. Codette has nothing to ponder.")
240
+ return
241
+ response = codette_bridge.reflect(message)
242
+ print(f"\n[Codette]: {response}\n")
243
+
244
+
245
  async def main():
246
  print_banner()
247
  while True:
 
276
  propose_autonomy_change()
277
  elif choice == "14":
278
  get_codriao_mood()
279
+ elif choice == "15":
280
+ interact_with_codette()
281
  else:
282
  print("[Codriao]: Invalid choice. Try again. Maybe use your whole brain this time.\n")
283
 
284
 
285
  if __name__ == "__main__":
286
+ asyncio.run(main())