How gautam-r-patil/s.o.v.a---oss---truscor works
Purpose and entry points
SOVA OSS is a local-first Python system for assessing authorized AI-agent behavior, preserving observations as portable evidence, and replaying or reproducing bounded experiments. Primary entry points are the sova CLI and module launcher: src/sova/cli.py, src/sova/__main__.py, and package root src/sova/__init__.py. The command surface coordinates mapping, controlled execution, trace/capsule handling, evidence review, monitoring, and community workflows.
Contracts, canonical formats, and evidence boundary
Shared domain rules define identifiers, lifecycle states, taxonomy, coverage, and version semantics in src/sova/contracts/, especially src/sova/contracts/lifecycle.py and src/sova/contracts/versions.py. Canonical package and schema handling lives in src/sova/formats/canonical.py, src/sova/formats/package.py, and src/sova/schemas/.
.sova capsules package scenarios, findings, provenance, and linked artifacts; .sova-trace records event streams. The format boundary is intentionally inert: inspection, validation, migration, and playback must not execute a scenario.
Trace capture, integrity, and replay
Trace infrastructure writes ordered, redacted, integrity-protected events and supports offline reading/verification: src/sova/trace/writer.py, src/sova/trace/integrity.py, and src/sova/trace/redaction.py. Evidence objects, reports, disclosure preparation, and adjudication are separated in src/sova/evidence/model.py, src/sova/evidence/bundle.py, and src/sova/evidence/adjudication.py.
Replay has distinct inert playback, controlled re-execution, and semantic reproduction paths in src/sova/replay/service.py, src/sova/replay/controlled.py, and src/sova/replay/verification.py. This is the core evidence boundary: recorded observations and deterministic oracle inputs are treated differently from attacker-controlled assertions.
Assessment pipeline: map, execute, observe, judge
Capability discovery builds a typed, provenance-aware graph without importing or executing target code: src/sova/mapping/discovery.py, src/sova/mapping/analysis.py, and src/sova/mapping/drift.py. Controlled assessments and bounded checks are coordinated through src/sova/assessment.py, src/sova/workflows/check.py, and src/sova/search/engine.py.
Synthetic detonation provides contained targets, sensors, coverage accounting, and deterministic world state in src/sova/detonation/world.py, src/sova/detonation/sensors.py, and src/sova/detonation/backends.py. Oracles and declared-outcome comparison determine confirmed, not-observed, or inconclusive outcomes rather than asserting universal safety.
Safety, authorization, and execution adapters
Authorization, containment, privacy, and disclosure controls are explicit gates before consequential operations: src/sova/safety/authorization.py, src/sova/safety/containment.py, and src/sova/safety/privacy.py. Executors share a versioned capability contract in src/sova/executors/contract.py; implementations include deterministic scripted execution, restricted local processes, Docker Desktop, and gVisor: src/sova/executors/scripted.py, src/sova/executors/local.py, src/sova/executors/gvisor.py.
MCP routing is isolated behind broker/protocol layers in src/sova/mcp/broker.py and src/sova/mcp/protocol.py. The local MCP server applies separate approval controls via src/sova/local_mcp/server.py and src/sova/local_mcp/approval.py.
Runtime, live/browser, providers, and advanced studies
Provider-neutral roles, sessions, profiles, and evidence-aware orchestration reside in src/sova/runtime/orchestration.py, src/sova/runtime/evidence.py, and src/sova/runtime/sessions.py; provider adapters are under src/sova/providers/. Browser and live-target assessment is isolated in src/sova/live/browser.py, src/sova/live/campaign.py, and src/sova/live/semantic_browser_driver.py.
Specialized bounded workflows extend the same trace/evidence substrate: trigger search (src/sova/search/), composition planning (src/sova/composition/search.py), rehearsal (src/sova/rehearsal/runner.py), and causal reconstruction (src/sova/forensics/reconstruct.py).
Monitoring, sharing, and deployment
Local behavioral monitoring compares snapshots and emits signed evidence through src/sova/monitoring/diff.py, src/sova/monitoring/sentinel.py, and src/sova/monitoring/service.py. Offline-first registry indexing, verification, mirroring, and contribution staging live in src/sova/registry/index.py, src/sova/registry/service.py, and src/sova/registry/sync.py.
The optional community service is deployed as a containerized, operator-managed boundary using deploy/community/compose.yaml, deploy/community/Dockerfile, and deploy/community/preflight.py; Caddy fronts that service. External integrations include OpenTelemetry/OpenInference mappings, optional Ed25519 signing, Playwright MCP/browser execution, optional MELRA/CUA adapters, and configurable model providers. No SOVA-hosted service is required for core workflows.
Main entry points: assessment.py Assessment coordinator · cli.py CLI & module launcher · canonical.py Capsules & schemas · service.py Replay services
Components 19
Core workflow
- CLI & module launcher
src/sova/cli.py - Domain contracts · Identifiers, lifecycle, taxonomy, coverage, and versions.
src/sova/contracts/lifecycle.py - Capability mapping · Builds provenance-aware graphs without executing targets.
src/sova/mapping/discovery.py - Assessment coordinator
src/sova/assessment.py - Checks & outcome oracles · Classifies confirmed, not-observed, or inconclusive results.
src/sova/workflows/check.py
Evidence boundary
- Capsules & schemas · Inert .sova package and schema boundary.
src/sova/formats/canonical.py - Trace capture · Writes ordered, redacted, integrity-protected .sova-trace events.
src/sova/trace/writer.py - Evidence & adjudication · Bundles reports, disclosures, and adjudicated findings.
src/sova/evidence/bundle.py - Replay services · Separates inert playback, controlled replay, and semantic reproduction.
src/sova/replay/service.py
Safety & execution
- Authorization & containment · Gates consequential operations with privacy controls.
src/sova/safety/authorization.py - Execution adapters · Scripted, restricted local, Docker, and gVisor implementations.
src/sova/executors/contract.py - Synthetic detonation · Provides deterministic worlds, sensors, and coverage.
src/sova/detonation/world.py - MCP broker
src/sova/mcp/broker.py
Runtime & studies
- Provider runtime · Provider-neutral sessions, roles, profiles, and evidence-aware orchestration.
src/sova/runtime/orchestration.py - Live & browser campaigns
src/sova/live/campaign.py - Advanced studies · Search, composition, rehearsal, and causal reconstruction.
src/sova/search/engine.py
Monitoring & sharing
- Behavior monitoring · Compares snapshots and emits signed evidence.
src/sova/monitoring/service.py - Offline-first registry · Indexes, verifies, mirrors, and stages contributions.
src/sova/registry/service.py - Optional community service · Operator-managed service fronted by Caddy.
deploy/community/compose.yaml
Connections 26
- CLI & module launcher → Capability mapping: maps
- CLI & module launcher → Assessment coordinator: runs
- CLI & module launcher → Replay services: replays
- CLI & module launcher → Behavior monitoring: monitors
- Domain contracts → Assessment coordinator: governs
- Domain contracts → Capsules & schemas: versions
- Capability mapping → Assessment coordinator: capability graph
- Assessment coordinator → Authorization & containment: authorization gate
- Authorization & containment → Execution adapters: permits bounded execution
- Assessment coordinator → Checks & outcome oracles: declared checks
- Checks & outcome oracles → Synthetic detonation: contained targets
- Execution adapters → Synthetic detonation: executes
- Synthetic detonation → Trace capture: observations
- Trace capture → Evidence & adjudication: recorded evidence
- Checks & outcome oracles → Evidence & adjudication: adjudicates outcomes
- Capsules & schemas → Evidence & adjudication: packages capsules
- Trace capture → Replay services: offline read and verify
- Capsules & schemas → Replay services: inert playback
- Replay services → Authorization & containment: controlled re-execution
- Provider runtime → Execution adapters: provider sessions
- Provider runtime → MCP broker: tool routing
- Live & browser campaigns → Provider runtime: browser campaigns
- Advanced studies → Assessment coordinator: extends substrate
- Behavior monitoring → Evidence & adjudication: signed evidence
- Offline-first registry → Capsules & schemas: verifies packages
- Offline-first registry → Optional community service: optional sync