Metadata-Version: 2.4
Name: usd-substrate
Version: 1.0.0
Summary: USD Cognitive Substrate - State engine for multi-agent AI orchestration
Author: Human + Claude Code
License-Expression: MIT
Project-URL: Homepage, https://github.com/JosephOIbrahim/cognitive-orchestrator
Project-URL: Documentation, https://github.com/JosephOIbrahim/cognitive-orchestrator#readme
Project-URL: Repository, https://github.com/JosephOIbrahim/cognitive-orchestrator
Keywords: cognitive,orchestration,multi-agent,claude,gemini,adhd,usd,state-management
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: pydantic>=2.0.0
Requires-Dist: cryptography>=41.0.0
Requires-Dist: filelock>=3.12.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"

# USD Substrate

Python state engine for the Cognitive Orchestrator platform.

## Installation

```bash
pip install usd-substrate
```

## Usage

```python
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
