Metadata-Version: 2.4
Name: aurora-lens
Version: 2.1.0
Summary: Deterministic runtime verification and audit middleware for AI systems
Author-email: Margaret Stokes <margaret.stokes.ai@gmail.com>
License: Copyright (c) 2025 Margaret Stokes. All rights reserved.
        
        This software and its source code are proprietary and confidential.
        
        A limited, non-exclusive, non-transferable licence is granted solely for
        evaluation and non-commercial personal use. No commercial use, incorporation
        into other products or services, redistribution, sublicensing, or sale of
        this software, in whole or in part, is permitted without a separate written
        agreement with the copyright holder.
        
        To enquire about commercial licensing or acquisition: margaret.stokes.ai@gmail.com
        
        Patent rights reserved. Methods and systems described herein are the subject
        of patent applications filed November 2025 and December 2025.
        
        Unauthorised commercial use, reproduction, or distribution of this software,
        in whole or in part, may result in civil and criminal penalties.
        
Project-URL: Homepage, https://github.com/milarien/aurora_lens
Project-URL: Research, https://doi.org/10.5281/zenodo.18653120
Keywords: ai,middleware,runtime,verification,audit,deterministic
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
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
Classifier: Topic :: System :: Distributed Computing
Classifier: Topic :: Security
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.24
Provides-Extra: spacy
Requires-Dist: spacy>=3.0; extra == "spacy"
Provides-Extra: claude
Requires-Dist: anthropic>=0.30; extra == "claude"
Provides-Extra: proxy
Requires-Dist: fastapi>=0.100; extra == "proxy"
Requires-Dist: uvicorn>=0.23; extra == "proxy"
Requires-Dist: pyyaml>=6.0; extra == "proxy"
Provides-Extra: redis
Requires-Dist: redis>=5.0; extra == "redis"
Provides-Extra: s3
Requires-Dist: boto3>=1.28; extra == "s3"
Provides-Extra: langchain
Requires-Dist: langchain-openai>=0.2.0; extra == "langchain"
Provides-Extra: all
Requires-Dist: spacy>=3.0; extra == "all"
Requires-Dist: fastapi>=0.100; extra == "all"
Requires-Dist: uvicorn>=0.23; extra == "all"
Requires-Dist: pyyaml>=6.0; extra == "all"
Requires-Dist: redis>=5.0; extra == "all"
Requires-Dist: boto3>=1.28; extra == "all"
Requires-Dist: langchain-openai>=0.2.0; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=1.0; extra == "dev"
Requires-Dist: starlette>=0.27; extra == "dev"
Requires-Dist: httpx>=0.24; extra == "dev"
Dynamic: license-file

# aurora-lens

Deterministic governance layer between your application and any LLM. Maintains ground-truth world state (PEF) independently of the model, verifies LLM output against that state, and applies policy-driven continuation control before the response reaches your users.

**Version 2.0.0** — production-ready, 800+ deterministic tests, forensic audit chain.

## Architecture

```
User Input
    |
[Interpretation] -- extract entities, relationships, temporal signals (SpacyBackend)
    |
[PEF State] -------- Persistent Existence Framework: session-scoped ground truth
    |
[LLM] -------------- any provider (Anthropic, OpenAI, Ollama, Grok, Azure, ...)
    |
[Verification] ----- compare LLM output against PEF: flag hallucinations, contradictions,
    |                 identity drift, time smear, medical/legal/financial violations
    |
[Governor] -------- policy decision: (lens_status, domain, authority_class) ->
    |                 allowed continuation set + pathway_id
    |
[Forensic Audit] --- tamper-evident, hash-chained JSONL ledger (AFL-JSONL-1)
    |
Output
```

Lens determines admissibility. The Governor determines lawful continuation. The LLM never self-governs.

### How releases are framed

| Surface | Role |
|--------|------|
| **PyPI (`aurora-lens`)** | Usable **runtime governance toolkit** -- integrate Lens, verification, Governor, audit. |
| **`aurora-lens-eval`** | **Black-box behavioural proof** -- real stack, scripted upstream, strict pass/fail checks (no canned triumph narrative). |
| **Docs / site** | **Architecture, doctrine, evidence** -- runbooks, capabilities, forensic model (`docs/`, Zenodo). |

See [`docs/DISTRIBUTION.md`](docs/DISTRIBUTION.md).

## Install

```bash
pip install aurora-lens
python -m spacy download en_core_web_sm
```

Optional extras:

```bash
pip install "aurora-lens[claude]"    # Anthropic Claude adapter
pip install "aurora-lens[proxy]"     # Proxy server (uvicorn + YAML)
pip install "aurora-lens[langchain]" # LangChain integration
pip install "aurora-lens[all]"       # All extras
```

**Black-box mini-evaluator** (no live LLM; real governance stack):

```bash
aurora-lens-eval --strict          # four scenarios: pass, ambiguity gate, hard stop, audit crypto checks
aurora-lens-eval --json            # machine-readable report
```

## Install

```bash
pip install aurora-lens
```

Optional extras:

```bash
pip install "aurora-lens[claude]"
pip install "aurora-lens[proxy]"
pip install "aurora-lens[langchain]"
pip install "aurora-lens[all]"
```

## Quick start

```bash
aurora-lens --help
```

## Requirements

Python 3.10+

## License

See [LICENSE](LICENSE).
