sovos-invariants
Sovereign substrate invariants every layer of SOVOS consults:
NAME/OWEM normalization, CARE floor enforcement, SIGIL sign+verify,
tally validation. Absorbed 2026-08-11 from sov_invariants.py
(top-level) into the canonical package form.
Functions
| Function | Job |
|---|---|
normalize_name(value) |
Canonical sovereign-name normalization (whitespace, casing) |
normalize_owem(value) |
OWEM agent identifier normalization |
validate_care_floor(value) |
CARE floor (≥0.95) check on a tally or score |
care_score(text, short_floor=0.0) |
Compute CARE score from text content (≥short_floor) |
validate_tally(tally) |
Validate a tally dict structure |
emit_sigil(payload, tally, care, prev_hash, agent_did) |
Ed25519-signed SIGIL for a chain record |
verify_sigil(sigil, payload) |
Verify a SIGIL |
(private) _private_key() |
Lazy-loaded Ed25519 private key (file at ~/.runpod/sov_sigil_key or /runpod/sov_sigil_key) |
Provenance
The original sov_invariants.py (163 lines) was used by every model in
the substrate — sov4_router.py, csoai_governance.py, forest/*,
api/*.js — but lived at repo root. Pinning it as a package here
gives every other package a canonical import path:
from sovos_invariants import (
care_score, emit_sigil, verify_sigil,
normalize_name, normalize_owem, validate_care_floor, validate_tally,
SOVEREIGN_DID,
)
Use
from sovos_invariants import emit_sigil, verify_sigil, SOVEREIGN_DID, care_score
# sign a payload
sigil = emit_sigil(
payload={"ts": 1722350400, "kind": "audit", "...": "..."},
tally={"yes": 9, "no": 1, "abstain": 0},
care=0.95,
agent_did=SOVEREIGN_DID,
)
# verify
ok = verify_sigil(sigil, payload)
Cross-link
The SIGIL/CARE crypto layer is a substrate-wide primitive. Every
package that signs attestations (sovos-arena, sovos-oscal,
sovos-chain, the absorbed sovos-router, etc.) is expected to
import from here. The sigil key is not in this repo (lives on
the runtime host per ~/.runpod/sov_sigil_key); the package is
fine on the Mac without it but emits nothing verifiable without the
key — exactly the right hardening for a public repo.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sovos_invariants-0.1.0.tar.gz.
File metadata
- Download URL: sovos_invariants-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8b3d10db4bebd9de4e869bdbd8ae6eb2fac2e904c2f06290070677110d5d741
|
|
| MD5 |
a7762b22a9e590f6b3d3143915fef082
|
|
| BLAKE2b-256 |
7f53df868cbdfc67d4cce2f663b2bc9e2c436360c06afdc04640ab5b2fd7e882
|
File details
Details for the file sovos_invariants-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sovos_invariants-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75f0fa2f7fd22fccbcb62b4385c3cbe78470b0ba10b1c756c6c6a9b2fc99d7c8
|
|
| MD5 |
60ac1d4aaf6e3dc9fb84d1a824a5baa5
|
|
| BLAKE2b-256 |
d3e17b3caa4d424185d551802c19e7d2d2b5087c60b44aeba6d47bcb70bd0725
|