imcp 0.0.19 → 0.1.2
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/.roo/rules-code/rules.md +88 -0
- package/dist/cli/index.js +1 -45
- package/dist/core/installers/clients/BaseClientInstaller.d.ts +1 -5
- package/dist/core/installers/clients/BaseClientInstaller.js +40 -38
- package/dist/core/installers/clients/ClientInstaller.d.ts +9 -9
- package/dist/core/installers/clients/ClientInstaller.js +105 -99
- package/dist/core/installers/requirements/BaseInstaller.d.ts +9 -1
- package/dist/core/installers/requirements/CommandInstaller.d.ts +9 -1
- package/dist/core/installers/requirements/CommandInstaller.js +46 -12
- package/dist/core/installers/requirements/GeneralInstaller.d.ts +11 -1
- package/dist/core/installers/requirements/GeneralInstaller.js +46 -10
- package/dist/core/installers/requirements/InstallerFactory.d.ts +3 -1
- package/dist/core/installers/requirements/InstallerFactory.js +3 -2
- package/dist/core/installers/requirements/NpmInstaller.d.ts +4 -2
- package/dist/core/installers/requirements/NpmInstaller.js +38 -22
- package/dist/core/installers/requirements/PipInstaller.d.ts +3 -1
- package/dist/core/installers/requirements/PipInstaller.js +58 -36
- package/dist/core/installers/requirements/RequirementInstaller.d.ts +4 -1
- package/dist/core/loaders/InstallOperationManager.d.ts +115 -0
- package/dist/core/loaders/InstallOperationManager.js +311 -0
- package/dist/core/loaders/SystemSettingsManager.d.ts +54 -0
- package/dist/core/loaders/SystemSettingsManager.js +257 -0
- package/dist/core/metadatas/constants.d.ts +7 -0
- package/dist/core/metadatas/constants.js +7 -0
- package/dist/core/metadatas/recordingConstants.d.ts +44 -0
- package/dist/core/metadatas/recordingConstants.js +45 -0
- package/dist/core/metadatas/types.d.ts +21 -0
- package/dist/core/onboard/FeedOnboardService.d.ts +7 -3
- package/dist/core/onboard/FeedOnboardService.js +52 -5
- package/dist/core/onboard/InstallOperationManager.d.ts +23 -0
- package/dist/core/onboard/InstallOperationManager.js +144 -0
- package/dist/core/onboard/OnboardStatusManager.js +2 -1
- package/dist/core/validators/StdioServerValidator.js +4 -3
- package/dist/services/InstallationService.d.ts +2 -37
- package/dist/services/InstallationService.js +45 -313
- package/dist/services/MCPManager.d.ts +1 -1
- package/dist/services/MCPManager.js +53 -47
- package/dist/services/RequirementService.d.ts +85 -12
- package/dist/services/RequirementService.js +488 -49
- package/dist/services/ServerService.d.ts +0 -6
- package/dist/services/ServerService.js +0 -74
- package/dist/services/TelemetryService.d.ts +15 -0
- package/dist/services/TelemetryService.js +54 -0
- package/dist/utils/adoUtils.js +6 -3
- package/dist/utils/githubAuth.js +65 -0
- package/dist/utils/logger.d.ts +16 -0
- package/dist/utils/logger.js +78 -1
- package/dist/utils/macroExpressionUtils.js +3 -25
- package/dist/utils/osUtils.d.ts +22 -1
- package/dist/utils/osUtils.js +92 -1
- package/dist/utils/versionUtils.d.ts +20 -0
- package/dist/utils/versionUtils.js +76 -0
- package/dist/web/public/css/modal.css +292 -1
- package/dist/web/public/css/serverCategoryList.css +120 -0
- package/dist/web/public/css/serverDetails.css +14 -1
- package/dist/web/public/index.html +126 -21
- package/dist/web/public/js/flights/flights.js +1 -1
- package/dist/web/public/js/modal/index.js +8 -14
- package/dist/web/public/js/modal/installModal.js +3 -4
- package/dist/web/public/js/modal/installation.js +122 -137
- package/dist/web/public/js/modal/loadingModal.js +155 -25
- package/dist/web/public/js/modal/messageQueue.js +45 -101
- package/dist/web/public/js/modal/modalSetup.js +125 -43
- package/dist/web/public/js/modal/modalUtils.js +0 -12
- package/dist/web/public/js/modal.js +23 -10
- package/dist/web/public/js/onboard/formProcessor.js +18 -11
- package/dist/web/public/js/onboard/publishHandler.js +35 -3
- package/dist/web/public/js/onboard/templates.js +5 -1
- package/dist/web/public/js/onboard/uiHandlers.js +266 -39
- package/dist/web/public/js/onboard/validationHandlers.js +71 -39
- package/dist/web/public/js/serverCategoryDetails.js +60 -11
- package/dist/web/public/js/serverCategoryList.js +93 -9
- package/dist/web/public/js/settings.js +314 -0
- package/dist/web/public/onboard.html +2 -2
- package/dist/web/public/settings.html +135 -0
- package/dist/web/public/styles.css +32 -0
- package/dist/web/server.js +93 -1
- package/{src/web/public/js/onboard → docs}/ONBOARDING_PAGE_DESIGN.md +15 -125
- package/docs/Telemetry.md +136 -0
- package/memory-bank/activeContext.md +26 -0
- package/memory-bank/decisionLog.md +91 -0
- package/memory-bank/productContext.md +41 -0
- package/memory-bank/progress.md +35 -0
- package/memory-bank/systemPatterns.md +10 -0
- package/package.json +2 -1
- package/src/cli/index.ts +1 -48
- package/src/core/installers/clients/BaseClientInstaller.ts +64 -50
- package/src/core/installers/clients/ClientInstaller.ts +130 -130
- package/src/core/installers/requirements/BaseInstaller.ts +9 -1
- package/src/core/installers/requirements/CommandInstaller.ts +47 -13
- package/src/core/installers/requirements/GeneralInstaller.ts +48 -10
- package/src/core/installers/requirements/InstallerFactory.ts +4 -3
- package/src/core/installers/requirements/NpmInstaller.ts +90 -68
- package/src/core/installers/requirements/PipInstaller.ts +81 -55
- package/src/core/installers/requirements/RequirementInstaller.ts +4 -3
- package/src/core/loaders/InstallOperationManager.ts +367 -0
- package/src/core/loaders/SystemSettingsManager.ts +278 -0
- package/src/core/metadatas/constants.ts +9 -0
- package/src/core/metadatas/recordingConstants.ts +62 -0
- package/src/core/metadatas/types.ts +23 -0
- package/src/core/onboard/FeedOnboardService.ts +59 -5
- package/src/core/onboard/OnboardStatusManager.ts +2 -1
- package/src/core/validators/StdioServerValidator.ts +4 -3
- package/src/services/InstallationService.ts +54 -399
- package/src/services/MCPManager.ts +61 -64
- package/src/services/RequirementService.ts +564 -67
- package/src/services/ServerService.ts +0 -90
- package/src/services/TelemetryService.ts +59 -0
- package/src/utils/adoUtils.ts +6 -4
- package/src/utils/githubAuth.ts +84 -1
- package/src/utils/logger.ts +83 -1
- package/src/utils/macroExpressionUtils.ts +4 -21
- package/src/utils/osUtils.ts +92 -1
- package/src/utils/versionUtils.ts +98 -13
- package/src/web/public/css/modal.css +292 -1
- package/src/web/public/css/serverCategoryList.css +120 -0
- package/src/web/public/css/serverDetails.css +14 -1
- package/src/web/public/index.html +126 -21
- package/src/web/public/js/flights/flights.js +1 -1
- package/src/web/public/js/modal/index.js +8 -14
- package/src/web/public/js/modal/installModal.js +3 -4
- package/src/web/public/js/modal/installation.js +122 -137
- package/src/web/public/js/modal/loadingModal.js +155 -25
- package/src/web/public/js/modal/modalSetup.js +125 -43
- package/src/web/public/js/modal/modalUtils.js +0 -12
- package/src/web/public/js/modal.js +23 -10
- package/src/web/public/js/onboard/formProcessor.js +18 -11
- package/src/web/public/js/onboard/publishHandler.js +35 -3
- package/src/web/public/js/onboard/templates.js +5 -1
- package/src/web/public/js/onboard/uiHandlers.js +266 -39
- package/src/web/public/js/onboard/validationHandlers.js +71 -39
- package/src/web/public/js/serverCategoryDetails.js +60 -11
- package/src/web/public/js/serverCategoryList.js +93 -9
- package/src/web/public/js/settings.js +314 -0
- package/src/web/public/onboard.html +2 -2
- package/src/web/public/settings.html +135 -0
- package/src/web/public/styles.css +32 -0
- package/src/web/server.ts +96 -1
- package/dist/cli/commands/start.d.ts +0 -2
- package/dist/cli/commands/start.js +0 -32
- package/dist/cli/commands/sync.d.ts +0 -2
- package/dist/cli/commands/sync.js +0 -17
- package/dist/core/ConfigurationLoader.d.ts +0 -32
- package/dist/core/ConfigurationLoader.js +0 -236
- package/dist/core/ConfigurationProvider.d.ts +0 -35
- package/dist/core/ConfigurationProvider.js +0 -375
- package/dist/core/InstallationService.d.ts +0 -50
- package/dist/core/InstallationService.js +0 -350
- package/dist/core/MCPManager.d.ts +0 -28
- package/dist/core/MCPManager.js +0 -188
- package/dist/core/RequirementService.d.ts +0 -40
- package/dist/core/RequirementService.js +0 -110
- package/dist/core/ServerSchemaLoader.d.ts +0 -11
- package/dist/core/ServerSchemaLoader.js +0 -43
- package/dist/core/ServerSchemaProvider.d.ts +0 -17
- package/dist/core/ServerSchemaProvider.js +0 -120
- package/dist/core/constants.d.ts +0 -47
- package/dist/core/constants.js +0 -94
- package/dist/core/installers/BaseInstaller.d.ts +0 -74
- package/dist/core/installers/BaseInstaller.js +0 -253
- package/dist/core/installers/ClientInstaller.d.ts +0 -23
- package/dist/core/installers/ClientInstaller.js +0 -564
- package/dist/core/installers/CommandInstaller.d.ts +0 -37
- package/dist/core/installers/CommandInstaller.js +0 -173
- package/dist/core/installers/GeneralInstaller.d.ts +0 -33
- package/dist/core/installers/GeneralInstaller.js +0 -85
- package/dist/core/installers/InstallerFactory.d.ts +0 -54
- package/dist/core/installers/InstallerFactory.js +0 -97
- package/dist/core/installers/NpmInstaller.d.ts +0 -26
- package/dist/core/installers/NpmInstaller.js +0 -127
- package/dist/core/installers/PipInstaller.d.ts +0 -28
- package/dist/core/installers/PipInstaller.js +0 -127
- package/dist/core/installers/RequirementInstaller.d.ts +0 -33
- package/dist/core/installers/RequirementInstaller.js +0 -3
- package/dist/core/types.d.ts +0 -166
- package/dist/core/types.js +0 -16
- package/dist/services/InstallRequestValidator.d.ts +0 -21
- package/dist/services/InstallRequestValidator.js +0 -99
- package/dist/web/public/js/modal/installHandler.js +0 -227
- package/dist/web/public/js/modal/loadingUI.js +0 -74
- package/dist/web/public/js/modal/modalUI.js +0 -214
- package/dist/web/public/js/modal/version.js +0 -20
- package/src/web/public/js/modal/messageQueue.js +0 -112
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Step name constants for InstallOperationManager and step recording.
|
|
3
|
+
*
|
|
4
|
+
* This file defines all static step names and documents dynamic step name patterns
|
|
5
|
+
* used throughout the installation and onboarding process.
|
|
6
|
+
*
|
|
7
|
+
* Dynamic step names are documented as template string patterns.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** Step for processing all requirement updates in a batch operation. */
|
|
11
|
+
export const STEP_PROCESS_REQUIREMENT_UPDATES = 'Processing all requirement updates';
|
|
12
|
+
|
|
13
|
+
/** Step for checking the status of a specific requirement. */
|
|
14
|
+
export const STEP_CHECKING_REQUIREMENT_STATUS = 'Checking the status of requirement';
|
|
15
|
+
|
|
16
|
+
/** Step for installing requirements in the background process. */
|
|
17
|
+
export const STEP_INSTALLING_REQUIREMENTS_IN_BACKGROUND = 'Installing requirements in the background';
|
|
18
|
+
|
|
19
|
+
/** Step for checking and installing all requirements as needed. */
|
|
20
|
+
export const STEP_CHECK_AND_INSTALL_REQUIREMENTS = 'Checking and installing all requirements';
|
|
21
|
+
|
|
22
|
+
/** Step for running the install logic in the CommandInstaller. */
|
|
23
|
+
export const STEP_COMMAND_INSTALLER_INSTALL = 'Running install in CommandInstaller';
|
|
24
|
+
|
|
25
|
+
/** Step for running the install logic in the GeneralInstaller. */
|
|
26
|
+
export const STEP_GENERAL_INSTALLER_INSTALL = 'Running install in GeneralInstaller';
|
|
27
|
+
|
|
28
|
+
/** Step for executing the actual installation command (npm, pip, etc.). */
|
|
29
|
+
export const STEP_INSTALLATION_COMMAND_EXECUTION = 'Executing installation command for requirement';
|
|
30
|
+
|
|
31
|
+
/** Step for running the install logic in the PipInstaller. */
|
|
32
|
+
export const STEP_PIP_INSTALLER_INSTALL = 'Running install in PipInstaller';
|
|
33
|
+
|
|
34
|
+
/** Step for processing requirement updates in the RequirementService. */
|
|
35
|
+
export const STEP_PROCESS_REQUIREMENT_UPDATES_SERVICE = 'Processing requirement updates in RequirementService';
|
|
36
|
+
|
|
37
|
+
/** Step for checking if the server is ready after installation. */
|
|
38
|
+
export const STEP_CHECK_SERVER_READINESS = 'Checking server readiness after installation';
|
|
39
|
+
|
|
40
|
+
/** Step for running the install logic in the NpmInstaller. */
|
|
41
|
+
export const STEP_NPM_INSTALLER_INSTALL = 'Running install in NpmInstaller';
|
|
42
|
+
|
|
43
|
+
/** Prefix for steps that update a specific requirement. */
|
|
44
|
+
export const STEP_INSTALL_REQUIREMENT_PREFIX = 'Updating requirement:';
|
|
45
|
+
|
|
46
|
+
/** Prefix for steps that execute an installation command for a requirement. */
|
|
47
|
+
export const STEP_INSTALL_COMMAND_PREFIX = 'Executing installation command for:';
|
|
48
|
+
|
|
49
|
+
/** Step for checking and installing the VS Code extension for the client. */
|
|
50
|
+
export const STEP_CHECK_VSCODE_AND_INSTALL_EXTENSION = 'Checking and installing VS Code extension for client';
|
|
51
|
+
|
|
52
|
+
/** Step for setting up the installation configuration (env, args, etc.). */
|
|
53
|
+
export const STEP_SETUP_INSTALLATION_CONFIG = 'Setting up installation configuration';
|
|
54
|
+
|
|
55
|
+
/** Step for updating VS Code settings for the client/server. */
|
|
56
|
+
export const STEP_UPDATE_VSCODE_SETTINGS = 'Updating VS Code settings for client/server';
|
|
57
|
+
|
|
58
|
+
/** Step for the overall installation process of a client or server. */
|
|
59
|
+
export const STEP_INSTALLATION = 'Running overall installation process';
|
|
60
|
+
|
|
61
|
+
/** Step for marking the initiation of an onboarding or installation process. */
|
|
62
|
+
export const STEP_INITIATED = 'Initiating onboarding or installation process';
|
|
@@ -176,4 +176,27 @@ export interface MCPEventData {
|
|
|
176
176
|
[MCPEvent.SERVER_STARTED]: { server: MCPServerCategory };
|
|
177
177
|
[MCPEvent.SERVER_STOPPED]: { serverName: string };
|
|
178
178
|
[MCPEvent.CONFIG_CHANGED]: { configuration: MCPConfiguration };
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface InstallOperationStep {
|
|
182
|
+
name: string;
|
|
183
|
+
status: 'pending' | 'in-progress' | 'completed' | 'failed' | 'canceled';
|
|
184
|
+
message?: string;
|
|
185
|
+
isCritical?: boolean;
|
|
186
|
+
timestamp: string;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface InstallOperationDetails {
|
|
190
|
+
currentStep: string;
|
|
191
|
+
steps: InstallOperationStep[];
|
|
192
|
+
lastUpdated: string;
|
|
193
|
+
error?: string;
|
|
194
|
+
overallStatus: 'pending' | 'in-progress' | 'completed' | 'failed';
|
|
195
|
+
}
|
|
196
|
+
export interface SystemSettings {
|
|
197
|
+
pythonEnvs?: Record<string, string>;
|
|
198
|
+
nodePath?: string;
|
|
199
|
+
browserPath?: string;
|
|
200
|
+
systemEnvironments?: Record<string, string>;
|
|
201
|
+
userConfigurations?: Record<string, string>;
|
|
179
202
|
}
|
|
@@ -2,7 +2,7 @@ import { FeedConfiguration, McpConfig } from '../metadatas/types.js';
|
|
|
2
2
|
import { configProvider } from '../loaders/ConfigurationProvider.js';
|
|
3
3
|
import { ServerSchemaProvider } from '../loaders/ServerSchemaProvider.js';
|
|
4
4
|
import { feedValidator } from '../validators/FeedValidator.js';
|
|
5
|
-
import { Logger } from '../../utils/logger.js';
|
|
5
|
+
import { Logger, EventType, EventStatus } from '../../utils/logger.js';
|
|
6
6
|
import { OnboardingProcessStatus, OperationStatus, OperationType, ValidationOperationResult } from './OnboardStatus.js';
|
|
7
7
|
import { onboardStatusManager } from './OnboardStatusManager.js';
|
|
8
8
|
import { onboardProcessor } from './OnboardProcessor.js';
|
|
@@ -28,8 +28,10 @@ export class FeedOnboardService {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* Onboard a new feed configuration
|
|
31
|
+
* Onboard a new feed configuration. This method performs validation and initiates the onboarding process.
|
|
32
32
|
* @param config Feed configuration to onboard
|
|
33
|
+
* @param forExistingCategory Whether this onboarding is for an existing category
|
|
34
|
+
* @returns Promise resolving to operation status with optional feed configuration
|
|
33
35
|
*/
|
|
34
36
|
public async onboardFeed(config: FeedConfiguration, forExistingCategory?: boolean): Promise<OperationStatus & { feedConfiguration?: FeedConfiguration }> {
|
|
35
37
|
// Perform static validation first
|
|
@@ -47,10 +49,21 @@ export class FeedOnboardService {
|
|
|
47
49
|
// For now, let's return a FAILED status for the attempted FULL_ONBOARDING initiation.
|
|
48
50
|
// A more robust solution might involve a different return type or error code.
|
|
49
51
|
const onboardingId = this.createOperationId(config.name, 'FULL_ONBOARDING'); // Hypothetical ID
|
|
52
|
+
const errorMessage = `No prior successful validation found for feed: ${config.name}. Please validate the configuration before publishing.`;
|
|
53
|
+
|
|
54
|
+
// Track failed event
|
|
55
|
+
Logger.trackEvent(EventType.FEED_ONBOARD, {
|
|
56
|
+
status: EventStatus.FAILED,
|
|
57
|
+
feedName: config.name,
|
|
58
|
+
errorMessage,
|
|
59
|
+
onboardingId: onboardingId,
|
|
60
|
+
feedConfiguration: config
|
|
61
|
+
});
|
|
62
|
+
|
|
50
63
|
return {
|
|
51
64
|
onboardingId: onboardingId,
|
|
52
65
|
status: OnboardingProcessStatus.FAILED, // Or a new status like 'VALIDATION_REQUIRED'
|
|
53
|
-
message:
|
|
66
|
+
message: errorMessage,
|
|
54
67
|
lastQueried: new Date().toISOString(),
|
|
55
68
|
feedConfiguration: config
|
|
56
69
|
};
|
|
@@ -60,6 +73,7 @@ export class FeedOnboardService {
|
|
|
60
73
|
// If validation exists and matches, proceed to initiate FULL_ONBOARDING.
|
|
61
74
|
// _initiateOperation will handle checks for existing non-completed or successfully completed FULL_ONBOARDING operations.
|
|
62
75
|
const operationStatus = await this._initiateOperation(config, 'FULL_ONBOARDING', serverList, forExistingCategory);
|
|
76
|
+
|
|
63
77
|
return {
|
|
64
78
|
...operationStatus,
|
|
65
79
|
feedConfiguration: config
|
|
@@ -67,9 +81,11 @@ export class FeedOnboardService {
|
|
|
67
81
|
}
|
|
68
82
|
|
|
69
83
|
/**
|
|
70
|
-
* Validate a feed configuration without performing full onboarding
|
|
84
|
+
* Validate a feed configuration without performing full onboarding.
|
|
85
|
+
* This method performs static validation and initiates the validation process.
|
|
71
86
|
* @param config Feed configuration to validate
|
|
72
|
-
* @
|
|
87
|
+
* @param forExistingCategory Whether this validation is for an existing category
|
|
88
|
+
* @returns Promise resolving to operation status with optional feed configuration
|
|
73
89
|
*/
|
|
74
90
|
public async validateFeed(config: FeedConfiguration, forExistingCategory?: boolean): Promise<OperationStatus & { feedConfiguration?: FeedConfiguration }> {
|
|
75
91
|
// Perform static validation first
|
|
@@ -365,9 +381,29 @@ export class FeedOnboardService {
|
|
|
365
381
|
validationStatus: result.validationStatus // Ensure validationStatus is also updated on success
|
|
366
382
|
});
|
|
367
383
|
Logger.log(`[${onboardingId}] Successfully validated feed: ${config.name}`);
|
|
384
|
+
|
|
385
|
+
// Track successful validation
|
|
386
|
+
Logger.trackEvent(EventType.FEED_VALIDATE, {
|
|
387
|
+
status: EventStatus.SUCCESS,
|
|
388
|
+
feedName: config.name,
|
|
389
|
+
operationType: 'VALIDATION_ONLY',
|
|
390
|
+
onboardingId: onboardingId,
|
|
391
|
+
feedConfiguration: config
|
|
392
|
+
});
|
|
368
393
|
} catch (error) {
|
|
394
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
369
395
|
// Error is already logged and status updated by _validateFeedConfiguration or its callers
|
|
370
396
|
Logger.error(`[${onboardingId}] Feed validation process failed for ${config.name} (already handled):`, error);
|
|
397
|
+
|
|
398
|
+
// Track validation failure
|
|
399
|
+
Logger.trackEvent(EventType.FEED_VALIDATE, {
|
|
400
|
+
status: EventStatus.FAILED,
|
|
401
|
+
feedName: config.name,
|
|
402
|
+
operationType: 'VALIDATION_ONLY',
|
|
403
|
+
errorMessage: errorMessage,
|
|
404
|
+
onboardingId: onboardingId,
|
|
405
|
+
feedConfiguration: config
|
|
406
|
+
});
|
|
371
407
|
}
|
|
372
408
|
}
|
|
373
409
|
|
|
@@ -428,6 +464,15 @@ export class FeedOnboardService {
|
|
|
428
464
|
Logger.log(`[${onboardingId}] ConfigurationProvider re-initialized.`);
|
|
429
465
|
|
|
430
466
|
Logger.log(`[${onboardingId}] Successfully completed full onboarding for feed: ${config.name}`);
|
|
467
|
+
|
|
468
|
+
// Track successful onboarding
|
|
469
|
+
Logger.trackEvent(EventType.FEED_ONBOARD, {
|
|
470
|
+
status: EventStatus.SUCCESS,
|
|
471
|
+
feedName: config.name,
|
|
472
|
+
onboardingId: onboardingId,
|
|
473
|
+
prUrl: prInfo.url,
|
|
474
|
+
feedConfiguration: config
|
|
475
|
+
});
|
|
431
476
|
} catch (reinitError) {
|
|
432
477
|
Logger.warn(`[${onboardingId}] Failed to re-initialize providers after PR creation for feed ${config.name}:`);
|
|
433
478
|
Logger.warn(`Skipping re-initialization of providers due to error: ${reinitError}`,);
|
|
@@ -437,6 +482,15 @@ export class FeedOnboardService {
|
|
|
437
482
|
Logger.error(`[${onboardingId}] Full feed onboarding process failed:`, error);
|
|
438
483
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
439
484
|
|
|
485
|
+
// Track onboarding failure
|
|
486
|
+
Logger.trackEvent(EventType.FEED_ONBOARD, {
|
|
487
|
+
status: EventStatus.FAILED,
|
|
488
|
+
feedName: config.name,
|
|
489
|
+
onboardingId: onboardingId,
|
|
490
|
+
errorMessage,
|
|
491
|
+
feedConfiguration: config
|
|
492
|
+
});
|
|
493
|
+
|
|
440
494
|
// Check if status is already FAILED (e.g., by _validateFeedConfiguration)
|
|
441
495
|
// to avoid overwriting a more specific error message or step from validation.
|
|
442
496
|
const currentStatus = await onboardStatusManager.getStatus(config.name, operationType);
|
|
@@ -5,6 +5,7 @@ import { FeedConfiguration, McpConfig } from '../metadatas/types.js';
|
|
|
5
5
|
import { OnboardStatus, OnboardingProcessStatus, OperationType } from './OnboardStatus.js';
|
|
6
6
|
import { Logger } from '../../utils/logger.js';
|
|
7
7
|
|
|
8
|
+
import * as RecordingConstants from '../metadatas/recordingConstants.js';
|
|
8
9
|
const ONBOARD_STATUS_DIR = path.join(SETTINGS_DIR, 'onboard');
|
|
9
10
|
const CATEGORY_OPERATIONS_STATUS_FILE = path.join(ONBOARD_STATUS_DIR, 'OnboardStatus.json');
|
|
10
11
|
const FEED_CONFIG_DIR = path.join(ONBOARD_STATUS_DIR, 'feed_configs'); // Staging for feed configs during operation
|
|
@@ -306,7 +307,7 @@ export class OnboardStatusManager {
|
|
|
306
307
|
feedName: categoryName,
|
|
307
308
|
serverName,
|
|
308
309
|
status: OnboardingProcessStatus.PENDING,
|
|
309
|
-
steps: [{ stepName:
|
|
310
|
+
steps: [{ stepName: RecordingConstants.STEP_INITIATED, timestamp: new Date().toISOString() }],
|
|
310
311
|
lastUpdated: new Date().toISOString(),
|
|
311
312
|
operationType,
|
|
312
313
|
errorMessage: undefined,
|
|
@@ -8,6 +8,7 @@ import { MACRO_EXPRESSIONS, resolveNpmModulePath } from "../../utils/macroExpres
|
|
|
8
8
|
import { getSystemPythonPackageDirectory } from "../../utils/osUtils.js";
|
|
9
9
|
import { SETTINGS_DIR } from "../metadatas/constants.js";
|
|
10
10
|
import path from "path";
|
|
11
|
+
import { InstallOperationManager } from "../loaders/InstallOperationManager.js";
|
|
11
12
|
|
|
12
13
|
const execPromise = util.promisify(exec);
|
|
13
14
|
|
|
@@ -57,7 +58,7 @@ export class StdioServerValidator implements IServerValidator {
|
|
|
57
58
|
* @param requirement The requirement config to validate and install
|
|
58
59
|
* @returns true if requirement is successfully installed/validated
|
|
59
60
|
*/
|
|
60
|
-
private async validateRequirement(requirement: RequirementConfig): Promise<boolean> {
|
|
61
|
+
private async validateRequirement(requirement: RequirementConfig, recorder: InstallOperationManager): Promise<boolean> {
|
|
61
62
|
try {
|
|
62
63
|
Logger.debug(`Validating/installing requirement: ${requirement.name}`);
|
|
63
64
|
const installer = this.installerFactory.getInstaller(requirement);
|
|
@@ -69,7 +70,7 @@ export class StdioServerValidator implements IServerValidator {
|
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
const targetDir = this._getRequirementFolderPath(requirement);
|
|
72
|
-
const status = await installer.install(requirement, { settings: { folderName: targetDir } });
|
|
73
|
+
const status = await installer.install(requirement, recorder, { settings: { folderName: targetDir } });
|
|
73
74
|
if (!status.installed) {
|
|
74
75
|
const msg = `Failed to install requirement ${requirement.name}: ${status.error || 'Unknown error'}`;
|
|
75
76
|
Logger.error(msg);
|
|
@@ -288,7 +289,7 @@ export class StdioServerValidator implements IServerValidator {
|
|
|
288
289
|
type: 'npm' // Default to npm if not specified
|
|
289
290
|
};
|
|
290
291
|
|
|
291
|
-
const isValid = await this.validateRequirement(reqConfig);
|
|
292
|
+
const isValid = await this.validateRequirement(reqConfig, InstallOperationManager.getInstance(config.name, server.name));
|
|
292
293
|
if (!isValid) {
|
|
293
294
|
throw new Error(`Dependency validation failed for: ${req.name}`);
|
|
294
295
|
}
|