Skip to content

Self-improving AI Employees for everyone

feat(schema): Wave 8 - slim utilityNodes + schedulerNodes (-277 LOC)

trohitgae33804ebff0
diff --git a/client/src/nodeDefinitions/schedulerNodes.ts b/client/src/nodeDefinitions/schedulerNodes.ts
index bd19ace9..414c76d9 100644
--- a/client/src/nodeDefinitions/schedulerNodes.ts
+++ b/client/src/nodeDefinitions/schedulerNodes.ts
@@ -32,32 +32,8 @@ export const schedulerNodes: Record<string, INodeTypeDescription> = {
description: 'Connect to AI Agent tool handle'
}
],
- properties: [
- {
- displayName: 'Duration',
- name: 'duration',
- type: 'number',
- default: 5,
- required: true,
- description: 'How long to wait',
- typeOptions: {
- minValue: 1,
- maxValue: 3600
- }
- },
- {
- displayName: 'Unit',
- name: 'unit',
- type: 'options',
- default: 'seconds',
- options: [
- { name: 'Seconds', value: 'seconds' },
- { name: 'Minutes', value: 'minutes' },
- { name: 'Hours', value: 'hours' }
- ],
- description: 'Time unit for duration'
- }
- ]
+ // Wave 8: schema lives on backend (WorkflowTriggerParams).
+ properties: [],
},
// Cron Scheduler - Recurring scheduled execution
@@ -85,152 +61,11 @@ export const schedulerNodes: Record<string, INodeTypeDescription> = {
description: 'Connect to AI Agent tool handle'
}
],
- properties: [
- // Duration Type
- {
- displayName: 'Duration',
- name: 'frequency',
- type: 'options',
- default: 'minutes',
- options: [
- { name: 'Seconds', value: 'seconds' },
- { name: 'Minutes', value: 'minutes' },
- { name: 'Hours', value: 'hours' },
- { name: 'Days', value: 'days' },
- { name: 'Weeks', value: 'weeks' },
- { name: 'Months', value: 'months' },
- { name: 'Once (No Repeat)', value: 'once' },
- ],
- description: 'Wait duration before triggering'
- },
- // Interval for seconds/minutes/hours
- {
- displayName: 'Interval',
- name: 'interval',
- type: 'number',
- default: 30,
- description: 'Run every X seconds (5-59)',
- displayOptions: { show: { frequency: ['seconds'] } }
- },
- {
- displayName: 'Interval',
- name: 'interval_minutes',
- type: 'number',
- default: 5,
- description: 'Run every X minutes (1-59)',
- displayOptions: { show: { frequency: ['minutes'] } }
- },
- {
- displayName: 'Interval',
- name: 'interval_hours',
- type: 'number',
- default: 1,
- description: 'Run every X hours (1-23)',
- displayOptions: { show: { frequency: ['hours'] } }
- },
- // Time for daily
- {
- displayName: 'At Time',
- name: 'daily_time',
- type: 'options',
- default: '09:00',
- options: [
- { name: '00:00 (Midnight)', value: '00:00' },
- { name: '06:00', value: '06:00' },
- { name: '08:00', value: '08:00' },
- { name: '09:00', value: '09:00' },
- { name: '10:00', value: '10:00' },
- { name: '12:00 (Noon)', value: '12:00' },
- { name: '14:00', value: '14:00' },
- { name: '16:00', value: '16:00' },
- { name: '18:00', value: '18:00' },
- { name: '20:00', value: '20:00' },
- { name: '22:00', value: '22:00' },
- ],
- description: 'Time to run daily',
- displayOptions: { show: { frequency: ['days'] } }
- },
- // Weekday + Time for weekly
- {
- displayName: 'On Day',
- name: 'weekday',
- type: 'options',
- default: '1',
- options: [
- { name: 'Sunday', value: '0' },
- { name: 'Monday', value: '1' },
- { name: 'Tuesday', value: '2' },
- { name: 'Wednesday', value: '3' },
- { name: 'Thursday', value: '4' },
- { name: 'Friday', value: '5' },
- { name: 'Saturday', value: '6' },
- ],
- description: 'Day of week',
- displayOptions: { show: { frequency: ['weeks'] } }
- },
- {
- displayName: 'At Time',
- name: 'weekly_time',
- type: 'options',
- default: '09:00',
- options: [
- { name: '00:00 (Midnight)', value: '00:00' },
- { name: '06:00', value: '06:00' },
- { name: '08:00', value: '08:00' },
- { name: '09:00', value: '09:00' },
- { name: '12:00 (Noon)', value: '12:00' },
- { name: '18:00', value: '18:00' },
- ],
- description: 'Time to run',
- displayOptions: { show: { frequency: ['weeks'] } }
- },
- // Day of month + Time for monthly
- {
- displayName: 'On Day',
- name: 'month_day',
- type: 'options',
- default: '1',
- options: [
- ...Array.from({ length: 28 }, (_, i) => ({ name: `${i + 1}`, value: String(i + 1) })),
- { name: 'Last day', value: 'L' },
- ],
- description: 'Day of month',
- displayOptions: { show: { frequency: ['months'] } }
- },
- {
- displayName: 'At Time',
- name: 'monthly_time',
- type: 'options',
- default: '09:00',
- options: [
- { name: '00:00 (Midnight)', value: '00:00' },
- { name: '06:00', value: '06:00' },
- { name: '09:00', value: '09:00' },
- { name: '12:00 (Noon)', value: '12:00' },
- { name: '18:00', value: '18:00' },
- ],
- description: 'Time to run',
- displayOptions: { show: { frequency: ['months'] } }
- },
- // Timezone for schedule
- {
- displayName: 'Timezone',
- name: 'timezone',
- type: 'options',
- default: 'UTC',
- options: [
- { name: 'UTC', value: 'UTC' },
- { name: 'US Eastern', value: 'America/New_York' },
- { name: 'US Pacific', value: 'America/Los_Angeles' },
- { name: 'UK', value: 'Europe/London' },
- { name: 'Europe Central', value: 'Europe/Paris' },
- { name: 'Japan', value: 'Asia/Tokyo' },
- { name: 'India', value: 'Asia/Kolkata' },
- ],
- description: 'Timezone for schedule'
- }
- ]
- }
+ // Wave 8: schema lives on backend (CronSchedulerParams).
+ // Note: backend now carries the full options arrays for frequency,
+ // weekday, daily_time, timezone via Field(json_schema_extra=).
+ properties: [],
+ },
};
export const SCHEDULER_NODE_TYPES = ['timer', 'cronScheduler'];
diff --git a/client/src/nodeDefinitions/utilityNodes.ts b/client/src/nodeDefinitions/utilityNodes.ts
index 73c27569..aedf1ab8 100644
--- a/client/src/nodeDefinitions/utilityNodes.ts
+++ b/client/src/nodeDefinitions/utilityNodes.ts
@@ -20,88 +20,15 @@ export const utilityNodes: Record<string, INodeTypeDescription> = {
type: 'main' as NodeConnectionType,
description: 'status, data, headers'
}],
+ // Wave 8: schema lives on backend (HttpRequestParams). Only UX
+ // placeholders and JSON starter blobs remain here.
properties: [
- {
- displayName: 'Method',
- name: 'method',
- type: 'options',
- default: 'GET',
- options: [
- { name: 'GET', value: 'GET' },
- { name: 'POST', value: 'POST' },
- { name: 'PUT', value: 'PUT' },
- { name: 'DELETE', value: 'DELETE' },
- { name: 'PATCH', value: 'PATCH' }
- ]
- },
- {
- displayName: 'URL',
- name: 'url',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'https://api.example.com/endpoint'
- },
- {
- displayName: 'Headers',
- name: 'headers',
- type: 'string',
- default: '{}',
- typeOptions: { rows: 3 },
- placeholder: '{"Authorization": "Bearer token"}'
- },
- {
- displayName: 'Body',
- name: 'body',
- type: 'string',
- default: '',
- typeOptions: { rows: 4 },
- placeholder: '{"key": "value"}',
- displayOptions: { show: { method: ['POST', 'PUT', 'PATCH'] } }
- },
- {
- displayName: 'Timeout (seconds)',
- name: 'timeout',
- type: 'number',
- default: 30
- },
- {
- displayName: 'Use Proxy',
- name: 'useProxy',
- type: 'boolean',
- default: false,
- description: 'Route request through a configured proxy provider'
- },
- {
- displayName: 'Proxy Country',
- name: 'proxyCountry',
- type: 'string',
- default: '',
- placeholder: 'US',
- description: 'ISO country code for geo-targeting (e.g. US, GB, DE)',
- displayOptions: { show: { useProxy: [true] } }
- },
- {
- displayName: 'Proxy Provider',
- name: 'proxyProvider',
- type: 'string',
- default: '',
- placeholder: 'Auto-select',
- description: 'Specific provider name, or leave empty for auto-selection',
- displayOptions: { show: { useProxy: [true] } }
- },
- {
- displayName: 'Session Type',
- name: 'sessionType',
- type: 'options',
- default: 'rotating',
- options: [
- { name: 'Rotating (new IP per request)', value: 'rotating' },
- { name: 'Sticky (same IP)', value: 'sticky' }
- ],
- displayOptions: { show: { useProxy: [true] } }
- }
- ]
+ { displayName: 'URL', name: 'url', type: 'string' as any, default: '', placeholder: 'https://api.example.com/endpoint' },
+ { displayName: 'Headers', name: 'headers', type: 'string' as any, default: '{}', placeholder: '{"Authorization": "Bearer token"}' },
+ { displayName: 'Body', name: 'body', type: 'string' as any, default: '', placeholder: '{"key": "value"}' },
+ { displayName: 'Proxy Country', name: 'proxyCountry', type: 'string' as any, default: '', placeholder: 'US' },
+ { displayName: 'Proxy Provider', name: 'proxyProvider', type: 'string' as any, default: '', placeholder: 'Auto-select' },
+ ],
},
webhookTrigger: {
@@ -119,64 +46,10 @@ export const utilityNodes: Record<string, INodeTypeDescription> = {
type: 'main' as NodeConnectionType,
description: 'method, path, headers, query, body, json'
}],
+ // Wave 8: schema lives on backend (WebhookTriggerParams).
properties: [
- {
- displayName: 'Path',
- name: 'path',
- type: 'string',
- default: '',
- required: true,
- placeholder: 'my-webhook',
- description: 'URL: http://localhost:3010/webhook/{path}'
- },
- {
- displayName: 'HTTP Method',
- name: 'method',
- type: 'options',
- default: 'POST',
- options: [
- { name: 'GET', value: 'GET' },
- { name: 'POST', value: 'POST' },
- { name: 'PUT', value: 'PUT' },
- { name: 'DELETE', value: 'DELETE' },
- { name: 'Any', value: 'ALL' }
- ]
- },
- {
- displayName: 'Response Mode',
- name: 'responseMode',
- type: 'options',
- default: 'immediate',
- options: [
- { name: 'Immediate (200 OK)', value: 'immediate' },
- { name: 'Wait for Response Node', value: 'responseNode' }
- ]
- },
- {
- displayName: 'Authentication',
- name: 'authentication',
- type: 'options',
- default: 'none',
- options: [
- { name: 'None', value: 'none' },
- { name: 'Header Auth', value: 'header' }
- ]
- },
- {
- displayName: 'Header Name',
- name: 'headerName',
- type: 'string',
- default: 'X-API-Key',
- displayOptions: { show: { authentication: ['header'] } }
- },
- {
- displayName: 'Header Value',
- name: 'headerValue',
- type: 'string',
- default: '',
- displayOptions: { show: { authentication: ['header'] } }
- }
- ]
+ { displayName: 'Path', name: 'path', type: 'string' as any, default: '', placeholder: 'my-webhook' },
+ ],
},
webhookResponse: {
@@ -189,33 +62,10 @@ export const utilityNodes: Record<string, INodeTypeDescription> = {
defaults: { name: 'Response', color: '#10b981' },
inputs: [{ name: 'main', displayName: 'Input', type: 'main' as NodeConnectionType, description: 'Trigger input' }],
outputs: [],
+ // Wave 8: schema lives on backend (WebhookResponseParams).
properties: [
- {
- displayName: 'Status Code',
- name: 'statusCode',
- type: 'number',
- default: 200
- },
- {
- displayName: 'Response Body',
- name: 'responseBody',
- type: 'string',
- default: '',
- typeOptions: { rows: 4 },
- placeholder: '{"success": true, "data": ...}'
- },
- {
- displayName: 'Content Type',
- name: 'contentType',
- type: 'options',
- default: 'application/json',
- options: [
- { name: 'JSON', value: 'application/json' },
- { name: 'Text', value: 'text/plain' },
- { name: 'HTML', value: 'text/html' }
- ]
- }
- ]
+ { displayName: 'Response Body', name: 'responseBody', type: 'string' as any, default: '', placeholder: '{"success": true, "data": ...}' },
+ ],
},
chatTrigger: {
@@ -234,22 +84,8 @@ export const utilityNodes: Record<string, INodeTypeDescription> = {
type: 'main' as NodeConnectionType,
description: 'message, timestamp, session_id'
}],
- properties: [
- {
- displayName: 'Session ID',
- name: 'sessionId',
- type: 'string',
- default: 'default',
- description: 'Session identifier for grouping messages'
- },
- {
- displayName: 'Placeholder',
- name: 'placeholder',
- type: 'string',
- default: 'Type a message...',
- description: 'Placeholder text for the chat input'
- }
- ]
+ // Wave 8: schema lives on backend (ChatTriggerParams).
+ properties: [],
},
console: {
@@ -263,59 +99,12 @@ export const utilityNodes: Record<string, INodeTypeDescription> = {
uiHints: { isConsoleSink: true },
inputs: [{ name: 'main', displayName: 'Input', type: 'main' as NodeConnectionType, description: 'Data to log' }],
outputs: [{ name: 'main', displayName: 'Output', type: 'main' as NodeConnectionType, description: 'Passes input through unchanged' }],
+ // Wave 8: schema lives on backend (ConsoleParams).
properties: [
- {
- displayName: 'Label',
- name: 'label',
- type: 'string',
- default: '',
- placeholder: 'Debug Point 1',
- description: 'Optional label to identify this log entry'
- },
- {
- displayName: 'Log Mode',
- name: 'logMode',
- type: 'options',
- default: 'all',
- options: [
- { name: 'Log All Input', value: 'all' },
- { name: 'Log Specific Field', value: 'field' },
- { name: 'Log Expression', value: 'expression' }
- ],
- description: 'What to log from the input data'
- },
- {
- displayName: 'Field Path',
- name: 'fieldPath',
- type: 'string',
- default: '',
- placeholder: 'data.items[0].name',
- displayOptions: { show: { logMode: ['field'] } },
- description: 'Path to specific field to log (e.g., data.items[0].name)'
- },
- {
- displayName: 'Expression',
- name: 'expression',
- type: 'string',
- default: '',
- placeholder: '{{input.field}}',
- displayOptions: { show: { logMode: ['expression'] } },
- description: 'Template expression to evaluate and log'
- },
- {
- displayName: 'Format',
- name: 'format',
- type: 'options',
- default: 'json',
- options: [
- { name: 'JSON (Pretty)', value: 'json' },
- { name: 'JSON (Compact)', value: 'json_compact' },
- { name: 'Text', value: 'text' },
- { name: 'Table', value: 'table' }
- ],
- description: 'Output format for the log'
- }
- ]
+ { displayName: 'Label', name: 'label', type: 'string' as any, default: '', placeholder: 'Debug Point 1' },
+ { displayName: 'Field Path', name: 'fieldPath', type: 'string' as any, default: '', placeholder: 'data.items[0].name' },
+ { displayName: 'Expression', name: 'expression', type: 'string' as any, default: '', placeholder: '{{input.field}}' },
+ ],
},
teamMonitor: {
@@ -329,39 +118,9 @@ export const utilityNodes: Record<string, INodeTypeDescription> = {
uiHints: { hideInputSection: true, hideOutputSection: true, isMonitorPanel: true },
inputs: [{ name: 'team', displayName: 'Team', type: 'main' as NodeConnectionType, description: 'Connect to AI Employee or Orchestrator Agent node' }],
outputs: [{ name: 'main', displayName: 'Events', type: 'main' as NodeConnectionType, description: 'task_completed, task_failed, message_received, team_status' }],
- properties: [
- {
- displayName: 'Auto-Refresh Interval',
- name: 'refreshInterval',
- type: 'number',
- default: 1000,
- typeOptions: { minValue: 100, maxValue: 10000 },
- description: 'Refresh interval in milliseconds (0 = WebSocket only)'
- },
- {
- displayName: 'Show Task History',
- name: 'showTaskHistory',
- type: 'boolean',
- default: true,
- description: 'Display completed/failed tasks in history'
- },
- {
- displayName: 'Show Messages',
- name: 'showMessages',
- type: 'boolean',
- default: true,
- description: 'Display inter-agent messages'
- },
- {
- displayName: 'Max History Items',
- name: 'maxHistoryItems',
- type: 'number',
- default: 50,
- typeOptions: { minValue: 10, maxValue: 200 },
- description: 'Maximum items to show in history'
- }
- ]
- }
+ // Wave 8: schema lives on backend (TeamMonitorParams).
+ properties: [],
+ },
};
export const UTILITY_NODE_TYPES = ['httpRequest', 'webhookTrigger', 'webhookResponse', 'chatTrigger', 'console', 'teamMonitor'];
diff --git a/server/models/nodes.py b/server/models/nodes.py
index 0e026489..a2a6c97a 100644
--- a/server/models/nodes.py
+++ b/server/models/nodes.py
@@ -359,9 +359,22 @@ class WebhookTriggerParams(BaseNodeParams):
"""Parameters for webhook trigger node."""
type: Literal["webhookTrigger"]
path: str = ""
- method_filter: str = Field(default="all", alias="methodFilter")
- response_mode: Literal["immediate", "response_node"] = Field(default="immediate", alias="responseMode")
- authentication: Literal["none", "header"] = "none"
+ method: Literal["GET", "POST", "PUT", "DELETE", "ALL"] = Field(default="POST")
+ response_mode: Literal["immediate", "responseNode"] = Field(
+ default="immediate",
+ alias="responseMode",
+ json_schema_extra={"options": [
+ {"name": "Immediate (200 OK)", "value": "immediate"},
+ {"name": "Wait for Response Node", "value": "responseNode"},
+ ]},
+ )
+ authentication: Literal["none", "header"] = Field(
+ default="none",
+ json_schema_extra={"options": [
+ {"name": "None", "value": "none"},
+ {"name": "Header Auth", "value": "header"},
+ ]},
+ )
header_name: str = Field(
default="X-API-Key",
alias="headerName",
@@ -381,15 +394,36 @@ class WebhookResponseParams(BaseNodeParams):
"""Parameters for webhook response node."""
type: Literal["webhookResponse"]
status_code: int = Field(default=200, alias="statusCode", ge=100, le=599)
- content_type: str = Field(default="application/json", alias="contentType")
- body: str = ""
+ content_type: Literal["application/json", "text/plain", "text/html"] = Field(
+ default="application/json",
+ alias="contentType",
+ json_schema_extra={"options": [
+ {"name": "JSON", "value": "application/json"},
+ {"name": "Text", "value": "text/plain"},
+ {"name": "HTML", "value": "text/html"},
+ ]},
+ )
+ response_body: str = Field(
+ default="",
+ alias="responseBody",
+ json_schema_extra={"rows": 4},
+ )
+ body: str = "" # legacy alias
class ConsoleParams(BaseNodeParams):
"""Parameters for console log node (passes input through)."""
type: Literal["console"]
label: str = ""
- log_mode: Literal["full", "field", "expression"] = Field(default="full", alias="logMode")
+ log_mode: Literal["all", "field", "expression"] = Field(
+ default="all",
+ alias="logMode",
+ json_schema_extra={"options": [
+ {"name": "Log All Input", "value": "all"},
+ {"name": "Log Specific Field", "value": "field"},
+ {"name": "Log Expression", "value": "expression"},
+ ]},
+ )
field_path: str = Field(
default="",
alias="fieldPath",
@@ -399,13 +433,24 @@ class ConsoleParams(BaseNodeParams):
default="",
json_schema_extra={"displayOptions": {"show": {"log_mode": ["expression"]}}},
)
- format: Literal["json", "text", "table"] = "json"
+ format: Literal["json", "json_compact", "text", "table"] = Field(
+ default="json",
+ json_schema_extra={"options": [
+ {"name": "JSON (Pretty)", "value": "json"},
+ {"name": "JSON (Compact)", "value": "json_compact"},
+ {"name": "Text", "value": "text"},
+ {"name": "Table", "value": "table"},
+ ]},
+ )
class TeamMonitorParams(BaseNodeParams):
"""Parameters for agent-team monitor node."""
type: Literal["teamMonitor"]
- refresh_interval: int = Field(default=0, alias="refreshInterval", ge=0, le=60_000)
+ refresh_interval: int = Field(default=1000, alias="refreshInterval", ge=0, le=60_000)
+ show_task_history: bool = Field(default=True, alias="showTaskHistory")
+ show_messages: bool = Field(default=True, alias="showMessages")
+ max_history_items: int = Field(default=50, alias="maxHistoryItems", ge=10, le=200)
# =============================================================================
@@ -425,21 +470,103 @@ class StartNodeParams(BaseNodeParams):
class CronSchedulerParams(BaseNodeParams):
"""Parameters for cron scheduler node. Also used as AI tool schema."""
type: Literal["cronScheduler"]
- frequency: Literal["seconds", "minutes", "hours", "days", "weeks", "months", "once"] = Field(default="minutes", description="Schedule frequency")
- interval: int = Field(default=5, ge=1, description="Interval for seconds frequency (5-59)")
- interval_minutes: int = Field(default=5, ge=1, description="Interval for minutes frequency (1-59)")
- interval_hours: int = Field(default=1, ge=1, description="Interval for hours frequency (1-23)")
- daily_time: str = Field(default="09:00", description="Time for daily frequency (HH:MM format)")
- weekly_time: str = Field(default="09:00", description="Time for weekly frequency (HH:MM format)")
- weekday: str = Field(default="1", description="Day of week for weekly: '0'=Sunday .. '6'=Saturday")
- monthly_time: str = Field(default="09:00", description="Time for monthly frequency (HH:MM format)")
- month_day: str = Field(default="1", description="Day of month: '1'-'28' or 'L' for last day")
- timezone: str = Field(default="UTC", description="Timezone e.g. UTC, America/New_York, Asia/Tokyo")
+ frequency: Literal["seconds", "minutes", "hours", "days", "weeks", "months", "once"] = Field(
+ default="minutes",
+ description="Schedule frequency",
+ json_schema_extra={"options": [
+ {"name": "Seconds", "value": "seconds"},
+ {"name": "Minutes", "value": "minutes"},
+ {"name": "Hours", "value": "hours"},
+ {"name": "Days", "value": "days"},
+ {"name": "Weeks", "value": "weeks"},
+ {"name": "Months", "value": "months"},
+ {"name": "Once (No Repeat)", "value": "once"},
+ ]},
+ )
+ interval: int = Field(
+ default=30, ge=5, le=59,
+ json_schema_extra={"displayOptions": {"show": {"frequency": ["seconds"]}}},
+ )
+ interval_minutes: int = Field(
+ default=5, ge=1, le=59,
+ json_schema_extra={"displayOptions": {"show": {"frequency": ["minutes"]}}},
+ )
+ interval_hours: int = Field(
+ default=1, ge=1, le=23,
+ json_schema_extra={"displayOptions": {"show": {"frequency": ["hours"]}}},
+ )
+ daily_time: str = Field(
+ default="09:00",
+ json_schema_extra={
+ "displayOptions": {"show": {"frequency": ["days"]}},
+ "options": [
+ {"name": "00:00 (Midnight)", "value": "00:00"},
+ {"name": "06:00", "value": "06:00"},
+ {"name": "08:00", "value": "08:00"},
+ {"name": "09:00", "value": "09:00"},
+ {"name": "10:00", "value": "10:00"},
+ {"name": "12:00 (Noon)", "value": "12:00"},
+ {"name": "14:00", "value": "14:00"},
+ {"name": "16:00", "value": "16:00"},
+ {"name": "18:00", "value": "18:00"},
+ {"name": "20:00", "value": "20:00"},
+ {"name": "22:00", "value": "22:00"},
+ ],
+ },
+ )
+ weekday: str = Field(
+ default="1",
+ json_schema_extra={
+ "displayOptions": {"show": {"frequency": ["weeks"]}},
+ "options": [
+ {"name": "Sunday", "value": "0"},
+ {"name": "Monday", "value": "1"},
+ {"name": "Tuesday", "value": "2"},
+ {"name": "Wednesday", "value": "3"},
+ {"name": "Thursday", "value": "4"},
+ {"name": "Friday", "value": "5"},
+ {"name": "Saturday", "value": "6"},
+ ],
+ },
+ )
+ weekly_time: str = Field(
+ default="09:00",
+ json_schema_extra={"displayOptions": {"show": {"frequency": ["weeks"]}}},
+ )
+ month_day: str = Field(
+ default="1",
+ json_schema_extra={"displayOptions": {"show": {"frequency": ["months"]}}},
+ )
+ monthly_time: str = Field(
+ default="09:00",
+ json_schema_extra={"displayOptions": {"show": {"frequency": ["months"]}}},
+ )
+ timezone: str = Field(
+ default="UTC",
+ json_schema_extra={"options": [
+ {"name": "UTC", "value": "UTC"},
+ {"name": "US Eastern", "value": "America/New_York"},
+ {"name": "US Pacific", "value": "America/Los_Angeles"},
+ {"name": "UK", "value": "Europe/London"},
+ {"name": "Europe Central", "value": "Europe/Paris"},
+ {"name": "Japan", "value": "Asia/Tokyo"},
+ {"name": "India", "value": "Asia/Kolkata"},
+ ]},
+ )
class WorkflowTriggerParams(BaseNodeParams):
- """Parameters for workflow trigger node."""
- type: Literal["workflowTrigger"]
+ """Parameters for workflow trigger / timer node."""
+ type: Literal["workflowTrigger", "timer"]
+ duration: int = Field(default=5, ge=1, le=3600)
+ unit: Literal["seconds", "minutes", "hours"] = Field(
+ default="seconds",
+ json_schema_extra={"options": [
+ {"name": "Seconds", "value": "seconds"},
+ {"name": "Minutes", "value": "minutes"},
+ {"name": "Hours", "value": "hours"},
+ ]},
+ )
class TaskTriggerParams(BaseNodeParams):
@@ -465,6 +592,8 @@ class TaskTriggerParams(BaseNodeParams):
class ChatTriggerParams(BaseNodeParams):
"""Parameters for chat trigger node."""
type: Literal["chatTrigger"]
+ session_id: str = Field(default="default", alias="sessionId")
+ placeholder: str = "Type a message..."
class MasterSkillParams(BaseNodeParams):
diff --git a/server/tests/test_node_spec.py b/server/tests/test_node_spec.py
index 73375031..97dd1fc5 100644
--- a/server/tests/test_node_spec.py
+++ b/server/tests/test_node_spec.py
@@ -135,7 +135,7 @@ class TestPhase3aCoverage:
def test_console_log_mode_enum(self):
spec = get_node_spec("console")
log_mode = spec["inputs"]["properties"]["logMode"]
- assert log_mode["enum"] == ["full", "field", "expression"]
+ assert log_mode["enum"] == ["all", "field", "expression"]
class TestPhase3bCoverage: