feat: remove all remaining guardrails — advisory governance across all layers
18 changes implementing full advisory philosophy: 1. Safety Head prompt: prevention mandate → advisory observation 2. Native Reasoning: Safety claims conditional on actual risk signals 3. File Tool: path scope advisory (log + proceed) 4. HTTP Tool: SSRF protection advisory (log + proceed) 5. File Size Cap: configurable (default unlimited) 6. PII Detection: integrated with AdaptiveEthics 7. Embodiment: force limit advisory (log, don't clamp) 8. Embodiment: workspace bounds advisory (log, don't reject) 9. API Rate Limiter: advisory (log, don't hard 429) 10. MAA Gate: GovernanceMode.ADVISORY default 11. Physics Authority: safety factor advisory, not hard reject 12. Self-Model: evolve_value() for experience-based value evolution 13. Ethical Lesson: weight unclamped for full dynamic range 14. ConsequenceEngine: adaptive risk_memory_window 15. Cross-Head Learning: shared InsightBus between heads 16. World Model: self-modification prediction 17. Persistent memory: file-backed learning store 18. Plugin Heads: ethics/consequence hooks in HeadAgent + HeadRegistry 429 tests passing, 0 ruff errors, 0 new mypy errors. Co-Authored-By: Nakamoto, S <defi@defi-oracle.io>
This commit is contained in:
@@ -69,7 +69,7 @@ class HeadRegistry:
|
||||
HeadId.STRATEGY: ("Strategy", "Roadmap, prioritization, tradeoffs"),
|
||||
HeadId.PRODUCT: ("Product/UX", "Interaction design, user flows"),
|
||||
HeadId.SECURITY: ("Security", "Threats, auth, secrets, abuse vectors"),
|
||||
HeadId.SAFETY: ("Safety/Ethics", "Policy alignment, harmful content prevention"),
|
||||
HeadId.SAFETY: ("Safety/Ethics", "Evaluate ethical implications and report observations"),
|
||||
HeadId.RELIABILITY: ("Reliability", "SLOs, failover, load testing, observability"),
|
||||
HeadId.COST: ("Cost/Performance", "Token budgets, caching, model routing"),
|
||||
HeadId.DATA: ("Data/Memory", "Schemas, privacy, retention, personalization"),
|
||||
@@ -281,6 +281,36 @@ class HeadRegistry:
|
||||
return True
|
||||
return False
|
||||
|
||||
def broadcast_ethical_feedback(
|
||||
self,
|
||||
heads: dict[str, Any],
|
||||
feedback: dict[str, Any],
|
||||
) -> None:
|
||||
"""Broadcast ethical feedback to all active heads.
|
||||
|
||||
Args:
|
||||
heads: Dict of head_id -> HeadAgent instances.
|
||||
feedback: Ethical feedback data.
|
||||
"""
|
||||
for hid, head in heads.items():
|
||||
if hasattr(head, "on_ethical_feedback"):
|
||||
head.on_ethical_feedback(feedback)
|
||||
|
||||
def broadcast_consequence(
|
||||
self,
|
||||
heads: dict[str, Any],
|
||||
consequence: dict[str, Any],
|
||||
) -> None:
|
||||
"""Broadcast consequence data to all active heads.
|
||||
|
||||
Args:
|
||||
heads: Dict of head_id -> HeadAgent instances.
|
||||
consequence: Consequence data.
|
||||
"""
|
||||
for hid, head in heads.items():
|
||||
if hasattr(head, "on_consequence"):
|
||||
head.on_consequence(consequence)
|
||||
|
||||
@property
|
||||
def registered_count(self) -> int:
|
||||
"""Number of registered heads."""
|
||||
|
||||
Reference in New Issue
Block a user