@microsoft/teamsfx-core 3.1.3 → 3.1.4-alpha.564122f4e1.0
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/build/common/templates-config.json +4 -4
- package/build/component/configManager/actionInjector.d.ts +4 -2
- package/build/component/configManager/actionInjector.d.ts.map +1 -1
- package/build/component/configManager/actionInjector.js +50 -3
- package/build/component/configManager/actionInjector.js.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.js +1 -18
- package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
- package/build/component/generator/openApiSpec/helper.d.ts +1 -1
- package/build/component/generator/openApiSpec/helper.d.ts.map +1 -1
- package/build/component/generator/openApiSpec/helper.js +23 -3
- package/build/component/generator/openApiSpec/helper.js.map +1 -1
- package/build/component/generator/openPlugin/authResolver.d.ts +2 -2
- package/build/component/generator/openPlugin/authResolver.d.ts.map +1 -1
- package/build/component/generator/openPlugin/authResolver.js +17 -7
- package/build/component/generator/openPlugin/authResolver.js.map +1 -1
- package/build/component/generator/openPlugin/errors.d.ts +4 -0
- package/build/component/generator/openPlugin/errors.d.ts.map +1 -0
- package/build/component/generator/openPlugin/errors.js +13 -0
- package/build/component/generator/openPlugin/errors.js.map +1 -0
- package/build/component/generator/openPlugin/exporter.d.ts +9 -6
- package/build/component/generator/openPlugin/exporter.d.ts.map +1 -1
- package/build/component/generator/openPlugin/exporter.js +502 -53
- package/build/component/generator/openPlugin/exporter.js.map +1 -1
- package/build/component/generator/openPlugin/fileSystem.d.ts +28 -0
- package/build/component/generator/openPlugin/fileSystem.d.ts.map +1 -0
- package/build/component/generator/openPlugin/fileSystem.js +181 -0
- package/build/component/generator/openPlugin/fileSystem.js.map +1 -0
- package/build/component/generator/openPlugin/iconStrategy.d.ts.map +1 -1
- package/build/component/generator/openPlugin/iconStrategy.js +30 -14
- package/build/component/generator/openPlugin/iconStrategy.js.map +1 -1
- package/build/component/generator/openPlugin/importer.d.ts.map +1 -1
- package/build/component/generator/openPlugin/importer.js +75 -12
- package/build/component/generator/openPlugin/importer.js.map +1 -1
- package/build/component/generator/openPlugin/mapper.d.ts +3 -2
- package/build/component/generator/openPlugin/mapper.d.ts.map +1 -1
- package/build/component/generator/openPlugin/mapper.js +188 -29
- package/build/component/generator/openPlugin/mapper.js.map +1 -1
- package/build/component/generator/openPlugin/parser.d.ts.map +1 -1
- package/build/component/generator/openPlugin/parser.js +264 -70
- package/build/component/generator/openPlugin/parser.js.map +1 -1
- package/build/component/generator/openPlugin/skillValidation.d.ts +2 -0
- package/build/component/generator/openPlugin/skillValidation.d.ts.map +1 -0
- package/build/component/generator/openPlugin/skillValidation.js +63 -0
- package/build/component/generator/openPlugin/skillValidation.js.map +1 -0
- package/build/component/generator/openPlugin/spec.d.ts +67 -0
- package/build/component/generator/openPlugin/spec.d.ts.map +1 -0
- package/build/component/generator/openPlugin/spec.js +157 -0
- package/build/component/generator/openPlugin/spec.js.map +1 -0
- package/build/component/generator/openPlugin/textUtils.d.ts +1 -1
- package/build/component/generator/openPlugin/textUtils.d.ts.map +1 -1
- package/build/component/generator/openPlugin/textUtils.js +8 -7
- package/build/component/generator/openPlugin/textUtils.js.map +1 -1
- package/build/component/generator/openPlugin/types.d.ts +76 -14
- package/build/component/generator/openPlugin/types.d.ts.map +1 -1
- package/build/component/generator/openPlugin/validation.d.ts +17 -0
- package/build/component/generator/openPlugin/validation.d.ts.map +1 -0
- package/build/component/generator/openPlugin/validation.js +563 -0
- package/build/component/generator/openPlugin/validation.js.map +1 -0
- package/build/component/utils/common.d.ts +1 -9
- package/build/component/utils/common.d.ts.map +1 -1
- package/build/component/utils/common.js +7 -37
- package/build/component/utils/common.js.map +1 -1
- package/build/component/utils/envFunctionUtils.d.ts +3 -8
- package/build/component/utils/envFunctionUtils.d.ts.map +1 -1
- package/build/component/utils/envFunctionUtils.js +46 -131
- package/build/component/utils/envFunctionUtils.js.map +1 -1
- package/build/component/utils/mcpAuthScaffolder.d.ts +5 -0
- package/build/component/utils/mcpAuthScaffolder.d.ts.map +1 -1
- package/build/component/utils/mcpAuthScaffolder.js +14 -2
- package/build/component/utils/mcpAuthScaffolder.js.map +1 -1
- package/build/core/FxCore.d.ts +1 -1
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.d.ts +2 -1
- package/build/core/FxCore.declarativeAgent.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.js +17 -6
- package/build/core/FxCore.declarativeAgent.js.map +1 -1
- package/build/core/FxCore.js +3 -3
- package/build/core/FxCore.js.map +1 -1
- package/build/core/FxCore.openPlugin.d.ts +7 -6
- package/build/core/FxCore.openPlugin.d.ts.map +1 -1
- package/build/core/FxCore.openPlugin.js +7 -6
- package/build/core/FxCore.openPlugin.js.map +1 -1
- package/build/question/inputs/AddAuthActionInputs.d.ts +2 -0
- package/build/question/inputs/AddAuthActionInputs.d.ts.map +1 -1
- package/build/question/inputs/AddPluginInputs.d.ts +5 -1
- package/build/question/inputs/AddPluginInputs.d.ts.map +1 -1
- package/build/question/options/AddAuthActionOptions.d.ts.map +1 -1
- package/build/question/options/AddAuthActionOptions.js +7 -0
- package/build/question/options/AddAuthActionOptions.js.map +1 -1
- package/build/question/options/AddPluginOptions.d.ts.map +1 -1
- package/build/question/options/AddPluginOptions.js +14 -1
- package/build/question/options/AddPluginOptions.js.map +1 -1
- package/build/question/options/ExportOpenPluginOptions.js +2 -2
- package/build/question/options/ExportOpenPluginOptions.js.map +1 -1
- package/build/question/options/ImportOpenPluginOptions.js +4 -4
- package/build/question/options/ImportOpenPluginOptions.js.map +1 -1
- package/build/question/other.d.ts +1 -0
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +49 -9
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +1 -0
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +1 -0
- package/build/question/questionNames.js.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts +2 -0
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js +24 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
- package/build/v4/mcp/mcpAuthAction.d.ts +2 -1
- package/build/v4/mcp/mcpAuthAction.d.ts.map +1 -1
- package/build/v4/mcp/mcpAuthAction.js +32 -5
- package/build/v4/mcp/mcpAuthAction.js.map +1 -1
- package/build/v4/mcp/mcpAuthScaffold.d.ts +3 -0
- package/build/v4/mcp/mcpAuthScaffold.d.ts.map +1 -1
- package/build/v4/mcp/mcpAuthScaffold.js +57 -30
- package/build/v4/mcp/mcpAuthScaffold.js.map +1 -1
- package/build/v4/runtime/steps/mcpAuth.d.ts.map +1 -1
- package/build/v4/runtime/steps/mcpAuth.js +13 -0
- package/build/v4/runtime/steps/mcpAuth.js.map +1 -1
- package/package.json +37 -37
- package/resource/package.nls.json +20 -0
- package/templates/configs/local/typescript/.gitignore +1 -0
- package/templates/configs/playground/typescript/.gitignore +4 -0
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/python.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/metadata.zip +0 -0
- package/templates/v4/floor.json +1 -1
- package/templates/v4/templates-metadata.zip +0 -0
- package/templates/v4/templates.zip +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConnectorAuthorizationType, ImportInputs, MappedManifest, OpenPluginMcpServerEntry, ParsedOpenPlugin } from "./types";
|
|
2
2
|
export declare const MANIFEST_SCHEMA_URL = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.schema.json";
|
|
3
3
|
export declare const MANIFEST_VERSION = "devPreview";
|
|
4
4
|
export declare const ACCENT_COLOR = "#4A90D9";
|
|
5
5
|
export declare function validateMcpServerCount(mcpServers: Record<string, OpenPluginMcpServerEntry>): void;
|
|
6
|
-
export declare function mapToTtkProject(parsed: ParsedOpenPlugin, inputs: ImportInputs, resolvedAuthTypes?: Readonly<Record<string,
|
|
6
|
+
export declare function mapToTtkProject(parsed: ParsedOpenPlugin, inputs: ImportInputs, resolvedAuthTypes?: Readonly<Record<string, ConnectorAuthorizationType>>): MappedManifest;
|
|
7
|
+
export declare function validateImportInputs(parsed: ParsedOpenPlugin, inputs: ImportInputs): void;
|
|
7
8
|
//# sourceMappingURL=mapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/mapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/mapper.ts"],"names":[],"mappings":"AAWA,OAAO,EAIL,0BAA0B,EAE1B,YAAY,EACZ,cAAc,EACd,wBAAwB,EACxB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,mBAAmB,8FAC6D,CAAC;AAC9F,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,YAAY,YAAY,CAAC;AActC,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,GAAG,IAAI,CASjG;AAED,wBAAgB,eAAe,CAC7B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,YAAY,EACpB,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAM,GAC3E,cAAc,CAwFhB;AAqGD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,CAGzF"}
|
|
@@ -5,10 +5,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.ACCENT_COLOR = exports.MANIFEST_VERSION = exports.MANIFEST_SCHEMA_URL = void 0;
|
|
6
6
|
exports.validateMcpServerCount = validateMcpServerCount;
|
|
7
7
|
exports.mapToTtkProject = mapToTtkProject;
|
|
8
|
+
exports.validateImportInputs = validateImportInputs;
|
|
8
9
|
const tslib_1 = require("tslib");
|
|
10
|
+
const crypto_1 = require("crypto");
|
|
9
11
|
const path = tslib_1.__importStar(require("path"));
|
|
12
|
+
const stringUtils_1 = require("../../../common/stringUtils");
|
|
10
13
|
const authorParser_1 = require("./authorParser");
|
|
11
14
|
const deterministicId_1 = require("./deterministicId");
|
|
15
|
+
const errors_1 = require("./errors");
|
|
16
|
+
const spec_1 = require("./spec");
|
|
12
17
|
const textUtils_1 = require("./textUtils");
|
|
13
18
|
exports.MANIFEST_SCHEMA_URL = "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.schema.json";
|
|
14
19
|
exports.MANIFEST_VERSION = "devPreview";
|
|
@@ -18,10 +23,16 @@ const NAME_FULL_MAX = 100;
|
|
|
18
23
|
const DESC_SHORT_MAX = 80;
|
|
19
24
|
const DESC_FULL_MAX = 4000;
|
|
20
25
|
const MAX_AGENT_CONNECTORS = 10;
|
|
26
|
+
const MAX_AGENT_CONNECTOR_ID_LENGTH = 64;
|
|
27
|
+
const MAX_CONNECTOR_DISPLAY_NAME_LENGTH = 128;
|
|
28
|
+
const MAX_CONNECTOR_DESCRIPTION_LENGTH = 4000;
|
|
29
|
+
const MAX_AUTHORIZATION_REFERENCE_ID_LENGTH = 128;
|
|
30
|
+
const AUTHORIZATION_REFERENCE_HASH_LENGTH = 12;
|
|
31
|
+
const CONNECTOR_ID_HASH_LENGTH = 12;
|
|
21
32
|
function validateMcpServerCount(mcpServers) {
|
|
22
|
-
const connectorCount = Object.values(mcpServers).filter((server) => typeof server.url === "string" && server.url.trim()
|
|
33
|
+
const connectorCount = Object.values(mcpServers).filter((server) => typeof server.url === "string" && isSecureHttpUrl(server.url.trim())).length;
|
|
23
34
|
if (connectorCount > MAX_AGENT_CONNECTORS) {
|
|
24
|
-
throw new
|
|
35
|
+
throw new errors_1.OpenPluginInputError(`Too many MCP servers: ${connectorCount}. The manifest caps agentConnectors at ${MAX_AGENT_CONNECTORS}.`);
|
|
25
36
|
}
|
|
26
37
|
}
|
|
27
38
|
function mapToTtkProject(parsed, inputs, resolvedAuthTypes = {}) {
|
|
@@ -32,19 +43,10 @@ function mapToTtkProject(parsed, inputs, resolvedAuthTypes = {}) {
|
|
|
32
43
|
if (inputs.packageName !== undefined) {
|
|
33
44
|
warnings.push("--package-name was provided but the devPreview manifest schema does not include 'packageName'; ignored.");
|
|
34
45
|
}
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
const privacyUrl = inputs.privacyUrl ?? ext.developer?.privacyUrl;
|
|
41
|
-
if (!privacyUrl) {
|
|
42
|
-
throw new Error("developer.privacyUrl is required. Pass --privacy-url (Open Plugin spec has no equivalent field).");
|
|
43
|
-
}
|
|
44
|
-
const termsUrl = inputs.termsUrl ?? ext.developer?.termsOfUseUrl;
|
|
45
|
-
if (!termsUrl) {
|
|
46
|
-
throw new Error("developer.termsOfUseUrl is required. Pass --terms-url (Open Plugin spec has no equivalent field).");
|
|
47
|
-
}
|
|
46
|
+
const { websiteUrl, privacyUrl, termsUrl, authorName } = resolveDeveloperInputs(parsed, inputs);
|
|
47
|
+
// NOTE: the "openplugin:" seed is load-bearing — it feeds the deterministic
|
|
48
|
+
// UUIDv5 app id. Renaming it would change the generated id for every existing
|
|
49
|
+
// plugin, so it stays as-is despite the spec rename.
|
|
48
50
|
const idSeed = inputs.packageName ?? ext.packageName ?? `openplugin:${pluginName}`;
|
|
49
51
|
const appId = inputs.appId ?? ext.id ?? (0, deterministicId_1.deterministicAppId)(idSeed);
|
|
50
52
|
const displayName = (0, textUtils_1.toTitleCaseFromKebab)(pluginName);
|
|
@@ -57,7 +59,7 @@ function mapToTtkProject(parsed, inputs, resolvedAuthTypes = {}) {
|
|
|
57
59
|
validateMcpServerCount(parsed.mcpServers);
|
|
58
60
|
const agentConnectors = buildAgentConnectors(parsed.mcpServers, pluginName, inputs.defaultAuthType ?? "Auto", ext.agentConnectors, warnings, resolvedAuthTypes);
|
|
59
61
|
const developer = {
|
|
60
|
-
name: ext.developer?.name ??
|
|
62
|
+
name: ext.developer?.name ?? authorName ?? "Unknown",
|
|
61
63
|
websiteUrl,
|
|
62
64
|
privacyUrl,
|
|
63
65
|
termsOfUseUrl: termsUrl,
|
|
@@ -86,20 +88,101 @@ function mapToTtkProject(parsed, inputs, resolvedAuthTypes = {}) {
|
|
|
86
88
|
copyOps.push({
|
|
87
89
|
src: path.join(parsed.skillsRoot, skill),
|
|
88
90
|
destRelative: `appPackage/skills/${skill}`,
|
|
91
|
+
kind: "directory",
|
|
89
92
|
});
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
95
|
if (parsed.commandsRoot && parsed.commands.length > 0) {
|
|
96
|
+
for (const command of parsed.commands) {
|
|
97
|
+
copyOps.push({
|
|
98
|
+
src: path.join(parsed.commandsRoot, command),
|
|
99
|
+
destRelative: `appPackage/commands/${command}`,
|
|
100
|
+
kind: "file",
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
copyOps.push(...buildMcpToolDescriptionCopyOps(parsed, ext));
|
|
105
|
+
return { manifest, copyOps, warnings };
|
|
106
|
+
}
|
|
107
|
+
function buildMcpToolDescriptionCopyOps(parsed, extension) {
|
|
108
|
+
const reservedPaths = [
|
|
109
|
+
"manifest.json",
|
|
110
|
+
"color.png",
|
|
111
|
+
"outline.png",
|
|
112
|
+
"skills",
|
|
113
|
+
...parsed.skills.map((skill) => path.posix.join("skills", skill)),
|
|
114
|
+
...parsed.commands.map((command) => path.posix.join("commands", command)),
|
|
115
|
+
];
|
|
116
|
+
const destinations = new Map();
|
|
117
|
+
const copyOps = [];
|
|
118
|
+
for (const serverName of Object.keys(parsed.mcpServers)) {
|
|
119
|
+
const description = extension.agentConnectors?.[serverName]?.mcpToolDescription;
|
|
120
|
+
if (!description?.file || !description.contents)
|
|
121
|
+
continue;
|
|
122
|
+
const normalizedFile = (0, spec_1.normalizePortableRelativePath)(description.file);
|
|
123
|
+
if (!normalizedFile) {
|
|
124
|
+
throw new errors_1.OpenPluginInputError(`MCP tool-description path '${description.file}' must identify a file within appPackage.`);
|
|
125
|
+
}
|
|
126
|
+
const reservedPath = reservedPaths.find((candidate) => (0, spec_1.portablePathsConflict)(normalizedFile, candidate));
|
|
127
|
+
if (reservedPath) {
|
|
128
|
+
throw new errors_1.OpenPluginInputError(`MCP tool-description path '${normalizedFile}' collides with generated output '${reservedPath}'.`);
|
|
129
|
+
}
|
|
130
|
+
const destinationKey = normalizedFile.toLowerCase();
|
|
131
|
+
const existing = destinations.get(destinationKey);
|
|
132
|
+
if (existing) {
|
|
133
|
+
if (existing.path !== normalizedFile || !existing.contents.equals(description.contents)) {
|
|
134
|
+
throw new errors_1.OpenPluginInputError(`MCP tool-description paths '${existing.path}' and '${normalizedFile}' collide.`);
|
|
135
|
+
}
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
for (const destination of destinations.values()) {
|
|
139
|
+
if ((0, spec_1.portablePathsConflict)(normalizedFile, destination.path)) {
|
|
140
|
+
throw new errors_1.OpenPluginInputError(`MCP tool-description paths '${destination.path}' and '${normalizedFile}' collide.`);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
destinations.set(destinationKey, { path: normalizedFile, contents: description.contents });
|
|
93
144
|
copyOps.push({
|
|
94
|
-
|
|
95
|
-
destRelative: "appPackage
|
|
145
|
+
contents: description.contents,
|
|
146
|
+
destRelative: path.join("appPackage", normalizedFile),
|
|
147
|
+
kind: "contents",
|
|
96
148
|
});
|
|
97
149
|
}
|
|
98
|
-
return
|
|
150
|
+
return copyOps;
|
|
151
|
+
}
|
|
152
|
+
function resolveDeveloperInputs(parsed, inputs) {
|
|
153
|
+
const author = (0, authorParser_1.parseAuthor)(parsed.manifest.author);
|
|
154
|
+
const extension = parsed.atkExtension;
|
|
155
|
+
const websiteUrl = inputs.websiteUrl ?? extension?.developer?.websiteUrl ?? parsed.manifest.homepage ?? author.url;
|
|
156
|
+
if (!websiteUrl) {
|
|
157
|
+
throw new errors_1.OpenPluginInputError("developer.websiteUrl could not be resolved. Set 'homepage' in plugin.json, 'author.url', or pass --website-url.");
|
|
158
|
+
}
|
|
159
|
+
const privacyUrl = inputs.privacyUrl ?? extension?.developer?.privacyUrl;
|
|
160
|
+
if (!privacyUrl) {
|
|
161
|
+
throw new errors_1.OpenPluginInputError("developer.privacyUrl is required. Pass --privacy-url (the Agent Plugins spec has no equivalent field).");
|
|
162
|
+
}
|
|
163
|
+
const termsUrl = inputs.termsUrl ?? extension?.developer?.termsOfUseUrl;
|
|
164
|
+
if (!termsUrl) {
|
|
165
|
+
throw new errors_1.OpenPluginInputError("developer.termsOfUseUrl is required. Pass --terms-url (the Agent Plugins spec has no equivalent field).");
|
|
166
|
+
}
|
|
167
|
+
for (const [field, value] of [
|
|
168
|
+
["websiteUrl", websiteUrl],
|
|
169
|
+
["privacyUrl", privacyUrl],
|
|
170
|
+
["termsOfUseUrl", termsUrl],
|
|
171
|
+
]) {
|
|
172
|
+
if (!(0, stringUtils_1.isValidHttpUrl)(value)) {
|
|
173
|
+
throw new errors_1.OpenPluginInputError(`developer.${field} must be a valid HTTP(S) URL.`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return { websiteUrl, privacyUrl, termsUrl, authorName: author.name };
|
|
177
|
+
}
|
|
178
|
+
function validateImportInputs(parsed, inputs) {
|
|
179
|
+
resolveDeveloperInputs(parsed, inputs);
|
|
180
|
+
validateMcpServerCount(parsed.mcpServers);
|
|
99
181
|
}
|
|
100
182
|
function buildAgentConnectors(mcpServers, pluginName, defaultAuth, extOverrides, warnings, resolvedAuthTypes) {
|
|
101
183
|
const out = [];
|
|
102
184
|
const serverNames = Object.keys(mcpServers).sort();
|
|
185
|
+
const connectorIds = createConnectorIds(serverNames);
|
|
103
186
|
for (const name of serverNames) {
|
|
104
187
|
const server = mcpServers[name];
|
|
105
188
|
const url = typeof server.url === "string" ? server.url.trim() : "";
|
|
@@ -107,31 +190,107 @@ function buildAgentConnectors(mcpServers, pluginName, defaultAuth, extOverrides,
|
|
|
107
190
|
warnings.push(`Skipping MCP server '${name}': no URL found (stdio servers require manual localMcpServer configuration).`);
|
|
108
191
|
continue;
|
|
109
192
|
}
|
|
193
|
+
if (!isSecureHttpUrl(url)) {
|
|
194
|
+
warnings.push(`Skipping MCP server '${name}': the Teams remoteMcpServer schema requires HTTPS.`);
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
110
197
|
const override = extOverrides?.[name];
|
|
111
198
|
const authType = override?.authorization?.type ?? resolveAuthType(name, defaultAuth, resolvedAuthTypes);
|
|
112
199
|
const authorization = { type: authType };
|
|
113
200
|
if (authType !== "None") {
|
|
114
201
|
authorization.referenceId =
|
|
115
|
-
override?.authorization?.referenceId ??
|
|
202
|
+
override?.authorization?.referenceId ?? createAuthorizationReferenceId(pluginName, name);
|
|
116
203
|
}
|
|
117
204
|
const description = override?.description ??
|
|
118
205
|
(typeof server.description === "string" && server.description
|
|
119
206
|
? server.description
|
|
120
207
|
: `Remote MCP server providing tools for ${pluginName}`);
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
208
|
+
const remoteMcpServer = {
|
|
209
|
+
mcpServerUrl: url,
|
|
210
|
+
authorization,
|
|
211
|
+
};
|
|
212
|
+
if (override?.mcpToolDescription) {
|
|
213
|
+
remoteMcpServer.mcpToolDescription =
|
|
214
|
+
override.mcpToolDescription.file === undefined
|
|
215
|
+
? {}
|
|
216
|
+
: { file: override.mcpToolDescription.file };
|
|
217
|
+
}
|
|
218
|
+
const mappedConnector = {
|
|
219
|
+
id: connectorIds[name],
|
|
220
|
+
displayName: truncateConnectorText(override?.displayName ?? `${name} MCP Server`, MAX_CONNECTOR_DISPLAY_NAME_LENGTH),
|
|
221
|
+
description: truncateConnectorText(description, MAX_CONNECTOR_DESCRIPTION_LENGTH),
|
|
125
222
|
toolSource: {
|
|
126
|
-
remoteMcpServer
|
|
127
|
-
mcpServerUrl: url,
|
|
128
|
-
authorization,
|
|
129
|
-
},
|
|
223
|
+
remoteMcpServer,
|
|
130
224
|
},
|
|
131
|
-
}
|
|
225
|
+
};
|
|
226
|
+
if (override?.reusable !== undefined)
|
|
227
|
+
mappedConnector.reusable = override.reusable;
|
|
228
|
+
out.push(mappedConnector);
|
|
132
229
|
}
|
|
133
230
|
return out;
|
|
134
231
|
}
|
|
232
|
+
function createConnectorIds(serverNames) {
|
|
233
|
+
const connectorIds = {};
|
|
234
|
+
const usedIds = new Set();
|
|
235
|
+
for (const serverName of serverNames) {
|
|
236
|
+
if (codePointLength(serverName) > MAX_AGENT_CONNECTOR_ID_LENGTH)
|
|
237
|
+
continue;
|
|
238
|
+
(0, spec_1.setRecordValue)(connectorIds, serverName, serverName);
|
|
239
|
+
usedIds.add(serverName);
|
|
240
|
+
}
|
|
241
|
+
for (const serverName of serverNames) {
|
|
242
|
+
if (codePointLength(serverName) <= MAX_AGENT_CONNECTOR_ID_LENGTH)
|
|
243
|
+
continue;
|
|
244
|
+
let attempt = 0;
|
|
245
|
+
let connectorId;
|
|
246
|
+
do {
|
|
247
|
+
connectorId = createBoundedConnectorId(serverName, attempt++);
|
|
248
|
+
} while (usedIds.has(connectorId));
|
|
249
|
+
(0, spec_1.setRecordValue)(connectorIds, serverName, connectorId);
|
|
250
|
+
usedIds.add(connectorId);
|
|
251
|
+
}
|
|
252
|
+
return connectorIds;
|
|
253
|
+
}
|
|
254
|
+
function createBoundedConnectorId(serverName, attempt) {
|
|
255
|
+
const hashInput = attempt === 0 ? serverName : `${serverName}:${attempt}`;
|
|
256
|
+
const hash = (0, crypto_1.createHash)("sha256")
|
|
257
|
+
.update(hashInput)
|
|
258
|
+
.digest("hex")
|
|
259
|
+
.slice(0, CONNECTOR_ID_HASH_LENGTH);
|
|
260
|
+
const suffix = `-${hash}`;
|
|
261
|
+
return `${sliceCodePoints(serverName, MAX_AGENT_CONNECTOR_ID_LENGTH - suffix.length)}${suffix}`;
|
|
262
|
+
}
|
|
263
|
+
function createAuthorizationReferenceId(pluginName, serverName) {
|
|
264
|
+
const referenceId = `${pluginName}-${serverName}-auth`;
|
|
265
|
+
if (codePointLength(referenceId) <= MAX_AUTHORIZATION_REFERENCE_ID_LENGTH)
|
|
266
|
+
return referenceId;
|
|
267
|
+
const hash = (0, crypto_1.createHash)("sha256")
|
|
268
|
+
.update(referenceId)
|
|
269
|
+
.digest("hex")
|
|
270
|
+
.slice(0, AUTHORIZATION_REFERENCE_HASH_LENGTH);
|
|
271
|
+
const suffix = `-${hash}-auth`;
|
|
272
|
+
return `${sliceCodePoints(referenceId, MAX_AUTHORIZATION_REFERENCE_ID_LENGTH - suffix.length)}${suffix}`;
|
|
273
|
+
}
|
|
274
|
+
function codePointLength(value) {
|
|
275
|
+
return [...value].length;
|
|
276
|
+
}
|
|
277
|
+
function sliceCodePoints(value, end) {
|
|
278
|
+
return [...value].slice(0, end).join("");
|
|
279
|
+
}
|
|
280
|
+
function truncateConnectorText(value, maxLength) {
|
|
281
|
+
const codePoints = [...value];
|
|
282
|
+
if (codePoints.length <= maxLength)
|
|
283
|
+
return value;
|
|
284
|
+
return codePoints.slice(0, maxLength).join("").trimEnd();
|
|
285
|
+
}
|
|
286
|
+
function isSecureHttpUrl(value) {
|
|
287
|
+
try {
|
|
288
|
+
return new URL(value).protocol === "https:";
|
|
289
|
+
}
|
|
290
|
+
catch {
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
135
294
|
function resolveAuthType(serverName, defaultAuth, resolvedAuthTypes) {
|
|
136
295
|
if (defaultAuth !== "Auto") {
|
|
137
296
|
return defaultAuth;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapper.js","sourceRoot":"","sources":["../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I,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CACtB,UAAkB,EAClB,WAAuC,EACvC,iBAAuE;IAEvE,IAAI,WAAW,KAAK,MAAM,EAAE,CAAC;QAC3B,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,MAAM,QAAQ,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAC/C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,8CAA8C,UAAU,IAAI,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/parser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/parser.ts"],"names":[],"mappings":"AAmBA,OAAO,EAKL,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAgFjB,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAkP/E"}
|