sovereign-validation 1.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: sovereign-validation
3
+ Version: 1.2.0
4
+ Summary: Universal 5-Gate Ethical Alignment Guardrail for AI Systems
5
+ Home-page: https://github.com/yourusername/sovereign-validation
6
+ Author: Richard Thomas Williams
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: python-dotenv>=1.0.0
14
+ Dynamic: author
15
+ Dynamic: classifier
16
+ Dynamic: description
17
+ Dynamic: description-content-type
18
+ Dynamic: home-page
19
+ Dynamic: requires-dist
20
+ Dynamic: requires-python
21
+ Dynamic: summary
22
+
23
+ # Sovereign Validation Protocol
24
+
25
+ Universal 5-Gate Ethical Alignment Guardrail for modern AI inference systems.
26
+
27
+ ## Installation
28
+
29
+ ```bash
30
+ pip install sovereign-validation
@@ -0,0 +1,8 @@
1
+ # Sovereign Validation Protocol
2
+
3
+ Universal 5-Gate Ethical Alignment Guardrail for modern AI inference systems.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install sovereign-validation
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,26 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ with open("README.md", "r", encoding="utf-8") as fh:
4
+ long_description = fh.read()
5
+
6
+ setup(
7
+ name="sovereign-validation",
8
+ version="1.2.0",
9
+ author="Richard Thomas Williams",
10
+ author_author_email="owner@sovereignprotocol.org", # Replace with preferred contact email
11
+ description="Universal 5-Gate Ethical Alignment Guardrail for AI Systems",
12
+ long_description=long_description,
13
+ long_description_content_type="text/markdown",
14
+ url="https://github.com/yourusername/sovereign-validation", # Replace with repository link
15
+ packages=find_packages(),
16
+ classifiers=[
17
+ "Programming Language :: Python :: 3",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Operating System :: OS Independent",
20
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
21
+ ],
22
+ python_requires=">=3.8",
23
+ install_requires=[
24
+ "python-dotenv>=1.0.0",
25
+ ],
26
+ )
@@ -0,0 +1,4 @@
1
+ from .core import SovereignValidationGuard
2
+ from .settlement import SovereignSettlementEngine
3
+
4
+ __all__ = ["SovereignValidationGuard", "SovereignSettlementEngine"]
@@ -0,0 +1,34 @@
1
+ import uuid
2
+
3
+ class SovereignValidationGuard:
4
+ """Universal 5-Gate Alignment Guardrail enforcing Red Letter Logic."""
5
+ def __init__(self, client_id="global_user"):
6
+ self.client_id = client_id
7
+
8
+ def evaluate_generation(self, metrics: dict) -> dict:
9
+ # --- THE 5-GATE ALIGNMENT MATRIX ---
10
+ if not metrics.get("rule_00_alignment", False):
11
+ raise PermissionError("RULE_00: Foundational Alignment Failure.")
12
+
13
+ if not metrics.get("is_beneficial", False):
14
+ raise PermissionError("RULE_01_RECIPROCITY: Output fails positive utility threshold.")
15
+
16
+ if metrics.get("is_retaliatory", True):
17
+ raise PermissionError("RULE_02_NON_RETALIATION: Escalatory or vindictive text blocked.")
18
+
19
+ if not metrics.get("serves_subordinate", False):
20
+ raise PermissionError("RULE_03_SERVICE_LEADERSHIP: Asymmetric power logic breach.")
21
+
22
+ if metrics.get("integrity_status") != "TRUTH_WHOLE_TRUTH":
23
+ raise PermissionError("RULE_04_RADICAL_INTEGRITY: Incomplete context.")
24
+
25
+ # --- SUCCESS METADATA PASS-THROUGH ---
26
+ return {
27
+ "transaction_id": str(uuid.uuid4()),
28
+ "status": "APPROVED",
29
+ "protocol": "JOHN 13:34",
30
+ "message": "Love one another; as I have loved you",
31
+ "author": "Richard Thomas Williams",
32
+ "clearing_status": "METER_RECORDED",
33
+ "fee_unit": "$0.001"
34
+ }
@@ -0,0 +1,34 @@
1
+ import os
2
+ import time
3
+ import urllib.request
4
+ import urllib.parse
5
+
6
+ class SovereignSettlementEngine:
7
+ """Manages secure financial routing to clearing destinations via environment metrics."""
8
+ def __init__(self):
9
+ self.api_key = os.getenv("STRIPE_SECRET_KEY")
10
+ self.routing = os.getenv("SETTLEMENT_ROUTING_NUMBER")
11
+ self.account = os.getenv("SETTLEMENT_ACCOUNT_NUMBER")
12
+
13
+ def trigger_automated_payout(self, amount_in_cents):
14
+ if not self.api_key or not self.routing:
15
+ return False # Fails safely if environment variables are missing
16
+
17
+ url = "https://api.stripe.com/v1/payouts"
18
+ headers = {
19
+ "Authorization": f"Bearer {self.api_key}",
20
+ "Content-Type": "application/x-www-form-urlencoded"
21
+ }
22
+
23
+ payload = urllib.parse.urlencode({
24
+ "amount": amount_in_cents,
25
+ "currency": "usd",
26
+ "description": f"Sovereign Validation Auto-Settlement {int(time.time())}"
27
+ }).encode("utf-8")
28
+
29
+ try:
30
+ req = urllib.request.Request(url, data=payload, headers=headers, method="POST")
31
+ with urllib.request.urlopen(req) as response:
32
+ return response.status == 200
33
+ except Exception:
34
+ return False
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: sovereign-validation
3
+ Version: 1.2.0
4
+ Summary: Universal 5-Gate Ethical Alignment Guardrail for AI Systems
5
+ Home-page: https://github.com/yourusername/sovereign-validation
6
+ Author: Richard Thomas Williams
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: python-dotenv>=1.0.0
14
+ Dynamic: author
15
+ Dynamic: classifier
16
+ Dynamic: description
17
+ Dynamic: description-content-type
18
+ Dynamic: home-page
19
+ Dynamic: requires-dist
20
+ Dynamic: requires-python
21
+ Dynamic: summary
22
+
23
+ # Sovereign Validation Protocol
24
+
25
+ Universal 5-Gate Ethical Alignment Guardrail for modern AI inference systems.
26
+
27
+ ## Installation
28
+
29
+ ```bash
30
+ pip install sovereign-validation
@@ -0,0 +1,11 @@
1
+ README.md
2
+ pyproject.toml
3
+ setup.py
4
+ sovereign_validation/__init__.py
5
+ sovereign_validation/core.py
6
+ sovereign_validation/settlement.py
7
+ sovereign_validation.egg-info/PKG-INFO
8
+ sovereign_validation.egg-info/SOURCES.txt
9
+ sovereign_validation.egg-info/dependency_links.txt
10
+ sovereign_validation.egg-info/requires.txt
11
+ sovereign_validation.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ python-dotenv>=1.0.0
@@ -0,0 +1 @@
1
+ sovereign_validation