imcp 0.1.1 → 0.1.3

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 (111) hide show
  1. package/dist/cli/index.js +1 -45
  2. package/dist/core/installers/clients/BaseClientInstaller.d.ts +1 -5
  3. package/dist/core/installers/clients/BaseClientInstaller.js +40 -38
  4. package/dist/core/installers/clients/ClientInstaller.d.ts +9 -9
  5. package/dist/core/installers/clients/ClientInstaller.js +105 -99
  6. package/dist/core/installers/requirements/BaseInstaller.d.ts +9 -1
  7. package/dist/core/installers/requirements/CommandInstaller.d.ts +9 -1
  8. package/dist/core/installers/requirements/CommandInstaller.js +46 -12
  9. package/dist/core/installers/requirements/GeneralInstaller.d.ts +11 -1
  10. package/dist/core/installers/requirements/GeneralInstaller.js +46 -10
  11. package/dist/core/installers/requirements/InstallerFactory.d.ts +3 -1
  12. package/dist/core/installers/requirements/InstallerFactory.js +3 -2
  13. package/dist/core/installers/requirements/NpmInstaller.d.ts +4 -2
  14. package/dist/core/installers/requirements/NpmInstaller.js +38 -22
  15. package/dist/core/installers/requirements/PipInstaller.d.ts +3 -1
  16. package/dist/core/installers/requirements/PipInstaller.js +58 -36
  17. package/dist/core/installers/requirements/RequirementInstaller.d.ts +4 -1
  18. package/dist/core/loaders/InstallOperationManager.d.ts +115 -0
  19. package/dist/core/loaders/InstallOperationManager.js +311 -0
  20. package/dist/core/loaders/SystemSettingsManager.d.ts +54 -0
  21. package/dist/core/loaders/SystemSettingsManager.js +257 -0
  22. package/dist/core/metadatas/recordingConstants.d.ts +44 -0
  23. package/dist/core/metadatas/recordingConstants.js +45 -0
  24. package/dist/core/metadatas/types.d.ts +21 -0
  25. package/dist/core/onboard/InstallOperationManager.d.ts +23 -0
  26. package/dist/core/onboard/InstallOperationManager.js +144 -0
  27. package/dist/core/onboard/OnboardStatusManager.js +2 -1
  28. package/dist/core/validators/StdioServerValidator.js +4 -3
  29. package/dist/services/InstallationService.d.ts +2 -37
  30. package/dist/services/InstallationService.js +45 -313
  31. package/dist/services/MCPManager.d.ts +1 -1
  32. package/dist/services/MCPManager.js +4 -58
  33. package/dist/services/RequirementService.d.ts +85 -12
  34. package/dist/services/RequirementService.js +488 -49
  35. package/dist/services/ServerService.d.ts +0 -6
  36. package/dist/services/ServerService.js +0 -74
  37. package/dist/utils/adoUtils.js +6 -3
  38. package/dist/utils/logger.js +1 -1
  39. package/dist/utils/macroExpressionUtils.js +3 -25
  40. package/dist/utils/osUtils.d.ts +22 -1
  41. package/dist/utils/osUtils.js +92 -1
  42. package/dist/utils/versionUtils.d.ts +20 -1
  43. package/dist/utils/versionUtils.js +51 -4
  44. package/dist/web/public/css/modal.css +292 -1
  45. package/dist/web/public/css/serverDetails.css +14 -1
  46. package/dist/web/public/index.html +122 -20
  47. package/dist/web/public/js/flights/flights.js +1 -0
  48. package/dist/web/public/js/modal/index.js +8 -14
  49. package/dist/web/public/js/modal/installModal.js +3 -4
  50. package/dist/web/public/js/modal/installation.js +122 -137
  51. package/dist/web/public/js/modal/loadingModal.js +155 -25
  52. package/dist/web/public/js/modal/messageQueue.js +45 -101
  53. package/dist/web/public/js/modal/modalSetup.js +125 -43
  54. package/dist/web/public/js/modal/modalUtils.js +0 -12
  55. package/dist/web/public/js/modal.js +23 -10
  56. package/dist/web/public/js/onboard/publishHandler.js +22 -20
  57. package/dist/web/public/js/serverCategoryDetails.js +60 -11
  58. package/dist/web/public/js/serverCategoryList.js +2 -2
  59. package/dist/web/public/js/settings.js +314 -0
  60. package/dist/web/public/settings.html +135 -0
  61. package/dist/web/public/styles.css +32 -0
  62. package/dist/web/server.js +82 -0
  63. package/memory-bank/activeContext.md +13 -1
  64. package/memory-bank/decisionLog.md +63 -0
  65. package/memory-bank/progress.md +30 -0
  66. package/memory-bank/systemPatterns.md +7 -0
  67. package/package.json +1 -1
  68. package/src/cli/index.ts +1 -48
  69. package/src/core/installers/clients/BaseClientInstaller.ts +64 -50
  70. package/src/core/installers/clients/ClientInstaller.ts +130 -130
  71. package/src/core/installers/requirements/BaseInstaller.ts +9 -1
  72. package/src/core/installers/requirements/CommandInstaller.ts +47 -13
  73. package/src/core/installers/requirements/GeneralInstaller.ts +48 -10
  74. package/src/core/installers/requirements/InstallerFactory.ts +4 -3
  75. package/src/core/installers/requirements/NpmInstaller.ts +90 -68
  76. package/src/core/installers/requirements/PipInstaller.ts +81 -55
  77. package/src/core/installers/requirements/RequirementInstaller.ts +4 -3
  78. package/src/core/loaders/InstallOperationManager.ts +367 -0
  79. package/src/core/loaders/SystemSettingsManager.ts +278 -0
  80. package/src/core/metadatas/recordingConstants.ts +62 -0
  81. package/src/core/metadatas/types.ts +23 -0
  82. package/src/core/onboard/OnboardStatusManager.ts +2 -1
  83. package/src/core/validators/StdioServerValidator.ts +4 -3
  84. package/src/services/InstallationService.ts +54 -399
  85. package/src/services/MCPManager.ts +4 -77
  86. package/src/services/RequirementService.ts +564 -67
  87. package/src/services/ServerService.ts +0 -90
  88. package/src/utils/adoUtils.ts +6 -4
  89. package/src/utils/logger.ts +1 -1
  90. package/src/utils/macroExpressionUtils.ts +4 -21
  91. package/src/utils/osUtils.ts +92 -1
  92. package/src/utils/versionUtils.ts +71 -19
  93. package/src/web/public/css/modal.css +292 -1
  94. package/src/web/public/css/serverDetails.css +14 -1
  95. package/src/web/public/index.html +122 -20
  96. package/src/web/public/js/flights/flights.js +1 -1
  97. package/src/web/public/js/modal/index.js +8 -14
  98. package/src/web/public/js/modal/installModal.js +3 -4
  99. package/src/web/public/js/modal/installation.js +122 -137
  100. package/src/web/public/js/modal/loadingModal.js +155 -25
  101. package/src/web/public/js/modal/modalSetup.js +125 -43
  102. package/src/web/public/js/modal/modalUtils.js +0 -12
  103. package/src/web/public/js/modal.js +23 -10
  104. package/src/web/public/js/onboard/publishHandler.js +22 -20
  105. package/src/web/public/js/serverCategoryDetails.js +60 -11
  106. package/src/web/public/js/serverCategoryList.js +5 -5
  107. package/src/web/public/js/settings.js +314 -0
  108. package/src/web/public/settings.html +135 -0
  109. package/src/web/public/styles.css +32 -0
  110. package/src/web/server.ts +85 -0
  111. package/src/web/public/js/modal/messageQueue.js +0 -112
