machinaos 0.0.21 → 0.0.23

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 (60) hide show
  1. package/README.md +32 -6
  2. package/bin/cli.js +0 -0
  3. package/client/dist/assets/index-5BWZnM6b.js +703 -0
  4. package/client/dist/index.html +1 -1
  5. package/client/package.json +1 -1
  6. package/client/src/Dashboard.tsx +12 -5
  7. package/client/src/ParameterPanel.tsx +6 -5
  8. package/client/src/components/AIAgentNode.tsx +35 -16
  9. package/client/src/components/CredentialsModal.tsx +450 -5
  10. package/client/src/components/TeamMonitorNode.tsx +269 -0
  11. package/client/src/components/parameterPanel/InputSection.tsx +25 -0
  12. package/client/src/contexts/WebSocketContext.tsx +38 -0
  13. package/client/src/hooks/useApiKeys.ts +44 -0
  14. package/client/src/nodeDefinitions/specializedAgentNodes.ts +59 -3
  15. package/client/src/nodeDefinitions/twitterNodes.ts +441 -0
  16. package/client/src/nodeDefinitions/utilityNodes.ts +45 -1
  17. package/client/src/nodeDefinitions.ts +7 -1
  18. package/client/src/services/executionService.ts +4 -1
  19. package/install.sh +63 -1
  20. package/package.json +5 -2
  21. package/scripts/build.js +0 -0
  22. package/scripts/clean.js +0 -0
  23. package/scripts/daemon.js +0 -0
  24. package/scripts/docker.js +0 -0
  25. package/scripts/install.js +0 -0
  26. package/scripts/postinstall.js +29 -0
  27. package/scripts/preinstall.js +67 -0
  28. package/scripts/serve-client.js +0 -0
  29. package/scripts/start.js +0 -0
  30. package/scripts/stop.js +0 -0
  31. package/scripts/sync-version.js +0 -0
  32. package/server/Dockerfile +10 -15
  33. package/server/constants.py +20 -0
  34. package/server/core/database.py +443 -3
  35. package/server/main.py +9 -1
  36. package/server/models/database.py +112 -2
  37. package/server/pyproject.toml +3 -0
  38. package/server/requirements.txt +3 -0
  39. package/server/routers/twitter.py +390 -0
  40. package/server/routers/websocket.py +320 -0
  41. package/server/services/agent_team.py +266 -0
  42. package/server/services/ai.py +43 -0
  43. package/server/services/compaction.py +39 -4
  44. package/server/services/event_waiter.py +41 -0
  45. package/server/services/handlers/__init__.py +13 -0
  46. package/server/services/handlers/ai.py +66 -2
  47. package/server/services/handlers/tools.py +84 -0
  48. package/server/services/handlers/twitter.py +297 -0
  49. package/server/services/handlers/utility.py +91 -0
  50. package/server/services/node_executor.py +15 -1
  51. package/server/services/pricing.py +270 -0
  52. package/server/services/status_broadcaster.py +79 -0
  53. package/server/services/twitter_oauth.py +410 -0
  54. package/server/skills/social_agent/twitter-search-skill/SKILL.md +146 -0
  55. package/server/skills/social_agent/twitter-send-skill/SKILL.md +142 -0
  56. package/server/skills/social_agent/twitter-user-skill/SKILL.md +165 -0
  57. package/workflows/Zeenie_full.json +459 -0
  58. package/workflows/Zeenie_small.json +459 -0
  59. package/client/dist/assets/index-YVvAiByx.js +0 -703
  60. package/server/requirements-docker.txt +0 -86
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>React Flow Project</title>
8
- <script type="module" crossorigin src="/assets/index-YVvAiByx.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-5BWZnM6b.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-DFSC53FP.css">
10
10
  </head>
11
11
  <body>
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-flow-client",
3
3
  "private": true,
4
- "version": "0.0.21",
4
+ "version": "0.0.23",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "start": "vite --host 0.0.0.0",
@@ -18,6 +18,7 @@ import ModelNode from './components/ModelNode';
18
18
  import SquareNode from './components/SquareNode';
19
19
  import TriggerNode from './components/TriggerNode';
20
20
  import ToolkitNode from './components/ToolkitNode';
21
+ import TeamMonitorNode from './components/TeamMonitorNode';
21
22
  import ConditionalEdge from './components/ConditionalEdge';
22
23
  import NodeContextMenu from './components/ui/NodeContextMenu';
23
24
  import { nodeDefinitions } from './nodeDefinitions';
@@ -65,7 +66,7 @@ const createNodeTypes = (): Record<string, React.ComponentType<any>> => {
65
66
  const types: Record<string, React.ComponentType<any>> = {};
66
67
 
67
68
  // Trigger nodes (no input handles) - check by group or specific types
68
- const TRIGGER_NODE_TYPES = ['start', 'cronScheduler', 'webhookTrigger', 'whatsappReceive', 'chatTrigger', 'taskTrigger'];
69
+ const TRIGGER_NODE_TYPES = ['start', 'cronScheduler', 'webhookTrigger', 'whatsappReceive', 'twitterReceive', 'chatTrigger', 'taskTrigger'];
69
70
 
70
71
  // Pre-register specialized agent nodes explicitly to ensure they're always available
71
72
  // This handles cases where nodeDefinitions iteration order might miss them
@@ -90,6 +91,9 @@ const createNodeTypes = (): Record<string, React.ComponentType<any>> => {
90
91
  } else if (type === 'whatsappSend' || type === 'whatsappDb') {
91
92
  // WhatsApp action nodes use SquareNode (whatsappReceive is a trigger)
92
93
  types[type] = SquareNode;
94
+ } else if (type === 'twitterSend' || type === 'twitterSearch' || type === 'twitterUser') {
95
+ // Twitter action nodes use SquareNode (twitterReceive is a trigger)
96
+ types[type] = SquareNode;
93
97
  } else if (ANDROID_SERVICE_NODE_TYPES.includes(type)) {
94
98
  // Android service nodes use SquareNode component
95
99
  types[type] = SquareNode;
@@ -103,9 +107,12 @@ const createNodeTypes = (): Record<string, React.ComponentType<any>> => {
103
107
  // Code execution nodes use SquareNode component
104
108
  types[type] = SquareNode;
105
109
  } else if (UTILITY_NODE_TYPES.includes(type)) {
106
- // Utility nodes (HTTP, Webhooks) use SquareNode component
107
- // Note: webhookTrigger is already handled as trigger above
110
+ // Utility nodes (HTTP, Webhooks, Team Monitor) use SquareNode component
111
+ // Note: webhookTrigger and chatTrigger are already handled as triggers above
108
112
  types[type] = SquareNode;
113
+ } else if (type === 'teamMonitor') {
114
+ // Team Monitor node uses custom component with live display
115
+ types[type] = TeamMonitorNode;
109
116
  } else if (SPECIALIZED_AGENT_TYPES.includes(type)) {
110
117
  // Specialized agent nodes use AIAgentNode (rectangular card with bottom handles)
111
118
  types[type] = AIAgentNode;
@@ -651,8 +658,8 @@ const DashboardContent: React.FC = () => {
651
658
  if (!currentWorkflow) return;
652
659
 
653
660
  // Check if there's at least one trigger node (workflow entry points)
654
- // Trigger types: start, cronScheduler, webhookTrigger, whatsappReceive, workflowTrigger, chatTrigger, taskTrigger
655
- const triggerTypes = ['start', 'cronScheduler', 'webhookTrigger', 'whatsappReceive', 'workflowTrigger', 'chatTrigger', 'taskTrigger'];
661
+ // Trigger types: start, cronScheduler, webhookTrigger, whatsappReceive, twitterReceive, workflowTrigger, chatTrigger, taskTrigger
662
+ const triggerTypes = ['start', 'cronScheduler', 'webhookTrigger', 'whatsappReceive', 'twitterReceive', 'workflowTrigger', 'chatTrigger', 'taskTrigger'];
656
663
  const hasTriggerNode = nodes.some(node => triggerTypes.includes(node.type || ''));
657
664
  if (!hasTriggerNode) {
658
665
  alert('No trigger node found in workflow.\n\nAdd a trigger node (Cron Scheduler, WhatsApp Receive, Webhook, Chat Trigger, etc.) to begin deployment.');
@@ -116,9 +116,10 @@ const ParameterPanel: React.FC = () => {
116
116
  const canExecute = selectedNode && nodeDefinition &&
117
117
  ExecutionService.isNodeTypeSupported(nodeDefinition.name);
118
118
 
119
- // Check if this is a Start node or Skill node (only show middle section)
119
+ // Check if this is a Start node, Skill node, or Monitor node (only show middle section)
120
120
  const isStartNode = nodeDefinition?.name === 'start';
121
121
  const isSkillNode = nodeDefinition?.name && SKILL_NODE_TYPES.includes(nodeDefinition.name);
122
+ const isMonitorNode = nodeDefinition?.name === 'teamMonitor';
122
123
 
123
124
  if (!selectedNode || !nodeDefinition) {
124
125
  return null;
@@ -190,8 +191,8 @@ const ParameterPanel: React.FC = () => {
190
191
 
191
192
  {/* Buttons: Run, Save, Cancel */}
192
193
  <div style={{ display: 'flex', gap: '8px', alignItems: 'center' }}>
193
- {/* Run Button */}
194
- {canExecute && (
194
+ {/* Run Button - hide for monitor nodes since they show live data */}
195
+ {canExecute && !isMonitorNode && (
195
196
  <button
196
197
  style={actionButtonStyle(theme.dracula.green, isExecuting)}
197
198
  onClick={handleRun}
@@ -292,8 +293,8 @@ const ParameterPanel: React.FC = () => {
292
293
  onParameterChange={handleParameterChange}
293
294
  executionResults={executionResults}
294
295
  onClearResults={handleClearResults}
295
- showInputSection={!isStartNode && !isSkillNode}
296
- showOutputSection={!isStartNode && !isSkillNode}
296
+ showInputSection={!isStartNode && !isSkillNode && !isMonitorNode}
297
+ showOutputSection={!isStartNode && !isSkillNode && !isMonitorNode}
297
298
  isLoadingParameters={isLoading}
298
299
  />
299
300
  </Modal>
@@ -70,7 +70,7 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
70
70
  { id: 'input-task', label: 'Task', position: '85%' },
71
71
  ],
72
72
  topOutputHandle: { id: 'output-top', label: 'Output' },
73
- width: 260,
73
+ width: 300,
74
74
  height: 200,
75
75
  },
76
76
  chatAgent: {
@@ -87,7 +87,7 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
87
87
  { id: 'input-task', label: 'Task', position: '85%' },
88
88
  ],
89
89
  topOutputHandle: { id: 'output-top', label: 'Output' },
90
- width: 260,
90
+ width: 300,
91
91
  height: 200,
92
92
  },
93
93
  socialReceive: {
@@ -135,7 +135,7 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
135
135
  { id: 'input-task', label: 'Task', position: '85%' },
136
136
  ],
137
137
  topOutputHandle: { id: 'output-top', label: 'Output' },
138
- width: 260,
138
+ width: 300,
139
139
  height: 200,
140
140
  },
141
141
  coding_agent: {
@@ -152,7 +152,7 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
152
152
  { id: 'input-task', label: 'Task', position: '85%' },
153
153
  ],
154
154
  topOutputHandle: { id: 'output-top', label: 'Output' },
155
- width: 260,
155
+ width: 300,
156
156
  height: 200,
157
157
  },
158
158
  web_agent: {
@@ -169,7 +169,7 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
169
169
  { id: 'input-task', label: 'Task', position: '85%' },
170
170
  ],
171
171
  topOutputHandle: { id: 'output-top', label: 'Output' },
172
- width: 260,
172
+ width: 300,
173
173
  height: 200,
174
174
  },
175
175
  task_agent: {
@@ -186,7 +186,7 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
186
186
  { id: 'input-task', label: 'Task', position: '85%' },
187
187
  ],
188
188
  topOutputHandle: { id: 'output-top', label: 'Output' },
189
- width: 260,
189
+ width: 300,
190
190
  height: 200,
191
191
  },
192
192
  social_agent: {
@@ -203,7 +203,7 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
203
203
  { id: 'input-task', label: 'Task', position: '85%' },
204
204
  ],
205
205
  topOutputHandle: { id: 'output-top', label: 'Output' },
206
- width: 260,
206
+ width: 300,
207
207
  height: 200,
208
208
  },
209
209
  travel_agent: {
@@ -220,7 +220,7 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
220
220
  { id: 'input-task', label: 'Task', position: '85%' },
221
221
  ],
222
222
  topOutputHandle: { id: 'output-top', label: 'Output' },
223
- width: 260,
223
+ width: 300,
224
224
  height: 200,
225
225
  },
226
226
  tool_agent: {
@@ -237,7 +237,7 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
237
237
  { id: 'input-task', label: 'Task', position: '85%' },
238
238
  ],
239
239
  topOutputHandle: { id: 'output-top', label: 'Output' },
240
- width: 260,
240
+ width: 300,
241
241
  height: 200,
242
242
  },
243
243
  productivity_agent: {
@@ -254,7 +254,7 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
254
254
  { id: 'input-task', label: 'Task', position: '85%' },
255
255
  ],
256
256
  topOutputHandle: { id: 'output-top', label: 'Output' },
257
- width: 260,
257
+ width: 300,
258
258
  height: 200,
259
259
  },
260
260
  payments_agent: {
@@ -271,7 +271,7 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
271
271
  { id: 'input-task', label: 'Task', position: '85%' },
272
272
  ],
273
273
  topOutputHandle: { id: 'output-top', label: 'Output' },
274
- width: 260,
274
+ width: 300,
275
275
  height: 200,
276
276
  },
277
277
  consumer_agent: {
@@ -288,7 +288,7 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
288
288
  { id: 'input-task', label: 'Task', position: '85%' },
289
289
  ],
290
290
  topOutputHandle: { id: 'output-top', label: 'Output' },
291
- width: 260,
291
+ width: 300,
292
292
  height: 200,
293
293
  },
