imcp 0.2.2 → 0.2.4
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.
- package/README.md +8 -8
- package/dist/cli/commands/list-installed.d.ts +2 -0
- package/dist/cli/commands/list-installed.js +2 -0
- package/dist/cli/commands/list-installed.js.map +1 -0
- package/dist/cli/commands/update.js +1 -1
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/tui/components/ClientSelector.js +1 -1
- package/dist/cli/tui/components/ClientSelector.js.map +1 -1
- package/dist/core/installers/clients/BaseClientInstaller.js +1 -1
- package/dist/core/installers/clients/BaseClientInstaller.js.map +1 -1
- package/dist/core/installers/clients/ClientInstallerFactory.js +1 -1
- package/dist/core/installers/clients/ClientInstallerFactory.js.map +1 -1
- package/dist/core/installers/clients/CopilotCLIInstaller.d.ts +18 -0
- package/dist/core/installers/clients/CopilotCLIInstaller.js +2 -0
- package/dist/core/installers/clients/CopilotCLIInstaller.js.map +1 -0
- package/dist/core/installers/clients/ExtensionInstaller.d.ts +1 -0
- package/dist/core/installers/clients/ExtensionInstaller.js +1 -1
- package/dist/core/installers/clients/ExtensionInstaller.js.map +1 -1
- package/dist/core/installers/requirements/NpmInstaller.js +1 -1
- package/dist/core/installers/requirements/NpmInstaller.js.map +1 -1
- package/dist/core/metadatas/constants.d.ts +4 -0
- package/dist/core/metadatas/constants.js +1 -1
- package/dist/core/metadatas/constants.js.map +1 -1
- package/dist/utils/versionUtils.js +1 -1
- package/dist/utils/versionUtils.js.map +1 -1
- package/dist/web/public/js/api.js.map +1 -1
- package/dist/web/public/js/detailsWidget.js.map +1 -1
- package/dist/web/public/js/flights/flights.js.map +1 -1
- package/dist/web/public/js/modal/index.js.map +1 -1
- package/dist/web/public/js/modal/installModal.js.map +1 -1
- package/dist/web/public/js/modal/installation.js.map +1 -1
- package/dist/web/public/js/modal/loadingModal.js.map +1 -1
- package/dist/web/public/js/modal/modalSetup.js.map +1 -1
- package/dist/web/public/js/modal/modalUtils.js.map +1 -1
- package/dist/web/public/js/modal/versionUtils.js.map +1 -1
- package/dist/web/public/js/modal.js.map +1 -1
- package/dist/web/public/js/notifications.js.map +1 -1
- package/dist/web/public/js/onboard/formProcessor.js.map +1 -1
- package/dist/web/public/js/onboard/index.js.map +1 -1
- package/dist/web/public/js/onboard/publishHandler.js.map +1 -1
- package/dist/web/public/js/onboard/state.js.map +1 -1
- package/dist/web/public/js/onboard/templates.js.map +1 -1
- package/dist/web/public/js/onboard/uiHandlers.js.map +1 -1
- package/dist/web/public/js/onboard/validationHandlers.js.map +1 -1
- package/dist/web/public/js/serverCategoryDetails.js.map +1 -1
- package/dist/web/public/js/serverCategoryList.js.map +1 -1
- package/dist/web/public/js/settings.js.map +1 -1
- package/package.json +1 -1
- package/dist/core/installers/clients/CodexInstaller.d.ts +0 -45
- package/dist/core/installers/clients/CodexInstaller.js +0 -2
- package/dist/core/installers/clients/CodexInstaller.js.map +0 -1
- package/dist/utils/tomlUtils.d.ts +0 -17
- package/dist/utils/tomlUtils.js +0 -2
- package/dist/utils/tomlUtils.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["buildUrlWithFlights"],"sources":["0"],"sourcesContent":["import { buildUrlWithFlights } from './flights/flights.js';\n\n// Toast notification function\nfunction showToast(message, type = 'success') {\n const toastContainer = document.querySelector('.toast-container');\n if (!toastContainer) return;\n\n const toastId = `toast-${Date.now()}`;\n const toastHTML = `\n <div id=\"${toastId}\" class=\"toast align-items-center text-white bg-${type === 'success' ? 'success' : 'danger'} border-0\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\">\n <div class=\"d-flex\">\n <div class=\"toast-body\">\n ${message}\n </div>\n <button type=\"button\" class=\"btn-close btn-close-white me-2 m-auto\" data-bs-dismiss=\"toast\" aria-label=\"Close\"></button>\n </div>\n </div>\n `;\n toastContainer.insertAdjacentHTML('beforeend', toastHTML);\n const toastElement = document.getElementById(toastId);\n const toast = new bootstrap.Toast(toastElement, { delay: 3000 });\n toast.show();\n toastElement.addEventListener('hidden.bs.toast', () => {\n toastElement.remove();\n });\n}\n\ndocument.addEventListener('DOMContentLoaded', () => {\n // All DOM element queries and event listeners must be inside this block!\n const settingsForm = document.getElementById('settingsForm');\n const nodePathInput = document.getElementById('nodePath');\n const browserPathInput = document.getElementById('browserPath');\n const systemEnvironmentsDiv = document.getElementById('systemEnvironments');\n \n // Python Environments elements\n const pythonEnvsContainer = document.getElementById('pythonEnvsContainer');\n const addPythonEnvButton = document.getElementById('addPythonEnvButton');\n const pythonEnvsLoadingMsg = document.getElementById('pythonEnvsLoadingMsg');\n \n // User Configurations elements\n const userConfigurationsContainer = document.getElementById('userConfigurationsContainer');\n const addUserConfigButton = document.getElementById('addUserConfigButton');\n const userConfigLoadingMsg = document.getElementById('userConfigLoadingMsg');\n \n const cancelButton = document.getElementById('cancelButton');\n const setupButton = document.getElementById('setupButton');\n\n// (Removed duplicate showToast function here)\n\n\n async function loadSettings() {\n try {\n const response = await fetch('/api/settings');\n if (!response.ok) {\n const errorData = await response.json();\n throw new Error(errorData.error || `HTTP error! status: ${response.status}`);\n }\n const apiResponse = await response.json();\n if (apiResponse.success && apiResponse.data) {\n const settings = apiResponse.data;\n \n // Populate Python Environments\n if(pythonEnvsLoadingMsg) pythonEnvsLoadingMsg.remove(); // Remove loading message\n pythonEnvsContainer.innerHTML = ''; // Clear previous entries\n \n if (settings.pythonEnvs && Object.keys(settings.pythonEnvs).length > 0) {\n Object.entries(settings.pythonEnvs).forEach(([server, path]) => {\n renderPythonEnvInput(server, path);\n });\n } else if (settings.pythonEnv) {\n // Handle legacy pythonEnv\n renderPythonEnvInput('system', settings.pythonEnv);\n } else {\n if (!pythonEnvsContainer.querySelector('.python-env-row')) { // Add placeholder if no rows exist\n const p = document.createElement('p');\n p.className = 'text-gray-500 python-env-placeholder';\n p.textContent = 'No Python environments defined. Click \"Add Python Environment\" to add one.';\n pythonEnvsContainer.appendChild(p);\n }\n }\n \n nodePathInput.value = settings.nodePath || '';\n browserPathInput.value = settings.browserPath || '';\n\n // Populate System Environments\n systemEnvironmentsDiv.innerHTML = ''; // Clear loading message\n if (settings.systemEnvironments && Object.keys(settings.systemEnvironments).length > 0) {\n // Create a modern, scrollable list (not a table)\n const list = document.createElement('div');\n list.className = 'flex flex-col';\n\n Object.entries(settings.systemEnvironments).forEach(([key, value], idx) => {\n const item = document.createElement('div');\n item.className =\n 'flex flex-col sm:flex-row sm:items-center bg-white rounded-md border border-gray-200 px-4 py-2 shadow-sm hover:shadow transition group';\n item.innerHTML = `\n <div class=\"flex items-center min-w-0 w-full sm:w-1/4 sm:mb-0\">\n <i class='bx bx-cog text-blue-400 mr-2'></i>\n <span class=\"font-mono font-semibold text-gray-800 text-base truncate\" title=\"${key}\">${key}</span>\n </div>\n <div class=\"flex-1 min-w-0 break-all text-gray-700 text-sm pl-7 sm:pl-4\">\n ${value}\n </div>\n `;\n list.appendChild(item);\n });\n\n // Restore frame styling for the new layout\n systemEnvironmentsDiv.classList.remove('shadow');\n systemEnvironmentsDiv.classList.add('rounded-lg', 'bg-white', 'border', 'border-gray-200', 'border-1');\n systemEnvironmentsDiv.classList.remove('border-2', 'border-4', 'border-8');\n systemEnvironmentsDiv.classList.add('p-0');\n systemEnvironmentsDiv.style.padding = '0.5rem 0.5rem 0.5rem 0.5rem';\n systemEnvironmentsDiv.appendChild(list);\n } else {\n systemEnvironmentsDiv.innerHTML = '<p class=\"text-gray-500\">No system environment variables loaded or available.</p>';\n }\n\n // Populate User Configurations\n if(userConfigLoadingMsg) userConfigLoadingMsg.remove(); // Remove loading message\n userConfigurationsContainer.innerHTML = ''; // Clear previous entries\n if (settings.userConfigurations && Object.keys(settings.userConfigurations).length > 0) {\n Object.entries(settings.userConfigurations).forEach(([key, value]) => {\n renderUserConfigInput(key, value);\n });\n } else {\n if (!userConfigurationsContainer.querySelector('.user-config-row')) { // Add placeholder if no rows exist\n const p = document.createElement('p');\n p.className = 'text-gray-500 user-config-placeholder';\n p.textContent = 'No user configurations defined. Click \"Add User Configuration\" to add one.';\n userConfigurationsContainer.appendChild(p);\n }\n }\n\n } else {\n throw new Error(apiResponse.error || 'Failed to load settings.');\n }\n } catch (error) {\n console.error('Error loading settings:', error);\n showToast(`Error loading settings: ${error.message}`, 'danger');\n systemEnvironmentsDiv.innerHTML = `<p class=\"text-red-500\">Error loading environment variables: ${error.message}</p>`;\n if(userConfigLoadingMsg) userConfigLoadingMsg.textContent = `Error loading user configurations: ${error.message}`;\n }\n }\n\n function renderPythonEnvInput(server = 'system', path = '') {\n const placeholder = pythonEnvsContainer.querySelector('.python-env-placeholder');\n if (placeholder) placeholder.remove();\n\n const uniqueId = `python-env-${Date.now()}-${Math.random().toString(36).substr(2, 5)}`;\n const div = document.createElement('div');\n div.className = 'python-env-row flex items-center gap-3 mb-2';\n div.innerHTML = `\n <input type=\"text\" value=\"${server}\" class=\"form-input form-control w-1/3 px-3 py-2 rounded-md python-env-server\" placeholder=\"Server Name (e.g., system)\">\n <input type=\"text\" value=\"${path}\" class=\"form-input form-control w-2/3 px-3 py-2 rounded-md python-env-path\" placeholder=\"e.g., /usr/bin/python3 or C:/Python39/python.exe\">\n <button type=\"button\" class=\"btn btn-danger btn-sm remove-python-env-button flex items-center\">\n <i class='bx bx-trash'></i>\n </button>\n `;\n pythonEnvsContainer.appendChild(div);\n div.querySelector('.remove-python-env-button').addEventListener('click', function() {\n this.closest('.python-env-row').remove();\n if (!pythonEnvsContainer.querySelector('.python-env-row')) { // Add placeholder if no rows exist after removal\n const p = document.createElement('p');\n p.className = 'text-gray-500 python-env-placeholder';\n p.textContent = 'No Python environments defined. Click \"Add Python Environment\" to add one.';\n pythonEnvsContainer.appendChild(p);\n }\n });\n }\n\n function renderUserConfigInput(key = '', value = '') {\n const placeholder = userConfigurationsContainer.querySelector('.user-config-placeholder');\n if (placeholder) placeholder.remove();\n\n const uniqueId = `user-config-${Date.now()}-${Math.random().toString(36).substr(2, 5)}`;\n const div = document.createElement('div');\n div.className = 'user-config-row flex items-center gap-3 mb-2';\n const isSecret = key.toLowerCase().includes('key');\n const valueInputType = isSecret ? 'password' : 'text';\n\n // Key Input\n const keyInputHTML = `<input type=\"text\" value=\"${key}\" class=\"form-input form-control w-1/3 px-3 py-2 rounded-md user-config-key\" placeholder=\"Key\">`;\n\n // Value Input & Eye Icon (if secret)\n let valueSectionHTML;\n if (isSecret) {\n valueSectionHTML = `\n <div class=\"relative w-2/3\">\n <input type=\"${valueInputType}\" value=\"${value}\" class=\"form-input form-control w-full px-3 py-2 rounded-md user-config-value pr-10\" placeholder=\"Value\">\n <button type=\"button\" class=\"absolute inset-y-0 right-0 flex items-center pr-3 text-gray-500 hover:text-gray-700 toggle-visibility-button\" style=\"background: transparent; border: none;\">\n <i class='bx bx-show text-lg'></i>\n </button>\n </div>\n `;\n } else {\n valueSectionHTML = `<input type=\"${valueInputType}\" value=\"${value}\" class=\"form-input form-control w-2/3 px-3 py-2 rounded-md user-config-value\" placeholder=\"Value\">`;\n }\n\n // Remove Button\n const removeButtonHTML = `\n <button type=\"button\" class=\"btn btn-danger btn-sm remove-user-config-button flex items-center\">\n <i class='bx bx-trash'></i>\n </button>\n `;\n\n div.innerHTML = keyInputHTML + valueSectionHTML + removeButtonHTML;\n userConfigurationsContainer.appendChild(div);\n\n if (isSecret) {\n const toggleButton = div.querySelector('.toggle-visibility-button');\n const valueInput = div.querySelector('.user-config-value');\n const eyeIcon = toggleButton.querySelector('i');\n\n toggleButton.addEventListener('click', (e) => {\n e.preventDefault(); // Prevent form submission if inside a form\n if (valueInput.type === 'password') {\n valueInput.type = 'text';\n eyeIcon.classList.remove('bx-show');\n eyeIcon.classList.add('bx-hide');\n } else {\n valueInput.type = 'password';\n eyeIcon.classList.remove('bx-hide');\n eyeIcon.classList.add('bx-show');\n }\n });\n }\n\n div.querySelector('.remove-user-config-button').addEventListener('click', function() {\n this.closest('.user-config-row').remove();\n if (!userConfigurationsContainer.querySelector('.user-config-row')) { // Add placeholder if no rows exist after removal\n const p = document.createElement('p');\n p.className = 'text-gray-500 user-config-placeholder';\n p.textContent = 'No user configurations defined. Click \"Add User Configuration\" to add one.';\n userConfigurationsContainer.appendChild(p);\n }\n });\n }\n\n\n async function saveSettings(event) {\n event.preventDefault();\n setupButton.disabled = true;\n setupButton.innerHTML = `<i class='bx bx-loader-alt bx-spin mr-2'></i>Saving...`;\n\n const pythonEnvs = {};\n document.querySelectorAll('.python-env-row').forEach(row => {\n const serverInput = row.querySelector('.python-env-server');\n const pathInput = row.querySelector('.python-env-path');\n if (serverInput && pathInput && serverInput.value.trim()) {\n pythonEnvs[serverInput.value.trim()] = pathInput.value.trim();\n }\n });\n \n const userConfigs = {};\n document.querySelectorAll('.user-config-row').forEach(row => {\n const keyInput = row.querySelector('.user-config-key');\n const valueInput = row.querySelector('.user-config-value');\n if (keyInput && valueInput && keyInput.value.trim()) {\n userConfigs[keyInput.value.trim()] = valueInput.value.trim();\n }\n });\n\n const settingsData = {\n pythonEnvs: pythonEnvs,\n // Include pythonEnv for backward compatibility (use system value if available)\n pythonEnv: pythonEnvs['system'] || null,\n nodePath: nodePathInput.value.trim() || null,\n browserPath: browserPathInput.value.trim() || null,\n userConfigurations: userConfigs,\n };\n\n try {\n const response = await fetch('/api/settings', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(settingsData),\n });\n\n const apiResponse = await response.json();\n\n if (response.ok && apiResponse.success) {\n showToast('Settings saved successfully!', 'success');\n // Optionally, reload settings to reflect any backend-applied defaults\n await loadSettings();\n } else {\n throw new Error(apiResponse.error || `HTTP error! status: ${response.status}`);\n }\n } catch (error) {\n console.error('Error saving settings:', error);\n showToast(`Error saving settings: ${error.message}`, 'danger');\n } finally {\n setupButton.disabled = false;\n setupButton.innerHTML = `<i class='bx bx-save mr-2'></i>Save Settings`;\n }\n }\n\n cancelButton.addEventListener('click', () => {\n // Navigate back to index.html, preserving flight parameters\n window.location.href = buildUrlWithFlights('index.html');\n });\n\n addPythonEnvButton.addEventListener('click', () => renderPythonEnvInput());\n addUserConfigButton.addEventListener('click', () => renderUserConfigInput());\n\n settingsForm.addEventListener('submit', saveSettings);\n\n // Initial load\n loadSettings();\n\n // (Collapse/expand functionality removed as requested)\n});"],"mappings":"OAASA,wBAA2B,uB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["buildUrlWithFlights","showToast","message","type","toastContainer","document","querySelector","toastId","Date","now","toastHTML","insertAdjacentHTML","toastElement","getElementById","bootstrap","Toast","delay","show","addEventListener","remove","settingsForm","nodePathInput","browserPathInput","systemEnvironmentsDiv","pythonEnvsContainer","addPythonEnvButton","pythonEnvsLoadingMsg","userConfigurationsContainer","addUserConfigButton","userConfigLoadingMsg","cancelButton","setupButton","async","loadSettings","response","fetch","ok","errorData","json","Error","error","status","apiResponse","success","data","settings","innerHTML","pythonEnvs","Object","keys","length","entries","forEach","server","path","renderPythonEnvInput","pythonEnv","p","createElement","className","textContent","appendChild","value","nodePath","browserPath","systemEnvironments","list","key","idx","item","classList","add","style","padding","userConfigurations","renderUserConfigInput","console","placeholder","Math","random","toString","substr","div","this","closest","isSecret","toLowerCase","includes","valueInputType","keyInputHTML","valueSectionHTML","toggleButton","valueInput","eyeIcon","e","preventDefault","window","location","href","saveSettings","event","disabled","querySelectorAll","row","serverInput","pathInput","trim","userConfigs","keyInput","settingsData","method","headers","body","JSON","stringify"],"sources":["0"],"sourcesContent":["import { buildUrlWithFlights } from './flights/flights.js';\n\n// Toast notification function\nfunction showToast(message, type = 'success') {\n const toastContainer = document.querySelector('.toast-container');\n if (!toastContainer) return;\n\n const toastId = `toast-${Date.now()}`;\n const toastHTML = `\n <div id=\"${toastId}\" class=\"toast align-items-center text-white bg-${type === 'success' ? 'success' : 'danger'} border-0\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\">\n <div class=\"d-flex\">\n <div class=\"toast-body\">\n ${message}\n </div>\n <button type=\"button\" class=\"btn-close btn-close-white me-2 m-auto\" data-bs-dismiss=\"toast\" aria-label=\"Close\"></button>\n </div>\n </div>\n `;\n toastContainer.insertAdjacentHTML('beforeend', toastHTML);\n const toastElement = document.getElementById(toastId);\n const toast = new bootstrap.Toast(toastElement, { delay: 3000 });\n toast.show();\n toastElement.addEventListener('hidden.bs.toast', () => {\n toastElement.remove();\n });\n}\n\ndocument.addEventListener('DOMContentLoaded', () => {\n // All DOM element queries and event listeners must be inside this block!\n const settingsForm = document.getElementById('settingsForm');\n const nodePathInput = document.getElementById('nodePath');\n const browserPathInput = document.getElementById('browserPath');\n const systemEnvironmentsDiv = document.getElementById('systemEnvironments');\n \n // Python Environments elements\n const pythonEnvsContainer = document.getElementById('pythonEnvsContainer');\n const addPythonEnvButton = document.getElementById('addPythonEnvButton');\n const pythonEnvsLoadingMsg = document.getElementById('pythonEnvsLoadingMsg');\n \n // User Configurations elements\n const userConfigurationsContainer = document.getElementById('userConfigurationsContainer');\n const addUserConfigButton = document.getElementById('addUserConfigButton');\n const userConfigLoadingMsg = document.getElementById('userConfigLoadingMsg');\n \n const cancelButton = document.getElementById('cancelButton');\n const setupButton = document.getElementById('setupButton');\n\n// (Removed duplicate showToast function here)\n\n\n async function loadSettings() {\n try {\n const response = await fetch('/api/settings');\n if (!response.ok) {\n const errorData = await response.json();\n throw new Error(errorData.error || `HTTP error! status: ${response.status}`);\n }\n const apiResponse = await response.json();\n if (apiResponse.success && apiResponse.data) {\n const settings = apiResponse.data;\n \n // Populate Python Environments\n if(pythonEnvsLoadingMsg) pythonEnvsLoadingMsg.remove(); // Remove loading message\n pythonEnvsContainer.innerHTML = ''; // Clear previous entries\n \n if (settings.pythonEnvs && Object.keys(settings.pythonEnvs).length > 0) {\n Object.entries(settings.pythonEnvs).forEach(([server, path]) => {\n renderPythonEnvInput(server, path);\n });\n } else if (settings.pythonEnv) {\n // Handle legacy pythonEnv\n renderPythonEnvInput('system', settings.pythonEnv);\n } else {\n if (!pythonEnvsContainer.querySelector('.python-env-row')) { // Add placeholder if no rows exist\n const p = document.createElement('p');\n p.className = 'text-gray-500 python-env-placeholder';\n p.textContent = 'No Python environments defined. Click \"Add Python Environment\" to add one.';\n pythonEnvsContainer.appendChild(p);\n }\n }\n \n nodePathInput.value = settings.nodePath || '';\n browserPathInput.value = settings.browserPath || '';\n\n // Populate System Environments\n systemEnvironmentsDiv.innerHTML = ''; // Clear loading message\n if (settings.systemEnvironments && Object.keys(settings.systemEnvironments).length > 0) {\n // Create a modern, scrollable list (not a table)\n const list = document.createElement('div');\n list.className = 'flex flex-col';\n\n Object.entries(settings.systemEnvironments).forEach(([key, value], idx) => {\n const item = document.createElement('div');\n item.className =\n 'flex flex-col sm:flex-row sm:items-center bg-white rounded-md border border-gray-200 px-4 py-2 shadow-sm hover:shadow transition group';\n item.innerHTML = `\n <div class=\"flex items-center min-w-0 w-full sm:w-1/4 sm:mb-0\">\n <i class='bx bx-cog text-blue-400 mr-2'></i>\n <span class=\"font-mono font-semibold text-gray-800 text-base truncate\" title=\"${key}\">${key}</span>\n </div>\n <div class=\"flex-1 min-w-0 break-all text-gray-700 text-sm pl-7 sm:pl-4\">\n ${value}\n </div>\n `;\n list.appendChild(item);\n });\n\n // Restore frame styling for the new layout\n systemEnvironmentsDiv.classList.remove('shadow');\n systemEnvironmentsDiv.classList.add('rounded-lg', 'bg-white', 'border', 'border-gray-200', 'border-1');\n systemEnvironmentsDiv.classList.remove('border-2', 'border-4', 'border-8');\n systemEnvironmentsDiv.classList.add('p-0');\n systemEnvironmentsDiv.style.padding = '0.5rem 0.5rem 0.5rem 0.5rem';\n systemEnvironmentsDiv.appendChild(list);\n } else {\n systemEnvironmentsDiv.innerHTML = '<p class=\"text-gray-500\">No system environment variables loaded or available.</p>';\n }\n\n // Populate User Configurations\n if(userConfigLoadingMsg) userConfigLoadingMsg.remove(); // Remove loading message\n userConfigurationsContainer.innerHTML = ''; // Clear previous entries\n if (settings.userConfigurations && Object.keys(settings.userConfigurations).length > 0) {\n Object.entries(settings.userConfigurations).forEach(([key, value]) => {\n renderUserConfigInput(key, value);\n });\n } else {\n if (!userConfigurationsContainer.querySelector('.user-config-row')) { // Add placeholder if no rows exist\n const p = document.createElement('p');\n p.className = 'text-gray-500 user-config-placeholder';\n p.textContent = 'No user configurations defined. Click \"Add User Configuration\" to add one.';\n userConfigurationsContainer.appendChild(p);\n }\n }\n\n } else {\n throw new Error(apiResponse.error || 'Failed to load settings.');\n }\n } catch (error) {\n console.error('Error loading settings:', error);\n showToast(`Error loading settings: ${error.message}`, 'danger');\n systemEnvironmentsDiv.innerHTML = `<p class=\"text-red-500\">Error loading environment variables: ${error.message}</p>`;\n if(userConfigLoadingMsg) userConfigLoadingMsg.textContent = `Error loading user configurations: ${error.message}`;\n }\n }\n\n function renderPythonEnvInput(server = 'system', path = '') {\n const placeholder = pythonEnvsContainer.querySelector('.python-env-placeholder');\n if (placeholder) placeholder.remove();\n\n const uniqueId = `python-env-${Date.now()}-${Math.random().toString(36).substr(2, 5)}`;\n const div = document.createElement('div');\n div.className = 'python-env-row flex items-center gap-3 mb-2';\n div.innerHTML = `\n <input type=\"text\" value=\"${server}\" class=\"form-input form-control w-1/3 px-3 py-2 rounded-md python-env-server\" placeholder=\"Server Name (e.g., system)\">\n <input type=\"text\" value=\"${path}\" class=\"form-input form-control w-2/3 px-3 py-2 rounded-md python-env-path\" placeholder=\"e.g., /usr/bin/python3 or C:/Python39/python.exe\">\n <button type=\"button\" class=\"btn btn-danger btn-sm remove-python-env-button flex items-center\">\n <i class='bx bx-trash'></i>\n </button>\n `;\n pythonEnvsContainer.appendChild(div);\n div.querySelector('.remove-python-env-button').addEventListener('click', function() {\n this.closest('.python-env-row').remove();\n if (!pythonEnvsContainer.querySelector('.python-env-row')) { // Add placeholder if no rows exist after removal\n const p = document.createElement('p');\n p.className = 'text-gray-500 python-env-placeholder';\n p.textContent = 'No Python environments defined. Click \"Add Python Environment\" to add one.';\n pythonEnvsContainer.appendChild(p);\n }\n });\n }\n\n function renderUserConfigInput(key = '', value = '') {\n const placeholder = userConfigurationsContainer.querySelector('.user-config-placeholder');\n if (placeholder) placeholder.remove();\n\n const uniqueId = `user-config-${Date.now()}-${Math.random().toString(36).substr(2, 5)}`;\n const div = document.createElement('div');\n div.className = 'user-config-row flex items-center gap-3 mb-2';\n const isSecret = key.toLowerCase().includes('key');\n const valueInputType = isSecret ? 'password' : 'text';\n\n // Key Input\n const keyInputHTML = `<input type=\"text\" value=\"${key}\" class=\"form-input form-control w-1/3 px-3 py-2 rounded-md user-config-key\" placeholder=\"Key\">`;\n\n // Value Input & Eye Icon (if secret)\n let valueSectionHTML;\n if (isSecret) {\n valueSectionHTML = `\n <div class=\"relative w-2/3\">\n <input type=\"${valueInputType}\" value=\"${value}\" class=\"form-input form-control w-full px-3 py-2 rounded-md user-config-value pr-10\" placeholder=\"Value\">\n <button type=\"button\" class=\"absolute inset-y-0 right-0 flex items-center pr-3 text-gray-500 hover:text-gray-700 toggle-visibility-button\" style=\"background: transparent; border: none;\">\n <i class='bx bx-show text-lg'></i>\n </button>\n </div>\n `;\n } else {\n valueSectionHTML = `<input type=\"${valueInputType}\" value=\"${value}\" class=\"form-input form-control w-2/3 px-3 py-2 rounded-md user-config-value\" placeholder=\"Value\">`;\n }\n\n // Remove Button\n const removeButtonHTML = `\n <button type=\"button\" class=\"btn btn-danger btn-sm remove-user-config-button flex items-center\">\n <i class='bx bx-trash'></i>\n </button>\n `;\n\n div.innerHTML = keyInputHTML + valueSectionHTML + removeButtonHTML;\n userConfigurationsContainer.appendChild(div);\n\n if (isSecret) {\n const toggleButton = div.querySelector('.toggle-visibility-button');\n const valueInput = div.querySelector('.user-config-value');\n const eyeIcon = toggleButton.querySelector('i');\n\n toggleButton.addEventListener('click', (e) => {\n e.preventDefault(); // Prevent form submission if inside a form\n if (valueInput.type === 'password') {\n valueInput.type = 'text';\n eyeIcon.classList.remove('bx-show');\n eyeIcon.classList.add('bx-hide');\n } else {\n valueInput.type = 'password';\n eyeIcon.classList.remove('bx-hide');\n eyeIcon.classList.add('bx-show');\n }\n });\n }\n\n div.querySelector('.remove-user-config-button').addEventListener('click', function() {\n this.closest('.user-config-row').remove();\n if (!userConfigurationsContainer.querySelector('.user-config-row')) { // Add placeholder if no rows exist after removal\n const p = document.createElement('p');\n p.className = 'text-gray-500 user-config-placeholder';\n p.textContent = 'No user configurations defined. Click \"Add User Configuration\" to add one.';\n userConfigurationsContainer.appendChild(p);\n }\n });\n }\n\n\n async function saveSettings(event) {\n event.preventDefault();\n setupButton.disabled = true;\n setupButton.innerHTML = `<i class='bx bx-loader-alt bx-spin mr-2'></i>Saving...`;\n\n const pythonEnvs = {};\n document.querySelectorAll('.python-env-row').forEach(row => {\n const serverInput = row.querySelector('.python-env-server');\n const pathInput = row.querySelector('.python-env-path');\n if (serverInput && pathInput && serverInput.value.trim()) {\n pythonEnvs[serverInput.value.trim()] = pathInput.value.trim();\n }\n });\n \n const userConfigs = {};\n document.querySelectorAll('.user-config-row').forEach(row => {\n const keyInput = row.querySelector('.user-config-key');\n const valueInput = row.querySelector('.user-config-value');\n if (keyInput && valueInput && keyInput.value.trim()) {\n userConfigs[keyInput.value.trim()] = valueInput.value.trim();\n }\n });\n\n const settingsData = {\n pythonEnvs: pythonEnvs,\n // Include pythonEnv for backward compatibility (use system value if available)\n pythonEnv: pythonEnvs['system'] || null,\n nodePath: nodePathInput.value.trim() || null,\n browserPath: browserPathInput.value.trim() || null,\n userConfigurations: userConfigs,\n };\n\n try {\n const response = await fetch('/api/settings', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(settingsData),\n });\n\n const apiResponse = await response.json();\n\n if (response.ok && apiResponse.success) {\n showToast('Settings saved successfully!', 'success');\n // Optionally, reload settings to reflect any backend-applied defaults\n await loadSettings();\n } else {\n throw new Error(apiResponse.error || `HTTP error! status: ${response.status}`);\n }\n } catch (error) {\n console.error('Error saving settings:', error);\n showToast(`Error saving settings: ${error.message}`, 'danger');\n } finally {\n setupButton.disabled = false;\n setupButton.innerHTML = `<i class='bx bx-save mr-2'></i>Save Settings`;\n }\n }\n\n cancelButton.addEventListener('click', () => {\n // Navigate back to index.html, preserving flight parameters\n window.location.href = buildUrlWithFlights('index.html');\n });\n\n addPythonEnvButton.addEventListener('click', () => renderPythonEnvInput());\n addUserConfigButton.addEventListener('click', () => renderUserConfigInput());\n\n settingsForm.addEventListener('submit', saveSettings);\n\n // Initial load\n loadSettings();\n\n // (Collapse/expand functionality removed as requested)\n});"],"mappings":"OAASA,wBAA2B,uBAGpC,SAASC,UAAUC,EAASC,EAAO,WAC/B,MAAMC,EAAiBC,SAASC,cAAc,oBAC9C,IAAKF,EAAgB,OAErB,MAAMG,EAAU,SAASC,KAAKC,QACxBC,EAAY,sBACHH,oDAAmE,YAATJ,EAAqB,UAAY,8KAGxFD,gNAMlBE,EAAeO,mBAAmB,YAAaD,GAC/C,MAAME,EAAeP,SAASQ,eAAeN,GAC/B,IAAIO,UAAUC,MAAMH,EAAc,CAAEI,MAAO,MACnDC,OACNL,EAAaM,iBAAiB,mBAAmB,KAC7CN,EAAaO,QAAQ,GAE7B,CAEAd,SAASa,iBAAiB,oBAAoB,KAE1C,MAAME,EAAef,SAASQ,eAAe,gBACvCQ,EAAgBhB,SAASQ,eAAe,YACxCS,EAAmBjB,SAASQ,eAAe,eAC3CU,EAAwBlB,SAASQ,eAAe,sBAGhDW,EAAsBnB,SAASQ,eAAe,uBAC9CY,EAAqBpB,SAASQ,eAAe,sBAC7Ca,EAAuBrB,SAASQ,eAAe,wBAG/Cc,EAA8BtB,SAASQ,eAAe,+BACtDe,EAAsBvB,SAASQ,eAAe,uBAC9CgB,EAAuBxB,SAASQ,eAAe,wBAE/CiB,EAAezB,SAASQ,eAAe,gBACvCkB,EAAc1B,SAASQ,eAAe,eAK5CmB,eAAeC,eACX,IACI,MAAMC,QAAiBC,MAAM,iBAC7B,IAAKD,EAASE,GAAI,CACd,MAAMC,QAAkBH,EAASI,OACjC,MAAM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ller.js';
|
|
2
|
-
/**
|
|
3
|
-
* Codex client installer implementation
|
|
4
|
-
* Handles installation of Codex client and settings configuration in TOML format
|
|
5
|
-
* Based on: https://github.com/openai/codex/blob/main/docs/config.md#mcp-integration
|
|
6
|
-
*/
|
|
7
|
-
export declare class CodexInstaller extends BaseClientInstaller {
|
|
8
|
-
protected readonly clientName: string;
|
|
9
|
-
/**
|
|
10
|
-
* Codex doesn't require VS Code or extension installation
|
|
11
|
-
* Override to skip VS Code checks
|
|
12
|
-
*/
|
|
13
|
-
protected checkVSCodeAndInstallExtension(operationId: string): Promise<any>;
|
|
14
|
-
/**
|
|
15
|
-
* Update Codex settings (not VS Code)
|
|
16
|
-
* Override to configure Codex config.toml instead of VS Code settings
|
|
17
|
-
*/
|
|
18
|
-
protected updateVSCodeSettings(serverName: string, installConfig: any): Promise<Array<{
|
|
19
|
-
success: boolean;
|
|
20
|
-
path: string;
|
|
21
|
-
error?: string;
|
|
22
|
-
}>>;
|
|
23
|
-
/**
|
|
24
|
-
* Initialize settings with Codex-specific structure
|
|
25
|
-
* Overrides base method to provide custom initialization
|
|
26
|
-
*/
|
|
27
|
-
protected initializeSettings(settings: any): void;
|
|
28
|
-
/**
|
|
29
|
-
* Handle stdio mode configuration for Codex
|
|
30
|
-
* Overrides base method to provide custom stdio configuration in TOML format
|
|
31
|
-
*/
|
|
32
|
-
protected handleStdioMode(settings: any, serverName: string, finalConfig: any): Promise<void>;
|
|
33
|
-
/**
|
|
34
|
-
* Handle SSE and Streamable-Http mode configuration for Codex
|
|
35
|
-
* Overrides base method to provide custom SSE or Streamable-Http configuration in TOML format
|
|
36
|
-
* Note: We don't call parent implementation as it uses JSON structure (mcpServers) instead of TOML (mcp_servers)
|
|
37
|
-
*/
|
|
38
|
-
protected handleSseAndStreamableMode(settings: any, serverName: string, installConfig: any): Promise<void>;
|
|
39
|
-
/**
|
|
40
|
-
* Set up Codex client settings
|
|
41
|
-
* Updates Codex config.toml with MCP server configuration
|
|
42
|
-
* Note: Codex uses TOML format instead of JSON
|
|
43
|
-
*/
|
|
44
|
-
setupClientSettings(settingPath: string, serverName: string, installConfig: any): Promise<void>;
|
|
45
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{BaseClientInstaller}from"./BaseClientInstaller.js";import{readTomlFile,writeTomlFile}from"../../../utils/tomlUtils.js";import{Logger}from"../../../utils/logger.js";import{SUPPORTED_CLIENTS}from"../../metadatas/constants.js";export class CodexInstaller extends BaseClientInstaller{clientName="Codex";async checkVSCodeAndInstallExtension(e){Logger.info("Codex is a standalone CLI tool, skipping VS Code check")}async updateVSCodeSettings(e,t){const s=[];try{const r=SUPPORTED_CLIENTS[this.clientName].codeSettingPath;await this.setupClientSettings(r,e,t),s.push({success:!0,path:r})}catch(e){s.push({success:!1,path:SUPPORTED_CLIENTS[this.clientName].codeSettingPath,error:e instanceof Error?e.message:String(e)})}return s}initializeSettings(e){e.mcp_servers||(e.mcp_servers={})}async handleStdioMode(e,t,s){s.args&&(s.args=s.args.map((e=>"string"==typeof e?e.replace(/\\/g,"/"):e)));const r={command:s.command};s.args&&s.args.length>0&&(r.args=s.args),s.env&&Object.keys(s.env).length>0&&(r.env=s.env),s.cwd&&(r.cwd=s.cwd),e.mcp_servers[t]=r}async handleSseAndStreamableMode(e,t,s){if(s.url){const r={url:s.url};s.bearerTokenEnvVar&&(r.bearer_token_env_var=s.bearerTokenEnvVar),s.httpHeaders&&Object.keys(s.httpHeaders).length>0&&(r.http_headers=s.httpHeaders),s.envHttpHeaders&&Object.keys(s.envHttpHeaders).length>0&&(r.env_http_headers=s.envHttpHeaders),e.mcp_servers[t]=r}}async setupClientSettings(e,t,s){try{const r=await readTomlFile(e,!0);this.initializeSettings(r),"stdio"===s.mode?await this.handleStdioMode(r,t,s):"sse"!==s.mode&&"streamable-http"!==s.mode||await this.handleSseAndStreamableMode(r,t,s),await writeTomlFile(e,r),Logger.info(`Successfully configured Codex MCP server: ${t}`)}catch(e){throw Logger.error(`Error setting up Codex client settings: ${e instanceof Error?e.message:String(e)}`),e}}}
|
|
2
|
-
//# sourceMappingURL=CodexInstaller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["BaseClientInstaller","readTomlFile","writeTomlFile","Logger","SUPPORTED_CLIENTS","CodexInstaller","clientName","checkVSCodeAndInstallExtension","operationId","info","updateVSCodeSettings","serverName","installConfig","results","settingPath","this","codeSettingPath","setupClientSettings","push","success","path","error","Error","message","String","initializeSettings","settings","mcp_servers","handleStdioMode","finalConfig","args","map","arg","replace","serverConfig","command","length","env","Object","keys","cwd","handleSseAndStreamableMode","url","bearerTokenEnvVar","bearer_token_env_var","httpHeaders","http_headers","envHttpHeaders","env_http_headers","mode"],"sources":["../../../../src/core/installers/clients/CodexInstaller.ts"],"mappings":"OAASA,wBAA2B,kCAC3BC,aAAcC,kBAAqB,qCACnCC,WAAc,kCACdC,sBAAyB,sCAO5B,MAAOC,uBAAuBL,oBACbM,WAAqB,QAM9B,oCAAAC,CAAqCC,GAE3CL,OAAOM,KAAK,yDAEhB,CAMU,0BAAAC,CAA2BC,EAAoBC,GACrD,MAAMC,EAAqE,GAE3E,IACI,MAAMC,EAAcV,kBAAkBW,KAAKT,YAAYU,sBACjDD,KAAKE,oBAAoBH,EAAaH,EAAYC,GACxDC,EAAQK,KAAK,CAAEC,WAAeC,KAAMN,GACxC,CAAE,MAAOO,GACLR,EAAQK,KAAK,CACTC,WACAC,KAAMhB,kBAAkBW,KAAKT,YAAYU,gBACzCK,MAAOA,aAAiBC,MAAQD,EAAME,QAAUC,OAAOH,IAE/D,CAEA,OAAOR,CACX,CAMU,kBAAAY,CAAmBC,GACpBA,EAASC,cACVD,EAASC,YAAc,GAE/B,CAMU,qBAAAC,CAAsBF,EAAef,EAAoBkB,GAE3DA,EAAYC,OACZD,EAAYC,KAAOD,EAAYC,KAAKC,KAAKC,GACtB,iBAARA,EAAmBA,EAAIC,QAAQ,MAAO,KAAOD,KAK5D,MAAME,EAAoB,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
|
|
6
|
-
* Read a TOML file and parse it
|
|
7
|
-
* @param filePath Path to the TOML file
|
|
8
|
-
* @param createIfNotExist Whether to create the file if it doesn't exist
|
|
9
|
-
* @returns Parsed TOML content as an object
|
|
10
|
-
*/
|
|
11
|
-
export declare function readTomlFile(filePath: string, createIfNotExist?: boolean): Promise<TomlData>;
|
|
12
|
-
/**
|
|
13
|
-
* Write an object to a TOML file
|
|
14
|
-
* @param filePath Path to the TOML file
|
|
15
|
-
* @param data Object to write
|
|
16
|
-
*/
|
|
17
|
-
export declare function writeTomlFile(filePath: string, data: TomlData): Promise<void>;
|
package/dist/utils/tomlUtils.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import*as TOML from"@iarna/toml";import{readFile,writeFile,mkdir}from"fs/promises";import{dirname}from"path";import{existsSync}from"fs";import{Logger}from"./logger.js";export async function readTomlFile(r,e=!1){try{if(!existsSync(r)){if(e)return Logger.info(`TOML file not found at ${r}, creating new one`),await mkdir(dirname(r),{recursive:!0}),await writeFile(r,"","utf8"),{};throw new Error(`TOML file not found: ${r}`)}const i=await readFile(r,"utf8");return i.trim()?TOML.parse(i):{}}catch(e){if(e instanceof Error&&e.message.includes("not found"))throw e;throw Logger.error(`Error reading TOML file ${r}: ${e instanceof Error?e.message:String(e)}`),e}}export async function writeTomlFile(r,e){try{await mkdir(dirname(r),{recursive:!0});const i=TOML.stringify(e);await writeFile(r,i,"utf8"),Logger.debug(`Successfully wrote TOML file: ${r}`)}catch(e){throw Logger.error(`Error writing TOML file ${r}: ${e instanceof Error?e.message:String(e)}`),e}}
|
|
2
|
-
//# sourceMappingURL=tomlUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["TOML","readFile","writeFile","mkdir","dirname","existsSync","Logger","async","readTomlFile","filePath","createIfNotExist","info","recursive","Error","content","trim","parse","error","message","includes","String","writeTomlFile","data","tomlString","stringify","debug"],"sources":["../../src/utils/tomlUtils.ts"],"mappings":"UAAYA,SAAU,qBACbC,SAAUC,UAAWC,UAAa,qBAClCC,YAAe,cACfC,eAAkB,YAClBC,WAAc,qBAahBC,eAAeC,aAAaC,EAAkBC,MACjD,IACI,IAAKL,WAAWI,GAAW,CACvB,GAAIC,EAIA,OAHAJ,OAAOK,KAAK,0BAA0BF,6BAChCN,MAAMC,QAAQK,GAAW,CAAEG,qBAC3BV,UAAUO,EAAU,GAAI,QACvB,GAEX,MAAM,IAAII,MAAM,wBAAwBJ,IAC5C,CAEA,MAAMK,QAAgBb,SAASQ,EAAU,QACzC,OAAKK,EAAQC,OAGNf,KAAKgB,MAAMF,GAFP,EAGf,CAAE,MAAOG,GACL,GAAIA,aAAiBJ,OAASI,EAAMC,QAAQC,SAAS,aACjD,MAAMF,EAGV,MADAX,OAAOW,MAAM,2BAA2BR,MAAaQ,aAAiBJ,MAAQI,EAAMC,QAAUE,OAAOH,MAC/FA,CACV,CACJ,QAOOV,eAAec,cAAcZ,EAAkBa,GAClD,UACUnB,MAAMC,QAAQK,GAAW,CAAEG,eACjC,MAAMW,EAAavB,KAAKwB,UAAUF,SAC5BpB,UAAUO,EAAUc,EAAY,QACtCjB,OAAOmB,MAAM,iCAAiChB,IAClD,CAAE,MAAOQ,GAEL,MADAX,OAAOW,MAAM,2BAA2BR,MAAaQ,aAAiBJ,MAAQI,EAAMC,QAAUE,OAAOH,MAC/FA,CACV,CACJ","ignoreList":[]}
|