Metadata-Version: 2.4
Name: zanii-oversight-sdk
Version: 0.1.0
Summary: Client for a supervised firm's own systems: hear Zanii Oversight events and answer evidence requests without a person typing. Python twin of @zanii/oversight-sdk.
Author-email: Zanii AI <info@zanii.agency>
License-Expression: Apache-2.0
Project-URL: Homepage, https://zanii.agency
Keywords: zanii,oversight,regulator,supervision,compliance,evidence,webhooks,ai-agents
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Security :: Cryptography
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: zanii>=0.38.1
Dynamic: license-file

# zanii-oversight-sdk

Python client for a supervised firm's own systems working with Zanii Oversight: hear Oversight webhooks and
answer evidence requests without a person typing. Python twin of `@zanii/oversight-sdk` (checked against the
same vectors). Requests are refused unless signed by a pinned regulator key; answers are signed by the firm's
appointed officer key (raw key or a remote signer). Standard library HTTP, backs off on 429/503, pages through
lists.

```
pip install zanii-oversight-sdk
```

```python
from zanii_oversight import OversightClient
oversight = OversightClient("https://oversight.regulator.example", token, regulator_dids=["did:key:z..."])
receive = oversight.webhook_receiver(secret, {"request.issued": lambda e: oversight.answer_request(e["ref"], decide, officer_key)})
```

Investigations: the regulator sends signed hold orders (`hold.placed`). The firm's system applies them in its
own Blackbox with its own admin key, sends the investigation export, and removes the hold once the regulator's
signed release arrives (`hold.released`). Orders and releases are refused unless signed by a trusted key.

```python
box = {"url": "https://blackbox.internal", "admin_key": blackbox_admin_key}
oversight.apply_hold(hold_id, box)                    # same in TypeScript: applyHold
oversight.send_investigation_evidence(hold_id, box)   # sendInvestigationEvidence
oversight.apply_release(hold_id, box)                 # applyRelease
```

Before an agent acts, `check_action(feed=..., regulator_dids=..., agent=..., target=...)` checks the signed
status feed (suspensions, kill switches) and the published rules.

Requires Python 3.10+ and `zanii`. License: Apache-2.0.
