necklink 1.4.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.
necklink-1.4.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Amandeep Bains
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ include README.md
2
+ include LICENSE
@@ -0,0 +1,166 @@
1
+ Metadata-Version: 2.4
2
+ Name: necklink
3
+ Version: 1.4.0
4
+ Summary: NeckLink Fruit-Fly Brain Edge Autonomy & Wire Suite: umbrella installer for pynltp, necksense, neckcompass, necksight, and neckcord
5
+ Author: Amandeep Singh Bains
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/indian-aman/necklink
8
+ Project-URL: Repository, https://github.com/indian-aman/necklink
9
+ Project-URL: Releases, https://github.com/indian-aman/necklink/releases
10
+ Project-URL: Issues, https://github.com/indian-aman/necklink/issues
11
+ Project-URL: Documentation, https://github.com/indian-aman/necklink#readme
12
+ Keywords: necklink,pynltp,necksense,neckcompass,necksight,neckcord,drosophila,connectome,neuromorphic,robotics,usv,esp32
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: C
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
+ Classifier: Topic :: System :: Networking
25
+ Requires-Python: >=3.9
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: pynltp>=1.4.0
29
+ Requires-Dist: necksense>=1.1.0
30
+ Requires-Dist: neckcompass>=1.1.0
31
+ Requires-Dist: necksight>=1.1.0
32
+ Requires-Dist: neckcord>=1.1.0
33
+ Dynamic: license-file
34
+
35
+ <div align="center">
36
+
37
+ <picture>
38
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/indian-aman/necklink/main/assets/logo/necklink-logo-dark.png">
39
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/indian-aman/necklink/main/assets/logo/necklink-logo-light.png">
40
+ <img alt="NeckLink" src="https://raw.githubusercontent.com/indian-aman/necklink/main/assets/logo/necklink-logo-light.png" width="320">
41
+ </picture>
42
+
43
+ ### Fruit-fly brain edge autonomy, in Python and zero-heap ANSI C99
44
+
45
+ **Five open-source modules modelled on the adult *Drosophila* central nervous system, built for lossy radios, GPS-denied vehicles, micro-drones and low-cost microcontrollers.**
46
+
47
+ [![Website](https://img.shields.io/badge/website-indian--aman.github.io%2Fnecklink-0EA5E9?style=flat-square&logo=githubpages&logoColor=white)](https://indian-aman.github.io/necklink/)
48
+ [![PyPI pynltp](https://img.shields.io/pypi/v/pynltp?style=flat-square&logo=pypi&logoColor=white&label=pynltp&color=3775A9&cacheSeconds=300)](https://pypi.org/project/pynltp/)
49
+ [![PyPI neckcompass](https://img.shields.io/pypi/v/neckcompass?style=flat-square&logo=pypi&logoColor=white&label=neckcompass&color=F59E0B&cacheSeconds=300)](https://pypi.org/project/neckcompass/)
50
+ [![PyPI necksight](https://img.shields.io/pypi/v/necksight?style=flat-square&logo=pypi&logoColor=white&label=necksight&color=06B6D4&cacheSeconds=300)](https://pypi.org/project/necksight/)
51
+ [![PyPI neckcord](https://img.shields.io/pypi/v/neckcord?style=flat-square&logo=pypi&logoColor=white&label=neckcord&color=F43F5E&cacheSeconds=300)](https://pypi.org/project/neckcord/)
52
+ [![NeckSense v1.1.0](https://img.shields.io/badge/necksense-v1.1.0-10B981?style=flat-square&logo=python&logoColor=white)](https://github.com/indian-aman/necklink/tree/main/packages/necksense)
53
+ [![License: MIT](https://img.shields.io/badge/license-MIT-F59E0B?style=flat-square)](https://github.com/indian-aman/necklink/blob/main/LICENSE)
54
+
55
+ [**Website**](https://indian-aman.github.io/necklink/) ·
56
+ [**Products**](#products) ·
57
+ [**Install**](#install) ·
58
+ [**Repository layout**](#repository-layout) ·
59
+ [**Development**](#development)
60
+
61
+ </div>
62
+
63
+ <p align="center">
64
+ <img src="https://raw.githubusercontent.com/indian-aman/necklink/main/assets/necklink_brand_banner.png" alt="The five NeckLink modules mapped onto the fruit-fly nervous system" width="100%">
65
+ </p>
66
+
67
+ ---
68
+
69
+ ## Products
70
+
71
+ NeckLink is the brand; each product translates one subsystem of the fruit-fly nervous system into a standalone library. Every product has a Python package on PyPI and a zero-heap, zero-float ANSI C99 core for microcontrollers (hardware-tested on `ESP32` and `ESP8266EX`; portable ANSI C99 for other targets), and each one is benchmarked against a strong classical baseline, including where the baseline still wins.
72
+
73
+ | Product | Fly circuit | What it does | Package |
74
+ | :--- | :--- | :--- | :--- |
75
+ | **[NLTP](https://github.com/indian-aman/necklink/tree/main/packages/nltp)** (`v1.4.0`) | Cervical connective | Loss-healing `GF(2^8)` Cauchy FEC file & priority-command transport with `ChaCha20-Poly1305` per-session encryption over UDP (incl. 4G CGNAT traversal) or routerless ESP-NOW across `ESP32` & `ESP8266`, in Python, C99, JS/TS (`Node.js`), Java 11+, and Arduino (`216/216` cross-language checks + `100%` `SHA-256` @ `35%` RF loss verified) | [`pynltp`](https://pypi.org/project/pynltp/) |
76
+ | **[NeckCompass](https://github.com/indian-aman/necklink/tree/main/packages/neckcompass)** (`v1.1.0`) | Central complex (`E-PG` / `CPU4`) | Ring-attractor compass that rejects `70°–150°` magnetometer spikes as well as a 3σ-gated EKF (`0.44°` vs `0.41°` RMSE), re-anchors after a 90° heading upset where the gated EKF stays stuck, and homes without GNSS (`324 B` RAM in C99) | [`neckcompass`](https://pypi.org/project/neckcompass/) |
77
+ | **[NeckSight](https://github.com/indian-aman/necklink/tree/main/packages/necksight)** (`v1.1.0`) | Optic lobe (`T4/T5` + `LPLC2`) | Glare-adapted motion detection and a four-quadrant looming reflex: `0.9988` AUROC on synthetic clutter vs `0.875` for compensated pyramidal Lucas-Kanade, gyro derotation so obstacles are still caught during fast turns, ~12,000 FPS at 32×32 in C99 (desktop) | [`necksight`](https://pypi.org/project/necksight/) |
78
+ | **[NeckCord](https://github.com/indian-aman/necklink/tree/main/packages/neckcord)** (`v1.1.0`) | Ventral nerve cord (`BANC` / `MANC`) | 4-byte motor command frame, self-healing six-leg gait generator, and a fault-tolerant thruster allocator that isolates a failed thruster in ~`42 ms` (on par with pseudo-inverse + threshold FDI) and can return it to service (`322 B` in C99) | [`neckcord`](https://pypi.org/project/neckcord/) |
79
+ | **[NeckSense](https://github.com/indian-aman/necklink/tree/main/packages/necksense)** (`v1.1.0`) | Antennal lobe & mushroom body | Concentration-invariant normalisation, multiplication-free FlyHash, one-shot novelty detection (`0.994` AUROC in 4 KB) and one-shot classification, with `Q16.16` C99 that is bit-identical to Python | [`packages/necksense`](https://github.com/indian-aman/necklink/tree/main/packages/necksense#install) |
80
+
81
+ Each product's README has its full benchmarks, its API and a "when not to use it" section. Each benchmark compares against the strongest simple classical baseline we could build: a gated EKF, threshold FDI, baseline-corrected k-NN, or compensated pyramidal optical flow. Where that baseline ties or wins, the README says so.
82
+
83
+ > **November 2026 release notes (`NLTP v1.3.2` + `v1.1.0` organ suite):**
84
+ > - **Live on PyPI (`pynltp 1.3.2`, `neckcompass 1.1.0`, `necksight 1.1.0`, `neckcord 1.1.0`)**:
85
+ > - **NLTP `1.3.2` (`pynltp`)**: Confirmed priority reflex lane (`PT_REFLEX_ACK`), C/ESP mid-stream anti-stall takeover guard, hardened multi-peer `ESP-NOW` hub (pre-auth slot gate + LRU 20-peer table), and live off-Wi-Fi `ESP32` (encrypted, `~7 Mbps` typical, `17.75 Mbps` best) + cross-chip `ESP8266EX` (`NodeMCU`) 3-board mesh verification.
86
+ > - **Organ Suite `1.1.0` (`neckcompass`, `necksight`, `neckcord`, `necksense`)**: Audited against strong classical baselines, with real sensor-noise re-anchoring and drift fixes in `NeckCompass`, gyro derotation + Python 3.9 compatibility in `NeckSight`, thruster recovery probing in `NeckCord`, and sparser novelty codes in `NeckSense`.
87
+ > - `necksense 1.1.0` and the `necklink` umbrella installer are pending PyPI's new-project creation quota reset; install `necksense` directly from this repository as shown below.
88
+ > - **NLTP `1.4.0` (this repository, not yet on PyPI) is a security release**: encrypted sessions now use per-session keys from a 1-RTT handshake, which fixes accepting recorded traffic after a restart and nonce reuse between sessions. Encrypted `1.4` and `1.3.x` devices do not interoperate, so upgrade them together; see the [NLTP security model](https://github.com/indian-aman/necklink/tree/main/packages/nltp#24-encrypted-sessions--security-model-v14).
89
+
90
+ ---
91
+
92
+ ## Install
93
+
94
+ ```bash
95
+ pip install --upgrade pynltp neckcompass necksight neckcord
96
+ pip install "git+https://github.com/indian-aman/necklink.git#subdirectory=packages/necksense"
97
+ ```
98
+
99
+ Every package supports Python 3.9+ and depends only on NumPy (`pynltp` also uses `cryptography`). Each one's C99 core is self-contained inside `csrc/` so you can copy it directly into firmware.
100
+
101
+ ### Run all five together
102
+
103
+ The `necklink` command ships with `pynltp`. With all five packages installed:
104
+
105
+ ```bash
106
+ necklink products # List the installed NeckLink products and versions
107
+ necklink suite-demo --loss 0.15 # Closed-loop five-module reflex mission over encrypted, lossy UDP
108
+ ```
109
+
110
+ ```python
111
+ from necklink import run_autonomous_reflex_demo
112
+
113
+ report = run_autonomous_reflex_demo(loss=0.15)
114
+ print(report)
115
+ ```
116
+
117
+ ---
118
+
119
+ ## Repository layout
120
+
121
+ ```text
122
+ necklink/
123
+ ├── packages/
124
+ │ ├── nltp/ NLTP wire protocol (v1.4.0): Python, C99, JS/TS (Node.js), Java 11+, Arduino, ESP32/ESP8266
125
+ │ ├── neckcompass/ Central-complex compass and path integrator (v1.1.0)
126
+ │ ├── necksight/ Optic-lobe motion and looming reflex (v1.1.0)
127
+ │ ├── neckcord/ Ventral-nerve-cord motor codec and thruster allocator (v1.1.0)
128
+ │ └── necksense/ Antennal-lobe and mushroom-body odour engine (v1.1.0)
129
+ ├── umbrella/ The `necklink` PyPI meta-package (v1.4.0) that installs all five
130
+ ├── web/ Source of the website (deployed to the gh-pages branch)
131
+ └── assets/ NeckLink logo, brand banner and shared images
132
+ ```
133
+
134
+ Every folder under `packages/` is a self-contained project with its own `pyproject.toml`, tests, C99 core, benchmarks, README and licence, and is released to PyPI on its own. Python import names are `import nltp`, `import neckcompass`, `import necksight`, `import neckcord`, and `import necksense`.
135
+
136
+ ---
137
+
138
+ ## Development
139
+
140
+ Work inside the package you are changing:
141
+
142
+ ```bash
143
+ cd packages/neckcompass
144
+ pip install -e . pytest
145
+ python -m pytest # unit tests, plus every README example
146
+ make -C csrc clean all test # zero-heap C99 core and its self-tests
147
+ python scripts/benchmark_neckcompass.py # regenerates results/ and the chart (needs matplotlib)
148
+ ```
149
+
150
+ CI ([`.github/workflows/packages-ci.yml`](https://github.com/indian-aman/necklink/blob/main/.github/workflows/packages-ci.yml)) runs the following on Python 3.9 and 3.13 for NeckCompass, NeckCord, NeckSense and NeckSight:
151
+ - builds each package's wheel and installs it;
152
+ - runs its CLI;
153
+ - runs its tests, including the README examples;
154
+ - builds the C core with `-Werror` and runs its self-tests.
155
+
156
+ NLTP also has JavaScript (`packages/nltp/js`), Java 11+ (`packages/nltp/java`) and ESP32/ESP8266 (`packages/nltp/arduino`, `packages/nltp/esp32`, `packages/nltp/esp32_mesh`) SDKs; see [its README](https://github.com/indian-aman/necklink/tree/main/packages/nltp#readme).
157
+
158
+ ### History
159
+
160
+ NeckCompass, NeckSight, NeckCord and NeckSense started in their own repositories and were merged here with their full commit history on 4 November 2026. The old repositories are archived and read-only.
161
+
162
+ ---
163
+
164
+ ## License
165
+
166
+ Released under the [MIT License](https://github.com/indian-aman/necklink/blob/main/LICENSE). Copyright (c) 2026 Amandeep Singh Bains.
@@ -0,0 +1,132 @@
1
+ <div align="center">
2
+
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/indian-aman/necklink/main/assets/logo/necklink-logo-dark.png">
5
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/indian-aman/necklink/main/assets/logo/necklink-logo-light.png">
6
+ <img alt="NeckLink" src="https://raw.githubusercontent.com/indian-aman/necklink/main/assets/logo/necklink-logo-light.png" width="320">
7
+ </picture>
8
+
9
+ ### Fruit-fly brain edge autonomy, in Python and zero-heap ANSI C99
10
+
11
+ **Five open-source modules modelled on the adult *Drosophila* central nervous system, built for lossy radios, GPS-denied vehicles, micro-drones and low-cost microcontrollers.**
12
+
13
+ [![Website](https://img.shields.io/badge/website-indian--aman.github.io%2Fnecklink-0EA5E9?style=flat-square&logo=githubpages&logoColor=white)](https://indian-aman.github.io/necklink/)
14
+ [![PyPI pynltp](https://img.shields.io/pypi/v/pynltp?style=flat-square&logo=pypi&logoColor=white&label=pynltp&color=3775A9&cacheSeconds=300)](https://pypi.org/project/pynltp/)
15
+ [![PyPI neckcompass](https://img.shields.io/pypi/v/neckcompass?style=flat-square&logo=pypi&logoColor=white&label=neckcompass&color=F59E0B&cacheSeconds=300)](https://pypi.org/project/neckcompass/)
16
+ [![PyPI necksight](https://img.shields.io/pypi/v/necksight?style=flat-square&logo=pypi&logoColor=white&label=necksight&color=06B6D4&cacheSeconds=300)](https://pypi.org/project/necksight/)
17
+ [![PyPI neckcord](https://img.shields.io/pypi/v/neckcord?style=flat-square&logo=pypi&logoColor=white&label=neckcord&color=F43F5E&cacheSeconds=300)](https://pypi.org/project/neckcord/)
18
+ [![NeckSense v1.1.0](https://img.shields.io/badge/necksense-v1.1.0-10B981?style=flat-square&logo=python&logoColor=white)](https://github.com/indian-aman/necklink/tree/main/packages/necksense)
19
+ [![License: MIT](https://img.shields.io/badge/license-MIT-F59E0B?style=flat-square)](https://github.com/indian-aman/necklink/blob/main/LICENSE)
20
+
21
+ [**Website**](https://indian-aman.github.io/necklink/) ·
22
+ [**Products**](#products) ·
23
+ [**Install**](#install) ·
24
+ [**Repository layout**](#repository-layout) ·
25
+ [**Development**](#development)
26
+
27
+ </div>
28
+
29
+ <p align="center">
30
+ <img src="https://raw.githubusercontent.com/indian-aman/necklink/main/assets/necklink_brand_banner.png" alt="The five NeckLink modules mapped onto the fruit-fly nervous system" width="100%">
31
+ </p>
32
+
33
+ ---
34
+
35
+ ## Products
36
+
37
+ NeckLink is the brand; each product translates one subsystem of the fruit-fly nervous system into a standalone library. Every product has a Python package on PyPI and a zero-heap, zero-float ANSI C99 core for microcontrollers (hardware-tested on `ESP32` and `ESP8266EX`; portable ANSI C99 for other targets), and each one is benchmarked against a strong classical baseline, including where the baseline still wins.
38
+
39
+ | Product | Fly circuit | What it does | Package |
40
+ | :--- | :--- | :--- | :--- |
41
+ | **[NLTP](https://github.com/indian-aman/necklink/tree/main/packages/nltp)** (`v1.4.0`) | Cervical connective | Loss-healing `GF(2^8)` Cauchy FEC file & priority-command transport with `ChaCha20-Poly1305` per-session encryption over UDP (incl. 4G CGNAT traversal) or routerless ESP-NOW across `ESP32` & `ESP8266`, in Python, C99, JS/TS (`Node.js`), Java 11+, and Arduino (`216/216` cross-language checks + `100%` `SHA-256` @ `35%` RF loss verified) | [`pynltp`](https://pypi.org/project/pynltp/) |
42
+ | **[NeckCompass](https://github.com/indian-aman/necklink/tree/main/packages/neckcompass)** (`v1.1.0`) | Central complex (`E-PG` / `CPU4`) | Ring-attractor compass that rejects `70°–150°` magnetometer spikes as well as a 3σ-gated EKF (`0.44°` vs `0.41°` RMSE), re-anchors after a 90° heading upset where the gated EKF stays stuck, and homes without GNSS (`324 B` RAM in C99) | [`neckcompass`](https://pypi.org/project/neckcompass/) |
43
+ | **[NeckSight](https://github.com/indian-aman/necklink/tree/main/packages/necksight)** (`v1.1.0`) | Optic lobe (`T4/T5` + `LPLC2`) | Glare-adapted motion detection and a four-quadrant looming reflex: `0.9988` AUROC on synthetic clutter vs `0.875` for compensated pyramidal Lucas-Kanade, gyro derotation so obstacles are still caught during fast turns, ~12,000 FPS at 32×32 in C99 (desktop) | [`necksight`](https://pypi.org/project/necksight/) |
44
+ | **[NeckCord](https://github.com/indian-aman/necklink/tree/main/packages/neckcord)** (`v1.1.0`) | Ventral nerve cord (`BANC` / `MANC`) | 4-byte motor command frame, self-healing six-leg gait generator, and a fault-tolerant thruster allocator that isolates a failed thruster in ~`42 ms` (on par with pseudo-inverse + threshold FDI) and can return it to service (`322 B` in C99) | [`neckcord`](https://pypi.org/project/neckcord/) |
45
+ | **[NeckSense](https://github.com/indian-aman/necklink/tree/main/packages/necksense)** (`v1.1.0`) | Antennal lobe & mushroom body | Concentration-invariant normalisation, multiplication-free FlyHash, one-shot novelty detection (`0.994` AUROC in 4 KB) and one-shot classification, with `Q16.16` C99 that is bit-identical to Python | [`packages/necksense`](https://github.com/indian-aman/necklink/tree/main/packages/necksense#install) |
46
+
47
+ Each product's README has its full benchmarks, its API and a "when not to use it" section. Each benchmark compares against the strongest simple classical baseline we could build: a gated EKF, threshold FDI, baseline-corrected k-NN, or compensated pyramidal optical flow. Where that baseline ties or wins, the README says so.
48
+
49
+ > **November 2026 release notes (`NLTP v1.3.2` + `v1.1.0` organ suite):**
50
+ > - **Live on PyPI (`pynltp 1.3.2`, `neckcompass 1.1.0`, `necksight 1.1.0`, `neckcord 1.1.0`)**:
51
+ > - **NLTP `1.3.2` (`pynltp`)**: Confirmed priority reflex lane (`PT_REFLEX_ACK`), C/ESP mid-stream anti-stall takeover guard, hardened multi-peer `ESP-NOW` hub (pre-auth slot gate + LRU 20-peer table), and live off-Wi-Fi `ESP32` (encrypted, `~7 Mbps` typical, `17.75 Mbps` best) + cross-chip `ESP8266EX` (`NodeMCU`) 3-board mesh verification.
52
+ > - **Organ Suite `1.1.0` (`neckcompass`, `necksight`, `neckcord`, `necksense`)**: Audited against strong classical baselines, with real sensor-noise re-anchoring and drift fixes in `NeckCompass`, gyro derotation + Python 3.9 compatibility in `NeckSight`, thruster recovery probing in `NeckCord`, and sparser novelty codes in `NeckSense`.
53
+ > - `necksense 1.1.0` and the `necklink` umbrella installer are pending PyPI's new-project creation quota reset; install `necksense` directly from this repository as shown below.
54
+ > - **NLTP `1.4.0` (this repository, not yet on PyPI) is a security release**: encrypted sessions now use per-session keys from a 1-RTT handshake, which fixes accepting recorded traffic after a restart and nonce reuse between sessions. Encrypted `1.4` and `1.3.x` devices do not interoperate, so upgrade them together; see the [NLTP security model](https://github.com/indian-aman/necklink/tree/main/packages/nltp#24-encrypted-sessions--security-model-v14).
55
+
56
+ ---
57
+
58
+ ## Install
59
+
60
+ ```bash
61
+ pip install --upgrade pynltp neckcompass necksight neckcord
62
+ pip install "git+https://github.com/indian-aman/necklink.git#subdirectory=packages/necksense"
63
+ ```
64
+
65
+ Every package supports Python 3.9+ and depends only on NumPy (`pynltp` also uses `cryptography`). Each one's C99 core is self-contained inside `csrc/` so you can copy it directly into firmware.
66
+
67
+ ### Run all five together
68
+
69
+ The `necklink` command ships with `pynltp`. With all five packages installed:
70
+
71
+ ```bash
72
+ necklink products # List the installed NeckLink products and versions
73
+ necklink suite-demo --loss 0.15 # Closed-loop five-module reflex mission over encrypted, lossy UDP
74
+ ```
75
+
76
+ ```python
77
+ from necklink import run_autonomous_reflex_demo
78
+
79
+ report = run_autonomous_reflex_demo(loss=0.15)
80
+ print(report)
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Repository layout
86
+
87
+ ```text
88
+ necklink/
89
+ ├── packages/
90
+ │ ├── nltp/ NLTP wire protocol (v1.4.0): Python, C99, JS/TS (Node.js), Java 11+, Arduino, ESP32/ESP8266
91
+ │ ├── neckcompass/ Central-complex compass and path integrator (v1.1.0)
92
+ │ ├── necksight/ Optic-lobe motion and looming reflex (v1.1.0)
93
+ │ ├── neckcord/ Ventral-nerve-cord motor codec and thruster allocator (v1.1.0)
94
+ │ └── necksense/ Antennal-lobe and mushroom-body odour engine (v1.1.0)
95
+ ├── umbrella/ The `necklink` PyPI meta-package (v1.4.0) that installs all five
96
+ ├── web/ Source of the website (deployed to the gh-pages branch)
97
+ └── assets/ NeckLink logo, brand banner and shared images
98
+ ```
99
+
100
+ Every folder under `packages/` is a self-contained project with its own `pyproject.toml`, tests, C99 core, benchmarks, README and licence, and is released to PyPI on its own. Python import names are `import nltp`, `import neckcompass`, `import necksight`, `import neckcord`, and `import necksense`.
101
+
102
+ ---
103
+
104
+ ## Development
105
+
106
+ Work inside the package you are changing:
107
+
108
+ ```bash
109
+ cd packages/neckcompass
110
+ pip install -e . pytest
111
+ python -m pytest # unit tests, plus every README example
112
+ make -C csrc clean all test # zero-heap C99 core and its self-tests
113
+ python scripts/benchmark_neckcompass.py # regenerates results/ and the chart (needs matplotlib)
114
+ ```
115
+
116
+ CI ([`.github/workflows/packages-ci.yml`](https://github.com/indian-aman/necklink/blob/main/.github/workflows/packages-ci.yml)) runs the following on Python 3.9 and 3.13 for NeckCompass, NeckCord, NeckSense and NeckSight:
117
+ - builds each package's wheel and installs it;
118
+ - runs its CLI;
119
+ - runs its tests, including the README examples;
120
+ - builds the C core with `-Werror` and runs its self-tests.
121
+
122
+ NLTP also has JavaScript (`packages/nltp/js`), Java 11+ (`packages/nltp/java`) and ESP32/ESP8266 (`packages/nltp/arduino`, `packages/nltp/esp32`, `packages/nltp/esp32_mesh`) SDKs; see [its README](https://github.com/indian-aman/necklink/tree/main/packages/nltp#readme).
123
+
124
+ ### History
125
+
126
+ NeckCompass, NeckSight, NeckCord and NeckSense started in their own repositories and were merged here with their full commit history on 4 November 2026. The old repositories are archived and read-only.
127
+
128
+ ---
129
+
130
+ ## License
131
+
132
+ Released under the [MIT License](https://github.com/indian-aman/necklink/blob/main/LICENSE). Copyright (c) 2026 Amandeep Singh Bains.
@@ -0,0 +1,2 @@
1
+ """Umbrella meta-package shim for `pip install necklink` (provides `pynltp`, `necksense`, `neckcompass`, `necksight`, `neckcord`)."""
2
+ __version__ = "1.4.0"
@@ -0,0 +1,166 @@
1
+ Metadata-Version: 2.4
2
+ Name: necklink
3
+ Version: 1.4.0
4
+ Summary: NeckLink Fruit-Fly Brain Edge Autonomy & Wire Suite: umbrella installer for pynltp, necksense, neckcompass, necksight, and neckcord
5
+ Author: Amandeep Singh Bains
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/indian-aman/necklink
8
+ Project-URL: Repository, https://github.com/indian-aman/necklink
9
+ Project-URL: Releases, https://github.com/indian-aman/necklink/releases
10
+ Project-URL: Issues, https://github.com/indian-aman/necklink/issues
11
+ Project-URL: Documentation, https://github.com/indian-aman/necklink#readme
12
+ Keywords: necklink,pynltp,necksense,neckcompass,necksight,neckcord,drosophila,connectome,neuromorphic,robotics,usv,esp32
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: C
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
24
+ Classifier: Topic :: System :: Networking
25
+ Requires-Python: >=3.9
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: pynltp>=1.4.0
29
+ Requires-Dist: necksense>=1.1.0
30
+ Requires-Dist: neckcompass>=1.1.0
31
+ Requires-Dist: necksight>=1.1.0
32
+ Requires-Dist: neckcord>=1.1.0
33
+ Dynamic: license-file
34
+
35
+ <div align="center">
36
+
37
+ <picture>
38
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/indian-aman/necklink/main/assets/logo/necklink-logo-dark.png">
39
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/indian-aman/necklink/main/assets/logo/necklink-logo-light.png">
40
+ <img alt="NeckLink" src="https://raw.githubusercontent.com/indian-aman/necklink/main/assets/logo/necklink-logo-light.png" width="320">
41
+ </picture>
42
+
43
+ ### Fruit-fly brain edge autonomy, in Python and zero-heap ANSI C99
44
+
45
+ **Five open-source modules modelled on the adult *Drosophila* central nervous system, built for lossy radios, GPS-denied vehicles, micro-drones and low-cost microcontrollers.**
46
+
47
+ [![Website](https://img.shields.io/badge/website-indian--aman.github.io%2Fnecklink-0EA5E9?style=flat-square&logo=githubpages&logoColor=white)](https://indian-aman.github.io/necklink/)
48
+ [![PyPI pynltp](https://img.shields.io/pypi/v/pynltp?style=flat-square&logo=pypi&logoColor=white&label=pynltp&color=3775A9&cacheSeconds=300)](https://pypi.org/project/pynltp/)
49
+ [![PyPI neckcompass](https://img.shields.io/pypi/v/neckcompass?style=flat-square&logo=pypi&logoColor=white&label=neckcompass&color=F59E0B&cacheSeconds=300)](https://pypi.org/project/neckcompass/)
50
+ [![PyPI necksight](https://img.shields.io/pypi/v/necksight?style=flat-square&logo=pypi&logoColor=white&label=necksight&color=06B6D4&cacheSeconds=300)](https://pypi.org/project/necksight/)
51
+ [![PyPI neckcord](https://img.shields.io/pypi/v/neckcord?style=flat-square&logo=pypi&logoColor=white&label=neckcord&color=F43F5E&cacheSeconds=300)](https://pypi.org/project/neckcord/)
52
+ [![NeckSense v1.1.0](https://img.shields.io/badge/necksense-v1.1.0-10B981?style=flat-square&logo=python&logoColor=white)](https://github.com/indian-aman/necklink/tree/main/packages/necksense)
53
+ [![License: MIT](https://img.shields.io/badge/license-MIT-F59E0B?style=flat-square)](https://github.com/indian-aman/necklink/blob/main/LICENSE)
54
+
55
+ [**Website**](https://indian-aman.github.io/necklink/) ·
56
+ [**Products**](#products) ·
57
+ [**Install**](#install) ·
58
+ [**Repository layout**](#repository-layout) ·
59
+ [**Development**](#development)
60
+
61
+ </div>
62
+
63
+ <p align="center">
64
+ <img src="https://raw.githubusercontent.com/indian-aman/necklink/main/assets/necklink_brand_banner.png" alt="The five NeckLink modules mapped onto the fruit-fly nervous system" width="100%">
65
+ </p>
66
+
67
+ ---
68
+
69
+ ## Products
70
+
71
+ NeckLink is the brand; each product translates one subsystem of the fruit-fly nervous system into a standalone library. Every product has a Python package on PyPI and a zero-heap, zero-float ANSI C99 core for microcontrollers (hardware-tested on `ESP32` and `ESP8266EX`; portable ANSI C99 for other targets), and each one is benchmarked against a strong classical baseline, including where the baseline still wins.
72
+
73
+ | Product | Fly circuit | What it does | Package |
74
+ | :--- | :--- | :--- | :--- |
75
+ | **[NLTP](https://github.com/indian-aman/necklink/tree/main/packages/nltp)** (`v1.4.0`) | Cervical connective | Loss-healing `GF(2^8)` Cauchy FEC file & priority-command transport with `ChaCha20-Poly1305` per-session encryption over UDP (incl. 4G CGNAT traversal) or routerless ESP-NOW across `ESP32` & `ESP8266`, in Python, C99, JS/TS (`Node.js`), Java 11+, and Arduino (`216/216` cross-language checks + `100%` `SHA-256` @ `35%` RF loss verified) | [`pynltp`](https://pypi.org/project/pynltp/) |
76
+ | **[NeckCompass](https://github.com/indian-aman/necklink/tree/main/packages/neckcompass)** (`v1.1.0`) | Central complex (`E-PG` / `CPU4`) | Ring-attractor compass that rejects `70°–150°` magnetometer spikes as well as a 3σ-gated EKF (`0.44°` vs `0.41°` RMSE), re-anchors after a 90° heading upset where the gated EKF stays stuck, and homes without GNSS (`324 B` RAM in C99) | [`neckcompass`](https://pypi.org/project/neckcompass/) |
77
+ | **[NeckSight](https://github.com/indian-aman/necklink/tree/main/packages/necksight)** (`v1.1.0`) | Optic lobe (`T4/T5` + `LPLC2`) | Glare-adapted motion detection and a four-quadrant looming reflex: `0.9988` AUROC on synthetic clutter vs `0.875` for compensated pyramidal Lucas-Kanade, gyro derotation so obstacles are still caught during fast turns, ~12,000 FPS at 32×32 in C99 (desktop) | [`necksight`](https://pypi.org/project/necksight/) |
78
+ | **[NeckCord](https://github.com/indian-aman/necklink/tree/main/packages/neckcord)** (`v1.1.0`) | Ventral nerve cord (`BANC` / `MANC`) | 4-byte motor command frame, self-healing six-leg gait generator, and a fault-tolerant thruster allocator that isolates a failed thruster in ~`42 ms` (on par with pseudo-inverse + threshold FDI) and can return it to service (`322 B` in C99) | [`neckcord`](https://pypi.org/project/neckcord/) |
79
+ | **[NeckSense](https://github.com/indian-aman/necklink/tree/main/packages/necksense)** (`v1.1.0`) | Antennal lobe & mushroom body | Concentration-invariant normalisation, multiplication-free FlyHash, one-shot novelty detection (`0.994` AUROC in 4 KB) and one-shot classification, with `Q16.16` C99 that is bit-identical to Python | [`packages/necksense`](https://github.com/indian-aman/necklink/tree/main/packages/necksense#install) |
80
+
81
+ Each product's README has its full benchmarks, its API and a "when not to use it" section. Each benchmark compares against the strongest simple classical baseline we could build: a gated EKF, threshold FDI, baseline-corrected k-NN, or compensated pyramidal optical flow. Where that baseline ties or wins, the README says so.
82
+
83
+ > **November 2026 release notes (`NLTP v1.3.2` + `v1.1.0` organ suite):**
84
+ > - **Live on PyPI (`pynltp 1.3.2`, `neckcompass 1.1.0`, `necksight 1.1.0`, `neckcord 1.1.0`)**:
85
+ > - **NLTP `1.3.2` (`pynltp`)**: Confirmed priority reflex lane (`PT_REFLEX_ACK`), C/ESP mid-stream anti-stall takeover guard, hardened multi-peer `ESP-NOW` hub (pre-auth slot gate + LRU 20-peer table), and live off-Wi-Fi `ESP32` (encrypted, `~7 Mbps` typical, `17.75 Mbps` best) + cross-chip `ESP8266EX` (`NodeMCU`) 3-board mesh verification.
86
+ > - **Organ Suite `1.1.0` (`neckcompass`, `necksight`, `neckcord`, `necksense`)**: Audited against strong classical baselines, with real sensor-noise re-anchoring and drift fixes in `NeckCompass`, gyro derotation + Python 3.9 compatibility in `NeckSight`, thruster recovery probing in `NeckCord`, and sparser novelty codes in `NeckSense`.
87
+ > - `necksense 1.1.0` and the `necklink` umbrella installer are pending PyPI's new-project creation quota reset; install `necksense` directly from this repository as shown below.
88
+ > - **NLTP `1.4.0` (this repository, not yet on PyPI) is a security release**: encrypted sessions now use per-session keys from a 1-RTT handshake, which fixes accepting recorded traffic after a restart and nonce reuse between sessions. Encrypted `1.4` and `1.3.x` devices do not interoperate, so upgrade them together; see the [NLTP security model](https://github.com/indian-aman/necklink/tree/main/packages/nltp#24-encrypted-sessions--security-model-v14).
89
+
90
+ ---
91
+
92
+ ## Install
93
+
94
+ ```bash
95
+ pip install --upgrade pynltp neckcompass necksight neckcord
96
+ pip install "git+https://github.com/indian-aman/necklink.git#subdirectory=packages/necksense"
97
+ ```
98
+
99
+ Every package supports Python 3.9+ and depends only on NumPy (`pynltp` also uses `cryptography`). Each one's C99 core is self-contained inside `csrc/` so you can copy it directly into firmware.
100
+
101
+ ### Run all five together
102
+
103
+ The `necklink` command ships with `pynltp`. With all five packages installed:
104
+
105
+ ```bash
106
+ necklink products # List the installed NeckLink products and versions
107
+ necklink suite-demo --loss 0.15 # Closed-loop five-module reflex mission over encrypted, lossy UDP
108
+ ```
109
+
110
+ ```python
111
+ from necklink import run_autonomous_reflex_demo
112
+
113
+ report = run_autonomous_reflex_demo(loss=0.15)
114
+ print(report)
115
+ ```
116
+
117
+ ---
118
+
119
+ ## Repository layout
120
+
121
+ ```text
122
+ necklink/
123
+ ├── packages/
124
+ │ ├── nltp/ NLTP wire protocol (v1.4.0): Python, C99, JS/TS (Node.js), Java 11+, Arduino, ESP32/ESP8266
125
+ │ ├── neckcompass/ Central-complex compass and path integrator (v1.1.0)
126
+ │ ├── necksight/ Optic-lobe motion and looming reflex (v1.1.0)
127
+ │ ├── neckcord/ Ventral-nerve-cord motor codec and thruster allocator (v1.1.0)
128
+ │ └── necksense/ Antennal-lobe and mushroom-body odour engine (v1.1.0)
129
+ ├── umbrella/ The `necklink` PyPI meta-package (v1.4.0) that installs all five
130
+ ├── web/ Source of the website (deployed to the gh-pages branch)
131
+ └── assets/ NeckLink logo, brand banner and shared images
132
+ ```
133
+
134
+ Every folder under `packages/` is a self-contained project with its own `pyproject.toml`, tests, C99 core, benchmarks, README and licence, and is released to PyPI on its own. Python import names are `import nltp`, `import neckcompass`, `import necksight`, `import neckcord`, and `import necksense`.
135
+
136
+ ---
137
+
138
+ ## Development
139
+
140
+ Work inside the package you are changing:
141
+
142
+ ```bash
143
+ cd packages/neckcompass
144
+ pip install -e . pytest
145
+ python -m pytest # unit tests, plus every README example
146
+ make -C csrc clean all test # zero-heap C99 core and its self-tests
147
+ python scripts/benchmark_neckcompass.py # regenerates results/ and the chart (needs matplotlib)
148
+ ```
149
+
150
+ CI ([`.github/workflows/packages-ci.yml`](https://github.com/indian-aman/necklink/blob/main/.github/workflows/packages-ci.yml)) runs the following on Python 3.9 and 3.13 for NeckCompass, NeckCord, NeckSense and NeckSight:
151
+ - builds each package's wheel and installs it;
152
+ - runs its CLI;
153
+ - runs its tests, including the README examples;
154
+ - builds the C core with `-Werror` and runs its self-tests.
155
+
156
+ NLTP also has JavaScript (`packages/nltp/js`), Java 11+ (`packages/nltp/java`) and ESP32/ESP8266 (`packages/nltp/arduino`, `packages/nltp/esp32`, `packages/nltp/esp32_mesh`) SDKs; see [its README](https://github.com/indian-aman/necklink/tree/main/packages/nltp#readme).
157
+
158
+ ### History
159
+
160
+ NeckCompass, NeckSight, NeckCord and NeckSense started in their own repositories and were merged here with their full commit history on 4 November 2026. The old repositories are archived and read-only.
161
+
162
+ ---
163
+
164
+ ## License
165
+
166
+ Released under the [MIT License](https://github.com/indian-aman/necklink/blob/main/LICENSE). Copyright (c) 2026 Amandeep Singh Bains.
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ _necklink_umbrella/__init__.py
6
+ necklink.egg-info/PKG-INFO
7
+ necklink.egg-info/SOURCES.txt
8
+ necklink.egg-info/dependency_links.txt
9
+ necklink.egg-info/requires.txt
10
+ necklink.egg-info/top_level.txt
@@ -0,0 +1,5 @@
1
+ pynltp>=1.4.0
2
+ necksense>=1.1.0
3
+ neckcompass>=1.1.0
4
+ necksight>=1.1.0
5
+ neckcord>=1.1.0
@@ -0,0 +1 @@
1
+ _necklink_umbrella
@@ -0,0 +1,59 @@
1
+ [build-system]
2
+ requires = ["setuptools>=64"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "necklink"
7
+ version = "1.4.0"
8
+ description = "NeckLink Fruit-Fly Brain Edge Autonomy & Wire Suite: umbrella installer for pynltp, necksense, neckcompass, necksight, and neckcord"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = {text = "MIT"}
12
+ authors = [
13
+ {name = "Amandeep Singh Bains"}
14
+ ]
15
+ keywords = [
16
+ "necklink",
17
+ "pynltp",
18
+ "necksense",
19
+ "neckcompass",
20
+ "necksight",
21
+ "neckcord",
22
+ "drosophila",
23
+ "connectome",
24
+ "neuromorphic",
25
+ "robotics",
26
+ "usv",
27
+ "esp32",
28
+ ]
29
+ classifiers = [
30
+ "Development Status :: 5 - Production/Stable",
31
+ "Intended Audience :: Developers",
32
+ "Intended Audience :: Science/Research",
33
+ "Operating System :: OS Independent",
34
+ "Programming Language :: C",
35
+ "Programming Language :: Python :: 3",
36
+ "Programming Language :: Python :: 3.9",
37
+ "Programming Language :: Python :: 3.10",
38
+ "Programming Language :: Python :: 3.11",
39
+ "Programming Language :: Python :: 3.12",
40
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
41
+ "Topic :: System :: Networking",
42
+ ]
43
+ dependencies = [
44
+ "pynltp>=1.4.0",
45
+ "necksense>=1.1.0",
46
+ "neckcompass>=1.1.0",
47
+ "necksight>=1.1.0",
48
+ "neckcord>=1.1.0",
49
+ ]
50
+
51
+ [project.urls]
52
+ Homepage = "https://github.com/indian-aman/necklink"
53
+ Repository = "https://github.com/indian-aman/necklink"
54
+ Releases = "https://github.com/indian-aman/necklink/releases"
55
+ Issues = "https://github.com/indian-aman/necklink/issues"
56
+ Documentation = "https://github.com/indian-aman/necklink#readme"
57
+
58
+ [tool.setuptools.packages.find]
59
+ include = ["_necklink_umbrella*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+