fluxstate-security 1.0.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.
- fluxstate_security-1.0.0/PKG-INFO +162 -0
- fluxstate_security-1.0.0/README.md +138 -0
- fluxstate_security-1.0.0/fluxstate_security/__init__.py +3 -0
- fluxstate_security-1.0.0/fluxstate_security/app.py +467 -0
- fluxstate_security-1.0.0/fluxstate_security/core/__init__.py +1 -0
- fluxstate_security-1.0.0/fluxstate_security/core/agent.py +108 -0
- fluxstate_security-1.0.0/fluxstate_security/core/engine.py +98 -0
- fluxstate_security-1.0.0/fluxstate_security/core/forensics.py +80 -0
- fluxstate_security-1.0.0/fluxstate_security/core/state_manager.py +39 -0
- fluxstate_security-1.0.0/fluxstate_security/intelligence_policy.json +29 -0
- fluxstate_security-1.0.0/fluxstate_security/utils/__init__.py +1 -0
- fluxstate_security-1.0.0/fluxstate_security/utils/video_stream.py +363 -0
- fluxstate_security-1.0.0/fluxstate_security.egg-info/PKG-INFO +162 -0
- fluxstate_security-1.0.0/fluxstate_security.egg-info/SOURCES.txt +18 -0
- fluxstate_security-1.0.0/fluxstate_security.egg-info/dependency_links.txt +1 -0
- fluxstate_security-1.0.0/fluxstate_security.egg-info/requires.txt +6 -0
- fluxstate_security-1.0.0/fluxstate_security.egg-info/top_level.txt +1 -0
- fluxstate_security-1.0.0/setup.cfg +4 -0
- fluxstate_security-1.0.0/setup.py +28 -0
- fluxstate_security-1.0.0/tests/test_sdk.py +53 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fluxstate-security
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Privacy-Preserving Contextual Edge Video Analytics SDK
|
|
5
|
+
Author: FluxState Security Architecture
|
|
6
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
7
|
+
Classifier: Intended Audience :: Developers
|
|
8
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
Requires-Dist: opencv-python>=4.8.0
|
|
13
|
+
Requires-Dist: numpy>=1.24.0
|
|
14
|
+
Requires-Dist: mediapipe>=0.10.0
|
|
15
|
+
Requires-Dist: ultralytics>=8.0.0
|
|
16
|
+
Requires-Dist: pytesseract>=0.3.10
|
|
17
|
+
Requires-Dist: pyaudio>=0.2.14
|
|
18
|
+
Dynamic: author
|
|
19
|
+
Dynamic: classifier
|
|
20
|
+
Dynamic: description
|
|
21
|
+
Dynamic: description-content-type
|
|
22
|
+
Dynamic: requires-dist
|
|
23
|
+
Dynamic: summary
|
|
24
|
+
|
|
25
|
+
<div align="center">
|
|
26
|
+
|
|
27
|
+
<img src="assets/fluxstate_herobanner.png" alt="FluxState Edge Hero Banner" width="100%">
|
|
28
|
+
|
|
29
|
+
# ๐ฆ
FluxState Edge SDK
|
|
30
|
+
|
|
31
|
+
**Privacy-Preserving Contextual Edge Video Analytics for Enterprise Security**
|
|
32
|
+
|
|
33
|
+
[](https://pypi.org/project/fluxstate-security/)
|
|
34
|
+
[](https://opensource.org/licenses/MIT)
|
|
35
|
+
[]()
|
|
36
|
+
|
|
37
|
+
<br>
|
|
38
|
+
|
|
39
|
+
*FluxState Edge* is an extensible, camera-agnostic video analytics SDK designed for direct integration into proprietary security backends. It processes RTSP streams locally on the edge, extracting behavioral metadata via object detection, 3D skeletal posing, audio processing, and VLM semantic reasoning.
|
|
40
|
+
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
<br>
|
|
46
|
+
|
|
47
|
+
## ๐ Quick Install
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install fluxstate-security
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## ๐ฅ Installation Demo
|
|
54
|
+
|
|
55
|
+
See the SDK installation and verification in under a minute.
|
|
56
|
+
|
|
57
|
+
โถ๏ธ [Watch Installation Demo (Google Drive)](https://drive.google.com/file/d/1wf4hSMkGXe3q5MOipx87nfwzQis2_Xcf/view?usp=sharing)
|
|
58
|
+
|
|
59
|
+
<br>
|
|
60
|
+
|
|
61
|
+
## โก System Capabilities
|
|
62
|
+
|
|
63
|
+
| Capability | Technical Implementation |
|
|
64
|
+
| :--- | :--- |
|
|
65
|
+
| ๐ง **Agentic VLM Reasoner** | Runs Vision-Language Models (e.g., `Qwen2.5-VL`) locally via MLX on Apple Silicon unified memory for deep contextual scene understanding. Bypasses cloud APIs entirely. |
|
|
66
|
+
| ๐ฏ **Tactical Visual Grounding** | Automatically injects high-contrast red bounding boxes over anomalies. This guides the VLM toward the detected region, reducing irrelevant reasoning and improving contextual grounding. |
|
|
67
|
+
| ๐ก๏ธ **Privacy-by-Design** | Actively zeroes out image buffers post-inference via C-level `memset`. Designed with privacy-first principles to prevent sensitive pixel data from lingering in the system heap. |
|
|
68
|
+
| ๐๏ธ **Temporal Forensics** | Behavioral anomalies are serialized into a local SQLite database (`fluxstate_security/core/forensics.py`), creating a searchable text-based ledger of physical events. |
|
|
69
|
+
| ๐น **Hardware Agnostic** | Ingests existing IP cameras via standard RTSP URLs. No proprietary recording hardware required. |
|
|
70
|
+
| ๐ณ **Edge Containerization** | Ships with a highly optimized `Dockerfile` for enterprise edge deployments (Kubernetes/Docker Swarm), permanently locking native OS dependencies. |
|
|
71
|
+
|
|
72
|
+
<br>
|
|
73
|
+
|
|
74
|
+
## ๐ผ๏ธ Architectural Vision & Use Cases
|
|
75
|
+
|
|
76
|
+
<div align="center">
|
|
77
|
+
<img src="assets/fluxstate_architectural_diagram.png" alt="FluxState Architecture Diagram" width="90%">
|
|
78
|
+
<br><br>
|
|
79
|
+
<img src="assets/fluxstate_usecases.png" alt="Use Cases" width="90%">
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<br>
|
|
83
|
+
|
|
84
|
+
## ๐ ๏ธ Minimal SDK Integration
|
|
85
|
+
|
|
86
|
+
FluxState is designed to fade into the background. Drop it into your existing backend and attach a webhook.
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
import time
|
|
90
|
+
from fluxstate_security import FluxStateNode
|
|
91
|
+
|
|
92
|
+
# 1. Initialize the SDK
|
|
93
|
+
sdk = FluxStateNode()
|
|
94
|
+
|
|
95
|
+
# 2. Define your integration hook
|
|
96
|
+
def handle_threat(event_payload):
|
|
97
|
+
print(f"\n[INTEGRATION BUS] Escalating to VMS...")
|
|
98
|
+
print(f"Target Identity: {event_payload['entities']}")
|
|
99
|
+
print(f"Behavioral Vector: {event_payload['context_log']}")
|
|
100
|
+
|
|
101
|
+
# 3. Bind the hook
|
|
102
|
+
sdk.on_threat_detected = handle_threat
|
|
103
|
+
|
|
104
|
+
# 4. Deploy Headlessly (Runs as a background daemon)
|
|
105
|
+
sdk.start_headless_daemon()
|
|
106
|
+
|
|
107
|
+
try:
|
|
108
|
+
while True: time.sleep(1)
|
|
109
|
+
except KeyboardInterrupt:
|
|
110
|
+
sdk.stop() # 5. Clean shutdown
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
<br>
|
|
114
|
+
|
|
115
|
+
## ๐ฆ Deployment Strategies
|
|
116
|
+
|
|
117
|
+
<details>
|
|
118
|
+
<summary><b>Option A: Enterprise Docker Deployment (Recommended)</b></summary>
|
|
119
|
+
<br>
|
|
120
|
+
For production environments, use the provided Docker container to guarantee system dependencies (Tesseract, PortAudio) are perfectly locked across the cluster.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
docker build -t fluxstate-security .
|
|
124
|
+
docker run -d --name fluxstate-security fluxstate-security
|
|
125
|
+
```
|
|
126
|
+
</details>
|
|
127
|
+
|
|
128
|
+
<details>
|
|
129
|
+
<summary><b>Option B: Local Python Development</b></summary>
|
|
130
|
+
<br>
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
pip install fluxstate-security
|
|
134
|
+
|
|
135
|
+
# macOS dependencies
|
|
136
|
+
brew install tesseract portaudio
|
|
137
|
+
|
|
138
|
+
# Linux dependencies
|
|
139
|
+
sudo apt-get install tesseract-ocr libportaudio2 libportaudiocpp0 portaudio19-dev
|
|
140
|
+
```
|
|
141
|
+
</details>
|
|
142
|
+
|
|
143
|
+
<br>
|
|
144
|
+
|
|
145
|
+
## ๐งช Forensics & Testing
|
|
146
|
+
FluxState ships with an automated `pytest` suite covering the Forensic SQLite ledger and JSON intelligence policies.
|
|
147
|
+
```bash
|
|
148
|
+
pytest tests/
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
<div align="center">
|
|
154
|
+
<i>For a deeper dive into the threading model, VLM orchestration, and the SQLite schema, see <a href="architecture.md">architecture.md</a>.</i>
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
<div align="center">
|
|
160
|
+
<b>๐ฆ <a href="https://pypi.org/project/fluxstate-security/">PyPI Package</a></b> โข
|
|
161
|
+
<b>๐ <a href="architecture.md">Documentation</a></b>
|
|
162
|
+
</div>
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="assets/fluxstate_herobanner.png" alt="FluxState Edge Hero Banner" width="100%">
|
|
4
|
+
|
|
5
|
+
# ๐ฆ
FluxState Edge SDK
|
|
6
|
+
|
|
7
|
+
**Privacy-Preserving Contextual Edge Video Analytics for Enterprise Security**
|
|
8
|
+
|
|
9
|
+
[](https://pypi.org/project/fluxstate-security/)
|
|
10
|
+
[](https://opensource.org/licenses/MIT)
|
|
11
|
+
[]()
|
|
12
|
+
|
|
13
|
+
<br>
|
|
14
|
+
|
|
15
|
+
*FluxState Edge* is an extensible, camera-agnostic video analytics SDK designed for direct integration into proprietary security backends. It processes RTSP streams locally on the edge, extracting behavioral metadata via object detection, 3D skeletal posing, audio processing, and VLM semantic reasoning.
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
<br>
|
|
22
|
+
|
|
23
|
+
## ๐ Quick Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install fluxstate-security
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## ๐ฅ Installation Demo
|
|
30
|
+
|
|
31
|
+
See the SDK installation and verification in under a minute.
|
|
32
|
+
|
|
33
|
+
โถ๏ธ [Watch Installation Demo (Google Drive)](https://drive.google.com/file/d/1wf4hSMkGXe3q5MOipx87nfwzQis2_Xcf/view?usp=sharing)
|
|
34
|
+
|
|
35
|
+
<br>
|
|
36
|
+
|
|
37
|
+
## โก System Capabilities
|
|
38
|
+
|
|
39
|
+
| Capability | Technical Implementation |
|
|
40
|
+
| :--- | :--- |
|
|
41
|
+
| ๐ง **Agentic VLM Reasoner** | Runs Vision-Language Models (e.g., `Qwen2.5-VL`) locally via MLX on Apple Silicon unified memory for deep contextual scene understanding. Bypasses cloud APIs entirely. |
|
|
42
|
+
| ๐ฏ **Tactical Visual Grounding** | Automatically injects high-contrast red bounding boxes over anomalies. This guides the VLM toward the detected region, reducing irrelevant reasoning and improving contextual grounding. |
|
|
43
|
+
| ๐ก๏ธ **Privacy-by-Design** | Actively zeroes out image buffers post-inference via C-level `memset`. Designed with privacy-first principles to prevent sensitive pixel data from lingering in the system heap. |
|
|
44
|
+
| ๐๏ธ **Temporal Forensics** | Behavioral anomalies are serialized into a local SQLite database (`fluxstate_security/core/forensics.py`), creating a searchable text-based ledger of physical events. |
|
|
45
|
+
| ๐น **Hardware Agnostic** | Ingests existing IP cameras via standard RTSP URLs. No proprietary recording hardware required. |
|
|
46
|
+
| ๐ณ **Edge Containerization** | Ships with a highly optimized `Dockerfile` for enterprise edge deployments (Kubernetes/Docker Swarm), permanently locking native OS dependencies. |
|
|
47
|
+
|
|
48
|
+
<br>
|
|
49
|
+
|
|
50
|
+
## ๐ผ๏ธ Architectural Vision & Use Cases
|
|
51
|
+
|
|
52
|
+
<div align="center">
|
|
53
|
+
<img src="assets/fluxstate_architectural_diagram.png" alt="FluxState Architecture Diagram" width="90%">
|
|
54
|
+
<br><br>
|
|
55
|
+
<img src="assets/fluxstate_usecases.png" alt="Use Cases" width="90%">
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<br>
|
|
59
|
+
|
|
60
|
+
## ๐ ๏ธ Minimal SDK Integration
|
|
61
|
+
|
|
62
|
+
FluxState is designed to fade into the background. Drop it into your existing backend and attach a webhook.
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
import time
|
|
66
|
+
from fluxstate_security import FluxStateNode
|
|
67
|
+
|
|
68
|
+
# 1. Initialize the SDK
|
|
69
|
+
sdk = FluxStateNode()
|
|
70
|
+
|
|
71
|
+
# 2. Define your integration hook
|
|
72
|
+
def handle_threat(event_payload):
|
|
73
|
+
print(f"\n[INTEGRATION BUS] Escalating to VMS...")
|
|
74
|
+
print(f"Target Identity: {event_payload['entities']}")
|
|
75
|
+
print(f"Behavioral Vector: {event_payload['context_log']}")
|
|
76
|
+
|
|
77
|
+
# 3. Bind the hook
|
|
78
|
+
sdk.on_threat_detected = handle_threat
|
|
79
|
+
|
|
80
|
+
# 4. Deploy Headlessly (Runs as a background daemon)
|
|
81
|
+
sdk.start_headless_daemon()
|
|
82
|
+
|
|
83
|
+
try:
|
|
84
|
+
while True: time.sleep(1)
|
|
85
|
+
except KeyboardInterrupt:
|
|
86
|
+
sdk.stop() # 5. Clean shutdown
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
<br>
|
|
90
|
+
|
|
91
|
+
## ๐ฆ Deployment Strategies
|
|
92
|
+
|
|
93
|
+
<details>
|
|
94
|
+
<summary><b>Option A: Enterprise Docker Deployment (Recommended)</b></summary>
|
|
95
|
+
<br>
|
|
96
|
+
For production environments, use the provided Docker container to guarantee system dependencies (Tesseract, PortAudio) are perfectly locked across the cluster.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
docker build -t fluxstate-security .
|
|
100
|
+
docker run -d --name fluxstate-security fluxstate-security
|
|
101
|
+
```
|
|
102
|
+
</details>
|
|
103
|
+
|
|
104
|
+
<details>
|
|
105
|
+
<summary><b>Option B: Local Python Development</b></summary>
|
|
106
|
+
<br>
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
pip install fluxstate-security
|
|
110
|
+
|
|
111
|
+
# macOS dependencies
|
|
112
|
+
brew install tesseract portaudio
|
|
113
|
+
|
|
114
|
+
# Linux dependencies
|
|
115
|
+
sudo apt-get install tesseract-ocr libportaudio2 libportaudiocpp0 portaudio19-dev
|
|
116
|
+
```
|
|
117
|
+
</details>
|
|
118
|
+
|
|
119
|
+
<br>
|
|
120
|
+
|
|
121
|
+
## ๐งช Forensics & Testing
|
|
122
|
+
FluxState ships with an automated `pytest` suite covering the Forensic SQLite ledger and JSON intelligence policies.
|
|
123
|
+
```bash
|
|
124
|
+
pytest tests/
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
<div align="center">
|
|
130
|
+
<i>For a deeper dive into the threading model, VLM orchestration, and the SQLite schema, see <a href="architecture.md">architecture.md</a>.</i>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
<div align="center">
|
|
136
|
+
<b>๐ฆ <a href="https://pypi.org/project/fluxstate-security/">PyPI Package</a></b> โข
|
|
137
|
+
<b>๐ <a href="architecture.md">Documentation</a></b>
|
|
138
|
+
</div>
|