Skip to content

Self-improving AI Employees for everyone

feat(plugin): Wave 11.C batch 3 — 18 nodes (Android services + skill/memory)

trohitg005a9eabe071
diff --git a/server/nodes/android/_base.py b/server/nodes/android/_base.py
new file mode 100644
index 00000000..69a2d671
--- /dev/null
+++ b/server/nodes/android/_base.py
@@ -0,0 +1,68 @@
+"""Shared base for Android service plugins.
+
+16 Android nodes (battery, network, wifi, bluetooth, audio, camera, …)
+all dispatch through the same ``handle_android_service`` handler with
+the node_type as the service ID. Subclass + set 5 attrs to mint a new
+one. ``android_service`` is fetched from the DI container at call
+time — Android relay client is process-singleton.
+"""
+
+from __future__ import annotations
+
+from typing import Any, Dict, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class AndroidServiceParams(BaseModel):
+ action: str = Field(default="status", description="Service action to invoke")
+ parameters: Dict[str, Any] = Field(default_factory=dict)
+
+ model_config = ConfigDict(extra="allow")
+
+
+class AndroidServiceOutput(BaseModel):
+ success: Optional[bool] = None
+ data: Optional[Any] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class AndroidServiceBase(ActionNode, abstract=True):
+ """Subclass and set type/display_name/icon/description."""
+
+ color = "#50fa7b"
+ group = ("android", "service")
+ component_kind = "square"
+ handles = (
+ {"name": "input-main", "kind": "input", "position": "left",
+ "label": "Input", "role": "main"},
+ {"name": "output-main", "kind": "output", "position": "right",
+ "label": "Output", "role": "main"},
+ )
+ annotations = {"destructive": False, "readonly": False, "open_world": True}
+ task_queue = TaskQueue.ANDROID
+ usable_as_tool = True
+
+ Params = AndroidServiceParams
+ Output = AndroidServiceOutput
+
+ @Operation("invoke", cost={"service": "android", "action": "service_call", "count": 1})
+ async def invoke(self, ctx: NodeContext, params: AndroidServiceParams) -> Any:
+ from core.container import container
+ from services.handlers.android import handle_android_service
+
+ android_service = container.android_service()
+ payload = params.model_dump()
+ response = await handle_android_service(
+ android_service=android_service,
+ node_id=ctx.node_id,
+ node_type=self.type,
+ parameters=payload,
+ context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or f"{self.type} failed")
diff --git a/server/nodes/android/airplane_mode_control.py b/server/nodes/android/airplane_mode_control.py
new file mode 100644
index 00000000..ad764335
--- /dev/null
+++ b/server/nodes/android/airplane_mode_control.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class AirplaneModeControlNode(AndroidServiceBase):
+ type = "airplaneModeControl"
+ display_name = "Airplane Mode"
+ icon = "✈️"
+ description = "Airplane mode status monitoring and control"
diff --git a/server/nodes/android/app_launcher.py b/server/nodes/android/app_launcher.py
new file mode 100644
index 00000000..ae74d5dd
--- /dev/null
+++ b/server/nodes/android/app_launcher.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class AppLauncherNode(AndroidServiceBase):
+ type = "appLauncher"
+ display_name = "App Launcher"
+ icon = "🚀"
+ description = "Launch applications by package name"
diff --git a/server/nodes/android/app_list.py b/server/nodes/android/app_list.py
new file mode 100644
index 00000000..db264d2c
--- /dev/null
+++ b/server/nodes/android/app_list.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class AppListNode(AndroidServiceBase):
+ type = "appList"
+ display_name = "App List"
+ icon = "📱"
+ description = "Get list of installed applications"
diff --git a/server/nodes/android/audio_automation.py b/server/nodes/android/audio_automation.py
new file mode 100644
index 00000000..fbe20cc3
--- /dev/null
+++ b/server/nodes/android/audio_automation.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class AudioAutomationNode(AndroidServiceBase):
+ type = "audioAutomation"
+ display_name = "Audio Automation"
+ icon = "🔊"
+ description = "Volume and audio control - get/set volume, mute, unmute"
diff --git a/server/nodes/android/battery_monitor.py b/server/nodes/android/battery_monitor.py
new file mode 100644
index 00000000..959b9615
--- /dev/null
+++ b/server/nodes/android/battery_monitor.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class BatteryMonitorNode(AndroidServiceBase):
+ type = "batteryMonitor"
+ display_name = "Battery Monitor"
+ icon = "🔋"
+ description = "Monitor battery status, level, charging state, temperature, and health"
diff --git a/server/nodes/android/bluetooth_automation.py b/server/nodes/android/bluetooth_automation.py
new file mode 100644
index 00000000..7cc7d30b
--- /dev/null
+++ b/server/nodes/android/bluetooth_automation.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class BluetoothAutomationNode(AndroidServiceBase):
+ type = "bluetoothAutomation"
+ display_name = "Bluetooth Automation"
+ icon = "🔵"
+ description = "Bluetooth control - enable, disable, get status, paired devices"
diff --git a/server/nodes/android/camera_control.py b/server/nodes/android/camera_control.py
new file mode 100644
index 00000000..057d6720
--- /dev/null
+++ b/server/nodes/android/camera_control.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class CameraControlNode(AndroidServiceBase):
+ type = "cameraControl"
+ display_name = "Camera"
+ icon = "📷"
+ description = "Camera control - get info, take photos, capabilities"
diff --git a/server/nodes/android/device_state_automation.py b/server/nodes/android/device_state_automation.py
new file mode 100644
index 00000000..da124141
--- /dev/null
+++ b/server/nodes/android/device_state_automation.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class DeviceStateAutomationNode(AndroidServiceBase):
+ type = "deviceStateAutomation"
+ display_name = "Device State"
+ icon = "⚙️"
+ description = "Device state control - airplane mode, screen on/off, brightness"
diff --git a/server/nodes/android/environmental_sensors.py b/server/nodes/android/environmental_sensors.py
new file mode 100644
index 00000000..518fca4e
--- /dev/null
+++ b/server/nodes/android/environmental_sensors.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class EnvironmentalSensorsNode(AndroidServiceBase):
+ type = "environmentalSensors"
+ display_name = "Environmental Sensors"
+ icon = "🌡"
+ description = "Temperature, humidity, pressure, light level"
diff --git a/server/nodes/android/location.py b/server/nodes/android/location.py
new file mode 100644
index 00000000..9deb57df
--- /dev/null
+++ b/server/nodes/android/location.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class LocationNode(AndroidServiceBase):
+ type = "location"
+ display_name = "Location"
+ icon = "📍"
+ description = "GPS location tracking with latitude, longitude, accuracy, and provider"
diff --git a/server/nodes/android/media_control.py b/server/nodes/android/media_control.py
new file mode 100644
index 00000000..daba613f
--- /dev/null
+++ b/server/nodes/android/media_control.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class MediaControlNode(AndroidServiceBase):
+ type = "mediaControl"
+ display_name = "Media Control"
+ icon = "🎵"
+ description = "Media playback - volume, playback, play files"
diff --git a/server/nodes/android/motion_detection.py b/server/nodes/android/motion_detection.py
new file mode 100644
index 00000000..5c0a6268
--- /dev/null
+++ b/server/nodes/android/motion_detection.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class MotionDetectionNode(AndroidServiceBase):
+ type = "motionDetection"
+ display_name = "Motion Detection"
+ icon = "🏃"
+ description = "Accelerometer + gyroscope - motion, shake, orientation"
diff --git a/server/nodes/android/network_monitor.py b/server/nodes/android/network_monitor.py
new file mode 100644
index 00000000..4d8d9717
--- /dev/null
+++ b/server/nodes/android/network_monitor.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class NetworkMonitorNode(AndroidServiceBase):
+ type = "networkMonitor"
+ display_name = "Network Monitor"
+ icon = "📶"
+ description = "Monitor network connectivity, type, and internet availability"
diff --git a/server/nodes/android/screen_control_automation.py b/server/nodes/android/screen_control_automation.py
new file mode 100644
index 00000000..87e89ed1
--- /dev/null
+++ b/server/nodes/android/screen_control_automation.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class ScreenControlAutomationNode(AndroidServiceBase):
+ type = "screenControlAutomation"
+ display_name = "Screen Control"
+ icon = "💡"
+ description = "Screen control - brightness, wake screen, auto-brightness"
diff --git a/server/nodes/android/system_info.py b/server/nodes/android/system_info.py
new file mode 100644
index 00000000..3f51da87
--- /dev/null
+++ b/server/nodes/android/system_info.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class SystemInfoNode(AndroidServiceBase):
+ type = "systemInfo"
+ display_name = "System Info"
+ icon = "🖥"
+ description = "Get device and OS information"
diff --git a/server/nodes/android/wifi_automation.py b/server/nodes/android/wifi_automation.py
new file mode 100644
index 00000000..dec7dfc1
--- /dev/null
+++ b/server/nodes/android/wifi_automation.py
@@ -0,0 +1,8 @@
+from ._base import AndroidServiceBase
+
+
+class WifiAutomationNode(AndroidServiceBase):
+ type = "wifiAutomation"
+ display_name = "WiFi Automation"
+ icon = "📡"
+ description = "WiFi control and scanning"
diff --git a/server/nodes/services.py b/server/nodes/services.py
index df57fa5b..6039b470 100644
--- a/server/nodes/services.py
+++ b/server/nodes/services.py
@@ -39,22 +39,7 @@ _MODEL_OUT: list[dict] = [
_GREEN = "#50fa7b"
-register_node(type="batteryMonitor", metadata={"displayName": "Battery Monitor", "icon": "🔋", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "Monitor battery status, level, charging state, temperature, and health", "version": 1})
-register_node(type="networkMonitor", metadata={"displayName": "Network Monitor", "icon": "📶", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "Monitor network connectivity, type, and internet availability", "version": 1})
-register_node(type="systemInfo", metadata={"displayName": "System Info", "icon": "🖥", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "Get device and OS information", "version": 1})
-register_node(type="location", metadata={"displayName": "Location", "icon": "📍", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "GPS location tracking with latitude, longitude, accuracy, and provider", "version": 1})
-register_node(type="appLauncher", metadata={"displayName": "App Launcher", "icon": "🚀", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "Launch applications by package name", "version": 1})
-register_node(type="appList", metadata={"displayName": "App List", "icon": "📱", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "Get list of installed applications", "version": 1})
-register_node(type="wifiAutomation", metadata={"displayName": "WiFi Automation", "icon": "📡", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "WiFi control and scanning", "version": 1})
-register_node(type="bluetoothAutomation", metadata={"displayName": "Bluetooth Automation", "icon": "🔵", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "Bluetooth control - enable, disable, get status, paired devices", "version": 1})
-register_node(type="audioAutomation", metadata={"displayName": "Audio Automation", "icon": "🔊", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "Volume and audio control - get/set volume, mute, unmute", "version": 1})
-register_node(type="deviceStateAutomation", metadata={"displayName": "Device State", "icon": "⚙️", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "Device state control - airplane mode, screen on/off, brightness", "version": 1})
-register_node(type="screenControlAutomation",metadata={"displayName": "Screen Control", "icon": "💡", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "Screen control - brightness, wake screen, auto-brightness", "version": 1})
-register_node(type="airplaneModeControl", metadata={"displayName": "Airplane Mode", "icon": "✈️", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "Airplane mode status monitoring and control", "version": 1})
-register_node(type="motionDetection", metadata={"displayName": "Motion Detection", "icon": "🏃", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "Accelerometer + gyroscope - motion, shake, orientation", "version": 1})
-register_node(type="environmentalSensors", metadata={"displayName": "Environmental Sensors", "icon": "🌡", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "Temperature, humidity, pressure, light level", "version": 1})
-register_node(type="cameraControl", metadata={"displayName": "Camera", "icon": "📷", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "Camera control - get info, take photos, capabilities", "version": 1})
-register_node(type="mediaControl", metadata={"displayName": "Media Control", "icon": "🎵", "color": _GREEN, "group": ["android", "service"], "componentKind": "square", "handles": _IO, "description": "Media playback - volume, playback, play files", "version": 1})
+# All 16 Android services — migrated to nodes/android/*.py (Wave 11.C).
# ---------------------------------------------------------------------------
@@ -63,31 +48,7 @@ register_node(type="mediaControl", metadata={"displayName": "Media Con
# All 9 chat models — migrated to nodes/model/*.py (Wave 11.C).
-register_node(
- type="simpleMemory",
- metadata={
- "displayName": "Simple Memory", "subtitle": "Conversation History",
- "icon": "💾", "color": "#f1fa8c",
- "group": ["tool", "memory"], "componentKind": "model",
- "handles": [{"name": "output-memory", "kind": "output", "position": "top", "label": "Memory", "role": "memory"}],
- "description": "Markdown-based conversation memory with optional vector DB",
- "version": 1,
- "uiHints": {"isMemoryPanel": True, "hasCodeEditor": True, "hideRunButton": True},
- },
-)
-
-register_node(
- type="masterSkill",
- metadata={
- "displayName": "Master Skill", "subtitle": "Skill Aggregator",
- "icon": "🎯", "color": "#f1fa8c",
- "group": ["tool"], "componentKind": "tool",
- "handles": [{"name": "output-skill", "kind": "output", "position": "top", "label": "Skill", "role": "skill"}],
- "description": "Aggregate multiple skills with enable/disable toggles",
- "version": 1,
- "uiHints": {"isToolPanel": True, "isMasterSkillEditor": True, "hideRunButton": True},
- },
-)
+# simpleMemory + masterSkill — migrated to nodes/skill/*.py (Wave 11.C).
# ---------------------------------------------------------------------------
diff --git a/server/nodes/skill/master_skill.py b/server/nodes/skill/master_skill.py
new file mode 100644
index 00000000..a07e0f70
--- /dev/null
+++ b/server/nodes/skill/master_skill.py
@@ -0,0 +1,60 @@
+"""Master Skill — Wave 11.C migration.
+
+Skill aggregator. Passive node — the connected agent reads
+``skillsConfig`` directly during ``_collect_agent_connections``;
+this plugin only carries the metadata + Params shape. Run-button
+hidden because there's nothing to execute standalone.
+"""
+
+from __future__ import annotations
+
+from typing import Any, Dict, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class MasterSkillParams(BaseModel):
+ skill_folder: str = Field(default="assistant", alias="skillFolder")
+ skills_config: Dict[str, Any] = Field(
+ default_factory=dict, alias="skillsConfig",
+ )
+
+ model_config = ConfigDict(populate_by_name=True, extra="ignore")
+
+
+class MasterSkillOutput(BaseModel):
+ skills_active: Optional[int] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class MasterSkillNode(ActionNode):
+ type = "masterSkill"
+ display_name = "Master Skill"
+ subtitle = "Skill Aggregator"
+ icon = "🎯"
+ color = "#f1fa8c"
+ group = ("tool",)
+ description = "Aggregate multiple skills with enable/disable toggles"
+ component_kind = "tool"
+ handles = (
+ {"name": "output-skill", "kind": "output", "position": "top",
+ "label": "Skill", "role": "skill"},
+ )
+ ui_hints = {"isToolPanel": True, "isMasterSkillEditor": True, "hideRunButton": True}
+ annotations = {"destructive": False, "readonly": True, "open_world": False}
+ task_queue = TaskQueue.DEFAULT
+
+ Params = MasterSkillParams
+ Output = MasterSkillOutput
+
+ @Operation("noop")
+ async def noop(self, ctx: NodeContext, params: MasterSkillParams) -> MasterSkillOutput:
+ # Passive node — agent reads skillsConfig during execution.
+ active = sum(
+ 1 for cfg in (params.skills_config or {}).values()
+ if isinstance(cfg, dict) and cfg.get("enabled")
+ )
+ return MasterSkillOutput(skills_active=active)
diff --git a/server/nodes/skill/simple_memory.py b/server/nodes/skill/simple_memory.py
new file mode 100644
index 00000000..9b9fc903
--- /dev/null
+++ b/server/nodes/skill/simple_memory.py
@@ -0,0 +1,70 @@
+"""Simple Memory — Wave 11.C migration.
+
+Markdown-based conversation memory, optionally backed by a vector
+store for semantic recall. Connects upward to an agent's input-memory
+handle. Delegates execution to the legacy ``handle_simple_memory``.
+"""
+
+from __future__ import annotations
+
+from typing import Any, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class SimpleMemoryParams(BaseModel):
+ session_id: str = Field(default="default", alias="sessionId")
+ window_size: int = Field(default=10, alias="windowSize", ge=1, le=100)
+ memory_content: str = Field(
+ default="# Conversation History\n",
+ alias="memoryContent",
+ json_schema_extra={"rows": 12},
+ )
+ long_term_enabled: bool = Field(default=False, alias="longTermEnabled")
+ retrieval_count: int = Field(
+ default=3, alias="retrievalCount", ge=1, le=20,
+ json_schema_extra={"displayOptions": {"show": {"long_term_enabled": [True]}}},
+ )
+
+ model_config = ConfigDict(populate_by_name=True, extra="ignore")
+
+
+class SimpleMemoryOutput(BaseModel):
+ memory_content: Optional[str] = None
+ message_count: Optional[int] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class SimpleMemoryNode(ActionNode):
+ type = "simpleMemory"
+ display_name = "Simple Memory"
+ subtitle = "Conversation History"
+ icon = "💾"
+ color = "#f1fa8c"
+ group = ("tool", "memory")
+ description = "Markdown-based conversation memory with optional vector DB"
+ component_kind = "model"
+ handles = (
+ {"name": "output-memory", "kind": "output", "position": "top",
+ "label": "Memory", "role": "memory"},
+ )
+ ui_hints = {"isMemoryPanel": True, "hasCodeEditor": True, "hideRunButton": True}
+ annotations = {"destructive": False, "readonly": True, "open_world": False}
+ task_queue = TaskQueue.DEFAULT
+
+ Params = SimpleMemoryParams
+ Output = SimpleMemoryOutput
+
+ @Operation("read")
+ async def read(self, ctx: NodeContext, params: SimpleMemoryParams) -> Any:
+ from services.handlers.ai import handle_simple_memory
+ response = await handle_simple_memory(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success") is False:
+ raise RuntimeError(response.get("error") or "simpleMemory failed")
+ return response.get("result") or {}
diff --git a/server/services/node_executor.py b/server/services/node_executor.py
index f876b1a2..b39ba6f5 100644
--- a/server/services/node_executor.py
+++ b/server/services/node_executor.py
@@ -143,7 +143,7 @@ class NodeExecutor:
'timer': handle_timer,
# AI agents — all migrated to nodes/agent/*.py (Wave 11.C).
# Plugin handlers win via registry.update(_PLUGIN_HANDLERS) merge below.
- 'simpleMemory': handle_simple_memory,
+ # simpleMemory + masterSkill: migrated to nodes/skill/*.py (Wave 11.C).
# Maps
'gmaps_create': partial(handle_create_map, maps_service=self.maps_service),
'gmaps_locations': partial(handle_add_locations, maps_service=self.maps_service),
@@ -219,9 +219,8 @@ class NodeExecutor:
# AI chat models — all 9 migrated to nodes/model/*.py (Wave 11.C).
# Plugin handlers register themselves via _PLUGIN_HANDLERS merge below.
- # Register Android services
- for node_type in ANDROID_SERVICE_NODE_TYPES:
- registry[node_type] = partial(handle_android_service, android_service=self.android_service)
+ # Android services — all 16 migrated to nodes/android/*.py (Wave 11.C).
+ # Plugin handlers register themselves via _PLUGIN_HANDLERS merge.
# Plugin handlers last: they win over the legacy entries above,
# enabling incremental migration (Wave 10.C strangler fig).