Skip to main content

Core schemas and utilities for Substr8 RunProof system

Project description

substr8-core

Core schemas and utilities for the Substr8 RunProof system.

Installation

pip install substr8-core

Usage

RunProof Schema

from substr8_core.schemas import RunProof, RunProofHeader, TraceEntry

# Create a RunProof
proof = RunProof(
    schema_version="runproof/v2",
    header=RunProofHeader(
        proof_id="proof_abc123",
        run_id="run_xyz789",
        agent_id="claims/orchestrator",
        runtime="langgraph",
        started_at="2026-03-09T10:00:00Z",
        status="completed"
    ),
    # ... rest of proof
)

# Serialize
proof_json = proof.model_dump_json()

# Validate
proof = RunProof.model_validate_json(proof_json)

RunState Schema

from substr8_core.schemas import RunState, LifecycleStatus

# Create run state
state = RunState(
    run_id="run_xyz789",
    agent_id="claims/orchestrator",
    lifecycle_status=LifecycleStatus.RUNNING,
    current_node="validate_output",
    step_index=5
)

# Update state
state.lifecycle_status = LifecycleStatus.COMPLETED

Verification

from substr8_core.crypto import verify_proof

result = verify_proof(proof)
print(result.valid)  # True/False
print(result.checks)  # Detailed check results

Schema Version

This package implements RunProof schema version runproof/v2.

License

MIT © 2026 Substr8 Labs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

substr8_core-0.2.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

substr8_core-0.2.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file substr8_core-0.2.0.tar.gz.

File metadata

  • Download URL: substr8_core-0.2.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for substr8_core-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b90b114688414de38cd547e1dcc35af009ac2d364168c006594773c1fdff52a3
MD5 6c7bf2caa19f4c458b4ef9f76e689015
BLAKE2b-256 ff39ab2b504081f1307ad904b65ce2cabeb945163e2590c22aca85338e8a0dbb

See more details on using hashes here.

File details

Details for the file substr8_core-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: substr8_core-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for substr8_core-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4454e90830bf09d23622e63f4d95a024317655b65e4e0ce42cc9b91e3a8b8ce9
MD5 4e4a1193867f1ee8e68b830c0b65bcc2
BLAKE2b-256 a8e4eda81b5dfbe54cd8e1cf84fa02ac41dbaab40fab067149913d8eaded9494

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page