imcp 0.0.16 → 0.0.18
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/dist/cli/commands/install.js +2 -2
- package/dist/cli/commands/list.js +2 -2
- package/dist/cli/commands/serve.js +3 -2
- package/dist/core/RequirementService.d.ts +0 -12
- package/dist/core/RequirementService.js +0 -24
- package/dist/core/installers/clients/BaseClientInstaller.d.ts +26 -3
- package/dist/core/installers/clients/BaseClientInstaller.js +121 -0
- package/dist/core/installers/clients/ClientInstaller.d.ts +1 -1
- package/dist/core/installers/clients/ClientInstaller.js +1 -1
- package/dist/core/installers/clients/ClientInstallerFactory.js +1 -1
- package/dist/core/installers/clients/ClineInstaller.d.ts +1 -6
- package/dist/core/installers/clients/ClineInstaller.js +1 -94
- package/dist/core/installers/clients/ExtensionInstaller.js +1 -1
- package/dist/core/installers/clients/GithubCopilotInstaller.d.ts +1 -6
- package/dist/core/installers/clients/GithubCopilotInstaller.js +1 -94
- package/dist/core/installers/clients/MSRooCodeInstaller.d.ts +1 -5
- package/dist/core/installers/clients/MSRooCodeInstaller.js +1 -94
- package/dist/core/installers/requirements/BaseInstaller.d.ts +1 -1
- package/dist/core/installers/requirements/BaseInstaller.js +1 -1
- package/dist/core/installers/requirements/CommandInstaller.d.ts +1 -1
- package/dist/core/installers/requirements/CommandInstaller.js +1 -1
- package/dist/core/installers/requirements/GeneralInstaller.d.ts +1 -1
- package/dist/core/installers/requirements/InstallerFactory.d.ts +1 -1
- package/dist/core/installers/requirements/NpmInstaller.d.ts +1 -1
- package/dist/core/installers/requirements/NpmInstaller.js +1 -1
- package/dist/core/installers/requirements/PipInstaller.d.ts +1 -1
- package/dist/core/installers/requirements/RequirementInstaller.d.ts +1 -1
- package/dist/core/loaders/ConfigurationLoader.d.ts +35 -0
- package/dist/core/loaders/ConfigurationLoader.js +257 -0
- package/dist/core/loaders/ConfigurationProvider.d.ts +38 -0
- package/dist/core/loaders/ConfigurationProvider.js +384 -0
- package/dist/core/loaders/ServerSchemaLoader.d.ts +22 -0
- package/dist/core/loaders/ServerSchemaLoader.js +109 -0
- package/dist/core/loaders/ServerSchemaProvider.d.ts +14 -0
- package/dist/core/loaders/ServerSchemaProvider.js +90 -0
- package/dist/core/metadatas/constants.d.ts +47 -0
- package/dist/core/metadatas/constants.js +94 -0
- package/dist/core/metadatas/types.d.ts +167 -0
- package/dist/core/metadatas/types.js +16 -0
- package/dist/core/onboard/FeedOnboardService.d.ts +15 -8
- package/dist/core/onboard/FeedOnboardService.js +215 -130
- package/dist/core/onboard/OnboardProcessor.d.ts +8 -2
- package/dist/core/onboard/OnboardProcessor.js +53 -9
- package/dist/core/onboard/OnboardStatus.d.ts +7 -2
- package/dist/core/onboard/OnboardStatusManager.d.ts +71 -25
- package/dist/core/onboard/OnboardStatusManager.js +231 -47
- package/dist/core/validators/FeedValidator.d.ts +8 -3
- package/dist/core/validators/FeedValidator.js +61 -7
- package/dist/core/validators/IServerValidator.d.ts +1 -1
- package/dist/core/validators/SSEServerValidator.d.ts +1 -1
- package/dist/core/validators/ServerValidatorFactory.d.ts +1 -1
- package/dist/core/validators/StdioServerValidator.d.ts +1 -1
- package/dist/core/validators/StdioServerValidator.js +85 -33
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/services/InstallationService.d.ts +50 -0
- package/dist/services/InstallationService.js +350 -0
- package/dist/services/MCPManager.d.ts +29 -0
- package/dist/services/MCPManager.js +192 -0
- package/dist/services/RequirementService.d.ts +40 -0
- package/dist/services/RequirementService.js +110 -0
- package/dist/services/ServerService.d.ts +2 -2
- package/dist/services/ServerService.js +6 -6
- package/dist/utils/adoUtils.d.ts +2 -2
- package/dist/utils/adoUtils.js +1 -1
- package/dist/utils/feedUtils.js +1 -1
- package/dist/utils/githubUtils.d.ts +1 -1
- package/dist/utils/githubUtils.js +1 -1
- package/dist/utils/logger.d.ts +2 -0
- package/dist/utils/logger.js +11 -1
- package/dist/utils/macroExpressionUtils.d.ts +1 -1
- package/dist/utils/osUtils.d.ts +1 -1
- package/dist/utils/osUtils.js +1 -1
- package/dist/web/contract/serverContract.d.ts +1 -1
- package/dist/web/public/index.html +1 -3
- package/dist/web/public/js/api.js +2 -80
- package/dist/web/public/js/modal/installation.js +1 -1
- package/dist/web/public/js/onboard/ONBOARDING_PAGE_DESIGN.md +41 -9
- package/dist/web/public/js/onboard/formProcessor.js +200 -34
- package/dist/web/public/js/onboard/index.js +2 -2
- package/dist/web/public/js/onboard/publishHandler.js +30 -22
- package/dist/web/public/js/onboard/templates.js +34 -40
- package/dist/web/public/js/onboard/uiHandlers.js +175 -84
- package/dist/web/public/js/onboard/validationHandlers.js +147 -64
- package/dist/web/public/js/serverCategoryDetails.js +19 -4
- package/dist/web/public/js/serverCategoryList.js +13 -1
- package/dist/web/public/onboard.html +1 -1
- package/dist/web/server.js +21 -8
- package/package.json +1 -1
- package/src/cli/commands/install.ts +3 -3
- package/src/cli/commands/list.ts +2 -2
- package/src/cli/commands/serve.ts +3 -2
- package/src/cli/index.ts +1 -1
- package/src/core/installers/clients/BaseClientInstaller.ts +134 -3
- package/src/core/installers/clients/ClientInstaller.ts +3 -3
- package/src/core/installers/clients/ClientInstallerFactory.ts +1 -1
- package/src/core/installers/clients/ClineInstaller.ts +1 -101
- package/src/core/installers/clients/ExtensionInstaller.ts +1 -1
- package/src/core/installers/clients/GithubCopilotInstaller.ts +1 -101
- package/src/core/installers/clients/MSRooCodeInstaller.ts +1 -102
- package/src/core/installers/requirements/BaseInstaller.ts +2 -2
- package/src/core/installers/requirements/CommandInstaller.ts +1 -1
- package/src/core/installers/requirements/GeneralInstaller.ts +1 -1
- package/src/core/installers/requirements/InstallerFactory.ts +1 -1
- package/src/core/installers/requirements/NpmInstaller.ts +12 -12
- package/src/core/installers/requirements/PipInstaller.ts +1 -1
- package/src/core/installers/requirements/RequirementInstaller.ts +1 -1
- package/src/core/{ConfigurationLoader.ts → loaders/ConfigurationLoader.ts} +31 -7
- package/src/core/{ConfigurationProvider.ts → loaders/ConfigurationProvider.ts} +18 -10
- package/src/core/loaders/ServerSchemaLoader.ts +117 -0
- package/src/core/loaders/ServerSchemaProvider.ts +99 -0
- package/src/core/{types.ts → metadatas/types.ts} +3 -2
- package/src/core/onboard/FeedOnboardService.ts +270 -146
- package/src/core/onboard/OnboardProcessor.ts +60 -11
- package/src/core/onboard/OnboardStatus.ts +7 -2
- package/src/core/onboard/OnboardStatusManager.ts +270 -43
- package/src/core/validators/FeedValidator.ts +65 -9
- package/src/core/validators/IServerValidator.ts +1 -1
- package/src/core/validators/SSEServerValidator.ts +2 -2
- package/src/core/validators/ServerValidatorFactory.ts +1 -1
- package/src/core/validators/StdioServerValidator.ts +86 -34
- package/src/index.ts +3 -3
- package/src/{core → services}/InstallationService.ts +5 -5
- package/src/{core → services}/MCPManager.ts +10 -5
- package/src/{core → services}/RequirementService.ts +2 -31
- package/src/services/ServerService.ts +7 -7
- package/src/utils/adoUtils.ts +3 -3
- package/src/utils/feedUtils.ts +2 -2
- package/src/utils/githubUtils.ts +2 -2
- package/src/utils/logger.ts +13 -1
- package/src/utils/macroExpressionUtils.ts +1 -1
- package/src/utils/osUtils.ts +4 -4
- package/src/web/contract/serverContract.ts +2 -2
- package/src/web/public/index.html +1 -3
- package/src/web/public/js/api.js +2 -80
- package/src/web/public/js/modal/installation.js +1 -1
- package/src/web/public/js/onboard/ONBOARDING_PAGE_DESIGN.md +41 -9
- package/src/web/public/js/onboard/formProcessor.js +200 -34
- package/src/web/public/js/onboard/index.js +2 -2
- package/src/web/public/js/onboard/publishHandler.js +30 -22
- package/src/web/public/js/onboard/templates.js +34 -40
- package/src/web/public/js/onboard/uiHandlers.js +175 -84
- package/src/web/public/js/onboard/validationHandlers.js +147 -64
- package/src/web/public/js/serverCategoryDetails.js +19 -4
- package/src/web/public/js/serverCategoryList.js +13 -1
- package/src/web/public/onboard.html +1 -1
- package/src/web/server.ts +30 -14
- package/src/core/ServerSchemaLoader.ts +0 -48
- package/src/core/ServerSchemaProvider.ts +0 -137
- package/src/services/InstallRequestValidator.ts +0 -112
- /package/src/core/{constants.ts → metadatas/constants.ts} +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import os from 'os';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
/**
|
|
4
|
+
* Defines constants used across the application.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* GitHub repository configuration for feeds
|
|
8
|
+
*/
|
|
9
|
+
export const GITHUB_REPO = {
|
|
10
|
+
url: 'https://github.com/ai-microsoft/imcp-feed.git',
|
|
11
|
+
repoName: 'ai-microsoft/imcp-feed',
|
|
12
|
+
feedsPath: 'feeds',
|
|
13
|
+
feedAssetsName: 'imcp-feeds-${latest}.zip',
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Local settings directory path based on OS
|
|
17
|
+
*/
|
|
18
|
+
export const SETTINGS_DIR = (() => {
|
|
19
|
+
switch (process.platform) {
|
|
20
|
+
case 'win32':
|
|
21
|
+
return path.join(os.homedir(), '.imcp');
|
|
22
|
+
default: // linux, darwin (macOS), etc.
|
|
23
|
+
return path.join(os.homedir(), '.imcp');
|
|
24
|
+
}
|
|
25
|
+
})();
|
|
26
|
+
/**
|
|
27
|
+
* Local feeds directory path
|
|
28
|
+
*/
|
|
29
|
+
export const LOCAL_FEEDS_DIR = path.join(SETTINGS_DIR, 'feeds');
|
|
30
|
+
export const LOCAL_FEEDS_SCHEMA_DIR = path.join(LOCAL_FEEDS_DIR, 'schemas');
|
|
31
|
+
const CODE_STRORAGE_DIR = (() => {
|
|
32
|
+
switch (process.platform) {
|
|
33
|
+
case 'win32':
|
|
34
|
+
return path.join(os.homedir(), 'AppData', 'Roaming', 'Code', 'User');
|
|
35
|
+
case 'darwin': // macOS
|
|
36
|
+
return path.join(os.homedir(), 'Library', 'Application Support', 'Code', 'User');
|
|
37
|
+
default: // linux
|
|
38
|
+
return path.join(os.homedir(), '.config', 'Code', 'User');
|
|
39
|
+
}
|
|
40
|
+
})();
|
|
41
|
+
const CODE_INSIDER_STRORAGE_DIR = (() => {
|
|
42
|
+
switch (process.platform) {
|
|
43
|
+
case 'win32':
|
|
44
|
+
return path.join(os.homedir(), 'AppData', 'Roaming', 'Code - Insiders', 'User');
|
|
45
|
+
case 'darwin': // macOS
|
|
46
|
+
return path.join(os.homedir(), 'Library', 'Application Support', 'Code - Insiders', 'User');
|
|
47
|
+
default: // linux
|
|
48
|
+
return path.join(os.homedir(), '.config', 'Code - Insiders', 'User');
|
|
49
|
+
}
|
|
50
|
+
})();
|
|
51
|
+
/**
|
|
52
|
+
* Supported client configurations.
|
|
53
|
+
* Key: Client name (e.g., 'vscode')
|
|
54
|
+
* Value: Client-specific settings or configuration details.
|
|
55
|
+
* TODO: Define actual client settings structure.
|
|
56
|
+
*/
|
|
57
|
+
export const SUPPORTED_CLIENTS = {
|
|
58
|
+
'MSRooCode': {
|
|
59
|
+
extension: {
|
|
60
|
+
extensionId: 'microsoftai.ms-roo-cline',
|
|
61
|
+
leastVersion: '0.0.8',
|
|
62
|
+
repository: 'ai-microsoft/roo-cline',
|
|
63
|
+
assetName: 'ms-roo-cline-${version}.vsix',
|
|
64
|
+
private: true
|
|
65
|
+
},
|
|
66
|
+
codeSettingPath: path.join(CODE_STRORAGE_DIR, 'globalStorage', 'microsoftai.ms-roo-cline', 'settings', 'cline_mcp_settings.json'),
|
|
67
|
+
codeInsiderSettingPath: path.join(CODE_INSIDER_STRORAGE_DIR, 'globalStorage', 'microsoftai.ms-roo-cline', 'settings', 'cline_mcp_settings.json'),
|
|
68
|
+
},
|
|
69
|
+
'Cline': {
|
|
70
|
+
extension: {
|
|
71
|
+
extensionId: 'saoudrizwan.claude-dev',
|
|
72
|
+
},
|
|
73
|
+
codeSettingPath: path.join(CODE_STRORAGE_DIR, 'globalStorage', 'saoudrizwan.claude-dev', 'settings', 'cline_mcp_settings.json'),
|
|
74
|
+
codeInsiderSettingPath: path.join(CODE_INSIDER_STRORAGE_DIR, 'globalStorage', 'saoudrizwan.claude-dev', 'settings', 'cline_mcp_settings.json'),
|
|
75
|
+
},
|
|
76
|
+
'GithubCopilot': {
|
|
77
|
+
extension: {
|
|
78
|
+
extensionId: 'github.copilot',
|
|
79
|
+
},
|
|
80
|
+
codeSettingPath: path.join(CODE_STRORAGE_DIR, 'settings.json'),
|
|
81
|
+
codeInsiderSettingPath: path.join(CODE_INSIDER_STRORAGE_DIR, 'settings.json'),
|
|
82
|
+
},
|
|
83
|
+
// Add other supported clients here
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* List of supported client names.
|
|
87
|
+
*/
|
|
88
|
+
export const SUPPORTED_CLIENT_NAMES = Object.keys(SUPPORTED_CLIENTS);
|
|
89
|
+
/**
|
|
90
|
+
* Minimum time between requirement update checks (in milliseconds)
|
|
91
|
+
* 10 minutes = 10 * 60 * 1000 = 600000 ms
|
|
92
|
+
*/
|
|
93
|
+
export const UPDATE_CHECK_INTERVAL_MS = 10 * 60 * 1000; // 10 minutes
|
|
94
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
export declare enum OSType {
|
|
2
|
+
Windows = "windows",
|
|
3
|
+
MacOS = "macos",
|
|
4
|
+
Linux = "linux"
|
|
5
|
+
}
|
|
6
|
+
export interface RequirementStatus {
|
|
7
|
+
name: string;
|
|
8
|
+
type: string;
|
|
9
|
+
installed: boolean;
|
|
10
|
+
inProgress?: boolean;
|
|
11
|
+
version?: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
availableUpdate?: {
|
|
14
|
+
version: string;
|
|
15
|
+
message: string;
|
|
16
|
+
};
|
|
17
|
+
lastCheckTime?: string;
|
|
18
|
+
operationStatus?: OperationStatus;
|
|
19
|
+
pythonEnv?: string;
|
|
20
|
+
npmPath?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface MCPServerStatus {
|
|
23
|
+
installedStatus: Record<string, OperationStatus>;
|
|
24
|
+
name: string;
|
|
25
|
+
error?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface OperationStatus {
|
|
28
|
+
status: 'pending' | 'in-progress' | 'completed' | 'failed';
|
|
29
|
+
type: 'install' | 'uninstall' | 'update' | 'check';
|
|
30
|
+
target: 'requirement' | 'server';
|
|
31
|
+
message?: string;
|
|
32
|
+
error?: string;
|
|
33
|
+
operationId?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface InstallationStatus {
|
|
36
|
+
requirementsStatus: Record<string, RequirementStatus>;
|
|
37
|
+
serversStatus: Record<string, MCPServerStatus>;
|
|
38
|
+
lastUpdated: string;
|
|
39
|
+
}
|
|
40
|
+
export interface MCPServerCategory {
|
|
41
|
+
name: string;
|
|
42
|
+
displayName: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
type: 'local';
|
|
45
|
+
path?: string;
|
|
46
|
+
installationStatus?: InstallationStatus;
|
|
47
|
+
feedConfiguration?: FeedConfiguration;
|
|
48
|
+
}
|
|
49
|
+
export interface ServerCategoryListOptions {
|
|
50
|
+
local?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface ServerOperationResult {
|
|
53
|
+
success: boolean;
|
|
54
|
+
message?: string;
|
|
55
|
+
error?: Error;
|
|
56
|
+
output?: string;
|
|
57
|
+
status?: OperationStatus[];
|
|
58
|
+
}
|
|
59
|
+
export interface MCPConfiguration {
|
|
60
|
+
localServerCategories: MCPServerCategory[];
|
|
61
|
+
feeds: Record<string, FeedConfiguration>;
|
|
62
|
+
clientMCPSettings?: Record<string, Record<string, any>>;
|
|
63
|
+
}
|
|
64
|
+
export interface ServerInstallOptions {
|
|
65
|
+
force?: boolean;
|
|
66
|
+
env?: Record<string, string>;
|
|
67
|
+
targetClients?: string[];
|
|
68
|
+
requirements?: RequirementConfig[];
|
|
69
|
+
args?: string[];
|
|
70
|
+
settings?: Record<string, any>;
|
|
71
|
+
}
|
|
72
|
+
export interface UpdateRequirementOptions {
|
|
73
|
+
requirementName: string;
|
|
74
|
+
updateVersion: string;
|
|
75
|
+
}
|
|
76
|
+
export interface ServerUninstallOptions {
|
|
77
|
+
removeData?: boolean;
|
|
78
|
+
targets?: string[];
|
|
79
|
+
}
|
|
80
|
+
export interface EnvVariableConfig {
|
|
81
|
+
Required: boolean;
|
|
82
|
+
Description: string;
|
|
83
|
+
Default?: string;
|
|
84
|
+
}
|
|
85
|
+
export interface InstallationConfig {
|
|
86
|
+
command: string;
|
|
87
|
+
args: string[];
|
|
88
|
+
env?: Record<string, EnvVariableConfig>;
|
|
89
|
+
url?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface DependencyConfig {
|
|
92
|
+
requirements?: Array<{
|
|
93
|
+
name: string;
|
|
94
|
+
version: string;
|
|
95
|
+
order?: number;
|
|
96
|
+
}>;
|
|
97
|
+
mcpServers?: Array<{
|
|
98
|
+
name: string;
|
|
99
|
+
}>;
|
|
100
|
+
}
|
|
101
|
+
export interface McpConfig {
|
|
102
|
+
name: string;
|
|
103
|
+
description: string;
|
|
104
|
+
mode: 'stdio' | 'sse';
|
|
105
|
+
dependencies?: DependencyConfig;
|
|
106
|
+
schemas?: string;
|
|
107
|
+
repository?: string;
|
|
108
|
+
systemTags?: Record<string, string>;
|
|
109
|
+
installation: InstallationConfig;
|
|
110
|
+
}
|
|
111
|
+
export interface RegistryConfig {
|
|
112
|
+
githubRelease?: {
|
|
113
|
+
repository: string;
|
|
114
|
+
assetsName?: string;
|
|
115
|
+
assetName: string;
|
|
116
|
+
};
|
|
117
|
+
artifacts?: {
|
|
118
|
+
registryUrl: string;
|
|
119
|
+
registryName: string;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
export interface RequirementConfig {
|
|
123
|
+
name: string;
|
|
124
|
+
type: 'npm' | 'pip' | 'command' | 'extension' | 'other';
|
|
125
|
+
alias?: string;
|
|
126
|
+
version: string;
|
|
127
|
+
registry?: RegistryConfig;
|
|
128
|
+
}
|
|
129
|
+
export interface FeedConfiguration {
|
|
130
|
+
name: string;
|
|
131
|
+
displayName: string;
|
|
132
|
+
description: string;
|
|
133
|
+
repository?: string;
|
|
134
|
+
PullRequest?: string;
|
|
135
|
+
requirements: RequirementConfig[];
|
|
136
|
+
mcpServers: McpConfig[];
|
|
137
|
+
systemTags?: Record<string, string>;
|
|
138
|
+
}
|
|
139
|
+
export interface ClientSettings {
|
|
140
|
+
codeSettingPath: string;
|
|
141
|
+
codeInsiderSettingPath: string;
|
|
142
|
+
}
|
|
143
|
+
export declare enum MCPEvent {
|
|
144
|
+
SERVER_INSTALLED = "server:installed",
|
|
145
|
+
SERVER_UNINSTALLED = "server:uninstalled",
|
|
146
|
+
SERVER_STARTED = "server:started",
|
|
147
|
+
SERVER_STOPPED = "server:stopped",
|
|
148
|
+
CONFIG_CHANGED = "config:changed"
|
|
149
|
+
}
|
|
150
|
+
export interface MCPEventData {
|
|
151
|
+
[MCPEvent.SERVER_INSTALLED]: {
|
|
152
|
+
server: MCPServerCategory;
|
|
153
|
+
};
|
|
154
|
+
[MCPEvent.SERVER_UNINSTALLED]: {
|
|
155
|
+
serverName: string;
|
|
156
|
+
targets?: string[];
|
|
157
|
+
};
|
|
158
|
+
[MCPEvent.SERVER_STARTED]: {
|
|
159
|
+
server: MCPServerCategory;
|
|
160
|
+
};
|
|
161
|
+
[MCPEvent.SERVER_STOPPED]: {
|
|
162
|
+
serverName: string;
|
|
163
|
+
};
|
|
164
|
+
[MCPEvent.CONFIG_CHANGED]: {
|
|
165
|
+
configuration: MCPConfiguration;
|
|
166
|
+
};
|
|
167
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export var OSType;
|
|
2
|
+
(function (OSType) {
|
|
3
|
+
OSType["Windows"] = "windows";
|
|
4
|
+
OSType["MacOS"] = "macos";
|
|
5
|
+
OSType["Linux"] = "linux";
|
|
6
|
+
})(OSType || (OSType = {}));
|
|
7
|
+
// Events that can be emitted by the SDK
|
|
8
|
+
export var MCPEvent;
|
|
9
|
+
(function (MCPEvent) {
|
|
10
|
+
MCPEvent["SERVER_INSTALLED"] = "server:installed";
|
|
11
|
+
MCPEvent["SERVER_UNINSTALLED"] = "server:uninstalled";
|
|
12
|
+
MCPEvent["SERVER_STARTED"] = "server:started";
|
|
13
|
+
MCPEvent["SERVER_STOPPED"] = "server:stopped";
|
|
14
|
+
MCPEvent["CONFIG_CHANGED"] = "config:changed";
|
|
15
|
+
})(MCPEvent || (MCPEvent = {}));
|
|
16
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import { FeedConfiguration } from '../types.js';
|
|
1
|
+
import { FeedConfiguration } from '../metadatas/types.js';
|
|
2
2
|
import { OperationStatus } from './OnboardStatus.js';
|
|
3
3
|
/**
|
|
4
4
|
* Service for handling feed onboarding operations
|
|
5
5
|
*/
|
|
6
6
|
export declare class FeedOnboardService {
|
|
7
7
|
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Creates an operation ID that combines feed name and operation type.
|
|
10
|
+
* @param feedName The name of the feed.
|
|
11
|
+
* @param operationType The type of operation.
|
|
12
|
+
* @returns Combined operation ID string.
|
|
13
|
+
*/
|
|
14
|
+
private createOperationId;
|
|
8
15
|
/**
|
|
9
16
|
* Onboard a new feed configuration
|
|
10
17
|
* @param config Feed configuration to onboard
|
|
@@ -26,20 +33,15 @@ export declare class FeedOnboardService {
|
|
|
26
33
|
* If an existing operation is found, its status is returned. Otherwise, a new operation is created and started.
|
|
27
34
|
* @param config The feed configuration.
|
|
28
35
|
* @param operationType The type of operation to initiate (FULL_ONBOARDING or VALIDATION_ONLY).
|
|
36
|
+
* @param serverList The list of server names to process.
|
|
29
37
|
* @returns A promise that resolves to the operation status.
|
|
30
38
|
*/
|
|
31
39
|
private _initiateOperation;
|
|
32
|
-
/**
|
|
33
|
-
* Finds an existing non-completed operation for a given feed name, server name, and operation type.
|
|
34
|
-
* @param feedName The name of the feed.
|
|
35
|
-
* @param operationType The type of operation.
|
|
36
|
-
* @returns A promise that resolves to the OnboardStatus of the existing operation, or undefined if not found.
|
|
37
|
-
*/
|
|
38
|
-
private _findExistingNonCompletedOperation;
|
|
39
40
|
/**
|
|
40
41
|
* Performs static validation of the feed configuration.
|
|
41
42
|
* @param config The feed configuration to validate.
|
|
42
43
|
* @param forExistingCategory Whether this is for an existing category.
|
|
44
|
+
* @returns A promise that resolves to a list of server names to be processed.
|
|
43
45
|
* @throws Error if validation fails.
|
|
44
46
|
*/
|
|
45
47
|
private validateStaticConfig;
|
|
@@ -48,6 +50,8 @@ export declare class FeedOnboardService {
|
|
|
48
50
|
* Updates the onboarding status to VALIDATING, then to VALIDATED or FAILED based on the validation result.
|
|
49
51
|
* @param onboardingId The ID of the onboarding process.
|
|
50
52
|
* @param config The feed configuration to validate.
|
|
53
|
+
* @param operationType The type of operation this validation is for.
|
|
54
|
+
* @param serverList The list of server names to validate.
|
|
51
55
|
* @throws Error if validation fails, to be caught by the calling process.
|
|
52
56
|
*/
|
|
53
57
|
private _validateFeedConfiguration;
|
|
@@ -57,6 +61,8 @@ export declare class FeedOnboardService {
|
|
|
57
61
|
* If validation fails, the error is handled by _validateFeedConfiguration and the calling _initiateOperation method.
|
|
58
62
|
* @param onboardingId The ID of the onboarding process.
|
|
59
63
|
* @param config The feed configuration.
|
|
64
|
+
* @param operationType The type of operation (should be 'VALIDATION_ONLY').
|
|
65
|
+
* @param serverList The list of server names to validate.
|
|
60
66
|
*/
|
|
61
67
|
private processValidationOnly;
|
|
62
68
|
/**
|
|
@@ -65,6 +71,7 @@ export declare class FeedOnboardService {
|
|
|
65
71
|
* Manages status updates throughout the process and handles cleanup of temporary directories.
|
|
66
72
|
* @param onboardingId The ID of the onboarding process.
|
|
67
73
|
* @param config The feed configuration.
|
|
74
|
+
* @param operationType The type of operation (should be 'FULL_ONBOARDING').
|
|
68
75
|
* @throws Error if any step of the full onboarding process fails.
|
|
69
76
|
*/
|
|
70
77
|
private processFullOnboarding;
|