Skip to content

Self-improving AI Employees for everyone

feat(schema): Wave 6 Phase 3d.i - backend NodeSpec parity for remaining input-modeled types

trohitgf3664e720003
diff --git a/server/models/node_metadata.py b/server/models/node_metadata.py
index a7fd42f5..0eb463a0 100644
--- a/server/models/node_metadata.py
+++ b/server/models/node_metadata.py
@@ -398,6 +398,191 @@ NODE_METADATA: dict[str, NodeMetadata] = {
"description": "Mistral AI models (Large, Small, Codestral)",
"version": 1,
},
+ # Phase 3d.i: Already-modeled types - location, scheduler, chat, text, ----
+ # gmail trigger, and 16 Android service nodes.
+ "gmaps_create": {
+ "displayName": "GMaps Create",
+ "icon": "πŸ—ΊοΈ",
+ "group": ["location", "service"],
+ "description": "Google Maps creation with customizable center, zoom, and map type",
+ "version": 1,
+ },
+ "gmaps_locations": {
+ "displayName": "GMaps Locations",
+ "icon": "🌍",
+ "group": ["location", "service", "tool"],
+ "description": "Google Maps Geocoding service for address-to-coordinates conversion",
+ "version": 1,
+ },
+ "gmaps_nearby_places": {
+ "displayName": "GMaps Nearby Places",
+ "icon": "πŸ”",
+ "group": ["location", "service", "tool"],
+ "description": "Google Places API nearbySearch with detailed place information",
+ "version": 1,
+ },
+ "cronScheduler": {
+ "displayName": "Cron Scheduler",
+ "icon": "⏰",
+ "group": ["trigger"],
+ "description": "Schedule workflow execution using cron expressions",
+ "version": 1,
+ },
+ "timer": {
+ "displayName": "Timer",
+ "icon": "⏱️",
+ "group": ["trigger"],
+ "description": "Trigger workflow on a fixed delay",
+ "version": 1,
+ },
+ "chatSend": {
+ "displayName": "Chat Send",
+ "icon": "πŸ’¬",
+ "group": ["chat"],
+ "description": "Send messages to chat conversations",
+ "version": 1,
+ },
+ "chatHistory": {
+ "displayName": "Chat History",
+ "icon": "πŸ“œ",
+ "group": ["chat"],
+ "description": "Retrieve chat conversation history",
+ "version": 1,
+ },
+ "textGenerator": {
+ "displayName": "Text Generator",
+ "icon": "πŸ“",
+ "group": ["text"],
+ "description": "Generate text content from templates",
+ "version": 1,
+ },
+ "fileHandler": {
+ "displayName": "File Handler",
+ "icon": "πŸ“",
+ "group": ["text"],
+ "description": "Read, write, and process files",
+ "version": 1,
+ },
+ "gmailReceive": {
+ "displayName": "Gmail Receive",
+ "icon": "",
+ "group": ["google", "trigger"],
+ "description": "Polling trigger for incoming Gmail emails",
+ "version": 1,
+ },
+ # Android service nodes (16) -- shared AndroidServiceParams Pydantic model
+ "batteryMonitor": {
+ "displayName": "Battery Monitor",
+ "icon": "πŸ”‹",
+ "group": ["android", "service"],
+ "description": "Monitor battery status, level, charging state, temperature, and health",
+ "version": 1,
+ },
+ "networkMonitor": {
+ "displayName": "Network Monitor",
+ "icon": "πŸ“‘",
+ "group": ["android", "service"],
+ "description": "Monitor network connectivity status, type, and internet availability",
+ "version": 1,
+ },
+ "systemInfo": {
+ "displayName": "System Info",
+ "icon": "πŸ“±",
+ "group": ["android", "service"],
+ "description": "Get device and OS information including Android version, API level, memory, and hardware details",
+ "version": 1,
+ },
+ "location": {
+ "displayName": "Location",
+ "icon": "πŸ“",
+ "group": ["android", "service"],
+ "description": "GPS location tracking with latitude, longitude, accuracy, and provider information",
+ "version": 1,
+ },
+ "appLauncher": {
+ "displayName": "App Launcher",
+ "icon": "πŸš€",
+ "group": ["android", "service"],
+ "description": "Launch applications by package name",
+ "version": 1,
+ },
+ "appList": {
+ "displayName": "App List",
+ "icon": "πŸ“‹",
+ "group": ["android", "service"],
+ "description": "Get list of installed applications with package names, versions, and metadata",
+ "version": 1,
+ },
+ "wifiAutomation": {
+ "displayName": "WiFi Automation",
+ "icon": "πŸ“Ά",
+ "group": ["android", "service"],
+ "description": "WiFi control and scanning - enable, disable, get status, scan for networks",
+ "version": 1,
+ },
+ "bluetoothAutomation": {
+ "displayName": "Bluetooth Automation",
+ "icon": "πŸ”΅",
+ "group": ["android", "service"],
+ "description": "Bluetooth control - enable, disable, get status, and paired devices",
+ "version": 1,
+ },
+ "audioAutomation": {
+ "displayName": "Audio Automation",
+ "icon": "πŸ”Š",
+ "group": ["android", "service"],
+ "description": "Volume and audio control - get/set volume, mute, unmute",
+ "version": 1,
+ },
+ "deviceStateAutomation": {
+ "displayName": "Device State",
+ "icon": "βš™οΈ",
+ "group": ["android", "service"],
+ "description": "Device state control - airplane mode, screen on/off, power save mode, brightness",
+ "version": 1,
+ },
+ "screenControlAutomation": {
+ "displayName": "Screen Control",
+ "icon": "πŸ’‘",
+ "group": ["android", "service"],
+ "description": "Screen control - brightness adjustment, wake screen, auto-brightness, screen timeout",
+ "version": 1,
+ },
+ "airplaneModeControl": {
+ "displayName": "Airplane Mode",
+ "icon": "✈️",
+ "group": ["android", "service"],
+ "description": "Airplane mode status monitoring and control",
+ "version": 1,
+ },
+ "motionDetection": {
+ "displayName": "Motion Detection",
+ "icon": "πŸ“³",
+ "group": ["android", "service"],
+ "description": "Accelerometer and gyroscope data - detect motion, shake gestures, device orientation",
+ "version": 1,
+ },
+ "environmentalSensors": {
+ "displayName": "Environmental Sensors",
+ "icon": "🌑️",
+ "group": ["android", "service"],
+ "description": "Environmental sensors - temperature, humidity, pressure, light level",
+ "version": 1,
+ },
+ "cameraControl": {
+ "displayName": "Camera Control",
+ "icon": "πŸ“·",
+ "group": ["android", "service"],
+ "description": "Camera control - get camera info, take photos, camera capabilities",
+ "version": 1,
+ },
+ "mediaControl": {
+ "displayName": "Media Control",
+ "icon": "🎡",
+ "group": ["android", "service"],
+ "description": "Media playback control - volume control, playback control, play media files",
+ "version": 1,
+ },
}
diff --git a/server/tests/test_node_spec.py b/server/tests/test_node_spec.py
index 6d7d1fee..7b2a8474 100644
--- a/server/tests/test_node_spec.py
+++ b/server/tests/test_node_spec.py
@@ -70,12 +70,12 @@ class TestNodeSpec:
assert spec["version"] == 1
def test_spec_fallback_metadata_when_unseeded(self):
- # gmaps_create has an input model but no metadata yet
- # (Phase 3d target).
- spec = get_node_spec("gmaps_create")
+ # apify has an output schema but no input model and no metadata yet
+ # (Phase 3d.ii target). Spec still emits with id-fallback metadata.
+ spec = get_node_spec("apify")
assert spec is not None
- assert spec["type"] == "gmaps_create"
- assert spec["displayName"] == "gmaps_create" # falls back to id
+ assert spec["type"] == "apify"
+ assert spec["displayName"] == "apify" # falls back to id
assert spec["group"] == []
def test_spec_missing_entirely(self):
@@ -227,3 +227,49 @@ class TestPhase3cCoverage:
temp = spec["inputs"]["properties"]["temperature"]
assert temp["minimum"] == 0.0
assert temp["maximum"] == 2.0
+
+
+class TestPhase3dCoverage:
+ """Phase 3d.i backend parity: location + scheduler + chat + text + 16
+ Android service nodes + gmail trigger. All Pydantic models existed
+ before this sub-commit - it adds NODE_METADATA entries only."""
+
+ PHASE_3D_TYPES = [
+ # Location
+ "gmaps_create", "gmaps_locations", "gmaps_nearby_places",
+ # Scheduler / triggers
+ "cronScheduler", "timer", "gmailReceive",
+ # Chat / text
+ "chatSend", "chatHistory", "textGenerator", "fileHandler",
+ # Android (16)
+ "batteryMonitor", "networkMonitor", "systemInfo", "location",
+ "appLauncher", "appList", "wifiAutomation", "bluetoothAutomation",
+ "audioAutomation", "deviceStateAutomation", "screenControlAutomation",
+ "airplaneModeControl", "motionDetection", "environmentalSensors",
+ "cameraControl", "mediaControl",
+ ]
+
+ def test_all_have_metadata(self):
+ from models.node_metadata import get_node_metadata
+ missing = [t for t in self.PHASE_3D_TYPES if get_node_metadata(t) is None]
+ assert not missing, f"Phase 3d.i types missing metadata: {missing}"
+
+ def test_all_have_full_spec(self):
+ for t in self.PHASE_3D_TYPES:
+ spec = get_node_spec(t)
+ assert spec is not None, f"No spec for {t}"
+ assert spec["displayName"] != t, f"{t} fell back to id displayName"
+ assert spec["group"], f"{t} missing group"
+
+ def test_android_services_grouped(self):
+ # Dashboard routes group containing 'android' OR 'service' to SquareNode.
+ for t in ["batteryMonitor", "wifiAutomation", "cameraControl"]:
+ assert "android" in get_node_spec(t)["group"]
+
+ def test_input_model_coverage_complete(self):
+ """Every node type with a Pydantic input model now also has
+ display metadata. Phase 3d.i closes the input-model gap."""
+ from services.node_input_schemas import NODE_INPUT_MODELS
+ from models.node_metadata import NODE_METADATA
+ unseeded = [t for t in NODE_INPUT_MODELS if t not in NODE_METADATA]
+ assert not unseeded, f"Input-modeled types still missing metadata: {unseeded}"