USD Substrate
Python state engine for the Cognitive Orchestrator platform.
Installation
pip install usd-substrate
Usage
from datetime import datetime
from usd_substrate import (
JsonInterchangeReader,
JsonInterchangeWriter,
SessionState,
ActiveMode,
Paradigm,
EnergyLevel,
BurnoutLevel,
MomentumPhase,
AgentType,
)
# Create a session state
state = SessionState(
session_id="my-session",
timestamp=datetime.now().isoformat(),
active_mode=ActiveMode.FOCUSED,
active_paradigm=Paradigm.CORTEX,
energy_level=EnergyLevel.MEDIUM,
burnout_level=BurnoutLevel.GREEN,
momentum_phase=MomentumPhase.BUILDING,
session_start_goal="Complete the project",
)
# Write to file
writer = JsonInterchangeWriter()
doc = writer.create_session_state_document(state)
writer.write_to_file(doc, "cognitive_state.json")
# Read from file
reader = JsonInterchangeReader()
loaded = reader.read_from_file("cognitive_state.json")
session = reader.extract_session_state(loaded)
# Create a cross-agent handoff
arc_doc = writer.create_mycelium_arc(
session_state=state,
source_agent=AgentType.CLAUDE_CODE,
target_agent=AgentType.GEMINI_CLI,
resume_summary="Working on implementation",
)
Features
- Pydantic Models: Full type validation
- Checksum Verification: Document integrity
- Safety Constraints: RED burnout protection
- Cross-Agent Handoffs: Mycelium Arc protocol
License
MIT
Metadata
Release files for usd-substrate 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| usd_substrate-1.0.0.tar.gz | 23.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| usd_substrate-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.4 kB
Release files / usd_substrate-1.0.0.tar.gz
| Download URL | usd_substrate-1.0.0.tar.gz |
|---|---|
| Size | 23.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5779e9b5b51fbeb5d577396fc0d917fb838c52a1fa265ce9a0149708f4527b1e
|
|
BLAKE2b-256 checksum How to use checksums |
4072f92e3228d23aa4a82b9ebc90e86e3cf7273742800e3310c068c6c360b1ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / usd_substrate-1.0.0-py3-none-any.whl
| Download URL | usd_substrate-1.0.0-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0587ffe8cfa0d403b56455c91d58d19fe6b2d29d38ac3de0291bfd517fd0139
|
|
BLAKE2b-256 checksum How to use checksums |
364aba9330d0f64ba4dff17fc816e0b723a3a7a2def77a1d083545dca70f2bb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for usd-substrate 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.