Metadata-Version: 2.4
Name: sigmagate
Version: 0.1.0
Summary: Sigmagate SDK — Physics-gated AI, VERAX truth auditing, and document sealing in one package.
Author-email: José Casado Martínez <hello@sigmagate.io>
License: MIT
Project-URL: Homepage, https://sigmagate.io
Project-URL: Documentation, https://sigmagate.io/docs/sdk
Project-URL: Repository, https://github.com/hisocer-lab/sigmagate-sdk
Keywords: ai,verification,verax,physics,coherence,seal,llm,gate
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28
Requires-Dist: click>=8.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: responses>=0.25; extra == "dev"

# Sigmagate SDK

**Physics-gated AI, VERAX truth auditing, and HCQ document sealing — in one Python package.**

[![PyPI version](https://img.shields.io/pypi/v/sigmagate.svg)](https://pypi.org/project/sigmagate/)
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/)
[![Tests](https://img.shields.io/badge/tests-23%2F23-brightgreen.svg)](https://github.com/hisocer-lab/sigmagate-sdk)

```bash
pip install sigmagate
```

## Quick start

```python
from sigmagate import Sigmagate

sg = Sigmagate(api_key="your-key")

# Measure quantum coherence (qR)
state = sg.qr.measure()
print(state.level)          # DEEP_CRYSTAL | CASI_EP | DEEP_NOISE

# Gate a function — only executes when coherence is high enough
@sg.gate(threshold=1.0)
def sign_contract(doc):
    return process(doc)

result = sign_contract(doc)
print(result.value, result.qr)   # function output + qR at execution time

# Audit AI-generated text with VERAX
audit = sg.verax.check("The brain uses only 10% of its capacity.")
print(audit.global_score)        # 0–100
for claim in audit.issues:
    print(claim.emoji, claim.text)   # 🔴 problematic claims

# Audit with fix prompts (VERAX Margin)
margin = sg.verax.audit_margin("The brain uses only 10% of its capacity.")
for prompt in margin.fix_prompts:
    print(prompt)   # auto-generated correction instructions

# Seal a document with HCQ (Hash Convergencia Cuántica)
receipt = sg.seal.document("This is the official text.")
print(receipt.hcq)           # HCQ-a1b2c3d4...
print(receipt.verify_url)    # https://sigmagate.io/verify/...

# Verify a seal
result = sg.seal.verify("HCQ-a1b2c3d4")
print(result.valid)          # True / False
```

## CLI

```bash
sgm qr                          # current coherence level
sgm windows --days 7            # crystal windows in last 7 days
sgm audit "text to check"       # VERAX audit
sgm audit "text" --margin       # VERAX Margin with fix prompts
sgm audit report.txt            # audit from file
sgm seal document.pdf           # seal a file
sgm verify HCQ-a1b2c3d4        # verify a seal
sgm health                      # API status
```

## Modules

| Module | Description |
|---|---|
| `sg.qr` | Quantum coherence measurement — `measure()`, `windows()`, `entropy()` |
| `sg.gate` | Physics-gated execution decorator — `@sg.gate(threshold)` |
| `sg.verax` | Truth auditing — `check()`, `audit_margin()` |
| `sg.seal` | HCQ document sealing — `document()`, `verify()` |

## VERAX levels

| Level | Label | Meaning |
|---|---|---|
| V1 | CONFIRMED 🟢 | Solid evidence |
| V2 | VIABLE 🔵 | Partial / plausible |
| V3 | THEORETICAL 🟡 | Speculative, needs source |
| V4 | SPECULATIVE 🔴 | No support / hallucination |

## Installation

```bash
pip install sigmagate
```

Get an API key at [sigmagate.io](https://sigmagate.io).

## Links

- [Documentation](https://sigmagate.io/docs/sdk)
- [API Reference](https://sigmagate.io/docs/api)
- [GitHub](https://github.com/hisocer-lab/sigmagate-sdk)
- [sigmagate.io](https://sigmagate.io)
