machinaos 0.0.10 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/.env.template +16 -0
  2. package/client/package.json +1 -1
  3. package/client/src/Dashboard.tsx +3 -3
  4. package/client/src/components/AIAgentNode.tsx +24 -12
  5. package/client/src/components/OutputPanel.tsx +3 -2
  6. package/client/src/components/parameterPanel/InputSection.tsx +16 -3
  7. package/client/src/nodeDefinitions/aiAgentNodes.ts +12 -0
  8. package/client/src/nodeDefinitions/specializedAgentNodes.ts +68 -320
  9. package/client/src/nodeDefinitions/toolNodes.ts +87 -1
  10. package/client/src/nodeDefinitions/workflowNodes.ts +55 -1
  11. package/package.json +12 -3
  12. package/scripts/daemon.js +427 -0
  13. package/scripts/start.js +7 -1
  14. package/scripts/sync-version.js +108 -0
  15. package/server/Dockerfile +6 -7
  16. package/server/constants.py +2 -0
  17. package/server/core/cleanup.py +123 -0
  18. package/server/core/config.py +16 -0
  19. package/server/core/database.py +92 -1
  20. package/server/core/health.py +121 -0
  21. package/server/examples/__init__.py +1 -0
  22. package/server/gunicorn.conf.py +46 -0
  23. package/server/main.py +38 -3
  24. package/server/models/database.py +1 -0
  25. package/server/models/nodes.py +18 -2
  26. package/server/requirements-docker.txt +86 -0
  27. package/server/routers/database.py +16 -0
  28. package/server/routers/websocket.py +6 -5
  29. package/server/services/ai.py +115 -14
  30. package/server/services/auth.py +6 -1
  31. package/server/services/deployment/manager.py +14 -0
  32. package/server/services/event_waiter.py +55 -0
  33. package/server/services/example_loader.py +60 -0
  34. package/server/services/execution/executor.py +2 -0
  35. package/server/services/execution/models.py +8 -0
  36. package/server/services/handlers/__init__.py +2 -0
  37. package/server/services/handlers/ai.py +164 -11
  38. package/server/services/handlers/document.py +13 -4
  39. package/server/services/handlers/tools.py +445 -14
  40. package/server/services/node_executor.py +3 -0
  41. package/server/services/temporal/activities.py +3 -0
  42. package/server/services/workflow.py +2 -0
  43. package/server/skills/android_agent/app-launcher-skill/SKILL.md +137 -0
  44. package/server/skills/android_agent/app-list-skill/SKILL.md +148 -0
  45. package/server/skills/android_agent/audio-skill/SKILL.md +169 -0
  46. package/server/skills/android_agent/battery-skill/SKILL.md +114 -0
  47. package/server/skills/android_agent/bluetooth-skill/SKILL.md +151 -0
  48. package/server/skills/android_agent/camera-skill/SKILL.md +148 -0
  49. package/server/skills/android_agent/environmental-skill/SKILL.md +140 -0
  50. package/server/skills/android_agent/location-skill/SKILL.md +163 -0
  51. package/server/skills/android_agent/motion-skill/SKILL.md +141 -0
  52. package/server/skills/android_agent/screen-control-skill/SKILL.md +164 -0
  53. package/server/skills/android_agent/wifi-skill/SKILL.md +182 -0
  54. package/server/skills/assistant/subagent-skill/SKILL.md +205 -0
  55. package/server/skills/coding_agent/javascript-skill/SKILL.md +196 -0
  56. package/server/skills/coding_agent/python-skill/SKILL.md +165 -0
  57. package/server/skills/social_agent/whatsapp-db-skill/SKILL.md +284 -0
  58. package/server/skills/social_agent/whatsapp-send-skill/SKILL.md +180 -0
  59. package/server/skills/task_agent/cron-scheduler-skill/SKILL.md +215 -0
  60. package/server/skills/task_agent/task-manager-skill/SKILL.md +251 -0
  61. package/server/skills/task_agent/timer-skill/SKILL.md +168 -0
  62. package/server/skills/travel_agent/geocoding-skill/SKILL.md +186 -0
  63. package/server/skills/travel_agent/nearby-places-skill/SKILL.md +234 -0
  64. package/server/skills/web_agent/http-request-skill/SKILL.md +211 -0
  65. package/server/skills/android/skill/SKILL.md +0 -84
  66. package/server/skills/assistant/code-skill/SKILL.md +0 -176
  67. package/server/skills/assistant/http-skill/SKILL.md +0 -163
  68. package/server/skills/assistant/maps-skill/SKILL.md +0 -172
  69. package/server/skills/assistant/scheduler-skill/SKILL.md +0 -86
  70. package/server/skills/assistant/whatsapp-skill/SKILL.md +0 -285
  71. /package/server/skills/{android → android_agent}/personality/SKILL.md +0 -0
  72. /package/server/skills/{assistant → web_agent}/web-search-skill/SKILL.md +0 -0
package/.env.template CHANGED
@@ -57,6 +57,22 @@ MAPS_TIMEOUT=30
57
57
  # Health Check
58
58
  HEALTH_CHECK_INTERVAL=60
59
59
 
60
+ # Cleanup Configuration (for long-running daemon)
61
+ CLEANUP_ENABLED=true
62
+ CLEANUP_INTERVAL=3600
63
+ CLEANUP_LOGS_MAX_COUNT=1000
64
+ CLEANUP_CACHE_MAX_AGE_HOURS=24
65
+
66
+ # Feature Toggles
67
+ WS_LOGGING_ENABLED=true
68
+
69
+ # Gunicorn Configuration (for production deployment)
70
+ # GUNICORN_TIMEOUT=120
71
+ # GUNICORN_GRACEFUL_TIMEOUT=30
72
+ # GUNICORN_KEEPALIVE=5
73
+ # GUNICORN_MAX_REQUESTS=10000
74
+ # GUNICORN_MAX_REQUESTS_JITTER=1000
75
+
60
76
  # WebSocket Configuration (For remote Android device connections)
61
77
  WEBSOCKET_URL=
62
78
  WEBSOCKET_API_KEY=
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-flow-client",
3
3
  "private": true,
4
- "version": "0.0.0",
4
+ "version": "0.0.13",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "start": "vite --host 0.0.0.0",
@@ -65,7 +65,7 @@ const createNodeTypes = (): Record<string, React.ComponentType<any>> => {
65
65
  const types: Record<string, React.ComponentType<any>> = {};
66
66
 
67
67
  // Trigger nodes (no input handles) - check by group or specific types
68
- const TRIGGER_NODE_TYPES = ['start', 'cronScheduler', 'webhookTrigger', 'whatsappReceive', 'chatTrigger'];
68
+ const TRIGGER_NODE_TYPES = ['start', 'cronScheduler', 'webhookTrigger', 'whatsappReceive', 'chatTrigger', 'taskTrigger'];
69
69
 
70
70
  // Pre-register specialized agent nodes explicitly to ensure they're always available
71
71
  // This handles cases where nodeDefinitions iteration order might miss them
@@ -651,8 +651,8 @@ const DashboardContent: React.FC = () => {
651
651
  if (!currentWorkflow) return;
652
652
 
653
653
  // Check if there's at least one trigger node (workflow entry points)
654
- // Trigger types: start, cronScheduler, webhookTrigger, whatsappReceive, workflowTrigger, chatTrigger
655
- const triggerTypes = ['start', 'cronScheduler', 'webhookTrigger', 'whatsappReceive', 'workflowTrigger', 'chatTrigger'];
654
+ // Trigger types: start, cronScheduler, webhookTrigger, whatsappReceive, workflowTrigger, chatTrigger, taskTrigger
655
+ const triggerTypes = ['start', 'cronScheduler', 'webhookTrigger', 'whatsappReceive', 'workflowTrigger', 'chatTrigger', 'taskTrigger'];
656
656
  const hasTriggerNode = nodes.some(node => triggerTypes.includes(node.type || ''));
657
657
  if (!hasTriggerNode) {
658
658
  alert('No trigger node found in workflow.\n\nAdd a trigger node (Cron Scheduler, WhatsApp Receive, Webhook, Chat Trigger, etc.) to begin deployment.');
@@ -66,7 +66,8 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
66
66
  { id: 'input-tools', label: 'Tool', position: '75%' },
67
67
  ],
68
68
  leftHandles: [
69
- { id: 'input-memory', label: 'Memory', position: '70%' },
69
+ { id: 'input-memory', label: 'Memory', position: '55%' },
70
+ { id: 'input-task', label: 'Task', position: '85%' },
70
71
  ],
71
72
  topOutputHandle: { id: 'output-top', label: 'Output' },
72
73
  width: 260,
@@ -82,7 +83,8 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
82
83
  { id: 'input-tools', label: 'Tool', position: '75%' },
83
84
  ],
84
85
  leftHandles: [
85
- { id: 'input-memory', label: 'Memory', position: '70%' },
86
+ { id: 'input-memory', label: 'Memory', position: '55%' },
87
+ { id: 'input-task', label: 'Task', position: '85%' },
86
88
  ],
87
89
  width: 260,
88
90
  height: 160,
@@ -128,7 +130,8 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
128
130
  { id: 'input-tools', label: 'Tool', position: '75%' },
129
131
  ],
130
132
  leftHandles: [
131
- { id: 'input-memory', label: 'Memory', position: '70%' },
133
+ { id: 'input-memory', label: 'Memory', position: '55%' },
134
+ { id: 'input-task', label: 'Task', position: '85%' },
132
135
  ],
133
136
  topOutputHandle: { id: 'output-top', label: 'Output' },
134
137
  width: 260,
@@ -144,7 +147,8 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
144
147
  { id: 'input-tools', label: 'Tool', position: '75%' },
145
148
  ],
146
149
  leftHandles: [
147
- { id: 'input-memory', label: 'Memory', position: '70%' },
150
+ { id: 'input-memory', label: 'Memory', position: '55%' },
151
+ { id: 'input-task', label: 'Task', position: '85%' },
148
152
  ],
149
153
  topOutputHandle: { id: 'output-top', label: 'Output' },
150
154
  width: 260,
@@ -160,7 +164,8 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
160
164
  { id: 'input-tools', label: 'Tool', position: '75%' },
161
165
  ],
162
166
  leftHandles: [
163
- { id: 'input-memory', label: 'Memory', position: '70%' },
167
+ { id: 'input-memory', label: 'Memory', position: '55%' },
168
+ { id: 'input-task', label: 'Task', position: '85%' },
164
169
  ],
165
170
  topOutputHandle: { id: 'output-top', label: 'Output' },
166
171
  width: 260,
@@ -176,7 +181,8 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
176
181
  { id: 'input-tools', label: 'Tool', position: '75%' },
177
182
  ],
178
183
  leftHandles: [
179
- { id: 'input-memory', label: 'Memory', position: '70%' },
184
+ { id: 'input-memory', label: 'Memory', position: '55%' },
185
+ { id: 'input-task', label: 'Task', position: '85%' },
180
186
  ],
181
187
  topOutputHandle: { id: 'output-top', label: 'Output' },
182
188
  width: 260,
@@ -192,7 +198,8 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
192
198
  { id: 'input-tools', label: 'Tool', position: '75%' },
193
199
  ],
194
200
  leftHandles: [
195
- { id: 'input-memory', label: 'Memory', position: '70%' },
201
+ { id: 'input-memory', label: 'Memory', position: '55%' },
202
+ { id: 'input-task', label: 'Task', position: '85%' },
196
203
  ],
197
204
  topOutputHandle: { id: 'output-top', label: 'Output' },
198
205
  width: 260,
@@ -208,7 +215,8 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
208
215
  { id: 'input-tools', label: 'Tool', position: '75%' },
209
216
  ],
210
217
  leftHandles: [
211
- { id: 'input-memory', label: 'Memory', position: '70%' },
218
+ { id: 'input-memory', label: 'Memory', position: '55%' },
219
+ { id: 'input-task', label: 'Task', position: '85%' },
212
220
  ],
213
221
  topOutputHandle: { id: 'output-top', label: 'Output' },
214
222
  width: 260,
@@ -224,7 +232,8 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
224
232
  { id: 'input-tools', label: 'Tool', position: '75%' },
225
233
  ],
226
234
  leftHandles: [
227
- { id: 'input-memory', label: 'Memory', position: '70%' },
235
+ { id: 'input-memory', label: 'Memory', position: '55%' },
236
+ { id: 'input-task', label: 'Task', position: '85%' },
228
237
  ],
229
238
  topOutputHandle: { id: 'output-top', label: 'Output' },
230
239
  width: 260,
@@ -240,7 +249,8 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
240
249
  { id: 'input-tools', label: 'Tool', position: '75%' },
241
250
  ],
242
251
  leftHandles: [
243
- { id: 'input-memory', label: 'Memory', position: '70%' },
252
+ { id: 'input-memory', label: 'Memory', position: '55%' },
253
+ { id: 'input-task', label: 'Task', position: '85%' },
244
254
  ],
245
255
  topOutputHandle: { id: 'output-top', label: 'Output' },
246
256
  width: 260,
@@ -256,7 +266,8 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
256
266
  { id: 'input-tools', label: 'Tool', position: '75%' },
257
267
  ],
258
268
  leftHandles: [
259
- { id: 'input-memory', label: 'Memory', position: '70%' },
269
+ { id: 'input-memory', label: 'Memory', position: '55%' },
270
+ { id: 'input-task', label: 'Task', position: '85%' },
260
271
  ],
261
272
  topOutputHandle: { id: 'output-top', label: 'Output' },
262
273
  width: 260,
@@ -272,7 +283,8 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
272
283
  { id: 'input-tools', label: 'Tool', position: '75%' },
273
284
  ],
274
285
  leftHandles: [
275
- { id: 'input-memory', label: 'Memory', position: '70%' },
286
+ { id: 'input-memory', label: 'Memory', position: '55%' },
287
+ { id: 'input-task', label: 'Task', position: '85%' },
276
288
  ],
277
289
  topOutputHandle: { id: 'output-top', label: 'Output' },
278
290
  width: 260,
