halyn 0.3.0__tar.gz → 0.3.1__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.
Files changed (53) hide show
  1. halyn-0.3.1/PKG-INFO +178 -0
  2. halyn-0.3.1/README.md +142 -0
  3. {halyn-0.3.0 → halyn-0.3.1}/pyproject.toml +1 -1
  4. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/mcp_serve.py +2 -2
  5. halyn-0.3.1/src/halyn.egg-info/PKG-INFO +178 -0
  6. halyn-0.3.0/PKG-INFO +0 -288
  7. halyn-0.3.0/README.md +0 -252
  8. halyn-0.3.0/src/halyn.egg-info/PKG-INFO +0 -288
  9. {halyn-0.3.0 → halyn-0.3.1}/LICENSE +0 -0
  10. {halyn-0.3.0 → halyn-0.3.1}/setup.cfg +0 -0
  11. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/__init__.py +0 -0
  12. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/__main__.py +0 -0
  13. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/audit.py +0 -0
  14. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/auth.py +0 -0
  15. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/autonomy.py +0 -0
  16. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/cli.py +0 -0
  17. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/config.py +0 -0
  18. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/consent.py +0 -0
  19. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/control_plane.py +0 -0
  20. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/discovery.py +0 -0
  21. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/drivers/__init__.py +0 -0
  22. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/drivers/browser.py +0 -0
  23. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/drivers/dds.py +0 -0
  24. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/drivers/docker.py +0 -0
  25. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/drivers/http_auto.py +0 -0
  26. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/drivers/mqtt.py +0 -0
  27. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/drivers/opcua.py +0 -0
  28. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/drivers/ros2.py +0 -0
  29. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/drivers/serial.py +0 -0
  30. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/drivers/socket_raw.py +0 -0
  31. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/drivers/ssh.py +0 -0
  32. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/drivers/unitree.py +0 -0
  33. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/drivers/websocket.py +0 -0
  34. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/engine.py +0 -0
  35. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/integrations/__init__.py +0 -0
  36. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/integrations/telegram.py +0 -0
  37. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/intent.py +0 -0
  38. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/llm.py +0 -0
  39. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/mcp.py +0 -0
  40. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/memory/__init__.py +0 -0
  41. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/memory/store.py +0 -0
  42. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/nrp_bridge.py +0 -0
  43. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/py.typed +0 -0
  44. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/sanitizer.py +0 -0
  45. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/server.py +0 -0
  46. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/types.py +0 -0
  47. {halyn-0.3.0 → halyn-0.3.1}/src/halyn/watchdog.py +0 -0
  48. {halyn-0.3.0 → halyn-0.3.1}/src/halyn.egg-info/SOURCES.txt +0 -0
  49. {halyn-0.3.0 → halyn-0.3.1}/src/halyn.egg-info/dependency_links.txt +0 -0
  50. {halyn-0.3.0 → halyn-0.3.1}/src/halyn.egg-info/entry_points.txt +0 -0
  51. {halyn-0.3.0 → halyn-0.3.1}/src/halyn.egg-info/requires.txt +0 -0
  52. {halyn-0.3.0 → halyn-0.3.1}/src/halyn.egg-info/top_level.txt +0 -0
  53. {halyn-0.3.0 → halyn-0.3.1}/tests/test_halyn.py +0 -0
halyn-0.3.1/PKG-INFO ADDED
@@ -0,0 +1,178 @@
1
+ Metadata-Version: 2.4
2
+ Name: halyn
3
+ Version: 0.3.1
4
+ Summary: Halyn — NRP control plane with domain-scoped authorization.
5
+ Author-email: Elmadani SALKA <contact@halyn.dev>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/ElmadaniS/halyn
8
+ Project-URL: Repository, https://github.com/ElmadaniS/halyn
9
+ Project-URL: Issues, https://github.com/ElmadaniS/halyn/issues
10
+ Keywords: ai,browser,robotics,iot,mcp,nrp,llm,infrastructure,devops
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
15
+ Classifier: Topic :: System :: Systems Administration
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: nrprotocol>=0.1.0
20
+ Requires-Dist: aiohttp>=3.9
21
+ Provides-Extra: enterprise
22
+ Requires-Dist: grpcio>=1.60; extra == "enterprise"
23
+ Requires-Dist: psycopg2-binary; extra == "enterprise"
24
+ Requires-Dist: redis; extra == "enterprise"
25
+ Provides-Extra: robotics
26
+ Requires-Dist: rclpy; extra == "robotics"
27
+ Requires-Dist: unitree-sdk2py; extra == "robotics"
28
+ Provides-Extra: iot
29
+ Requires-Dist: paho-mqtt; extra == "iot"
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest; extra == "dev"
32
+ Requires-Dist: pytest-asyncio; extra == "dev"
33
+ Requires-Dist: mypy; extra == "dev"
34
+ Requires-Dist: ruff; extra == "dev"
35
+ Dynamic: license-file
36
+
37
+ <div align="center">
38
+
39
+ # Halyn
40
+
41
+ **Connect any device to any AI.**
42
+
43
+ [![PyPI](https://img.shields.io/pypi/v/halyn?style=flat-square&color=0a6e3f)](https://pypi.org/project/halyn/)
44
+ [![License](https://img.shields.io/badge/license-MIT-0a6e3f?style=flat-square)](LICENSE)
45
+ [![Python](https://img.shields.io/badge/python-3.10+-0a6e3f?style=flat-square)](https://pypi.org/project/halyn/)
46
+
47
+ MCP Server · 12 drivers · Shield rules · Audit chain · 5 autonomy levels
48
+
49
+ [Website](https://halyn.dev) · [Quickstart](#quickstart) · [MCP Server](#mcp-server) · [Tutorials](https://halyn.dev#tutorials)
50
+
51
+ </div>
52
+
53
+ ---
54
+
55
+ ## The Problem
56
+
57
+ MCP connects AI to software. But AI is entering the physical world — robots, drones, factories, farms, hospitals. There's no universal standard for how AI safely controls hardware.
58
+
59
+ **Halyn connects AI to everything else.** Servers, sensors, robots, industrial machines, smart homes — with safety rules the AI cannot break.
60
+
61
+ ## Quickstart
62
+
63
+ ```bash
64
+ pip install halyn
65
+ ```
66
+
67
+ ```python
68
+ from halyn import ControlPlane, SSHDriver
69
+
70
+ cp = ControlPlane()
71
+ cp.connect(SSHDriver("192.168.1.10", "admin"))
72
+
73
+ # Safety rules — the AI physically cannot bypass these
74
+ cp.shield("deny * delete *")
75
+ cp.shield("deny * write /etc/*")
76
+
77
+ # Observe
78
+ state = cp.observe()
79
+ print(state) # {"cpu": 23.4, "mem": 67.2, ...}
80
+
81
+ # Act (within shield rules)
82
+ cp.act("restart nginx") # ✓ allowed
83
+ cp.act("rm -rf /etc") # ✗ blocked by shield
84
+ ```
85
+
86
+ ## MCP Server
87
+
88
+ Connect Claude.ai, ChatGPT, Cursor, or any MCP client directly to your devices:
89
+
90
+ ```bash
91
+ # Start the MCP Server
92
+ halyn-mcp --port 8935
93
+
94
+ # In Claude.ai → Settings → MCP → Add Server
95
+ # URL: http://your-server:8935/mcp
96
+ ```
97
+
98
+ Then just talk:
99
+ - *"Show me the status of all connected devices"*
100
+ - *"What's the temperature in the greenhouse?"*
101
+ - *"Restart nginx on server-01"*
102
+ - *"Show me the audit trail"*
103
+
104
+ The AI sees your devices as tools. Shield rules still apply. Every action is audited.
105
+
106
+ ## 12 Drivers
107
+
108
+ | Driver | Target | Protocol |
109
+ |--------|--------|----------|
110
+ | `SSHDriver` | Linux/Mac servers | SSH |
111
+ | `HTTPDriver` | REST APIs, webhooks | HTTP |
112
+ | `WebSocketDriver` | Real-time streams | WebSocket |
113
+ | `SerialDriver` | Arduino, Pi, PLCs | Serial |
114
+ | `MQTTDriver` | IoT sensors | MQTT |
115
+ | `OPCUADriver` | Industrial machines | OPC-UA |
116
+ | `ROS2Driver` | Robots, drones | ROS2/DDS |
117
+ | `DDSDriver` | Real-time systems | DDS |
118
+ | `DockerDriver` | Containers | Docker API |
119
+ | `BrowserDriver` | Web automation | Chrome CDP |
120
+ | `UnitreeDriver` | Unitree robots | UDP |
121
+ | `SocketDriver` | Raw TCP/UDP | Socket |
122
+
123
+ ## Safety
124
+
125
+ **Shield Rules** — Constraints enforced at protocol level. The AI has no power to override them.
126
+
127
+ ```python
128
+ cp.shield("deny * delete *") # no deletions
129
+ cp.shield("deny * write temperature > 180") # thermal limit
130
+ cp.shield("deny lock unlock between 23:00-06:00") # doors locked at night
131
+ ```
132
+
133
+ **Audit Chain** — Every action recorded in SHA-256 hash chain. Tamper-evident. Append-only.
134
+
135
+ **Consent Protocol** — Devices and AI negotiate permissions before any interaction.
136
+
137
+ **5 Autonomy Levels** — From fully manual to fully autonomous. You choose.
138
+
139
+ | Level | Name | Who Decides |
140
+ |-------|------|-------------|
141
+ | 0 | Manual | Human does everything |
142
+ | 1 | Advisory | AI suggests, human acts |
143
+ | 2 | Supervised | AI acts, human approves |
144
+ | 3 | Monitored | AI acts freely, human watches |
145
+ | 4 | Autonomous | AI decides within shield rules |
146
+
147
+ ## Works with Every LLM
148
+
149
+ ```python
150
+ # Claude
151
+ import anthropic
152
+ client = anthropic.Anthropic()
153
+ response = client.messages.create(model="claude-sonnet-4-6", ...)
154
+ cp.act(response.content[0].text)
155
+
156
+ # GPT
157
+ from openai import OpenAI
158
+ client = OpenAI()
159
+ response = client.chat.completions.create(model="gpt-5", ...)
160
+
161
+ # Local (Ollama — no internet needed)
162
+ import ollama
163
+ response = ollama.chat(model="llama4", ...)
164
+
165
+ # All use the same shield rules. Same audit chain.
166
+ ```
167
+
168
+ ## Built on NRP
169
+
170
+ Halyn implements [NRP (Node Reach Protocol)](https://nrprotocol.dev) — the open standard for AI-to-device communication. 6 primitives: Manifest, Observe, Act, Shield, Audit, Consent.
171
+
172
+ ## Free. Open Source. Forever.
173
+
174
+ MIT licensed. Use it for anything. Modify it. Build a company on it. No fees, no limits, no lock-in.
175
+
176
+ ---
177
+
178
+ [halyn.dev](https://halyn.dev) · [nrprotocol.dev](https://nrprotocol.dev) · [PyPI](https://pypi.org/project/halyn/) · [contact@halyn.dev](mailto:contact@halyn.dev)
halyn-0.3.1/README.md ADDED
@@ -0,0 +1,142 @@
1
+ <div align="center">
2
+
3
+ # Halyn
4
+
5
+ **Connect any device to any AI.**
6
+
7
+ [![PyPI](https://img.shields.io/pypi/v/halyn?style=flat-square&color=0a6e3f)](https://pypi.org/project/halyn/)
8
+ [![License](https://img.shields.io/badge/license-MIT-0a6e3f?style=flat-square)](LICENSE)
9
+ [![Python](https://img.shields.io/badge/python-3.10+-0a6e3f?style=flat-square)](https://pypi.org/project/halyn/)
10
+
11
+ MCP Server · 12 drivers · Shield rules · Audit chain · 5 autonomy levels
12
+
13
+ [Website](https://halyn.dev) · [Quickstart](#quickstart) · [MCP Server](#mcp-server) · [Tutorials](https://halyn.dev#tutorials)
14
+
15
+ </div>
16
+
17
+ ---
18
+
19
+ ## The Problem
20
+
21
+ MCP connects AI to software. But AI is entering the physical world — robots, drones, factories, farms, hospitals. There's no universal standard for how AI safely controls hardware.
22
+
23
+ **Halyn connects AI to everything else.** Servers, sensors, robots, industrial machines, smart homes — with safety rules the AI cannot break.
24
+
25
+ ## Quickstart
26
+
27
+ ```bash
28
+ pip install halyn
29
+ ```
30
+
31
+ ```python
32
+ from halyn import ControlPlane, SSHDriver
33
+
34
+ cp = ControlPlane()
35
+ cp.connect(SSHDriver("192.168.1.10", "admin"))
36
+
37
+ # Safety rules — the AI physically cannot bypass these
38
+ cp.shield("deny * delete *")
39
+ cp.shield("deny * write /etc/*")
40
+
41
+ # Observe
42
+ state = cp.observe()
43
+ print(state) # {"cpu": 23.4, "mem": 67.2, ...}
44
+
45
+ # Act (within shield rules)
46
+ cp.act("restart nginx") # ✓ allowed
47
+ cp.act("rm -rf /etc") # ✗ blocked by shield
48
+ ```
49
+
50
+ ## MCP Server
51
+
52
+ Connect Claude.ai, ChatGPT, Cursor, or any MCP client directly to your devices:
53
+
54
+ ```bash
55
+ # Start the MCP Server
56
+ halyn-mcp --port 8935
57
+
58
+ # In Claude.ai → Settings → MCP → Add Server
59
+ # URL: http://your-server:8935/mcp
60
+ ```
61
+
62
+ Then just talk:
63
+ - *"Show me the status of all connected devices"*
64
+ - *"What's the temperature in the greenhouse?"*
65
+ - *"Restart nginx on server-01"*
66
+ - *"Show me the audit trail"*
67
+
68
+ The AI sees your devices as tools. Shield rules still apply. Every action is audited.
69
+
70
+ ## 12 Drivers
71
+
72
+ | Driver | Target | Protocol |
73
+ |--------|--------|----------|
74
+ | `SSHDriver` | Linux/Mac servers | SSH |
75
+ | `HTTPDriver` | REST APIs, webhooks | HTTP |
76
+ | `WebSocketDriver` | Real-time streams | WebSocket |
77
+ | `SerialDriver` | Arduino, Pi, PLCs | Serial |
78
+ | `MQTTDriver` | IoT sensors | MQTT |
79
+ | `OPCUADriver` | Industrial machines | OPC-UA |
80
+ | `ROS2Driver` | Robots, drones | ROS2/DDS |
81
+ | `DDSDriver` | Real-time systems | DDS |
82
+ | `DockerDriver` | Containers | Docker API |
83
+ | `BrowserDriver` | Web automation | Chrome CDP |
84
+ | `UnitreeDriver` | Unitree robots | UDP |
85
+ | `SocketDriver` | Raw TCP/UDP | Socket |
86
+
87
+ ## Safety
88
+
89
+ **Shield Rules** — Constraints enforced at protocol level. The AI has no power to override them.
90
+
91
+ ```python
92
+ cp.shield("deny * delete *") # no deletions
93
+ cp.shield("deny * write temperature > 180") # thermal limit
94
+ cp.shield("deny lock unlock between 23:00-06:00") # doors locked at night
95
+ ```
96
+
97
+ **Audit Chain** — Every action recorded in SHA-256 hash chain. Tamper-evident. Append-only.
98
+
99
+ **Consent Protocol** — Devices and AI negotiate permissions before any interaction.
100
+
101
+ **5 Autonomy Levels** — From fully manual to fully autonomous. You choose.
102
+
103
+ | Level | Name | Who Decides |
104
+ |-------|------|-------------|
105
+ | 0 | Manual | Human does everything |
106
+ | 1 | Advisory | AI suggests, human acts |
107
+ | 2 | Supervised | AI acts, human approves |
108
+ | 3 | Monitored | AI acts freely, human watches |
109
+ | 4 | Autonomous | AI decides within shield rules |
110
+
111
+ ## Works with Every LLM
112
+
113
+ ```python
114
+ # Claude
115
+ import anthropic
116
+ client = anthropic.Anthropic()
117
+ response = client.messages.create(model="claude-sonnet-4-6", ...)
118
+ cp.act(response.content[0].text)
119
+
120
+ # GPT
121
+ from openai import OpenAI
122
+ client = OpenAI()
123
+ response = client.chat.completions.create(model="gpt-5", ...)
124
+
125
+ # Local (Ollama — no internet needed)
126
+ import ollama
127
+ response = ollama.chat(model="llama4", ...)
128
+
129
+ # All use the same shield rules. Same audit chain.
130
+ ```
131
+
132
+ ## Built on NRP
133
+
134
+ Halyn implements [NRP (Node Reach Protocol)](https://nrprotocol.dev) — the open standard for AI-to-device communication. 6 primitives: Manifest, Observe, Act, Shield, Audit, Consent.
135
+
136
+ ## Free. Open Source. Forever.
137
+
138
+ MIT licensed. Use it for anything. Modify it. Build a company on it. No fees, no limits, no lock-in.
139
+
140
+ ---
141
+
142
+ [halyn.dev](https://halyn.dev) · [nrprotocol.dev](https://nrprotocol.dev) · [PyPI](https://pypi.org/project/halyn/) · [contact@halyn.dev](mailto:contact@halyn.dev)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "halyn"
3
- version = "0.3.0"
3
+ version = "0.3.1"
4
4
  description = "Halyn — NRP control plane with domain-scoped authorization."
5
5
  requires-python = ">=3.10"
6
6
  license = {text = "MIT"}
@@ -41,7 +41,7 @@ except ImportError:
41
41
 
42
42
  SERVER_INFO = {
43
43
  "name": "halyn",
44
- "version": "0.3.0",
44
+ "version": "0.3.1",
45
45
  }
46
46
 
47
47
  PROTOCOL_VERSION = "2024-11-05"
@@ -195,7 +195,7 @@ class HalynMCPServer:
195
195
  # Check action match
196
196
  if action == "*" or action in cmd_lower:
197
197
  condition = " ".join(parts[3:]) if len(parts) > 3 else ""
198
- if not condition or condition in cmd_lower:
198
+ if not condition or condition == "*" or condition in cmd_lower:
199
199
  return f"Shield rule: {rule}"
200
200
  return None
201
201
 
@@ -0,0 +1,178 @@
1
+ Metadata-Version: 2.4
2
+ Name: halyn
3
+ Version: 0.3.1
4
+ Summary: Halyn — NRP control plane with domain-scoped authorization.
5
+ Author-email: Elmadani SALKA <contact@halyn.dev>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/ElmadaniS/halyn
8
+ Project-URL: Repository, https://github.com/ElmadaniS/halyn
9
+ Project-URL: Issues, https://github.com/ElmadaniS/halyn/issues
10
+ Keywords: ai,browser,robotics,iot,mcp,nrp,llm,infrastructure,devops
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
15
+ Classifier: Topic :: System :: Systems Administration
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: nrprotocol>=0.1.0
20
+ Requires-Dist: aiohttp>=3.9
21
+ Provides-Extra: enterprise
22
+ Requires-Dist: grpcio>=1.60; extra == "enterprise"
23
+ Requires-Dist: psycopg2-binary; extra == "enterprise"
24
+ Requires-Dist: redis; extra == "enterprise"
25
+ Provides-Extra: robotics
26
+ Requires-Dist: rclpy; extra == "robotics"
27
+ Requires-Dist: unitree-sdk2py; extra == "robotics"
28
+ Provides-Extra: iot
29
+ Requires-Dist: paho-mqtt; extra == "iot"
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest; extra == "dev"
32
+ Requires-Dist: pytest-asyncio; extra == "dev"
33
+ Requires-Dist: mypy; extra == "dev"
34
+ Requires-Dist: ruff; extra == "dev"
35
+ Dynamic: license-file
36
+
37
+ <div align="center">
38
+
39
+ # Halyn
40
+
41
+ **Connect any device to any AI.**
42
+
43
+ [![PyPI](https://img.shields.io/pypi/v/halyn?style=flat-square&color=0a6e3f)](https://pypi.org/project/halyn/)
44
+ [![License](https://img.shields.io/badge/license-MIT-0a6e3f?style=flat-square)](LICENSE)
45
+ [![Python](https://img.shields.io/badge/python-3.10+-0a6e3f?style=flat-square)](https://pypi.org/project/halyn/)
46
+
47
+ MCP Server · 12 drivers · Shield rules · Audit chain · 5 autonomy levels
48
+
49
+ [Website](https://halyn.dev) · [Quickstart](#quickstart) · [MCP Server](#mcp-server) · [Tutorials](https://halyn.dev#tutorials)
50
+
51
+ </div>
52
+
53
+ ---
54
+
55
+ ## The Problem
56
+
57
+ MCP connects AI to software. But AI is entering the physical world — robots, drones, factories, farms, hospitals. There's no universal standard for how AI safely controls hardware.
58
+
59
+ **Halyn connects AI to everything else.** Servers, sensors, robots, industrial machines, smart homes — with safety rules the AI cannot break.
60
+
61
+ ## Quickstart
62
+
63
+ ```bash
64
+ pip install halyn
65
+ ```
66
+
67
+ ```python
68
+ from halyn import ControlPlane, SSHDriver
69
+
70
+ cp = ControlPlane()
71
+ cp.connect(SSHDriver("192.168.1.10", "admin"))
72
+
73
+ # Safety rules — the AI physically cannot bypass these
74
+ cp.shield("deny * delete *")
75
+ cp.shield("deny * write /etc/*")
76
+
77
+ # Observe
78
+ state = cp.observe()
79
+ print(state) # {"cpu": 23.4, "mem": 67.2, ...}
80
+
81
+ # Act (within shield rules)
82
+ cp.act("restart nginx") # ✓ allowed
83
+ cp.act("rm -rf /etc") # ✗ blocked by shield
84
+ ```
85
+
86
+ ## MCP Server
87
+
88
+ Connect Claude.ai, ChatGPT, Cursor, or any MCP client directly to your devices:
89
+
90
+ ```bash
91
+ # Start the MCP Server
92
+ halyn-mcp --port 8935
93
+
94
+ # In Claude.ai → Settings → MCP → Add Server
95
+ # URL: http://your-server:8935/mcp
96
+ ```
97
+
98
+ Then just talk:
99
+ - *"Show me the status of all connected devices"*
100
+ - *"What's the temperature in the greenhouse?"*
101
+ - *"Restart nginx on server-01"*
102
+ - *"Show me the audit trail"*
103
+
104
+ The AI sees your devices as tools. Shield rules still apply. Every action is audited.
105
+
106
+ ## 12 Drivers
107
+
108
+ | Driver | Target | Protocol |
109
+ |--------|--------|----------|
110
+ | `SSHDriver` | Linux/Mac servers | SSH |
111
+ | `HTTPDriver` | REST APIs, webhooks | HTTP |
112
+ | `WebSocketDriver` | Real-time streams | WebSocket |
113
+ | `SerialDriver` | Arduino, Pi, PLCs | Serial |
114
+ | `MQTTDriver` | IoT sensors | MQTT |
115
+ | `OPCUADriver` | Industrial machines | OPC-UA |
116
+ | `ROS2Driver` | Robots, drones | ROS2/DDS |
117
+ | `DDSDriver` | Real-time systems | DDS |
118
+ | `DockerDriver` | Containers | Docker API |
119
+ | `BrowserDriver` | Web automation | Chrome CDP |
120
+ | `UnitreeDriver` | Unitree robots | UDP |
121
+ | `SocketDriver` | Raw TCP/UDP | Socket |
122
+
123
+ ## Safety
124
+
125
+ **Shield Rules** — Constraints enforced at protocol level. The AI has no power to override them.
126
+
127
+ ```python
128
+ cp.shield("deny * delete *") # no deletions
129
+ cp.shield("deny * write temperature > 180") # thermal limit
130
+ cp.shield("deny lock unlock between 23:00-06:00") # doors locked at night
131
+ ```
132
+
133
+ **Audit Chain** — Every action recorded in SHA-256 hash chain. Tamper-evident. Append-only.
134
+
135
+ **Consent Protocol** — Devices and AI negotiate permissions before any interaction.
136
+
137
+ **5 Autonomy Levels** — From fully manual to fully autonomous. You choose.
138
+
139
+ | Level | Name | Who Decides |
140
+ |-------|------|-------------|
141
+ | 0 | Manual | Human does everything |
142
+ | 1 | Advisory | AI suggests, human acts |
143
+ | 2 | Supervised | AI acts, human approves |
144
+ | 3 | Monitored | AI acts freely, human watches |
145
+ | 4 | Autonomous | AI decides within shield rules |
146
+
147
+ ## Works with Every LLM
148
+
149
+ ```python
150
+ # Claude
151
+ import anthropic
152
+ client = anthropic.Anthropic()
153
+ response = client.messages.create(model="claude-sonnet-4-6", ...)
154
+ cp.act(response.content[0].text)
155
+
156
+ # GPT
157
+ from openai import OpenAI
158
+ client = OpenAI()
159
+ response = client.chat.completions.create(model="gpt-5", ...)
160
+
161
+ # Local (Ollama — no internet needed)
162
+ import ollama
163
+ response = ollama.chat(model="llama4", ...)
164
+
165
+ # All use the same shield rules. Same audit chain.
166
+ ```
167
+
168
+ ## Built on NRP
169
+
170
+ Halyn implements [NRP (Node Reach Protocol)](https://nrprotocol.dev) — the open standard for AI-to-device communication. 6 primitives: Manifest, Observe, Act, Shield, Audit, Consent.
171
+
172
+ ## Free. Open Source. Forever.
173
+
174
+ MIT licensed. Use it for anything. Modify it. Build a company on it. No fees, no limits, no lock-in.
175
+
176
+ ---
177
+
178
+ [halyn.dev](https://halyn.dev) · [nrprotocol.dev](https://nrprotocol.dev) · [PyPI](https://pypi.org/project/halyn/) · [contact@halyn.dev](mailto:contact@halyn.dev)