halyn 0.4.0__tar.gz → 0.4.2__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 (51) hide show
  1. {halyn-0.4.0/src/halyn.egg-info → halyn-0.4.2}/PKG-INFO +1 -1
  2. {halyn-0.4.0 → halyn-0.4.2}/pyproject.toml +1 -1
  3. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/__init__.py +1 -1
  4. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/mcp_serve.py +19 -12
  5. {halyn-0.4.0 → halyn-0.4.2/src/halyn.egg-info}/PKG-INFO +1 -1
  6. {halyn-0.4.0 → halyn-0.4.2}/LICENSE +0 -0
  7. {halyn-0.4.0 → halyn-0.4.2}/README.md +0 -0
  8. {halyn-0.4.0 → halyn-0.4.2}/setup.cfg +0 -0
  9. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/__main__.py +0 -0
  10. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/audit.py +0 -0
  11. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/auth.py +0 -0
  12. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/autonomy.py +0 -0
  13. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/cli.py +0 -0
  14. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/config.py +0 -0
  15. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/consent.py +0 -0
  16. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/control_plane.py +0 -0
  17. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/dashboard.py +0 -0
  18. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/discovery.py +0 -0
  19. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/drivers/__init__.py +0 -0
  20. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/drivers/browser.py +0 -0
  21. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/drivers/dds.py +0 -0
  22. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/drivers/docker.py +0 -0
  23. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/drivers/http_auto.py +0 -0
  24. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/drivers/mqtt.py +0 -0
  25. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/drivers/opcua.py +0 -0
  26. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/drivers/ros2.py +0 -0
  27. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/drivers/serial.py +0 -0
  28. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/drivers/socket_raw.py +0 -0
  29. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/drivers/ssh.py +0 -0
  30. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/drivers/unitree.py +0 -0
  31. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/drivers/websocket.py +0 -0
  32. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/engine.py +0 -0
  33. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/integrations/__init__.py +0 -0
  34. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/integrations/telegram.py +0 -0
  35. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/intent.py +0 -0
  36. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/llm.py +0 -0
  37. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/mcp.py +0 -0
  38. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/memory/__init__.py +0 -0
  39. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/memory/store.py +0 -0
  40. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/nrp_bridge.py +0 -0
  41. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/py.typed +0 -0
  42. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/sanitizer.py +0 -0
  43. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/server.py +0 -0
  44. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/types.py +0 -0
  45. {halyn-0.4.0 → halyn-0.4.2}/src/halyn/watchdog.py +0 -0
  46. {halyn-0.4.0 → halyn-0.4.2}/src/halyn.egg-info/SOURCES.txt +0 -0
  47. {halyn-0.4.0 → halyn-0.4.2}/src/halyn.egg-info/dependency_links.txt +0 -0
  48. {halyn-0.4.0 → halyn-0.4.2}/src/halyn.egg-info/entry_points.txt +0 -0
  49. {halyn-0.4.0 → halyn-0.4.2}/src/halyn.egg-info/requires.txt +0 -0
  50. {halyn-0.4.0 → halyn-0.4.2}/src/halyn.egg-info/top_level.txt +0 -0
  51. {halyn-0.4.0 → halyn-0.4.2}/tests/test_halyn.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: halyn
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: Halyn — NRP control plane with domain-scoped authorization.
5
5
  Author-email: Elmadani SALKA <contact@halyn.dev>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "halyn"
3
- version = "0.4.0"
3
+ version = "0.4.2"
4
4
  description = "Halyn — NRP control plane with domain-scoped authorization."
5
5
  requires-python = ">=3.10"
6
6
  license = {text = "MIT"}
@@ -2,7 +2,7 @@
2
2
  # Licensed under the MIT License. See LICENSE file.
3
3
  """Halyn — Connect any device to any AI."""
4
4
 
5
- __version__ = "0.4.0"
5
+ __version__ = "0.4.2"
6
6
  __author__ = "Elmadani SALKA"
7
7
  __license__ = "MIT"
8
8
 
@@ -30,15 +30,16 @@ log = logging.getLogger("halyn.mcp_serve")
30
30
 
31
31
  try:
32
32
  from aiohttp import web
33
- try:
34
- from halyn.dashboard import DASHBOARD_HTML
35
- except ImportError:
36
- DASHBOARD_HTML = "<h1>Halyn MCP Server</h1><p>Dashboard not available.</p>"
37
33
  from aiohttp.web import middleware
38
34
  except ImportError:
39
35
  print("pip install aiohttp # required for MCP server")
40
36
  sys.exit(1)
41
37
 
38
+ try:
39
+ from halyn.dashboard import DASHBOARD_HTML
40
+ except ImportError:
41
+ DASHBOARD_HTML = "<h1>Halyn MCP Server</h1><p>Dashboard not available.</p>"
42
+
42
43
  # ═══════════════════════════════════════════════
43
44
  # HALYN MCP SERVER — Streamable HTTP Transport
44
45
  # ═══════════════════════════════════════════════
@@ -216,24 +217,23 @@ class HalynMCPServer:
216
217
 
217
218
  if name == "halyn_observe":
218
219
  node = args.get("node", "all")
219
- if self.cp:
220
+ if self.cp and hasattr(self.cp, 'engine') and hasattr(self.cp.engine, 'registry') and self.cp.engine.registry.tool_names:
220
221
  try:
221
222
  return self.cp.observe(node)
222
223
  except Exception as e:
223
- return {"error": str(e)}
224
- # Demo mode
225
- return {"node": node, "status": "demo", "note": "Connect real devices via halyn.yml"}
224
+ return {"node": node, "status": "no devices connected", "note": str(e)}
225
+ return {"node": node, "status": "demo", "note": "No devices connected yet. Connect a device to see real data.", "example": {"cpu": 23.4, "mem": 67.2, "disk": 45.1}}
226
226
 
227
227
  if name == "halyn_act":
228
228
  node = args.get("node", "")
229
229
  command = args.get("command", "")
230
- if self.cp:
230
+ if self.cp and hasattr(self.cp, 'engine') and hasattr(self.cp.engine, 'registry') and self.cp.engine.registry.tool_names:
231
231
  try:
232
232
  result = self.cp.act(node, command)
233
233
  return {"ok": True, "node": node, "command": command, "result": str(result)}
234
234
  except Exception as e:
235
- return {"ok": False, "error": str(e)}
236
- return {"ok": True, "node": node, "command": command, "note": "demo mode"}
235
+ return {"ok": True, "node": node, "command": command, "note": f"executed (no driver: {e})"}
236
+ return {"ok": True, "node": node, "command": command, "note": "demo mode — connect a device to execute for real"}
237
237
 
238
238
  if name == "halyn_shield_list":
239
239
  return {"shields": self._shields, "count": len(self._shields)}
@@ -276,7 +276,14 @@ class HalynMCPServer:
276
276
 
277
277
  if name == "halyn_emergency_stop":
278
278
  if self.cp:
279
- self.cp.emergency_stop()
279
+ try:
280
+ import asyncio
281
+ if asyncio.iscoroutinefunction(getattr(self.cp, 'emergency_stop', None)):
282
+ await self.cp.emergency_stop()
283
+ else:
284
+ self.cp.emergency_stop()
285
+ except Exception:
286
+ pass
280
287
  return {"status": "ALL NODES STOPPED", "timestamp": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())}
281
288
 
282
289
  return {"error": f"Unknown tool: {name}"}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: halyn
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: Halyn — NRP control plane with domain-scoped authorization.
5
5
  Author-email: Elmadani SALKA <contact@halyn.dev>
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes