@microsoft/teamsfx-core 3.1.3 → 3.1.4-alpha.26ce7a8dda.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 +13 -3
- package/build/component/configManager/actionInjector.d.ts.map +1 -1
- package/build/component/configManager/actionInjector.js +88 -5
- 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 +2 -2
- package/build/component/generator/openApiSpec/helper.d.ts.map +1 -1
- package/build/component/generator/openApiSpec/helper.js +65 -5
- 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/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +7 -6
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/mcpAuthScaffolder.d.ts +6 -0
- package/build/component/utils/mcpAuthScaffolder.d.ts.map +1 -1
- package/build/component/utils/mcpAuthScaffolder.js +17 -7
- package/build/component/utils/mcpAuthScaffolder.js.map +1 -1
- package/build/core/FxCore.d.ts +3 -2
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.d.ts +8 -2
- package/build/core/FxCore.declarativeAgent.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.js +109 -6
- package/build/core/FxCore.declarativeAgent.js.map +1 -1
- package/build/core/FxCore.js +42 -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/error/common.d.ts +9 -0
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +40 -1
- package/build/error/common.js.map +1 -1
- package/build/question/generator.d.ts.map +1 -1
- package/build/question/generator.js +9 -9
- package/build/question/generator.js.map +1 -1
- package/build/question/inputs/AddAuthActionInputs.d.ts +6 -0
- package/build/question/inputs/AddAuthActionInputs.d.ts.map +1 -1
- package/build/question/inputs/AddPluginInputs.d.ts +15 -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 +19 -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 +45 -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 +2 -0
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +174 -8
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +6 -0
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +6 -0
- package/build/question/questionNames.js.map +1 -1
- package/build/question/scaffold/vsc/rootNode.js +1 -1
- package/build/question/scaffold/vsc/rootNode.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 +31 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
- package/build/ui/visitor.d.ts.map +1 -1
- package/build/ui/visitor.js +1 -0
- package/build/ui/visitor.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 +61 -38
- 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 +15 -4
- package/build/v4/runtime/steps/mcpAuth.js.map +1 -1
- package/package.json +37 -37
- package/resource/package.nls.json +30 -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
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.DEFAULT_REMOTE_MCP_TYPE = exports.MCP_SERVER_TYPES = exports.PLUGIN_NAME_PATTERN = exports.PLUGIN_NAME_MAX_LENGTH = exports.LEGACY_MANIFEST_LOCATIONS = exports.LEGACY_MCP_CONFIG_FILE = exports.LEGACY_ATK_EXTENSION_KEY = exports.ATK_EXTENSION_NAMESPACE = exports.MCP_CONFIG_FILE = exports.PLUGIN_MANIFEST_FILE = exports.MCP_SCHEMA_URL = exports.PLUGIN_SCHEMA_URL = exports.AGENT_PLUGINS_VERSION = void 0;
|
|
6
|
+
exports.isValidPluginName = isValidPluginName;
|
|
7
|
+
exports.isSupportedMcpServerType = isSupportedMcpServerType;
|
|
8
|
+
exports.setRecordValue = setRecordValue;
|
|
9
|
+
exports.isPortableRelativePath = isPortableRelativePath;
|
|
10
|
+
exports.normalizePortableRelativePath = normalizePortableRelativePath;
|
|
11
|
+
exports.portablePathsConflict = portablePathsConflict;
|
|
12
|
+
exports.normalizePluginName = normalizePluginName;
|
|
13
|
+
exports.resolveWithinRoot = resolveWithinRoot;
|
|
14
|
+
const tslib_1 = require("tslib");
|
|
15
|
+
const path = tslib_1.__importStar(require("path"));
|
|
16
|
+
/**
|
|
17
|
+
* Constants and helpers for the Agent Plugins specification v1.0.0
|
|
18
|
+
* (https://agent-plugins.org/).
|
|
19
|
+
*
|
|
20
|
+
* This specification was previously published as the "Open Plugin Spec" at
|
|
21
|
+
* https://open-plugins.com/, which now permanently redirects (308) to
|
|
22
|
+
* agent-plugins.org. Internal identifiers in this module keep the historical
|
|
23
|
+
* `openPlugin` naming; the user-facing CLI accepts both `openplugin` and
|
|
24
|
+
* `agentplugin`.
|
|
25
|
+
*/
|
|
26
|
+
exports.AGENT_PLUGINS_VERSION = "1.0.0";
|
|
27
|
+
/** Required `$schema` value in plugin.json. */
|
|
28
|
+
exports.PLUGIN_SCHEMA_URL = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json";
|
|
29
|
+
/** `$schema` value in mcp.json. */
|
|
30
|
+
exports.MCP_SCHEMA_URL = "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json";
|
|
31
|
+
/** Spec-mandated manifest location: plugin.json in the plugin root. */
|
|
32
|
+
exports.PLUGIN_MANIFEST_FILE = "plugin.json";
|
|
33
|
+
/** Spec-mandated MCP configuration location: mcp.json in the plugin root. */
|
|
34
|
+
exports.MCP_CONFIG_FILE = "mcp.json";
|
|
35
|
+
/**
|
|
36
|
+
* Reverse-domain namespace for toolkit-specific manifest data. Agent Plugins
|
|
37
|
+
* 1.0.0 closes the manifest schema (`additionalProperties: false`), so client
|
|
38
|
+
* data must live under `extensions[<namespace>]` rather than at the top level.
|
|
39
|
+
*/
|
|
40
|
+
exports.ATK_EXTENSION_NAMESPACE = "com.microsoft.agents-toolkit";
|
|
41
|
+
/** Pre-1.0.0 top-level extension key. Still read on import for back-compat. */
|
|
42
|
+
exports.LEGACY_ATK_EXTENSION_KEY = "x-microsoft-365-agents-toolkit";
|
|
43
|
+
/** Pre-1.0.0 MCP config filename. Still read on import for back-compat. */
|
|
44
|
+
exports.LEGACY_MCP_CONFIG_FILE = ".mcp.json";
|
|
45
|
+
/**
|
|
46
|
+
* Pre-1.0.0 manifest locations. Agent Plugins 1.0.0 requires plugin.json in the
|
|
47
|
+
* plugin root; these are still probed on import so directories authored against
|
|
48
|
+
* the older spec keep working.
|
|
49
|
+
*/
|
|
50
|
+
exports.LEGACY_MANIFEST_LOCATIONS = [
|
|
51
|
+
{ relPath: ".plugin/plugin.json", kind: "open-plugin" },
|
|
52
|
+
{ relPath: ".claude-plugin/plugin.json", kind: "claude-plugin" },
|
|
53
|
+
{ relPath: ".cursor-plugin/plugin.json", kind: "cursor-plugin" },
|
|
54
|
+
];
|
|
55
|
+
/** `name` constraints from plugin.schema.json. */
|
|
56
|
+
exports.PLUGIN_NAME_MAX_LENGTH = 64;
|
|
57
|
+
exports.PLUGIN_NAME_PATTERN = /^(?!.*(?:--|\.\.))[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/;
|
|
58
|
+
const WINDOWS_RESERVED_DEVICE_NAME_PATTERN = /^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])$/;
|
|
59
|
+
const WINDOWS_RESERVED_PATH_SEGMENT_PATTERN = /^(?:con|prn|aux|nul|com[1-9¹²³]|lpt[1-9¹²³])(?:\..*)?$/i;
|
|
60
|
+
const PORTABLE_INVALID_PATH_CHARACTER_PATTERN = /[<>:"|?*\u0000-\u001f]/;
|
|
61
|
+
exports.MCP_SERVER_TYPES = [
|
|
62
|
+
"stdio",
|
|
63
|
+
"streamable-http",
|
|
64
|
+
"sse",
|
|
65
|
+
];
|
|
66
|
+
/** Transport emitted by `atk export` for remote MCP servers. */
|
|
67
|
+
exports.DEFAULT_REMOTE_MCP_TYPE = "streamable-http";
|
|
68
|
+
function isValidPluginName(name) {
|
|
69
|
+
return (typeof name === "string" &&
|
|
70
|
+
name.length >= 1 &&
|
|
71
|
+
name.length <= exports.PLUGIN_NAME_MAX_LENGTH &&
|
|
72
|
+
exports.PLUGIN_NAME_PATTERN.test(name));
|
|
73
|
+
}
|
|
74
|
+
function isSupportedMcpServerType(value) {
|
|
75
|
+
return value === "stdio" || value === "streamable-http" || value === "sse";
|
|
76
|
+
}
|
|
77
|
+
/** Add an own enumerable entry without invoking Object.prototype.__proto__. */
|
|
78
|
+
function setRecordValue(record, key, value) {
|
|
79
|
+
Object.defineProperty(record, key, {
|
|
80
|
+
value,
|
|
81
|
+
enumerable: true,
|
|
82
|
+
configurable: true,
|
|
83
|
+
writable: true,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/** Reject absolute and drive-relative paths under both POSIX and Windows semantics. */
|
|
87
|
+
function isPortableRelativePath(value) {
|
|
88
|
+
return (value.length > 0 &&
|
|
89
|
+
!path.posix.isAbsolute(value) &&
|
|
90
|
+
!path.win32.isAbsolute(value) &&
|
|
91
|
+
!/^[a-zA-Z]:/.test(value));
|
|
92
|
+
}
|
|
93
|
+
function normalizePortableRelativePath(value) {
|
|
94
|
+
if (!isPortableRelativePath(value) || /[\\/]$/.test(value))
|
|
95
|
+
return undefined;
|
|
96
|
+
const normalized = path.posix.normalize(value.replace(/\\/g, "/"));
|
|
97
|
+
if (normalized === "." || normalized === ".." || normalized.startsWith("../")) {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
const hasNonPortableSegment = normalized
|
|
101
|
+
.split("/")
|
|
102
|
+
.some((segment) => segment.length === 0 ||
|
|
103
|
+
/[ .]$/.test(segment) ||
|
|
104
|
+
PORTABLE_INVALID_PATH_CHARACTER_PATTERN.test(segment) ||
|
|
105
|
+
WINDOWS_RESERVED_PATH_SEGMENT_PATTERN.test(segment));
|
|
106
|
+
if (hasNonPortableSegment)
|
|
107
|
+
return undefined;
|
|
108
|
+
return normalized;
|
|
109
|
+
}
|
|
110
|
+
function portablePathsConflict(left, right) {
|
|
111
|
+
const leftKey = left.toLowerCase();
|
|
112
|
+
const rightKey = right.toLowerCase();
|
|
113
|
+
return (leftKey === rightKey || leftKey.startsWith(`${rightKey}/`) || rightKey.startsWith(`${leftKey}/`));
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Coerce an arbitrary display string into a name that satisfies
|
|
117
|
+
* plugin.schema.json: lowercase, `[a-z0-9.-]`, no leading/trailing `.`/`-`,
|
|
118
|
+
* no `--` or `..`, and at most 64 characters.
|
|
119
|
+
*/
|
|
120
|
+
function normalizePluginName(raw, fallback = "exported-plugin") {
|
|
121
|
+
let s = (raw ?? "").toLowerCase();
|
|
122
|
+
// Anything outside the permitted alphabet becomes a hyphen.
|
|
123
|
+
s = s.replace(/[^a-z0-9.-]+/g, "-");
|
|
124
|
+
// Collapse the two forbidden digraphs. Loop because collapsing one can
|
|
125
|
+
// create the other (e.g. ".-." -> "..").
|
|
126
|
+
while (/--|\.\./.test(s)) {
|
|
127
|
+
s = s.replace(/-{2,}/g, "-").replace(/\.{2,}/g, ".");
|
|
128
|
+
}
|
|
129
|
+
// Must start and end with an alphanumeric.
|
|
130
|
+
s = s.replace(/^[.-]+/, "").replace(/[.-]+$/, "");
|
|
131
|
+
if (s.length > exports.PLUGIN_NAME_MAX_LENGTH) {
|
|
132
|
+
s = s.slice(0, exports.PLUGIN_NAME_MAX_LENGTH).replace(/[.-]+$/, "");
|
|
133
|
+
}
|
|
134
|
+
const windowsBaseName = s.split(".", 1)[0];
|
|
135
|
+
if (WINDOWS_RESERVED_DEVICE_NAME_PATTERN.test(windowsBaseName)) {
|
|
136
|
+
s = `plugin-${s}`.slice(0, exports.PLUGIN_NAME_MAX_LENGTH).replace(/[.-]+$/, "");
|
|
137
|
+
}
|
|
138
|
+
return s.length > 0 ? s : fallback;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Reject paths that escape their designated root, per the Agent Plugins
|
|
142
|
+
* security rules ("resolved paths MUST remain within the plugin root").
|
|
143
|
+
* Returns the resolved absolute path, or undefined when it escapes.
|
|
144
|
+
*/
|
|
145
|
+
function resolveWithinRoot(root, relative) {
|
|
146
|
+
const absRoot = path.resolve(root);
|
|
147
|
+
const resolved = path.resolve(absRoot, relative);
|
|
148
|
+
const rel = path.relative(absRoot, resolved);
|
|
149
|
+
if (rel === "") {
|
|
150
|
+
return resolved;
|
|
151
|
+
}
|
|
152
|
+
if (rel === ".." || rel.startsWith(`..${path.sep}`) || path.isAbsolute(rel)) {
|
|
153
|
+
return undefined;
|
|
154
|
+
}
|
|
155
|
+
return resolved;
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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,CAAC,EAAE,CAAC;QAC5E,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Truncate `text` to at most `maxLength`
|
|
2
|
+
* Truncate `text` to at most `maxLength` Unicode code points, preferring a word
|
|
3
3
|
* boundary when the cut would land mid-word. If no usable boundary exists
|
|
4
4
|
* within the first 50% of the limit, falls back to a hard cut.
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textUtils.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/textUtils.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"textUtils.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/textUtils.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAiB1F;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CASrE"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.truncateAtWordBoundary = truncateAtWordBoundary;
|
|
6
6
|
exports.toTitleCaseFromKebab = toTitleCaseFromKebab;
|
|
7
7
|
/**
|
|
8
|
-
* Truncate `text` to at most `maxLength`
|
|
8
|
+
* Truncate `text` to at most `maxLength` Unicode code points, preferring a word
|
|
9
9
|
* boundary when the cut would land mid-word. If no usable boundary exists
|
|
10
10
|
* within the first 50% of the limit, falls back to a hard cut.
|
|
11
11
|
*/
|
|
@@ -13,18 +13,19 @@ function truncateAtWordBoundary(text, maxLength) {
|
|
|
13
13
|
if (!text) {
|
|
14
14
|
return "";
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
const codePoints = [...text];
|
|
17
|
+
if (codePoints.length <= maxLength) {
|
|
17
18
|
return text;
|
|
18
19
|
}
|
|
19
|
-
const truncated =
|
|
20
|
-
if (/\s/.test(
|
|
21
|
-
return truncated.trimEnd();
|
|
20
|
+
const truncated = codePoints.slice(0, maxLength);
|
|
21
|
+
if (/\s/.test(codePoints[maxLength])) {
|
|
22
|
+
return truncated.join("").trimEnd();
|
|
22
23
|
}
|
|
23
24
|
const lastSpace = truncated.lastIndexOf(" ");
|
|
24
25
|
if (lastSpace > Math.floor(maxLength * 0.5)) {
|
|
25
|
-
return truncated.
|
|
26
|
+
return truncated.slice(0, lastSpace).join("").trimEnd();
|
|
26
27
|
}
|
|
27
|
-
return truncated.trimEnd();
|
|
28
|
+
return truncated.join("").trimEnd();
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
31
|
* Convert a kebab-case identifier to a Title Case display name.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textUtils.js","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/textUtils.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAOlC,
|
|
1
|
+
{"version":3,"file":"textUtils.js","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/textUtils.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAOlC,wDAiBC;AAMD,oDASC;AArCD;;;;GAIG;AACH,SAAgB,sBAAsB,CAAC,IAAwB,EAAE,SAAiB;IAChF,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7B,IAAI,UAAU,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IACjD,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;QACrC,OAAO,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;IACtC,CAAC;IACD,MAAM,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,EAAE,CAAC;QAC5C,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;IAC1D,CAAC;IACD,OAAO,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,IAAwB;IAC3D,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,IAAI;SACR,KAAK,CAAC,GAAG,CAAC;SACV,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;SACjC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;SAC7E,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -4,22 +4,44 @@ export interface OpenPluginAuthorObject {
|
|
|
4
4
|
url?: string;
|
|
5
5
|
}
|
|
6
6
|
export interface OpenPluginManifest {
|
|
7
|
+
/**
|
|
8
|
+
* Required by Agent Plugins 1.0.0; identifies the targeted spec version.
|
|
9
|
+
* Optional here because pre-1.0.0 manifests omit it and are still imported.
|
|
10
|
+
*/
|
|
11
|
+
$schema?: string;
|
|
7
12
|
name: string;
|
|
8
13
|
version?: string;
|
|
9
14
|
description?: string;
|
|
15
|
+
/** 1.0.0 permits only the object form; the string form is legacy. */
|
|
10
16
|
author?: string | OpenPluginAuthorObject;
|
|
11
17
|
homepage?: string;
|
|
12
18
|
repository?: string;
|
|
13
19
|
license?: string;
|
|
14
|
-
logo?: string;
|
|
15
20
|
keywords?: string[];
|
|
21
|
+
/**
|
|
22
|
+
* Agent Plugins 1.0.0 client-specific data, keyed by reverse-domain
|
|
23
|
+
* namespace. The toolkit reads and writes `com.microsoft.agents-toolkit`.
|
|
24
|
+
*/
|
|
25
|
+
extensions?: Record<string, unknown>;
|
|
26
|
+
/** Raw pre-1.0.0 toolkit extension block, retained only during legacy import. */
|
|
27
|
+
legacyAtkExtension?: unknown;
|
|
28
|
+
/** @deprecated Not in Agent Plugins 1.0.0. */
|
|
29
|
+
logo?: string;
|
|
30
|
+
/** @deprecated Component relocation was removed in Agent Plugins 1.0.0. */
|
|
16
31
|
skills?: string | string[] | Record<string, unknown>;
|
|
32
|
+
/** @deprecated Component relocation was removed in Agent Plugins 1.0.0. */
|
|
17
33
|
commands?: string | string[] | Record<string, unknown>;
|
|
34
|
+
/** @deprecated Component relocation was removed in Agent Plugins 1.0.0. */
|
|
18
35
|
agents?: string | string[] | Record<string, unknown>;
|
|
36
|
+
/** @deprecated Component relocation was removed in Agent Plugins 1.0.0. */
|
|
19
37
|
hooks?: string | string[] | Record<string, unknown>;
|
|
38
|
+
/** @deprecated Component relocation was removed in Agent Plugins 1.0.0. */
|
|
20
39
|
mcpServers?: string | string[] | Record<string, unknown>;
|
|
40
|
+
/** @deprecated Component relocation was removed in Agent Plugins 1.0.0. */
|
|
21
41
|
lspServers?: string | string[] | Record<string, unknown>;
|
|
42
|
+
/** @deprecated Component relocation was removed in Agent Plugins 1.0.0. */
|
|
22
43
|
rules?: string | string[] | Record<string, unknown>;
|
|
44
|
+
/** @deprecated Component relocation was removed in Agent Plugins 1.0.0. */
|
|
23
45
|
outputStyles?: string | string[];
|
|
24
46
|
}
|
|
25
47
|
export interface ParsedAuthor {
|
|
@@ -28,8 +50,16 @@ export interface ParsedAuthor {
|
|
|
28
50
|
url?: string;
|
|
29
51
|
}
|
|
30
52
|
export interface OpenPluginMcpServerEntry {
|
|
31
|
-
|
|
53
|
+
/** Required by mcp.schema.json: "stdio" | "streamable-http" | "sse". */
|
|
32
54
|
type?: string;
|
|
55
|
+
/** Required for the streamable-http and sse transports. */
|
|
56
|
+
url?: string;
|
|
57
|
+
/** Required for the stdio transport. */
|
|
58
|
+
command?: string;
|
|
59
|
+
args?: string[];
|
|
60
|
+
env?: Record<string, string>;
|
|
61
|
+
cwd?: string;
|
|
62
|
+
headers?: Record<string, string>;
|
|
33
63
|
description?: string;
|
|
34
64
|
[key: string]: unknown;
|
|
35
65
|
}
|
|
@@ -37,12 +67,20 @@ export interface OpenPluginMcpJson {
|
|
|
37
67
|
mcpServers?: Record<string, OpenPluginMcpServerEntry>;
|
|
38
68
|
[key: string]: unknown;
|
|
39
69
|
}
|
|
70
|
+
export type ParsedManifestKind =
|
|
71
|
+
/** Agent Plugins 1.0.0: plugin.json in the plugin root. */
|
|
72
|
+
"agent-plugin"
|
|
73
|
+
/** Pre-1.0.0 layouts, accepted on import only. */
|
|
74
|
+
| "open-plugin" | "claude-plugin" | "cursor-plugin";
|
|
40
75
|
export interface ParsedOpenPlugin {
|
|
41
76
|
pluginRoot: string;
|
|
42
77
|
manifest: OpenPluginManifest;
|
|
43
78
|
manifestPath: string;
|
|
44
|
-
manifestKind:
|
|
79
|
+
manifestKind: ParsedManifestKind;
|
|
80
|
+
/** True when the directory used a pre-1.0.0 layout. */
|
|
81
|
+
isLegacyLayout: boolean;
|
|
45
82
|
mcpServers: Record<string, OpenPluginMcpServerEntry>;
|
|
83
|
+
invalidRemoteMcpServers?: string[];
|
|
46
84
|
skills: string[];
|
|
47
85
|
skillsRoot?: string;
|
|
48
86
|
commands: string[];
|
|
@@ -54,13 +92,18 @@ export interface ParsedOpenPlugin {
|
|
|
54
92
|
atkExtension?: AtkExtensionBlock;
|
|
55
93
|
}
|
|
56
94
|
export type AuthorizationType = "None" | "OAuthPluginVault" | "ApiKeyPluginVault";
|
|
95
|
+
export type ConnectorAuthorizationType = AuthorizationType | "DynamicClientRegistration" | "AzureKeyVault";
|
|
57
96
|
export type DefaultAuthOption = "Auto" | AuthorizationType;
|
|
58
97
|
/**
|
|
59
|
-
* Extension block embedded under `
|
|
60
|
-
* by `atk export
|
|
61
|
-
* cannot natively represent so that re-importing
|
|
62
|
-
* project losslessly. All fields are optional — the
|
|
63
|
-
* keys the same way it treats a plugin.json without
|
|
98
|
+
* Extension block embedded under `extensions["com.microsoft.agents-toolkit"]`
|
|
99
|
+
* in plugin.json by `atk export agentplugin`. Carries every field that the
|
|
100
|
+
* Agent Plugins spec cannot natively represent so that re-importing
|
|
101
|
+
* reconstructs the original project losslessly. All fields are optional — the
|
|
102
|
+
* importer treats missing keys the same way it treats a plugin.json without
|
|
103
|
+
* this extension at all.
|
|
104
|
+
*
|
|
105
|
+
* Pre-1.0.0 exports wrote this block to a top-level
|
|
106
|
+
* `x-microsoft-365-agents-toolkit` key, which the importer still reads.
|
|
64
107
|
*/
|
|
65
108
|
export interface AtkExtensionBlock {
|
|
66
109
|
manifestVersion?: string;
|
|
@@ -84,17 +127,27 @@ export interface AtkExtensionBlock {
|
|
|
84
127
|
/**
|
|
85
128
|
* Per-agentConnector overrides preserved verbatim: the keys are the
|
|
86
129
|
* connector ids (matching the .mcp.json server name). Values store the
|
|
87
|
-
* fields .mcp.json cannot carry: displayName, description,
|
|
130
|
+
* fields .mcp.json cannot carry: displayName, description, reusable,
|
|
131
|
+
* authorization, and MCP tool-description metadata.
|
|
88
132
|
*/
|
|
89
133
|
agentConnectors?: Record<string, AtkAgentConnectorExt>;
|
|
90
134
|
}
|
|
91
135
|
export interface AtkAgentConnectorExt {
|
|
92
136
|
displayName?: string;
|
|
93
137
|
description?: string;
|
|
138
|
+
reusable?: boolean;
|
|
94
139
|
authorization?: {
|
|
95
|
-
type:
|
|
140
|
+
type: ConnectorAuthorizationType;
|
|
96
141
|
referenceId?: string;
|
|
97
142
|
};
|
|
143
|
+
mcpToolDescription?: {
|
|
144
|
+
/** Original path relative to the Toolkit appPackage directory. */
|
|
145
|
+
file?: string;
|
|
146
|
+
/** Path to the preserved file copy relative to the Agent Plugin root. */
|
|
147
|
+
source?: string;
|
|
148
|
+
/** Validated file snapshot used only while importing. */
|
|
149
|
+
contents?: Buffer;
|
|
150
|
+
};
|
|
98
151
|
}
|
|
99
152
|
export interface ImportInputs {
|
|
100
153
|
path: string;
|
|
@@ -111,15 +164,24 @@ export interface ImportInputs {
|
|
|
111
164
|
export interface ExportInputs {
|
|
112
165
|
/** Path to the existing ATK project (folder that contains appPackage/manifest.json). */
|
|
113
166
|
path: string;
|
|
114
|
-
/** Destination
|
|
167
|
+
/** Destination plugin directory. Defaults to ./<plugin-name>-agentplugin. */
|
|
115
168
|
output?: string;
|
|
116
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* @deprecated Ignored since Agent Plugins 1.0.0, which mandates plugin.json
|
|
171
|
+
* in the plugin root. Accepted so existing scripts keep running; passing a
|
|
172
|
+
* value emits a warning.
|
|
173
|
+
*/
|
|
117
174
|
manifestKind?: "open-plugin" | "claude-plugin" | "cursor-plugin";
|
|
118
175
|
}
|
|
119
|
-
export
|
|
176
|
+
export type CopyOp = {
|
|
120
177
|
src: string;
|
|
121
178
|
destRelative: string;
|
|
122
|
-
|
|
179
|
+
kind: "file" | "directory";
|
|
180
|
+
} | {
|
|
181
|
+
contents: Buffer;
|
|
182
|
+
destRelative: string;
|
|
183
|
+
kind: "contents";
|
|
184
|
+
};
|
|
123
185
|
export interface MappedManifest {
|
|
124
186
|
manifest: Record<string, unknown>;
|
|
125
187
|
copyOps: CopyOp[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/types.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/types.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO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CAAC;QAChB,yDAAyD;QACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,iBAAiB,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,wFAAwF;IACxF,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,YAAY,CAAC,EAAE,aAAa,GAAG,eAAe,GAAG,eAAe,CAAC;CAClE;AAED,MAAM,MAAM,MAAM,GACd;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAA;CAAE,GACjE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AtkExtensionBlock, OpenPluginManifest, OpenPluginMcpServerEntry } from "./types";
|
|
2
|
+
export interface ParsedAgentPluginManifest {
|
|
3
|
+
manifest: OpenPluginManifest;
|
|
4
|
+
warnings: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface ParsedAgentPluginMcpJson {
|
|
7
|
+
mcpServers: Record<string, OpenPluginMcpServerEntry>;
|
|
8
|
+
invalidRemoteMcpServers: string[];
|
|
9
|
+
warnings: string[];
|
|
10
|
+
}
|
|
11
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
12
|
+
export declare function parseAgentPluginManifest(value: unknown): ParsedAgentPluginManifest;
|
|
13
|
+
export declare function parseLegacyOpenPluginManifest(value: unknown): OpenPluginManifest;
|
|
14
|
+
export declare function parseAtkExtension(value: unknown, warnings: string[]): AtkExtensionBlock | undefined;
|
|
15
|
+
export declare function parseAgentPluginMcpJson(value: unknown): ParsedAgentPluginMcpJson;
|
|
16
|
+
export declare function getRemoteMcpUrlError(value: unknown): string | undefined;
|
|
17
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/validation.ts"],"names":[],"mappings":"AAYA,OAAO,EAEL,iBAAiB,EAEjB,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;IACrD,uBAAuB,EAAE,MAAM,EAAE,CAAC;IAClC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAkCD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE;AAaD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,yBAAyB,CAsFlF;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAkBhF;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,EAAE,GACjB,iBAAiB,GAAG,SAAS,CAuD/B;AA6ND,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,wBAAwB,CAoChF;AA8ED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAoBvE"}
|