imcp 0.1.7 → 0.1.8-dev

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 (314) hide show
  1. package/dist/cli/commands/install.js +1 -106
  2. package/dist/cli/commands/install.js.map +1 -0
  3. package/dist/cli/commands/list.js +1 -90
  4. package/dist/cli/commands/list.js.map +1 -0
  5. package/dist/cli/commands/pull.js +1 -16
  6. package/dist/cli/commands/pull.js.map +1 -0
  7. package/dist/cli/commands/serve.js +1 -33
  8. package/dist/cli/commands/serve.js.map +1 -0
  9. package/dist/cli/commands/uninstall.js +1 -46
  10. package/dist/cli/commands/uninstall.js.map +1 -0
  11. package/dist/cli/index.js +1 -65
  12. package/dist/cli/index.js.map +1 -0
  13. package/dist/core/installers/clients/BaseClientInstaller.js +1 -282
  14. package/dist/core/installers/clients/BaseClientInstaller.js.map +1 -0
  15. package/dist/core/installers/clients/ClientInstaller.js +1 -163
  16. package/dist/core/installers/clients/ClientInstaller.js.map +1 -0
  17. package/dist/core/installers/clients/ClientInstallerFactory.js +1 -36
  18. package/dist/core/installers/clients/ClientInstallerFactory.js.map +1 -0
  19. package/dist/core/installers/clients/ClineInstaller.js +1 -30
  20. package/dist/core/installers/clients/ClineInstaller.js.map +1 -0
  21. package/dist/core/installers/clients/ExtensionInstaller.js +1 -151
  22. package/dist/core/installers/clients/ExtensionInstaller.js.map +1 -0
  23. package/dist/core/installers/clients/GithubCopilotInstaller.js +1 -68
  24. package/dist/core/installers/clients/GithubCopilotInstaller.js.map +1 -0
  25. package/dist/core/installers/clients/MSRooCodeInstaller.js +1 -28
  26. package/dist/core/installers/clients/MSRooCodeInstaller.js.map +1 -0
  27. package/dist/core/installers/index.js +1 -8
  28. package/dist/core/installers/index.js.map +1 -0
  29. package/dist/core/installers/requirements/BaseInstaller.js +1 -56
  30. package/dist/core/installers/requirements/BaseInstaller.js.map +1 -0
  31. package/dist/core/installers/requirements/CommandInstaller.js +1 -213
  32. package/dist/core/installers/requirements/CommandInstaller.js.map +1 -0
  33. package/dist/core/installers/requirements/GeneralInstaller.js +1 -126
  34. package/dist/core/installers/requirements/GeneralInstaller.js.map +1 -0
  35. package/dist/core/installers/requirements/InstallerFactory.js +1 -99
  36. package/dist/core/installers/requirements/InstallerFactory.js.map +1 -0
  37. package/dist/core/installers/requirements/NpmInstaller.js +1 -235
  38. package/dist/core/installers/requirements/NpmInstaller.js.map +1 -0
  39. package/dist/core/installers/requirements/NugetInstaller.js +1 -188
  40. package/dist/core/installers/requirements/NugetInstaller.js.map +1 -0
  41. package/dist/core/installers/requirements/PipInstaller.js +1 -192
  42. package/dist/core/installers/requirements/PipInstaller.js.map +1 -0
  43. package/dist/core/installers/requirements/RequirementInstaller.js +1 -2
  44. package/dist/core/installers/requirements/RequirementInstaller.js.map +1 -0
  45. package/dist/core/loaders/ConfigurationLoader.js +1 -256
  46. package/dist/core/loaders/ConfigurationLoader.js.map +1 -0
  47. package/dist/core/loaders/ConfigurationProvider.js +1 -383
  48. package/dist/core/loaders/ConfigurationProvider.js.map +1 -0
  49. package/dist/core/loaders/InstallOperationManager.js +1 -310
  50. package/dist/core/loaders/InstallOperationManager.js.map +1 -0
  51. package/dist/core/loaders/ServerSchemaLoader.js +1 -108
  52. package/dist/core/loaders/ServerSchemaLoader.js.map +1 -0
  53. package/dist/core/loaders/ServerSchemaProvider.js +1 -89
  54. package/dist/core/loaders/ServerSchemaProvider.js.map +1 -0
  55. package/dist/core/loaders/SystemSettingsManager.js +1 -256
  56. package/dist/core/loaders/SystemSettingsManager.js.map +1 -0
  57. package/dist/core/metadatas/constants.js +1 -100
  58. package/dist/core/metadatas/constants.js.map +1 -0
  59. package/dist/core/metadatas/recordingConstants.js +1 -46
  60. package/dist/core/metadatas/recordingConstants.js.map +1 -0
  61. package/dist/core/metadatas/types.js +1 -15
  62. package/dist/core/metadatas/types.js.map +1 -0
  63. package/dist/core/onboard/FeedOnboardService.js +1 -422
  64. package/dist/core/onboard/FeedOnboardService.js.map +1 -0
  65. package/dist/core/onboard/OnboardProcessor.js +1 -333
  66. package/dist/core/onboard/OnboardProcessor.js.map +1 -0
  67. package/dist/core/onboard/OnboardStatus.js +1 -9
  68. package/dist/core/onboard/OnboardStatus.js.map +1 -0
  69. package/dist/core/onboard/OnboardStatusManager.js +1 -360
  70. package/dist/core/onboard/OnboardStatusManager.js.map +1 -0
  71. package/dist/core/validators/FeedValidator.js +1 -133
  72. package/dist/core/validators/FeedValidator.js.map +1 -0
  73. package/dist/core/validators/IServerValidator.js +1 -1
  74. package/dist/core/validators/IServerValidator.js.map +1 -0
  75. package/dist/core/validators/SSEServerValidator.js +1 -38
  76. package/dist/core/validators/SSEServerValidator.js.map +1 -0
  77. package/dist/core/validators/ServerValidatorFactory.js +1 -44
  78. package/dist/core/validators/ServerValidatorFactory.js.map +1 -0
  79. package/dist/core/validators/StdioServerValidator.js +1 -281
  80. package/dist/core/validators/StdioServerValidator.js.map +1 -0
  81. package/dist/index.js +1 -18
  82. package/dist/index.js.map +1 -0
  83. package/dist/services/InstallationService.js +1 -81
  84. package/dist/services/InstallationService.js.map +1 -0
  85. package/dist/services/MCPManager.js +1 -197
  86. package/dist/services/MCPManager.js.map +1 -0
  87. package/dist/services/RequirementService.js +1 -548
  88. package/dist/services/RequirementService.js.map +1 -0
  89. package/dist/services/ServerService.js +1 -127
  90. package/dist/services/ServerService.js.map +1 -0
  91. package/dist/services/TelemetryService.js +1 -53
  92. package/dist/services/TelemetryService.js.map +1 -0
  93. package/dist/utils/UpdateCheckTracker.js +1 -79
  94. package/dist/utils/UpdateCheckTracker.js.map +1 -0
  95. package/dist/utils/adoUtils.js +1 -254
  96. package/dist/utils/adoUtils.js.map +1 -0
  97. package/dist/utils/clientUtils.js +1 -65
  98. package/dist/utils/clientUtils.js.map +1 -0
  99. package/dist/utils/feedUtils.js +1 -28
  100. package/dist/utils/feedUtils.js.map +1 -0
  101. package/dist/utils/githubAuth.js +1 -177
  102. package/dist/utils/githubAuth.js.map +1 -0
  103. package/dist/utils/githubUtils.js +1 -125
  104. package/dist/utils/githubUtils.js.map +1 -0
  105. package/dist/utils/logger.js +1 -176
  106. package/dist/utils/logger.js.map +1 -0
  107. package/dist/utils/macroExpressionUtils.js +1 -93
  108. package/dist/utils/macroExpressionUtils.js.map +1 -0
  109. package/dist/utils/osUtils.js +1 -664
  110. package/dist/utils/osUtils.js.map +1 -0
  111. package/dist/utils/versionUtils.js +1 -101
  112. package/dist/utils/versionUtils.js.map +1 -0
  113. package/dist/web/contract/serverContract.js +1 -1
  114. package/dist/web/contract/serverContract.js.map +1 -0
  115. package/dist/web/public/js/api.js +2 -132
  116. package/dist/web/public/js/api.js.map +1 -0
  117. package/dist/web/public/js/detailsWidget.js +2 -264
  118. package/dist/web/public/js/detailsWidget.js.map +1 -0
  119. package/dist/web/public/js/flights/flights.js +2 -127
  120. package/dist/web/public/js/flights/flights.js.map +1 -0
  121. package/dist/web/public/js/modal/index.js +2 -52
  122. package/dist/web/public/js/modal/index.js.map +1 -0
  123. package/dist/web/public/js/modal/installModal.js +2 -162
  124. package/dist/web/public/js/modal/installModal.js.map +1 -0
  125. package/dist/web/public/js/modal/installation.js +2 -266
  126. package/dist/web/public/js/modal/installation.js.map +1 -0
  127. package/dist/web/public/js/modal/loadingModal.js +2 -182
  128. package/dist/web/public/js/modal/loadingModal.js.map +1 -0
  129. package/dist/web/public/js/modal/modalSetup.js +2 -595
  130. package/dist/web/public/js/modal/modalSetup.js.map +1 -0
  131. package/dist/web/public/js/modal/modalUtils.js +2 -37
  132. package/dist/web/public/js/modal/modalUtils.js.map +1 -0
  133. package/dist/web/public/js/modal/versionUtils.js +2 -20
  134. package/dist/web/public/js/modal/versionUtils.js.map +1 -0
  135. package/dist/web/public/js/modal.js +2 -42
  136. package/dist/web/public/js/modal.js.map +1 -0
  137. package/dist/web/public/js/notifications.js +2 -137
  138. package/dist/web/public/js/notifications.js.map +1 -0
  139. package/dist/web/public/js/onboard/formProcessor.js +2 -1037
  140. package/dist/web/public/js/onboard/formProcessor.js.map +1 -0
  141. package/dist/web/public/js/onboard/index.js +2 -374
  142. package/dist/web/public/js/onboard/index.js.map +1 -0
  143. package/dist/web/public/js/onboard/publishHandler.js +2 -172
  144. package/dist/web/public/js/onboard/publishHandler.js.map +1 -0
  145. package/dist/web/public/js/onboard/state.js +2 -76
  146. package/dist/web/public/js/onboard/state.js.map +1 -0
  147. package/dist/web/public/js/onboard/templates.js +2 -342
  148. package/dist/web/public/js/onboard/templates.js.map +1 -0
  149. package/dist/web/public/js/onboard/uiHandlers.js +2 -1076
  150. package/dist/web/public/js/onboard/uiHandlers.js.map +1 -0
  151. package/dist/web/public/js/onboard/validationHandlers.js +2 -493
  152. package/dist/web/public/js/onboard/validationHandlers.js.map +1 -0
  153. package/dist/web/public/js/serverCategoryDetails.js +2 -364
  154. package/dist/web/public/js/serverCategoryDetails.js.map +1 -0
  155. package/dist/web/public/js/serverCategoryList.js +2 -241
  156. package/dist/web/public/js/serverCategoryList.js.map +1 -0
  157. package/dist/web/public/js/settings.js +2 -314
  158. package/dist/web/public/js/settings.js.map +1 -0
  159. package/dist/web/server.js +1 -404
  160. package/dist/web/server.js.map +1 -0
  161. package/package.json +8 -2
  162. package/.github/ISSUE_TEMPLATE/JitAccess.yml +0 -28
  163. package/.github/acl/access.yml +0 -20
  164. package/.github/compliance/inventory.yml +0 -5
  165. package/.github/policies/jit.yml +0 -19
  166. package/.github/workflows/build.yml +0 -28
  167. package/.roo/rules-code/rules.md +0 -88
  168. package/dist/cli/commands/start.d.ts +0 -2
  169. package/dist/cli/commands/start.js +0 -32
  170. package/dist/cli/commands/sync.d.ts +0 -2
  171. package/dist/cli/commands/sync.js +0 -17
  172. package/dist/core/ConfigurationLoader.d.ts +0 -32
  173. package/dist/core/ConfigurationLoader.js +0 -236
  174. package/dist/core/ConfigurationProvider.d.ts +0 -35
  175. package/dist/core/ConfigurationProvider.js +0 -375
  176. package/dist/core/InstallationService.d.ts +0 -50
  177. package/dist/core/InstallationService.js +0 -350
  178. package/dist/core/MCPManager.d.ts +0 -28
  179. package/dist/core/MCPManager.js +0 -188
  180. package/dist/core/RequirementService.d.ts +0 -40
  181. package/dist/core/RequirementService.js +0 -110
  182. package/dist/core/ServerSchemaLoader.d.ts +0 -11
  183. package/dist/core/ServerSchemaLoader.js +0 -43
  184. package/dist/core/ServerSchemaProvider.d.ts +0 -17
  185. package/dist/core/ServerSchemaProvider.js +0 -120
  186. package/dist/core/constants.d.ts +0 -47
  187. package/dist/core/constants.js +0 -94
  188. package/dist/core/installers/BaseInstaller.d.ts +0 -74
  189. package/dist/core/installers/BaseInstaller.js +0 -253
  190. package/dist/core/installers/ClientInstaller.d.ts +0 -23
  191. package/dist/core/installers/ClientInstaller.js +0 -564
  192. package/dist/core/installers/CommandInstaller.d.ts +0 -37
  193. package/dist/core/installers/CommandInstaller.js +0 -173
  194. package/dist/core/installers/GeneralInstaller.d.ts +0 -33
  195. package/dist/core/installers/GeneralInstaller.js +0 -85
  196. package/dist/core/installers/InstallerFactory.d.ts +0 -54
  197. package/dist/core/installers/InstallerFactory.js +0 -97
  198. package/dist/core/installers/NpmInstaller.d.ts +0 -26
  199. package/dist/core/installers/NpmInstaller.js +0 -127
  200. package/dist/core/installers/PipInstaller.d.ts +0 -28
  201. package/dist/core/installers/PipInstaller.js +0 -127
  202. package/dist/core/installers/RequirementInstaller.d.ts +0 -33
  203. package/dist/core/installers/RequirementInstaller.js +0 -3
  204. package/dist/core/types.d.ts +0 -166
  205. package/dist/core/types.js +0 -16
  206. package/dist/services/InstallRequestValidator.d.ts +0 -21
  207. package/dist/services/InstallRequestValidator.js +0 -99
  208. package/dist/web/public/js/modal/installHandler.js +0 -227
  209. package/dist/web/public/js/modal/loadingUI.js +0 -74
  210. package/dist/web/public/js/modal/messageQueue.js +0 -112
  211. package/dist/web/public/js/modal/modalUI.js +0 -214
  212. package/dist/web/public/js/modal/version.js +0 -20
  213. package/dist/web/public/js/onboard/ONBOARDING_PAGE_DESIGN.md +0 -370
  214. package/docs/ONBOARDING_PAGE_DESIGN.md +0 -260
  215. package/docs/Telemetry.md +0 -136
  216. package/memory-bank/activeContext.md +0 -26
  217. package/memory-bank/decisionLog.md +0 -91
  218. package/memory-bank/productContext.md +0 -41
  219. package/memory-bank/progress.md +0 -35
  220. package/memory-bank/systemPatterns.md +0 -10
  221. package/src/cli/commands/install.ts +0 -139
  222. package/src/cli/commands/list.ts +0 -113
  223. package/src/cli/commands/pull.ts +0 -16
  224. package/src/cli/commands/serve.ts +0 -39
  225. package/src/cli/commands/uninstall.ts +0 -64
  226. package/src/cli/index.ts +0 -82
  227. package/src/core/installers/clients/BaseClientInstaller.ts +0 -341
  228. package/src/core/installers/clients/ClientInstaller.ts +0 -222
  229. package/src/core/installers/clients/ClientInstallerFactory.ts +0 -43
  230. package/src/core/installers/clients/ClineInstaller.ts +0 -35
  231. package/src/core/installers/clients/ExtensionInstaller.ts +0 -165
  232. package/src/core/installers/clients/GithubCopilotInstaller.ts +0 -79
  233. package/src/core/installers/clients/MSRooCodeInstaller.ts +0 -32
  234. package/src/core/installers/index.ts +0 -11
  235. package/src/core/installers/requirements/BaseInstaller.ts +0 -85
  236. package/src/core/installers/requirements/CommandInstaller.ts +0 -231
  237. package/src/core/installers/requirements/GeneralInstaller.ts +0 -133
  238. package/src/core/installers/requirements/InstallerFactory.ts +0 -114
  239. package/src/core/installers/requirements/NpmInstaller.ts +0 -271
  240. package/src/core/installers/requirements/NugetInstaller.ts +0 -203
  241. package/src/core/installers/requirements/PipInstaller.ts +0 -207
  242. package/src/core/installers/requirements/RequirementInstaller.ts +0 -42
  243. package/src/core/loaders/ConfigurationLoader.ts +0 -298
  244. package/src/core/loaders/ConfigurationProvider.ts +0 -462
  245. package/src/core/loaders/InstallOperationManager.ts +0 -367
  246. package/src/core/loaders/ServerSchemaLoader.ts +0 -117
  247. package/src/core/loaders/ServerSchemaProvider.ts +0 -99
  248. package/src/core/loaders/SystemSettingsManager.ts +0 -278
  249. package/src/core/metadatas/constants.ts +0 -122
  250. package/src/core/metadatas/recordingConstants.ts +0 -65
  251. package/src/core/metadatas/types.ts +0 -202
  252. package/src/core/onboard/FeedOnboardService.ts +0 -501
  253. package/src/core/onboard/OnboardProcessor.ts +0 -356
  254. package/src/core/onboard/OnboardStatus.ts +0 -60
  255. package/src/core/onboard/OnboardStatusManager.ts +0 -416
  256. package/src/core/validators/FeedValidator.ts +0 -135
  257. package/src/core/validators/IServerValidator.ts +0 -21
  258. package/src/core/validators/SSEServerValidator.ts +0 -43
  259. package/src/core/validators/ServerValidatorFactory.ts +0 -51
  260. package/src/core/validators/StdioServerValidator.ts +0 -313
  261. package/src/index.ts +0 -44
  262. package/src/services/InstallationService.ts +0 -102
  263. package/src/services/MCPManager.ts +0 -249
  264. package/src/services/RequirementService.ts +0 -627
  265. package/src/services/ServerService.ts +0 -161
  266. package/src/services/TelemetryService.ts +0 -59
  267. package/src/utils/UpdateCheckTracker.ts +0 -86
  268. package/src/utils/adoUtils.ts +0 -293
  269. package/src/utils/clientUtils.ts +0 -72
  270. package/src/utils/feedUtils.ts +0 -31
  271. package/src/utils/githubAuth.ts +0 -212
  272. package/src/utils/githubUtils.ts +0 -164
  273. package/src/utils/logger.ts +0 -195
  274. package/src/utils/macroExpressionUtils.ts +0 -104
  275. package/src/utils/osUtils.ts +0 -700
  276. package/src/utils/versionUtils.ts +0 -114
  277. package/src/web/contract/serverContract.ts +0 -74
  278. package/src/web/public/css/detailsWidget.css +0 -235
  279. package/src/web/public/css/modal.css +0 -757
  280. package/src/web/public/css/notifications.css +0 -101
  281. package/src/web/public/css/onboard.css +0 -107
  282. package/src/web/public/css/serverCategoryList.css +0 -120
  283. package/src/web/public/css/serverDetails.css +0 -139
  284. package/src/web/public/index.html +0 -359
  285. package/src/web/public/js/api.js +0 -132
  286. package/src/web/public/js/detailsWidget.js +0 -264
  287. package/src/web/public/js/flights/flights.js +0 -127
  288. package/src/web/public/js/modal/index.js +0 -52
  289. package/src/web/public/js/modal/installModal.js +0 -162
  290. package/src/web/public/js/modal/installation.js +0 -266
  291. package/src/web/public/js/modal/loadingModal.js +0 -182
  292. package/src/web/public/js/modal/modalSetup.js +0 -595
  293. package/src/web/public/js/modal/modalUtils.js +0 -37
  294. package/src/web/public/js/modal/versionUtils.js +0 -20
  295. package/src/web/public/js/modal.js +0 -42
  296. package/src/web/public/js/notifications.js +0 -137
  297. package/src/web/public/js/onboard/formProcessor.js +0 -1037
  298. package/src/web/public/js/onboard/index.js +0 -374
  299. package/src/web/public/js/onboard/publishHandler.js +0 -172
  300. package/src/web/public/js/onboard/state.js +0 -76
  301. package/src/web/public/js/onboard/templates.js +0 -342
  302. package/src/web/public/js/onboard/uiHandlers.js +0 -1076
  303. package/src/web/public/js/onboard/validationHandlers.js +0 -493
  304. package/src/web/public/js/serverCategoryDetails.js +0 -364
  305. package/src/web/public/js/serverCategoryList.js +0 -241
  306. package/src/web/public/js/settings.js +0 -314
  307. package/src/web/public/modal.html +0 -84
  308. package/src/web/public/onboard.html +0 -296
  309. package/src/web/public/settings.html +0 -135
  310. package/src/web/public/styles.css +0 -277
  311. package/src/web/server.ts +0 -478
  312. package/tsconfig.json +0 -18
  313. package/wiki/Installation.md +0 -3
  314. package/wiki/Publish.md +0 -3
