upfynai-code 3.0.4 → 3.2.0

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 (258) hide show
  1. package/README.md +69 -92
  2. package/bin/cli.js +191 -0
  3. package/dist/client/assets/AppContent-M14Au3SB.js +542 -0
  4. package/{client/dist/assets/BrowserPanel-0TLEl-IC.js → dist/client/assets/BrowserPanel-TFKm2NDJ.js} +2 -2
  5. package/dist/client/assets/DashboardPanel-C88HjsCh.js +1 -0
  6. package/dist/client/assets/FileTree-DvO1xnDE.js +1 -0
  7. package/{client/dist/assets/GitPanel-C_xFM-N2.js → dist/client/assets/GitPanel-D-slVlyy.js} +2 -2
  8. package/dist/client/assets/LoginModal-Chi4SYcr.js +21 -0
  9. package/{client/dist/assets/MarkdownPreview-CESjI261.js → dist/client/assets/MarkdownPreview-CuIix2u9.js} +1 -1
  10. package/dist/client/assets/MermaidBlock-Dq9uFv82.js +2 -0
  11. package/dist/client/assets/Onboarding-QYXx24dX.js +1 -0
  12. package/{client/dist/assets/PreviewPanel-CqCa92Tf.js → dist/client/assets/PreviewPanel-Dd8q-jo0.js} +1 -1
  13. package/dist/client/assets/SetupForm-CrspaUva.js +1 -0
  14. package/dist/client/assets/WorkflowsPanel-DIlYAdhB.js +1 -0
  15. package/dist/client/assets/index-CnNNzw9A.css +1 -0
  16. package/{client/dist/assets/index-HaY-3pK1.js → dist/client/assets/index-rUkK9FDP.js} +26 -26
  17. package/{client/dist/assets/vendor-codemirror-D2ALgpaX.js → dist/client/assets/vendor-codemirror-jc6nyJQg.js} +1 -1
  18. package/{client/dist/assets/vendor-diff-DNQpbhrT.js → dist/client/assets/vendor-diff-THJmAcEI.js} +1 -1
  19. package/{client/dist/assets/vendor-icons-GyYE35HP.js → dist/client/assets/vendor-icons-CfjIpdrD.js} +145 -155
  20. package/{client/dist/assets/vendor-markdown-CimbIo6Y.js → dist/client/assets/vendor-markdown-Cdm6NEGf.js} +1 -1
  21. package/dist/client/assets/vendor-mermaid-DTPaBx-U.js +2559 -0
  22. package/{client/dist/assets/vendor-react-96lCPsRK.js → dist/client/assets/vendor-react-wFkb6mSf.js} +1 -1
  23. package/{client/dist/assets/vendor-syntax-LS_Nt30I.js → dist/client/assets/vendor-syntax-C_UZR7tc.js} +1 -1
  24. package/dist/client/favicon.png +0 -0
  25. package/dist/client/icons/icon-128x128.png +0 -0
  26. package/dist/client/icons/icon-144x144.png +0 -0
  27. package/dist/client/icons/icon-152x152.png +0 -0
  28. package/dist/client/icons/icon-192x192.png +0 -0
  29. package/dist/client/icons/icon-384x384.png +0 -0
  30. package/dist/client/icons/icon-512x512.png +0 -0
  31. package/dist/client/icons/icon-72x72.png +0 -0
  32. package/dist/client/icons/icon-96x96.png +0 -0
  33. package/{client/dist → dist/client}/index.html +37 -36
  34. package/dist/client/logo-128.png +0 -0
  35. package/dist/client/logo-256.png +0 -0
  36. package/dist/client/logo-32.png +0 -0
  37. package/dist/client/logo-512.png +0 -0
  38. package/dist/client/logo-64.png +0 -0
  39. package/dist/client/logo.png +0 -0
  40. package/{client/dist → dist/client}/manifest.json +12 -12
  41. package/{client/dist → dist/client}/mcp-docs.html +1 -1
  42. package/{client/dist → dist/client}/sw.js +2 -2
  43. package/package.json +56 -105
  44. package/scripts/postinstall.js +9 -0
  45. package/scripts/prepublish.js +77 -0
  46. package/src/animation.js +228 -0
  47. package/src/auth.js +142 -0
  48. package/src/config.js +40 -0
  49. package/src/connect.js +416 -0
  50. package/src/launch.js +81 -0
  51. package/src/mcp.js +57 -0
  52. package/src/permissions.js +140 -0
  53. package/src/persistent-shell.js +261 -0
  54. package/src/server.js +54 -0
  55. package/client/dist/assets/AppContent-CwrTP6TW.js +0 -545
  56. package/client/dist/assets/CanvasFullScreen-D1GWQsGL.js +0 -1
  57. package/client/dist/assets/CanvasWorkspace-D7ORj358.js +0 -163
  58. package/client/dist/assets/DashboardPanel-BV7ybUDe.js +0 -1
  59. package/client/dist/assets/FileTree-5qfhBqdE.js +0 -1
  60. package/client/dist/assets/LoginModal-CImJHRjX.js +0 -13
  61. package/client/dist/assets/MermaidBlock-BFM21cwe.js +0 -2
  62. package/client/dist/assets/Onboarding-B3cteLu2.js +0 -1
  63. package/client/dist/assets/SetupForm-P6dsYgHO.js +0 -1
  64. package/client/dist/assets/WorkflowsPanel-CBoN80kc.js +0 -1
  65. package/client/dist/assets/index-46kkVu2i.css +0 -1
  66. package/client/dist/assets/pdf-CE_K4jFx.js +0 -12
  67. package/client/dist/assets/vendor-canvas-BZV40eAE.css +0 -1
  68. package/client/dist/assets/vendor-canvas-DvHJ_Pn2.js +0 -49
  69. package/client/dist/assets/vendor-mermaid-DucWyDEe.js +0 -2556
  70. package/client/dist/favicon.png +0 -0
  71. package/client/dist/icons/icon-128x128.png +0 -0
  72. package/client/dist/icons/icon-144x144.png +0 -0
  73. package/client/dist/icons/icon-152x152.png +0 -0
  74. package/client/dist/icons/icon-192x192.png +0 -0
  75. package/client/dist/icons/icon-384x384.png +0 -0
  76. package/client/dist/icons/icon-512x512.png +0 -0
  77. package/client/dist/icons/icon-72x72.png +0 -0
  78. package/client/dist/icons/icon-96x96.png +0 -0
  79. package/client/dist/logo-128.png +0 -0
  80. package/client/dist/logo-256.png +0 -0
  81. package/client/dist/logo-32.png +0 -0
  82. package/client/dist/logo-512.png +0 -0
  83. package/client/dist/logo-64.png +0 -0
  84. package/commands/upfynai-connect.md +0 -59
  85. package/commands/upfynai-disconnect.md +0 -31
  86. package/commands/upfynai-doctor.md +0 -99
  87. package/commands/upfynai-export.md +0 -49
  88. package/commands/upfynai-local.md +0 -82
  89. package/commands/upfynai-status.md +0 -75
  90. package/commands/upfynai-stop.md +0 -49
  91. package/commands/upfynai-uninstall.md +0 -58
  92. package/commands/upfynai.md +0 -69
  93. package/scripts/build-client.js +0 -17
  94. package/scripts/fix-node-pty.js +0 -67
  95. package/scripts/install-commands.js +0 -78
  96. package/server/agent-loop.js +0 -242
  97. package/server/auto-compact.js +0 -99
  98. package/server/browser.js +0 -131
  99. package/server/claude-sdk.js +0 -797
  100. package/server/cli-ui.js +0 -798
  101. package/server/cli.js +0 -751
  102. package/server/constants/config.js +0 -31
  103. package/server/cursor-cli.js +0 -270
  104. package/server/database/auth.db +0 -0
  105. package/server/database/db.js +0 -1547
  106. package/server/database/init.sql +0 -70
  107. package/server/index.js +0 -3813
  108. package/server/load-env.js +0 -26
  109. package/server/mcp-server.js +0 -621
  110. package/server/middleware/auth.js +0 -184
  111. package/server/middleware/relayHelpers.js +0 -44
  112. package/server/middleware/sandboxRouter.js +0 -174
  113. package/server/openai-codex.js +0 -403
  114. package/server/openrouter.js +0 -137
  115. package/server/projects.js +0 -1807
  116. package/server/provider-factory.js +0 -174
  117. package/server/relay-client.js +0 -390
  118. package/server/routes/agent.js +0 -1234
  119. package/server/routes/auth.js +0 -559
  120. package/server/routes/browser.js +0 -419
  121. package/server/routes/canvas.js +0 -53
  122. package/server/routes/cli-auth.js +0 -263
  123. package/server/routes/codex.js +0 -396
  124. package/server/routes/commands.js +0 -707
  125. package/server/routes/composio.js +0 -176
  126. package/server/routes/cursor.js +0 -770
  127. package/server/routes/dashboard.js +0 -295
  128. package/server/routes/git.js +0 -1208
  129. package/server/routes/keys.js +0 -34
  130. package/server/routes/mcp-utils.js +0 -48
  131. package/server/routes/mcp.js +0 -661
  132. package/server/routes/payments.js +0 -227
  133. package/server/routes/projects.js +0 -754
  134. package/server/routes/sessions.js +0 -146
  135. package/server/routes/settings.js +0 -261
  136. package/server/routes/taskmaster.js +0 -1928
  137. package/server/routes/user.js +0 -106
  138. package/server/routes/vapi-chat.js +0 -624
  139. package/server/routes/voice.js +0 -235
  140. package/server/routes/webhooks.js +0 -166
  141. package/server/routes/workflows.js +0 -312
  142. package/server/sandbox.js +0 -120
  143. package/server/services/browser-ai.js +0 -154
  144. package/server/services/composio.js +0 -204
  145. package/server/services/sessionRegistry.js +0 -139
  146. package/server/services/whisperService.js +0 -84
  147. package/server/services/workflowScheduler.js +0 -211
  148. package/server/tests/relay-flow.test.js +0 -570
  149. package/server/tests/sessions.test.js +0 -259
  150. package/server/utils/commandParser.js +0 -303
  151. package/server/utils/email.js +0 -66
  152. package/server/utils/gitConfig.js +0 -24
  153. package/server/utils/mcp-detector.js +0 -198
  154. package/server/utils/taskmaster-websocket.js +0 -129
  155. package/shared/integrationCatalog.d.ts +0 -12
  156. package/shared/integrationCatalog.js +0 -172
  157. package/shared/modelConstants.js +0 -96
  158. /package/{shared → dist}/agents/claude.js +0 -0
  159. /package/{shared → dist}/agents/codex.js +0 -0
  160. /package/{shared → dist}/agents/cursor.js +0 -0
  161. /package/{shared → dist}/agents/detect.js +0 -0
  162. /package/{shared → dist}/agents/exec.js +0 -0
  163. /package/{shared → dist}/agents/files.js +0 -0
  164. /package/{shared → dist}/agents/git.js +0 -0
  165. /package/{shared → dist}/agents/gitagent.js +0 -0
  166. /package/{shared → dist}/agents/index.js +0 -0
  167. /package/{shared → dist}/agents/shell.js +0 -0
  168. /package/{shared → dist}/agents/utils.js +0 -0
  169. /package/{client/dist → dist/client}/api-docs.html +0 -0
  170. /package/{client/dist → dist/client}/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  171. /package/{client/dist → dist/client}/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  172. /package/{client/dist → dist/client}/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  173. /package/{client/dist → dist/client}/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  174. /package/{client/dist → dist/client}/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  175. /package/{client/dist → dist/client}/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  176. /package/{client/dist → dist/client}/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  177. /package/{client/dist → dist/client}/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  178. /package/{client/dist → dist/client}/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  179. /package/{client/dist → dist/client}/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  180. /package/{client/dist → dist/client}/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  181. /package/{client/dist → dist/client}/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  182. /package/{client/dist → dist/client}/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  183. /package/{client/dist → dist/client}/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  184. /package/{client/dist → dist/client}/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  185. /package/{client/dist → dist/client}/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  186. /package/{client/dist → dist/client}/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  187. /package/{client/dist → dist/client}/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  188. /package/{client/dist → dist/client}/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  189. /package/{client/dist → dist/client}/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  190. /package/{client/dist → dist/client}/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  191. /package/{client/dist → dist/client}/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  192. /package/{client/dist → dist/client}/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  193. /package/{client/dist → dist/client}/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  194. /package/{client/dist → dist/client}/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  195. /package/{client/dist → dist/client}/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  196. /package/{client/dist → dist/client}/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  197. /package/{client/dist → dist/client}/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  198. /package/{client/dist → dist/client}/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  199. /package/{client/dist → dist/client}/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  200. /package/{client/dist → dist/client}/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  201. /package/{client/dist → dist/client}/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  202. /package/{client/dist → dist/client}/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  203. /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  204. /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  205. /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  206. /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  207. /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  208. /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  209. /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  210. /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  211. /package/{client/dist → dist/client}/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  212. /package/{client/dist → dist/client}/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  213. /package/{client/dist → dist/client}/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  214. /package/{client/dist → dist/client}/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  215. /package/{client/dist → dist/client}/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  216. /package/{client/dist → dist/client}/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  217. /package/{client/dist → dist/client}/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  218. /package/{client/dist → dist/client}/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  219. /package/{client/dist → dist/client}/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  220. /package/{client/dist → dist/client}/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  221. /package/{client/dist → dist/client}/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  222. /package/{client/dist → dist/client}/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  223. /package/{client/dist → dist/client}/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  224. /package/{client/dist → dist/client}/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  225. /package/{client/dist → dist/client}/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  226. /package/{client/dist → dist/client}/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  227. /package/{client/dist → dist/client}/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  228. /package/{client/dist → dist/client}/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  229. /package/{client/dist → dist/client}/assets/vendor-i18n-DCFGyhQR.js +0 -0
  230. /package/{client/dist → dist/client}/assets/vendor-xterm-CZq1hqo1.js +0 -0
  231. /package/{client/dist → dist/client}/assets/vendor-xterm-qxJ8_QYu.css +0 -0
  232. /package/{client/dist → dist/client}/clear-cache.html +0 -0
  233. /package/{client/dist → dist/client}/convert-icons.md +0 -0
  234. /package/{client/dist → dist/client}/favicon.svg +0 -0
  235. /package/{client/dist → dist/client}/generate-icons.js +0 -0
  236. /package/{client/dist → dist/client}/icons/claude-ai-icon.svg +0 -0
  237. /package/{client/dist → dist/client}/icons/codex-white.svg +0 -0
  238. /package/{client/dist → dist/client}/icons/codex.svg +0 -0
  239. /package/{client/dist → dist/client}/icons/cursor-white.svg +0 -0
  240. /package/{client/dist → dist/client}/icons/cursor.svg +0 -0
  241. /package/{client/dist → dist/client}/icons/icon-128x128.svg +0 -0
  242. /package/{client/dist → dist/client}/icons/icon-144x144.svg +0 -0
  243. /package/{client/dist → dist/client}/icons/icon-152x152.svg +0 -0
  244. /package/{client/dist → dist/client}/icons/icon-192x192.svg +0 -0
  245. /package/{client/dist → dist/client}/icons/icon-384x384.svg +0 -0
  246. /package/{client/dist → dist/client}/icons/icon-512x512.svg +0 -0
  247. /package/{client/dist → dist/client}/icons/icon-72x72.svg +0 -0
  248. /package/{client/dist → dist/client}/icons/icon-96x96.svg +0 -0
  249. /package/{client/dist → dist/client}/icons/icon-template.svg +0 -0
  250. /package/{client/dist → dist/client}/logo.svg +0 -0
  251. /package/{client/dist → dist/client}/offline.html +0 -0
  252. /package/{client/dist → dist/client}/screenshots/cli-selection.png +0 -0
  253. /package/{client/dist → dist/client}/screenshots/desktop-main.png +0 -0
  254. /package/{client/dist → dist/client}/screenshots/mobile-chat.png +0 -0
  255. /package/{client/dist → dist/client}/screenshots/tools-modal.png +0 -0
  256. /package/{shared → dist}/gitagent/index.js +0 -0
  257. /package/{shared → dist}/gitagent/parser.js +0 -0
  258. /package/{shared → dist}/gitagent/prompt-builder.js +0 -0
