Skip to main content

web4-trust-core

Core trust primitives for the Web4 ecosystem, implemented in Rust with Python bindings.

Features

  • T3 Trust Tensor — 3 root dimensions (Talent / Training / Temperament), each itself an open-ended RDF sub-graph of context-specific sub-dimensions via web4:subDimensionOf. Fractally extensible.
  • V3 Value Tensor — 3 root dimensions (Valuation / Veracity / Validity), same fractal RDF pattern.
  • EntityTrust — Combines T3 + V3 with witnessing relationships, role-binding, and decay.
  • TrustStore — Persistent storage with JSON format compatibility. Includes from_legacy_6d migration helper for prior 6-flat-dimension data.

T3 Root Dimensions

  • Talent — Natural aptitude and capability for a specific role
  • Training — Acquired expertise, certifications, and experience
  • Temperament — Behavioral consistency, reliability, ethical disposition

V3 Root Dimensions

  • Valuation — Worth ascribed to the contribution
  • Veracity — Truthfulness and reliability of the claim
  • Validity — Soundness and applicability in context

Each root dimension is fractally extensible via web4:subDimensionOf — sub-dimensions form an RDF sub-graph that aggregates back into the root scalar. T3 and V3 are not fixed-size 6-vectors; they are typed multidimensional ontologies with 3 anchor roots.

Formal ontology: web4-standard/ontology/t3v3-ontology.ttl

Installation

pip install web4-trust

Or build from source:

pip install maturin
maturin develop

Usage

from web4_trust import TrustStore, EntityTrust

# Open the default store (~/.web4/governance/entities)
store = TrustStore()

# Get or create entity trust
trust = store.get("mcp:filesystem")
print(f"T3 average: {trust.t3_average():.3f}")
print(f"Trust level: {trust.trust_level()}")

# Update from action outcome
store.update("mcp:filesystem", success=True, magnitude=0.1)

# Witness event: session observes MCP server
witness_trust, target_trust = store.witness(
    "session:abc",
    "mcp:filesystem",
    success=True,
    magnitude=0.1
)
print(f"MCP trust after witnessing: {target_trust.t3_average():.3f}")

Architecture

┌─────────────────────────────────────────┐
│  web4-trust-core (Rust)                 │
│  - T3/V3 tensor math (3 roots, fractal) │
│  - EntityTrust with witnessing          │
│  - Decay calculations                   │
│  - Storage backends                     │
│  - from_legacy_6d migration helper      │
└─────────────────────────────────────────┘
              │
    ┌─────────┴─────────┐
    │  PyO3 Bindings    │
    └─────────┬─────────┘
              │
    ┌─────────┴─────────┐
    │  Python Package   │
    │  (web4_trust)     │
    └───────────────────┘

Patent Notice

This software implements technology covered by US Patents 11,477,027 and 12,278,913, and pending application 19/178,619. See the repo-root PATENTS.md for the patent grant terms.

License

AGPL-3.0-or-later. See repo-root LICENSE.

Metadata

Release files for web4-trust 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for web4-trust 0.2.0
File Interpreter ABI Platform
web4_trust-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details

Release files / web4_trust-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL web4_trust-0.2.0-cp312-cp312-manylinux_2_34_x86_64.whl
Size 373.6 kB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
4316d024d94989b7e0e40ca2806e13bf15bc98a0d263f44c396aa6719d499fd6
BLAKE2b-256 checksum
How to use checksums
5ea5814cff9f2ff4973a7606a5fbb823c002b1672f18fce2ede520065c1bf5b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page