Metadata-Version: 2.4
Name: winnex-tracer
Version: 1.1.0
Summary: The unified Winnex tracer family — shared core (WORM, Ed25519 signing, AuditCommitment) plus the gov/med/jus/gap domains, in one namespaced package.
Author-email: Winnex Brasil Soluções Empresariais LTDA-ME <pay@winnex.ai>
License: Business Source License 1.1
        
        License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
        "Business Source License" is a trademark of MariaDB Corporation Ab.
        
        Parameters
        
        Licensor:             Winnex AI
        Licensed Work:        Tracer-GOV
        Additional Use Grant: Free for Brazilian government agencies.
                              Any use by a public sector entity in Brazil is permitted.
        
        Change Date:          2036-01-01
        Change License:       GNU General Public License v2.0 or later
        
        For inquiries: pay@winnex.ai
        
Project-URL: Homepage, https://winnex.ai
Project-URL: Source, https://github.com/winnex-ai/winnex-tracer
Keywords: audit,worm,ed25519,compliance,vector-search,proof,cauchy-schwarz,tracer,lgpd,gdpr,hipaa,signature,government,healthcare,legal,financial,non-repudiation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Other Audience
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Database
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Provides-Extra: signature
Requires-Dist: pynacl>=1.5; extra == "signature"
Provides-Extra: madhava
Requires-Dist: winnex-madhava>=1.9.2; extra == "madhava"
Provides-Extra: gov
Requires-Dist: fastapi>=0.100; extra == "gov"
Requires-Dist: uvicorn>=0.20; extra == "gov"
Provides-Extra: med
Requires-Dist: fastapi>=0.100; extra == "med"
Requires-Dist: uvicorn>=0.20; extra == "med"
Requires-Dist: sentence-transformers>=2.2; extra == "med"
Provides-Extra: jus
Requires-Dist: fastapi>=0.100; extra == "jus"
Requires-Dist: uvicorn>=0.20; extra == "jus"
Requires-Dist: sentence-transformers>=2.2; extra == "jus"
Provides-Extra: gap
Requires-Dist: fastapi>=0.100; extra == "gap"
Requires-Dist: uvicorn>=0.20; extra == "gap"
Requires-Dist: sentence-transformers>=2.2; extra == "gap"
Provides-Extra: pg
Requires-Dist: psycopg2-binary>=2.9; extra == "pg"
Provides-Extra: blockchain
Requires-Dist: web3>=6.0; extra == "blockchain"
Provides-Extra: all
Requires-Dist: pynacl>=1.5; extra == "all"
Requires-Dist: winnex-madhava>=1.9.2; extra == "all"
Requires-Dist: fastapi>=0.100; extra == "all"
Requires-Dist: uvicorn>=0.20; extra == "all"
Requires-Dist: sentence-transformers>=2.2; extra == "all"
Requires-Dist: psycopg2-binary>=2.9; extra == "all"
Requires-Dist: web3>=6.0; extra == "all"
Dynamic: license-file

# winnex-tracer

**The unified Winnex tracer family — one package, namespaced domains.**

Shared core (WORM storage, Ed25519 signing, AuditCommitment) plus the
gov/med/jus/gap domains, in a single pip package. Each domain lives under
its own namespace (`winnex_tracer.gov`, `winnex_tracer.med`, ...) so there
is **no module collision** between the old separate tracer-gov/med/jus/gap
packages (which all used top-level `core`/`persistence`/`api`).

```
winnex_tracer/
├── core/    — WORM, Signer (Ed25519/ICP), AuditLogTracker, RetentionPolicy, commitment
├── gov/     — TracerEngine, 9 jurisdictions, LGPD/LAI/TCU/CGU compliance
├── med/     — MedicalEngine, clinical triage, FHIR
├── jus/     — LegalEngine, e-Discovery, evidence chain
└── gap/     — GapEngine, SEC loader, gap analysis
```

## Install

```bash
pip install winnex-tracer                # core only (WORM, Signer, commitment)
pip install winnex-tracer[gov]           # + government domain + FastAPI
pip install winnex-tracer[med]           # + healthcare domain
pip install winnex-tracer[jus]           # + legal domain
pip install winnex-tracer[gap]           # + financial domain
pip install winnex-tracer[all]           # everything
```

The search engine (`winnex-madhava >= 1.9.2`) is an optional extra
(`winnex-tracer[madhava]`) — each domain works with a built-in fallback.

## The AuditCommitment (production audit trail)

The C++ motor returns a compact commitment (`total_excluded_count` +
`global_threshold` + a deterministic boundary sample) instead of the full
O(N) certificate (~2 MB at scale). `winnex_tracer.core` signs it with
**Ed25519** for non-repudiation, then stores the ~500-byte record in the
WORM.

```python
from winnex_tracer.core import make_worm_record, verify_record, public_key_hex
from winnex_tracer.persistence import WormStorage

record = make_worm_record(engine, query, k=10, max_sample=50)  # ~500 B
WormStorage(base_path="/var/lib/tracer/worm").append(record)

v = verify_record(record, public_key_hex())   # VALID / INVALID
```

## Regionalized government metadata (global / multilanguage)

The gov domain is **global**: each jurisdiction uses its own field names.

| Jurisdiction | Language | Required fields |
|---|---|---|
| `br-gv` | pt-BR | `orgao_requisitante`, `cpf`, `funcao`, `base_de_dados`, `sensibilidade`, `finalidade` |
| `pt-gv` | pt-PT | `orgao_requisitante`, `numero_identificacao`, `funcao`, ... |
| `us-gv` / `eu-gv` / `global` | EN | `requesting_agency`, `operator_id`, `role`, `source_database`, `sensitivity`, `purpose` |

Generic English field names are **auto-mapped** to the regional names for
Portuguese jurisdictions (e.g. `requesting_agency` → `orgao_requisitante`),
so one client works across jurisdictions:

```python
from winnex_tracer.gov.core import TracerEngine, Config

eng = TracerEngine(Config(jurisdiction="br-gv"))
eng.validate_metadata({"requesting_agency": "TCU", "cpf": "...", ...})  # []
```

## License

Business Source License 1.1 (BSL 1.1) | pay@winnex.ai |
Winnex Brasil Soluções Empresariais LTDA (CNPJ 58.364.637/0001-47)
