imcp 0.1.5 → 0.1.6

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 (186) hide show
  1. package/.github/ISSUE_TEMPLATE/JitAccess.yml +28 -0
  2. package/.github/acl/access.yml +20 -0
  3. package/.github/compliance/inventory.yml +5 -0
  4. package/.github/policies/jit.yml +19 -0
  5. package/.github/workflows/build.yml +28 -0
  6. package/.roo/rules-code/rules.md +88 -0
  7. package/docs/ONBOARDING_PAGE_DESIGN.md +260 -0
  8. package/docs/Telemetry.md +136 -0
  9. package/memory-bank/activeContext.md +26 -0
  10. package/memory-bank/decisionLog.md +91 -0
  11. package/memory-bank/productContext.md +41 -0
  12. package/memory-bank/progress.md +35 -0
  13. package/memory-bank/systemPatterns.md +10 -0
  14. package/package.json +1 -5
  15. package/src/cli/commands/install.ts +139 -0
  16. package/src/cli/commands/list.ts +113 -0
  17. package/src/cli/commands/pull.ts +16 -0
  18. package/src/cli/commands/serve.ts +39 -0
  19. package/src/cli/commands/uninstall.ts +64 -0
  20. package/src/cli/index.ts +82 -0
  21. package/src/core/installers/clients/BaseClientInstaller.ts +341 -0
  22. package/src/core/installers/clients/ClientInstaller.ts +222 -0
  23. package/src/core/installers/clients/ClientInstallerFactory.ts +43 -0
  24. package/src/core/installers/clients/ClineInstaller.ts +35 -0
  25. package/src/core/installers/clients/ExtensionInstaller.ts +165 -0
  26. package/src/core/installers/clients/GithubCopilotInstaller.ts +79 -0
  27. package/src/core/installers/clients/MSRooCodeInstaller.ts +32 -0
  28. package/src/core/installers/index.ts +11 -0
  29. package/src/core/installers/requirements/BaseInstaller.ts +85 -0
  30. package/src/core/installers/requirements/CommandInstaller.ts +231 -0
  31. package/src/core/installers/requirements/GeneralInstaller.ts +133 -0
  32. package/src/core/installers/requirements/InstallerFactory.ts +114 -0
  33. package/src/core/installers/requirements/NpmInstaller.ts +271 -0
  34. package/src/core/installers/requirements/NugetInstaller.ts +203 -0
  35. package/src/core/installers/requirements/PipInstaller.ts +207 -0
  36. package/src/core/installers/requirements/RequirementInstaller.ts +42 -0
  37. package/src/core/loaders/ConfigurationLoader.ts +298 -0
  38. package/src/core/loaders/ConfigurationProvider.ts +462 -0
  39. package/src/core/loaders/InstallOperationManager.ts +367 -0
  40. package/src/core/loaders/ServerSchemaLoader.ts +117 -0
  41. package/src/core/loaders/ServerSchemaProvider.ts +99 -0
  42. package/src/core/loaders/SystemSettingsManager.ts +278 -0
  43. package/src/core/metadatas/constants.ts +122 -0
  44. package/src/core/metadatas/recordingConstants.ts +65 -0
  45. package/src/core/metadatas/types.ts +202 -0
  46. package/src/core/onboard/FeedOnboardService.ts +501 -0
  47. package/src/core/onboard/OnboardProcessor.ts +356 -0
  48. package/src/core/onboard/OnboardStatus.ts +60 -0
  49. package/src/core/onboard/OnboardStatusManager.ts +416 -0
  50. package/src/core/validators/FeedValidator.ts +135 -0
  51. package/src/core/validators/IServerValidator.ts +21 -0
  52. package/src/core/validators/SSEServerValidator.ts +43 -0
  53. package/src/core/validators/ServerValidatorFactory.ts +51 -0
  54. package/src/core/validators/StdioServerValidator.ts +313 -0
  55. package/src/index.ts +44 -0
  56. package/src/services/InstallationService.ts +102 -0
  57. package/src/services/MCPManager.ts +249 -0
  58. package/src/services/RequirementService.ts +627 -0
  59. package/src/services/ServerService.ts +161 -0
  60. package/src/services/TelemetryService.ts +59 -0
  61. package/src/utils/UpdateCheckTracker.ts +86 -0
  62. package/src/utils/adoUtils.ts +293 -0
  63. package/src/utils/clientUtils.ts +72 -0
  64. package/src/utils/feedUtils.ts +31 -0
  65. package/src/utils/githubAuth.ts +212 -0
  66. package/src/utils/githubUtils.ts +164 -0
  67. package/src/utils/logger.ts +195 -0
  68. package/src/utils/macroExpressionUtils.ts +104 -0
  69. package/src/utils/osUtils.ts +700 -0
  70. package/src/utils/versionUtils.ts +114 -0
  71. package/src/web/contract/serverContract.ts +74 -0
  72. package/src/web/public/css/detailsWidget.css +235 -0
  73. package/src/web/public/css/modal.css +757 -0
  74. package/src/web/public/css/notifications.css +101 -0
  75. package/src/web/public/css/onboard.css +107 -0
  76. package/src/web/public/css/serverCategoryList.css +120 -0
  77. package/src/web/public/css/serverDetails.css +139 -0
  78. package/src/web/public/index.html +359 -0
  79. package/src/web/public/js/api.js +132 -0
  80. package/src/web/public/js/detailsWidget.js +264 -0
  81. package/src/web/public/js/flights/flights.js +127 -0
  82. package/src/web/public/js/modal/index.js +52 -0
  83. package/src/web/public/js/modal/installModal.js +162 -0
  84. package/src/web/public/js/modal/installation.js +266 -0
  85. package/src/web/public/js/modal/loadingModal.js +182 -0
  86. package/src/web/public/js/modal/modalSetup.js +595 -0
  87. package/src/web/public/js/modal/modalUtils.js +37 -0
  88. package/src/web/public/js/modal/versionUtils.js +20 -0
  89. package/src/web/public/js/modal.js +42 -0
  90. package/src/web/public/js/notifications.js +137 -0
  91. package/src/web/public/js/onboard/formProcessor.js +1037 -0
  92. package/src/web/public/js/onboard/index.js +374 -0
  93. package/src/web/public/js/onboard/publishHandler.js +172 -0
  94. package/src/web/public/js/onboard/state.js +76 -0
  95. package/src/web/public/js/onboard/templates.js +342 -0
  96. package/src/web/public/js/onboard/uiHandlers.js +1076 -0
  97. package/src/web/public/js/onboard/validationHandlers.js +493 -0
  98. package/src/web/public/js/serverCategoryDetails.js +364 -0
  99. package/src/web/public/js/serverCategoryList.js +241 -0
  100. package/src/web/public/js/settings.js +314 -0
  101. package/src/web/public/modal.html +84 -0
  102. package/src/web/public/onboard.html +296 -0
  103. package/src/web/public/settings.html +135 -0
  104. package/src/web/public/styles.css +277 -0
  105. package/src/web/server.ts +478 -0
  106. package/tsconfig.json +18 -0
  107. package/wiki/Installation.md +3 -0
  108. package/wiki/Publish.md +3 -0
  109. package/dist/cli/commands/install.js.map +0 -1
  110. package/dist/cli/commands/list.js.map +0 -1
  111. package/dist/cli/commands/pull.js.map +0 -1
  112. package/dist/cli/commands/serve.js.map +0 -1
  113. package/dist/cli/commands/start.js.map +0 -1
  114. package/dist/cli/commands/sync.js.map +0 -1
  115. package/dist/cli/commands/uninstall.js.map +0 -1
  116. package/dist/cli/index.js.map +0 -1
  117. package/dist/core/ConfigurationLoader.js.map +0 -1
  118. package/dist/core/ConfigurationProvider.js.map +0 -1
  119. package/dist/core/InstallationService.js.map +0 -1
  120. package/dist/core/MCPManager.js.map +0 -1
  121. package/dist/core/RequirementService.js.map +0 -1
  122. package/dist/core/ServerSchemaLoader.js.map +0 -1
  123. package/dist/core/ServerSchemaProvider.js.map +0 -1
  124. package/dist/core/constants.js.map +0 -1
  125. package/dist/core/installers/BaseInstaller.js.map +0 -1
  126. package/dist/core/installers/ClientInstaller.js.map +0 -1
  127. package/dist/core/installers/CommandInstaller.js.map +0 -1
  128. package/dist/core/installers/GeneralInstaller.js.map +0 -1
  129. package/dist/core/installers/InstallerFactory.js.map +0 -1
  130. package/dist/core/installers/NpmInstaller.js.map +0 -1
  131. package/dist/core/installers/PipInstaller.js.map +0 -1
  132. package/dist/core/installers/RequirementInstaller.js.map +0 -1
  133. package/dist/core/installers/clients/BaseClientInstaller.js.map +0 -1
  134. package/dist/core/installers/clients/ClientInstaller.js.map +0 -1
  135. package/dist/core/installers/clients/ClientInstallerFactory.js.map +0 -1
  136. package/dist/core/installers/clients/ClineInstaller.js.map +0 -1
  137. package/dist/core/installers/clients/ExtensionInstaller.js.map +0 -1
  138. package/dist/core/installers/clients/GithubCopilotInstaller.js.map +0 -1
  139. package/dist/core/installers/clients/MSRooCodeInstaller.js.map +0 -1
  140. package/dist/core/installers/index.js.map +0 -1
  141. package/dist/core/installers/requirements/BaseInstaller.js.map +0 -1
  142. package/dist/core/installers/requirements/CommandInstaller.js.map +0 -1
  143. package/dist/core/installers/requirements/GeneralInstaller.js.map +0 -1
  144. package/dist/core/installers/requirements/InstallerFactory.js.map +0 -1
  145. package/dist/core/installers/requirements/NpmInstaller.js.map +0 -1
  146. package/dist/core/installers/requirements/NugetInstaller.js.map +0 -1
  147. package/dist/core/installers/requirements/PipInstaller.js.map +0 -1
  148. package/dist/core/installers/requirements/RequirementInstaller.js.map +0 -1
  149. package/dist/core/loaders/ConfigurationLoader.js.map +0 -1
  150. package/dist/core/loaders/ConfigurationProvider.js.map +0 -1
  151. package/dist/core/loaders/InstallOperationManager.js.map +0 -1
  152. package/dist/core/loaders/ServerSchemaLoader.js.map +0 -1
  153. package/dist/core/loaders/ServerSchemaProvider.js.map +0 -1
  154. package/dist/core/loaders/SystemSettingsManager.js.map +0 -1
  155. package/dist/core/metadatas/constants.js.map +0 -1
  156. package/dist/core/metadatas/recordingConstants.js.map +0 -1
  157. package/dist/core/metadatas/types.js.map +0 -1
  158. package/dist/core/onboard/FeedOnboardService.js.map +0 -1
  159. package/dist/core/onboard/OnboardProcessor.js.map +0 -1
  160. package/dist/core/onboard/OnboardStatus.js.map +0 -1
  161. package/dist/core/onboard/OnboardStatusManager.js.map +0 -1
  162. package/dist/core/types.js.map +0 -1
  163. package/dist/core/validators/FeedValidator.js.map +0 -1
  164. package/dist/core/validators/IServerValidator.js.map +0 -1
  165. package/dist/core/validators/SSEServerValidator.js.map +0 -1
  166. package/dist/core/validators/ServerValidatorFactory.js.map +0 -1
  167. package/dist/core/validators/StdioServerValidator.js.map +0 -1
  168. package/dist/index.js.map +0 -1
  169. package/dist/services/InstallRequestValidator.js.map +0 -1
  170. package/dist/services/InstallationService.js.map +0 -1
  171. package/dist/services/MCPManager.js.map +0 -1
  172. package/dist/services/RequirementService.js.map +0 -1
  173. package/dist/services/ServerService.js.map +0 -1
  174. package/dist/services/TelemetryService.js.map +0 -1
  175. package/dist/utils/UpdateCheckTracker.js.map +0 -1
  176. package/dist/utils/adoUtils.js.map +0 -1
  177. package/dist/utils/clientUtils.js.map +0 -1
  178. package/dist/utils/feedUtils.js.map +0 -1
  179. package/dist/utils/githubAuth.js.map +0 -1
  180. package/dist/utils/githubUtils.js.map +0 -1
  181. package/dist/utils/logger.js.map +0 -1
  182. package/dist/utils/macroExpressionUtils.js.map +0 -1
  183. package/dist/utils/osUtils.js.map +0 -1
  184. package/dist/utils/versionUtils.js.map +0 -1
  185. package/dist/web/contract/serverContract.js.map +0 -1
  186. package/dist/web/server.js.map +0 -1
