effero 0.1.0__py3-none-any.whl
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.
- effero/__init__.py +26 -0
- effero/adapters/__init__.py +21 -0
- effero/adapters/base.py +22 -0
- effero/adapters/cloud_api/__init__.py +7 -0
- effero/adapters/cloud_api/client.py +68 -0
- effero/adapters/mqtt_matter/__init__.py +66 -0
- effero/adapters/mqtt_matter/client.py +583 -0
- effero/adapters/mqtt_matter/matter.py +609 -0
- effero/adapters/mqtt_matter/protocol.py +593 -0
- effero/adapters/mqtt_matter/telemetry.py +410 -0
- effero/adapters/ros2/__init__.py +23 -0
- effero/adapters/ros2/bridge.py +479 -0
- effero/adapters/serial_gpio/__init__.py +31 -0
- effero/adapters/serial_gpio/client.py +216 -0
- effero/adapters/serial_gpio/framing.py +501 -0
- effero/config.py +97 -0
- effero/core/__init__.py +15 -0
- effero/core/agent/__init__.py +134 -0
- effero/core/event_bus.py +64 -0
- effero/core/fleet/__init__.py +34 -0
- effero/core/fleet/auction.py +680 -0
- effero/core/fleet/coordinator.py +254 -0
- effero/core/memory/__init__.py +21 -0
- effero/core/memory/episodic.py +52 -0
- effero/core/memory/semantic.py +226 -0
- effero/core/memory/working.py +52 -0
- effero/core/planner/__init__.py +7 -0
- effero/core/planner/planner.py +190 -0
- effero/core/router/__init__.py +29 -0
- effero/core/router/anthropic_backend.py +98 -0
- effero/core/router/base.py +52 -0
- effero/core/router/google_backend.py +166 -0
- effero/core/router/openai_backend.py +96 -0
- effero/core/router/router.py +80 -0
- effero/interfaces/__init__.py +1 -0
- effero/interfaces/cli.py +196 -0
- effero/interfaces/server.py +310 -0
- effero/interfaces/static/index.html +325 -0
- effero/perception/__init__.py +23 -0
- effero/perception/audio/__init__.py +25 -0
- effero/perception/audio/asr.py +138 -0
- effero/perception/audio/pipeline.py +106 -0
- effero/perception/audio/tts.py +96 -0
- effero/perception/base.py +30 -0
- effero/perception/sensors/__init__.py +17 -0
- effero/perception/sensors/pipeline.py +143 -0
- effero/perception/vision/__init__.py +43 -0
- effero/perception/vision/detector.py +143 -0
- effero/perception/vision/pipeline.py +75 -0
- effero/perception/vision/stream.py +360 -0
- effero/perception/vision/vla.py +526 -0
- effero/protocols/__init__.py +27 -0
- effero/protocols/a2a.py +183 -0
- effero/protocols/mcp_server.py +102 -0
- effero/protocols/wyoming.py +258 -0
- effero/py.typed +1 -0
- effero/safety/__init__.py +48 -0
- effero/safety/approval.py +152 -0
- effero/safety/client.py +70 -0
- effero/safety/policies/example.yaml +39 -0
- effero/sdk/__init__.py +9 -0
- effero/sdk/skill.py +132 -0
- effero/skills/__init__.py +10 -0
- effero/skills/community/__init__.py +6 -0
- effero/skills/computer_use/__init__.py +70 -0
- effero/skills/computer_use/browser.py +160 -0
- effero/skills/computer_use/desktop.py +1170 -0
- effero/skills/computer_use/file_ops.py +57 -0
- effero/skills/computer_use/shell.py +38 -0
- effero/skills/iot/__init__.py +18 -0
- effero/skills/iot/lights.py +49 -0
- effero/skills/iot/sensors.py +30 -0
- effero/skills/iot/thermostat.py +43 -0
- effero/skills/robotics/__init__.py +56 -0
- effero/skills/robotics/arm.py +330 -0
- effero/skills/robotics/collision.py +340 -0
- effero/skills/robotics/navigate.py +193 -0
- effero/skills/robotics/trajectory.py +355 -0
- effero-0.1.0.dist-info/METADATA +415 -0
- effero-0.1.0.dist-info/RECORD +83 -0
- effero-0.1.0.dist-info/WHEEL +4 -0
- effero-0.1.0.dist-info/entry_points.txt +2 -0
- effero-0.1.0.dist-info/licenses/LICENSE +201 -0
effero/__init__.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Effero: one runtime for perceiving, reasoning, and acting across
|
|
2
|
+
computers, robots, and connected devices.
|
|
3
|
+
|
|
4
|
+
See the top-level README.md for the full architecture and philosophy.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
__version__ = "0.1.0"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
from typing import Any
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# Lazy load to avoid cyclic imports or missing dependencies
|
|
14
|
+
def __getattr__(name: str) -> Any:
|
|
15
|
+
if name == "Agent":
|
|
16
|
+
from effero.core.agent import Agent
|
|
17
|
+
|
|
18
|
+
return Agent
|
|
19
|
+
if name == "EfferoConfig":
|
|
20
|
+
from effero.config import EfferoConfig
|
|
21
|
+
|
|
22
|
+
return EfferoConfig
|
|
23
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
__all__ = ["Agent", "EfferoConfig"]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Effero device adapters.
|
|
2
|
+
|
|
3
|
+
This package contains various device adapters for communication with IoT devices, robots, cloud APIs, etc.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
from effero.adapters.base import DeviceAdapter
|
|
9
|
+
from effero.adapters.cloud_api.client import CloudAPIAdapter
|
|
10
|
+
from effero.adapters.mqtt_matter.client import MQTTAdapter, get_default_client
|
|
11
|
+
from effero.adapters.ros2.bridge import ROS2Bridge
|
|
12
|
+
from effero.adapters.serial_gpio.client import SerialAdapter
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"DeviceAdapter",
|
|
16
|
+
"MQTTAdapter",
|
|
17
|
+
"get_default_client",
|
|
18
|
+
"SerialAdapter",
|
|
19
|
+
"CloudAPIAdapter",
|
|
20
|
+
"ROS2Bridge",
|
|
21
|
+
]
|
effero/adapters/base.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Base interface for device adapters."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from abc import ABC, abstractmethod
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DeviceAdapter(ABC):
|
|
10
|
+
"""Base class for all device adapters in the Device Abstraction Layer."""
|
|
11
|
+
|
|
12
|
+
@abstractmethod
|
|
13
|
+
async def connect(self) -> None: ...
|
|
14
|
+
|
|
15
|
+
@abstractmethod
|
|
16
|
+
async def disconnect(self) -> None: ...
|
|
17
|
+
|
|
18
|
+
@abstractmethod
|
|
19
|
+
async def execute(self, command: str, params: dict[str, Any]) -> Any: ...
|
|
20
|
+
|
|
21
|
+
@abstractmethod
|
|
22
|
+
async def read_state(self) -> dict[str, Any]: ...
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""REST API adapter implementation."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import logging
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
from effero.adapters.base import DeviceAdapter
|
|
9
|
+
|
|
10
|
+
logger = logging.getLogger(__name__)
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
import httpx
|
|
14
|
+
|
|
15
|
+
HAS_HTTPX = True
|
|
16
|
+
except ImportError:
|
|
17
|
+
HAS_HTTPX = False
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class CloudAPIAdapter(DeviceAdapter):
|
|
21
|
+
"""Adapter for interacting with RESTful cloud APIs."""
|
|
22
|
+
|
|
23
|
+
def __init__(self, base_url: str, headers: dict[str, str] | None = None, auth_token: str | None = None) -> None:
|
|
24
|
+
self.base_url = base_url.rstrip("/")
|
|
25
|
+
self.headers = headers or {}
|
|
26
|
+
if auth_token:
|
|
27
|
+
self.headers["Authorization"] = f"Bearer {auth_token}"
|
|
28
|
+
self._client: Any = None
|
|
29
|
+
self._last_state: dict[str, Any] = {}
|
|
30
|
+
|
|
31
|
+
async def connect(self) -> None:
|
|
32
|
+
if not HAS_HTTPX:
|
|
33
|
+
raise RuntimeError("httpx is required for CloudAPIAdapter. Install with: pip install httpx")
|
|
34
|
+
|
|
35
|
+
self._client = httpx.AsyncClient(base_url=self.base_url, headers=self.headers)
|
|
36
|
+
logger.info(f"Cloud API client initialized for {self.base_url}")
|
|
37
|
+
|
|
38
|
+
async def disconnect(self) -> None:
|
|
39
|
+
if self._client:
|
|
40
|
+
await self._client.aclose()
|
|
41
|
+
self._client = None
|
|
42
|
+
logger.info(f"Cloud API client disconnected from {self.base_url}")
|
|
43
|
+
|
|
44
|
+
async def execute(self, command: str, params: dict[str, Any]) -> Any:
|
|
45
|
+
method = params.get("method", "POST").upper()
|
|
46
|
+
endpoint = params.get("endpoint", "")
|
|
47
|
+
payload = params.get("payload")
|
|
48
|
+
|
|
49
|
+
if self._client:
|
|
50
|
+
response = await self._client.request(method, endpoint, json=payload)
|
|
51
|
+
response.raise_for_status()
|
|
52
|
+
try:
|
|
53
|
+
data = response.json()
|
|
54
|
+
except Exception:
|
|
55
|
+
data = {"text": response.text}
|
|
56
|
+
return data
|
|
57
|
+
else:
|
|
58
|
+
raise RuntimeError("CloudAPIAdapter not connected. Call await adapter.connect() first.")
|
|
59
|
+
|
|
60
|
+
async def read_state(self) -> dict[str, Any]:
|
|
61
|
+
if self._client:
|
|
62
|
+
try:
|
|
63
|
+
response = await self._client.get("")
|
|
64
|
+
response.raise_for_status()
|
|
65
|
+
self._last_state = response.json()
|
|
66
|
+
except Exception as e:
|
|
67
|
+
logger.error(f"Failed to read state: {e}")
|
|
68
|
+
return self._last_state
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""IoT adapter module: Live MQTT 3.1.1 protocol client and Matter commissioning engine."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from effero.adapters.mqtt_matter.client import MQTTAdapter, get_default_client, topic_matches
|
|
6
|
+
from effero.adapters.mqtt_matter.matter import (
|
|
7
|
+
CommissioningState,
|
|
8
|
+
LevelControlCluster,
|
|
9
|
+
MatterCommissioningStateMachine,
|
|
10
|
+
OnboardingPayload,
|
|
11
|
+
OnOffCluster,
|
|
12
|
+
TemperatureMeasurementCluster,
|
|
13
|
+
)
|
|
14
|
+
from effero.adapters.mqtt_matter.protocol import (
|
|
15
|
+
ConnackPacket,
|
|
16
|
+
ConnectPacket,
|
|
17
|
+
DisconnectPacket,
|
|
18
|
+
MQTTPacket,
|
|
19
|
+
PacketType,
|
|
20
|
+
PingreqPacket,
|
|
21
|
+
PingrespPacket,
|
|
22
|
+
PubackPacket,
|
|
23
|
+
PubcompPacket,
|
|
24
|
+
PublishPacket,
|
|
25
|
+
PubrecPacket,
|
|
26
|
+
PubrelPacket,
|
|
27
|
+
SubackPacket,
|
|
28
|
+
SubscribePacket,
|
|
29
|
+
UnsubackPacket,
|
|
30
|
+
UnsubscribePacket,
|
|
31
|
+
decode_packet,
|
|
32
|
+
encode_packet,
|
|
33
|
+
)
|
|
34
|
+
from effero.adapters.mqtt_matter.telemetry import NormalizedTelemetry, TelemetryNormalizer
|
|
35
|
+
|
|
36
|
+
__all__ = [
|
|
37
|
+
"CommissioningState",
|
|
38
|
+
"ConnackPacket",
|
|
39
|
+
"ConnectPacket",
|
|
40
|
+
"DisconnectPacket",
|
|
41
|
+
"LevelControlCluster",
|
|
42
|
+
"MQTTAdapter",
|
|
43
|
+
"MQTTPacket",
|
|
44
|
+
"MatterCommissioningStateMachine",
|
|
45
|
+
"NormalizedTelemetry",
|
|
46
|
+
"OnOffCluster",
|
|
47
|
+
"OnboardingPayload",
|
|
48
|
+
"PacketType",
|
|
49
|
+
"PingreqPacket",
|
|
50
|
+
"PingrespPacket",
|
|
51
|
+
"PubackPacket",
|
|
52
|
+
"PubcompPacket",
|
|
53
|
+
"PublishPacket",
|
|
54
|
+
"PubrecPacket",
|
|
55
|
+
"PubrelPacket",
|
|
56
|
+
"SubackPacket",
|
|
57
|
+
"SubscribePacket",
|
|
58
|
+
"TelemetryNormalizer",
|
|
59
|
+
"TemperatureMeasurementCluster",
|
|
60
|
+
"UnsubackPacket",
|
|
61
|
+
"UnsubscribePacket",
|
|
62
|
+
"decode_packet",
|
|
63
|
+
"encode_packet",
|
|
64
|
+
"get_default_client",
|
|
65
|
+
"topic_matches",
|
|
66
|
+
]
|