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