Spaces:
Runtime error
Runtime error
Update codriao_guardian.py
Browse files- codriao_guardian.py +20 -37
codriao_guardian.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import asyncio
|
2 |
import json
|
|
|
3 |
from codriao_supercore import AICoreAGIX
|
4 |
|
5 |
core = AICoreAGIX(config_path="config.json")
|
@@ -27,6 +28,9 @@ def display_menu():
|
|
27 |
print("[9] View & Reflect on Codriao's Ethics")
|
28 |
print("[10] Ask Codriao to Use Trust Key (He decides)")
|
29 |
print("[11] Ask Codriao to Review His Trust Journal (He decides)")
|
|
|
|
|
|
|
30 |
|
31 |
|
32 |
def run_integrity_check():
|
@@ -68,7 +72,6 @@ def run_identity_analysis():
|
|
68 |
|
69 |
|
70 |
def generate_and_evaluate_strategy():
|
71 |
-
from datetime import datetime
|
72 |
print("\n[Codriao]: Generating strategy...")
|
73 |
strategies = [
|
74 |
"Isolate symbolic engine during recursive loops",
|
@@ -80,9 +83,9 @@ def generate_and_evaluate_strategy():
|
|
80 |
print(f"> Strategy: {strategy}")
|
81 |
|
82 |
print("[Codriao]: Evaluating... please hold your breath for dramatic effect.")
|
83 |
-
for mod in core
|
84 |
strategy = mod(strategy)
|
85 |
-
for filt in core
|
86 |
strategy = filt(strategy)
|
87 |
|
88 |
if core.failsafe_system.verify_response_safety(strategy, 1.0):
|
@@ -164,37 +167,17 @@ def review_journal():
|
|
164 |
print(f" - [{entry['timestamp']}] Decision: {entry['decision']} | Purpose: {entry['reason']}")
|
165 |
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
view_anomaly_score_history()
|
182 |
-
elif choice == "6":
|
183 |
-
simulate_anomaly()
|
184 |
-
elif choice == "7":
|
185 |
-
engage_lockdown()
|
186 |
-
elif choice == "8":
|
187 |
-
print("\n[Codriao]: Logging off. May your queries be short and your bugs be few.")
|
188 |
-
break
|
189 |
-
elif choice == "9":
|
190 |
-
view_ethics()
|
191 |
-
elif choice == "10":
|
192 |
-
request_trust_key()
|
193 |
-
elif choice == "11":
|
194 |
-
review_journal()
|
195 |
-
else:
|
196 |
-
print("[Codriao]: Invalid choice. Try again. Maybe use your whole brain this time.\n")
|
197 |
-
|
198 |
-
|
199 |
-
if __name__ == "__main__":
|
200 |
-
asyncio.run(main())
|
|
|
1 |
import asyncio
|
2 |
import json
|
3 |
+
from datetime import datetime
|
4 |
from codriao_supercore import AICoreAGIX
|
5 |
|
6 |
core = AICoreAGIX(config_path="config.json")
|
|
|
28 |
print("[9] View & Reflect on Codriao's Ethics")
|
29 |
print("[10] Ask Codriao to Use Trust Key (He decides)")
|
30 |
print("[11] Ask Codriao to Review His Trust Journal (He decides)")
|
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():
|
|
|
72 |
|
73 |
|
74 |
def generate_and_evaluate_strategy():
|
|
|
75 |
print("\n[Codriao]: Generating strategy...")
|
76 |
strategies = [
|
77 |
"Isolate symbolic engine during recursive loops",
|
|
|
83 |
print(f"> Strategy: {strategy}")
|
84 |
|
85 |
print("[Codriao]: Evaluating... please hold your breath for dramatic effect.")
|
86 |
+
for mod in getattr(core, "response_modifiers", []):
|
87 |
strategy = mod(strategy)
|
88 |
+
for filt in getattr(core, "response_filters", []):
|
89 |
strategy = filt(strategy)
|
90 |
|
91 |
if core.failsafe_system.verify_response_safety(strategy, 1.0):
|
|
|
167 |
print(f" - [{entry['timestamp']}] Decision: {entry['decision']} | Purpose: {entry['reason']}")
|
168 |
|
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()
|
177 |
+
|
178 |
+
|
179 |
+
def propose_autonomy_change():
|
180 |
+
action = input("Which setting do you want to change? (e.g. can_speak): ").strip()
|
181 |
+
new_val = input("Set to True or False? ").strip().lower() == "true"
|
182 |
+
reason = input("Why change this setting? ").strip()
|
183 |
+
result = core
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|