halyn 0.4.1__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.
- {halyn-0.4.1/src/halyn.egg-info → halyn-0.4.2}/PKG-INFO +1 -1
- {halyn-0.4.1 → halyn-0.4.2}/pyproject.toml +1 -1
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/__init__.py +1 -1
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/mcp_serve.py +14 -8
- {halyn-0.4.1 → halyn-0.4.2/src/halyn.egg-info}/PKG-INFO +1 -1
- {halyn-0.4.1 → halyn-0.4.2}/LICENSE +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/README.md +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/setup.cfg +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/__main__.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/audit.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/auth.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/autonomy.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/cli.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/config.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/consent.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/control_plane.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/dashboard.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/discovery.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/drivers/__init__.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/drivers/browser.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/drivers/dds.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/drivers/docker.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/drivers/http_auto.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/drivers/mqtt.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/drivers/opcua.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/drivers/ros2.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/drivers/serial.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/drivers/socket_raw.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/drivers/ssh.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/drivers/unitree.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/drivers/websocket.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/engine.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/integrations/__init__.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/integrations/telegram.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/intent.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/llm.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/mcp.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/memory/__init__.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/memory/store.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/nrp_bridge.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/py.typed +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/sanitizer.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/server.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/types.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn/watchdog.py +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn.egg-info/SOURCES.txt +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn.egg-info/dependency_links.txt +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn.egg-info/entry_points.txt +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn.egg-info/requires.txt +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/src/halyn.egg-info/top_level.txt +0 -0
- {halyn-0.4.1 → halyn-0.4.2}/tests/test_halyn.py +0 -0
|
@@ -217,24 +217,23 @@ class HalynMCPServer:
|
|
|
217
217
|
|
|
218
218
|
if name == "halyn_observe":
|
|
219
219
|
node = args.get("node", "all")
|
|
220
|
-
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:
|
|
221
221
|
try:
|
|
222
222
|
return self.cp.observe(node)
|
|
223
223
|
except Exception as e:
|
|
224
|
-
return {"
|
|
225
|
-
|
|
226
|
-
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}}
|
|
227
226
|
|
|
228
227
|
if name == "halyn_act":
|
|
229
228
|
node = args.get("node", "")
|
|
230
229
|
command = args.get("command", "")
|
|
231
|
-
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:
|
|
232
231
|
try:
|
|
233
232
|
result = self.cp.act(node, command)
|
|
234
233
|
return {"ok": True, "node": node, "command": command, "result": str(result)}
|
|
235
234
|
except Exception as e:
|
|
236
|
-
return {"ok":
|
|
237
|
-
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"}
|
|
238
237
|
|
|
239
238
|
if name == "halyn_shield_list":
|
|
240
239
|
return {"shields": self._shields, "count": len(self._shields)}
|
|
@@ -277,7 +276,14 @@ class HalynMCPServer:
|
|
|
277
276
|
|
|
278
277
|
if name == "halyn_emergency_stop":
|
|
279
278
|
if self.cp:
|
|
280
|
-
|
|
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
|
|
281
287
|
return {"status": "ALL NODES STOPPED", "timestamp": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())}
|
|
282
288
|
|
|
283
289
|
return {"error": f"Unknown tool: {name}"}
|
|
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
|
|
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
|