294
294
  autonomous_agent: {
@@ -305,7 +305,7 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
305
305
  { id: 'input-task', label: 'Task', position: '85%' },
306
306
  ],
307
307
  topOutputHandle: { id: 'output-top', label: 'Output' },
308
- width: 260,
308
+ width: 300,
309
309
  height: 200,
310
310
  },
311
311
  orchestrator_agent: {
@@ -314,15 +314,34 @@ const AGENT_CONFIGS: Record<string, AgentConfig> = {
314
314
  subtitle: 'Agent Coordination',
315
315
  themeColorKey: 'cyan',
316
316
  bottomHandles: [
317
- { id: 'input-skill', label: 'Skill', position: '25%' },
318
- { id: 'input-tools', label: 'Tool', position: '75%' },
317
+ { id: 'input-skill', label: 'Skill', position: '20%' },
318
+ { id: 'input-tools', label: 'Tool', position: '50%' },
319
+ { id: 'input-teammates', label: 'Team', position: '80%' },
319
320
  ],
320
321
  leftHandles: [
321
322
  { id: 'input-memory', label: 'Memory', position: '65%' },
322
323
  { id: 'input-task', label: 'Task', position: '85%' },
323
324
  ],
324
325
  topOutputHandle: { id: 'output-top', label: 'Output' },
325
- width: 260,
326
+ width: 300,
327
+ height: 200,
328
+ },
329
+ ai_employee: {
330
+ icon: <span style={{ fontSize: '28px' }}>👥</span>,
331
+ title: 'AI Employee',
332
+ subtitle: 'Team Orchestration',
333
+ themeColorKey: 'purple',
334
+ bottomHandles: [
335
+ { id: 'input-skill', label: 'Skill', position: '20%' },
336
+ { id: 'input-tools', label: 'Tool', position: '50%' },
337
+ { id: 'input-teammates', label: 'Team', position: '80%' },
338
+ ],
339
+ leftHandles: [
340
+ { id: 'input-memory', label: 'Memory', position: '65%' },
341
+ { id: 'input-task', label: 'Task', position: '85%' },
342
+ ],
343
+ topOutputHandle: { id: 'output-top', label: 'Output' },
344
+ width: 300,
326
345
  height: 200,
327
346
  },
328
347
  };