@@ -177,9 +177,10 @@ const OutputPanel: React.FC<OutputPanelProps> = ({ nodeId }) => {
177
177
  // Helper to check if a handle is a config/auxiliary handle (not main data flow)
178
178
  const isConfigHandle = (handle: string | null | undefined): boolean => {
179
179
  if (!handle) return false;
180
- // Config handles follow pattern: input-<type> where type is not 'main'
180
+ // Config handles follow pattern: input-<type> where type is not 'main', 'chat', or 'task'
181
181
  // Examples: input-memory, input-tools, input-model
182
- if (handle.startsWith('input-') && handle !== 'input-main') {
182
+ // Non-config (data flow) handles: input-main, input-chat, input-task
183
+ if (handle.startsWith('input-') && handle !== 'input-main' && handle !== 'input-chat' && handle !== 'input-task') {
183
184
  return true;
184
185
  }
185
186
  return false;
@@ -60,10 +60,11 @@ const InputSection: React.FC<InputSectionProps> = ({ nodeId, visible = true }) =
60
60
  // Helper to check if a handle is a config/auxiliary handle (not main data flow)
61
61
  const isConfigHandle = (handle: string | null | undefined): boolean => {
62
62
  if (!handle) return false;
63
- // Config handles follow pattern: input-<type> where type is not 'main' or 'chat'
63
+ // Config handles follow pattern: input-<type> where type is not 'main', 'chat', or 'task'
64
64
  // Examples: input-memory, input-tools, input-model, input-skill
65
- // Non-config (primary data) handles: input-main, input-chat
66
- if (handle.startsWith('input-') && handle !== 'input-main' && handle !== 'input-chat') {
65
+ // Non-config (primary data) handles: input-main, input-chat, input-task
66
+ // Note: input-task is for taskTrigger node output which should be visible as draggable variables
67
+ if (handle.startsWith('input-') && handle !== 'input-main' && handle !== 'input-chat' && handle !== 'input-task') {
67
68
  return true;
68
69
  }
69
70
  return false;
@@ -379,6 +380,16 @@ const InputSection: React.FC<InputSectionProps> = ({ nodeId, visible = true }) =
379
380
  timestamp: 'string',
380
381
  session_id: 'string'
381
382
  },
383
+ taskTrigger: {
384
+ task_id: 'string',
385
+ status: 'string', // 'completed' or 'error'
386
+ agent_name: 'string',
387
+ agent_node_id: 'string',
388
+ parent_node_id: 'string',
389
+ result: 'string', // Present when status='completed'
390
+ error: 'string', // Present when status='error'
391
+ workflow_id: 'string',
392
+ },
382
393
  // Social nodes schema (4 output handles)
383
394
  social: {
384
395
  // Output 1: message text for LLM input
@@ -487,6 +498,7 @@ const InputSection: React.FC<InputSectionProps> = ({ nodeId, visible = true }) =
487
498
  const isCodeExecutor = isPython || isJavaScript;
488
499
  const isCronScheduler = nodeType === 'cronScheduler';
489
500
  const isChatTrigger = nodeType === 'chatTrigger';
501
+ const isTaskTrigger = nodeType === 'taskTrigger';
490
502
  const isSocialReceive = nodeType === 'socialReceive';
491
503
  const isSocialSend = nodeType === 'socialSend';
492
504
 
@@ -528,6 +540,7 @@ const InputSection: React.FC<InputSectionProps> = ({ nodeId, visible = true }) =
528
540
  isCodeExecutor ? sampleSchemas.python :
529
541
  isCronScheduler ? sampleSchemas.cronScheduler :
530
542
  isChatTrigger ? sampleSchemas.chatTrigger :
543
+ isTaskTrigger ? sampleSchemas.taskTrigger :
531
544
  isSocialReceive ? sampleSchemas.social :
532
545
  isSocialSend ? sampleSchemas.socialSend :
533
546
  { data: 'any' };
@@ -43,6 +43,12 @@ export const aiAgentNodes: Record<string, INodeTypeDescription> = {
43
43
  displayName: 'Tool',
44
44
  type: 'main' as NodeConnectionType,
45
45
  description: 'Tool nodes for agent capabilities'
46
+ },
47
+ {
48
+ name: 'task',
49
+ displayName: 'Task',
50
+ type: 'main' as NodeConnectionType,
51
+ description: 'Task completion events from taskTrigger'
46
52
  }
47
53
  ],
48
54
  outputs: [{
@@ -199,6 +205,12 @@ export const aiAgentNodes: Record<string, INodeTypeDescription> = {
199
205
  displayName: 'Tool',
200
206
  type: 'main' as NodeConnectionType,
201
207
  description: 'Tool nodes (httpRequest, etc.) for LangGraph tool calling'
208
+ },
209
+ {
210
+ name: 'task',
211
+ displayName: 'Task',
212
+ type: 'main' as NodeConnectionType,
213
+ description: 'Task completion events from taskTrigger'
202
214
  }
203
215
  ],
204
216
  outputs: [{