machinaos 0.0.10 → 0.0.12
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.
- package/.env.template +16 -0
- package/client/package.json +1 -1
- package/client/src/Dashboard.tsx +3 -3
- package/client/src/components/AIAgentNode.tsx +24 -12
- package/client/src/components/parameterPanel/InputSection.tsx +12 -0
- package/client/src/nodeDefinitions/aiAgentNodes.ts +12 -0
- package/client/src/nodeDefinitions/specializedAgentNodes.ts +68 -320
- package/client/src/nodeDefinitions/toolNodes.ts +87 -1
- package/client/src/nodeDefinitions/workflowNodes.ts +55 -1
- package/package.json +12 -3
- package/scripts/daemon.js +427 -0
- package/scripts/start.js +7 -1
- package/scripts/sync-version.js +108 -0
- package/server/Dockerfile +6 -7
- package/server/constants.py +2 -0
- package/server/core/cleanup.py +123 -0
- package/server/core/config.py +16 -0
- package/server/core/database.py +92 -1
- package/server/core/health.py +121 -0
- package/server/examples/__init__.py +1 -0
- package/server/gunicorn.conf.py +46 -0
- package/server/main.py +38 -3
- package/server/models/database.py +1 -0
- package/server/models/nodes.py +18 -2
- package/server/requirements-docker.txt +86 -0
- package/server/routers/database.py +16 -0
- package/server/routers/websocket.py +1 -0
- package/server/services/ai.py +90 -14
- package/server/services/auth.py +6 -1
- package/server/services/event_waiter.py +55 -0
- package/server/services/example_loader.py +60 -0
- package/server/services/handlers/__init__.py +2 -0
- package/server/services/handlers/ai.py +116 -11
- package/server/services/handlers/document.py +13 -4
- package/server/services/handlers/tools.py +346 -12
- package/server/services/node_executor.py +3 -0
- package/server/services/temporal/activities.py +3 -0
- package/server/services/workflow.py +2 -0
- package/server/skills/assistant/subagent-skill/SKILL.md +173 -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=
|
package/client/package.json
CHANGED
package/client/src/Dashboard.tsx
CHANGED
|
@@ -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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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,
|
|
@@ -379,6 +379,16 @@ const InputSection: React.FC<InputSectionProps> = ({ nodeId, visible = true }) =
|
|
|
379
379
|
timestamp: 'string',
|
|
380
380
|
session_id: 'string'
|
|
381
381
|
},
|
|
382
|
+
taskTrigger: {
|
|
383
|
+
task_id: 'string',
|
|
384
|
+
status: 'string', // 'completed' or 'error'
|
|
385
|
+
agent_name: 'string',
|
|
386
|
+
agent_node_id: 'string',
|
|
387
|
+
parent_node_id: 'string',
|
|
388
|
+
result: 'string', // Present when status='completed'
|
|
389
|
+
error: 'string', // Present when status='error'
|
|
390
|
+
workflow_id: 'string',
|
|
391
|
+
},
|
|
382
392
|
// Social nodes schema (4 output handles)
|
|
383
393
|
social: {
|
|
384
394
|
// Output 1: message text for LLM input
|
|
@@ -487,6 +497,7 @@ const InputSection: React.FC<InputSectionProps> = ({ nodeId, visible = true }) =
|
|
|
487
497
|
const isCodeExecutor = isPython || isJavaScript;
|
|
488
498
|
const isCronScheduler = nodeType === 'cronScheduler';
|
|
489
499
|
const isChatTrigger = nodeType === 'chatTrigger';
|
|
500
|
+
const isTaskTrigger = nodeType === 'taskTrigger';
|
|
490
501
|
const isSocialReceive = nodeType === 'socialReceive';
|
|
491
502
|
const isSocialSend = nodeType === 'socialSend';
|
|
492
503
|
|
|
@@ -528,6 +539,7 @@ const InputSection: React.FC<InputSectionProps> = ({ nodeId, visible = true }) =
|
|
|
528
539
|
isCodeExecutor ? sampleSchemas.python :
|
|
529
540
|
isCronScheduler ? sampleSchemas.cronScheduler :
|
|
530
541
|
isChatTrigger ? sampleSchemas.chatTrigger :
|
|
542
|
+
isTaskTrigger ? sampleSchemas.taskTrigger :
|
|
531
543
|
isSocialReceive ? sampleSchemas.social :
|
|
532
544
|
isSocialSend ? sampleSchemas.socialSend :
|
|
533
545
|
{ 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: [{
|