@marktoflow/gui 2.0.3 → 2.0.4-alpha.1

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 (159) hide show
  1. package/README.md +5 -3
  2. package/dist/client/assets/index-DqVkoerZ.js +838 -0
  3. package/dist/client/assets/index-DqVkoerZ.js.map +1 -0
  4. package/dist/client/assets/{index-DipWdkNl.css → index-eEWndJyn.css} +1 -1
  5. package/dist/client/index.html +2 -2
  6. package/dist/server/routes/execute.js +43 -8
  7. package/dist/server/routes/execute.js.map +1 -1
  8. package/dist/server/routes/tools.js +30 -884
  9. package/dist/server/routes/tools.js.map +1 -1
  10. package/dist/server/routes/workflows.js +24 -5
  11. package/dist/server/routes/workflows.js.map +1 -1
  12. package/dist/server/services/WorkflowService.js +15 -6
  13. package/dist/server/services/WorkflowService.js.map +1 -1
  14. package/dist/server/services/agents/openai-provider.js +31 -1
  15. package/dist/server/services/agents/openai-provider.js.map +1 -1
  16. package/dist/shared/constants.js +42 -0
  17. package/dist/shared/constants.js.map +1 -1
  18. package/package.json +21 -6
  19. package/coverage/base.css +0 -224
  20. package/coverage/block-navigation.js +0 -87
  21. package/coverage/client/App.tsx.html +0 -2230
  22. package/coverage/client/components/Accessibility/LiveRegion.tsx.html +0 -166
  23. package/coverage/client/components/Accessibility/SkipNav.tsx.html +0 -106
  24. package/coverage/client/components/Accessibility/index.html +0 -131
  25. package/coverage/client/components/Admin/AuditViewer.tsx.html +0 -214
  26. package/coverage/client/components/Admin/EnvironmentSwitcher.tsx.html +0 -187
  27. package/coverage/client/components/Admin/RoleManager.tsx.html +0 -250
  28. package/coverage/client/components/Admin/SecretsVault.tsx.html +0 -241
  29. package/coverage/client/components/Admin/index.html +0 -161
  30. package/coverage/client/components/Canvas/AlignmentTools.tsx.html +0 -694
  31. package/coverage/client/components/Canvas/Canvas.tsx.html +0 -1513
  32. package/coverage/client/components/Canvas/DataPreviewBadge.tsx.html +0 -307
  33. package/coverage/client/components/Canvas/ExecutionInputDialog.tsx.html +0 -769
  34. package/coverage/client/components/Canvas/ExecutionOverlay.tsx.html +0 -2938
  35. package/coverage/client/components/Canvas/ForEachNode.tsx.html +0 -568
  36. package/coverage/client/components/Canvas/GroupNode.tsx.html +0 -421
  37. package/coverage/client/components/Canvas/IfElseNode.tsx.html +0 -508
  38. package/coverage/client/components/Canvas/InlineEditor.tsx.html +0 -472
  39. package/coverage/client/components/Canvas/NodeContextMenu.tsx.html +0 -661
  40. package/coverage/client/components/Canvas/NodeTooltip.tsx.html +0 -316
  41. package/coverage/client/components/Canvas/OutputNode.tsx.html +0 -418
  42. package/coverage/client/components/Canvas/ParallelNode.tsx.html +0 -556
  43. package/coverage/client/components/Canvas/StepNode.tsx.html +0 -463
  44. package/coverage/client/components/Canvas/StickyNoteNode.tsx.html +0 -442
  45. package/coverage/client/components/Canvas/SubWorkflowNode.tsx.html +0 -508
  46. package/coverage/client/components/Canvas/SwitchNode.tsx.html +0 -640
  47. package/coverage/client/components/Canvas/Toolbar.tsx.html +0 -1030
  48. package/coverage/client/components/Canvas/TransformNode.tsx.html +0 -667
  49. package/coverage/client/components/Canvas/TriggerNode.tsx.html +0 -469
  50. package/coverage/client/components/Canvas/TryCatchNode.tsx.html +0 -577
  51. package/coverage/client/components/Canvas/WhileNode.tsx.html +0 -595
  52. package/coverage/client/components/Canvas/index.html +0 -446
  53. package/coverage/client/components/Canvas/index.ts.html +0 -157
  54. package/coverage/client/components/Collaboration/ActivityFeed.tsx.html +0 -253
  55. package/coverage/client/components/Collaboration/CommentThread.tsx.html +0 -397
  56. package/coverage/client/components/Collaboration/LockIndicator.tsx.html +0 -172
  57. package/coverage/client/components/Collaboration/PresenceIndicator.tsx.html +0 -214
  58. package/coverage/client/components/Collaboration/index.html +0 -161
  59. package/coverage/client/components/CommandPalette/CommandItem.tsx.html +0 -313
  60. package/coverage/client/components/CommandPalette/CommandPalette.tsx.html +0 -685
  61. package/coverage/client/components/CommandPalette/index.html +0 -131
  62. package/coverage/client/components/Debug/VariableInspector.tsx.html +0 -529
  63. package/coverage/client/components/Debug/index.html +0 -116
  64. package/coverage/client/components/Editor/InputsEditor.tsx.html +0 -1459
  65. package/coverage/client/components/Editor/NewStepWizard.tsx.html +0 -1117
  66. package/coverage/client/components/Editor/StepEditor.tsx.html +0 -1681
  67. package/coverage/client/components/Editor/YamlEditor.tsx.html +0 -565
  68. package/coverage/client/components/Editor/index.html +0 -161
  69. package/coverage/client/components/Execution/TimelineView.tsx.html +0 -397
  70. package/coverage/client/components/Execution/index.html +0 -116
  71. package/coverage/client/components/Onboarding/OnboardingTour.tsx.html +0 -265
  72. package/coverage/client/components/Onboarding/index.html +0 -116
  73. package/coverage/client/components/Panels/PropertiesPanel.tsx.html +0 -2035
  74. package/coverage/client/components/Panels/ValidationPanel.tsx.html +0 -856
  75. package/coverage/client/components/Panels/index.html +0 -131
  76. package/coverage/client/components/Prompt/ChangePreview.tsx.html +0 -928
  77. package/coverage/client/components/Prompt/PromptHistoryPanel.tsx.html +0 -712
  78. package/coverage/client/components/Prompt/PromptInput.tsx.html +0 -415
  79. package/coverage/client/components/Prompt/index.html +0 -146
  80. package/coverage/client/components/Settings/ProviderSwitcher.tsx.html +0 -1306
  81. package/coverage/client/components/Settings/SettingsPanel.tsx.html +0 -355
  82. package/coverage/client/components/Settings/controls/SettingNumber.tsx.html +0 -211
  83. package/coverage/client/components/Settings/controls/SettingSelect.tsx.html +0 -196
  84. package/coverage/client/components/Settings/controls/SettingToggle.tsx.html +0 -199
  85. package/coverage/client/components/Settings/controls/index.html +0 -146
  86. package/coverage/client/components/Settings/index.html +0 -131
  87. package/coverage/client/components/Settings/sections/AISettings.tsx.html +0 -154
  88. package/coverage/client/components/Settings/sections/CanvasSettings.tsx.html +0 -220
  89. package/coverage/client/components/Settings/sections/EditorSettings.tsx.html +0 -208
  90. package/coverage/client/components/Settings/sections/ExecutionSettings.tsx.html +0 -172
  91. package/coverage/client/components/Settings/sections/GeneralSettings.tsx.html +0 -151
  92. package/coverage/client/components/Settings/sections/NotificationSettings.tsx.html +0 -190
  93. package/coverage/client/components/Settings/sections/index.html +0 -191
  94. package/coverage/client/components/Sidebar/ImportDialog.tsx.html +0 -856
  95. package/coverage/client/components/Sidebar/NewWorkflowDialog.tsx.html +0 -694
  96. package/coverage/client/components/Sidebar/Sidebar.tsx.html +0 -1456
  97. package/coverage/client/components/Sidebar/index.html +0 -146
  98. package/coverage/client/components/Templates/TemplateCard.tsx.html +0 -181
  99. package/coverage/client/components/Templates/TemplateGallery.tsx.html +0 -307
  100. package/coverage/client/components/Templates/index.html +0 -131
  101. package/coverage/client/components/Versions/DiffViewer.tsx.html +0 -220
  102. package/coverage/client/components/Versions/VersionHistory.tsx.html +0 -352
  103. package/coverage/client/components/Versions/index.html +0 -131
  104. package/coverage/client/components/common/Breadcrumb.tsx.html +0 -205
  105. package/coverage/client/components/common/Button.tsx.html +0 -289
  106. package/coverage/client/components/common/ContextMenu.tsx.html +0 -691
  107. package/coverage/client/components/common/KeyboardShortcuts.tsx.html +0 -541
  108. package/coverage/client/components/common/Modal.tsx.html +0 -364
  109. package/coverage/client/components/common/Tabs.tsx.html +0 -256
  110. package/coverage/client/components/common/ThemeToggle.tsx.html +0 -301
  111. package/coverage/client/components/common/index.html +0 -206
  112. package/coverage/client/components/index.html +0 -116
  113. package/coverage/client/components/index.ts.html +0 -181
  114. package/coverage/client/hooks/index.html +0 -176
  115. package/coverage/client/hooks/index.ts.html +0 -97
  116. package/coverage/client/hooks/useAIPrompt.ts.html +0 -409
  117. package/coverage/client/hooks/useCanvas.ts.html +0 -739
  118. package/coverage/client/hooks/useWebSocket.ts.html +0 -580
  119. package/coverage/client/hooks/useWorkflow.ts.html +0 -502
  120. package/coverage/client/index.html +0 -131
  121. package/coverage/client/main.tsx.html +0 -115
  122. package/coverage/client/stores/agentStore.ts.html +0 -421
  123. package/coverage/client/stores/canvasStore.ts.html +0 -1129
  124. package/coverage/client/stores/collaborationStore.ts.html +0 -544
  125. package/coverage/client/stores/commandStore.ts.html +0 -610
  126. package/coverage/client/stores/editorStore.ts.html +0 -484
  127. package/coverage/client/stores/executionStore.ts.html +0 -1594
  128. package/coverage/client/stores/governanceStore.ts.html +0 -493
  129. package/coverage/client/stores/index.html +0 -341
  130. package/coverage/client/stores/index.ts.html +0 -112
  131. package/coverage/client/stores/layoutStore.ts.html +0 -439
  132. package/coverage/client/stores/navigationStore.ts.html +0 -232
  133. package/coverage/client/stores/onboardingStore.ts.html +0 -247
  134. package/coverage/client/stores/promptStore.ts.html +0 -430
  135. package/coverage/client/stores/settingsStore.ts.html +0 -472
  136. package/coverage/client/stores/themeStore.ts.html +0 -271
  137. package/coverage/client/stores/versionStore.ts.html +0 -340
  138. package/coverage/client/stores/workflowStore.ts.html +0 -739
  139. package/coverage/client/utils/applyDagreLayout.ts.html +0 -286
  140. package/coverage/client/utils/cn.ts.html +0 -112
  141. package/coverage/client/utils/index.html +0 -206
  142. package/coverage/client/utils/index.ts.html +0 -97
  143. package/coverage/client/utils/platform.ts.html +0 -223
  144. package/coverage/client/utils/serviceIcons.tsx.html +0 -376
  145. package/coverage/client/utils/stepValidation.ts.html +0 -550
  146. package/coverage/client/utils/workflowToGraph.ts.html +0 -1624
  147. package/coverage/coverage-final.json +0 -107
  148. package/coverage/favicon.png +0 -0
  149. package/coverage/index.html +0 -461
  150. package/coverage/prettify.css +0 -1
  151. package/coverage/prettify.js +0 -2
  152. package/coverage/shared/constants.ts.html +0 -655
  153. package/coverage/shared/index.html +0 -146
  154. package/coverage/shared/settings.ts.html +0 -406
  155. package/coverage/shared/types.ts.html +0 -622
  156. package/coverage/sort-arrow-sprite.png +0 -0
  157. package/coverage/sorter.js +0 -210
  158. package/dist/client/assets/index-DtX_BPDj.js +0 -833
  159. package/dist/client/assets/index-DtX_BPDj.js.map +0 -1
@@ -1,891 +1,36 @@
1
1
  import { Router } from 'express';
2
+ import { readFileSync } from 'node:fs';
3
+ import { join, dirname } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
2
5
  const router = Router();
3
- // Built-in tools with their schemas
4
- const tools = [
5
- {
6
- id: 'slack',
7
- name: 'Slack',
8
- icon: '💬',
9
- category: 'Communication',
10
- description: 'Send messages and manage Slack workspaces',
11
- sdk: '@slack/web-api',
12
- authType: 'token',
13
- docsUrl: 'https://api.slack.com/methods',
14
- actions: [
15
- {
16
- id: 'chat.postMessage',
17
- name: 'Post Message',
18
- description: 'Send a message to a channel',
19
- inputs: [
20
- { name: 'channel', type: 'string', required: true, description: 'Channel ID or name (e.g., #general)' },
21
- { name: 'text', type: 'string', required: true, description: 'Message text' },
22
- { name: 'blocks', type: 'array', required: false, description: 'Block Kit message blocks' },
23
- { name: 'thread_ts', type: 'string', required: false, description: 'Thread timestamp for replies' },
24
- ],
25
- output: { type: 'object', description: 'Message response with ts (timestamp)' },
26
- },
27
- {
28
- id: 'conversations.list',
29
- name: 'List Channels',
30
- description: 'Get a list of channels in the workspace',
31
- inputs: [
32
- { name: 'types', type: 'string', required: false, description: 'Channel types (public_channel, private_channel)', default: 'public_channel' },
33
- { name: 'limit', type: 'number', required: false, description: 'Number of channels to return', default: 100 },
34
- ],
35
- output: { type: 'array', description: 'List of channel objects' },
36
- },
37
- {
38
- id: 'conversations.history',
39
- name: 'Get Messages',
40
- description: 'Get messages from a channel',
41
- inputs: [
42
- { name: 'channel', type: 'string', required: true, description: 'Channel ID' },
43
- { name: 'limit', type: 'number', required: false, description: 'Number of messages', default: 100 },
44
- ],
45
- output: { type: 'array', description: 'List of messages' },
46
- },
47
- ],
48
- },
49
- {
50
- id: 'github',
51
- name: 'GitHub',
52
- icon: '🐙',
53
- category: 'Development',
54
- description: 'Manage repositories, issues, and pull requests',
55
- sdk: '@octokit/rest',
56
- authType: 'token',
57
- docsUrl: 'https://docs.github.com/en/rest',
58
- actions: [
59
- {
60
- id: 'pulls.get',
61
- name: 'Get Pull Request',
62
- description: 'Get details of a pull request',
63
- inputs: [
64
- { name: 'owner', type: 'string', required: true, description: 'Repository owner' },
65
- { name: 'repo', type: 'string', required: true, description: 'Repository name' },
66
- { name: 'pull_number', type: 'number', required: true, description: 'PR number' },
67
- ],
68
- output: { type: 'object', description: 'Pull request details' },
69
- },
70
- {
71
- id: 'pulls.listFiles',
72
- name: 'List PR Files',
73
- description: 'List files changed in a pull request',
74
- inputs: [
75
- { name: 'owner', type: 'string', required: true, description: 'Repository owner' },
76
- { name: 'repo', type: 'string', required: true, description: 'Repository name' },
77
- { name: 'pull_number', type: 'number', required: true, description: 'PR number' },
78
- ],
79
- output: { type: 'array', description: 'List of changed files' },
80
- },
81
- {
82
- id: 'pulls.createReview',
83
- name: 'Create Review',
84
- description: 'Create a review on a pull request',
85
- inputs: [
86
- { name: 'owner', type: 'string', required: true, description: 'Repository owner' },
87
- { name: 'repo', type: 'string', required: true, description: 'Repository name' },
88
- { name: 'pull_number', type: 'number', required: true, description: 'PR number' },
89
- { name: 'body', type: 'string', required: false, description: 'Review comment' },
90
- { name: 'event', type: 'string', required: true, description: 'Review action (APPROVE, REQUEST_CHANGES, COMMENT)' },
91
- ],
92
- output: { type: 'object', description: 'Review details' },
93
- },
94
- {
95
- id: 'issues.create',
96
- name: 'Create Issue',
97
- description: 'Create a new issue',
98
- inputs: [
99
- { name: 'owner', type: 'string', required: true, description: 'Repository owner' },
100
- { name: 'repo', type: 'string', required: true, description: 'Repository name' },
101
- { name: 'title', type: 'string', required: true, description: 'Issue title' },
102
- { name: 'body', type: 'string', required: false, description: 'Issue body' },
103
- { name: 'labels', type: 'array', required: false, description: 'Labels to add' },
104
- ],
105
- output: { type: 'object', description: 'Created issue' },
106
- },
107
- ],
108
- },
109
- {
110
- id: 'jira',
111
- name: 'Jira',
112
- icon: '📋',
113
- category: 'Project Management',
114
- description: 'Manage Jira issues and projects',
115
- sdk: 'jira.js',
116
- authType: 'basic',
117
- docsUrl: 'https://developer.atlassian.com/cloud/jira/platform/rest/v3/',
118
- actions: [
119
- {
120
- id: 'issues.search',
121
- name: 'Search Issues',
122
- description: 'Search for issues using JQL',
123
- inputs: [
124
- { name: 'jql', type: 'string', required: true, description: 'JQL query string' },
125
- { name: 'maxResults', type: 'number', required: false, description: 'Maximum results', default: 50 },
126
- ],
127
- output: { type: 'array', description: 'List of issues' },
128
- },
129
- {
130
- id: 'issues.create',
131
- name: 'Create Issue',
132
- description: 'Create a new Jira issue',
133
- inputs: [
134
- { name: 'project', type: 'string', required: true, description: 'Project key' },
135
- { name: 'summary', type: 'string', required: true, description: 'Issue summary' },
136
- { name: 'issueType', type: 'string', required: true, description: 'Issue type (Bug, Task, Story)' },
137
- { name: 'description', type: 'string', required: false, description: 'Issue description' },
138
- ],
139
- output: { type: 'object', description: 'Created issue' },
140
- },
141
- {
142
- id: 'issues.transition',
143
- name: 'Transition Issue',
144
- description: 'Move issue to a different status',
145
- inputs: [
146
- { name: 'issueKey', type: 'string', required: true, description: 'Issue key (e.g., PROJ-123)' },
147
- { name: 'transition', type: 'string', required: true, description: 'Transition name or ID' },
148
- ],
149
- output: { type: 'object', description: 'Transition result' },
150
- },
151
- ],
152
- },
153
- {
154
- id: 'gmail',
155
- name: 'Gmail',
156
- icon: '📧',
157
- category: 'Communication',
158
- description: 'Send and manage emails via Gmail',
159
- sdk: 'googleapis',
160
- authType: 'oauth',
161
- docsUrl: 'https://developers.google.com/gmail/api',
162
- actions: [
163
- {
164
- id: 'messages.send',
165
- name: 'Send Email',
166
- description: 'Send an email',
167
- inputs: [
168
- { name: 'to', type: 'string', required: true, description: 'Recipient email' },
169
- { name: 'subject', type: 'string', required: true, description: 'Email subject' },
170
- { name: 'body', type: 'string', required: true, description: 'Email body (HTML or plain text)' },
171
- { name: 'cc', type: 'string', required: false, description: 'CC recipients' },
172
- ],
173
- output: { type: 'object', description: 'Sent message details' },
174
- },
175
- {
176
- id: 'messages.list',
177
- name: 'List Emails',
178
- description: 'List emails matching a query',
179
- inputs: [
180
- { name: 'query', type: 'string', required: false, description: 'Gmail search query' },
181
- { name: 'maxResults', type: 'number', required: false, description: 'Maximum results', default: 10 },
182
- ],
183
- output: { type: 'array', description: 'List of message IDs' },
184
- },
185
- ],
186
- },
187
- {
188
- id: 'linear',
189
- name: 'Linear',
190
- icon: '📐',
191
- category: 'Project Management',
192
- description: 'Manage Linear issues and projects',
193
- sdk: '@linear/sdk',
194
- authType: 'api_key',
195
- docsUrl: 'https://developers.linear.app/docs',
196
- actions: [
197
- {
198
- id: 'issues.create',
199
- name: 'Create Issue',
200
- description: 'Create a new Linear issue',
201
- inputs: [
202
- { name: 'teamId', type: 'string', required: true, description: 'Team ID' },
203
- { name: 'title', type: 'string', required: true, description: 'Issue title' },
204
- { name: 'description', type: 'string', required: false, description: 'Issue description' },
205
- { name: 'priority', type: 'number', required: false, description: 'Priority (0-4)' },
206
- ],
207
- output: { type: 'object', description: 'Created issue' },
208
- },
209
- {
210
- id: 'issues.list',
211
- name: 'List Issues',
212
- description: 'List issues with filters',
213
- inputs: [
214
- { name: 'teamId', type: 'string', required: false, description: 'Filter by team' },
215
- { name: 'state', type: 'string', required: false, description: 'Filter by state' },
216
- ],
217
- output: { type: 'array', description: 'List of issues' },
218
- },
219
- ],
220
- },
221
- {
222
- id: 'notion',
223
- name: 'Notion',
224
- icon: '📝',
225
- category: 'Documentation',
226
- description: 'Manage Notion pages and databases',
227
- sdk: '@notionhq/client',
228
- authType: 'token',
229
- docsUrl: 'https://developers.notion.com/',
230
- actions: [
231
- {
232
- id: 'pages.create',
233
- name: 'Create Page',
234
- description: 'Create a new Notion page',
235
- inputs: [
236
- { name: 'parent', type: 'object', required: true, description: 'Parent page or database' },
237
- { name: 'properties', type: 'object', required: true, description: 'Page properties' },
238
- { name: 'children', type: 'array', required: false, description: 'Page content blocks' },
239
- ],
240
- output: { type: 'object', description: 'Created page' },
241
- },
242
- {
243
- id: 'databases.query',
244
- name: 'Query Database',
245
- description: 'Query a Notion database',
246
- inputs: [
247
- { name: 'database_id', type: 'string', required: true, description: 'Database ID' },
248
- { name: 'filter', type: 'object', required: false, description: 'Filter conditions' },
249
- { name: 'sorts', type: 'array', required: false, description: 'Sort conditions' },
250
- ],
251
- output: { type: 'array', description: 'Query results' },
252
- },
253
- ],
254
- },
255
- {
256
- id: 'discord',
257
- name: 'Discord',
258
- icon: '🎮',
259
- category: 'Communication',
260
- description: 'Send messages and manage Discord servers',
261
- sdk: 'discord.js',
262
- authType: 'token',
263
- docsUrl: 'https://discord.com/developers/docs',
264
- actions: [
265
- {
266
- id: 'messages.create',
267
- name: 'Send Message',
268
- description: 'Send a message to a channel',
269
- inputs: [
270
- { name: 'channelId', type: 'string', required: true, description: 'Channel ID' },
271
- { name: 'content', type: 'string', required: true, description: 'Message content' },
272
- { name: 'embeds', type: 'array', required: false, description: 'Rich embeds' },
273
- ],
274
- output: { type: 'object', description: 'Sent message' },
275
- },
276
- {
277
- id: 'channels.list',
278
- name: 'List Channels',
279
- description: 'List channels in a server',
280
- inputs: [
281
- { name: 'guildId', type: 'string', required: true, description: 'Server/Guild ID' },
282
- ],
283
- output: { type: 'array', description: 'List of channels' },
284
- },
285
- ],
286
- },
287
- {
288
- id: 'airtable',
289
- name: 'Airtable',
290
- icon: '📊',
291
- category: 'Database',
292
- description: 'Manage Airtable bases and records',
293
- sdk: 'airtable',
294
- authType: 'api_key',
295
- docsUrl: 'https://airtable.com/developers/web/api',
296
- actions: [
297
- {
298
- id: 'records.create',
299
- name: 'Create Record',
300
- description: 'Create a new record in a table',
301
- inputs: [
302
- { name: 'baseId', type: 'string', required: true, description: 'Base ID' },
303
- { name: 'tableId', type: 'string', required: true, description: 'Table ID or name' },
304
- { name: 'fields', type: 'object', required: true, description: 'Record fields' },
305
- ],
306
- output: { type: 'object', description: 'Created record' },
307
- },
308
- {
309
- id: 'records.list',
310
- name: 'List Records',
311
- description: 'List records from a table',
312
- inputs: [
313
- { name: 'baseId', type: 'string', required: true, description: 'Base ID' },
314
- { name: 'tableId', type: 'string', required: true, description: 'Table ID or name' },
315
- { name: 'maxRecords', type: 'number', required: false, description: 'Maximum records', default: 100 },
316
- { name: 'filterByFormula', type: 'string', required: false, description: 'Airtable formula filter' },
317
- ],
318
- output: { type: 'array', description: 'List of records' },
319
- },
320
- ],
321
- },
322
- {
323
- id: 'http',
324
- name: 'HTTP',
325
- icon: '🌐',
326
- category: 'Network',
327
- description: 'Make HTTP requests to any API',
328
- authType: 'token',
329
- actions: [
330
- {
331
- id: 'request',
332
- name: 'HTTP Request',
333
- description: 'Make a custom HTTP request',
334
- inputs: [
335
- { name: 'url', type: 'string', required: true, description: 'Request URL' },
336
- { name: 'method', type: 'string', required: true, description: 'HTTP method (GET, POST, PUT, DELETE)' },
337
- { name: 'headers', type: 'object', required: false, description: 'Request headers' },
338
- { name: 'body', type: 'object', required: false, description: 'Request body (for POST/PUT)' },
339
- ],
340
- output: { type: 'object', description: 'Response with status, headers, and body' },
341
- },
342
- {
343
- id: 'get',
344
- name: 'GET Request',
345
- description: 'Make a GET request',
346
- inputs: [
347
- { name: 'url', type: 'string', required: true, description: 'Request URL' },
348
- { name: 'headers', type: 'object', required: false, description: 'Request headers' },
349
- ],
350
- output: { type: 'object', description: 'Response data' },
351
- },
352
- {
353
- id: 'post',
354
- name: 'POST Request',
355
- description: 'Make a POST request',
356
- inputs: [
357
- { name: 'url', type: 'string', required: true, description: 'Request URL' },
358
- { name: 'body', type: 'object', required: true, description: 'Request body' },
359
- { name: 'headers', type: 'object', required: false, description: 'Request headers' },
360
- ],
361
- output: { type: 'object', description: 'Response data' },
362
- },
363
- ],
364
- },
365
- {
366
- id: 'claude',
367
- name: 'Claude',
368
- icon: '🤖',
369
- category: 'AI',
370
- description: 'Use Claude AI for analysis and generation',
371
- sdk: '@anthropic-ai/sdk',
372
- authType: 'api_key',
373
- docsUrl: 'https://docs.anthropic.com/',
374
- actions: [
375
- {
376
- id: 'analyze',
377
- name: 'Analyze',
378
- description: 'Analyze text or data with Claude',
379
- inputs: [
380
- { name: 'prompt', type: 'string', required: true, description: 'Analysis prompt' },
381
- { name: 'content', type: 'string', required: true, description: 'Content to analyze' },
382
- { name: 'model', type: 'string', required: false, description: 'Model to use', default: 'claude-sonnet-4-20250514' },
383
- ],
384
- output: { type: 'string', description: 'Analysis result' },
385
- },
386
- {
387
- id: 'generate',
388
- name: 'Generate',
389
- description: 'Generate text with Claude',
390
- inputs: [
391
- { name: 'prompt', type: 'string', required: true, description: 'Generation prompt' },
392
- { name: 'maxTokens', type: 'number', required: false, description: 'Maximum tokens', default: 1024 },
393
- { name: 'model', type: 'string', required: false, description: 'Model to use', default: 'claude-sonnet-4-20250514' },
394
- ],
395
- output: { type: 'string', description: 'Generated text' },
396
- },
397
- {
398
- id: 'summarize',
399
- name: 'Summarize',
400
- description: 'Summarize text with Claude',
401
- inputs: [
402
- { name: 'content', type: 'string', required: true, description: 'Content to summarize' },
403
- { name: 'length', type: 'string', required: false, description: 'Summary length (short, medium, long)', default: 'medium' },
404
- ],
405
- output: { type: 'string', description: 'Summary' },
406
- },
407
- ],
408
- },
409
- {
410
- id: 'confluence',
411
- name: 'Confluence',
412
- icon: '📚',
413
- category: 'Documentation',
414
- description: 'Manage Confluence pages and spaces',
415
- sdk: 'confluence.js',
416
- authType: 'basic',
417
- docsUrl: 'https://developer.atlassian.com/cloud/confluence/rest/',
418
- actions: [
419
- {
420
- id: 'pages.create',
421
- name: 'Create Page',
422
- description: 'Create a new Confluence page',
423
- inputs: [
424
- { name: 'spaceKey', type: 'string', required: true, description: 'Space key' },
425
- { name: 'title', type: 'string', required: true, description: 'Page title' },
426
- { name: 'content', type: 'string', required: true, description: 'Page content (HTML or storage format)' },
427
- { name: 'parentId', type: 'string', required: false, description: 'Parent page ID' },
428
- ],
429
- output: { type: 'object', description: 'Created page' },
430
- },
431
- {
432
- id: 'pages.search',
433
- name: 'Search Pages',
434
- description: 'Search Confluence pages',
435
- inputs: [
436
- { name: 'cql', type: 'string', required: true, description: 'CQL query' },
437
- { name: 'limit', type: 'number', required: false, description: 'Maximum results', default: 25 },
438
- ],
439
- output: { type: 'array', description: 'Search results' },
440
- },
441
- ],
442
- },
443
- {
444
- id: 'outlook',
445
- name: 'Outlook',
446
- icon: '📬',
447
- category: 'Communication',
448
- description: 'Manage emails and calendar via Microsoft Graph',
449
- sdk: '@microsoft/microsoft-graph-client',
450
- authType: 'oauth',
451
- docsUrl: 'https://learn.microsoft.com/en-us/graph/',
452
- actions: [
453
- {
454
- id: 'messages.send',
455
- name: 'Send Email',
456
- description: 'Send an email via Outlook',
457
- inputs: [
458
- { name: 'to', type: 'string', required: true, description: 'Recipient email' },
459
- { name: 'subject', type: 'string', required: true, description: 'Email subject' },
460
- { name: 'body', type: 'string', required: true, description: 'Email body' },
461
- { name: 'contentType', type: 'string', required: false, description: 'Body type (text or html)', default: 'text' },
462
- ],
463
- output: { type: 'object', description: 'Sent message' },
464
- },
465
- {
466
- id: 'calendar.createEvent',
467
- name: 'Create Event',
468
- description: 'Create a calendar event',
469
- inputs: [
470
- { name: 'subject', type: 'string', required: true, description: 'Event subject' },
471
- { name: 'start', type: 'string', required: true, description: 'Start time (ISO 8601)' },
472
- { name: 'end', type: 'string', required: true, description: 'End time (ISO 8601)' },
473
- { name: 'attendees', type: 'array', required: false, description: 'Attendee emails' },
474
- ],
475
- output: { type: 'object', description: 'Created event' },
476
- },
477
- ],
478
- },
479
- {
480
- id: 'stripe',
481
- name: 'Stripe',
482
- icon: '💳',
483
- category: 'Payments',
484
- description: 'Payment processing and subscription management',
485
- sdk: 'stripe',
486
- authType: 'api_key',
487
- docsUrl: 'https://stripe.com/docs/api',
488
- actions: [
489
- {
490
- id: 'customers.create',
491
- name: 'Create Customer',
492
- description: 'Create a new customer',
493
- inputs: [
494
- { name: 'email', type: 'string', required: true, description: 'Customer email' },
495
- { name: 'name', type: 'string', required: false, description: 'Customer name' },
496
- { name: 'description', type: 'string', required: false, description: 'Customer description' },
497
- ],
498
- output: { type: 'object', description: 'Customer object' },
499
- },
500
- {
501
- id: 'paymentIntents.create',
502
- name: 'Create Payment Intent',
503
- description: 'Create a payment intent',
504
- inputs: [
505
- { name: 'amount', type: 'number', required: true, description: 'Amount in cents' },
506
- { name: 'currency', type: 'string', required: true, description: 'Currency code (e.g., usd)' },
507
- { name: 'customer', type: 'string', required: false, description: 'Customer ID' },
508
- ],
509
- output: { type: 'object', description: 'Payment intent object' },
510
- },
511
- {
512
- id: 'subscriptions.create',
513
- name: 'Create Subscription',
514
- description: 'Create a subscription',
515
- inputs: [
516
- { name: 'customer', type: 'string', required: true, description: 'Customer ID' },
517
- { name: 'items', type: 'array', required: true, description: 'Subscription items with price IDs' },
518
- ],
519
- output: { type: 'object', description: 'Subscription object' },
520
- },
521
- ],
522
- },
523
- {
524
- id: 'teams',
525
- name: 'Microsoft Teams',
526
- icon: '👥',
527
- category: 'Communication',
528
- description: 'Microsoft Teams collaboration and messaging',
529
- sdk: '@microsoft/microsoft-graph-client',
530
- authType: 'oauth',
531
- docsUrl: 'https://learn.microsoft.com/en-us/graph/teams-concept-overview',
532
- actions: [
533
- {
534
- id: 'messages.send',
535
- name: 'Send Channel Message',
536
- description: 'Send a message to a Teams channel',
537
- inputs: [
538
- { name: 'teamId', type: 'string', required: true, description: 'Team ID' },
539
- { name: 'channelId', type: 'string', required: true, description: 'Channel ID' },
540
- { name: 'content', type: 'string', required: true, description: 'Message content' },
541
- ],
542
- output: { type: 'object', description: 'Sent message' },
543
- },
544
- {
545
- id: 'meetings.create',
546
- name: 'Create Meeting',
547
- description: 'Create an online meeting',
548
- inputs: [
549
- { name: 'subject', type: 'string', required: true, description: 'Meeting subject' },
550
- { name: 'startDateTime', type: 'string', required: true, description: 'Start time (ISO 8601)' },
551
- { name: 'endDateTime', type: 'string', required: true, description: 'End time (ISO 8601)' },
552
- ],
553
- output: { type: 'object', description: 'Created meeting' },
554
- },
555
- ],
556
- },
557
- {
558
- id: 'twilio',
559
- name: 'Twilio',
560
- icon: '📱',
561
- category: 'Communication',
562
- description: 'SMS, voice calls, and WhatsApp messaging',
563
- sdk: 'twilio',
564
- authType: 'basic',
565
- docsUrl: 'https://www.twilio.com/docs/api',
566
- actions: [
567
- {
568
- id: 'sendSMS',
569
- name: 'Send SMS',
570
- description: 'Send an SMS message',
571
- inputs: [
572
- { name: 'to', type: 'string', required: true, description: 'Recipient phone number' },
573
- { name: 'from', type: 'string', required: true, description: 'Twilio phone number' },
574
- { name: 'body', type: 'string', required: true, description: 'Message body' },
575
- ],
576
- output: { type: 'object', description: 'Message details' },
577
- },
578
- {
579
- id: 'makeCall',
580
- name: 'Make Call',
581
- description: 'Make a phone call',
582
- inputs: [
583
- { name: 'to', type: 'string', required: true, description: 'Recipient phone number' },
584
- { name: 'from', type: 'string', required: true, description: 'Twilio phone number' },
585
- { name: 'url', type: 'string', required: true, description: 'TwiML URL' },
586
- ],
587
- output: { type: 'object', description: 'Call details' },
588
- },
589
- {
590
- id: 'sendWhatsApp',
591
- name: 'Send WhatsApp',
592
- description: 'Send a WhatsApp message',
593
- inputs: [
594
- { name: 'to', type: 'string', required: true, description: 'Recipient (whatsapp:+1234567890)' },
595
- { name: 'from', type: 'string', required: true, description: 'Twilio WhatsApp number' },
596
- { name: 'body', type: 'string', required: true, description: 'Message body' },
597
- ],
598
- output: { type: 'object', description: 'Message details' },
599
- },
600
- ],
601
- },
602
- {
603
- id: 'sendgrid',
604
- name: 'SendGrid',
605
- icon: '📨',
606
- category: 'Communication',
607
- description: 'Transactional email delivery',
608
- sdk: '@sendgrid/mail',
609
- authType: 'api_key',
610
- docsUrl: 'https://docs.sendgrid.com/api-reference',
611
- actions: [
612
- {
613
- id: 'sendEmail',
614
- name: 'Send Email',
615
- description: 'Send a single email',
616
- inputs: [
617
- { name: 'to', type: 'string', required: true, description: 'Recipient email' },
618
- { name: 'from', type: 'string', required: true, description: 'Sender email' },
619
- { name: 'subject', type: 'string', required: true, description: 'Email subject' },
620
- { name: 'html', type: 'string', required: false, description: 'HTML email body' },
621
- { name: 'text', type: 'string', required: false, description: 'Plain text email body' },
622
- ],
623
- output: { type: 'object', description: 'Send result' },
624
- },
625
- ],
626
- },
627
- {
628
- id: 'shopify',
629
- name: 'Shopify',
630
- icon: '🛒',
631
- category: 'E-commerce',
632
- description: 'E-commerce platform for online stores',
633
- sdk: '@shopify/shopify-api',
634
- authType: 'token',
635
- docsUrl: 'https://shopify.dev/docs/api',
636
- actions: [
637
- {
638
- id: 'createProduct',
639
- name: 'Create Product',
640
- description: 'Create a new product',
641
- inputs: [
642
- { name: 'title', type: 'string', required: true, description: 'Product title' },
643
- { name: 'body_html', type: 'string', required: false, description: 'Product description' },
644
- { name: 'vendor', type: 'string', required: false, description: 'Product vendor' },
645
- { name: 'variants', type: 'array', required: false, description: 'Product variants' },
646
- ],
647
- output: { type: 'object', description: 'Created product' },
648
- },
649
- {
650
- id: 'createOrder',
651
- name: 'Create Order',
652
- description: 'Create a new order',
653
- inputs: [
654
- { name: 'email', type: 'string', required: false, description: 'Customer email' },
655
- { name: 'line_items', type: 'array', required: true, description: 'Order line items' },
656
- ],
657
- output: { type: 'object', description: 'Created order' },
658
- },
659
- {
660
- id: 'getProducts',
661
- name: 'List Products',
662
- description: 'List all products',
663
- inputs: [
664
- { name: 'limit', type: 'number', required: false, description: 'Number of products', default: 50 },
665
- ],
666
- output: { type: 'array', description: 'List of products' },
667
- },
668
- ],
669
- },
670
- {
671
- id: 'zendesk',
672
- name: 'Zendesk',
673
- icon: '🎧',
674
- category: 'Support',
675
- description: 'Customer support ticketing platform',
676
- sdk: 'node-zendesk',
677
- authType: 'token',
678
- docsUrl: 'https://developer.zendesk.com/api-reference/',
679
- actions: [
680
- {
681
- id: 'createTicket',
682
- name: 'Create Ticket',
683
- description: 'Create a support ticket',
684
- inputs: [
685
- { name: 'subject', type: 'string', required: true, description: 'Ticket subject' },
686
- { name: 'comment', type: 'object', required: true, description: 'Ticket comment with body' },
687
- { name: 'priority', type: 'string', required: false, description: 'Priority (low, normal, high, urgent)' },
688
- ],
689
- output: { type: 'object', description: 'Created ticket' },
690
- },
691
- {
692
- id: 'updateTicket',
693
- name: 'Update Ticket',
694
- description: 'Update a ticket',
695
- inputs: [
696
- { name: 'ticketId', type: 'number', required: true, description: 'Ticket ID' },
697
- { name: 'status', type: 'string', required: false, description: 'Ticket status' },
698
- { name: 'comment', type: 'object', required: false, description: 'Comment to add' },
699
- ],
700
- output: { type: 'object', description: 'Updated ticket' },
701
- },
702
- ],
703
- },
704
- {
705
- id: 'mailchimp',
706
- name: 'Mailchimp',
707
- icon: '📬',
708
- category: 'Marketing',
709
- description: 'Email marketing automation',
710
- sdk: '@mailchimp/mailchimp_marketing',
711
- authType: 'api_key',
712
- docsUrl: 'https://mailchimp.com/developer/marketing/api/',
713
- actions: [
714
- {
715
- id: 'addMember',
716
- name: 'Add List Member',
717
- description: 'Add member to mailing list',
718
- inputs: [
719
- { name: 'listId', type: 'string', required: true, description: 'List ID' },
720
- { name: 'email_address', type: 'string', required: true, description: 'Member email' },
721
- { name: 'status', type: 'string', required: true, description: 'Status (subscribed, pending)' },
722
- { name: 'merge_fields', type: 'object', required: false, description: 'Merge fields (FNAME, LNAME, etc.)' },
723
- ],
724
- output: { type: 'object', description: 'Created member' },
725
- },
726
- {
727
- id: 'createCampaign',
728
- name: 'Create Campaign',
729
- description: 'Create email campaign',
730
- inputs: [
731
- { name: 'type', type: 'string', required: true, description: 'Campaign type (regular, plaintext)' },
732
- { name: 'recipients', type: 'object', required: true, description: 'Campaign recipients' },
733
- { name: 'settings', type: 'object', required: true, description: 'Campaign settings' },
734
- ],
735
- output: { type: 'object', description: 'Created campaign' },
736
- },
737
- ],
738
- },
739
- {
740
- id: 'asana',
741
- name: 'Asana',
742
- icon: '✓',
743
- category: 'Project Management',
744
- description: 'Task and project management',
745
- sdk: 'asana',
746
- authType: 'token',
747
- docsUrl: 'https://developers.asana.com/docs',
748
- actions: [
749
- {
750
- id: 'createTask',
751
- name: 'Create Task',
752
- description: 'Create a new task',
753
- inputs: [
754
- { name: 'name', type: 'string', required: true, description: 'Task name' },
755
- { name: 'notes', type: 'string', required: false, description: 'Task notes' },
756
- { name: 'projects', type: 'array', required: false, description: 'Project IDs' },
757
- { name: 'due_on', type: 'string', required: false, description: 'Due date (YYYY-MM-DD)' },
758
- ],
759
- output: { type: 'object', description: 'Created task' },
760
- },
761
- {
762
- id: 'createProject',
763
- name: 'Create Project',
764
- description: 'Create a new project',
765
- inputs: [
766
- { name: 'name', type: 'string', required: true, description: 'Project name' },
767
- { name: 'workspace', type: 'string', required: true, description: 'Workspace ID' },
768
- { name: 'notes', type: 'string', required: false, description: 'Project notes' },
769
- ],
770
- output: { type: 'object', description: 'Created project' },
771
- },
772
- ],
773
- },
774
- {
775
- id: 'trello',
776
- name: 'Trello',
777
- icon: '📋',
778
- category: 'Project Management',
779
- description: 'Visual project management with boards',
780
- sdk: 'trello',
781
- authType: 'token',
782
- docsUrl: 'https://developer.atlassian.com/cloud/trello/rest/',
783
- actions: [
784
- {
785
- id: 'createCard',
786
- name: 'Create Card',
787
- description: 'Create a new card',
788
- inputs: [
789
- { name: 'name', type: 'string', required: true, description: 'Card name' },
790
- { name: 'idList', type: 'string', required: true, description: 'List ID' },
791
- { name: 'desc', type: 'string', required: false, description: 'Card description' },
792
- { name: 'due', type: 'string', required: false, description: 'Due date' },
793
- ],
794
- output: { type: 'object', description: 'Created card' },
795
- },
796
- {
797
- id: 'createList',
798
- name: 'Create List',
799
- description: 'Create a new list',
800
- inputs: [
801
- { name: 'name', type: 'string', required: true, description: 'List name' },
802
- { name: 'idBoard', type: 'string', required: true, description: 'Board ID' },
803
- ],
804
- output: { type: 'object', description: 'Created list' },
805
- },
806
- ],
807
- },
808
- {
809
- id: 'dropbox',
810
- name: 'Dropbox',
811
- icon: '☁️',
812
- category: 'Storage',
813
- description: 'Cloud file storage and sharing',
814
- sdk: 'dropbox',
815
- authType: 'token',
816
- docsUrl: 'https://www.dropbox.com/developers/documentation/http/overview',
817
- actions: [
818
- {
819
- id: 'uploadFile',
820
- name: 'Upload File',
821
- description: 'Upload a file to Dropbox',
822
- inputs: [
823
- { name: 'path', type: 'string', required: true, description: 'File path in Dropbox' },
824
- { name: 'contents', type: 'string', required: true, description: 'File contents' },
825
- { name: 'mode', type: 'string', required: false, description: 'Upload mode (add, overwrite)', default: 'add' },
826
- ],
827
- output: { type: 'object', description: 'File metadata' },
828
- },
829
- {
830
- id: 'listFolder',
831
- name: 'List Folder',
832
- description: 'List folder contents',
833
- inputs: [
834
- { name: 'path', type: 'string', required: true, description: 'Folder path' },
835
- { name: 'recursive', type: 'boolean', required: false, description: 'Recursive listing', default: false },
836
- ],
837
- output: { type: 'array', description: 'List of files and folders' },
838
- },
839
- {
840
- id: 'createSharedLink',
841
- name: 'Create Shared Link',
842
- description: 'Create a shared link for a file',
843
- inputs: [
844
- { name: 'path', type: 'string', required: true, description: 'File path' },
845
- ],
846
- output: { type: 'object', description: 'Shared link details' },
847
- },
848
- ],
849
- },
850
- {
851
- id: 'aws-s3',
852
- name: 'AWS S3',
853
- icon: '💾',
854
- category: 'Storage',
855
- description: 'Amazon object storage',
856
- sdk: '@aws-sdk/client-s3',
857
- authType: 'api_key',
858
- docsUrl: 'https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html',
859
- actions: [
860
- {
861
- id: 'uploadObject',
862
- name: 'Upload Object',
863
- description: 'Upload an object to S3',
864
- inputs: [
865
- { name: 'bucket', type: 'string', required: true, description: 'Bucket name' },
866
- { name: 'key', type: 'string', required: true, description: 'Object key' },
867
- { name: 'body', type: 'string', required: true, description: 'Object contents' },
868
- { name: 'contentType', type: 'string', required: false, description: 'Content type' },
869
- ],
870
- output: { type: 'object', description: 'Upload result' },
871
- },
872
- {
873
- id: 'listObjects',
874
- name: 'List Objects',
875
- description: 'List objects in bucket',
876
- inputs: [
877
- { name: 'bucket', type: 'string', required: true, description: 'Bucket name' },
878
- { name: 'prefix', type: 'string', required: false, description: 'Key prefix filter' },
879
- { name: 'maxKeys', type: 'number', required: false, description: 'Maximum keys', default: 1000 },
880
- ],
881
- output: { type: 'array', description: 'List of objects' },
882
- },
883
- ],
884
- },
885
- ];
6
+ // Load tool definitions from JSON data file
7
+ function loadToolDefinitions() {
8
+ try {
9
+ // Try multiple paths to find the data file
10
+ const possiblePaths = [
11
+ join(dirname(fileURLToPath(import.meta.url)), '..', 'data', 'tool-definitions.json'),
12
+ join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'server', 'data', 'tool-definitions.json'),
13
+ join(process.cwd(), 'packages', 'gui', 'src', 'server', 'data', 'tool-definitions.json'),
14
+ ];
15
+ for (const p of possiblePaths) {
16
+ try {
17
+ const content = readFileSync(p, 'utf-8');
18
+ return JSON.parse(content);
19
+ }
20
+ catch {
21
+ continue;
22
+ }
23
+ }
24
+ console.warn('Tool definitions file not found, returning empty list');
25
+ return [];
26
+ }
27
+ catch {
28
+ return [];
29
+ }
30
+ }
31
+ const tools = loadToolDefinitions();
886
32
  // List all available tools
887
33
  router.get('/', (_req, res) => {
888
- // Return simplified tool list
889
34
  const toolList = tools.map((tool) => ({
890
35
  id: tool.id,
891
36
  name: tool.name,
@@ -895,6 +40,7 @@ router.get('/', (_req, res) => {
895
40
  sdk: tool.sdk,
896
41
  authType: tool.authType,
897
42
  actionCount: tool.actions.length,
43
+ defaultAction: tool.actions[0]?.id,
898
44
  }));
899
45
  res.json({ tools: toolList });
900
46
  });