@@ -1,198 +0,0 @@
1
- /**
2
- * MCP SERVER DETECTION UTILITY
3
- * ============================
4
- *
5
- * Centralized utility for detecting MCP server configurations.
6
- * Used across TaskMaster integration and other MCP-dependent features.
7
- */
8
-
9
- import { promises as fsPromises } from 'fs';
10
- import path from 'path';
11
- import os from 'os';
12
-
13
- /**
14
- * Check if task-master-ai MCP server is configured
15
- * Reads directly from Claude configuration files like claude-cli.js does
16
- * @returns {Promise<Object>} MCP detection result
17
- */
18
- export async function detectTaskMasterMCPServer() {
19
- try {
20
- // Read Claude configuration files directly (same logic as mcp.js)
21
- const homeDir = os.homedir();
22
- const configPaths = [
23
- path.join(homeDir, '.claude.json'),
24
- path.join(homeDir, '.claude', 'settings.json')
25
- ];
26
-
27
- let configData = null;
28
- let configPath = null;
29
-
30
- // Try to read from either config file
31
- for (const filepath of configPaths) {
32
- try {
33
- const fileContent = await fsPromises.readFile(filepath, 'utf8');
34
- configData = JSON.parse(fileContent);
35
- configPath = filepath;
36
- break;
37
- } catch (error) {
38
- // File doesn't exist or is not valid JSON, try next
39
- continue;
40
- }
41
- }
42
-
43
- if (!configData) {
44
- return {
45
- hasMCPServer: false,
46
- reason: 'No Claude configuration file found',
47
- hasConfig: false
48
- };
49
- }
50
-
51
- // Look for task-master-ai in user-scoped MCP servers
52
- let taskMasterServer = null;
53
- if (configData.mcpServers && typeof configData.mcpServers === 'object') {
54
- const serverEntry = Object.entries(configData.mcpServers).find(([name, config]) =>
55
- name === 'task-master-ai' ||
56
- name.includes('task-master') ||
57
- (config && config.command && config.command.includes('task-master'))
58
- );
59
-
60
- if (serverEntry) {
61
- const [name, config] = serverEntry;
62
- taskMasterServer = {
63
- name,
64
- scope: 'user',
65
- config,
66
- type: config.command ? 'stdio' : (config.url ? 'http' : 'unknown')
67
- };
68
- }
69
- }
70
-
71
- // Also check project-specific MCP servers if not found globally
72
- if (!taskMasterServer && configData.projects) {
73
- for (const [projectPath, projectConfig] of Object.entries(configData.projects)) {
74
- if (projectConfig.mcpServers && typeof projectConfig.mcpServers === 'object') {
75
- const serverEntry = Object.entries(projectConfig.mcpServers).find(([name, config]) =>
76
- name === 'task-master-ai' ||
77
- name.includes('task-master') ||
78
- (config && config.command && config.command.includes('task-master'))
79
- );
80
-
81
- if (serverEntry) {
82
- const [name, config] = serverEntry;
83
- taskMasterServer = {
84
- name,
85
- scope: 'local',
86
- projectPath,
87
- config,
88
- type: config.command ? 'stdio' : (config.url ? 'http' : 'unknown')
89
- };
90
- break;
91
- }
92
- }
93
- }
94
- }
95
-
96
- if (taskMasterServer) {
97
- const isValid = !!(taskMasterServer.config &&
98
- (taskMasterServer.config.command || taskMasterServer.config.url));
99
- const hasEnvVars = !!(taskMasterServer.config &&
100
- taskMasterServer.config.env &&
101
- Object.keys(taskMasterServer.config.env).length > 0);
102
-
103
- return {
104
- hasMCPServer: true,
105
- isConfigured: isValid,
106
- hasApiKeys: hasEnvVars,
107
- scope: taskMasterServer.scope,
108
- config: {
109
- command: taskMasterServer.config?.command,
110
- args: taskMasterServer.config?.args || [],
111
- url: taskMasterServer.config?.url,
112
- envVars: hasEnvVars ? Object.keys(taskMasterServer.config.env) : [],
113
- type: taskMasterServer.type
114
- }
115
- };
116
- } else {
117
- // Get list of available servers for debugging
118
- const availableServers = [];
119
- if (configData.mcpServers) {
120
- availableServers.push(...Object.keys(configData.mcpServers));
121
- }
122
- if (configData.projects) {
123
- for (const projectConfig of Object.values(configData.projects)) {
124
- if (projectConfig.mcpServers) {
125
- availableServers.push(...Object.keys(projectConfig.mcpServers).map(name => `local:${name}`));
126
- }
127
- }
128
- }
129
-
130
- return {
131
- hasMCPServer: false,
132
- reason: 'task-master-ai not found in configured MCP servers',
133
- hasConfig: true,
134
- configPath,
135
- availableServers
136
- };
137
- }
138
- } catch (error) {
139
- console.error('Error detecting MCP server config:', error);
140
- return {
141
- hasMCPServer: false,
142
- reason: `Error checking MCP config: ${error.message}`,
143
- hasConfig: false
144
- };
145
- }
146
- }
147
-
148
- /**
149
- * Get all configured MCP servers (not just TaskMaster)
150
- * @returns {Promise<Object>} All MCP servers configuration
151
- */
152
- export async function getAllMCPServers() {
153
- try {
154
- const homeDir = os.homedir();
155
- const configPaths = [
156
- path.join(homeDir, '.claude.json'),
157
- path.join(homeDir, '.claude', 'settings.json')
158
- ];
159
-
160
- let configData = null;
161
- let configPath = null;
162
-
163
- // Try to read from either config file
164
- for (const filepath of configPaths) {
165
- try {
166
- const fileContent = await fsPromises.readFile(filepath, 'utf8');
167
- configData = JSON.parse(fileContent);
168
- configPath = filepath;
169
- break;
170
- } catch (error) {
171
- continue;
172
- }
173
- }
174
-
175
- if (!configData) {
176
- return {
177
- hasConfig: false,
178
- servers: {},
179
- projectServers: {}
180
- };
181
- }
182
-
183
- return {
184
- hasConfig: true,
185
- configPath,
186
- servers: configData.mcpServers || {},
187
- projectServers: configData.projects || {}
188
- };
189
- } catch (error) {
190
- console.error('Error getting all MCP servers:', error);
191
- return {
192
- hasConfig: false,
193
- error: error.message,
194
- servers: {},
195
- projectServers: {}
196
- };
197
- }
198
- }
@@ -1,129 +0,0 @@
1
- /**
2
- * TASKMASTER WEBSOCKET UTILITIES
3
- * ==============================
4
- *
5
- * Utilities for broadcasting TaskMaster state changes via WebSocket.
6
- * Integrates with the existing WebSocket system to provide real-time updates.
7
- */
8
-
9
- /**
10
- * Broadcast TaskMaster project update to all connected clients
11
- * @param {WebSocket.Server} wss - WebSocket server instance
12
- * @param {string} projectName - Name of the updated project
13
- * @param {Object} taskMasterData - Updated TaskMaster data
14
- */
15
- export function broadcastTaskMasterProjectUpdate(wss, projectName, taskMasterData) {
16
- if (!wss || !projectName) {
17
- console.warn('TaskMaster WebSocket broadcast: Missing wss or projectName');
18
- return;
19
- }
20
-
21
- const message = {
22
- type: 'taskmaster-project-updated',
23
- projectName,
24
- taskMasterData,
25
- timestamp: new Date().toISOString()
26
- };
27
-
28
-
29
- wss.clients.forEach((client) => {
30
- if (client.readyState === 1) { // WebSocket.OPEN
31
- try {
32
- client.send(JSON.stringify(message));
33
- } catch (error) {
34
- console.error('Error sending TaskMaster project update:', error);
35
- }
36
- }
37
- });
38
- }
39
-
40
- /**
41
- * Broadcast TaskMaster tasks update for a specific project
42
- * @param {WebSocket.Server} wss - WebSocket server instance
43
- * @param {string} projectName - Name of the project with updated tasks
44
- * @param {Object} tasksData - Updated tasks data
45
- */
46
- export function broadcastTaskMasterTasksUpdate(wss, projectName, tasksData) {
47
- if (!wss || !projectName) {
48
- console.warn('TaskMaster WebSocket broadcast: Missing wss or projectName');
49
- return;
50
- }
51
-
52
- const message = {
53
- type: 'taskmaster-tasks-updated',
54
- projectName,
55
- tasksData,
56
- timestamp: new Date().toISOString()
57
- };
58
-
59
-
60
- wss.clients.forEach((client) => {
61
- if (client.readyState === 1) { // WebSocket.OPEN
62
- try {
63
- client.send(JSON.stringify(message));
64
- } catch (error) {
65
- console.error('Error sending TaskMaster tasks update:', error);
66
- }
67
- }
68
- });
69
- }
70
-
71
- /**
72
- * Broadcast MCP server status change
73
- * @param {WebSocket.Server} wss - WebSocket server instance
74
- * @param {Object} mcpStatus - Updated MCP server status
75
- */
76
- export function broadcastMCPStatusChange(wss, mcpStatus) {
77
- if (!wss) {
78
- console.warn('TaskMaster WebSocket broadcast: Missing wss');
79
- return;
80
- }
81
-
82
- const message = {
83
- type: 'taskmaster-mcp-status-changed',
84
- mcpStatus,
85
- timestamp: new Date().toISOString()
86
- };
87
-
88
-
89
- wss.clients.forEach((client) => {
90
- if (client.readyState === 1) { // WebSocket.OPEN
91
- try {
92
- client.send(JSON.stringify(message));
93
- } catch (error) {
94
- console.error('Error sending TaskMaster MCP status update:', error);
95
- }
96
- }
97
- });
98
- }
99
-
100
- /**
101
- * Broadcast general TaskMaster update notification
102
- * @param {WebSocket.Server} wss - WebSocket server instance
103
- * @param {string} updateType - Type of update (e.g., 'initialization', 'configuration')
104
- * @param {Object} data - Additional data about the update
105
- */
106
- export function broadcastTaskMasterUpdate(wss, updateType, data = {}) {
107
- if (!wss || !updateType) {
108
- console.warn('TaskMaster WebSocket broadcast: Missing wss or updateType');
109
- return;
110
- }
111
-
112
- const message = {
113
- type: 'taskmaster-update',
114
- updateType,
115
- data,
116
- timestamp: new Date().toISOString()
117
- };
118
-
119
-
120
- wss.clients.forEach((client) => {
121
- if (client.readyState === 1) { // WebSocket.OPEN
122
- try {
123
- client.send(JSON.stringify(message));
124
- } catch (error) {
125
- console.error('Error sending TaskMaster update:', error);
126
- }
127
- }
128
- });
129
- }
@@ -1,12 +0,0 @@
1
- export interface CatalogEntry {
2
- id: string;
3
- name: string;
4
- icon: string;
5
- keywords: string[];
6
- authConfigId: string | null;
7
- popularActions: Array<{ slug: string; label: string; params: string[] }>;
8
- }
9
-
10
- export declare const INTEGRATION_CATALOG: CatalogEntry[];
11
- export declare const KEYWORD_MAP: Record<string, string>;
12
- export declare const CATALOG_BY_ID: Record<string, CatalogEntry>;
@@ -1,172 +0,0 @@
1
- /**
2
- * Integration Catalog — shared between frontend (keyword matching) and backend (authConfigId lookup).
3
- * Maps keywords to Composio toolkit IDs with popular actions.
4
- */
5
-
6
- const INTEGRATION_CATALOG = [
7
- {
8
- id: 'GMAIL',
9
- name: 'Gmail',
10
- icon: 'mail',
11
- keywords: ['gmail', 'email', 'send email', 'inbox', 'mail'],
12
- authConfigId: null,
13
- popularActions: [
14
- { slug: 'GMAIL_SEND_EMAIL', label: 'Send Email', params: ['to', 'subject', 'body'] },
15
- { slug: 'GMAIL_FETCH_EMAILS', label: 'Fetch Emails', params: ['query', 'max_results'] },
16
- ],
17
- },
18
- {
19
- id: 'GOOGLECALENDAR',
20
- name: 'Google Calendar',
21
- icon: 'calendar',
22
- keywords: ['calendar', 'event', 'meeting', 'schedule meeting'],
23
- authConfigId: null,
24
- popularActions: [
25
- { slug: 'GOOGLECALENDAR_CREATE_EVENT', label: 'Create Event', params: ['summary', 'start_time', 'end_time'] },
26
- { slug: 'GOOGLECALENDAR_LIST_EVENTS', label: 'List Events', params: ['time_min', 'time_max'] },
27
- ],
28
- },
29
- {
30
- id: 'SLACK',
31
- name: 'Slack',
32
- icon: 'hash',
33
- keywords: ['slack', 'channel', 'slack message'],
34
- authConfigId: null,
35
- popularActions: [
36
- { slug: 'SLACK_SENDS_A_MESSAGE_TO_A_SLACK_CHANNEL', label: 'Send Message', params: ['channel', 'text'] },
37
- ],
38
- },
39
- {
40
- id: 'GITHUB',
41
- name: 'GitHub',
42
- icon: 'github',
43
- keywords: ['github', 'repository', 'pull request', 'issue', 'commit'],
44
- authConfigId: null,
45
- popularActions: [
46
- { slug: 'GITHUB_CREATE_AN_ISSUE', label: 'Create Issue', params: ['owner', 'repo', 'title', 'body'] },
47
- { slug: 'GITHUB_CREATE_A_PULL_REQUEST', label: 'Create PR', params: ['owner', 'repo', 'title', 'head', 'base'] },
48
- ],
49
- },
50
- {
51
- id: 'NOTION',
52
- name: 'Notion',
53
- icon: 'file-text',
54
- keywords: ['notion', 'page', 'note'],
55
- authConfigId: null,
56
- popularActions: [
57
- { slug: 'NOTION_CREATE_A_PAGE', label: 'Create Page', params: ['parent_id', 'title', 'content'] },
58
- ],
59
- },
60
- {
61
- id: 'DISCORD',
62
- name: 'Discord',
63
- icon: 'message-circle',
64
- keywords: ['discord'],
65
- authConfigId: null,
66
- popularActions: [
67
- { slug: 'DISCORD_SEND_MESSAGE', label: 'Send Message', params: ['channel_id', 'content'] },
68
- ],
69
- },
70
- {
71
- id: 'GOOGLEDRIVE',
72
- name: 'Google Drive',
73
- icon: 'hard-drive',
74
- keywords: ['drive', 'google drive', 'upload file', 'file storage'],
75
- authConfigId: null,
76
- popularActions: [
77
- { slug: 'GOOGLEDRIVE_UPLOAD_FILE', label: 'Upload File', params: ['file_name', 'content'] },
78
- { slug: 'GOOGLEDRIVE_LIST_FILES', label: 'List Files', params: ['query'] },
79
- ],
80
- },
81
- {
82
- id: 'TRELLO',
83
- name: 'Trello',
84
- icon: 'kanban',
85
- keywords: ['trello', 'board', 'card', 'kanban'],
86
- authConfigId: null,
87
- popularActions: [
88
- { slug: 'TRELLO_CREATE_CARD', label: 'Create Card', params: ['list_id', 'name', 'desc'] },
89
- ],
90
- },
91
- {
92
- id: 'LINEAR',
93
- name: 'Linear',
94
- icon: 'bug',
95
- keywords: ['linear', 'ticket', 'linear issue'],
96
- authConfigId: null,
97
- popularActions: [
98
- { slug: 'LINEAR_CREATE_ISSUE', label: 'Create Issue', params: ['team_id', 'title', 'description'] },
99
- { slug: 'LINEAR_LIST_ISSUES', label: 'List Issues', params: ['team_id', 'status'] },
100
- ],
101
- },
102
- {
103
- id: 'JIRA',
104
- name: 'Jira',
105
- icon: 'bug',
106
- keywords: ['jira', 'sprint', 'jira issue', 'jira ticket'],
107
- authConfigId: null,
108
- popularActions: [
109
- { slug: 'JIRA_CREATE_ISSUE', label: 'Create Issue', params: ['project_key', 'summary', 'description', 'issue_type'] },
110
- { slug: 'JIRA_GET_ISSUE', label: 'Get Issue', params: ['issue_key'] },
111
- ],
112
- },
113
- {
114
- id: 'ASANA',
115
- name: 'Asana',
116
- icon: 'list-checks',
117
- keywords: ['asana', 'task', 'asana task', 'project management'],
118
- authConfigId: null,
119
- popularActions: [
120
- { slug: 'ASANA_CREATE_TASK', label: 'Create Task', params: ['project_id', 'name', 'notes'] },
121
- { slug: 'ASANA_LIST_TASKS', label: 'List Tasks', params: ['project_id'] },
122
- ],
123
- },
124
- {
125
- id: 'STRIPE',
126
- name: 'Stripe',
127
- icon: 'credit-card',
128
- keywords: ['stripe', 'payment', 'invoice', 'charge', 'billing'],
129
- authConfigId: null,
130
- popularActions: [
131
- { slug: 'STRIPE_CREATE_INVOICE', label: 'Create Invoice', params: ['customer_id', 'amount', 'currency'] },
132
- { slug: 'STRIPE_LIST_PAYMENTS', label: 'List Payments', params: ['limit'] },
133
- ],
134
- },
135
- {
136
- id: 'TWILIO',
137
- name: 'Twilio',
138
- icon: 'phone',
139
- keywords: ['twilio', 'sms', 'text message', 'phone'],
140
- authConfigId: null,
141
- popularActions: [
142
- { slug: 'TWILIO_SEND_SMS', label: 'Send SMS', params: ['to', 'body'] },
143
- ],
144
- },
145
- {
146
- id: 'AIRTABLE',
147
- name: 'Airtable',
148
- icon: 'table',
149
- keywords: ['airtable', 'spreadsheet', 'database', 'airtable record'],
150
- authConfigId: null,
151
- popularActions: [
152
- { slug: 'AIRTABLE_CREATE_RECORD', label: 'Create Record', params: ['base_id', 'table_name', 'fields'] },
153
- { slug: 'AIRTABLE_LIST_RECORDS', label: 'List Records', params: ['base_id', 'table_name'] },
154
- ],
155
- },
156
- ];
157
-
158
- // Flattened keyword → integration ID map for fast O(1) lookup
159
- const KEYWORD_MAP = {};
160
- for (const integration of INTEGRATION_CATALOG) {
161
- for (const kw of integration.keywords) {
162
- KEYWORD_MAP[kw.toLowerCase()] = integration.id;
163
- }
164
- }
165
-
166
- // Integration ID → catalog entry for quick lookup
167
- const CATALOG_BY_ID = {};
168
- for (const integration of INTEGRATION_CATALOG) {
169
- CATALOG_BY_ID[integration.id] = integration;
170
- }
171
-
172
- export { INTEGRATION_CATALOG, KEYWORD_MAP, CATALOG_BY_ID };
@@ -1,96 +0,0 @@
1
- /**
2
- * Centralized Model Definitions
3
- * Single source of truth for all supported AI models
4
- */
5
-
6
- /**
7
- * Claude (Anthropic) Models
8
- *
9
- * Note: Claude uses two different formats:
10
- * - SDK format ('sonnet', 'opus') - used by the UI and claude-sdk.js
11
- * - API format ('claude-sonnet-4.5') - used by slash commands for display
12
- */
13
- export const CLAUDE_MODELS = {
14
- // Models in SDK format (what the actual SDK accepts)
15
- OPTIONS: [
16
- { value: 'sonnet', label: 'Sonnet' },
17
- { value: 'opus', label: 'Opus' },
18
- { value: 'haiku', label: 'Haiku' },
19
- { value: 'opusplan', label: 'Opus Plan' },
20
- { value: 'sonnet[1m]', label: 'Sonnet [1M]' }
21
- ],
22
-
23
- DEFAULT: 'sonnet'
24
- };
25
-
26
- /**
27
- * Cursor Models
28
- */
29
- export const CURSOR_MODELS = {
30
- OPTIONS: [
31
- { value: 'gpt-5.2-high', label: 'GPT-5.2 High' },
32
- { value: 'gemini-3-pro', label: 'Gemini 3 Pro' },
33
- { value: 'opus-4.5-thinking', label: 'Claude 4.5 Opus (Thinking)' },
34
- { value: 'gpt-5.2', label: 'GPT-5.2' },
35
- { value: 'gpt-5.1', label: 'GPT-5.1' },
36
- { value: 'gpt-5.1-high', label: 'GPT-5.1 High' },
37
- { value: 'composer-1', label: 'Composer 1' },
38
- { value: 'auto', label: 'Auto' },
39
- { value: 'sonnet-4.5', label: 'Claude 4.5 Sonnet' },
40
- { value: 'sonnet-4.5-thinking', label: 'Claude 4.5 Sonnet (Thinking)' },
41
- { value: 'opus-4.5', label: 'Claude 4.5 Opus' },
42
- { value: 'gpt-5.1-codex', label: 'GPT-5.1 Codex' },
43
- { value: 'gpt-5.1-codex-high', label: 'GPT-5.1 Codex High' },
44
- { value: 'gpt-5.1-codex-max', label: 'GPT-5.1 Codex Max' },
45
- { value: 'gpt-5.1-codex-max-high', label: 'GPT-5.1 Codex Max High' },
46
- { value: 'opus-4.1', label: 'Claude 4.1 Opus' },
47
- { value: 'grok', label: 'Grok' }
48
- ],
49
-
50
- DEFAULT: 'gpt-5'
51
- };
52
-
53
- /**
54
- * Codex (OpenAI) Models
55
- */
56
- export const CODEX_MODELS = {
57
- OPTIONS: [
58
- { value: 'gpt-5.3-codex', label: 'GPT-5.3 Codex' },
59
- { value: 'gpt-5.2-codex', label: 'GPT-5.2 Codex' },
60
- { value: 'gpt-5.2', label: 'GPT-5.2' },
61
- { value: 'gpt-5.1-codex-max', label: 'GPT-5.1 Codex Max' },
62
- { value: 'o3', label: 'O3' },
63
- { value: 'o4-mini', label: 'O4-mini' }
64
- ],
65
-
66
- DEFAULT: 'gpt-5.2'
67
- };
68
-
69
- /**
70
- * OpenRouter Models (BYOK — user brings their own API key)
71
- * Access 200+ models from all major providers through a single API.
72
- */
73
- export const OPENROUTER_MODELS = {
74
- OPTIONS: [
75
- { value: 'anthropic/claude-sonnet-4', label: 'Claude Sonnet 4' },
76
- { value: 'anthropic/claude-opus-4', label: 'Claude Opus 4' },
77
- { value: 'openai/gpt-4o', label: 'GPT-4o' },
78
- { value: 'openai/o3', label: 'O3' },
79
- { value: 'google/gemini-2.5-pro', label: 'Gemini 2.5 Pro' },
80
- { value: 'meta-llama/llama-4-maverick', label: 'Llama 4 Maverick' },
81
- { value: 'mistralai/mistral-large', label: 'Mistral Large' },
82
- { value: 'deepseek/deepseek-r1', label: 'DeepSeek R1' },
83
- ],
84
-
85
- DEFAULT: 'anthropic/claude-sonnet-4'
86
- };
87
-
88
- /**
89
- * AI Provider types for BYOK (Bring Your Own Key)
90
- */
91
- export const AI_PROVIDER_TYPES = [
92
- { type: 'anthropic_key', label: 'Anthropic', prefix: 'sk-ant-', placeholder: 'sk-ant-api03-...' },
93
- { type: 'openai_key', label: 'OpenAI', prefix: 'sk-', placeholder: 'sk-...' },
94
- { type: 'openrouter_key', label: 'OpenRouter', prefix: 'sk-or-', placeholder: 'sk-or-v1-...' },
95
- { type: 'google_key', label: 'Google AI', prefix: 'AI', placeholder: 'AIza...' },
96
- ];
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes