omnesight 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- omnesight-1.1.0/.github/workflows/publish-pypi.yml +42 -0
- omnesight-1.1.0/.gitignore +27 -0
- omnesight-1.1.0/LICENSE +87 -0
- omnesight-1.1.0/PKG-INFO +220 -0
- omnesight-1.1.0/README.md +187 -0
- omnesight-1.1.0/examples/quickstart.py +63 -0
- omnesight-1.1.0/omnesight/__init__.py +40 -0
- omnesight-1.1.0/omnesight/client.py +181 -0
- omnesight-1.1.0/omnesight/exceptions.py +31 -0
- omnesight-1.1.0/omnesight/models.py +157 -0
- omnesight-1.1.0/omnesight/resources/__init__.py +18 -0
- omnesight-1.1.0/omnesight/resources/actions.py +37 -0
- omnesight-1.1.0/omnesight/resources/hackmalim.py +194 -0
- omnesight-1.1.0/omnesight/resources/reconciliation.py +45 -0
- omnesight-1.1.0/omnesight/resources/sandalfon.py +123 -0
- omnesight-1.1.0/omnesight/resources/telemetry.py +33 -0
- omnesight-1.1.0/pyproject.toml +59 -0
- omnesight-1.1.0/tests/test_sdk_engines.py +159 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Publish Omnesight Python SDK to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-and-publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: pypi
|
|
12
|
+
permissions:
|
|
13
|
+
id-token: write
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- name: Check out repository
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
|
|
24
|
+
- name: Install build and test dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
pip install build twine
|
|
28
|
+
pip install -e ".[dev]"
|
|
29
|
+
|
|
30
|
+
- name: Run SDK unit tests
|
|
31
|
+
run: pytest tests
|
|
32
|
+
|
|
33
|
+
- name: Build distribution packages
|
|
34
|
+
run: python -m build
|
|
35
|
+
|
|
36
|
+
- name: Validate distributions with twine
|
|
37
|
+
run: twine check dist/*
|
|
38
|
+
|
|
39
|
+
- name: Publish package distributions to PyPI
|
|
40
|
+
uses: pypa/gh-action-pypi-upload@release/v1
|
|
41
|
+
with:
|
|
42
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
*.so
|
|
5
|
+
.Python
|
|
6
|
+
build/
|
|
7
|
+
develop-eggs/
|
|
8
|
+
dist/
|
|
9
|
+
downloads/
|
|
10
|
+
eggs/
|
|
11
|
+
.eggs/
|
|
12
|
+
lib/
|
|
13
|
+
lib64/
|
|
14
|
+
parts/
|
|
15
|
+
sdist/
|
|
16
|
+
var/
|
|
17
|
+
wheels/
|
|
18
|
+
*.egg-info/
|
|
19
|
+
.installed.cfg
|
|
20
|
+
*.egg
|
|
21
|
+
.env
|
|
22
|
+
.venv
|
|
23
|
+
env/
|
|
24
|
+
venv/
|
|
25
|
+
ENV/
|
|
26
|
+
.pytest_cache/
|
|
27
|
+
.ruff_cache/
|
omnesight-1.1.0/LICENSE
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work.
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
43
|
+
of this License, Derivative Works shall not include works that remain
|
|
44
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
45
|
+
the Work and Derivative Works thereof.
|
|
46
|
+
|
|
47
|
+
"Contribution" shall mean any work of authorship, including
|
|
48
|
+
the original version of the Work and any modifications or additions
|
|
49
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
50
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
51
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
52
|
+
the copyright owner.
|
|
53
|
+
|
|
54
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
55
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
56
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
57
|
+
copyright license to use, reproduce, modify, display, perform,
|
|
58
|
+
sublicense, and distribute the Work and such Derivative Works.
|
|
59
|
+
|
|
60
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
61
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
62
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
63
|
+
patent license to make, have made, use, sell, offer to sell,
|
|
64
|
+
import, and otherwise transfer the Work.
|
|
65
|
+
|
|
66
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
67
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
68
|
+
modifications, provided that You meet the following conditions:
|
|
69
|
+
(a) You must give any other recipients of the Work a copy of this License; and
|
|
70
|
+
(b) You must cause any modified files to carry prominent notices stating
|
|
71
|
+
that You changed the files; and
|
|
72
|
+
(c) You must retain, in the Source form of any Derivative Works, all
|
|
73
|
+
copyright, patent, trademark, and attribution notices from the Source form.
|
|
74
|
+
|
|
75
|
+
Copyright 2026 Omnesight
|
|
76
|
+
|
|
77
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
78
|
+
you may not use this file except in compliance with the License.
|
|
79
|
+
You may obtain a copy of the License at
|
|
80
|
+
|
|
81
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
82
|
+
|
|
83
|
+
Unless required by applicable law or agreed to in writing, software
|
|
84
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
85
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
86
|
+
See the License for the specific language governing permissions and
|
|
87
|
+
limitations under the License.
|
omnesight-1.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: omnesight
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: Official Python SDK for Omnesight Sovereign Operational Intelligence & Autonomous Execution Infrastructure
|
|
5
|
+
Project-URL: Homepage, https://omnesight.com
|
|
6
|
+
Project-URL: Documentation, https://omnesight.com/docs
|
|
7
|
+
Project-URL: Repository, https://github.com/Omnesight/omnesight-python
|
|
8
|
+
Project-URL: Security Policy, https://github.com/Omnesight/.github/blob/main/SECURITY.md
|
|
9
|
+
Author-email: Omnesight Infrastructure Team <solutions@omnesight.com>
|
|
10
|
+
License-Expression: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: autonomous-execution,enterprise-ai,erp-reconciliation,omnesight,operational-intelligence,sovereign-ai,telemetry
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Information Technology
|
|
16
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
Requires-Dist: httpx>=0.25.0
|
|
26
|
+
Requires-Dist: pydantic>=2.5.0
|
|
27
|
+
Requires-Dist: typing-extensions>=4.8.0
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest>=7.4.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
<div align="center">
|
|
35
|
+
|
|
36
|
+
# Omnesight Python SDK
|
|
37
|
+
|
|
38
|
+
**The official Python client library for Omnesight Sovereign Operational Intelligence & Autonomous Execution Infrastructure.**
|
|
39
|
+
|
|
40
|
+
[](https://pypi.org/project/omnesight/)
|
|
41
|
+
[](https://pypi.org/project/omnesight/)
|
|
42
|
+
[](LICENSE)
|
|
43
|
+
[](https://github.com/Omnesight/.github/blob/main/SECURITY.md)
|
|
44
|
+
|
|
45
|
+
[Website](https://omnesight.com) • [Documentation](https://omnesight.com/docs) • [Security & Compliance](https://github.com/Omnesight/.github/blob/main/SECURITY.md) • [Support](https://github.com/Omnesight/.github/blob/main/SUPPORT.md)
|
|
46
|
+
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Overview
|
|
52
|
+
|
|
53
|
+
The **Omnesight Python SDK** provides typed access to Omnesight's sovereign Non-LLM scientific engines (**Hackmalim v1.0**, **Sandalfon v1.0**) alongside enterprise operational intelligence gateways:
|
|
54
|
+
|
|
55
|
+
* **Hackmalim v1.0 (`client.hackmalim`):** 3-layer Non-LLM control combining Continuous-Time Liquid Neural ODEs, Kirchhoff Physics-Informed GNNs, and Pearl Do-Calculus + SAT Axiom Verification.
|
|
56
|
+
* **Sandalfon v1.0 (`client.sandalfon`):** Sparse differential equation discovery (SINDy/STLSQ), FFT spectral wave precursor extraction, and Popperian permutation falsification.
|
|
57
|
+
* **Ingest Multi-Source Telemetry:** Stream telemetry from SCADA, IoT sensors, GPS fleets, and warehouse terminals in sub-second latency.
|
|
58
|
+
* **Closed-Loop ERP Reconciliation:** Automatically detect and resolve transactional variances across SAP S/4HANA, Oracle NetSuite, Microsoft Dynamics 365, and financial ledgers.
|
|
59
|
+
* **Supervised Action Protocol (SAP):** Execute automated operational interventions under deterministic governance policies and cryptographic audit trails.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Installation
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install omnesight
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Quickstart
|
|
72
|
+
|
|
73
|
+
### 1. Sovereign Scientific & Control Engines (`Hackmalim` & `Sandalfon`)
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
from omnesight import Omnesight
|
|
77
|
+
|
|
78
|
+
# Reads OMNESIGHT_API_KEY and OMNESIGHT_BASE_URL (defaults to http://127.0.0.1:8001)
|
|
79
|
+
client = Omnesight(
|
|
80
|
+
api_key="omne_live_your_secret_key",
|
|
81
|
+
base_url="https://mlops-api.omnesight.com",
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# Sandalfon v1.0: Extract sparse ODEs + spectral FFT wave precursors
|
|
85
|
+
discovery = client.sandalfon.discover(
|
|
86
|
+
preset="thermal_runaway",
|
|
87
|
+
noise_level=0.02,
|
|
88
|
+
sparsity_threshold=0.10,
|
|
89
|
+
precursor_amp=0.18,
|
|
90
|
+
hypothesis_text="Cable thermal overload precursor detection",
|
|
91
|
+
)
|
|
92
|
+
print(discovery.sindy["discovered_eq_x"], discovery.hypothesis_test["z_score"])
|
|
93
|
+
|
|
94
|
+
dialogue = client.sandalfon.chat(
|
|
95
|
+
message="Analyse les précurseurs thermiques sur les câbles",
|
|
96
|
+
preset="thermal_runaway",
|
|
97
|
+
)
|
|
98
|
+
print(dialogue.spoken_reply)
|
|
99
|
+
|
|
100
|
+
# Hackmalim v1.0: Closed-loop Liquid ODE + PI-GNN + Causal SAT Verifier
|
|
101
|
+
res = client.hackmalim.infer(
|
|
102
|
+
shock_amplitude=1.45,
|
|
103
|
+
leak_node=2,
|
|
104
|
+
leak_magnitude=22.5,
|
|
105
|
+
p_max_kw=55.0,
|
|
106
|
+
t_max_c=72.0,
|
|
107
|
+
)
|
|
108
|
+
print(res.target_entity_id, res.enterprise_guardrail)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 2. Synchronous Enterprise Telemetry Client
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
from omnesight import Omnesight
|
|
115
|
+
|
|
116
|
+
# Initialize the client (reads OMNESIGHT_API_KEY & OMNESIGHT_BASE_URL from environment if omitted)
|
|
117
|
+
client = Omnesight(
|
|
118
|
+
api_key="your_api_key_here",
|
|
119
|
+
base_url="https://omnesight.internal.company.com" # Your private VPC or dedicated sovereign gateway
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
# 1. Ingest asset telemetry
|
|
123
|
+
response = client.telemetry.ingest(
|
|
124
|
+
stream_id="freight-corridor-lagos-kano",
|
|
125
|
+
records=[
|
|
126
|
+
{
|
|
127
|
+
"device_id": "TRUCK-GPS-104",
|
|
128
|
+
"metric": "cargo_seal_integrity",
|
|
129
|
+
"value": 1.0,
|
|
130
|
+
"metadata": {"driver": "ID-992", "cargo": "Refined Petroleum"}
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
)
|
|
134
|
+
print(f"Batch {response.batch_id} ingested in {response.duration_ms}ms")
|
|
135
|
+
|
|
136
|
+
# 2. Scan ERP vs Ledger Discrepancies
|
|
137
|
+
discrepancies = client.reconciliation.scan_discrepancies(
|
|
138
|
+
erp_system="SAP",
|
|
139
|
+
entity_type="PURCHASE_ORDERS",
|
|
140
|
+
lookback_days=7
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
for d in discrepancies:
|
|
144
|
+
print(f"Discrepancy #{d.discrepancy_id}: Variance ${d.variance_amount_usd:,.2f} ({d.status})")
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
### 2. Asynchronous Client (AsyncIO / High Concurrency)
|
|
150
|
+
|
|
151
|
+
For data engineering pipelines or FastAPI backends handling thousands of events per second:
|
|
152
|
+
|
|
153
|
+
```python
|
|
154
|
+
import asyncio
|
|
155
|
+
from omnesight import AsyncOmnesight
|
|
156
|
+
|
|
157
|
+
async def main():
|
|
158
|
+
async with AsyncOmnesight(api_key="your_api_key_here") as client:
|
|
159
|
+
response = await client.telemetry.ingest(
|
|
160
|
+
stream_id="scada-compressor-alpha",
|
|
161
|
+
records=[
|
|
162
|
+
{"device_id": "CMP-01", "metric": "vibration_hz", "value": 44.2}
|
|
163
|
+
]
|
|
164
|
+
)
|
|
165
|
+
print(f"Ingested batch: {response.batch_id}")
|
|
166
|
+
|
|
167
|
+
asyncio.run(main())
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Enterprise VPC & Sovereign Deployments
|
|
173
|
+
|
|
174
|
+
For single-tenant institutional customers running Omnesight within a private VPC (AWS, Azure, GCP, Alibaba Cloud) or air-gapped on-premise Kubernetes cluster:
|
|
175
|
+
|
|
176
|
+
```python
|
|
177
|
+
client = Omnesight(
|
|
178
|
+
api_key="your_sovereign_vpc_token",
|
|
179
|
+
base_url="https://omnesight.internal.company.com", # Private VPC endpoint
|
|
180
|
+
timeout=60.0
|
|
181
|
+
)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Supervised Action Protocol (SAP)
|
|
187
|
+
|
|
188
|
+
Automated write-backs to core ERPs and ledger reconciliations require policy validation:
|
|
189
|
+
|
|
190
|
+
```python
|
|
191
|
+
from omnesight.models import ActionApprovalRequest
|
|
192
|
+
|
|
193
|
+
# Retrieve status of an automated action staged by the cognitive engine
|
|
194
|
+
action = client.actions.get_status("ACT-88492")
|
|
195
|
+
print(f"Action: {action.action_type} | Impact: ${action.financial_impact_usd} | State: {action.state}")
|
|
196
|
+
|
|
197
|
+
# Submit human-in-the-loop supervisor approval
|
|
198
|
+
client.actions.submit_decision(ActionApprovalRequest(
|
|
199
|
+
action_id="ACT-88492",
|
|
200
|
+
action_type="ERP_LEDGER_WRITE",
|
|
201
|
+
target_entity="PO-77189",
|
|
202
|
+
decision="APPROVE",
|
|
203
|
+
supervisor_id="SUP-MAV-01",
|
|
204
|
+
supervisor_notes="Validated with physical bill of lading #BL-9921"
|
|
205
|
+
))
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Security & Data Sovereignty
|
|
211
|
+
|
|
212
|
+
* **Zero Frontier Model Training:** Omnesight never ingests customer transactional payloads or telemetry into public foundation model weights.
|
|
213
|
+
* **Cryptographic Traceability:** Every staged action is signed with a SHA-256 audit hash.
|
|
214
|
+
* **Security Advisories:** For vulnerability disclosure, see [SECURITY.md](https://github.com/Omnesight/.github/blob/main/SECURITY.md) or email `security@omnesight.com`.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## License
|
|
219
|
+
|
|
220
|
+
Apache License 2.0. See [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# Omnesight Python SDK
|
|
4
|
+
|
|
5
|
+
**The official Python client library for Omnesight Sovereign Operational Intelligence & Autonomous Execution Infrastructure.**
|
|
6
|
+
|
|
7
|
+
[](https://pypi.org/project/omnesight/)
|
|
8
|
+
[](https://pypi.org/project/omnesight/)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
[](https://github.com/Omnesight/.github/blob/main/SECURITY.md)
|
|
11
|
+
|
|
12
|
+
[Website](https://omnesight.com) • [Documentation](https://omnesight.com/docs) • [Security & Compliance](https://github.com/Omnesight/.github/blob/main/SECURITY.md) • [Support](https://github.com/Omnesight/.github/blob/main/SUPPORT.md)
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
|
|
20
|
+
The **Omnesight Python SDK** provides typed access to Omnesight's sovereign Non-LLM scientific engines (**Hackmalim v1.0**, **Sandalfon v1.0**) alongside enterprise operational intelligence gateways:
|
|
21
|
+
|
|
22
|
+
* **Hackmalim v1.0 (`client.hackmalim`):** 3-layer Non-LLM control combining Continuous-Time Liquid Neural ODEs, Kirchhoff Physics-Informed GNNs, and Pearl Do-Calculus + SAT Axiom Verification.
|
|
23
|
+
* **Sandalfon v1.0 (`client.sandalfon`):** Sparse differential equation discovery (SINDy/STLSQ), FFT spectral wave precursor extraction, and Popperian permutation falsification.
|
|
24
|
+
* **Ingest Multi-Source Telemetry:** Stream telemetry from SCADA, IoT sensors, GPS fleets, and warehouse terminals in sub-second latency.
|
|
25
|
+
* **Closed-Loop ERP Reconciliation:** Automatically detect and resolve transactional variances across SAP S/4HANA, Oracle NetSuite, Microsoft Dynamics 365, and financial ledgers.
|
|
26
|
+
* **Supervised Action Protocol (SAP):** Execute automated operational interventions under deterministic governance policies and cryptographic audit trails.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install omnesight
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Quickstart
|
|
39
|
+
|
|
40
|
+
### 1. Sovereign Scientific & Control Engines (`Hackmalim` & `Sandalfon`)
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
from omnesight import Omnesight
|
|
44
|
+
|
|
45
|
+
# Reads OMNESIGHT_API_KEY and OMNESIGHT_BASE_URL (defaults to http://127.0.0.1:8001)
|
|
46
|
+
client = Omnesight(
|
|
47
|
+
api_key="omne_live_your_secret_key",
|
|
48
|
+
base_url="https://mlops-api.omnesight.com",
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
# Sandalfon v1.0: Extract sparse ODEs + spectral FFT wave precursors
|
|
52
|
+
discovery = client.sandalfon.discover(
|
|
53
|
+
preset="thermal_runaway",
|
|
54
|
+
noise_level=0.02,
|
|
55
|
+
sparsity_threshold=0.10,
|
|
56
|
+
precursor_amp=0.18,
|
|
57
|
+
hypothesis_text="Cable thermal overload precursor detection",
|
|
58
|
+
)
|
|
59
|
+
print(discovery.sindy["discovered_eq_x"], discovery.hypothesis_test["z_score"])
|
|
60
|
+
|
|
61
|
+
dialogue = client.sandalfon.chat(
|
|
62
|
+
message="Analyse les précurseurs thermiques sur les câbles",
|
|
63
|
+
preset="thermal_runaway",
|
|
64
|
+
)
|
|
65
|
+
print(dialogue.spoken_reply)
|
|
66
|
+
|
|
67
|
+
# Hackmalim v1.0: Closed-loop Liquid ODE + PI-GNN + Causal SAT Verifier
|
|
68
|
+
res = client.hackmalim.infer(
|
|
69
|
+
shock_amplitude=1.45,
|
|
70
|
+
leak_node=2,
|
|
71
|
+
leak_magnitude=22.5,
|
|
72
|
+
p_max_kw=55.0,
|
|
73
|
+
t_max_c=72.0,
|
|
74
|
+
)
|
|
75
|
+
print(res.target_entity_id, res.enterprise_guardrail)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 2. Synchronous Enterprise Telemetry Client
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
from omnesight import Omnesight
|
|
82
|
+
|
|
83
|
+
# Initialize the client (reads OMNESIGHT_API_KEY & OMNESIGHT_BASE_URL from environment if omitted)
|
|
84
|
+
client = Omnesight(
|
|
85
|
+
api_key="your_api_key_here",
|
|
86
|
+
base_url="https://omnesight.internal.company.com" # Your private VPC or dedicated sovereign gateway
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
# 1. Ingest asset telemetry
|
|
90
|
+
response = client.telemetry.ingest(
|
|
91
|
+
stream_id="freight-corridor-lagos-kano",
|
|
92
|
+
records=[
|
|
93
|
+
{
|
|
94
|
+
"device_id": "TRUCK-GPS-104",
|
|
95
|
+
"metric": "cargo_seal_integrity",
|
|
96
|
+
"value": 1.0,
|
|
97
|
+
"metadata": {"driver": "ID-992", "cargo": "Refined Petroleum"}
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
)
|
|
101
|
+
print(f"Batch {response.batch_id} ingested in {response.duration_ms}ms")
|
|
102
|
+
|
|
103
|
+
# 2. Scan ERP vs Ledger Discrepancies
|
|
104
|
+
discrepancies = client.reconciliation.scan_discrepancies(
|
|
105
|
+
erp_system="SAP",
|
|
106
|
+
entity_type="PURCHASE_ORDERS",
|
|
107
|
+
lookback_days=7
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
for d in discrepancies:
|
|
111
|
+
print(f"Discrepancy #{d.discrepancy_id}: Variance ${d.variance_amount_usd:,.2f} ({d.status})")
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
### 2. Asynchronous Client (AsyncIO / High Concurrency)
|
|
117
|
+
|
|
118
|
+
For data engineering pipelines or FastAPI backends handling thousands of events per second:
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
import asyncio
|
|
122
|
+
from omnesight import AsyncOmnesight
|
|
123
|
+
|
|
124
|
+
async def main():
|
|
125
|
+
async with AsyncOmnesight(api_key="your_api_key_here") as client:
|
|
126
|
+
response = await client.telemetry.ingest(
|
|
127
|
+
stream_id="scada-compressor-alpha",
|
|
128
|
+
records=[
|
|
129
|
+
{"device_id": "CMP-01", "metric": "vibration_hz", "value": 44.2}
|
|
130
|
+
]
|
|
131
|
+
)
|
|
132
|
+
print(f"Ingested batch: {response.batch_id}")
|
|
133
|
+
|
|
134
|
+
asyncio.run(main())
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Enterprise VPC & Sovereign Deployments
|
|
140
|
+
|
|
141
|
+
For single-tenant institutional customers running Omnesight within a private VPC (AWS, Azure, GCP, Alibaba Cloud) or air-gapped on-premise Kubernetes cluster:
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
client = Omnesight(
|
|
145
|
+
api_key="your_sovereign_vpc_token",
|
|
146
|
+
base_url="https://omnesight.internal.company.com", # Private VPC endpoint
|
|
147
|
+
timeout=60.0
|
|
148
|
+
)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Supervised Action Protocol (SAP)
|
|
154
|
+
|
|
155
|
+
Automated write-backs to core ERPs and ledger reconciliations require policy validation:
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
from omnesight.models import ActionApprovalRequest
|
|
159
|
+
|
|
160
|
+
# Retrieve status of an automated action staged by the cognitive engine
|
|
161
|
+
action = client.actions.get_status("ACT-88492")
|
|
162
|
+
print(f"Action: {action.action_type} | Impact: ${action.financial_impact_usd} | State: {action.state}")
|
|
163
|
+
|
|
164
|
+
# Submit human-in-the-loop supervisor approval
|
|
165
|
+
client.actions.submit_decision(ActionApprovalRequest(
|
|
166
|
+
action_id="ACT-88492",
|
|
167
|
+
action_type="ERP_LEDGER_WRITE",
|
|
168
|
+
target_entity="PO-77189",
|
|
169
|
+
decision="APPROVE",
|
|
170
|
+
supervisor_id="SUP-MAV-01",
|
|
171
|
+
supervisor_notes="Validated with physical bill of lading #BL-9921"
|
|
172
|
+
))
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Security & Data Sovereignty
|
|
178
|
+
|
|
179
|
+
* **Zero Frontier Model Training:** Omnesight never ingests customer transactional payloads or telemetry into public foundation model weights.
|
|
180
|
+
* **Cryptographic Traceability:** Every staged action is signed with a SHA-256 audit hash.
|
|
181
|
+
* **Security Advisories:** For vulnerability disclosure, see [SECURITY.md](https://github.com/Omnesight/.github/blob/main/SECURITY.md) or email `security@omnesight.com`.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## License
|
|
186
|
+
|
|
187
|
+
Apache License 2.0. See [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Omnesight Python SDK - Quickstart Example
|
|
3
|
+
Demonstrates sovereign MLOps calls against Hackmalim v1.0, Sandalfon v1.0,
|
|
4
|
+
and operational telemetry pipelines.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
from omnesight import Omnesight
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def main():
|
|
12
|
+
client = Omnesight(
|
|
13
|
+
api_key=os.environ.get("OMNESIGHT_API_KEY", "omne_live_demo_token_replace_me"),
|
|
14
|
+
base_url=os.environ.get("OMNESIGHT_BASE_URL", "http://127.0.0.1:8001"),
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
print("Omnesight Sovereign MLOps Client Initialized")
|
|
18
|
+
|
|
19
|
+
# 1. Sandalfon v1.0: Discover sparse differential equations & FFT wave precursors
|
|
20
|
+
print("\n[Step 1] Sandalfon v1.0 Scientific Discovery...")
|
|
21
|
+
try:
|
|
22
|
+
discovery = client.sandalfon.discover(
|
|
23
|
+
preset="thermal_runaway",
|
|
24
|
+
noise_level=0.02,
|
|
25
|
+
sparsity_threshold=0.10,
|
|
26
|
+
precursor_amp=0.18,
|
|
27
|
+
hypothesis_text="Check cable thermal runaway harmonics before outage",
|
|
28
|
+
)
|
|
29
|
+
print(f" Discovered ODE X : {discovery.sindy.get('discovered_eq_x')}")
|
|
30
|
+
print(f" Precursor SNR dB : {discovery.spectrum.get('precursor_snr_db')}")
|
|
31
|
+
print(f" Popper Z-Score : {discovery.hypothesis_test.get('z_score')}")
|
|
32
|
+
|
|
33
|
+
dialogue = client.sandalfon.chat(
|
|
34
|
+
message="Analyse le couplage thermique avec un signal faible sur les câbles",
|
|
35
|
+
preset="thermal_runaway",
|
|
36
|
+
)
|
|
37
|
+
print(f" Sandalfon Reply : {dialogue.spoken_reply}")
|
|
38
|
+
except Exception as e:
|
|
39
|
+
print(f"Sandalfon notice (requires live MLOps API): {e}")
|
|
40
|
+
|
|
41
|
+
# 2. Hackmalim v1.0: Closed-loop Liquid ODE + Kirchhoff PI-GNN + Causal SAT Verifier
|
|
42
|
+
print("\n[Step 2] Hackmalim v1.0 Sovereign 3-Layer Control...")
|
|
43
|
+
try:
|
|
44
|
+
res = client.hackmalim.infer(
|
|
45
|
+
shock_amplitude=1.45,
|
|
46
|
+
leak_node=2,
|
|
47
|
+
leak_magnitude=22.5,
|
|
48
|
+
p_max_kw=55.0,
|
|
49
|
+
t_max_c=72.0,
|
|
50
|
+
)
|
|
51
|
+
pignn = res.stage_2_pignn or res.pignn or {}
|
|
52
|
+
guardrail = res.enterprise_guardrail or res.guardrails or {}
|
|
53
|
+
print(f" Target Entity : {res.target_entity_id}")
|
|
54
|
+
print(f" Pinpointed Node : {pignn.get('pinpointed_node')}")
|
|
55
|
+
print(f" Guardrail Valid : {guardrail.get('is_approved')}")
|
|
56
|
+
except Exception as e:
|
|
57
|
+
print(f"Hackmalim notice (requires live MLOps API): {e}")
|
|
58
|
+
|
|
59
|
+
print("\nQuickstart completed.")
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
if __name__ == "__main__":
|
|
63
|
+
main()
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Omnesight Python SDK
|
|
3
|
+
Sovereign Operational Intelligence & Autonomous Execution Infrastructure
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from .client import AsyncOmnesight, Omnesight
|
|
7
|
+
from .exceptions import (
|
|
8
|
+
AuthenticationError,
|
|
9
|
+
InternalServerError,
|
|
10
|
+
NotFoundError,
|
|
11
|
+
OmnesightError,
|
|
12
|
+
PolicyViolationError,
|
|
13
|
+
RateLimitError,
|
|
14
|
+
)
|
|
15
|
+
from .models import (
|
|
16
|
+
HackmalimInferRequest,
|
|
17
|
+
HackmalimInferResponse,
|
|
18
|
+
SandalfonChatRequest,
|
|
19
|
+
SandalfonChatResponse,
|
|
20
|
+
SandalfonDiscoverRequest,
|
|
21
|
+
SandalfonDiscoverResponse,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
__version__ = "1.1.0"
|
|
25
|
+
__all__ = [
|
|
26
|
+
"AsyncOmnesight",
|
|
27
|
+
"AuthenticationError",
|
|
28
|
+
"HackmalimInferRequest",
|
|
29
|
+
"HackmalimInferResponse",
|
|
30
|
+
"InternalServerError",
|
|
31
|
+
"NotFoundError",
|
|
32
|
+
"Omnesight",
|
|
33
|
+
"OmnesightError",
|
|
34
|
+
"PolicyViolationError",
|
|
35
|
+
"RateLimitError",
|
|
36
|
+
"SandalfonChatRequest",
|
|
37
|
+
"SandalfonChatResponse",
|
|
38
|
+
"SandalfonDiscoverRequest",
|
|
39
|
+
"SandalfonDiscoverResponse",
|
|
40
|
+
]
|