Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
feat: enable direct Android agent tools
trohitg40b1170635e5
diff --git a/client/src/Dashboard.tsx b/client/src/Dashboard.tsxindex 30358b82..8da1035b 100644--- a/client/src/Dashboard.tsx+++ b/client/src/Dashboard.tsx@@ -768,10 +768,6 @@ const DashboardContent: React.FC = () => {sourceHandle: e.sourceHandle,targetHandle: e.targetHandle})),- // Check for toolkit connections specifically- toolkitEdges: edges.filter(e =>- e.target?.includes('androidTool') || e.source?.includes('androidTool')- )});const result = await deployWorkflow(currentWorkflow.id, nodes, edges, 'default');diff --git a/client/src/adapters/__tests__/nodeSpecToDescription.test.ts b/client/src/adapters/__tests__/nodeSpecToDescription.test.tsindex 32564485..984a6dae 100644--- a/client/src/adapters/__tests__/nodeSpecToDescription.test.ts+++ b/client/src/adapters/__tests__/nodeSpecToDescription.test.ts@@ -44,7 +44,7 @@ describe('nodeSpecToDescription contract', () => {subtitle: 'A node with everything',description: 'Covers every adapter codepath.',credentials: ['openai', 'anthropic'],- uiHints: { hasSkills: true, isToolPanel: false },+ uiHints: { hasSkills: true },color: '#bd93f9',componentKind: 'tool',hideOutputHandle: false,diff --git a/client/src/components/ToolkitNode.tsx b/client/src/components/ToolkitNode.tsxindex a7c284c5..06780e03 100644--- a/client/src/components/ToolkitNode.tsx+++ b/client/src/components/ToolkitNode.tsx@@ -1,13 +1,10 @@/**- * ToolkitNode - A node component for skill nodes and toolkit nodes with vertical handle layout.+ * ToolkitNode - A node component for skill nodes with vertical handle layout.** Skill nodes (whatsappSkill, memorySkill, etc.): Square (60x60px)* - Output handle at TOP (connects to agent's skill input)* - No input handle (passive nodes)*- * Toolkit nodes (androidTool): Rectangular (100x60px)- * - Output handle at TOP (connects to AI Agent's tool input)- * - Input handle at BOTTOM (receives Android service nodes)*/import React, { memo, useCallback } from 'react';@@ -22,9 +19,6 @@ import { useAppTheme } from '../hooks/useAppTheme';import { useWebSocket } from '../contexts/WebSocketContext';import EditableNodeLabel from './ui/EditableNodeLabel';-// Toolkit node types that render rectangular (wider than tall)-const TOOLKIT_NODE_TYPES = ['androidTool'];-const ToolkitNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectable, selected }) => {const theme = useAppTheme();const setSelectedNode = useAppStore((s) => s.setSelectedNode);@@ -39,9 +33,6 @@ const ToolkitNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnecta// Wave 6 Phase 3e: backend NodeSpec -> legacy fallbackconst definition = resolveNodeDescription(type || '');- // Check if this is a toolkit node (rectangular) vs skill node (square)- const isToolkitNode = type ? TOOLKIT_NODE_TYPES.includes(type) : false;-// Execution stateconst isExecuting = executionStatus === 'executing' || executionStatus === 'waiting';@@ -99,14 +90,13 @@ const ToolkitNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectacursor: 'pointer',} as NodeStyle}>- {/* Main Node - rectangular for toolkit, square for skills.- Layout only; visuals live in CSS. */}+ {/* Main Node. Layout only; visuals live in CSS. */}<divclassName="sq-node-box"style={{position: 'relative',- width: isToolkitNode ? theme.nodeSize.toolkitWidth : theme.nodeSize.square,- height: isToolkitNode ? theme.nodeSize.toolkitHeight : theme.nodeSize.square,+ width: theme.nodeSize.square,+ height: theme.nodeSize.square,display: 'flex',alignItems: 'center',justifyContent: 'center',@@ -137,7 +127,7 @@ const ToolkitNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectatransition: theme.transitions.fast,zIndex: 30,}}- title="Edit Toolkit Parameters"+ title="Edit Skill Parameters">⚙️</button>@@ -154,10 +144,10 @@ const ToolkitNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectaheight: theme.nodeSize.statusIndicator,zIndex: 30,}}- title={isExecuting ? 'Executing...' : 'Toolkit ready'}+ title={isExecuting ? 'Executing...' : 'Skill ready'}/>- {/* TOP Output Handle - connects to AI Agent's tool/skill input */}+ {/* TOP Output Handle - connects to an agent's skill input */}<Handleid="output-main"type="source"@@ -173,30 +163,9 @@ const ToolkitNode: React.FC<NodeProps<NodeData>> = ({ id, type, data, isConnectaheight: theme.nodeSize.handle,zIndex: 20,}}- title={isToolkitNode ? "Connect to AI Agent's tool input" : "Connect to agent's skill input"}+ title="Connect to agent's skill input"/>- {/* BOTTOM Input Handle - only for toolkit nodes (receives Android service nodes) */}- {isToolkitNode && (- <Handle- id="input-services"- type="target"- position={Position.Bottom}- isConnectable={isConnectable}- className="sq-node-handle in"- style={{- position: 'absolute',- bottom: '-6px',- left: '50%',- transform: 'translateX(-50%)',- width: theme.nodeSize.handle,- height: theme.nodeSize.handle,- zIndex: 20,- }}- title="Connect Android service nodes"- />- )}-{/* Output Data Indicator (bespoke; keeps inline style) */}{executionStatus === 'success' && nodeStatus?.data && (<divdiff --git a/client/src/components/__tests__/CredentialsModal.test.tsx b/client/src/components/__tests__/CredentialsModal.test.tsxindex 4fcb6a94..64814eec 100644--- a/client/src/components/__tests__/CredentialsModal.test.tsx+++ b/client/src/components/__tests__/CredentialsModal.test.tsx@@ -103,7 +103,6 @@ vi.mock('../../contexts/WebSocketContext', () => ({device_name: null,connected_devices: [],qr_data: null,- session_token: null,}),useTwitterStatus: () => ({connected: false,diff --git a/client/src/components/credentials/panels/QrPairingPanel.tsx b/client/src/components/credentials/panels/QrPairingPanel.tsxindex c34f0402..2adc0188 100644--- a/client/src/components/credentials/panels/QrPairingPanel.tsx+++ b/client/src/components/credentials/panels/QrPairingPanel.tsx@@ -37,7 +37,7 @@ const QrPairingPanel: React.FC<{ config: ProviderConfig; visible: boolean }> = (const key = panel.form.getFieldValue('android_remote')?.trim();if (!key) { panel.setError('No API key configured'); return; }const res = await sendRequest('android_relay_connect', { url: (import.meta as any).env?.VITE_ANDROID_RELAY_URL || '', api_key: key });- if (res.qr_data) setAndroidStatus((prev: any) => ({ ...prev, connected: true, paired: false, qr_data: res.qr_data, session_token: res.session_token || prev.session_token }));+ if (res.qr_data) setAndroidStatus((prev: any) => ({ ...prev, connected: true, paired: false, qr_data: res.qr_data }));return res;}),disconnect: () => panel.execute('disconnect', () => sendRequest('android_relay_disconnect', {})),diff --git a/client/src/components/parameterPanel/MiddleSection.tsx b/client/src/components/parameterPanel/MiddleSection.tsxindex 5fcd1777..c0609a38 100644--- a/client/src/components/parameterPanel/MiddleSection.tsx+++ b/client/src/components/parameterPanel/MiddleSection.tsx@@ -27,7 +27,6 @@ import { Zap, Pencil, Sparkles, TerminalSquare, Trash2, RotateCcw } from 'lucideimport { Badge } from '@/components/ui/badge';import { ActionButton } from '@/components/ui/action-button';import ParameterRenderer from '../ParameterRenderer';-import ToolSchemaEditor from './ToolSchemaEditor';import MasterSkillEditor from './MasterSkillEditor';import TodoEditor from './TodoEditor';import { useAppStore } from '../../store/useAppStore';@@ -51,7 +50,7 @@ const isMasterSkillNodeType = (nodeType: string | undefined): boolean => {};// Wave 10.G.3: retired the three tribal arrays `SKILL_NODE_TYPES`,// `TOOL_NODE_TYPES`, and `AGENT_WITH_SKILLS_TYPES`. The parameter panel-// now reads `uiHints.hasSkills` / `uiHints.isToolPanel` /+// now reads `uiHints.hasSkills` /// `uiHints.isMasterSkillEditor` / `uiHints.isMemoryPanel` directly from// the NodeSpec each plugin module declares.@@ -183,7 +182,6 @@ const MiddleSection: React.FC<MiddleSectionProps> = ({// members other than masterSkill; that set was empty after Wave 10, so// it's now permanently dead.const isSkillNode = false;- const isToolNode = hints.isToolPanel === true;const isTodoEditorNode = hints.isTodoEditor === true;const isAgentWithSkills = hints.hasSkills === true;@@ -595,15 +593,6 @@ const MiddleSection: React.FC<MiddleSectionProps> = ({);})}- {/* Tool Schema Editor - Only for tool nodes */}- {isToolNode && (- <ToolSchemaEditor- nodeId={nodeId}- toolName={parameters.tool_name || nodeDefinition.name}- toolDescription={parameters.tool_description || nodeDefinition.description || ''}- />- )}-{/* Clear Memory Button - Only for memory nodes */}{isMemoryNode && (<div className="mt-3 flex justify-end border-t border-border-default pt-3">diff --git a/client/src/components/parameterPanel/ToolSchemaEditor.tsx b/client/src/components/parameterPanel/ToolSchemaEditor.tsxdeleted file mode 100644index c3f3b5cf..00000000--- a/client/src/components/parameterPanel/ToolSchemaEditor.tsx+++ /dev/null@@ -1,424 +0,0 @@-/**- * ToolSchemaEditor - Schema editor for the Android Toolkit node.- *- * Lets the user customise the LLM-visible schema (description + fields)- * for each connected Android service node. The form runs on RHF + zod- * so per-field validation, dirty tracking, and the dynamic add/remove- * row workflow come from the library instead of hand-rolled state.- */--import React, { useEffect, useMemo, useState } from 'react';-import { Node } from 'reactflow';-import { useForm, useFieldArray, useFormContext } from 'react-hook-form';-import { zodResolver } from '@hookform/resolvers/zod';-import { z } from 'zod';-import { ChevronDown } from 'lucide-react';-import { cn } from '@/lib/utils';-import { useToolSchema, ToolSchemaConfig } from '../../hooks/useToolSchema';-import { useWebSocket } from '../../contexts/WebSocketContext';-import { useAppStore } from '../../store/useAppStore';-import { isNodeInBackendGroup } from '../../lib/nodeSpec';-import {- Form,- FormControl,- FormField,- FormItem,- FormMessage,-} from '@/components/ui/form';-import { Input } from '@/components/ui/input';-import {- Select,- SelectContent,- SelectItem,- SelectTrigger,- SelectValue,-} from '@/components/ui/select';-import { ActionButton } from '@/components/ui/action-button';-import { Checkbox } from '@/components/ui/checkbox';--import { resolveNodeDescription } from '../../lib/nodeSpec';-interface ToolSchemaEditorProps {- nodeId: string;- toolName: string;- toolDescription: string;-}--// ----------------------------------------------------------------------------// Schema (one source of truth for type, defaults, validation).-// -----------------------------------------------------------------------------const FIELD_TYPES = ['string', 'number', 'integer', 'boolean', 'object', 'array'] as const;--const schemaFieldSchema = z.object({- name: z- .string()- .min(1, 'Required')- .regex(/^[a-zA-Z_][a-zA-Z0-9_]*$/, 'Letters / digits / underscore only'),- type: z.enum(FIELD_TYPES),- description: z.string().default(''),- required: z.boolean().default(false),-});-type SchemaField = z.infer<typeof schemaFieldSchema>;--const toolSchemaFormSchema = z.object({- description: z.string().default(''),- fields: z.array(schemaFieldSchema),-});-type ToolSchemaFormValues = z.infer<typeof toolSchemaFormSchema>;--// Default schema for androidTool (matches the legacy DEFAULT_SCHEMA).-const DEFAULT_FORM_VALUES: ToolSchemaFormValues = {- description: 'Control Android device via connected services',- fields: [- { name: 'service_id', type: 'string',- description: 'Service to use (determined by connected Android nodes)',- required: true },- { name: 'action', type: 'string',- description: 'Action to perform (see service list for available actions)',- required: true },- { name: 'parameters', type: 'object',- description: 'Action parameters. Examples: {package_name: "com.app"} for app_launcher',- required: false },- ],-};--function defaultFormForService(service: Node | null): ToolSchemaFormValues {- if (!service) return DEFAULT_FORM_VALUES;- const serviceName = service.data?.label || service.type || 'service';- return {- description: `Control ${serviceName} on Android device`,- fields: [- { name: 'action', type: 'string',- description: `Action to perform on ${serviceName}`, required: true },- { name: 'parameters', type: 'object',- description: `Parameters for the ${serviceName} action`, required: false },- ],- };-}--function configToFormValues(cfg: ToolSchemaConfig): ToolSchemaFormValues {- return {- description: cfg.description ?? '',- fields: Object.entries(cfg.fields ?? {}).map(([name, c]) => ({- name,- type: (FIELD_TYPES as readonly string[]).includes(c.type as string)- ? (c.type as SchemaField['type'])- : 'string',- description: c.description ?? '',- required: !!c.required,- })),- };-}--function formValuesToConfig(values: ToolSchemaFormValues): ToolSchemaConfig {- const fields: ToolSchemaConfig['fields'] = {};- for (const f of values.fields) {- fields[f.name] = { type: f.type, description: f.description, required: f.required };- }- return { description: values.description, fields };-}--// ----------------------------------------------------------------------------// Editor-// -----------------------------------------------------------------------------// Outer component is the gate: it only calls the hooks needed to decide-// whether the editor should render at all. The full hook surface (form,-// effects, field array) lives in <ToolSchemaEditorBody/> so React's-// rules-of-hooks invariants hold whether the gate is open or closed.-const ToolSchemaEditor: React.FC<ToolSchemaEditorProps> = ({ nodeId, toolName, toolDescription }) => {- const currentWorkflow = useAppStore((s) => s.currentWorkflow);-- const currentNode = useMemo(() => {- if (!currentWorkflow?.nodes) return null;- return currentWorkflow.nodes.find((n) => n.id === nodeId);- }, [currentWorkflow?.nodes, nodeId]);-- // Wave 10.G.5: render only for nodes whose spec declares- // `uiHints.isAndroidToolkit`. The androidTool node registers that- // hint; no frontend type-string fallback.- const currentNodeDef = currentNode?.type ? resolveNodeDescription(currentNode.type) : undefined;- const isAndroidTool = (currentNodeDef?.uiHints as any)?.isAndroidToolkit === true;- if (!isAndroidTool) return null;-- return <ToolSchemaEditorBody nodeId={nodeId} toolName={toolName} toolDescription={toolDescription} />;-};--const ToolSchemaEditorBody: React.FC<ToolSchemaEditorProps> = ({ nodeId }) => {- const { getToolSchema, saveToolSchema, deleteToolSchema, isLoading } = useToolSchema();- const { isConnected } = useWebSocket();- const currentWorkflow = useAppStore((s) => s.currentWorkflow);-- const connectedServices = useMemo(() => {- if (!currentWorkflow?.edges || !currentWorkflow?.nodes) return [];- const incomingEdges = currentWorkflow.edges.filter((edge) => edge.target === nodeId);- const services: Node[] = [];- for (const edge of incomingEdges) {- const sourceNode = currentWorkflow.nodes.find((n) => n.id === edge.source);- // Wave 10.G.5: backend `group` membership only. NodeSpec prefetch- // runs on WS connect, so the cache is always warm by the time the- // parameter panel mounts.- const isAndroid = sourceNode- ? (isNodeInBackendGroup(sourceNode.type, 'android') === true)- : false;- if (sourceNode && isAndroid) {- services.push(sourceNode);- }- }- return services;- }, [currentWorkflow?.edges, currentWorkflow?.nodes, nodeId]);-- const [selectedServiceId, setSelectedServiceId] = useState<string | null>(null);- const [isExpanded, setIsExpanded] = useState(true);- const [saveStatus, setSaveStatus] = useState<'idle' | 'saving' | 'saved' | 'error'>('idle');-- // Auto-select the first connected service; reset if the current selection- // is no longer connected.- useEffect(() => {- if (connectedServices.length === 0) {- setSelectedServiceId(null);- return;- }- if (!selectedServiceId || !connectedServices.find((s) => s.id === selectedServiceId)) {- setSelectedServiceId(connectedServices[0].id);- }- }, [connectedServices, selectedServiceId]);-- const selectedService = useMemo(- () => connectedServices.find((s) => s.id === selectedServiceId) ?? null,- [connectedServices, selectedServiceId],- );-- const form = useForm({- resolver: zodResolver(toolSchemaFormSchema),- defaultValues: DEFAULT_FORM_VALUES,- mode: 'onChange',- });- const { fields, append, remove } = useFieldArray({ control: form.control, name: 'fields' });-- // Reload form whenever the selected service changes.- useEffect(() => {- let cancelled = false;- const load = async () => {- if (!isConnected || !selectedServiceId) {- form.reset(DEFAULT_FORM_VALUES);- return;- }- const stored = await getToolSchema(selectedServiceId);- if (cancelled) return;- if (stored?.schema_config && Object.keys(stored.schema_config.fields || {}).length > 0) {- form.reset(configToFormValues(stored.schema_config));- } else {- form.reset(defaultFormForService(selectedService));- }- };- void load();- return () => {- cancelled = true;- };- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [selectedServiceId, isConnected]);-- const onSubmit = async (values: ToolSchemaFormValues) => {- if (!selectedServiceId || !selectedService) return;- setSaveStatus('saving');- const serviceName = selectedService.data?.label || selectedService.type || 'unknown';- const config = formValuesToConfig(values);- const ok = await saveToolSchema(selectedServiceId, serviceName, config.description, config);- setSaveStatus(ok ? 'saved' : 'error');- if (ok) form.reset(values); // clears dirty state without losing values- setTimeout(() => setSaveStatus('idle'), 2000);- };-- const handleReset = async () => {- if (!selectedServiceId) return;- await deleteToolSchema(selectedServiceId);- form.reset(defaultFormForService(selectedService));- };-- const hasChanges = form.formState.isDirty;-- return (- <div className="overflow-hidden rounded-md border border-border bg-background">- <div- onClick={() => setIsExpanded(!isExpanded)}- className={cn(- 'flex cursor-pointer items-center justify-between bg-muted p-3',- isExpanded && 'border-b border-border'- )}- >- <div className="flex items-center gap-2">- <ChevronDown- className={cn(- 'h-3 w-3 text-muted-foreground transition-transform',- !isExpanded && '-rotate-90'- )}- />- <span className="font-display tracking-[var(--type-tracking-display)] [text-transform:var(--type-uppercase)] text-sm font-semibold text-fg-default">Connected Services</span>- </div>- <span className="text-sm text-muted-foreground">- {connectedServices.length} service(s)- </span>- </div>-- {isExpanded && (- <Form {...form}>- <form onSubmit={form.handleSubmit(onSubmit)} className="p-3">- {connectedServices.length > 0 ? (- <div className="mb-3">- <label className="mb-1 block text-sm text-muted-foreground">Select Service</label>- <Select- value={selectedServiceId ?? undefined}- onValueChange={(v) => setSelectedServiceId(v)}- >- <SelectTrigger className="w-full">- <SelectValue placeholder="Choose a connected service" />- </SelectTrigger>- <SelectContent>- {connectedServices.map((service) => (- <SelectItem key={service.id} value={service.id}>- {service.data?.label || service.type}- </SelectItem>- ))}- </SelectContent>- </Select>- {selectedService && (- <div className="mt-1 text-xs text-muted-foreground">- Type: {selectedService.type}- </div>- )}- </div>- ) : (- <div className="mb-3 rounded border border-warning/30 bg-warning/10 p-2 text-sm text-warning">- Connect Android nodes to the input handle- </div>- )}-- <div className="mb-2 flex items-center justify-between">- <label className="font-display tracking-[var(--type-tracking-display)] [text-transform:var(--type-uppercase)] text-sm text-fg-muted">Schema Fields</label>- <ActionButton- intent="tools"- className="h-7"- onClick={() =>- append({- name: `field_${fields.length + 1}`,- type: 'string',- description: '',- required: false,- })- }- >- + Add- </ActionButton>- </div>-- <div className="flex flex-col gap-1">- {fields.map((field, index) => (- <FieldRow key={field.id} index={index} onRemove={() => remove(index)} />- ))}- </div>-- {hasChanges && (- <div className="mt-3 flex justify-end gap-2">- <ActionButton intent="config" type="button" onClick={handleReset}>- Reset- </ActionButton>- <ActionButton- intent="save"- type="submit"- disabled={isLoading || saveStatus === 'saving'}- >- {saveStatus === 'saving' ? 'Saving...' : saveStatus === 'saved' ? 'Saved!' : 'Save'}- </ActionButton>- </div>- )}- </form>- </Form>- )}- </div>- );-};--// ----------------------------------------------------------------------------// Field row — connected to RHF via parent <Form/>; uses useFormContext.-// -----------------------------------------------------------------------------const FieldRow: React.FC<{ index: number; onRemove: () => void }> = ({ index, onRemove }) => {- const { control } = useFormContext<ToolSchemaFormValues>();- return (- <div className="rounded border border-border bg-card p-2">- <div className="mb-1 flex items-center gap-1">- <FormField- control={control}- name={`fields.${index}.name`}- render={({ field }) => (- <FormItem className="flex-1">- <FormControl>- <Input- {...field}- className="h-8"- onChange={(e) => field.onChange(e.target.value.replace(/\s/g, '_'))}- />- </FormControl>- <FormMessage />- </FormItem>- )}- />- <FormField- control={control}- name={`fields.${index}.type`}- render={({ field }) => (- <FormItem>- <Select onValueChange={field.onChange} value={field.value}>- <FormControl>- <SelectTrigger className="h-8 w-[110px] text-xs">- <SelectValue />- </SelectTrigger>- </FormControl>- <SelectContent>- {FIELD_TYPES.map((t) => (- <SelectItem key={t} value={t}>- {t}- </SelectItem>- ))}- </SelectContent>- </Select>- </FormItem>- )}- />- <FormField- control={control}- name={`fields.${index}.required`}- render={({ field }) => (- <FormItem className="flex items-center gap-1 space-y-0 px-1 text-xs text-muted-foreground">- <FormControl>- <Checkbox checked={field.value} onCheckedChange={field.onChange} />- </FormControl>- <span>Req</span>- </FormItem>- )}- />- <ActionButton- intent="stop"- onClick={onRemove}- className="h-7 px-2 text-xs"- >- X- </ActionButton>- </div>- <FormField- control={control}- name={`fields.${index}.description`}- render={({ field }) => (- <FormItem>- <FormControl>- <Input {...field} placeholder="Description..." className="h-7 text-xs" />- </FormControl>- </FormItem>- )}- />- </div>- );-};--export default ToolSchemaEditor;diff --git a/client/src/components/parameterPanel/__tests__/MiddleSection.test.tsx b/client/src/components/parameterPanel/__tests__/MiddleSection.test.tsxindex b7edad39..5c79e8b5 100644--- a/client/src/components/parameterPanel/__tests__/MiddleSection.test.tsx+++ b/client/src/components/parameterPanel/__tests__/MiddleSection.test.tsx@@ -4,7 +4,7 @@* The original inline `shouldShowParameter` function lived inside MiddleSection.tsx* and could not be tested directly without mounting the entire panel (which OOMs* jsdom because of the deep transitive dependency tree -- antd, prismjs,- * MasterSkillEditor, ToolSchemaEditor, reactflow types, etc.).+ * MasterSkillEditor, reactflow types, etc.).** The function is pure -- given a parameter definition and the current values of* all parameters, it returns whether the parameter should render. Locks indiff --git a/client/src/contexts/WebSocketContext.tsx b/client/src/contexts/WebSocketContext.tsxindex 315ec70d..d281dff4 100644--- a/client/src/contexts/WebSocketContext.tsx+++ b/client/src/contexts/WebSocketContext.tsx@@ -79,7 +79,6 @@ export interface AndroidStatus {connected_devices: string[];connection_type: string | null;qr_data: string | null;- session_token: string | null;}export interface NodeStatus {@@ -398,8 +397,7 @@ const defaultAndroidStatus: AndroidStatus = {device_name: null,connected_devices: [],connection_type: null,- qr_data: null,- session_token: null+ qr_data: null};const defaultWorkflowStatus: WorkflowStatus = {diff --git a/client/src/hooks/useNodeAllowlist.ts b/client/src/hooks/useNodeAllowlist.tsindex a8090b1a..1cbabe5c 100644--- a/client/src/hooks/useNodeAllowlist.ts+++ b/client/src/hooks/useNodeAllowlist.ts@@ -5,7 +5,7 @@ interface NodeAllowlistResponse {show_all: boolean;enabled_nodes: string[];/** Mode-independent blocklist by backend group (e.g. 'android' hides- * every plugin in the android group + androidTool). Empty array if+ * every plugin in the android group). Empty array if* the backend doesn't ship the field (older deployments). */disabled_groups: string[];/** Mode-independent blocklist by exact node type. Use for one-offdiff --git a/client/src/styles/theme.ts b/client/src/styles/theme.tsindex 3bc19e33..76914b77 100644--- a/client/src/styles/theme.ts+++ b/client/src/styles/theme.ts@@ -274,8 +274,6 @@ export const theme = {nodeSize: {square: '64px', // SquareNode (design-system spec: 64px box)squareIcon: '28px', // Icon inside square node (≈ 0.44 × box)- toolkitWidth: '120px', // ToolkitNode width (rectangular, wider)- toolkitHeight: '50px', // ToolkitNode height (shorter)handle: '8px', // Connection handlesstatusIndicator: '10px', // Status dotparamButton: '16px', // Parameters gear buttondiff --git a/client/src/types/INodeProperties.ts b/client/src/types/INodeProperties.tsindex dd813475..fc7b7571 100644--- a/client/src/types/INodeProperties.ts+++ b/client/src/types/INodeProperties.ts@@ -199,8 +199,6 @@ export interface INodeUIHints {isMasterSkillEditor?: boolean;/** MiddleSection: render the memory markdown panel + token usage stats. */isMemoryPanel?: boolean;- /** MiddleSection: surface the ToolSchemaEditor for connected services. */- isToolPanel?: boolean;/** MiddleSection: render the editable Current Todos manager (writeTodos)* instead of the plain params list. */isTodoEditor?: boolean;@@ -208,8 +206,6 @@ export interface INodeUIHints {isMonitorPanel?: boolean;/** Special-case panel for gmaps_create with map preview. */showLocationPanel?: boolean;- /** ToolSchemaEditor visibility (Android toolkit aggregator). */- isAndroidToolkit?: boolean;/** ConsolePanel: this node is a chat-message target. */isChatTrigger?: boolean;/** ConsolePanel: this node consumes console output (filter source). */@@ -347,4 +343,4 @@ export function createLocationOutput(latitude: number, longitude: number, additi...additionalData}}];-}\ No newline at end of file+}diff --git a/docs-internal/TEMPORAL_ARCHITECTURE.md b/docs-internal/TEMPORAL_ARCHITECTURE.mdindex cf92011b..0ccd041d 100644--- a/docs-internal/TEMPORAL_ARCHITECTURE.md+++ b/docs-internal/TEMPORAL_ARCHITECTURE.md@@ -442,7 +442,7 @@ TRIGGER_NODE_TYPES = frozenset(["emailReceive",])-# Android service types (connect to androidTool) -- authoritative list+# Android service types (connect directly to agent input-tools) -- authoritative list# in server/constants.py ANDROID_SERVICE_NODE_TYPES (16 entries since# Wave 11.I).```diff --git a/docs-internal/agent_architecture.md b/docs-internal/agent_architecture.mdindex 649a25f8..b3e0377c 100644--- a/docs-internal/agent_architecture.md+++ b/docs-internal/agent_architecture.md@@ -334,7 +334,7 @@ Patterns covered in the canonical doc:- DEFAULT_TOOL_NAMES map (node_type → LLM-visible tool name)- Database tool-schema override via ToolSchema model + Tool Schema Editor UI-- Gateway-tool pattern (androidTool aggregates connected service nodes)+- Direct tool pattern (each Android service connects to the agent independently)- Direct Android service tools (16 entries, skip the toolkit)- Agent delegation (`delegate_to_*` fire-and-forget background tasks)- Per-type Temporal activity dispatch (F4.A, when TEMPORAL_PER_TYPE_DISPATCH=true)diff --git a/docs-internal/agent_delegation.md b/docs-internal/agent_delegation.mdindex aec64047..ecda1352 100644--- a/docs-internal/agent_delegation.md+++ b/docs-internal/agent_delegation.md@@ -300,7 +300,7 @@ For each matching edge, it checks the target handle:|--------|--------|| `input-memory` | Loads markdown memory content from child's connected `simpleMemory` node || `input-skill` | Loads skill instructions; expands masterSkill into individual enabled skills |-| `input-tools` | Discovers tool nodes; for androidTool, finds connected Android services |+| `input-tools` | Discovers directly connected tool nodes, including Android services || `input-main` / `input-chat` | Reads upstream node output for auto-prompt fallback || `input-task` | Collects `taskTrigger` output for the conversational task-report pattern |diff --git a/docs-internal/node-logic-flows/ai_agents/aiAgent.md b/docs-internal/node-logic-flows/ai_agents/aiAgent.mdindex ebe4d230..8d29e3dd 100644--- a/docs-internal/node-logic-flows/ai_agents/aiAgent.md+++ b/docs-internal/node-logic-flows/ai_agents/aiAgent.md@@ -96,7 +96,7 @@ flowchart TDone entry per **enabled** skill in `skillsConfig`; instructions come fromthe DB-stored `instructions` first, with a skill-folder fallback.- `input-tools` -> append to `tool_data`. Two special expansions:- - `androidTool` -> scans its own incoming edges for Android service nodes+ - Android service nodes are exposed directly as individual toolsand attaches them under `connected_services`.- Any `AI_AGENT_TYPES` source (child agents) -> attaches `child_tools`describing the child's own `input-tools` neighbours.diff --git a/docs-internal/node-logic-flows/android/airplaneModeControl.md b/docs-internal/node-logic-flows/android/airplaneModeControl.mdindex 2a34ea56..7d1600df 100644--- a/docs-internal/node-logic-flows/android/airplaneModeControl.md+++ b/docs-internal/node-logic-flows/android/airplaneModeControl.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/airplane_mode_control/__init__.py`](../../../server/nodes/android/airplane_mode_control/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | none |-| **Dual-purpose tool** | sub-node of `androidTool`; connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/appLauncher.md b/docs-internal/node-logic-flows/android/appLauncher.mdindex 0c13aa61..a8df72d9 100644--- a/docs-internal/node-logic-flows/android/appLauncher.md+++ b/docs-internal/node-logic-flows/android/appLauncher.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/app_launcher/__init__.py`](../../../server/nodes/android/app_launcher/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | [`server/skills/android_agent/app-launcher-skill/SKILL.md`](../../../server/skills/android_agent/app-launcher-skill/SKILL.md) |-| **Dual-purpose tool** | sub-node of `androidTool`; connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/appList.md b/docs-internal/node-logic-flows/android/appList.mdindex 5bf97111..fcacfb93 100644--- a/docs-internal/node-logic-flows/android/appList.md+++ b/docs-internal/node-logic-flows/android/appList.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/app_list/__init__.py`](../../../server/nodes/android/app_list/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | [`server/skills/android_agent/app-list-skill/SKILL.md`](../../../server/skills/android_agent/app-list-skill/SKILL.md) |-| **Dual-purpose tool** | sub-node of `androidTool`; connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/audioAutomation.md b/docs-internal/node-logic-flows/android/audioAutomation.mdindex a6fcd004..e532ec5c 100644--- a/docs-internal/node-logic-flows/android/audioAutomation.md+++ b/docs-internal/node-logic-flows/android/audioAutomation.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/audio_automation/__init__.py`](../../../server/nodes/android/audio_automation/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | [`server/skills/android_agent/audio-skill/SKILL.md`](../../../server/skills/android_agent/audio-skill/SKILL.md) |-| **Dual-purpose tool** | sub-node of `androidTool`; connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/batteryMonitor.md b/docs-internal/node-logic-flows/android/batteryMonitor.mdindex 5026224b..cea5bbaf 100644--- a/docs-internal/node-logic-flows/android/batteryMonitor.md+++ b/docs-internal/node-logic-flows/android/batteryMonitor.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/battery_monitor/__init__.py`](../../../server/nodes/android/battery_monitor/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | [`server/skills/android_agent/battery-skill/SKILL.md`](../../../server/skills/android_agent/battery-skill/SKILL.md) |-| **Dual-purpose tool** | direct sub-node of `androidTool` - can also connect straight to any agent's `input-tools` |+| **Direct agent tool** | connects straight to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/bluetoothAutomation.md b/docs-internal/node-logic-flows/android/bluetoothAutomation.mdindex 3bd4f8ce..56bd096f 100644--- a/docs-internal/node-logic-flows/android/bluetoothAutomation.md+++ b/docs-internal/node-logic-flows/android/bluetoothAutomation.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/bluetooth_automation/__init__.py`](../../../server/nodes/android/bluetooth_automation/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | [`server/skills/android_agent/bluetooth-skill/SKILL.md`](../../../server/skills/android_agent/bluetooth-skill/SKILL.md) |-| **Dual-purpose tool** | sub-node of `androidTool`; connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/cameraControl.md b/docs-internal/node-logic-flows/android/cameraControl.mdindex e54f2286..953c74f1 100644--- a/docs-internal/node-logic-flows/android/cameraControl.md+++ b/docs-internal/node-logic-flows/android/cameraControl.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/camera_control/__init__.py`](../../../server/nodes/android/camera_control/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | [`server/skills/android_agent/camera-skill/SKILL.md`](../../../server/skills/android_agent/camera-skill/SKILL.md) |-| **Dual-purpose tool** | sub-node of `androidTool`; connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/deviceStateAutomation.md b/docs-internal/node-logic-flows/android/deviceStateAutomation.mdindex 1d221095..4d0371f6 100644--- a/docs-internal/node-logic-flows/android/deviceStateAutomation.md+++ b/docs-internal/node-logic-flows/android/deviceStateAutomation.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/device_state_automation/__init__.py`](../../../server/nodes/android/device_state_automation/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | none |-| **Dual-purpose tool** | sub-node of `androidTool`; connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/environmentalSensors.md b/docs-internal/node-logic-flows/android/environmentalSensors.mdindex 44634ce6..f40afea3 100644--- a/docs-internal/node-logic-flows/android/environmentalSensors.md+++ b/docs-internal/node-logic-flows/android/environmentalSensors.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/environmental_sensors/__init__.py`](../../../server/nodes/android/environmental_sensors/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | [`server/skills/android_agent/environmental-skill/SKILL.md`](../../../server/skills/android_agent/environmental-skill/SKILL.md) |-| **Dual-purpose tool** | sub-node of `androidTool`; connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/location.md b/docs-internal/node-logic-flows/android/location.mdindex 145dd4b6..15c7964e 100644--- a/docs-internal/node-logic-flows/android/location.md+++ b/docs-internal/node-logic-flows/android/location.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/location/__init__.py`](../../../server/nodes/android/location/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | [`server/skills/android_agent/location-skill/SKILL.md`](../../../server/skills/android_agent/location-skill/SKILL.md) |-| **Dual-purpose tool** | sub-node of `androidTool`; connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/mediaControl.md b/docs-internal/node-logic-flows/android/mediaControl.mdindex acd120bb..b33fee74 100644--- a/docs-internal/node-logic-flows/android/mediaControl.md+++ b/docs-internal/node-logic-flows/android/mediaControl.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/media_control/__init__.py`](../../../server/nodes/android/media_control/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | none |-| **Dual-purpose tool** | sub-node of `androidTool`; connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/motionDetection.md b/docs-internal/node-logic-flows/android/motionDetection.mdindex 63e9ebef..9db818cf 100644--- a/docs-internal/node-logic-flows/android/motionDetection.md+++ b/docs-internal/node-logic-flows/android/motionDetection.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/motion_detection/__init__.py`](../../../server/nodes/android/motion_detection/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | [`server/skills/android_agent/motion-skill/SKILL.md`](../../../server/skills/android_agent/motion-skill/SKILL.md) |-| **Dual-purpose tool** | sub-node of `androidTool`; connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/networkMonitor.md b/docs-internal/node-logic-flows/android/networkMonitor.mdindex 34ba5a6f..3840f79c 100644--- a/docs-internal/node-logic-flows/android/networkMonitor.md+++ b/docs-internal/node-logic-flows/android/networkMonitor.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/network_monitor/__init__.py`](../../../server/nodes/android/network_monitor/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | none |-| **Dual-purpose tool** | sub-node of `androidTool`; also connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable directly to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/screenControlAutomation.md b/docs-internal/node-logic-flows/android/screenControlAutomation.mdindex e8d150c2..2bae1b4b 100644--- a/docs-internal/node-logic-flows/android/screenControlAutomation.md+++ b/docs-internal/node-logic-flows/android/screenControlAutomation.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/screen_control_automation/__init__.py`](../../../server/nodes/android/screen_control_automation/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | [`server/skills/android_agent/screen-control-skill/SKILL.md`](../../../server/skills/android_agent/screen-control-skill/SKILL.md) |-| **Dual-purpose tool** | sub-node of `androidTool`; connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/systemInfo.md b/docs-internal/node-logic-flows/android/systemInfo.mdindex fdf23370..951d332a 100644--- a/docs-internal/node-logic-flows/android/systemInfo.md+++ b/docs-internal/node-logic-flows/android/systemInfo.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/system_info/__init__.py`](../../../server/nodes/android/system_info/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | none |-| **Dual-purpose tool** | sub-node of `androidTool`; connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/android/wifiAutomation.md b/docs-internal/node-logic-flows/android/wifiAutomation.mdindex 1dccb5f5..7de5d37c 100644--- a/docs-internal/node-logic-flows/android/wifiAutomation.md+++ b/docs-internal/node-logic-flows/android/wifiAutomation.md@@ -6,7 +6,7 @@| **Backend handler** | plugin [`server/nodes/android/wifi_automation/__init__.py`](../../../server/nodes/android/wifi_automation/__init__.py); dispatch via `BaseNode.execute()` -> shared [`AndroidServiceBase.invoke`](../../../server/nodes/android/_base.py) (`@Operation("invoke")`) || **Tests** | [`server/tests/nodes/test_android.py`](../../../server/tests/nodes/test_android.py) || **Skill (if any)** | [`server/skills/android_agent/wifi-skill/SKILL.md`](../../../server/skills/android_agent/wifi-skill/SKILL.md) |-| **Dual-purpose tool** | sub-node of `androidTool`; connectable directly to any agent's `input-tools` |+| **Direct agent tool** | connectable to any agent's `input-tools` |## Purposediff --git a/docs-internal/node-logic-flows/specialized_agents/_pattern.md b/docs-internal/node-logic-flows/specialized_agents/_pattern.mdindex 0547ad16..7a9757f4 100644--- a/docs-internal/node-logic-flows/specialized_agents/_pattern.md+++ b/docs-internal/node-logic-flows/specialized_agents/_pattern.md@@ -108,7 +108,7 @@ flowchart TDP --> B[collect_agent_connections]B --> B1[memory_data from input-memory]B --> B2[skill_data from input-skill<br/>masterSkill expanded to N skills]- B --> B3[tool_data from input-tools<br/>androidTool sub-nodes discovered]+ B --> B3[tool_data from directly connected input-tools]B --> B4[input_data from input-main]B --> B5[task_data from input-task]B1 --> C{task_data present?}diff --git a/docs-internal/node-logic-flows/specialized_agents/androidAgent.md b/docs-internal/node-logic-flows/specialized_agents/androidAgent.mdindex 85a3a631..ffcf5fc3 100644--- a/docs-internal/node-logic-flows/specialized_agents/androidAgent.md+++ b/docs-internal/node-logic-flows/specialized_agents/androidAgent.md@@ -11,13 +11,13 @@AI agent pre-configured for Android device control. Users typically connectAndroid service nodes (`batteryMonitor`, `wifiAutomation`, `appLauncher`,-etc.) directly to `input-tools`, or wire an `androidTool` toolkit, or attach+etc.) directly to `input-tools`, or attachthe `android_agent` folder via a Master Skill.## What is unique to this node- **Intended tool set**: Android service nodes (16 total) and the- `androidTool` aggregator.+ independent tool capabilities.- **Intended skills**: `server/skills/android_agent/` (12 skills:personality, battery, wifi, bluetooth, location, etc.).- **Frontend theming**: green dracula accent, phone emoji in componentdiff --git a/docs-internal/node_allowlist.md b/docs-internal/node_allowlist.mdindex 67c59c05..0dbeffad 100644--- a/docs-internal/node_allowlist.md+++ b/docs-internal/node_allowlist.md@@ -50,9 +50,9 @@ Edit `server/config/node_allowlist.json` only. No code change. Example — disab```json{- "disabled_groups": ["android", "email", "whatsapp"],- "disabled_credential_categories": ["android", "email", "whatsapp"],- "disabled_skill_folders": ["android_agent", "social_agent"]+ "disabled_groups": ["email", "whatsapp"],+ "disabled_credential_categories": ["email", "whatsapp"],+ "disabled_skill_folders": ["social_agent"]}```@@ -62,9 +62,14 @@ Re-enable: drop the entries. The hook + filters are forward-compatible with empt| Domain | Why | Hidden from ||---|---|---|-| `android` group + `android_agent` / `androidTool` + `android` credential category + `android_agent` skill folder | Hardware-tied (ADB / Android relay) — high friction to set up, low value for most users | Palette + credentials + skill folders || `email` group + `email` credential category | Himalaya CLI dependency — complex install path, IMAP/SMTP config burden | Palette + credentials |-| `taskManager` (single node) | Functionality folded into `writeTodos`; redundant duplicate | Palette + LLM-spawnable set via agentBuilder |++Android service nodes are enabled and connect directly to an agent's+`input-tools` handle. The Android Agent, Android credential category, and+bundled Android skills are also visible. The former `androidTool` aggregator+is obsolete; legacy workflows are normalized to direct service-to-agent edges.++Task Manager is enabled for inspecting and cleaning up delegated agent tasks.## agentBuilder integrationdiff --git a/server/config/node_allowlist.json b/server/config/node_allowlist.jsonindex a0593388..fbf170f2 100644--- a/server/config/node_allowlist.json+++ b/server/config/node_allowlist.json@@ -1,5 +1,5 @@{- "_comment": "Node visibility config. `enabled_nodes`: positive list shown in normal mode (empty = show all). `disabled_groups` / `disabled_nodes`: ABSOLUTE blocklist enforced in BOTH normal and dev mode — wins over enabled_nodes and over the show_all default. Use disabled_groups to hide every plugin in a backend group (e.g. 'android' hides all 16 Android service nodes + androidTool); use disabled_nodes for one-off type names like 'android_agent' that don't share the group label. Node type identifiers must match the 'type' class attribute on the plugin in server/nodes/<category>/<file>.py verbatim.",+ "_comment": "Node visibility config. `enabled_nodes`: positive list shown in normal mode (empty = show all). `disabled_groups` / `disabled_nodes`: ABSOLUTE blocklist enforced in BOTH normal and dev mode — wins over enabled_nodes and over the show_all default. Node type identifiers must match the 'type' class attribute on the plugin in server/nodes/<category>/<file>.py verbatim.","enabled_nodes": ["start","chatTrigger",@@ -7,6 +7,7 @@"aiAgent","chatAgent",+ "android_agent","vertex_managed_agent","vertex_agent_admin","vertexCloudTool",@@ -21,28 +22,38 @@"calculatorTool","currentTimeTool","writeTodos",+ "taskManager","httpRequest","timer","cronScheduler","telegramSend",- "telegramReceive"+ "telegramReceive",++ "airplaneModeControl",+ "appLauncher",+ "appList",+ "audioAutomation",+ "batteryMonitor",+ "bluetoothAutomation",+ "cameraControl",+ "deviceStateAutomation",+ "environmentalSensors",+ "location",+ "mediaControl",+ "motionDetection",+ "networkMonitor",+ "screenControlAutomation",+ "systemInfo",+ "wifiAutomation"],"disabled_groups": [- "android","email"],- "disabled_nodes": [- "android_agent",- "androidTool",- "taskManager"- ],+ "disabled_nodes": [],"disabled_credential_categories": [- "android","email"],- "disabled_skill_folders": [- "android_agent"- ]+ "disabled_skill_folders": []}diff --git a/server/constants.py b/server/constants.pyindex 89cb0cb4..9d3fc7c1 100644--- a/server/constants.py+++ b/server/constants.py@@ -63,7 +63,6 @@ AI_TOOL_TYPES: FrozenSet[str] = frozenset("calculatorTool","currentTimeTool","duckduckgoSearch",- "androidTool","writeTodos","processManager",]@@ -81,11 +80,7 @@ SKILL_NODE_TYPES: FrozenSet[str] = frozenset(# Toolkit node types (aggregate sub-nodes, n8n Sub-Node pattern)# Sub-nodes connected to toolkits should not execute independently -# they only execute when called via the toolkit's tool interface-TOOLKIT_NODE_TYPES: FrozenSet[str] = frozenset(- [- "androidTool", # Aggregates Android service nodes (batteryMonitor, location, etc.)- ]-)+TOOLKIT_NODE_TYPES: FrozenSet[str] = frozenset()# All AI-related node types (for API key injection)AI_MODEL_TYPES: FrozenSet[str] = AI_AGENT_TYPES | AI_CHAT_MODEL_TYPESdiff --git a/server/nodes/agent/vertex_managed_agent/__init__.py b/server/nodes/agent/vertex_managed_agent/__init__.pyindex 67959519..ae0d03ad 100644--- a/server/nodes/agent/vertex_managed_agent/__init__.py+++ b/server/nodes/agent/vertex_managed_agent/__init__.py@@ -530,7 +530,7 @@ class VertexManagedAgentNode(ActionNode):``iter_tool_node_classes``: ToolNodes, agents (delegation), anddual-purpose ``usable_as_tool`` plugins declare; display-onlyplugins (vertexCloudTool — minted by ``_ops`` with a persisted- ``input-tools`` edge) don't. Unknown types (androidTool+ ``input-tools`` edge) don't. Unknown legacy typesaggregator, pseudo-types) default-allow to preserve behavior."""from services.node_registry import get_node_classdiff --git a/server/nodes/android/_base.py b/server/nodes/android/_base.pyindex 8c801e5e..cc03bf54 100644--- a/server/nodes/android/_base.py+++ b/server/nodes/android/_base.py@@ -166,12 +166,8 @@ class AndroidServiceBase(ActionNode, abstract=True):# ============================================================================# AI-tool-time dispatchers (Wave 11.E.3)# -----------------------------------------------------------------------------# When an Android service or the androidTool aggregator is connected to an-# AI agent's input-tools handle, the LLM emits ``{action, parameters}`` —-# different shape from the workflow-node Params schema. These two helpers-# do the LLM-arg-to-service-call translation + status broadcast and are-# called from ``services/handlers/tools.py:execute_tool`` for the-# ``androidTool`` and ``ANDROID_SERVICE_NODE_TYPES`` branches.+# When an Android service is connected to an AI agent's input-tools handle,+# the LLM emits a different shape from the workflow-node Params schema.# ============================================================================@@ -249,68 +245,6 @@ async def _execute_with_broadcast(return {"error": str(e)}-async def execute_android_toolkit(- args: Dict[str, Any],- config: Dict[str, Any],-) -> Dict[str, Any]:- """Route an LLM tool call through the Android toolkit aggregator.-- Looks up the connected service in ``config['connected_services']``- by ``service_id``, then executes through the broadcast helper.- """- service_id = args.get("service_id", "")- action = args.get("action", "")- parameters = args.get("parameters") or {}-- connected_services = config.get("connected_services", [])- if not service_id:- available = [s.get("service_id") or s.get("node_type") for s in connected_services]- return {- "error": "No service_id provided",- "hint": (f"Available services: {', '.join(available)}" if available else "No services connected"),- }-- target_service = next(- (s for s in connected_services if (s.get("service_id") or s.get("node_type")) == service_id),- None,- )- if not target_service:- available = [s.get("service_id") or s.get("node_type") for s in connected_services]- return {- "error": f"Service '{service_id}' not connected to toolkit",- "available_services": available,- }-- svc_params = target_service.get("parameters", {})- host = svc_params.get("android_host", "localhost")- port = int(svc_params.get("android_port", 8888))- if not action:- action = svc_params.get("action") or target_service.get("action", "status")-- target_node_id = target_service.get("node_id")- workflow_id = config.get("workflow_id")-- logger.info(- "[Android Toolkit] Executing %s.%s via '%s' (node: %s, workflow: %s)",- service_id,- action,- target_service.get("label"),- target_node_id,- workflow_id,- )-- return await _execute_with_broadcast(- target_node_id=target_node_id,- workflow_id=workflow_id,- service_id=service_id,- action=action,- parameters=parameters,- host=host,- port=port,- log_label="Android Toolkit",- )--async def execute_android_service_tool(args: Dict[str, Any],config: Dict[str, Any],diff --git a/server/nodes/android/_dispatcher.py b/server/nodes/android/_dispatcher.pyindex 508ce2ca..583e020f 100644--- a/server/nodes/android/_dispatcher.py+++ b/server/nodes/android/_dispatcher.py@@ -2,6 +2,8 @@import timeimport httpx+import asyncio+import subprocessfrom datetime import datetimefrom typing import Dict, Any, List@@ -156,6 +158,65 @@ class AndroidService:def __init__(self):self.default_timeout = 30.0+ async def list_devices(self) -> Dict[str, Any]:+ """Return devices reported by ADB without blocking the event loop."""+ try:+ result = await asyncio.to_thread(+ subprocess.run,+ ["adb", "devices", "-l"],+ capture_output=True,+ text=True,+ encoding="utf-8",+ errors="replace",+ timeout=5,+ )+ except FileNotFoundError:+ logger.error("[Android] ADB not found in PATH")+ return {+ "success": False,+ "error_code": "ADB_NOT_FOUND",+ "error": "ADB not found. Please install Android SDK Platform Tools",+ "devices": [],+ "count": 0,+ }+ except subprocess.TimeoutExpired:+ logger.error("[Android] ADB device discovery timed out")+ return {+ "success": False,+ "error_code": "ADB_TIMEOUT",+ "error": "ADB device discovery timed out",+ "devices": [],+ "count": 0,+ }+ except Exception as exc:+ logger.error("[Android] Failed to list devices", error=str(exc), exc_info=True)+ return {+ "success": False,+ "error_code": "ADB_COMMAND_FAILED",+ "error": "Failed to list Android devices",+ "devices": [],+ "count": 0,+ }++ if result.returncode != 0:+ logger.error("[Android] ADB device discovery failed", returncode=result.returncode)+ return {+ "success": False,+ "error_code": "ADB_COMMAND_FAILED",+ "error": (result.stderr or result.stdout or "ADB device discovery failed").strip(),+ "devices": [],+ "count": 0,+ }++ devices = []+ for line in result.stdout.splitlines()[1:]:+ parts = line.split()+ if len(parts) < 2:+ continue+ model = next((part.removeprefix("model:") for part in parts[2:] if part.startswith("model:")), "Unknown")+ devices.append({"id": parts[0], "state": parts[1], "model": model, "android_version": None})+ return {"success": True, "devices": devices, "count": len(devices)}+def get_service_actions(self, service_id: str) -> List[Dict[str, str]]:"""Get available actions for a specific Android service.diff --git a/server/nodes/android/_events.py b/server/nodes/android/_events.pyindex 3db7cef1..aedf4400 100644--- a/server/nodes/android/_events.py+++ b/server/nodes/android/_events.py@@ -47,7 +47,6 @@ _DEFAULT_STATUS: Dict[str, Any] = {"connected_devices": [],"connection_type": None,"qr_data": None,- "session_token": None,}@@ -63,7 +62,6 @@ def android_connection_status(connected_devices: Optional[List[str]] = None,connection_type: Optional[str] = None,qr_data: Optional[str] = None,- session_token: Optional[str] = None,) -> WorkflowEvent:"""Build a typed CloudEvents envelope describing the android relayconnection state.@@ -84,7 +82,6 @@ def android_connection_status("connected_devices": list(connected_devices or []),"connection_type": connection_type,"qr_data": qr_data,- "session_token": session_token,},)@@ -101,7 +98,6 @@ async def broadcast_android_status(connected_devices: Optional[List[str]] = None,connection_type: Optional[str] = None,qr_data: Optional[str] = None,- session_token: Optional[str] = None,) -> None:"""Update the android status cache + emit the typed``plugin_connection_status`` CloudEvents envelope.@@ -126,7 +122,6 @@ async def broadcast_android_status("connected_devices": list(connected_devices or []),"connection_type": connection_type,"qr_data": qr_data,- "session_token": session_token,}broadcaster._status["android"] = payload@@ -138,7 +133,6 @@ async def broadcast_android_status(connected_devices=connected_devices,connection_type=connection_type,qr_data=qr_data,- session_token=session_token,)await broadcaster.broadcast({diff --git a/server/nodes/android/_handlers.py b/server/nodes/android/_handlers.pyindex 2b819de0..9188f281 100644--- a/server/nodes/android/_handlers.py+++ b/server/nodes/android/_handlers.py@@ -40,8 +40,8 @@ async def handle_get_android_devices(data: Dict[str, Any], websocket: WebSocket)from services.plugin.deps import get_android_serviceandroid_service = get_android_service()- devices = await android_service.list_devices()- return {"devices": devices, "timestamp": time.time()}+ result = await android_service.list_devices()+ return {**result, "timestamp": time.time()}async def handle_execute_android_action(data: Dict[str, Any], websocket: WebSocket) -> Dict[str, Any]:@@ -89,13 +89,10 @@ async def handle_android_relay_connect(data: Dict[str, Any], websocket: WebSockeclient, error = await get_relay_client(url, api_key)if client:- logger.info(- f"[WebSocket] Android relay connect success, qr_data present: " f"{bool(client.qr_data)}, session_token: {client.session_token}"- )+ logger.info("[WebSocket] Android relay connect success", qr_data_present=bool(client.qr_data))return {"success": True,"connected": True,- "session_token": client.session_token,"qr_data": client.qr_data,"message": "Connected to relay server",}@@ -139,7 +136,6 @@ async def handle_android_relay_reconnect(data: Dict[str, Any], websocket: WebSocreturn {"success": True,"connected": True,- "session_token": client.session_token,"qr_data": client.qr_data,"message": "Reconnected with new session token",}diff --git a/server/nodes/android/_refresh.py b/server/nodes/android/_refresh.pyindex 72543658..704720e0 100644--- a/server/nodes/android/_refresh.py+++ b/server/nodes/android/_refresh.py@@ -55,7 +55,6 @@ async def _auto_reconnect_body(broadcaster: "StatusBroadcaster", span) -> None:connected_devices=list(existing.get_connected_devices()),connection_type="relay",qr_data=existing.qr_data,- session_token=existing.session_token,)logger.debug("[StatusBroadcaster] Android relay already connected")span.set_attribute("path", "already_connected")@@ -104,7 +103,6 @@ async def _auto_reconnect_body(broadcaster: "StatusBroadcaster", span) -> None:connected_devices=list(client.get_connected_devices()),connection_type="relay",qr_data=client.qr_data,- session_token=client.session_token,)span.set_attribute("reconnect_ok", True)else:diff --git a/server/nodes/android/_relay/broadcaster.py b/server/nodes/android/_relay/broadcaster.pyindex c713f1c2..48c82940 100644--- a/server/nodes/android/_relay/broadcaster.py+++ b/server/nodes/android/_relay/broadcaster.py@@ -22,7 +22,6 @@ async def _emit_relay_status(device_name: Optional[str] = None,devices: Optional[Set[str]] = None,qr_data: Optional[str] = None,- session_token: Optional[str] = None,):"""Translate relay-shaped args and route to the canonicalplugin-owned broadcaster (``nodes.android._events``)."""@@ -39,7 +38,6 @@ async def _emit_relay_status(connected_devices=list(devices) if devices else [],connection_type="relay" if connected else None,qr_data=qr_data,- session_token=session_token,)except Exception as e:logger.warning("[Android] Failed to broadcast status", error=str(e))@@ -52,7 +50,7 @@ async def broadcast_connected(device_id: str, device_name: Optional[str] = None))-async def broadcast_device_disconnected(relay_connected: bool = True, qr_data: Optional[str] = None, session_token: Optional[str] = None):+async def broadcast_device_disconnected(relay_connected: bool = True, qr_data: Optional[str] = None):"""Broadcast that Android device is disconnected (but relay may still be connected).This is called when the Android device unpairs. The relay connection may still be active.@@ -61,7 +59,6 @@ async def broadcast_device_disconnected(relay_connected: bool = True, qr_data: OArgs:relay_connected: Whether the relay WebSocket is still connectedqr_data: QR code data for re-pairing- session_token: Current session token"""await _emit_relay_status(connected=relay_connected, # Relay may still be connected@@ -70,7 +67,6 @@ async def broadcast_device_disconnected(relay_connected: bool = True, qr_data: Odevice_name=None,devices=set(),qr_data=qr_data, # Keep QR data for re-pairing- session_token=session_token,)@@ -85,7 +81,7 @@ async def broadcast_disconnected():await broadcast_relay_disconnected()-async def broadcast_qr_code(qr_data: str, session_token: Optional[str] = None):+async def broadcast_qr_code(qr_data: str):"""Broadcast QR code for pairing"""await _emit_relay_status(connected=True, # Connected to relay but not paired@@ -94,5 +90,4 @@ async def broadcast_qr_code(qr_data: str, session_token: Optional[str] = None):device_name=None,devices=set(),qr_data=qr_data,- session_token=session_token,)diff --git a/server/nodes/android/_relay/client.py b/server/nodes/android/_relay/client.pyindex 91037476..85bc87d2 100644--- a/server/nodes/android/_relay/client.py+++ b/server/nodes/android/_relay/client.py@@ -67,6 +67,14 @@ class RelayWebSocketClient:self.on_pairing_disconnected: Optional[Callable] = Noneself.on_relay_message: Optional[Callable] = None+ def _safe_error(self, value: object) -> str:+ """Redact relay credentials from errors before logging or returning them."""+ message = str(value)+ for secret in (self.api_key, self.session_token):+ if secret:+ message = message.replace(secret, "[REDACTED]")+ return message+# =========================================================================# Connection Management# =========================================================================@@ -78,7 +86,7 @@ class RelayWebSocketClient:Tuple of (success: bool, error_message: str)"""try:- logger.debug("[Relay] Connecting...", url=self.url)+ logger.debug("[Relay] Connecting...", url=self.base_url)timeout = aiohttp.ClientTimeout(total=None, connect=10, sock_read=300)self.session = aiohttp.ClientSession(timeout=timeout)@@ -107,11 +115,11 @@ class RelayWebSocketClient:self.session_token = params.get("session_token")self.qr_data = params.get("qr_data")- logger.info("[Relay] Connection established", session_token=self.session_token, has_qr=bool(self.qr_data))+ logger.info("[Relay] Connection established", has_qr=bool(self.qr_data))# Broadcast QR data to frontendif self.qr_data:- await broadcast_qr_code(self.qr_data, self.session_token)+ await broadcast_qr_code(self.qr_data)# Start background tasksself._receive_task = asyncio.create_task(self._receive_loop())@@ -119,37 +127,59 @@ class RelayWebSocketClient:return True, ""elif data.get("error"):- error_msg = data.get("error", {}).get("message", "Unknown server error")+ error_msg = self._safe_error(data.get("error", {}).get("message", "Unknown server error"))logger.error("[Relay] Server error", error=error_msg)+ await self._close_failed_connection()return False, f"Server error: {error_msg}"else:- logger.error("[Relay] Unexpected initial message", data=data)+ logger.error("[Relay] Unexpected initial message", method=method)+ await self._close_failed_connection()return False, f"Unexpected response: {method or 'unknown'}"elif msg.type == aiohttp.WSMsgType.CLOSE:close_code = msg.dataclose_reason = msg.extra or "Unknown"logger.error("[Relay] Connection closed by server", code=close_code, reason=close_reason)+ await self._close_failed_connection()return False, f"Connection closed: {close_reason} (code {close_code})"elif msg.type == aiohttp.WSMsgType.ERROR:logger.error("[Relay] WebSocket error on receive")+ await self._close_failed_connection()return False, "WebSocket error during handshake"+ await self._close_failed_connection()return False, "No response from server"except asyncio.TimeoutError:logger.error("[Relay] Connection timeout")+ await self._close_failed_connection()return False, "Connection timeout - server not responding"except aiohttp.ClientConnectorError as e:- logger.error("[Relay] Connection failed", error=str(e))- return False, f"Cannot connect to server: {str(e)}"+ logger.error("[Relay] Connection failed", error=self._safe_error(e))+ await self._close_failed_connection()+ return False, f"Cannot connect to server: {self._safe_error(e)}"except aiohttp.WSServerHandshakeError as e:- logger.error("[Relay] WebSocket handshake failed", error=str(e))- return False, f"WebSocket handshake failed: {str(e)}"+ logger.error("[Relay] WebSocket handshake failed", error=self._safe_error(e))+ await self._close_failed_connection()+ return False, f"WebSocket handshake failed: {self._safe_error(e)}"except Exception as e:- logger.error("[Relay] Connection error", error=str(e), exc_info=True)- return False, f"Connection error: {str(e)}"+ # Do not attach the raw traceback: aiohttp exceptions can embed the+ # authenticated WebSocket URL (and therefore the API key).+ logger.error("[Relay] Connection error", error=self._safe_error(e))+ await self._close_failed_connection()+ return False, f"Connection error: {self._safe_error(e)}"++ async def _close_failed_connection(self) -> None:+ """Close transport resources after a handshake failure without clearing persisted pairing."""+ self._running = False+ self.connected = False+ if self.ws and not self.ws.closed:+ await self.ws.close()+ if self.session and not self.session.closed:+ await self.session.close()+ self.ws = None+ self.session = Noneasync def disconnect(self, clear_stored_session: bool = True):"""Close connection and cleanup.@@ -318,7 +348,7 @@ class RelayWebSocketClient:self.session_token = params.get("session_token")self.qr_data = params.get("qr_data")if self.qr_data:- await broadcast_qr_code(self.qr_data, self.session_token)+ await broadcast_qr_code(self.qr_data)async def _handle_pairing_connected(self, params: dict):"""Handle pairing.connected event."""@@ -386,7 +416,7 @@ class RelayWebSocketClient:self.paired_device_name = None# Broadcast device disconnection - relay is still connected, pass QR data for re-pairing- await broadcast_device_disconnected(relay_connected=self.is_connected(), qr_data=self.qr_data, session_token=self.session_token)+ await broadcast_device_disconnected(relay_connected=self.is_connected(), qr_data=self.qr_data)if self.on_pairing_disconnected:await self.on_pairing_disconnected(params)diff --git a/server/nodes/android/_router.py b/server/nodes/android/_router.pyindex 97eed55a..cceb00fc 100644--- a/server/nodes/android/_router.py+++ b/server/nodes/android/_router.py@@ -103,45 +103,9 @@ async def get_action_parameters(service_id: str, action: str, android_service: A@router.get("/devices")-async def list_android_devices():+async def list_android_devices(android_service: AndroidService = Depends(get_android_service)):"""List all connected Android devices via ADB."""- import subprocess-- try:- # Run adb devices command- result = subprocess.run(["adb", "devices", "-l"], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=5)-- devices = []- lines = result.stdout.strip().split("\n")[1:] # Skip header "List of devices attached"-- for line in lines:- if not line.strip():- continue-- parts = line.split()- if len(parts) >= 2:- device_id = parts[0]- state = parts[1]-- # Extract model and other info- model = "Unknown"- android_version = None-- for part in parts[2:]:- if part.startswith("model:"):- model = part.split(":")[1]- elif part.startswith("device:"):- pass # Can use this for device codename-- devices.append({"id": device_id, "state": state, "model": model, "android_version": android_version})-- return {"success": True, "devices": devices, "count": len(devices)}- except FileNotFoundError:- logger.error("[Android] ADB not found in PATH")- return {"success": False, "error": "ADB not found. Please install Android SDK Platform Tools", "devices": []}- except Exception as e:- logger.error("[Android] Failed to list devices", error=str(e), exc_info=True)- return {"success": False, "error": "Failed to list devices", "devices": []}+ return await android_service.list_devices()@router.post("/port-forward")@@ -209,7 +173,6 @@ async def get_relay_connection_status():"connection_type": "relay","device_id": relay_client.paired_device_id,"device_name": relay_client.paired_device_name,- "session_token": relay_client.session_token,"qr_data": relay_client.qr_data if not relay_client.is_paired() else None,"status": "paired" if relay_client.is_paired() else "waiting_for_pairing",}diff --git a/server/nodes/groups.py b/server/nodes/groups.pyindex 6e86fab2..409c184c 100644--- a/server/nodes/groups.py+++ b/server/nodes/groups.py@@ -26,6 +26,7 @@ register_group(key="agent", metadata={"label": "AI Agents", "icon": "🤖", "colregister_group(key="model", metadata={"label": "AI Models", "icon": "🧬", "color": "#8be9fd", "visibility": "normal"})register_group(key="skill", metadata={"label": "AI Skills", "icon": "🎯", "color": "#50fa7b", "visibility": "normal"})register_group(key="tool", metadata={"label": "AI Tools", "icon": "🛠️", "color": "#50fa7b", "visibility": "normal"})+register_group(key="android", metadata={"label": "Android", "icon": "📱", "color": "#8be9fd", "visibility": "normal"})# ---------------------------------------------------------------------------@@ -37,7 +38,6 @@ register_group(key="trigger", metadata={"label": "Triggers", "icon": "🕐", "coregister_group(key="ai", metadata={"label": "AI", "icon": "🤖", "color": "#bd93f9", "visibility": "dev"})register_group(key="location", metadata={"label": "Location", "icon": "📍", "color": "#ff5555", "visibility": "dev"})register_group(key="social", metadata={"label": "Social", "icon": "📱", "color": "#50fa7b", "visibility": "dev"})-register_group(key="android", metadata={"label": "Android", "icon": "📱", "color": "#8be9fd", "visibility": "dev"})register_group(key="chat", metadata={"label": "Chat", "icon": "💭", "color": "#f1fa8c", "visibility": "dev"})register_group(key="code", metadata={"label": "Code", "icon": "💻", "color": "#ffb86c", "visibility": "dev"})register_group(key="document", metadata={"label": "Documents", "icon": "🗄️", "color": "#ff79c6", "visibility": "dev"})diff --git a/server/nodes/tool/task_manager/__init__.py b/server/nodes/tool/task_manager/__init__.pyindex b5341015..0c37257e 100644--- a/server/nodes/tool/task_manager/__init__.py+++ b/server/nodes/tool/task_manager/__init__.py@@ -22,11 +22,18 @@ logger = get_logger(__name__)class TaskManagerParams(BaseModel):- action: Literal["create", "list", "complete", "delete", "update"] = "create"- task_id: Optional[str] = Field(default=None)- title: Optional[str] = None- description: Optional[str] = None- status: Optional[str] = None+ operation: Literal["list_tasks", "get_task", "mark_done"] = Field(+ default="list_tasks",+ description="List delegated tasks, retrieve one task, or remove a completed task from tracking.",+ )+ task_id: Optional[str] = Field(+ default=None,+ description="Delegated task ID. Required for get_task and mark_done.",+ )+ status_filter: Optional[Literal["running", "completed", "error", "cancelled"]] = Field(+ default=None,+ description="Optional status filter for list_tasks.",+ )model_config = ConfigDict(extra="allow")diff --git a/server/services/ai.py b/server/services/ai.pyindex 8577f547..6e46cf3a 100644--- a/server/services/ai.py+++ b/server/services/ai.py@@ -2228,7 +2228,7 @@ class AIService:system_message = f"{system_message}\n\n{skill_prompt}"# Build tools from tool_data using same method as AI Agent- # This supports ALL tool types: calculatorTool, currentTimeTool, duckduckgoSearch, androidTool, httpRequest+ # This supports all directly connected tool types.all_tools = []tool_node_configs = {} # Map tool name to node config (same as AI Agent's tool_configs)tool_identities: List[Dict[str, str]] = []@@ -2736,16 +2736,15 @@ class AIService:2. ``cls.tool_name`` / ``cls.tool_description`` ClassVars on theplugin class. ``tool_description`` falls back to``cls.description`` when empty.- 3. ``_PSEUDO_TOOL_FALLBACK`` for built-in / aggregator pseudo-types- that have no plugin class (``_builtin_check_delegated_tasks``,- ``androidTool``)+ 3. ``_PSEUDO_TOOL_FALLBACK`` for built-in pseudo-types that have+ no plugin class (``_builtin_check_delegated_tasks``)4. ``node_params.get('tool_name')`` / ``...tool_description``(per-node override declared as a Pydantic field on the plugin'sParams model — e.g. brave_search / serper_search / perplexity).5. Last-resort default: ``f"tool_{label}"`` / ``f"Execute {label}"``Args:- tool_info: Dict containing node_id, node_type, parameters, label, connected_services (for androidTool)+ tool_info: Dict containing node_id, node_type, parameters, and labelReturns:Tuple of (StructuredTool, config_dict) or (None, None) on failure@@ -2759,10 +2758,6 @@ class AIService:"check_delegated_tasks","Check status and retrieve results of previously delegated tasks.",),- "androidTool": (- "android_device",- "Control Android device. Available services are determined by connected nodes.",- ),}def _resolve_default_tool_name_description(node_type: str) -> tuple:@@ -2825,11 +2820,6 @@ class AIService:)tool_description = node_params.get("tool_description") or default_tool_description or f"Execute {node_label} node"- # For androidTool, enhance description with connected services- if node_type == "androidTool" and connected_services:- service_names = [s.get("label") or s.get("service_id", "unknown") for s in connected_services]- tool_description = f"{tool_description} Connected: {', '.join(service_names)}"-# For AI Agent nodes, enhance description with child agent's tool capabilities# This allows parent agent to know what the child agent can dofrom constants import AI_AGENT_TYPES@@ -2861,7 +2851,7 @@ class AIService:tool_name = re.sub(r"[^a-zA-Z0-9_]", "_", tool_name)- # Build schema based on node type - pass connected_services for androidTool+ # Build schema based on node type.# If DB has schema_config, use it to build custom schema, otherwise use dynamicschema_params = dict(node_params)if connected_services:@@ -2986,44 +2976,6 @@ class AIService:if plugin_cls is not None and hasattr(plugin_cls, "Params"):return plugin_cls.Params- # androidTool aggregator — dynamic schema derived from the set of- # Android service nodes connected to its toolkit handle. No plugin- # class, so it stays here.- if node_type == "androidTool":- connected_services = params.get("connected_services", [])-- if not connected_services:-- class EmptyAndroidSchema(BaseModel):- """Android toolkit with no connected services."""-- query: str = Field(default="status", description="No Android services connected. Connect Android nodes to the toolkit.")-- return EmptyAndroidSchema-- from nodes.android._dispatcher import SERVICE_ACTIONS-- service_info = []- for svc in connected_services:- svc_id = svc.get("service_id") or svc.get("node_type", "unknown")- actions = SERVICE_ACTIONS.get(svc_id, [])- action_list = [a["value"] for a in actions] if actions else ["status"]- service_info.append(f"{svc_id}: {'/'.join(action_list)}")-- services_description = "; ".join(service_info)-- class AndroidToolSchema(BaseModel):- """Schema for Android device control via connected services."""-- service_id: str = Field(description=f"Service to use. Connected: {services_description}")- action: str = Field(description="Action to perform (see service list for available actions)")- parameters: Optional[Dict[str, Any]] = Field(- default=None,- description="Action parameters. Examples: {package_name: 'com.app'} for app_launcher, {volume: 50} for audio",- )-- return AndroidToolSchema-# Generic schema for other nodesclass GenericToolSchema(BaseModel):"""Generic schema for tool arguments."""diff --git a/server/services/deployment/handlers.py b/server/services/deployment/handlers.pyindex 72d46f20..18c83aca 100644--- a/server/services/deployment/handlers.py+++ b/server/services/deployment/handlers.py@@ -68,6 +68,13 @@ async def handle_deploy_workflow(data: Dict[str, Any], websocket: WebSocket) ->workflow_id = data.get("workflow_id")nodes = data.get("nodes", [])edges = data.get("edges", [])+ from services.workflow_migrations import normalize_legacy_android_toolkit++ nodes, edges, normalized_parameters, migration_warnings = normalize_legacy_android_toolkit(+ nodes, edges, data.get("parameters_by_id")+ )+ if migration_warnings:+ logger.warning("[Deploy] %s", "; ".join(migration_warnings))session_id = data.get("session_id", "default")logger.debug(f"[Deploy] Received {len(edges)} edges for workflow {workflow_id}")@@ -98,7 +105,7 @@ async def handle_deploy_workflow(data: Dict[str, Any], websocket: WebSocket) ->deploy_report = await validate_workflow(nodes=nodes,edges=edges,- parameters_by_id=data.get("parameters_by_id"),+ parameters_by_id=normalized_parameters,)if deploy_report["errors"]:return {diff --git a/server/services/deployment/manager.py b/server/services/deployment/manager.pyindex 3cc6b28c..3b872507 100644--- a/server/services/deployment/manager.py+++ b/server/services/deployment/manager.py@@ -1126,7 +1126,7 @@ class DeploymentManager:# Service nodes connect to a toolkit's input-main (not a config# handle) and need to be included so the toolkit can discover# them. ``TOOLKIT_NODE_TYPES`` is the canonical set; today only- # ``androidTool`` is in it.+ # toolkit node types are in it.toolkit_node_ids = {n["id"] for n in nodes if n.get("type") in TOOLKIT_NODE_TYPES and n["id"] in downstream_ids}for edge in edges:target = edge.get("target")diff --git a/server/services/execution/models.py b/server/services/execution/models.pyindex 421d9297..c8f0fa58 100644--- a/server/services/execution/models.py+++ b/server/services/execution/models.py@@ -315,7 +315,7 @@ class ExecutionContext:Config nodes (memory, tools, model configs) are excluded from executionas they provide configuration to other nodes via special handles.- Toolkit sub-nodes (nodes connected TO a toolkit like androidTool) are also+ Toolkit sub-nodes (nodes connected to an aggregator) are alsoexcluded - they execute only when called via the toolkit's tool interface."""from constants import CONFIG_NODE_TYPES, TOOLKIT_NODE_TYPES, AI_AGENT_TYPESdiff --git a/server/services/handlers/tools.py b/server/services/handlers/tools.pyindex 31db105e..e716431f 100644--- a/server/services/handlers/tools.py+++ b/server/services/handlers/tools.py@@ -210,15 +210,8 @@ async def _dispatch_tool(tool_name: str, tool_args: Dict[str, Any], config: Dict# Branches below are only for built-ins without a plugin# representation or cases needing special argument translation.- # androidTool (toolkit aggregator): dynamic schema derived from- # connected services; no plugin class. Direct Android service nodes- # also need LLM-arg translation that doesn't fit the plugin Params- # shape. Both dispatchers live with their domain on- # nodes/android/_base.py (Wave 11.E.3 move).- if node_type == "androidTool":- from nodes.android._base import execute_android_toolkit-- return await execute_android_toolkit(tool_args, config)+ # Direct Android service nodes need LLM-arg translation that doesn't+ # fit the plugin Params shape.if node_type in ANDROID_SERVICE_NODE_TYPES:from nodes.android._base import execute_android_service_tooldiff --git a/server/services/node_allowlist.py b/server/services/node_allowlist.pyindex faf4b31b..7843f172 100644--- a/server/services/node_allowlist.py+++ b/server/services/node_allowlist.py@@ -39,7 +39,7 @@ class NodeAllowlistService:entry here is hidden in BOTH normal and dev mode, evenif listed in enabled_nodes. Use to disable an entirebackend group (e.g. 'android' hides all 16 Android- service nodes + androidTool).+ service nodes).disabled_nodes: list[str]Absolute blocklist by exact node-type identifier. Samemode-independent enforcement as disabled_groups; usediff --git a/server/services/plugin/edge_walker.py b/server/services/plugin/edge_walker.pyindex eefd6fec..42378c8e 100644--- a/server/services/plugin/edge_walker.py+++ b/server/services/plugin/edge_walker.py@@ -11,7 +11,7 @@ Three helpers:- :func:`collect_agent_connections` — walks ``input-memory``,``input-skill``, ``input-tools``, ``input-main`` / ``input-chat``,``input-task`` edges into a single tuple. Knows about the- ``masterSkill`` expansion + the ``androidTool`` Sub-Node pattern ++ ``masterSkill`` expansion + direct Android service tools +child-agent tool discovery.- :func:`collect_teammate_connections` — walks ``input-teammates``edges (orchestrator / ai_employee team-lead pattern).@@ -38,7 +38,7 @@ import refrom collections import Counterfrom typing import TYPE_CHECKING, Any, Awaitable, Callable, Dict, List, Optional, Tuple-from constants import AI_AGENT_TYPES, ANDROID_SERVICE_NODE_TYPES+from constants import AI_AGENT_TYPESfrom core.logging import get_loggerif TYPE_CHECKING:@@ -359,33 +359,6 @@ async def _append_tool_entry("label": source_node.get("data", {}).get("label", tool_type),}- if tool_type == "androidTool":- connected_services: List[Dict[str, Any]] = []- for service_edge in edges:- if service_edge.get("target") != source_node_id:- continue- service_target_handle = service_edge.get("targetHandle")- if service_target_handle is not None and service_target_handle != "input-main":- logger.debug(f"{log_prefix} Android Toolkit: Skipping edge with " f"targetHandle: {service_target_handle}")- continue- android_node_id = service_edge.get("source")- android_node = next((n for n in nodes if n.get("id") == android_node_id), None)- if android_node and android_node.get("type") in ANDROID_SERVICE_NODE_TYPES:- android_params = await database.get_node_parameters(android_node_id) or {}- connected_services.append(- {- "node_id": android_node_id,- "node_type": android_node.get("type"),- "service_id": android_params.get("service_id"),- "action": android_params.get("action"),- "parameters": android_params,- "label": android_node.get("data", {}).get("label", android_node.get("type")),- }- )- logger.debug(f"{log_prefix} Android toolkit connected service: " f"{android_params.get('service_id')}")- tool_entry["connected_services"] = connected_services- logger.debug(f"{log_prefix} Android toolkit has {len(connected_services)} connected services")-if tool_type in AI_AGENT_TYPES:child_tools: List[Dict[str, Any]] = []child_incoming_edges = [e for e in edges if e.get("target") == source_node_id]diff --git a/server/services/temporal/workflow.py b/server/services/temporal/workflow.pyindex 96472964..352a4c08 100644--- a/server/services/temporal/workflow.py+++ b/server/services/temporal/workflow.py@@ -590,7 +590,7 @@ class MachinaWorkflow:if handle in CONFIG_HANDLES:config_ids.add(source_id)- # Android services connecting to androidTool+ # Android services connected as direct toolssource_node = node_map.get(source_id, {})if source_node.get("type") in ANDROID_SERVICE_TYPES:config_ids.add(source_id)diff --git a/server/services/workflow_import.py b/server/services/workflow_import.pyindex e49400c7..d52d12d6 100644--- a/server/services/workflow_import.py+++ b/server/services/workflow_import.py@@ -35,6 +35,7 @@ from typing import Any, Dict, List, Optional, Tuplefrom core.logging import get_loggerfrom services.node_registry import get_node_class+from services.workflow_migrations import normalize_legacy_android_toolkitfrom services.workflow_naming import new_workflow_id, next_available_slugfrom services.workflow_validator import validate_workflow@@ -256,12 +257,22 @@ async def import_workflow(node_parameters = workflow.get("nodeParameters") or {}proposed_name = name or workflow.get("name") or "Imported Workflow"+ # Compatibility must run before validation: androidTool is no longer a+ # supported node, but historical exports remain importable.+ nodes, edges, node_parameters, migration_warnings = normalize_legacy_android_toolkit(+ nodes, edges, node_parameters+ )+# 1. Validate. Errors block the import; warnings flow through.report = await validate_workflow(nodes=nodes,edges=edges,parameters_by_id=node_parameters,)+ report.setdefault("warnings", []).extend(+ {"code": "LEGACY_ANDROID_TOOLKIT_REMOVED", "message": warning}+ for warning in migration_warnings+ )if report["errors"]:return {"success": False,diff --git a/server/services/workflow_migrations.py b/server/services/workflow_migrations.pynew file mode 100644index 00000000..f21e4a93--- /dev/null+++ b/server/services/workflow_migrations.py@@ -0,0 +1,79 @@+"""Compatibility migrations for persisted workflow graphs."""++from __future__ import annotations++from typing import Any, Dict, List, Mapping, Optional, Tuple++from constants import AI_AGENT_TYPES, ANDROID_SERVICE_NODE_TYPES+++def normalize_legacy_android_toolkit(+ nodes: List[Dict[str, Any]],+ edges: List[Dict[str, Any]],+ node_parameters: Optional[Mapping[str, Dict[str, Any]]] = None,+) -> Tuple[List[Dict[str, Any]], List[Dict[str, Any]], Dict[str, Dict[str, Any]], List[str]]:+ """Replace legacy ``service -> androidTool -> agent`` graphs.++ The migration is pure and idempotent. A service is connected directly+ to every valid agent formerly targeted by its toolkit. Existing direct+ edges win, and orphaned toolkits are removed with a warning.+ """+ params = dict(node_parameters or {})+ node_by_id = {node.get("id"): node for node in nodes if node.get("id")}+ toolkit_ids = {+ node_id for node_id, node in node_by_id.items() if node.get("type") == "androidTool"+ }+ if not toolkit_ids:+ return list(nodes), list(edges), params, []++ incoming: Dict[str, List[str]] = {node_id: [] for node_id in toolkit_ids}+ outgoing: Dict[str, List[str]] = {node_id: [] for node_id in toolkit_ids}+ for edge in edges:+ source, target = edge.get("source"), edge.get("target")+ if target in toolkit_ids:+ source_node = node_by_id.get(source, {})+ if source_node.get("type") in ANDROID_SERVICE_NODE_TYPES:+ incoming[target].append(source)+ if source in toolkit_ids:+ target_node = node_by_id.get(target, {})+ if target_node.get("type") in AI_AGENT_TYPES:+ outgoing[source].append(target)++ migrated_edges = [+ dict(edge)+ for edge in edges+ if edge.get("source") not in toolkit_ids and edge.get("target") not in toolkit_ids+ ]+ direct_pairs = {+ (edge.get("source"), edge.get("target"))+ for edge in migrated_edges+ if (edge.get("targetHandle") or edge.get("target_handle")) == "input-tools"+ }+ warnings: List[str] = []+ for toolkit_id in sorted(toolkit_ids):+ agents = list(dict.fromkeys(outgoing[toolkit_id]))+ services = list(dict.fromkeys(incoming[toolkit_id]))+ if not agents:+ warnings.append(+ f"Removed legacy androidTool '{toolkit_id}' without a valid destination agent"+ )+ continue+ for service_id in services:+ for agent_id in agents:+ if (service_id, agent_id) in direct_pairs:+ continue+ migrated_edges.append(+ {+ "id": f"migrated-{service_id}-{agent_id}",+ "source": service_id,+ "target": agent_id,+ "sourceHandle": "output-main",+ "targetHandle": "input-tools",+ }+ )+ direct_pairs.add((service_id, agent_id))++ migrated_nodes = [dict(node) for node in nodes if node.get("id") not in toolkit_ids]+ for toolkit_id in toolkit_ids:+ params.pop(toolkit_id, None)+ return migrated_nodes, migrated_edges, params, warningsdiff --git a/server/services/workflow_storage/handlers.py b/server/services/workflow_storage/handlers.pyindex b31d907c..2838dded 100644--- a/server/services/workflow_storage/handlers.py+++ b/server/services/workflow_storage/handlers.py@@ -74,18 +74,31 @@ async def handle_save_workflow(data: Dict[str, Any], websocket: WebSocket) -> Dielse:slug = await next_available_slug(name, database, exclude_id=workflow_id)+ workflow_data = data.get("data", {})+ from services.workflow_migrations import normalize_legacy_android_toolkit++ nodes, edges, _, migration_warnings = normalize_legacy_android_toolkit(+ workflow_data.get("nodes") or [], workflow_data.get("edges") or []+ )+ normalized_data = {**workflow_data, "nodes": nodes, "edges": edges}success = await database.save_workflow(workflow_id=workflow_id,name=name,slug=slug,- data=data.get("data", {}),+ data=normalized_data,)if existing and existing.slug and existing.slug != slug:_move_workspace(existing.slug, slug)await _broadcast_renamed(workflow_id, name, slug, existing.slug)- return {"success": success, "workflow_id": workflow_id, "name": name, "slug": slug}+ return {+ "success": success,+ "workflow_id": workflow_id,+ "name": name,+ "slug": slug,+ "migration_warnings": migration_warnings,+ }@ws_handler()@@ -127,16 +140,39 @@ async def handle_get_workflow(data: Dict[str, Any], websocket: WebSocket) -> Dicdatabase = container.database()workflow = await database.get_workflow(data["workflow_id"])if workflow:+ from services.workflow_migrations import normalize_legacy_android_toolkit++ workflow_data = workflow.data or {}+ nodes, edges, _, migration_warnings = normalize_legacy_android_toolkit(+ workflow_data.get("nodes") or [], workflow_data.get("edges") or []+ )+ if nodes != (workflow_data.get("nodes") or []) or edges != (workflow_data.get("edges") or []):+ normalized_data = {**workflow_data, "nodes": nodes, "edges": edges}+ await database.save_workflow(+ workflow_id=workflow.id,+ name=workflow.name,+ slug=workflow.slug,+ description=getattr(workflow, "description", None),+ data=normalized_data,+ )+ legacy_ids = {+ node.get("id")+ for node in workflow_data.get("nodes", [])+ if node.get("type") == "androidTool" and node.get("id")+ }+ for legacy_id in legacy_ids:+ await database.delete_node_parameters(legacy_id)return {"success": True,"workflow": {"id": workflow.id,"name": workflow.name,"slug": workflow.slug,- "data": workflow.data,+ "data": {**workflow_data, "nodes": nodes, "edges": edges},"created_at": workflow.created_at.isoformat() if workflow.created_at else None,"updated_at": workflow.updated_at.isoformat() if workflow.updated_at else None,},+ "migration_warnings": migration_warnings,}return {"success": False, "error": "Workflow not found"}diff --git a/server/tests/nodes/test_agent_builder.py b/server/tests/nodes/test_agent_builder.pyindex c55cfc92..b3801c08 100644--- a/server/tests/nodes/test_agent_builder.py+++ b/server/tests/nodes/test_agent_builder.py@@ -745,17 +745,31 @@ class TestCatalogueVisibility:)_ = original_get_config # silence unused-var lint- def test_task_manager_disabled_in_allowlist_json(self):- """End-to-end: the on-disk ``server/config/node_allowlist.json``- marks ``taskManager`` as disabled, so the live- ``_allowed_tool_types()`` excludes it. Locks the operator- decision against accidental revert."""+ def test_task_manager_enabled_in_allowlist_json(self):+ """The Task Manager is visible to both the palette and Agent Builder."""from services.node_allowlist import get_node_allowlist_serviceconfig = get_node_allowlist_service().get_config()- assert "taskManager" in config["disabled_nodes"]- # And the agentBuilder catalogue honors it.- assert "taskManager" not in ab._allowed_tool_types()+ assert "taskManager" in config["enabled_nodes"]+ assert "taskManager" not in config["disabled_nodes"]+ assert "taskManager" in ab._allowed_tool_types()++ def test_android_nodes_enabled_in_allowlist_json(self):+ """Android services bind directly to agents as ordinary tools."""+ from constants import ANDROID_SERVICE_NODE_TYPES+ from services.node_allowlist import get_node_allowlist_service++ config = get_node_allowlist_service().get_config()+ android_types = set(ANDROID_SERVICE_NODE_TYPES)+ assert android_types <= set(config["enabled_nodes"])+ assert "android_agent" in config["enabled_nodes"]+ assert "androidTool" not in config["enabled_nodes"]+ assert "android" not in config["disabled_groups"]+ assert "android_agent" not in config["disabled_nodes"]+ assert "android" not in config["disabled_credential_categories"]+ assert "android_agent" not in config["disabled_skill_folders"]+ assert android_types <= ab._allowed_tool_types()+ assert "android_agent" in ab._allowed_subagent_types()async def test_inspect_canvas_includes_available_skills(self):"""available_skills must use the live SkillLoader registry. Wediff --git a/server/tests/nodes/test_android_runtime.py b/server/tests/nodes/test_android_runtime.pynew file mode 100644index 00000000..67ad89b7--- /dev/null+++ b/server/tests/nodes/test_android_runtime.py@@ -0,0 +1,102 @@+"""Focused runtime-readiness tests for Android device and relay plumbing."""++from types import SimpleNamespace+from unittest.mock import AsyncMock, patch++import aiohttp+import pytest++from nodes.android._dispatcher import AndroidService+from nodes.android._events import android_connection_status+from nodes.android._handlers import handle_android_relay_connect+from nodes.android._relay.client import RelayWebSocketClient+from nodes.android._router import get_relay_connection_status, list_android_devices+++async def test_list_devices_parses_adb_output_and_is_shared_by_http():+ completed = SimpleNamespace(+ returncode=0,+ stdout="List of devices attached\nemulator-5554 device product:sdk model:Pixel_8 device:emu\n",+ stderr="",+ )+ service = AndroidService()+ with patch("nodes.android._dispatcher.subprocess.run", return_value=completed):+ result = await list_android_devices(android_service=service)++ assert result == {+ "success": True,+ "devices": [{"id": "emulator-5554", "state": "device", "model": "Pixel_8", "android_version": None}],+ "count": 1,+ }+++async def test_list_devices_reports_missing_adb_structurally():+ with patch("nodes.android._dispatcher.subprocess.run", side_effect=FileNotFoundError):+ result = await AndroidService().list_devices()+ assert result["success"] is False+ assert result["error_code"] == "ADB_NOT_FOUND"+ assert result["devices"] == []+ assert result["count"] == 0+++async def test_list_devices_reports_nonzero_adb_exit_structurally():+ completed = SimpleNamespace(returncode=1, stdout="", stderr="adb server unavailable")+ with patch("nodes.android._dispatcher.subprocess.run", return_value=completed):+ result = await AndroidService().list_devices()+ assert result["error_code"] == "ADB_COMMAND_FAILED"+ assert result["error"] == "adb server unavailable"+++async def test_failed_relay_handshake_closes_session():+ ws = SimpleNamespace(+ closed=False,+ receive=AsyncMock(return_value=SimpleNamespace(type=aiohttp.WSMsgType.TEXT, data='{"method":"unexpected"}')),+ close=AsyncMock(),+ )+ session = SimpleNamespace(closed=False, ws_connect=AsyncMock(return_value=ws), close=AsyncMock())+ client = RelayWebSocketClient("wss://relay.example/ws", "secret-key")+ with patch("nodes.android._relay.client.aiohttp.ClientSession", return_value=session):+ connected, error = await client.connect()+ assert connected is False+ assert "Unexpected response" in error+ ws.close.assert_awaited_once()+ session.close.assert_awaited_once()+ assert client.session is None+++async def test_public_relay_surfaces_omit_session_token():+ relay = SimpleNamespace(+ is_connected=lambda: True,+ is_paired=lambda: True,+ paired_device_id="device-1",+ paired_device_name="Pixel",+ session_token="private-token",+ qr_data="qr",+ )+ with patch("nodes.android._relay.get_current_relay_client", return_value=relay):+ status = await get_relay_connection_status()+ assert "session_token" not in status++ with patch("nodes.android._relay.get_relay_client", new=AsyncMock(return_value=(relay, ""))):+ response = await handle_android_relay_connect(+ {"url": "wss://relay.example/ws", "api_key": "secret-key"},+ websocket=SimpleNamespace(),+ )+ assert "session_token" not in response++ event = android_connection_status(connected=True)+ assert "session_token" not in event.data+++def test_relay_errors_redact_api_key_and_internal_session_token_is_retained():+ client = RelayWebSocketClient("wss://relay.example/ws", "secret-key")+ client.session_token = "private-token"+ message = client._safe_error("url?api_key=secret-key token=private-token")+ assert "secret-key" not in message+ assert "private-token" not in message+ assert client.session_token == "private-token"diff --git a/server/tests/test_android_toolkit_migration.py b/server/tests/test_android_toolkit_migration.pynew file mode 100644index 00000000..2a3b30fd--- /dev/null+++ b/server/tests/test_android_toolkit_migration.py@@ -0,0 +1,65 @@+from services.workflow_migrations import normalize_legacy_android_toolkit+++def _node(node_id, node_type):+ return {"id": node_id, "type": node_type, "data": {"label": node_id}}+++def test_legacy_android_toolkit_becomes_direct_agent_tool_edges():+ nodes = [+ _node("battery", "batteryMonitor"),+ _node("location", "location"),+ _node("toolkit", "androidTool"),+ _node("android", "android_agent"),+ _node("custom", "aiAgent"),+ ]+ edges = [+ {"id": "a", "source": "battery", "target": "toolkit", "targetHandle": "input-main"},+ {"id": "b", "source": "location", "target": "toolkit", "target_handle": "input-main"},+ {"id": "c", "source": "toolkit", "target": "android", "targetHandle": "input-tools"},+ {"id": "d", "source": "toolkit", "target": "custom", "target_handle": "input-tools"},+ ]++ migrated_nodes, migrated_edges, params, warnings = normalize_legacy_android_toolkit(+ nodes, edges, {"toolkit": {"old": True}, "battery": {"action": "status"}}+ )++ assert "toolkit" not in {node["id"] for node in migrated_nodes}+ assert "toolkit" not in params+ assert params["battery"] == {"action": "status"}+ assert warnings == []+ assert {+ (edge["source"], edge["target"], edge["targetHandle"])+ for edge in migrated_edges+ } == {+ ("battery", "android", "input-tools"),+ ("battery", "custom", "input-tools"),+ ("location", "android", "input-tools"),+ ("location", "custom", "input-tools"),+ }+++def test_migration_is_idempotent_and_deduplicates_direct_edges():+ nodes = [_node("battery", "batteryMonitor"), _node("toolkit", "androidTool"), _node("agent", "aiAgent")]+ edges = [+ {"source": "battery", "target": "toolkit"},+ {"source": "toolkit", "target": "agent", "targetHandle": "input-tools"},+ {"id": "direct", "source": "battery", "target": "agent", "targetHandle": "input-tools"},+ ]+ first = normalize_legacy_android_toolkit(nodes, edges)+ second = normalize_legacy_android_toolkit(first[0], first[1], first[2])++ assert first[:3] == second[:3]+ assert len(first[1]) == 1+ assert first[1][0]["id"] == "direct"+++def test_orphan_toolkit_is_removed_with_warning_and_non_android_inputs_are_not_rewired():+ nodes = [_node("http", "httpRequest"), _node("toolkit", "androidTool")]+ edges = [{"source": "http", "target": "toolkit"}]++ migrated_nodes, migrated_edges, _, warnings = normalize_legacy_android_toolkit(nodes, edges)++ assert migrated_nodes == [nodes[0]]+ assert migrated_edges == []+ assert warnings and "without a valid destination agent" in warnings[0]diff --git a/server/tests/test_node_spec.py b/server/tests/test_node_spec.pyindex 88271445..f0eb31b3 100644--- a/server/tests/test_node_spec.py+++ b/server/tests/test_node_spec.py@@ -531,6 +531,11 @@ class TestPhase5NodeGroups:for expected in ["agent", "trigger", "tool", "model", "android", "social"]:assert expected in groups, f"Missing group {expected!r}"+ def test_android_group_is_visible_in_normal_mode(self):+ from services.node_spec import list_node_groups++ assert list_node_groups()["android"]["visibility"] == "normal"+def test_tool_group_includes_known_tools(self):from services.node_spec import list_node_groupsdiff --git a/server/tests/test_tool_registry.py b/server/tests/test_tool_registry.pyindex 3113bb0c..c19a68d0 100644--- a/server/tests/test_tool_registry.py+++ b/server/tests/test_tool_registry.py@@ -2,7 +2,7 @@`DEFAULT_TOOL_DESCRIPTIONS` out of `services/ai.py` into per-plugin`tool_name` / `tool_description` ClassVars + a small `_PSEUDO_TOOL_FALLBACK`for the two non-class pseudo-types (`_builtin_check_delegated_tasks`,-`androidTool`).+the built-in delegated-task status helper).Three contracts locked:@@ -58,15 +58,13 @@ def test_legacy_tool_dicts_removed():assert "DEFAULT_TOOL_DESCRIPTIONS = {" not in source, "Pre-D5 DEFAULT_TOOL_DESCRIPTIONS dict reintroduced into services/ai.py."-def test_pseudo_tool_fallback_has_two_entries():- """``_PSEUDO_TOOL_FALLBACK`` covers exactly the two pseudo-types.+def test_pseudo_tool_fallback_has_delegation_status_entry_only():+ """``_PSEUDO_TOOL_FALLBACK`` covers the remaining pseudo-type.Pseudo-types are dispatched by name but have no plugin class todeclare ClassVars on:- ``_builtin_check_delegated_tasks`` — internal helper for thedelegation-tracking surface in ``services/handlers/tools.py``.- - ``androidTool`` — toolkit aggregator that fans out to connected- android service plugins at LLM-tool call time.Quote-agnostic so ruff format's choice of single vs. double quotesdoesn't trip the substring check.@@ -75,7 +73,7 @@ def test_pseudo_tool_fallback_has_two_entries():assert ("'_builtin_check_delegated_tasks'" in source or '"_builtin_check_delegated_tasks"' in source), "_builtin_check_delegated_tasks missing from _PSEUDO_TOOL_FALLBACK"- assert "'androidTool'" in source or '"androidTool"' in source, "androidTool missing from _PSEUDO_TOOL_FALLBACK"+ assert "'androidTool'" not in source and '"androidTool"' not in source@pytest.mark.parametrize("node_type,expected_tool_name", list(_load_snapshot().items()))