@@ -1,112 +0,0 @@
1
- /** @type {boolean} Flag indicating if a message is currently being appended */
2
- let isAppending = false;
3
-
4
- /** @type {boolean} Flag indicating if completion UI update is pending */
5
- let completionPending = false;
6
-
7
- /**
8
- * Message queue for delayed loading modal updates.
9
- * @type {Array<{msg: string, isCompletion: boolean}>}
10
- */
11
- let messageQueue = [];
12
-
13
- /**
14
- * Process messages in the queue with a delay between each message.
15
- * When the queue is empty and completion is pending, triggers the completion UI.
16
- * @private
17
- */
18
- function processMessageQueue() {
19
- if (isAppending || messageQueue.length === 0) {
20
- // Only update completion UI if all messages have been displayed
21
- if (messageQueue.length === 0 && completionPending) {
22
- // Add small delay before showing completion to ensure last message is visible
23
- setTimeout(() => {
24
- updateCompletionUI();
25
- completionPending = false;
26
- }, 500);
27
- }
28
- return;
29
- }
30
-
31
- isAppending = true;
32
- const { msg, isCompletion } = messageQueue.shift();
33
-
34
- if (isCompletion) {
35
- completionPending = true;
36
- }
37
-
38
- appendInstallLoadingMessage(msg);
39
-
40
- setTimeout(() => {
41
- isAppending = false;
42
- processMessageQueue();
43
- }, 1000);
44
- }
45
-
46
- /**
47
- * Queue a message to be displayed with a delay.
48
- * Messages are displayed sequentially with a 1-second delay between each.
49
- * @param {string} msg The message to display
50
- * @param {boolean} [isCompletion=false] If true, triggers completion UI after message display
51
- */
52
- export function delayedAppendInstallLoadingMessage(msg, isCompletion = false) {
53
- messageQueue.push({ msg, isCompletion });
54
- processMessageQueue();
55
- }
56
-
57
- function updateCompletionUI() {
58
- const loadingTitle = document.querySelector('.loading-title');
59
- const loadingIcon = document.querySelector('.loading-icon');
60
-
61
- if (loadingTitle) {
62
- loadingTitle.textContent = 'Completed';
63
- loadingTitle.classList.add('completed');
64
- }
65
-
66
- if (loadingIcon) {
67
- loadingIcon.innerHTML = `
68
- <svg width="48" height="48" viewBox="0 0 48 48" fill="none">
69
- <circle cx="24" cy="24" r="20" stroke="#059669" stroke-width="4"/>
70
- <path d="M16 24l6 6 12-12" stroke="#059669" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
71
- </svg>
72
- `;
73
- loadingIcon.classList.add('completed');
74
- }
75
- }
76
-
77
- /**
78
- * Internal function to append a message to the loading modal with formatting.
79
- * @private
80
- * @param {string} message - The message to append
81
- */
82
- function appendInstallLoadingMessage(message) {
83
- const loadingMsg = document.getElementById('installLoadingMessage');
84
- if (loadingMsg) {
85
- // Split message on newlines
86
- const lines = message.split('\n');
87
-
88
- lines.forEach(line => {
89
- // Check if line contains an error
90
- const isError = line.toLowerCase().includes('error') ||
91
- line.toLowerCase().includes('failed') ||
92
- line.toLowerCase().includes('timeout');
93
-
94
- const formattedMessage = line;
95
-
96
- // Create message container
97
- const messageDiv = document.createElement('div');
98
- messageDiv.className = 'message-line';
99
-
100
- // Apply yellow color for error messages
101
- if (isError) {
102
- messageDiv.style.color = '#f59e0b';
103
- }
104
- messageDiv.innerHTML = formattedMessage;
105
-
106
- loadingMsg.appendChild(messageDiv);
107
- loadingMsg.scrollTop = loadingMsg.scrollHeight;
108
- });
109
- } else {
110
- console.error('[LoadingModal] Element not found: installLoadingMessage');
111
- }
112
- }