@@ -0,0 +1,42 @@
1
+ // Import all functionality from the modal folder
2
+ import {
3
+ showInstallModal,
4
+ closeModal,
5
+ uninstallTools,
6
+ showInstallLoadingModal,
7
+ // appendInstallLoadingMessage, // Removed
8
+ hideInstallLoadingModal,
9
+ // Potentially add updateOverallInstallStatus, addInstallationStep if needed from ./modal/index.js
10
+ } from './modal/index.js';
11
+
12
+ // Re-export all modal functionality
13
+ export {
14
+ showInstallModal,
15
+ closeModal,
16
+ uninstallTools,
17
+ showInstallLoadingModal, // Added to exports
18
+ hideInstallLoadingModal // Added to exports
19
+ // Potentially add updateOverallInstallStatus, addInstallationStep to exports
20
+ };
21
+
22
+ // Make certain functions available globally
23
+ window.showInstallModal = showInstallModal;
24
+ window.showInstallLoadingModal = showInstallLoadingModal;
25
+ // window.appendInstallLoadingMessage = appendInstallLoadingMessage; // Removed
26
+ window.hideInstallLoadingModal = hideInstallLoadingModal;
27
+
28
+ // Listen for the custom event to refresh the main modal content
29
+ document.addEventListener('refreshMainModalContent', () => {
30
+ console.log('[ModalJS] Received refreshMainModalContent event. Refreshing main modal.');
31
+ const lastSelectedCategory = localStorage.getItem('lastSelectedCategory');
32
+ const lastSelectedServerName = localStorage.getItem('lastSelectedServerName');
33
+
34
+ const isCategoryValid = lastSelectedCategory && lastSelectedCategory.trim() !== '' && lastSelectedCategory !== 'undefined' && lastSelectedCategory !== 'null';
35
+ const isServerNameValid = lastSelectedServerName && lastSelectedServerName.trim() !== '' && lastSelectedServerName !== 'undefined' && lastSelectedServerName !== 'null';
36
+
37
+ if (isCategoryValid && isServerNameValid) {
38
+ window.showInstallModal(lastSelectedCategory, lastSelectedServerName);
39
+ } else {
40
+ console.warn(`[ModalJS] Not refreshing modal. Category valid: ${isCategoryValid} (value: "${lastSelectedCategory}"), ServerName valid: ${isServerNameValid} (value: "${lastSelectedServerName}")`);
41
+ }
42
+ });
@@ -0,0 +1,137 @@
1
+ // Function to show a toast notification
2
+ function showToast(message, type = 'success') {
3
+ const alertContainer = document.querySelector('.alert-container');
4
+ if (!alertContainer) {
5
+ console.error('Alert container not found. Notifications will not be displayed.');
6
+ return;
7
+ }
8
+ const alertId = `alert-${Date.now()}`;
9
+
10
+ let iconHtml = '';
11
+ switch (type) {
12
+ case 'success':
13
+ iconHtml = '<i class="bi bi-check-circle-fill alert-icon"></i>';
14
+ break;
15
+ case 'error':
16
+ iconHtml = '<i class="bi bi-x-octagon-fill alert-icon"></i>'; // Changed icon for error
17
+ break;
18
+ case 'info':
19
+ iconHtml = '<i class="bi bi-info-circle-fill alert-icon"></i>';
20
+ break;
21
+ case 'warning':
22
+ iconHtml = '<i class="bi bi-exclamation-triangle-fill alert-icon"></i>';
23
+ break;
24
+ default:
25
+ iconHtml = '<i class="bi bi-bell-fill alert-icon"></i>'; // Default icon
26
+ }
27
+
28
+ const alertHtml = `
29
+ <div id="${alertId}" class="alert alert-${type}" role="alert">
30
+ ${iconHtml}
31
+ <span>${message}</span>
32
+ <button type="button" class="btn-close" aria-label="Close"></button>
33
+ </div>
34
+ `;
35
+
36
+ alertContainer.insertAdjacentHTML('beforeend', alertHtml);
37
+
38
+ const alertElement = document.getElementById(alertId);
39
+ if (!alertElement) return;
40
+
41
+ // Trigger the slide-in animation
42
+ // Adding a slight delay to ensure the element is in the DOM before adding the 'show' class
43
+ requestAnimationFrame(() => {
44
+ requestAnimationFrame(() => { // Double requestAnimationFrame for more reliable transition start
45
+ alertElement.classList.add('show');
46
+ });
47
+ });
48
+
49
+
50
+ const closeButton = alertElement.querySelector('.btn-close');
51
+
52
+ const dismissAlert = () => {
53
+ alertElement.classList.remove('show'); // Trigger slide-out animation
54
+ // Wait for fade out animation to complete before removing
55
+ alertElement.addEventListener('transitionend', () => {
56
+ alertElement.remove();
57
+ }, { once: true }); // Ensure event listener is removed after execution
58
+ };
59
+
60
+ if (closeButton) {
61
+ closeButton.addEventListener('click', dismissAlert);
62
+ }
63
+
64
+ // Auto-dismiss after 5 seconds (increased from 3)
65
+ setTimeout(dismissAlert, 5000);
66
+ }
67
+
68
+ // Function to show a confirmation dialog using custom modal system
69
+ function showConfirm(title, message) {
70
+ return new Promise((resolve) => {
71
+ const modalId = `confirm-modal-${Date.now()}`;
72
+ const modalHtml = `
73
+ <div id="${modalId}" class="modal" style="display: none;">
74
+ <div class="modal-content" style="max-width: 400px; margin: 15% auto;">
75
+ <div class="modal-header">
76
+ <h3 class="text-lg font-semibold text-gray-700">${title}</h3>
77
+ </div>
78
+ <div style="margin: 1rem 0;">
79
+ ${message}
80
+ </div>
81
+ <div style="display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem;">
82
+ <button type="button" class="cancel-button px-4 py-2 text-gray-600 hover:text-gray-800 font-medium rounded-lg hover:bg-gray-100 transition-colors">
83
+ Cancel
84
+ </button>
85
+ <button type="button" class="confirm-button submit-button">
86
+ Confirm
87
+ </button>
88
+ </div>
89
+ </div>
90
+ </div>
91
+ `;
92
+
93
+ document.body.insertAdjacentHTML('beforeend', modalHtml);
94
+
95
+ const modalElement = document.getElementById(modalId);
96
+ // Trigger display after a short delay to allow CSS transitions if any are added later for modals
97
+ requestAnimationFrame(() => {
98
+ modalElement.style.display = 'block';
99
+ });
100
+
101
+
102
+ // Handle confirm button click
103
+ modalElement.querySelector('.confirm-button').addEventListener('click', () => {
104
+ modalElement.style.display = 'none';
105
+ modalElement.remove();
106
+ resolve(true);
107
+ });
108
+
109
+ // Handle cancel button click
110
+ modalElement.querySelector('.cancel-button').addEventListener('click', () => {
111
+ modalElement.style.display = 'none';
112
+ modalElement.remove();
113
+ resolve(false);
114
+ });
115
+
116
+ // Handle click outside modal
117
+ modalElement.addEventListener('click', (event) => {
118
+ if (event.target === modalElement) {
119
+ modalElement.style.display = 'none';
120
+ modalElement.remove();
121
+ resolve(false);
122
+ }
123
+ });
124
+ });
125
+ }
126
+
127
+ export { showToast, showConfirm };
128
+
129
+ // Display install notification after page reload
130
+ document.addEventListener('DOMContentLoaded', () => {
131
+ const data = sessionStorage.getItem('installNotification');
132
+ if (data) {
133
+ const { message, type } = JSON.parse(data);
134
+ showToast(message, type);
135
+ sessionStorage.removeItem('installNotification');
136
+ }
137
+ });