@@ -1,260 +0,0 @@
1
- # Onboarding Page: JavaScript Design and Implementation
2
-
3
- This document outlines the JavaScript architecture and key implementation details for the dynamic onboarding page.
4
-
5
- ---
6
-
7
- ## 1. File Structure and Roles
8
-
9
- The JavaScript logic is modularized into several files within `src/web/public/js/onboard/`:
10
-
11
- - **`index.js`**: Main entry point. Handles page initialization, event listeners for primary actions (form submission, tab switching), loading existing data, and orchestrates calls to other modules for more complex UI interactions like view toggling and validation.
12
- - **`formProcessor.js`**: Handles conversion between the HTML form and the `FeedConfiguration` JSON object. Contains logic for `formDataToFeedConfiguration` (Form → JSON), `populateForm` (JSON → Form), and `resetOnboardFormDynamicContent`. Also includes the `submitForm` handler.
13
- - **`uiHandlers.js`**: Manages dynamic UI manipulations, such as adding/removing server sections, environment variables, and server-specific requirements. Includes re-indexing logic, handlers for collapsible sections, view mode toggling (`toggleViewMode`), JSON data saving (`saveJsonData`), and clipboard operations (`copyJsonToClipboard`).
14
- - **`validationHandlers.js`**: Manages the validation process, including initiating validation requests (`handleValidation`). It also provides shared utility functions for polling operation status (`pollOperationStatus`) and updating the UI with operation results (`updateOperationDisplay`), which are used by both validation and publishing flows.
15
- - **`publishHandler.js`**: Manages the publishing process. This includes initiating publish requests (`handlePublish`), and utilizing shared functions from `validationHandlers.js` for polling status and displaying results.
16
- - **`templates.js`**: Contains HTML string templates for dynamically generated form sections (e.g., server items, environment variables, requirements).
17
- - **`state.js`**: Manages client-side state, primarily counters for dynamically added elements (servers, env vars per server, requirements per server).
18
-
19
- ---
20
-
21
- ## 2. Core Data Model: `FeedConfiguration`
22
-
23
- The central data structure is `FeedConfiguration` (defined in `src/core/types.ts`). This object represents the entire configuration for a new server category.
24
-
25
- **Key aspects:**
26
-
27
- - `name`, `displayName`, `description`, `repository`: Basic category information.
28
- - `mcpServers: McpConfig[]`: Array of server configurations. Each `McpConfig` includes:
29
- - `name`, `mode`, `description`, `schemas`, `repository`
30
- - `installation`: Contains `command`, `args`, and `env` (an object mapping environment variable names to their configurations).
31
- - `dependencies`: Contains `requirements: Array<{ name: string; version: string; order?: number; }>` (references to full requirement definitions).
32
- - `requirements: RequirementConfig[]`: Top-level array of unique, fully defined requirements. Each includes:
33
- - `name`, `type` (npm, pip, command, etc.), `version`
34
- - Optional: `alias` (for command type)
35
- - Optional: `registry` (for private/custom registries like GitHub, Artifactory, local)
36
-
37
- ---
38
-
39
- ## 3. Form to JSON Conversion (`formDataToFeedConfiguration`)
40
-
41
- Located in `formProcessor.js`, this function converts data from the HTML form into a `FeedConfiguration` object.
42
-
43
- **Process:**
44
-
45
- - **Parsing Strategy:** Iterates through `FormData` entries. Uses regex to identify and group fields belonging to specific servers, environment variables, and requirements based on their name attributes (e.g., `servers[0].name`, `servers[0].repository`, `servers[0].installation.env[0].name`).
46
- - **Server Processing:**
47
- - Collects all fields for each server into a temporary map.
48
- - Converts collected data into `McpConfig` objects.
49
- - Environment variables are transformed from an array of objects into the `installation.env` object structure (key-value pairs).
50
- - **Requirement Processing:**
51
- - For each server, its requirements are processed.
52
- - **Server-Specific Dependencies:** An array of `{ name, version, order }` objects is created for `mcpServer.dependencies.requirements`.
53
- - **Global Requirements List:** Full `RequirementConfig` objects (including type, alias, registry details) are constructed for each requirement defined in the form. These are added to a temporary map (`globalRequirementsMap`) to ensure uniqueness.
54
- - **De-duplication Key:** The key `${type}|${name}|${version}` ensures requirements differing in type, name, or version are treated as distinct entries in the top-level `feedConfiguration.requirements` array.
55
- - **Output:** Returns a complete `FeedConfiguration` object.
56
-
57
- ---
58
-
59
- ## 4. JSON to Form Conversion (`populateForm`)
60
-
61
- Located in `formProcessor.js`, this function populates the HTML form using a `FeedConfiguration` object. This is crucial when loading an existing category for editing or when switching from the JSON view back to the form view.
62
-
63
- **Process:**
64
-
65
- - **Form Reset:** Before populating, `resetOnboardFormDynamicContent()` (now part of `formProcessor.js` and called by `populateForm` itself) is invoked to clear existing dynamic elements and reset relevant state counters.
66
- - **Basic Fields:** Populates top-level category fields (`name`, `displayName`, etc.).
67
- - **Server Population:**
68
- - Iterates through `feedConfig.mcpServers`.
69
- - For each server, `window.addServer()` (from `uiHandlers.js`) is called to create the basic server UI block.
70
- - Server-specific fields (`name`, `mode`, `description`, `repository`, `schema`, `installation` command/args) are populated.
71
- - **Environment Variables:** Iterates `server.installation.env`, calls `window.addEnvVariable()` for each, and populates its fields.
72
- - **Package Dependencies:**
73
- - Iterates through `server.dependencies.requirements` (which are `{name, version, order}` objects, referred to as `depReq`).
74
- - For each `depReq`, searches the top-level `feedConfig.requirements` array to find the corresponding full `RequirementConfig` object (`fullReq`) by matching `fullReq.name === depReq.name`.
75
- - If `fullReq` is found, `window.addServerRequirement()` is called to create the UI block for this requirement within the server.
76
- - All fields of the requirement (`type`, `version`, `alias`, `registry` details) are then populated using data from `fullReq` and `depReq.order`.
77
- - Conditional UI elements (alias field, specific registry config sections) are toggled based on the requirement's type and selected registry.
78
-
79
- ---
80
-
81
- ## 5. Dynamic UI Handling (`uiHandlers.js`, `templates.js`)
82
-
83
- - **`templates.js`**: Provides HTML string template functions (`serverTemplate`, `envVariableTemplate`, `serverRequirementTemplate`) that generate the necessary HTML for dynamic sections. This includes correct indices for name attributes, `onclick` handlers, and structures for collapsible sections with toggle icons.
84
- - The `serverTemplate` structures each server item with collapsible sub-sections for "Package Dependencies" (which includes an "Add Dependency" button), "Startup Configuration", and "Environment Variables", in that order. It also includes a `server-content-scrollable` class on the main server content `div` for vertical scrolling.
85
- - The `serverRequirementTemplate` (used within "Package Dependencies") includes a registry type dropdown that defaults to "Public Registry" and omits the "Local Registry" and placeholder options.
86
- - Icon-only buttons with tooltips are used (e.g., the "Remove Server" button).
87
- - **`uiHandlers.js`**:
88
- - **Adding Elements:**
89
- - `addServer()`: Determines the new server's index. Inserts HTML using `serverTemplate` (which includes a collapsible server structure with sub-sections). Initializes state counters. Attaches an `onchange` event listener to the new server's mode `<select>` element, which calls `renderInstallationConfig`. Calls `renderInstallationConfig` to display the initial UI for the "Startup Configuration" section (defaulting to `stdio` fields). The server header is clickable to toggle its content visibility.
90
- - `addEnvVariable(serverIndex)`, `addServerRequirement(serverIndex)`: Get current counter for the specific server, insert HTML using respective templates, and increment the counter.
91
- - **Rendering Startup Configuration:**
92
- - `renderInstallationConfig(serverIndex)`: This function is called when a server is added or its mode is changed. It populates the "Startup Configuration" section based on the server's current mode:
93
- - If `sse`: Clears the startup configuration container (e.g., `installation-config-${serverIndex}`) and inserts an input field for `installation.url`. Hides the "Environment Variables" block.
94
- - If `stdio` (or other): Clears the startup configuration container and inserts input fields for `installation.command` and `installation.args`. Shows the "Environment Variables" block.
95
- - **Removing Elements:**
96
- - `removeServer(serverIndexToRemove)`: Removes the server item from the DOM, then calls `reindexServers()`.
97
- - `removeEnvVariable(serverIndex, envIndex)`, `removeServerRequirement(serverIndex, reqIndex)`: Remove the specific item. (Re-indexing of these sub-items happens within `reindexServers` when a parent server is re-indexed.)
98
- - **Re-indexing:**
99
- - `reindexServers()`: Called after a server is removed.
100
- - Iterates through all remaining server items in the DOM.
101
- - For each server item and its new sequential index (`newServerIndex`):
102
- - Updates its `data-index` attribute.
103
- - Updates its displayed title (e.g., "MCP Server #1").
104
- - Updates name attributes of all form elements within it to reflect `newServerIndex`.
105
- - Updates `onclick` handlers for all relevant buttons (remove server, add env var, add requirement, etc.) to use `newServerIndex`.
106
- - Updates IDs of dynamically generated elements (e.g., `schema-path-`, `envVarsContainer_`, `server-requirements-list-`).
107
- - Recursively re-indexes nested environment variables and server-specific requirements:
108
- - Updates their `data-env-index`/`data-req-index`.
109
- - Updates their input name attributes (e.g., `servers[newServerIndex].installation.env[newEnvIndex]...`).
110
- - Updates their `onclick` and `onchange` handlers with new indices.
111
- - Updates their dynamic IDs.
112
- - After re-indexing all servers and their children, it rebuilds/updates `state.envCounters` and `state.serverRequirementCounters` and sets `state.serverCounter` to the new total.
113
- - **Toggling Fields:**
114
- - `toggleServerAliasField()`: Shows/hides the alias input based on requirement type (`command`).
115
- - `toggleServerRegistryConfig()`: Shows/hides specific registry configuration sections based on the selected registry type.
116
- - `browseLocalSchema()`: Uses File System Access API (with fallback) to allow users to select a local schema file, populating its name into the input field.
117
- - `toggleSectionContent(contentId, iconElement)`: Generic handler to toggle the visibility of a content element (identified by `contentId`) and update an associated icon's state (e.g., chevron up/down). Used for all collapsible sections.
118
- - `toggleViewMode(isJsonView)`: Handles switching between the form view and the JSON editor view. Manages data conversion and panel visibility.
119
- - `saveJsonData()`: Handles submitting the data from the JSON editor.
120
- - `copyJsonToClipboard()`: Copies the content of the JSON editor to the clipboard.
121
-
122
- ---
123
-
124
- ## 6. State Management (`state.js`)
125
-
126
- Provides a simple client-side state store.
127
-
128
- - `state.serverCounter`: Tracks the total number of server sections. Managed by `setServerCounter()`, which is updated by `addServer()` and `reindexServers()`.
129
- - `state.envCounters` (`Map`): `serverIndex` → count for environment variables within each server.
130
- - `state.serverRequirementCounters` (`Map`): `serverIndex` → count for requirements within each server.
131
-
132
- These maps are updated by their respective add... functions and fully rebuilt by `reindexServers()` to ensure consistency after deletions and re-indexing.
133
-
134
- ---
135
-
136
- ## 7. View Toggling (Form vs. JSON Editor — `uiHandlers.js` & `formProcessor.js`)
137
-
138
- A toggle switch allows users to switch between the standard form view and a raw JSON editor view.
139
-
140
- - **Switching to JSON View:**
141
- - `getFormData(currentForm)` (from `formProcessor.js`) is called, which internally uses `formDataToFeedConfiguration` to get the `FeedConfiguration` object.
142
- - This object is `JSON.stringify`-ed and displayed in a `<textarea>`.
143
- - The form panel is hidden, and the JSON editor panel is shown.
144
- - **Switching back to Form View (from JSON):**
145
- - The JSON content is read from `jsonEditorTextarea` and parsed.
146
- - `resetOnboardFormDynamicContent()` (from `formProcessor.js`) is called by `populateForm` (also from `formProcessor.js`):
147
- - Clears the `serversList` container in the DOM.
148
- - Resets the main form (`onboardForm.reset()`).
149
- - Resets state counters (`setServerCounter(0)`, `state.envCounters.clear()`, `state.serverRequirementCounters.clear()`) using imported functions/objects from `state.js`.
150
- - `populateForm(parsedJsonData)` (from `formProcessor.js`) is called to reconstruct the form from the (potentially edited) JSON.
151
- - If parsing or populating the form fails:
152
- - An error notification is shown using `showToast()`.
153
- - The view remains in JSON mode.
154
- - The view mode toggle switch is ensured to be in the "JSON View" state.
155
- - If successful, the JSON editor panel is hidden, and the form panel is shown.
156
-
157
- > The `toggleViewMode` function in `uiHandlers.js` orchestrates this. Application of JSON to the form (via `populateForm` in `formProcessor.js`) is automatic upon switching back to the form view. If it fails, the user stays in JSON view.
158
-
159
- ---
160
-
161
- ## 8. Other Key Features (`index.js`, `formProcessor.js`, `validationHandlers.js`, `publishHandler.js`, `uiHandlers.js`)
162
-
163
- - **Loading Existing Category (`loadExistingCategory` in `index.js`)**: If a `?category=categoryName` URL parameter is present, fetches the category data from `/api/categories/:categoryName`, and then uses `populateForm()` (from `formProcessor.js`) to fill the form for editing. Errors are reported using `showToast()`.
164
- - **Publishing (`handlePublish` in `publishHandler.js`)**:
165
- - Triggered by the "Publish" button.
166
- - Calls `getFormData()` (from `formProcessor.js`) to get the current form data as `FeedConfiguration`.
167
- - Sends an initial POST request to `/api/categories/onboard` with the `FeedConfiguration` object and an `isUpdate` flag.
168
- - The "Publish" button shows a spinning loader icon and its text changes to "Publishing...". Both "Validate" and "Publish" buttons are disabled.
169
- - **Polling for Status**: If the initial publish request is successful and the operation is not immediately completed or failed, `handlePublish` initiates polling. The shared `pollOperationStatus` function (from `validationHandlers.js`) is called, which periodically queries `GET /api/categories/:categoryName/onboard/status?operationType=FULL_ONBOARDING`. `pollOperationStatus` now returns a boolean to manage polling continuation.
170
- - **Displaying Results**: The shared `updateOperationDisplay` function (from `validationHandlers.js`) formats and displays detailed progress, including individual steps, from both the initial publish call and subsequent status polls.
171
- - **Completion/Failure**: Polling stops based on the status returned by `pollOperationStatus`. Upon completion or failure, buttons are reset, and `showToast()` displays messages. For detailed information on recent changes to polling and status display, see Section 9: "Enhanced Operation Status Polling and Display".
172
- - **Validation (`handleValidation` in `validationHandlers.js`)**:
173
- - **Validation (`handleValidation` in `validationHandlers.js`)**:
174
- - The `validationStatusPanel` (unique per tab) is located under the "MCP Servers" section (or equivalent) and above the main action buttons ("Validate", "Publish"). It is a foldable panel.
175
- - When the "Validate" button is clicked:
176
- - Calls `getFormData()` (from `formProcessor.js`) to get the current form data as `FeedConfiguration`.
177
- - Sends an initial POST request to `/api/categories/onboard/validate`.
178
- - The "Validate" button shows a spinning loader icon and its text changes to "Validating...". Both "Validate" and "Publish" buttons are disabled.
179
- - **Polling for Status**:
180
- - If the initial validation request is successful and the operation is not immediately completed or failed, `handleValidation` initiates polling.
181
- - The shared `pollOperationStatus` function (from `validationHandlers.js`) is called, which periodically queries `GET /api/categories/:categoryName/onboard/status?operationType=VALIDATION_ONLY` (using the category name from the form). `pollOperationStatus` now returns a boolean to manage polling continuation.
182
- - **Displaying Results**:
183
- - The shared `updateOperationDisplay` function (from `validationHandlers.js`) formats and displays detailed progress, including individual steps, from both the initial validation call and subsequent status polls.
184
- - It handles different structures of the `validationStatus` object and overall operation status.
185
- - **Completion/Failure**:
186
- - Polling stops based on the status returned by `pollOperationStatus`.
187
- - Upon completion or failure, buttons are reset. For detailed information on recent changes to polling and status display, see Section 9: "Enhanced Operation Status Polling and Display".
188
- - **Copy JSON (`copyJsonToClipboard` in `uiHandlers.js`)**: Copies the content of `jsonEditorTextarea` to the clipboard. Uses `showToast()` for feedback.
189
- - **Global Function Exposure**: Necessary UI handler functions (like `addServer`, `removeServer`, `toggleSectionContent`, etc.) are attached to the `window` object so they can be called from `onclick` attributes in the HTML templates.
190
- - **Custom Notifications**: Standard browser `alert()` calls have been replaced with a custom toast notification system (`showToast()` from `../notifications.js`). This system requires an `.alert-container` div in the host HTML (`onboard.html`) and uses CSS from `css/notifications.css` for styling. The `notifications.js` module handles the creation, display, and dismissal (manual and automatic) of these toasts without relying on Bootstrap's JavaScript.
191
-
192
- ---
193
-
194
- This summary covers the main design patterns and implementation choices made for the onboarding page's frontend logic.
195
-
196
- ---
197
-
198
- ## 9. Recent Changes (May 2025)
199
-
200
- - **Requirement Lookup in `populateForm`:**
201
- Requirement lookup for server dependencies now matches by `name` only (not `name` and `version`).
202
-
203
- - **UI and Validation Improvements:**
204
-
205
- - Unique IDs are used for validation panels and buttons per tab to avoid cross-tab issues.
206
- - Switching between tabs and view modes now preserves form data and ensures correct UI state.
207
- - The JSON editor view is now properly toggled and content is preserved as expected.
208
- - Polling for operation status (validation/publish) is more robust and status checks are case-insensitive.
209
- - Progress steps for operations are now shown in a collapsible section for better feedback.
210
-
211
- - **General Cleanup:**
212
- - Redundant diagnostic logs and experimental code were removed.
213
- - Form reset logic was improved to avoid unwanted clearing of dropdowns or form fields.
214
-
215
- ## 10. Server Validation System
216
-
217
- The server validation system consists of multiple components that work together to validate MCP server configurations. This ensures that servers are properly configured before they can be deployed.
218
-
219
- ### Server Validator Architecture
220
-
221
- - **`IServerValidator` Interface**: Defines the common validation contract for all server validators:
222
-
223
- - `validateServer(server: McpConfig, config: FeedConfiguration): Promise<boolean>`
224
- - Implementations throw errors with descriptive messages when validation fails
225
-
226
- - **`ServerValidatorFactory`**: Factory class managing validator instances
227
- - Maintains a singleton map of validators by type ('stdio' | 'sse')
228
- - Provides methods to get appropriate validator for server mode
229
- - Initializes validators on construction
230
-
231
- ### Validator Implementations
232
-
233
- 1. **StdioServerValidator**:
234
-
235
- - Validates stdio-mode MCP server configurations
236
- - Key validation steps:
237
- - Verifies installation command exists and is executable
238
- - Validates required environment variables
239
- - Validates and installs dependencies using installer factory
240
- - Tests server startup with path resolution for:
241
- - Node commands: Resolves `${NPMPATH}` in arguments
242
- - Python commands: Resolves `${PYTHON_PACKAGE}` in arguments
243
- - Uses timeout-based server startup testing with output monitoring
244
- - Comprehensive error handling and logging
245
-
246
- 2. **SSEServerValidator**:
247
- - Validates SSE-mode MCP server configurations
248
- - Key validation steps:
249
- - Verifies installation URL is present and valid
250
- - Validates server mode is 'sse'
251
- - Extensible design for additional SSE-specific validation
252
-
253
- ### Error Handling
254
-
255
- - All validators provide detailed error messages through Error objects
256
- - Errors include specific validation failure reasons (e.g., missing command, invalid URL)
257
- - Logging is implemented throughout the validation process
258
- - Error messages propagate to the UI for user feedback
259
-
260
- This validation system ensures that server configurations are complete and functional before deployment, reducing runtime issues and improving reliability.
package/docs/Telemetry.md DELETED
@@ -1,136 +0,0 @@
1
- # Application Insights Telemetry Integration
2
-
3
- This document describes the telemetry implementation in the MCP SDK using Azure Application Insights.
4
-
5
- ## Overview
6
-
7
- The MCP SDK integrates Azure Application Insights for telemetry tracking across various operations. This provides insights into server operations, requirement updates, and system health.
8
-
9
- ## Implementation Details
10
-
11
- ### TelemetryService
12
-
13
- Located in `src/services/TelemetryService.ts`, this service provides a centralized interface for telemetry operations:
14
-
15
- - Initialization with Application Insights configuration
16
- - Event tracking
17
- - Exception tracking
18
- - Trace logging
19
- - Metric tracking
20
- - Data flushing capability
21
-
22
- ```typescript
23
- // Example usage:
24
- TelemetryService.trackEvent("eventName", { property: "value" });
25
- TelemetryService.trackException(error, { context: "operation" });
26
- ```
27
-
28
- ### Key Features
29
-
30
- 1. **Cloud Role Tagging**: Services are tagged as 'imcp' for clear identification in Application Insights
31
- 2. **Batch Processing**: Configured with a max batch size of 250 events
32
- 3. **Automatic Error Handling**: Graceful handling of initialization failures
33
-
34
- ## Integration Points
35
- The telemetry service is integrated at key points throughout the system:
36
-
37
- ### User Identity Tracking
38
- - GitHub user information persistence for Mac/Linux systems
39
- - Automatic alias extraction from Microsoft accounts
40
- - Cross-platform username resolution (using OS username for Windows)
41
-
42
- ### Server Operations
43
- - Server installation/uninstallation tracking
44
- - Operation success/failure monitoring
45
- - Target client tracking
46
-
47
- ### Requirement Management
48
- - Requirement update tracking
49
- - Version change monitoring
50
- - Update operation status tracking
51
-
52
- ### Feed Management
53
- - Feed onboarding process monitoring
54
- - Sync operations tracking
55
- - Configuration changes tracking
56
-
57
- ## Event Types
58
-
59
- The system tracks several types of events:
60
-
61
- 1. **Server Events**
62
- - Installation (`SERVER_INSTALL`)
63
- - Uninstallation (`SERVER_UNINSTALL`)
64
-
65
- 2. **Requirement Events**
66
- - Updates (`REQUIREMENT_UPDATE`)
67
-
68
- 3. **Feed Events**
69
- - Onboard (`FEED_ONBOARD`)
70
- - Validate (`FEED_VALIDATE`)
71
-
72
- 4 **IMCP Events**
73
- - IMCP serve (`IMCP_SERVE`)
74
-
75
- ## Best Practices
76
- 1. **Error Tracking**
77
- - Always include error messages in failed operations
78
- - Track operation context with properties
79
-
80
- 2. **Event Properties**
81
- - Include relevant identifiers (categoryName, serverName)
82
- - Track operation status
83
- - Include version information when applicable
84
- - Include user alias in events (automatically handled by Logger)
85
-
86
- 3. **User Identity Persistence**
87
- - Store GitHub user information (alias, name, email) for Mac/Linux users
88
- - Skip persistence for Windows users (uses OS username)
89
- - Only persist for Microsoft accounts (username ending with _microsoft)
90
- - Cache user information to avoid repeated API calls
91
- - Include version information when applicable
92
-
93
- 4. **Performance Monitoring**
94
- - Use metric tracking for performance-sensitive operations
95
- - Implement proper batching for high-volume events
96
-
97
- ## Configuration
98
-
99
- The telemetry service is configured with:
100
- - Azure resource: [imcp-telemetry](https://ms.portal.azure.com/#@microsoft.onmicrosoft.com/resource/subscriptions/b211ffce-ec5c-4267-b15c-138d440e3fbc/resourcegroups/aicoder/providers/microsoft.insights/components/imcp-telemetry/overview)
101
- - Instrumentation Key: `c5fc06c7-a96c-4d80-9aff-bc9c933db0d1`
102
- - Cloud Role: `imcp`
103
- - Batch Size: 250 events
104
-
105
- ## User Identity in Telemetry
106
-
107
- The system implements user identity tracking through the Logger class (`src/utils/logger.ts`):
108
-
109
- 1. **User Resolution**
110
- - Windows: Uses OS username directly via `os.userInfo()`
111
- - Mac/Linux: Uses GitHub alias stored in user info file
112
- - Falls back to OS username if user info is unavailable
113
-
114
- 2. **Identity Storage**
115
- - Location: Stored in system-specific settings directory
116
- - Format: JSON file containing alias, name, and email
117
- - Updates: Managed during GitHub authentication
118
-
119
- 3. **Identity Usage**
120
- - All telemetry events automatically include username/alias
121
- - Consistent user tracking across sessions
122
- - Microsoft account validation ensures organizational identity
123
-
124
- ## Future Improvements
125
-
126
- 1. **Enhanced Metrics**
127
- - Add performance metrics for key operations
128
- - Implement custom metric dimensions
129
-
130
- 2. **Error Analysis**
131
- - Implement more detailed error categorization
132
- - Add correlation IDs for related operations
133
-
134
- 3. **User Analytics**
135
- - Track user interaction patterns
136
- - Monitor feature usage statistics
@@ -1,26 +0,0 @@
1
- ru# Active Context
2
-
3
- ## Current Focus
4
-
5
- - [2025-05-16 09:22:21] - Task completed: Made "IMCP Server Manager" title in `src/web/public/index.html` clickable, linking to `index.html`.
6
- - [YYYY-MM-DD HH:MM:SS] - Initializing Memory Bank.
7
-
8
- ## Recent Changes
9
-
10
- - [YYYY-MM-DD HH:MM:SS] - Created activeContext.md.
11
- - [2025-05-16 13:28:00] - Refactored `InstallationService` to delegate requirement handling to the new `RequirementService`. Updated `RequirementService` to correctly handle `reqConfig` scoping and type fallbacks in `processRequirementUpdates`.
12
-
13
- ## Open Questions/Issues
14
-
15
- - None
16
-
17
- [2025-05-16 16:07:29] - Current Focus: Completed redesign of installation operation status and polling. New InstallOperationManager and associated types/APIs implemented. Step recording integrated into relevant services and installers.
18
- [2025-05-17 00:26:11] - Refactoring InstallOperationManager: Now instance-based per category/server, with new file structure for status persistence. Current focus is on updating all usages and ensuring compatibility with the new API and file layout.
19
- [2025-05-17 15:02:39] - Current Focus: Completed refactoring of `RequirementService.ts` to use the new instance-based `InstallOperationManager` and its `recording`/`recordingAsync` methods. This aligns it with the updated `InstallOperationManager` architecture.
20
- [2025-05-17 15:26:20] - Current focus: Refactored all requirement installer classes and factory to support InstallOperationManager step recording. All install methods now accept a recorder and log critical steps for install operations.
21
- [2025-05-18 13:21:30] - Current Focus: Completed implementation of main modal refresh logic. This involved:
22
- - Modifying `loadingModal.js` to dispatch a `refreshMainModalContent` event on close.
23
- - Updating `installation.js` to store `categoryName` and `serverName` in `localStorage`.
24
- - Adding an event listener in `modal.js` to retrieve these values and call `showInstallModal` with both parameters, resolving previous "Server configuration not found" errors.
25
- - This replaces the previous page reload behavior, improving UX.
26
- [2025-05-18 11:33:18] - Current Focus: Standardized all step recording names for installation/onboarding operations by introducing `src/core/metadatas/recordingConstants.ts`. This file now serves as the single source of truth for static step names and documents dynamic step name patterns, ensuring consistency across backend and frontend.
@@ -1,91 +0,0 @@
1
- # Decision Log
2
-
3
- This file records significant architectural or technical decisions, including rationale and implications.
4
- Update this file with a timestamped entry whenever a major decision is made.
5
-
6
- ---
7
-
8
- ---
9
-
10
- [2025-05-15 19:56:12] - Memory Bank updated to reflect onboarding page architecture and features as described in [`docs/ONBOARDING_PAGE_DESIGN.md`](../docs/ONBOARDING_PAGE_DESIGN.md).
11
-
12
- - Modular JS architecture for onboarding UI, form-to-JSON, validation, publishing, and state.
13
- - Central `FeedConfiguration` model for category/server/requirement data.
14
- - Enhanced UX: dynamic sections, toggling, notifications, robust validation/publishing.
15
- - Recent improvements: server visibility, requirement lookup, async feedback, tab/view handling.
16
- [2025-05-15 20:48:27] - Implemented MCP Server Duplication Feature.
17
- - Added a duplicate button to the right of the delete button in the server item template (`src/web/public/js/onboard/templates.js`).
18
- - Modified `duplicateServer` function in `src/web/public/js/onboard/uiHandlers.js` to correctly retrieve data from the server to be duplicated, even if it's read-only. This was achieved by temporarily enabling form fields of the source server item before calling `getFormData`.
19
- - Ensured that the duplicated server is always created as a new, editable server, and all its content (including environment variables and requirements) is copied from the original server.
20
- - The `populateServerManually` function ensures that sub-items (env vars, requirements) of the duplicated server are also created in an editable state.
21
- - This functionality applies to both "Create New Category" and "Create Server in Existing Category" tabs.
22
- - Fixed the error "Could not retrieve data for the server to duplicate" when duplicating read-only servers.
23
-
24
- [2025-05-16 00:34:40] - [Fixed duplicate server functionality]
25
- - Issue: Duplicating non-first servers failed with "Could not retrieve data" error
26
- - Fix: Modified duplicateServer() to temporarily enable ALL disabled fields before form submission
27
- - Impact: Ensures complete server data is captured regardless of position in list
28
- - Files affected: src/web/public/js/onboard/uiHandlers.js
29
- [2025-05-16 13:27:43] - Refactored requirement management logic from `InstallationService` into a new dedicated `RequirementService`. `InstallationService` now delegates requirement-related tasks (checking status, installing, updating) to `RequirementService`. This improves separation of concerns and modularity.
30
-
31
- [2025-05-16 16:07:20] - Redesigned the operation status and polling mechanism for Installation in both frontend and backend. This involved creating a new InstallOperationManager, new types for operation details, an API endpoint for status retrieval, and integrating step recording into InstallationService, RequirementService, and BaseClientInstaller. This provides more granular tracking of installation progress.
32
-
33
- [2025-05-16 16:50:05] - Added 'overallStatus' to InstallOperationDetails and updated InstallOperationManager to manage it. Modified frontend polling in 'src/web/public/js/modal/installation.js' to use the new installation status API and display detailed steps.
34
-
35
- [2025-05-16 17:03:17] - Enhanced the display of installation steps in the loading modal. Modified 'messageQueue.js' to support step-specific formatting (icons, success/failure states) and updated 'installation.js' to pass these options. Added CSS in 'modal.css' for the new step display styles.
36
-
37
- [2025-05-16 17:08:31] - Refined installation step display: made fonts smaller, increased compactness, and added timestamps for each step. Updated 'modal.css' and 'messageQueue.js' accordingly. 'installation.js' now passes the timestamp.
38
-
39
- [2025-05-16 17:19:37] - Overhauled the installation loading modal UI. 'loadingModal.js' now dynamically creates a new structure with an overall status (icon + text) and a detailed steps list. 'installation.js' was updated to use new functions in 'loadingModal.js' for status and step updates. 'messageQueue.js' was simplified as direct DOM manipulation for steps is now in 'loadingModal.js'. Added extensive CSS in 'modal.css' for the new layout and styling.
40
-
41
- [2025-05-16 17:23:42] - Fixed error caused by removed 'delayedAppendInstallLoadingMessage'. Updated 'modalSetup.js' and 'installation.js' (uninstallTools function) to use the new 'updateOverallInstallStatus' from 'loadingModal.js' for general status messages during uninstallation.
42
-
43
- [2025-05-16 17:26:13] - Final fix for 'delayedAppendInstallLoadingMessage' error: removed unused import from 'installModal.js'.
44
-
45
- [2025-05-16 17:29:59] - Corrected 'src/web/public/js/modal/index.js' barrel file: removed imports and re-exports of 'delayedAppendInstallLoadingMessage' and 'appendInstallLoadingMessage' as they no longer exist. Added new exports for 'updateOverallInstallStatus' and 'addInstallationStep'.
46
-
47
- [2025-05-16 17:31:35] - Corrected 'src/web/public/js/modal.js' (another barrel file): removed import and global assignment of 'appendInstallLoadingMessage'. Added missing exports for 'showInstallLoadingModal' and 'hideInstallLoadingModal'.
48
-
49
- [2025-05-16 17:46:59] - Implemented reset of installation operation status. Added `resetOperation` method to `InstallOperationManager.ts` to delete existing status for a server. Called this method at the beginning of `InstallationService.ts#install` to ensure a clean state for new installations.
50
-
51
- [2025-05-16 17:51:01] - UI adjustments for installation loading modal:
52
- - Added a close button (X) to the top-right corner with functionality to hide the modal.
53
- - Ensured installation steps are explicitly left-aligned using `justify-content: flex-start`.
54
- - Modified the 'completed' status icon to be a checkmark within a green circle.
55
- - Reviewed and confirmed the 'in-progress' spinner icon.
56
-
57
- [2025-05-16 17:53:42] - Refined step message alignment in installation loading modal: Added `align-items: flex-start` and `text-align: left` to `.step-info`, and `text-align: left` with `width: 100%` to `.step-message` in `modal.css` to ensure text content is fully left-aligned.
58
-
59
- [2025-05-16 17:55:32] - UI adjustment for installation loading modal: Removed the "Details" header text from above the steps list in `loadingModal.js`.
60
-
61
- [2025-05-16 17:57:02] - Corrected removal of "Details" header in installation loading modal: Entire line `<div class="steps-list-header">Details</div>` was removed from `loadingModal.js` instead of being commented out with an invalid HTML comment.
62
-
63
- [2025-05-17 00:26:02] - Refactored InstallOperationManager to require categoryName and serverName in the constructor, removed singleton/static pattern, and changed status file storage to per-category/server at Settings_Dir/InstallOperationStatus/CategoryName/ServerName.json. This enables instance-based management and more granular status persistence.
64
-
65
- [2025-05-17 15:02:27] - Refactored `RequirementService.ts` to use instance-based `InstallOperationManager`.
66
- - The `processRequirementUpdates` and `checkAndInstallRequirements` (including its helper `installRequirementsInBackground`) methods in [`src/services/RequirementService.ts`](src/services/RequirementService.ts:0) were updated.
67
- - They now obtain an `InstallOperationManager` instance using `InstallOperationManager.getInstance(categoryName, serverName)`.
68
- - The core logic within these methods, and the individual requirement processing loops, are now wrapped with `iom.recording()` or `iom.recordingAsync()` for robust step tracking and error handling.
69
- - This change aligns `RequirementService.ts` with the new instance-based, per-category/server architecture of `InstallOperationManager` introduced in [2025-05-17 00:26:02].
70
- - Rationale: Simplifies step recording, centralizes status management within the `InstallOperationManager` instance, and improves consistency across services.
71
- - Implications: Removed direct calls to the deprecated global `installOperationManager.recordStep` and adopted the more structured `recording` pattern.
72
-
73
- [2025-05-17 15:26:09] - Updated all requirement installer classes and interface to support step recording via InstallOperationManager. All install methods now accept an optional recorder and record critical steps using recordStep/recording.
74
-
75
- [2025-05-18 13:21:30] - Implemented main modal refresh on loading modal close, replacing page reload.
76
- - Rationale: Improve UX by maintaining main modal context and avoiding disruptive page reloads after installation/uninstallation operations shown in the loading modal.
77
- - Implementation Details:
78
- - `src/web/public/js/modal/loadingModal.js`: Modified `hideInstallLoadingModal` to dispatch a custom event `refreshMainModalContent` instead of causing a page reload.
79
- - `src/web/public/js/modal/installation.js`: Modified `handleBulkClientInstall` to store `categoryName` as `lastSelectedCategory` and `serverName` as `lastSelectedServerName` in `localStorage` when an installation process begins. This ensures the context is available for the refresh.
80
- - `src/web/public/js/modal.js`: Added an event listener for `refreshMainModalContent`. This listener retrieves `lastSelectedCategory` and `lastSelectedServerName` from `localStorage`. If both are valid, it calls `window.showInstallModal(lastSelectedCategory, lastSelectedServerName)` to refresh the content of the main installation modal.
81
- - Debugging: Iteratively refined the logic in `modal.js` to correctly handle and validate `lastSelectedCategory` and `lastSelectedServerName` to prevent errors when calling `showInstallModal`. This was crucial for ensuring `showInstallModal` received the necessary `serverName` argument, resolving "Server configuration not found" errors.
82
- [2025-05-18 11:33:12] - Added `src/core/metadatas/recordingConstants.ts` as the canonical source for all step recording names used in installation and onboarding operations. This file centralizes all static step names as constants and documents dynamic step name patterns, improving consistency and discoverability for step-based operation tracking across backend and frontend.
83
-
84
- [2025-05-18 20:46:46] - Reduced the height and key size in the System Environment Variables section of the settings UI for a more compact and modern appearance. This involved decreasing row padding, shrinking the key column width, and reducing the key font size in `src/web/public/js/settings.js`.
85
-
86
- [2025-05-18 21:00:26] - Macro resolution logic updated: Now resolves macro values (${PYTHON_PACKAGE}, ${NPMPATH}, ${BROWSER_PATH}) by first checking SystemSettingsManager (system settings), and only falls back to previous behavior if not found. This centralizes macro configuration and improves consistency across the system.
87
-
88
- [2025-05-19 00:14:06] - Updated settings page UI and functionality:
89
- - Removed "NPM Global Package Path" field from `src/web/public/settings.html` and `src/web/public/js/settings.js`.
90
- - Added a descriptive prompt "Stored and used for mcp server installation environments." with a question icon (`bx-help-circle`) on the same line as the "User Configurations" title in `src/web/public/settings.html`.
91
- - Modified `src/web/public/js/settings.js` to render user configuration values as `type="password"` if the key contains "key". Added an eye icon button *inside* the value input field to toggle visibility for these password fields, maintaining original input box sizes.
@@ -1,41 +0,0 @@
1
- # Product Context
2
-
3
- This file contains the high-level project description, goals, features, and overall architecture for the onboarding page and related systems.
4
-
5
- ---
6
-
7
- ## Onboarding Page Overview
8
-
9
- - **Purpose:** Dynamic onboarding UI for configuring new server categories and MCP servers.
10
- - **Frontend Structure:** Modular JavaScript in [`src/web/public/js/onboard/`](src/web/public/js/onboard):
11
- - `index.js`: Entry point, tab switching, event listeners, loading/editing categories.
12
- - `formProcessor.js`: Converts form ↔ JSON (`FeedConfiguration`), validation, populating UI.
13
- - `uiHandlers.js`: Dynamic UI (add/remove servers, env vars, requirements), view toggling, section collapsing.
14
- - `templates.js`: HTML templates for servers, env vars, requirements.
15
- - `state.js`: Tracks counters for dynamic elements.
16
- - `validationHandlers.js`: Validation logic, polling, progress display.
17
- - `publishHandler.js`: Handles publishing, status polling, and feedback.
18
-
19
- ---
20
-
21
- ## Core Data Model
22
-
23
- - **FeedConfiguration** (see [`src/core/types.ts`](src/core/types.ts)):
24
- - `name`, `displayName`, `description`, `repository`
25
- - `mcpServers`: Array of server configs (mode, install, env, dependencies)
26
- - `requirements`: Unique, fully defined requirements (type, name, version, registry, alias)
27
-
28
- ---
29
-
30
- ## Key Features
31
-
32
- - Dynamic form sections for servers, environment variables, and requirements.
33
- - Toggle between form and JSON editor views.
34
- - Robust validation and publishing flows with polling and progress UI.
35
- - Custom notification system for user feedback.
36
- - Enhanced UX for editing, tab switching, and error handling.
37
- - All code and UI logic is aligned with [`docs/ONBOARDING_PAGE_DESIGN.md`](../docs/ONBOARDING_PAGE_DESIGN.md).
38
-
39
- ---
40
-
41
- _Last updated: 2025-05-15_
@@ -1,35 +0,0 @@
1
- # Progress Log
2
-
3
- - [YYYY-MM-DD HH:MM:SS] - Initializing Memory Bank.
4
-
5
- - [2025-05-16 09:22:36] - Completed: Made "IMCP Server Manager" title clickable in `src/web/public/index.html`.
6
- - [2025-05-16 13:28:10] - Completed: Refactored requirement management from `InstallationService` to `RequirementService`. Fixed `reqConfig` scoping and type fallbacks in `RequirementService.processRequirementUpdates`.
7
-
8
- [2025-05-16 16:07:34] - Completed: Redesign installation operation status and polling mechanism.
9
- - Added `InstallOperationDetails` type to `src/core/metadatas/types.ts`.
10
- - Created `InstallOperationManager` in `src/core/loaders/InstallOperationManager.ts`.
11
- - Added API endpoint for installation status in `src/web/server.ts`.
12
- - Integrated `recordStep` in `InstallationService`, `RequirementService`, and `BaseClientInstaller`.
13
-
14
- [2025-05-16 16:50:21] - Enhanced installation status:
15
- - Added `overallStatus` to `InstallOperationDetails` in `src/core/metadatas/types.ts`.
16
- - Updated `InstallOperationManager` in `src/core/loaders/InstallOperationManager.ts` to manage `overallStatus`.
17
- - Modified frontend polling in `src/web/public/js/modal/installation.js` to use the new API `/api/categories/:categoryName/servers/:serverName/installation/status` and display detailed steps.
18
-
19
- [2025-05-17 00:26:16] - Began refactoring InstallOperationManager to be instance-based per category/server, with new file structure for status. Memory bank updated to reflect architectural and pattern changes.
20
-
21
- [2025-05-17 15:02:44] - Completed: Refactored `RequirementService.ts` to use instance-based `InstallOperationManager` and its `recording`/`recordingAsync` methods. This involved updating `processRequirementUpdates`, `checkAndInstallRequirements`, and `installRequirementsInBackground`.
22
-
23
- [2025-05-18 11:33:23] - Completed: Standardized step recording names by creating `src/core/metadatas/recordingConstants.ts`. This centralizes static step names and documents dynamic patterns for installation/onboarding operations.
24
-
25
- [2025-05-18 13:21:30] - Completed: Implemented main modal refresh logic to replace page reload.
26
- - `loadingModal.js`: Dispatches `refreshMainModalContent` event on close.
27
- - `installation.js`: Stores `categoryName` and `serverName` in `localStorage`.
28
- - `modal.js`: Listens for event, retrieves context from `localStorage`, and calls `showInstallModal` with both `categoryName` and `serverName`.
29
- - This resolves "Server configuration not found" errors and improves UX.
30
- [2025-05-17 15:26:15] - Refactored all requirement installer classes and factory to support InstallOperationManager step recording. All install methods now accept a recorder and log critical steps.
31
-
32
- [2025-05-19 00:14:13] - Completed: Updated settings page (`src/web/public/settings.html` and `src/web/public/js/settings.js`):
33
- - Removed "NPM Global Package Path" display.
34
- - Added prompt with a question icon for User Configurations, displayed on the same line as the section title.
35
- - Implemented secret input type for keys containing "key" in User Configurations, with an eye icon button *inside* the value input field to toggle visibility (maintaining original input box sizes).
@@ -1,10 +0,0 @@
1
- # System Patterns
2
-
3
- - [YYYY-MM-DD HH:MM:SS] - Initializing Memory Bank.
4
-
5
- [2025-05-18 13:21:30] - Implemented an event-driven modal refresh pattern for the installation UI.
6
- - Pattern: Instead of page reloads, the loading modal (`loadingModal.js`) dispatches a custom DOM event (`refreshMainModalContent`) upon closing.
7
- - Context Persistence: The initiating action (e.g., in `installation.js`) stores necessary context (like `lastSelectedCategory` and `lastSelectedServerName`) in `localStorage`.
8
- - Event Handling: The main modal controller (`modal.js`) listens for this event, retrieves context from `localStorage`, and re-initializes/refreshes its content (`showInstallModal`) with the persisted context.
9
- - Benefit: This decouples the loading modal from the main modal, allows for non-disruptive UI updates, and maintains user context effectively.
10
- [2025-05-17 00:26:06] - Changed InstallOperationManager from singleton/static to instance-based, with per-category/server file storage pattern: Settings_Dir/InstallOperationStatus/CategoryName/ServerName.json. This introduces a more granular, object-oriented persistence and management pattern for install operation status.