How triviantechnologies/tria-sdk works
TRIA is a model-agnostic governance SDK. A host creates relationships and records attributable claims and authority; it evaluates consent, permissions, policy, and context before execution; events preserve auditable state for inspection and replay. The graph emphasizes this host-to-governed-action path and documented truth-integrity, provider, and replay capabilities. Source excerpts and the index support the central runtime links; unsampled feature links are included only where the README documents them.
Main entry points: store.py Event stores · core.py Relationship API · runtime.py Invocation runtime · execution.py Execution bridge
Components 21
Relationship records
- TRIA factory
src/tria/core.py - Relationship API
src/tria/core.py - Claims and lineage
src/tria/core.py - State projection
src/tria/state.py - Domain records
src/tria/types.py
Governance and assessment
- Governance engine
src/tria/governance.py - Action diagnostics
src/tria/diagnostic.py - Truth integrity
src/tria/integrity.py - Claim release assessment
src/tria/release.py - Disclosure boundary
src/tria/boundary.py
Governed execution
- Invocation runtime
src/tria/runtime.py - Execution bridge
src/tria/execution.py - Provider adapters
src/tria/providers/base.py
Persistence and replay
- Event history
src/tria/events.py - Event stores
src/tria/store.py - Replay bundles
src/tria/portable.py - Schema compatibility
src/tria/compat.py
Other components
- Host application
- Provider services
- Local playground
playground/adapter.py - Requesting agent
Connections 23
- Host application → TRIA factory: creates relationship
README.md - TRIA factory → Event stores: selects store
src/tria/core.py - Relationship API → Event stores: commits events
src/tria/core.py - Relationship API → Governance engine: checks authority
src/tria/core.py - Relationship API → Claims and lineage: registers claims
src/tria/core.py - Event stores → Event history: persists
src/tria/store.py - State projection → Event history: replays history
src/tria/state.py - Governance engine → State projection: evaluates state
src/tria/governance.py - Host application → Action diagnostics: requests inspection
README.md - Action diagnostics → Truth integrity: assesses evidence
src/tria/diagnostic.py - Host application → Claim release assessment: assesses claims
README.md - Host application → Disclosure boundary: mediates disclosure
- Requesting agent → Execution bridge: proposes invocation
README.md - Execution bridge → Invocation runtime: evaluates request
src/tria/execution.py - Invocation runtime → Governance engine: checks requirements
src/tria/runtime.py - Execution bridge → Provider adapters: translates allowed plan
src/tria/execution.py - Provider adapters → Provider services: sends provider request
- Host application → Replay bundles: exports or imports replay
README.md - Replay bundles → Event stores: reads and restores
src/tria/portable.py - Replay bundles → Schema compatibility: checks versions
src/tria/portable.py - Local playground → TRIA factory: uses local SDK
playground/adapter.py - Claims and lineage → Domain records: uses domain records
src/tria/core.py - Invocation runtime → Domain records: uses request records
src/tria/runtime.py