Skip to content

Self-improving AI Employees for everyone

feat(plugin): Wave 11.C batch 4 — 18 nodes (messaging + Google + Maps + Serper)

trohitg67849701767f
diff --git a/server/nodes/chat/chat_history.py b/server/nodes/chat/chat_history.py
new file mode 100644
index 00000000..579a2568
--- /dev/null
+++ b/server/nodes/chat/chat_history.py
@@ -0,0 +1,56 @@
+"""Chat History — Wave 11.C migration. Retrieves chat conversation history."""
+
+from __future__ import annotations
+
+from typing import Any, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class ChatHistoryParams(BaseModel):
+ session_id: str = Field(default="default", alias="sessionId")
+ limit: int = Field(default=50, ge=1, le=500)
+
+ model_config = ConfigDict(populate_by_name=True, extra="ignore")
+
+
+class ChatHistoryOutput(BaseModel):
+ messages: Optional[list] = None
+ count: Optional[int] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class ChatHistoryNode(ActionNode):
+ type = "chatHistory"
+ display_name = "Chat History"
+ subtitle = "Retrieve Messages"
+ icon = "asset:chat"
+ color = "#8be9fd"
+ group = ("chat",)
+ description = "Retrieve chat conversation history"
+ 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": True, "open_world": False}
+ task_queue = TaskQueue.DEFAULT
+
+ Params = ChatHistoryParams
+ Output = ChatHistoryOutput
+
+ @Operation("read")
+ async def read(self, ctx: NodeContext, params: ChatHistoryParams) -> Any:
+ from services.handlers.chat import handle_chat_history
+ response = await handle_chat_history(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Chat history failed")
diff --git a/server/nodes/chat/chat_send.py b/server/nodes/chat/chat_send.py
new file mode 100644
index 00000000..7b1f1ff3
--- /dev/null
+++ b/server/nodes/chat/chat_send.py
@@ -0,0 +1,56 @@
+"""Chat Send — Wave 11.C migration. Sends messages to chat conversations."""
+
+from __future__ import annotations
+
+from typing import Any, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class ChatSendParams(BaseModel):
+ session_id: str = Field(default="default", alias="sessionId")
+ message: str = Field(default="")
+
+ model_config = ConfigDict(populate_by_name=True, extra="ignore")
+
+
+class ChatSendOutput(BaseModel):
+ sent: Optional[bool] = None
+ message_id: Optional[str] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class ChatSendNode(ActionNode):
+ type = "chatSend"
+ display_name = "Chat Send"
+ subtitle = "Send to Chat"
+ icon = "asset:chat"
+ color = "#8be9fd"
+ group = ("chat",)
+ description = "Send messages to chat conversations"
+ 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": False}
+ task_queue = TaskQueue.DEFAULT
+
+ Params = ChatSendParams
+ Output = ChatSendOutput
+
+ @Operation("send")
+ async def send(self, ctx: NodeContext, params: ChatSendParams) -> Any:
+ from services.handlers.chat import handle_chat_send
+ response = await handle_chat_send(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Chat send failed")
diff --git a/server/nodes/email/email_read.py b/server/nodes/email/email_read.py
new file mode 100644
index 00000000..c294d802
--- /dev/null
+++ b/server/nodes/email/email_read.py
@@ -0,0 +1,68 @@
+"""Email Read — Wave 11.C migration. IMAP via Himalaya CLI."""
+
+from __future__ import annotations
+
+from typing import Any, Literal, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class EmailReadParams(BaseModel):
+ provider: Literal[
+ "gmail", "outlook", "yahoo", "icloud",
+ "protonmail", "fastmail", "custom",
+ ] = "gmail"
+ operation: Literal["list", "search", "read", "folders", "move", "delete", "flag"] = "list"
+ folder: str = Field(default="INBOX")
+ query: str = Field(default="")
+ message_id: str = Field(default="", alias="messageId")
+ target_folder: str = Field(default="", alias="targetFolder")
+ flag: str = Field(default="")
+ limit: int = Field(default=20, ge=1, le=500)
+
+ model_config = ConfigDict(populate_by_name=True, extra="ignore")
+
+
+class EmailReadOutput(BaseModel):
+ operation: Optional[str] = None
+ messages: Optional[list] = None
+ folders: Optional[list] = None
+ body: Optional[str] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class EmailReadNode(ActionNode):
+ type = "emailRead"
+ display_name = "Email Read"
+ subtitle = "IMAP Read/Manage"
+ icon = "asset:read"
+ color = "#8be9fd"
+ group = ("email", "tool")
+ description = "Read and manage emails via IMAP - list, search, read, move, delete, flag"
+ 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.MESSAGING
+ usable_as_tool = True
+
+ Params = EmailReadParams
+ Output = EmailReadOutput
+
+ @Operation("query", cost={"service": "email", "action": "imap", "count": 1})
+ async def query(self, ctx: NodeContext, params: EmailReadParams) -> Any:
+ from services.handlers.email import handle_email_read
+ response = await handle_email_read(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Email read failed")
diff --git a/server/nodes/email/email_send.py b/server/nodes/email/email_send.py
new file mode 100644
index 00000000..5b16d4f8
--- /dev/null
+++ b/server/nodes/email/email_send.py
@@ -0,0 +1,65 @@
+"""Email Send — Wave 11.C migration. SMTP via Himalaya CLI."""
+
+from __future__ import annotations
+
+from typing import Any, Literal, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class EmailSendParams(BaseModel):
+ provider: Literal[
+ "gmail", "outlook", "yahoo", "icloud",
+ "protonmail", "fastmail", "custom",
+ ] = "gmail"
+ to: str = Field(...)
+ subject: str = Field(...)
+ body: str = Field(default="", json_schema_extra={"rows": 6})
+ cc: str = Field(default="")
+ bcc: str = Field(default="")
+ body_type: Literal["text", "html"] = Field(default="text", alias="bodyType")
+
+ model_config = ConfigDict(populate_by_name=True, extra="ignore")
+
+
+class EmailSendOutput(BaseModel):
+ sent: Optional[bool] = None
+ message_id: Optional[str] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class EmailSendNode(ActionNode):
+ type = "emailSend"
+ display_name = "Email Send"
+ subtitle = "SMTP Outbound"
+ icon = "asset:send"
+ color = "#8be9fd"
+ group = ("email", "tool")
+ description = "Send emails via SMTP (Gmail, Outlook, Yahoo, iCloud, ProtonMail, Fastmail, custom)"
+ 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.MESSAGING
+ usable_as_tool = True
+
+ Params = EmailSendParams
+ Output = EmailSendOutput
+
+ @Operation("send", cost={"service": "email", "action": "send", "count": 1})
+ async def send(self, ctx: NodeContext, params: EmailSendParams) -> Any:
+ from services.handlers.email import handle_email_send
+ response = await handle_email_send(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Email send failed")
diff --git a/server/nodes/google/calendar.py b/server/nodes/google/calendar.py
new file mode 100644
index 00000000..55a7dd4e
--- /dev/null
+++ b/server/nodes/google/calendar.py
@@ -0,0 +1,68 @@
+"""Google Calendar — Wave 11.C migration."""
+
+from __future__ import annotations
+
+from typing import Any, Literal, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class CalendarParams(BaseModel):
+ operation: Literal["create", "list", "update", "delete"] = "list"
+ calendar_id: str = Field(default="primary", alias="calendarId")
+ event_id: str = Field(default="", alias="eventId")
+ summary: str = Field(default="")
+ description: str = Field(default="")
+ start_time: str = Field(default="", alias="startTime")
+ end_time: str = Field(default="", alias="endTime")
+ location: str = Field(default="")
+ attendees: str = Field(default="")
+ max_results: int = Field(default=10, alias="maxResults", ge=1, le=250)
+
+ model_config = ConfigDict(populate_by_name=True, extra="allow")
+
+
+class CalendarOutput(BaseModel):
+ operation: Optional[str] = None
+ event_id: Optional[str] = None
+ events: Optional[list] = None
+ count: Optional[int] = None
+ deleted: Optional[bool] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class CalendarNode(ActionNode):
+ type = "calendar"
+ display_name = "Calendar"
+ subtitle = "Event Management"
+ icon = "asset:calendar"
+ color = "#4285F4"
+ group = ("google", "tool")
+ description = "Google Calendar create / list / update / delete events"
+ 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.REST_API
+ usable_as_tool = True
+
+ Params = CalendarParams
+ Output = CalendarOutput
+
+ @Operation("dispatch", cost={"service": "calendar", "action": "op", "count": 1})
+ async def dispatch(self, ctx: NodeContext, params: CalendarParams) -> Any:
+ from services.handlers.calendar import handle_google_calendar
+ response = await handle_google_calendar(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Calendar op failed")
diff --git a/server/nodes/google/contacts.py b/server/nodes/google/contacts.py
new file mode 100644
index 00000000..3354d258
--- /dev/null
+++ b/server/nodes/google/contacts.py
@@ -0,0 +1,64 @@
+"""Google Contacts — Wave 11.C migration."""
+
+from __future__ import annotations
+
+from typing import Any, Literal, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class ContactsParams(BaseModel):
+ operation: Literal["create", "list", "search", "get", "update", "delete"] = "list"
+ contact_id: str = Field(default="", alias="contactId")
+ given_name: str = Field(default="", alias="givenName")
+ family_name: str = Field(default="", alias="familyName")
+ email: str = Field(default="")
+ phone: str = Field(default="")
+ query: str = Field(default="")
+ max_results: int = Field(default=20, alias="maxResults", ge=1, le=1000)
+
+ model_config = ConfigDict(populate_by_name=True, extra="allow")
+
+
+class ContactsOutput(BaseModel):
+ operation: Optional[str] = None
+ contact_id: Optional[str] = None
+ contacts: Optional[list] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class ContactsNode(ActionNode):
+ type = "contacts"
+ display_name = "Contacts"
+ subtitle = "Contact Management"
+ icon = "asset:contacts"
+ color = "#4285F4"
+ group = ("google", "tool")
+ description = "Google Contacts create / list / search / get / update / delete"
+ 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.REST_API
+ usable_as_tool = True
+
+ Params = ContactsParams
+ Output = ContactsOutput
+
+ @Operation("dispatch", cost={"service": "contacts", "action": "op", "count": 1})
+ async def dispatch(self, ctx: NodeContext, params: ContactsParams) -> Any:
+ from services.handlers.contacts import handle_google_contacts
+ response = await handle_google_contacts(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Contacts op failed")
diff --git a/server/nodes/google/drive.py b/server/nodes/google/drive.py
new file mode 100644
index 00000000..7e1df6ac
--- /dev/null
+++ b/server/nodes/google/drive.py
@@ -0,0 +1,68 @@
+"""Google Drive — Wave 11.C migration."""
+
+from __future__ import annotations
+
+from typing import Any, Literal, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class DriveParams(BaseModel):
+ operation: Literal["upload", "download", "list", "share"] = "list"
+ file_id: str = Field(default="", alias="fileId")
+ file_name: str = Field(default="", alias="fileName")
+ file_path: str = Field(default="", alias="filePath")
+ folder_id: str = Field(default="", alias="folderId")
+ mime_type: str = Field(default="", alias="mimeType")
+ share_email: str = Field(default="", alias="shareEmail")
+ share_role: Literal["reader", "writer", "commenter"] = Field(
+ default="reader", alias="shareRole",
+ )
+ max_results: int = Field(default=20, alias="maxResults", ge=1, le=1000)
+
+ model_config = ConfigDict(populate_by_name=True, extra="allow")
+
+
+class DriveOutput(BaseModel):
+ operation: Optional[str] = None
+ file_id: Optional[str] = None
+ files: Optional[list] = None
+ download_path: Optional[str] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class DriveNode(ActionNode):
+ type = "drive"
+ display_name = "Drive"
+ subtitle = "File Operations"
+ icon = "asset:drive"
+ color = "#0F9D58"
+ group = ("google", "tool")
+ description = "Google Drive upload / download / list / share files"
+ 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.REST_API
+ usable_as_tool = True
+
+ Params = DriveParams
+ Output = DriveOutput
+
+ @Operation("dispatch", cost={"service": "drive", "action": "op", "count": 1})
+ async def dispatch(self, ctx: NodeContext, params: DriveParams) -> Any:
+ from services.handlers.drive import handle_google_drive
+ response = await handle_google_drive(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Drive op failed")
diff --git a/server/nodes/google/sheets.py b/server/nodes/google/sheets.py
new file mode 100644
index 00000000..de8b4544
--- /dev/null
+++ b/server/nodes/google/sheets.py
@@ -0,0 +1,60 @@
+"""Google Sheets — Wave 11.C migration."""
+
+from __future__ import annotations
+
+from typing import Any, List, Literal, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class SheetsParams(BaseModel):
+ operation: Literal["read", "write", "append"] = "read"
+ spreadsheet_id: str = Field(default="", alias="spreadsheetId")
+ range: str = Field(default="A1:Z1000")
+ values: List[List[Any]] = Field(default_factory=list)
+
+ model_config = ConfigDict(populate_by_name=True, extra="allow")
+
+
+class SheetsOutput(BaseModel):
+ operation: Optional[str] = None
+ rows: Optional[list] = None
+ updated_cells: Optional[int] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class SheetsNode(ActionNode):
+ type = "sheets"
+ display_name = "Sheets"
+ subtitle = "Spreadsheet Ops"
+ icon = "asset:sheets"
+ color = "#0F9D58"
+ group = ("google", "tool")
+ description = "Google Sheets read / write / append spreadsheet data"
+ 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.REST_API
+ usable_as_tool = True
+
+ Params = SheetsParams
+ Output = SheetsOutput
+
+ @Operation("dispatch", cost={"service": "sheets", "action": "op", "count": 1})
+ async def dispatch(self, ctx: NodeContext, params: SheetsParams) -> Any:
+ from services.handlers.sheets import handle_google_sheets
+ response = await handle_google_sheets(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Sheets op failed")
diff --git a/server/nodes/google/tasks.py b/server/nodes/google/tasks.py
new file mode 100644
index 00000000..14d9906f
--- /dev/null
+++ b/server/nodes/google/tasks.py
@@ -0,0 +1,62 @@
+"""Google Tasks — Wave 11.C migration."""
+
+from __future__ import annotations
+
+from typing import Any, Literal, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class TasksParams(BaseModel):
+ operation: Literal["create", "list", "complete", "update", "delete"] = "list"
+ task_list_id: str = Field(default="@default", alias="taskListId")
+ task_id: str = Field(default="", alias="taskId")
+ title: str = Field(default="")
+ notes: str = Field(default="")
+ due: str = Field(default="")
+
+ model_config = ConfigDict(populate_by_name=True, extra="allow")
+
+
+class TasksOutput(BaseModel):
+ operation: Optional[str] = None
+ task_id: Optional[str] = None
+ tasks: Optional[list] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class TasksNode(ActionNode):
+ type = "tasks"
+ display_name = "Tasks"
+ subtitle = "Task Management"
+ icon = "asset:tasks"
+ color = "#4285F4"
+ group = ("google", "tool")
+ description = "Google Tasks create / list / complete / update / delete"
+ 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.REST_API
+ usable_as_tool = True
+
+ Params = TasksParams
+ Output = TasksOutput
+
+ @Operation("dispatch", cost={"service": "tasks", "action": "op", "count": 1})
+ async def dispatch(self, ctx: NodeContext, params: TasksParams) -> Any:
+ from services.handlers.tasks import handle_google_tasks
+ response = await handle_google_tasks(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Tasks op failed")
diff --git a/server/nodes/location/gmaps_create.py b/server/nodes/location/gmaps_create.py
new file mode 100644
index 00000000..d292101b
--- /dev/null
+++ b/server/nodes/location/gmaps_create.py
@@ -0,0 +1,65 @@
+"""Google Maps Create — Wave 11.C migration. Renders an interactive map."""
+
+from __future__ import annotations
+
+from typing import Any, Literal, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class GmapsCreateParams(BaseModel):
+ center_lat: float = Field(default=0.0, alias="centerLat")
+ center_lng: float = Field(default=0.0, alias="centerLng")
+ zoom: int = Field(default=10, ge=1, le=20)
+ map_type: Literal["roadmap", "satellite", "hybrid", "terrain"] = Field(
+ default="roadmap", alias="mapType",
+ )
+
+ model_config = ConfigDict(populate_by_name=True, extra="ignore")
+
+
+class GmapsCreateOutput(BaseModel):
+ map_id: Optional[str] = None
+ config: Optional[dict] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class GmapsCreateNode(ActionNode):
+ type = "gmaps_create"
+ display_name = "Map Create"
+ subtitle = "Google Map"
+ icon = "🗺️"
+ color = "#50fa7b"
+ group = ("location", "service")
+ description = "Google Maps creation with center, zoom, and map type"
+ 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"},
+ )
+ ui_hints = {"showLocationPanel": True}
+ annotations = {"destructive": False, "readonly": True, "open_world": False}
+ task_queue = TaskQueue.DEFAULT
+
+ Params = GmapsCreateParams
+ Output = GmapsCreateOutput
+
+ @Operation("create")
+ async def create(self, ctx: NodeContext, params: GmapsCreateParams) -> Any:
+ from core.container import container
+ from services.handlers.utility import handle_create_map
+
+ maps_service = container.maps_service()
+ response = await handle_create_map(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True),
+ context=ctx.raw, maps_service=maps_service,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Map create failed")
diff --git a/server/nodes/location/gmaps_locations.py b/server/nodes/location/gmaps_locations.py
new file mode 100644
index 00000000..f08c0498
--- /dev/null
+++ b/server/nodes/location/gmaps_locations.py
@@ -0,0 +1,63 @@
+"""Google Maps Geocoding — Wave 11.C migration."""
+
+from __future__ import annotations
+
+from typing import Any, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class GmapsLocationsParams(BaseModel):
+ address: str = Field(..., min_length=1)
+ region: str = Field(default="")
+
+ model_config = ConfigDict(extra="ignore")
+
+
+class GmapsLocationsOutput(BaseModel):
+ latitude: Optional[float] = None
+ longitude: Optional[float] = None
+ formatted_address: Optional[str] = None
+ place_id: Optional[str] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class GmapsLocationsNode(ActionNode):
+ type = "gmaps_locations"
+ display_name = "Geocoding"
+ subtitle = "Address \u2192 LatLng"
+ icon = "📍"
+ color = "#50fa7b"
+ group = ("location", "service", "tool")
+ description = "Google Maps Geocoding 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": True, "open_world": True}
+ task_queue = TaskQueue.REST_API
+ usable_as_tool = True
+
+ Params = GmapsLocationsParams
+ Output = GmapsLocationsOutput
+
+ @Operation("geocode", cost={"service": "google_maps", "action": "geocode", "count": 1})
+ async def geocode(self, ctx: NodeContext, params: GmapsLocationsParams) -> Any:
+ from core.container import container
+ from services.handlers.utility import handle_add_locations
+
+ maps_service = container.maps_service()
+ response = await handle_add_locations(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True),
+ context=ctx.raw, maps_service=maps_service,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Geocoding failed")
diff --git a/server/nodes/location/gmaps_nearby_places.py b/server/nodes/location/gmaps_nearby_places.py
new file mode 100644
index 00000000..05910f6c
--- /dev/null
+++ b/server/nodes/location/gmaps_nearby_places.py
@@ -0,0 +1,64 @@
+"""Google Maps Nearby Places — Wave 11.C migration."""
+
+from __future__ import annotations
+
+from typing import Any, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class GmapsNearbyPlacesParams(BaseModel):
+ latitude: float = Field(..., ge=-90.0, le=90.0)
+ longitude: float = Field(..., ge=-180.0, le=180.0)
+ radius: int = Field(default=1000, ge=1, le=50000)
+ place_type: str = Field(default="", alias="placeType")
+ keyword: str = Field(default="")
+
+ model_config = ConfigDict(populate_by_name=True, extra="ignore")
+
+
+class GmapsNearbyPlacesOutput(BaseModel):
+ places: Optional[list] = None
+ count: Optional[int] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class GmapsNearbyPlacesNode(ActionNode):
+ type = "gmaps_nearby_places"
+ display_name = "Nearby Places"
+ subtitle = "Places API"
+ icon = "🏪"
+ color = "#50fa7b"
+ group = ("location", "service", "tool")
+ description = "Google Places API nearbySearch"
+ 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": True, "open_world": True}
+ task_queue = TaskQueue.REST_API
+ usable_as_tool = True
+
+ Params = GmapsNearbyPlacesParams
+ Output = GmapsNearbyPlacesOutput
+
+ @Operation("nearby", cost={"service": "google_maps", "action": "places_nearby", "count": 1})
+ async def nearby(self, ctx: NodeContext, params: GmapsNearbyPlacesParams) -> Any:
+ from core.container import container
+ from services.handlers.utility import handle_nearby_places
+
+ maps_service = container.maps_service()
+ response = await handle_nearby_places(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True),
+ context=ctx.raw, maps_service=maps_service,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Nearby places failed")
diff --git a/server/nodes/search/serper_search.py b/server/nodes/search/serper_search.py
new file mode 100644
index 00000000..459ed7a3
--- /dev/null
+++ b/server/nodes/search/serper_search.py
@@ -0,0 +1,138 @@
+"""Serper Search — Wave 11.C migration. Google SERP via Serper API."""
+
+from __future__ import annotations
+
+from typing import List, Literal, Optional
+
+from pydantic import BaseModel, Field
+
+from services.plugin import (
+ ActionNode,
+ ApiKeyCredential,
+ NodeContext,
+ Operation,
+ TaskQueue,
+)
+
+
+class SerperCredential(ApiKeyCredential):
+ id = "serper"
+ display_name = "Serper"
+ category = "Search"
+ icon = "asset:google"
+ key_name = "X-API-KEY"
+ key_location = "header"
+ docs_url = "https://serper.dev/api-key"
+
+
+class SerperSearchResult(BaseModel):
+ title: str = ""
+ snippet: str = ""
+ url: str = ""
+ position: Optional[int] = None
+
+
+class SerperSearchOutput(BaseModel):
+ query: str
+ results: List[SerperSearchResult] = Field(default_factory=list)
+ result_count: int = 0
+ search_type: str = "search"
+ knowledge_graph: Optional[dict] = None
+ provider: Literal["serper"] = "serper"
+
+
+class SerperSearchParams(BaseModel):
+ query: str = Field(..., min_length=1)
+ search_type: Literal["search", "news", "images", "places"] = Field(
+ default="search", alias="searchType",
+ )
+ max_results: int = Field(default=10, alias="maxResults", ge=1, le=100)
+ country: str = Field(default="")
+ language: str = Field(default="en")
+
+ model_config = {"populate_by_name": True, "extra": "ignore"}
+
+
+_ENDPOINTS = {
+ "search": "https://google.serper.dev/search",
+ "news": "https://google.serper.dev/news",
+ "images": "https://google.serper.dev/images",
+ "places": "https://google.serper.dev/places",
+}
+
+
+class SerperSearchNode(ActionNode):
+ type = "serperSearch"
+ display_name = "Serper Search"
+ subtitle = "Google SERP"
+ icon = "asset:google"
+ color = "#ff79c6"
+ group = ("search", "tool")
+ description = "Search the web using Google via Serper API (web/news/images/places)"
+ 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"},
+ )
+ credentials = (SerperCredential,)
+ annotations = {"destructive": False, "readonly": True, "open_world": True}
+ task_queue = TaskQueue.REST_API
+ usable_as_tool = True
+
+ Params = SerperSearchParams
+ Output = SerperSearchOutput
+
+ @Operation("search", cost={"service": "serper", "action": "web_search", "count": 1})
+ async def search(self, ctx: NodeContext, params: SerperSearchParams) -> SerperSearchOutput:
+ body: dict = {"q": params.query, "num": min(params.max_results, 100)}
+ if params.country:
+ body["gl"] = params.country
+ if params.language:
+ body["hl"] = params.language
+
+ async with ctx.connection("serper") as conn:
+ response = await conn.post(
+ _ENDPOINTS.get(params.search_type, _ENDPOINTS["search"]),
+ json=body,
+ headers={"Content-Type": "application/json"},
+ )
+ response.raise_for_status()
+ data = response.json()
+
+ results: List[SerperSearchResult] = []
+ if params.search_type == "search":
+ for item in (data.get("organic") or [])[: params.max_results]:
+ results.append(SerperSearchResult(
+ title=item.get("title", ""),
+ snippet=item.get("snippet", ""),
+ url=item.get("link", ""),
+ position=item.get("position"),
+ ))
+ elif params.search_type == "news":
+ for item in (data.get("news") or [])[: params.max_results]:
+ results.append(SerperSearchResult(
+ title=item.get("title", ""),
+ snippet=item.get("snippet", ""),
+ url=item.get("link", ""),
+ ))
+ elif params.search_type == "images":
+ for item in (data.get("images") or [])[: params.max_results]:
+ results.append(SerperSearchResult(
+ title=item.get("title", ""),
+ url=item.get("imageUrl") or item.get("link", ""),
+ ))
+ elif params.search_type == "places":
+ for item in (data.get("places") or [])[: params.max_results]:
+ results.append(SerperSearchResult(
+ title=item.get("title", ""),
+ url=item.get("website", ""),
+ ))
+ return SerperSearchOutput(
+ query=params.query,
+ results=results,
+ result_count=len(results),
+ search_type=params.search_type,
+ knowledge_graph=data.get("knowledgeGraph"),
+ )
diff --git a/server/nodes/services.py b/server/nodes/services.py
index 6039b470..712d99a6 100644
--- a/server/nodes/services.py
+++ b/server/nodes/services.py
@@ -55,41 +55,26 @@ _GREEN = "#50fa7b"
# 3. Messaging — WhatsApp, Telegram, Twitter, Email, Chat
# ---------------------------------------------------------------------------
-register_node(type="whatsappSend", metadata={"displayName": "WhatsApp Send", "subtitle": "Send Message", "icon": "asset:whatsapp-send", "color": "#25D366", "group": ["whatsapp", "tool"], "componentKind": "square", "handles": _IO, "description": "Send WhatsApp messages (text, media, location, contact, sticker)", "version": 1})
-register_node(type="whatsappDb", metadata={"displayName": "WhatsApp DB", "subtitle": "Query DB", "icon": "asset:whatsapp-db", "color": "#25D366", "group": ["whatsapp", "tool"], "componentKind": "square", "handles": _IO, "description": "Query WhatsApp database (chat history, contacts, groups, channels)", "version": 1})
-
+# whatsappSend + whatsappDb — migrated to nodes/whatsapp/*.py (Wave 11.C).
# telegramSend — migrated to nodes/telegram/telegram_send.py (Wave 11.C).
-register_node(type="twitterSend", metadata={"displayName": "Twitter Send", "subtitle": "Tweet / Reply", "icon": "asset:x", "color": "#1DA1F2", "group": ["social", "tool"], "componentKind": "square", "handles": _IO, "description": "Post tweets, reply, retweet, like, or delete tweets on Twitter/X", "version": 1})
-register_node(type="twitterSearch", metadata={"displayName": "Twitter Search", "subtitle": "Search Tweets", "icon": "asset:x", "color": "#1DA1F2", "group": ["social", "tool"], "componentKind": "square", "handles": _IO, "description": "Search recent tweets on Twitter/X using the Search API", "version": 1})
-register_node(type="twitterUser", metadata={"displayName": "Twitter User", "subtitle": "User Profiles", "icon": "asset:x", "color": "#1DA1F2", "group": ["social", "tool"], "componentKind": "square", "handles": _IO, "description": "Look up Twitter/X user profiles, followers, and following", "version": 1})
-
-register_node(type="emailSend", metadata={"displayName": "Email Send", "subtitle": "SMTP Outbound", "icon": "asset:send", "color": "#8be9fd", "group": ["email", "tool"], "componentKind": "square", "handles": _IO, "description": "Send emails via SMTP (Gmail, Outlook, Yahoo, iCloud, ProtonMail, Fastmail, custom)", "version": 1})
-register_node(type="emailRead", metadata={"displayName": "Email Read", "subtitle": "IMAP Read/Manage", "icon": "asset:read", "color": "#8be9fd", "group": ["email", "tool"], "componentKind": "square", "handles": _IO, "description": "Read and manage emails via IMAP - list, search, read, move, delete, flag", "version": 1})
-
-register_node(type="chatSend", metadata={"displayName": "Chat Send", "subtitle": "Send to Chat", "icon": "asset:chat", "color": "#8be9fd", "group": ["chat"], "componentKind": "square", "handles": _IO, "description": "Send messages to chat conversations", "version": 1})
-register_node(type="chatHistory", metadata={"displayName": "Chat History", "subtitle": "Retrieve Messages", "icon": "asset:chat", "color": "#8be9fd", "group": ["chat"], "componentKind": "square", "handles": _IO, "description": "Retrieve chat conversation history", "version": 1})
+# twitterSend / twitterSearch / twitterUser — migrated to nodes/twitter/*.py (Wave 11.C).
+# emailSend / emailRead — migrated to nodes/email/*.py (Wave 11.C).
+# chatSend / chatHistory — migrated to nodes/chat/*.py (Wave 11.C).
# ---------------------------------------------------------------------------
# 4. Google Workspace (6) — branded blue
# ---------------------------------------------------------------------------
-# gmail — migrated to nodes/gmail.py (Wave 11.B class-based plugin).
-register_node(type="calendar", metadata={"displayName": "Calendar", "subtitle": "Event Management", "icon": "asset:calendar", "color": "#4285F4", "group": ["google", "tool"], "componentKind": "square", "handles": _IO, "description": "Google Calendar create / list / update / delete events", "version": 1})
-register_node(type="drive", metadata={"displayName": "Drive", "subtitle": "File Operations", "icon": "asset:drive", "color": "#0F9D58", "group": ["google", "tool"], "componentKind": "square", "handles": _IO, "description": "Google Drive upload / download / list / share files", "version": 1})
-register_node(type="sheets", metadata={"displayName": "Sheets", "subtitle": "Spreadsheet Ops", "icon": "asset:sheets", "color": "#0F9D58", "group": ["google", "tool"], "componentKind": "square", "handles": _IO, "description": "Google Sheets read / write / append spreadsheet data", "version": 1})
-register_node(type="tasks", metadata={"displayName": "Tasks", "subtitle": "Task Management", "icon": "asset:tasks", "color": "#4285F4", "group": ["google", "tool"], "componentKind": "square", "handles": _IO, "description": "Google Tasks create / list / complete / update / delete", "version": 1})
-register_node(type="contacts", metadata={"displayName": "Contacts", "subtitle": "Contact Management", "icon": "asset:contacts", "color": "#4285F4", "group": ["google", "tool"], "componentKind": "square", "handles": _IO, "description": "Google Contacts create / list / search / get / update / delete", "version": 1})
+# All Google Workspace nodes — migrated to nodes/google/*.py (Wave 11.B/11.C).
# ---------------------------------------------------------------------------
# 5. Web — search, browser, scrapers, proxy, location
# ---------------------------------------------------------------------------
-# braveSearch — migrated to nodes/brave_search.py (Wave 11.B class-based plugin).
-register_node(type="serperSearch", metadata={"displayName": "Serper Search", "subtitle": "Google SERP", "icon": "asset:google","color": "#ff79c6", "group": ["search", "tool"], "componentKind": "square", "handles": _IO, "description": "Search the web using Google via Serper API (web/news/images/places)", "version": 1})
-# perplexitySearch — migrated to nodes/search/perplexity_search.py (Wave 11.C).
+# All search nodes (brave / serper / perplexity) — migrated to nodes/search/*.py.
register_node(type="browser", metadata={"displayName": "Browser", "subtitle": "Browser Automation","icon": "asset:chrome", "color": "#ff79c6", "group": ["browser", "tool"], "componentKind": "square", "handles": _IO, "description": "Interactive browser automation via agent-browser CLI", "version": 1})
register_node(type="apifyActor", metadata={"displayName": "Apify Actor", "subtitle": "Web Scraper", "icon": "asset:apify", "color": "#ff79c6", "group": ["api", "scraper", "tool"], "componentKind": "square", "handles": _IO, "description": "Run Apify actors for Instagram, TikTok, Twitter, LinkedIn, etc.", "version": 1})
@@ -99,9 +84,8 @@ register_node(type="proxyRequest", metadata={"displayName": "Proxy Request",
register_node(type="proxyConfig", metadata={"displayName": "Proxy Config", "subtitle": "Routing Rules", "icon": "🔧", "color": "#ffb86c", "group": ["proxy", "tool"], "componentKind": "square", "handles": _IO, "description": "Configure proxy providers and routing rules", "version": 1})
register_node(type="proxyStatus", metadata={"displayName": "Proxy Status", "subtitle": "Health Stats", "icon": "📊", "color": "#ffb86c", "group": ["proxy"], "componentKind": "square", "handles": _IO, "description": "View proxy provider health, scores, and usage statistics", "version": 1})
-register_node(type="gmaps_create", metadata={"displayName": "Map Create", "subtitle": "Google Map", "icon": "🗺️", "color": _GREEN, "group": ["location", "service"], "componentKind": "square", "handles": _IO, "description": "Google Maps creation with center, zoom, and map type", "version": 1, "uiHints": {"showLocationPanel": True}})
-register_node(type="gmaps_locations", metadata={"displayName": "Geocoding", "subtitle": "Address → LatLng","icon": "📍", "color": _GREEN, "group": ["location", "service", "tool"], "componentKind": "square", "handles": _IO, "description": "Google Maps Geocoding service", "version": 1})
-register_node(type="gmaps_nearby_places", metadata={"displayName": "Nearby Places", "subtitle": "Places API", "icon": "🏪", "color": _GREEN, "group": ["location", "service", "tool"], "componentKind": "square", "handles": _IO, "description": "Google Places API nearbySearch", "version": 1})
+# All Maps nodes (gmaps_create / gmaps_locations / gmaps_nearby_places) —
+# migrated to nodes/location/*.py (Wave 11.C).
# ---------------------------------------------------------------------------
diff --git a/server/nodes/twitter/twitter_search.py b/server/nodes/twitter/twitter_search.py
new file mode 100644
index 00000000..c92965d8
--- /dev/null
+++ b/server/nodes/twitter/twitter_search.py
@@ -0,0 +1,57 @@
+"""Twitter Search — Wave 11.C migration."""
+
+from __future__ import annotations
+
+from typing import Any, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class TwitterSearchParams(BaseModel):
+ query: str = Field(..., min_length=1)
+ max_results: int = Field(default=10, alias="maxResults", ge=10, le=100)
+
+ model_config = ConfigDict(populate_by_name=True, extra="ignore")
+
+
+class TwitterSearchOutput(BaseModel):
+ tweets: Optional[list] = None
+ count: Optional[int] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class TwitterSearchNode(ActionNode):
+ type = "twitterSearch"
+ display_name = "Twitter Search"
+ subtitle = "Search Tweets"
+ icon = "asset:x"
+ color = "#1DA1F2"
+ group = ("social", "tool")
+ description = "Search recent tweets on Twitter/X using the Search API"
+ 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": True, "open_world": True}
+ task_queue = TaskQueue.REST_API
+ usable_as_tool = True
+
+ Params = TwitterSearchParams
+ Output = TwitterSearchOutput
+
+ @Operation("search", cost={"service": "twitter", "action": "search", "count": 1})
+ async def search(self, ctx: NodeContext, params: TwitterSearchParams) -> Any:
+ from services.handlers.twitter import handle_twitter_search
+ response = await handle_twitter_search(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Twitter search failed")
diff --git a/server/nodes/twitter/twitter_send.py b/server/nodes/twitter/twitter_send.py
new file mode 100644
index 00000000..1d44e1b9
--- /dev/null
+++ b/server/nodes/twitter/twitter_send.py
@@ -0,0 +1,59 @@
+"""Twitter Send — Wave 11.C migration. Dual-purpose ActionNode + AI tool."""
+
+from __future__ import annotations
+
+from typing import Any, Literal, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class TwitterSendParams(BaseModel):
+ action: Literal["tweet", "reply", "retweet", "like", "unlike", "delete"] = "tweet"
+ text: str = Field(default="")
+ tweet_id: str = Field(default="", alias="tweetId")
+ reply_to_id: str = Field(default="", alias="replyToId")
+
+ model_config = ConfigDict(populate_by_name=True, extra="ignore")
+
+
+class TwitterSendOutput(BaseModel):
+ tweet_id: Optional[str] = None
+ success: Optional[bool] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class TwitterSendNode(ActionNode):
+ type = "twitterSend"
+ display_name = "Twitter Send"
+ subtitle = "Tweet / Reply"
+ icon = "asset:x"
+ color = "#1DA1F2"
+ group = ("social", "tool")
+ description = "Post tweets, reply, retweet, like, or delete tweets on Twitter/X"
+ 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.MESSAGING
+ usable_as_tool = True
+
+ Params = TwitterSendParams
+ Output = TwitterSendOutput
+
+ @Operation("send", cost={"service": "twitter", "action": "send", "count": 1})
+ async def send(self, ctx: NodeContext, params: TwitterSendParams) -> Any:
+ from services.handlers.twitter import handle_twitter_send
+ response = await handle_twitter_send(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Twitter send failed")
diff --git a/server/nodes/twitter/twitter_user.py b/server/nodes/twitter/twitter_user.py
new file mode 100644
index 00000000..d16fe4bf
--- /dev/null
+++ b/server/nodes/twitter/twitter_user.py
@@ -0,0 +1,59 @@
+"""Twitter User — Wave 11.C migration."""
+
+from __future__ import annotations
+
+from typing import Any, Literal, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class TwitterUserParams(BaseModel):
+ operation: Literal["me", "by_username", "by_id", "followers", "following"] = "me"
+ username: str = Field(default="")
+ user_id: str = Field(default="", alias="userId")
+ max_results: int = Field(default=100, alias="maxResults", ge=1, le=1000)
+
+ model_config = ConfigDict(populate_by_name=True, extra="ignore")
+
+
+class TwitterUserOutput(BaseModel):
+ user: Optional[dict] = None
+ users: Optional[list] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class TwitterUserNode(ActionNode):
+ type = "twitterUser"
+ display_name = "Twitter User"
+ subtitle = "User Profiles"
+ icon = "asset:x"
+ color = "#1DA1F2"
+ group = ("social", "tool")
+ description = "Look up Twitter/X user profiles, followers, and following"
+ 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": True, "open_world": True}
+ task_queue = TaskQueue.REST_API
+ usable_as_tool = True
+
+ Params = TwitterUserParams
+ Output = TwitterUserOutput
+
+ @Operation("lookup", cost={"service": "twitter", "action": "user_lookup", "count": 1})
+ async def lookup(self, ctx: NodeContext, params: TwitterUserParams) -> Any:
+ from services.handlers.twitter import handle_twitter_user
+ response = await handle_twitter_user(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "Twitter user lookup failed")
diff --git a/server/nodes/whatsapp/whatsapp_db.py b/server/nodes/whatsapp/whatsapp_db.py
new file mode 100644
index 00000000..17d1335b
--- /dev/null
+++ b/server/nodes/whatsapp/whatsapp_db.py
@@ -0,0 +1,79 @@
+"""WhatsApp DB — Wave 11.C migration.
+
+Dual-purpose ActionNode + AI tool. 18-operation query interface to the
+WhatsApp database (chat history, contacts, groups, channels, …).
+Operation matrix is large; legacy handler dispatches all of it.
+"""
+
+from __future__ import annotations
+
+from typing import Any, Dict, Literal, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class WhatsAppDbParams(BaseModel):
+ operation: Literal[
+ "chat_history", "search_groups", "get_group_info",
+ "get_contact_info", "list_contacts", "check_contacts",
+ "list_channels", "get_channel_info", "channel_messages",
+ "channel_stats", "channel_follow", "channel_unfollow",
+ "channel_create", "channel_mute", "channel_mark_viewed",
+ "newsletter_react", "newsletter_live_updates",
+ "contact_profile_pic",
+ ] = "chat_history"
+ chat_id: str = Field(default="", alias="chatId")
+ group_id: str = Field(default="", alias="groupId")
+ phone_number: str = Field(default="", alias="phoneNumber")
+ limit: int = Field(default=20, ge=1, le=500)
+ offset: int = Field(default=0, ge=0)
+ include_media_data: bool = Field(default=False, alias="includeMediaData")
+
+ model_config = ConfigDict(populate_by_name=True, extra="allow")
+
+
+class WhatsAppDbOutput(BaseModel):
+ operation: Optional[str] = None
+ messages: Optional[list] = None
+ contacts: Optional[list] = None
+ groups: Optional[list] = None
+ channels: Optional[list] = None
+ total: Optional[int] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class WhatsAppDbNode(ActionNode):
+ type = "whatsappDb"
+ display_name = "WhatsApp DB"
+ subtitle = "Query DB"
+ icon = "asset:whatsapp-db"
+ color = "#25D366"
+ group = ("whatsapp", "tool")
+ description = "Query WhatsApp database (chat history, contacts, groups, channels)"
+ 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": True, "open_world": True}
+ task_queue = TaskQueue.MESSAGING
+ usable_as_tool = True
+
+ Params = WhatsAppDbParams
+ Output = WhatsAppDbOutput
+
+ @Operation("query", cost={"service": "whatsapp", "action": "db_query", "count": 1})
+ async def query(self, ctx: NodeContext, params: WhatsAppDbParams) -> Any:
+ from services.handlers.whatsapp import handle_whatsapp_db
+ response = await handle_whatsapp_db(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "WhatsApp DB query failed")
diff --git a/server/nodes/whatsapp/whatsapp_send.py b/server/nodes/whatsapp/whatsapp_send.py
new file mode 100644
index 00000000..facebbb2
--- /dev/null
+++ b/server/nodes/whatsapp/whatsapp_send.py
@@ -0,0 +1,79 @@
+"""WhatsApp Send — Wave 11.C migration.
+
+Dual-purpose ActionNode + AI tool. Sends text / media / location /
+contact / sticker via the whatsapp-rpc bridge. Delegates to the
+existing handler — recipient/message-type matrix is already encoded
+there with full media + newsletter-channel support.
+"""
+
+from __future__ import annotations
+
+from typing import Any, Dict, Literal, Optional
+
+from pydantic import BaseModel, ConfigDict, Field
+
+from services.plugin import ActionNode, NodeContext, Operation, TaskQueue
+
+
+class WhatsAppSendParams(BaseModel):
+ recipient_type: Literal["self", "phone", "group", "channel"] = Field(
+ default="phone", alias="recipientType",
+ )
+ phone_number: str = Field(default="", alias="phoneNumber")
+ group_id: str = Field(default="", alias="groupId")
+ channel_jid: str = Field(default="", alias="channelJid")
+ message_type: Literal[
+ "text", "image", "video", "audio", "document",
+ "sticker", "location", "contact",
+ ] = Field(default="text", alias="messageType")
+ text: str = Field(default="")
+ media_url: str = Field(default="", alias="mediaUrl")
+ caption: str = Field(default="")
+ latitude: Optional[float] = None
+ longitude: Optional[float] = None
+ contact_name: str = Field(default="", alias="contactName")
+ contact_phone: str = Field(default="", alias="contactPhone")
+ format_markdown: bool = Field(default=True, alias="formatMarkdown")
+
+ model_config = ConfigDict(populate_by_name=True, extra="allow")
+
+
+class WhatsAppSendOutput(BaseModel):
+ message_id: Optional[str] = None
+ sent: Optional[bool] = None
+
+ model_config = ConfigDict(extra="allow")
+
+
+class WhatsAppSendNode(ActionNode):
+ type = "whatsappSend"
+ display_name = "WhatsApp Send"
+ subtitle = "Send Message"
+ icon = "asset:whatsapp-send"
+ color = "#25D366"
+ group = ("whatsapp", "tool")
+ description = "Send WhatsApp messages (text, media, location, contact, sticker)"
+ 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.MESSAGING
+ usable_as_tool = True
+
+ Params = WhatsAppSendParams
+ Output = WhatsAppSendOutput
+
+ @Operation("send", cost={"service": "whatsapp", "action": "send", "count": 1})
+ async def send(self, ctx: NodeContext, params: WhatsAppSendParams) -> Any:
+ from services.handlers.whatsapp import handle_whatsapp_send
+ response = await handle_whatsapp_send(
+ node_id=ctx.node_id, node_type=self.type,
+ parameters=params.model_dump(by_alias=True), context=ctx.raw,
+ )
+ if response.get("success"):
+ return response.get("result") or response
+ raise RuntimeError(response.get("error") or "WhatsApp send failed")
diff --git a/server/services/handlers/tools.py b/server/services/handlers/tools.py
index 682f27e1..94df0095 100644
--- a/server/services/handlers/tools.py
+++ b/server/services/handlers/tools.py
@@ -159,43 +159,12 @@ async def execute_tool(tool_name: str, tool_args: Dict[str, Any],
context={}
)
- # WhatsApp send (existing node used as tool)
- if node_type == 'whatsappSend':
- return await _execute_whatsapp_send(tool_args, config.get('parameters', {}))
-
- # WhatsApp DB (existing node used as tool) - query contacts, groups, messages
- if node_type == 'whatsappDb':
- return await _execute_whatsapp_db(tool_args, config.get('parameters', {}))
-
- # Twitter Send (dual-purpose: workflow node + AI tool)
- if node_type == 'twitterSend':
- return await _execute_twitter_send(tool_args, config.get('parameters', {}))
-
- # Twitter Search (dual-purpose: workflow node + AI tool)
- if node_type == 'twitterSearch':
- return await _execute_twitter_search(tool_args, config.get('parameters', {}))
-
- # Twitter User (dual-purpose: workflow node + AI tool)
- if node_type == 'twitterUser':
- return await _execute_twitter_user(tool_args, config.get('parameters', {}))
-
- # ========================================================================
- # GOOGLE WORKSPACE TOOLS (consolidated: gmail, calendar, drive, sheets, tasks, contacts)
- # ========================================================================
-
- # gmail: migrated to plugin (Wave 11.B). Handled by fast-path above.
- if node_type == 'calendar':
- return await _execute_google_calendar(tool_args, config.get('parameters', {}))
- if node_type == 'drive':
- return await _execute_google_drive(tool_args, config.get('parameters', {}))
- if node_type == 'sheets':
- return await _execute_google_sheets(tool_args, config.get('parameters', {}))
- if node_type == 'tasks':
- return await _execute_google_tasks(tool_args, config.get('parameters', {}))
- if node_type == 'contacts':
- return await _execute_google_contacts(tool_args, config.get('parameters', {}))
-
- # Android toolkit - routes to connected service nodes
+ # WhatsApp / Twitter / Google Workspace / Search / Maps tool branches
+ # all migrated to plugin classes — routed via the Wave 11.B.1 fast-path
+ # at the top of execute_tool. Branches below kept only for the few
+ # tool types still on the legacy path:
+
+ # androidTool (toolkit aggregator): kept until 11.D.
if node_type == 'androidTool':
return await _execute_android_toolkit(tool_args, config)
@@ -203,22 +172,6 @@ async def execute_tool(tool_name: str, tool_args: Dict[str, Any],
if node_type in ANDROID_SERVICE_NODE_TYPES:
return await _execute_android_service(tool_args, config)
- # braveSearch: migrated to plugin (Wave 11.B). Handled by fast-path above.
-
- # Serper Search (dual-purpose: workflow node + AI tool)
- if node_type == 'serperSearch':
- return await _execute_serper_search_tool(tool_args, config.get('parameters', {}))
-
- # perplexitySearch: migrated to plugin (Wave 11.C). Handled by fast-path above.
-
- # Google Maps Geocoding (gmaps_locations node as tool)
- if node_type == 'gmaps_locations':
- return await _execute_geocoding(tool_args, config.get('parameters', {}))
-
- # Google Maps Nearby Places (gmaps_nearby_places node as tool)
- if node_type == 'gmaps_nearby_places':
- return await _execute_nearby_places(tool_args, config.get('parameters', {}))
-
# Write Todos (dedicated AI tool for task planning)
if node_type == 'writeTodos':
from services.handlers.todo import execute_write_todos
diff --git a/server/services/node_executor.py b/server/services/node_executor.py
index b39ba6f5..bfa89159 100644
--- a/server/services/node_executor.py
+++ b/server/services/node_executor.py
@@ -144,43 +144,19 @@ class NodeExecutor:
# AI agents — all migrated to nodes/agent/*.py (Wave 11.C).
# Plugin handlers win via registry.update(_PLUGIN_HANDLERS) merge below.
# 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),
- 'gmaps_nearby_places': partial(handle_nearby_places, maps_service=self.maps_service),
+ # Maps — all 3 migrated to nodes/location/*.py (Wave 11.C).
# Text
'textGenerator': partial(handle_text_generator, text_service=self.text_service),
'fileHandler': partial(handle_file_handler, text_service=self.text_service),
- # WhatsApp
- 'whatsappSend': handle_whatsapp_send,
- 'whatsappDb': handle_whatsapp_db,
- # Telegram (telegramReceive routed via generic handle_trigger_node)
- # telegramSend: migrated to nodes/telegram/telegram_send.py (Wave 11.C). Plugin handler wins via merge.
- # Email (Himalaya CLI)
- 'emailSend': handle_email_send,
- 'emailRead': handle_email_read,
- 'emailReceive': handle_email_receive,
- # Twitter/X
- 'twitterSend': handle_twitter_send,
- 'twitterSearch': handle_twitter_search,
- 'twitterUser': handle_twitter_user,
- # Google Workspace (consolidated with operation dispatchers)
- # gmail: migrated to nodes/gmail.py (Wave 11.B). Plugin handler wins via registry.update.
- # gmailReceive: migrated to nodes/google/gmail_receive.py (Wave 11.B). Plugin handler wins.
- 'calendar': handle_google_calendar,
- 'drive': handle_google_drive,
- 'sheets': handle_google_sheets,
- 'tasks': handle_google_tasks,
- 'contacts': handle_google_contacts,
- # Search — braveSearch migrated to nodes/brave_search.py (Wave 11.B)
- 'serperSearch': handle_serper_search,
- # perplexitySearch: migrated to nodes/search/perplexity_search.py (Wave 11.C). Plugin handler wins.
+ # WhatsApp / Telegram / Twitter / Email send+read — all migrated to
+ # nodes/{whatsapp,telegram,twitter,email}/*.py (Wave 11.C).
+ 'emailReceive': handle_email_receive, # polling trigger, deferred
+ # Google Workspace — all 7 migrated to nodes/google/*.py (Wave 11.B/C).
+ # Search — all 3 migrated to nodes/search/*.py (Wave 11.B/C).
# Social (unified messaging)
# Note: socialReceive handled in _dispatch with connected_outputs
# socialSend: migrated to nodes/social/social_send.py (Wave 11.C).
- # Chat
- 'chatSend': handle_chat_send,
- 'chatHistory': handle_chat_history,
+ # Chat — chatSend / chatHistory migrated to nodes/chat/*.py (Wave 11.C).
# HTTP
'httpRequest': handle_http_request,
# Document processing